TCT 2.3.1 Release
authorJihun Park <jihun87.park@samsung.com>
Wed, 16 Sep 2015 02:08:17 +0000 (11:08 +0900)
committerJihun Park <jihun87.park@samsung.com>
Wed, 16 Sep 2015 02:08:17 +0000 (11:08 +0900)
Change-Id: I573a1dafd8243543e1dd995dd1c83bdfd9a8c6f0
Signed-off-by: Jihun Park <jihun87.park@samsung.com>
1415 files changed:
CMakeLists.txt [new file with mode: 0755]
LICENSE [new file with mode: 0755]
README.txt [new file with mode: 0755]
custom_tclist/BAT.list [new file with mode: 0755]
custom_tclist/Emulator.tclist [new file with mode: 0755]
custom_tclist/Null.list [new file with mode: 0755]
exclude.list [new file with mode: 0755]
media/sound_5.wav [new file with mode: 0755]
media/tct-content-tizen-tests_audio_default.mp3 [new file with mode: 0755]
media/tct-content-tizen-tests_image_default.jpg [new file with mode: 0755]
media/tct-content-tizen-tests_video.mp4 [new file with mode: 0755]
packaging/ctc/native-audio-io-ctc.spec [new file with mode: 0755]
packaging/ctc/native-audio-io-ctc.xml [new file with mode: 0755]
packaging/ctc/native-camera-ctc.spec [new file with mode: 0755]
packaging/ctc/native-camera-ctc.xml [new file with mode: 0755]
packaging/ctc/native-connection-ctc.spec [new file with mode: 0755]
packaging/ctc/native-connection-ctc.xml [new file with mode: 0755]
packaging/ctc/native-device-ctc.spec [new file with mode: 0755]
packaging/ctc/native-device-ctc.xml [new file with mode: 0755]
packaging/ctc/native-filesystem-permission-ctc.spec [new file with mode: 0755]
packaging/ctc/native-filesystem-permission-ctc.xml [new file with mode: 0755]
packaging/ctc/native-image-util-ctc.spec [new file with mode: 0755]
packaging/ctc/native-image-util-ctc.xml [new file with mode: 0755]
packaging/ctc/native-libstorage-ctc.spec [new file with mode: 0755]
packaging/ctc/native-libstorage-ctc.xml [new file with mode: 0755]
packaging/ctc/native-location-manager-ctc.spec [new file with mode: 0755]
packaging/ctc/native-location-manager-ctc.xml [new file with mode: 0755]
packaging/ctc/native-opengl-ctc.spec [new file with mode: 0755]
packaging/ctc/native-opengl-ctc.xml [new file with mode: 0755]
packaging/ctc/native-platform-permission-ctc.spec [new file with mode: 0755]
packaging/ctc/native-platform-permission-ctc.xml [new file with mode: 0755]
packaging/ctc/native-player-ctc.spec [new file with mode: 0755]
packaging/ctc/native-player-ctc.xml [new file with mode: 0755]
packaging/ctc/native-runtime-info-ctc.spec [new file with mode: 0755]
packaging/ctc/native-runtime-info-ctc.xml [new file with mode: 0755]
packaging/ctc/native-sensor-ctc.spec [new file with mode: 0755]
packaging/ctc/native-sensor-ctc.xml [new file with mode: 0755]
packaging/ctc/native-sound-manager-ctc.spec [new file with mode: 0755]
packaging/ctc/native-sound-manager-ctc.xml [new file with mode: 0755]
packaging/ctc/native-system-info-ctc.spec [new file with mode: 0755]
packaging/ctc/native-system-info-ctc.xml [new file with mode: 0755]
packaging/ctc/native-telephony-ctc.spec [new file with mode: 0755]
packaging/ctc/native-telephony-ctc.xml [new file with mode: 0755]
packaging/itc/native-app-manager-itc.spec [new file with mode: 0755]
packaging/itc/native-app-manager-itc.xml [new file with mode: 0755]
packaging/itc/native-appcore-agent-itc.spec [new file with mode: 0755]
packaging/itc/native-appcore-agent-itc.xml [new file with mode: 0755]
packaging/itc/native-appcore-watch-itc.spec [new file with mode: 0755]
packaging/itc/native-appcore-watch-itc.xml [new file with mode: 0755]
packaging/itc/native-appcore-widget-itc.spec [new file with mode: 0755]
packaging/itc/native-appcore-widget-itc.xml [new file with mode: 0755]
packaging/itc/native-application-itc.spec [new file with mode: 0755]
packaging/itc/native-application-itc.xml [new file with mode: 0755]
packaging/itc/native-audio-io-itc.spec [new file with mode: 0755]
packaging/itc/native-audio-io-itc.xml [new file with mode: 0755]
packaging/itc/native-badge-itc.spec [new file with mode: 0755]
packaging/itc/native-badge-itc.xml [new file with mode: 0755]
packaging/itc/native-base-utils-itc.spec [new file with mode: 0755]
packaging/itc/native-base-utils-itc.xml [new file with mode: 0755]
packaging/itc/native-bluetooth-itc.spec [new file with mode: 0755]
packaging/itc/native-bluetooth-itc.xml [new file with mode: 0755]
packaging/itc/native-bundle-itc.spec [new file with mode: 0755]
packaging/itc/native-bundle-itc.xml [new file with mode: 0755]
packaging/itc/native-cairo-itc.spec [new file with mode: 0755]
packaging/itc/native-cairo-itc.xml [new file with mode: 0755]
packaging/itc/native-camera-itc.spec [new file with mode: 0755]
packaging/itc/native-camera-itc.xml [new file with mode: 0755]
packaging/itc/native-capi-media-tool-itc.spec [new file with mode: 0755]
packaging/itc/native-capi-media-tool-itc.xml [new file with mode: 0755]
packaging/itc/native-capi-message-port-itc.spec [new file with mode: 0755]
packaging/itc/native-capi-message-port-itc.xml [new file with mode: 0755]
packaging/itc/native-connection-itc.spec [new file with mode: 0755]
packaging/itc/native-connection-itc.xml [new file with mode: 0755]
packaging/itc/native-context-manager-itc.spec [new file with mode: 0755]
packaging/itc/native-context-manager-itc.xml [new file with mode: 0755]
packaging/itc/native-data-control-itc.spec [new file with mode: 0755]
packaging/itc/native-data-control-itc.xml [new file with mode: 0755]
packaging/itc/native-device-itc.spec [new file with mode: 0755]
packaging/itc/native-device-itc.xml [new file with mode: 0755]
packaging/itc/native-dlog-itc.spec [new file with mode: 0755]
packaging/itc/native-dlog-itc.xml [new file with mode: 0755]
packaging/itc/native-efl-ext-itc.spec [new file with mode: 0755]
packaging/itc/native-efl-ext-itc.xml [new file with mode: 0755]
packaging/itc/native-efl-util-itc.spec [new file with mode: 0755]
packaging/itc/native-efl-util-itc.xml [new file with mode: 0755]
packaging/itc/native-image-util-itc.spec [new file with mode: 0755]
packaging/itc/native-image-util-itc.xml [new file with mode: 0755]
packaging/itc/native-key-manager-itc.spec [new file with mode: 0755]
packaging/itc/native-key-manager-itc.xml [new file with mode: 0755]
packaging/itc/native-libstorage-itc.spec [new file with mode: 0755]
packaging/itc/native-libstorage-itc.xml [new file with mode: 0755]
packaging/itc/native-location-manager-itc.spec [new file with mode: 0755]
packaging/itc/native-location-manager-itc.xml [new file with mode: 0755]
packaging/itc/native-media-content-itc.spec [new file with mode: 0755]
packaging/itc/native-media-content-itc.xml [new file with mode: 0755]
packaging/itc/native-media-key-itc.spec [new file with mode: 0755]
packaging/itc/native-media-key-itc.xml [new file with mode: 0755]
packaging/itc/native-mediacodec-itc.spec [new file with mode: 0755]
packaging/itc/native-mediacodec-itc.xml [new file with mode: 0755]
packaging/itc/native-messages-itc.spec [new file with mode: 0755]
packaging/itc/native-messages-itc.xml [new file with mode: 0755]
packaging/itc/native-metadata-extractor-itc.spec [new file with mode: 0755]
packaging/itc/native-metadata-extractor-itc.xml [new file with mode: 0755]
packaging/itc/native-mime-type-itc.spec [new file with mode: 0755]
packaging/itc/native-mime-type-itc.xml [new file with mode: 0755]
packaging/itc/native-native-common-itc.spec [new file with mode: 0755]
packaging/itc/native-native-common-itc.xml [new file with mode: 0755]
packaging/itc/native-nfc-itc.spec [new file with mode: 0755]
packaging/itc/native-nfc-itc.xml [new file with mode: 0755]
packaging/itc/native-notification-itc.spec [new file with mode: 0755]
packaging/itc/native-notification-itc.xml [new file with mode: 0755]
packaging/itc/native-package-manager-itc.spec [new file with mode: 0755]
packaging/itc/native-package-manager-itc.xml [new file with mode: 0755]
packaging/itc/native-player-itc.spec [new file with mode: 0755]
packaging/itc/native-player-itc.xml [new file with mode: 0755]
packaging/itc/native-privilege-info-itc.spec [new file with mode: 0755]
packaging/itc/native-privilege-info-itc.xml [new file with mode: 0755]
packaging/itc/native-push-itc.spec [new file with mode: 0755]
packaging/itc/native-push-itc.xml [new file with mode: 0755]
packaging/itc/native-radio-itc.spec [new file with mode: 0755]
packaging/itc/native-radio-itc.xml [new file with mode: 0755]
packaging/itc/native-recorder-itc.spec [new file with mode: 0755]
packaging/itc/native-recorder-itc.xml [new file with mode: 0755]
packaging/itc/native-runtime-info-itc.spec [new file with mode: 0755]
packaging/itc/native-runtime-info-itc.xml [new file with mode: 0755]
packaging/itc/native-sensor-itc.spec [new file with mode: 0755]
packaging/itc/native-sensor-itc.xml [new file with mode: 0755]
packaging/itc/native-smartcard-itc.spec [new file with mode: 0755]
packaging/itc/native-smartcard-itc.xml [new file with mode: 0755]
packaging/itc/native-sound-manager-itc.spec [new file with mode: 0755]
packaging/itc/native-sound-manager-itc.xml [new file with mode: 0755]
packaging/itc/native-stt-itc.spec [new file with mode: 0755]
packaging/itc/native-stt-itc.xml [new file with mode: 0755]
packaging/itc/native-system-info-itc.spec [new file with mode: 0755]
packaging/itc/native-system-info-itc.xml [new file with mode: 0755]
packaging/itc/native-system-settings-itc.spec [new file with mode: 0755]
packaging/itc/native-system-settings-itc.xml [new file with mode: 0755]
packaging/itc/native-tbm-itc.spec [new file with mode: 0755]
packaging/itc/native-tbm-itc.xml [new file with mode: 0755]
packaging/itc/native-telephony-itc.spec [new file with mode: 0755]
packaging/itc/native-telephony-itc.xml [new file with mode: 0755]
packaging/itc/native-tone-player-itc.spec [new file with mode: 0755]
packaging/itc/native-tone-player-itc.xml [new file with mode: 0755]
packaging/itc/native-tts-itc.spec [new file with mode: 0755]
packaging/itc/native-tts-itc.xml [new file with mode: 0755]
packaging/itc/native-wav-player-itc.spec [new file with mode: 0755]
packaging/itc/native-wav-player-itc.xml [new file with mode: 0755]
packaging/itc/native-webkit2-itc.spec [new file with mode: 0755]
packaging/itc/native-webkit2-itc.xml [new file with mode: 0755]
packaging/itc/native-widget-viewer-evas-itc.spec [new file with mode: 0755]
packaging/itc/native-widget-viewer-evas-itc.xml [new file with mode: 0755]
packaging/itc/native-widget_service-itc.spec [new file with mode: 0755]
packaging/itc/native-widget_service-itc.xml [new file with mode: 0755]
packaging/itc/native-wifi-itc.spec [new file with mode: 0755]
packaging/itc/native-wifi-itc.xml [new file with mode: 0755]
packaging/utc/core-app-manager-tests.spec [new file with mode: 0755]
packaging/utc/core-app-manager-tests.xml [new file with mode: 0755]
packaging/utc/core-appcore-agent-tests.spec [new file with mode: 0755]
packaging/utc/core-appcore-agent-tests.xml [new file with mode: 0755]
packaging/utc/core-appcore-watch-tests.spec [new file with mode: 0755]
packaging/utc/core-appcore-watch-tests.xml [new file with mode: 0755]
packaging/utc/core-appcore-widget-tests.spec [new file with mode: 0755]
packaging/utc/core-appcore-widget-tests.xml [new file with mode: 0755]
packaging/utc/core-application-tests.spec [new file with mode: 0755]
packaging/utc/core-application-tests.xml [new file with mode: 0755]
packaging/utc/core-audio-io-tests.spec [new file with mode: 0755]
packaging/utc/core-audio-io-tests.xml [new file with mode: 0755]
packaging/utc/core-badge-tests.spec [new file with mode: 0755]
packaging/utc/core-badge-tests.xml [new file with mode: 0755]
packaging/utc/core-base-utils-tests.spec [new file with mode: 0755]
packaging/utc/core-base-utils-tests.xml [new file with mode: 0755]
packaging/utc/core-bluetooth-tests.spec [new file with mode: 0755]
packaging/utc/core-bluetooth-tests.xml [new file with mode: 0755]
packaging/utc/core-bundle-tests.spec [new file with mode: 0755]
packaging/utc/core-bundle-tests.xml [new file with mode: 0755]
packaging/utc/core-cairo-tests.spec [new file with mode: 0755]
packaging/utc/core-cairo-tests.xml [new file with mode: 0755]
packaging/utc/core-camera-tests.spec [new file with mode: 0755]
packaging/utc/core-camera-tests.xml [new file with mode: 0755]
packaging/utc/core-capi-media-tool-tests.spec [new file with mode: 0755]
packaging/utc/core-capi-media-tool-tests.xml [new file with mode: 0755]
packaging/utc/core-capi-message-port-tests.spec [new file with mode: 0755]
packaging/utc/core-capi-message-port-tests.xml [new file with mode: 0755]
packaging/utc/core-connection-tests.spec [new file with mode: 0755]
packaging/utc/core-connection-tests.xml [new file with mode: 0755]
packaging/utc/core-context-manager-tests.spec [new file with mode: 0755]
packaging/utc/core-context-manager-tests.xml [new file with mode: 0755]
packaging/utc/core-data-control-tests.spec [new file with mode: 0755]
packaging/utc/core-data-control-tests.xml [new file with mode: 0755]
packaging/utc/core-device-tests.spec [new file with mode: 0755]
packaging/utc/core-device-tests.xml [new file with mode: 0755]
packaging/utc/core-dlog-tests.spec [new file with mode: 0755]
packaging/utc/core-dlog-tests.xml [new file with mode: 0755]
packaging/utc/core-efl-ext-tests.spec [new file with mode: 0755]
packaging/utc/core-efl-ext-tests.xml [new file with mode: 0755]
packaging/utc/core-efl-util-tests.spec [new file with mode: 0755]
packaging/utc/core-efl-util-tests.xml [new file with mode: 0755]
packaging/utc/core-image-util-tests.spec [new file with mode: 0755]
packaging/utc/core-image-util-tests.xml [new file with mode: 0755]
packaging/utc/core-key-manager-tests.spec [new file with mode: 0755]
packaging/utc/core-key-manager-tests.xml [new file with mode: 0755]
packaging/utc/core-libstorage-tests.spec [new file with mode: 0755]
packaging/utc/core-libstorage-tests.xml [new file with mode: 0755]
packaging/utc/core-location-manager-tests.spec [new file with mode: 0755]
packaging/utc/core-location-manager-tests.xml [new file with mode: 0755]
packaging/utc/core-media-content-tests.spec [new file with mode: 0755]
packaging/utc/core-media-content-tests.xml [new file with mode: 0755]
packaging/utc/core-media-key-tests.spec [new file with mode: 0755]
packaging/utc/core-media-key-tests.xml [new file with mode: 0755]
packaging/utc/core-mediacodec-tests.spec [new file with mode: 0755]
packaging/utc/core-mediacodec-tests.xml [new file with mode: 0755]
packaging/utc/core-messages-tests.spec [new file with mode: 0755]
packaging/utc/core-messages-tests.xml [new file with mode: 0755]
packaging/utc/core-metadata-extractor-tests.spec [new file with mode: 0755]
packaging/utc/core-metadata-extractor-tests.xml [new file with mode: 0755]
packaging/utc/core-mime-type-tests.spec [new file with mode: 0755]
packaging/utc/core-mime-type-tests.xml [new file with mode: 0755]
packaging/utc/core-native-common-tests.spec [new file with mode: 0755]
packaging/utc/core-native-common-tests.xml [new file with mode: 0755]
packaging/utc/core-nfc-tests.spec [new file with mode: 0755]
packaging/utc/core-nfc-tests.xml [new file with mode: 0755]
packaging/utc/core-notification-tests.spec [new file with mode: 0755]
packaging/utc/core-notification-tests.xml [new file with mode: 0755]
packaging/utc/core-package-manager-tests.spec [new file with mode: 0755]
packaging/utc/core-package-manager-tests.xml [new file with mode: 0755]
packaging/utc/core-player-tests.spec [new file with mode: 0755]
packaging/utc/core-player-tests.xml [new file with mode: 0755]
packaging/utc/core-privilege-info-tests.spec [new file with mode: 0755]
packaging/utc/core-privilege-info-tests.xml [new file with mode: 0755]
packaging/utc/core-push-tests.spec [new file with mode: 0755]
packaging/utc/core-push-tests.xml [new file with mode: 0755]
packaging/utc/core-radio-tests.spec [new file with mode: 0755]
packaging/utc/core-radio-tests.xml [new file with mode: 0755]
packaging/utc/core-recorder-tests.spec [new file with mode: 0755]
packaging/utc/core-recorder-tests.xml [new file with mode: 0755]
packaging/utc/core-runtime-info-tests.spec [new file with mode: 0755]
packaging/utc/core-runtime-info-tests.xml [new file with mode: 0755]
packaging/utc/core-sensor-tests.spec [new file with mode: 0755]
packaging/utc/core-sensor-tests.xml [new file with mode: 0755]
packaging/utc/core-smartcard-tests.spec [new file with mode: 0755]
packaging/utc/core-smartcard-tests.xml [new file with mode: 0755]
packaging/utc/core-sound-manager-tests.spec [new file with mode: 0755]
packaging/utc/core-sound-manager-tests.xml [new file with mode: 0755]
packaging/utc/core-stt-tests.spec [new file with mode: 0755]
packaging/utc/core-stt-tests.xml [new file with mode: 0755]
packaging/utc/core-system-info-tests.spec [new file with mode: 0755]
packaging/utc/core-system-info-tests.xml [new file with mode: 0755]
packaging/utc/core-system-settings-tests.spec [new file with mode: 0755]
packaging/utc/core-system-settings-tests.xml [new file with mode: 0755]
packaging/utc/core-tbm-tests.spec [new file with mode: 0755]
packaging/utc/core-tbm-tests.xml [new file with mode: 0755]
packaging/utc/core-telephony-tests.spec [new file with mode: 0755]
packaging/utc/core-telephony-tests.xml [new file with mode: 0755]
packaging/utc/core-tone-player-tests.spec [new file with mode: 0755]
packaging/utc/core-tone-player-tests.xml [new file with mode: 0755]
packaging/utc/core-tts-tests.spec [new file with mode: 0755]
packaging/utc/core-tts-tests.xml [new file with mode: 0755]
packaging/utc/core-wav-player-tests.spec [new file with mode: 0755]
packaging/utc/core-wav-player-tests.xml [new file with mode: 0755]
packaging/utc/core-webkit2-tests.spec [new file with mode: 0755]
packaging/utc/core-webkit2-tests.xml [new file with mode: 0755]
packaging/utc/core-widget_service-tests.spec [new file with mode: 0755]
packaging/utc/core-widget_service-tests.xml [new file with mode: 0755]
packaging/utc/core-widget_viewer_evas-tests.spec [new file with mode: 0755]
packaging/utc/core-widget_viewer_evas-tests.xml [new file with mode: 0755]
packaging/utc/core-wifi-tests.spec [new file with mode: 0755]
packaging/utc/core-wifi-tests.xml [new file with mode: 0755]
scripts/BAT_gen.sh [new file with mode: 0755]
scripts/appmanagerinstall.sh [new file with mode: 0755]
scripts/autocompletion.sh [new file with mode: 0755]
scripts/init.sh [new file with mode: 0755]
scripts/retriever.sh [new file with mode: 0755]
scripts/summary.sh [new file with mode: 0755]
scripts/tcbuild.sh [new file with mode: 0755]
scripts/tcbuildsdk.sh [new file with mode: 0755]
scripts/tcheadgen.sh [new file with mode: 0755]
scripts/tcpackageslistsgen.sh [new file with mode: 0755]
scripts/tctestsgen.sh [new file with mode: 0755]
src/CMakeLists.txt [new file with mode: 0755]
src/common/assert.h [new file with mode: 0755]
src/common/testcase.h [new file with mode: 0755]
src/ctc/audio-io/CMakeLists.txt [new file with mode: 0755]
src/ctc/audio-io/audio-io-common.c [new file with mode: 0755]
src/ctc/audio-io/audio-io-common.h [new file with mode: 0755]
src/ctc/audio-io/audio-io.c [new file with mode: 0755]
src/ctc/audio-io/tct-audio-io-native.c [new file with mode: 0755]
src/ctc/audio-io/tct-audio-io-native.h [new file with mode: 0755]
src/ctc/camera/CMakeLists.txt [new file with mode: 0755]
src/ctc/camera/camera-common.c [new file with mode: 0755]
src/ctc/camera/camera-common.h [new file with mode: 0755]
src/ctc/camera/camera.c [new file with mode: 0755]
src/ctc/camera/tct-camera-native.c [new file with mode: 0755]
src/ctc/camera/tct-camera-native.c.c [new file with mode: 0755]
src/ctc/camera/tct-camera-native.h [new file with mode: 0755]
src/ctc/connection/CMakeLists.txt [new file with mode: 0755]
src/ctc/connection/connection-common.c [new file with mode: 0755]
src/ctc/connection/connection-common.h [new file with mode: 0755]
src/ctc/connection/connection.c [new file with mode: 0755]
src/ctc/connection/tct-connection-native.c [new file with mode: 0755]
src/ctc/connection/tct-connection-native.h [new file with mode: 0755]
src/ctc/device/CMakeLists.txt [new file with mode: 0755]
src/ctc/device/device-common.c [new file with mode: 0755]
src/ctc/device/device-common.h [new file with mode: 0755]
src/ctc/device/device.c [new file with mode: 0755]
src/ctc/device/tct-device-native.c [new file with mode: 0755]
src/ctc/device/tct-device-native.h [new file with mode: 0755]
src/ctc/filesystem-permission/CMakeLists.txt [new file with mode: 0755]
src/ctc/filesystem-permission/filesystem-permission-common.c [new file with mode: 0755]
src/ctc/filesystem-permission/filesystem-permission-common.h [new file with mode: 0755]
src/ctc/filesystem-permission/filesystem-permission.c [new file with mode: 0755]
src/ctc/filesystem-permission/tct-filesystem-permission-native.c [new file with mode: 0755]
src/ctc/filesystem-permission/tct-filesystem-permission-native.h [new file with mode: 0755]
src/ctc/image-util/CMakeLists.txt [new file with mode: 0755]
src/ctc/image-util/ImageUtil_sample.jpg [new file with mode: 0755]
src/ctc/image-util/image-util-common.c [new file with mode: 0755]
src/ctc/image-util/image-util-common.h [new file with mode: 0755]
src/ctc/image-util/image-util.c [new file with mode: 0755]
src/ctc/image-util/tct-image-util-native.c [new file with mode: 0755]
src/ctc/image-util/tct-image-util-native.h [new file with mode: 0755]
src/ctc/libstorage/CMakeLists.txt [new file with mode: 0755]
src/ctc/libstorage/libstorage-common.c [new file with mode: 0755]
src/ctc/libstorage/libstorage-common.h [new file with mode: 0755]
src/ctc/libstorage/libstorage.c [new file with mode: 0755]
src/ctc/libstorage/tct-libstorage-native.c [new file with mode: 0755]
src/ctc/libstorage/tct-libstorage-native.h [new file with mode: 0755]
src/ctc/location-manager/CMakeLists.txt [new file with mode: 0755]
src/ctc/location-manager/location-manager-common.c [new file with mode: 0755]
src/ctc/location-manager/location-manager-common.h [new file with mode: 0755]
src/ctc/location-manager/location-manager.c [new file with mode: 0755]
src/ctc/location-manager/tct-location-manager-native.c [new file with mode: 0755]
src/ctc/location-manager/tct-location-manager-native.h [new file with mode: 0755]
src/ctc/opengl/CMakeLists.txt [new file with mode: 0755]
src/ctc/opengl/opengl-common.c [new file with mode: 0755]
src/ctc/opengl/opengl-common.h [new file with mode: 0755]
src/ctc/opengl/opengl.c [new file with mode: 0755]
src/ctc/opengl/tct-opengl-native.c [new file with mode: 0755]
src/ctc/opengl/tct-opengl-native.h [new file with mode: 0755]
src/ctc/platform-permission/CMakeLists.txt [new file with mode: 0755]
src/ctc/platform-permission/PlatformPermission_test.jpg [new file with mode: 0755]
src/ctc/platform-permission/core-cts-platformPermission-ctc-0.1-0.armv7l.rpm [new file with mode: 0755]
src/ctc/platform-permission/native-datacontrolprovider-ctc-0.1-0.armv7l.rpm [new file with mode: 0755]
src/ctc/platform-permission/native-datacontrolprovider-ctc-0.1-0.i586.rpm [new file with mode: 0755]
src/ctc/platform-permission/native-platform-permission-ctc-0.1-0.armv7l.rpm [new file with mode: 0755]
src/ctc/platform-permission/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm [new file with mode: 0755]
src/ctc/platform-permission/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm [new file with mode: 0755]
src/ctc/platform-permission/org.tizen.helloworld-1.0.0-arm.tpk [new file with mode: 0755]
src/ctc/platform-permission/org.tizen.helloworld-1.0.0-i386.tpk [new file with mode: 0755]
src/ctc/platform-permission/org.tizen.testapplication-1.0.0-arm.tpk [new file with mode: 0755]
src/ctc/platform-permission/org.tizen.testapplication-1.0.0-i386.tpk [new file with mode: 0755]
src/ctc/platform-permission/platform-permission-common.c [new file with mode: 0755]
src/ctc/platform-permission/platform-permission-common.h [new file with mode: 0755]
src/ctc/platform-permission/platform-permission.c [new file with mode: 0755]
src/ctc/platform-permission/tct-platform-permission-native.c [new file with mode: 0755]
src/ctc/platform-permission/tct-platform-permission-native.h [new file with mode: 0755]
src/ctc/player/CMakeLists.txt [new file with mode: 0755]
src/ctc/player/MediaPlayer.mp3 [new file with mode: 0755]
src/ctc/player/player-common.c [new file with mode: 0755]
src/ctc/player/player-common.h [new file with mode: 0755]
src/ctc/player/player.c [new file with mode: 0755]
src/ctc/player/tct-player-native.c [new file with mode: 0755]
src/ctc/player/tct-player-native.h [new file with mode: 0755]
src/ctc/runtime-info/CMakeLists.txt [new file with mode: 0755]
src/ctc/runtime-info/runtime-info-common.c [new file with mode: 0755]
src/ctc/runtime-info/runtime-info-common.h [new file with mode: 0755]
src/ctc/runtime-info/runtime-info.c [new file with mode: 0755]
src/ctc/runtime-info/tct-runtime-info-native.c [new file with mode: 0755]
src/ctc/runtime-info/tct-runtime-info-native.h [new file with mode: 0755]
src/ctc/sensor/CMakeLists.txt [new file with mode: 0755]
src/ctc/sensor/sensor-common.c [new file with mode: 0755]
src/ctc/sensor/sensor-common.h [new file with mode: 0755]
src/ctc/sensor/sensor.c [new file with mode: 0755]
src/ctc/sensor/tct-sensor-native.c [new file with mode: 0755]
src/ctc/sensor/tct-sensor-native.h [new file with mode: 0755]
src/ctc/sound-manager/CMakeLists.txt [new file with mode: 0755]
src/ctc/sound-manager/sound-manager-common.c [new file with mode: 0755]
src/ctc/sound-manager/sound-manager-common.h [new file with mode: 0755]
src/ctc/sound-manager/sound-manager.c [new file with mode: 0755]
src/ctc/sound-manager/tct-sound-manager-native.c [new file with mode: 0755]
src/ctc/sound-manager/tct-sound-manager-native.h [new file with mode: 0755]
src/ctc/system-info/CMakeLists.txt [new file with mode: 0755]
src/ctc/system-info/system-info-common.c [new file with mode: 0755]
src/ctc/system-info/system-info-common.h [new file with mode: 0755]
src/ctc/system-info/system-info.c [new file with mode: 0755]
src/ctc/system-info/tct-system-info-native.c [new file with mode: 0755]
src/ctc/system-info/tct-system-info-native.h [new file with mode: 0755]
src/ctc/telephony/CMakeLists.txt [new file with mode: 0755]
src/ctc/telephony/tct-telephony-native.c [new file with mode: 0755]
src/ctc/telephony/tct-telephony-native.h [new file with mode: 0755]
src/ctc/telephony/telephony-common.c [new file with mode: 0755]
src/ctc/telephony/telephony-common.h [new file with mode: 0755]
src/ctc/telephony/telephony.c [new file with mode: 0755]
src/itc/CMakeLists.txt [new file with mode: 0755]
src/itc/app-manager/CMakeLists.txt [new file with mode: 0755]
src/itc/app-manager/ITs-app-manager-common.c [new file with mode: 0755]
src/itc/app-manager/ITs-app-manager-common.h [new file with mode: 0755]
src/itc/app-manager/ITs-app-manager.c [new file with mode: 0755]
src/itc/app-manager/org.tizen.appmanagertestfile-1.0.0-arm.tpk [new file with mode: 0755]
src/itc/app-manager/org.tizen.appmanagertestfile-1.0.0-i386.tpk [new file with mode: 0755]
src/itc/app-manager/org.tizen.testapplication-1.0.0-arm.tpk [new file with mode: 0755]
src/itc/app-manager/org.tizen.testapplication-1.0.0-i386.tpk [new file with mode: 0755]
src/itc/app-manager/tct-app-manager-native.c [new file with mode: 0755]
src/itc/app-manager/tct-app-manager-native.h [new file with mode: 0755]
src/itc/appcore-agent/CMakeLists.txt [new file with mode: 0755]
src/itc/appcore-agent/ITs-appcore-agent-common.c [new file with mode: 0755]
src/itc/appcore-agent/ITs-appcore-agent-common.h [new file with mode: 0755]
src/itc/appcore-agent/ITs-appcore-agent.c [new file with mode: 0755]
src/itc/appcore-agent/tct-appcore-agent-native.c [new file with mode: 0755]
src/itc/appcore-agent/tct-appcore-agent-native.h [new file with mode: 0755]
src/itc/appcore-watch/CMakeLists.txt [new file with mode: 0755]
src/itc/appcore-watch/ITs-appcore-watch-common.c [new file with mode: 0755]
src/itc/appcore-watch/ITs-appcore-watch-common.h [new file with mode: 0755]
src/itc/appcore-watch/ITs-appcore-watch.c [new file with mode: 0755]
src/itc/appcore-watch/tct-appcore-watch-native.c [new file with mode: 0755]
src/itc/appcore-watch/tct-appcore-watch-native.h [new file with mode: 0755]
src/itc/appcore-widget/CMakeLists.txt [new file with mode: 0755]
src/itc/appcore-widget/ITs-appcore-widget-common.c [new file with mode: 0755]
src/itc/appcore-widget/ITs-appcore-widget-common.h [new file with mode: 0755]
src/itc/appcore-widget/ITs-appcore-widget.c [new file with mode: 0755]
src/itc/appcore-widget/tct-appcore-widget-native.c [new file with mode: 0755]
src/itc/appcore-widget/tct-appcore-widget-native.h [new file with mode: 0755]
src/itc/application/CMakeLists.txt [new file with mode: 0755]
src/itc/application/ITs-application-common.c [new file with mode: 0755]
src/itc/application/ITs-application-common.h [new file with mode: 0755]
src/itc/application/ITs-application.c [new file with mode: 0755]
src/itc/application/org.tizen.testapplication-1.0.0-arm.tpk [new file with mode: 0755]
src/itc/application/org.tizen.testapplication-1.0.0-i386.tpk [new file with mode: 0755]
src/itc/application/tct-application-native.c [new file with mode: 0755]
src/itc/application/tct-application-native.h [new file with mode: 0755]
src/itc/audio-io/CMakeLists.txt [new file with mode: 0755]
src/itc/audio-io/ITs-audio-input-common.c [new file with mode: 0755]
src/itc/audio-io/ITs-audio-input-common.h [new file with mode: 0755]
src/itc/audio-io/ITs-audio-input.c [new file with mode: 0755]
src/itc/audio-io/ITs-audio-input_create_destroy.c [new file with mode: 0755]
src/itc/audio-io/ITs-audio-output-common.c [new file with mode: 0755]
src/itc/audio-io/ITs-audio-output-common.h [new file with mode: 0755]
src/itc/audio-io/ITs-audio-output.c [new file with mode: 0755]
src/itc/audio-io/ITs-audio-output_create_destroy.c [new file with mode: 0755]
src/itc/audio-io/tct-audio-io-native.c [new file with mode: 0755]
src/itc/audio-io/tct-audio-io-native.h [new file with mode: 0755]
src/itc/badge/CMakeLists.txt [new file with mode: 0755]
src/itc/badge/ITs-badge-common.c [new file with mode: 0755]
src/itc/badge/ITs-badge-common.h [new file with mode: 0755]
src/itc/badge/ITs-badge.c [new file with mode: 0755]
src/itc/badge/tct-badge-native.c [new file with mode: 0755]
src/itc/badge/tct-badge-native.h [new file with mode: 0755]
src/itc/base-utils/CMakeLists.txt [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils-common.c [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils-common.h [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils-locale.c [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils-ubrk.c [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils-ucalendar.c [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils-udate.c [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils-udatepg.c [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils-uenumeration.c [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils-ulocale.c [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils-unumber.c [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils-uset.c [new file with mode: 0755]
src/itc/base-utils/ITs-base-utils.c [new file with mode: 0755]
src/itc/base-utils/tct-base-utils-native.c [new file with mode: 0755]
src/itc/base-utils/tct-base-utils-native.h [new file with mode: 0755]
src/itc/bluetooth/CMakeLists.txt [new file with mode: 0755]
src/itc/bluetooth/ITs-bluetooth-common.c [new file with mode: 0755]
src/itc/bluetooth/ITs-bluetooth-common.h [new file with mode: 0755]
src/itc/bluetooth/ITs-bluetooth.c [new file with mode: 0755]
src/itc/bluetooth/TestFile.vcf [new file with mode: 0755]
src/itc/bluetooth/tct-bluetooth-native.c [new file with mode: 0755]
src/itc/bluetooth/tct-bluetooth-native.h [new file with mode: 0755]
src/itc/bundle/CMakeLists.txt [new file with mode: 0755]
src/itc/bundle/ITs-bundle-common.c [new file with mode: 0755]
src/itc/bundle/ITs-bundle-common.h [new file with mode: 0755]
src/itc/bundle/ITs-bundle.c [new file with mode: 0755]
src/itc/bundle/tct-bundle-native.c [new file with mode: 0755]
src/itc/bundle/tct-bundle-native.h [new file with mode: 0755]
src/itc/cairo/CMakeLists.txt [new file with mode: 0755]
src/itc/cairo/ITs-cairo-common.c [new file with mode: 0755]
src/itc/cairo/ITs-cairo-common.h [new file with mode: 0755]
src/itc/cairo/ITs-cairo.c [new file with mode: 0755]
src/itc/cairo/tct-cairo-native.c [new file with mode: 0755]
src/itc/cairo/tct-cairo-native.h [new file with mode: 0755]
src/itc/camera/CMakeLists.txt [new file with mode: 0755]
src/itc/camera/ITs-camera-common.c [new file with mode: 0755]
src/itc/camera/ITs-camera-common.h [new file with mode: 0755]
src/itc/camera/ITs-camera.c [new file with mode: 0755]
src/itc/camera/tct-camera-native.c [new file with mode: 0755]
src/itc/camera/tct-camera-native.h [new file with mode: 0755]
src/itc/capi-media-tool/CMakeLists.txt [new file with mode: 0755]
src/itc/capi-media-tool/ITs-capi-media-tool-common.c [new file with mode: 0755]
src/itc/capi-media-tool/ITs-capi-media-tool-common.h [new file with mode: 0755]
src/itc/capi-media-tool/ITs-capi-media-tool.c [new file with mode: 0755]
src/itc/capi-media-tool/tct-capi-media-tool-native.c [new file with mode: 0755]
src/itc/capi-media-tool/tct-capi-media-tool-native.h [new file with mode: 0755]
src/itc/capi-message-port/CMakeLists.txt [new file with mode: 0755]
src/itc/capi-message-port/ITs-capi-message-port-common.c [new file with mode: 0755]
src/itc/capi-message-port/ITs-capi-message-port-common.h [new file with mode: 0755]
src/itc/capi-message-port/ITs-capi-message-port.c [new file with mode: 0755]
src/itc/capi-message-port/native-capi-message-port-itc.sh [new file with mode: 0755]
src/itc/capi-message-port/native-message-port-itc.sh [new file with mode: 0755]
src/itc/capi-message-port/res/org.tizen.messageportapp-1.0.0-arm.tpk [new file with mode: 0755]
src/itc/capi-message-port/res/org.tizen.messageportapp-1.0.0-i386.tpk [new file with mode: 0755]
src/itc/capi-message-port/tct-capi-message-port-native.c [new file with mode: 0755]
src/itc/capi-message-port/tct-capi-message-port-native.h [new file with mode: 0755]
src/itc/connection/CMakeLists.txt [new file with mode: 0755]
src/itc/connection/ITs-connection-common.c [new file with mode: 0755]
src/itc/connection/ITs-connection-common.h [new file with mode: 0755]
src/itc/connection/ITs-connection-profile.c [new file with mode: 0755]
src/itc/connection/ITs-connection-wifi-profile.c [new file with mode: 0755]
src/itc/connection/ITs-connection.c [new file with mode: 0755]
src/itc/connection/tct-connection-native.c [new file with mode: 0755]
src/itc/connection/tct-connection-native.h [new file with mode: 0755]
src/itc/context-manager/CMakeLists.txt [new file with mode: 0755]
src/itc/context-manager/ITs-context-manager-common.c [new file with mode: 0755]
src/itc/context-manager/ITs-context-manager-common.h [new file with mode: 0755]
src/itc/context-manager/ITs-context-manager_activity.c [new file with mode: 0755]
src/itc/context-manager/ITs-context-manager_gesture.c [new file with mode: 0755]
src/itc/context-manager/tct-context-manager-native.c [new file with mode: 0755]
src/itc/context-manager/tct-context-manager-native.h [new file with mode: 0755]
src/itc/data-control/CMakeLists.txt [new file with mode: 0755]
src/itc/data-control/ITs-data-control-common.c [new file with mode: 0755]
src/itc/data-control/ITs-data-control-common.h [new file with mode: 0755]
src/itc/data-control/ITs-data-control-map.c [new file with mode: 0755]
src/itc/data-control/ITs-data-control-provider.c [new file with mode: 0755]
src/itc/data-control/ITs-data-control-sql.c [new file with mode: 0755]
src/itc/data-control/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm [new file with mode: 0755]
src/itc/data-control/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm [new file with mode: 0755]
src/itc/data-control/tct-data-control-native.c [new file with mode: 0755]
src/itc/data-control/tct-data-control-native.h [new file with mode: 0755]
src/itc/device/CMakeLists.txt [new file with mode: 0755]
src/itc/device/ITs-device-common.c [new file with mode: 0755]
src/itc/device/ITs-device-common.h [new file with mode: 0755]
src/itc/device/ITs-device.c [new file with mode: 0755]
src/itc/device/ITs-device_battery.c [new file with mode: 0755]
src/itc/device/ITs-device_display.c [new file with mode: 0755]
src/itc/device/ITs-device_haptic.c [new file with mode: 0755]
src/itc/device/ITs-device_led.c [new file with mode: 0755]
src/itc/device/ITs-device_power.c [new file with mode: 0755]
src/itc/device/tct-device-native.c [new file with mode: 0755]
src/itc/device/tct-device-native.h [new file with mode: 0755]
src/itc/dlog/CMakeLists.txt [new file with mode: 0755]
src/itc/dlog/ITs-dlog-common.c [new file with mode: 0755]
src/itc/dlog/ITs-dlog-common.h [new file with mode: 0755]
src/itc/dlog/ITs-dlog.c [new file with mode: 0755]
src/itc/dlog/tct-dlog-native.c [new file with mode: 0755]
src/itc/dlog/tct-dlog-native.h [new file with mode: 0755]
src/itc/efl-ext/CMakeLists.txt [new file with mode: 0755]
src/itc/efl-ext/ITs-efl-ext-common.c [new file with mode: 0755]
src/itc/efl-ext/ITs-efl-ext-common.h [new file with mode: 0755]
src/itc/efl-ext/ITs-efl-ext.c [new file with mode: 0755]
src/itc/efl-ext/tct-efl-ext-native.c [new file with mode: 0755]
src/itc/efl-ext/tct-efl-ext-native.h [new file with mode: 0755]
src/itc/efl-util/CMakeLists.txt [new file with mode: 0755]
src/itc/efl-util/ITs-efl-util-common.c [new file with mode: 0755]
src/itc/efl-util/ITs-efl-util-common.h [new file with mode: 0755]
src/itc/efl-util/ITs-efl-util.c [new file with mode: 0755]
src/itc/efl-util/tct-efl-util-native.c [new file with mode: 0755]
src/itc/efl-util/tct-efl-util-native.h [new file with mode: 0755]
src/itc/image-util/CMakeLists.txt [new file with mode: 0755]
src/itc/image-util/ITs-image-util-common.c [new file with mode: 0755]
src/itc/image-util/ITs-image-util-common.h [new file with mode: 0755]
src/itc/image-util/ITs-image-util.c [new file with mode: 0755]
src/itc/image-util/Image_01.jpg [new file with mode: 0755]
src/itc/image-util/tct-image-util-native.c [new file with mode: 0755]
src/itc/image-util/tct-image-util-native.h [new file with mode: 0755]
src/itc/key-manager/CMakeLists.txt [new file with mode: 0755]
src/itc/key-manager/ITs-key-manager-common.c [new file with mode: 0755]
src/itc/key-manager/ITs-key-manager-common.h [new file with mode: 0755]
src/itc/key-manager/ITs-key-manager.c [new file with mode: 0755]
src/itc/key-manager/certificate.crt [new file with mode: 0755]
src/itc/key-manager/dfb08fe4.0 [new file with mode: 0755]
src/itc/key-manager/signer.p12 [new file with mode: 0755]
src/itc/key-manager/tct-key-manager-native.c [new file with mode: 0755]
src/itc/key-manager/tct-key-manager-native.h [new file with mode: 0755]
src/itc/libstorage/CMakeLists.txt [new file with mode: 0755]
src/itc/libstorage/ITs-libstorage-common.c [new file with mode: 0755]
src/itc/libstorage/ITs-libstorage-common.h [new file with mode: 0755]
src/itc/libstorage/ITs-libstorage.c [new file with mode: 0755]
src/itc/libstorage/tct-libstorage-native.c [new file with mode: 0755]
src/itc/libstorage/tct-libstorage-native.h [new file with mode: 0755]
src/itc/location-manager/CMakeLists.txt [new file with mode: 0755]
src/itc/location-manager/ITs-location-bounds.c [new file with mode: 0755]
src/itc/location-manager/ITs-location-gps-status.c [new file with mode: 0755]
src/itc/location-manager/ITs-location-manager-common.c [new file with mode: 0755]
src/itc/location-manager/ITs-location-manager-common.h [new file with mode: 0755]
src/itc/location-manager/ITs-location-manager.c [new file with mode: 0755]
src/itc/location-manager/tct-location-manager-native.c [new file with mode: 0755]
src/itc/location-manager/tct-location-manager-native.h [new file with mode: 0755]
src/itc/media-content/20140709-115007.mp4 [new file with mode: 0755]
src/itc/media-content/CMakeLists.txt [new file with mode: 0755]
src/itc/media-content/ITs-media-content-common.c [new file with mode: 0755]
src/itc/media-content/ITs-media-content-common.h [new file with mode: 0755]
src/itc/media-content/ITs-media-content.c [new file with mode: 0755]
src/itc/media-content/TestRingtone.mp3 [new file with mode: 0755]
src/itc/media-content/tct-media-content-native.c [new file with mode: 0755]
src/itc/media-content/tct-media-content-native.h [new file with mode: 0755]
src/itc/media-content/test.jpg [new file with mode: 0755]
src/itc/media-content/test0.jpg [new file with mode: 0755]
src/itc/media-content/test1.jpg [new file with mode: 0755]
src/itc/media-content/test2.jpg [new file with mode: 0755]
src/itc/media-content/test3.jpg [new file with mode: 0755]
src/itc/media-key/CMakeLists.txt [new file with mode: 0755]
src/itc/media-key/ITs-media-key-common.c [new file with mode: 0755]
src/itc/media-key/ITs-media-key-common.h [new file with mode: 0755]
src/itc/media-key/ITs-media-key.c [new file with mode: 0755]
src/itc/media-key/tct-media-key-native.c [new file with mode: 0755]
src/itc/media-key/tct-media-key-native.h [new file with mode: 0755]
src/itc/mediacodec/CMakeLists.txt [new file with mode: 0755]
src/itc/mediacodec/ITs-mediacodec-common.c [new file with mode: 0755]
src/itc/mediacodec/ITs-mediacodec-common.h [new file with mode: 0755]
src/itc/mediacodec/ITs-mediacodec.c [new file with mode: 0755]
src/itc/mediacodec/TestData.pcm [new file with mode: 0755]
src/itc/mediacodec/tct-mediacodec-native.c [new file with mode: 0755]
src/itc/mediacodec/tct-mediacodec-native.h [new file with mode: 0755]
src/itc/messages/CMakeLists.txt [new file with mode: 0755]
src/itc/messages/ITs-messages-common.c [new file with mode: 0755]
src/itc/messages/ITs-messages-common.h [new file with mode: 0755]
src/itc/messages/ITs-messages-mms.c [new file with mode: 0755]
src/itc/messages/ITs-messages.c [new file with mode: 0755]
src/itc/messages/Image.jpg [new file with mode: 0755]
src/itc/messages/tct-messages-native.c [new file with mode: 0755]
src/itc/messages/tct-messages-native.h [new file with mode: 0755]
src/itc/metadata-extractor/CMakeLists.txt [new file with mode: 0755]
src/itc/metadata-extractor/ITs-metadata-extractor-common.c [new file with mode: 0755]
src/itc/metadata-extractor/ITs-metadata-extractor-common.h [new file with mode: 0755]
src/itc/metadata-extractor/ITs-metadata-extractor.c [new file with mode: 0755]
src/itc/metadata-extractor/metadata_audio.mp3 [new file with mode: 0755]
src/itc/metadata-extractor/metadata_video.mp4 [new file with mode: 0755]
src/itc/metadata-extractor/tct-metadata-extractor-native.c [new file with mode: 0755]
src/itc/metadata-extractor/tct-metadata-extractor-native.h [new file with mode: 0755]
src/itc/mime-type/CMakeLists.txt [new file with mode: 0755]
src/itc/mime-type/ITs-mime-type-common.c [new file with mode: 0755]
src/itc/mime-type/ITs-mime-type-common.h [new file with mode: 0755]
src/itc/mime-type/ITs-mime-type.c [new file with mode: 0755]
src/itc/mime-type/tct-mime-type-native.c [new file with mode: 0755]
src/itc/mime-type/tct-mime-type-native.h [new file with mode: 0755]
src/itc/native-common/CMakeLists.txt [new file with mode: 0755]
src/itc/native-common/ITs-native-common-common.c [new file with mode: 0755]
src/itc/native-common/ITs-native-common-common.h [new file with mode: 0755]
src/itc/native-common/ITs-native-common.c [new file with mode: 0755]
src/itc/native-common/tct-native-common-native.c [new file with mode: 0755]
src/itc/native-common/tct-native-common-native.h [new file with mode: 0755]
src/itc/nfc/CMakeLists.txt [new file with mode: 0755]
src/itc/nfc/ITs-nfc-common.c [new file with mode: 0755]
src/itc/nfc/ITs-nfc-common.h [new file with mode: 0755]
src/itc/nfc/ITs-nfc-manager.c [new file with mode: 0755]
src/itc/nfc/ITs-nfc-ndef.c [new file with mode: 0755]
src/itc/nfc/ITs-nfc-se.c [new file with mode: 0755]
src/itc/nfc/ITs-nfc-snep.c [new file with mode: 0755]
src/itc/nfc/org.tizen.testnfclient-1.0.0-arm.tpk [new file with mode: 0755]
src/itc/nfc/org.tizen.testnfclient-1.0.0-i386.tpk [new file with mode: 0755]
src/itc/nfc/tct-nfc-native.c [new file with mode: 0755]
src/itc/nfc/tct-nfc-native.h [new file with mode: 0755]
src/itc/notification/CMakeLists.txt [new file with mode: 0755]
src/itc/notification/ITs-notification-common.c [new file with mode: 0755]
src/itc/notification/ITs-notification-common.h [new file with mode: 0755]
src/itc/notification/ITs-notification.c [new file with mode: 0755]
src/itc/notification/tct-notification-native.c [new file with mode: 0755]
src/itc/notification/tct-notification-native.h [new file with mode: 0755]
src/itc/package-manager/CMakeLists.txt [new file with mode: 0755]
src/itc/package-manager/ITs-package-manager-common.c [new file with mode: 0755]
src/itc/package-manager/ITs-package-manager-common.h [new file with mode: 0755]
src/itc/package-manager/ITs-package-manager.c [new file with mode: 0755]
src/itc/package-manager/native-testapp-itc-0.1-0.armv7l.rpm [new file with mode: 0755]
src/itc/package-manager/native-testapp-itc-0.1-0.i586.rpm [new file with mode: 0755]
src/itc/package-manager/org.tizen.testapp-1.0.0-arm.tpk [new file with mode: 0755]
src/itc/package-manager/org.tizen.testapp-1.0.0-i386.tpk [new file with mode: 0755]
src/itc/package-manager/tct-package-manager-native.c [new file with mode: 0755]
src/itc/package-manager/tct-package-manager-native.h [new file with mode: 0755]
src/itc/player/AWB_header_change_AMR.amr [new file with mode: 0755]
src/itc/player/CMakeLists.txt [new file with mode: 0755]
src/itc/player/ITs-player-common.c [new file with mode: 0755]
src/itc/player/ITs-player-common.h [new file with mode: 0755]
src/itc/player/ITs-player.c [new file with mode: 0755]
src/itc/player/file.mp4 [new file with mode: 0755]
src/itc/player/short.mp3 [new file with mode: 0755]
src/itc/player/sub.srt [new file with mode: 0755]
src/itc/player/tct-player-native.c [new file with mode: 0755]
src/itc/player/tct-player-native.h [new file with mode: 0755]
src/itc/player/v.mp4 [new file with mode: 0755]
src/itc/privilege-info/CMakeLists.txt [new file with mode: 0755]
src/itc/privilege-info/ITs-privilege-info-common.c [new file with mode: 0755]
src/itc/privilege-info/ITs-privilege-info-common.h [new file with mode: 0755]
src/itc/privilege-info/ITs-privilege-info.c [new file with mode: 0755]
src/itc/privilege-info/tct-privilege-info-native.c [new file with mode: 0755]
src/itc/privilege-info/tct-privilege-info-native.h [new file with mode: 0755]
src/itc/push/CMakeLists.txt [new file with mode: 0755]
src/itc/push/ITs-push-common.c [new file with mode: 0755]
src/itc/push/ITs-push-common.h [new file with mode: 0755]
src/itc/push/ITs-push-service.c [new file with mode: 0755]
src/itc/push/tct-push-native.c [new file with mode: 0755]
src/itc/push/tct-push-native.h [new file with mode: 0755]
src/itc/radio/CMakeLists.txt [new file with mode: 0755]
src/itc/radio/ITs-radio-common.c [new file with mode: 0755]
src/itc/radio/ITs-radio-common.h [new file with mode: 0755]
src/itc/radio/ITs-radio.c [new file with mode: 0755]
src/itc/radio/tct-radio-native.c [new file with mode: 0755]
src/itc/radio/tct-radio-native.h [new file with mode: 0755]
src/itc/recorder/CMakeLists.txt [new file with mode: 0755]
src/itc/recorder/ITs-recorder-common.c [new file with mode: 0755]
src/itc/recorder/ITs-recorder-common.h [new file with mode: 0755]
src/itc/recorder/ITs-recorder.c [new file with mode: 0755]
src/itc/recorder/tct-recorder-native.c [new file with mode: 0755]
src/itc/recorder/tct-recorder-native.h [new file with mode: 0755]
src/itc/runtime-info/CMakeLists.txt [new file with mode: 0755]
src/itc/runtime-info/ITs-runtime-info-common.c [new file with mode: 0755]
src/itc/runtime-info/ITs-runtime-info-common.h [new file with mode: 0755]
src/itc/runtime-info/ITs-runtime-info.c [new file with mode: 0755]
src/itc/runtime-info/tct-runtime-info-native.c [new file with mode: 0755]
src/itc/runtime-info/tct-runtime-info-native.h [new file with mode: 0755]
src/itc/sensor/CMakeLists.txt [new file with mode: 0755]
src/itc/sensor/ITs-sensor-common.c [new file with mode: 0755]
src/itc/sensor/ITs-sensor-common.h [new file with mode: 0755]
src/itc/sensor/ITs-sensor.c [new file with mode: 0755]
src/itc/sensor/tct-sensor-native.c [new file with mode: 0755]
src/itc/sensor/tct-sensor-native.h [new file with mode: 0755]
src/itc/smartcard/CMakeLists.txt [new file with mode: 0755]
src/itc/smartcard/ITs-smartcard-common.c [new file with mode: 0755]
src/itc/smartcard/ITs-smartcard-common.h [new file with mode: 0755]
src/itc/smartcard/ITs-smartcard-reader.c [new file with mode: 0755]
src/itc/smartcard/ITs-smartcard-service.c [new file with mode: 0755]
src/itc/smartcard/ITs-smartcard-session.c [new file with mode: 0755]
src/itc/smartcard/ITs-smartcard.c [new file with mode: 0755]
src/itc/smartcard/tct-smartcard-native.c [new file with mode: 0755]
src/itc/smartcard/tct-smartcard-native.h [new file with mode: 0755]
src/itc/sound-manager/CMakeLists.txt [new file with mode: 0755]
src/itc/sound-manager/ITs-sound-manager-common.c [new file with mode: 0755]
src/itc/sound-manager/ITs-sound-manager-common.h [new file with mode: 0755]
src/itc/sound-manager/ITs-sound-manager.c [new file with mode: 0755]
src/itc/sound-manager/tct-sound-manager-native.c [new file with mode: 0755]
src/itc/sound-manager/tct-sound-manager-native.h [new file with mode: 0755]
src/itc/stt/CMakeLists.txt [new file with mode: 0755]
src/itc/stt/ITs-stt-common.c [new file with mode: 0755]
src/itc/stt/ITs-stt-common.h [new file with mode: 0755]
src/itc/stt/ITs-stt.c [new file with mode: 0755]
src/itc/stt/start_sound.wav [new file with mode: 0755]
src/itc/stt/stop_sound.wav [new file with mode: 0755]
src/itc/stt/tct-stt-native.c [new file with mode: 0755]
src/itc/stt/tct-stt-native.h [new file with mode: 0755]
src/itc/system-info/CMakeLists.txt [new file with mode: 0755]
src/itc/system-info/ITs-system-info-common.c [new file with mode: 0755]
src/itc/system-info/ITs-system-info-common.h [new file with mode: 0755]
src/itc/system-info/ITs-system-info.c [new file with mode: 0755]
src/itc/system-info/system-info-xmlparser.c [new file with mode: 0755]
src/itc/system-info/tct-system-info-native.c [new file with mode: 0755]
src/itc/system-info/tct-system-info-native.h [new file with mode: 0755]
src/itc/system-settings/CMakeLists.txt [new file with mode: 0755]
src/itc/system-settings/ITs-system-settings-common.c [new file with mode: 0755]
src/itc/system-settings/ITs-system-settings-common.h [new file with mode: 0755]
src/itc/system-settings/ITs-system-settings.c [new file with mode: 0755]
src/itc/system-settings/tct-system-settings-native.c [new file with mode: 0755]
src/itc/system-settings/tct-system-settings-native.h [new file with mode: 0755]
src/itc/tbm/CMakeLists.txt [new file with mode: 0755]
src/itc/tbm/ITs-tbm-common.c [new file with mode: 0755]
src/itc/tbm/ITs-tbm-common.h [new file with mode: 0755]
src/itc/tbm/ITs-tbm.c [new file with mode: 0755]
src/itc/tbm/tct-tbm-native.c [new file with mode: 0755]
src/itc/tbm/tct-tbm-native.h [new file with mode: 0755]
src/itc/telephony/CMakeLists.txt [new file with mode: 0755]
src/itc/telephony/ITs-telephony-common.c [new file with mode: 0755]
src/itc/telephony/ITs-telephony-common.h [new file with mode: 0755]
src/itc/telephony/ITs-telephony.c [new file with mode: 0755]
src/itc/telephony/tct-telephony-native.c [new file with mode: 0755]
src/itc/telephony/tct-telephony-native.h [new file with mode: 0755]
src/itc/tone-player/CMakeLists.txt [new file with mode: 0755]
src/itc/tone-player/ITs-tone-player-common.c [new file with mode: 0755]
src/itc/tone-player/ITs-tone-player-common.h [new file with mode: 0755]
src/itc/tone-player/ITs-tone-player.c [new file with mode: 0755]
src/itc/tone-player/tct-tone-player-native.c [new file with mode: 0755]
src/itc/tone-player/tct-tone-player-native.h [new file with mode: 0755]
src/itc/tts/CMakeLists.txt [new file with mode: 0755]
src/itc/tts/ITs-tts-common.c [new file with mode: 0755]
src/itc/tts/ITs-tts-common.h [new file with mode: 0755]
src/itc/tts/ITs-tts.c [new file with mode: 0755]
src/itc/tts/tct-tts-native.c [new file with mode: 0755]
src/itc/tts/tct-tts-native.h [new file with mode: 0755]
src/itc/wav-player/CMakeLists.txt [new file with mode: 0755]
src/itc/wav-player/ITs-wav-player-common.c [new file with mode: 0755]
src/itc/wav-player/ITs-wav-player-common.h [new file with mode: 0755]
src/itc/wav-player/ITs-wav-player.c [new file with mode: 0755]
src/itc/wav-player/WavPlayerTest.wav [new file with mode: 0755]
src/itc/wav-player/tct-wav-player-native.c [new file with mode: 0755]
src/itc/wav-player/tct-wav-player-native.h [new file with mode: 0755]
src/itc/webkit2/CMakeLists.txt [new file with mode: 0755]
src/itc/webkit2/ITs-webkit2-common.c [new file with mode: 0755]
src/itc/webkit2/ITs-webkit2-common.h [new file with mode: 0755]
src/itc/webkit2/ITs-webkit2.c [new file with mode: 0755]
src/itc/webkit2/resources/common/sample.html [new file with mode: 0755]
src/itc/webkit2/resources/common/sample_1.html [new file with mode: 0755]
src/itc/webkit2/resources/common/sample_2.html [new file with mode: 0755]
src/itc/webkit2/resources/ewk_context_menu/index.html [new file with mode: 0755]
src/itc/webkit2/resources/ewk_context_menu/webkit.png [new file with mode: 0755]
src/itc/webkit2/resources/ewk_view/sample.html [new file with mode: 0755]
src/itc/webkit2/resources/ewk_view/text_find.html [new file with mode: 0755]
src/itc/webkit2/tct-webkit2-native.c [new file with mode: 0755]
src/itc/webkit2/tct-webkit2-native.h [new file with mode: 0755]
src/itc/widget-viewer-evas/CMakeLists.txt [new file with mode: 0755]
src/itc/widget-viewer-evas/ITs-widget-viewer-evas-common.c [new file with mode: 0755]
src/itc/widget-viewer-evas/ITs-widget-viewer-evas-common.h [new file with mode: 0755]
src/itc/widget-viewer-evas/ITs-widget-viewer-evas.c [new file with mode: 0755]
src/itc/widget-viewer-evas/res/org.tizen.sample-1.0.0-arm.tpk [new file with mode: 0755]
src/itc/widget-viewer-evas/res/org.tizen.sample-1.0.0-i386.tpk [new file with mode: 0755]
src/itc/widget-viewer-evas/res/org.tizen.sample.crash-1.0.0-arm.tpk [new file with mode: 0755]
src/itc/widget-viewer-evas/res/org.tizen.sample.crash-1.0.0-i386.tpk [new file with mode: 0755]
src/itc/widget-viewer-evas/tct-widget-viewer-evas-native.c [new file with mode: 0755]
src/itc/widget-viewer-evas/tct-widget-viewer-evas-native.h [new file with mode: 0755]
src/itc/widget_service/CMakeLists.txt [new file with mode: 0755]
src/itc/widget_service/ITs-widget_service-common.c [new file with mode: 0755]
src/itc/widget_service/ITs-widget_service-common.h [new file with mode: 0755]
src/itc/widget_service/ITs-widget_service.c [new file with mode: 0755]
src/itc/widget_service/org.tizen.testwidget-1.0.0-arm.tpk [new file with mode: 0755]
src/itc/widget_service/org.tizen.testwidget-1.0.0-i386.tpk [new file with mode: 0755]
src/itc/widget_service/tct-widget_service-native.c [new file with mode: 0755]
src/itc/widget_service/tct-widget_service-native.h [new file with mode: 0755]
src/itc/wifi/CMakeLists.txt [new file with mode: 0755]
src/itc/wifi/ITs-wifi-common.c [new file with mode: 0755]
src/itc/wifi/ITs-wifi-common.h [new file with mode: 0755]
src/itc/wifi/ITs-wifi.c [new file with mode: 0755]
src/itc/wifi/cert.crt [new file with mode: 0755]
src/itc/wifi/tct-wifi-native.c [new file with mode: 0755]
src/itc/wifi/tct-wifi-native.h [new file with mode: 0755]
src/itc/wifi/testing.pem [new file with mode: 0755]
src/utc/app-manager/CMakeLists.txt [new file with mode: 0755]
src/utc/app-manager/public.list [new file with mode: 0755]
src/utc/app-manager/res/org.tizen.helloworld-1.0.0-arm.tpk [new file with mode: 0755]
src/utc/app-manager/res/org.tizen.helloworld-1.0.0-i386.tpk [new file with mode: 0755]
src/utc/app-manager/tct-app-manager-core.c [new file with mode: 0755]
src/utc/app-manager/tct-app-manager-core.h [new file with mode: 0755]
src/utc/app-manager/utc-app-manager.c [new file with mode: 0755]
src/utc/appcore-agent/CMakeLists.txt [new file with mode: 0755]
src/utc/appcore-agent/public.list [new file with mode: 0755]
src/utc/appcore-agent/tct-appcore-agent-core.c [new file with mode: 0755]
src/utc/appcore-agent/tct-appcore-agent-core.h [new file with mode: 0755]
src/utc/appcore-agent/utc-appcore-agent.c [new file with mode: 0755]
src/utc/appcore-watch/CMakeLists.txt [new file with mode: 0755]
src/utc/appcore-watch/public.list [new file with mode: 0755]
src/utc/appcore-watch/tct-appcore-watch-core.c [new file with mode: 0755]
src/utc/appcore-watch/tct-appcore-watch-core.h [new file with mode: 0755]
src/utc/appcore-watch/utc-appcore-watch.c [new file with mode: 0755]
src/utc/appcore-widget/CMakeLists.txt [new file with mode: 0755]
src/utc/appcore-widget/public.list [new file with mode: 0755]
src/utc/appcore-widget/tct-appcore-widget-core.c [new file with mode: 0755]
src/utc/appcore-widget/tct-appcore-widget-core.h [new file with mode: 0755]
src/utc/appcore-widget/utc-appcore-widget.c [new file with mode: 0755]
src/utc/application/CMakeLists.txt [new file with mode: 0755]
src/utc/application/platform.list [new file with mode: 0755]
src/utc/application/public.list [new file with mode: 0755]
src/utc/application/res/org.tizen.helloworld-1.0.0-arm.tpk [new file with mode: 0755]
src/utc/application/res/org.tizen.helloworld-1.0.0-i386.tpk [new file with mode: 0755]
src/utc/application/tct-application-core.c [new file with mode: 0755]
src/utc/application/tct-application-core.h [new file with mode: 0755]
src/utc/application/utc_alarm.c [new file with mode: 0755]
src/utc/application/utc_app.c [new file with mode: 0755]
src/utc/application/utc_app_control.c [new file with mode: 0755]
src/utc/application/utc_i18n.c [new file with mode: 0755]
src/utc/application/utc_preference.c [new file with mode: 0755]
src/utc/audio-io/CMakeLists.txt [new file with mode: 0755]
src/utc/audio-io/prod_platform.list [new file with mode: 0755]
src/utc/audio-io/public.list [new file with mode: 0755]
src/utc/audio-io/res/tct-tizen-tests_audio_default.mp3 [new file with mode: 0755]
src/utc/audio-io/tct-audio-io-core.c [new file with mode: 0755]
src/utc/audio-io/tct-audio-io-core.h [new file with mode: 0755]
src/utc/audio-io/utc-media-audio-input.c [new file with mode: 0755]
src/utc/audio-io/utc-media-audio-output.c [new file with mode: 0755]
src/utc/badge/CMakeLists.txt [new file with mode: 0755]
src/utc/badge/platform.list [new file with mode: 0755]
src/utc/badge/public.list [new file with mode: 0755]
src/utc/badge/tct-badge-core.c [new file with mode: 0755]
src/utc/badge/tct-badge-core.h [new file with mode: 0755]
src/utc/badge/utc-badge.c [new file with mode: 0755]
src/utc/base-utils/CMakeLists.txt [new file with mode: 0755]
src/utc/base-utils/public.list [new file with mode: 0755]
src/utc/base-utils/tct-base-utils-core.c [new file with mode: 0755]
src/utc/base-utils/tct-base-utils-core.h [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-timezone.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-ubrk.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-ucalendar.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-uchar.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-ucollator.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-udate.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-udatepg.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-uenumeration.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-ulocale.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-unormalization.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-unumber.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-usearch.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-uset.c [new file with mode: 0755]
src/utc/base-utils/utc-capi-base-utils-ustring.c [new file with mode: 0755]
src/utc/bluetooth/CMakeLists.txt [new file with mode: 0755]
src/utc/bluetooth/platform.list [new file with mode: 0755]
src/utc/bluetooth/prod_platform.list [new file with mode: 0755]
src/utc/bluetooth/public.list [new file with mode: 0755]
src/utc/bluetooth/tct-bluetooth-core.c [new file with mode: 0755]
src/utc/bluetooth/tct-bluetooth-core.h [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_adapter_negative.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_adapter_positive.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_audio_negative.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_audio_positive.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_common_positive.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_device_discovery_negative.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_device_discovery_positive.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_device_negative.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_device_positive.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_gatt_negative.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_gatt_positive.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_hdp_negative.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_hdp_positive.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_hid_negative.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_hid_positive.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_opp_client_negative.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_opp_client_positive.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_opp_server_negative.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_opp_server_positive.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_service_search_negative.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_service_search_positive.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_socket_negative.c [new file with mode: 0755]
src/utc/bluetooth/utc_bluetooth_socket_positive.c [new file with mode: 0755]
src/utc/bundle/CMakeLists.txt [new file with mode: 0755]
src/utc/bundle/nonpriv.list [new file with mode: 0755]
src/utc/bundle/public.list [new file with mode: 0755]
src/utc/bundle/tct-bundle-core.c [new file with mode: 0755]
src/utc/bundle/tct-bundle-core.h [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-add-byte-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-add-str-array-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-add-str-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-create-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-decode-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-del-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-encode-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-foreach-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-free-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-get-byte-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-get-count-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-get-str-array-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-get-str-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-get-type-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-keyval-get-array-val-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-keyval-get-basic-val-func.c [new file with mode: 0755]
src/utc/bundle/utc-ApplicationFW-bundle-keyval.c [new file with mode: 0755]
src/utc/cairo/CMakeLists.txt [new file with mode: 0755]
src/utc/cairo/public.list [new file with mode: 0755]
src/utc/cairo/tct-cairo-core.c [new file with mode: 0755]
src/utc/cairo/tct-cairo-core.h [new file with mode: 0755]
src/utc/cairo/utc-cairo.c [new file with mode: 0755]
src/utc/camera/CMakeLists.txt [new file with mode: 0755]
src/utc/camera/public.list [new file with mode: 0755]
src/utc/camera/tct-camera-core.c [new file with mode: 0755]
src/utc/camera/tct-camera-core.h [new file with mode: 0755]
src/utc/camera/utc_media_camera_attr.c [new file with mode: 0755]
src/utc/camera/utc_media_camera_lifecycle.c [new file with mode: 0755]
src/utc/camera/utc_media_camera_setting.c [new file with mode: 0755]
src/utc/capi-media-tool/CMakeLists.txt [new file with mode: 0755]
src/utc/capi-media-tool/public.list [new file with mode: 0755]
src/utc/capi-media-tool/tct-capi-media-tool-core.c [new file with mode: 0755]
src/utc/capi-media-tool/tct-capi-media-tool-core.h [new file with mode: 0755]
src/utc/capi-media-tool/utc-capi-media-tool.c [new file with mode: 0755]
src/utc/capi-message-port/CMakeLists.txt [new file with mode: 0755]
src/utc/capi-message-port/core-capi-message-port-tests.sh [new file with mode: 0755]
src/utc/capi-message-port/platform.list [new file with mode: 0755]
src/utc/capi-message-port/product.list [new file with mode: 0755]
src/utc/capi-message-port/public.list [new file with mode: 0755]
src/utc/capi-message-port/res/org.tizen.messageportapp-1.0.0-arm.tpk [new file with mode: 0755]
src/utc/capi-message-port/res/org.tizen.messageportapp-1.0.0-i386.tpk [new file with mode: 0755]
src/utc/capi-message-port/tct-capi-message-port-core.c [new file with mode: 0755]
src/utc/capi-message-port/tct-capi-message-port-core.h [new file with mode: 0755]
src/utc/capi-message-port/utc-capi-message-port.c [new file with mode: 0755]
src/utc/connection/CMakeLists.txt [new file with mode: 0755]
src/utc/connection/platform.list [new file with mode: 0755]
src/utc/connection/product.list [new file with mode: 0755]
src/utc/connection/public.list [new file with mode: 0755]
src/utc/connection/tct-connection-core.c [new file with mode: 0755]
src/utc/connection/tct-connection-core.h [new file with mode: 0755]
src/utc/connection/utc-connection-profile.c [new file with mode: 0755]
src/utc/connection/utc-network-connection.c [new file with mode: 0755]
src/utc/context-manager/CMakeLists.txt [new file with mode: 0755]
src/utc/context-manager/public.list [new file with mode: 0755]
src/utc/context-manager/tct-context-manager-core.c [new file with mode: 0755]
src/utc/context-manager/tct-context-manager-core.h [new file with mode: 0755]
src/utc/context-manager/utc-context-manager-activity.c [new file with mode: 0755]
src/utc/context-manager/utc-context-manager-gesture.c [new file with mode: 0755]
src/utc/context-manager/utc-context-manager.c [new file with mode: 0755]
src/utc/data-control/CMakeLists.txt [new file with mode: 0755]
src/utc/data-control/public.list [new file with mode: 0755]
src/utc/data-control/res/org.tizen.datacontrolprovider-1.0.0-arm.tpk [new file with mode: 0755]
src/utc/data-control/res/org.tizen.datacontrolprovider-1.0.0-i386.tpk [new file with mode: 0755]
src/utc/data-control/tct-data-control-core.c [new file with mode: 0755]
src/utc/data-control/tct-data-control-core.h [new file with mode: 0755]
src/utc/data-control/utc-data-control-map.c [new file with mode: 0755]
src/utc/data-control/utc-data-control-provider.c [new file with mode: 0755]
src/utc/data-control/utc-data-control-sql.c [new file with mode: 0755]
src/utc/device/CMakeLists.txt [new file with mode: 0755]
src/utc/device/public.list [new file with mode: 0755]
src/utc/device/tct-device-core.c [new file with mode: 0755]
src/utc/device/tct-device-core.h [new file with mode: 0755]
src/utc/device/utc-system-device-battery.c [new file with mode: 0755]
src/utc/device/utc-system-device-callback.c [new file with mode: 0755]
src/utc/device/utc-system-device-display.c [new file with mode: 0755]
src/utc/device/utc-system-device-haptic.c [new file with mode: 0755]
src/utc/device/utc-system-device-led.c [new file with mode: 0755]
src/utc/device/utc-system-device-power.c [new file with mode: 0755]
src/utc/dlog/CMakeLists.txt [new file with mode: 0755]
src/utc/dlog/public.list [new file with mode: 0755]
src/utc/dlog/tct-dlog-core.c [new file with mode: 0755]
src/utc/dlog/tct-dlog-core.h [new file with mode: 0755]
src/utc/dlog/utc-ApplicationFW-dlog-print-func.c [new file with mode: 0755]
src/utc/dlog/utc-ApplicationFW-dlog-vprint-func.c [new file with mode: 0755]
src/utc/efl-ext/CMakeLists.txt [new file with mode: 0755]
src/utc/efl-ext/tct-efl-ext-core.c [new file with mode: 0755]
src/utc/efl-ext/tct-efl-ext-core.h [new file with mode: 0755]
src/utc/efl-ext/utc-efl-ext.c [new file with mode: 0755]
src/utc/efl-util/CMakeLists.txt [new file with mode: 0755]
src/utc/efl-util/public.list [new file with mode: 0755]
src/utc/efl-util/tct-efl-util-core.c [new file with mode: 0755]
src/utc/efl-util/tct-efl-util-core.h [new file with mode: 0755]
src/utc/efl-util/utc-efl-util.c [new file with mode: 0755]
src/utc/image-util/CMakeLists.txt [new file with mode: 0755]
src/utc/image-util/public.list [new file with mode: 0755]
src/utc/image-util/res/sample.jpg [new file with mode: 0755]
src/utc/image-util/tct-image-util-core.c [new file with mode: 0755]
src/utc/image-util/tct-image-util-core.h [new file with mode: 0755]
src/utc/image-util/utc-image-util-jpeg.c [new file with mode: 0755]
src/utc/image-util/utc-media-image-util-basic.c [new file with mode: 0755]
src/utc/key-manager/CMakeLists.txt [new file with mode: 0755]
src/utc/key-manager/dfb08fe4.0 [new file with mode: 0755]
src/utc/key-manager/public.list [new file with mode: 0755]
src/utc/key-manager/tct-key-manager-core.c [new file with mode: 0755]
src/utc/key-manager/tct-key-manager-core.h [new file with mode: 0755]
src/utc/key-manager/utc-key-manager-crypto.c [new file with mode: 0755]
src/utc/key-manager/utc-key-manager-storage.c [new file with mode: 0755]
src/utc/key-manager/utc-key-manager-type.c [new file with mode: 0755]
src/utc/libstorage/CMakeLists.txt [new file with mode: 0755]
src/utc/libstorage/public.list [new file with mode: 0755]
src/utc/libstorage/tct-libstorage-core.c [new file with mode: 0755]
src/utc/libstorage/tct-libstorage-core.h [new file with mode: 0755]
src/utc/libstorage/utc-system-storage-expand.c [new file with mode: 0755]
src/utc/libstorage/utc-system-storage.c [new file with mode: 0755]
src/utc/location-manager/CMakeLists.txt [new file with mode: 0755]
src/utc/location-manager/public.list [new file with mode: 0755]
src/utc/location-manager/tct-location-manager-core.c [new file with mode: 0755]
src/utc/location-manager/tct-location-manager-core.h [new file with mode: 0755]
src/utc/location-manager/utc-location-gps-status.c [new file with mode: 0755]
src/utc/location-manager/utc-location-manager-cb.c [new file with mode: 0755]
src/utc/location-manager/utc-location-manager.c [new file with mode: 0755]
src/utc/media-content/CMakeLists.txt [new file with mode: 0755]
src/utc/media-content/public.list [new file with mode: 0755]
src/utc/media-content/res/image.jpg [new file with mode: 0755]
src/utc/media-content/res/movie.mp4 [new file with mode: 0755]
src/utc/media-content/res/sound.m4a [new file with mode: 0755]
src/utc/media-content/res/test/test.jpg [new file with mode: 0755]
src/utc/media-content/tct-media-content-core.c [new file with mode: 0755]
src/utc/media-content/tct-media-content-core.h [new file with mode: 0755]
src/utc/media-content/utc-media-audio.c [new file with mode: 0755]
src/utc/media-content/utc-media-bookmark-delete.c [new file with mode: 0755]
src/utc/media-content/utc-media-bookmark-insert.c [new file with mode: 0755]
src/utc/media-content/utc-media-bookmark.c [new file with mode: 0755]
src/utc/media-content/utc-media-content.c [new file with mode: 0755]
src/utc/media-content/utc-media-filter-create.c [new file with mode: 0755]
src/utc/media-content/utc-media-filter-destroy.c [new file with mode: 0755]
src/utc/media-content/utc-media-filter.c [new file with mode: 0755]
src/utc/media-content/utc-media-folder.c [new file with mode: 0755]
src/utc/media-content/utc-media-group.c [new file with mode: 0755]
src/utc/media-content/utc-media-image.c [new file with mode: 0755]
src/utc/media-content/utc-media-info.c [new file with mode: 0755]
src/utc/media-content/utc-media-playlist.c [new file with mode: 0755]
src/utc/media-content/utc-media-tag.c [new file with mode: 0755]
src/utc/media-content/utc-media-video.c [new file with mode: 0755]
src/utc/media-key/CMakeLists.txt [new file with mode: 0755]
src/utc/media-key/public.list [new file with mode: 0755]
src/utc/media-key/tct-media-key-core.c [new file with mode: 0755]
src/utc/media-key/tct-media-key-core.h [new file with mode: 0755]
src/utc/media-key/utc-media-key-release-func.c [new file with mode: 0755]
src/utc/media-key/utc-media-key-reserve-func.c [new file with mode: 0755]
src/utc/mediacodec/CMakeLists.txt [new file with mode: 0755]
src/utc/mediacodec/public.list [new file with mode: 0755]
src/utc/mediacodec/res/test.pcm [new file with mode: 0755]
src/utc/mediacodec/tct-mediacodec-core.c [new file with mode: 0755]
src/utc/mediacodec/tct-mediacodec-core.h [new file with mode: 0755]
src/utc/mediacodec/utc-media-mediacodec.c [new file with mode: 0755]
src/utc/messages/CMakeLists.txt [new file with mode: 0755]
src/utc/messages/public.list [new file with mode: 0755]
src/utc/messages/res/Default.jpg [new file with mode: 0755]
src/utc/messages/res/V091120_104905.3gp [new file with mode: 0755]
src/utc/messages/res/audio.amr [new file with mode: 0755]
src/utc/messages/tct-messages-core.c [new file with mode: 0755]
src/utc/messages/tct-messages-core.h [new file with mode: 0755]
src/utc/messages/utc-messaging-messages.c [new file with mode: 0755]
src/utc/metadata-extractor/CMakeLists.txt [new file with mode: 0755]
src/utc/metadata-extractor/public.list [new file with mode: 0755]
src/utc/metadata-extractor/res/Color.mp4 [new file with mode: 0755]
src/utc/metadata-extractor/res/Over the horizon.mp3 [new file with mode: 0755]
src/utc/metadata-extractor/tct-metadata-extractor-core.c [new file with mode: 0755]
src/utc/metadata-extractor/tct-metadata-extractor-core.h [new file with mode: 0755]
src/utc/metadata-extractor/utc-metadata-extractor.c [new file with mode: 0755]
src/utc/mime-type/CMakeLists.txt [new file with mode: 0755]
src/utc/mime-type/platform.list [new file with mode: 0755]
src/utc/mime-type/public.list [new file with mode: 0755]
src/utc/mime-type/tct-mime-type-core.c [new file with mode: 0755]
src/utc/mime-type/tct-mime-type-core.h [new file with mode: 0755]
src/utc/mime-type/utc-mime-type.c [new file with mode: 0755]
src/utc/native-common/CMakeLists.txt [new file with mode: 0755]
src/utc/native-common/public.list [new file with mode: 0755]
src/utc/native-common/tct-native-common-core.c [new file with mode: 0755]
src/utc/native-common/tct-native-common-core.h [new file with mode: 0755]
src/utc/native-common/utc-native-common.c [new file with mode: 0755]
src/utc/nfc/CMakeLists.txt [new file with mode: 0755]
src/utc/nfc/platform.list [new file with mode: 0755]
src/utc/nfc/product.list [new file with mode: 0755]
src/utc/nfc/public.list [new file with mode: 0755]
src/utc/nfc/tct-nfc-core.c [new file with mode: 0755]
src/utc/nfc/tct-nfc-core.h [new file with mode: 0755]
src/utc/nfc/utc-network-nfc-hce.c [new file with mode: 0755]
src/utc/nfc/utc-network-nfc-ndef-message.c [new file with mode: 0755]
src/utc/nfc/utc-network-nfc-ndef-record.c [new file with mode: 0755]
src/utc/nfc/utc-network-nfc.c [new file with mode: 0755]
src/utc/notification/CMakeLists.txt [new file with mode: 0755]
src/utc/notification/platform.list [new file with mode: 0755]
src/utc/notification/public.list [new file with mode: 0755]
src/utc/notification/tct-notification-core.c [new file with mode: 0755]
src/utc/notification/tct-notification-core.h [new file with mode: 0755]
src/utc/notification/utc-notification.c [new file with mode: 0755]
src/utc/package-manager/CMakeLists.txt [new file with mode: 0755]
src/utc/package-manager/platform.list [new file with mode: 0755]
src/utc/package-manager/public.list [new file with mode: 0755]
src/utc/package-manager/res/org.tizen.helloworld-1.0.0-arm.tpk [new file with mode: 0755]
src/utc/package-manager/res/org.tizen.helloworld-1.0.0-i386.tpk [new file with mode: 0755]
src/utc/package-manager/res/org.tizen.helloworld2-1.0.0-arm.tpk [new file with mode: 0755]
src/utc/package-manager/res/org.tizen.helloworld2-1.0.0-i386.tpk [new file with mode: 0755]
src/utc/package-manager/res/org.tizen.helloworld3-1.0.0-arm.tpk [new file with mode: 0755]
src/utc/package-manager/res/org.tizen.helloworld3-1.0.0-i386.tpk [new file with mode: 0755]
src/utc/package-manager/tct-package-manager-core.c [new file with mode: 0755]
src/utc/package-manager/tct-package-manager-core.h [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-clone.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-create.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-destroy.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-foreach-app-from-package.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-foreach-cert-info.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-foreach-privilege-info.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-get-icon.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-get-installed-storage.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-get-label.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-get-package.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-get-root-path.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-get-type.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-get-version.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-is-accessible.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-is-equal.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-is-preload-package.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-is-removable-package.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-info-is-system-package.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-compare-app-cert-info.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-compare-package-cert-info.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-create.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-destroy.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-filter-add-bool.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-filter-count.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-filter-create.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-filter-destroy.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-filter-foreach-package-info.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-foreach-package-info.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-get-package-id-by-app-id.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-get-package-info.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-get-permission-type.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-is-preload-package-by-app-id.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-set-event-cb.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-set-event-status.c [new file with mode: 0755]
src/utc/package-manager/utc-ApplicationFW-package-manager-unset-event-cb.c [new file with mode: 0755]
src/utc/player/CMakeLists.txt [new file with mode: 0755]
src/utc/player/public.list [new file with mode: 0755]
src/utc/player/res/Color.mp4 [new file with mode: 0755]
src/utc/player/res/subtitles_test_file.srt [new file with mode: 0755]
src/utc/player/tct-player-core.c [new file with mode: 0755]
src/utc/player/tct-player-core.h [new file with mode: 0755]
src/utc/player/utc-media-player-callback.c [new file with mode: 0755]
src/utc/player/utc-media-player-display.c [new file with mode: 0755]
src/utc/player/utc-media-player-lifecycle.c [new file with mode: 0755]
src/utc/player/utc-media-player-streaming.c [new file with mode: 0755]
src/utc/player/utc-media-player.c [new file with mode: 0755]
src/utc/privilege-info/CMakeLists.txt [new file with mode: 0755]
src/utc/privilege-info/nonpriv.list [new file with mode: 0755]
src/utc/privilege-info/public.list [new file with mode: 0755]
src/utc/privilege-info/tct-privilege-info-core.c [new file with mode: 0755]
src/utc/privilege-info/tct-privilege-info-core.h [new file with mode: 0755]
src/utc/privilege-info/utc-privilege-info.c [new file with mode: 0755]
src/utc/push/CMakeLists.txt [new file with mode: 0755]
src/utc/push/public.list [new file with mode: 0755]
src/utc/push/sppc-common.c [new file with mode: 0755]
src/utc/push/sppc-common.h [new file with mode: 0755]
src/utc/push/tct-push-core.c [new file with mode: 0755]
src/utc/push/tct-push-core.h [new file with mode: 0755]
src/utc/push/utc-sppc-service.c [new file with mode: 0755]
src/utc/radio/CMakeLists.txt [new file with mode: 0755]
src/utc/radio/public.list [new file with mode: 0755]
src/utc/radio/tct-radio-core.c [new file with mode: 0755]
src/utc/radio/tct-radio-core.h [new file with mode: 0755]
src/utc/radio/utc-media-radio.c [new file with mode: 0755]
src/utc/recorder/CMakeLists.txt [new file with mode: 0755]
src/utc/recorder/public.list [new file with mode: 0755]
src/utc/recorder/tct-recorder-core.c [new file with mode: 0755]
src/utc/recorder/tct-recorder-core.h [new file with mode: 0755]
src/utc/recorder/utc_media_recorder.c [new file with mode: 0755]
src/utc/recorder/utc_media_recorder_callback.c [new file with mode: 0755]
src/utc/recorder/utc_media_recorder_lifecycle.c [new file with mode: 0755]
src/utc/runtime-info/CMakeLists.txt [new file with mode: 0755]
src/utc/runtime-info/public.list [new file with mode: 0755]
src/utc/runtime-info/tct-runtime-info-core.c [new file with mode: 0755]
src/utc/runtime-info/tct-runtime-info-core.h [new file with mode: 0755]
src/utc/runtime-info/utc-runtime-info.c [new file with mode: 0755]
src/utc/sensor/CMakeLists.txt [new file with mode: 0755]
src/utc/sensor/platform.list [new file with mode: 0755]
src/utc/sensor/product.list [new file with mode: 0755]
src/utc/sensor/public.list [new file with mode: 0755]
src/utc/sensor/tct-sensor-core.c [new file with mode: 0755]
src/utc/sensor/tct-sensor-core.h [new file with mode: 0755]
src/utc/sensor/utc-system-sensor-basic.c [new file with mode: 0755]
src/utc/sensor/utc-system-sensor-utils.c [new file with mode: 0755]
src/utc/smartcard/CMakeLists.txt [new file with mode: 0755]
src/utc/smartcard/public.list [new file with mode: 0755]
src/utc/smartcard/tct-smartcard-core.c [new file with mode: 0755]
src/utc/smartcard/tct-smartcard-core.h [new file with mode: 0755]
src/utc/smartcard/utc-smartcard-channel.c [new file with mode: 0755]
src/utc/smartcard/utc-smartcard-reader.c [new file with mode: 0755]
src/utc/smartcard/utc-smartcard-service.c [new file with mode: 0755]
src/utc/smartcard/utc-smartcard-session.c [new file with mode: 0755]
src/utc/smartcard/utc-smartcard.c [new file with mode: 0755]
src/utc/smartcard/utc-smartcard.h [new file with mode: 0755]
src/utc/sound-manager/CMakeLists.txt [new file with mode: 0755]
src/utc/sound-manager/prod_platform.list [new file with mode: 0755]
src/utc/sound-manager/public.list [new file with mode: 0755]
src/utc/sound-manager/tct-sound-manager-core.c [new file with mode: 0755]
src/utc/sound-manager/tct-sound-manager-core.h [new file with mode: 0755]
src/utc/sound-manager/utc-media-sound-manager-callback.c [new file with mode: 0755]
src/utc/sound-manager/utc-media-sound-manager.c [new file with mode: 0755]
src/utc/stt/CMakeLists.txt [new file with mode: 0755]
src/utc/stt/public.list [new file with mode: 0755]
src/utc/stt/res/ringtone.wav [new file with mode: 0755]
src/utc/stt/tct-stt-core.c [new file with mode: 0755]
src/utc/stt/tct-stt-core.h [new file with mode: 0755]
src/utc/stt/utc-stt.c [new file with mode: 0755]
src/utc/system-info/CMakeLists.txt [new file with mode: 0755]
src/utc/system-info/public.list [new file with mode: 0755]
src/utc/system-info/tct-system-info-core.c [new file with mode: 0755]
src/utc/system-info/tct-system-info-core.h [new file with mode: 0755]
src/utc/system-info/utc-system-info.c [new file with mode: 0755]
src/utc/system-settings/CMakeLists.txt [new file with mode: 0755]
src/utc/system-settings/public.list [new file with mode: 0755]
src/utc/system-settings/res/tct-content-tizen-tests_audio_default.mp3 [new file with mode: 0755]
src/utc/system-settings/tct-system-settings-core.c [new file with mode: 0755]
src/utc/system-settings/tct-system-settings-core.h [new file with mode: 0755]
src/utc/system-settings/utc-system-settings.c [new file with mode: 0755]
src/utc/tbm/CMakeLists.txt [new file with mode: 0755]
src/utc/tbm/platform.list [new file with mode: 0755]
src/utc/tbm/public.list [new file with mode: 0755]
src/utc/tbm/tct-tbm-core.c [new file with mode: 0755]
src/utc/tbm/tct-tbm-core.h [new file with mode: 0755]
src/utc/tbm/utc-tbm-surface-create.c [new file with mode: 0755]
src/utc/tbm/utc-tbm-surface-info.c [new file with mode: 0755]
src/utc/tbm/utc-tbm-surface-map.c [new file with mode: 0755]
src/utc/telephony/CMakeLists.txt [new file with mode: 0755]
src/utc/telephony/public.list [new file with mode: 0755]
src/utc/telephony/tct-telephony-core.c [new file with mode: 0755]
src/utc/telephony/tct-telephony-core.h [new file with mode: 0755]
src/utc/telephony/utc-call.c [new file with mode: 0755]
src/utc/telephony/utc-common.c [new file with mode: 0755]
src/utc/telephony/utc-modem.c [new file with mode: 0755]
src/utc/telephony/utc-network.c [new file with mode: 0755]
src/utc/telephony/utc-sim.c [new file with mode: 0755]
src/utc/tone-player/CMakeLists.txt [new file with mode: 0755]
src/utc/tone-player/public.list [new file with mode: 0755]
src/utc/tone-player/tct-tone-player-core.c [new file with mode: 0755]
src/utc/tone-player/tct-tone-player-core.h [new file with mode: 0755]
src/utc/tone-player/utc-tone-player.c [new file with mode: 0755]
src/utc/tts/CMakeLists.txt [new file with mode: 0755]
src/utc/tts/public.list [new file with mode: 0755]
src/utc/tts/tct-tts-core.c [new file with mode: 0755]
src/utc/tts/tct-tts-core.h [new file with mode: 0755]
src/utc/tts/utc-tts.c [new file with mode: 0755]
src/utc/wav-player/CMakeLists.txt [new file with mode: 0755]
src/utc/wav-player/public.list [new file with mode: 0755]
src/utc/wav-player/res/sound_5.wav [new file with mode: 0755]
src/utc/wav-player/tct-wav-player-core.c [new file with mode: 0755]
src/utc/wav-player/tct-wav-player-core.h [new file with mode: 0755]
src/utc/wav-player/utc-wav-player.c [new file with mode: 0755]
src/utc/webkit2/CMakeLists.txt [new file with mode: 0755]
src/utc/webkit2/public.list [new file with mode: 0755]
src/utc/webkit2/res/common/sample.html [new file with mode: 0755]
src/utc/webkit2/res/common/sample_1.html [new file with mode: 0755]
src/utc/webkit2/res/common/sample_2.html [new file with mode: 0755]
src/utc/webkit2/res/ewk_context_menu/image.png [new file with mode: 0755]
src/utc/webkit2/res/ewk_context_menu/index.html [new file with mode: 0755]
src/utc/webkit2/res/ewk_view/back_forward.html [new file with mode: 0755]
src/utc/webkit2/res/ewk_view/index_big_red_square.html [new file with mode: 0755]
src/utc/webkit2/res/ewk_view/sample.html [new file with mode: 0755]
src/utc/webkit2/res/ewk_view/sample_1.html [new file with mode: 0755]
src/utc/webkit2/res/ewk_view/text_find.html [new file with mode: 0755]
src/utc/webkit2/tct-webkit2-core.c [new file with mode: 0755]
src/utc/webkit2/tct-webkit2-core.h [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk.h [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_count_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_current_item_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_at_index_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_original_url_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_ref_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_title_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_unref_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_url_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_n_back_items_copy_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_next_item_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_back_forward_list_previous_item_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_context_cache_model_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_context_cache_model_set_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_context_cookie_manager_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_context_resource_cache_clear_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_cookie_manager_accept_policy_async_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_cookie_manager_accept_policy_set_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_cookie_manager_cookies_clear_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_init_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_cookie_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_host_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_http_method_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_ignore_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_navigation_type_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_response_headers_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_response_mime_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_response_status_code_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_scheme_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_type_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_url_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_policy_decision_use_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_settings_default_font_size_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_settings_default_font_size_set_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_settings_default_text_encoding_name_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_settings_default_text_encoding_name_set_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_settings_javascript_enabled_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_settings_javascript_enabled_set_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_settings_loads_images_automatically_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_settings_loads_images_automatically_set_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_settings_scripts_can_open_windows_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_settings_scripts_can_open_windows_set_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_shutdown_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_add_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_back_forward_list_clear_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_back_forward_list_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_back_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_back_possible_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_contents_size_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_context_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_forward_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_forward_possible_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_fullscreen_exit_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_html_string_load_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_load_progress_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_reload_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_resume_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_scale_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_scale_set_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_script_execute_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_scroll_by_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_scroll_pos_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_scroll_set_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_settings_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_stop_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_suspend_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_text_find_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_title_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_url_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_url_request_set_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_url_set_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_user_agent_get_func.c [new file with mode: 0755]
src/utc/webkit2/utc_webkit2_ewk_view_user_agent_set_func.c [new file with mode: 0755]
src/utc/widget_service/CMakeLists.txt [new file with mode: 0755]
src/utc/widget_service/platform.list [new file with mode: 0755]
src/utc/widget_service/public.list [new file with mode: 0755]
src/utc/widget_service/res/org.tizen.sample-1.0.0-arm.tpk [new file with mode: 0755]
src/utc/widget_service/res/org.tizen.sample-1.0.0-i386.tpk [new file with mode: 0755]
src/utc/widget_service/res/org.tizen.sample.crash-1.0.0-arm.tpk [new file with mode: 0755]
src/utc/widget_service/res/org.tizen.sample.crash-1.0.0-i386.tpk [new file with mode: 0755]
src/utc/widget_service/tct-widget_service-core.c [new file with mode: 0755]
src/utc/widget_service/tct-widget_service-core.h [new file with mode: 0755]
src/utc/widget_service/utc-widget_service.c [new file with mode: 0755]
src/utc/widget_viewer_evas/CMakeLists.txt [new file with mode: 0755]
src/utc/widget_viewer_evas/platform.list [new file with mode: 0755]
src/utc/widget_viewer_evas/public.list [new file with mode: 0755]
src/utc/widget_viewer_evas/res/org.tizen.sample-1.0.0-arm.tpk [new file with mode: 0755]
src/utc/widget_viewer_evas/res/org.tizen.sample-1.0.0-i386.tpk [new file with mode: 0755]
src/utc/widget_viewer_evas/res/org.tizen.sample.crash-1.0.0-arm.tpk [new file with mode: 0755]
src/utc/widget_viewer_evas/res/org.tizen.sample.crash-1.0.0-i386.tpk [new file with mode: 0755]
src/utc/widget_viewer_evas/tct-widget_viewer_evas-core.c [new file with mode: 0755]
src/utc/widget_viewer_evas/tct-widget_viewer_evas-core.h [new file with mode: 0755]
src/utc/widget_viewer_evas/utc-widget_viewer_evas.c [new file with mode: 0755]
src/utc/wifi/CMakeLists.txt [new file with mode: 0755]
src/utc/wifi/public.list [new file with mode: 0755]
src/utc/wifi/tct-wifi-core.c [new file with mode: 0755]
src/utc/wifi/tct-wifi-core.h [new file with mode: 0755]
src/utc/wifi/utc-network-wifi-ap.c [new file with mode: 0755]
src/utc/wifi/utc-network-wifi.c [new file with mode: 0755]
tct.conf [new file with mode: 0755]
templates/external_wrapper.sh [new file with mode: 0755]
templates/src-directory/ctc/CMakeLists.txt [new file with mode: 0755]
templates/src-directory/ctc/[module_name]-common.c [new file with mode: 0755]
templates/src-directory/ctc/[module_name]-common.h [new file with mode: 0755]
templates/src-directory/ctc/[module_name].c [new file with mode: 0755]
templates/src-directory/ctc/native-[module_name]-ctc.spec [new file with mode: 0755]
templates/src-directory/ctc/native-[module_name]-ctc.xml [new file with mode: 0755]
templates/src-directory/ctc/tct-[module_name]-native.c [new file with mode: 0755]
templates/src-directory/itc/CMakeLists.txt [new file with mode: 0755]
templates/src-directory/itc/ITs-[module_name]-common.c [new file with mode: 0755]
templates/src-directory/itc/ITs-[module_name]-common.h [new file with mode: 0755]
templates/src-directory/itc/ITs-[module_name].c [new file with mode: 0755]
templates/src-directory/itc/native-[module_name]-itc.spec [new file with mode: 0755]
templates/src-directory/itc/native-[module_name]-itc.xml [new file with mode: 0755]
templates/src-directory/itc/tct-[module_name]-native.c [new file with mode: 0755]
templates/src-directory/utc/CMakeLists.txt [new file with mode: 0755]
templates/src-directory/utc/core-[module_name]-tests.spec [new file with mode: 0755]
templates/src-directory/utc/core-[module_name]-tests.xml [new file with mode: 0755]
templates/src-directory/utc/tct-[module_name]-core.c [new file with mode: 0755]
templates/src-directory/utc/utc-[module_name].c [new file with mode: 0755]
templates/tct-package/inst.sh [new file with mode: 0755]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..472de8f
--- /dev/null
@@ -0,0 +1,12 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+PROJECT(tct_coreapi_itc)
+
+INCLUDE(FindPkgConfig)
+SET(BIN_DIR "/opt/usr/apps/")
+
+INCLUDE_DIRECTORIES(
+       src/common
+)
+
+
+ADD_SUBDIRECTORY(src)
diff --git a/LICENSE b/LICENSE
new file mode 100755 (executable)
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/README.txt b/README.txt
new file mode 100755 (executable)
index 0000000..ad5747e
--- /dev/null
@@ -0,0 +1 @@
+2015/06/01 : TCT Source Release.
diff --git a/custom_tclist/BAT.list b/custom_tclist/BAT.list
new file mode 100755 (executable)
index 0000000..ed8ee72
--- /dev/null
@@ -0,0 +1,1084 @@
+ITc_ckmc_get_key_alias_list_p
+ITc_ckmc_save_cert_p
+ITc_ckmc_remove_cert_p
+ITc_ckmc_get_cert_p
+ITc_ckmc_get_cert_alias_list_p
+ITc_ckmc_save_data_p
+ITc_ckmc_remove_data_p
+ITc_ckmc_get_data_p
+ITc_ckmc_get_data_alias_list_p
+ITc_ckmc_create_key_pair_rsa_p
+ITc_ckmc_create_key_pair_dsa_p
+ITc_ckmc_create_key_pair_ecdsa_p
+ITc_ckmc_create_verify_signature_p
+ITc_ckmc_get_cert_chain_p
+ITc_ckmc_get_cert_chain_with_alias_p
+ITc_ckmc_key_free_p
+ITc_ckmc_buffer_free_p
+ITc_ckmc_cert_free_p
+ITc_ckmc_load_cert_from_file_p
+ITc_ckmc_load_from_pkcs12_file_p
+ITc_ckmc_alias_list_all_free_p
+ITc_ckmc_cert_list_all_free_p
+ITc_ckmc_allow_deny_access_p
+ITc_sensor_get_max_batch_count_p
+ITc_sensor_get_max_range_p
+ITc_sensor_get_min_range_p
+ITc_sensor_get_min_interval_p
+ITc_sensor_get_name_p
+ITc_sensor_get_resolution_p
+ITc_sensor_get_sensor_list_p
+ITc_sensor_get_type_p
+ITc_sensor_get_vendor_p
+ITc_sensor_create_destroy_listener_p
+ITc_sensor_listener_set_interval_p
+ITc_sensor_listener_set_option_p
+ITc_sensor_listener_start_stop_p
+ITc_sensor_listener_read_data_p
+ITc_sensor_listener_set_unset_event_cb_p
+ITc_sensor_util_get_angle_change_p
+ITc_sensor_util_get_declination_p
+ITc_sensor_util_get_orientation_p
+ITc_sensor_util_get_rotation_matrix_p
+ITc_sensor_util_get_rotation_matrix_from_vector_p
+ITc_sensor_util_remap_coordinate_system_p
+ITc_sensor_util_get_inclination_p
+ITc_system_info_get_platform_string_p
+ITc_device_haptic_open_close_p
+ITc_device_battery_get_percent_p
+ITc_device_battery_is_charging_p
+ITc_device_battery_get_level_status_p
+ITc_device_display_get_numbers_p
+ITc_device_display_get_max_brightness_p
+ITc_device_display_set_get_brightness_p
+ITc_device_display_change_get_state_p
+ITc_device_flash_get_max_brightness_p
+ITc_device_flash_set_get_brightness_p
+ITc_device_led_play_stop_custom_p
+ITc_device_power_request_release_lock_p
+ITc_power_wakeup_p
+ITc_runtime_info_set_unset_changed_cb_p
+ITc_metadata_extractor_get_frame_at_time_p
+ITc_metadata_extractor_get_metadata_p
+ITc_metadata_extractor_get_synclyrics_p
+ITc_metadata_extractor_set_buffer_p
+ITc_metadata_extractor_set_path_p
+ITc_media_content_bookmark_clone_p
+ITc_media_content_bookmark_get_marked_p
+ITc_media_content_bookmark_get_path_p
+ITc_media_content_bookmark_insert_delete_p
+ITc_media_content_bookmark_count_p
+ITc_media_content_filter_create_destroy_filter_p
+ITc_media_content_filter_set_get_condition_p
+ITc_media_content_filter_set_get_offset_p
+ITc_media_content_filter_set_get_order_p
+ITc_media_content_folder_foreach_from_db_p
+ITc_media_content_folder_clone_p
+ITc_media_content_folder_foreach_media_from_db_p
+ITc_media_content_folder_get_folder_count_p
+ITc_media_content_folder_get_folder_from_db_p
+ITc_media_content_folder_get_media_count_from_db_p
+ITc_media_content_folder_get_modified_time_p
+ITc_media_content_folder_get_storage_type_p
+ITc_media_content_group_get_group_count_p
+ITc_media_content_group_foreach_group_fromDB_p
+ITc_media_content_group_foreach_media_from_db_p
+ITc_media_content_group_get_media_count_from_db_p
+ITc_media_content_media_info_insert_to_db_p
+ITc_media_content_media_info_create_cancel_thumbnail_p
+ITc_media_content_media_info_foreach_media_from_db_p
+ITc_media_content_media_info_clone_p
+ITc_media_content_media_info_get_modified_time_p
+ITc_media_content_media_info_get_size_p
+ITc_media_content_media_info_delete_from_db_p
+ITc_media_content_media_info_insert_delete_batch_from_db_p
+ITc_media_content_media_info_get_set_added_time_p
+ITc_media_content_media_info_move_to_db_p
+ITc_media_content_media_info_get_title_p
+ITc_media_content_media_info_set_get_author_p
+ITc_media_content_media_info_set_get_category_p
+ITc_media_content_media_info_set_get_content_name_p
+ITc_media_content_media_info_set_get_description_p
+ITc_media_content_media_info_set_get_display_name_p
+ITc_media_content_media_info_set_get_favorite_p
+ITc_media_content_media_info_set_get_provider_p
+ITc_media_content_media_info_set_get_location_tag_p
+ITc_media_content_media_info_set_get_keyword_p
+ITc_media_content_media_info_set_get_rating_p
+ITc_media_content_media_info_set_get_weather_p
+ITc_media_content_media_info_set_get_age_rating_p
+ITc_media_content_media_info_set_get_altitude_p
+ITc_media_content_media_info_set_get_latitude_p
+ITc_media_content_media_info_set_get_longitude_p
+ITc_media_content_media_info_get_audio_metadata_p
+ITc_media_content_media_info_foreach_tag_from_db_p
+ITc_media_content_media_info_get_media_count_from_db_p
+ITc_media_content_media_info_get_image_p
+ITc_media_content_media_info_get_video_p
+ITc_media_content_media_info_get_storage_type_p
+ITc_media_content_media_info_get_tag_count_from_db_p
+ITc_media_content_media_info_is_drm_p
+ITc_media_content_media_info_get_thumbnail_path_p
+ITc_media_content_media_info_get_file_path_p
+ITc_media_content_media_info_get_timeline_p
+ITc_media_content_media_info_get_bookmark_count_from_db_p
+ITc_media_content_media_info_get_mime_type_p
+ITc_media_content_media_info_get_media_from_db_p
+ITc_media_content_media_info_refresh_metadata_to_db_p
+ITc_media_content_media_info_insert_burstshot_to_db_p
+ITc_media_content_playlist_foreach_playlist_from_db_p
+ITc_media_content_playlist_insert_to_db_p
+ITc_media_content_playlist_add_media_p
+ITc_media_content_playlist_clone_p
+ITc_media_content_playlist_get_playlist_id_p
+ITc_media_content_playlist_foreach_media_from_db_p
+ITc_media_content_playlist_get_media_count_from_db_p
+ITc_media_content_playlist_set_get_name_p
+ITc_media_content_playlist_set_get_play_order_p
+ITc_media_content_playlist_set_get_thumbnail_path_p
+ITc_media_content_playlist_get_playlist_from_db_p
+ITc_media_content_playlist_get_playlist_count_p
+ITc_media_content_playlist_remove_media_p
+ITc_media_content_tag_insert_to_db_p
+ITc_media_content_tag_foreach_tag_from_db_p
+ITc_media_content_tag_clone_p
+ITc_media_content_tag_get_tag_count_from_db_p
+ITc_media_content_tag_foreach_media_from_db_p
+ITc_media_content_tag_get_media_count_from_db_p
+ITc_media_content_tag_add_remove_media_p
+ITc_media_content_tag_set_get_name_p
+ITc_media_content_tag_get_tag_from_db_p
+ITc_media_content_audio_meta_clone_p
+ITc_media_content_audio_meta_get_album_p
+ITc_media_content_audio_meta_get_album_artist_p
+ITc_media_content_audio_meta_get_artist_p
+ITc_media_content_audio_meta_get_bitpersample_p
+ITc_media_content_audio_meta_get_bit_rate_p
+ITc_media_content_audio_meta_get_sample_rate_p
+ITc_media_content_audio_meta_get_channel_p
+ITc_media_content_audio_meta_get_composer_p
+ITc_media_content_audio_meta_get_copyright_p
+ITc_media_content_audio_meta_get_duration_p
+ITc_media_content_audio_meta_get_genre_p
+ITc_media_content_audio_meta_get_media_id_p
+ITc_media_content_audio_meta_set_get_played_count_p
+ITc_media_content_audio_meta_set_get_played_position_p
+ITc_media_content_audio_meta_set_get_played_time_p
+ITc_media_content_audio_meta_get_recorded_date_p
+ITc_media_content_audio_meta_get_year_p
+ITc_media_content_audio_meta_get_track_num_p
+ITc_media_content_video_meta_clone_p
+ITc_media_content_video_meta_get_height_p
+ITc_media_content_video_meta_get_width_p
+ITc_media_content_video_meta_get_album_p
+ITc_media_content_video_meta_get_artist_p
+ITc_media_content_video_meta_get_bit_rate_p
+ITc_media_content_video_meta_get_duration_p
+ITc_media_content_video_meta_get_composer_p
+ITc_media_content_video_meta_get_copyright_p
+ITc_media_content_video_meta_get_genre_p
+ITc_media_content_video_meta_get_media_id_p
+ITc_media_content_video_meta_get_track_num_p
+ITc_media_content_video_meta_get_year_p
+ITc_media_content_video_meta_get_recorded_date_p
+ITc_media_content_video_meta_set_get_played_time_p
+ITc_media_content_video_meta_set_get_played_count_p
+ITc_media_content_video_meta_set_get_played_position_p
+ITc_media_content_video_meta_get_album_artist_p
+ITc_media_content_image_meta_clone_p
+ITc_media_content_image_meta_get_burst_id_p
+ITc_media_content_image_meta_get_date_taken_p
+ITc_media_content_image_meta_get_height_p
+ITc_media_content_image_meta_get_width_p
+ITc_media_content_image_meta_is_burst_shot_p
+ITc_media_content_image_meta_get_media_id_p
+ITc_media_content_image_meta_set_get_orientation_p
+ITc_media_content_album_foreach_album_from_db_p
+ITc_media_content_album_clone_p
+ITc_media_content_album_get_name_p
+ITc_media_content_album_get_album_count_from_db_p
+ITc_media_content_album_get_artist_p
+ITc_media_content_album_get_media_count_from_db_p
+ITc_media_content_album_get_album_from_db_p
+ITc_media_content_album_get_album_art_p
+ITc_media_content_folder_set_get_name_p
+ITc_nfc_manager_nfc_se_register_unregister_aid_p
+ITc_nfc_se_is_activated_handler_for_aid_p
+ITc_nfc_se_is_activated_handler_for_category_p
+ITc_nfc_se_foreach_registered_aids_p
+ITc_nfc_ndef_record_create_destroy_p
+ITc_nfc_ndef_record_create_text_p
+ITc_nfc_ndef_record_create_uri_p
+ITc_nfc_ndef_record_create_mime_p
+ITc_nfc_ndef_message_create_destroy_p
+ITc_nfc_ndef_message_get_record_count_p
+ITc_nfc_ndef_message_append_record_p
+ITc_nfc_ndef_message_insert_remove_record_p
+ITc_nfc_ndef_message_get_record_p
+ITc_nfc_ndef_message_get_rawdata_create_from_rawdata_p
+ITc_nfc_ndef_record_get_payload_p
+ITc_nfc_ndef_record_set_get_id_p
+ITc_nfc_ndef_record_get_type_p
+ITc_nfc_ndef_record_get_tnf_p
+ITc_nfc_ndef_record_get_text_p
+ITc_nfc_ndef_record_get_langcode_p
+ITc_nfc_ndef_record_get_encode_type_p
+ITc_nfc_ndef_record_get_uri_p
+ITc_nfc_ndef_record_get_mime_type_p
+ITc_nfc_snep_register_unregister_server_p
+ITc_nfc_is_supported_p
+ITc_nfc_manager_initialize_deinitialize_p
+ITc_nfc_is_activated_p
+ITc_nfc_manager_nfc_manager_system_handler_enable_p
+ITc_nfc_manager_set_unset_ndef_discovered_p
+ITc_nfc_manager_set_get_tag_filter_p
+ITc_nfc_manager_set_unset_se_event_cb_p
+ITc_nfc_manager_set_unset_activation_changed_cb_p
+ITc_nfc_manager_set_unset_se_transaction_event_cb_p
+ITc_nfc_manager_set_unset_tag_discovered_cb_p
+ITc_nfc_manager_set_unset_p2p_target_discovered_cb_p
+ITc_nfc_manager_set_unset_hce_event_cb_p
+ITc_nfc_hce_send_apdu_response_p
+ITc_system_settings_set_unset_changed_cb_p
+ITc_notification_free_p
+ITc_notification_delete_all_p
+ITc_notification_get_image_p
+ITc_notification_set_image_p
+ITc_notification_get_layout_p
+ITc_notification_set_layout_p
+ITc_notification_get_led_p
+ITc_notification_set_led_p
+ITc_notification_get_led_time_period_p
+ITc_notification_set_led_time_period_p
+ITc_notification_get_size_p
+ITc_notification_set_size_p
+ITc_notification_get_text_p
+ITc_notification_set_text_p
+ITc_notification_get_sound_p
+ITc_notification_set_sound_p
+ITc_notification_get_vibration_p
+ITc_notification_set_vibration_p
+ITc_notification_get_time_p
+ITc_notification_set_time_p
+ITc_notification_get_time_from_text_p
+ITc_notification_set_time_to_text_p
+ITc_notification_get_progress_p
+ITc_notification_set_progress_p
+ITc_notification_get_property_p
+ITc_notification_set_property_p
+ITc_notification_get_display_applist_p
+ITc_notification_set_display_applist_p
+ITc_notification_get_type_p
+ITc_notification_get_insert_time_p
+ITc_notification_status_message_post_p
+ITc_notification_update_p
+ITc_notification_get_tag_p
+ITc_notification_set_tag_p
+ITc_notification_load_by_tag_p
+ITc_notification_post_p
+ITc_notification_set_launch_option_p
+ITc_notification_get_launch_option_p
+ITc_wifi_ap_create_destroy_p
+ITc_wifi_ap_clone_destroy_p
+ITc_wifi_get_connection_state_p
+ITc_wifi_ap_set_get_dns_address_p
+ITc_wifi_ap_set_get_eap_auth_type_p
+ITc_wifi_ap_set_get_eap_type_p
+ITc_wifi_ap_set_get_eap_ca_cert_file_p
+ITc_wifi_ap_set_get_eap_client_cert_file_p
+ITc_wifi_ap_set_get_eap_private_key_info_file_p
+ITc_wifi_ap_set_get_eap_passphrase_p
+ITc_wifi_ap_set_get_encryption_type_p
+ITc_wifi_ap_set_get_proxy_type_p
+ITc_wifi_ap_set_get_security_type_p
+ITc_wifi_ap_set_get_ip_config_type_p
+ITc_wifi_ap_set_get_ip_address_p
+ITc_wifi_ap_set_get_gateway_address_p
+ITc_wifi_ap_set_get_subnet_mask_p
+ITc_wifi_ap_set_get_proxy_address_p
+ITc_wifi_set_unset_background_scan_cb_p
+ITc_wifi_set_unset_connection_state_changed_cb_p
+ITc_wifi_set_unset_device_state_changed_cb_p
+ITc_wifi_connect_disconnect_p
+ITc_wifi_get_connected_ap_p
+ITc_wifi_foreach_found_aps_p
+ITc_wifi_scan_p
+ITc_wifi_ap_hidden_create_p
+ITc_wifi_ap_is_favorite_p
+ITc_wifi_ap_is_passphrase_required_p
+ITc_wifi_ap_is_wps_supported_p
+ITc_wifi_ap_refresh_p
+ITc_wifi_ap_get_bssid_p
+ITc_wifi_ap_get_connection_state_p
+ITc_wifi_ap_get_essid_p
+ITc_wifi_ap_get_frequency_p
+ITc_wifi_ap_get_max_speed_p
+ITc_wifi_ap_get_rssi_p
+ITc_wifi_get_mac_address_p
+ITc_wifi_set_unset_rssi_level_changed_cb_p
+ITc_wifi_ap_is_passpoint_p
+ITc_wifi_activate_with_wifi_picker_tested_p
+ITc_wifi_forget_ap_p
+ITc_wifi_ap_set_passphrase_p
+ITc_wifi_get_network_interface_name_p
+ITc_camera_attr_set_get_preview_fps_p
+ITc_camera_attr_set_get_af_mode_p
+ITc_camera_attr_set_get_brightness_p
+ITc_camera_attr_set_get_contrast_p
+ITc_camera_attr_set_get_effect_p
+ITc_camera_attr_set_get_exposure_mode_p
+ITc_camera_attr_set_get_remove_geotag_p
+ITc_camera_attr_set_get_hdr_mode_p
+ITc_camera_attr_set_get_iso_p
+ITc_camera_attr_set_get_scene_mode_p
+ITc_camera_attr_get_contrast_range_p
+ITc_camera_attr_set_get_image_quality_p
+ITc_camera_attr_set_get_stream_flip_p
+ITc_camera_attr_set_get_stream_rotation_p
+ITc_camera_attr_set_get_tag_orientation_p
+ITc_camera_attr_set_get_tag_software_p
+ITc_camera_attr_set_get_theater_mode_p
+ITc_camera_attr_set_get_whitebalance_p
+ITc_camera_attr_set_get_zoom_p
+ITc_camera_attr_get_zoom_range_p
+ITc_camera_attr_get_lens_orientation_p
+ITc_camera_attr_get_exposure_range_p
+ITc_camera_attr_set_get_flash_mode_p
+ITc_camera_attr_get_brightness_range_p
+ITc_camera_attr_set_clear_af_area_p
+ITc_camera_attr_is_supported_antishake_p
+ITc_camera_attr_enable_is_enabled_auto_contrast_p
+ITc_camera_attr_enable_is_enabled_tag_p
+ITc_camera_attr_enable_is_enabled_video_stabilization_p
+ITc_camera_attr_is_supported_video_stabilization_p
+ITc_camera_create_destroy_p
+ITc_camera_get_device_count_p
+ITc_camera_attr_disable_shutter_sound_p
+ITc_camera_set_unset_state_change_cb_p
+ITc_camera_get_state_p
+ITc_camera_attr_for_each_supported_af_mode_p
+ITc_camera_attr_for_each_supported_effect_p
+ITc_camera_attr_foreach_supported_exposure_mode_p
+ITc_camera_attr_foreach_supported_flash_mode_p
+ITc_camera_attr_foreach_supported_fps_p
+ITc_camera_attr_foreach_supported_iso_p
+ITc_camera_attr_foreach_supported_scene_mode_p
+ITc_camera_attr_foreach_supported_whitebalance_p
+ITc_camera_foreach_supported_capture_format_p
+ITc_camera_foreach_supported_capture_resolution_p
+ITc_camera_foreach_supported_preview_resolution_p
+ITc_camera_foreach_supported_preview_format_p
+ITc_camera_set_get_preview_resolution_p
+ITc_camera_set_get_capture_resolution_p
+ITc_camera_start_stop_preview_set_unset_preview_cb_p
+ITc_camera_start_capture_p
+ITc_camera_set_get_preview_format_p
+ITc_camera_attr_is_supported_hdr_capture_p
+ITc_camera_attr_set_unset_hdr_capture_progress_cb_p
+ITc_camera_attr_set_get_capture_format_p
+ITc_camera_get_recommended_preview_resolution_p
+ITc_camera_is_supported_zero_shutter_lag_p
+ITc_camera_is_supported_face_detection_p
+ITc_camera_start_stop_continuous_capture_p
+ITc_camera_attr_set_unset_error_cb_p
+ITc_camera_start_cancel_focusing_p
+ITc_camera_set_unset_focus_changed_cb_p
+ITc_camera_attr_set_unset_interrupted_cb_p
+ITc_camera_foreach_supported_stream_flip_p
+ITc_camera_foreach_supported_stream_rotation_p
+ITc_camera_attr_is_supported_auto_contrast_p
+ITc_camera_is_supported_continuous_capture_p
+ITc_camera_set_unset_media_packet_preview_cb_p
+ITc_camera_is_supported_media_packet_preview_cb_p
+ITc_camera_set_display_p
+ITc_telephony_network_get_rssi_p
+ITc_telephony_network_get_roaming_status_p
+ITc_telephony_network_get_mcc_p
+ITc_telephony_network_get_mnc_p
+ITc_telephony_network_get_network_name_p
+ITc_telephony_network_get_type_p
+ITc_telephony_network_get_service_state_p
+ITc_telephony_sim_get_icc_id_p
+ITc_telephony_sim_get_operator_p
+ITc_telephony_sim_get_msin_p
+ITc_telephony_sim_get_spn_p
+ITc_telephony_sim_get_subscriber_number_p
+ITc_telephony_sim_is_changed_p
+ITc_telephony_sim_get_state_p
+ITc_telephony_call_get_voice_call_state_p
+ITc_telephony_call_get_video_call_state_p
+ITc_telephony_set_unset_noti_cb_p
+ITc_telephony_modem_get_imei_p
+ITc_stt_start_cancel_p
+ITc_stt_start_stop_cancel_p
+ITc_stt_get_state_p
+ITc_stt_get_default_language_p
+ITc_stt_set_get_engine_p
+ITc_stt_is_recognition_type_supported_p
+ITc_stt_get_recording_volume_p
+ITc_stt_set_silence_detection_p
+ITc_stt_set_unset_start_sound_p
+ITc_stt_set_unset_stop_sound_p
+ITc_stt_set_unset_state_changed_cb_p
+ITc_stt_set_unset_recognition_result_cb_p
+ITc_stt_set_unset_default_language_changed_cb_p
+ITc_stt_set_unset_error_cb_p
+ITc_stt_foreach_detailed_result_p
+ITc_stt_foreach_supported_engines_p
+ITc_stt_foreach_supported_languages_p
+ITc_messages_mms_remove_all_attachments_p
+ITc_messages_add_get_address_p
+ITc_messages_get_mboxType_p
+ITc_messages_get_message_count_p
+ITc_messages_add_get_sms_listening_port_p
+ITc_messages_get_message_type_p
+ITc_messages_set_get_text_p
+ITc_messages_get_time_p
+ITc_messages_set_get_sim_id_p
+ITc_messages_push_add_remove_incoming_cb_p
+ITc_messages_push_register_deregister_p
+ITc_messages_push_reregister_p
+ITc_messages_send_message_p
+ITc_messages_search_getid_searchbyid_freemessage_p
+ITc_messages_foreach_message_p
+ITc_i18n_ustring_get_length_to_upper_p
+ITc_i18n_ustring_from_UTF8_to_UTF8_p
+ITc_i18n_ustring_copy_au_p
+ITc_i18n_ustring_copy_au_n_p
+ITc_i18n_ustring_copy_ua_n_p
+ITc_i18n_ustring_copy_ua_p
+ITc_i18n_ustring_copy_n_p
+ITc_i18n_ustring_to_title_p
+ITc_i18n_uchar_get_int_property_value_p
+ITc_i18n_uchar_get_ublock_code_p
+ITc_i18n_ustring_to_upper_p
+ITc_i18n_ustring_count_char32_p
+ITc_i18n_ustring_has_more_char32_than_p
+ITc_i18n_ustring_cat_p
+ITc_i18n_ustring_cat_n_p
+ITc_i18n_ustring_string_p
+ITc_i18n_ustring_find_first_p
+ITc_i18n_ustring_char_p
+ITc_i18n_ustring_char32_p
+ITc_i18n_ustring_r_string_p
+ITc_i18n_ustring_find_last_p
+ITc_i18n_ustring_r_char_p
+ITc_i18n_ustring_r_char32_p
+ITc_i18n_ustring_pbrk_p
+ITc_i18n_ustring_cspn_p
+ITc_i18n_ustring_spn_p
+ITc_i18n_ustring_tokenizer_r_p
+ITc_i18n_ustring_compare_code_point_order_p
+ITc_i18n_ustring_compare_binary_order_p
+ITc_i18n_ustring_case_compare_with_length_p
+ITc_i18n_ustring_compare_n_p
+ITc_i18n_ustring_compare_n_code_point_order_p
+ITc_i18n_ustring_case_compare_p
+ITc_i18n_ustring_case_compare_n_p
+ITc_i18n_ustring_mem_case_compare_p
+ITc_i18n_ustring_mem_copy_p
+ITc_i18n_ustring_mem_move_p
+ITc_i18n_ustring_mem_set_p
+ITc_i18n_ustring_mem_compare_p
+ITc_i18n_ustring_mem_compare_code_point_order_p
+ITc_i18n_ustring_mem_char_p
+ITc_i18n_ustring_mem_char32_p
+ITc_i18n_ustring_mem_r_char_p
+ITc_i18n_ustring_mem_r_char32_p
+ITc_i18n_ustring_unescape_p
+ITc_i18n_ustring_unescape_at_p
+ITc_i18n_ustring_to_lower_p
+ITc_i18n_ustring_fold_case_p
+ITc_i18n_ustring_to_WCS_p
+ITc_i18n_ustring_from_WCS_p
+ITc_i18n_ustring_to_UTF8_with_sub_p
+ITc_i18n_ustring_from_UTF8_with_sub_p
+ITc_i18n_ustring_from_UTF8_lenient_p
+ITc_i18n_ustring_to_UTF32_p
+ITc_i18n_ustring_from_UTF32_p
+ITc_i18n_ustring_from_UTF32_with_sub_p
+ITc_i18n_ustring_to_UTF32_with_sub_p
+ITc_i18n_ulocale_get_language_p
+ITc_i18n_ulocale_get_display_name_p
+ITc_i18n_ulocale_set_get_default_p
+ITc_i18n_ulocale_get_available_p
+ITc_i18n_ulocale_get_country_p
+ITc_i18n_ulocale_count_available_p
+ITc_i18n_ucalendar_create_destroy_p
+ITc_i18n_ucalendar_add_get_p
+ITc_i18n_ucalendar_set_date_time_get_milliseconds_p
+ITc_i18n_ucalendar_set_get_attribute_p
+ITc_i18n_ucalendar_get_timezone_displayname_p
+ITc_i18n_ucalendar_set_milliseconds_p
+ITc_i18n_ucalendar_is_in_daylight_time_p
+ITc_i18n_ucalendar_is_equivalent_to_p
+ITc_i18n_ucollator_create_destroy_p
+ITc_i18n_ucollator_str_collator_p
+ITc_i18n_ucollator_equal_p
+ITc_i18n_ucollator_set_strength_p
+ITc_i18n_ucollator_set_attribute_p
+ITc_i18n_udatepg_create_destroy_p
+ITc_i18n_udatepg_get_best_pattern_p
+ITc_i18n_udate_create_destroy_p
+ITc_i18n_udate_format_date_p
+ITc_i18n_usearch_create_destroy_p
+ITc_i18n_usearch_first_get_macthed_text_p
+ITc_i18n_unumber_create_destroy_p
+ITc_i18n_unumber_get_symbol_p
+ITc_i18n_usearch_get_collator_p
+ITc_i18n_ucalendar_clone_p
+ITc_i18n_ucalendar_set_p
+ITc_i18n_ucalendar_set_default_timezone_p
+ITc_i18n_timezone_create_unknown_p
+ITc_i18n_timezone_create_gmt_p
+ITc_i18n_timezone_create_p
+ITc_i18n_timezone_count_equivalent_ids_p
+ITc_i18n_timezone_get_equivalent_id_p
+ITc_i18n_timezone_create_default_p
+ITc_i18n_timezone_set_default_p
+ITc_i18n_timezone_get_tzdata_version_p
+ITc_i18n_timezone_get_region_p
+ITc_i18n_timezone_get_offset_with_date_p
+ITc_i18n_timezone_set_get_raw_offset_p
+ITc_i18n_timezone_set_get_id_p
+ITc_i18n_timezone_get_display_name_p
+ITc_i18n_timezone_get_display_name_with_locale_p
+ITc_i18n_timezone_get_display_name_with_type_p
+ITc_i18n_timezone_get_display_name_with_type_locale_p
+ITc_i18n_timezone_use_daylight_time_p
+ITc_i18n_timezone_in_daylight_time_p
+ITc_i18n_timezone_has_same_rule_p
+ITc_i18n_timezone_clone_p
+ITc_i18n_timezone_get_dst_savings_p
+ITc_i18n_timezone_foreach_timezone_id_by_region_p
+ITc_i18n_timezone_foreach_timezone_id_p
+ITc_i18n_timezone_foreach_timezone_id_with_offset_p
+ITc_i18n_timezone_foreach_timezone_id_by_country_p
+ITc_audio_in_get_channel_p
+ITc_audio_in_get_sample_type_p
+ITc_audio_in_get_sample_rate_p
+ITc_audio_in_ignore_session_p
+ITc_audio_in_peek_drop_p
+ITc_audio_in_set_unset_stream_cb_p
+ITc_audio_out_prepare_unprepare_p
+ITc_audio_out_get_buffer_size_p
+ITc_audio_out_get_channel_p
+ITc_audio_out_get_sample_type_p
+ITc_audio_out_get_sample_rate_p
+ITc_audio_out_get_sound_type_p
+ITc_audio_out_ignore_session_p
+ITc_audio_out_write_p
+ITc_audio_out_set_unset_stream_cb_p
+ITc_audio_in_create_destroy_p
+ITc_audio_in_create_loopback_p
+ITc_audio_out_create_destroy_p
+ITc_tbm_surface_get_height_p
+ITc_tbm_surface_query_formats_p
+ITc_tbm_surface_get_info_p
+ITc_tbm_surface_get_format_p
+ITc_app_manager_foreach_app_context_p
+ITc_app_manager_foreach_app_info_p
+ITc_app_manager_get_app_context_p
+ITc_app_manager_get_app_id_p
+ITc_app_manager_get_app_info_p
+ITc_app_manager_is_running_p
+ITc_app_manager_resume_app_p
+ITc_app_manager_app_info_create_clone_destroy_p
+ITc_app_manager_app_info_filter_add_string_bool_count_p
+ITc_app_manager_app_info_filter_create_destroy_p
+ITc_app_manager_app_info_get_app_id_p
+ITc_app_manager_app_info_get_exec_p
+ITc_app_manager_app_info_get_icon_p
+ITc_app_manager_app_info_get_label_p
+ITc_app_manager_app_info_get_package_p
+ITc_app_manager_app_info_get_type_p
+ITc_app_manager_app_info_is_enabled_p
+ITc_app_manager_app_info_is_equal_p
+ITc_app_manager_app_info_is_nodisplay_p
+ITc_app_manager_app_info_is_onboot_p
+ITc_app_manager_app_info_is_preload_p
+ITc_app_manager_app_info_metadata_filter_create_add_destroy_p
+ITc_app_manager_app_context_clone_destroy_p
+ITc_app_manager_app_context_get_app_id_p
+ITc_app_manager_app_context_get_package_p
+ITc_app_manager_app_context_get_pid_p
+ITc_app_manager_app_context_is_terminated_p
+ITc_app_manager_app_context_is_equal_p
+ITc_app_manager_app_info_get_localed_label_p
+ITc_app_manager_get_shared_resource_path_p
+ITc_app_manager_get_shared_trusted_path_p
+ITc_app_manager_get_shared_data_path_p
+ITc_app_manager_get_external_shared_data_path_p
+ITc_package_manager_create_destroy_p
+ITc_package_manager_compare_app_cert_info_p
+ITc_package_manager_compare_package_cert_info_p
+ITc_package_manager_get_package_id_by_app_id_p
+ITc_package_manager_get_destroy_package_info_p
+ITc_package_manager_is_preload_package_by_app_id_p
+ITc_package_manager_get_permission_type_p
+ITc_package_manager_set_unset_event_cb_p
+ITc_package_info_clone_is_equal_p
+ITc_package_info_foreach_cert_info_p
+ITc_package_info_get_icon_p
+ITc_package_info_get_label_p
+ITc_package_info_get_package_p
+ITc_package_info_get_installed_storage_p
+ITc_package_info_get_type_p
+ITc_package_info_get_version_p
+ITc_package_info_is_accessible_p
+ITc_package_info_is_preload_package_p
+ITc_package_info_is_removable_package_p
+ITc_package_info_is_system_package_p
+ITc_package_info_get_root_path_p
+ITc_package_manager_set_event_status_p
+ITc_package_info_create_p
+ITc_package_manager_filter_create_destroy_p
+ITc_package_manager_filter_count_p
+ITc_package_manager_filter_add_bool_p
+ITc_bundle_AddByteGetByte_p
+ITc_bundle_AddStringGetString_p
+ITc_bundle_GetTypeofKeyValuesAndDelKeyValues_p
+ITc_bundle_KeyValTargetApis_p
+ITc_bundle_get_count_p
+ITc_tts_get_state_p
+ITc_tts_prepare_unprepare_p
+ITc_tts_setunset_state_changed_cb_p
+ITc_tts_get_max_text_size_p
+ITc_tts_get_speed_range_p
+ITc_tts_add_test_play_p
+ITc_tts_pause_stop_p
+ITc_tts_setunset_utterance_started_completed_cb_p
+ITc_tts_setunset_error_cb_p
+ITc_tts_setunset_default_voice_changed_cb_p
+ITc_tts_foreach_supported_voices_p
+ITc_smartcard_reader_get_name_p
+ITc_smartcard_reader_is_secure_element_present_p
+ITc_smartcard_reader_open_close_session_p
+ITc_smartcard_session_is_closed_p
+ITc_smartcard_session_get_reader_p
+ITc_smartcard_session_get_atr_p
+ITc_smartcard_session_open_basic_channel_close_channels_p
+ITc_smartcard_session_open_logical_channel_close_channels_p
+ITc_smartcard_channel_is_basic_channel_p
+ITc_smartcard_channel_close_is_closed_p
+ITc_smartcard_channel_get_select_response_p
+ITc_smartcard_channel_get_session_p
+ITc_smartcard_channel_select_next_p
+ITc_smartcard_channel_transmit_retrieve_response_p
+ITc_player_set_get_display_rotation_p
+ITc_player_set_display_visible_p
+ITc_player_get_album_art_p
+ITc_player_get_codec_info_p
+ITc_player_capture_video_p
+ITc_player_get_video_size_p
+ITc_player_get_video_stream_info_p
+ITc_player_set_unset_buffering_cb_p
+ITc_player_set_unset_error_cb_p
+ITc_player_set_unset_interrupted_cb_p
+ITc_player_set_unset_subtitle_updated_cb_p
+ITc_player_get_progressive_download_status_p
+ITc_player_get_streaming_download_progress_p
+ITc_player_set_unset_progressive_download_message_cb_p
+ITc_player_get_content_info_p
+ITc_player_set_memory_buffer_p
+ITc_player_set_get_audio_latency_mode_p
+ITc_player_set_get_display_mode_p
+ITc_player_get_duration_p
+ITc_player_set_get_volume_p
+ITc_player_set_looping_p
+ITc_player_set_mute_p
+ITc_player_pause_p
+ITc_player_set_playback_rate_p
+ITc_player_set_sound_type_p
+ITc_player_set_streaming_cookie_p
+ITc_player_set_streaming_user_agent_p
+ITc_player_audio_effect_equalizer_is_available_p
+ITc_player_audio_effect_get_equalizer_bands_count_p
+ITc_player_audio_effect_get_equalizer_band_frequency_range_p
+ITc_player_audio_effect_get_equalizer_band_frequency_p
+ITc_player_audio_effect_get_equalizer_level_range_p
+ITc_player_audio_effect_set_get_equalizer_band_level_p
+ITc_player_audio_effect_set_equalizer_all_bands_p
+ITc_player_audio_effect_equalizer_clear_p
+ITc_player_set_unset_completed_cb_p
+ITc_player_set_unset_media_packet_video_frame_decoded_cb_p
+ITc_player_prepare_async_p
+ITs_cairo_evas_gl_device_get_context_p
+ITc_bluetooth_adapter_bt_adapter_get_state_p
+ITc_bluetooth_adapter_bt_adapter_get_visibility_p
+ITc_bluetooth_adapter_bt_adapter_is_discovering_p
+ITc_bluetooth_adapter_bt_start_stop_device_discovery_p
+ITc_bluetooth_bt_initialize_deinitialize_p
+ITc_bluetooth_adapter_bt_adapter_set_unset_state_changed_cb_p
+ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_mode_changed_cb_p
+ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_duration_changed_cb_p
+ITc_bluetooth_adapter_bt_adapter_set_unset_device_discovery_state_changed_cb_p
+ITc_bluetooth_adapter_bt_adapter_is_service_used_p
+ITc_bluetooth_socket_bt_socket_create_destroy_rfcomm_p
+ITc_bluetooth_socket_bt_socket_listen_and_accept_rfcomm_p
+ITc_bluetooth_socket_bt_socket_set_unset_connection_requested_cb_p
+ITc_bluetooth_socket_bt_socket_set_unset_data_received_cb_p
+ITc_bluetooth_client_OPP_bt_opp_client_initialize_deinitialize_p
+ITc_bluetooth_client_OPP_bt_opp_client_add_file_clear_files_p
+ITc_bluetooth_server_OPP_bt_opp_server_initialize_deinitialize_connection_request_p
+ITc_bluetooth_server_OPP_bt_opp_server_set_destination_p
+ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p
+ITc_bluetooth_audio_bt_audio_set_unset_connection_state_changed_cb_p
+ITc_bluetooth_device_bt_device_set_unset_authorization_changed_cb_p
+ITc_bluetooth_device_bt_device_set_unset_bond_created_cb_p
+ITc_bluetooth_device_bt_device_set_unset_bond_destroyed_cb_p
+ITc_bluetooth_device_bt_device_set_unset_connection_state_changed_cb_p
+ITc_bluetooth_device_bt_device_set_unset_service_searched_cb_p
+ITc_bluetooth_socket_bt_socket_set_unset_connection_state_changed_cb_p
+ITc_bluetooth_adapter_bt_adapter_get_local_oob_data_p
+ITc_bluetooth_adapter_bt_adapter_le_create_destroy_advertiser_p
+ITc_radio_set_mute_muted_p
+ITc_radio_get_state_p
+ITc_radio_get_signal_strength_p
+ITc_radio_seek_up_down_p
+ITc_radio_scan_start_stop_p
+ITc_radio_set_unset_scan_completed_cb_p
+ITc_radio_set_unset_interrupted_cb_p
+ITc_push_service_get_notification_data_p
+ITc_push_service_get_notification_message_p
+ITc_push_service_get_notification_time_p
+ITc_push_service_get_notification_sender_p
+ITc_push_service_get_notification_session_info_p
+ITc_push_service_get_notification_request_id_p
+ITc_push_service_get_notification_type_p
+ITc_push_service_request_unread_notification_p
+ITc_push_service_get_unread_free_notification_p
+ITc_image_util_decode_jpeg_from_memory_p
+ITc_image_util_foreach_supported_jpeg_colorspace_p
+ITc_sound_manager_set_unset_volume_changed_cb_p
+ITc_sound_manager_set_unset_session_interrupted_cb_p
+ITc_sound_manager_set_get_media_session_option_p
+ITc_sound_manager_set_get_media_session_resumption_option_p
+ITc_sound_manager_set_unset_current_sound_type_p
+ITc_sound_manager_get_current_sound_type_p
+ITc_sound_manager_get_current_device_list_p
+ITc_sound_manager_get_next_device_p
+ITc_sound_manager_get_prev_device_p
+ITc_sound_manager_get_device_type_p
+ITc_sound_manager_get_device_io_direction_p
+ITc_sound_manager_get_device_id_p
+ITc_sound_manager_get_device_name_p
+ITc_sound_manager_get_device_state_p
+ITc_sound_manager_set_unset_device_connected_cb_p
+ITc_sound_manager_set_unset_device_information_changed_cb_p
+ITc_sound_manager_set_get_voip_session_mode_p
+ITc_recorder_start_cancel_p
+ITc_recorder_start_commit_p
+ITc_recorder_get_state_p
+ITc_recorder_pause_p
+ITc_recorder_setget_filename_p
+ITc_recorder_attr_setget_audio_channel_p
+ITc_recorder_attr_setget_audio_device_p
+ITc_recorder_attr_setget_audio_encoder_bitrate_p
+ITc_recorder_attr_setget_audio_samplerate_p
+ITc_recorder_attr_setget_orientation_tag_p
+ITc_recorder_attr_setget_recording_motion_rate_p
+ITc_recorder_attr_setget_size_limit_p
+ITc_recorder_attr_setget_time_limit_p
+ITc_recorder_attr_setget_video_encoder_bitrate_p
+ITc_recorder_setget_audio_encoder_p
+ITc_recorder_setget_video_encoder_p
+ITc_recorder_setget_video_resolution_p
+ITc_recorder_setget_file_format_p
+ITc_recorder_attr_mute_p
+ITc_recorder_get_audio_level_p
+ITc_recorder_setunset_interrupted_cb_p
+ITc_recorder_setunset_error_cb_p
+ITc_recorder_setunset_recording_limit_reached_cb_p
+ITc_recorder_setunset_recording_status_cb_p
+ITc_recorder_setunset_state_changed_cb_p
+ITc_recorder_setunset_audio_stream_cb_p
+ITc_recorder_foreach_supported_file_format_p
+ITc_recorder_foreach_supported_audio_encoder_p
+ITc_recorder_foreach_supported_video_encoder_p
+ITc_recorder_foreach_supported_video_resolution_p
+ITc_data_control_sql_data_control_sql_register_unregister_response_cb_p
+ITc_data_control_sql_data_control_sql_insert_delete_p
+ITc_data_control_sql_data_control_sql_update_select_p
+ITc_data_control_sql_data_control_sql_select_with_page_p
+ITc_data_control_sql_data_control_sql_get_blob_data_p
+ITc_data_control_sql_data_control_sql_get_int_data_p
+ITc_data_control_sql_data_control_sql_get_int64_data_p
+ITc_data_control_sql_data_control_sql_get_text_data_p
+ITc_data_control_sql_data_control_sql_get_double_data_p
+ITc_data_control_sql_data_control_sql_get_column_count_p
+ITc_data_control_sql_data_control_sql_get_column_item_size_p
+ITc_data_control_sql_data_control_sql_get_column_item_type_p
+ITc_data_control_sql_data_control_sql_get_column_name_p
+ITc_data_control_sql_data_control_sql_step_first_last_p
+ITc_data_control_sql_data_control_sql_step_next_previous_p
+ITc_data_control_map_data_control_map_destroy_create_p
+ITc_data_control_map_data_control_map_set_get_data_id_p
+ITc_data_control_map_data_control_map_set_get_provider_id_p
+ITc_data_control_map_data_control_map_register_unregister_response_cb_p
+ITc_data_control_map_data_control_map_add_remove_p
+ITc_data_control_map_data_control_map_set_get_p
+ITc_data_control_map_data_control_map_get_with_page_p
+ITc_data_control_provider_data_control_provider_create_delete_statement_p
+ITc_data_control_provider_data_control_provider_create_insert_statement_p
+ITc_data_control_provider_data_control_provider_create_update_statement_p
+ITc_data_control_provider_data_control_provider_create_select_statement_p
+ITc_data_control_provider_data_control_provider_sql_register_unregister_cb_p
+ITc_data_control_provider_data_control_provider_map_register_unregister_cb_p
+ITc_data_control_provider_data_control_provider_match_data_id_p
+ITc_data_control_provider_data_control_provider_match_provider_id_p
+ITc_privilege_info_get_display_name_by_pkgtype_p
+ITc_contacts_db_add_remove_changed_cb_p
+ITc_contacts_db_add_remove_status_changed_cb_p
+ITc_contacts_db_insert_delete_records_p
+ITc_contacts_db_insert_delete_record_p
+ITc_contacts_db_update_record_p
+ITc_contacts_db_get_record_p
+ITc_contacts_db_update_records_p
+ITc_contacts_db_replace_record_p
+ITc_contacts_db_get_count_p
+ITc_contacts_db_get_count_with_query_p
+ITc_contacts_db_get_current_version_p
+ITc_contacts_db_get_last_change_version_p
+ITc_contacts_db_get_records_with_query_p
+ITc_contacts_db_get_changes_by_version_p
+ITc_contacts_db_get_status_p
+ITc_contacts_db_replace_records_p
+ITc_contacts_db_search_records_p
+ITc_contacts_db_search_records_with_query_p
+ITc_contacts_db_search_records_with_range_p
+ITc_contacts_db_get_all_records_p
+ITc_contacts_sim_get_initialization_status_p
+ITc_contacts_sim_import_all_contacts_p
+ITc_contacts_setting_set_get_name_display_order_p
+ITc_contacts_setting_set_get_name_sorting_order_p
+ITc_contacts_setting_add_remove_name_display_order_changed_cb_p
+ITc_contacts_setting_add_remove_name_sorting_order_changed_cb_p
+ITc_contacts_vcard_get_entity_count_p
+ITc_contacts_vcard_make_from_contact_p
+ITc_contacts_vcard_make_from_my_profile_p
+ITc_contacts_vcard_make_from_person_p
+ITc_contacts_vcard_parse_to_contact_foreach_p
+ITc_contacts_vcard_parse_to_contacts_p
+ITc_contacts_query_create_destroy_p
+ITc_contacts_query_set_filter_p
+ITc_contacts_query_set_projection_p
+ITc_contacts_query_set_sort_p
+ITc_contacts_query_set_distinct_p
+ITc_contacts_phone_log_reset_statistics_p
+ITc_contacts_person_set_get_default_property_p01
+ITc_contacts_person_set_get_default_property_p02
+ITc_contacts_person_set_get_default_property_p03
+ITc_contacts_person_set_get_default_property_p04
+ITc_contacts_person_set_favorite_order_p
+ITc_contacts_person_link_unlink_person_p
+ITc_contacts_person_reset_usage_p
+ITc_contacts_record_create_destroy_p
+ITc_contacts_record_add_remove_child_record_p
+ITc_contacts_record_clone_p
+ITc_contacts_record_get_child_record_count_p
+ITc_contacts_record_get_child_record_at_p_p
+ITc_contacts_record_clone_child_record_list_p
+ITc_contacts_record_set_get_str_p
+ITc_contacts_record_set_get_int_p
+ITc_contacts_record_set_get_bool_p
+ITc_contacts_record_get_uri_p_p
+ITc_contacts_filter_create_destroy_p
+ITc_contacts_filter_add_bool_p
+ITc_contacts_filter_add_int_p
+ITc_contacts_filter_add_str_p
+ITc_contacts_filter_add_double_p
+ITc_contacts_filter_add_operator_p
+ITc_contacts_filter_add_filter_p
+ITc_contacts_list_create_destroy_p
+ITc_contacts_list_add_remove_p
+ITc_contacts_list_first_p
+ITc_contacts_list_last_p
+ITc_contacts_list_next_prev_p
+ITc_contacts_list_get_count_p
+ITc_contacts_list_get_current_record_p_p
+ITc_contacts_group_add_remove_contact_p
+ITc_contacts_group_set_group_order_p
+ITc_contacts_activity_delete_by_account_id_p
+ITc_contacts_activity_delete_by_contact_id_p
+ITc_application_app_get_external_data_path_p
+ITc_application_app_get_external_cache_path_p
+ITc_application_app_get_external_shared_data_path_p
+ITc_application_app_get_resource_path_p
+ITc_application_app_get_shared_data_path_p
+ITc_application_app_get_shared_resource_path_p
+ITc_application_app_get_shared_trusted_path_p
+ITc_application_app_get_id_p
+ITc_application_app_get_version_p
+ITc_application_app_get_name_p
+ITc_application_app_get_device_orientation_p
+ITc_application_app_control_CreateDestroy_p
+ITc_application_app_control_SetGetOperation_p
+ITc_application_app_control_SetGetAppID_p
+ITc_application_app_control_SetGetUri_p
+ITc_application_app_control_SetGetMime_p
+ITc_application_app_control_SetGetCategory_p
+ITc_application_app_control_Add_Get_ExtraData_p
+ITc_application_app_control_Add_Get_ExtraDataArray_p
+ITc_application_app_control_Is_ExtraDataArray_p
+ITc_application_app_control_Clone_p
+ITc_application_app_control_Remove_ExtraData_p
+ITc_application_app_control_Send_Launch_Terminate_Request_p
+ITc_application_app_control_For_Each_App_Matched_p
+ITc_application_app_control_For_Each_Extra_Data_p
+ITc_application_internationalization_i18n_get_text_p
+ITc_application_alarm_schedule_after_delay_p
+ITc_application_alarm_schedule_at_date_p
+ITc_application_alarm_schedule_with_recurrence_week_flag_p
+ITc_application_alarm_foreach_registered_alarm_p
+ITc_application_alarm_get_app_control_p
+ITc_application_alarm_get_scheduled_period_p
+ITc_application_alarm_get_scheduled_date_p
+ITc_application_alarm_get_scheduled_recurrence_week_flag_p
+ITc_application_alarm_cancel_p
+ITc_application_alarm_cancel_all_p
+ITc_application_alarm_get_current_time_p
+ITc_mediacodec_set_adec_info_p
+ITc_mediacodec_set_aenc_info_p
+ITc_mediacodec_set_vdec_info_p
+ITc_mediacodec_set_codec_p
+ITc_mediacodec_process_input_p
+ITc_mediacodec_get_output_p
+ITc_mediacodec_set_unset_error_cb_p
+ITc_mediacodec_set_eos_cb_p
+ITc_mediacodec_set_unset_input_buffer_used_cb_p
+ITc_mediacodec_set_unset_output_buffer_available_cb_p
+ITc_activity_get_accuracy_p
+ITc_gesture_is_supported_p
+ITc_gesture_create_release_p
+ITc_gesture_start_stop_recognition_p
+ITc_gesture_get_event_p
+ITc_message_port_check_trusted_remote_port_p
+ITc_message_port_send_message_p
+ITc_message_port_send_message_with_local_port_p
+ITc_connection_get_type_p
+ITc_connection_get_proxy_p
+ITc_connection_get_ip_address_p
+ITc_connection_get_statistics_p
+ITc_connection_get_current_profile_p
+ITc_connection_reset_statistics_p
+ITc_connection_get_destroy_profile_iterator_p
+ITc_connection_profile_iterator_has_next_next_p
+ITc_connection_set_unset_type_changed_cb_p
+ITc_connection_set_unset_ip_address_changed_cb_p
+ITc_connection_set_unset_proxy_address_changed_cb_p
+ITc_connection_profile_create_destroy_p
+ITc_connection_profile_get_name_p
+ITc_connection_profile_get_id_p
+ITc_connection_profile_get_type_p
+ITc_connection_profile_get_network_interface_name_p
+ITc_connection_profile_clone_p
+ITc_connection_profile_set_get_cellular_apn_p
+ITc_connection_profile_set_get_cellular_auth_info_p
+ITc_connection_profile_set_get_cellular_home_url_p
+ITc_connection_profile_set_get_cellular_service_type_p
+ITc_connection_profile_is_cellular_roaming_p
+ITc_connection_profile_get_state_p
+ITc_connection_profile_set_get_dns_address_p
+ITc_connection_profile_set_get_gateway_p
+ITc_connection_profile_set_get_ip_address_p
+ITc_connection_profile_set_get_ip_config_type_p
+ITc_connection_profile_set_get_proxy_type_p
+ITc_connection_profile_set_get_proxy_address_p
+ITc_connection_profile_set_get_subnet_mask_p
+ITc_connection_profile_set_unset_state_changed_cb_p
+ITc_connection_open_close_profile_p
+ITc_connection_profile_refresh_p
+ITc_connection_profile_is_cellular_editable_p
+ITc_connection_profile_is_cellular_hidden_p
+ITc_connection_get_cellular_state_p
+ITc_connection_set_get_default_cellular_service_profile_p
+ITc_connection_set_default_cellular_service_profile_async_p
+ITc_connection_reset_profile_p
+ITc_connection_profile_is_cellular_default_p
+ITc_connection_add_remove_profile_p
+ITc_connection_profile_get_wifi_bssid_p
+ITc_connection_profile_get_wifi_essid_p
+ITc_connection_profile_get_wifi_frequency_p
+ITc_connection_profile_get_wifi_max_speed_p
+ITc_connection_profile_get_wifi_rssi_p
+ITc_connection_profile_get_wifi_security_type_p
+ITc_connection_profile_get_wifi_encryption_type_p
+ITc_connection_profile_is_wifi_passphrase_required_p
+ITc_connection_profile_is_wifi_wps_supported_p
+ITc_connection_profile_set_wifi_passphrase_p
+ITc_connection_update_profile_p
+ITc_connection_get_wifi_state_p
+ITc_media_format_set_video_mime_p
+ITc_media_format_set_video_width_p
+ITc_media_format_set_video_height_p
+ITc_media_format_set_video_avg_bps_p
+ITc_media_format_set_video_max_bps_p
+ITc_media_format_get_video_info_p
+ITc_media_format_set_audio_mime_p
+ITc_media_format_set_audio_channel_p
+ITc_media_format_set_audio_samplerate_p
+ITc_media_format_set_audio_bit_p
+ITc_media_format_set_audio_avg_bps_p
+ITc_media_format_get_audio_info_p
+ITc_media_packet_create_p
+ITc_media_packet_copy_p
+ITc_media_packet_alloc_p
+ITc_media_packet_create_alloc_p
+ITc_media_packet_get_buffer_data_ptr_p
+ITc_media_packet_is_video_p
+ITc_media_packet_is_audio_p
+ITc_media_packet_is_codec_config_p
+ITc_media_packet_is_encoded_p
+ITc_media_packet_is_end_of_stream_p
+ITc_media_packet_is_raw_p
+ITc_media_packet_is_sync_frame_p
+ITc_media_packet_set_get_format_p
+ITc_media_packet_set_get_pts_p
+ITc_media_packet_set_get_dts_p
+ITc_media_packet_set_get_duration_p
+ITc_media_packet_set_get_buffer_size_p
+ITc_media_packet_set_get_extra_p
+ITc_media_packet_set_unset_flags_p
+ITc_media_packet_get_tbm_surface_p
+ITc_media_packet_create_from_tbm_surface_p
+ITc_media_packet_has_tbm_surface_buffer_p
+ITc_location_manager_get_accessibility_state_p
+ITc_location_manager_get_accuracy_p
+ITc_location_manager_get_distance_p
+ITc_location_manager_get_last_accuracy_p
+ITc_location_manager_get_last_location_p
+ITc_location_manager_get_last_position_p
+ITc_location_manager_get_last_velocity_p
+ITc_location_manager_get_location_p
+ITc_location_manager_get_is_supported_method_p
+ITc_location_manager_get_position_p
+ITc_location_manager_get_velocity_p
+ITc_location_manager_add_remove_boundary_p
+ITc_location_manager_set_unset_position_updated_cb_p
+ITc_location_manager_set_unset_velocity_updated_cb
+ITc_location_manager_set_unset_zone_changed_cb_p
+ITc_location_manager_foreach_boundary_p
+ITc_location_manager_set_unset_setting_changed_cb_p
+ITc_location_manager_is_enabled_method_p
+ITc_location_bounds_create_destory_rect_p
+ITc_location_bounds_get_rect_coords_p
+ITc_location_bounds_create_destory_circle_p
+ITc_location_bounds_get_circle_coords_p
+ITc_location_bounds_create_destory_polygon_p
+ITc_location_bounds_set_unset_state_changed_cb_p
+ITc_location_bounds_foreach_polygon_coords_p
+ITc_location_bounds_contains_coordinates_p
+ITc_location_bounds_get_type_p
+ITc_gps_status_get_satellite_p
+ITc_gps_status_get_last_satellite_p
+ITc_gps_status_foreach_last_satellites_in_view_p
+ITc_gps_status_foreach_satellites_in_view_p
+ITc_gps_status_set_unset_satellite_updated_cb_p
+ITc_libstorage_get_directory_p
+ITc_libstorage_get_root_directory_p
+ITc_libstorage_get_type_p
+ITc_libstorage_get_state_p
+ITc_libstorage_get_total_space_p
+ITc_libstorage_get_available_space_p
+ITc_libstorage_set_unset_state_changed_cb_p
\ No newline at end of file
diff --git a/custom_tclist/Emulator.tclist b/custom_tclist/Emulator.tclist
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/custom_tclist/Null.list b/custom_tclist/Null.list
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/exclude.list b/exclude.list
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/media/sound_5.wav b/media/sound_5.wav
new file mode 100755 (executable)
index 0000000..fc87fb0
Binary files /dev/null and b/media/sound_5.wav differ
diff --git a/media/tct-content-tizen-tests_audio_default.mp3 b/media/tct-content-tizen-tests_audio_default.mp3
new file mode 100755 (executable)
index 0000000..c41d536
Binary files /dev/null and b/media/tct-content-tizen-tests_audio_default.mp3 differ
diff --git a/media/tct-content-tizen-tests_image_default.jpg b/media/tct-content-tizen-tests_image_default.jpg
new file mode 100755 (executable)
index 0000000..c090428
Binary files /dev/null and b/media/tct-content-tizen-tests_image_default.jpg differ
diff --git a/media/tct-content-tizen-tests_video.mp4 b/media/tct-content-tizen-tests_video.mp4
new file mode 100755 (executable)
index 0000000..e203ae2
Binary files /dev/null and b/media/tct-content-tizen-tests_video.mp4 differ
diff --git a/packaging/ctc/native-audio-io-ctc.spec b/packaging/ctc/native-audio-io-ctc.spec
new file mode 100755 (executable)
index 0000000..d9171f2
--- /dev/null
@@ -0,0 +1,54 @@
+%define MODULE_NAME audio-io
+%define MODULE_LIBNAME capi-media-audio-io
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/ctc/native-audio-io-ctc.xml b/packaging/ctc/native-audio-io-ctc.xml
new file mode 100755 (executable)
index 0000000..2056b5b
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-audio-io-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeAudioIoTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.audio-io-ctc" exec="/opt/usr/apps/native-audio-io-ctc/bin/tct-audio-io-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/recorder</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/ctc/native-camera-ctc.spec b/packaging/ctc/native-camera-ctc.spec
new file mode 100755 (executable)
index 0000000..d81a98f
--- /dev/null
@@ -0,0 +1,56 @@
+%define MODULE_NAME camera
+%define MODULE_LIBNAME capi-media-camera
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/ctc/native-camera-ctc.xml b/packaging/ctc/native-camera-ctc.xml
new file mode 100755 (executable)
index 0000000..abf87c8
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-camera-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeCameraTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.camera-ctc" exec="/opt/usr/apps/native-camera-ctc/bin/tct-camera-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+               <privilege>http://tizen.org/privilege/camera</privilege>
+       </privileges>
+</manifest>
diff --git a/packaging/ctc/native-connection-ctc.spec b/packaging/ctc/native-connection-ctc.spec
new file mode 100755 (executable)
index 0000000..5c50e2b
--- /dev/null
@@ -0,0 +1,57 @@
+%define MODULE_NAME connection
+%define MODULE_LIBNAME capi-network-connection
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:         pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-system-runtime-info)
+BuildRequires:  pkgconfig(capi-network-wifi)
+BuildRequires: pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/ctc/native-connection-ctc.xml b/packaging/ctc/native-connection-ctc.xml
new file mode 100755 (executable)
index 0000000..0683928
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-connection-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeConnectionTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.connection-ctc" exec="/opt/usr/apps/native-connection-ctc/bin/tct-connection-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+               <privilege>http://tizen.org/privilege/network.get</privilege>
+               <privilege>http://tizen.org/privilege/network.set</privilege>
+               <privilege>http://tizen.org/privilege/network.profile</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/ctc/native-device-ctc.spec b/packaging/ctc/native-device-ctc.spec
new file mode 100755 (executable)
index 0000000..554d0ab
--- /dev/null
@@ -0,0 +1,52 @@
+%define MODULE_NAME device
+%define MODULE_LIBNAME capi-system-device
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/ctc/native-device-ctc.xml b/packaging/ctc/native-device-ctc.xml
new file mode 100755 (executable)
index 0000000..444d67c
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-device-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeDeviceTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.device-ctc" exec="/opt/usr/apps/native-device-ctc/bin/tct-device-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/display</privilege>
+               <privilege>http://tizen.org/privilege/haptic</privilege>
+               <privilege>http://tizen.org/privilege/led</privilege>
+       </privileges>
+</manifest>
diff --git a/packaging/ctc/native-filesystem-permission-ctc.spec b/packaging/ctc/native-filesystem-permission-ctc.spec
new file mode 100755 (executable)
index 0000000..736e904
--- /dev/null
@@ -0,0 +1,56 @@
+%define MODULE_NAME filesystem-permission
+%define MODULE_LIBNAME storage
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(tts)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/ctc/native-filesystem-permission-ctc.xml b/packaging/ctc/native-filesystem-permission-ctc.xml
new file mode 100755 (executable)
index 0000000..cca7572
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-filesystem-permission-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeFilesystemPermissionTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.filesystem-permission-ctc" exec="/opt/usr/apps/native-filesystem-permission-ctc/bin/tct-filesystem-permission-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+               <privilege>http://tizen.org/privilege/mediastorage</privilege>
+               <privilege>http://tizen.org/privilege/externalstorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/ctc/native-image-util-ctc.spec b/packaging/ctc/native-image-util-ctc.spec
new file mode 100755 (executable)
index 0000000..3736ad9
--- /dev/null
@@ -0,0 +1,59 @@
+%define MODULE_NAME image-util
+%define MODULE_LIBNAME capi-media-image-util
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/
+cp %{_builddir}/%{name}-%{version}/src/ctc/image-util/ImageUtil_sample.jpg %{buildroot}%{APP_PATH}%{name}/data/ImageUtil_sample.jpg
+
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/ctc/native-image-util-ctc.xml b/packaging/ctc/native-image-util-ctc.xml
new file mode 100755 (executable)
index 0000000..8e8df5a
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-image-util-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeImageUtilTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.image-util-ctc" exec="/opt/usr/apps/native-image-util-ctc/bin/tct-image-util-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+       <privilege>http://tizen.org/privilege/imageutil</privilege>
+       <privilege>http://tizen.org/privilege/mediastorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/ctc/native-libstorage-ctc.spec b/packaging/ctc/native-libstorage-ctc.spec
new file mode 100755 (executable)
index 0000000..185f8c5
--- /dev/null
@@ -0,0 +1,54 @@
+%define MODULE_NAME libstorage
+%define MODULE_LIBNAME storage
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/ctc/native-libstorage-ctc.xml b/packaging/ctc/native-libstorage-ctc.xml
new file mode 100755 (executable)
index 0000000..00294fa
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-libstorage-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeLibstorageTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.libstorage-ctc" exec="/opt/usr/apps/native-libstorage-ctc/bin/tct-libstorage-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+               <privilege>http://tizen.org/privilege/mediastorage</privilege>
+               <privilege>http://tizen.org/privilege/externalstorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/ctc/native-location-manager-ctc.spec b/packaging/ctc/native-location-manager-ctc.spec
new file mode 100755 (executable)
index 0000000..2b4010e
--- /dev/null
@@ -0,0 +1,58 @@
+%define MODULE_NAME location-manager
+%define MODULE_LIBNAME capi-location-manager
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(gthread-2.0)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  cmake
+BuildRequires:         pkgconfig(bundle)
+BuildRequires:  pkgconfig(location)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/ctc/native-location-manager-ctc.xml b/packaging/ctc/native-location-manager-ctc.xml
new file mode 100755 (executable)
index 0000000..d55c022
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-location-manager-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeLocationManagerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.location-manager-ctc" exec="/opt/usr/apps/native-location-manager-ctc/bin/tct-location-manager-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+               <privilege>http://tizen.org/privilege/systeminfo</privilege>
+               <privilege>http://tizen.org/privilege/location</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/ctc/native-opengl-ctc.spec b/packaging/ctc/native-opengl-ctc.spec
new file mode 100755 (executable)
index 0000000..f1993eb
--- /dev/null
@@ -0,0 +1,73 @@
+%define MODULE_NAME opengl
+%define MODULE_LIBNAME elementary
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(edje)
+BuildRequires:  pkgconfig(embryo)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(utilX)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(appcore-common)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-appfw-app-manager)
+BuildRequires:  pkgconfig(capi-content-media-content)
+BuildRequires:  pkgconfig(capi-media-player)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(x11)
+BuildRequires:  efl-assist-devel
+BuildRequires:  gettext-tools
+BuildRequires:  edje-bin, embryo-bin
+BuildRequires:  pkgconfig(icu-i18n)
+BuildRequires:  hash-signer
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/ctc/native-opengl-ctc.xml b/packaging/ctc/native-opengl-ctc.xml
new file mode 100755 (executable)
index 0000000..aa8dff4
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-opengl-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeOpenglTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.opengl-ctc" exec="/opt/usr/apps/native-opengl-ctc/bin/tct-opengl-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/ctc/native-platform-permission-ctc.spec b/packaging/ctc/native-platform-permission-ctc.spec
new file mode 100755 (executable)
index 0000000..7686677
--- /dev/null
@@ -0,0 +1,138 @@
+%define MODULE_NAME platform-permission
+%define MODULE_LIBNAME capi-media-camera
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(sqlite3)
+BuildRequires:  pkgconfig(db-util)
+BuildRequires:  pkgconfig(deviced)
+BuildRequires:  pkgconfig(security-server)
+BuildRequires:  pkgconfig(appcore-common)
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(pkgmgr-info)
+BuildRequires:  pkgconfig(appsvc)
+BuildRequires:  pkgconfig(alarm-service)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(privacy-manager-client)
+BuildRequires:  pkgconfig(shortcut)
+BuildRequires:  pkgconfig(libsmack)
+BuildRequires:  pkgconfig(capi-network-wifi)
+BuildRequires:  pkgconfig(capi-network-connection)
+BuildRequires:  pkgconfig(capi-content-media-content)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-system-runtime-info)
+BuildRequires:  pkgconfig(capi-location-manager)
+BuildRequires:  pkgconfig(capi-network-bluetooth)
+BuildRequires:  pkgconfig(tapi)
+BuildRequires:  pkgconfig(capi-web-url-download)
+BuildRequires:  pkgconfig(capi-system-device)
+BuildRequires:  pkgconfig(capi-telephony)
+BuildRequires:  pkgconfig(capi-media-recorder)
+BuildRequires:  pkgconfig(capi-appfw-package-manager)
+BuildRequires:  pkgconfig(capi-appfw-app-manager)
+BuildRequires:  pkgconfig(capi-system-system-settings)
+BuildRequires:  pkgconfig(capi-media-sound-manager)
+BuildRequires:  pkgconfig(contacts-service2)
+BuildRequires:  pkgconfig(capi-messaging-messages)
+BuildRequires:  pkgconfig(msg-service)
+BuildRequires:  pkgconfig(push)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(ecore-evas)
+BuildRequires:  pkgconfig(ecore-x)
+BuildRequires:  pkgconfig(notification)
+BuildRequires:  pkgconfig(key-manager)
+BuildRequires:  pkgconfig(capi-media-player)
+BuildRequires:  pkgconfig(capi-system-sensor)
+BuildRequires:  pkgconfig(capi-media-wav-player)
+BuildRequires:  pkgconfig(capi-network-wifi-direct)
+BuildRequires: pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-data-control)
+BuildRequires:  pkgconfig(capi-message-port)
+BuildRequires:  pkgconfig(capi-media-audio-io)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-appfw-app-control)
+BuildRequires:  pkgconfig(capi-network-nfc)
+BuildRequires:  pkgconfig(badge)
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(dbus-glib-1)
+BuildRequires:  cmake
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix} 
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/
+cp %{_builddir}/%{name}-%{version}/src/ctc/%{MODULE_NAME}/native-platform-permission-ctc-0.1-0.armv7l.rpm %{buildroot}%{APP_PATH}%{name}/data/native-platform-permission-ctc-0.1-0.armv7l.rpm
+
+
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+mkdir -p %{buildroot}/opt/usr/media/Images
+cp src/ctc/%{MODULE_NAME}/PlatformPermission_test.jpg %{buildroot}/opt/usr/media/Images/PlatformPermission_test.jpg
+
+%ifarch armv7l
+cp %{_builddir}/%{name}-%{version}/src/ctc/%{MODULE_NAME}/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm %{buildroot}/tmp/
+cp %{_builddir}/%{name}-%{version}/src/ctc/%{MODULE_NAME}/org.tizen.testapplication-1.0.0-arm.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testapplication-1.0.0-arm.tpk
+%else
+cp %{_builddir}/%{name}-%{version}/src/ctc/%{MODULE_NAME}/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm %{buildroot}/tmp/
+cp %{_builddir}/%{name}-%{version}/src/ctc/%{MODULE_NAME}/org.tizen.testapplication-1.0.0-i386.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testapplication-1.0.0-i386.tpk
+%endif
+
+
+
+%pre
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%ifarch armv7l
+pkgcmd -i -q -t rpm -p /tmp/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm &
+%else
+pkgcmd -i -q -t rpm -p /tmp/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm &
+%endif
+
+
+%postun
+pkgcmd -u -n org.tizen.datacontrolprovider &
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
+/opt/usr/media/*
+
+
+%ifarch i586
+/tmp/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm
+%else
+/tmp/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm
+%endif
diff --git a/packaging/ctc/native-platform-permission-ctc.xml b/packaging/ctc/native-platform-permission-ctc.xml
new file mode 100755 (executable)
index 0000000..5d338b7
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-platform-permission-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativePlatformPermissionTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.platform-permission-ctc" exec="/opt/usr/apps/native-platform-permission-ctc/bin/tct-platform-permission-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/ctc/native-player-ctc.spec b/packaging/ctc/native-player-ctc.spec
new file mode 100755 (executable)
index 0000000..dc97cf4
--- /dev/null
@@ -0,0 +1,62 @@
+%define MODULE_NAME player
+%define MODULE_LIBNAME capi-media-player
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-runtime-info)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(gthread-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-appfw-app-manager)
+BuildRequires: pkgconfig(capi-base-common)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/
+cp src/ctc/player/MediaPlayer.mp3 %{buildroot}%{APP_PATH}%{name}/data/MediaPlayer.mp3
+
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/ctc/native-player-ctc.xml b/packaging/ctc/native-player-ctc.xml
new file mode 100755 (executable)
index 0000000..5d4e3e3
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-player-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativePlayerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.player-ctc" exec="/opt/usr/apps/native-player-ctc/bin/tct-player-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+     <privileges>
+               <privilege>http://tizen.org/privilege/recorder</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/ctc/native-runtime-info-ctc.spec b/packaging/ctc/native-runtime-info-ctc.spec
new file mode 100755 (executable)
index 0000000..0a78b3a
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME runtime-info
+%define MODULE_LIBNAME capi-system-runtime-info
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/ctc/native-runtime-info-ctc.xml b/packaging/ctc/native-runtime-info-ctc.xml
new file mode 100755 (executable)
index 0000000..baa41af
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-runtime-info-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeRuntimeInfoTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.runtime-info-ctc" exec="/opt/usr/apps/native-runtime-info-ctc/bin/tct-runtime-info-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/ctc/native-sensor-ctc.spec b/packaging/ctc/native-sensor-ctc.spec
new file mode 100755 (executable)
index 0000000..7157cc5
--- /dev/null
@@ -0,0 +1,55 @@
+%define MODULE_NAME sensor
+%define MODULE_LIBNAME  capi-system-sensor
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/ctc/native-sensor-ctc.xml b/packaging/ctc/native-sensor-ctc.xml
new file mode 100755 (executable)
index 0000000..56aafa4
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-sensor-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeSensorTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.sensor-ctc" exec="/opt/usr/apps/native-sensor-ctc/bin/tct-sensor-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+       <privilege>http://tizen.org/privilege/healthinfo</privilege>       
+    </privileges>
+</manifest>
diff --git a/packaging/ctc/native-sound-manager-ctc.spec b/packaging/ctc/native-sound-manager-ctc.spec
new file mode 100755 (executable)
index 0000000..ff40a08
--- /dev/null
@@ -0,0 +1,55 @@
+%define MODULE_NAME sound-manager
+%define MODULE_LIBNAME capi-media-sound-manager
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-media-player)
+BuildRequires:  pkgconfig(capi-media-tone-player)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/ctc/native-sound-manager-ctc.xml b/packaging/ctc/native-sound-manager-ctc.xml
new file mode 100755 (executable)
index 0000000..895e4c5
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-sound-manager-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeSoundManagerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.sound-manager-ctc" exec="/opt/usr/apps/native-sound-manager-ctc/bin/tct-sound-manager-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/ctc/native-system-info-ctc.spec b/packaging/ctc/native-system-info-ctc.spec
new file mode 100755 (executable)
index 0000000..6c50e67
--- /dev/null
@@ -0,0 +1,55 @@
+%define MODULE_NAME system-info
+%define MODULE_LIBNAME capi-system-info
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/ctc/native-system-info-ctc.xml b/packaging/ctc/native-system-info-ctc.xml
new file mode 100755 (executable)
index 0000000..5001fac
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-system-info-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeSystemInfoTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.system-info-ctc" exec="/opt/usr/apps/native-system-info-ctc/bin/tct-system-info-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/ctc/native-telephony-ctc.spec b/packaging/ctc/native-telephony-ctc.spec
new file mode 100755 (executable)
index 0000000..6fed261
--- /dev/null
@@ -0,0 +1,56 @@
+%define MODULE_NAME telephony
+%define MODULE_LIBNAME capi-telephony
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatibility Test (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-messaging-messages)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(capi-base-common)
+
+%description
+Core API Compatibility Test (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/native-%{MODULE_NAME}-ctc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+%post
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-ctc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/ctc/native-telephony-ctc.xml b/packaging/ctc/native-telephony-ctc.xml
new file mode 100755 (executable)
index 0000000..d6fa76c
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-telephony-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeTelephonyTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.telephony-ctc" exec="/opt/usr/apps/native-telephony-ctc/bin/tct-telephony-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+     <privileges>
+               <privilege>http://tizen.org/privilege/mediastorage</privilege>
+               <privilege>http://tizen.org/privilege/telephony</privilege>
+               <privilege>http://tizen.org/privilege/message.read</privilege>
+               <privilege>http://tizen.org/privilege/message.write</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-app-manager-itc.spec b/packaging/itc/native-app-manager-itc.spec
new file mode 100755 (executable)
index 0000000..c01ddba
--- /dev/null
@@ -0,0 +1,72 @@
+%define MODULE_NAME app-manager
+%define MODULE_LIBNAME capi-appfw-app-manager
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  pkgconfig(aul)
+BuildRequires:  pkgconfig(ail)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+cp scripts/appmanagerinstall.sh %{buildroot}%{APP_PATH}%{name}/data/
+%ifarch armv7l
+cp src/itc/app-manager/org.tizen.appmanagertestfile-1.0.0-arm.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.appmanagertestfile-1.0.0-arm.tpk
+cp src/itc/app-manager/org.tizen.testapplication-1.0.0-arm.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testapplication-1.0.0-arm.tpk
+%else
+cp src/itc/app-manager/org.tizen.appmanagertestfile-1.0.0-i386.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.appmanagertestfile-1.0.0-i386.tpk
+cp src/itc/app-manager/org.tizen.testapplication-1.0.0-i386.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testapplication-1.0.0-i386.tpk
+%endif
+
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+
+%postun
+pkgcmd -un  org.tizen.appmanagertestfile
+pkgcmd -un  org.tizen.testapplication
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/itc/native-app-manager-itc.xml b/packaging/itc/native-app-manager-itc.xml
new file mode 100755 (executable)
index 0000000..c885a1a
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-app-manager-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeAppManagerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.app-manager-itc" exec="/opt/usr/apps/native-app-manager-itc/bin/tct-app-manager-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+               <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+       </privileges>
+</manifest>
diff --git a/packaging/itc/native-appcore-agent-itc.spec b/packaging/itc/native-appcore-agent-itc.spec
new file mode 100755 (executable)
index 0000000..8abc058
--- /dev/null
@@ -0,0 +1,52 @@
+%define MODULE_NAME appcore-agent
+%define MODULE_LIBNAME appcore-agent
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-service-application)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-appfw-application)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-appcore-agent-itc.xml b/packaging/itc/native-appcore-agent-itc.xml
new file mode 100755 (executable)
index 0000000..c8a5e18
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-appcore-agent-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeAppcoreAgentTest</label>
+    <author email="test@samsung.com" href="www.samsung.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.appcore-agent-itc" exec="/opt/usr/apps/native-appcore-agent-itc/bin/tct-appcore-agent-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-appcore-watch-itc.spec b/packaging/itc/native-appcore-watch-itc.spec
new file mode 100755 (executable)
index 0000000..932736c
--- /dev/null
@@ -0,0 +1,52 @@
+%define MODULE_NAME appcore-watch
+%define MODULE_LIBNAME appcore-watch
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(capi-appfw-watch-application)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-appcore-watch-itc.xml b/packaging/itc/native-appcore-watch-itc.xml
new file mode 100755 (executable)
index 0000000..09e3cf5
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-appcore-watch-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreAppcoreWatchTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.appcore-watch-itc" exec="/opt/usr/apps/native-appcore-watch-itc/bin/tct-appcore-watch-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-appcore-widget-itc.spec b/packaging/itc/native-appcore-widget-itc.spec
new file mode 100755 (executable)
index 0000000..eb1fae2
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME appcore-widget
+%define MODULE_LIBNAME capi-appfw-widget-application
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(widget_viewer)
+BuildRequires:  pkgconfig(widget_viewer_evas)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-appcore-widget-itc.xml b/packaging/itc/native-appcore-widget-itc.xml
new file mode 100755 (executable)
index 0000000..9eba182
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-appcore-widget-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreAppcoreWatchTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.appcore-widget-itc" exec="/opt/usr/apps/native-appcore-widget-itc/bin/tct-appcore-widget-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-application-itc.spec b/packaging/itc/native-application-itc.spec
new file mode 100755 (executable)
index 0000000..2d0606a
--- /dev/null
@@ -0,0 +1,68 @@
+%define MODULE_NAME application
+%define MODULE_LIBNAME capi-appfw-application
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(capi-appfw-alarm)
+BuildRequires:  pkgconfig(capi-appfw-preference)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+%ifarch armv7l
+cp src/itc/application/org.tizen.testapplication-1.0.0-arm.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testapplication-1.0.0-arm.tpk
+%else
+cp src/itc/application/org.tizen.testapplication-1.0.0-i386.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testapplication-1.0.0-i386.tpk
+%endif
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%ifarch armv7l
+pkgcmd -i -q -t tpk -p %{APP_PATH}%{name}/data/org.tizen.testapplication-1.0.0-arm.tpk &
+%else
+pkgcmd -i -q -t tpk -p %{APP_PATH}%{name}/data/org.tizen.testapplication-1.0.0-i386.tpk &
+%endif
+
+%postun
+pkgcmd -un org.tizen.testapplication &
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-application-itc.xml b/packaging/itc/native-application-itc.xml
new file mode 100755 (executable)
index 0000000..2bf274c
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-application-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreApplicationTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.application-itc" exec="/opt/usr/apps/native-application-itc/bin/tct-application-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+       <label>CoreApplicationTest</label>
+    </ui-application>
+       <privileges>
+    <privilege>http://tizen.org/privilege/alarm.set</privilege>
+       <privilege>http://tizen.org/privilege/alarm.get</privilege>
+       <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-audio-io-itc.spec b/packaging/itc/native-audio-io-itc.spec
new file mode 100755 (executable)
index 0000000..0ac5016
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME audio-io
+%define MODULE_LIBNAME capi-media-audio-io
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/itc/native-audio-io-itc.xml b/packaging/itc/native-audio-io-itc.xml
new file mode 100755 (executable)
index 0000000..6a76917
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-audio-io-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeAudioIoTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.audio-io-itc" exec="/opt/usr/apps/native-audio-io-itc/bin/tct-audio-io-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/recorder</privilege>
+               <privilege>http://tizen.org/privilege/native/recorder</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-badge-itc.spec b/packaging/itc/native-badge-itc.spec
new file mode 100755 (executable)
index 0000000..213f161
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME badge
+%define MODULE_LIBNAME badge
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-badge-itc.xml b/packaging/itc/native-badge-itc.xml
new file mode 100755 (executable)
index 0000000..8e68a53
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-badge-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeBadgeTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.badge-itc" exec="/opt/usr/apps/native-badge-itc/bin/tct-badge-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+    <privilege>http://tizen.org/privilege/badge</privilege>
+       <privilege>http://tizen.org/privilege/notification</privilege>
+    </privileges>      
+</manifest>
diff --git a/packaging/itc/native-base-utils-itc.spec b/packaging/itc/native-base-utils-itc.spec
new file mode 100755 (executable)
index 0000000..791d2fc
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME base-utils
+%define MODULE_LIBNAME capi-base-utils-i18n
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-base-utils-itc.xml b/packaging/itc/native-base-utils-itc.xml
new file mode 100755 (executable)
index 0000000..2396861
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-base-utils-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>nativeBaseUtilsTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>native API test Application</description>
+    <ui-application appid="native.base-utils-itc" exec="/opt/usr/apps/native-base-utils-itc/bin/tct-base-utils-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-bluetooth-itc.spec b/packaging/itc/native-bluetooth-itc.spec
new file mode 100755 (executable)
index 0000000..3b4b30f
--- /dev/null
@@ -0,0 +1,56 @@
+%define MODULE_NAME bluetooth
+%define MODULE_LIBNAME capi-network-bluetooth
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(storage)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+cp src/itc/bluetooth/TestFile.vcf %{buildroot}%{APP_PATH}%{name}/data/TestFile.vcf
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-bluetooth-itc.xml b/packaging/itc/native-bluetooth-itc.xml
new file mode 100755 (executable)
index 0000000..a8f03b9
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-bluetooth-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeBluetoothTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.bluetooth-itc" exec="/opt/usr/apps/native-bluetooth-itc/bin/tct-bluetooth-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+    <privilege>http://tizen.org/privilege/bluetooth</privilege>
+    <privilege>http://tizen.org/privilege/bluetooth.admin</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-bundle-itc.spec b/packaging/itc/native-bundle-itc.spec
new file mode 100755 (executable)
index 0000000..10cedc7
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME bundle
+%define MODULE_LIBNAME bundle
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-bundle-itc.xml b/packaging/itc/native-bundle-itc.xml
new file mode 100755 (executable)
index 0000000..d5e038b
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-bundle-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>nativeBundleTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>native API test Application</description>
+    <ui-application appid="native.bundle-itc" exec="/opt/usr/apps/native-bundle-itc/bin/tct-bundle-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-cairo-itc.spec b/packaging/itc/native-cairo-itc.spec
new file mode 100755 (executable)
index 0000000..1fa8d33
--- /dev/null
@@ -0,0 +1,57 @@
+%define MODULE_NAME cairo
+%define MODULE_LIBNAME cairo
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:         pkgconfig(bundle)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(cairo)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:         pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-cairo-itc.xml b/packaging/itc/native-cairo-itc.xml
new file mode 100755 (executable)
index 0000000..56784ab
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-cairo-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreCairoTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.cairo-itc" exec="/opt/usr/apps/native-cairo-itc/bin/tct-cairo-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-camera-itc.spec b/packaging/itc/native-camera-itc.spec
new file mode 100755 (executable)
index 0000000..54608e3
--- /dev/null
@@ -0,0 +1,52 @@
+%define MODULE_NAME camera
+%define MODULE_LIBNAME capi-media-camera
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-system-info)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-camera-itc.xml b/packaging/itc/native-camera-itc.xml
new file mode 100755 (executable)
index 0000000..eb257cc
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-camera-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NATIVECameraTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>NATIVE API test Application</description>
+    <ui-application appid="native.camera-itc" exec="/opt/usr/apps/native-camera-itc/bin/tct-camera-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/camera</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-capi-media-tool-itc.spec b/packaging/itc/native-capi-media-tool-itc.spec
new file mode 100755 (executable)
index 0000000..0a3314c
--- /dev/null
@@ -0,0 +1,54 @@
+%define MODULE_NAME capi-media-tool
+%define MODULE_LIBNAME capi-media-tool
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gthread-2.0)
+BuildRequires:  pkgconfig(libtbm)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-capi-media-tool-itc.xml b/packaging/itc/native-capi-media-tool-itc.xml
new file mode 100755 (executable)
index 0000000..3b93fec
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-capi-media-tool-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeMediaToolsTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.capi-media-tool-itc" exec="/opt/usr/apps/native-capi-media-tool-itc/bin/tct-capi-media-tool-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-capi-message-port-itc.spec b/packaging/itc/native-capi-message-port-itc.spec
new file mode 100755 (executable)
index 0000000..f33a8ac
--- /dev/null
@@ -0,0 +1,56 @@
+%define MODULE_NAME capi-message-port
+%define MODULE_LIBNAME capi-message-port
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-app-manager)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+install -m 755 src/itc/capi-message-port/native-capi-message-port-itc.sh %{buildroot}/%{APP_PATH}%{name}/bin
+
+%post
+/opt/usr/apps/%{name}/bin/%{name}.sh
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-capi-message-port-itc.xml b/packaging/itc/native-capi-message-port-itc.xml
new file mode 100755 (executable)
index 0000000..e5d7220
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-capi-message-port-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreMessagePortTest</label>
+    <author email="test@samsung.com" href="www.samsung.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.capi-message-port-itc" exec="/opt/usr/apps/native-capi-message-port-itc/bin/tct-capi-message-port-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+    <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+       <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-connection-itc.spec b/packaging/itc/native-connection-itc.spec
new file mode 100755 (executable)
index 0000000..6aa7678
--- /dev/null
@@ -0,0 +1,54 @@
+%define MODULE_NAME connection
+%define MODULE_LIBNAME capi-network-connection
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-media-tone-player)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-system-settings)
+BuildRequires:  pkgconfig(capi-network-wifi)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-connection-itc.xml b/packaging/itc/native-connection-itc.xml
new file mode 100755 (executable)
index 0000000..ecac455
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-connection-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeConnectionTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.connection-itc" exec="/opt/usr/apps/native-connection-itc/bin/tct-connection-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+           <privilege>http://tizen.org/privilege/network.profile</privilege>
+           <privilege>http://tizen.org/privilege/network.get</privilege>
+           <privilege>http://tizen.org/privilege/network.set</privilege> 
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-context-manager-itc.spec b/packaging/itc/native-context-manager-itc.spec
new file mode 100755 (executable)
index 0000000..4b3b1d7
--- /dev/null
@@ -0,0 +1,58 @@
+%define MODULE_NAME context-manager
+%define MODULE_LIBNAME libcore-context-manager
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(dbus-glib-1)
+BuildRequires:  pkgconfig(json-glib-1.0)
+BuildRequires:  pkgconfig(sensor)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+Requires(post):  /sbin/ldconfig
+Requires(postun):  /sbin/ldconfig
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-context-manager-itc.xml b/packaging/itc/native-context-manager-itc.xml
new file mode 100755 (executable)
index 0000000..d274063
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-context-manager-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreContextManagerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.context-manager-itc" exec="/opt/usr/apps/native-context-manager-itc/bin/tct-context-manager-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-data-control-itc.spec b/packaging/itc/native-data-control-itc.spec
new file mode 100755 (executable)
index 0000000..77f2fb0
--- /dev/null
@@ -0,0 +1,71 @@
+%define MODULE_NAME data-control
+%define MODULE_LIBNAME capi-data-control
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(aul)
+BuildRequires:  pkgconfig(data-control)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  cmake
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+%ifarch i586
+cp src/itc/data-control/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm %{buildroot}%{APP_PATH}%{name}/data/
+%else
+cp src/itc/data-control/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm %{buildroot}%{APP_PATH}%{name}/data/
+%endif
+
+%post
+
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+
+%ifarch i586
+pkgcmd -i -q -t rpm -p %{APP_PATH}%{name}/data/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm &
+%else
+pkgcmd -i -q -t rpm -p %{APP_PATH}%{name}/data/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm &
+%endif
+
+%postun
+pkgcmd -u -n org.tizen.datacontrolprovider &
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-data-control-itc.xml b/packaging/itc/native-data-control-itc.xml
new file mode 100755 (executable)
index 0000000..4f33a42
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-data-control-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeDataControlTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.data-control-itc" exec="/opt/usr/apps/native-data-control-itc/bin/tct-data-control-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+    <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+       <privilege>http://tizen.org/privilege/datasharing</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-device-itc.spec b/packaging/itc/native-device-itc.spec
new file mode 100755 (executable)
index 0000000..51bf24e
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME device
+%define MODULE_LIBNAME capi-system-device
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-device-itc.xml b/packaging/itc/native-device-itc.xml
new file mode 100755 (executable)
index 0000000..8ca4780
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-device-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreDeviceTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.device-itc" exec="/opt/usr/apps/native-device-itc/bin/tct-device-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/display</privilege>
+               <privilege>http://tizen.org/privilege/haptic</privilege>
+               <privilege>http://tizen.org/privilege/led</privilege>
+       </privileges>
+</manifest>
diff --git a/packaging/itc/native-dlog-itc.spec b/packaging/itc/native-dlog-itc.spec
new file mode 100755 (executable)
index 0000000..55b7e1f
--- /dev/null
@@ -0,0 +1,52 @@
+%define MODULE_NAME dlog
+%define MODULE_LIBNAME dlog
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:         pkgconfig(libsystemd-journal)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-dlog-itc.xml b/packaging/itc/native-dlog-itc.xml
new file mode 100755 (executable)
index 0000000..648b14c
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-dlog-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeDlogTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.dlog-itc" exec="/opt/usr/apps/native-dlog-itc/bin/tct-dlog-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-efl-ext-itc.spec b/packaging/itc/native-efl-ext-itc.spec
new file mode 100755 (executable)
index 0000000..c78f309
--- /dev/null
@@ -0,0 +1,63 @@
+%define MODULE_NAME efl-ext
+%define MODULE_LIBNAME efl-extension
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:         pkgconfig(libsystemd-journal)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(ecore-x)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(x11)
+BuildRequires:  pkgconfig(xext)
+BuildRequires:  pkgconfig(xi)
+BuildRequires:  pkgconfig(inputproto)
+BuildRequires:  pkgconfig(fontconfig)
+BuildRequires:  pkgconfig(cairo)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  cmake
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-efl-ext-itc.xml b/packaging/itc/native-efl-ext-itc.xml
new file mode 100755 (executable)
index 0000000..d863f92
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-efl-ext-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeEflExtTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.efl-ext-itc" exec="/opt/usr/apps/native-efl-ext-itc/bin/tct-efl-ext-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-efl-util-itc.spec b/packaging/itc/native-efl-util-itc.spec
new file mode 100755 (executable)
index 0000000..94028ea
--- /dev/null
@@ -0,0 +1,57 @@
+%define MODULE_NAME efl-util
+%define MODULE_LIBNAME capi-ui-efl-util
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(x11)
+BuildRequires:  pkgconfig(utilX)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-efl-util-itc.xml b/packaging/itc/native-efl-util-itc.xml
new file mode 100755 (executable)
index 0000000..1445aa4
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-efl-util-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeEflUtilTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.efl-util-itc" exec="/opt/usr/apps/native-efl-util-itc/bin/tct-efl-util-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/window.priority.set</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-image-util-itc.spec b/packaging/itc/native-image-util-itc.spec
new file mode 100755 (executable)
index 0000000..75800a1
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME image-util
+%define MODULE_LIBNAME capi-media-image-util
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/
+cp src/itc/image-util/Image_01.jpg %{buildroot}%{APP_PATH}%{name}/data/Image_01.jpg
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-image-util-itc.xml b/packaging/itc/native-image-util-itc.xml
new file mode 100755 (executable)
index 0000000..647ec17
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-image-util-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeImageUtilTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.image-util-itc" exec="/opt/usr/apps/native-image-util-itc/bin/tct-image-util-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+       <privilege>http://tizen.org/privilege/imageutil</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-key-manager-itc.spec b/packaging/itc/native-key-manager-itc.spec
new file mode 100755 (executable)
index 0000000..ea7ebfb
--- /dev/null
@@ -0,0 +1,57 @@
+%define MODULE_NAME key-manager
+%define MODULE_LIBNAME key-manager
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+cp src/itc/key-manager/certificate.crt %{buildroot}%{APP_PATH}%{name}/data/certificate.crt
+cp src/itc/key-manager/signer.p12 %{buildroot}%{APP_PATH}%{name}/data/signer.p12
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+chsmack -a _ /opt/etc/ssl/certs/dfb08fe4.0
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
+/opt/etc/ssl/certs/dfb08fe4.0
diff --git a/packaging/itc/native-key-manager-itc.xml b/packaging/itc/native-key-manager-itc.xml
new file mode 100755 (executable)
index 0000000..bd29439
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-key-manager-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeKeyManagerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.key-manager-itc" exec="/opt/usr/apps/native-key-manager-itc/bin/tct-key-manager-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+    <privilege>http://tizen.org/privilege/keymanager</privilege>
+    <privilege>http://tizen.org/privilege/keymanager.admin</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-libstorage-itc.spec b/packaging/itc/native-libstorage-itc.spec
new file mode 100755 (executable)
index 0000000..f65c0bf
--- /dev/null
@@ -0,0 +1,50 @@
+%define MODULE_NAME libstorage
+%define MODULE_LIBNAME storage
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-libstorage-itc.xml b/packaging/itc/native-libstorage-itc.xml
new file mode 100755 (executable)
index 0000000..888801d
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-libstorage-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeLibstorageTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.libstorage-itc" exec="/opt/usr/apps/native-libstorage-itc/bin/tct-libstorage-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-location-manager-itc.spec b/packaging/itc/native-location-manager-itc.spec
new file mode 100755 (executable)
index 0000000..a462054
--- /dev/null
@@ -0,0 +1,55 @@
+%define MODULE_NAME location-manager
+%define MODULE_LIBNAME capi-location-manager
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(location)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-system-info)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-location-manager-itc.xml b/packaging/itc/native-location-manager-itc.xml
new file mode 100755 (executable)
index 0000000..e3e30d3
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-location-manager-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>nativeLocationManagerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>native API test Application</description>
+    <ui-application appid="native.location-manager-itc" exec="/opt/usr/apps/native-location-manager-itc/bin/tct-location-manager-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+    <privilege>http://tizen.org/privilege/location</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-media-content-itc.spec b/packaging/itc/native-media-content-itc.spec
new file mode 100755 (executable)
index 0000000..4655964
--- /dev/null
@@ -0,0 +1,127 @@
+%define MODULE_NAME media-content
+%define MODULE_LIBNAME capi-content-media-content
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(libmedia-service)
+BuildRequires:  pkgconfig(media-thumbnail)
+BuildRequires:  pkgconfig(libmedia-utils)
+BuildRequires:  pkgconfig(icu-i18n)
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(storage)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/usr/media/
+cp src/itc/media-content/test.jpg %{buildroot}/opt/usr/media/test.jpg
+cp src/itc/media-content/test0.jpg %{buildroot}/opt/usr/media/test0.jpg
+cp src/itc/media-content/test1.jpg %{buildroot}/opt/usr/media/test1.jpg
+cp src/itc/media-content/test2.jpg %{buildroot}/opt/usr/media/test2.jpg
+cp src/itc/media-content/test3.jpg %{buildroot}/opt/usr/media/test3.jpg
+cp src/itc/media-content/20140709-115007.mp4 %{buildroot}/opt/usr/media/20140709-115007.mp4
+cp src/itc/media-content/TestRingtone.mp3 %{buildroot}/opt/usr/media/TestRingtone.mp3
+
+mkdir -p %{buildroot}/opt/usr/media/NewName/.hide/testing
+mkdir -p %{buildroot}/opt/usr/media/NewName/.hideDelete/testing
+mkdir -p %{buildroot}/opt/usr/media/Sounds
+mkdir -p %{buildroot}/opt/usr/media/Images/
+mkdir -p %{buildroot}/opt/usr/media/Images/test
+mkdir -p %{buildroot}/opt/usr/media/DCIM/Camera
+mkdir -p %{buildroot}/opt/usr/media/Dummy
+cp src/itc/media-content/test1.jpg %{buildroot}/opt/usr/media/Images/test/test1.jpg
+cp src/itc/media-content/20140709-115007.mp4 %{buildroot}/opt/usr/media/DCIM/Camera/20140709-115007.mp4
+cp src/itc/media-content/TestRingtone.mp3 %{buildroot}/opt/usr/media/Sounds/TestRingtone.mp3
+cp src/itc/media-content/test.jpg %{buildroot}/opt/usr/media/Images/test.jpg
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chown -R app:app /opt/usr/media/Sounds
+chown -R app:app /opt/usr/media/Images
+chown -R app:app /opt/usr/media/Images/test
+chown -R app:app /opt/usr/media/Images/test/*
+chown -R app:app /opt/usr/media/DCIM/
+chown -R app:app /opt/usr/media/Dummy/
+chown -R app:app /opt/usr/media/Dummy/*
+chown -R app:app /opt/usr/media/test*
+chown -R app:app /opt/usr/media/NewName/
+chown -R app:app /opt/usr/media/NewName/.hide*
+chown -R app:app /opt/usr/media/NewName/.hide/testing
+chown -R app:app /opt/usr/media/NewName/.hideDelete/testing
+chown -R app:app /opt/usr/media/TestRingtone.mp3
+chown -R app:app /opt/usr/media/20140709-115007.mp4
+chmod -R 777 /opt/usr/media/Sounds
+chmod -R 777 /opt/usr/media/Images
+chmod -R 777 /opt/usr/media/Images/test
+chmod -R 777 /opt/usr/media/Images/test/*
+chmod -R 777 /opt/usr/media/DCIM
+chmod -R 777 /opt/usr/media/Dummy
+chmod -R 777 /opt/usr/media/NewName
+chmod -R 777 /opt/usr/media/NewName/.hide*
+chmod -R 777 /opt/usr/media/NewName/.hide/testing
+chmod -R 777 /opt/usr/media/NewName/.hideDelete/testing
+chmod -R 777 /opt/usr/media/test*
+chmod -R 777 /opt/usr/media/TestRingtone.mp3
+chmod -R 777 /opt/usr/media/20140709-115007.mp4
+chsmack -a system::media /opt/usr/media/Sounds
+chsmack -a system::media /opt/usr/media/Sounds/*
+chsmack -a system::media /opt/usr/media/Images
+chsmack -a system::media /opt/usr/media/Images/test
+chsmack -a system::media /opt/usr/media/Images/test/*
+chsmack -a system::media /opt/usr/media/DCIM
+chsmack -a system::media /opt/usr/media/DCIM/Camera
+chsmack -a system::media /opt/usr/media/DCIM/Camera/*
+chsmack -a system::media /opt/usr/media/Dummy
+chsmack -a system::media /opt/usr/media/Dummy/*
+chsmack -a system::media /opt/usr/media/NewName
+chsmack -a system::media /opt/usr/media/NewName/.hide*
+chsmack -a system::media /opt/usr/media/NewName/.hide/testing
+chsmack -a system::media /opt/usr/media/NewName/.hideDelete/testing
+chsmack -a system::media /opt/usr/media/test*
+chsmack -a system::media /opt/usr/media/TestRingtone.mp3
+chsmack -a system::media /opt/usr/media/20140709-115007.mp4
+chsmack -a %{name} %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data/*
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
+/opt/usr/media/*
diff --git a/packaging/itc/native-media-content-itc.xml b/packaging/itc/native-media-content-itc.xml
new file mode 100755 (executable)
index 0000000..882c8fa
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-media-content-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeMediaContentTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.media-content-itc" exec="/opt/usr/apps/native-media-content-itc/bin/tct-media-content-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+        <privileges>
+               <privilege>http://tizen.org/privilege/content.write</privilege>
+               <privilege>http://tizen.org/privilege/mediastorage</privilege>
+               <privilege>http://tizen.org/privilege/externalstorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-media-key-itc.spec b/packaging/itc/native-media-key-itc.spec
new file mode 100755 (executable)
index 0000000..6a4de30
--- /dev/null
@@ -0,0 +1,55 @@
+%define MODULE_NAME media-key
+%define MODULE_LIBNAME capi-system-media-key
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(ecore-x)
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-media-key-itc.xml b/packaging/itc/native-media-key-itc.xml
new file mode 100755 (executable)
index 0000000..ccd0960
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-media-key-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreMediaKeyTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.media-key-itc" exec="/opt/usr/apps/native-media-key-itc/bin/tct-media-key-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-mediacodec-itc.spec b/packaging/itc/native-mediacodec-itc.spec
new file mode 100755 (executable)
index 0000000..56ca5a7
--- /dev/null
@@ -0,0 +1,56 @@
+%define MODULE_NAME mediacodec
+%define MODULE_LIBNAME capi-media-codec
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  cmake
+BuildRequires:         pkgconfig(bundle)
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/
+cp src/itc/mediacodec/TestData.pcm %{buildroot}%{APP_PATH}%{name}/data/TestData.pcm
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-mediacodec-itc.xml b/packaging/itc/native-mediacodec-itc.xml
new file mode 100755 (executable)
index 0000000..37c2a0f
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-mediacodec-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeMediaCodecTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.mediacodec-itc" exec="/opt/usr/apps/native-mediacodec-itc/bin/tct-mediacodec-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-messages-itc.spec b/packaging/itc/native-messages-itc.spec
new file mode 100755 (executable)
index 0000000..3d43f20
--- /dev/null
@@ -0,0 +1,61 @@
+%define MODULE_NAME messages
+%define MODULE_LIBNAME capi-messaging-messages
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(msg-service)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+cp src/itc/messages/Image.jpg %{buildroot}%{APP_PATH}%{name}/data/Image.jpg
+
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-messages-itc.xml b/packaging/itc/native-messages-itc.xml
new file mode 100755 (executable)
index 0000000..9382256
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-messages-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeMessagesTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.messages-itc" exec="/opt/usr/apps/native-messages-itc/bin/tct-messages-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+        <privileges>
+               <privilege>http://tizen.org/privilege/message.read</privilege>          
+               <privilege>http://tizen.org/privilege/message.write</privilege>         
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-metadata-extractor-itc.spec b/packaging/itc/native-metadata-extractor-itc.spec
new file mode 100755 (executable)
index 0000000..ae1d582
--- /dev/null
@@ -0,0 +1,56 @@
+%define MODULE_NAME metadata-extractor
+%define MODULE_LIBNAME capi-media-metadata-extractor
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+cp src/itc/metadata-extractor/metadata_video.mp4 %{buildroot}%{APP_PATH}%{name}/data/metadata_video.mp4
+cp src/itc/metadata-extractor/metadata_audio.mp3 %{buildroot}%{APP_PATH}%{name}/data/metadata_audio.mp3
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/itc/native-metadata-extractor-itc.xml b/packaging/itc/native-metadata-extractor-itc.xml
new file mode 100755 (executable)
index 0000000..0867a60
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-metadata-extractor-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeMetadataExtractorTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.metadata-extractor-itc" exec="/opt/usr/apps/native-metadata-extractor-itc/bin/tct-metadata-extractor-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+        <privileges>
+               <privilege>http://tizen.org/privilege/mediastorage</privilege>
+               <privilege>http://tizen.org/privilege/externalstorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-mime-type-itc.spec b/packaging/itc/native-mime-type-itc.spec
new file mode 100755 (executable)
index 0000000..2cd30b2
--- /dev/null
@@ -0,0 +1,50 @@
+%define MODULE_NAME mime-type
+%define MODULE_LIBNAME capi-content-mime-type
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-mime-type-itc.xml b/packaging/itc/native-mime-type-itc.xml
new file mode 100755 (executable)
index 0000000..a900756
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-mime-type-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeMimeTypeTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.mime-type-itc" exec="/opt/usr/apps/native-mime-type-itc/bin/tct-mime-type-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-native-common-itc.spec b/packaging/itc/native-native-common-itc.spec
new file mode 100755 (executable)
index 0000000..31207de
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME native-common
+%define MODULE_LIBNAME capi-base-common
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-native-common-itc.xml b/packaging/itc/native-native-common-itc.xml
new file mode 100755 (executable)
index 0000000..2269e71
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-native-common-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreBaseCommonTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.native-common-itc" exec="/opt/usr/apps/native-native-common-itc/bin/tct-native-common-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-nfc-itc.spec b/packaging/itc/native-nfc-itc.spec
new file mode 100755 (executable)
index 0000000..91a2610
--- /dev/null
@@ -0,0 +1,68 @@
+%define MODULE_NAME nfc
+%define MODULE_LIBNAME capi-network-nfc
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-appfw-app-manager)
+BuildRequires:  pkgconfig(capi-system-info)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+%ifarch armv7l
+cp src/itc/nfc/org.tizen.testnfclient-1.0.0-arm.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testnfclient-1.0.0-arm.tpk
+%else
+cp src/itc/nfc/org.tizen.testnfclient-1.0.0-i386.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testnfclient-1.0.0-i386.tpk
+%endif
+
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%ifarch armv7l
+pkgcmd -i -q -t tpk -p %{APP_PATH}%{name}/data/org.tizen.testnfclient-1.0.0-arm.tpk &
+%else
+pkgcmd -i -q -t tpk -p %{APP_PATH}%{name}/data/org.tizen.testnfclient-1.0.0-i386.tpk &
+%endif
+
+%postun
+pkgcmd -un  org.tizen.testnfclient
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-nfc-itc.xml b/packaging/itc/native-nfc-itc.xml
new file mode 100755 (executable)
index 0000000..0dcb939
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-nfc-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeNFCTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.nfc-itc" exec="/opt/usr/apps/native-nfc-itc/bin/tct-nfc-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/nfc</privilege>
+               <privilege>http://tizen.org/privilege/nfc.cardemulation</privilege>
+               <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-notification-itc.spec b/packaging/itc/native-notification-itc.spec
new file mode 100755 (executable)
index 0000000..c9902ec
--- /dev/null
@@ -0,0 +1,52 @@
+%define MODULE_NAME notification
+%define MODULE_LIBNAME notification
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-notification-itc.xml b/packaging/itc/native-notification-itc.xml
new file mode 100755 (executable)
index 0000000..b33f343
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-notification-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreNotificationTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.notification-itc" exec="/opt/usr/apps/native-notification-itc/bin/tct-notification-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+      <privilege>http://tizen.org/privilege/notification</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-package-manager-itc.spec b/packaging/itc/native-package-manager-itc.spec
new file mode 100755 (executable)
index 0000000..24f7492
--- /dev/null
@@ -0,0 +1,70 @@
+%define MODULE_NAME package-manager
+%define MODULE_LIBNAME capi-appfw-package-manager
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+%ifarch i586
+cp src/itc/package-manager/native-testapp-itc-0.1-0.i586.rpm %{buildroot}%{APP_PATH}%{name}/data/native-testapp-itc-0.1-0.i586.rpm
+cp src/itc/package-manager/org.tizen.testapp-1.0.0-i386.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testapp-1.0.0-i386.tpk
+%else
+cp src/itc/package-manager/native-testapp-itc-0.1-0.armv7l.rpm %{buildroot}%{APP_PATH}%{name}/data/native-testapp-itc-0.1-0.armv7l.rpm
+cp src/itc/package-manager/org.tizen.testapp-1.0.0-arm.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testapp-1.0.0-arm.tpk
+%endif
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%ifarch i586
+pkgcmd -i -q -t rpm -p %{APP_PATH}%{name}/data/native-testapp-itc-0.1-0.i586.rpm &
+pkgcmd -i -q -t tpk -p %{APP_PATH}%{name}/data/org.tizen.testapp-1.0.0-i386.tpk &
+%else
+pkgcmd -i -q -t rpm -p %{APP_PATH}%{name}/data/native-testapp-itc-0.1-0.armv7l.rpm &
+pkgcmd -i -q -t tpk -p %{APP_PATH}%{name}/data/org.tizen.testapp-1.0.0-arm.tpk &
+%endif
+
+%postun
+pkgcmd -un native-testapp-itc &
+pkgcmd -un org.tizen.testapp &
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-package-manager-itc.xml b/packaging/itc/native-package-manager-itc.xml
new file mode 100755 (executable)
index 0000000..f89376e
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-package-manager-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>nativePackageManagerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>native API test Application</description>
+    <ui-application appid="native.package-manager-itc" exec="/opt/usr/apps/native-package-manager-itc/bin/tct-package-manager-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-player-itc.spec b/packaging/itc/native-player-itc.spec
new file mode 100755 (executable)
index 0000000..40bbdc7
--- /dev/null
@@ -0,0 +1,66 @@
+%define MODULE_NAME player
+%define MODULE_LIBNAME capi-media-player
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:         pkgconfig(bundle)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(ecore-x)
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-system-info)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/
+cp src/itc/player/short.mp3 %{buildroot}%{APP_PATH}%{name}/data/short.mp3
+cp src/itc/player/file.mp4 %{buildroot}%{APP_PATH}%{name}/data/file.mp4
+cp src/itc/player/sub.srt %{buildroot}%{APP_PATH}%{name}/data/sub.srt
+cp src/itc/player/v.mp4 %{buildroot}%{APP_PATH}%{name}/data/v.mp4
+cp src/itc/player/AWB_header_change_AMR.amr %{buildroot}%{APP_PATH}%{name}/data/AWB_header_change_AMR.amr
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-player-itc.xml b/packaging/itc/native-player-itc.xml
new file mode 100755 (executable)
index 0000000..06ee8d5
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-player-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativePlayerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.player-itc" exec="/opt/usr/apps/native-player-itc/bin/tct-player-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+<privileges>
+        <privilege>http://tizen.org/privilege/player</privilege>
+               <privilege>http://tizen.org/privilege/externalstorage</privilege>
+        <privilege>http://tizen.org/privilege/mediastorage</privilege>
+        <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+        <privilege>http://tizen.org/privilege/content.write</privilege>
+        <privilege>http://tizen.org/privilege/internet</privilege>
+        <privilege>http://tizen.org/privilege/notification</privilege>
+        <privilege>http://tizen.org/privilege/location</privilege>
+        <privilege>http://tizen.org/privilege/camera</privilege>
+        <privilege>http://tizen.org/privilege/display</privilege>
+        <privilege>http://tizen.org/privilege/download</privilege>
+        <privilege>http://tizen.org/privilege/network.get</privilege>
+        <privilege>http://tizen.org/privilege/network.profile</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-privilege-info-itc.spec b/packaging/itc/native-privilege-info-itc.spec
new file mode 100755 (executable)
index 0000000..b92f291
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME privilege-info
+%define MODULE_LIBNAME privilege-info
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires: pkgconfig(capi-security-privilege-manager)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-privilege-info-itc.xml b/packaging/itc/native-privilege-info-itc.xml
new file mode 100755 (executable)
index 0000000..aa539f1
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-privilege-info-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativePrivilegeInfoTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.privilege-info-itc" exec="/opt/usr/apps/native-privilege-info-itc/bin/tct-privilege-info-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-push-itc.spec b/packaging/itc/native-push-itc.spec
new file mode 100755 (executable)
index 0000000..91cce63
--- /dev/null
@@ -0,0 +1,59 @@
+%define MODULE_NAME push
+%define MODULE_LIBNAME push
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:         pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(libcurl)
+BuildRequires:  pkgconfig(aul)
+BuildRequires:  pkgconfig(json-glib-1.0)
+BuildRequires:  pkgconfig(capi-system-info)
+
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+
+%postun
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/itc/native-push-itc.xml b/packaging/itc/native-push-itc.xml
new file mode 100755 (executable)
index 0000000..76e9cb6
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-push-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativePushTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.push-itc" exec="/opt/usr/apps/native-push-itc/bin/tct-push-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+    <privilege>http://tizen.org/privilege/push</privilege>
+    <privilege>http://tizen.org/privilege/internet</privilege>
+    <privilege>http://tizen.org/privilege/badge</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-radio-itc.spec b/packaging/itc/native-radio-itc.spec
new file mode 100755 (executable)
index 0000000..eefae65
--- /dev/null
@@ -0,0 +1,58 @@
+%define MODULE_NAME radio
+%define MODULE_LIBNAME capi-media-radio
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(mm-radio)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+#cp scripts/add_all_smack_rule.sh %{buildroot}/tmp/
+#cp scripts/all_smack.rule %{buildroot}/tmp/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml      
+/opt/usr/share/license/%{name}
+#/tmp/add_all_smack_rule.sh
+#/tmp/all_smack.rule
diff --git a/packaging/itc/native-radio-itc.xml b/packaging/itc/native-radio-itc.xml
new file mode 100755 (executable)
index 0000000..70fa6d7
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-radio-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeRadioTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.radio-itc" exec="/opt/usr/apps/native-radio-itc/bin/tct-radio-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-recorder-itc.spec b/packaging/itc/native-recorder-itc.spec
new file mode 100755 (executable)
index 0000000..e078688
--- /dev/null
@@ -0,0 +1,62 @@
+%define MODULE_NAME recorder
+%define MODULE_LIBNAME capi-media-recorder
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(mm-camcorder)
+BuildRequires:  pkgconfig(audio-session-mgr)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-media-camera)
+BuildRequires:  pkgconfig(capi-media-audio-io)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:         pkgconfig(bundle)
+BuildRequires:         pkgconfig(storage)
+BuildRequires:         pkgconfig(ecore)
+BuildRequires:         pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-recorder-itc.xml b/packaging/itc/native-recorder-itc.xml
new file mode 100755 (executable)
index 0000000..863b6c7
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-recorder-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeRecorderTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.recorder-itc" exec="/opt/usr/apps/native-recorder-itc/bin/tct-recorder-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+       <privilege>http://tizen.org/privilege/recorder</privilege>
+               <privilege>http://tizen.org/privilege/mediastorage</privilege>
+       <privilege>http://tizen.org/privilege/externalstorage</privilege>
+               <privilege>http://tizen.org/privilege/camera</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-runtime-info-itc.spec b/packaging/itc/native-runtime-info-itc.spec
new file mode 100755 (executable)
index 0000000..804139d
--- /dev/null
@@ -0,0 +1,52 @@
+%define MODULE_NAME runtime-info
+%define MODULE_LIBNAME capi-system-runtime-info
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-runtime-info-itc.xml b/packaging/itc/native-runtime-info-itc.xml
new file mode 100755 (executable)
index 0000000..032a662
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-runtime-info-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreRuntimeInfoTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.runtime-info-itc" exec="/opt/usr/apps/native-runtime-info-itc/bin/tct-runtime-info-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+      <privilege>http://tizen.org/privilege/runtimeinfo</privilege>
+    </privileges>
+</manifest>
\ No newline at end of file
diff --git a/packaging/itc/native-sensor-itc.spec b/packaging/itc/native-sensor-itc.spec
new file mode 100755 (executable)
index 0000000..aa079a6
--- /dev/null
@@ -0,0 +1,54 @@
+%define MODULE_NAME sensor
+%define MODULE_LIBNAME capi-system-sensor
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:         pkgconfig(bundle)
+BuildRequires:         pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/itc/native-sensor-itc.xml b/packaging/itc/native-sensor-itc.xml
new file mode 100755 (executable)
index 0000000..8caaecf
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-sensor-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeSensorTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.sensor-itc" exec="/opt/usr/apps/native-sensor-itc/bin/tct-sensor-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+<privileges>
+    <privilege>http://tizen.org/privilege/healthinfo</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-smartcard-itc.spec b/packaging/itc/native-smartcard-itc.spec
new file mode 100755 (executable)
index 0000000..3ebab7e
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME smartcard
+%define MODULE_LIBNAME capi-network-smartcard
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-smartcard-itc.xml b/packaging/itc/native-smartcard-itc.xml
new file mode 100755 (executable)
index 0000000..f11405c
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-smartcard-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreSmartcardTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.smartcard-itc" exec="/opt/usr/apps/native-smartcard-itc/bin/tct-smartcard-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/secureelement</privilege>
+       </privileges>
+</manifest>
diff --git a/packaging/itc/native-sound-manager-itc.spec b/packaging/itc/native-sound-manager-itc.spec
new file mode 100755 (executable)
index 0000000..aa25abf
--- /dev/null
@@ -0,0 +1,55 @@
+%define MODULE_NAME sound-manager
+%define MODULE_LIBNAME capi-media-sound-manager
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-media-player)
+BuildRequires:  pkgconfig(capi-media-tone-player)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-sound-manager-itc.xml b/packaging/itc/native-sound-manager-itc.xml
new file mode 100755 (executable)
index 0000000..59e14fe
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-sound-manager-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeSoundManagerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.sound-manager-itc" exec="/opt/usr/apps/native-sound-manager-itc/bin/tct-sound-manager-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+           <privilege>http://tizen.org/privilege/volume.set</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-stt-itc.spec b/packaging/itc/native-stt-itc.spec
new file mode 100755 (executable)
index 0000000..5f96870
--- /dev/null
@@ -0,0 +1,65 @@
+%define MODULE_NAME stt
+%define MODULE_LIBNAME stt
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(aul)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-media-audio-io)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-media-wav-player)
+BuildRequires:  pkgconfig(dbus-1)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires: pkgconfig(elementary)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(libxml-2.0)
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  cmake
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+cp src/itc/stt/start_sound.wav %{buildroot}%{APP_PATH}%{name}/data/start_sound.wav
+cp src/itc/stt/stop_sound.wav %{buildroot}%{APP_PATH}%{name}/data/stop_sound.wav
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-stt-itc.xml b/packaging/itc/native-stt-itc.xml
new file mode 100755 (executable)
index 0000000..8bd6aa4
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-stt-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreSttTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.stt-itc" exec="/opt/usr/apps/native-stt-itc/bin/tct-stt-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/recorder</privilege>
+       </privileges>
+</manifest>
diff --git a/packaging/itc/native-system-info-itc.spec b/packaging/itc/native-system-info-itc.spec
new file mode 100755 (executable)
index 0000000..b5e091a
--- /dev/null
@@ -0,0 +1,50 @@
+%define MODULE_NAME system-info
+%define MODULE_LIBNAME capi-system-info
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-system-info-itc.xml b/packaging/itc/native-system-info-itc.xml
new file mode 100755 (executable)
index 0000000..c6517c1
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-system-info-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeSystemInfoTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.system-info-itc" exec="/opt/usr/apps/native-system-info-itc/bin/tct-system-info-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+    <privilege>http://tizen.org/privilege/systeminfo</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-system-settings-itc.spec b/packaging/itc/native-system-settings-itc.spec
new file mode 100755 (executable)
index 0000000..6caf4bb
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME system-settings
+%define MODULE_LIBNAME capi-system-system-settings
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/itc/native-system-settings-itc.xml b/packaging/itc/native-system-settings-itc.xml
new file mode 100755 (executable)
index 0000000..8c84133
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-system-settings-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeSystemSettingsTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.system-settings-itc" exec="/opt/usr/apps/native-system-settings-itc/bin/tct-system-settings-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-tbm-itc.spec b/packaging/itc/native-tbm-itc.spec
new file mode 100755 (executable)
index 0000000..7fda4c8
--- /dev/null
@@ -0,0 +1,56 @@
+%define MODULE_NAME tbm
+%define MODULE_LIBNAME libtbm
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(pthread-stubs)
+BuildRequires:  pkgconfig(libdrm)
+BuildRequires:  pkgconfig(x11)
+BuildRequires:  pkgconfig(libdri2)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/itc/native-tbm-itc.xml b/packaging/itc/native-tbm-itc.xml
new file mode 100755 (executable)
index 0000000..c20231d
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-tbm-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>nativeTbmTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>native API test Application</description>
+    <ui-application appid="native.tbm-itc" exec="/opt/usr/apps/native-tbm-itc/bin/tct-tbm-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-telephony-itc.spec b/packaging/itc/native-telephony-itc.spec
new file mode 100755 (executable)
index 0000000..f4a5e85
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME telephony
+%define MODULE_LIBNAME capi-telephony
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-telephony-itc.xml b/packaging/itc/native-telephony-itc.xml
new file mode 100755 (executable)
index 0000000..09ae0f3
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-telephony-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeTelephonyTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.telephony-itc" exec="/opt/usr/apps/native-telephony-itc/bin/tct-telephony-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+    <privilege>http://tizen.org/privilege/telephony</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-tone-player-itc.spec b/packaging/itc/native-tone-player-itc.spec
new file mode 100755 (executable)
index 0000000..f728045
--- /dev/null
@@ -0,0 +1,52 @@
+%define MODULE_NAME tone-player
+%define MODULE_LIBNAME capi-media-tone-player
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/itc/native-tone-player-itc.xml b/packaging/itc/native-tone-player-itc.xml
new file mode 100755 (executable)
index 0000000..bb5b7b4
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-tone-player-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeTonePlayerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.tone-player-itc" exec="/opt/usr/apps/native-tone-player-itc/bin/tct-tone-player-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-tts-itc.spec b/packaging/itc/native-tts-itc.spec
new file mode 100755 (executable)
index 0000000..64ab201
--- /dev/null
@@ -0,0 +1,55 @@
+%define MODULE_NAME tts
+%define MODULE_LIBNAME tts
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-tts-itc.xml b/packaging/itc/native-tts-itc.xml
new file mode 100755 (executable)
index 0000000..8268b61
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-tts-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativePlayerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.tts-itc" exec="/opt/usr/apps/native-tts-itc/bin/tct-tts-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-wav-player-itc.spec b/packaging/itc/native-wav-player-itc.spec
new file mode 100755 (executable)
index 0000000..7819a25
--- /dev/null
@@ -0,0 +1,54 @@
+%define MODULE_NAME wav-player
+%define MODULE_LIBNAME capi-media-wav-player
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/
+cp src/itc/wav-player/WavPlayerTest.wav %{buildroot}%{APP_PATH}%{name}/data/WavPlayerTest.wav
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-wav-player-itc.xml b/packaging/itc/native-wav-player-itc.xml
new file mode 100755 (executable)
index 0000000..9c945bc
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-wav-player-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreWavPlayerTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.wav-player-itc" exec="/opt/usr/apps/native-wav-player-itc/bin/tct-wav-player-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/itc/native-webkit2-itc.spec b/packaging/itc/native-webkit2-itc.spec
new file mode 100755 (executable)
index 0000000..50f1af0
--- /dev/null
@@ -0,0 +1,72 @@
+%define MODULE_NAME webkit2
+%define MODULE_LIBNAME ewebkit2
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(ecore-evas)
+BuildRequires:  pkgconfig(edje)
+BuildRequires:  pkgconfig(eina)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(x11)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(ewebkit2)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/webkit2_files/resources
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/webkit2_files/resources/common
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/webkit2_files/resources/ewk_context_menu
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/webkit2_files/resources/ewk_view
+cp src/itc/webkit2/resources/common/*.html %{buildroot}%{APP_PATH}%{name}/data/webkit2_files/resources/common/
+cp src/itc/webkit2/resources/ewk_context_menu/*.png %{buildroot}%{APP_PATH}%{name}/data/webkit2_files/resources/ewk_context_menu/
+cp src/itc/webkit2/resources/ewk_context_menu/*.html %{buildroot}%{APP_PATH}%{name}/data/webkit2_files/resources/ewk_context_menu/
+cp src/itc/webkit2/resources/ewk_view/*.html %{buildroot}%{APP_PATH}%{name}/data/webkit2_files/resources/ewk_view/
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-webkit2-itc.xml b/packaging/itc/native-webkit2-itc.xml
new file mode 100755 (executable)
index 0000000..ce1c95c
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-webkit2-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NATIVEWebkitEflTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.webkit2-itc" exec="/opt/usr/apps/native-webkit2-itc/bin/tct-webkit2-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+       <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+        <privilege>http://tizen.org/privilege/content.write</privilege>
+        <privilege>http://tizen.org/privilege/internet</privilege>
+        <privilege>http://tizen.org/privilege/notification</privilege>
+        <privilege>http://tizen.org/privilege/location</privilege>
+        <privilege>http://tizen.org/privilege/camera</privilege>
+        <privilege>http://tizen.org/privilege/externalstorage</privilege>
+        <privilege>http://tizen.org/privilege/mediastorage</privilege>
+        <privilege>http://tizen.org/privilege/display</privilege>
+        <privilege>http://tizen.org/privilege/network.get</privilege>
+    </privileges>
+</manifest> 
diff --git a/packaging/itc/native-widget-viewer-evas-itc.spec b/packaging/itc/native-widget-viewer-evas-itc.spec
new file mode 100755 (executable)
index 0000000..1462c24
--- /dev/null
@@ -0,0 +1,61 @@
+%define MODULE_NAME widget-viewer-evas
+%define MODULE_LIBNAME widget_viewer_evas
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(widget_service)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(gio-2.0)
+BuildRequires:  pkgconfig(com-core)
+BuildRequires:  pkgconfig(sqlite3)
+BuildRequires:  pkgconfig(db-util)
+BuildRequires:  pkgconfig(pkgmgr)
+BuildRequires:  pkgconfig(pkgmgr-info)
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  pkgconfig(icu-uc)
+BuildRequires:  pkgconfig(capi-system-info)
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-widget-viewer-evas-itc.xml b/packaging/itc/native-widget-viewer-evas-itc.xml
new file mode 100755 (executable)
index 0000000..d9ecbf6
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-widget-viewer-evas-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreWidgetViewerEvasTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.widget-viewer-evas-itc" exec="/opt/usr/apps/native-widget-viewer-evas-itc/bin/tct-widget-viewer-evas-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/widget.viewer</privilege>         
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-widget_service-itc.spec b/packaging/itc/native-widget_service-itc.spec
new file mode 100755 (executable)
index 0000000..0a4c1ae
--- /dev/null
@@ -0,0 +1,66 @@
+%define MODULE_NAME widget_service
+%define MODULE_LIBNAME widget_service
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires: pkgconfig(bundle)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(widget_viewer_evas)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+%ifarch armv7l
+cp src/itc/widget_service/org.tizen.testwidget-1.0.0-arm.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testwidget-1.0.0-arm.tpk
+%else
+cp src/itc/widget_service/org.tizen.testwidget-1.0.0-i386.tpk %{buildroot}%{APP_PATH}%{name}/data/org.tizen.testwidget-1.0.0-i386.tpk
+%endif
+
+%post
+%ifarch armv7l
+pkgcmd -i -q -t tpk -p %{APP_PATH}%{name}/data/org.tizen.testwidget-1.0.0-arm.tpk &
+%else
+pkgcmd -i -q -t tpk -p %{APP_PATH}%{name}/data/org.tizen.testwidget-1.0.0-i386.tpk &
+%endif
+
+%postun
+pkgcmd -un org.tizen.testwidget &
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-widget_service-itc.xml b/packaging/itc/native-widget_service-itc.xml
new file mode 100755 (executable)
index 0000000..b81e6d2
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-widget_service-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeWidget_serviceTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.widget_service-itc" exec="/opt/usr/apps/native-widget_service-itc/bin/tct-widget_service-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/widget.viewer</privilege>         
+    </privileges>
+</manifest>
diff --git a/packaging/itc/native-wifi-itc.spec b/packaging/itc/native-wifi-itc.spec
new file mode 100755 (executable)
index 0000000..86098ab
--- /dev/null
@@ -0,0 +1,59 @@
+%define MODULE_NAME wifi
+%define MODULE_LIBNAME capi-network-wifi
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-system-info)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/
+cp src/itc/wifi/cert.crt %{buildroot}%{APP_PATH}%{name}/data/cert.crt
+cp src/itc/wifi/testing.pem %{buildroot}%{APP_PATH}%{name}/data/testing.pem
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/native-%{MODULE_NAME}-itc.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/itc/native-wifi-itc.xml b/packaging/itc/native-wifi-itc.xml
new file mode 100755 (executable)
index 0000000..dcc787e
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-wifi-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>NativeWifiTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.wifi-itc" exec="/opt/usr/apps/native-wifi-itc/bin/tct-wifi-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+    <privilege>http://tizen.org/privilege/network.get</privilege>
+    <privilege>http://tizen.org/privilege/network.profile</privilege>
+    <privilege>http://tizen.org/privilege/network.set</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-app-manager-tests.spec b/packaging/utc/core-app-manager-tests.spec
new file mode 100755 (executable)
index 0000000..be55bd3
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME app-manager
+%define MODULE_LIBNAME capi-appfw-app-manager
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(glib-2.0)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-app-manager-tests.xml b/packaging/utc/core-app-manager-tests.xml
new file mode 100755 (executable)
index 0000000..59faac5
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-app-manager-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreAppManagerTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.app-manager-tests" exec="/opt/usr/apps/core-app-manager-tests/bin/tct-app-manager-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+               <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+               <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-appcore-agent-tests.spec b/packaging/utc/core-appcore-agent-tests.spec
new file mode 100755 (executable)
index 0000000..8212fd5
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME appcore-agent
+%define MODULE_LIBNAME appcore-agent
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(capi-appfw-service-application)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-appcore-agent-tests.xml b/packaging/utc/core-appcore-agent-tests.xml
new file mode 100755 (executable)
index 0000000..8da2110
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-appcore-agent-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreAppcoreAgentTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.appcore-agent-tests" exec="/opt/usr/apps/core-appcore-agent-tests/bin/tct-appcore-agent-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-appcore-watch-tests.spec b/packaging/utc/core-appcore-watch-tests.spec
new file mode 100755 (executable)
index 0000000..bc79b97
--- /dev/null
@@ -0,0 +1,54 @@
+%define MODULE_NAME appcore-watch
+%define MODULE_LIBNAME appcore-watch
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(capi-appfw-watch-application)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-appcore-watch-tests.xml b/packaging/utc/core-appcore-watch-tests.xml
new file mode 100755 (executable)
index 0000000..6a54f06
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-appcore-watch-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreAppcoreWatchTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.appcore-watch-tests" exec="/opt/usr/apps/core-appcore-watch-tests/bin/tct-appcore-watch-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-appcore-widget-tests.spec b/packaging/utc/core-appcore-widget-tests.spec
new file mode 100755 (executable)
index 0000000..e691df4
--- /dev/null
@@ -0,0 +1,55 @@
+%define MODULE_NAME appcore-widget
+%define MODULE_LIBNAME capi-appfw-widget-application
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(widget_viewer)
+BuildRequires:  pkgconfig(widget_viewer_evas)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-appcore-widget-tests.xml b/packaging/utc/core-appcore-widget-tests.xml
new file mode 100755 (executable)
index 0000000..445a1be
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-appcore-widget-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreAppcoreWidgetTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.appcore-widget-tests" exec="/opt/usr/apps/core-appcore-widget-tests/bin/tct-appcore-widget-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-application-tests.spec b/packaging/utc/core-application-tests.spec
new file mode 100755 (executable)
index 0000000..525bd28
--- /dev/null
@@ -0,0 +1,58 @@
+%define MODULE_NAME application
+%define MODULE_LIBNAME capi-appfw-application
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(capi-appfw-preference)
+BuildRequires:  pkgconfig(capi-appfw-alarm)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/data
+
+%post
+chown -R 5000:5000 /opt/usr/apps/%{name}/data
+chsmack -a %{name} /opt/usr/apps/%{name}/data
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-application-tests.xml b/packaging/utc/core-application-tests.xml
new file mode 100755 (executable)
index 0000000..ec909cb
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-application-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreApplicationTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.application-tests" exec="/opt/usr/apps/core-application-tests/bin/tct-application-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    <label>CoreApplicationTest</label>
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/alarm.set</privilege>
+        <privilege>http://tizen.org/privilege/alarm.get</privilege>
+        <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-audio-io-tests.spec b/packaging/utc/core-audio-io-tests.spec
new file mode 100755 (executable)
index 0000000..bd22175
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME audio-io
+%define MODULE_LIBNAME capi-media-audio-io
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-audio-io-tests.xml b/packaging/utc/core-audio-io-tests.xml
new file mode 100755 (executable)
index 0000000..b490a77
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-audio-io-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreAudioIoTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.audio-io-tests" exec="/opt/usr/apps/core-audio-io-tests/bin/tct-audio-io-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+       <privilege>http://tizen.org/privilege/recorder</privilege>
+       <privilege>http://tizen.org/privilege/mediastorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-badge-tests.spec b/packaging/utc/core-badge-tests.spec
new file mode 100755 (executable)
index 0000000..a439c31
--- /dev/null
@@ -0,0 +1,47 @@
+%define MODULE_NAME badge
+%define MODULE_LIBNAME badge
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-badge-tests.xml b/packaging/utc/core-badge-tests.xml
new file mode 100755 (executable)
index 0000000..257197d
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-badge-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreBadgeTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.badge-tests" exec="/opt/usr/apps/core-badge-tests/bin/tct-badge-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/notification</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-base-utils-tests.spec b/packaging/utc/core-base-utils-tests.spec
new file mode 100755 (executable)
index 0000000..6275144
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME base-utils
+%define MODULE_LIBNAME capi-base-utils-i18n
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-base-utils-tests.xml b/packaging/utc/core-base-utils-tests.xml
new file mode 100755 (executable)
index 0000000..422e19f
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-base-utils-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreBaseUtilsTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.base-utils-tests" exec="/opt/usr/apps/core-base-utils-tests/bin/tct-base-utils-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-bluetooth-tests.spec b/packaging/utc/core-bluetooth-tests.spec
new file mode 100755 (executable)
index 0000000..79c581b
--- /dev/null
@@ -0,0 +1,48 @@
+%define MODULE_NAME bluetooth
+%define MODULE_LIBNAME capi-network-bluetooth
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-bluetooth-tests.xml b/packaging/utc/core-bluetooth-tests.xml
new file mode 100755 (executable)
index 0000000..6a68c35
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-bluetooth-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreBluetoothTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.bluetooth-tests" exec="/opt/usr/apps/core-bluetooth-tests/bin/tct-bluetooth-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+       <privilege>http://tizen.org/privilege/bluetooth</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-bundle-tests.spec b/packaging/utc/core-bundle-tests.spec
new file mode 100755 (executable)
index 0000000..cd89446
--- /dev/null
@@ -0,0 +1,52 @@
+%define MODULE_NAME bundle
+%define MODULE_LIBNAME bundle
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-bundle-tests.xml b/packaging/utc/core-bundle-tests.xml
new file mode 100755 (executable)
index 0000000..7930a39
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-bundle-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreBundleTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.bundle-tests" exec="/opt/usr/apps/core-bundle-tests/bin/tct-bundle-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-cairo-tests.spec b/packaging/utc/core-cairo-tests.spec
new file mode 100755 (executable)
index 0000000..7856690
--- /dev/null
@@ -0,0 +1,54 @@
+%define MODULE_NAME cairo
+%define MODULE_LIBNAME cairo
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0, Samsung Properietary
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(cairo)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-cairo-tests.xml b/packaging/utc/core-cairo-tests.xml
new file mode 100755 (executable)
index 0000000..74b7297
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-cairo-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreCairoTest</label>
+    <author email="test@samsung.com" href="www.samsung.com">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.cairo-tests" exec="/opt/usr/apps/core-cairo-tests/bin/tct-cairo-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-camera-tests.spec b/packaging/utc/core-camera-tests.spec
new file mode 100755 (executable)
index 0000000..8f0a619
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME camera
+%define MODULE_LIBNAME capi-media-camera
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gthread-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-camera-tests.xml b/packaging/utc/core-camera-tests.xml
new file mode 100755 (executable)
index 0000000..f651b5d
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-camera-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreCameraTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.camera-tests" exec="/opt/usr/apps/core-camera-tests/bin/tct-camera-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/camera</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-capi-media-tool-tests.spec b/packaging/utc/core-capi-media-tool-tests.spec
new file mode 100755 (executable)
index 0000000..53f9b13
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME capi-media-tool
+%define MODULE_LIBNAME capi-media-tool
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gthread-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(libtbm)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-capi-media-tool-tests.xml b/packaging/utc/core-capi-media-tool-tests.xml
new file mode 100755 (executable)
index 0000000..cb9fa81
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-capi-media-tool-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreCapiMediaToolTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.capi-media-tool-tests" exec="/opt/usr/apps/core-capi-media-tool-tests/bin/tct-capi-media-tool-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-capi-message-port-tests.spec b/packaging/utc/core-capi-message-port-tests.spec
new file mode 100755 (executable)
index 0000000..fbfd63f
--- /dev/null
@@ -0,0 +1,58 @@
+%define MODULE_NAME capi-message-port
+%define MODULE_LIBNAME capi-message-port
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-appfw-app-manager)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+install -m 755 src/utc/capi-message-port/core-capi-message-port-tests.sh %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+/opt/usr/apps/%{name}/bin/%{name}.sh
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-capi-message-port-tests.xml b/packaging/utc/core-capi-message-port-tests.xml
new file mode 100755 (executable)
index 0000000..dec4d7b
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-capi-message-port-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreCapiMessagePortTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.capi-message-port-tests" exec="/opt/usr/apps/core-capi-message-port-tests/bin/tct-capi-message-port-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+           <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-connection-tests.spec b/packaging/utc/core-connection-tests.spec
new file mode 100755 (executable)
index 0000000..3fac4b1
--- /dev/null
@@ -0,0 +1,50 @@
+%define MODULE_NAME connection
+%define MODULE_LIBNAME capi-network-connection
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-network-wifi)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-connection-tests.xml b/packaging/utc/core-connection-tests.xml
new file mode 100755 (executable)
index 0000000..19fb229
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-connection-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreConnectionTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.connection-tests" exec="/opt/usr/apps/core-connection-tests/bin/tct-connection-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+       <privilege>http://tizen.org/privilege/network.get</privilege>
+       <privilege>http://tizen.org/privilege/network.set</privilege>
+       <privilege>http://tizen.org/privilege/network.profile</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-context-manager-tests.spec b/packaging/utc/core-context-manager-tests.spec
new file mode 100755 (executable)
index 0000000..1fbcce3
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME context-manager
+%define MODULE_LIBNAME libcore-context-manager
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-context-manager-tests.xml b/packaging/utc/core-context-manager-tests.xml
new file mode 100755 (executable)
index 0000000..2629d1e
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-context-manager-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreContextManagerTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.context-manager-tests" exec="/opt/usr/apps/core-context-manager-tests/bin/tct-context-manager-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-data-control-tests.spec b/packaging/utc/core-data-control-tests.spec
new file mode 100755 (executable)
index 0000000..32a1f54
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME data-control
+%define MODULE_LIBNAME capi-data-control
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+
+%pre
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-data-control-tests.xml b/packaging/utc/core-data-control-tests.xml
new file mode 100755 (executable)
index 0000000..a9f89e2
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-data-control-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreLABELTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.data-control-tests" exec="/opt/usr/apps/core-data-control-tests/bin/tct-data-control-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/datasharing</privilege>
+        <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-device-tests.spec b/packaging/utc/core-device-tests.spec
new file mode 100755 (executable)
index 0000000..a461cfb
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME device
+%define MODULE_LIBNAME capi-system-device
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-device-tests.xml b/packaging/utc/core-device-tests.xml
new file mode 100755 (executable)
index 0000000..2d8b7d9
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-device-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreDeviceTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.device-tests" exec="/opt/usr/apps/core-device-tests/bin/tct-device-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/display</privilege>
+               <privilege>http://tizen.org/privilege/haptic</privilege>
+               <privilege>http://tizen.org/privilege/led</privilege>
+               <privilege>http://tizen.org/privilege/power</privilege>
+       </privileges>
+</manifest>
diff --git a/packaging/utc/core-dlog-tests.spec b/packaging/utc/core-dlog-tests.spec
new file mode 100755 (executable)
index 0000000..f4dfa10
--- /dev/null
@@ -0,0 +1,48 @@
+%define MODULE_NAME dlog
+%define MODULE_LIBNAME dlog
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-dlog-tests.xml b/packaging/utc/core-dlog-tests.xml
new file mode 100755 (executable)
index 0000000..335378a
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-dlog-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreDlogTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.dlog-tests" exec="/opt/usr/apps/core-dlog-tests/bin/tct-dlog-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-efl-ext-tests.spec b/packaging/utc/core-efl-ext-tests.spec
new file mode 100755 (executable)
index 0000000..328ee7d
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME efl-ext
+%define MODULE_LIBNAME efl-extension
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0, Samsung Properietary
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-efl-ext-tests.xml b/packaging/utc/core-efl-ext-tests.xml
new file mode 100755 (executable)
index 0000000..566d899
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-efl-ext-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreEflExtTest</label>
+    <author email="test@samsung.com" href="www.samsung.com">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.efl-ext-tests" exec="/opt/usr/apps/core-efl-ext-tests/bin/tct-efl-ext-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-efl-util-tests.spec b/packaging/utc/core-efl-util-tests.spec
new file mode 100755 (executable)
index 0000000..f65022e
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME efl-util
+%define MODULE_LIBNAME capi-ui-efl-util
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-efl-util-tests.xml b/packaging/utc/core-efl-util-tests.xml
new file mode 100755 (executable)
index 0000000..4bd1951
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-efl-util-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreEflUtilTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.efl-util-tests" exec="/opt/usr/apps/core-efl-util-tests/bin/tct-efl-util-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+    <privilege>http://tizen.org/privilege/window.priority.set</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-image-util-tests.spec b/packaging/utc/core-image-util-tests.spec
new file mode 100755 (executable)
index 0000000..8e9f3b0
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME image-util
+%define MODULE_LIBNAME capi-media-image-util
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+
+%postun
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-image-util-tests.xml b/packaging/utc/core-image-util-tests.xml
new file mode 100755 (executable)
index 0000000..33b9d2d
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-image-util-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreImageUtilTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.image-util-tests" exec="/opt/usr/apps/core-image-util-tests/bin/tct-image-util-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/mediastorage</privilege>
+        <privilege>http://tizen.org/privilege/externalstrorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-key-manager-tests.spec b/packaging/utc/core-key-manager-tests.spec
new file mode 100755 (executable)
index 0000000..6417884
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME key-manager
+%define MODULE_LIBNAME key-manager
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+chsmack -a "_" /opt/etc/ssl/certs/dfb08fe4.0
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+/opt/etc/ssl/certs/dfb08fe4.0
diff --git a/packaging/utc/core-key-manager-tests.xml b/packaging/utc/core-key-manager-tests.xml
new file mode 100755 (executable)
index 0000000..0934ce1
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-key-manager-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreKeyManagerTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.key-manager-tests" exec="/opt/usr/apps/core-key-manager-tests/bin/tct-key-manager-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/keymanager</privilege>
+        <privilege>http://tizen.org/privilege/mediastorage</privilege>
+        <privilege>http://tizen.org/privilege/externalstrorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-libstorage-tests.spec b/packaging/utc/core-libstorage-tests.spec
new file mode 100755 (executable)
index 0000000..bd9f3d3
--- /dev/null
@@ -0,0 +1,50 @@
+%define MODULE_NAME libstorage
+%define MODULE_LIBNAME storage
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-libstorage-tests.xml b/packaging/utc/core-libstorage-tests.xml
new file mode 100755 (executable)
index 0000000..4120aaa
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-libstorage-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreLibstorageTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.libstorage-tests" exec="/opt/usr/apps/core-libstorage-tests/bin/tct-libstorage-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-location-manager-tests.spec b/packaging/utc/core-location-manager-tests.spec
new file mode 100755 (executable)
index 0000000..da48418
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME location-manager
+%define MODULE_LIBNAME capi-location-manager
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-location-manager-tests.xml b/packaging/utc/core-location-manager-tests.xml
new file mode 100755 (executable)
index 0000000..98fbfcd
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-location-manager-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreLocationManagerTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.location-manager-tests" exec="/opt/usr/apps/core-location-manager-tests/bin/tct-location-manager-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/location</privilege>
+               <privilege>http://tizen.org/privilege/location.enable</privilege>
+       </privileges>
+</manifest>
diff --git a/packaging/utc/core-media-content-tests.spec b/packaging/utc/core-media-content-tests.spec
new file mode 100755 (executable)
index 0000000..1c3eac4
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME media-content
+%define MODULE_LIBNAME capi-content-media-content
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+/usr/bin/mediadb-update -r /opt/usr/media
+
+%postun
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-media-content-tests.xml b/packaging/utc/core-media-content-tests.xml
new file mode 100755 (executable)
index 0000000..58d0aea
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-media-content-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreMediaContentTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.media-content-tests" exec="/opt/usr/apps/core-media-content-tests/bin/tct-media-content-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+         <privileges>
+             <privilege>http://tizen.org/privilege/content.write</privilege>
+             <privilege>http://tizen.org/privilege/mediastorage</privilege>
+         </privileges>
+</manifest>
diff --git a/packaging/utc/core-media-key-tests.spec b/packaging/utc/core-media-key-tests.spec
new file mode 100755 (executable)
index 0000000..19fd5ae
--- /dev/null
@@ -0,0 +1,52 @@
+%define MODULE_NAME media-key
+%define MODULE_LIBNAME capi-system-media-key
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-media-key-tests.xml b/packaging/utc/core-media-key-tests.xml
new file mode 100755 (executable)
index 0000000..46e5ad3
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-media-key-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreMediaKeyTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.media-key-tests" exec="/opt/usr/apps/core-media-key-tests/bin/tct-media-key-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-mediacodec-tests.spec b/packaging/utc/core-mediacodec-tests.spec
new file mode 100755 (executable)
index 0000000..0a827b0
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME mediacodec
+%define MODULE_LIBNAME capi-media-codec
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-mediacodec-tests.xml b/packaging/utc/core-mediacodec-tests.xml
new file mode 100755 (executable)
index 0000000..0c358ff
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-mediacodec-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CorePlayerTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.mediacodec-tests" exec="/opt/usr/apps/core-mediacodec-tests/bin/tct-mediacodec-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-messages-tests.spec b/packaging/utc/core-messages-tests.spec
new file mode 100755 (executable)
index 0000000..99ab452
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME messages
+%define MODULE_LIBNAME capi-messaging-messages
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-messages-tests.xml b/packaging/utc/core-messages-tests.xml
new file mode 100755 (executable)
index 0000000..c45d000
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-messages-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreMessagesTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.messages-tests" exec="/opt/usr/apps/core-messages-tests/bin/tct-messages-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/message.read</privilege>
+        <privilege>http://tizen.org/privilege/message.write</privilege>
+        <privilege>http://tizen.org/privilege/mediastorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-metadata-extractor-tests.spec b/packaging/utc/core-metadata-extractor-tests.spec
new file mode 100755 (executable)
index 0000000..784e429
--- /dev/null
@@ -0,0 +1,46 @@
+%define MODULE_NAME metadata-extractor
+%define MODULE_LIBNAME capi-media-metadata-extractor
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-metadata-extractor-tests.xml b/packaging/utc/core-metadata-extractor-tests.xml
new file mode 100755 (executable)
index 0000000..7b29182
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-metadata-extractor-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreMetadataExtractorTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.metadata-extractor-tests" exec="/opt/usr/apps/core-metadata-extractor-tests/bin/tct-metadata-extractor-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/mediastorage</privilege>  
+       </privileges>
+</manifest>
diff --git a/packaging/utc/core-mime-type-tests.spec b/packaging/utc/core-mime-type-tests.spec
new file mode 100755 (executable)
index 0000000..e165882
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME mime-type
+%define MODULE_LIBNAME capi-content-mime-type
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-mime-type-tests.xml b/packaging/utc/core-mime-type-tests.xml
new file mode 100755 (executable)
index 0000000..4b520a9
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-mime-type-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreMimeTypeTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.mime-type-tests" exec="/opt/usr/apps/core-mime-type-tests/bin/tct-mime-type-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-native-common-tests.spec b/packaging/utc/core-native-common-tests.spec
new file mode 100755 (executable)
index 0000000..8cab999
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME native-common
+%define MODULE_LIBNAME native-common
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-native-common-tests.xml b/packaging/utc/core-native-common-tests.xml
new file mode 100755 (executable)
index 0000000..30247ff
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-native-common-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreNativeCommonTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.native-common-tests" exec="/opt/usr/apps/core-native-common-tests/bin/tct-native-common-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-nfc-tests.spec b/packaging/utc/core-nfc-tests.spec
new file mode 100755 (executable)
index 0000000..c51f71f
--- /dev/null
@@ -0,0 +1,48 @@
+%define MODULE_NAME nfc
+%define MODULE_LIBNAME capi-nfc
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(capi-network-nfc)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-nfc-tests.xml b/packaging/utc/core-nfc-tests.xml
new file mode 100755 (executable)
index 0000000..0eecdb9
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-nfc-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreNfcTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.nfc-tests" exec="/opt/usr/apps/core-nfc-tests/bin/tct-nfc-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/nfc</privilege>
+        <privilege>http://tizen.org/privilege/nfc.cardemulation</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-notification-tests.spec b/packaging/utc/core-notification-tests.spec
new file mode 100755 (executable)
index 0000000..bcf09e5
--- /dev/null
@@ -0,0 +1,47 @@
+%define MODULE_NAME notification
+%define MODULE_LIBNAME notification
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-notification-tests.xml b/packaging/utc/core-notification-tests.xml
new file mode 100755 (executable)
index 0000000..5f2f64e
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-notification-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreNotificationTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.notification-tests" exec="/opt/usr/apps/core-notification-tests/bin/tct-notification-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/notification</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-package-manager-tests.spec b/packaging/utc/core-package-manager-tests.spec
new file mode 100755 (executable)
index 0000000..c51d2c4
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME package-manager
+%define MODULE_LIBNAME capi-appfw-package-manager
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+
+%post
+chown -R app:app /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" /opt/usr/apps/%{name}/bin
+chsmack -a "%{name}" -e "%{name}" /opt/usr/apps/%{name}/bin/*
+
+%postun
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-package-manager-tests.xml b/packaging/utc/core-package-manager-tests.xml
new file mode 100755 (executable)
index 0000000..3b53e1f
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-package-manager-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CorePackageManagerTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.package-manager-tests" exec="/opt/usr/apps/core-package-manager-tests/bin/tct-package-manager-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+       <privilege>http://tizen.org/privilege/mediastorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-player-tests.spec b/packaging/utc/core-player-tests.spec
new file mode 100755 (executable)
index 0000000..45cae21
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME player
+%define MODULE_LIBNAME capi-media-player
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gthread-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-player-tests.xml b/packaging/utc/core-player-tests.xml
new file mode 100755 (executable)
index 0000000..8291f6e
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-player-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CorePlayerTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.player-tests" exec="/opt/usr/apps/core-player-tests/bin/tct-player-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/externalstorage</privilege>
+        <privilege>http://tizen.org/privilege/mediastorage</privilege>
+        <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+        <privilege>http://tizen.org/privilege/content.write</privilege>
+        <privilege>http://tizen.org/privilege/internet</privilege>
+        <privilege>http://tizen.org/privilege/notification</privilege>
+        <privilege>http://tizen.org/privilege/location</privilege>
+        <privilege>http://tizen.org/privilege/camera</privilege>
+        <privilege>http://tizen.org/privilege/display</privilege>
+        <privilege>http://tizen.org/privilege/download</privilege>
+        <privilege>http://tizen.org/privilege/network.get</privilege>
+        <privilege>http://tizen.org/privilege/network.profile</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-privilege-info-tests.spec b/packaging/utc/core-privilege-info-tests.spec
new file mode 100755 (executable)
index 0000000..fcf5129
--- /dev/null
@@ -0,0 +1,50 @@
+%define MODULE_NAME privilege-info
+%define MODULE_LIBNAME privilege-info
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:         pkgconfig(dlog)
+BuildRequires: pkgconfig(capi-security-privilege-manager)
+BuildRequires:  pkgconfig(capi-appfw-application)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
+
diff --git a/packaging/utc/core-privilege-info-tests.xml b/packaging/utc/core-privilege-info-tests.xml
new file mode 100755 (executable)
index 0000000..ab907e9
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-privilege-info-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CorePrivilegeInfoTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.privilege-info-tests" exec="/opt/usr/apps/core-privilege-info-tests/bin/tct-privilege-info-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-push-tests.spec b/packaging/utc/core-push-tests.spec
new file mode 100755 (executable)
index 0000000..deb69dc
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME push
+%define MODULE_LIBNAME push
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(libcurl)
+BuildRequires:  pkgconfig(json-glib-1.0)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(capi-system-info)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-push-tests.xml b/packaging/utc/core-push-tests.xml
new file mode 100755 (executable)
index 0000000..9362462
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-push-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CorePushTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.push-tests" exec="/opt/usr/apps/core-push-tests/bin/tct-push-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+           <privilege>http://tizen.org/privilege/push</privilege>
+           <privilege>http://tizen.org/privilege/internet</privilege>
+           <privilege>http://tizen.org/privilege/notification</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-radio-tests.spec b/packaging/utc/core-radio-tests.spec
new file mode 100755 (executable)
index 0000000..7764476
--- /dev/null
@@ -0,0 +1,48 @@
+%define MODULE_NAME radio
+%define MODULE_LIBNAME capi-media-radio
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-radio-tests.xml b/packaging/utc/core-radio-tests.xml
new file mode 100755 (executable)
index 0000000..f37185c
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-radio-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreRadioTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.radio-tests" exec="/opt/usr/apps/core-radio-tests/bin/tct-radio-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
+
diff --git a/packaging/utc/core-recorder-tests.spec b/packaging/utc/core-recorder-tests.spec
new file mode 100755 (executable)
index 0000000..cbcb1dd
--- /dev/null
@@ -0,0 +1,52 @@
+%define MODULE_NAME recorder
+%define MODULE_LIBNAME capi-media-recorder
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gthread-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(capi-media-camera)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-recorder-tests.xml b/packaging/utc/core-recorder-tests.xml
new file mode 100755 (executable)
index 0000000..8d753a2
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-recorder-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreRecorderTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.recorder-tests" exec="/opt/usr/apps/core-recorder-tests/bin/tct-recorder-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/camera</privilege>
+        <privilege>http://tizen.org/privilege/recorder</privilege>
+        <privilege>http://tizen.org/privilege/mediastorage</privilege>
+        <privilege>http://tizen.org/privilege/externalstorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-runtime-info-tests.spec b/packaging/utc/core-runtime-info-tests.spec
new file mode 100755 (executable)
index 0000000..7099111
--- /dev/null
@@ -0,0 +1,47 @@
+%define MODULE_NAME runtime-info
+%define MODULE_LIBNAME capi-system-runtime-info
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-runtime-info-tests.xml b/packaging/utc/core-runtime-info-tests.xml
new file mode 100755 (executable)
index 0000000..8d4b9da
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-runtime-info-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreRuntimeInfoTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.runtime-info-tests" exec="/opt/usr/apps/core-runtime-info-tests/bin/tct-runtime-info-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-sensor-tests.spec b/packaging/utc/core-sensor-tests.spec
new file mode 100755 (executable)
index 0000000..31140a0
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME sensor
+%define MODULE_LIBNAME capi-system-sensor
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-sensor-tests.xml b/packaging/utc/core-sensor-tests.xml
new file mode 100755 (executable)
index 0000000..a32dfcc
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-sensor-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreSensorTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.sensor-tests" exec="/opt/usr/apps/core-sensor-tests/bin/tct-sensor-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/healthinfo</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-smartcard-tests.spec b/packaging/utc/core-smartcard-tests.spec
new file mode 100755 (executable)
index 0000000..5d7f604
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME smartcard
+%define MODULE_LIBNAME capi-network-smartcard
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0, Samsung Properietary
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-smartcard-tests.xml b/packaging/utc/core-smartcard-tests.xml
new file mode 100755 (executable)
index 0000000..8476cfd
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-smartcard-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreSmartcardTest</label>
+    <author email="test@samsung.com" href="www.samsung.com">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.smartcard-tests" exec="/opt/usr/apps/core-smartcard-tests/bin/tct-smartcard-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+               <privilege>http://tizen.org/privilege/secureelement</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-sound-manager-tests.spec b/packaging/utc/core-sound-manager-tests.spec
new file mode 100755 (executable)
index 0000000..17409fd
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME sound-manager
+%define MODULE_LIBNAME capi-media-sound-manager
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+
diff --git a/packaging/utc/core-sound-manager-tests.xml b/packaging/utc/core-sound-manager-tests.xml
new file mode 100755 (executable)
index 0000000..1abd519
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-sound-manager-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreSoundManagerTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.sound-manager-tests" exec="/opt/usr/apps/core-sound-manager-tests/bin/tct-sound-manager-core" nodisplay="false" multiple="true" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+      <privilege>http://tizen.org/privilege/volume.set</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-stt-tests.spec b/packaging/utc/core-stt-tests.spec
new file mode 100755 (executable)
index 0000000..71896f5
--- /dev/null
@@ -0,0 +1,53 @@
+%define MODULE_NAME stt
+%define MODULE_LIBNAME stt
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data
+cp src/utc/stt/res/ringtone.wav %{buildroot}%{APP_PATH}%{name}/data/ringtone.wav
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+chown -R 5000:5000 %{APP_PATH}%{name}/data
+chsmack -a %{name} %{APP_PATH}%{name}/data
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-stt-tests.xml b/packaging/utc/core-stt-tests.xml
new file mode 100755 (executable)
index 0000000..2435927
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-stt-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreSttTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.stt-tests" exec="/opt/usr/apps/core-stt-tests/bin/tct-stt-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+       <privileges>
+               <privilege>http://tizen.org/privilege/recorder</privilege>
+       </privileges>
+</manifest>
diff --git a/packaging/utc/core-system-info-tests.spec b/packaging/utc/core-system-info-tests.spec
new file mode 100755 (executable)
index 0000000..6db1baf
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME system-info
+%define MODULE_LIBNAME capi-system-info
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-system-info-tests.xml b/packaging/utc/core-system-info-tests.xml
new file mode 100755 (executable)
index 0000000..1a0783e
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-system-info-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreSystemInfoTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.system-info-tests" exec="/opt/usr/apps/core-system-info-tests/bin/tct-system-info-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-system-settings-tests.spec b/packaging/utc/core-system-settings-tests.spec
new file mode 100755 (executable)
index 0000000..5662fc2
--- /dev/null
@@ -0,0 +1,50 @@
+%define MODULE_NAME system-settings
+%define MODULE_LIBNAME capi-system-system-settings
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(dlog)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+
+%post
+
+%postun
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-system-settings-tests.xml b/packaging/utc/core-system-settings-tests.xml
new file mode 100755 (executable)
index 0000000..6835526
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-system-settings-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreSystemSettingsTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.system-settings-tests" exec="/opt/usr/apps/core-system-settings-tests/bin/tct-system-settings-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-tbm-tests.spec b/packaging/utc/core-tbm-tests.spec
new file mode 100755 (executable)
index 0000000..709f313
--- /dev/null
@@ -0,0 +1,48 @@
+%define MODULE_NAME tbm
+%define MODULE_LIBNAME libtbm
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-tbm-tests.xml b/packaging/utc/core-tbm-tests.xml
new file mode 100755 (executable)
index 0000000..e5a298b
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-tbm-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreTbmTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.tbm-tests" exec="/opt/usr/apps/core-tbm-tests/bin/tct-tbm-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-telephony-tests.spec b/packaging/utc/core-telephony-tests.spec
new file mode 100755 (executable)
index 0000000..d45d368
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME telephony
+%define MODULE_LIBNAME capi-telephony
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-telephony-tests.xml b/packaging/utc/core-telephony-tests.xml
new file mode 100755 (executable)
index 0000000..fad5bb9
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-telephony-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreTelephonyTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.telephony-tests" exec="/opt/usr/apps/core-telephony-tests/bin/tct-telephony-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+      <privilege>http://tizen.org/privilege/telephony</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-tone-player-tests.spec b/packaging/utc/core-tone-player-tests.spec
new file mode 100755 (executable)
index 0000000..fbe291c
--- /dev/null
@@ -0,0 +1,48 @@
+%define MODULE_NAME tone-player
+%define MODULE_LIBNAME capi-media-tone-player
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-tone-player-tests.xml b/packaging/utc/core-tone-player-tests.xml
new file mode 100755 (executable)
index 0000000..19734df
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-tone-player-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreTonePlayerTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.tone-player-tests" exec="/opt/usr/apps/core-tone-player-tests/bin/tct-tone-player-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-tts-tests.spec b/packaging/utc/core-tts-tests.spec
new file mode 100755 (executable)
index 0000000..45521a5
--- /dev/null
@@ -0,0 +1,51 @@
+%define MODULE_NAME tts
+%define MODULE_LIBNAME tts
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-tts-tests.xml b/packaging/utc/core-tts-tests.xml
new file mode 100755 (executable)
index 0000000..f49f482
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-tts-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreTtsTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.tts-tests" exec="/opt/usr/apps/core-tts-tests/bin/tct-tts-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-wav-player-tests.spec b/packaging/utc/core-wav-player-tests.spec
new file mode 100755 (executable)
index 0000000..38b636e
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME wav-player
+%define MODULE_LIBNAME capi-media-wav-player
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-wav-player-tests.xml b/packaging/utc/core-wav-player-tests.xml
new file mode 100755 (executable)
index 0000000..66625e4
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-wav-player-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreWavPlayerTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.wav-player-tests" exec="/opt/usr/apps/core-wav-player-tests/bin/tct-wav-player-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+     <privileges>
+        <privilege>http://tizen.org/privilege/mediastorage</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-webkit2-tests.spec b/packaging/utc/core-webkit2-tests.spec
new file mode 100755 (executable)
index 0000000..87a9402
--- /dev/null
@@ -0,0 +1,59 @@
+%define MODULE_NAME webkit2
+%define MODULE_LIBNAME ewebkit2
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(ecore-evas)
+BuildRequires:  pkgconfig(edje)
+BuildRequires:  pkgconfig(eina)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-2.0)
+BuildRequires:  pkgconfig(x11)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(storage)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-webkit2-tests.xml b/packaging/utc/core-webkit2-tests.xml
new file mode 100755 (executable)
index 0000000..6762544
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-webkit2-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreWebkit2Test</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.webkit2-tests" exec="/opt/usr/apps/core-webkit2-tests/bin/tct-webkit2-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="false">
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+        <privilege>http://tizen.org/privilege/content.write</privilege>
+        <privilege>http://tizen.org/privilege/internet</privilege>
+        <privilege>http://tizen.org/privilege/notification</privilege>
+        <privilege>http://tizen.org/privilege/location</privilege>
+        <privilege>http://tizen.org/privilege/camera</privilege>
+        <privilege>http://tizen.org/privilege/externalstorage</privilege>
+        <privilege>http://tizen.org/privilege/mediastorage</privilege>
+        <privilege>http://tizen.org/privilege/display</privilege>
+        <privilege>http://tizen.org/privilege/network.get</privilege>
+    </privileges>
+</manifest>
diff --git a/packaging/utc/core-widget_service-tests.spec b/packaging/utc/core-widget_service-tests.spec
new file mode 100755 (executable)
index 0000000..63f306b
--- /dev/null
@@ -0,0 +1,60 @@
+%define MODULE_NAME widget_service
+%define MODULE_LIBNAME widget_service
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(widget_viewer_evas)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+arch=`uname -a | grep arm`
+if [ x"$arch" == x"" ]; then
+       pkgcmd -i -t tpk -q -p /opt/usr/media/org.tizen.sample-1.0.0-i386.tpk &
+       pkgcmd -i -t tpk -q -p /opt/usr/media/org.tizen.sample.crash-1.0.0-i386.tpk &
+else
+       pkgcmd -i -t tpk -q -p /opt/usr/memdia/org.tizen.sample-1.0.0-arm.tpk &
+       pkgcmd -i -t tpk -q -p /opt/usr/media/org.tizen.sample.crash-1.0.0-arm.tpk &
+fi
+
+%postun
+pkgcmd -u -q -n org.tizen.sample &
+pkgcmd -u -q -n org.tizen.sample.crash &
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+/opt/usr/media/*
diff --git a/packaging/utc/core-widget_service-tests.xml b/packaging/utc/core-widget_service-tests.xml
new file mode 100755 (executable)
index 0000000..18a5122
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-widget_service-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreWidgetServiceTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.widget_service-tests" exec="/opt/usr/apps/core-widget_service-tests/bin/tct-widget_service-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/packaging/utc/core-widget_viewer_evas-tests.spec b/packaging/utc/core-widget_viewer_evas-tests.spec
new file mode 100755 (executable)
index 0000000..fbae74f
--- /dev/null
@@ -0,0 +1,65 @@
+%define MODULE_NAME widget_viewer_evas
+%define MODULE_LIBNAME widget_viewer_evas
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(capi-appfw-application)
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+function install_pkgs()
+{
+       arch=`uname -a | grep arm`
+       if [ x"$arch" == x"" ]; then
+               pkgcmd -i -t tpk -q -p /opt/usr/media/org.tizen.sample-1.0.0-i386.tpk
+       else
+               pkgcmd -i -t tpk -q -p /opt/usr/media/org.tizen.sample-1.0.0-arm.tpk
+       fi
+}
+install_pkgs &
+
+%postun
+function uninstall_pkgs()
+{
+       pkgcmd -u -q -n org.tizen.sample
+}
+uninstall_pkgs &
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
+/opt/usr/media/*
diff --git a/packaging/utc/core-widget_viewer_evas-tests.xml b/packaging/utc/core-widget_viewer_evas-tests.xml
new file mode 100755 (executable)
index 0000000..fe2204e
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-widget_viewer_evas-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>Core widget_viewer_evas test</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.widget_viewer_evas-tests" exec="/opt/usr/apps/core-widget_viewer_evas-tests/bin/tct-widget_viewer_evas-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+               <privilege>http://tizen.org/privilege/widget.viewer</privilege>
+    </privileges>
+
+</manifest>
diff --git a/packaging/utc/core-wifi-tests.spec b/packaging/utc/core-wifi-tests.spec
new file mode 100755 (executable)
index 0000000..44c25a4
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME wifi
+%define MODULE_LIBNAME capi-network-wifi
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(dlog)
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/packaging/utc/core-wifi-tests.xml b/packaging/utc/core-wifi-tests.xml
new file mode 100755 (executable)
index 0000000..b342c0f
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-wifi-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreWifiTest</label>
+    <author email="test@tizen.org" href="www.tizen.org">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core.wifi-tests" exec="/opt/usr/apps/core-wifi-tests/bin/tct-wifi-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+    <privileges>
+       <privilege>http://tizen.org/privilege/network.get</privilege>
+       <privilege>http://tizen.org/privilege/network.set</privilege>
+       <privilege>http://tizen.org/privilege/network.profile</privilege>
+    </privileges>
+</manifest>
diff --git a/scripts/BAT_gen.sh b/scripts/BAT_gen.sh
new file mode 100755 (executable)
index 0000000..d80af50
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+if [ -z "$1" ]; then
+   echo "Please specify tct dir"
+   echo "Usage : ${0} TCT_location"
+   exit 1
+fi
+TCT_DIR=$1
+if [ ! -d "$TCT_DIR" ]; then
+   echo "Directory not exists"
+   exit 1
+fi
+cd $TCT_DIR
+
+touch ./tclist.txt
+truncate -s 0 ./tclist.txt
+
+for tdir in src/itc src/ctc src/utc; do
+   for dir in $tdir/*; do
+      find ./$dir -name "tct-*.h" | xargs grep "extern int" > tclist_temp.txt
+      sed -i -e '1d' -e '2d' -e '3d' ./tclist_temp.txt
+      cat ./tclist_temp.txt >> ./tclist.txt
+      rm -f ./tclist_temp.txt
+   done
+done
+
+sed -i "s/.*extern int //g" ./tclist.txt
+sed -i "s/(void);//" ./tclist.txt
+
+mkdir -p custom_tclist || true
+cat ./tclist.txt > ./custom_tclist/BAT.list
+rm -f ./tclist.txt
diff --git a/scripts/appmanagerinstall.sh b/scripts/appmanagerinstall.sh
new file mode 100755 (executable)
index 0000000..6722b9c
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+ARCH=`uname -m`
+if [ "$ARCH" == 'armv7l' ]
+then
+       if [ -f /opt/usr/apps/native-app-manager-itc/data/org.tizen.appmanagertestfile-1.0.0-arm.tpk ]
+       then
+               pkgcmd -i -t tpk -p /opt/usr/apps/native-app-manager-itc/data/org.tizen.appmanagertestfile-1.0.0-arm.tpk
+       fi
+       if [ -f /opt/usr/apps/native-app-manager-itc/data/org.tizen.testapplication-1.0.0-arm.tpk ]
+       then
+               pkgcmd -i -t tpk -p /opt/usr/apps/native-app-manager-itc/data/org.tizen.testapplication-1.0.0-arm.tpk
+       fi
+else
+       if [ -f /opt/usr/apps/native-app-manager-itc/data/org.tizen.appmanagertestfile-1.0.0-i386.tpk ]
+       then
+               pkgcmd -i -t tpk -p /opt/usr/apps/native-app-manager-itc/data/org.tizen.appmanagertestfile-1.0.0-i386.tpk
+       fi
+       if [ -f /opt/usr/apps/native-app-manager-itc/data/org.tizen.testapplication-1.0.0-i386.tpk ]
+       then
+               pkgcmd -i -t tpk -p /opt/usr/apps/native-app-manager-itc/data/org.tizen.testapplication-1.0.0-i386.tpk
+       fi
+fi
diff --git a/scripts/autocompletion.sh b/scripts/autocompletion.sh
new file mode 100755 (executable)
index 0000000..873d954
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if [ -z "$TC_PROJECT_DIR" ]; then
+    echo "CoreAPI project directory can't be found. `basename $0` exitting..."
+    exit 1
+fi
+
+_tcbuild () {
+    local cur
+    cur=${COMP_WORDS[$COMP_CWORD]}
+    if [ $COMP_CWORD -eq 1 ]; then
+        COMPREPLY=( $( compgen -W "addmod build cleanbuild build.platform build.public build.nonpriv install rmmod" -- $cur ) )
+    else #if [ $COMP_CWORD -eq 2 ]; then
+        COMPREPLY=( $( cd $TC_PROJECT_DIR/src; compgen -d -X "common" -- $cur ) )
+    fi
+    return 0
+}
+
+complete -F _tcbuild tcbuild
+complete -F _tcbuild tcbuildsdk
\ No newline at end of file
diff --git a/scripts/init.sh b/scripts/init.sh
new file mode 100755 (executable)
index 0000000..7d6fe50
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+PROJECT_DIR="$(cd "$(dirname $0)" && cd .. && pwd)"
+
+mkdir $PROJECT_DIR/tmp
+
+ln -s $PROJECT_DIR/scripts/tcbuild.sh $PROJECT_DIR/tcbuild
+ln -s $PROJECT_DIR/scripts/tcbuildsdk.sh $PROJECT_DIR/tcbuildsdk
+
+echo "" >> $HOME/.bashrc
+echo "# CoreAPI-tests convenience helpers" >> $HOME/.bashrc
+echo "export TC_PROJECT_DIR=\"$PROJECT_DIR\"" >> $HOME/.bashrc
+echo "source $PROJECT_DIR/scripts/autocompletion.sh" >> $HOME/.bashrc
diff --git a/scripts/retriever.sh b/scripts/retriever.sh
new file mode 100755 (executable)
index 0000000..dd29a9b
--- /dev/null
@@ -0,0 +1,238 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+USAGE=$(cat <<EOF
+Usage note: retriever.sh [option] [directory]
+Options:
+  none    retrieve TC names with corresponding startup and cleanup functions
+  -f      retrieveve TC name with corresponding "set" and "purpose" clauses
+  -anum   retrieve automatic TC number
+  -mnum   retrieve manual TC number
+
+In case of TC in form of "int tc_name()" script will abort.
+("int tc_name(void)" is a proper function signature)
+EOF
+)
+
+function get_tc_files {
+    CMAKE_FILE="$DIR/CMakeLists.txt"
+    if [ ! -e $CMAKE_FILE ]; then
+        echo "File $CMAKE_FILE for $DIR not found. Aborting..."
+        exit 1
+    fi
+
+    TC_FILES=$(cat $CMAKE_FILE | awk -vDIR="$DIR" '
+    BEGIN {
+        flag = 0;
+        files = "";
+    }
+    /^SET\(TC_SOURCES/ {
+        flag = 1;
+        next;
+    }
+    /\)/ {
+        if (flag == 1)
+            exit;
+    }
+    !/^ *#/ {
+        if (flag == 1) {
+            if (files == "")
+                files = DIR "/" $1;
+            else
+                files = files " " DIR "/" $1;
+        }
+    }
+    END {
+        print files;
+    }')
+}
+
+function tc_names {
+    if [[ -z "$1" ]]; then
+        exit
+    fi
+
+    awk '
+    BEGIN {
+        OFS = ",";
+        start_fun = "NULL";
+        clean_fun = "NULL";
+        err_flag = 0;
+        tc_list = "";
+        curr_file = "";
+    }
+    {
+        if(FILENAME != curr_file) {
+            start_fun = "NULL";
+            clean_fun = "NULL";
+            curr_file = FILENAME;
+        }
+    }
+    /^void .*startup\(void\)/ {
+        gsub(/^void /, "");
+        gsub(/\(void\)$/,"");
+        start_fun = $0
+    }
+    /^void .*cleanup\(void\)/ {
+        gsub(/^void /, "");
+        gsub(/\(void\)$/,"");
+        clean_fun = $0
+    }
+    /^int .*\(\)/ {
+        print "Warning: function with empty argument list -- \"" $0 "\" in " FILENAME ":" FNR;
+        err_flag = 1;
+    }
+    /^int .*\(void\)/ {
+        gsub(/^int /, "");
+        gsub(/\(void\).*/,"");
+        if (tc_list != "") tc_list = tc_list "\n";
+        tc_list = tc_list $0 OFS start_fun OFS clean_fun
+    }
+    END {
+        if (err_flag) {
+            exit 1
+        } else {
+            print tc_list
+        }
+    }
+    ' $*
+}
+
+TFILE="/tmp/tnum.csv"
+SCRIPT_DIR="$(cd "$(dirname $0)" && pwd)"
+function tc_anum2 {
+        if [ -f /tmp/temp2 ];then
+                       rm /tmp/temp2
+               fi
+        tc_fullinfo $TC_FILES > ${TFILE}_pre
+
+               cat ${TFILE}_pre | sort -t',' -k2,2 -s > ${TFILE}_remove
+               awk '!x[$0]++' ${TFILE}_remove > $TFILE
+
+        for fname in `cat $SCRIPT_DIR/../exclude.list`
+        do
+           sed -i "/$fname/d" $TFILE
+        done
+
+       count=$(cat $TFILE |wc -l)
+        echo $count
+
+        rm $TFILE ${TFILE}_pre ${TFILE}_remove
+}
+
+function tc_anum {
+    awk '
+    BEGIN {
+        count = 0;
+        err_flag = 0;
+    }
+    /^int .*\(\)/ {
+        print "Warning: function with empty argument list -- \"" $0 "\" in " FILENAME ":" FNR;
+        err_flag = 1;
+    }
+    /^int .*\(void\)$/ {
+        count++;
+    }
+    END {
+        if (err_flag) {
+            exit 1
+        } else {
+            print count
+        }
+    }
+    ' $*
+}
+
+function tc_mnum {
+    # TODO: fix this hardcoded value
+    echo 0
+}
+
+function tc_fullinfo {
+    awk '
+    BEGIN {
+        OFS=",";
+        purpose = "";
+        set = "Default";
+        err_flag = 0;
+        tc_list = "";
+    }
+    /^\/\/& purpose:/ {
+        purpose = $3;
+        for (i = 4; i <= NF; i++) {
+            purpose = purpose " " $i;
+        }
+        next;
+    }
+    /^int .*\(\)/ {
+        print "Warning: function with empty argument list -- \"" $0 "\" in " FILENAME ":" FNR;
+        err_flag = 1;
+    }
+    /^int .*\(void\)$/ {
+        gsub(/^int /, "");
+        gsub(/\(void\)$/,"");
+        if (tc_list != "") tc_list = tc_list "\n";
+        tc_list = tc_list $0 OFS set OFS purpose;
+        purpose = "";
+        next
+    }
+    END {
+        if (err_flag) {
+            exit 1
+        } else {
+            print tc_list
+        }
+    }
+    ' $*
+}
+
+
+# usage note and exit:
+# - argument begin with '-' but is not recognised or number of arguments is > 2,
+# - argument doesn't begin with '-' and number of arguments is > 1
+if [[ ( "$1" == -* && ( ! "$1" =~ ^-(anum|mnum|f)$ || $# > 2 ) ) || ( "$1" != -* && $# > 1 ) ]]; then
+    echo -e "$USAGE"
+    exit 1
+fi
+
+
+# get directory from last argument (or assume current one)
+if [[ ! "$1" =~ ^-(anum|mnum|f)$ ]]; then
+    DIR=${1:-.}
+else
+    DIR=${2:-.}
+fi
+
+
+# populate $TC_FILES with files declared in CMakeLists.txt
+get_tc_files $DIR
+if [ $? != 0 ]; then
+    exit 1
+fi
+
+
+# run appropriate subcommand
+case "$1" in
+    -anum)
+        tc_anum2 $TC_FILES ;;
+    -mnum)
+        tc_mnum $TC_FILES ;;
+    -f)
+        tc_fullinfo $TC_FILES ;;
+    *)
+        tc_names $TC_FILES ;;
+esac
diff --git a/scripts/summary.sh b/scripts/summary.sh
new file mode 100755 (executable)
index 0000000..4408b0e
--- /dev/null
@@ -0,0 +1,147 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<?xml-stylesheet type=\"text/xsl\" href=\"./style/summary.xsl\"?>
+<result_summary plan_name=\"0804_Emul\">
+  <environment manufacturer=\"samsung\" screen_size=\"0mm x 0mm\" resolution=\"480 x 800\" host=\"Linux-3.5.0-23-generic-i686-with-Ubuntu-12.04-precise\" device_name=\"localhost  \" device_model=\"KIRAN\" device_id=\"m0804_1\" build_id=\"KIRANSDEKE0\">
+    <other xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"xs:string\" />
+  </environment>
+  <summary test_plan_name=\"0804_Emul\">
+    <start_at>-</start_at>
+    <end_at>-</end_at>
+  </summary>
+  <capabilities>
+    <capability type=\"boolean\" support=\"true\" name=\"screenSize720_1280\" />
+    <capability type=\"boolean\" support=\"true\" name=\"telephony\" />
+    <capability type=\"boolean\" support=\"true\" name=\"shellAppWidget\" />
+    <capability type=\"boolean\" support=\"false\" name=\"sipVoip\" />
+    <capability type=\"boolean\" support=\"true\" name=\"wifiDirect\" />
+    <capability type=\"boolean\" support=\"true\" name=\"location\" />
+    <capability type=\"boolean\" support=\"true\" name=\"screenOutputHdmi\" />
+    <capability type=\"boolean\" support=\"true\" name=\"secureElement\" />
+    <capability type=\"boolean\" support=\"true\" name=\"nfc\" />
+    <capability type=\"boolean\" support=\"true\" name=\"cameraBackFlash\" />
+    <capability type=\"boolean\" support=\"true\" name=\"openglesVersion1_1\" />
+    <capability type=\"boolean\" support=\"true\" name=\"camera\" />
+    <capability type=\"boolean\" support=\"true\" name=\"usbAccessory\" />
+    <capability type=\"boolean\" support=\"true\" name=\"bluetooth\" />
+    <capability type=\"boolean\" support=\"false\" name=\"gyroscopeWakeup\" />
+    <capability type=\"boolean\" support=\"true\" name=\"wifi\" />
+    <capability type=\"boolean\" support=\"true\" name=\"cameraFront\" />
+    <capability type=\"boolean\" support=\"false\" name=\"proximityWakeup\" />
+    <capability type=\"boolean\" support=\"true\" name=\"proximity\" />
+    <capability type=\"boolean\" support=\"true\" name=\"visionFaceRecognition\" />
+    <capability type=\"boolean\" support=\"true\" name=\"tiltmeter\" />
+    <capability type=\"String\" support=\"true\" name=\"platformName\">
+      <value>Tizen</value>
+    </capability>
+    <capability type=\"boolean\" support=\"true\" name=\"cameraBack\" />
+    <capability type=\"boolean\" support=\"true\" name=\"gyroscope\" />
+    <capability type=\"boolean\" support=\"true\" name=\"visionQrcodeGeneration\" />
+    <capability type=\"boolean\" support=\"true\" name=\"locationGps\" />
+    <capability type=\"boolean\" support=\"true\" name=\"nfcReservedPush\" />
+    <capability type=\"boolean\" support=\"true\" name=\"screenSizeNormal\" />
+    <capability type=\"boolean\" support=\"true\" name=\"dataEncryption\" />
+    <capability type=\"boolean\" support=\"false\" name=\"cameraFrontFlash\" />
+    <capability type=\"boolean\" support=\"false\" name=\"barometerWakeup\" />
+    <capability type=\"boolean\" support=\"true\" name=\"visionQrcodeRecognition\" />
+    <capability type=\"boolean\" support=\"false\" name=\"barometer\" />
+    <capability type=\"String\" support=\"true\" name=\"nativeApiVersion\">
+      <value>2.2</value>
+    </capability>
+    <capability type=\"boolean\" support=\"false\" name=\"tiltmeterWakeup\" />
+    <capability type=\"boolean\" support=\"true\" name=\"push\" />
+    <capability type=\"Integer\" support=\"true\" name=\"multiTouchCount\">
+      <value>10</value>
+    </capability>
+    <capability type=\"boolean\" support=\"false\" name=\"screenOutputRca\" />
+    <capability type=\"String\" support=\"true\" name=\"openglestextureFormat\">
+      <value>etc</value>
+    </capability>
+    <capability type=\"boolean\" support=\"true\" name=\"graphicsAcceleration\" />
+    <capability type=\"boolean\" support=\"true\" name=\"accelerometer\" />
+    <capability type=\"boolean\" support=\"true\" name=\"telephonyMms\" />
+    <capability type=\"boolean\" support=\"true\" name=\"autoRotation\" />
+    <capability type=\"boolean\" support=\"false\" name=\"inputKeyboardLayout\" />
+    <capability type=\"String\" support=\"true\" name=\"profile\">
+      <value>MOBILE_FULL</value>
+    </capability>
+    <capability type=\"boolean\" support=\"true\" name=\"speechSynthesis\" />
+    <capability type=\"boolean\" support=\"true\" name=\"telephonySms\" />
+    <capability type=\"String\" support=\"true\" name=\"webApiVersion\">
+      <value>2.2</value>
+    </capability>
+    <capability type=\"boolean\" support=\"false\" name=\"inputKeyboard\" />
+    <capability type=\"boolean\" support=\"true\" name=\"accelerometerWakeup\" />
+    <capability type=\"boolean\" support=\"true\" name=\"speechRecognition\" />
+    <capability type=\"boolean\" support=\"true\" name=\"visionImageRecognition\" />
+    <capability type=\"boolean\" support=\"true\" name=\"nativeOspCompatible\" />
+    <capability type=\"boolean\" support=\"true\" name=\"photometer\" />
+    <capability type=\"String\" support=\"true\" name=\"platformCoreCpuArch\">
+      <value>armv7</value>
+    </capability>
+    <capability type=\"boolean\" support=\"true\" name=\"magnetometer\" />
+    <capability type=\"boolean\" support=\"true\" name=\"usbHost\" />
+    <capability type=\"boolean\" support=\"true\" name=\"openglesVersion2_0\" />
+    <capability type=\"String\" support=\"true\" name=\"platformVersion\">
+      <value>2.2.0</value>
+    </capability>
+    <capability type=\"boolean\" support=\"false\" name=\"fmRadio\" />
+    <capability type=\"boolean\" support=\"false\" name=\"screenSize480_800\" />
+    <capability type=\"boolean\" support=\"false\" name=\"photometerWakeup\" />
+    <capability type=\"boolean\" support=\"true\" name=\"locationWps\" />
+    <capability type=\"boolean\" support=\"false\" name=\"magnetometerWakeup\" />
+    <capability type=\"boolean\" support=\"true\" name=\"opengles\" />
+    <capability type=\"String\" support=\"true\" name=\"platformCoreFpuArch\">
+      <value>vfpv3</value>
+    </capability>
+    <capability type=\"boolean\" support=\"true\" name=\"microphone\" />
+  </capabilities>" >> summary
+
+for FILE in `ls *.xml`
+do
+    N_FILE=`echo $FILE | sed s/\.xml//`
+    N_PASS=`grep -c 'result="PASS"' $FILE`
+    N_FAIL=`grep -c 'result="FAIL"' $FILE`
+    N_BLOCK=`grep -c 'result="BLOCK"' $FILE`
+    N_NOTRUN=`grep -c 'result="N/A"' $FILE`
+    N_TESTS=`echo "$N_PASS $N_FAIL $N_BLOCK $N_NOTRUN" | awk '{ tmp=($1+$2+$3+$4); printf "%d", tmp }'`
+    N_PRATE=`echo "$N_PASS $N_TESTS" | awk '{ tmp=($1/$2)*100; printf "%.2f", tmp }'`
+    N_FRATE=`echo "$N_FAIL $N_TESTS" | awk '{ tmp=($1/$2)*100; printf "%.2f", tmp }'`
+    N_BRATE=`echo "$N_BLOCK $N_TESTS" | awk '{ tmp=($1/$2)*100; printf "%.2f", tmp }'`
+    N_NRATE=`echo "$N_NOTRUN $N_TESTS" | awk '{ tmp=($1/$2)*100; printf "%.2f", tmp }'`
+
+    echo "<suite name=\"$N_FILE\">" >> summary
+    echo "<total_case>$N_TESTS</total_case>" >> summary
+    echo "<pass_case>$N_PASS</pass_case>" >> summary
+    echo "<pass_rate>$N_PRATE</pass_rate>" >> summary
+    echo "<fail_case>$N_FAIL</fail_case>" >> summary
+    echo "<fail_rate>$N_FRATE</fail_rate>" >> summary
+    echo "<block_case>$N_BLOCK</block_case>" >> summary
+    echo "<block_rate>$N_BRATE</block_rate>" >> summary
+    echo "<na_case>$N_NOTRUN</na_case>" >> summary 
+    echo "<na_rate>$N_NRATE</na_rate>" >> summary
+    echo "</suite>" >> summary
+done
+echo "</result_summary>" >> summary
+
+cp ../testresult.xsl .
+cp -R ../style .
+
+echo "CSV file generated."
+
diff --git a/scripts/tcbuild.sh b/scripts/tcbuild.sh
new file mode 100755 (executable)
index 0000000..3e2e596
--- /dev/null
@@ -0,0 +1,459 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#---------- DEBUG_BEGIN ----------
+#ARG="-d" # debug-on flag, might be set as $1
+# keyprompt "introductory message" -- wait until any key pressed
+function keyprompt { echo -ne "\n\e[1;31m$1 -- " && read -n 1 && echo -e "\n\e[0m"; }
+# d_bp -- breakpoint at which user need to press any key to proceed
+function d_bp { if [[ "$ARG" == "-d" ]]; then keyprompt "d >> Press any key"; fi }
+# d_showVar VARNAME -- print bash variable name
+function d_showVar { if [ "$ARG" == "-d" -a -n "$1" ]; then echo "d >> ${1} = ${!1}"; fi }
+# d_print "message" -- print a debug message
+function d_print { if [ "$ARG" == "-d" -a -n "$1" ]; then echo -e "d >> $1"; fi }
+#----------  DEBUG_END  ----------
+PROJECT_DIR="$(cd "$(dirname $0)" && pwd)"
+d_showVar PROJECT_DIR
+RPM_DIR="$HOME/GBS-ROOT-TCT-WEARABLE/local/repos/device/armv7l/RPMS"
+OBS_URL="http://168.219.209.58:82/TCT:/2.3.1:/Wearable/target/armv7l/"
+d_showVar RPM_DIR
+
+INSTALL_PKG_COUNT=0
+
+function forcekill {
+       echo "CTRL-C was pressed"
+       echo "Exiting script.."
+       rename 's/\.backup/\.spec/' packaging/itc/* 2>&1 &
+       rename 's/\.backup/\.spec/' packaging/ctc/* 2>&1 &
+       rename 's/\.backup/\.spec/' packaging/utc/* 2>&1 &
+       exit 1
+}
+trap forcekill 2
+
+function download
+{
+       echo "Removing all the rpm from location : $RPM_DIR"
+       if [ -d $RPM_DIR ]; then
+               rm -rf $RPM_DIR/*.rpm
+               if [ $? -ne 0 ]; then
+                       echo "Unable to remove the rpm files. Please check for permission(try with sudo)"
+                       return
+               fi
+       fi
+       echo "Source Location : $OBS_URL"
+       echo "Destination Location : $RPM_DIR"
+       echo "Downloading rpm files...."
+       wget -q -l1 -nd -r -P $RPM_DIR -A rpm $OBS_URL
+       if [ $? -ne 0 ]; then
+               echo "Unable to download rpm files. Please check for permission(try with sudo)"
+               return
+       fi
+       ls $RPM_DIR | tr '\n' '\n'
+       count=`ls -l $RPM_DIR | wc -l`
+       count=$((count - 1))
+       echo "Total downloaded rpm file: $count"
+}
+
+function CheckBuildFailStatus
+{
+       Result=`cat ./build.log | grep -rin "the following packages failed to build"`
+       if [[ $Result != "" ]]
+       then
+               mkdir -p ./BuildFailLogsDevice
+               cp ./build.log ./BuildFailLogsDevice/native-$2-$1.txt
+       fi
+}
+
+function update
+{
+       echo "Updating..."
+       for buildtype in `ls -1 src/ | grep -v CMakeList`
+       do
+               if [ $buildtype != 'common' ] && [ $buildtype != 'manual' ]; then
+                       PREFIX="native"
+                       if [ $buildtype == "utc" ]; then
+                           PREFIX="core"
+                       fi
+
+                       for modname in `ls -1 src/$buildtype/ | grep -v CMakeList`
+                       do
+                               (cd src/$buildtype/$modname/; ../../../scripts/tcheadgen.sh tct-$modname-$PREFIX.h)
+               
+                       done
+               fi
+
+       done
+       echo "Update done"
+}
+
+function build {
+APP_DIR=/opt/usr/apps/
+TAG_SPEC=$1
+PREFIX="native"
+    if [ -n "$2" ]; then
+       if [ $2 != 'common' ] && [ $2 != 'manual' ]; then
+           if [ $1 == "utc" ]; then
+                 TAG_SPEC="tests"
+                 PREFIX="core"
+            fi
+        (cd src/$1/$2/; ../../../scripts/tcheadgen.sh tct-$2-$PREFIX.h)
+       if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
+       echo "*************START BUILDING $1:$PREFIX-$2-$TAG_SPEC*****************"             
+       rename 's/\.spec/\.backup/' packaging/$1/*
+       mv packaging/$1/$PREFIX-$2-$TAG_SPEC.backup packaging/$1/$PREFIX-$2-$TAG_SPEC.spec
+
+       
+       #If rpm is already there then remove it
+       TAG_SPEC_RM=$1
+       MOD_NAME="$2"
+       PKG_NAME="$PREFIX-$MOD_NAME-$TAG_SPEC_RM"
+       filename=`find $RPM_DIR -name $PKG_NAME\*`
+       if [ -n "$filename" ]; then
+               rm -f $filename
+       fi
+
+       gbs --conf tct.conf build -A armv7l --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" -P device | \
+            tee build.log | stdbuf -o0 sed -e 's/error:/\x1b[1;91m&\x1b[0m/' \
+                                           -e 's/warning:/\x1b[93m&\x1b[0m/'
+       CheckBuildFailStatus $1 $2
+       fi
+    else 
+        if [ -n "$1" ]; then
+               if [ $1 != 'common' ] && [ $1 != 'manual' ]; then
+                       for mod in `ls -1 src/$1/ | grep -v CMakeList`
+                       do
+                       if [ $mod != 'common' ] && [ $mod != 'manual' ]; then
+                               build $1 $mod
+                       fi
+                       done
+               fi
+       else
+               for buildtype in `ls -1 src/ | grep -v CMakeList`
+               do
+                       build $buildtype
+               done
+       fi
+    fi
+}
+
+function add_module {
+    # argument check
+    if [ -z "$2" ]; then echo "Usage: `basename $0` addmod <build_type> <module_name>"; exit 1; fi
+    if [ $1 != "itc" ] && [ $1 != "ctc" ] && [ $1 != "utc" ]; then echo "Usage: `basename $0` addmod <build_type> <module_name> ; <build_type> = itc or ctc or utc"; exit 1; fi
+
+    BUILD_TYPE=$1
+    MODULE_NAME=$2
+    d_showVar MODULE_NAME
+    MODULE_NAME_C=$(echo $MODULE_NAME | sed -e 's/-\([a-z]\)/\U\1/' -e 's/^\([a-z]\)/\U\1/')
+    d_showVar MODULE_NAME_C
+    MODULE_NAME_U=$(echo $MODULE_NAME | sed -e 's/-/_/g')
+    d_showVar MODULE_NAME_U
+    MODULE_LIBNAME=$2
+    d_showVar MODULE_LIBNAME
+    TAG_SPEC=$BUILD_TYPE
+    PREFIX="native"
+    if [ $1 == "utc" ]; then
+       TAG_SPEC="tests"
+       PREFIX="core"
+    fi
+    
+    HEADER_TOP=$(echo $2 | tr '[:lower:]' '[:upper:]' | sed -e 's/-/_/g' -e 's/\./_/')
+    echo "Adding $BUILD_TYPE:->$MODULE_NAME module to project..."
+    d_bp
+    cd $PROJECT_DIR
+    # prepare .spec file
+    echo "-- Generating packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.spec file"
+    if [ ! -d packaging ]; then mkdir packaging; fi
+    if [ ! -d packaging/$BUILD_TYPE ]; then cd packaging; mkdir $BUILD_TYPE; cd ..; fi
+    sed -e "s:\[MODULE_NAME\]:$MODULE_NAME:g" -e "s:\[MODULE_LIBNAME\]:$MODULE_LIBNAME:g" \
+        templates/src-directory/$BUILD_TYPE/$PREFIX-\[module_name\]-$TAG_SPEC.spec > packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.spec
+    echo "-- Generating packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.xml manifest file"
+    LABEL=${MODULE_NAME^}
+    LABEL=`echo $LABEL | sed -e 's/-\(\w\)/\U\1/g'`
+    sed -e "s:MODULE:$MODULE_NAME:g" -e "s:LABEL:$LABEL:g" \
+        templates/src-directory/$BUILD_TYPE/$PREFIX-\[module_name\]-$TAG_SPEC.xml > packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.xml
+    # prepare src directory
+    mkdir src/$BUILD_TYPE/$MODULE_NAME
+    echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/CMakeLists.txt file"
+    sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" -e "s:%{MODULE_LIBNAME}:$MODULE_LIBNAME:g" \
+        templates/src-directory/$BUILD_TYPE/CMakeLists.txt > src/$BUILD_TYPE/$MODULE_NAME/CMakeLists.txt
+    echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/tct-$MODULE_NAME-$PREFIX.c file"
+    sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" \
+        templates/src-directory/$BUILD_TYPE/tct-\[module_name\]-$PREFIX.c > src/$BUILD_TYPE/$MODULE_NAME/tct-$MODULE_NAME-$PREFIX.c
+        
+    if [ $BUILD_TYPE == "itc" ]; then
+       # generate ITs file
+       echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME.c file"
+       sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" -e "s:%{MODULE_NAME_U}:$MODULE_NAME_U:g" -e "s:%{MODULE_NAME_C}:$MODULE_NAME_C:g" \
+        templates/src-directory/$BUILD_TYPE/ITs-\[module_name\].c > src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME.c
+       
+       # generate Common C file
+       echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME-common.c file"
+       sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" \
+        templates/src-directory/$BUILD_TYPE/ITs-\[module_name\]-common.c > src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME-common.c
+       
+       # generate Common header file
+       echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME-common.h file"
+       sed -e "s:%{MODULE_NAME_U}:$MODULE_NAME_U:g" -e "s:%{MODULE_NAME_C}:$MODULE_NAME_C:g" -e "s:%{HEADER_TOP}:$HEADER_TOP:g" \
+        templates/src-directory/$BUILD_TYPE/ITs-\[module_name\]-common.h > src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME-common.h
+    else
+       if [ $BUILD_TYPE == "ctc" ]; then
+               # generate ctc file
+               echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME.c file"
+               sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" -e "s:%{MODULE_NAME_U}:$MODULE_NAME_U:g" -e "s:%{MODULE_NAME_C}:$MODULE_NAME_C:g" \
+               templates/src-directory/$BUILD_TYPE/\[module_name\].c > src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME.c
+       
+               # generate Common C file
+               echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME-common.c file"
+               sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" \
+        templates/src-directory/$BUILD_TYPE/\[module_name\]-common.c > src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME-common.c
+       
+               # generate Common header file
+               echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME-common.h file"
+               sed -e "s:%{MODULE_NAME_U}:$MODULE_NAME_U:g" -e "s:%{MODULE_NAME_C}:$MODULE_NAME_C:g" -e "s:%{HEADER_TOP}:$HEADER_TOP:g" \
+               templates/src-directory/$BUILD_TYPE/\[module_name\]-common.h > src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME-common.h
+       else
+               # generate utc file
+               echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/utc-$MODULE_NAME.c file"
+               sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" -e "s:%{MODULE_NAME_U}:$MODULE_NAME_U:g" -e "s:%{MODULE_NAME_C}:$MODULE_NAME_C:g" \
+               templates/src-directory/$BUILD_TYPE/utc-\[module_name\].c > src/$BUILD_TYPE/$MODULE_NAME/utc-$MODULE_NAME.c
+        fi
+    fi
+    echo "Task finished successfully"
+}
+
+function rm_module {
+    # argument check
+    if [ -z "$2" ]; then echo "Usage: `basename $0` rmmod <build_type> <module_name>"; exit 1; fi
+    if [ $1 != "itc" ] && [ $1 != "ctc" ] && [ $1 != "utc" ]; then echo "Usage: `basename $0` rmmod <build_type> <module_name> ; <build_type> = itc or ctc or utc"; exit 1; fi
+
+    BUILD_TYPE=$1
+    MODULE_NAME=$2
+    d_showVar BUILD_TYPE
+    d_showVar MODULE_NAME
+    TAG_SPEC=$BUILD_TYPE
+    PREFIX="native"
+    if [ $1 == "utc" ]; then
+       TAG_SPEC="tests"
+       PREFIX="core"
+    fi
+    
+    TIZEN____="tizen_core_2.3.1"
+
+    echo "Removing $BUILD_TYPE:->$MODULE_NAME module from project..."
+    TO_PKG_DIR="/opt/tct/$TIZEN____/packages"
+    echo "---- Updating $TO_PKG_DIR/pkg_infos/wearable_pkg_info.xml"
+    scripts/tcpackageslistsgen.sh $MODULE_NAME $TO_PKG_DIR/pkg_infos/wearable_pkg_info.xml 1 $BUILD_TYPE
+
+    if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
+   
+    cd $PROJECT_DIR
+    echo "-- Removing packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.spec file"
+    rm packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.spec
+    echo "-- Removing packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.xml file"
+    rm packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.xml
+    echo "-- Removing src/$BUILD_TYPE/$MODULE_NAME directory"
+    rm -r src/$BUILD_TYPE/$MODULE_NAME
+    echo "Task finished successfully"
+}
+
+function inst {
+       if [ -z "$1" ]; then
+               for buildtype in `ls -1 src/ | grep -v CMakeList`
+                       do
+                       if [ $buildtype != 'common' ] && [ $buildtype != 'manual' ]; then
+                               inst $buildtype
+                       fi
+                       done
+       else
+               if [ -z "$2" ]; then
+                       for mod in `ls -1 src/$1/ | grep -v CMakeList`
+                               do
+                               if [ $mod != 'common' ] && [ $mod != 'manual' ]; then
+                                       inst $1 $mod rpm_check
+                               fi
+                               done
+               else
+                       TAG_SPEC=$1
+                       PREFIX="native"
+                       PREFIX_PKG_NAME="native"
+                       TAG_SPEC_PKG_NAME=$1
+                       if [ $1 == "utc" ]; then
+                                TAG_SPEC="tests"
+                                PREFIX="core"
+                       fi
+                       cd $PROJECT_DIR
+                       # setting variables
+                       BUILDTC_TYPE="$1"
+                       d_showVar BUILDTC_TYPE
+                       MOD_NAME="$2"
+                       d_showVar MOD_NAME
+                       PKG_NAME="$PREFIX-$MOD_NAME-$TAG_SPEC"
+                       d_showVar PKG_NAME
+                       VER=$(cat packaging/$BUILDTC_TYPE/$PREFIX-$MOD_NAME-$TAG_SPEC.spec | awk '/^Version:/ { print $2; exit; }')
+                       d_showVar VER
+                       PKG_VNAME="$PKG_NAME-$VER"
+                       d_showVar PKG_VNAME
+                       
+                       #get rpm file name from rpm dir                 
+                       filename=`find $RPM_DIR -name $PKG_VNAME\*`
+                       filename=${filename##*/}
+                       #get version info from rpm file 
+                       rpm_ver_ext=${filename##*-}
+                       
+                       PKG_FNAME="$PKG_VNAME-$rpm_ver_ext"
+                       d_showVar PKG_FNAME
+                       TIZEN____="tizen_core_2.3.1"
+                       TCT_DIR="opt/tct-$MOD_NAME-$PREFIX_PKG_NAME-$TAG_SPEC_PKG_NAME"
+                       TO_PKG_DIR="/opt/tct/$TIZEN____/packages"
+                       d_showVar TCT_DIR
+                       d_bp
+                       if [ ! -f $RPM_DIR/$PKG_FNAME ] && [ $3 == "rpm_check" ] ;then
+                               return;
+                       fi      
+                       echo "********************START Installing $1:$2**********************"
+                       # prepare tct directory and files
+                       echo "-- Preparing suite .zip file..."
+                       echo "---- Creating /tmp/$TCT_DIR directory"
+                       rm -r /tmp/opt > /dev/null 2>&1
+                       mkdir -p /tmp/$TCT_DIR
+                       #copy res
+                       if [ -d src/$1/$2/res ]; then
+                               cp -rf src/$1/$2/res /tmp/$TCT_DIR
+                       fi
+                       #copy ext_wrapper.sh
+                       cp templates/external_wrapper.sh /tmp/$TCT_DIR/
+                       # rpm
+                       echo "---- Copying rpm package to /tmp/$TCT_DIR package"
+                       if [ -f $RPM_DIR/$PKG_FNAME ];then      
+                               cp $RPM_DIR/$PKG_FNAME /tmp/$TCT_DIR
+                       else
+                               echo "---- $RPM_DIR/$PKG_FNAME package not found"
+                               echo "---- $1:$2 Installation Failed"
+                               return
+                       fi
+                       if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
+                       # 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}:\"/opt/usr/media/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
+                       echo "---- Generating /tmp/$TCT_DIR"
+                       scripts/tctestsgen.sh $MOD_NAME /tmp/$TCT_DIR $BUILDTC_TYPE
+                       if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
+                       # zip
+                       echo "---- Preparing /tmp/tct/packages/tct-$MOD_NAME-$PREFIX_PKG_NAME-$TAG_SPEC_PKG_NAME-2.3.1.zip file"
+                       # clear old zips
+                       rm -r /tmp/tct/packages > /dev/null 2>&1
+                       mkdir -p /tmp/tct/packages
+                       # create new zip
+                       ( cd /tmp; zip -r /tmp/tct/packages/tct-$MOD_NAME-$PREFIX_PKG_NAME-$TAG_SPEC_PKG_NAME-2.3.1.zip opt > /dev/null 2>&1; )
+                       # deployment
+                       echo "-- Suite deployment..."
+                       echo "---- Package copying to $TO_PKG_DIR/tct-$MOD_NAME-$PREFIX_PKG_NAME-$TAG_SPEC_PKG_NAME-2.3.1.zip"
+                       cp /tmp/tct/packages/tct-$MOD_NAME-$PREFIX_PKG_NAME-$TAG_SPEC_PKG_NAME-2.3.1.zip $TO_PKG_DIR/wearable/
+                       echo "---- Updating the file $TO_PKG_DIR/pkg_infos/wearable_pkg_info.xml"
+                       scripts/tcpackageslistsgen.sh $MOD_NAME $TO_PKG_DIR/pkg_infos/wearable_pkg_info.xml 0 $BUILDTC_TYPE
+                       if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
+                       echo "Task finished successfully"
+                       cd $PROJECT_DIR
+                       echo "$1:->$2" >> install.log
+                       INSTALL_PKG_COUNT=$((INSTALL_PKG_COUNT+1))
+               fi
+       fi
+}
+
+function RenameSpecAndCheckBuildFail {
+       rename 's/\.backup/\.spec/' packaging/itc/*
+       rename 's/\.backup/\.spec/' packaging/ctc/*
+       rename 's/\.backup/\.spec/' packaging/utc/*
+       if [ -d ./BuildFailLogsDevice ]; then
+               COUNT=`ls -1 ./BuildFailLogsDevice | wc -l`
+               if [[ $COUNT -gt 0 ]]; then
+                       echo ""
+                       echo "=== Following packages failed to build. Total failures count : $COUNT === "
+                       ls -1 ./BuildFailLogsDevice | while read PACKAGENAME
+                       do
+                               PACKAGE=`echo $PACKAGENAME | sed 's/\.[^.]*$//'`
+                               ABSPATH=`pwd`"/BuildFailLogsDevice"
+                               echo "$PACKAGE : $ABSPATH/$PACKAGENAME"
+                       done
+               fi
+               echo ""
+       fi
+       cd $PROJECT_DIR
+       rm -f build.log
+}
+
+function helpusage {
+# usage note
+    echo "Usage: `basename $0` <addmod|rmmod|build|install> <build_type> <module_name>"
+    echo "Usage: `basename $0` <download|update>"
+    echo "<build_type> = itc|ctc|utc"
+    echo "commands description:"
+    echo "       addmod      add a new module"
+    echo "       rmmod       remove a module"
+    echo "       build       performs GBS build with --keep-packs option"
+    echo "       install     install packages"
+    echo "       download    download rpm packages from obs link to GBS RPMS location"
+    echo "       update      update all the modules header file."
+    echo "To build|install all the packages (itc,ctc and utc), usage: `basename $0` build|install"
+    echo "To build|install all packages of a <build_type>, usage: `basename $0` build|install <build_type>"
+    echo "addmod|rmmod is specific to build_type and module_name, usage: `basename $0` <addmod|rmmod> <build_type> <module_name>"
+    echo ""
+    exit 1
+}
+
+if [ -z "$1" ]; then
+    echo ""
+    helpusage
+elif [ "addmod" == "$1" ]; then
+    # add new module
+    add_module $2 $3
+elif [ "rmmod" == "$1" ]; then
+    # remove module
+    rm_module $2 $3
+elif [ "build" == "$1" ]; then
+    if [ -d ./BuildFailLogsDevice ];then
+               rm -rf ./BuildFailLogsDevice
+       fi
+       build $2 $3
+       RenameSpecAndCheckBuildFail
+elif [ "download" == "$1" ]; then
+       download
+elif [ "update" == "$1" ]; then
+       update 
+elif [ "install" == "$1" ]; then
+    # install
+    INSTALL_PKG_COUNT=0
+    echo "**********************************************" > install.log
+    echo "Following packages get installed successfully:" >> install.log
+    inst $2 $3
+    echo "" >> install.log
+    echo "Total Install PASS Count = $INSTALL_PKG_COUNT" >> install.log
+    echo "**********************************************" >> install.log
+    if [ -z $3 ]; then
+       cat install.log
+    fi
+    rm install.log
+else
+    echo ""
+    echo "Invalid subcommand: $1"
+    helpusage
+fi
diff --git a/scripts/tcbuildsdk.sh b/scripts/tcbuildsdk.sh
new file mode 100755 (executable)
index 0000000..c9ccb40
--- /dev/null
@@ -0,0 +1,459 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#---------- DEBUG_BEGIN ----------
+#ARG="-d" # debug-on flag, might be set as $1
+# keyprompt "introductory message" -- wait until any key pressed
+function keyprompt { echo -ne "\n\e[1;31m$1 -- " && read -n 1 && echo -e "\n\e[0m"; }
+# d_bp -- breakpoint at which user need to press any key to proceed
+function d_bp { if [[ "$ARG" == "-d" ]]; then keyprompt "d >> Press any key"; fi }
+# d_showVar VARNAME -- print bash variable name
+function d_showVar { if [ "$ARG" == "-d" -a -n "$1" ]; then echo "d >> ${1} = ${!1}"; fi }
+# d_print "message" -- print a debug message
+function d_print { if [ "$ARG" == "-d" -a -n "$1" ]; then echo -e "d >> $1"; fi }
+#----------  DEBUG_END  ----------
+PROJECT_DIR="$(cd "$(dirname $0)" && pwd)"
+d_showVar PROJECT_DIR
+RPM_DIR="$HOME/GBS-ROOT-TCT-WEARABLE/local/repos/sdk/i586/RPMS"
+OBS_URL="http://168.219.209.58:82/TCT:/2.3.1:/Wearable/emulator/i586/"
+d_showVar RPM_DIR
+INSTALL_PKG_COUNT=0
+
+function forcekill {
+       echo "CTRL-C was pressed"
+       echo "Exiting script.."
+       rename 's/\.backup/\.spec/' packaging/itc/* 2>&1 &
+       rename 's/\.backup/\.spec/' packaging/ctc/* 2>&1 &
+       rename 's/\.backup/\.spec/' packaging/utc/* 2>&1 &
+       exit 1
+}
+trap forcekill 2
+
+function download
+{
+       echo "Removing all the rpm from location : $RPM_DIR"
+       if [ -d $RPM_DIR ]; then
+               rm -rf $RPM_DIR/*.rpm
+               if [ $? -ne 0 ]; then
+                       echo "Unable to remove the rpm files. Please check for permission(try with sudo)"
+                       return
+               fi
+       fi
+       echo "Source Location : $OBS_URL"
+       echo "Destination Location : $RPM_DIR"
+       echo "Downloading rpm files...."
+       wget -q -l1 -nd -r -P $RPM_DIR -A rpm $OBS_URL
+       if [ $? -ne 0 ]; then
+               echo "Unable to download rpm files. Please check for permission(try with sudo)"
+               return
+       fi
+       ls $RPM_DIR | tr '\n' '\n'
+       count=`ls -l $RPM_DIR | wc -l`
+       count=$((count - 1))
+       echo "Total downloaded rpm file: $count"
+}
+
+function CheckBuildFailStatus
+{
+       Result=`cat ./build.log | grep -rin "the following packages failed to build"`
+       if [[ $Result != "" ]]
+       then
+               mkdir -p ./BuildFailLogsSDK
+               cp ./build.log ./BuildFailLogsSDK/native-$2-$1.txt
+       fi
+}
+
+function update
+{
+       echo "Updating..."
+       for buildtype in `ls -1 src/ | grep -v CMakeList`
+       do
+               if [ $buildtype != 'common' ] && [ $buildtype != 'manual' ]; then
+                       PREFIX="native"
+                       if [ $buildtype == "utc" ]; then
+                           PREFIX="core"
+                       fi
+
+                       for modname in `ls -1 src/$buildtype/ | grep -v CMakeList`
+                       do
+                               (cd src/$buildtype/$modname/; ../../../scripts/tcheadgen.sh tct-$modname-$PREFIX.h)
+               
+                       done
+               fi
+
+       done
+       echo "Update done"
+}
+
+function build {
+APP_DIR=/opt/usr/apps/
+TAG_SPEC=$1
+PREFIX="native"
+    if [ -n "$2" ]; then
+       if [ $2 != 'common' ] && [ $2 != 'manual' ]; then
+           if [ $1 == "utc" ]; then
+                 TAG_SPEC="tests"
+                 PREFIX="core"
+            fi
+        (cd src/$1/$2/; ../../../scripts/tcheadgen.sh tct-$2-$PREFIX.h)
+       if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
+       echo "*************START BUILDING $1:$PREFIX-$2-$TAG_SPEC*****************"             
+       rename 's/\.spec/\.backup/' packaging/$1/*
+       mv packaging/$1/$PREFIX-$2-$TAG_SPEC.backup packaging/$1/$PREFIX-$2-$TAG_SPEC.spec
+
+       
+       #If rpm is already there then remove it
+       TAG_SPEC_RM=$1
+       MOD_NAME="$2"
+       PKG_NAME="$PREFIX-$MOD_NAME-$TAG_SPEC_RM"
+       filename=`find $RPM_DIR -name $PKG_NAME\*`
+       if [ -n "$filename" ]; then
+               rm -f $filename
+       fi
+
+       gbs --conf tct.conf build -A i586 --packaging-dir packaging/$1 --spec $PREFIX-$2-$TAG_SPEC.spec --include-all --keep-packs --define "APP_PATH $APP_DIR" -P sdk | \
+            tee build.log | stdbuf -o0 sed -e 's/error:/\x1b[1;91m&\x1b[0m/' \
+                                           -e 's/warning:/\x1b[93m&\x1b[0m/'
+       CheckBuildFailStatus $1 $2
+       fi
+    else 
+        if [ -n "$1" ]; then
+               if [ $1 != 'common' ] && [ $1 != 'manual' ]; then
+                       for mod in `ls -1 src/$1/ | grep -v CMakeList`
+                       do
+                       if [ $mod != 'common' ] && [ $mod != 'manual' ]; then
+                               build $1 $mod
+                       fi
+                       done
+               fi
+       else
+               for buildtype in `ls -1 src/ | grep -v CMakeList`
+               do
+                       build $buildtype
+               done
+       fi
+    fi
+}
+
+function add_module {
+    # argument check
+    if [ -z "$2" ]; then echo "Usage: `basename $0` addmod <build_type> <module_name>"; exit 1; fi
+    if [ $1 != "itc" ] && [ $1 != "ctc" ] && [ $1 != "utc" ]; then echo "Usage: `basename $0` addmod <build_type> <module_name> ; <build_type> = itc or ctc or utc"; exit 1; fi
+
+    BUILD_TYPE=$1
+    MODULE_NAME=$2
+    d_showVar MODULE_NAME
+    MODULE_NAME_C=$(echo $MODULE_NAME | sed -e 's/-\([a-z]\)/\U\1/' -e 's/^\([a-z]\)/\U\1/')
+    d_showVar MODULE_NAME_C
+    MODULE_NAME_U=$(echo $MODULE_NAME | sed -e 's/-/_/g')
+    d_showVar MODULE_NAME_U
+    MODULE_LIBNAME=$2
+    d_showVar MODULE_LIBNAME
+    TAG_SPEC=$BUILD_TYPE
+    PREFIX="native"
+    if [ $1 == "utc" ]; then
+       TAG_SPEC="tests"
+       PREFIX="core"
+    fi
+    
+    HEADER_TOP=$(echo $2 | tr '[:lower:]' '[:upper:]' | sed -e 's/-/_/g' -e 's/\./_/')
+    echo "Adding $BUILD_TYPE:->$MODULE_NAME module to project..."
+    d_bp
+    cd $PROJECT_DIR
+    # prepare .spec file
+    echo "-- Generating packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.spec file"
+    if [ ! -d packaging ]; then mkdir packaging; fi
+    if [ ! -d packaging/$BUILD_TYPE ]; then cd packaging; mkdir $BUILD_TYPE; cd ..; fi
+    sed -e "s:\[MODULE_NAME\]:$MODULE_NAME:g" -e "s:\[MODULE_LIBNAME\]:$MODULE_LIBNAME:g" \
+        templates/src-directory/$BUILD_TYPE/$PREFIX-\[module_name\]-$TAG_SPEC.spec > packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.spec
+    echo "-- Generating packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.xml manifest file"
+    LABEL=${MODULE_NAME^}
+    LABEL=`echo $LABEL | sed -e 's/-\(\w\)/\U\1/g'`
+    sed -e "s:MODULE:$MODULE_NAME:g" -e "s:LABEL:$LABEL:g" \
+        templates/src-directory/$BUILD_TYPE/$PREFIX-\[module_name\]-$TAG_SPEC.xml > packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.xml
+    # prepare src directory
+    mkdir src/$BUILD_TYPE/$MODULE_NAME
+    echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/CMakeLists.txt file"
+    sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" -e "s:%{MODULE_LIBNAME}:$MODULE_LIBNAME:g" \
+        templates/src-directory/$BUILD_TYPE/CMakeLists.txt > src/$BUILD_TYPE/$MODULE_NAME/CMakeLists.txt
+    echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/tct-$MODULE_NAME-$PREFIX.c file"
+    sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" \
+        templates/src-directory/$BUILD_TYPE/tct-\[module_name\]-$PREFIX.c > src/$BUILD_TYPE/$MODULE_NAME/tct-$MODULE_NAME-$PREFIX.c
+        
+    if [ $BUILD_TYPE == "itc" ]; then
+       # generate ITs file
+       echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME.c file"
+       sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" -e "s:%{MODULE_NAME_U}:$MODULE_NAME_U:g" -e "s:%{MODULE_NAME_C}:$MODULE_NAME_C:g" \
+        templates/src-directory/$BUILD_TYPE/ITs-\[module_name\].c > src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME.c
+       
+       # generate Common C file
+       echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME-common.c file"
+       sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" \
+        templates/src-directory/$BUILD_TYPE/ITs-\[module_name\]-common.c > src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME-common.c
+       
+       # generate Common header file
+       echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME-common.h file"
+       sed -e "s:%{MODULE_NAME_U}:$MODULE_NAME_U:g" -e "s:%{MODULE_NAME_C}:$MODULE_NAME_C:g" -e "s:%{HEADER_TOP}:$HEADER_TOP:g" \
+        templates/src-directory/$BUILD_TYPE/ITs-\[module_name\]-common.h > src/$BUILD_TYPE/$MODULE_NAME/ITs-$MODULE_NAME-common.h
+    else
+       if [ $BUILD_TYPE == "ctc" ]; then
+               # generate ctc file
+               echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME.c file"
+               sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" -e "s:%{MODULE_NAME_U}:$MODULE_NAME_U:g" -e "s:%{MODULE_NAME_C}:$MODULE_NAME_C:g" \
+               templates/src-directory/$BUILD_TYPE/\[module_name\].c > src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME.c
+       
+               # generate Common C file
+               echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME-common.c file"
+               sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" \
+        templates/src-directory/$BUILD_TYPE/\[module_name\]-common.c > src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME-common.c
+       
+               # generate Common header file
+               echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME-common.h file"
+               sed -e "s:%{MODULE_NAME_U}:$MODULE_NAME_U:g" -e "s:%{MODULE_NAME_C}:$MODULE_NAME_C:g" -e "s:%{HEADER_TOP}:$HEADER_TOP:g" \
+               templates/src-directory/$BUILD_TYPE/\[module_name\]-common.h > src/$BUILD_TYPE/$MODULE_NAME/$MODULE_NAME-common.h
+       else
+               # generate utc file
+               echo "-- Generating src/$BUILD_TYPE/$MODULE_NAME/utc-$MODULE_NAME.c file"
+               sed -e "s:%{MODULE_NAME}:$MODULE_NAME:g" -e "s:%{MODULE_NAME_U}:$MODULE_NAME_U:g" -e "s:%{MODULE_NAME_C}:$MODULE_NAME_C:g" \
+               templates/src-directory/$BUILD_TYPE/utc-\[module_name\].c > src/$BUILD_TYPE/$MODULE_NAME/utc-$MODULE_NAME.c
+        fi
+    fi
+    echo "Task finished successfully"
+}
+
+function rm_module {
+    # argument check
+    if [ -z "$2" ]; then echo "Usage: `basename $0` rmmod <build_type> <module_name>"; exit 1; fi
+    if [ $1 != "itc" ] && [ $1 != "ctc" ] && [ $1 != "utc" ]; then echo "Usage: `basename $0` rmmod <build_type> <module_name> ; <build_type> = itc or ctc or utc"; exit 1; fi
+
+    BUILD_TYPE=$1
+    MODULE_NAME=$2
+    d_showVar BUILD_TYPE
+    d_showVar MODULE_NAME
+    TAG_SPEC=$BUILD_TYPE
+    PREFIX="native"
+    if [ $1 == "utc" ]; then
+       TAG_SPEC="tests"
+       PREFIX="core"
+    fi
+    
+    TIZEN____="tizen_core_2.3.1"
+
+    echo "Removing $BUILD_TYPE:->$MODULE_NAME module from project..."
+    d_bp104.1.i586.rpm
+    TO_PKG_DIR="/opt/tct/$TIZEN____/packages"
+    echo "---- Updating $TO_PKG_DIR/pkg_infos/wearable_pkg_info.xml"
+    scripts/tcpackageslistsgen.sh $MODULE_NAME $TO_PKG_DIR/pkg_infos/wearable_pkg_info.xml 1 $BUILD_TYPE
+
+    if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
+   
+    cd $PROJECT_DIR
+    echo "-- Removing packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.spec file"
+    rm packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.spec
+    echo "-- Removing packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.xml file"
+    rm packaging/$BUILD_TYPE/$PREFIX-$MODULE_NAME-$TAG_SPEC.xml
+    echo "-- Removing src/$BUILD_TYPE/$MODULE_NAME directory"
+    rm -r src/$BUILD_TYPE/$MODULE_NAME
+    echo "Task finished successfully"
+}
+
+function inst {
+       if [ -z "$1" ]; then
+               for buildtype in `ls -1 src/ | grep -v CMakeList`
+                       do
+                       if [ $buildtype != 'common' ] && [ $buildtype != 'manual' ]; then
+                               inst $buildtype
+                       fi
+                       done
+       else
+               if [ -z "$2" ]; then
+                       for mod in `ls -1 src/$1/ | grep -v CMakeList`
+                               do
+                               if [ $mod != 'common' ] && [ $mod != 'manual' ]; then
+                                       inst $1 $mod rpm_check
+                               fi
+                               done
+               else
+                       TAG_SPEC=$1
+                       PREFIX="native"
+                       PREFIX_PKG_NAME="native"
+                       TAG_SPEC_PKG_NAME=$1
+                       if [ $1 == "utc" ]; then
+                                TAG_SPEC="tests"
+                                PREFIX="core"
+                       fi
+                       cd $PROJECT_DIR
+                       # setting variables
+                       BUILDTC_TYPE="$1"
+                       d_showVar BUILDTC_TYPE
+                       MOD_NAME="$2"
+                       d_showVar MOD_NAME
+                       PKG_NAME="$PREFIX-$MOD_NAME-$TAG_SPEC"
+                       d_showVar PKG_NAME
+                       VER=$(cat packaging/$BUILDTC_TYPE/$PREFIX-$MOD_NAME-$TAG_SPEC.spec | awk '/^Version:/ { print $2; exit; }')
+                       d_showVar VER
+                       PKG_VNAME="$PKG_NAME-$VER"
+                       d_showVar PKG_VNAME
+                       
+                       #get rpm file name from rpm dir                 
+                       filename=`find $RPM_DIR -name $PKG_VNAME\*`
+                       filename=${filename##*/}
+                       #get version info from rpm file 
+                       rpm_ver_ext=${filename##*-}
+                       
+                       PKG_FNAME="$PKG_VNAME-$rpm_ver_ext"
+                       d_showVar PKG_FNAME
+                       TIZEN____="tizen_core_2.3.1"
+                       TCT_DIR="opt/tct-$MOD_NAME-$PREFIX_PKG_NAME-$TAG_SPEC_PKG_NAME"
+                       TO_PKG_DIR="/opt/tct/$TIZEN____/packages"
+                       d_showVar TCT_DIR
+                       d_bp
+                       if [ ! -f $RPM_DIR/$PKG_FNAME ] && [ $3 == "rpm_check" ] ;then
+                               return;
+                       fi      
+                       echo "********************START Installing $1:$2**********************"
+                       # prepare tct directory and files
+                       echo "-- Preparing suite .zip file..."
+                       echo "---- Creating /tmp/$TCT_DIR directory"
+                       rm -r /tmp/opt > /dev/null 2>&1
+                       mkdir -p /tmp/$TCT_DIR
+                       #copy res
+                       if [ -d src/$1/$2/res ]; then
+                               cp -rf src/$1/$2/res /tmp/$TCT_DIR
+                       fi
+                       #copy ext_wrapper.sh
+                       cp templates/external_wrapper.sh /tmp/$TCT_DIR/
+                       # rpm
+                       echo "---- Copying rpm package to /tmp/$TCT_DIR package"
+                       if [ -f $RPM_DIR/$PKG_FNAME ];then      
+                               cp $RPM_DIR/$PKG_FNAME /tmp/$TCT_DIR
+                       else
+                               echo "---- $RPM_DIR/$PKG_FNAME package not found"
+                               echo "---- $1:$2 Installation Failed"
+                               return
+                       fi
+                       if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
+                       # 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}:\"/opt/usr/media/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
+                       echo "---- Generating /tmp/$TCT_DIR"
+                       scripts/tctestsgen.sh $MOD_NAME /tmp/$TCT_DIR $BUILDTC_TYPE
+                       if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
+                       # zip
+                       echo "---- Preparing /tmp/tct/packages/tct-$MOD_NAME-$PREFIX_PKG_NAME-$TAG_SPEC_PKG_NAME-2.3.1.zip file"
+                       # clear old zips
+                       rm -r /tmp/tct/packages > /dev/null 2>&1
+                       mkdir -p /tmp/tct/packages
+                       # create new zip
+                       ( cd /tmp; zip -r /tmp/tct/packages/tct-$MOD_NAME-$PREFIX_PKG_NAME-$TAG_SPEC_PKG_NAME-2.3.1.zip opt > /dev/null 2>&1; )
+                       # deployment
+                       echo "-- Suite deployment..."
+                       echo "---- Package copying to $TO_PKG_DIR/tct-$MOD_NAME-$PREFIX_PKG_NAME-$TAG_SPEC_PKG_NAME-2.3.1.zip"
+                       cp /tmp/tct/packages/tct-$MOD_NAME-$PREFIX_PKG_NAME-$TAG_SPEC_PKG_NAME-2.3.1.zip $TO_PKG_DIR/wearable/
+                       echo "---- Updating the file $TO_PKG_DIR/pkg_infos/wearable_pkg_info.xml"
+                       scripts/tcpackageslistsgen.sh $MOD_NAME $TO_PKG_DIR/pkg_infos/wearable_pkg_info.xml 0 $BUILDTC_TYPE
+                       if [ $? -ne 0 ]; then echo "Aborting..."; exit 1; fi
+                       echo "Task finished successfully"
+                       cd $PROJECT_DIR
+                       echo "$1:->$2" >> install.log
+                       INSTALL_PKG_COUNT=$((INSTALL_PKG_COUNT+1))
+               fi
+       fi
+}
+
+function RenameSpecAndCheckBuildFail {
+       rename 's/\.backup/\.spec/' packaging/itc/*
+       rename 's/\.backup/\.spec/' packaging/ctc/*
+       rename 's/\.backup/\.spec/' packaging/utc/*
+       if [ -d ./BuildFailLogsSDK ]; then
+               COUNT=`ls -1 ./BuildFailLogsSDK | wc -l`
+               if [[ $COUNT -gt 0 ]]; then
+                       echo ""
+                       echo "=== Following packages failed to build. Total failures count : $COUNT === "
+                       ls -1 ./BuildFailLogsSDK | while read PACKAGENAME
+                       do
+                               PACKAGE=`echo $PACKAGENAME | sed 's/\.[^.]*$//'`
+                               ABSPATH=`pwd`"/BuildFailLogsSDK"
+                               echo "$PACKAGE : $ABSPATH/$PACKAGENAME"
+                       done
+               fi
+               echo ""
+       fi
+       cd $PROJECT_DIR
+       rm -f build.log
+}
+
+function helpusage {
+# usage note
+    echo "Usage: `basename $0` <addmod|rmmod|build|install> <build_type> <module_name>"
+    echo "Usage: `basename $0` <download|update>"
+    echo "<build_type> = itc|ctc|utc"
+    echo "commands description:"
+    echo "       addmod      add a new module"
+    echo "       rmmod       remove a module"
+    echo "       build       performs GBS build with --keep-packs option"
+    echo "       install     install packages"
+    echo "       download    download rpm packages from obs link to GBS RPMS location"
+    echo "       update      update all the modules header file."
+    echo "To build|install all the packages (itc,ctc and utc), usage: `basename $0` build|install"
+    echo "To build|install all packages of a <build_type>, usage: `basename $0` build|install <build_type>"
+    echo "addmod|rmmod is specific to build_type and module_name, usage: `basename $0` <addmod|rmmod> <build_type> <module_name>"
+    echo ""
+    exit 1
+}
+
+if [ -z "$1" ]; then
+    echo ""
+    helpusage
+elif [ "addmod" == "$1" ]; then
+    # add new module
+    add_module $2 $3
+elif [ "rmmod" == "$1" ]; then
+    # remove module
+    rm_module $2 $3
+elif [ "build" == "$1" ]; then
+    if [ -d ./BuildFailLogsSDK ];then
+               rm -rf ./BuildFailLogsSDK
+       fi
+       build $2 $3
+       RenameSpecAndCheckBuildFail
+elif [ "download" == "$1" ]; then
+       download
+elif [ "update" == "$1" ]; then
+       update 
+elif [ "install" == "$1" ]; then
+    # install
+    INSTALL_PKG_COUNT=0
+    echo "**********************************************" > install.log
+    echo "Following packages get installed successfully:" >> install.log
+    inst $2 $3
+    echo "" >> install.log
+    echo "Total Install PASS Count = $INSTALL_PKG_COUNT" >> install.log
+    echo "**********************************************" >> install.log
+    if [ -z $3 ]; then
+       cat install.log
+    fi
+    rm install.log
+else
+    echo ""
+    echo "Invalid subcommand: $1"
+    helpusage
+fi
diff --git a/scripts/tcheadgen.sh b/scripts/tcheadgen.sh
new file mode 100755 (executable)
index 0000000..fe2da75
--- /dev/null
@@ -0,0 +1,96 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if [[ -z $1 ]]; then
+    echo "Usage note: tcheadgen.sh <header_filename.h>"
+    exit 1
+fi
+
+FILE="$PWD/$1"
+TFILE="/tmp/retr.csv"
+HEADER_NAME=$(echo $1 | tr '[:lower:]' '[:upper:]' | sed -e 's/-/_/g' -e 's/\./_/')
+SCRIPT_DIR="$(cd "$(dirname $0)" && pwd)"
+
+$SCRIPT_DIR/retriever.sh > ${TFILE}_pre
+if [ $? -ne 0 ]; then cat ${TFILE}_pre; exit 1; fi
+
+cat ${TFILE}_pre | sort -t',' -k2,2 -s > ${TFILE}_remove
+awk '!x[$0]++' ${TFILE}_remove > $TFILE
+
+for fname in `cat $SCRIPT_DIR/../exclude.list`
+do
+   sed -i "/$fname/d" $TFILE
+done
+
+awk -F',' -v HEADER_NAME="$HEADER_NAME" '
+    BEGIN {
+        OFS = ", ";
+
+        startup_counter = 0;
+        startup_list[0] = "";
+
+        cleanup_counter = 0;
+        cleanup_list[0] = "";
+
+        testcase_counter = 0;
+        testcase_list[0] = "";
+
+        tc_array_counter = 0;
+        tc_array_list[0] = "";
+
+printf "//\n// Copyright (c) 2014 Samsung Electronics Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the License);\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n"
+print "#ifndef __" HEADER_NAME "__"
+print "#define __" HEADER_NAME "__"
+print ""
+print "#include \"testcase.h\""
+print ""
+    }
+    {
+        testcase_list[testcase_counter++] = $1;
+
+        if (startup_counter == 0 || startup_list[startup_counter-1] != $2)
+            startup_list[startup_counter++] = $2;
+
+        if (startup_counter == 0 || cleanup_list[cleanup_counter-1] != $3)
+            cleanup_list[cleanup_counter++] = $3;
+
+        tc_array_list[tc_array_counter++] = "\"" $1 "\", " $1 ", " $2 ", " $3;
+    }
+    END {
+        sc_count = (startup_counter > cleanup_counter) ? startup_counter : cleanup_counter;
+        for (i = 0; i < sc_count; i++) {
+            if (i < startup_counter && startup_list[i] != "NULL")
+print "extern void " startup_list[i] "(void);"
+            if (i < cleanup_counter && cleanup_list[i] != "NULL")
+print "extern void " cleanup_list[i] "(void);"
+        }
+
+print ""
+        for (i = 0; i < testcase_counter; i++)
+print "extern int " testcase_list[i] "(void);"
+
+print ""
+print "testcase tc_array[] = {"
+
+        for (i = 0; i < tc_array_counter; i++)
+print "    {" tc_array_list[i] "},"
+
+print "    {NULL, NULL}"
+print "};"
+print ""
+print "#endif // __" HEADER_NAME "__"
+}' $TFILE > $FILE
diff --git a/scripts/tcpackageslistsgen.sh b/scripts/tcpackageslistsgen.sh
new file mode 100755 (executable)
index 0000000..35da05f
--- /dev/null
@@ -0,0 +1,105 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if [ -z $1 -o -z $2 ]; then
+    echo "Usage note: tcpackageslistsgen.sh <module_name> <output_file.xml>"
+    exit 1
+fi
+
+MODULE_NAME=$1
+FILE=$2
+RMMOD=$3
+BUILD_TYPE=$4
+CATEGORY="IntegrationTestCases"
+if [ ! -f $FILE ]; then
+    echo "No such file: $2"
+    exit
+fi
+
+TAG_SPEC=$BUILD_TYPE
+PREFIX="native"
+       if [ $BUILD_TYPE == "utc" ]; then
+               CATEGORY="UnitTestCases"                 
+               #TAG_SPEC="tests"
+                 #PREFIX="core"
+        fi
+       if [ $BUILD_TYPE == "ctc" ]; then
+               CATEGORY="CompatibilityTestCases"                 
+       fi
+
+SCRIPT_DIR="$(cd "$(dirname $0)" && pwd)"
+AUTO_NUM=$(cd $SCRIPT_DIR/..; scripts/retriever.sh -anum src/$BUILD_TYPE/$MODULE_NAME)
+if [ $? -ne 0 ]; then echo $AUTO_NUM; exit 1; fi
+MAN_NUM=$(cd $SCRIPT_DIR/..; scripts/retriever.sh -mnum src/$BUILD_TYPE/$MODULE_NAME)
+if [ $? -ne 0 ]; then echo $MAN_NUM; exit 1; fi
+
+TFILE="/tmp/tempfile.xml"
+if [ -f $TFILE ]; then
+    rm $TFILE
+fi
+
+function regen {
+    awk -v RMMOD=$RMMOD -v RS='\n' -v ORS='\n' -v MODULE_NAME=$MODULE_NAME -v CATEGORY=$CATEGORY -v TAG_SPEC=$TAG_SPEC -v PREFIX=$PREFIX -v AUTO_NUM=$AUTO_NUM -v MAN_NUM=$MAN_NUM '    
+    BEGIN {
+        found = 0;
+        replaced = 0;
+    }
+    $0 ~ "<suite name=\"tct-" MODULE_NAME "-"PREFIX"-ctc\" category=\" "CATEGORY" \">" {
+        found = 1;
+        next
+    }
+    /<\/suite>/ {
+        if (found == 1 && RMMOD == 0) {
+print "  <suite name=\"tct-" MODULE_NAME "-"PREFIX"-"TAG_SPEC"\" category=\" "CATEGORY" \">";
+print "    <auto_tcn>" AUTO_NUM "</auto_tcn>";
+print "    <manual_tcn>" MAN_NUM "</manual_tcn>";
+print "    <total_tcn>" AUTO_NUM+MAN_NUM "</total_tcn>";
+print "    <pkg_name>wearable/tct-" MODULE_NAME "-"PREFIX"-"TAG_SPEC"-2.3.1.zip</pkg_name>";
+print "  </suite>";
+            found = 0;
+            replaced = 1;
+        }else if (found ==1 && RMMOD == 1){
+           found = 0;
+           replaced = 1;
+       }else {
+            print $0;
+        }
+        next
+    }
+    /<\/ns3:testplan>/ {
+        if (replaced == 0 && RMMOD == 0) {
+print "  <suite name=\"tct-" MODULE_NAME "-"PREFIX"-"TAG_SPEC"\" category=\" "CATEGORY" \">";
+print "    <auto_tcn>" AUTO_NUM "</auto_tcn>";
+print "    <manual_tcn>" MAN_NUM "</manual_tcn>";
+print "    <total_tcn>" AUTO_NUM+MAN_NUM "</total_tcn>";
+print "    <pkg_name>wearable/tct-" MODULE_NAME "-"PREFIX"-"TAG_SPEC"-2.3.1.zip</pkg_name>";
+print "  </suite>";
+print $0
+        } else {
+            print $0
+        }
+        next
+    }
+    {
+        if (found == 0) {
+            print $0
+        }
+    }' $FILE > $TFILE
+    cat $TFILE > $FILE
+}
+
+regen
diff --git a/scripts/tctestsgen.sh b/scripts/tctestsgen.sh
new file mode 100755 (executable)
index 0000000..d4df043
--- /dev/null
@@ -0,0 +1,89 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+if [[ -z $1 ]]; then
+    echo "Usage note: tctestsgen.sh <module_name>"
+    exit 1
+fi
+
+MODULE_NAME=$1
+BUILD_TYPE=$3
+MODULE_NAME_C=$(echo $MODULE_NAME | sed -e 's/-\([a-z]\)/\U\1/' -e 's/^\([a-z]\)/\U\1/')
+
+TAG_SPEC=$BUILD_TYPE
+PREFIX="native"
+
+SCRIPT_DIR="$(cd "$(dirname $0)" && pwd)"
+
+FILE="$2/tests.xml"
+if [ -a $FILE ]; then
+    rm $FILE
+fi
+TFILE="/tmp/tcs.csv"
+if [ -a $TFILE ]; then
+    rm $TFILE
+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 '
+    BEGIN {
+        set = ""
+print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
+print "    <?xml-stylesheet type=\"text/xsl\" href=\"./testcase.xsl\"?>";
+print "<test_definition>";
+print "  <suite name=\"tct-"MODULE_NAME"-"PREFIX"-"TAG_SPEC"\" category=\"Native APIs\">";
+    }
+    {
+        if (set != "" && set != $2) {
+print "    </set>"
+        }
+
+        if (set != $2) {
+            set = $2;
+print "    <set name=\"" set "\">";
+        }
+
+        tcname = $1;
+        tcpurpose = ""
+
+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\">/opt/usr/media/external_wrapper.sh " MODULE_NAME " " tcname " " BUILD_TYPE "</test_script_entry>";
+print "        </description>";
+print "      </testcase>";
+    }
+    END {
+        if (set != "") {
+print "    </set>"
+        }
+print "  </suite>"
+print "</test_definition>"
+    }' $TFILE > $FILE
+}
+
+(cd $SCRIPT_DIR/..; scripts/retriever.sh -f src/$BUILD_TYPE/$MODULE_NAME > ${TFILE}_pre)
+if [ $? -ne 0 ]; then cat ${TFILE}_pre; exit 1; fi
+
+cat ${TFILE}_pre | sort -t',' -k2,2 -s > ${TFILE}_remove
+awk '!x[$0]++' ${TFILE}_remove > $TFILE
+
+for fname in `cat exclude.list`
+do
+   sed -i "/$fname/d" $TFILE
+done
+
+gen
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..8f9c314
--- /dev/null
@@ -0,0 +1,27 @@
+IF( DEFINED MODULE )
+       SET(MAXCOUNT 1)
+       SET(SPEEDCHECK 0)
+       SET(MEMORYCHECK 0)
+       SET(DEBUGVAL 0)
+       SET(CONFIGFILEPATH "\"/tmp/TC_Config.txt\"")
+       SET(ERR_LOG "\"/tmp/tclog\"")
+IF(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l)
+       SET(ARCHTYPE "\"armv7l\"")
+       SET(ISDEVICE 1)
+ELSE()
+       SET(ARCHTYPE "\"i586\"")
+       SET(ISDEVICE 0)
+ENDIF()
+       add_definitions(-DARCH_TYPE=${ARCHTYPE})
+       add_definitions(-DIS_DEVICE=${ISDEVICE})
+       add_definitions(-DMAX_COUNT=${MAXCOUNT})
+       add_definitions(-DSPEED_CHECK=${SPEEDCHECK})
+       add_definitions(-DMEMORY_CHECK=${MEMORYCHECK})
+       add_definitions(-DDEBUG=${DEBUGVAL})
+       add_definitions(-DCONFIGFILE_PATH=${CONFIGFILEPATH})    
+       add_definitions(-DERR_LOG=${ERR_LOG})
+       MESSAGE(STATUS "Building: ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}")
+       ADD_SUBDIRECTORY(${BUILDTCTYPE}/${MODULE})
+ELSE( DEFINED MODULE )
+    MESSAGE(FATAL_ERROR "No module selected to build. Aborting...")
+ENDIF( DEFINED MODULE )
diff --git a/src/common/assert.h b/src/common/assert.h
new file mode 100755 (executable)
index 0000000..6299139
--- /dev/null
@@ -0,0 +1,97 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ASSERT_H_
+#define _ASSERT_H_
+#include <stdio.h>
+#include <stdlib.h>
+
+#define assert(exp) \
+    if (!(exp)) { \
+        fprintf(stderr, \
+            "Assert fail in %s:%d\n", __FILE__, __LINE__); \
+        fprintf(stderr, \
+            "Following expression is not true:\n" \
+                "%s\n", #exp); \
+        return 1; \
+    }
+
+#define assert_eq(var, ref) \
+    if (var != ref) { \
+        fprintf(stderr, \
+            "Assert fail in %s:%d\n", __FILE__, __LINE__); \
+        fprintf(stderr, \
+            "Values \"%s\" and \"%s\" are not equal:\n" \
+                "%s == %d, %s == %d\n", \
+            #var, #ref, #var, (int)var, #ref, (int)ref); \
+        return 1; \
+    }
+
+#define assert_neq(var, ref) \
+    if (var == ref) { \
+        fprintf(stderr, \
+            "Assert fail in %s:%d\n", __FILE__, __LINE__); \
+        fprintf(stderr, \
+            "Values \"%s\" and \"%s\" are equal:\n" \
+                "%s == %s == %d\n", \
+            #var, #ref, #var, #ref, (int)ref); \
+        return 1; \
+    }
+
+#define assert_gt(var, ref) \
+    if (var <= ref) { \
+        fprintf(stderr, \
+            "Assert fail in %s:%d\n", __FILE__, __LINE__); \
+        fprintf(stderr, \
+            "Value \"%s\" is not greater than \"%s\":\n" \
+                "%s == %d, %s == %d\n", \
+            #var, #ref, #var, var, #ref, ref); \
+        return 1; \
+    }
+
+#define assert_geq(var, ref) \
+    if (var < ref) { \
+        fprintf(stderr, \
+            "Assert fail in %s:%d\n", __FILE__, __LINE__); \
+        fprintf(stderr, \
+            "Value \"%s\" is not greater or equal to \"%s\":\n" \
+                "%s == %d, %s == %d\n", \
+            #var, #ref, #var, var, #ref, ref); \
+        return 1; \
+    }
+
+#define assert_lt(var, ref) \
+    if (var >= ref) { \
+        fprintf(stderr, \
+            "Assert fail in %s:%d\n", __FILE__, __LINE__); \
+        fprintf(stderr, \
+            "Value \"%s\" is not lower than \"%s\":\n" \
+                "%s == %d, %s == %d\n", \
+            #var, #ref, #var, var, #ref, ref); \
+        return 1; \
+    }
+
+#define assert_leq(var, ref) \
+    if (var > ref) { \
+        fprintf(stderr, \
+            "Assert fail in %s:%d\n", __FILE__, __LINE__); \
+        fprintf(stderr, \
+            "Value \"%s\" is not lower or equal to \"%s\":\n" \
+                "%s == %d, %s == %d\n", \
+            #var, #ref, #var, var, #ref, ref); \
+        return 1; \
+    }
+
+#endif //  _ASSERT_H_
diff --git a/src/common/testcase.h b/src/common/testcase.h
new file mode 100755 (executable)
index 0000000..63584c9
--- /dev/null
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _TESTCASE_H_
+#define _TESTCASE_H_
+
+/* pointer to startup/cleanup functions */
+typedef void (*void_fun_ptr)(void);
+
+/* pointer to testcase functions */
+typedef int (*tc_fun_ptr)(void);
+
+/* struct describing specific testcase */
+typedef struct testcase_s {
+    const char* name;
+    tc_fun_ptr function;
+    void_fun_ptr startup;
+    void_fun_ptr cleanup;
+} testcase;
+
+#endif // _TESTCASE_H_
diff --git a/src/ctc/audio-io/CMakeLists.txt b/src/ctc/audio-io/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..a5b595f
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "audio-io")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-media-audio-io")
+SET(TC_SOURCES
+       audio-io-common.c
+       audio-io.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-appfw-application
+       glib-2.0
+       bundle
+       capi-system-info
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/audio-io/audio-io-common.c b/src/ctc/audio-io/audio-io-common.c
new file mode 100755 (executable)
index 0000000..b3df7e0
--- /dev/null
@@ -0,0 +1,54 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "audio-io-common.h"
+
+/** @addtogroup ctc-audio-io
+* @ingroup             ctc
+* @{
+*/
+//Add helper function definitions here
+/**
+* @function                            SystemInfoError
+* @description                                 print the error of sysinfo information
+* @parameter[IN]                       nResult, the error code
+*                      [IN]                    pszApiName, API name
+* @return                                      NA
+*/
+
+void SystemInfoError(char *pszApiName, int nResult)
+{
+       char *pszErrLog = NULL;
+       pszErrLog = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( NULL == pszErrLog )
+       {
+               fprintf (fpLog, "\\n[%s] pszErrLog failed invalid path.", API_NAMESPACE);
+               return;
+       }
+       switch( nResult )
+       {
+               case SYSTEM_INFO_ERROR_PERMISSION_DENIED:       strcpy(pszErrLog, "SYSTEM_INFO_ERROR_PERMISSION_DENIED");       break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       strcpy(pszErrLog, "SYSTEM_INFO_ERROR_INVALID_PARAMETER");       break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           strcpy(pszErrLog, "SYSTEM_INFO_ERROR_OUT_OF_MEMORY");           break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        strcpy(pszErrLog, "SYSTEM_INFO_ERROR_IO_ERROR");                        break;
+               default:                                                                        strcpy(pszErrLog, "UNKNOWN");
+       }
+       fprintf (fpLog,"\\n[%s] %s is failed, error returned = %s.", API_NAMESPACE, pszApiName, pszErrLog);
+       free(pszErrLog);
+       pszErrLog = NULL;
+}
+
+/** @} */ //end of ctc-audio-io
\ No newline at end of file
diff --git a/src/ctc/audio-io/audio-io-common.h b/src/ctc/audio-io/audio-io-common.h
new file mode 100755 (executable)
index 0000000..8687a1d
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _AUDIO_IO_COMMON_H_
+#define _AUDIO_IO_COMMON_H_
+
+#include "assert.h"
+#include <media/audio_io.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <system_info.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib-object.h>
+#include <glib-2.0/glib.h>
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+/** @addtogroup ctc-audio-io
+* @ingroup             ctc
+* @{
+*/
+#define API_NAMESPACE                          "AUDIO_IO_CTC"
+#define LOG                                                    100
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MAX_BLOCK_SIZE                         100
+#define ERR_LOG                                                "/tmp/tclog"
+#define MICROPHONE_FEATURE                     "http://tizen.org/feature/microphone"
+
+FILE *fpLog;
+bool g_bFeatureSupported;
+void SystemInfoError(char *pszApiName, int nResult);
+
+/** @} */ //end of ctc-audio-io
+#endif  //_AUDIO_IO_COMMON_H_
diff --git a/src/ctc/audio-io/audio-io.c b/src/ctc/audio-io/audio-io.c
new file mode 100755 (executable)
index 0000000..08ffe80
--- /dev/null
@@ -0,0 +1,97 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "audio-io-common.h"
+
+/** @addtogroup ctc-audio-io
+* @ingroup             ctc
+* @{
+*/
+//& set: AudioIo
+
+/**
+* @function            CTs_audio_io_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_audio_io_startup(void)
+{
+       fpLog = fopen(ERR_LOG,"w");
+       return;
+}
+
+/**
+* @function            CTs_audio_io_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_audio_io_cleanup(void)
+{
+       fclose(fpLog);
+       return;
+}
+
+/** @addtogroup        ctc-audio-io-testcases
+* @brief               Integration testcases for module audio-io
+* @ingroup             ctc-audio-io
+*  @{
+*/
+
+//& purpose: It checks whether Mobile device implementations accurately report the presence or absence of a microphone. 
+//& eType: auto
+/**
+* @testcase                    CTc_audio_input_check_microphone_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Check the microphone feature in device
+* @apicovered          system_info_get_platform_bool
+* @passcase                    If presence or absence of microphone is accurately reported
+* @failcase                    If presence or absence of microphone is not accurately reported
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_audio_input_check_microphone_p(void)
+{
+       fprintf(fpLog,"[Line : %d][%s] Executing Testcase: CTc_audio_input_check_microphone_p\\n", __LINE__, API_NAMESPACE);
+
+       int nRet = SYSTEM_INFO_ERROR_NONE;
+       g_bFeatureSupported = false;
+       
+       nRet = system_info_get_platform_bool(MICROPHONE_FEATURE, &g_bFeatureSupported);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInfoError("system_info_get_platform_bool", nRet);
+               fprintf(fpLog, "[Line : %d][audio-io_ITC] Presence or Absence of microphone is not accurately reported\\n", __LINE__);
+               return 1;
+       }
+       
+       fprintf(fpLog, "[Line : %d][audio-io_ITC] Presence or Absence of microphone is accurately reported\\n", __LINE__);
+       if ( g_bFeatureSupported )
+       {
+               fprintf(fpLog, "[Line : %d][audio-io_ITC] Microphone feature is present\\n", __LINE__);
+       }
+       else
+       {
+               fprintf(fpLog, "[Line : %d][audio-io_ITC] Microphone feature is absent\\n", __LINE__);
+       }
+       
+       return 0;
+}
+
+/** @} */ //end of ctc-audio-io-testcases
+/** @} */ //end of ctc-audio-io
\ No newline at end of file
diff --git a/src/ctc/audio-io/tct-audio-io-native.c b/src/ctc/audio-io/tct-audio-io-native.c
new file mode 100755 (executable)
index 0000000..c8abc8b
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-audio-io-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/audio-io/tct-audio-io-native.h b/src/ctc/audio-io/tct-audio-io-native.h
new file mode 100755 (executable)
index 0000000..da7b9bb
--- /dev/null
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_AUDIO_IO_NATIVE_H__
+#define __TCT_AUDIO_IO_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_audio_io_startup(void);
+extern void CTs_audio_io_cleanup(void);
+
+extern int CTc_audio_input_check_microphone_p(void);
+
+testcase tc_array[] = {
+    {"CTc_audio_input_check_microphone_p", CTc_audio_input_check_microphone_p, CTs_audio_io_startup, CTs_audio_io_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_AUDIO_IO_NATIVE_H__
diff --git a/src/ctc/camera/CMakeLists.txt b/src/ctc/camera/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..51385bd
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "camera")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-media-camera")
+SET(TC_SOURCES
+       camera-common.c
+       camera.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/camera/camera-common.c b/src/ctc/camera/camera-common.c
new file mode 100755 (executable)
index 0000000..2da05f1
--- /dev/null
@@ -0,0 +1,121 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "camera-common.h"
+
+/** @addtogroup ctc-camera
+* @ingroup             ctc
+* @{
+*/
+
+/**
+* @function            SystemInfoError
+* @description                 prints description of error
+* @parameter[IN]       char *pszApiName [API name], int nResult [Result of API call]
+* @return                      description of pixel format
+*/
+void SystemInfoError(char *pszApiName, int nResult)
+{
+       char *pszErrLog = NULL;
+       pszErrLog = (char*)calloc(CAMERA_MAX_BLOCK_SIZE, CAMERA_MEMLOG * sizeof(char));
+       if ( NULL == pszErrLog )
+       {
+               return;
+       }
+       switch ( nResult )
+       {
+               case SYSTEM_INFO_ERROR_PERMISSION_DENIED:       strcpy(pszErrLog, "SYSTEM_INFO_ERROR_PERMISSION_DENIED");       break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       strcpy(pszErrLog, "SYSTEM_INFO_ERROR_INVALID_PARAMETER");       break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           strcpy(pszErrLog, "SYSTEM_INFO_ERROR_OUT_OF_MEMORY");           break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        strcpy(pszErrLog, "SYSTEM_INFO_ERROR_IO_ERROR");                        break;
+               default:                                                                        strcpy(pszErrLog, "UNKNOWN");
+       }
+       
+       fprintf (fpLog, "\\n[%s] %s is failed, error returned = %s.", API_NAMESPACE, pszApiName, pszErrLog);
+       CAMERA_FREE_MEMORY(pszErrLog);
+}
+
+/**
+* @function            CameraPixelFormat
+* @description                 Returns pixel format description, corresponding to enum value
+* @parameter[IN]       int format [the enum value of pixel format]
+* @return                      description of pixel format
+*/
+char* CameraPixelFormat(int format)
+{
+       char *szPixFormat = NULL;
+       switch ( format )
+       {
+               case CAMERA_PIXEL_FORMAT_INVALID:               szPixFormat = "CAMERA_PIXEL_FORMAT_INVALID";    break;
+               case CAMERA_PIXEL_FORMAT_NV12:                  szPixFormat = "CAMERA_PIXEL_FORMAT_NV12";               break;
+               case CAMERA_PIXEL_FORMAT_NV12T:                 szPixFormat = "CAMERA_PIXEL_FORMAT_NV12T";              break;
+               case CAMERA_PIXEL_FORMAT_NV16:                  szPixFormat = "CAMERA_PIXEL_FORMAT_NV16";               break;
+               case CAMERA_PIXEL_FORMAT_NV21:                  szPixFormat = "CAMERA_PIXEL_FORMAT_NV21";               break;
+               case CAMERA_PIXEL_FORMAT_YUYV:                  szPixFormat = "CAMERA_PIXEL_FORMAT_YUYV";               break;
+               case CAMERA_PIXEL_FORMAT_UYVY:                  szPixFormat = "CAMERA_PIXEL_FORMAT_UYVY";               break;
+               case CAMERA_PIXEL_FORMAT_422P:                  szPixFormat = "CAMERA_PIXEL_FORMAT_422P";               break;
+               case CAMERA_PIXEL_FORMAT_I420:                  szPixFormat = "CAMERA_PIXEL_FORMAT_I420";               break;
+               case CAMERA_PIXEL_FORMAT_YV12:                  szPixFormat = "CAMERA_PIXEL_FORMAT_YV12";               break;
+               case CAMERA_PIXEL_FORMAT_RGB565:                szPixFormat = "CAMERA_PIXEL_FORMAT_RGB565";             break;
+               case CAMERA_PIXEL_FORMAT_RGB888:                szPixFormat = "CAMERA_PIXEL_FORMAT_RGB888";             break;
+               case CAMERA_PIXEL_FORMAT_RGBA:                  szPixFormat = "CAMERA_PIXEL_FORMAT_RGBA";               break;
+               case CAMERA_PIXEL_FORMAT_ARGB:                  szPixFormat = "CAMERA_PIXEL_FORMAT_ARGB";               break;
+               case CAMERA_PIXEL_FORMAT_JPEG:                  szPixFormat = "CAMERA_PIXEL_FORMAT_JPEG";               break;
+       }
+               
+       return szPixFormat;
+}
+
+/**
+ * @function           CameraPrintErrorMsg
+ * @description        Print message.
+ * @parameter[IN]      pszApiName      [String pointer contains api name]
+ *                      [IN]   nRet            [api return value]
+ * @return                     NA
+ */
+void CameraPrintErrorMsg(char *pszApiName, int nRet)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(CAMERA_MAX_BLOCK_SIZE, CAMERA_MEMLOG * sizeof(char));
+       if ( NULL == pszErrorMsg )
+       {
+               return;
+       }
+       
+       switch ( nRet )
+       {
+               case CAMERA_ERROR_NONE:                                         strcpy(pszErrorMsg, "CAMERA_ERROR_NONE");                                       break;
+               case CAMERA_ERROR_INVALID_PARAMETER:            strcpy(pszErrorMsg, "CAMERA_ERROR_INVALID_PARAMETER");          break;
+               case CAMERA_ERROR_INVALID_STATE:                        strcpy(pszErrorMsg, "CAMERA_ERROR_INVALID_STATE");                      break;
+               case CAMERA_ERROR_OUT_OF_MEMORY:                        strcpy(pszErrorMsg, "CAMERA_ERROR_OUT_OF_MEMORY");                      break;
+               case CAMERA_ERROR_DEVICE:                                       strcpy(pszErrorMsg, "CAMERA_ERROR_DEVICE");                                     break;
+               case CAMERA_ERROR_INVALID_OPERATION:            strcpy(pszErrorMsg, "CAMERA_ERROR_INVALID_OPERATION");          break;
+               case CAMERA_ERROR_SOUND_POLICY:                         strcpy(pszErrorMsg, "CAMERA_ERROR_SOUND_POLICY");                       break;
+               case CAMERA_ERROR_SECURITY_RESTRICTED:          strcpy(pszErrorMsg, "CAMERA_ERROR_SECURITY_RESTRICTED");        break;
+               case CAMERA_ERROR_DEVICE_BUSY:                          strcpy(pszErrorMsg, "CAMERA_ERROR_DEVICE_BUSY");                        break;
+               case CAMERA_ERROR_DEVICE_NOT_FOUND:                     strcpy(pszErrorMsg, "CAMERA_ERROR_DEVICE_NOT_FOUND");           break;
+               case CAMERA_ERROR_SOUND_POLICY_BY_CALL:         strcpy(pszErrorMsg, "CAMERA_ERROR_SOUND_POLICY_BY_CALL");       break;
+               case CAMERA_ERROR_SOUND_POLICY_BY_ALARM:        strcpy(pszErrorMsg, "CAMERA_ERROR_SOUND_POLICY_BY_ALARM");      break;
+               case CAMERA_ERROR_ESD:                                          strcpy(pszErrorMsg, "CAMERA_ERROR_ESD");                                        break;
+               case CAMERA_ERROR_PERMISSION_DENIED:            strcpy(pszErrorMsg, "CAMERA_ERROR_PERMISSION_DENIED");          break;
+               case TIZEN_ERROR_NOT_SUPPORTED:                         strcpy(pszErrorMsg, "TIZEN_ERROR_NOT_SUPPORTED");                       break;
+               default:                                                                        strcpy(pszErrorMsg, "Unknown Error");
+       }
+       
+       fprintf (fpLog, "\\n[%s] %s failed, error returned = %s.", API_NAMESPACE, pszApiName, pszErrorMsg);
+       CAMERA_FREE_MEMORY(pszErrorMsg);
+}
+
+/** @} */ //end of ctc-camera
\ No newline at end of file
diff --git a/src/ctc/camera/camera-common.h b/src/ctc/camera/camera-common.h
new file mode 100755 (executable)
index 0000000..6fd06cf
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _CAMERA_COMMON_H_
+#define _CAMERA_COMMON_H_
+
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdbool.h>
+#include <camera.h>
+#include <system_info.h>
+
+/** @addtogroup ctc-camera
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                          "CAMERA_CTC"
+#define ERR_LOG                                        "/tmp/tclog"
+#define CAMERA_MAX_BLOCK_SIZE          20
+#define CAMERA_MEMLOG                          25
+#define CAMERA_KEY_SUPPORTED           "http://tizen.org/feature/camera"
+#define CAMERA_FREE_MEMORY(src)                { if(src) {free(src); src = NULL;}}
+
+
+FILE *fpLog;
+camera_h g_hCamera;
+char* CameraPixelFormat(int format);
+void SystemInfoError(char *pszApiName, int nResult);
+void CameraPrintErrorMsg(char *pszApiName, int nRet);
+
+/** @} */ //end of ctc-camera
+#endif  //_CAMERA_COMMON_H_
diff --git a/src/ctc/camera/camera.c b/src/ctc/camera/camera.c
new file mode 100755 (executable)
index 0000000..7a03b5f
--- /dev/null
@@ -0,0 +1,164 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "camera-common.h"
+
+/** @addtogroup ctc-camera
+* @ingroup             ctc
+* @{
+*/
+
+//& set: Camera
+
+int nSupportedFormats = 0;
+
+/**
+* @function            CTs_camera_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_camera_startup(void)
+{
+       fpLog = fopen(ERR_LOG,"w");
+       return;
+}
+
+/**
+* @function            CTs_camera_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_camera_cleanup(void)
+{
+       fclose(fpLog);
+       return;
+}
+
+// At least one of these formats must be supported
+int szSupportedFormats[] = {
+       CAMERA_PIXEL_FORMAT_RGB565,
+       CAMERA_PIXEL_FORMAT_ARGB,
+       CAMERA_PIXEL_FORMAT_RGB888,
+       CAMERA_PIXEL_FORMAT_RGBA,
+       CAMERA_PIXEL_FORMAT_I420,
+       CAMERA_PIXEL_FORMAT_JPEG,
+       CAMERA_PIXEL_FORMAT_NV12,
+       CAMERA_PIXEL_FORMAT_UYVY
+};
+
+static bool CameraPreviewFormatCallback(camera_pixel_format_e format, void *user_data)
+{
+       fprintf (fpLog,"\\n [%s] CameraPreviewFormatCallback invoked, preview format supported = %d(%s) \\n", API_NAMESPACE, format, CameraPixelFormat(format));
+       int nIterator;
+       int nSize = sizeof(szSupportedFormats)/sizeof(int);
+       for ( nIterator = 0; nIterator < nSize; nIterator++ )
+       {
+               if (format == szSupportedFormats[nIterator])
+               {
+                       nSupportedFormats++;
+               }
+       }
+       return true;
+}
+
+/** @addtogroup        ctc-camera-testcases
+* @brief               Integration testcases for module camera
+* @ingroup             ctc-camera
+* @{
+*/
+
+/**
+* @testcase            CTc_camera_supported_preview_pixel_format
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Create a camera handler\n
+*                                      Set display handler and preview resolution\n
+*                                      Now perform start-preview by calling set-preview callback\n
+*                                      Get camera state and check camera's state equal preview state\n
+*                                      Confirm to act preview normal
+* @apicovered          system_info_get_platform_bool,camera_unset_preview_cb,camera_create,camera_set_display,camera_set_preview_cb,camera_start_preview,camera_get_state,camera_stop_preview,camera_destroy
+* @passcase                    Return CAMERA_ERROR_NONE on Successful
+* @failcase                    Return  CAMERA_ERROR_INVALID_PARAMETER on failure
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_camera_supported_preview_pixel_format(void)
+{
+       nSupportedFormats = 0;
+
+       bool bIsCameraSupported = false;
+       int nRet = system_info_get_platform_bool(CAMERA_KEY_SUPPORTED, &bIsCameraSupported);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInfoError("system_info_get_platform_bool", nRet);
+               return 1;
+       }
+       if ( !bIsCameraSupported )
+       {
+               fprintf (fpLog,"\\n [%s] Camera is not supported \\n", API_NAMESPACE);
+               return 0;
+       }
+       else
+       {
+               /** Compliance specification states that if camera is supported then atleast one of :
+               RGB565 : The RGB565 pixel format
+               ARGB8888 : The ARGB8888 pixel format
+               R8G8B8A8 : The R8G8B8A8 pixel format The order of color component is guaranteed by the byte unit.
+               YCbCr420_PLANAR : The 8-bit Y-plane followed by 8-bit 2x2 sub sampled U-plane and V-plane
+               JPEG : The encoded formats
+               NV12 : The NV12 pixel formats
+               UYVY :  The UYVY pixel format*/
+               
+               nRet = camera_create(CAMERA_DEVICE_CAMERA0, &g_hCamera);
+               if ( nRet != CAMERA_ERROR_NONE )
+               {
+                       CameraPrintErrorMsg("camera_create", nRet);
+                       camera_destroy(g_hCamera);
+                       return 1;
+               }
+               else
+               {
+                       nRet = camera_foreach_supported_preview_format(g_hCamera, CameraPreviewFormatCallback, NULL);
+                       if ( nRet != CAMERA_ERROR_NONE )
+                       {
+                               CameraPrintErrorMsg("camera_foreach_supported_preview_format", nRet);
+                               camera_destroy(g_hCamera);
+                               return 1;
+                       }
+                       else 
+                       {
+                               fprintf (fpLog,"\\n [%s] camera_foreach_supported_preview_format successfull \\n", API_NAMESPACE);
+                       }
+               }
+               
+               if ( nSupportedFormats == 0 )
+               {
+                       fprintf (fpLog,"\\n [%s] No supported pixel format among the mentioned ones \\n", API_NAMESPACE);
+                       camera_destroy(g_hCamera);
+                       return 1;
+               }
+               else
+               {
+                       fprintf (fpLog,"\\n [%s] %d pixel formats supported among the mentioned ones \\n", API_NAMESPACE, nSupportedFormats);
+                       camera_destroy(g_hCamera);
+                       return 0;
+               }
+       }
+}
+
+/** @} */ //end of ctc-camera-testcases
+/** @} */ //end of ctc-camera
\ No newline at end of file
diff --git a/src/ctc/camera/tct-camera-native.c b/src/ctc/camera/tct-camera-native.c
new file mode 100755 (executable)
index 0000000..068de51
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-camera-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/camera/tct-camera-native.c.c b/src/ctc/camera/tct-camera-native.c.c
new file mode 100755 (executable)
index 0000000..7c0e9ad
--- /dev/null
@@ -0,0 +1,145 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-camera-native.c.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+void log_message(char* func_name, char* stage)
+{
+       char* message = (char*) malloc(strlen(func_name) + strlen(stage) + 3);
+       sprintf(message, "[%s] %s", func_name, stage);
+       dlog_print(DLOG_INFO, "NativeTCT", message);
+       free(message);
+}
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               log_message(func_name, "Startup");
+                               tc_array[i].startup();
+                       }
+
+                       log_message(func_name, "Body");
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               log_message(func_name, "Cleanup");
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/camera/tct-camera-native.h b/src/ctc/camera/tct-camera-native.h
new file mode 100755 (executable)
index 0000000..ebc808c
--- /dev/null
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CAMERA_NATIVE_H__
+#define __TCT_CAMERA_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_camera_startup(void);
+extern void CTs_camera_cleanup(void);
+
+extern int CTc_camera_supported_preview_pixel_format(void);
+
+testcase tc_array[] = {
+    {"CTc_camera_supported_preview_pixel_format", CTc_camera_supported_preview_pixel_format, CTs_camera_startup, CTs_camera_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CAMERA_NATIVE_H__
diff --git a/src/ctc/connection/CMakeLists.txt b/src/ctc/connection/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..61af68e
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "connection")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-network-connection")
+SET(TC_SOURCES
+       connection-common.c
+       connection.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-network-wifi
+       capi-system-info
+       capi-system-runtime-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/connection/connection-common.c b/src/ctc/connection/connection-common.c
new file mode 100755 (executable)
index 0000000..6ffb1f5
--- /dev/null
@@ -0,0 +1,46 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "connection-common.h"
+
+/** @addtogroup ctc-connection
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+/**
+ * @function           ConnectionSystemInfoGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* ConnectionSystemInfoGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            szErrorVal = "SYSTEM_INFO_ERROR_NONE";                                  break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER";             break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR";                              break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY";                 break;
+               default:                                                                        szErrorVal = "Unknown error";                                                   break;
+       }
+
+       return szErrorVal;
+}
+
+/** @} */ //end of ctc-connection
\ No newline at end of file
diff --git a/src/ctc/connection/connection-common.h b/src/ctc/connection/connection-common.h
new file mode 100755 (executable)
index 0000000..97a0a1c
--- /dev/null
@@ -0,0 +1,52 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _CONNECTION_COMMON_H_
+#define _CONNECTION_COMMON_H_
+
+#include "assert.h"
+#include <net_connection.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdbool.h>                                                                                                                                   // @NOTE: boolean type and values
+#include <stdint.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <wifi.h>
+#include <system_info.h>
+#include <unistd.h>
+
+/** @addtogroup ctc-connection
+* @ingroup             ctc
+* @{
+*/
+
+#define WIFI_FEATURE                           "http://tizen.org/feature/network.wifi"
+#define TELEPHONY_FEATURE                      "http://tizen.org/feature/network.telephony"
+#define BLUETOOTH_FEATURE                      "http://tizen.org/feature/network.bluetooth"
+#define ERR_LOG                                        "/tmp/tclog"
+#define API_NAMESPACE                          "CTS_CAPI_NETWORK_CONNECTION_CTC"
+
+/********************************** GLOBAL VARIABLES *******************************/
+FILE *fpLog;
+
+/********************************** HELPER FUNCTIONS *******************************/
+
+//returns system_infor error messages
+char* ConnectionSystemInfoGetError(int nRet);
+
+/** @} */ //end of ctc-connection
+#endif  //_CONNECTION_COMMON_H_
diff --git a/src/ctc/connection/connection.c b/src/ctc/connection/connection.c
new file mode 100755 (executable)
index 0000000..950be09
--- /dev/null
@@ -0,0 +1,110 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "connection-common.h"
+
+/** @addtogroup ctc-connection
+* @ingroup             ctc
+* @{
+*/
+
+//& set: Connection
+
+/**
+* @function            CTs_connection_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_connection_startup(void)
+{
+       fpLog = NULL;
+       fpLog = fopen(ERR_LOG, "w");
+       return;
+}
+
+/**
+* @function            CTs_connection_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_connection_cleanup(void)
+{
+       fclose(fpLog);
+       fpLog = NULL;
+       return;
+}
+
+/** @addtogroup        ctc-connection-testcases
+* @brief               Integration testcases for module connection
+* @ingroup             ctc-connection
+* @{
+*/
+
+//& purpose: Check if network wifi and network telephony features are supported in device.
+//& type: auto
+/**
+* @testcase                    CTc_NetworkConnection_FeatureSupport_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Check if network wifi and network telephony features are supported in device configurations\n
+*                                      Call system info API to check required features
+* @apicovered          system_info_get_platform_bool
+* @passcase                    API should return SYSTEM_INFO_ERROR_NONE
+* @failcase                    API returns negative error value
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_NetworkConnection_FeatureSupport_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing testcase - CTc_NetworkConnection_FeatureSupport_p.", API_NAMESPACE);
+       bool bWifiSupport = true;
+       bool bMobDataSupport = true;
+       bool bBtTetherSupport = true;
+       int nRetVal = SYSTEM_INFO_ERROR_NONE;
+       
+       nRetVal = system_info_get_platform_bool(WIFI_FEATURE, &bWifiSupport);
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               fprintf(fpLog, "\\n[Connection_Ctc] system_info_get_platform_bool returned (error = %s) for (key = %s)", ConnectionSystemInfoGetError(nRetVal), WIFI_FEATURE);
+               return 1;
+       }
+       
+       nRetVal = system_info_get_platform_bool(TELEPHONY_FEATURE, &bMobDataSupport);
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               fprintf(fpLog, "\\n[Connection_Ctc] system_info_get_platform_bool returned (error = %s) for (key = %s)", ConnectionSystemInfoGetError(nRetVal), TELEPHONY_FEATURE);
+               return 1;
+       }
+       
+       nRetVal = system_info_get_platform_bool(BLUETOOTH_FEATURE, &bBtTetherSupport);
+       if( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               fprintf(fpLog, "\\n[Connection_Ctc] system_info_get_platform_bool returned (error = %s) for (key = %s)", ConnectionSystemInfoGetError(nRetVal), BLUETOOTH_FEATURE);
+               return 1;
+       }
+       
+       if (!bWifiSupport && !bMobDataSupport && !bBtTetherSupport )
+       {
+               fprintf(fpLog, "\\n[Connection_Ctc] Wifi connection, mobile data and bluetooth tethering features are not supported in the target device");
+               return 1;
+       }
+       
+       return 0;
+}
+
+/** @} */ //end of ctc-connection-testcases
+/** @} */ //end of ctc-connection
\ No newline at end of file
diff --git a/src/ctc/connection/tct-connection-native.c b/src/ctc/connection/tct-connection-native.c
new file mode 100755 (executable)
index 0000000..ec0b3b5
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-connection-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/connection/tct-connection-native.h b/src/ctc/connection/tct-connection-native.h
new file mode 100755 (executable)
index 0000000..53e5491
--- /dev/null
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CONNECTION_NATIVE_H__
+#define __TCT_CONNECTION_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_connection_startup(void);
+extern void CTs_connection_cleanup(void);
+
+extern int CTc_NetworkConnection_FeatureSupport_p(void);
+
+testcase tc_array[] = {
+    {"CTc_NetworkConnection_FeatureSupport_p", CTc_NetworkConnection_FeatureSupport_p, CTs_connection_startup, CTs_connection_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CONNECTION_NATIVE_H__
diff --git a/src/ctc/device/CMakeLists.txt b/src/ctc/device/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..15679ef
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "device")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-system-device")
+SET(TC_SOURCES
+       device-common.c
+       device.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-system-info
+       capi-appfw-application
+       glib-2.0
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/device/device-common.c b/src/ctc/device/device-common.c
new file mode 100755 (executable)
index 0000000..e0bfcbb
--- /dev/null
@@ -0,0 +1,132 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "device-common.h"
+
+/** @addtogroup ctc-device
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+
+/**
+ * @function           DeviceGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* DeviceGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               case DEVICE_ERROR_NONE:                                 szErrorVal = "DEVICE_ERROR_NONE";                                       break;
+               case DEVICE_ERROR_OPERATION_FAILED:             szErrorVal = "DEVICE_ERROR_OPERATION_FAILED";           break;
+               case DEVICE_ERROR_PERMISSION_DENIED:    szErrorVal = "DEVICE_ERROR_PERMISSION_DENIED";          break;
+               case DEVICE_ERROR_INVALID_PARAMETER:    szErrorVal = "DEVICE_ERROR_INVALID_PARAMETER";          break;
+               case DEVICE_ERROR_ALREADY_IN_PROGRESS:  szErrorVal = "DEVICE_ERROR_ALREADY_IN_PROGRESS";        break;
+               case DEVICE_ERROR_NOT_SUPPORTED:                szErrorVal = "DEVICE_ERROR_NOT_SUPPORTED";                      break;
+               case DEVICE_ERROR_NOT_INITIALIZED:              szErrorVal = "DEVICE_ERROR_NOT_INITIALIZED";            break;
+               default:                                                                szErrorVal = "Unknown Error";                                           break;
+       }
+
+       return szErrorVal;
+}
+
+char* DeviceGetLedFlag(int nFlag)
+{
+       char* szFlag = NULL;
+       
+       if ( nFlag == LED_CUSTOM_DUTY_ON )
+       {
+                       szFlag = "LED_CUSTOM_DUTY_ON";
+       }
+       else if ( nFlag == LED_CUSTOM_DEFAULT )
+       {
+               szFlag = "LED_CUSTOM_DEFAULT";
+       }
+       else
+       {
+               szFlag = "Unknown Flag";
+       }
+       
+       return szFlag;
+}
+
+char* DeviceGetLedFlag2(int nFlag)
+{
+       return ( nFlag == 0 ) ? "LED_CUSTOM_DUTY_ON" : "LED_CUSTOM_DEFAULT";
+}
+
+/**
+ * @function           Device_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Device_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("\\n[Line : %d][%s] Null key value passed to function : Device_Check_System_Info_Feature_Supported", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool(pszKey, &bValue);
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][%s] system_info_get_platform_bool returned (error = %s) for (key = %s)",__LINE__, API_NAMESPACE, Device_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("\\n[Line : %d][%s] system_info_get_platform_bool returned unsupported feature capability for (key = %s)", __LINE__, API_NAMESPACE, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][%s] system_info_get_platform_bool returned supported status feature for (key = %s)", __LINE__, API_NAMESPACE, pszKey);
+       }
+
+       return bValue;
+}
+
+/**
+ * @function           Device_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Device_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            szErrorVal = "SYSTEM_INFO_ERROR_NONE";                          break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER";     break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR";                      break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY";         break;
+               default:                                                                        szErrorVal = "Unknown error";                                           break;
+       }
+
+
+       return szErrorVal;
+}
+
+/** @} */ //end of ctc-device
\ No newline at end of file
diff --git a/src/ctc/device/device-common.h b/src/ctc/device/device-common.h
new file mode 100755 (executable)
index 0000000..5c68fda
--- /dev/null
@@ -0,0 +1,84 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _DEVICE_COMMON_H_
+#define _DEVICE_COMMON_H_
+
+//Add test package related includes here
+#include "assert.h"
+#define API_NAMESPACE                  "CAPI_SYSTEM_DEVICE_CTC"
+#define ERR_LOG                                "/tmp/tclog"
+#include <device/led.h>
+#include <system_info.h>
+
+#include <malloc.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+/** @addtogroup ctc-device
+* @ingroup             ctc
+* @{
+*/
+
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define MICROSECONDS_PER_SECOND                1000000
+#define LED_FEATURE                                    "http://tizen.org/feature/led"
+
+FILE *g_fpLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][%s] Starting test : %s", __LINE__, API_NAMESPACE, __FUNCTION__);\
+}
+
+#define PRINT_STABILITY_LOG(api, nFailCount, nTotalCount) \
+       FPRINTF("\\n[Line : %d][%s] [%s] FAIL-COUNT: %d, NO.OF.ITERATION: %d", __LINE__, API_NAMESPACE, #api, nFailCount, nTotalCount);
+       
+#define PRINT_RESULT(nRetVal, API) {\
+       if ( nRetVal == 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s passed", __LINE__, API_NAMESPACE, API);\
+       }\
+       else \
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s failed, error returned = %s", __LINE__, API_NAMESPACE, API, DeviceGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+//Add helper function declarations here
+
+char* DeviceGetError(int nRet);
+char* DeviceGetLedFlag(int flag);
+char* DeviceGetLedFlag2(int nFlag);
+
+bool Device_Check_System_Info_Feature_Supported(char* pszKey);
+char* Device_System_Info_GetError(int nRet);
+
+/** @} */ //end of ctc-device
+#endif  //_DEVICE_COMMON_H_
diff --git a/src/ctc/device/device.c b/src/ctc/device/device.c
new file mode 100755 (executable)
index 0000000..67af1a4
--- /dev/null
@@ -0,0 +1,167 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "device-common.h"
+
+/** @addtogroup ctc-device
+* @ingroup             ctc
+* @{
+*/
+
+//& set: Device
+
+/**
+* @function            CTs_device_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_device_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       
+#if DEBUG
+       FPRINTF("\\n[Line : %d][%s] TEST SUIT start-up: CTs_System_Device_p\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+/**
+* @function            CTs_device_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_device_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][%s] TEST SUIT clean-up: CTs_System_Device_p\\n", __LINE__, API_NAMESPACE);
+#endif
+       return;
+}
+
+/** @addtogroup        ctc-device-testcases
+* @brief               Integration testcases for module device
+* @ingroup             ctc-device
+* @{
+*/
+
+//& purpose: To play and stop the custom effect of front LED
+//& type: auto
+/**
+* @testcase                    CTc_device_check_led_feature_p
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Check if the led feature is supported\n
+*                                      Play the custom effect of front led\n
+*                                      Stop the custom effect of front led
+* @apicovered          device_led_play_custom, device_led_stop_custom
+* @passcase                    When device_led_play_custom and device_led_stop_custom are successful.
+* @failcase                    If target api device_led_play_custom and device_led_stop_custom or any precondition api fails.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_device_check_led_feature_p(void)
+{
+       START_TEST;
+       
+       bool bIsLedFeatureSupported = Device_Check_System_Info_Feature_Supported(LED_FEATURE);
+       
+       int nRet = 0;
+       int on = 1000;                                          //Turn on time in milliseconds
+       int off = 1000;                                         //Turn off time in milliseconds
+       unsigned int color = 0xFF101010;        //Color value
+       unsigned int flags[] = { LED_CUSTOM_DUTY_ON, LED_CUSTOM_DEFAULT };      //LED_CUSTOM_FLAGS
+       
+       int enum_size = sizeof(flags) / sizeof(flags[0]);
+       int enum_counter = 0;
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++ )
+       {
+               nRet = device_led_play_custom(on, off, color, flags[enum_counter]);
+               if ( bIsLedFeatureSupported )
+               {
+                       if ( nRet == TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n[Line : %d][%s] device_led_play_custom returned TIZEN_ERROR_NOT_SUPPORTED for supported LED feature with flag = %s",
+                                       __LINE__, API_NAMESPACE, /*DeviceGetLedFlag(flags[enum_counter])*/ DeviceGetLedFlag2(enum_counter));
+                               return 1;
+                       }
+                       else if ( nRet != DEVICE_ERROR_NONE )
+                       {
+                               FPRINTF("\\n[Line : %d][%s] device_led_play_custom returned %s for supported LED feature with flag = %s",
+                                       __LINE__, API_NAMESPACE, DeviceGetError(nRet), /*DeviceGetLedFlag(flags[enum_counter])*/ DeviceGetLedFlag2(enum_counter));
+                               return 1;
+                       }
+               }
+               else    //if ( !bIsLedFeatureSupported )
+               {
+                       if ( nRet == TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n[Line : %d][%s] device_led_play_custom returned TIZEN_ERROR_NOT_SUPPORTED for unsupported LED feature with flag = %s",
+                                       __LINE__, API_NAMESPACE, /*DeviceGetLedFlag(flags[enum_counter])*/ DeviceGetLedFlag2(enum_counter));
+                               //return 0;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][%s] device_led_play_custom returned %s for unsupported LED feature with flag = %s",
+                                       __LINE__, API_NAMESPACE, DeviceGetError(nRet), /*DeviceGetLedFlag(flags[enum_counter])*/ DeviceGetLedFlag2(enum_counter));
+                               return 1;
+                       }
+               }
+               
+               usleep(5000);
+               
+               nRet = device_led_stop_custom();
+               if ( bIsLedFeatureSupported )
+               {
+                       if ( nRet == TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n[Line : %d][%s] device_led_stop_custom returned TIZEN_ERROR_NOT_SUPPORTED for supported LED feature with flag = %s",
+                                       __LINE__, API_NAMESPACE, /*DeviceGetLedFlag(flags[enum_counter])*/ DeviceGetLedFlag2(enum_counter));
+                               return 1;
+                       }
+                       else if ( nRet != DEVICE_ERROR_NONE )
+                       {
+                               FPRINTF("\\n[Line : %d][%s] device_led_stop_custom returned %s for supported LED feature with flag = %s",
+                                       __LINE__, API_NAMESPACE, DeviceGetError(nRet), /*DeviceGetLedFlag(flags[enum_counter])*/ DeviceGetLedFlag2(enum_counter));
+                               return 1;
+                       }
+               }
+               else    //if ( !bIsLedFeatureSupported )
+               {
+                       if ( nRet == TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n[Line : %d][%s] device_led_stop_custom returned TIZEN_ERROR_NOT_SUPPORTED for unsupported LED feature with flag = %s",
+                                       __LINE__, API_NAMESPACE, /*DeviceGetLedFlag(flags[enum_counter])*/ DeviceGetLedFlag2(enum_counter));
+                               //return 0;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][%s] device_led_stop_custom returned %s for unsupported LED feature with flag = %s",
+                                       __LINE__, API_NAMESPACE, DeviceGetError(nRet), /*DeviceGetLedFlag(flags[enum_counter])*/ DeviceGetLedFlag2(enum_counter));
+                               return 1;
+                       }
+               }
+       }
+       
+       return 0;
+}
+
+/** @} */ //end of ctc-device-testcases
+/** @} */ //end of ctc-device
\ No newline at end of file
diff --git a/src/ctc/device/tct-device-native.c b/src/ctc/device/tct-device-native.c
new file mode 100755 (executable)
index 0000000..d788fe9
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-device-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/device/tct-device-native.h b/src/ctc/device/tct-device-native.h
new file mode 100755 (executable)
index 0000000..153e12f
--- /dev/null
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_DEVICE_NATIVE_H__
+#define __TCT_DEVICE_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_device_startup(void);
+extern void CTs_device_cleanup(void);
+
+extern int CTc_device_check_led_feature_p(void);
+
+testcase tc_array[] = {
+    {"CTc_device_check_led_feature_p", CTc_device_check_led_feature_p, CTs_device_startup, CTs_device_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_DEVICE_NATIVE_H__
diff --git a/src/ctc/filesystem-permission/CMakeLists.txt b/src/ctc/filesystem-permission/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..f722199
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "filesystem-permission")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "storage")
+SET(TC_SOURCES
+       filesystem-permission-common.c
+       filesystem-permission.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/filesystem-permission/filesystem-permission-common.c b/src/ctc/filesystem-permission/filesystem-permission-common.c
new file mode 100755 (executable)
index 0000000..1c2bac7
--- /dev/null
@@ -0,0 +1,217 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "filesystem-permission-common.h"
+
+/** @addtogroup ctc-filesystem-permission
+* @ingroup             ctc
+* @{
+*/
+
+/**
+ * @function   FilePermissionCreateFile
+ * @description Create a file to the specified location
+ * @parameter  [IN] nStorageID -Storage ID
+ *                             [IN] eStorageDirectory -Enumeration of the storage directory types
+ * @return             If get root directory and create file successfully or not supported occure it returns true otherwise false
+ */
+bool FilePermissionCreateFile(int nStorageID, storage_directory_e eStorageDirectory) 
+{
+       int nRet = STORAGE_ERROR_NONE;
+       FILE *pFile = NULL;     
+       char* pszFilePath;
+       char* pszPath;
+       
+       nRet = storage_get_directory(nStorageID, eStorageDirectory, &pszFilePath);
+       if ( nRet != STORAGE_ERROR_NONE && nRet != STORAGE_ERROR_NOT_SUPPORTED )
+       {
+               StorageErrorInfo("storage_get_directory", nRet);
+               return false;
+       }
+       if ( nRet == STORAGE_ERROR_NOT_SUPPORTED )
+       {
+               fprintf(fpLog, "\\n[%s] Storage Not Supported ", API_NAMESPACE);
+               FILE_SYSTEM_FREE_MEMORY(pszFilePath);
+               return true;
+       }
+       
+       if ( pszFilePath == NULL || strlen(pszFilePath) == 0 )
+       {
+               fprintf(fpLog, "\\n[%s] No path is found under directory", API_NAMESPACE);
+               FILE_SYSTEM_FREE_MEMORY(pszFilePath);
+               return false;
+       }
+       if ( IsPathValid(pszFilePath) == false )
+       {
+               fprintf(fpLog, "\\n[%s] Directory does not exist", API_NAMESPACE);
+               FILE_SYSTEM_FREE_MEMORY(pszFilePath);
+               return true;
+       }
+       
+       fprintf(fpLog, "\\n[%s] Storage Directory : %s", API_NAMESPACE, pszFilePath);
+       pszPath = (char*)malloc(1 + strlen(pszFilePath) + strlen( "/newFile.txt"));
+       if ( pszPath == NULL )
+       {
+               return false;
+       }
+       strcpy(pszPath, pszFilePath);
+       strcat(pszPath, "/newFile.txt");
+       
+       pFile = fopen(pszPath, "w+");
+       if ( pFile == NULL )
+       {
+               fprintf(fpLog, "\\n[%s] File is not created in %s", API_NAMESPACE, pszFilePath);
+               FILE_SYSTEM_FREE_MEMORY(pszPath);
+               return false;
+       }
+       
+       nRet = fclose(pFile);
+       if ( nRet != 0 )
+       {
+               fprintf(fpLog, "\\n[%s] File close is failed in %s", API_NAMESPACE, pszFilePath);
+       }
+       
+       nRet = remove(pszPath);
+       if ( nRet != 0 )
+       {
+               fprintf(fpLog, "\\n[%s] File remove is failed in %s", API_NAMESPACE, pszFilePath);
+       }
+       pFile = NULL;
+       
+       fprintf(fpLog, "\\n[%s] File is created in %s", API_NAMESPACE, pszPath);
+
+       FILE_SYSTEM_FREE_MEMORY(pszPath);
+       return true;
+}
+
+/**
+ * @function   IsPathValid
+ * @description check path validity
+ * @parameter  [IN] pszPath -path
+ * @return             If true on valid path otherwise false
+ */
+bool IsPathValid(char *pszPath) 
+{
+       struct stat st;
+       if ( stat(pszPath, &st) == 0 )
+       {
+               return true; // directory present
+       }
+
+       return false;
+}
+
+/**
+ * @function   FilePermissionCreateDirectory
+ * @description Get root directory and Create a file to the specified location
+ * @parameter  [IN] nStorageID -Storage ID (internal or external)
+ *                             [IN] eStorageDirectory -Enumeration of the storage directory types
+ * @return             If get root directory and create directory successfully or not supported occure it returns true otherwise false
+ */
+bool FilePermissionCreateDirectory(int nStorageID, storage_directory_e eStorageDirectory) 
+{
+       int nRet = STORAGE_ERROR_NONE;
+
+       char* pszFilePath;
+       char* pszPath;
+               
+       nRet = storage_get_directory(nStorageID, eStorageDirectory, &pszFilePath);
+       if ( nRet != STORAGE_ERROR_NONE && nRet != STORAGE_ERROR_NOT_SUPPORTED )
+       {
+               StorageErrorInfo("storage_get_directory", nRet);
+               return false;
+       }
+       if ( nRet == STORAGE_ERROR_NOT_SUPPORTED )
+       {
+               fprintf(fpLog, "\\n[%s] Storage Not Supported ", API_NAMESPACE);
+               FILE_SYSTEM_FREE_MEMORY(pszFilePath);
+               return true;
+       }
+       
+       if ( pszFilePath == NULL || strlen(pszFilePath) == 0 )
+       {
+               fprintf(fpLog, "\\n[%s] No path is found under directory", API_NAMESPACE);
+               FILE_SYSTEM_FREE_MEMORY(pszFilePath);
+               return false;
+       }
+       
+       fprintf(fpLog, "\\n[%s] Storage Directory : %s", API_NAMESPACE, pszFilePath);
+
+       pszPath = (char*)malloc(1 + strlen(pszFilePath) + strlen( "/testFolder"));
+       if ( pszPath == NULL )
+       {
+               return false;
+       }
+       strcpy(pszPath, pszFilePath);
+       
+       if ( IsPathValid(pszFilePath) == false )
+       {
+               fprintf(fpLog, "\\n[%s] Directory does not exist", API_NAMESPACE);
+               FILE_SYSTEM_FREE_MEMORY(pszFilePath);
+               FILE_SYSTEM_FREE_MEMORY(pszPath);
+               return  true;
+       }       
+       if ( nRet != 0 )
+       {
+               fprintf(fpLog, "\\n[%s] Directory is not created in %s", API_NAMESPACE, pszPath);
+               FILE_SYSTEM_FREE_MEMORY(pszPath);
+               return false;
+       }
+       
+       strcat(pszPath, "/testFolder");
+       nRet = mkdir(pszPath, 0777);
+       
+       nRet = rmdir(pszPath);
+       if ( nRet != 0 )
+       {
+               fprintf(fpLog, "\\n[%s] Directory remove is failed in %s", API_NAMESPACE, pszPath);
+       }
+
+       fprintf(fpLog, "\\n[%s] Directory is created in %s", API_NAMESPACE, pszPath);
+
+       FILE_SYSTEM_FREE_MEMORY(pszPath);
+       return true;
+}
+
+/**
+* @function                            StorageErrorInfo
+* @description                                 print the error information
+* @parameter[IN]                       nResult, the error code
+*                      [IN]                    pszApiName, API name
+* @return                                      NA
+*/
+void StorageErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(MEMLOG, MEMLOG * sizeof(char));
+
+       if(pszErrorMsg != NULL)
+       {
+               switch(nResult)
+               {
+                       case STORAGE_ERROR_NONE:                                                strcpy(pszErrorMsg, "STORAGE_ERROR_NONE");                                      break;
+                       case STORAGE_ERROR_INVALID_PARAMETER:                   strcpy(pszErrorMsg, "STORAGE_ERROR_INVALID_PARAMETER");         break;
+                       case STORAGE_ERROR_OUT_OF_MEMORY:                               strcpy(pszErrorMsg, "STORAGE_ERROR_OUT_OF_MEMORY");                     break;
+                       case STORAGE_ERROR_NOT_SUPPORTED:                               strcpy(pszErrorMsg, "STORAGE_ERROR_NOT_SUPPORTED");                     break;
+                       case STORAGE_ERROR_OPERATION_FAILED:                    strcpy(pszErrorMsg, "STORAGE_ERROR_OPERATION_FAILED");          break;
+                       default:                                                                                strcpy(pszErrorMsg, "Unknown Error");
+
+               }
+       }
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)\n", API_NAMESPACE, pszApiName, pszErrorMsg, nResult);
+       FILE_SYSTEM_FREE_MEMORY(pszErrorMsg);
+}
+       
+/** @} */ //end of ctc-filesystem-permission
diff --git a/src/ctc/filesystem-permission/filesystem-permission-common.h b/src/ctc/filesystem-permission/filesystem-permission-common.h
new file mode 100755 (executable)
index 0000000..7c5a517
--- /dev/null
@@ -0,0 +1,56 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _FILESYSTEM_PERMISSION_COMMON_H_
+#define _FILESYSTEM_PERMISSION_COMMON_H_
+
+//Add test package related includes here
+
+#include "assert.h"
+#include <stdio.h>
+#include <sys/stat.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <storage.h>
+#include <unistd.h>
+
+/** @addtogroup ctc-filesystem-permission
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                                  "CTS_FILESYSTEMPERMISSION_CTC"
+#define ERR_LOG                                                "/tmp/tclog"
+#define MEMLOG                                                         20
+#define MAX_BLOCK_SIZE                                         25
+#define FILE_SYSTEM_FREE_MEMORY(src)   { free(src); src = NULL; }
+
+FILE *fpLog;
+
+//Create File
+bool FilePermissionCreateFile(int nStorageID, storage_directory_e eStorageDirectory);
+
+//Check if directory
+bool IsPathValid(char *pszPath) ;
+
+//Create Directory
+bool FilePermissionCreateDirectory(int nStorageID, storage_directory_e eStorageDirectory);
+
+//Print Error Message
+void StorageErrorInfo(char *pszApiName, int nResult);
+
+/** @} */ //end of ctc-filesystem-permission
+#endif  //_FILESYSTEM_PERMISSION_COMMON_H_
diff --git a/src/ctc/filesystem-permission/filesystem-permission.c b/src/ctc/filesystem-permission/filesystem-permission.c
new file mode 100755 (executable)
index 0000000..add33f6
--- /dev/null
@@ -0,0 +1,856 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "filesystem-permission-common.h"
+
+/** @addtogroup ctc-filesystem-permission
+* @ingroup             ctc
+* @{
+*/
+
+//& set: FilesystemPermission
+
+/**
+* @function            CTs_filesystem_permission_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_filesystem_permission_startup(void)
+{
+       fpLog = fopen(ERR_LOG, "w");
+       return;
+}
+
+/**
+* @function            CTs_filesystem_permission_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_filesystem_permission_cleanup(void)
+{
+       fclose(fpLog);
+       return;
+}
+
+/** @addtogroup        ctc-filesystem-permission-testcases
+* @brief               Integration testcases for module filesystem-permission
+* @ingroup             ctc-filesystem-permission
+* @{
+*/
+
+//& purpose: Check for File system permission in STORAGE_DIRECTORY_IMAGES
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToImages_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the STORAGE_DIRECTORY_IMAGES directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFileToImages_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToImages_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_IMAGES) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in STORAGE_DIRECTORY_SOUNDS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToSounds_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the STORAGE_DIRECTORY_SOUNDS directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFileToSounds_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToSounds_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_SOUNDS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in STORAGE_DIRECTORY_VIDEOS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToVideos_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the STORAGE_DIRECTORY_VIDEOS directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFileToVideos_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToVideos_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_VIDEOS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in STORAGE_DIRECTORY_CAMERA
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToCamera_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the STORAGE_DIRECTORY_CAMERA directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFileToCamera_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToCamera_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_CAMERA) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in STORAGE_DIRECTORY_DOWNLOADS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToDownloads_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the STORAGE_DIRECTORY_DOWNLOADS directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFileToDownloads_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToDownloads_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_DOWNLOADS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in STORAGE_DIRECTORY_MUSIC
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToMusic_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the STORAGE_DIRECTORY_MUSIC directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the files
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFileToMusic_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToMusic_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_MUSIC) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in STORAGE_DIRECTORY_DOCUMENTS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToDocuments_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the STORAGE_DIRECTORY_DOCUMENTS directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFileToDocuments_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToDocuments_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_DOCUMENTS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in STORAGE_DIRECTORY_OTHERS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToOthers_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the STORAGE_DIRECTORY_OTHERS directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFileToOthers_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToOthers_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_OTHERS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in External STORAGE_DIRECTORY_IMAGES
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToExternalImages_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the External STORAGE_DIRECTORY_IMAGES directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFileToExternalImages_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToExternalImages_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_IMAGES) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in External STORAGE_DIRECTORY_SOUNDS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToExternalSounds_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the External STORAGE_DIRECTORY_SOUNDS directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFileToExternalSounds_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToExternalSounds_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_SOUNDS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in External STORAGE_DIRECTORY_VIDEOS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToExternalVideos_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the External STORAGE_DIRECTORY_VIDEOS directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFileToExternalVideos_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToExternalVideos_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_VIDEOS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in External STORAGE_DIRECTORY_CAMERA
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToExternalCamera_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the External STORAGE_DIRECTORY_CAMERA directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFileToExternalCamera_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToExternalCamera_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_CAMERA) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in External STORAGE_DIRECTORY_DOWNLOADS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToExternalDownloads_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the External STORAGE_DIRECTORY_DOWNLOADS directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFileToExternalDownloads_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToExternalDownloads_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_DOWNLOADS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in External STORAGE_DIRECTORY_MUSIC
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToExternalMusic_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the External STORAGE_DIRECTORY_MUSIC directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFileToExternalMusic_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToExternalMusic_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_MUSIC) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in External STORAGE_DIRECTORY_DOCUMENTS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToExternalDocuments_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the External STORAGE_DIRECTORY_DOCUMENTS directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFileToExternalDocuments_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToExternalDocuments_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_DOCUMENTS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for File system permission in External STORAGE_DIRECTORY_OTHERS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFileToExternalOthers_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Create a file to the External STORAGE_DIRECTORY_OTHERS directory\n
+*                                      Check whether file creation is permitted in this directory or not\n
+*                                      Close and remove the file
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a file in the given directory. 
+* @failcase                    If it fails to create a file in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFileToExternalOthers_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFileToExternalOthers_p", API_NAMESPACE);
+       if ( FilePermissionCreateFile(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_OTHERS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in STORAGE_DIRECTORY_IMAGES
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToImages_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the STORAGE_DIRECTORY_IMAGES directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFolderToImages_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToImages_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_IMAGES) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in STORAGE_DIRECTORY_SOUNDS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToSounds_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the STORAGE_DIRECTORY_SOUNDS directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFolderToSounds_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToSounds_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_SOUNDS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in STORAGE_DIRECTORY_VIDEOS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToVideos_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the STORAGE_DIRECTORY_VIDEOS directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFolderToVideos_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToVideos_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_VIDEOS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in STORAGE_DIRECTORY_CAMERA
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToCamera_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the STORAGE_DIRECTORY_CAMERA directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFolderToCamera_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToCamera_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_CAMERA) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in STORAGE_DIRECTORY_DOWNLOADS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToDownloads_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the STORAGE_DIRECTORY_DOWNLOADS directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFolderToDownloads_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToDownloads_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_DOWNLOADS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in STORAGE_DIRECTORY_MUSIC
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToMusic_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the STORAGE_DIRECTORY_MUSIC directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFolderToMusic_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToMusic_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_MUSIC) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in STORAGE_DIRECTORY_DOCUMENTS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToDocuments_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the STORAGE_DIRECTORY_DOCUMENTS directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFolderToDocuments_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToDocuments_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_DOCUMENTS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in STORAGE_DIRECTORY_OTHERS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToOthers_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the STORAGE_DIRECTORY_OTHERS directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_CreateFolderToOthers_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToOthers_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_OTHERS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in External STORAGE_DIRECTORY_IMAGES
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToExternalImages_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the External STORAGE_DIRECTORY_IMAGES directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFolderToExternalImages_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToExternalImages_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_IMAGES) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in External STORAGE_DIRECTORY_SOUNDS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToExternalSounds_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the External STORAGE_DIRECTORY_SOUNDS directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFolderToExternalSounds_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToExternalSounds_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_SOUNDS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in External STORAGE_DIRECTORY_VIDEOS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToExternalVideos_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the External STORAGE_DIRECTORY_VIDEOS directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFolderToExternalVideos_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToExternalVideos_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_VIDEOS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in External STORAGE_DIRECTORY_CAMERA
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToExternalCamera_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the External STORAGE_DIRECTORY_CAMERA directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFolderToExternalCamera_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToExternalCamera_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_CAMERA) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in External STORAGE_DIRECTORY_DOWNLOADS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToExternalDownloads_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the External STORAGE_DIRECTORY_DOWNLOADS directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFolderToExternalDownloads_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToExternalDownloads_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_DOWNLOADS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in External STORAGE_DIRECTORY_MUSIC
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToExternalMusic_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the External STORAGE_DIRECTORY_MUSIC directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFolderToExternalMusic_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToExternalMusic_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_MUSIC) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in External STORAGE_DIRECTORY_DOCUMENTS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToExternalDocuments_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the External STORAGE_DIRECTORY_DOCUMENTS directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFolderToExternalDocuments_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToExternalDocuments_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_DOCUMENTS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check for Directory system permission in External STORAGE_DIRECTORY_OTHERS
+//& eType: auto
+/**
+* @testcase                    CTc_CreateFolderToExternalOthers_p
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a folder to the External STORAGE_DIRECTORY_OTHERS directory\n
+*                                      Check whether folder creation is permitted in this directory or not\n
+*                                      Remove the folder
+* @apicovered          storage_get_directory
+* @passcase                    If it successfully create a folder in the given directory. 
+* @failcase                    If it fails to create a folder in the given directory.
+* @precondition                        Insert an external sdcard to memory slot into device
+* @postcondition       NA
+*/
+int CTc_CreateFolderToExternalOthers_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase CTc_CreateFolderToExternalOthers_p", API_NAMESPACE);
+       if ( FilePermissionCreateDirectory(STORAGE_TYPE_EXTERNAL, STORAGE_DIRECTORY_OTHERS) == false )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+/** @} */ //end of ctc-filesystem-permission-testcases
+/** @} */ //end of ctc-filesystem-permission
\ No newline at end of file
diff --git a/src/ctc/filesystem-permission/tct-filesystem-permission-native.c b/src/ctc/filesystem-permission/tct-filesystem-permission-native.c
new file mode 100755 (executable)
index 0000000..3369639
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-filesystem-permission-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/filesystem-permission/tct-filesystem-permission-native.h b/src/ctc/filesystem-permission/tct-filesystem-permission-native.h
new file mode 100755 (executable)
index 0000000..050ed05
--- /dev/null
@@ -0,0 +1,93 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_FILESYSTEM_PERMISSION_NATIVE_H__
+#define __TCT_FILESYSTEM_PERMISSION_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_filesystem_permission_startup(void);
+extern void CTs_filesystem_permission_cleanup(void);
+
+extern int CTc_CreateFileToImages_p(void);
+extern int CTc_CreateFileToSounds_p(void);
+extern int CTc_CreateFileToVideos_p(void);
+extern int CTc_CreateFileToCamera_p(void);
+extern int CTc_CreateFileToDownloads_p(void);
+extern int CTc_CreateFileToMusic_p(void);
+extern int CTc_CreateFileToDocuments_p(void);
+extern int CTc_CreateFileToOthers_p(void);
+extern int CTc_CreateFileToExternalImages_p(void);
+extern int CTc_CreateFileToExternalSounds_p(void);
+extern int CTc_CreateFileToExternalVideos_p(void);
+extern int CTc_CreateFileToExternalCamera_p(void);
+extern int CTc_CreateFileToExternalDownloads_p(void);
+extern int CTc_CreateFileToExternalMusic_p(void);
+extern int CTc_CreateFileToExternalDocuments_p(void);
+extern int CTc_CreateFileToExternalOthers_p(void);
+extern int CTc_CreateFolderToImages_p(void);
+extern int CTc_CreateFolderToSounds_p(void);
+extern int CTc_CreateFolderToVideos_p(void);
+extern int CTc_CreateFolderToCamera_p(void);
+extern int CTc_CreateFolderToDownloads_p(void);
+extern int CTc_CreateFolderToMusic_p(void);
+extern int CTc_CreateFolderToDocuments_p(void);
+extern int CTc_CreateFolderToOthers_p(void);
+extern int CTc_CreateFolderToExternalImages_p(void);
+extern int CTc_CreateFolderToExternalSounds_p(void);
+extern int CTc_CreateFolderToExternalVideos_p(void);
+extern int CTc_CreateFolderToExternalCamera_p(void);
+extern int CTc_CreateFolderToExternalDownloads_p(void);
+extern int CTc_CreateFolderToExternalMusic_p(void);
+extern int CTc_CreateFolderToExternalDocuments_p(void);
+extern int CTc_CreateFolderToExternalOthers_p(void);
+
+testcase tc_array[] = {
+    {"CTc_CreateFileToImages_p", CTc_CreateFileToImages_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToSounds_p", CTc_CreateFileToSounds_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToVideos_p", CTc_CreateFileToVideos_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToCamera_p", CTc_CreateFileToCamera_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToDownloads_p", CTc_CreateFileToDownloads_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToMusic_p", CTc_CreateFileToMusic_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToDocuments_p", CTc_CreateFileToDocuments_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToOthers_p", CTc_CreateFileToOthers_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToExternalImages_p", CTc_CreateFileToExternalImages_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToExternalSounds_p", CTc_CreateFileToExternalSounds_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToExternalVideos_p", CTc_CreateFileToExternalVideos_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToExternalCamera_p", CTc_CreateFileToExternalCamera_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToExternalDownloads_p", CTc_CreateFileToExternalDownloads_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToExternalMusic_p", CTc_CreateFileToExternalMusic_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToExternalDocuments_p", CTc_CreateFileToExternalDocuments_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFileToExternalOthers_p", CTc_CreateFileToExternalOthers_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToImages_p", CTc_CreateFolderToImages_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToSounds_p", CTc_CreateFolderToSounds_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToVideos_p", CTc_CreateFolderToVideos_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToCamera_p", CTc_CreateFolderToCamera_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToDownloads_p", CTc_CreateFolderToDownloads_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToMusic_p", CTc_CreateFolderToMusic_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToDocuments_p", CTc_CreateFolderToDocuments_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToOthers_p", CTc_CreateFolderToOthers_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToExternalImages_p", CTc_CreateFolderToExternalImages_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToExternalSounds_p", CTc_CreateFolderToExternalSounds_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToExternalVideos_p", CTc_CreateFolderToExternalVideos_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToExternalCamera_p", CTc_CreateFolderToExternalCamera_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToExternalDownloads_p", CTc_CreateFolderToExternalDownloads_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToExternalMusic_p", CTc_CreateFolderToExternalMusic_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToExternalDocuments_p", CTc_CreateFolderToExternalDocuments_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {"CTc_CreateFolderToExternalOthers_p", CTc_CreateFolderToExternalOthers_p, CTs_filesystem_permission_startup, CTs_filesystem_permission_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_FILESYSTEM_PERMISSION_NATIVE_H__
diff --git a/src/ctc/image-util/CMakeLists.txt b/src/ctc/image-util/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..d196308
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "image-util")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-media-image-util")
+SET(TC_SOURCES
+       image-util-common.c
+       image-util.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/image-util/ImageUtil_sample.jpg b/src/ctc/image-util/ImageUtil_sample.jpg
new file mode 100755 (executable)
index 0000000..d18b153
Binary files /dev/null and b/src/ctc/image-util/ImageUtil_sample.jpg differ
diff --git a/src/ctc/image-util/image-util-common.c b/src/ctc/image-util/image-util-common.c
new file mode 100755 (executable)
index 0000000..c626365
--- /dev/null
@@ -0,0 +1,160 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "image-util-common.h"
+
+/** @addtogroup ctc-image-util
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+
+/**
+ * @function   ImageUtilPrintErrorCode
+ * @description Display the details error information
+ * @parameter  [IN] nResult,           api return value code
+ *                             [IN] pszApi,            api name
+ *                             [IN] nLineNumber        line number
+ * @return     NA
+ *
+ */
+void ImageUtilPrintErrorCode(char *pszApi,int nResult, int nLineNumber)
+{
+       char* pszErrInfo = NULL;
+       pszErrInfo = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( NULL == pszErrInfo )
+       {
+               fprintf (fpLog, "\\n[%s] pszErrInfo failed invalid path.", API_NAMESPACE);
+               return;
+       }
+       
+       switch ( nResult )
+       {
+               case IMAGE_UTIL_ERROR_INVALID_PARAMETER :               strcpy(pszErrInfo, "IMAGE_UTIL_ERROR_INVALID_PARAMETER ");              break;
+               case IMAGE_UTIL_ERROR_OUT_OF_MEMORY :                   strcpy(pszErrInfo, "IMAGE_UTIL_ERROR_OUT_OF_MEMORY ");                  break;
+               case IMAGE_UTIL_ERROR_NO_SUCH_FILE:                             strcpy(pszErrInfo, "IMAGE_UTIL_ERROR_NO_SUCH_FILE");                    break;
+               case IMAGE_UTIL_ERROR_INVALID_OPERATION :               strcpy(pszErrInfo, "IMAGE_UTIL_ERROR_INVALID_OPERATION ");              break;
+               case IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT :    strcpy(pszErrInfo, "IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT ");   break;
+               case IMAGE_UTIL_ERROR_PERMISSION_DENIED:                strcpy(pszErrInfo, "IMAGE_UTIL_ERROR_PERMISSION_DENIED");               break;
+               default:                                                                                strcpy(pszErrInfo, "Unknown_Error");
+       }
+
+       fprintf (fpLog,"\\n[%s] %s failed, error returned = %s, in line number:: %d", API_NAMESPACE, pszApi, pszErrInfo, nLineNumber);
+       free(pszErrInfo);
+       pszErrInfo = NULL;
+}
+
+/**
+ * @function   ImageUtilEncode
+ * @description Calculate image buffer and encode the image.
+ * @parameter  [IN] nWidth,                    image width
+ *                             [IN] nHeight,                   image height
+ *                             [IN] eColorSpace,               image colorspace
+ * @return     true if all api return success otherwise false.
+ */
+bool ImageUtilEncode(int nWidth, int nHeight, image_util_colorspace_e eColorSpace)
+{
+       int nRet= IMAGE_UTIL_ERROR_NONE;
+       unsigned int unSize = 0;
+       
+       nRet = image_util_calculate_buffer_size (nWidth, nHeight, eColorSpace , &unSize);
+       if ( nRet != IMAGE_UTIL_ERROR_NONE )
+       {
+               ImageUtilPrintErrorCode("image_util_calculate_buffer_size",nRet, __LINE__);
+               return false;
+       }
+       if ( unSize == 0 )
+       {
+               fprintf (fpLog,"\\n[%s] Calculated Image Buffer Size is returned zero", API_NAMESPACE);
+               return false;
+       }
+       
+       g_upszImgDestBuffer = malloc(unSize);
+       
+       nRet = image_util_encode_jpeg(g_upszImgDestBuffer, nWidth, nHeight, eColorSpace, QUALITY, OUTPUT_FILE_PATH);
+       if ( nRet != IMAGE_UTIL_ERROR_NONE )
+       {
+               ImageUtilPrintErrorCode("image_util_encode_jpeg",nRet, __LINE__);
+               free(g_upszImgDestBuffer);
+               g_upszImgDestBuffer = NULL;
+               return false;
+       }
+       
+       free(g_upszImgDestBuffer);
+       g_upszImgDestBuffer = NULL;
+       return true;
+}
+
+/**
+ * @function   ImageUtilCheckFunction
+ * @description Calculate image buffer and encode the image.
+ * @parameter  [IN] upszImageBuffer,           image buffer
+ *                             [IN] nWidth,                            image width
+ *                             [IN] nHeight,                           image Height 
+ *                             [IN] unDecodeSize,                      buffer size
+ *                             [IN] nLineNumber        line number
+ * @return     true if all api return success otherwise false.
+ */
+bool ImageUtilCheckFunction(unsigned char *upszImageBuffer, int nWidth, int nHeight, unsigned int unDecodeSize, int nLineNumber)
+{
+       if ( upszImageBuffer == NULL )
+       {
+               fprintf (fpLog,"\\n[%s] Decoded Image Buffer is NULL, line NO: %d", API_NAMESPACE, nLineNumber);
+               return false;
+       }
+       if ( nWidth < 0 )
+       {
+               fprintf (fpLog,"\\n[%s] Decoded Image width is less than zero, line NO: %d", API_NAMESPACE, nLineNumber);
+               return false;
+       }
+       if ( nHeight < 0 )
+       {
+               fprintf (fpLog,"\\n[%s] Decoded Image height is less than zero,line NO: %d", API_NAMESPACE, nLineNumber);
+               return false;
+       }
+       if ( unDecodeSize == 0 )
+       {
+               fprintf (fpLog,"\\n[%s] Decoded Image Buffer Size is zero, line NO: %d", API_NAMESPACE, nLineNumber);
+               return false;
+       }
+       
+       return true;
+}
+
+/**
+* @function            ImageUtilGetDataPath
+* @description                 Get the path to application data directory
+* @parameter[IN]       char* pszFileName [file name]
+* @return                      NA
+*/
+char* ImageUtilGetDataPath(char *pszFileName)
+{
+       char *pszAppData = app_get_data_path(),*pszImgPath = NULL;
+       if ( pszAppData == NULL )
+       {
+               fprintf (fpLog, "\\n[%s] app_get_data_path() is failed invalid path.", API_NAMESPACE);
+               return pszImgPath;
+       }
+       pszImgPath = (char*) calloc(1, strlen(pszAppData) + strlen(pszFileName)+1);
+       if ( pszImgPath != NULL )
+       {
+               sprintf(pszImgPath, "%s%s",pszAppData, pszFileName );
+               fprintf (fpLog, "\\n[%s] app_get_data_path() is %s.", API_NAMESPACE,pszImgPath);
+       }
+       return pszImgPath;
+}
+
+/** @} */ //end of ctc-image-util
diff --git a/src/ctc/image-util/image-util-common.h b/src/ctc/image-util/image-util-common.h
new file mode 100755 (executable)
index 0000000..18adf32
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _IMAGE_UTIL_COMMON_H_
+#define _IMAGE_UTIL_COMMON_H_
+
+//Add test package related includes here
+#include "assert.h"
+#include <stdio.h>
+#include <image_util.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <stdbool.h>
+#include <string.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <app.h>
+
+/** @addtogroup ctc-image-util
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                          "IMAGE_UTIL_CTC"
+#define ERR_LOG                                        "/tmp/tclog"
+#define SAMPLE_FILE_PATH                       (ImageUtilGetDataPath("/ImageUtil_sample.jpg"))
+#define OUTPUT_FILE_PATH                       (ImageUtilGetDataPath("output.jpg"))
+#define MEMLOG                                                 20
+#define MAX_BLOCK_SIZE                         25
+#define QUALITY                                                100
+
+FILE *fpLog;
+
+unsigned char * g_upszImgDestBuffer;
+
+//Add helper function declarations here
+
+/**print Image Util API Error Message*/
+void ImageUtilPrintErrorCode(char *pszApi,int nResult, int nLineNumber);
+
+/**Calculate Buffer Size and Encode Image*/
+bool ImageUtilEncode(int nWidth, int nHeight, image_util_colorspace_e eColorSpace);
+
+/**Check Function*/
+bool ImageUtilCheckFunction(unsigned char *upszImageBuffer, int nWidth, int nHeight, unsigned int unDecodeSize, int nLineNumber);
+
+char* ImageUtilGetDataPath(char *pszFileName);
+
+/** @} */ //end of ctc-image-util
+#endif  //_IMAGE_UTIL_COMMON_H_
diff --git a/src/ctc/image-util/image-util.c b/src/ctc/image-util/image-util.c
new file mode 100755 (executable)
index 0000000..e946e93
--- /dev/null
@@ -0,0 +1,183 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "image-util-common.h"
+
+/** @addtogroup ctc-image-util
+* @ingroup             ctc
+* @{
+*/
+
+//& set: ImageUtil
+
+/**
+* @function            CTs_image_util_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_image_util_startup(void)
+{
+       fpLog = NULL;
+       fpLog = fopen(ERR_LOG,"w");
+       return;
+}
+
+/**
+* @function            CTs_image_util_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_image_util_cleanup(void)
+{
+       fclose(fpLog);
+       fpLog = NULL;
+       return;
+}
+
+/** @addtogroup        ctc-image-util-testcases
+* @brief               Integration testcases for module image-util
+* @ingroup             ctc-image-util
+* @{
+*/
+
+//& purpose: Encode jpeg image to jpg format.
+//& type: auto
+/**
+* @testcase                    CTc_ImageUtil_ImageEncoder_JPEG_p
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Decodes jpeg image to the buffer\n
+*                                      Calculates the size of image buffer for the specified resolution and colorspace\n
+*                                      Encodes image to the jpeg image
+* @apicovered          image_util_decode_jpeg,image_util_calculate_buffer_size,image_util_encode_jpeg
+* @passcase                    If image encoding to jpeg image is done successfully and all api returns success message.
+* @failcase                    If an api returns error message.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_ImageUtil_ImageEncoder_JPEG_p(void)
+{
+       fprintf (fpLog,"\\n[%s] Executing testcase - CTc_ImageUtil_ImageEncoder_JPEG_p.", API_NAMESPACE);
+       int nRet= IMAGE_UTIL_ERROR_NONE, nWidth = 0, nHeight = 0;
+       unsigned int unDecodeSize = 0;
+       unsigned char * upszImgSourceBuffer = NULL;
+       
+       nRet = image_util_decode_jpeg (SAMPLE_FILE_PATH, IMAGE_UTIL_COLORSPACE_RGB888, &upszImgSourceBuffer, &nWidth, &nHeight, &unDecodeSize);
+       if ( nRet != IMAGE_UTIL_ERROR_NONE )
+       {
+               ImageUtilPrintErrorCode("image_util_decode_jpeg", nRet, __LINE__);
+               return 1;
+       }
+       
+       if ( ImageUtilCheckFunction (upszImgSourceBuffer, nWidth, nHeight, unDecodeSize, __LINE__) == false )
+       {
+               if ( upszImgSourceBuffer )
+               {
+                       free(upszImgSourceBuffer);
+                       upszImgSourceBuffer = NULL;
+               }
+               return 1;
+       }
+       
+       free(upszImgSourceBuffer);
+       upszImgSourceBuffer = NULL;
+       
+       if ( ImageUtilEncode(nWidth, nHeight, IMAGE_UTIL_COLORSPACE_RGB888) == false )
+       {
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Decode jpg image
+//& type: auto
+/**
+* @testcase                    CTc_ImageUtil_ImageDecoder_JPG_p
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Decodes jpeg image to the buffer\n
+*                                      Calculates the size of image buffer for the specified resolution and colorspace\n
+*                                      Encodes image to the jpeg image\n
+*                                      Decodes the encoded jpeg image to the buffer
+* @apicovered          image_util_decode_jpeg,image_util_calculate_buffer_size,image_util_encode_jpeg
+* @passcase                    All api returns success message.
+* @failcase                    An api returns error message.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_ImageUtil_ImageDecoder_JPG_p(void)
+{
+       fprintf (fpLog,"\\n[%s] Executing testcase - CTc_ImageUtil_ImageDecoder_JPG_p.", API_NAMESPACE);
+       int nRet= IMAGE_UTIL_ERROR_NONE, nWidth = 0, nHeight = 0;
+       unsigned int unDecodeSize = 0;
+       unsigned char * upszImgSourceBuffer = NULL;
+       
+       nRet = image_util_decode_jpeg (SAMPLE_FILE_PATH, IMAGE_UTIL_COLORSPACE_RGB888, &upszImgSourceBuffer, &nWidth, &nHeight, &unDecodeSize);
+       if ( nRet != IMAGE_UTIL_ERROR_NONE )
+       {
+               ImageUtilPrintErrorCode("image_util_decode_jpeg", nRet, __LINE__);
+               return 1;
+       }
+       
+       if ( ImageUtilCheckFunction(upszImgSourceBuffer, nWidth, nHeight, unDecodeSize, __LINE__) == false )
+       {
+               if ( upszImgSourceBuffer )
+               {
+                       free(upszImgSourceBuffer);
+                       upszImgSourceBuffer = NULL;
+               }
+               return 1;
+       }
+       
+       if ( ImageUtilEncode(nWidth, nHeight, IMAGE_UTIL_COLORSPACE_RGB888) == false )
+       {
+               free(upszImgSourceBuffer);
+               upszImgSourceBuffer = NULL;
+               return 1;
+       }       
+       
+       nRet = image_util_decode_jpeg (OUTPUT_FILE_PATH, IMAGE_UTIL_COLORSPACE_RGB888, &upszImgSourceBuffer, &nWidth, &nHeight, &unDecodeSize);
+       if ( nRet != IMAGE_UTIL_ERROR_NONE )
+       {               
+               ImageUtilPrintErrorCode("image_util_decode_jpeg", nRet, __LINE__);
+               if(upszImgSourceBuffer)
+               {
+                       free(upszImgSourceBuffer);
+                       upszImgSourceBuffer = NULL;
+               }
+               return 1;
+       }
+       
+       if ( ImageUtilCheckFunction(upszImgSourceBuffer, nWidth, nHeight, unDecodeSize, __LINE__) == false )
+       {
+               if ( upszImgSourceBuffer )
+               {
+                       free(upszImgSourceBuffer);
+                       upszImgSourceBuffer = NULL;
+               }
+               return 1;
+       }
+       
+       free(upszImgSourceBuffer);
+       upszImgSourceBuffer = NULL;
+       
+       return 0;
+}
+
+/** @} */ //end of ctc-image-util-testcases
+/** @} */ //end of ctc-image-util
\ No newline at end of file
diff --git a/src/ctc/image-util/tct-image-util-native.c b/src/ctc/image-util/tct-image-util-native.c
new file mode 100755 (executable)
index 0000000..88561d9
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-image-util-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/image-util/tct-image-util-native.h b/src/ctc/image-util/tct-image-util-native.h
new file mode 100755 (executable)
index 0000000..dbb6cf4
--- /dev/null
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_IMAGE_UTIL_NATIVE_H__
+#define __TCT_IMAGE_UTIL_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_image_util_startup(void);
+extern void CTs_image_util_cleanup(void);
+
+extern int CTc_ImageUtil_ImageEncoder_JPEG_p(void);
+extern int CTc_ImageUtil_ImageDecoder_JPG_p(void);
+
+testcase tc_array[] = {
+    {"CTc_ImageUtil_ImageEncoder_JPEG_p", CTc_ImageUtil_ImageEncoder_JPEG_p, CTs_image_util_startup, CTs_image_util_cleanup},
+    {"CTc_ImageUtil_ImageDecoder_JPG_p", CTc_ImageUtil_ImageDecoder_JPG_p, CTs_image_util_startup, CTs_image_util_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_IMAGE_UTIL_NATIVE_H__
diff --git a/src/ctc/libstorage/CMakeLists.txt b/src/ctc/libstorage/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..679f72b
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "libstorage")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "storage")
+SET(TC_SOURCES
+       libstorage-common.c
+       libstorage.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/libstorage/libstorage-common.c b/src/ctc/libstorage/libstorage-common.c
new file mode 100755 (executable)
index 0000000..d6114cd
--- /dev/null
@@ -0,0 +1,206 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "libstorage-common.h"
+
+/** @addtogroup        ctc-libstorage
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+/**
+* @function            FileClose
+* @description                 File closing form open state
+* @parameter[IN]       pFilePath [tha file path to be closed].
+* @pre-condition       NA
+* @return                      true if File closed successfully otherwise false.
+*/
+bool FileClose(FILE *pFile)
+{
+       int nRet = fclose(pFile);
+       if ( nRet != 0 )
+       {
+               fprintf(fpLog, "\\n[%s] File Closing failed.", API_NAMESPACE);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            FileRemove
+* @description                 File removing by file path
+* @parameter[IN]       pFilePath [tha file path to be removed].
+* @pre-condition       NA
+* @return                      true if File Removed successfully otherwise false.
+*/
+bool FileRemove(char* pFilePath)
+{
+       int nRet = remove(pFilePath);
+       if ( nRet < 0 )
+       {
+               fprintf(fpLog, "\\n[%s] File removing failed.", API_NAMESPACE);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            FileCopy
+* @description                 Copy one file with contents to another file.
+* @parameter[IN]       pSrcFile [Source file].
+*                      [IN]    pszSrcFilePath [Source file path].
+* *                    [IN]    pDestFile [Destination file].
+*                      [IN]    pszDestFilePath [Destination file path].
+* @pre-condition       NA
+* @return                      true if File copied successfully otherwise false.
+*/
+bool FileCopy(char *pszSrcFilePath, char *pszDestFilePath)
+{
+       char szBuffer[MAXVAL] = {0};    /*Buffer to store files content*/
+       FILE *pSrcFile = NULL;
+       FILE *pDestFile = NULL;
+       pSrcFile = fopen(pszSrcFilePath, "r");
+       if ( pSrcFile == NULL )
+       {
+               fprintf(fpLog, "\\n[%s] Source File Opening failed.", API_NAMESPACE);
+               return false;
+       }
+       pDestFile = fopen(pszDestFilePath, "w");
+       if ( pDestFile== NULL )
+       {
+               fprintf(fpLog, "\\n[%s] Destination File Opening failed.", API_NAMESPACE);
+               FileClose(pSrcFile);
+               return false;
+       }
+       
+       while ( fgets(szBuffer, MAXVAL, pSrcFile) )
+       {
+               fputs(szBuffer, pDestFile);
+       }
+       fprintf(fpLog, "\\n[%s] File Copied successfully .", API_NAMESPACE);
+       FileClose(pSrcFile);
+       FileClose(pDestFile);
+       return true;
+}
+
+/**
+* @function                            StorageErrorInfo
+* @description                                 print the error information
+* @parameter[IN]                       nResult, the error code
+*                      [IN]                    pszApiName, API name
+* @return                                      NA
+*/
+void StorageErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(MEMLOG, MEMLOG * sizeof(char));
+       if ( NULL == pszErrorMsg )
+       {
+               fprintf(fpLog, "\\n[%s] pszErrorMsg is NULL", API_NAMESPACE);
+               return;
+       }
+
+       switch ( nResult )
+       {
+               case STORAGE_ERROR_NONE:                                                strcpy(pszErrorMsg, "STORAGE_ERROR_NONE");                                      break;
+               case STORAGE_ERROR_INVALID_PARAMETER:                   strcpy(pszErrorMsg, "STORAGE_ERROR_INVALID_PARAMETER");         break;
+               case STORAGE_ERROR_OUT_OF_MEMORY:                               strcpy(pszErrorMsg, "STORAGE_ERROR_OUT_OF_MEMORY");                     break;
+               case STORAGE_ERROR_NOT_SUPPORTED:                               strcpy(pszErrorMsg, "STORAGE_ERROR_NOT_SUPPORTED");                     break;
+               case STORAGE_ERROR_OPERATION_FAILED:                    strcpy(pszErrorMsg, "STORAGE_ERROR_OPERATION_FAILED");          break;
+               default:                                                                                strcpy(pszErrorMsg, "Unknown Error");
+       }
+       
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)", API_NAMESPACE, pszApiName, pszErrorMsg, nResult);
+       free(pszErrorMsg);
+       pszErrorMsg = NULL;
+}
+/**
+ * @function   StorageGetPath
+ * @description Get file path according to storage type
+ * @parameter  [IN] nStorageID -Storage ID
+ * @return             If get root directory successfully it returns path otherwise NULL
+ */
+char* StorageGetPath(int nStorageID) 
+{
+       char* pszPath = NULL;
+       int nRet = storage_get_directory(nStorageID, STORAGE_DIRECTORY_DOCUMENTS, &pszPath);
+       if ( nRet != STORAGE_ERROR_NONE )
+       {
+               StorageErrorInfo("storage_get_directory", nRet);
+               return NULL;
+       }
+       if ( pszPath == NULL )
+       {
+               fprintf(fpLog, "\\n[%s] No path is found under STORAGE_DIRECTORY_DOCUMENTS directory", API_NAMESPACE);
+               return NULL;
+       }
+       
+       //free(pszFilePath);
+       return pszPath;
+}
+       
+
+/* @function   AppendFileName
+ * @description Append file name 
+ * @parameter  [IN] pszDirPath -dir path
+ * @parameter  [OUT] pszTragetPath -absolute file path
+ * @return             NULL
+ */
+void AppendFileName(char *pszDirPath, char *pszTragetPath) 
+{
+       //char *pszPath = (char*)malloc(1 + strlen(pszDirPath) + strlen( "/newFile.txt"));
+       strcpy(pszTragetPath, pszDirPath);
+       strcat(pszTragetPath, "/newFile.txt");
+       fprintf(fpLog, "\\n[%s] File path : %s.", API_NAMESPACE,pszTragetPath);
+}
+
+
+/* @function   FileOpen
+ * @description open file
+ * @parameter  [IN] pszDirPath -dir path
+ * @parameter  [OUT] pszTragetPath -absolute file path
+ * @return             return FILE *pFile
+ */
+FILE *FileOpen(char *pszDirPath, char *pszTragetPath) 
+{
+       AppendFileName(pszDirPath, pszTragetPath);
+       //char *pszPath = (char*)malloc(1 + strlen(pszDirPath) + strlen( "/newFile.txt"));
+       //strcpy(pszPath, pszDirPath);
+       //strcat(pszPath, "/newFile.txt");
+       //fprintf(fpLog, "\\n[%s] File path : %s.", API_NAMESPACE,pszPath);
+       
+       FILE *pFile = fopen(pszTragetPath, "w+");
+       return pFile;
+}
+
+/**
+ * @function   IsPathValid
+ * @description check path validity
+ * @parameter  [IN] pszPath -path
+ * @return             If true on valid path otherwise false
+ */
+bool IsPathValid(char *pszPath) 
+{
+       struct stat st;
+       if ( stat(pszPath,&st) == 0 )
+       {
+               return true; // directory present
+       }
+
+       return false;
+}
+
+/** @} */ //end of ctc-libstorage
\ No newline at end of file
diff --git a/src/ctc/libstorage/libstorage-common.h b/src/ctc/libstorage/libstorage-common.h
new file mode 100755 (executable)
index 0000000..d59c39d
--- /dev/null
@@ -0,0 +1,60 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _LIBSTORAGE_COMMON_H_
+#define _LIBSTORAGE_COMMON_H_
+
+//Add test package related includes here
+#include "assert.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <string.h>
+#include <sys/statvfs.h>
+#include <errno.h>
+#include <mntent.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <storage.h> 
+#include <glib-2.0/glib.h>
+
+/** @addtogroup        ctc-libstorage
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                  "STORAGE_CTC"
+#define MAXVAL                                         1024
+#define SYSTEM_MEMORY                  300000 // preserved memory in bytes for system
+#define MIN_INTERNAL_MEMORY            1073741824 // 1GB internal memory should have in device
+#define ERR_LOG                                "/tmp/tclog"
+#define MEMLOG                                 25
+#define GMAINTIMEOUT                   10000
+FILE *fpLog;
+
+//Add helper function declarations here
+bool FileClose(FILE *pFile);
+bool FileRemove(char* pFilePath);
+bool FileCopy(char *pszSrcFilePath, char *pszDestFilePath);
+void StorageErrorInfo(char *pszApiName, int nResult);
+char* StorageGetPath(int nStorageID);
+void AppendFileName(char *pszDirPath, char *pszTragetPath);
+FILE *FileOpen(char *pszDirPath, char *pszTragetPath);
+bool IsPathValid(char *pszPath);
+//~ bool doesFeatureExist(char* pchFeature);
+
+/** @} */ //end of ctc-libstorage
+#endif  //_LIBSTORAGE_COMMON_H_
diff --git a/src/ctc/libstorage/libstorage.c b/src/ctc/libstorage/libstorage.c
new file mode 100755 (executable)
index 0000000..7daeeb1
--- /dev/null
@@ -0,0 +1,181 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "libstorage-common.h"
+
+/** @addtogroup        ctc-libstorage
+* @ingroup             ctc
+* @{
+*/
+
+//& set: Libstorage
+
+/**
+* @function            CTs_libstorage_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_libstorage_startup(void)
+{
+       fpLog = fopen(ERR_LOG, "w");
+       return;
+}
+
+/**
+* @function            CTs_libstorage_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_libstorage_cleanup(void)
+{
+       fclose(fpLog);
+       return;
+}
+
+/** @addtogroup ctc-libstorage-testcases
+* @brief               Integration testcases for module libstorage
+* @ingroup             ctc-libstorage
+* @{
+*/
+
+//& purpose: A purpose of getting internal and external memory size.
+//&type : auto
+/**
+* @testcase            CTc_Storage_StorageInfo_p
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Gets an internal memory (total and available) size\n
+*                                      Gets an external memory (total and available) size.
+* @apicovered          storage_get_internal_memory_size,storage_get_external_memory_size
+* @passcase                    covered api should return zero success value
+* @failcase                    covered api returns negative error value
+* @precondition                Should present SD card in target device
+* @postcondition       NA
+*/
+int CTc_Storage_StorageInfo_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing TestCase CTc_Storage_StorageInfo_p", API_NAMESPACE);
+       
+       struct statvfs  stInternalMemoryBuf;
+       struct statvfs  stExternalMemoryBuf;
+       int nRet = -1;
+       double dInternalTotalMemory = 0, dInternalAvailMemory = 0, dExternalTotalMemory = 0, dExternalAvailMemory = 0;
+       
+       nRet = storage_get_internal_memory_size(&stInternalMemoryBuf);
+       if ( nRet != 0 )
+       {
+               fprintf(fpLog, "\\n[%s] storage_get_internal_memory_size failed , error returned = %d", API_NAMESPACE, nRet);
+               return 1;
+       }
+       
+       if ( stInternalMemoryBuf.f_frsize <= 0 || stInternalMemoryBuf.f_blocks <= 0 )
+       {
+               fprintf(fpLog, "\\n[%s] Invalid internal memory size.", API_NAMESPACE);
+               return 1;
+       }
+       
+       dInternalTotalMemory = ((double)stInternalMemoryBuf.f_frsize*stInternalMemoryBuf.f_blocks)/(1024*1024);
+       dInternalAvailMemory = ((double)stInternalMemoryBuf.f_bsize*stInternalMemoryBuf.f_bavail)/(1024*1024);
+       
+       fprintf(fpLog, "\\n[%s] Total Internal memory : %lf MB, Avail internal memory : %lf MB.", API_NAMESPACE, dInternalTotalMemory, dInternalAvailMemory);
+       
+       if ( dInternalTotalMemory <= 0 )
+       {
+               fprintf(fpLog, "\\n[%s] Internal total memory storage is less than 1GB", API_NAMESPACE);
+       }
+       
+       nRet = storage_get_external_memory_size(&stExternalMemoryBuf);
+       if ( nRet != 0 )
+       {
+               fprintf(fpLog, "\\n[%s] storage_get_external_memory_size failed , error returned = %d", API_NAMESPACE, nRet);
+               return 1;
+       }
+       
+       if ( ((signed)(stExternalMemoryBuf.f_frsize) < 0 ) || ((signed)(stExternalMemoryBuf.f_blocks) < 0) )
+       {
+               fprintf(fpLog, "\\n[%s] Invalid external memory size.", API_NAMESPACE);
+               return 1;
+       }
+       
+       dExternalTotalMemory = ((double)stExternalMemoryBuf.f_frsize*stExternalMemoryBuf.f_blocks)/(1024*1024);
+       dExternalAvailMemory = ((double)stExternalMemoryBuf.f_bsize*stExternalMemoryBuf.f_bavail)/(1024*1024);
+       
+       fprintf(fpLog, "\\n[%s] Total External memory : %lf MB, Avail external memory : %lf MB.", API_NAMESPACE, dExternalTotalMemory, dExternalAvailMemory);
+       
+       if ( dExternalAvailMemory <=0 )
+       {
+               fprintf(fpLog, "\\n[%s] External memory storage is Full! no available external memory", API_NAMESPACE);
+       }
+       return 0;
+}
+
+//& purpose: Getting minimum internal memory size (1 GB).
+//&type : auto
+/**
+* @testcase            CTc_Storage_Memory_p
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Gets an internal memory (total) size\n
+*                                      Checks the internal memory with minimum configuration
+* @apicovered          storage_get_internal_memory_size
+* @passcase                    covered api should return zero success value
+* @failcase                    covered api returns negative error value
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_Storage_Memory_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing TestCase CTc_Storage_Memory_p.", API_NAMESPACE);
+       
+       struct statvfs stInternalMemoryBuf;
+       int nRet = -1;
+       double dInternalTotalMemory = 0, dInternalAvailMemory = 0, dTotalMemory = 0;
+       
+       nRet = storage_get_internal_memory_size(&stInternalMemoryBuf);
+       if ( nRet != 0 )
+       {
+               fprintf(fpLog, "\\n[%s] storage_get_internal_memory_size failed , error returned = %d", API_NAMESPACE, nRet);
+               return 1;
+       }
+       
+       if ( stInternalMemoryBuf.f_frsize <= 0 || stInternalMemoryBuf.f_blocks <= 0 )
+       {
+               fprintf(fpLog, "\\n[%s] Invalid internal memory size.", API_NAMESPACE);
+               return 1;
+       }
+       
+       dInternalTotalMemory = ((double)stInternalMemoryBuf.f_frsize*stInternalMemoryBuf.f_blocks);
+       dInternalAvailMemory = ((double)stInternalMemoryBuf.f_bsize*stInternalMemoryBuf.f_bavail);
+       
+       fprintf(fpLog, "\\n[%s] Total Internal memory : %lf , Avail internal memory : %lf", API_NAMESPACE, dInternalTotalMemory, dInternalAvailMemory);
+       
+       if ( dInternalAvailMemory <= 0 )
+       {
+               fprintf(fpLog, "\\n[%s] Internal memory storage is Full! no available internal memory.", API_NAMESPACE);
+       }
+       
+       dTotalMemory = dInternalTotalMemory + (double)SYSTEM_MEMORY;
+       if ( dTotalMemory < (double) MIN_INTERNAL_MEMORY )
+       {
+               fprintf(fpLog, "\\n[%s] Internal memory must have 1 GB.", API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+/** @} */ //end of ctc-libstorage-testcases
+/** @} */ //end of ctc-libstorage
diff --git a/src/ctc/libstorage/tct-libstorage-native.c b/src/ctc/libstorage/tct-libstorage-native.c
new file mode 100755 (executable)
index 0000000..667b2ef
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-libstorage-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/libstorage/tct-libstorage-native.h b/src/ctc/libstorage/tct-libstorage-native.h
new file mode 100755 (executable)
index 0000000..3cbf1e5
--- /dev/null
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_LIBSTORAGE_NATIVE_H__
+#define __TCT_LIBSTORAGE_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_libstorage_startup(void);
+extern void CTs_libstorage_cleanup(void);
+
+extern int CTc_Storage_StorageInfo_p(void);
+extern int CTc_Storage_Memory_p(void);
+
+testcase tc_array[] = {
+    {"CTc_Storage_StorageInfo_p", CTc_Storage_StorageInfo_p, CTs_libstorage_startup, CTs_libstorage_cleanup},
+    {"CTc_Storage_Memory_p", CTc_Storage_Memory_p, CTs_libstorage_startup, CTs_libstorage_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_LIBSTORAGE_NATIVE_H__
diff --git a/src/ctc/location-manager/CMakeLists.txt b/src/ctc/location-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..2a0e33d
--- /dev/null
@@ -0,0 +1,37 @@
+SET(PKG_NAME "location-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-location-manager")
+SET(TC_SOURCES
+       location-manager-common.c
+       location-manager.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       gthread-2.0
+       dlog
+       capi-system-info
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/location-manager/location-manager-common.c b/src/ctc/location-manager/location-manager-common.c
new file mode 100755 (executable)
index 0000000..71e5582
--- /dev/null
@@ -0,0 +1,56 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "location-manager-common.h"
+
+/** @addtogroup ctc-location-manager
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+
+/**
+* @function                                    SystemInfoErrorInfo
+* @description                                         print the error of system information
+* @parameter[IN]                               nResult, the error code
+*                      [IN]                            pszApiName, API name
+* @return                                              NA
+*/
+
+void SystemInfoErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrLog = NULL;
+       pszErrLog = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( NULL == pszErrLog )
+       {
+               fprintf (fpLog,"\\n[%s] pszErrLog is NULL ", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            strcpy(pszErrLog, "SYSTEM_INFO_ERROR_NONE");                            break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       strcpy(pszErrLog, "SYSTEM_INFO_ERROR_INVALID_PARAMETER");       break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           strcpy(pszErrLog, "SYSTEM_INFO_ERROR_OUT_OF_MEMORY");           break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        strcpy(pszErrLog, "SYSTEM_INFO_ERROR_IO_ERROR");                        break;
+               default:                                                                        strcpy(pszErrLog, "Unknown error");
+       }
+       
+       fprintf (fpLog,"\\n[%s] %s is failed, error returned = %s", API_NAMESPACE, pszApiName, pszErrLog);
+       free(pszErrLog);
+       pszErrLog = NULL;
+}
+
+/** @} */ //end of ctc-location-manager
\ No newline at end of file
diff --git a/src/ctc/location-manager/location-manager-common.h b/src/ctc/location-manager/location-manager-common.h
new file mode 100755 (executable)
index 0000000..133cc46
--- /dev/null
@@ -0,0 +1,52 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _LOCATION_MANAGER_COMMON_H_
+#define _LOCATION_MANAGER_COMMON_H_
+
+//Add test package related includes here
+#include "assert.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <system_info.h>
+#include <dlog.h>
+#include <locations.h>
+
+/** @addtogroup ctc-location-manager
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                          "CAPI_LOCATION_MANAGER_CTC"
+#define ERR_LOG                                        "/tmp/tclog"
+#define MEMLOG                                                 20
+#define MAX_BLOCK_SIZE                         25
+#define LOC_MAN_KEY_GPS_SUPPORT                "tizen.org/feature/location.gps"
+#define LOC_MAN_KEY_WPS_SUPPORT                "tizen.org/feature/location.wps"
+FILE *fpLog;
+
+//Add helper function declarations here
+
+/** Display the details error information of System info */
+void SystemInfoErrorInfo(char *pszApiName, int nResult);
+
+/** @} */ //end of ctc-location-manager
+#endif  //_LOCATION_MANAGER_COMMON_H_
diff --git a/src/ctc/location-manager/location-manager.c b/src/ctc/location-manager/location-manager.c
new file mode 100755 (executable)
index 0000000..08d367c
--- /dev/null
@@ -0,0 +1,109 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "location-manager-common.h"
+
+/** @addtogroup ctc-location-manager
+* @ingroup             ctc
+* @{
+*/
+
+//& set: LocationManager
+
+/**
+* @function            CTs_location_manager_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_location_manager_startup(void)
+{
+       fpLog = NULL;
+       fpLog = fopen(ERR_LOG, "w");
+       return;
+}
+
+/**
+* @function            CTs_location_manager_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_location_manager_cleanup(void)
+{
+       fclose(fpLog);
+       fpLog = NULL;
+       return;
+}
+
+/** @addtogroup        ctc-location-manager-testcases
+* @brief               Integration testcases for module location-manager
+* @ingroup             ctc-location-manager
+* @{
+*/
+
+//& purpose: Checks whether the gps is supported or not
+//& type: auto
+/**
+* @testcase                    CTc_LocationManager_IsSupportedGps_p
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Checks if gps is supported or not
+* @apicovered          system_info_get_platform_bool
+* @passcase                    covered api should return zero success value 
+* @failcase                    covered api returns negative error value
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_LocationManager_IsSupportedGps_p(void)
+{
+       fprintf(fpLog, "\\n[Line:%d][%s] Executing Testcase : CTc_LocationManager_IsSupportedGps_p", __LINE__, API_NAMESPACE);
+       int nRet = -1;
+       bool bIsGpsSupported = false;
+       
+       nRet = system_info_get_platform_bool(LOC_MAN_KEY_GPS_SUPPORT, &bIsGpsSupported);
+
+       fprintf(fpLog, "\\n [%s] bIsGpsSupported=%d", API_NAMESPACE,bIsGpsSupported);
+       
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInfoErrorInfo("system_info_get_platform_bool", nRet);
+               return 1;
+       }
+       if ( bIsGpsSupported == false )
+       {
+               fprintf(fpLog, "\\n[%s] Location Manager Key-[%s] is not supported", API_NAMESPACE, LOC_MAN_KEY_GPS_SUPPORT);
+               return 0;
+       }
+       else if ( bIsGpsSupported == true )
+       {
+               location_manager_h stManager = {0};
+               nRet = location_manager_create(LOCATIONS_METHOD_GPS, &stManager);
+               if ( nRet == TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       fprintf(fpLog, "\\n[%s] Feature support as returned by system_info_get_platform_bool() and error code as returned by location_manager_create() mismatched, Leaving test", API_NAMESPACE);
+                       return 1;
+               }
+               else
+               {
+                       fprintf (fpLog,"\\n[%s] Feature support as returned by system_info_get_platform_bool() and as returned by location_manager_create() matched ", API_NAMESPACE);
+               }
+       }
+       
+       return 0;
+}
+
+/** @} */ //end of ctc-location-manager-testcases
+/** @} */ //end of ctc-location-manager
\ No newline at end of file
diff --git a/src/ctc/location-manager/tct-location-manager-native.c b/src/ctc/location-manager/tct-location-manager-native.c
new file mode 100755 (executable)
index 0000000..5f5af73
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-location-manager-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/location-manager/tct-location-manager-native.h b/src/ctc/location-manager/tct-location-manager-native.h
new file mode 100755 (executable)
index 0000000..1bb508d
--- /dev/null
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_LOCATION_MANAGER_NATIVE_H__
+#define __TCT_LOCATION_MANAGER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_location_manager_startup(void);
+extern void CTs_location_manager_cleanup(void);
+
+extern int CTc_LocationManager_IsSupportedGps_p(void);
+
+testcase tc_array[] = {
+    {"CTc_LocationManager_IsSupportedGps_p", CTc_LocationManager_IsSupportedGps_p, CTs_location_manager_startup, CTs_location_manager_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_LOCATION_MANAGER_NATIVE_H__
diff --git a/src/ctc/opengl/CMakeLists.txt b/src/ctc/opengl/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..4bca6ab
--- /dev/null
@@ -0,0 +1,42 @@
+SET(PKG_NAME "opengl")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "elementary")
+SET(TC_SOURCES
+       opengl-common.c
+       opengl.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       utilX
+       capi-system-info
+       dlog glib-2.0 evas edje
+       ecore-x ecore ecore-input
+       capi-appfw-application
+       capi-content-media-content
+       capi-appfw-app-manager
+       evas
+       capi-media-player
+       efl-assist x11 icu-i18n
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/opengl/opengl-common.c b/src/ctc/opengl/opengl-common.c
new file mode 100755 (executable)
index 0000000..fc0354f
--- /dev/null
@@ -0,0 +1,392 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "opengl-common.h"
+
+/** @addtogroup ctc-opengl
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+
+/**
+* @function                                    SystemInfoError
+* @description                                         print the error of sysinfo information
+* @parameter[IN]                               nResult, the error code
+*                      [IN]                            pszApiName, API name
+* @return                                              NA
+*/
+void SystemInfoError(char *pszApiName, int nResult)
+{
+       char *pszErrLog = NULL;
+       pszErrLog = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( NULL == pszErrLog )
+       {
+               fprintf(fpLog,"\\n[%s] pszErrLog is NULL ", API_NAMESPACE);
+               return;
+       }
+
+       switch(nResult)
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            strcpy(pszErrLog, "SYSTEM_INFO_ERROR_NONE");                            break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       strcpy(pszErrLog, "SYSTEM_INFO_ERROR_INVALID_PARAMETER");       break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           strcpy(pszErrLog, "SYSTEM_INFO_ERROR_OUT_OF_MEMORY");           break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        strcpy(pszErrLog,  "SYSTEM_INFO_ERROR_IO_ERROR");                       break;
+               default:                                                                        strcpy(pszErrLog,  "UNKNOWN");
+       }
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s.", API_NAMESPACE, pszApiName, pszErrLog);
+       free(pszErrLog);
+       pszErrLog = NULL;
+}
+
+/**
+* @function            OpenGl2ElmShutdown
+* @description Clears elementary buffers
+* @parameter   NA
+* @return              NA
+*/
+void OpenGl2ElmShutdown(void)
+{
+       // @NOTE: Auto hide application after a certain delay
+       sleep(TIME_DELAY);
+       
+       // Marks the given Evas object for deletion (when Evas will free its memory).
+       evas_object_del(g_pOpenGl2EOWin);
+       
+       elm_exit();
+       
+       g_pstOpenGl2ProjectionMat = NULL;
+       g_pstOpenGl2ModelViewMat = NULL;
+       g_pstOpenGl2MVPMat = NULL;
+       g_nOpenGl2Delay = 0;
+       g_nOpenGl2FrameCount = 0;
+}
+
+/**
+* @function            OpenGl2ScaleMatrix
+* @description Scales an Identity Matrix
+* @parameter   [IN] gl2_matrix_st *pstResult
+*                              [IN] GLfloat SX,
+*                              [IN] GLfloat SY
+*                              [IN] GLfloat SZ
+* @return              NA
+*/
+void OpenGl2ScaleMatrix(gl2_matrix_st *pstResult, GLfloat SX, GLfloat SY, GLfloat SZ)
+{
+       pstResult->Mat[0][0] *= SX;
+       pstResult->Mat[0][1] *= SX;
+       pstResult->Mat[0][2] *= SX;
+       pstResult->Mat[0][3] *= SX;
+       pstResult->Mat[1][0] *= SY;
+       pstResult->Mat[1][1] *= SY;
+       pstResult->Mat[1][2] *= SY;
+       pstResult->Mat[1][3] *= SY;
+       pstResult->Mat[2][0] *= SZ;
+       pstResult->Mat[2][1] *= SZ;
+       pstResult->Mat[2][2] *= SZ;
+       pstResult->Mat[2][3] *= SZ;
+}
+
+/**
+* @function            OpenGl2FrustumMatrix
+* @description Set the Frustrum Matrix
+* @parameter   [IN] gl2_matrix_st *pstResult,
+*                              [IN] float fLeft,
+*                              [IN] float fRight
+*                              [IN] float fBottom
+*                              [IN] float fTop,
+*                              [IN] float fNearZ
+*                              [IN] float fFarZ
+* @return              NA
+*/
+void OpenGl2FrustumMatrix(gl2_matrix_st *pstResult, float fLeft, float fRight, float fBottom, float fTop, float fNearZ, float fFarZ)
+{
+       float fDeltaX = fRight - fLeft;
+       float fDeltaY = fTop - fBottom;
+       float fDeltaZ = fFarZ - fNearZ;
+       gl2_matrix_st stFrust;
+       if ( (fNearZ <= 0.0f) || (fFarZ <= 0.0f) ||
+                       (fDeltaX <= 0.0f) || (fDeltaY <= 0.0f) || (fDeltaZ <= 0.0f) )
+       {
+               return;
+       }
+       stFrust.Mat[0][0] = 2.0f * fNearZ / fDeltaX;
+       stFrust.Mat[0][1] = stFrust.Mat[0][2] = stFrust.Mat[0][3] = 0.0f;
+       stFrust.Mat[1][1] = 2.0f * fNearZ / fDeltaY;
+       stFrust.Mat[1][0] = stFrust.Mat[1][2] = stFrust.Mat[1][3] = 0.0f;
+       stFrust.Mat[2][0] = (fRight + fLeft) / fDeltaX;
+       stFrust.Mat[2][1] = (fTop + fBottom) / fDeltaY;
+       stFrust.Mat[2][2] = -(fNearZ + fFarZ) / fDeltaZ;
+       stFrust.Mat[2][3] = -1.0f;
+       stFrust.Mat[3][2] = -2.0f * fNearZ * fFarZ / fDeltaZ;
+       stFrust.Mat[3][0] = stFrust.Mat[3][1] = stFrust.Mat[3][3] = 0.0f;
+       OpenGl2MulMatrix(pstResult, &stFrust, pstResult);
+}
+
+/**
+* @function            OpenGl2LoadIdentity
+* @description Loads an Identity Matrix
+* @parameter   [IN] gl2_matrix_st *pstResult
+* @return              NA
+*/
+void OpenGl2LoadIdentity(gl2_matrix_st *pstResult)
+{
+       memset(pstResult, 0x0, sizeof(gl2_matrix_st));
+       pstResult->Mat[0][0] = 1.0f;
+       pstResult->Mat[1][1] = 1.0f;
+       pstResult->Mat[2][2] = 1.0f;
+       pstResult->Mat[3][3] = 1.0f;
+}
+
+/**
+* @function            OpenGl2MulMatrix
+* @description Multiplies two matrix
+* @parameter   [IN] gl2_matrix_st *pstResult,
+*                              [IN] gl2_matrix_st *pstSrcA,
+*                              [IN] gl2_matrix_st *pstSrcB
+* @return              NA
+*/
+void OpenGl2MulMatrix(gl2_matrix_st *pstResult, gl2_matrix_st *pstSrcA, gl2_matrix_st *pstSrcB)
+{
+       gl2_matrix_st stTmp;
+       int nLoop = 0;
+       for ( nLoop = 0; nLoop < 4; nLoop++ )
+       {
+               stTmp.Mat[nLoop][0] = (pstSrcA->Mat[nLoop][0] * pstSrcB->Mat[0][0]) +
+                                               (pstSrcA->Mat[nLoop][1] * pstSrcB->Mat[1][0]) +
+                                               (pstSrcA->Mat[nLoop][2] * pstSrcB->Mat[2][0]) +
+                                               (pstSrcA->Mat[nLoop][3] * pstSrcB->Mat[3][0]) ;
+               stTmp.Mat[nLoop][1] = (pstSrcA->Mat[nLoop][0] * pstSrcB->Mat[0][1]) +
+                                               (pstSrcA->Mat[nLoop][1] * pstSrcB->Mat[1][1]) +
+                                               (pstSrcA->Mat[nLoop][2] * pstSrcB->Mat[2][1]) +
+                                               (pstSrcA->Mat[nLoop][3] * pstSrcB->Mat[3][1]) ;
+               stTmp.Mat[nLoop][2] = (pstSrcA->Mat[nLoop][0] * pstSrcB->Mat[0][2]) +
+                                               (pstSrcA->Mat[nLoop][1] * pstSrcB->Mat[1][2]) +
+                                               (pstSrcA->Mat[nLoop][2] * pstSrcB->Mat[2][2]) +
+                                               (pstSrcA->Mat[nLoop][3] * pstSrcB->Mat[3][2]) ;
+               stTmp.Mat[nLoop][3] = (pstSrcA->Mat[nLoop][0] * pstSrcB->Mat[0][3]) +
+                                               (pstSrcA->Mat[nLoop][1] * pstSrcB->Mat[1][3]) +
+                                               (pstSrcA->Mat[nLoop][2] * pstSrcB->Mat[2][3]) +
+                                               (pstSrcA->Mat[nLoop][3] * pstSrcB->Mat[3][3]) ;
+       }
+       memcpy(pstResult, &stTmp, sizeof(gl2_matrix_st));
+}
+
+/**
+* @function            OpenGl2RotationMatrix
+* @description Rotates an Matrix
+* @parameter   [IN] gl2_matrix_st *pstResult,
+*                              [IN] GLfloat glfAngle,
+*                              [IN] GLfloat X,
+*                              [IN] GLfloat Y,
+*                              [IN] GLfloat Z
+* @return              NA
+*/
+void OpenGl2RotationMatrix(gl2_matrix_st *pstResult, GLfloat glfAngle, GLfloat X, GLfloat Y, GLfloat Z)
+{
+       GLfloat glfSinAngle = 0.0, glfCosAngle = 0.0;
+       GLfloat glfMAG = sqrtf(X * X + Y * Y + Z * Z);
+       glfSinAngle = sin ( glfAngle * M_PI / 180.0f );
+       glfCosAngle = cos ( glfAngle * M_PI / 180.0f );
+       if ( glfMAG > 0.0f )
+       {
+               GLfloat XX, YY, ZZ, XY, YZ, ZX, XS, YS, ZS;
+               GLfloat glfOneMinusCos = 0.0;
+               gl2_matrix_st RotMat;
+
+               X /= glfMAG;
+               Y /= glfMAG;
+               Z /= glfMAG;
+               XX = X * X;
+               YY = Y * Y;
+               ZZ = Z * Z;
+               XY = X * Y;
+               YZ = Y * Z;
+               ZX = Z * X;
+               XS = X * glfSinAngle;
+               YS = Y * glfSinAngle;
+               ZS = Z * glfSinAngle;
+               glfOneMinusCos = 1.0f - glfCosAngle;
+
+               RotMat.Mat[0][0] = (glfOneMinusCos * XX) + glfCosAngle;
+               RotMat.Mat[0][1] = (glfOneMinusCos * XY) - ZS;
+               RotMat.Mat[0][2] = (glfOneMinusCos * ZX) + YS;
+               RotMat.Mat[0][3] = 0.0F;
+
+               RotMat.Mat[1][0] = (glfOneMinusCos * XY) + ZS;
+               RotMat.Mat[1][1] = (glfOneMinusCos * YY) + glfCosAngle;
+               RotMat.Mat[1][2] = (glfOneMinusCos * YZ) - XS;
+               RotMat.Mat[1][3] = 0.0F;
+
+               RotMat.Mat[2][0] = (glfOneMinusCos * ZX) - YS;
+               RotMat.Mat[2][1] = (glfOneMinusCos * YZ) + XS;
+               RotMat.Mat[2][2] = (glfOneMinusCos * ZZ) + glfCosAngle;
+               RotMat.Mat[2][3] = 0.0F;
+
+               RotMat.Mat[3][0] = 0.0F;
+               RotMat.Mat[3][1] = 0.0F;
+               RotMat.Mat[3][2] = 0.0F;
+               RotMat.Mat[3][3] = 1.0F;
+
+               OpenGl2MulMatrix( pstResult, &RotMat, pstResult );
+       }
+}
+
+/**
+* @function            OpenGl2LoadShader
+* @description Helper function to load shaders from a shader source
+* @parameter   [IN] gl2_renderer_st pstRenderder
+*                              [IN] GLenum eType
+*                              [IN] const char *pchShaderSrc
+* @return              Shader (GLuint)
+*/
+GLuint OpenGl2LoadShader(gl2_renderer_st *pstRenderder, GLenum eType, const char *pchShaderSrc)
+{
+       Evas_GL_API *pGL = pstRenderder->pGLApi;
+       GLuint glunShader = 0;
+       GLint glunCompiled = 0;
+       
+       // Create the Shader object
+       glunShader = pGL->glCreateShader(eType);
+       if ( glunShader == 0 )
+       {
+               fprintf(fpLog, "\\n[%s] glCreateShader has error in creating an empty shader object.", API_NAMESPACE);
+               return 0;
+       }
+       // Load/Compile Shader source
+       pGL->glShaderSource(glunShader, GL_NO_OF_ELEMENTS_IN_SRC, &pchShaderSrc, NULL);
+       pGL->glCompileShader(glunShader);
+       pGL->glGetShaderiv(glunShader, GL_COMPILE_STATUS, &glunCompiled);
+       if ( !glunCompiled )
+       {
+               GLint glnInfoLen = 0;
+               GLsizei glnActualInfoLen = 0;
+               pGL->glGetShaderiv(glunShader, GL_INFO_LOG_LENGTH, &glnInfoLen);
+               if ( glnInfoLen > 1 )
+               {
+                       GLchar* pchInfoLog = (GLchar*) malloc(sizeof(GLchar) * glnInfoLen);
+                       pGL->glGetShaderInfoLog(glunShader, glnInfoLen, &glnActualInfoLen, pchInfoLog);
+                       fprintf(fpLog, "\\n[%s] Error compiling Shader:\n%s\n======\n%s\n==", API_NAMESPACE, pchInfoLog, pchShaderSrc );
+                       free(pchInfoLog);
+               }
+               fprintf(fpLog, "\\n[%s] Error compiling Shader:\n%s\n=====", API_NAMESPACE, pchShaderSrc );
+               pGL->glDeleteShader(glunShader);
+               return 0;
+       }
+       return glunShader;
+}
+
+/**
+* @function            OpenGl2InitShader
+* @description Initializes shader code
+* @parameter   [IN] gl2_renderer_st pstRenderder
+* @return              int (If error occurs returns 0 otherwise 1)
+*/
+int OpenGl2InitShader(gl2_renderer_st *pstRenderder)
+{
+       Evas_GL_API *pGL = pstRenderder->pGLApi;
+
+       const char szVertShaderSrc[] =
+               "precision mediump float;"
+               "uniform mat4 Modelview;"
+               "attribute vec4 vPosition;"
+               "attribute vec4 color;"
+               "varying vec4 colorvar;"
+               "void main()"
+               "{"
+               "gl_Position = Modelview*vPosition;"
+               "colorvar = color;"
+               "}";
+       const char szFragShaderSrc[] =
+               "precision mediump float;                    \n"
+               "varying vec4 colorvar;\n"
+               "void main()                                 \n"
+               "{                                           \n"
+               "gl_FragColor = colorvar;\n"
+               "}";  
+
+       GLint glnLinked = 0, glnNoOfShaders = 0;
+       
+       // Load the vertex/fragment shaders
+       pstRenderder->glunVTXShader = OpenGl2LoadShader(pstRenderder, GL_VERTEX_SHADER, (const char*)szVertShaderSrc);
+       pstRenderder->glunFGMTShader = OpenGl2LoadShader(pstRenderder, GL_FRAGMENT_SHADER, (const char*)szFragShaderSrc);
+       
+       // Create the glunProgram object
+       pstRenderder->glunProgram = pGL->glCreateProgram();
+       if ( pstRenderder->glunProgram == 0 )
+       {
+               fprintf(fpLog, "\\n[%s] glCreateProgram is failed to create an empty program object \n", API_NAMESPACE);
+               return 0;
+       }
+       pGL->glAttachShader(pstRenderder->glunProgram, pstRenderder->glunVTXShader);
+       pGL->glAttachShader(pstRenderder->glunProgram, pstRenderder->glunFGMTShader);
+       pGL->glGetProgramiv(pstRenderder->glunProgram, GL_ATTACHED_SHADERS, &glnNoOfShaders);
+       
+       pGL->glLinkProgram(pstRenderder->glunProgram);
+       pGL->glGetProgramiv(pstRenderder->glunProgram, GL_LINK_STATUS, &glnLinked);
+       if ( !glnLinked )
+       {
+               GLint glnInfoLen = 0;
+               GLsizei glnActualInfoLen = 0;
+               pGL->glGetProgramiv(pstRenderder->glunProgram, GL_INFO_LOG_LENGTH, &glnInfoLen);
+               if ( glnInfoLen > 1 )
+               {
+                       GLchar* pchInfoLog = (GLchar*) malloc(sizeof(GLchar) * glnInfoLen);
+                       pGL->glGetProgramInfoLog(pstRenderder->glunProgram, glnInfoLen, &glnActualInfoLen, &pchInfoLog);
+                       fprintf(fpLog, "\\n[%s] Error linking glunProgram, ProgramInfoLog:\n%s\n", API_NAMESPACE, pchInfoLog);
+                       free(pchInfoLog);
+               }
+               fprintf(fpLog, "\\n[%s] Error linking glunProgram: %d", API_NAMESPACE, glnLinked);
+               pGL->glDeleteProgram(pstRenderder->glunProgram);
+               return 0;
+       }
+       return 1;
+}
+
+/**
+* @function            OpenGl2IsFeatureSupported
+* @description Checks whether the feature is supported or not
+* @parameter   [IN] pszFeature (feature key in const char array)
+* @return              bool (If error occurs returns false otherwise true)
+*/
+bool OpenGl2IsFeatureSupported(const char *pszFeature)
+{
+       int nRet = SYSTEM_INFO_ERROR_NONE;
+       
+       nRet = system_info_get_platform_bool(pszFeature, &g_bIsFeatureSupported);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInfoError("system_info_get_platform_bool", nRet);
+               return false;
+       }
+       return true;
+}
+
+/** @} */ //end of ctc-opengl
\ No newline at end of file
diff --git a/src/ctc/opengl/opengl-common.h b/src/ctc/opengl/opengl-common.h
new file mode 100755 (executable)
index 0000000..9f38d94
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _OPENGL_COMMON_H_
+#define _OPENGL_COMMON_H_
+//Add test package related includes here
+#include "assert.h"
+#include <Elementary.h>
+#include <Evas_GL.h>
+#include <dlog.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <system_info.h>
+
+/** @addtogroup ctc-opengl
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                          "OPENGL2_CTC"
+#define ERR_LOG                                        "/tmp/tclog"
+#define MAX_BLOCK_SIZE                         25
+#define MEMLOG                                                 20
+#define OPENGL2_WIN_WIDTH                      320
+#define OPENGL2_WIN_HEIGHT                     480
+#define TIME_DELAY                                     3
+#define MAX_FRAME_COUNT                                500
+#define GL_NO_OF_ELEMENTS_IN_SRC       1
+#define EVAS_OBJECT_DATA_KEY_01                "EVAS_OBJ_KEY_01_GLD"
+#define EVAS_OBJECT_DATA_KEY_02                "EVAS_OBJ_KEY_02_ECORE_ANIMATOR"
+#define KEY_OPENGL_VERSION_1           "tizen.org/feature/opengles.version.1_1"
+#define KEY_OPENGL_VERSION_2           "tizen.org/feature/opengles.version.2_0"
+#define GL_RENDERING_ENGINE                    "opengl"        /* The following are the available engines:
+                                                                                                       "software_x11"
+                                                                                                       "fb"
+                                                                                                       "directfb"
+                                                                                                       "software_16_x11"
+                                                                                                       "software_8_x11"
+                                                                                                       "xrender_x11"
+                                                                                                       "opengl_x11"
+                                                                                                       "software_gdi"
+                                                                                                       "software_16_wince_gdi"
+                                                                                                       "sdl"
+                                                                                                       "software_16_sdl"
+                                                                                                       "opengl_sdl"
+                                                                                                       "buffer"
+                                                                                                       "ews"
+                                                                                                       "opengl_cocoa"
+                                                                                                       "psl1ght"
+                                                                                                */
+FILE *fpLog;
+typedef struct _gl2_matrix_st
+{
+       GLfloat Mat[4][4];
+} gl2_matrix_st;
+
+typedef struct _gl2_renderer_st
+{
+       Evas_GL_API *pGLApi;
+       GLuint glunProgram;
+       GLuint glunVTXShader;
+       GLuint glunFGMTShader;
+       GLuint glunVBO;
+       GLuint glunFBO;
+       GLuint glunPositionLoc;
+       GLuint glunColorLoc;
+       GLuint glunMVPLoc;
+       int nInitialized : 1;
+} gl2_renderer_st;
+
+typedef enum _gl2_states_e
+{
+       GL_STATE_NONE = 0,
+       INIT_GL_SUCCESS,
+       INIT_GL_FAILED,
+       DEL_GL_SUCCESS,
+       DEL_GL_FAILED,
+       RESIZE_GL_SUCCESS,
+       RESIZE_GL_FAILED,
+       DRAW_GL_SUCCESS,
+       DRAW_GL_FAILED,
+       ANIMATION_START,
+       ANIMATION_FAILED,
+       ANIMATOR_DEL_SUCCESS,
+       ANIMATOR_DEL_FAILED
+       
+} gl2_states_e; 
+
+gl2_states_e g_eOpenGl2State;
+Evas_Object *g_pOpenGl2EOWin; 
+gl2_matrix_st *g_pstOpenGl2ProjectionMat;
+gl2_matrix_st *g_pstOpenGl2ModelViewMat;
+gl2_matrix_st *g_pstOpenGl2MVPMat;
+
+int g_nOpenGl2Delay;
+int g_nOpenGl2FrameCount;
+bool g_bIsFeatureSupported;
+
+//Add helper function declarations here
+/** print the error of sysinfo information */
+void SystemInfoError(char *pszApiName, int nResult);
+void OpenGl2ElmShutdown(void);
+void OpenGl2ScaleMatrix(gl2_matrix_st *pstResult, GLfloat SX, GLfloat SY, GLfloat SZ);
+void OpenGl2FrustumMatrix(gl2_matrix_st *pstResult, float fLeft, float fRight, float fBottom, float fTop, float fNearZ, float fFarZ);
+void OpenGl2LoadIdentity(gl2_matrix_st *pstResult);
+void OpenGl2MulMatrix(gl2_matrix_st *pstResult, gl2_matrix_st *pstSrcA, gl2_matrix_st *pstSrcB);
+void OpenGl2RotationMatrix(gl2_matrix_st *pstResult, GLfloat glfAngle, GLfloat X, GLfloat Y, GLfloat Z);
+int OpenGl2InitShader(gl2_renderer_st *pstRenderder);
+bool OpenGl2IsFeatureSupported(const char *pszFeature);
+GLuint OpenGl2LoadShader(gl2_renderer_st *pstRenderder, GLenum eType, const char *pchShaderSrc);
+
+/** @} */ //end of ctc-opengl
+#endif  //_OPENGL_COMMON_H_
diff --git a/src/ctc/opengl/opengl.c b/src/ctc/opengl/opengl.c
new file mode 100755 (executable)
index 0000000..09ed1f2
--- /dev/null
@@ -0,0 +1,761 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "opengl-common.h"
+
+/** @addtogroup ctc-opengl
+* @ingroup             ctc
+* @{
+*/
+
+//& set: Opengl
+
+/**
+ * @function           CTs_opengl_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void CTs_opengl_startup(void)
+{
+       fpLog = fopen(ERR_LOG, "w");
+       return;
+}
+
+/**
+ * @function           CTs_opengl_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void CTs_opengl_cleanup(void)
+{
+       fclose(fpLog);
+       elm_shutdown();
+       return;
+}
+
+/**
+* @function            Opengl2_init_gl_cb
+* @description Initializes openGL
+* @parameter   Evas_Object *pEvasObj
+* @return              NA
+*/
+static void Opengl2_init_gl_cb(Evas_Object *pEvasObj)
+{
+       g_eOpenGl2State = GL_STATE_NONE;
+       const char *pchAttribPositionLoc = "vPosition";
+       const char *pchAttribColorLoc = "color";
+       const char *pchUniformModelView = "Modelview";
+       
+       gl2_renderer_st *pstGld = evas_object_data_get(pEvasObj, EVAS_OBJECT_DATA_KEY_01);
+       if ( pstGld == NULL )
+       {
+               fprintf (fpLog, "\n[%s] evas_object_data_get is failed to return an attached data pointer by its given string key.", API_NAMESPACE);
+               g_eOpenGl2State = INIT_GL_FAILED;
+               return;
+       }
+       Evas_GL_API *pGL = pstGld->pGLApi;
+       GLfloat arVertices[] = {
+       
+       // front
+       -0.5f, 0.5f, 0.5f,
+       -0.5f, -0.5f, 0.5f,
+       0.5f, 0.5f, 0.5f,
+       0.5f, 0.5f, 0.5f,
+       -0.5f, -0.5f, 0.5f,
+       0.5f, -0.5f, 0.5f,
+       // Right
+       0.5f, 0.5f, 0.5f,
+       0.5f, -0.5f, 0.5f,
+       0.5f, 0.5f, -0.5f,
+       0.5f, 0.5f, -0.5f,
+       0.5f, -0.5f, 0.5f,
+       0.5f, -0.5f, -0.5f,
+       // back
+       0.5f, 0.5f, -0.5f,
+       0.5f, -0.5f, -0.5f,
+       -0.5f, 0.5f, -0.5f,
+       -0.5f, 0.5f, -0.5f,
+       0.5f, -0.5f, -0.5f,
+       -0.5f, -0.5f, -0.5f,
+       // Left
+       -0.5f, 0.5f, -0.5f,
+       -0.5f, -0.5f, -0.5f,
+       -0.5f, 0.5f, 0.5f,
+       -0.5f, 0.5f, 0.5f,
+       -0.5f, -0.5f, -0.5f,
+       -0.5f, -0.5f, 0.5f,
+       // Top
+       -0.5f, 0.5f, -0.5f,
+       -0.5f, 0.5f, 0.5f,
+       0.5f, 0.5f, -0.5f,
+       0.5f, 0.5f, -0.5f,
+       -0.5f, 0.5f, 0.5f,
+       0.5f, 0.5f, 0.5f,
+       // Bottom
+       -0.5f, -0.5f, 0.5f,
+       -0.5f, -0.5f, -0.5f,
+       0.5f, -0.5f, 0.5f,
+       0.5f, -0.5f, 0.5f,
+       -0.5f, -0.5f, -0.5f,
+       0.5f, -0.5f, -0.5f
+
+       };
+
+       GLfloat arColors[] = {
+       
+       // front
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       // Right
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       // back
+       0.52734375f,0.76171875f,0.92578125f,1.0f,
+       0.52734375f,0.76171875f,0.92578125f,1.0f,
+       0.52734375f,0.76171875f,0.92578125f,1.0f,
+       0.52734375f,0.76171875f,0.92578125f,1.0f,
+       0.52734375f,0.76171875f,0.92578125f,1.0f,
+       0.52734375f,0.76171875f,0.92578125f,1.0f,
+       // fLeft
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       0.0625f,0.57421875f,0.92578125f,1.0f,
+       // Top
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       0.29296875f,0.66796875f,0.92578125f,1.0f,
+       // Bottom
+       0.52734375f,0.76171875f,0.92578125f,1.0f,
+       0.52734375f,0.76171875f,0.92578125f,1.0f,
+       0.52734375f,0.76171875f,0.92578125f,1.0f,
+       0.52734375f,0.76171875f,0.92578125f,1.0f,
+       0.52734375f,0.76171875f,0.92578125f,1.0f,
+       0.52734375f,0.76171875f,0.92578125f,1.0f
+       };
+               
+       if ( !OpenGl2InitShader(pstGld) )
+       {
+               LOGD("\n[%s] Error Initializing Shaders", API_NAMESPACE);
+               fprintf (fpLog, "\n[%s] Error Initializing Shaders", API_NAMESPACE);
+               g_eOpenGl2State = INIT_GL_FAILED;
+               return;
+       }
+
+       pGL->glEnable(GL_DEPTH_TEST);
+
+       pGL->glGenBuffers(1, &pstGld->glunVBO);
+       pGL->glBindBuffer(GL_ARRAY_BUFFER, pstGld->glunVBO);
+       pGL->glBufferData(GL_ARRAY_BUFFER, 36*3*4, arVertices, GL_STATIC_DRAW);
+       pstGld->glunPositionLoc = pGL->glGetAttribLocation(pstGld->glunProgram, pchAttribPositionLoc);
+
+       LOGD("\n[%s] position loc: %d  ", API_NAMESPACE, pstGld->glunPositionLoc);
+
+       pGL->glGenBuffers(1, &pstGld->glunFBO);
+       pGL->glBindBuffer(GL_ARRAY_BUFFER, pstGld->glunFBO);
+       pGL->glBufferData(GL_ARRAY_BUFFER, 36*4*4, arColors, GL_STATIC_DRAW);
+       pstGld->glunColorLoc = pGL->glGetAttribLocation(pstGld->glunProgram, pchAttribColorLoc);
+       LOGD("\n[%s] glunColorLoc: %d  ", API_NAMESPACE, pstGld->glunColorLoc);
+
+       g_pstOpenGl2ProjectionMat = malloc( sizeof(gl2_matrix_st) );
+       OpenGl2LoadIdentity( g_pstOpenGl2ProjectionMat );
+        
+       float fSurfaceWidth = 800.0f;
+       float fSurfaceHeight = 600.0f;
+        
+       GLfloat Aspect = (float)fSurfaceWidth/(float)fSurfaceHeight;
+       GLfloat Near = -2.0f;
+       GLfloat Far  = 200.0f;
+       GLfloat YFOV  = 75.0f;
+       GLfloat Height = tanf( YFOV / 360.0f * M_PI ) * Near;
+       GLfloat Width = Height * Aspect;
+       
+       OpenGl2FrustumMatrix( g_pstOpenGl2ProjectionMat, -Width, Width, -Height, Height, Near, Far );
+
+       OpenGl2ScaleMatrix( g_pstOpenGl2ProjectionMat, 1.0f, (float)fSurfaceHeight/(float)fSurfaceWidth, 1.0f );
+
+       g_pstOpenGl2ModelViewMat = malloc( sizeof(gl2_matrix_st) );
+       OpenGl2LoadIdentity( g_pstOpenGl2ModelViewMat );
+       g_pstOpenGl2MVPMat = malloc( sizeof(gl2_matrix_st) );
+       pstGld->glunMVPLoc = pGL->glGetUniformLocation(pstGld->glunProgram, pchUniformModelView);
+       
+       g_eOpenGl2State = INIT_GL_SUCCESS;
+}
+
+/**
+* @function            Opengl2_del_gl_cb
+* @description Gets called when glview is deleted
+* @parameter   Evas_Object *pEvasObj
+* @return              NA
+*/
+static void Opengl2_del_gl_cb(Evas_Object *pEvasObj)
+{
+       gl2_renderer_st *pstGld = evas_object_data_get(pEvasObj, EVAS_OBJECT_DATA_KEY_01);
+       if  ( !pstGld )
+       {
+               fprintf (fpLog, "\n[%s] Unable to get gl2_renderer_st.", API_NAMESPACE);
+               g_eOpenGl2State = DEL_GL_FAILED;
+               return;
+       }
+       Evas_GL_API *pGL = pstGld->pGLApi;
+       pGL->glDeleteShader(pstGld->glunVTXShader);
+       pGL->glDeleteShader(pstGld->glunFGMTShader);
+       pGL->glDeleteProgram(pstGld->glunProgram);
+       pGL->glDeleteBuffers(1, &pstGld->glunVBO);
+
+       // Delete an attached data pointer from an object.
+       evas_object_data_del((Evas_Object*) pEvasObj, EVAS_OBJECT_DATA_KEY_01);
+       // Delete an attached data pointer from an object.
+       evas_object_data_del((Evas_Object*) pEvasObj, EVAS_OBJECT_DATA_KEY_02);
+
+       free(pstGld);
+       free(g_pstOpenGl2ProjectionMat);
+       free(g_pstOpenGl2ModelViewMat);
+       free(g_pstOpenGl2MVPMat);
+
+       g_pOpenGl2EOWin = NULL;
+       pstGld = NULL;
+       g_eOpenGl2State = DEL_GL_SUCCESS;
+}
+
+/**
+* @function            Opengl2_resize_gl_cb
+* @description Gets called every time object is resized
+* @parameter   Evas_Object *pEvasObj
+* @return              NA
+*/
+static void Opengl2_resize_gl_cb(Evas_Object *pEvasObj)
+{
+       int nW = -1, nH = -1;
+       gl2_renderer_st *pstGld = evas_object_data_get(pEvasObj, EVAS_OBJECT_DATA_KEY_01);
+       if ( pstGld == NULL )
+       {
+               fprintf (fpLog, "\n[%s] evas_object_data_get is failed to return an attached data pointer by its given string key.", API_NAMESPACE);
+               g_eOpenGl2State = DEL_GL_FAILED;
+               return;
+       }
+       Evas_GL_API *pGL = pstGld->pGLApi;
+       if ( pGL == NULL )
+       {
+               fprintf (fpLog, "\n[%s] Evas_GL_API is found invalid", API_NAMESPACE);
+               g_eOpenGl2State = DEL_GL_FAILED;
+               return;
+       }
+       elm_glview_size_get(pEvasObj, &nW, &nH);
+       pGL->glViewport(0, 0, nW, nH);
+       g_eOpenGl2State = DEL_GL_SUCCESS;
+}
+
+/**
+* @function            Opengl2_draw_gl_cb
+* @description Draw callback is where all the main GL rendering happens
+* @parameter   Evas_Object *pEvasObj
+* @return              NA
+*/
+static void Opengl2_draw_gl_cb(Evas_Object *pEvasObj)
+{              
+       Evas_GL_API *pGL = elm_glview_gl_api_get(pEvasObj);
+       gl2_renderer_st *pstGld = evas_object_data_get(pEvasObj, EVAS_OBJECT_DATA_KEY_01);
+       if ( !pstGld )
+       {
+               fprintf (fpLog, "\n[%s] evas_object_data_get is failed to return an attached data pointer by its given string key.", API_NAMESPACE);
+               g_eOpenGl2State = DRAW_GL_FAILED;
+               return;
+       }
+       int nW = -1, nH = -1;
+       elm_glview_size_get(pEvasObj, &nW, &nH);
+       if ( nW < 0 || nH < 0 )
+       {
+               fprintf (fpLog, "\n[%s] elm_glview_size_get is failed for invalid size returned", API_NAMESPACE);
+               g_eOpenGl2State = DRAW_GL_FAILED;
+               return;
+       }
+       pGL->glViewport(0, 0, nW, nH);
+       pGL->glClearColor(0.0f,0.0f,0.0f,1);
+       pGL->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+       pGL->glUseProgram(pstGld->glunProgram);
+       
+       OpenGl2RotationMatrix( g_pstOpenGl2ModelViewMat, 1.0f, -1.0f, -1.0f, 0.0f);
+       OpenGl2MulMatrix( g_pstOpenGl2MVPMat, g_pstOpenGl2ModelViewMat, g_pstOpenGl2ProjectionMat);
+       
+       pGL->glUniformMatrix4fv(pstGld->glunMVPLoc, 1, GL_FALSE, &g_pstOpenGl2MVPMat->Mat[0][0]);
+       pGL->glEnableVertexAttribArray(pstGld->glunPositionLoc);
+       pGL->glBindBuffer(GL_ARRAY_BUFFER, pstGld->glunVBO);
+       pGL->glVertexAttribPointer(pstGld->glunPositionLoc, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(GL_FLOAT), 0);
+       pGL->glEnableVertexAttribArray(pstGld->glunColorLoc);
+       pGL->glBindBuffer(GL_ARRAY_BUFFER, pstGld->glunFBO);
+       pGL->glVertexAttribPointer(pstGld->glunColorLoc, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(GL_FLOAT), 0);
+       pGL->glDrawArrays(GL_TRIANGLES, 0, 3 * 12);
+       pGL->glFinish();
+       g_nOpenGl2FrameCount++;
+       g_eOpenGl2State = DRAW_GL_SUCCESS;
+       if ( g_nOpenGl2FrameCount > MAX_FRAME_COUNT )
+       {
+               OpenGl2ElmShutdown();
+       }
+}
+
+/**
+* @function            Opengl2_animation_cb
+* @description To notify that glview has changed so it can render
+* @parameter   void *pData
+* @return              Eina_Bool (EINA_TRUE)
+*/
+static Eina_Bool Opengl2_animation_cb(void *pData)
+{
+       elm_glview_changed_set(pData);
+       return EINA_TRUE;
+}
+
+/**
+* @function            Opengl2_win_del_cb
+* @description Adds or registers a callback function to the smart event specified by event on the smart object obj. 
+* @parameter   void *pData, Evas_Object *pEvasObj, void *pEvent
+* @return              NA
+*/
+static void Opengl2_win_del_cb(void *pData, Evas_Object *pEvasObj, void *pEvent)
+{
+       elm_exit();
+}
+
+/**
+* @function            Opengl2_animator_del_cb
+* @description Deletes the animator
+* @parameter   void *pData, Evas *pEvas, Evas_Object *pEvasObj, void *pEventInfo
+* @return              NA
+*/
+static void Opengl2_animator_del_cb(void *pData, Evas *pEvas, Evas_Object *pEvasObj, void *pEventInfo)
+{
+       Ecore_Animator *pAnim = evas_object_data_get(pEvasObj, EVAS_OBJECT_DATA_KEY_02);
+       pData = ecore_animator_del(pAnim);
+       if ( pData == NULL )
+       {
+               fprintf (fpLog, "\n[%s] ecore_animator_del failed to delete animator", API_NAMESPACE);
+       }
+}
+
+/** @addtogroup        ctc-opengl-testcases
+* @brief               Integration testcases for module opengl
+* @ingroup             ctc-opengl
+* @{
+*/
+
+//& purpose: Rendering a 3D model cube using opengl 2.0
+//& type: auto
+/**
+ * @testcase                           CTc_Opengl2_GlDrawCube_p
+ * @type                                       Positive
+ * @scenario                           Initialize Elementary\n
+ *                                                     Set Elementary's rendering engine for use\n
+ *                                                     Set new policy value\n
+ *                                                     Adds a window object with standard setup\n
+ *                                                     Set the window's autodel state\n
+ *                                                     Add a new box to the parent\n
+ *                                                     Sets the hints for an object's weight\n
+ *                                                     Add subobj as a resize object of window obj\n
+ *                                                     Makes the given Evas object visible\n
+ *                                                     Add a new glview to the parent\n
+ *                                                     Get the gl API struct for gl rendering\n
+ *                                                     Sets the hints for an object's alignment\n
+ *                                                     Sets the hints for an object's weight\n
+ *                                                     Set the mode of the GLView\n
+ *                                                     Set the resize policy for the glview object\n
+ *                                                     Set the render policy for the glview object\n
+ *                                                     Set the init function that runs once in the main loop\n
+ *                                                     Set the delete function that runs once in the main loop\n
+ *                                                     Set the resize function that Get called when resize happens\n
+ *                                                     Set the render function that runs in the main loop\n
+ *                                                     Add an object at the end of the pack list\n
+ *                                                     Makes the given Evas object visible\n
+ *                                                     Set/unset focus to a given Elementary object\n
+ *                                                     Add an animator to call func at every animation tick during main loop execution\n 
+ *                                                     Set an attached data pointers to an object with a given string key\n
+ *                                                     Add (register) a callback function to a given Evas object event\n
+ *                                                     Add a back button\n
+ *                                                     Run Elementary's main loop\n
+ *                                                     Hide the evas object\n
+ *                                                     Shut down Elementary\n
+ *                                                     Exit elementary
+ * @apicovered                         NA
+ * @passcase                           If a 3D cube is rendered on the screen.
+ * @failcase                           If shaders do not compile, do not attach after compile, display buffer fails
+ * @precondition                       Target must support opengl 2.0
+ * @postcondition                      Autmatically elementary objects should be removed after rendering a time interval.
+ * @remarks                    NA
+ */
+int CTc_Opengl2_GlDrawCube_p(void)
+{
+       fprintf (fpLog, "\\\n[%s] Executing Testcase: CTc_Opengl2_GlDrawCube_p", API_NAMESPACE);
+       
+       g_bIsFeatureSupported = false;
+       
+       if ( OpenGl2IsFeatureSupported(KEY_OPENGL_VERSION_2) == false )
+       {
+               return 1;
+       }
+       if ( !g_bIsFeatureSupported )
+       {
+               fprintf (fpLog, "\\n[%s] Feature (%s) is not supported.", API_NAMESPACE, KEY_OPENGL_VERSION_2);
+               return 0;
+       }
+       g_bIsFeatureSupported = false;
+       
+       Evas_Object  *pEOBX = NULL,*pEOGL = NULL;
+       int nRet = 0;
+       const char* pchNameOfWindow = "glview simple";
+       const char* pchTitleOfWindow = "GLView Simple";
+       Eina_Bool bIsSuccess = EINA_FALSE;
+       Ecore_Animator *pEcoreAnim = NULL;
+       
+       g_pstOpenGl2ProjectionMat = NULL;
+       g_pstOpenGl2ModelViewMat = NULL;
+       g_pstOpenGl2MVPMat = NULL;
+       g_pOpenGl2EOWin = NULL;
+       g_nOpenGl2FrameCount = 0;
+       
+       gl2_renderer_st *pstGld = NULL;
+       
+       if ( !(pstGld = calloc(1, sizeof(gl2_renderer_st))) )
+       {
+               fprintf (fpLog, "\n[%s] Insufficient memory for allocation. (calloc failed)", API_NAMESPACE);
+               return 1;
+       }
+       nRet = elm_init(0, NULL);
+       if ( nRet < 0 )
+       {
+               fprintf (fpLog, "\n[%s] elm_init failed and returned invalid new counter's value: %d", API_NAMESPACE, nRet);
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       
+       elm_config_accel_preference_set(GL_RENDERING_ENGINE);
+       bIsSuccess = elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+       if ( bIsSuccess == EINA_FALSE )
+       {
+               fprintf (fpLog, "\n[%s] elm_policy_set failed to set elementary policy.", API_NAMESPACE);
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       
+       g_pOpenGl2EOWin = elm_win_util_standard_add(pchNameOfWindow, pchTitleOfWindow);
+       if ( g_pOpenGl2EOWin == NULL )
+       {
+               fprintf (fpLog, "\n[%s] elm_win_util_standard_add failed to add a window object with standard setup", API_NAMESPACE);
+               OpenGl2ElmShutdown();
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       elm_win_autodel_set(g_pOpenGl2EOWin, EINA_TRUE);
+       
+       evas_object_smart_callback_add(g_pOpenGl2EOWin, "delete,request", Opengl2_win_del_cb, NULL);
+       
+       pEOBX = elm_box_add(g_pOpenGl2EOWin);
+       if ( pEOBX == NULL )
+       {
+               fprintf (fpLog, "\n[%s] elm_box_add failed to add box", API_NAMESPACE);
+               OpenGl2ElmShutdown();
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       evas_object_size_hint_weight_set(pEOBX, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(g_pOpenGl2EOWin, pEOBX);
+       evas_object_show(pEOBX);
+       
+       pEOGL = elm_glview_add(g_pOpenGl2EOWin);
+       if ( pEOGL == NULL )
+       {
+               fprintf (fpLog, "\n[%s] elm_glview_add failed to add glview", API_NAMESPACE);
+               OpenGl2ElmShutdown();
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       pstGld->pGLApi = elm_glview_gl_api_get(pEOGL);
+       if ( pstGld->pGLApi == NULL )
+       {
+               fprintf (fpLog, "\n[%s] elm_glview_gl_api_get failed to get gl api", API_NAMESPACE);
+               OpenGl2ElmShutdown();
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       
+       evas_object_size_hint_align_set(pEOGL, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(pEOGL, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_glview_mode_set(pEOGL, ELM_GLVIEW_ALPHA | ELM_GLVIEW_DEPTH);
+       
+       elm_glview_resize_policy_set(pEOGL, ELM_GLVIEW_RESIZE_POLICY_RECREATE);
+       elm_glview_render_policy_set(pEOGL, ELM_GLVIEW_RENDER_POLICY_ON_DEMAND);
+       
+       elm_glview_init_func_set(pEOGL, Opengl2_init_gl_cb);
+       
+       elm_glview_del_func_set(pEOGL, Opengl2_del_gl_cb);
+       
+       elm_glview_resize_func_set(pEOGL, Opengl2_resize_gl_cb);
+       
+       elm_glview_render_func_set(pEOGL, Opengl2_draw_gl_cb);
+       
+       elm_box_pack_end(pEOBX, pEOGL);
+       
+       evas_object_show(pEOGL);
+       
+       elm_object_focus_set(pEOGL, EINA_TRUE);
+       pEcoreAnim = ecore_animator_add(Opengl2_animation_cb, pEOGL);
+       if ( pEcoreAnim == NULL )
+       {
+               fprintf (fpLog, "\n[%s] ecore_animator_add failed to add animator", API_NAMESPACE);
+               OpenGl2ElmShutdown();
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       evas_object_data_set(pEOGL, EVAS_OBJECT_DATA_KEY_02, pEcoreAnim);
+       evas_object_data_set(pEOGL, EVAS_OBJECT_DATA_KEY_01, pstGld);
+       evas_object_event_callback_add(pEOGL, EVAS_CALLBACK_DEL, Opengl2_animator_del_cb, pEOGL);
+       g_nOpenGl2Delay = 0;
+       do
+       {
+               if (    g_eOpenGl2State == INIT_GL_FAILED ||
+                       g_eOpenGl2State == DRAW_GL_FAILED ||
+                       g_eOpenGl2State == RESIZE_GL_FAILED ||
+                       g_eOpenGl2State == DEL_GL_FAILED ||
+                       g_eOpenGl2State == ANIMATOR_DEL_FAILED)
+               {
+                       OpenGl2ElmShutdown();
+                       return 1;
+               }
+               sleep(1);
+               g_nOpenGl2Delay++;
+       }
+       while ( g_nOpenGl2Delay < TIME_DELAY );
+       
+       evas_object_resize(g_pOpenGl2EOWin, OPENGL2_WIN_WIDTH, OPENGL2_WIN_HEIGHT);
+       evas_object_show(g_pOpenGl2EOWin);
+       elm_run();
+       
+       return 0;
+}
+
+//& purpose: Check device's open GL versions 1_1 and 2_0 are supported or not
+//& type: auto
+/**
+ * @testcase                           CTc_Opengl2_OpenGlVersion_p
+ * @type                                       Positive
+ * @scenario                           Get the Device's two OpenGL version\n
+ *                          Check  version's are  supported
+ * @apicovered                         system_info_get_platform_bool
+ * @passcase                           covered api's should return zero success value and supported boolean value
+ * @failcase                           covered api returns negative error value and wrong supported boolean value
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                    NA
+ */
+int CTc_Opengl2_OpenGlVersion_p(void)
+{
+       fprintf (fpLog, "\n[%s] Executing Testcase:  CTc_Opengl2_OpenGlVersion_p", API_NAMESPACE);
+       int nRet = -1;
+       bool bOpenGLVersion1 = false, bOpenGLVersion2 = false;
+       nRet =  system_info_get_platform_bool(KEY_OPENGL_VERSION_1,&bOpenGLVersion1);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInfoError("system_info_get_platform_bool", nRet);
+               return 1;
+       }
+       if ( bOpenGLVersion1 != true )
+       {
+               fprintf (fpLog, "\n[%s] OpenGL version.1_1 is not Supported ",API_NAMESPACE);
+               return 1;
+       }
+       
+       nRet =  system_info_get_platform_bool(KEY_OPENGL_VERSION_2,&bOpenGLVersion2);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInfoError("system_info_get_platform_bool", nRet);
+               return 1;
+       }
+       if ( bOpenGLVersion2 != true )
+       {
+               fprintf (fpLog, "\n[%s] OpenGL version.2_0 is not Supported ",API_NAMESPACE);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: Check device's open GL Context version can add glview to parent for 1.1 and 2.0 both (default is 2.0)
+//& type: autoevas_object_show
+/**
+ * @testcase                           CTc_Opengl2_OpenGlContextVersion_p
+ * @type                                       Positive
+ * @scenario                           Initialize Elementary\n
+ *                                                     Set Elementary rendering engine for use\n
+ *                                                     Set new policy value\n
+ *                                                     Adds a window object with standard setup\n
+ *                                                     Set the window's autodel state\n
+ *                                                     Add a new box to the parent\n
+ *                                                     Sets the hints for an object's weight\n
+ *                                                     Add subobj as a resize object of window obj\n
+ *                                                     Makes the given Evas object visible\n
+ *                                                     Add a new glview to the parent\n
+ *                                                     Hide the evas object\n
+ *                                                     Shut down Elementary\n
+ *                                                     Exit elementary
+ * @apicovered                         NA
+ * @passcase                           covered api's should return zero success value and supported boolean value
+ * @failcase                           covered api returns negative error value and wrong supported boolean value
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                    NA
+ */
+int CTc_Opengl2_OpenGlContextVersion_p(void)
+{
+       fprintf (fpLog, "\n[%s] Executing Testcase:  CTc_Opengl2_OpenGlContextVersion_p", API_NAMESPACE);
+       
+       if ( OpenGl2IsFeatureSupported(KEY_OPENGL_VERSION_1) == false )
+       {
+               return 1;
+       }
+       if ( !g_bIsFeatureSupported )
+       {
+               fprintf (fpLog, "\\n[%s] Feature (%s) is not supported.", API_NAMESPACE, KEY_OPENGL_VERSION_1);
+               return 0;
+       }
+       g_bIsFeatureSupported = false;
+       if ( OpenGl2IsFeatureSupported(KEY_OPENGL_VERSION_2) == false )
+       {
+               return 1;
+       }
+       if ( !g_bIsFeatureSupported )
+       {
+               fprintf (fpLog, "\\n[%s] Feature (%s) is not supported.", API_NAMESPACE, KEY_OPENGL_VERSION_2);
+               return 0;
+       }
+       g_bIsFeatureSupported = false;
+       
+       Evas_Object  *pEOBX = NULL, *pEOGL = NULL;
+       int nRet = 0;
+       const char* pchNameOfWindow = "glview simple";
+       const char* pchTitleOfWindow = "GLView Simple";
+       Eina_Bool bIsSuccess = EINA_FALSE;
+       g_pOpenGl2EOWin = NULL;
+       g_nOpenGl2FrameCount = 0;
+       
+       gl2_renderer_st *pstGld = NULL;
+       
+       if ( !(pstGld = calloc(1, sizeof(gl2_renderer_st))) )
+       {
+               fprintf (fpLog, "\n[%s] Insufficient memory for allocation. (calloc failed)", API_NAMESPACE);
+               return 1;
+       }
+       nRet = elm_init(0, NULL);
+       if ( nRet < 0 )
+       {
+               fprintf (fpLog, "\n[%s] elm_init failed and returned invalid new counter's value: %d", API_NAMESPACE, nRet);
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       elm_config_accel_preference_set(GL_RENDERING_ENGINE);
+       bIsSuccess = elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+       if ( bIsSuccess == EINA_FALSE )
+       {
+               fprintf (fpLog, "\n[%s] elm_policy_set failed to set elementary policy.", API_NAMESPACE);
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       g_pOpenGl2EOWin = elm_win_util_standard_add(pchNameOfWindow, pchTitleOfWindow);
+       if ( g_pOpenGl2EOWin == NULL )
+       {
+               fprintf (fpLog, "\n[%s] elm_win_util_standard_add failed to add a window object with standard setup", API_NAMESPACE);
+               OpenGl2ElmShutdown();
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       elm_win_autodel_set(g_pOpenGl2EOWin, EINA_TRUE);
+       
+       pEOBX = elm_box_add(g_pOpenGl2EOWin);
+       if ( pEOBX == NULL )
+       {
+               fprintf (fpLog, "\n[%s] elm_box_add failed to add box", API_NAMESPACE);
+               OpenGl2ElmShutdown();
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       evas_object_size_hint_weight_set(pEOBX, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(g_pOpenGl2EOWin, pEOBX);
+       evas_object_show(pEOBX);
+       
+       pEOGL = elm_glview_version_add(g_pOpenGl2EOWin, EVAS_GL_GLES_1_X);
+       if ( pEOGL == NULL )
+       {
+               fprintf (fpLog, "\n[%s] elm_glview_version_add for EVAS_GL_GLES_1_X is failed to add glview", API_NAMESPACE);
+               OpenGl2ElmShutdown();
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       
+       pEOGL = elm_glview_version_add(g_pOpenGl2EOWin, EVAS_GL_GLES_2_X);
+       if ( pEOGL == NULL )
+       {
+               fprintf (fpLog, "\n[%s] elm_glview_version_add for EVAS_GL_GLES_2_X is failed to add glview", API_NAMESPACE);
+               OpenGl2ElmShutdown();
+               free(pstGld);
+               pstGld = NULL;
+               return 1;
+       }
+       
+       // Delete subobj as a resize object of window obj.
+       elm_win_resize_object_del(g_pOpenGl2EOWin, pEOBX);
+       OpenGl2ElmShutdown();
+       free(pstGld);
+        pstGld = NULL; 
+    return 0;
+}
+
+/** @} */ //end of ctc-opengl-testcases
+/** @} */ //end of ctc-opengl
diff --git a/src/ctc/opengl/tct-opengl-native.c b/src/ctc/opengl/tct-opengl-native.c
new file mode 100755 (executable)
index 0000000..a66385a
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-opengl-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/opengl/tct-opengl-native.h b/src/ctc/opengl/tct-opengl-native.h
new file mode 100755 (executable)
index 0000000..c3fbf19
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_OPENGL_NATIVE_H__
+#define __TCT_OPENGL_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_opengl_startup(void);
+extern void CTs_opengl_cleanup(void);
+
+extern int CTc_Opengl2_GlDrawCube_p(void);
+extern int CTc_Opengl2_OpenGlVersion_p(void);
+extern int CTc_Opengl2_OpenGlContextVersion_p(void);
+
+testcase tc_array[] = {
+    {"CTc_Opengl2_GlDrawCube_p", CTc_Opengl2_GlDrawCube_p, CTs_opengl_startup, CTs_opengl_cleanup},
+    {"CTc_Opengl2_OpenGlVersion_p", CTc_Opengl2_OpenGlVersion_p, CTs_opengl_startup, CTs_opengl_cleanup},
+    {"CTc_Opengl2_OpenGlContextVersion_p", CTc_Opengl2_OpenGlContextVersion_p, CTs_opengl_startup, CTs_opengl_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_OPENGL_NATIVE_H__
diff --git a/src/ctc/platform-permission/CMakeLists.txt b/src/ctc/platform-permission/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..207563f
--- /dev/null
@@ -0,0 +1,84 @@
+SET(PKG_NAME "platform-permission")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-media-camera")
+SET(TC_SOURCES
+       platform-permission-common.c
+       platform-permission.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       sqlite3
+       shortcut
+       dlog
+       db-util
+       glib-2.0
+       ecore
+       ecore-evas
+       ecore-x
+       deviced
+       pkgmgr-info
+       security-server
+       libsmack
+       appcore-common
+       appcore-efl
+       capi-base-common
+       alarm-service
+       capi-network-bluetooth
+       capi-system-info
+       capi-system-runtime-info
+       capi-location-manager
+       capi-network-connection
+       capi-network-wifi
+       capi-web-url-download
+       capi-system-device
+       tapi
+       capi-telephony
+       capi-appfw-package-manager
+       capi-media-recorder
+       capi-messaging-messages
+       msg-service
+       push
+       capi-system-system-settings
+       capi-media-sound-manager
+       contacts-service2
+       notification
+       capi-appfw-app-manager
+       capi-content-media-content
+       key-manager
+       capi-media-player
+       capi-system-sensor
+       capi-media-wav-player
+       capi-appfw-application
+       capi-appfw-alarm
+       capi-appfw-app-control
+       capi-data-control
+       capi-media-audio-io
+       capi-message-port
+       capi-network-wifi-direct
+       capi-network-nfc
+       bundle
+       badge
+       storage
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/ctc/platform-permission/PlatformPermission_test.jpg b/src/ctc/platform-permission/PlatformPermission_test.jpg
new file mode 100755 (executable)
index 0000000..d18b153
Binary files /dev/null and b/src/ctc/platform-permission/PlatformPermission_test.jpg differ
diff --git a/src/ctc/platform-permission/core-cts-platformPermission-ctc-0.1-0.armv7l.rpm b/src/ctc/platform-permission/core-cts-platformPermission-ctc-0.1-0.armv7l.rpm
new file mode 100755 (executable)
index 0000000..9e89ff0
Binary files /dev/null and b/src/ctc/platform-permission/core-cts-platformPermission-ctc-0.1-0.armv7l.rpm differ
diff --git a/src/ctc/platform-permission/native-datacontrolprovider-ctc-0.1-0.armv7l.rpm b/src/ctc/platform-permission/native-datacontrolprovider-ctc-0.1-0.armv7l.rpm
new file mode 100755 (executable)
index 0000000..0f2d840
Binary files /dev/null and b/src/ctc/platform-permission/native-datacontrolprovider-ctc-0.1-0.armv7l.rpm differ
diff --git a/src/ctc/platform-permission/native-datacontrolprovider-ctc-0.1-0.i586.rpm b/src/ctc/platform-permission/native-datacontrolprovider-ctc-0.1-0.i586.rpm
new file mode 100755 (executable)
index 0000000..79eda2d
Binary files /dev/null and b/src/ctc/platform-permission/native-datacontrolprovider-ctc-0.1-0.i586.rpm differ
diff --git a/src/ctc/platform-permission/native-platform-permission-ctc-0.1-0.armv7l.rpm b/src/ctc/platform-permission/native-platform-permission-ctc-0.1-0.armv7l.rpm
new file mode 100755 (executable)
index 0000000..d900f86
Binary files /dev/null and b/src/ctc/platform-permission/native-platform-permission-ctc-0.1-0.armv7l.rpm differ
diff --git a/src/ctc/platform-permission/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm b/src/ctc/platform-permission/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm
new file mode 100755 (executable)
index 0000000..7f7c1ea
Binary files /dev/null and b/src/ctc/platform-permission/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm differ
diff --git a/src/ctc/platform-permission/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm b/src/ctc/platform-permission/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm
new file mode 100755 (executable)
index 0000000..f25e8fd
Binary files /dev/null and b/src/ctc/platform-permission/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm differ
diff --git a/src/ctc/platform-permission/org.tizen.helloworld-1.0.0-arm.tpk b/src/ctc/platform-permission/org.tizen.helloworld-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..e830fba
Binary files /dev/null and b/src/ctc/platform-permission/org.tizen.helloworld-1.0.0-arm.tpk differ
diff --git a/src/ctc/platform-permission/org.tizen.helloworld-1.0.0-i386.tpk b/src/ctc/platform-permission/org.tizen.helloworld-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..1507979
Binary files /dev/null and b/src/ctc/platform-permission/org.tizen.helloworld-1.0.0-i386.tpk differ
diff --git a/src/ctc/platform-permission/org.tizen.testapplication-1.0.0-arm.tpk b/src/ctc/platform-permission/org.tizen.testapplication-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..651a204
Binary files /dev/null and b/src/ctc/platform-permission/org.tizen.testapplication-1.0.0-arm.tpk differ
diff --git a/src/ctc/platform-permission/org.tizen.testapplication-1.0.0-i386.tpk b/src/ctc/platform-permission/org.tizen.testapplication-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..ef6c7fc
Binary files /dev/null and b/src/ctc/platform-permission/org.tizen.testapplication-1.0.0-i386.tpk differ
diff --git a/src/ctc/platform-permission/platform-permission-common.c b/src/ctc/platform-permission/platform-permission-common.c
new file mode 100755 (executable)
index 0000000..8e69ff0
--- /dev/null
@@ -0,0 +1,1243 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "platform-permission-common.h"
+
+/** @addtogroup ctc-platform-permission
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+// Callbacks
+
+/**
+ * @function                                   SoundManagerErrorInfo
+ * @description                                Display the details error information
+ * @parameter  [IN]                    nResult (return value of wifi api)
+ *                             [IN]                    pszApi (wifi api name)
+ * @return     NA
+ */
+void SoundManagerErrorInfo(char *pszApi,int nResult)
+{
+       char* pszErrInfo = NULL;
+       pszErrInfo = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrInfo == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrInfo", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case SOUND_MANAGER_ERROR_NONE:                                          strcpy(pszErrInfo, "SOUND_MANAGER_ERROR_NONE");                                         break;
+               case SOUND_MANAGER_ERROR_OUT_OF_MEMORY:                         strcpy(pszErrInfo, "SOUND_MANAGER_ERROR_OUT_OF_MEMORY");                        break;
+               case SOUND_MANAGER_ERROR_INVALID_PARAMETER:                     strcpy(pszErrInfo, "SOUND_MANAGER_ERROR_INVALID_PARAMETER");            break;
+               case SOUND_MANAGER_ERROR_INVALID_OPERATION:                     strcpy(pszErrInfo, "SOUND_MANAGER_ERROR_INVALID_OPERATION");            break;
+               case SOUND_MANAGER_ERROR_INTERNAL:                                      strcpy(pszErrInfo, "SOUND_MANAGER_ERROR_INTERNAL");                                     break;
+               case SOUND_MANAGER_ERROR_POLICY:                                        strcpy(pszErrInfo, "SOUND_MANAGER_ERROR_POLICY");                                       break;
+               case SOUND_MANAGER_ERROR_NO_PLAYING_SOUND:                      strcpy(pszErrInfo, "SOUND_MANAGER_ERROR_NO_PLAYING_SOUND");                     break;
+               default:                                                                                        strcpy(pszErrInfo, "Unknown_Error");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s failed , error returned = %s\n", API_NAMESPACE, pszApi,pszErrInfo);
+       SAFE_FREE(pszErrInfo);
+}
+
+/**
+ * @function                                   WifiErrorInfo
+ * @description                                Display the details error information
+ * @parameter  [IN]                    nResult (return value of wifi api)
+ *                             [IN]                    pszApi (wifi api name)
+ * @return     NA
+ */
+void WifiErrorInfo(char *pszApi,int nResult)
+{
+       char* pszErrInfo = NULL;
+       pszErrInfo = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       
+       if ( pszErrInfo == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrInfo", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case WIFI_ERROR_NONE:                                                   strcpy(pszErrInfo, "WIFI_ERROR_NONE");                                                  break;
+               case WIFI_ERROR_INVALID_OPERATION:                              strcpy(pszErrInfo, "WIFI_ERROR_INVALID_OPERATION");                             break;
+               case WIFI_ERROR_OPERATION_FAILED:                               strcpy(pszErrInfo, "WIFI_ERROR_OPERATION_FAILED");                              break;
+               case WIFI_ERROR_SECURITY_RESTRICTED:                    strcpy(pszErrInfo, "WIFI_ERROR_SECURITY_RESTRICTED");                   break;
+               case WIFI_ERROR_ALREADY_EXISTS:                                 strcpy(pszErrInfo, "WIFI_ERROR_ALREADY_EXISTS");                                break;
+               case WIFI_ERROR_OPERATION_ABORTED:                              strcpy(pszErrInfo, "WIFI_ERROR_OPERATION_ABORTED");                             break;
+               case WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED:   strcpy(pszErrInfo, "WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED");  break;
+               case WIFI_ERROR_INVALID_PARAMETER:                              strcpy(pszErrInfo, "WIFI_ERROR_INVALID_PARAMETER");                             break;
+               case WIFI_ERROR_DHCP_FAILED:                                    strcpy(pszErrInfo, "WIFI_ERROR_DHCP_FAILED");                                   break;
+               case WIFI_ERROR_INVALID_KEY:                                    strcpy(pszErrInfo, "WIFI_ERROR_INVALID_KEY");                                   break;
+               case WIFI_ERROR_NO_REPLY:                                               strcpy(pszErrInfo, "WIFI_ERROR_NO_REPLY");                                              break;
+               case WIFI_ERROR_OUT_OF_MEMORY:                                  strcpy(pszErrInfo, "WIFI_ERROR_OUT_OF_MEMORY");                                 break;
+               case WIFI_ERROR_NO_CONNECTION:                                  strcpy(pszErrInfo, "WIFI_ERROR_NO_CONNECTION");                                 break;
+               default:                                                                                strcpy(pszErrInfo, "Unknown_Error");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s failed , error returned = %s\n", API_NAMESPACE, pszApi,pszErrInfo);
+       SAFE_FREE(pszErrInfo);
+}
+
+
+/**
+* @function                                    LocationsErrorInfo
+* @description                                         print the error information
+* @parameter[IN]                               nResult, the error code
+*                      [IN]                            pszApiName, API name
+* @return                                              NA
+*/
+void LocationsErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrorMsg == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrorMsg", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case LOCATIONS_ERROR_NONE:                                                      strcpy(pszErrorMsg, "LOCATIONS_ERROR_NONE");                                            break;
+               case LOCATIONS_ERROR_OUT_OF_MEMORY:                             strcpy(pszErrorMsg, "LOCATIONS_ERROR_OUT_OF_MEMORY");                           break;
+               case LOCATIONS_ERROR_INVALID_PARAMETER:                         strcpy(pszErrorMsg, "LOCATIONS_ERROR_INVALID_PARAMETER");                       break;
+               case LOCATIONS_ERROR_INCORRECT_METHOD:                          strcpy(pszErrorMsg, "LOCATIONS_ERROR_INCORRECT_METHOD");                        break;
+               case LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE:                     strcpy(pszErrorMsg, "LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE");           break;
+               case LOCATIONS_ERROR_GPS_SETTING_OFF:                           strcpy(pszErrorMsg, "LOCATIONS_ERROR_GPS_SETTING_OFF");                         break;
+               case LOCATIONS_ERROR_SECURITY_RESTRICTED:                       strcpy(pszErrorMsg, "LOCATIONS_ERROR_SECURITY_RESTRICTED");                     break;
+               case LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED:         strcpy(pszErrorMsg, "LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED");       break;
+               default:                                                                                        strcpy(pszErrorMsg, "UNDEFINED ERROR");                                 
+       }
+       
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)", API_NAMESPACE, pszApiName, pszErrorMsg, nResult);
+       SAFE_FREE(pszErrorMsg);
+}
+
+/**
+ * @function                                   AppControlErrorInfo
+ * @description                                print the error information
+ * @parameter [IN]                             nResult, the error code
+ *                       [IN]                          pszApiName, API name
+ * @return                                             NA
+ *
+ */
+void AppControlErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrorMsg == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrorMsg", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case APP_CONTROL_ERROR_NONE:                                    strcpy(pszErrorMsg, "APP_CONTROL_ERROR_NONE");                                  break;
+               case APP_CONTROL_ERROR_INVALID_PARAMETER:               strcpy(pszErrorMsg, "APP_CONTROL_ERROR_INVALID_PARAMETER");             break;
+               case APP_CONTROL_ERROR_OUT_OF_MEMORY:                   strcpy(pszErrorMsg, "APP_CONTROL_ERROR_OUT_OF_MEMORY");                 break;
+               case APP_CONTROL_ERROR_APP_NOT_FOUND:                   strcpy(pszErrorMsg, "APP_CONTROL_ERROR_APP_NOT_FOUND");                 break;
+               case APP_CONTROL_ERROR_KEY_NOT_FOUND:                   strcpy(pszErrorMsg, "APP_CONTROL_ERROR_KEY_NOT_FOUND");                 break;
+               case APP_CONTROL_ERROR_KEY_REJECTED:                    strcpy(pszErrorMsg, "APP_CONTROL_ERROR_KEY_REJECTED");                  break;
+               case APP_CONTROL_ERROR_INVALID_DATA_TYPE:               strcpy(pszErrorMsg, "APP_CONTROL_ERROR_INVALID_DATA_TYPE");             break;
+               case APP_CONTROL_ERROR_LAUNCH_REJECTED:                 strcpy(pszErrorMsg, "APP_CONTROL_ERROR_LAUNCH_REJECTED");               break;
+               case APP_CONTROL_ERROR_PERMISSION_DENIED:               strcpy(pszErrorMsg, "APP_CONTROL_ERROR_PERMISSION_DENIED ");    break;
+               case APP_CONTROL_ERROR_LAUNCH_FAILED:                   strcpy(pszErrorMsg, "APP_CONTROL_ERROR_LAUNCH_FAILED");                 break;
+               case APP_CONTROL_ERROR_TIMED_OUT:                               strcpy(pszErrorMsg, "APP_CONTROL_ERROR_TIMED_OUT");                             break;
+               default:                                                                                strcpy(pszErrorMsg, "UKNOWN ERROR");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)", API_NAMESPACE, pszApiName, pszErrorMsg, nResult);
+       SAFE_FREE(pszErrorMsg);
+}
+
+/**
+* @function                                            PackageManagerErrorInfo
+* @description                                         print the error information
+* @parameter[IN]                               nResult, the error code
+*                      [IN]                            pszApiName, API name
+* @return                                              NA
+ *
+ */
+void PackageManagerErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrorMsg == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrorMsg", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case PACKAGE_MANAGER_ERROR_NONE:                                strcpy(pszErrorMsg, "PACKAGE_MANAGER_ERROR_NONE");                                      break;
+               case PACKAGE_MANAGER_ERROR_INVALID_PARAMETER:   strcpy(pszErrorMsg, "PACKAGE_MANAGER_ERROR_INVALID_PARAMETER");         break;
+               case PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY:               strcpy(pszErrorMsg, "PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY");                     break;
+               case PACKAGE_MANAGER_ERROR_IO_ERROR:                    strcpy(pszErrorMsg, "PACKAGE_MANAGER_ERROR_IO_ERROR");                          break;
+               case PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE:             strcpy(pszErrorMsg, "PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE");           break;
+               case PACKAGE_MANAGER_ERROR_SYSTEM_ERROR:                strcpy(pszErrorMsg, "PACKAGE_MANAGER_ERROR_SYSTEM_ERROR");                      break;
+               case PACKAGE_MANAGER_ERROR_PERMISSION_DENIED:   strcpy(pszErrorMsg, "PACKAGE_MANAGER_ERROR_PERMISSION_DENIED ");        break;
+               default:                                                                                strcpy(pszErrorMsg, "UKNOWN ERROR");
+       }
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)\n", API_NAMESPACE, pszApiName, pszErrorMsg, nResult);
+       SAFE_FREE(pszErrorMsg);
+}
+
+/**
+* @function                            DownloadErrorInfo
+* @description                                 print the error information
+* @parameter[IN]                       nResult, the error code
+*                      [IN]                    pszApiName, API name
+* @return                                      NA
+*/
+void DownloadErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrorMsg == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrorMsg", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case DOWNLOAD_ERROR_NONE:                                               strcpy(pszErrorMsg, "DOWNLOAD_ERROR_NONE");             break;
+               case DOWNLOAD_ERROR_INVALID_PARAMETER:                  strcpy(pszErrorMsg, "DOWNLOAD_ERROR_INVALID_PARAMETER");                break;
+               case DOWNLOAD_ERROR_OUT_OF_MEMORY:                              strcpy(pszErrorMsg, "DOWNLOAD_ERROR_OUT_OF_MEMORY");                    break;
+               case DOWNLOAD_ERROR_NETWORK_UNREACHABLE:                strcpy(pszErrorMsg, "DOWNLOAD_ERROR_NETWORK_UNREACHABLE");              break;
+               case DOWNLOAD_ERROR_CONNECTION_TIMED_OUT:               strcpy(pszErrorMsg, "DOWNLOAD_ERROR_CONNECTION_TIMED_OUT");             break;
+               case DOWNLOAD_ERROR_NO_SPACE:                                   strcpy(pszErrorMsg, "DOWNLOAD_ERROR_NO_SPACE");                                 break;
+               case DOWNLOAD_ERROR_FIELD_NOT_FOUND:                    strcpy(pszErrorMsg, "DOWNLOAD_ERROR_FIELD_NOT_FOUND");                  break;
+               case DOWNLOAD_ERROR_PERMISSION_DENIED:                  strcpy(pszErrorMsg, "DOWNLOAD_ERROR_PERMISSION_DENIED");                break;
+               case DOWNLOAD_ERROR_INVALID_STATE:                              strcpy(pszErrorMsg, "DOWNLOAD_ERROR_INVALID_STATE");                    break;
+               case DOWNLOAD_ERROR_CONNECTION_FAILED:                  strcpy(pszErrorMsg, "DOWNLOAD_ERROR_CONNECTION_FAILED");                break;
+               case DOWNLOAD_ERROR_INVALID_URL:                                strcpy(pszErrorMsg, "DOWNLOAD_ERROR_INVALID_URL");                              break;
+               case DOWNLOAD_ERROR_INVALID_DESTINATION:                strcpy(pszErrorMsg, "DOWNLOAD_ERROR_INVALID_DESTINATION");              break;
+               case DOWNLOAD_ERROR_TOO_MANY_DOWNLOADS:                 strcpy(pszErrorMsg, "DOWNLOAD_ERROR_TOO_MANY_DOWNLOADS");               break;
+               case DOWNLOAD_ERROR_QUEUE_FULL:                                 strcpy(pszErrorMsg, "DOWNLOAD_ERROR_QUEUE_FULL");                               break;
+               case DOWNLOAD_ERROR_ALREADY_COMPLETED:                  strcpy(pszErrorMsg, "DOWNLOAD_ERROR_ALREADY_COMPLETED");                break;
+               case DOWNLOAD_ERROR_FILE_ALREADY_EXISTS:                strcpy(pszErrorMsg, "DOWNLOAD_ERROR_FILE_ALREADY_EXISTS");              break;
+               case DOWNLOAD_ERROR_CANNOT_RESUME:                              strcpy(pszErrorMsg, "DOWNLOAD_ERROR_CANNOT_RESUME");                    break;
+               case DOWNLOAD_ERROR_TOO_MANY_REDIRECTS:                 strcpy(pszErrorMsg, "DOWNLOAD_ERROR_TOO_MANY_REDIRECTS");               break;
+               case DOWNLOAD_ERROR_UNHANDLED_HTTP_CODE:                strcpy(pszErrorMsg, "DOWNLOAD_ERROR_UNHANDLED_HTTP_CODE");              break;
+               case DOWNLOAD_ERROR_REQUEST_TIMEOUT:                    strcpy(pszErrorMsg, "DOWNLOAD_ERROR_REQUEST_TIMEOUT");                  break;
+               case DOWNLOAD_ERROR_RESPONSE_TIMEOUT:                   strcpy(pszErrorMsg, "DOWNLOAD_ERROR_RESPONSE_TIMEOUT");                 break;
+               case DOWNLOAD_ERROR_SYSTEM_DOWN:                                strcpy(pszErrorMsg, "DOWNLOAD_ERROR_SYSTEM_DOWN");                              break;
+               case DOWNLOAD_ERROR_ID_NOT_FOUND:                               strcpy(pszErrorMsg, "DOWNLOAD_ERROR_ID_NOT_FOUND");                             break;
+               case DOWNLOAD_ERROR_INVALID_NETWORK_TYPE:               strcpy(pszErrorMsg, "DOWNLOAD_ERROR_INVALID_NETWORK_TYPE");             break;
+               case DOWNLOAD_ERROR_NO_DATA:                                    strcpy(pszErrorMsg, "DOWNLOAD_ERROR_NO_DATA");                                  break;
+               case DOWNLOAD_ERROR_IO_ERROR:                                   strcpy(pszErrorMsg, "DOWNLOAD_ERROR_IO_ERROR");                                 break;
+               default:                                                                                strcpy(pszErrorMsg, "Unknown error");
+       }
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)\n", API_NAMESPACE, pszApiName, pszErrorMsg, nResult);
+       SAFE_FREE(pszErrorMsg);
+}
+/**
+* @function                                    AlarmErrorInfo
+* @description                                         print the error information
+* @parameter   [IN]                    nResult, the error code
+*                              [IN]                    pszApiName, API name
+* @return                                              NA
+*/
+void AlarmErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrorMsg == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrorMsg", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case ALARM_ERROR_NONE:                                                  strcpy(pszErrorMsg, "ALARM_ERROR_NONE");                                                break;
+               case ALARM_ERROR_INVALID_PARAMETER:                             strcpy(pszErrorMsg, "ALARM_ERROR_INVALID_PARAMETER");                   break;
+               case ALARM_ERROR_INVALID_TIME:                                  strcpy(pszErrorMsg, "ALARM_ERROR_INVALID_TIME");                                break;
+               case ALARM_ERROR_INVALID_DATE:                                  strcpy(pszErrorMsg, "ALARM_ERROR_INVALID_DATE");                                break;
+               case ALARM_ERROR_CONNECTION_FAIL:                               strcpy(pszErrorMsg, "ALARM_ERROR_CONNECTION_FAIL");                             break;
+               case ALARM_ERROR_OUT_OF_MEMORY:                                 strcpy(pszErrorMsg, "ALARM_ERROR_OUT_OF_MEMORY");                               break;
+               case ALARM_ERROR_PERMISSION_DENIED:                             strcpy(pszErrorMsg, "ALARM_ERROR_PERMISSION_DENIED");                   break;
+               default:                                                                                strcpy(pszErrorMsg, "Unknown error");
+       }
+       fprintf(fpLog, "[%s] %s is failed, error returned = %s (%d)\n", API_NAMESPACE, pszApiName, pszErrorMsg, nResult);
+       SAFE_FREE(pszErrorMsg);
+}
+
+/**
+* @function                                    SystemSettingsErrorInfo
+* @description                                         print the error of system settings information
+* @parameter  [IN]                             nResult, the error code
+*                        [IN]                          pszApiName, API name
+* @return                                              NA
+*/
+void SystemSettingsErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrLog = NULL;
+       pszErrLog = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrLog == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrLog", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case SYSTEM_SETTINGS_ERROR_NONE:                                                        strcpy(pszErrLog, "SYSTEM_SETTINGS_ERROR_NONE");                                                        break;
+               case SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER:                           strcpy(pszErrLog, "SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER");                           break;
+               case SYSTEM_SETTINGS_ERROR_OUT_OF_MEMORY:                                       strcpy(pszErrLog, "SYSTEM_SETTINGS_ERROR_OUT_OF_MEMORY");                                       break;
+               case SYSTEM_SETTINGS_ERROR_IO_ERROR:                                            strcpy(pszErrLog, "SYSTEM_SETTINGS_ERROR_IO_ERROR");                                            break;
+               case SYSTEM_SETTINGS_ERROR_LOCKSCREEN_APP_PASSWORD_MODE:        strcpy(pszErrLog, "SYSTEM_SETTINGS_ERROR_LOCKSCREEN_APP_PASSWORD_MODE");        break;
+               default:                                                                                                        strcpy(pszErrLog, "Unknown error");
+       }
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)", API_NAMESPACE, pszApiName, pszErrLog, nResult);
+       SAFE_FREE(pszErrLog);
+}
+
+/**
+* @function                                    CkmcErrorInfo
+* @description                                         print the error of Key Manager
+* @parameter[IN]                               nResult, the error code
+*                      [IN]                            pszApiName, API name
+* @return                                              NA
+*/
+void CkmcErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrLog = NULL;
+       pszErrLog = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrLog == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrLog", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case CKMC_ERROR_NONE:                                           strcpy(pszErrLog, "CKMC_ERROR_NONE ");                                          break;
+               case CKMC_ERROR_INVALID_PARAMETER:                      strcpy(pszErrLog, "CKMC_ERROR_INVALID_PARAMETER");                      break;
+               case CKMC_ERROR_DB_LOCKED:                                      strcpy(pszErrLog, "CKMC_ERROR_DB_LOCKED");                                      break;
+               case CKMC_ERROR_DB_ERROR:                                       strcpy(pszErrLog, "CKMC_ERROR_DB_ERROR");                                       break;
+               case CKMC_ERROR_DB_ALIAS_UNKNOWN:                       strcpy(pszErrLog,  "CKMC_ERROR_DB_ALIAS_UNKNOWN");                      break;
+               case CKMC_ERROR_OUT_OF_MEMORY:                          strcpy(pszErrLog,  "CKMC_ERROR_OUT_OF_MEMORY");                         break;
+               case CKMC_ERROR_SOCKET:                                         strcpy(pszErrLog,  "CKMC_ERROR_SOCKET");                                        break;
+               case CKMC_ERROR_BAD_REQUEST:                            strcpy(pszErrLog,  "CKMC_ERROR_BAD_REQUEST");                           break;
+               case CKMC_ERROR_BAD_RESPONSE:                           strcpy(pszErrLog,  "CKMC_ERROR_BAD_RESPONSE");                          break;
+               case CKMC_ERROR_SEND_FAILED:                            strcpy(pszErrLog,  "CKMC_ERROR_SEND_FAILED");                           break;
+               case CKMC_ERROR_RECV_FAILED:                            strcpy(pszErrLog,  "CKMC_ERROR_RECV_FAILED");                           break;
+               case CKMC_ERROR_AUTHENTICATION_FAILED   :       strcpy(pszErrLog,  "CKMC_ERROR_AUTHENTICATION_FAILED     ");break;
+               case CKMC_ERROR_BUFFER_TOO_SMALL:               strcpy(pszErrLog,  "CKMC_ERROR_BUFFER_TOO_SMALL");                      break;
+               case CKMC_ERROR_SERVER_ERROR    :                       strcpy(pszErrLog,  "CKMC_ERROR_SERVER_ERROR");                          break;
+               case CKMC_ERROR_DB_ALIAS_EXISTS :                       strcpy(pszErrLog,  "CKMC_ERROR_DB_ALIAS_EXISTS");                       break;
+               case CKMC_ERROR_VERIFICATION_FAILED     :               strcpy(pszErrLog,  "CKMC_ERROR_VERIFICATION_FAILED");           break;
+               case CKMC_ERROR_INVALID_FORMAT  :                       strcpy(pszErrLog,  "CKMC_ERROR_INVALID_FORMAT");                        break;
+               case CKMC_ERROR_FILE_ACCESS_DENIED      :               strcpy(pszErrLog,  "CKMC_ERROR_FILE_ACCESS_DENIED ");           break;
+               case CKMC_ERROR_NOT_EXPORTABLE  :                       strcpy(pszErrLog,  "CKMC_ERROR_NOT_EXPORTABLE");                        break;
+               case CKMC_ERROR_UNKNOWN:                                        strcpy(pszErrLog,  "CKMC_ERROR_UNKNOWN ");                                      break;
+               default:                                                                        strcpy(pszErrLog,  "UNKNOWN");
+       }
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s.\n", API_NAMESPACE, pszApiName, pszErrLog);
+       SAFE_FREE(pszErrLog);
+}
+
+/**
+* @function                                    PushServiceErrorInfo
+* @description                                         print the error information
+* @parameter[IN]                               nResult, the error code
+*                      [IN]                            pszApiName, API name
+* @return                                              NA
+*/
+void PushServiceErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrorMsg == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrorMsg", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case PUSH_SERVICE_ERROR_NONE:                                   strcpy(pszErrorMsg, "PUSH_SERVICE_ERROR_NONE");                                 break;
+               case PUSH_SERVICE_ERROR_OUT_OF_MEMORY:                  strcpy(pszErrorMsg, "PUSH_SERVICE_ERROR_OUT_OF_MEMORY");                break;
+               case PUSH_SERVICE_ERROR_INVALID_PARAMETER:              strcpy(pszErrorMsg, "PUSH_SERVICE_ERROR_INVALID_PARAMETER");    break;
+               case PUSH_SERVICE_ERROR_NO_DATA:                                strcpy(pszErrorMsg, "PUSH_SERVICE_ERROR_NO_DATA");                              break;
+               case PUSH_SERVICE_ERROR_NOT_CONNECTED:                  strcpy(pszErrorMsg, "PUSH_SERVICE_ERROR_NOT_CONNECTED");                break;
+               case PUSH_SERVICE_ERROR_OPERATION_FAILED:               strcpy(pszErrorMsg, "PUSH_SERVICE_ERROR_OPERATION_FAILED");             break;
+               case PUSH_SERVICE_ERROR_PERMISSION_DENIED:              strcpy(pszErrorMsg, "PUSH_SERVICE_ERROR_PERMISSION_DENIED");    break;
+               default:                                                                                strcpy(pszErrorMsg, "UNDEFINED ERROR");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)", API_NAMESPACE, pszApiName, pszErrorMsg, nResult);
+       SAFE_FREE(pszErrorMsg);
+}
+
+/**
+* @function                                    BluetoothErrorInfo
+* @description                                         print the error information
+* @parameter[IN]                               nResult, the error code
+*                      [IN]                            pszApiName, API name
+* @return                                              NA
+*/
+void BluetoothErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrorMsg == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrorMsg", API_NAMESPACE);
+               return;
+       }
+
+       switch ( nResult )
+       {
+               case BT_ERROR_NONE:                                             strcpy(pszErrorMsg, "BT_ERROR_NONE");                                           break;
+               case BT_ERROR_CANCELLED:                                        strcpy(pszErrorMsg, "BT_ERROR_CANCELLED");                                      break;
+               case BT_ERROR_INVALID_PARAMETER:                        strcpy(pszErrorMsg, "BT_ERROR_INVALID_PARAMETER");                      break;
+               case BT_ERROR_OUT_OF_MEMORY:                            strcpy(pszErrorMsg, "BT_ERROR_OUT_OF_MEMORY");                          break;
+               case BT_ERROR_RESOURCE_BUSY:                            strcpy(pszErrorMsg, "BT_ERROR_RESOURCE_BUSY");                          break;
+               case BT_ERROR_TIMED_OUT:                                        strcpy(pszErrorMsg, "BT_ERROR_TIMED_OUT");                                      break;
+               case BT_ERROR_NOW_IN_PROGRESS:                          strcpy(pszErrorMsg, "BT_ERROR_NOW_IN_PROGRESS");                        break;
+               case BT_ERROR_NOT_INITIALIZED:                          strcpy(pszErrorMsg, "BT_ERROR_NOT_INITIALIZED");                        break;
+               case BT_ERROR_NOT_ENABLED:                                      strcpy(pszErrorMsg, "BT_ERROR_NOT_ENABLED");                            break;
+               case BT_ERROR_ALREADY_DONE:                             strcpy(pszErrorMsg, "BT_ERROR_ALREADY_DONE");                           break;
+               case BT_ERROR_OPERATION_FAILED:                 strcpy(pszErrorMsg, "BT_ERROR_OPERATION_FAILED");                       break;
+               case BT_ERROR_NOT_IN_PROGRESS:                          strcpy(pszErrorMsg, "BT_ERROR_NOT_IN_PROGRESS");                        break;
+               case BT_ERROR_REMOTE_DEVICE_NOT_BONDED: strcpy(pszErrorMsg, "BT_ERROR_REMOTE_DEVICE_NOT_BONDED");       break;
+               case BT_ERROR_AUTH_REJECTED:                            strcpy(pszErrorMsg, "BT_ERROR_AUTH_REJECTED");                          break;
+               case BT_ERROR_AUTH_FAILED:                                      strcpy(pszErrorMsg, "BT_ERROR_AUTH_FAILED");                            break;
+               case BT_ERROR_REMOTE_DEVICE_NOT_FOUND:          strcpy(pszErrorMsg, "BT_ERROR_REMOTE_DEVICE_NOT_FOUND");        break;
+               case BT_ERROR_SERVICE_SEARCH_FAILED:            strcpy(pszErrorMsg, "BT_ERROR_SERVICE_SEARCH_FAILED");          break;
+               case BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED:      strcpy(pszErrorMsg, "BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED");break;
+               case BT_ERROR_PERMISSION_DENIED:                        strcpy(pszErrorMsg, "BT_ERROR_PERMISSION_DENIED");                      break;
+               default:                                                                        strcpy(pszErrorMsg, "UNDEFINED ERROR");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)", API_NAMESPACE, pszApiName, pszErrorMsg, nResult);
+       SAFE_FREE(pszErrorMsg);
+}
+
+/**
+ * @function                                   RecorderPrintErrorMsg
+ * @description                                Print message.
+ * @parameter  [IN]                            nResult, the error code
+ *                        [IN]                         pszApiName, API name
+ * @return                                             NA
+ *
+ */
+void RecorderPrintErrorMsg(char *pszApiName, int nRet)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(MEMLOG, MEMLOG * sizeof(char));
+       if ( pszErrorMsg == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrorMsg", API_NAMESPACE);
+               return;
+       }
+       switch(nRet)
+       {
+               case RECORDER_ERROR_NONE:                                                       strcpy(pszErrorMsg, "RECORDER_ERROR_NONE");                                                     break;
+               case RECORDER_ERROR_INVALID_PARAMETER:                          strcpy(pszErrorMsg, "RECORDER_ERROR_INVALID_PARAMETER");                                break;
+               case RECORDER_ERROR_INVALID_STATE:                                      strcpy(pszErrorMsg, "RECORDER_ERROR_INVALID_STATE");                                    break;
+               case RECORDER_ERROR_OUT_OF_MEMORY:                                      strcpy(pszErrorMsg, "RECORDER_ERROR_OUT_OF_MEMORY");                                    break;
+               case RECORDER_ERROR_DEVICE:                                                     strcpy(pszErrorMsg, "RECORDER_ERROR_DEVICE");                                           break;
+               case RECORDER_ERROR_INVALID_OPERATION:                          strcpy(pszErrorMsg, "RECORDER_ERROR_INVALID_OPERATION");                                break;
+               case RECORDER_ERROR_SOUND_POLICY:                                       strcpy(pszErrorMsg, "RECORDER_ERROR_SOUND_POLICY");                                     break;
+               case RECORDER_ERROR_SECURITY_RESTRICTED:                        strcpy(pszErrorMsg, "RECORDER_ERROR_SECURITY_RESTRICTED");                      break;
+               case RECORDER_ERROR_SOUND_POLICY_BY_CALL:                       strcpy(pszErrorMsg, "RECORDER_ERROR_SOUND_POLICY_BY_CALL");                     break;
+               case RECORDER_ERROR_SOUND_POLICY_BY_ALARM:                      strcpy(pszErrorMsg, "RECORDER_ERROR_SOUND_POLICY_BY_ALARM");                    break;
+               case RECORDER_ERROR_ESD:                                                        strcpy(pszErrorMsg, "RECORDER_ERROR_ESD");                                                      break;
+               case RECORDER_ERROR_OUT_OF_STORAGE:                             strcpy(pszErrorMsg, "RECORDER_ERROR_OUT_OF_STORAGE");                           break;
+               case RECORDER_ERROR_PERMISSION_DENIED:                          strcpy(pszErrorMsg, "RECORDER_ERROR_PERMISSION_DENIED");                                break;
+               default:                                                                                        strcpy(pszErrorMsg, "Unknown Error");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s failed, error returned %s (%d)\n", API_NAMESPACE, pszApiName, pszErrorMsg, nRet);
+       SAFE_FREE(pszErrorMsg);
+
+}
+
+/**
+ * @function                                   MessagesErrorInfo
+ * @description                                Display the details error information
+ * @parameter [IN]                             nResult, the error code
+ *                       [IN]                          pszApiName, API name
+ * @return                                             NA
+ */
+void MessagesErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrLog = NULL;
+       pszErrLog = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrLog == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrLog", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case MESSAGES_ERROR_NONE:                                                               strcpy(pszErrLog, "MESSAGES_ERROR_NONE");                                                               break;
+               case MESSAGES_ERROR_OUT_OF_MEMORY:                                              strcpy(pszErrLog, "MESSAGES_ERROR_OUT_OF_MEMORY");                                              break;
+               case MESSAGES_ERROR_INVALID_PARAMETER:                                  strcpy(pszErrLog, "MESSAGES_ERROR_INVALID_PARAMETER");                                  break;
+               case MESSAGES_ERROR_SERVER_NOT_READY:                                   strcpy(pszErrLog, "MESSAGES_ERROR_SERVER_NOT_READY");                                   break;
+               case MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED:   strcpy(pszErrLog, "MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED");   break;
+               case MESSAGES_ERROR_SENDING_FAILED:                                             strcpy(pszErrLog, "MESSAGES_ERROR_SENDING_FAILED");                                             break;
+               case MESSAGES_ERROR_OPERATION_FAILED:                                   strcpy(pszErrLog, "MESSAGES_ERROR_OPERATION_FAILED");                                   break;
+               case MESSAGES_ERROR_NO_SIM_CARD:                                                strcpy(pszErrLog, "MESSAGES_ERROR_NO_SIM_CARD");                                                break;
+               case MESSAGES_ERROR_NO_DATA:                                                    strcpy(pszErrLog, "MESSAGES_ERROR_NO_DATA");                                                    break;
+               default:                                                                                                strcpy(pszErrLog,  "Unknown error");
+       }
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)\n", API_NAMESPACE, pszApiName, pszErrLog, nResult);
+       SAFE_FREE(pszErrLog);
+}
+
+/**
+ * @function                           CameraPrintErrorMsg
+ * @description                        Display the details error information
+ * @parameter  [IN]                    nResult, the error code
+ *                        [IN]                 pszApiName, API name
+ * @return                                     NA
+ *
+ */
+void CameraPrintErrorMsg(char *pszApiName, int nRet)
+{
+       char *pszErrorMsg = NULL;
+       pszErrorMsg = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrorMsg == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrorMsg", API_NAMESPACE);
+               return;
+       }
+       switch(nRet)
+       {
+               case CAMERA_ERROR_NONE:                                         strcpy(pszErrorMsg, "CAMERA_ERROR_NONE");                                       break;
+               case CAMERA_ERROR_INVALID_PARAMETER:            strcpy(pszErrorMsg, "CAMERA_ERROR_INVALID_PARAMETER");          break;
+               case CAMERA_ERROR_INVALID_STATE:                        strcpy(pszErrorMsg, "CAMERA_ERROR_INVALID_STATE");                      break;
+               case CAMERA_ERROR_OUT_OF_MEMORY:                        strcpy(pszErrorMsg, "CAMERA_ERROR_OUT_OF_MEMORY");                      break;
+               case CAMERA_ERROR_DEVICE:                                       strcpy(pszErrorMsg, "CAMERA_ERROR_DEVICE");                                     break;
+               case CAMERA_ERROR_INVALID_OPERATION:            strcpy(pszErrorMsg, "CAMERA_ERROR_INVALID_OPERATION");          break;
+               case CAMERA_ERROR_SOUND_POLICY:                         strcpy(pszErrorMsg, "CAMERA_ERROR_SOUND_POLICY");                       break;
+               case CAMERA_ERROR_SECURITY_RESTRICTED:          strcpy(pszErrorMsg, "CAMERA_ERROR_SECURITY_RESTRICTED");                break;
+               case CAMERA_ERROR_DEVICE_BUSY:                          strcpy(pszErrorMsg, "CAMERA_ERROR_DEVICE_BUSY");                                break;
+               case CAMERA_ERROR_DEVICE_NOT_FOUND:                     strcpy(pszErrorMsg, "CAMERA_ERROR_DEVICE_NOT_FOUND");           break;
+               case CAMERA_ERROR_SOUND_POLICY_BY_CALL:         strcpy(pszErrorMsg, "CAMERA_ERROR_SOUND_POLICY_BY_CALL");       break;
+               case CAMERA_ERROR_SOUND_POLICY_BY_ALARM:        strcpy(pszErrorMsg, "CAMERA_ERROR_SOUND_POLICY_BY_ALARM");      break;
+               case CAMERA_ERROR_ESD:                                          strcpy(pszErrorMsg, "CAMERA_ERROR_ESD");                                                break;
+               case CAMERA_ERROR_PERMISSION_DENIED:            strcpy(pszErrorMsg, "CAMERA_ERROR_PERMISSION_DENIED");          break;
+               default:                                                                        strcpy(pszErrorMsg, "Unknown Error");
+       }
+       fprintf(fpLog, "\\n[%s] %s failed, error returned = %s.\n", API_NAMESPACE, pszApiName, pszErrorMsg);
+       SAFE_FREE(pszErrorMsg);
+}
+
+
+/**
+ * @function                           NetworkConnectionPrintErrorMsg
+ * @description                        Display the details error information
+ * @parameter  [IN]                    nResult, the error code
+ *                        [IN]                 pszApiName, API name
+ * @return                                     NA
+ *
+ */
+void NetworkConnectionPrintErrorMsg(char *pszApiName, int nRet)
+{
+       char* pszEnum = NULL;
+       pszEnum = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszEnum == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszEnum", API_NAMESPACE);
+               return;
+       }
+       switch(nRet) 
+       {
+               case CONNECTION_ERROR_NONE:                                                                     strcpy(pszEnum, "CONNECTION_ERROR_NONE");                                                                       break;
+               case CONNECTION_ERROR_INVALID_PARAMETER:                                        strcpy(pszEnum, "CONNECTION_ERROR_INVALID_PARAMETER");                                          break;
+               case CONNECTION_ERROR_OUT_OF_MEMORY:                                            strcpy(pszEnum, "CONNECTION_ERROR_OUT_OF_MEMORY");                                                      break;
+               case CONNECTION_ERROR_INVALID_OPERATION:                                        strcpy(pszEnum, "CONNECTION_ERROR_INVALID_OPERATION");                                          break;
+               case CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED:                     strcpy(pszEnum, "CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED");                       break;
+               case CONNECTION_ERROR_OPERATION_FAILED:                                         strcpy(pszEnum, "CONNECTION_ERROR_OPERATION_FAILED");                                           break;
+               case CONNECTION_ERROR_ITERATOR_END:                                                     strcpy(pszEnum, "CONNECTION_ERROR_ITERATOR_END");                                                       break;
+               case CONNECTION_ERROR_NO_CONNECTION:                                            strcpy(pszEnum, "CONNECTION_ERROR_NO_CONNECTION");                                                      break;
+               case CONNECTION_ERROR_ALREADY_EXISTS:                                           strcpy(pszEnum, "CONNECTION_ERROR_ALREADY_EXISTS");                                                     break;
+               case CONNECTION_ERROR_OPERATION_ABORTED:                                        strcpy(pszEnum, "CONNECTION_ERROR_OPERATION_ABORTED");                                          break;
+               case CONNECTION_ERROR_DHCP_FAILED:                                                      strcpy(pszEnum, "CONNECTION_ERROR_DHCP_FAILED");                                                        break;
+               case CONNECTION_ERROR_INVALID_KEY:                                                      strcpy(pszEnum, "CONNECTION_ERROR_INVALID_KEY");                                                        break;
+               case CONNECTION_ERROR_NO_REPLY:                                                         strcpy(pszEnum, "CONNECTION_ERROR_NO_REPLY");                                                           break;
+               default:                                                                                                        strcpy(pszEnum, "Unknown Error");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s failed, error returned = %s \n", API_NAMESPACE, pszApiName, pszEnum);
+       SAFE_FREE(pszEnum);
+}
+
+/**
+ * @function                           NotificationPrintAPIErrorMSG
+ * @description                                Display the details error information
+ * @parameter  [IN]                    nResult, the error code
+ *                        [IN]                 pszApiName, API name
+ * @return                                     NA
+ *
+ */
+void NotificationPrintAPIErrorMSG(char *pszAPI, int nRet)
+{
+       char* pszErrorMessage = NULL;
+       pszErrorMessage = (char*)calloc(MEMLOG, MEMLOG * sizeof(char));
+       if ( pszErrorMessage == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrorMessage", API_NAMESPACE);
+               return;
+       }
+       switch(nRet)
+       {
+               case NOTIFICATION_ERROR_NONE:                                   strcpy(pszErrorMessage, "NOTIFICATION_ERROR_NONE ");                            break;
+               case NOTIFICATION_ERROR_INVALID_PARAMETER:              strcpy(pszErrorMessage, "NOTIFICATION_ERROR_INVALID_PARAMETER ");       break;
+               case NOTIFICATION_ERROR_OUT_OF_MEMORY:                  strcpy(pszErrorMessage, "NOTIFICATION_ERROR_OUT_OF_MEMORY");            break;
+               case NOTIFICATION_ERROR_FROM_DB:                                strcpy(pszErrorMessage, "NOTIFICATION_ERROR_FROM_DB");                          break;
+               case NOTIFICATION_ERROR_ALREADY_EXIST_ID:               strcpy(pszErrorMessage, "NOTIFICATION_ERROR_ALREADY_EXIST_ID");         break;
+               case NOTIFICATION_ERROR_FROM_DBUS:                              strcpy(pszErrorMessage, "NOTIFICATION_ERROR_FROM_DBUS");                        break;
+               case NOTIFICATION_ERROR_NOT_EXIST_ID:                   strcpy(pszErrorMessage, "NOTIFICATION_ERROR_NOT_EXIST_ID");                     break;
+               case NOTIFICATION_ERROR_IO_ERROR:                               strcpy(pszErrorMessage, "NOTIFICATION_ERROR_IO_ERROR");                         break;
+               case NOTIFICATION_ERROR_SERVICE_NOT_READY:              strcpy(pszErrorMessage, "NOTIFICATION_ERROR_SERVICE_NOT_READY");        break;
+               case NOTIFICATION_ERROR_PERMISSION_DENIED:              strcpy(pszErrorMessage, "NOTIFICATION_ERROR_PERMISSION_DENIED");        break;
+               default:                                                                                strcpy(pszErrorMessage, "Unknown Error");
+         }
+
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s\n", API_NAMESPACE, pszAPI, pszErrorMessage);
+       SAFE_FREE(pszErrorMessage);
+}
+/**
+ * @function                           DeviceErrorInfo
+ * @description                                Display the details error information
+ * @parameter   [IN]           nResult, the error code
+ *                         [IN]                pszApiName, API name
+ * @return                                     NA
+ *
+ */
+void DeviceErrorInfo(char *pszApi,int nResult)
+{
+       char* pszErrInfo = NULL;
+       pszErrInfo = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrInfo == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrInfo", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case DEVICE_ERROR_NONE:                                 strcpy(pszErrInfo, "DEVICE_ERROR_NONE  ");                                      break;
+               case DEVICE_ERROR_OPERATION_FAILED:                     strcpy(pszErrInfo, "DEVICE_ERROR_OPERATION_FAILED");            break;          
+               case DEVICE_ERROR_INVALID_PARAMETER:            strcpy(pszErrInfo, "DEVICE_ERROR_INVALID_PARAMETER");           break;
+               case DEVICE_ERROR_ALREADY_IN_PROGRESS:          strcpy(pszErrInfo, "DEVICE_ERROR_ALREADY_IN_PROGRESS");         break;
+               case DEVICE_ERROR_NOT_SUPPORTED:                        strcpy(pszErrInfo, "DEVICE_ERROR_NOT_SUPPORTED");                       break;
+               case DEVICE_ERROR_NOT_INITIALIZED:                      strcpy(pszErrInfo, "DEVICE_ERROR_NOT_INITIALIZED  ");           break;
+               default:                                                                        strcpy(pszErrInfo, "Unknown Error");
+       }
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d) \n", API_NAMESPACE, pszApi, pszErrInfo, nResult);
+       SAFE_FREE(pszErrInfo);
+}
+
+/**
+ * @function                           DataControlErrorInfo
+ * @description                                Display the details error information
+ * @parameter[IN]                      nResult, the error code
+ *                     [IN]                    pszApiName, API name
+ * @return                                     NA
+ *
+ */
+void DataControlErrorInfo(char *pszApi,int nResult)
+{
+       char* pszErrInfo = NULL;
+       pszErrInfo = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrInfo == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed for pszErrInfo", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case DATA_CONTROL_ERROR_NONE:                                   strcpy(pszErrInfo, "DATA_CONTROL_ERROR_NONE  ");                                        break;
+               case DATA_CONTROL_ERROR_OUT_OF_MEMORY:                  strcpy(pszErrInfo, "DATA_CONTROL_ERROR_OUT_OF_MEMORY");                         break;
+               case DATA_CONTROL_ERROR_IO_ERROR:                               strcpy(pszErrInfo, "DATA_CONTROL_ERROR_IO_ERROR");                                      break;
+               case DATA_CONTROL_ERROR_INVALID_PARAMETER:              strcpy(pszErrInfo, "DATA_CONTROL_ERROR_INVALID_PARAMETER");                     break;
+               case DATA_CONTROL_ERROR_MAX_EXCEEDED:                   strcpy(pszErrInfo, "DATA_CONTROL_ERROR_MAX_EXCEEDED");                          break;
+               default:                                                                                strcpy(pszErrInfo, "Unknown Error");
+       }
+       
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)\n", API_NAMESPACE, pszApi, pszErrInfo, nResult);
+       SAFE_FREE(pszErrInfo);
+}
+
+/**
+ * @function                           BadgePrintErrorCode
+ * @description                        Display the details error information
+ * @parameter  [IN]            nResult (return value of badge api)
+ *                             [IN]            pszApi (badge api name)
+ * @return                                     NA
+ *
+ */
+void BadgePrintErrorCode(char *pszApi,int nResult)
+{
+       char* pszEnum = NULL;
+       pszEnum = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+
+       if ( pszEnum == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case BADGE_ERROR_NONE:                                  strcpy(pszEnum, "BADGE_ERROR_NONE ");                                   break;
+               case BADGE_ERROR_INVALID_PARAMETER:             strcpy(pszEnum, "BADGE_ERROR_INVALID_PARAMETER");               break;
+               case BADGE_ERROR_OUT_OF_MEMORY:                 strcpy(pszEnum, "BADGE_ERROR_OUT_OF_MEMORY");                   break;
+               case BADGE_ERROR_PERMISSION_DENIED:             strcpy(pszEnum, "BADGE_ERROR_PERMISSION_DENIED");               break;
+               case BADGE_ERROR_IO_ERROR:                              strcpy(pszEnum, "BADGE_ERROR_IO_ERROR ");                               break;
+               case BADGE_ERROR_FROM_DB:                               strcpy(pszEnum, "BADGE_ERROR_FROM_DB");                                 break;
+               case BADGE_ERROR_ALREADY_EXIST:                 strcpy(pszEnum, "BADGE_ERROR_ALREADY_EXIST");                   break;
+               case BADGE_ERROR_FROM_DBUS:                             strcpy(pszEnum, "BADGE_ERROR_FROM_DBUS");                               break;
+               case BADGE_ERROR_NOT_EXIST:                             strcpy(pszEnum, "BADGE_ERROR_NOT_EXIST");                               break;
+               case BADGE_ERROR_SERVICE_NOT_READY:             strcpy(pszEnum, "BADGE_ERROR_SERVICE_NOT_READY");               break;
+               default:                                                                strcpy(pszEnum, "Unknown Error");
+       }
+
+       fprintf(fpLog, "[%s] %s failed, error returned = %s \n", API_NAMESPACE, pszApi, pszEnum);
+       SAFE_FREE(pszEnum);
+}
+/**
+ * @function                           MediaContentErrorInfo
+ * @description                        print the error information for Media Content.
+ * @parameter [IN]                     nResult, the error code
+ *                       [IN]                  pszApiName, API name
+ * @return                                     NA
+ *
+ */
+void MediaContentErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrorMsg = NULL;
+    pszErrorMsg = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrorMsg == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case MEDIA_CONTENT_ERROR_NONE:                                  strcpy(pszErrorMsg, "MEDIA_CONTENT_ERROR_NONE");                                        break;
+               case MEDIA_CONTENT_ERROR_INVALID_PARAMETER:             strcpy(pszErrorMsg, "MEDIA_CONTENT_ERROR_INVALID_PARAMETER");           break;
+               case MEDIA_CONTENT_ERROR_OUT_OF_MEMORY:                 strcpy(pszErrorMsg, "MEDIA_CONTENT_ERROR_OUT_OF_MEMORY");                       break;
+               case MEDIA_CONTENT_ERROR_INVALID_OPERATION:             strcpy(pszErrorMsg, "MEDIA_CONTENT_ERROR_INVALID_OPERATION");           break;
+               case MEDIA_CONTENT_FILE_NO_SPACE_ON_DEVICE:             strcpy(pszErrorMsg, "MEDIA_CONTENT_FILE_NO_SPACE_ON_DEVICE");           break;
+               case MEDIA_CONTENT_ERROR_PERMISSION_DENIED:             strcpy(pszErrorMsg, "MEDIA_CONTENT_ERROR_PERMISSION_DENIED");           break;
+               case MEDIA_CONTENT_ERROR_DB_FAILED:                             strcpy(pszErrorMsg, "MEDIA_CONTENT_ERROR_DB_FAILED");                           break;
+               case MEDIA_CONTENT_ERROR_DB_BUSY:                               strcpy(pszErrorMsg, "MEDIA_CONTENT_ERROR_DB_BUSY");                                     break;
+               case MEDIA_CONTENT_ERROR_NETWORK:                               strcpy(pszErrorMsg, "MEDIA_CONTENT_ERROR_NETWORK");                                     break;
+               case MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT:   strcpy(pszErrorMsg, "MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT");         break;
+               default:                                                                                strcpy(pszErrorMsg, "UKNOWN ERROR");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)", API_NAMESPACE, pszApiName, pszErrorMsg, nResult);
+    SAFE_FREE(pszErrorMsg);
+}
+/**
+ * @function                           WifiDirectErrorInfo
+ * @description                        print the error information for Wifi direct.
+ * @parameter [IN]                     nResult, the error code
+ *                       [IN]                  pszApiName, API name
+ * @return                                     NA
+ *
+ */
+void WifiDirectErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrorMsg = NULL;
+    pszErrorMsg = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrorMsg == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case WIFI_DIRECT_ERROR_NONE:                                    strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_NONE");                                  break;
+               case WIFI_DIRECT_ERROR_NOT_PERMITTED:                   strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_NOT_PERMITTED");                 break;
+               case WIFI_DIRECT_ERROR_OUT_OF_MEMORY:                   strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_OUT_OF_MEMORY");                 break;
+               case WIFI_DIRECT_ERROR_PERMISSION_DENIED:               strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_PERMISSION_DENIED");             break;
+               case WIFI_DIRECT_ERROR_RESOURCE_BUSY:                   strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_RESOURCE_BUSY");                 break;
+               case WIFI_DIRECT_ERROR_INVALID_PARAMETER:               strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_INVALID_PARAMETER");             break;
+               case WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT:             strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_CONNECTION_TIME_OUT");   break;
+               case WIFI_DIRECT_ERROR_NOT_SUPPORTED:                   strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_NOT_SUPPORTED");                 break;
+               case WIFI_DIRECT_ERROR_NOT_INITIALIZED:                 strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_NOT_INITIALIZED");               break;
+               case WIFI_DIRECT_ERROR_COMMUNICATION_FAILED:    strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_COMMUNICATION_FAILED");  break;
+               case WIFI_DIRECT_ERROR_WIFI_USED:                               strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_WIFI_USED");                             break;
+               case WIFI_DIRECT_ERROR_MOBILE_AP_USED:                  strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_MOBILE_AP_USED");                break;
+               case WIFI_DIRECT_ERROR_CONNECTION_FAILED:               strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_CONNECTION_FAILED");             break;
+               case WIFI_DIRECT_ERROR_AUTH_FAILED:                             strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_AUTH_FAILED");                   break;
+               case WIFI_DIRECT_ERROR_OPERATION_FAILED:                strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_OPERATION_FAILED");              break;
+               case WIFI_DIRECT_ERROR_TOO_MANY_CLIENT:                 strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_TOO_MANY_CLIENT");               break;
+               case WIFI_DIRECT_ERROR_ALREADY_INITIALIZED:             strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_ALREADY_INITIALIZED");   break;
+               case WIFI_DIRECT_ERROR_CONNECTION_CANCELED:             strcpy(pszErrorMsg, "WIFI_DIRECT_ERROR_CONNECTION_CANCELED");   break;
+               default:                                                                                strcpy(pszErrorMsg, "UKNOWN ERROR");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)", API_NAMESPACE, pszApiName, pszErrorMsg, nResult);
+    SAFE_FREE(pszErrorMsg);
+}
+
+/**
+ * @function                           ShortcutPrintErrorCode
+ * @description                        print the error information for Shortcut.
+ * @parameter   [IN]           nResult, the error code
+ *                         [IN]                pszApiName, API name
+ * @return                                     NA
+ *
+ */
+void ShortcutPrintErrorCode(char *pszApi,int nResult)
+{
+       char* pszEnum = NULL;
+       pszEnum = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszEnum == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case SHORTCUT_ERROR_NONE:                                       strcpy(pszEnum, "SHORTCUT_ERROR_NONE");                                 break;
+               case SHORTCUT_ERROR_NO_SPACE:                           strcpy(pszEnum, "SHORTCUT_ERROR_NO_SPACE");                     break;
+               case SHORTCUT_ERROR_EXIST:                                      strcpy(pszEnum, "SHORTCUT_ERROR_EXIST");                                break;
+               case SHORTCUT_ERROR_FAULT:                                      strcpy(pszEnum, "SHORTCUT_ERROR_FAULT");                                break;
+               case SHORTCUT_ERROR_INVALID_PARAMETER:          strcpy(pszEnum, "SHORTCUT_ERROR_INVALID_PARAMETER");    break;
+               case SHORTCUT_ERROR_COMM:                                       strcpy(pszEnum, "SHORTCUT_ERROR_COMM");                                 break;
+               case SHORTCUT_ERROR_OUT_OF_MEMORY:                      strcpy(pszEnum, "SHORTCUT_ERROR_OUT_OF_MEMORY");                break;
+               case SHORTCUT_ERROR_IO_ERROR:                           strcpy(pszEnum, "SHORTCUT_ERROR_IO_ERROR");                             break;
+               case SHORTCUT_ERROR_PERMISSION_DENIED:          strcpy(pszEnum, "SHORTCUT_ERROR_PERMISSION_DENIED");    break;
+               default:                                                                        strcpy(pszEnum, "Unknown Error");
+       }
+
+       fprintf(fpLog, "[%s] %s failed, error returned = %s \n", API_NAMESPACE, pszApi, pszEnum);
+       SAFE_FREE(pszEnum);
+}
+/**
+ * @function                           NfcErrorInfo
+ * @description                        print the error information for NFC
+ * @parameter [IN]                     nResult, the error code
+ *                       [IN]                  pszApiName, API name
+ * @return                                     NA
+ *
+ */
+void NfcErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrLog = NULL;
+    pszErrLog = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrLog == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case NFC_ERROR_NONE:                                            strcpy(pszErrLog, "NFC_ERROR_NONE");                                    break;
+               case NFC_ERROR_OUT_OF_MEMORY:                           strcpy(pszErrLog, "NFC_ERROR_OUT_OF_MEMORY");                   break;
+               case NFC_ERROR_OPERATION_FAILED:                        strcpy(pszErrLog, "NFC_ERROR_OPERATION_FAILED");                break;
+               case NFC_ERROR_INVALID_PARAMETER:                       strcpy(pszErrLog, "NFC_ERROR_INVALID_PARAMETER");               break;
+               case NFC_ERROR_INVALID_NDEF_MESSAGE:            strcpy(pszErrLog,  "NFC_ERROR_INVALID_NDEF_MESSAGE");   break;
+               case NFC_ERROR_INVALID_RECORD_TYPE:                     strcpy(pszErrLog, "NFC_ERROR_INVALID_RECORD_TYPE");             break;
+               case NFC_ERROR_TIMED_OUT:                                       strcpy(pszErrLog, "NFC_ERROR_TIMED_OUT");                               break;
+               case NFC_ERROR_DEVICE_BUSY:                                     strcpy(pszErrLog, "NFC_ERROR_DEVICE_BUSY");                             break;
+               case NFC_ERROR_NO_DEVICE:                                       strcpy(pszErrLog,  "NFC_ERROR_NO_DEVICE");                              break;
+               case NFC_ERROR_NOT_ACTIVATED:                           strcpy(pszErrLog, "NFC_ERROR_NOT_ACTIVATED");                   break;
+               case NFC_ERROR_NOT_SUPPORTED:                           strcpy(pszErrLog, "NFC_ERROR_NOT_SUPPORTED");                   break;
+               case NFC_ERROR_ALREADY_ACTIVATED:                       strcpy(pszErrLog, "NFC_ERROR_ALREADY_ACTIVATED");               break;
+               case NFC_ERROR_ALREADY_DEACTIVATED:                     strcpy(pszErrLog,  "NFC_ERROR_ALREADY_DEACTIVATED");    break;
+               case NFC_ERROR_READ_ONLY_NDEF:                          strcpy(pszErrLog, "NFC_ERROR_READ_ONLY_NDEF");                  break;
+               case NFC_ERROR_NO_SPACE_ON_NDEF:                        strcpy(pszErrLog, "NFC_ERROR_NO_SPACE_ON_NDEF");                break;
+               case NFC_ERROR_NO_NDEF_MESSAGE:                         strcpy(pszErrLog, "NFC_ERROR_NO_NDEF_MESSAGE");                 break;
+               case NFC_ERROR_NOT_NDEF_FORMAT:                         strcpy(pszErrLog,  "NFC_ERROR_NOT_NDEF_FORMAT");                break;
+               case NFC_ERROR_SECURITY_RESTRICTED:                     strcpy(pszErrLog, "NFC_ERROR_SECURITY_RESTRICTED");             break;
+               case NFC_ERROR_ILLEGAL_STATE:                           strcpy(pszErrLog, "NFC_ERROR_ILLEGAL_STATE");                   break;
+               case NFC_ERROR_NOT_INITIALIZED:                         strcpy(pszErrLog, "NFC_ERROR_NOT_INITIALIZED");                 break;
+               case NFC_ERROR_TAG_NOT_SUPPORTED:                       strcpy(pszErrLog,  "NFC_ERROR_TAG_NOT_SUPPORTED");              break;
+               default:                                                                        strcpy(pszErrLog,  "UNKNOWN");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)", API_NAMESPACE, pszApiName, pszErrLog, nResult);
+    SAFE_FREE(pszErrLog);
+}
+
+
+/**
+ * @function                           TelServicePrintAPIErrorMSG
+ * @description                                Display the details error information
+ * @parameter  [IN]            pszApi  [the name of api for which error code is to be checked],
+ *                        [IN]                 nError  [the error code which has to be converted to string]
+ * @return                                     NA
+ *
+ */
+void TelServicePrintAPIErrorMSG(char *pszApi, int nError)
+{
+       char* pszException = NULL;
+       pszException = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszException == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed", API_NAMESPACE);
+               return;
+       }
+       switch ( nError )
+       {
+               case TELEPHONY_ERROR_NONE:                                              strcpy(pszException, "TELEPHONY_ERROR_NONE");                                   break;
+               case TELEPHONY_ERROR_OUT_OF_MEMORY:                     strcpy(pszException, "TELEPHONY_ERROR_OUT_OF_MEMORY");                  break;
+               case TELEPHONY_ERROR_INVALID_PARAMETER:         strcpy(pszException, "TELEPHONY_ERROR_INVALID_PARAMETER");              break;
+               case TELEPHONY_ERROR_PERMISSION_DENIED:         strcpy(pszException, "TELEPHONY_ERROR_PERMISSION_DENIED");              break;
+               case TELEPHONY_ERROR_OPERATION_FAILED:          strcpy(pszException, "TELEPHONY_ERROR_OPERATION_FAILED");               break;
+               case TELEPHONY_ERROR_SIM_NOT_AVAILABLE:                 strcpy(pszException, "TELEPHONY_ERROR_SIM_NOT_AVAILABLE");              break;
+               default:                                                                                strcpy(pszException, "Unknown_Error");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s  failed , error returned = %s.\n", API_NAMESPACE, pszApi,pszException);
+       SAFE_FREE(pszException);
+}
+
+/**
+ * @function                           ContactsPrintErrorCode
+ * @description                        Display the details error information
+ * @parameter  [IN]            nResult, api return value code
+ *                             [IN]            pszApi, api name
+ * @return                                     NA
+ * 
+ */
+void ContactsPrintErrorCode(char *pszApi,int nResult)
+{
+       char* pszErrInfo = NULL;
+       pszErrInfo = (char*)calloc(MEMLOG, MEMLOG * sizeof(char));
+       if ( pszErrInfo == NULL )
+       {
+               fprintf(fpLog, "[%s] Memory Allocation Failed", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case CONTACTS_ERROR_NONE:                               strcpy(pszErrInfo, "CONTACTS_ERROR_NONE");                                      break;
+               case CONTACTS_ERROR_OUT_OF_MEMORY:              strcpy(pszErrInfo, "CONTACTS_ERROR_OUT_OF_MEMORY");                     break;
+               case CONTACTS_ERROR_INVALID_PARAMETER:  strcpy(pszErrInfo, "CONTACTS_ERROR_INVALID_PARAMETER");         break;
+               case CONTACTS_ERROR_FILE_NO_SPACE:              strcpy(pszErrInfo, "CONTACTS_ERROR_FILE_NO_SPACE");                     break;
+               case CONTACTS_ERROR_NO_DATA:                    strcpy(pszErrInfo, "CONTACTS_ERROR_NO_DATA");                           break;
+               case CONTACTS_ERROR_PERMISSION_DENIED:  strcpy(pszErrInfo, "CONTACTS_ERROR_PERMISSION_DENIED");         break;
+               case CONTACTS_ERROR_DB_LOCKED:                  strcpy(pszErrInfo, "CONTACTS_ERROR_DB_LOCKED ");                        break;
+               case CONTACTS_ERROR_DB:                                 strcpy(pszErrInfo, "CONTACTS_ERROR_DB ");                                       break;
+               case CONTACTS_ERROR_IPC_NOT_AVALIABLE:  strcpy(pszErrInfo, "CONTACTS_ERROR_IPC_NOT_AVALIABLE");         break;
+               case CONTACTS_ERROR_IPC:                                strcpy(pszErrInfo, "CONTACTS_ERROR_IPC");                                       break;
+               case CONTACTS_ERROR_INTERNAL:                   strcpy(pszErrInfo, "CONTACTS_ERROR_INTERNAL");                          break;
+               default:                                                                strcpy(pszErrInfo, "Unknown_Error");
+       }
+       fprintf(fpLog, "\\n[%s] %s failed, error returned = %s.\n", API_NAMESPACE, pszApi, pszErrInfo); 
+       SAFE_FREE(pszErrInfo);
+}
+
+
+/**
+* @function                            MediaContentConnect
+* @description                                 Connects to the media content service.
+* @return                                      Return true if it connects to the media content service successfully otherwise false
+*/
+bool MediaContentConnect()
+{
+       int nRet = media_content_connect();
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               MediaContentErrorInfo("media_content_connect", nRet);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function                            MediaContentDisconnect
+* @description                                 Disconnects from the media content service.
+* @return                                      Return true if it disconnects from the media content service otherwise false
+*/
+bool MediaContentDisconnect()
+{
+       int nRet = media_content_disconnect();
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               MediaContentErrorInfo("media_content_disconnect", nRet);
+               return false;
+       }
+       return true;
+}
+
+/**
+ * @function                           TelServiceInitializeHandler
+ * @description                                Create a handler(TapiHandle) for telephonyservice
+ * @parameter                          NA
+ * @return                                     true if telephony service initialize successfully otherwise false
+ */
+bool TelServiceInitializeHandler()
+{
+       int nRet = telephony_init(&g_hTelephonyList);
+       if ( nRet != TELEPHONY_ERROR_NONE )
+       {
+               TelServicePrintAPIErrorMSG("telephony_init",nRet);
+               return false;
+       }
+       g_hTelephony = g_hTelephonyList.handle[0];
+       return true;
+}
+/**
+ * @function                           TelServiceDeInitializeHandler
+ * @description                                Deinitialize telephony handler
+ * @parameter                          NA
+ * @return                                     true if telephony service deinitialize successfully otherwise false
+ */
+
+bool TelServiceDeInitializeHandler()
+{
+       int nRet = telephony_deinit(&g_hTelephonyList);
+       if ( nRet != TELEPHONY_ERROR_NONE )
+       {
+               TelServicePrintAPIErrorMSG("telephony_deinit",nRet);
+               return false;
+       }
+       g_hTelephony = NULL;
+       return true;
+}
+
+/**
+ * @function                           PackageManagerDestroy
+ * @description                                Clean and destroy resources
+ * @parameter                          NA
+ * @return                                     true [if no error occurs] or false [if error occurs]
+ *
+ */
+bool PackageManagerDestroy()
+{
+       int nRet = package_manager_destroy(g_hPackageManager);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               PackageManagerErrorInfo("package_manager_destroy", nRet);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function                            ContactDisconnect
+* @description                                 Disconnects from the contacts service.
+* @return                                      Return true if Contact service is disconnected otherwise false 
+*/
+bool ContactDisconnect()
+{
+       int nRet = contacts_disconnect();
+       if ( nRet != CONTACTS_ERROR_NONE )
+       {
+               ContactsPrintErrorCode("contacts_disconnect", nRet);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function                            ContactRecordDestroy
+* @description                                 Destroys a record and releases its all resources. 
+* @return                                      Return true if it destroys a record and releases its all resources otherwise false 
+*/
+bool ContactRecordDestroy()
+{
+       int nRet = contacts_record_destroy(g_hContactRecord, true);
+       if ( nRet != CONTACTS_ERROR_NONE )
+       {
+               ContactsPrintErrorCode("contacts_record_destroy", nRet);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function                            ContactConnect
+* @description                                 Connects to the contacts service.
+* @return                                      Return true if it connects to the contacts service successfully otherwise false 
+*/
+bool ContactConnect()
+{
+       int nRet = contacts_connect();
+       if ( nRet != CONTACTS_ERROR_NONE )
+       {
+               ContactsPrintErrorCode("contacts_connect", nRet);
+               return false;
+       }
+
+       return true;
+}
+
+/**
+* @function                            ContactRecordCreate
+* @description                                 Creates a record. 
+* @return                                      Return true if it creates a record successfully otherwise false 
+*/
+bool ContactRecordCreate()
+{
+       g_hContactRecord = NULL;
+       int nRet = contacts_record_create(_contacts_contact._uri, &g_hContactRecord);
+       if ( nRet != CONTACTS_ERROR_NONE )
+       {
+               ContactsPrintErrorCode("contacts_record_create", nRet);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            PlatformPermissionGetStoragePath
+* @description                 Get the path to device storage directory for image or downloads
+* @parameter[IN]       char* pszFileName [file name]
+*                      [IN]    int nstorageId [Internal or external storage]
+*                      [IN]    storage_directory_e eDirectory [STORAGE_DIRECTORY_DOWNLOADS or STORAGE_DIRECTORY_IMAGES]
+* @return                      path or null if failed to get path
+*/
+char* PlatformPermissionGetStoragePath(int nstorageId, storage_directory_e eDirectory, char *pszFileName)
+{
+       char *pszPath = NULL, *pszImgPath = NULL;
+       
+       int nRet = storage_get_directory(nstorageId, eDirectory, &pszPath);
+       if ( nRet != STORAGE_ERROR_NONE )
+       {
+               fprintf (fpLog, "\\n[%s] storage_get_directory() is failed.", API_NAMESPACE);
+               return NULL;
+       }
+       if ( pszPath == NULL || strlen(pszPath) == 0 )
+       {
+               fprintf (fpLog, "\\n[%s] storage_get_directory() is failed invalid path.", API_NAMESPACE);
+               return NULL;
+       }
+       
+       pszImgPath = (char*) calloc(1, strlen(pszPath) + strlen(pszFileName)+1);
+       if ( pszImgPath != NULL )
+       {
+               sprintf(pszImgPath, "%s%s", pszPath, pszFileName );
+       }
+       return pszImgPath;
+}
+
+/**
+* @function            PlatformPermissionGetDataPath
+* @description                 Get the path to application data directory
+* @parameter[IN]       char* pszFileName [file name]
+* @return                      NA
+*/
+char* PlatformPermissionGetDataPath(char *pszFileName)
+{
+       char *pszAppData = app_get_data_path(),*pszImgPath = NULL;
+       if ( pszAppData == NULL || strlen(pszAppData) == 0 )
+       {
+               fprintf (fpLog, "\\n[%s] app_get_data_path() is failed invalid path.", API_NAMESPACE);
+               return pszImgPath;
+       }
+       pszImgPath = (char*) calloc(1, strlen(pszAppData) + strlen(pszFileName)+1);
+       if ( pszImgPath != NULL )
+       {
+               sprintf(pszImgPath, "%s%s",pszAppData, pszFileName );
+               fprintf (fpLog, "\\n[%s] app_get_data_path() is %s.", API_NAMESPACE,pszImgPath);
+       }
+       return pszImgPath;
+}
+
+/**
+* @function                                    PlatformGetFeatureValue
+* @description                                         Checks if particular feature is supported for the target or not
+* @parameter                                   char* pszFeature [Feature url]
+* @return                                              returns true if supported otherwise false
+*/
+bool PlatformGetFeatureValue(char* pszFeature)
+{
+       int nRet = SYSTEM_INFO_ERROR_IO_ERROR;
+       g_bIsSupported = false;
+       
+       nRet = system_info_get_platform_bool(pszFeature, &g_bIsSupported); 
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               PlatformSystemInfoErrorInfo("system_info_get_platform_bool", nRet);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function                                    PlatformSystemInfoErrorInfo
+* @description                                         print the error of sysinfo information
+* @parameter[IN]                               nResult, the error code
+*                      [IN]                            pszApiName, API name
+* @return                                              NA
+*/
+void PlatformSystemInfoErrorInfo(char *pszApiName, int nResult)
+{
+       char *pszErrLog = NULL;
+       pszErrLog = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( pszErrLog == NULL )
+       {
+               fprintf (fpLog, "\\n[%s] Memory Allocation Failed for pszErrLog", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            strcpy(pszErrLog, "SYSTEM_INFO_ERROR_NONE");                            break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       strcpy(pszErrLog, "SYSTEM_INFO_ERROR_INVALID_PARAMETER");       break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           strcpy(pszErrLog, "SYSTEM_INFO_ERROR_OUT_OF_MEMORY");           break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        strcpy(pszErrLog, "SYSTEM_INFO_ERROR_IO_ERROR");                        break;
+               default:                                                                        strcpy(pszErrLog, "Unknown error");     
+       }
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s (%d)\n", API_NAMESPACE, pszApiName, pszErrLog, nResult);
+       free(pszErrLog);
+       pszErrLog = NULL;
+}
+
+/**
+* @function                                    AppControlCreate
+* @description                                         Create App control and sets the default operation
+* @parameter                                   NA
+* @return                                              true or false
+*/
+bool AppControlCreate()
+{
+       int nRet = app_control_create(&g_hAppControl);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               AppControlErrorInfo("app_control_create", nRet);
+               return false;
+       }
+       
+       nRet = app_control_set_operation(g_hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               AppControlErrorInfo("app_control_set_operation", nRet);
+               AppControlDestroy();
+               return false;
+       }
+       
+       return true;
+}
+
+/**
+* @function                            AppControlDestroy
+* @description                                 Destroys the app_control handle
+* @return                                      Return true if handler is destroyed succesfully else false
+*/
+bool AppControlDestroy()
+{
+       int nRet = app_control_destroy (g_hAppControl);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               AppControlErrorInfo("app_control_destroy", nRet);
+               return false;
+       }
+       return true;
+}
+
+/** @} */ //end of ctc-platform-permission
diff --git a/src/ctc/platform-permission/platform-permission-common.h b/src/ctc/platform-permission/platform-permission-common.h
new file mode 100755 (executable)
index 0000000..0175874
--- /dev/null
@@ -0,0 +1,196 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _PLATFORM_PERMISSION_COMMON_H_
+#define _PLATFORM_PERMISSION_COMMON_H_
+
+//Add test package related includes here
+#include "assert.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <system_info.h>
+#include <runtime_info.h>
+#include <sys/stat.h>
+#include <locations.h>
+#include <bluetooth.h>
+#include <net_connection.h>
+#include <wifi.h>
+#include <device/power.h>
+#include <device/haptic.h>
+#include <device/display.h>
+#include <device/callback.h> 
+#include <recorder.h>
+#include <camera.h>
+#include <package_manager.h>
+#include <messages.h>
+#include <msg.h>
+#include <push-service.h>
+#include <contacts.h>
+#include <sound_manager.h>
+#include <system_settings.h>
+#include <notification.h>
+#include <app_manager.h>
+#include <media_content.h>
+#include <telephony.h>
+#include <download.h>
+#include <app.h>
+#include <ckmc/ckmc-manager.h>
+#include <player.h>
+#include <sensor.h>
+#include <device/led.h> 
+#include <data_control.h>
+#include <message_port.h>
+#include <audio_io.h>
+#include <wav_player.h>
+#include <badge.h>
+#include <shortcut_manager.h>
+#include <app_alarm.h>
+#include "app.h"
+#include <storage.h>
+#include <wifi-direct.h>
+#include <nfc.h>
+
+/** @addtogroup ctc-platform-permission
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                                  "PLATFORM_PERMISSION_CTC"
+#define PACKAGE_NAME                                   "org.tizen.testapplication"
+#define NAME_CER                                               "PASSWORD"
+#define PASSWORD_CER                                   "12345"
+#define MEMLOG                                                 20
+#define MAX_BLOCK_SIZE                                 25
+#define CONF_FIELD_LENGTH                              200
+#define SOUND_MANAGER_VOLUME_LEVEL             8
+#define SAFE_FREE(src)                                 { if(src) {free(src); src = NULL;}}
+#define TIME_DELAY                                             5
+#define INTERNAL_STORAGE                               1
+#define EXTERNAL_STORAGE                               0
+#define MEDIA_IMAGE_PATH                               1
+#define FILE_NAME                                              "/PlatformPermission_test.jpg"
+#define BADGE_PACKAGE                                  (PlatformPermissionGetDataPath("native-platform-permission-ctc-0.1-0.armv7l.rpm"))
+#define MEDIA_FILE_PATH                                        "/tmp/ITC_Config.txt"
+#define APPID                                                  "7c58a4ac98388bba"
+#define CAMERA_WAIT_TIME                                       5
+#define CAMERA_WAIT_GLOOP                                      3
+#define PROVIDERID                                             "http://tizen.org/datacontrol/provider/datacontrolprovider"
+
+#define FEATURE_AUDIO_MICROPHONE               "http://tizen.org/feature/microphone"
+#define FEATURE_AUDIO_CAMERA                   "http://tizen.org/feature/camera"       
+#define FEATURE_CAMERA_BACK                            "http://tizen.org/feature/camera.back"
+#define FEATURE_CAMERA_FRONT                   "http://tizen.org/feature/camera.front"
+#define FEATURE_NETWORK_WIFI                   "http://tizen.org/feature/network.wifi"
+#define FEATURE_NETWORK_TELEPHONY              "http://tizen.org/feature/network.telephony"
+#define FEATURE_BLUETOOTH                              "http://tizen.org/feature/network.bluetooth"
+#define FEATURE_WIFIDIRECT                             "http://tizen.org/feature/network.wifi.direct"
+#define FEATURE_NFC                                            "http://tizen.org/feature/network.nfc"
+#define FEATURE_LOCATION                               "http://tizen.org/feature/location"
+#define FEATURE_DISPLAY                                        "http://tizen.org/feature/camera.back.flash"
+#define FEATURE_WIFI                                   "http://tizen.org/feature/network.wifi"
+#define FEATURE_TELEPHONY                              "http://tizen.org/feature/network.telephony"
+#define FEATURE_PUSH                                   "http://tizen.org/feature/network.push"
+
+FILE *fpLog;
+
+/************************************************Start Global variable declaration **********************************/
+
+enum async_state
+{
+       CAMERA_ASYNC_READY,
+       CAMERA_ASYNC_DONE
+};
+int g_nDownloadId;
+bool g_bIsSupported;
+
+messages_service_h g_hMessagesService;
+contacts_record_h g_hContactRecord;
+messages_message_h g_hMessage;
+telephony_h g_hTelephony;
+telephony_handle_list_s g_hTelephonyList;
+camera_h       g_hCamera;
+connection_h g_hConnection;
+package_manager_h g_hPackageManager;
+package_info_h g_hPackageInfo;
+app_control_h g_hAppControl;
+
+bool g_bIsSetAFModePassed;
+recorder_h g_hRecorder;
+
+GMainLoop *g_pMainLoop;
+bool g_bLibStorageCallbackHit;
+bool g_bLibStorageCallbackResultValid;
+gboolean TimeoutFunction(gpointer data);
+int g_nLibInternalStorageId;
+int g_nLibExternalStorageId;
+bool g_bLibStorageIsInternal;
+bool g_bLibStorageIsExternal;
+/************************************************End Global variable declaration ************************************/
+
+void BadgePrintErrorCode(char *pszApi,int nResult);
+void ShortcutPrintErrorCode(char *pszApi,int nResult);
+void RecorderPrintErrorMsg(char *pszApiName, int nRet);
+void SoundManagerErrorInfo(char *pszApi,int nResult);
+void LocationsErrorInfo(char *pszApiName, int nResult);
+void BluetoothErrorInfo(char *pszApiName, int nResult);
+void TelServicePrintAPIErrorMSG(char *pszApi, int nError);
+void AppControlErrorInfo(char *pszApiName, int nResult);
+void DeviceErrorInfo(char *pszApi,int nResult);
+void WifiErrorInfo(char *pszApi,int nResult);
+void PushServiceErrorInfo(char *pszAPI, int nRet);
+void MessagesErrorInfo(char *pszApiName, int nResult);
+void NotificationPrintAPIErrorMSG(char *pszAPI, int nRet);
+void PackageManagerErrorInfo(char *pszApiName, int nResult);
+void AlarmErrorInfo(char *pszApiName, int nResult);
+void DownloadErrorInfo(char *pszApi, int nResult);
+void CameraPrintErrorMsg(char *pszApiName, int nRet);
+void NetworkConnectionPrintErrorMsg(char *pszApiName, int nRet);
+void CkmcErrorInfo(char *pszApiName, int nResult);
+void ContactsPrintErrorCode(char *pszApi,int nResult);
+void SystemSettingsErrorInfo(char *pszApiName, int nResult);
+void MediaContentErrorInfo(char *pszApiName, int nResult);
+void DataControlErrorInfo(char *pszApi,int nResult);
+void WifiDirectErrorInfo(char *pszApiName, int nResult);
+void NfcErrorInfo(char *pszApiName, int nResult);
+//////////////////////////////////////////
+
+
+bool BluetoothStateIsEqual(bt_adapter_state_e eAdapterState);
+bool TelServiceInitializeHandler();
+bool TelServiceDeInitializeHandler();
+bool ContactRecordDestroy();
+bool ContactDisconnect();
+bool ContactRecordCreate();
+bool ContactConnect();
+bool AppControlCreate();
+bool AppControlDestroy();
+bool MediaContentConnect();
+bool MediaContentDisconnect();
+bool CreateMessage(messages_message_type_e eType);
+bool DestroyMessage();
+bool MessagesOpenService();
+bool MessagesCloseService();
+bool PackageManagerDestroy();
+char* PlatformPermissionGetStoragePath(int nstorageId, storage_directory_e eDirectory, char *pszFileName);
+char* PlatformPermissionGetDataPath(char *pszFileName);
+bool PlatformGetFeatureValue(char* pszFeature);
+void PlatformSystemInfoErrorInfo(char *pszApiName, int nResult);
+bool get_storage_id_callback();
+
+/** @} */ //end of ctc-platform-permission
+#endif  //_PLATFORM_PERMISSION_COMMON_H_
diff --git a/src/ctc/platform-permission/platform-permission.c b/src/ctc/platform-permission/platform-permission.c
new file mode 100755 (executable)
index 0000000..0c49962
--- /dev/null
@@ -0,0 +1,1700 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "platform-permission-common.h"
+
+/** @addtogroup ctc-platform-permission
+* @ingroup             ctc
+* @{
+*/
+
+//& set: PlatformPermission
+
+static const char* CERT_SIG = "-----BEGIN CERTIFICATE-----\n"
+       "MIIEgDCCA2igAwIBAgIIcjtBYJGQtOAwDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE\n"
+       "BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl\n"
+       "cm5ldCBBdXRob3JpdHkgRzIwHhcNMTQwNTIyMTEyOTQyWhcNMTQwODIwMDAwMDAw\n"
+       "WjBtMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN\n"
+       "TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEcMBoGA1UEAwwTYWNj\n"
+       "b3VudHMuZ29vZ2xlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\n"
+       "ALtlLWVWPN3q3bSEQl1Z97gPdgl5vbgJOZSAr0ZY0tJCuFLBbUKetJWryyE+5KpG\n"
+       "gMMpLS4v8/bvXaZc6mAs+RfAqGM24C3vQg5hPnj4dflnhL0WiOCZBurm1tV4oexk\n"
+       "HLXs3jr/jpnb738AQpj8zZ9a4VEBuHJRZALnWZ/XhqU+dvYomAoRQNuL5OhkT7uu\n"
+       "d0NKJL9JjYLyQglGgE2sVsWv2kj7EO/P9Q6NEKt9BGmhMsFvtfeKUaymynaxpR1g\n"
+       "wEPlqYvB38goh1dIOgVLT0OVyLImeg5Mdwar/8c1U0OYhLOc6PJapOZAfUkE+3+w\n"
+       "xYt8AChLN1b5szOwInrCVpECAwEAAaOCAUYwggFCMB0GA1UdJQQWMBQGCCsGAQUF\n"
+       "BwMBBggrBgEFBQcDAjAeBgNVHREEFzAVghNhY2NvdW50cy5nb29nbGUuY29tMGgG\n"
+       "CCsGAQUFBwEBBFwwWjArBggrBgEFBQcwAoYfaHR0cDovL3BraS5nb29nbGUuY29t\n"
+       "L0dJQUcyLmNydDArBggrBgEFBQcwAYYfaHR0cDovL2NsaWVudHMxLmdvb2dsZS5j\n"
+       "b20vb2NzcDAdBgNVHQ4EFgQU0/UtToEtNIfwDwHuYGuVKcj0xK8wDAYDVR0TAQH/\n"
+       "BAIwADAfBgNVHSMEGDAWgBRK3QYWG7z2aLV29YG2u2IaulqBLzAXBgNVHSAEEDAO\n"
+       "MAwGCisGAQQB1nkCBQEwMAYDVR0fBCkwJzAloCOgIYYfaHR0cDovL3BraS5nb29n\n"
+       "bGUuY29tL0dJQUcyLmNybDANBgkqhkiG9w0BAQUFAAOCAQEAcGNI/X9f0g+7ij0o\n"
+       "ehLpk6vxSMQGrmOZ4+PG/MC9SLClCkt7zJkfU7erZnyVXyxCpwlljq+Wk9YTPUOq\n"
+       "xD/V2ikQVSAANoxGJFO9UoL5jzWusPhKKv8CcM7fuiERz8K+CfBcqfxbgI5rH0g5\n"
+       "dYclmLC81cJ/08i+9Nltvxv69Y3hGfEICT6K+EdSxwnQzOhpMZmvxZsIj+d6CVNa\n"
+       "9ICYgUthsNQVWzrIs5wknpjjZ9liDMwJX0vu8A0rce4X/Lna5hh2bW9igz2iP5WM\n"
+       "9fuwdbTw4y3jfPQgszU4YZxWxhMzccxe058Qx1tLndAknBQEBesQjXytVQpuM1SV\n"
+       "rHva8A==\n"
+       "-----END CERTIFICATE-----\n";
+
+/**
+ * @function           CTs_platform_permission_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void CTs_platform_permission_startup(void)
+{
+       fpLog = NULL;
+       fpLog = fopen(ERR_LOG, "w");
+       return;
+}
+
+/**
+ * @function           CTs_platform_permission_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void CTs_platform_permission_cleanup(void)
+{
+       fclose(fpLog);
+       fpLog = NULL;
+       return;
+}
+
+/**
+ * @function                           MediaContent_media_scan_completed_cb
+ * @description                        Called when the media scanning is finished.
+ * @parameter                          eError The Error code of API, pUserData The user data passed from the callback
+ * @return                                     NA
+ */
+
+static void MediaContent_media_scan_completed_cb(media_content_error_e eError, void *pUserData)
+{
+       fprintf(fpLog, "\\n[%s] Process when media scanning is finishes ", API_NAMESPACE);
+}
+/**
+ * @function                           App_control_reply_cb
+ * @description                        Called when the reply of the launch request is delivered.
+ * @parameter                          hRequest        The app_control handle of the launch request that has been sent\n
+                                                       hReply          The app_control handle in which the results of the callee are contained\n
+                                                       eResult         The result code of the launch request\n
+ *                                                     pUserData       The user data passed
+ * @return                                     NA
+ */
+static void App_control_reply_cb(app_control_h hRequest, app_control_h hReply, app_control_result_e eResult, void *pUserData)
+{
+       fprintf(fpLog, "\\n[%s] Called when the reply of the launch request is delivered. ", API_NAMESPACE);
+}
+
+/**
+* @function                            Push_service_notify_cb
+* @description                                 Called to handle a notification.
+* @parameter                           hNoti           A handle of the notification\n
+                                                       pUserData       User data passed to this callback
+* @return                                      NA
+*/
+static void Push_service_notify_cb(push_service_notification_h hNoti, void *pUserData)
+{
+       fprintf(fpLog, "\\n [%s]Called to handle a notification. ", API_NAMESPACE);
+}
+
+/**
+* @function                            Push_service_state_cb
+* @description                                 Called when the registration state is refreshed.
+* @parameter                           eState          Registration state\n
+                                                       pszErr          Error message\n
+                                                       pUserData       User data passed to this callback
+* @return                                      NA
+*/
+static void Push_service_state_cb(push_service_state_e eState, const char *pszErr, void *pUserData)
+{
+       fprintf(fpLog, "\\n [%s]Called when the registration state is refreshed. . ", API_NAMESPACE);
+}
+
+/**
+* @function                            Shortcut_response_cb
+* @description                                 Called to receive the result of shortcut_add_to_home().
+* @parameter                           nRet    Result value, it could be 0 if succeed to add a shortcut, or errno\n
+*                                                      pUserData       Callback data
+* @precondition                                NA
+* @return                                      Result value
+*/
+static int Shortcut_response_cb(int nRet, void *pUserData)
+{
+       return nRet;
+}
+
+/**
+* @function            TimeoutFunction
+* @description         time out function for gmain loop quit
+* @parameter           data : gpointer
+* @return                      gboolean
+*/
+gboolean TimeoutFunction(gpointer data)
+{
+       g_main_loop_quit((GMainLoop *)data);
+       return false;
+}
+
+/**
+* @function                    storage_device_supported_cb_p
+* @description         callback function to retrieves all storage in device
+* @parameter           int storage_id - storage device id\n
+*                                      storage_type_e type - storage type\n
+*                                      storage_state_e - storage device state\n
+*                                      void *user_data - user data
+* @return                      NA
+*/
+bool storage_device_supported_cb_p(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+       g_bLibStorageCallbackHit = true;
+
+       if ( (type == STORAGE_TYPE_INTERNAL || type == STORAGE_TYPE_EXTERNAL) &&
+               (state == STORAGE_STATE_UNMOUNTABLE || state == STORAGE_STATE_REMOVED || state == STORAGE_STATE_MOUNTED
+                       || state ==STORAGE_STATE_MOUNTED_READ_ONLY) )
+                       g_bLibStorageCallbackResultValid = true;
+
+       fprintf(fpLog, "\\n [%s]storage_device_supported_callback callback hit. ", API_NAMESPACE);
+
+       if ( type == STORAGE_TYPE_INTERNAL )
+       {
+               g_bLibStorageIsInternal = true;
+               g_nLibInternalStorageId = storage_id;
+       }
+
+       if ( type == STORAGE_TYPE_EXTERNAL )
+       {
+               g_bLibStorageIsExternal = true;
+               g_nLibExternalStorageId = storage_id;
+       }
+
+       if ( g_bLibStorageIsInternal && g_bLibStorageIsExternal )
+       {
+               if ( g_pMainLoop )
+               {
+                       g_main_loop_quit(g_pMainLoop);
+               }
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function                    get_storage_id_callback
+* @description         make a call to callback function to retrieves all storage in device
+* @parameter           NA
+* @return                      bool
+*/
+bool get_storage_id_callback()
+{
+       g_bLibStorageCallbackHit = false;
+       g_bLibStorageCallbackResultValid = false;
+       g_bLibStorageIsInternal = false;
+       g_bLibStorageIsExternal = false;
+       void *pvUserData = "User data";
+
+       storage_error_e nRet = storage_foreach_device_supported(storage_device_supported_cb_p, pvUserData);
+       if ( nRet != STORAGE_ERROR_NONE )
+       {
+               fprintf(fpLog, "\\n [%s]Failed to get storage_foreach_device_supported ", API_NAMESPACE);
+               return false;
+       }
+
+       g_pMainLoop = g_main_loop_new(NULL, false);
+       int nTimeoutId = g_timeout_add(10000, TimeoutFunction, g_pMainLoop);
+       g_main_loop_run(g_pMainLoop);
+       g_source_remove(nTimeoutId);
+       if ( g_bLibStorageCallbackHit == false )
+       {
+               fprintf(fpLog, "\\n [%s]storage_device_supported_callback callback has not been invoked ", API_NAMESPACE);
+               return false;
+       }
+       else if ( g_bLibStorageCallbackResultValid == false )
+       {
+               fprintf(fpLog, "\\n [%s]storage_device_supported_callback callback having invalid values ", API_NAMESPACE);
+               return false;
+       }
+       if ( g_bLibStorageIsInternal == false )
+       {
+               fprintf(fpLog, "\\n [%s]storage_device_supported_callback allback could not find any internal storage id ", API_NAMESPACE);
+               return false;
+       }
+       if ( g_bLibStorageIsExternal == false )
+       {
+               fprintf(fpLog, "\\n [%s]storage_device_supported_callback callback could not find any external storage id ", API_NAMESPACE);
+               return false;
+       }
+
+       return true;
+}
+
+/** @addtogroup        ctc-platform-permission-testcases
+* @brief               Integration testcases for module platform-permission
+* @ingroup             ctc-platform-permission
+* @{
+*/
+
+//& purpose:Checking tizen.org/privilege/recorder privilege
+//& type: auto
+/**
+ * @testcase                           CTc_Recorder_PrivilegeAudioRecorder
+ * @type                                       Negative
+ * @scenario                           Creates a recorder handle to record an audio\n
+ *                                                     Destroys the recorder handle
+ * @apicovered                         recorder_create_audiorecorder and recorder_destroy
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Recorder_PrivilegeAudioRecorder(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Recorder_PrivilegeAudioRecorder.\n", API_NAMESPACE);
+       int nRet = RECORDER_ERROR_NONE;
+       g_hRecorder = NULL;
+
+       nRet = system_info_get_platform_bool(FEATURE_AUDIO_MICROPHONE, &g_bIsSupported);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               nRet = system_info_get_platform_bool(FEATURE_AUDIO_CAMERA, &g_bIsSupported);
+               if ( nRet != SYSTEM_INFO_ERROR_NONE )
+               {
+                       PlatformSystemInfoErrorInfo("system_info_get_platform_bool", nRet);
+                       return 1;
+               }
+               if ( false == g_bIsSupported )
+               {
+                       fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_AUDIO_CAMERA);
+                       return 0;
+               }
+       }
+       if ( false == g_bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_AUDIO_MICROPHONE);
+               return 0;
+       }
+
+       nRet = recorder_create_audiorecorder(&g_hRecorder);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               RecorderPrintErrorMsg("recorder_create_audiorecorder",nRet);
+
+               if ( g_hRecorder != NULL )
+               {
+                       nRet = recorder_destroy(g_hRecorder);
+                       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+                       {
+                               RecorderPrintErrorMsg("recorder_destroy", nRet);
+                       }
+               }
+               return 1;
+       }
+
+       return 0;
+}
+
+
+//& purpose:Checking tizen.org/privilege/volume.set privilege
+//& type: auto
+/**
+ * @testcase                           CTc_SoundManager_PrivilegeVolumeSet
+ * @type                                       Negative
+ * @scenario                           Gets the volume level specified for a particular sound type\n
+ *                                                     Sets the volume level specified for a particular sound type
+ * @apicovered                         sound_manager_get_volume and sound_manager_set_volume
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_SoundManager_PrivilegeVolumeSet(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_SoundManager_PrivilegeVolumeSet.\n", API_NAMESPACE);
+
+       int nRet = SOUND_MANAGER_ERROR_NONE;
+       int nVolumeLevel = SOUND_MANAGER_VOLUME_LEVEL;
+
+       nRet = sound_manager_get_volume(SOUND_TYPE_MEDIA, &nVolumeLevel);
+       if ( nRet != SOUND_MANAGER_ERROR_NONE )
+       {
+               SoundManagerErrorInfo("sound_manager_get_volume", nRet);
+       }
+
+       nRet = sound_manager_set_volume(SOUND_TYPE_MEDIA, nVolumeLevel);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               SoundManagerErrorInfo("sound_manager_set_volume",nRet);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: check privilege http://tizen.org/privilege/datasharing
+//& type: auto
+/**
+ * @testcase                           CTc_DataControl_PrivilegeDataControlConsumer
+ * @type                                       Negative
+ * @scenario                           Creates a provider handle\n
+ *                                                     Sets the Provider ID\n
+ *                                                     Sets the Data ID\n
+ *                                                     Adds the value associated with the specified key to the key-values map owned by the key-value structured data control provider\n
+ *                                                     Removes the value associated with the specified key from the key-values map owned by the key-value structured data control provider\n
+ *                                                     Destroys the provider handle and releases all its resources
+ * @apicovered                         data_control_map_create, data_control_map_set_provider_id, data_control_map_set_data_id, data_control_map_add, data_control_map_remove and data_control_map_destroy
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition apis does not return error none value
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                             NA
+ */
+
+int CTc_DataControl_PrivilegeDataControlConsumer(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing testcase - CTc_DataControl_PrivilegeDataControlConsumer.\n", API_NAMESPACE);
+
+       char *pszDataId = "table";
+       int nRet = DATA_CONTROL_ERROR_NONE;
+       int nRequestId = -1;
+       data_control_h hDataControl = NULL;
+       const char *pszKey = "WORD";
+       const char *pszValue = "'TestValue'";
+
+       nRet = data_control_map_create(&hDataControl);
+       if ( nRet != DATA_CONTROL_ERROR_NONE )
+       {
+               DataControlErrorInfo("data_control_map_create", nRet);
+               return 1;
+       }
+
+       nRet = data_control_map_set_provider_id (hDataControl, PROVIDERID);
+       if ( nRet != DATA_CONTROL_ERROR_NONE )
+       {
+               DataControlErrorInfo("data_control_map_set_provider_id", nRet);
+               data_control_map_destroy(hDataControl);
+               return 1;
+       }
+
+       nRet = data_control_map_set_data_id (hDataControl, pszDataId);
+       if ( nRet != DATA_CONTROL_ERROR_NONE )
+       {
+               DataControlErrorInfo("data_control_map_set_data_id", nRet);
+               data_control_map_destroy(hDataControl);
+               return 1;
+       }
+
+       nRet = data_control_map_add(hDataControl, pszKey, pszValue, &nRequestId);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               DataControlErrorInfo("data_control_map_add", nRet);
+               data_control_map_destroy(hDataControl);
+               return 1;
+       }
+
+       nRet = data_control_map_remove(hDataControl, pszKey, pszValue, &nRequestId);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               DataControlErrorInfo("data_control_map_remove", nRet);
+               data_control_map_destroy(hDataControl);
+               return 1;
+       }
+
+       nRet = data_control_map_destroy(hDataControl);
+       if ( nRet != DATA_CONTROL_ERROR_NONE )
+       {
+               DataControlErrorInfo("data_control_map_destroy", nRet);
+       }
+
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/camera privilege
+//& type: auto
+/**
+* @testcase                    CTc_Camera_PrivilegeCamera
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates a new camera handle for controlling a camera\n
+*                                      Destroy camera handle
+* @apicovered          camera_create and camera_destroy
+* @passcase                    If target privileged Apis return TIZEN_ERROR_PERMISSION_DENIED
+* @failcase                    If target privileged Apis do not return TIZEN_ERROR_PERMISSION_DENIED
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_Camera_PrivilegeCamera(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Camera_PrivilegeCamera.\n", API_NAMESPACE);
+
+       g_hCamera = NULL;
+       int nRet = CAMERA_ERROR_NONE;
+       nRet = system_info_get_platform_bool(FEATURE_CAMERA_FRONT, &g_bIsSupported);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               nRet = system_info_get_platform_bool(FEATURE_CAMERA_BACK, &g_bIsSupported);
+               if ( nRet != SYSTEM_INFO_ERROR_NONE )
+               {
+                       PlatformSystemInfoErrorInfo("system_info_get_platform_bool", nRet);
+                       return 1;
+               }
+               if ( false == g_bIsSupported )
+               {
+                       fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_CAMERA_BACK);
+                       return 0;
+               }
+       }
+       if ( false == g_bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_CAMERA_FRONT);
+               return 0;
+       }
+
+       nRet = camera_create(CAMERA_DEVICE_CAMERA0, &g_hCamera);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               CameraPrintErrorMsg("camera_create", nRet);
+               if ( g_hCamera != NULL )
+               {
+                       nRet = camera_destroy(g_hCamera);
+                       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+                       {
+                               CameraPrintErrorMsg("camera_destroy", nRet);
+                       }
+               }
+               return 1;
+       }
+
+       return 0;
+}
+
+
+//& purpose: Checking tizen.org/privilege/network.get privilege
+//& type: auto
+/**
+* @testcase                    CTc_Wifi_PrivilegeNetworkGet
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Initializes Wi-Fi\n
+*                                      Deinitializes Wi-Fi
+* @apicovered          wifi_initialize and wifi_deinitialize
+* @passcase                    If target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
+* @failcase                    If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_Device_PrivilegeDisplay(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Device_PrivilegeDisplay", API_NAMESPACE);
+       int nRet = DEVICE_ERROR_NONE, nDevice = 0;
+
+       nRet = device_display_get_numbers(&nDevice);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               DeviceErrorInfo("device_display_get_numbers", nRet);
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/display privilege
+//& type: auto
+/**
+* @testcase                    CTc_Device_PrivilegeDisplay
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Gets the number of display devices
+* @apicovered          device_display_get_numbers
+* @passcase                    If target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
+* @failcase                    If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_Device_PrivilegePower(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Device_PrivilegePower", API_NAMESPACE);
+       int nRet = DEVICE_ERROR_NONE;
+
+       nRet = device_power_wakeup(true);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               DeviceErrorInfo("device_power_wakeup", nRet);
+               return 1;
+       }
+
+       nRet = device_power_wakeup(false);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               DeviceErrorInfo("device_power_wakeup", nRet);
+               return 1;
+       }
+       return 0;
+}
+
+
+//& purpose: Checking tizen.org/privilege/message.read privilege
+//& type: auto
+/**
+ * @testcase                           CTc_Messaging_PrivilegeMessageRead
+ * @type                                       Negative
+ * @scenario                           Opens a handle for a messaging service\n
+ *                                                     Closes a handle for a messaging service
+ * @apicovered                         messages_open_service and messages_close_service
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Messaging_PrivilegeMessageRead(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Messaging_PrivilegeMessageRead\n", API_NAMESPACE);
+       g_hMessagesService = NULL;
+       int nRet = MESSAGES_ERROR_NONE;
+
+       if ( false == PlatformGetFeatureValue(FEATURE_NETWORK_TELEPHONY) )
+       {
+               return 1;
+       }
+       if ( false == g_bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_NETWORK_TELEPHONY);
+               return 0;
+       }
+
+       nRet = messages_open_service(&g_hMessagesService);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               MessagesErrorInfo("messages_open_service", nRet);
+
+               if ( g_hMessagesService != NULL )
+               {
+                       nRet = messages_close_service(g_hMessagesService);
+                       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+                       {
+                               MessagesErrorInfo("messages_close_service", nRet);
+                       }
+               }
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/packagemanager.info privilege
+//& type: auto
+/**
+ * @testcase                           CTc_PackageInfo_PrivilegePackagemanagerInfo
+ * @type                                       Negative
+ * @scenario                           Creates a package manager handle\n
+ *                                                     Gets the package_id for the given app_id\n
+ *                                                     Gets the package information for the given package\n
+ *                                                     Destroys the package manager handle
+ * @apicovered                         package_manager_create, package_manager_get_package_id_by_app_id, package_manager_get_package_info, package_info_destroy and package_manager_destroy
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       The system package should be installed of app id: "org.tizen.helloworld"
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_PackageInfo_PrivilegePackagemanagerInfo(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_PackageInfo_PrivilegePackagemanagerInfo\n", API_NAMESPACE);
+       int nRet = PACKAGE_MANAGER_ERROR_NONE;
+       char *pszPkgId = NULL;
+       package_info_h hPackageInfo = NULL;
+       g_hPackageManager = NULL;
+
+       nRet = package_manager_create(&g_hPackageManager);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               PackageManagerErrorInfo("package_manager_create", nRet);
+               if ( g_hPackageManager != NULL )
+               {
+                       PackageManagerDestroy();
+               }
+               return 1;
+       }
+
+       nRet = package_manager_get_package_id_by_app_id (PACKAGE_NAME, &pszPkgId);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               PackageManagerErrorInfo("package_manager_get_package_id_by_app_id", nRet);
+               return 1;
+       }
+
+       nRet = package_manager_get_package_info(pszPkgId, &hPackageInfo);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               PackageManagerErrorInfo("package_manager_get_package_info", nRet);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: Checks tizen.org/privilege/telephony
+//&type: auto
+/**
+ * @testcase                           CTc_Telephony_PrivilegeTelephony
+ * @type                                       Negative
+ * @scenario                           Acquire the list of available handles to use telephony API\n
+ *                                                     Checks the device whether the SIM card is available or not\n
+ *                                                     Gets the IMEI (International Mobile Station Equipment Identity) of a mobile phone\n
+ *                                                     Deinitialize telephony handle list
+ * @apicovered                         telephony_init, telephony_sim_get_state, telephony_modem_get_imei, telephony_deinit.
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       SIM card must available in device.
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Telephony_PrivilegeTelephony(void)
+{
+       fprintf(fpLog, "\\n[%s]Executing TestCase CTc_Telephony_PrivilegeTelephony.\n", API_NAMESPACE);
+       int nRet = TELEPHONY_ERROR_NONE;
+       char* pszImei = NULL;
+       telephony_sim_state_e eSimState = TELEPHONY_SIM_STATE_UNKNOWN;
+
+       if ( false == PlatformGetFeatureValue(FEATURE_NETWORK_TELEPHONY) )
+       {
+               return 1;
+       }
+       if ( false == g_bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_NETWORK_TELEPHONY);
+               return 0;
+       }
+
+       if ( false == TelServiceInitializeHandler())
+       {
+               return 1;
+       }
+
+       nRet = telephony_sim_get_state(g_hTelephony, &eSimState);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               TelServicePrintAPIErrorMSG("telephony_sim_get_state",nRet);
+               TelServiceDeInitializeHandler();
+               return 1;
+       }
+
+       nRet = telephony_modem_get_imei(g_hTelephony, &pszImei);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               TelServicePrintAPIErrorMSG("telephony_modem_get_imei", nRet);
+               TelServiceDeInitializeHandler();
+               return 1;
+       }
+       TelServiceDeInitializeHandler();
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/download privilege
+//& type: manual
+
+/**
+ * @testcase                           CTc_Download_PrivilegeDownload
+ * @type                                       Negative
+ * @scenario                           Creates a new download request and return its download id\n
+ *                                                     Destroy all data concerning a download id from memory
+ * @apicovered                         download_create and download_destroy
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Download_PrivilegeDownload(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Download_PrivilegeDownload\n", API_NAMESPACE);
+       int nRet = DOWNLOAD_ERROR_INVALID_PARAMETER;
+       g_nDownloadId = 0;
+
+       nRet = download_create(&g_nDownloadId);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               DownloadErrorInfo("download_create", nRet);
+               if (g_nDownloadId)
+               {
+                       nRet = download_destroy(g_nDownloadId);
+                       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+                       {
+                               DownloadErrorInfo("download_destroy", nRet);
+                       }
+               }
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/contact.write privilege
+//& type: auto
+/**
+* @testcase                    CTc_Contacts_PrivilegeContactWrite
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Connects to the contacts service\n
+*                                      Creates a record\n
+*                                      Sets the contacts name display order\n
+*                                      Destroy the record\n
+*                                      Disconnects from the contacts service
+* @apicovered          contacts_connect, contacts_record_create, contacts_setting_set_name_display_order, contacts_record_destroy and contacts_disconnect
+* @passcase                    If target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
+* @failcase                    If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition API returns non error value
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_Contacts_PrivilegeContactWrite(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Contacts_PrivilegeContactWrite\n", API_NAMESPACE);
+
+       int nRet = CONTACTS_ERROR_NONE;
+
+       if ( false == PlatformGetFeatureValue(FEATURE_NETWORK_TELEPHONY) )
+       {
+               return 1;
+       }
+       if ( false == g_bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_NETWORK_TELEPHONY);
+               return 0;
+       }
+
+       if ( false == ContactConnect() )
+       {
+               return 1;
+       }
+
+       if ( false == ContactRecordCreate())
+       {
+               return 1;
+       }
+
+       nRet = contacts_setting_set_name_display_order(CONTACTS_NAME_DISPLAY_ORDER_FIRSTLAST);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               ContactsPrintErrorCode("contacts_setting_set_name_display_order", nRet);
+               ContactRecordDestroy();
+               ContactDisconnect();
+               return 1;
+       }
+
+       ContactRecordDestroy();
+       ContactDisconnect();
+
+       return 0;
+}
+
+
+//& purpose: Checking tizen.org/privilege/contact.read privilege
+//& type: auto
+/**
+* @testcase                    CTc_Contacts_PrivilegeContactRead
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Connects to the contacts service\n
+*                                      Get SIM status\n
+*                                      Disconnects from the contacts service
+* @apicovered          contacts_connect, contacts_sim_get_initialization_status and contacts_disconnect
+* @passcase                    If target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
+* @failcase                    If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition API returns non error value
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_Contacts_PrivilegeContactRead(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Contacts_PrivilegeContactRead\n", API_NAMESPACE);
+
+       int nRet = CONTACTS_ERROR_NONE;
+       bool bIsCompleted = false;
+
+       if ( false == PlatformGetFeatureValue(FEATURE_NETWORK_TELEPHONY) )
+       {
+               return 1;
+       }
+       if ( false == g_bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_NETWORK_TELEPHONY);
+               return 0;
+       }
+
+       if ( false == ContactConnect() )
+       {
+               return 1;
+       }
+
+       nRet = contacts_sim_get_initialization_status(&bIsCompleted);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               ContactsPrintErrorCode("contacts_sim_get_initialization_status", nRet);
+               ContactDisconnect();
+               return 1;
+       }
+
+       ContactDisconnect();
+       return 0;
+}
+
+
+//& purpose: Checking tizen.org/privilege/keymanager privilege
+//& type: auto
+/**
+* @testcase                    CTc_KeyManager_PrivilegeKeyManager
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Stores a certificate inside key manager based on the provided policy
+* @apicovered          ckmc_save_cert
+* @passcase                    If target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
+* @failcase                    If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_KeyManager_PrivilegeKeyManager(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_KeyManager_PrivilegeKeyManager", API_NAMESPACE);
+
+       int nRet = CKMC_ERROR_NONE;
+
+       ckmc_cert_s stCert;
+       ckmc_policy_s stCertPolicy;
+
+       char *pszAlias = "save_cert_p";
+       char* pszPolicyPassword = NULL;
+
+       stCertPolicy.password = pszPolicyPassword;
+       stCertPolicy.extractable = true;
+
+       stCert.raw_cert = (unsigned char *)CERT_SIG;
+       stCert.cert_size = strlen(CERT_SIG);
+       stCert.data_format = CKMC_FORM_PEM;
+
+       nRet = ckmc_save_cert(pszAlias, stCert, stCertPolicy);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               CkmcErrorInfo("ckmc_save_cert", nRet);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: check tizen.org/privilege/notification privilege.
+//& type: auto
+/**
+* @testcase                    CTc_Notification_PrivilegeNotification
+* @since_tizen         2.3
+* @type                                auto
+* @scenario                    Creates internal structure data and returns a notification handle\n
+*                                      Deletes all notification with the given notification type\n
+*                                      Deletes a notification with the given handle\n
+*                                      Frees the internal structure data of a notification handle
+* @apicovered          notification_create, notification_delete_all, notification_delete and notification_free
+* @passcase                    If target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
+* @failcase                    If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition API returns non error value
+* @precondition                NA
+* @postcondition       NA
+*/
+
+int CTc_Notification_PrivilegeNotification(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Notification_PrivilegeNotification\n", API_NAMESPACE);
+       int nRet = NOTIFICATION_ERROR_NONE;
+       notification_h hNotification = NULL;
+
+       hNotification = notification_create(NOTIFICATION_TYPE_NOTI);
+       if ( hNotification == NULL )
+       {
+               fprintf(fpLog, "\\n[%s] notification_create API returns NULL notification handle\n", API_NAMESPACE);
+               return 1;
+       }
+
+       nRet = notification_delete_all(NOTIFICATION_TYPE_NOTI);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               NotificationPrintAPIErrorMSG("notification_delete_all", nRet);
+               return 1;
+       }
+
+       nRet = notification_delete(hNotification);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               NotificationPrintAPIErrorMSG("notification_delete", nRet);
+               return 1;
+       }
+
+       nRet = notification_free(hNotification);
+       if ( nRet != NOTIFICATION_ERROR_NONE )
+       {
+               NotificationPrintAPIErrorMSG("notification_free", nRet);
+       }
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/alarm.set and tizen.org/privilege/alarm.get privilege
+//& type: auto
+/**
+ * @testcase                           CTc_Application_PrivilegeAlarmSet
+ * @type                                       Negative
+ * @scenario                           Creates an app_control handle\n
+ *                                                     Sets the operation to be performed\n
+ *                                                     Sets an alarm to be triggered after a specific time\n
+ *                                                     Gets the scheduled alarm period\n
+ *                                                     Destroys the app_control handle and releases all its resources\n
+ *                                                     Cancels all scheduled alarms that are registered by the application that calls this API
+ * @apicovered                         app_control_create, app_control_set_operation, alarm_schedule_after_delay, alarm_get_scheduled_period, app_control_destroy, alarm_cancel_all
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition api returns non error value
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Application_PrivilegeAlarmSetGet(void)
+{
+       fprintf(fpLog, "[%s] Executing Testcase: CTc_Application_PrivilegeAlarmSet\n", API_NAMESPACE);
+       int nRet = APP_CONTROL_ERROR_NONE;
+       g_hAppControl = NULL;
+       int nDelay = 3, nPeriod = 2, nAlarmId = -1;
+       int nGetPeriod = -2;
+
+       if ( false == AppControlCreate())
+       {
+               return 1;
+       }
+
+       nRet = app_control_set_operation(g_hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               AppControlErrorInfo("app_control_set_operation", nRet);
+               AppControlDestroy();
+               return 1;
+       }
+
+       nRet = app_control_set_app_id(g_hAppControl, PACKAGE_NAME);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               AppControlErrorInfo("app_control_set_app_id", nRet);
+               AppControlDestroy();
+               return 1;
+       }
+
+       nRet = alarm_schedule_after_delay(g_hAppControl, nDelay, nPeriod, &nAlarmId);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               AlarmErrorInfo("alarm_schedule_after_delay", nRet);
+               AppControlDestroy();
+               nRet = alarm_cancel_all();
+               if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+               {
+                       AlarmErrorInfo("alarm_cancel_all", nRet);
+               }
+               return 1;
+       }
+
+       nRet = alarm_get_scheduled_period(nAlarmId, &nGetPeriod);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               AlarmErrorInfo("alarm_get_scheduled_period", nRet);
+               AppControlDestroy();
+               nRet = alarm_cancel_all();
+               if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+               {
+                       AlarmErrorInfo("alarm_cancel_all", nRet);
+               }
+               return 1;
+       }
+
+       AppControlDestroy();
+       nRet = alarm_cancel_all();
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               AlarmErrorInfo("alarm_cancel_all", nRet);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/appmanager.launch privilege
+//& type: auto
+/**
+ * @testcase                           CTc_AppManager_PrivilegeAppmanagerLaunch
+ * @type                                       Negative
+ * @scenario                           Creates an app_control handle\n
+ *                                                     Sets the operation to be performed\n
+ *                                                     Set the app id\n
+ *                                                     Sends the launch request\n
+ *                                                     Destroys the app_control handle and releases all its resources
+ * @apicovered                         app_control_create, app_control_set_operation, app_control_set_app_id, app_control_send_launch_request, app_control_destroy
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition api returns non error value
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_AppManager_PrivilegeAppmanagerLaunch(void)
+{
+       fprintf(fpLog, "[%s] Executing Testcase: CTc_AppManager_PrivilegeAppmanagerLaunch\n", API_NAMESPACE);
+       int nRet = APP_CONTROL_ERROR_NONE;
+       g_hAppControl = NULL;
+
+       if ( false == AppControlCreate())
+       {
+               return 1;
+       }
+
+       nRet = app_control_set_app_id(g_hAppControl, PACKAGE_NAME);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               AppControlErrorInfo("app_control_set_app_id", nRet);
+               AppControlDestroy();
+               return 1;
+       }
+       nRet = app_control_send_launch_request( g_hAppControl, App_control_reply_cb, NULL);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               AppControlErrorInfo("app_control_send_launch_request",nRet);
+               AppControlDestroy();
+               return 1;
+       }
+
+       AppControlDestroy();
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/bluetooth privilege
+//& type: auto
+/**
+ * @testcase                           CTc_Bluetooth_PrivilegeBluetooth
+ * @type                                       Negative
+ * @scenario                           Initializes the Bluetooth API\n
+ *                                                     Sets the name of local Bluetooth adapter\n
+ *                                                     Deinitializes the Bluetooth API
+ * @apicovered                         bt_initialize, bt_adapter_set_name and bt_deinitialize
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition api returns non error value
+ * @precondition                       If bluetooth is supported then it must be enable on target device
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Bluetooth_PrivilegeBluetooth(void)
+{
+       fprintf(fpLog, "[%s] Executing Testcase: CTc_Bluetooth_PrivilegeBluetooth \n", API_NAMESPACE);
+
+       int nRet = BT_ERROR_NONE;
+       char* pszAdapterName = "Test";
+
+       if ( false == PlatformGetFeatureValue(FEATURE_BLUETOOTH))
+       {
+               return 1;
+       }
+       if ( false == g_bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_BLUETOOTH);
+               return 0;
+       }
+
+       nRet = bt_initialize();
+       if ( nRet != BT_ERROR_NONE )
+       {
+               BluetoothErrorInfo("bt_initialize", nRet);
+               return 1;
+       }
+
+       nRet = bt_adapter_set_name(pszAdapterName);
+       if( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               BluetoothErrorInfo("bt_adapter_set_name", nRet);
+               nRet = bt_deinitialize();
+               if ( nRet != BT_ERROR_NONE )
+               {
+                       BluetoothErrorInfo("bt_deinitialize", nRet);
+               }
+               return 1;
+       }
+
+       nRet = bt_deinitialize();
+       if ( nRet != BT_ERROR_NONE )
+       {
+               BluetoothErrorInfo("bt_deinitialize", nRet);
+       }
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/push privilege
+//& type: auto
+/**
+ * @testcase                           CTc_Messaging_PrivilegePush
+ * @type                                       Negative
+ * @scenario                           Connects to the push service and sets callback functions\n
+ *                                                     Disconnect the message handle and releases all its resources
+ * @apicovered                         push_service_connect and push_service_disconnect
+ * @passcase                           If privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Messaging_PrivilegePush(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Messaging_PrivilegePush", API_NAMESPACE);
+       int nRet = PUSH_SERVICE_ERROR_NONE;
+       push_service_connection_h hPushServiceConnection = NULL;
+       bool bPushSupport = true;
+
+       if ( !PlatformGetFeatureValue(FEATURE_PUSH) )
+       {
+               return 1;
+       }
+       bPushSupport = g_bIsSupported;
+
+       if ( !bPushSupport )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_PUSH);
+               return 0;
+       }
+
+       nRet = push_service_connect(APPID, Push_service_state_cb, Push_service_notify_cb, NULL, &hPushServiceConnection);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               PushServiceErrorInfo("push_service_connect", nRet);
+               if ( hPushServiceConnection != NULL )
+               {
+                       push_service_disconnect(hPushServiceConnection);
+               }
+               return 1;
+       }
+
+       push_service_disconnect(hPushServiceConnection);
+       return 0;
+}
+
+
+//& purpose: Checking tizen.org/privilege/haptic
+//& type: auto
+/**
+ * @testcase                           CTc_Device_PrivilegeHaptic
+ * @type                                       Negative
+ * @scenario                           Opens a haptic-vibration device\n
+                                                       Close a haptic-vibration device
+ * @apicovered                         device_haptic_open, device_haptic_close
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                            NA
+ */
+int CTc_Device_PrivilegeHaptic(void)
+{
+       fprintf(fpLog, "[%s] Executing Testcase: CTc_Device_PrivilegeHaptic \n", API_NAMESPACE);
+
+       haptic_device_h hHapticDevice = NULL;
+       int nRet = DEVICE_ERROR_NONE, nDeviceIndex = 0;
+
+       nRet = device_haptic_open(nDeviceIndex, &hHapticDevice);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               DeviceErrorInfo("device_haptic_open", nRet);
+               if ( hHapticDevice )
+               {
+                       nRet = device_haptic_close(hHapticDevice);
+                       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+                       {
+                               DeviceErrorInfo("device_haptic_close", nRet);
+                       }
+               }
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: Checking http://tizen.org/privilege/callhistory.read privilege
+//& type: auto
+/**
+* @testcase                    CTc_Contacts_PrivilegeCallhistoryRead
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Connects to the contacts service\n
+*                                      Gets the last successful changed contacts database version on the current connection\n
+*                                      Disconnects from the contacts service
+* @apicovered          contacts_connect, contacts_db_get_last_change_version and contacts_disconnect
+* @passcase                    If target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
+* @failcase                    If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition API returns non error value
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_Contacts_PrivilegeCallhistoryRead(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Contacts_PrivilegeCallhistoryRead", API_NAMESPACE);
+
+       int nRet = CONTACTS_ERROR_NONE;
+       int nLastChangeVersion;
+
+       if ( false == ContactConnect() )
+       {
+               return 1;
+       }
+
+       nRet = contacts_db_get_last_change_version(&nLastChangeVersion);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               ContactsPrintErrorCode("contacts_db_get_record", nRet);
+               ContactDisconnect();
+               return 1;
+       }
+
+       ContactDisconnect();
+       return 0;
+}
+
+//& purpose: Checking http://tizen.org/privilege/callhistory.write privilege
+//& type: auto
+/**
+* @testcase                    CTc_Contacts_PrivilegeCallhistoryWrite
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Connects to the contacts service\n
+*                                      Resets the phone log's count\n
+*                                      Disconnects from the contacts service
+* @apicovered          contacts_connect,contacts_phone_log_reset_statistics and contacts_disconnect
+* @passcase                    If target privileged API returns TIZEN_ERROR_PERMISSION_DENIED
+* @failcase                    If target privileged API does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition API returns non error value
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_Contacts_PrivilegeCallhistoryWrite(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Contacts_PrivilegeCallhistoryWrite", API_NAMESPACE);
+
+       int nRet = CONTACTS_ERROR_NONE;
+
+       if ( false == ContactConnect() )
+       {
+               return 1;
+       }
+
+       nRet = contacts_phone_log_reset_statistics();
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               ContactsPrintErrorCode("contacts_phone_log_reset_statistics ", nRet);
+               ContactDisconnect();
+               return 1;
+       }
+
+       ContactDisconnect();
+
+       return 0;
+}
+
+//& purpose: check privilege http://tizen.org/privilege/led
+//& type: auto
+/**
+ * @testcase                           CTc_Device_PrivilegeLed
+ * @type                                       Negative
+ * @scenario                           Gets the max brightness value of a LED that is located next to the camera.
+ * @apicovered                         device_flash_get_max_brightness
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Device_PrivilegeLed(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing testcase - CTc_Device_PrivilegeLed.\n", API_NAMESPACE);
+       int nRet = TIZEN_ERROR_UNKNOWN, nBrightness = 50;
+
+       if ( false == PlatformGetFeatureValue(FEATURE_DISPLAY))
+       {
+               return 1;
+       }
+       if ( false == g_bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_DISPLAY);
+               return 0;
+       }
+
+       nRet = device_flash_get_max_brightness (&nBrightness);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               DeviceErrorInfo("device_flash_get_max_brightness", nRet);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: checking http://tizen.org/privilege/shortcut privilege
+//& type: auto
+/**
+ * @testcase                           CTc_Shortcut_PrivilegeShortcut
+ * @type                                       Negative
+ * @scenario                           Add a shortcut to home
+ * @apicovered                         shortcut_add_to_home
+ * @passcase                           If all privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If all privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Shortcut_PrivilegeShortcut(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Shortcut_PrivilegeShortcut", API_NAMESPACE);
+
+       int nRet = SHORTCUT_ERROR_NONE;
+
+       nRet = shortcut_add_to_home("success", LAUNCH_BY_APP, NULL, NULL, 1, Shortcut_response_cb, (void *)2);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               ShortcutPrintErrorCode("shortcut_add_to_home", nRet);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: checking tizen.org/privilege/badge privilege
+//& type: auto
+/**
+ * @testcase                           CTc_Badge_PrivilegeBadge
+ * @type                                       Negative
+ * @scenario                           Creates a badge for the application itself\n
+ *                                                     Removes the badge for the designated application
+ * @apicovered                         badge_new, badge_remove
+ * @passcase                           If all privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If all privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int CTc_Badge_PrivilegeBadge(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Badge_PrivilegeBadge", API_NAMESPACE);
+       int nRet = BADGE_ERROR_NONE;
+
+       nRet = badge_new(BADGE_PACKAGE);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               BadgePrintErrorCode("badge_new", nRet);
+               nRet = badge_remove(BADGE_PACKAGE);
+               if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+               {
+                       BadgePrintErrorCode("badge_remove", nRet);
+               }
+               return 1;
+       }
+
+       nRet = badge_remove(BADGE_PACKAGE);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               BadgePrintErrorCode("badge_remove", nRet);
+               return 1;
+       }
+       return 0;
+}
+
+
+//& purpose: Checking tizen.org/privilege/content.write (user) privilege
+//& type: auto
+/**
+ * @testcase                           CTc_MediaContent_PrivilegeContentWrite
+ * @type                                       Negative
+ * @scenario                           Connects to the media content service\n
+ *                                                     Requests to scan a media file\n
+ *                                                     Disconnects from the media content service
+ * @apicovered                         media_content_connect, media_content_scan_file and media_content_disconnect
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition api returns non error value
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                            NA
+ */
+int CTc_MediaContent_PrivilegeContentWrite(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_MediaContent_PrivilegeContentWrite", API_NAMESPACE);
+
+       if ( get_storage_id_callback() == false )
+       {
+               return 1;
+       }
+
+       int nRet = MEDIA_CONTENT_ERROR_NONE;
+       char *pszPath = NULL;
+       int nStorage = g_nLibInternalStorageId;
+
+       pszPath = PlatformPermissionGetStoragePath(nStorage, STORAGE_DIRECTORY_IMAGES, FILE_NAME);
+       if (pszPath == NULL )
+       {
+               return 0;
+       }
+
+       if ( false == MediaContentConnect())
+       {
+               free(pszPath);
+               pszPath = NULL;
+               return 1;
+       }
+
+       nRet = media_content_scan_file(pszPath);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               MediaContentErrorInfo("media_content_scan_file", nRet);
+               MediaContentDisconnect();
+               free(pszPath);
+               pszPath = NULL;
+               return 1;
+       }
+
+       MediaContentDisconnect();
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/mediastorage privilege
+//& type: auto
+/**
+ * @testcase                           CTc_MediaContent_PrivilegeMediaStorage
+ * @type                                       Negative
+ * @scenario                           Connects to the media content service\n
+ *                                                     Requests to scan a media folder\n
+ *                                                     Disconnects from the media content service.
+ * @apicovered                         media_content_connect,  media_content_scan_folder, media_content_disconnect
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition api returns non error value
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_MediaContent_PrivilegeMediaStorage(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_MediaContent_PrivilegeMediaStorage \n", API_NAMESPACE);
+
+       if ( get_storage_id_callback() == false )
+       {
+               return 1;
+       }
+
+       int nRet = MEDIA_CONTENT_ERROR_NONE ;
+       bool bIsRecursive = false;
+       int nStorage = g_nLibInternalStorageId;
+       char *pszPath = NULL;
+
+       pszPath = PlatformPermissionGetStoragePath(nStorage, STORAGE_DIRECTORY_DOWNLOADS, "");
+       if (pszPath == NULL )
+       {
+               return 0;
+       }
+
+       if ( false == MediaContentConnect() )
+       {
+               free(pszPath);
+               return 1;
+       }
+
+       nRet = media_content_scan_folder(pszPath, bIsRecursive, MediaContent_media_scan_completed_cb, "UserData"); //target api
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               MediaContentErrorInfo("media_content_scan_folder", nRet);
+               MediaContentDisconnect();
+               free(pszPath);
+               return 1;
+       }
+       MediaContentDisconnect();
+       free(pszPath);
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/wifidirect privilege
+//& type: auto
+/**
+ * @testcase                           CTc_Network_PrivilegeWifiDirect
+ * @type                                       Negative
+ * @scenario                           Initialize WifiDirect\n
+ *                                                     Deinitialize WifiDirect
+ * @apicovered                         wifi_direct_initialize and wifi_direct_deinitialize
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Network_PrivilegeWifiDirect(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Network_PrivilegeWifiDirect \n", API_NAMESPACE);
+
+       int nRet = WIFI_DIRECT_ERROR_NONE ;
+
+       if ( false == PlatformGetFeatureValue(FEATURE_WIFIDIRECT))
+       {
+               return 1;
+       }
+       if ( false == g_bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_WIFIDIRECT);
+               return 0;
+       }
+
+       nRet = wifi_direct_initialize();
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               WifiDirectErrorInfo("wifi_direct_initialize", nRet);
+               nRet = wifi_direct_deinitialize ();
+               if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+               {
+                       WifiDirectErrorInfo("wifi_direct_deinitialize", nRet);
+               }
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: Checking tizen.org/privilege/nfc privilege
+//& type: auto
+/**
+ * @testcase                           CTc_Network_PrivilegeNfc
+ * @type                                       Negative
+ * @scenario                           Initializes NFC Manager\n
+ *                                                     Gets current connected tag\n
+ *                                                     Deinitializes NFC Manager
+ * @apicovered                         nfc_manager_initialize, nfc_manager_set_system_handler_enable and nfc_manager_deinitialize
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition api returns non error value
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Network_PrivilegeNfc(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_Network_PrivilegeNfc \n", API_NAMESPACE);
+
+       int nRet = NFC_ERROR_NONE ;
+
+       if ( false == PlatformGetFeatureValue(FEATURE_NFC))
+       {
+               return 1;
+       }
+       if ( false == g_bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_NFC);
+               return 0;
+       }
+
+       nRet = nfc_manager_initialize();
+       if ( nRet != NFC_ERROR_NONE )
+       {
+               NfcErrorInfo("nfc_manager_initialize", nRet);
+               return 1;
+       }
+
+       nRet = nfc_manager_set_system_handler_enable(true);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               NfcErrorInfo("nfc_manager_set_system_handler_enable", nRet);
+               nfc_manager_deinitialize();
+               return 1;
+       }
+       nRet = nfc_manager_deinitialize();
+       if ( nRet != NFC_ERROR_NONE )
+       {
+               NfcErrorInfo("nfc_manager_deinitialize", nRet);
+       }
+       return 0;
+}
+
+//& purpose: Checking http://tizen.org/privilege/location privilege
+//& type: auto
+/**
+ * @testcase                           CTc_Location_PrivilegeLocation
+ * @type                                       Negative
+ * @scenario                           Create location manager\n
+ *                                                     Start location manager\n
+ *                                                     Get location\n
+ *                                                     Destroy location manager
+ * @apicovered                         location_manager_create, location_manager_start, location_manager_stop, location_manager_get_location and location_manager_destroy
+ * @passcase                           If target privileged Api returns TIZEN_ERROR_PERMISSION_DENIED
+ * @failcase                           If target privileged Api does not return TIZEN_ERROR_PERMISSION_DENIED or non-privileged precondition api returns non error value
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Location_PrivilegeLocation(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_SystemSetting_PrivilegeSystemSettings \n", API_NAMESPACE);
+       int nRet = SYSTEM_SETTINGS_ERROR_NONE;
+       location_method_e eLocationMethod = LOCATIONS_METHOD_GPS;
+       location_manager_h hLocationManager = NULL;
+       location_accuracy_level_e level;
+       double dbAltitute, dbLatitude, dbLongitude, dbClimb, dbDirection, dbSpeed, dbHorizontal, dbVertical;
+       time_t timestamp;
+
+       if ( false == PlatformGetFeatureValue(FEATURE_LOCATION))
+       {
+               return 1;
+       }
+       if ( false == g_bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] [%s] is not supported", API_NAMESPACE, FEATURE_LOCATION);
+               return 0;
+       }
+
+       nRet = location_manager_create(eLocationMethod, &hLocationManager);
+       if ( nRet != LOCATIONS_ERROR_NONE )
+       {
+               LocationsErrorInfo("location_manager_create", nRet);
+               return 1;
+       }
+
+       nRet = location_manager_start(hLocationManager);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               LocationsErrorInfo("location_manager_start", nRet);
+               location_manager_stop(hLocationManager);
+               location_manager_destroy(hLocationManager);
+               return 1;
+       }
+
+       nRet = location_manager_get_location(hLocationManager, &dbAltitute, &dbLatitude, &dbLongitude, &dbClimb, &dbDirection, &dbSpeed, &level, &dbHorizontal, &dbVertical, &timestamp);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               LocationsErrorInfo("location_manager_get_location", nRet);
+               location_manager_stop(hLocationManager);
+               location_manager_destroy(hLocationManager);
+               return 1;
+       }
+
+       nRet = location_manager_stop(hLocationManager);
+       if ( nRet != TIZEN_ERROR_PERMISSION_DENIED )
+       {
+               LocationsErrorInfo("location_manager_stop", nRet);
+               location_manager_destroy(hLocationManager);
+               return 1;
+       }
+
+       nRet = location_manager_destroy(hLocationManager);
+       if ( nRet != LOCATIONS_ERROR_NONE )
+       {
+               LocationsErrorInfo("location_manager_destroy", nRet);
+       }
+
+       return 0;
+}
+
+/** @} */ //end of ctc-platform-permission-testcases
+/** @} */ //end of ctc-platform-permission
diff --git a/src/ctc/platform-permission/tct-platform-permission-native.c b/src/ctc/platform-permission/tct-platform-permission-native.c
new file mode 100755 (executable)
index 0000000..93a3d6e
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-platform-permission-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/platform-permission/tct-platform-permission-native.h b/src/ctc/platform-permission/tct-platform-permission-native.h
new file mode 100755 (executable)
index 0000000..e248e58
--- /dev/null
@@ -0,0 +1,87 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_PLATFORM_PERMISSION_NATIVE_H__
+#define __TCT_PLATFORM_PERMISSION_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_platform_permission_startup(void);
+extern void CTs_platform_permission_cleanup(void);
+
+extern int CTc_Recorder_PrivilegeAudioRecorder(void);
+extern int CTc_SoundManager_PrivilegeVolumeSet(void);
+extern int CTc_DataControl_PrivilegeDataControlConsumer(void);
+extern int CTc_Camera_PrivilegeCamera(void);
+extern int CTc_Device_PrivilegeDisplay(void);
+extern int CTc_Device_PrivilegePower(void);
+extern int CTc_Messaging_PrivilegeMessageRead(void);
+extern int CTc_PackageInfo_PrivilegePackagemanagerInfo(void);
+extern int CTc_Telephony_PrivilegeTelephony(void);
+extern int CTc_Download_PrivilegeDownload(void);
+extern int CTc_Contacts_PrivilegeContactWrite(void);
+extern int CTc_Contacts_PrivilegeContactRead(void);
+extern int CTc_KeyManager_PrivilegeKeyManager(void);
+extern int CTc_Notification_PrivilegeNotification(void);
+extern int CTc_Application_PrivilegeAlarmSetGet(void);
+extern int CTc_AppManager_PrivilegeAppmanagerLaunch(void);
+extern int CTc_Bluetooth_PrivilegeBluetooth(void);
+extern int CTc_Messaging_PrivilegePush(void);
+extern int CTc_Device_PrivilegeHaptic(void);
+extern int CTc_Contacts_PrivilegeCallhistoryRead(void);
+extern int CTc_Contacts_PrivilegeCallhistoryWrite(void);
+extern int CTc_Device_PrivilegeLed(void);
+extern int CTc_Shortcut_PrivilegeShortcut(void);
+extern int CTc_Badge_PrivilegeBadge(void);
+extern int CTc_MediaContent_PrivilegeContentWrite(void);
+extern int CTc_MediaContent_PrivilegeMediaStorage(void);
+extern int CTc_Network_PrivilegeWifiDirect(void);
+extern int CTc_Network_PrivilegeNfc(void);
+extern int CTc_Location_PrivilegeLocation(void);
+
+testcase tc_array[] = {
+    {"CTc_Recorder_PrivilegeAudioRecorder", CTc_Recorder_PrivilegeAudioRecorder, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_SoundManager_PrivilegeVolumeSet", CTc_SoundManager_PrivilegeVolumeSet, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_DataControl_PrivilegeDataControlConsumer", CTc_DataControl_PrivilegeDataControlConsumer, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Camera_PrivilegeCamera", CTc_Camera_PrivilegeCamera, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Device_PrivilegeDisplay", CTc_Device_PrivilegeDisplay, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Device_PrivilegePower", CTc_Device_PrivilegePower, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Messaging_PrivilegeMessageRead", CTc_Messaging_PrivilegeMessageRead, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_PackageInfo_PrivilegePackagemanagerInfo", CTc_PackageInfo_PrivilegePackagemanagerInfo, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Telephony_PrivilegeTelephony", CTc_Telephony_PrivilegeTelephony, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Download_PrivilegeDownload", CTc_Download_PrivilegeDownload, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Contacts_PrivilegeContactWrite", CTc_Contacts_PrivilegeContactWrite, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Contacts_PrivilegeContactRead", CTc_Contacts_PrivilegeContactRead, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_KeyManager_PrivilegeKeyManager", CTc_KeyManager_PrivilegeKeyManager, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Notification_PrivilegeNotification", CTc_Notification_PrivilegeNotification, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Application_PrivilegeAlarmSetGet", CTc_Application_PrivilegeAlarmSetGet, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_AppManager_PrivilegeAppmanagerLaunch", CTc_AppManager_PrivilegeAppmanagerLaunch, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Bluetooth_PrivilegeBluetooth", CTc_Bluetooth_PrivilegeBluetooth, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Messaging_PrivilegePush", CTc_Messaging_PrivilegePush, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Device_PrivilegeHaptic", CTc_Device_PrivilegeHaptic, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Contacts_PrivilegeCallhistoryRead", CTc_Contacts_PrivilegeCallhistoryRead, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Contacts_PrivilegeCallhistoryWrite", CTc_Contacts_PrivilegeCallhistoryWrite, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Device_PrivilegeLed", CTc_Device_PrivilegeLed, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Shortcut_PrivilegeShortcut", CTc_Shortcut_PrivilegeShortcut, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Badge_PrivilegeBadge", CTc_Badge_PrivilegeBadge, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_MediaContent_PrivilegeContentWrite", CTc_MediaContent_PrivilegeContentWrite, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_MediaContent_PrivilegeMediaStorage", CTc_MediaContent_PrivilegeMediaStorage, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Network_PrivilegeWifiDirect", CTc_Network_PrivilegeWifiDirect, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Network_PrivilegeNfc", CTc_Network_PrivilegeNfc, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {"CTc_Location_PrivilegeLocation", CTc_Location_PrivilegeLocation, CTs_platform_permission_startup, CTs_platform_permission_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_PLATFORM_PERMISSION_NATIVE_H__
diff --git a/src/ctc/player/CMakeLists.txt b/src/ctc/player/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..282e57b
--- /dev/null
@@ -0,0 +1,44 @@
+SET(PKG_NAME "player")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-media-player")
+SET(TC_SOURCES
+       player-common.c
+       player.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       dlog
+       gthread-2.0
+       capi-system-runtime-info
+       capi-appfw-application
+       capi-appfw-app-manager
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+       glib-2.0
+       dlog
+       gthread-2.0
+       capi-system-runtime-info
+       capi-appfw-application
+       capi-appfw-app-manager
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/player/MediaPlayer.mp3 b/src/ctc/player/MediaPlayer.mp3
new file mode 100755 (executable)
index 0000000..78527be
Binary files /dev/null and b/src/ctc/player/MediaPlayer.mp3 differ
diff --git a/src/ctc/player/player-common.c b/src/ctc/player/player-common.c
new file mode 100755 (executable)
index 0000000..b448857
--- /dev/null
@@ -0,0 +1,334 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "player-common.h"
+
+/** @addtogroup ctc-player
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+
+/**
+ * @function   PlayerPrintErrorCode
+ * @description Display the details error information
+ * @parameter  [IN] nResult, api return error code
+ *                             [IN] pszApi, api name
+ * @return     NA
+ * 
+ */
+void PlayerPrintErrorCode(char *pszApi, int nResult)
+{
+       char* pszErrInfo = NULL;
+       pszErrInfo = (char*)calloc(MEMLOG, MEMLOG * sizeof(char));
+       if( pszErrInfo == NULL )
+       {
+               return;
+       }
+       
+       switch ( nResult )
+       {
+               case PLAYER_ERROR_OUT_OF_MEMORY:                        strcpy(pszErrInfo, "PLAYER_ERROR_OUT_OF_MEMORY");                       break;
+               case PLAYER_ERROR_INVALID_PARAMETER:            strcpy(pszErrInfo, "PLAYER_ERROR_INVALID_PARAMETER");           break;
+               case PLAYER_ERROR_NO_SUCH_FILE:                         strcpy(pszErrInfo, "PLAYER_ERROR_NO_SUCH_FILE");                        break;
+               case PLAYER_ERROR_INVALID_OPERATION:            strcpy(pszErrInfo, "PLAYER_ERROR_INVALID_OPERATION");           break;
+               case PLAYER_ERROR_FILE_NO_SPACE_ON_DEVICE:      strcpy(pszErrInfo, "PLAYER_ERROR_FILE_NO_SPACE_ON_DEVICE");     break;
+               case PLAYER_ERROR_SEEK_FAILED:                          strcpy(pszErrInfo, "PLAYER_ERROR_SEEK_FAILED");                         break;
+               case PLAYER_ERROR_INVALID_STATE:                        strcpy(pszErrInfo, "PLAYER_ERROR_INVALID_STATE");                       break;
+               case PLAYER_ERROR_NOT_SUPPORTED_FILE:           strcpy(pszErrInfo, "PLAYER_ERROR_NOT_SUPPORTED_FILE");          break;
+               case PLAYER_ERROR_INVALID_URI:                          strcpy(pszErrInfo, "PLAYER_ERROR_INVALID_URI");                         break;
+               default:                                                                        strcpy(pszErrInfo, "Unknown_Error");
+       }
+       
+       printf ("\\n[%s] %s failed, error returned = %s.", API_NAMESPACE, pszApi, pszErrInfo);
+       
+       free(pszErrInfo);
+       pszErrInfo = NULL;
+}
+
+//Print Player State Code
+/**
+* @function            PrintPlayerState
+* @description                 print the current state of the player
+* @parameter[IN]       eState , the current state
+* @return                      NA
+*/
+void PrintPlayerState(player_state_e eState)
+{
+       char* pszState = NULL;
+       pszState = (char*)calloc(MEMLOG, MEMLOG * sizeof(char));
+       if ( pszState == NULL )
+       {
+               fprintf (fpLog, "\\n[%s] pszState is NULL due to Memory Allocation Failed", API_NAMESPACE);
+               return;
+       }
+       switch ( eState )
+       {
+               case PLAYER_STATE_NONE:         strcpy(pszState, "PLAYER_STATE_NONE");                  break;
+               case PLAYER_STATE_IDLE:         strcpy(pszState, "PLAYER_STATE_IDLE");                  break;
+               case PLAYER_STATE_READY:        strcpy(pszState, "PLAYER_STATE_READY");                 break;
+               case PLAYER_STATE_PLAYING:      strcpy(pszState, "PLAYER_STATE_PLAYING");               break;
+               case PLAYER_STATE_PAUSED:       strcpy(pszState, "PLAYER_STATE_PAUSED");                break;
+               default:                                        strcpy(pszState, "NONE");
+       }
+       
+       fprintf(fpLog, "\\n[%s] Player Current state is: %s.", API_NAMESPACE,pszState);
+       free(pszState);
+       pszState = NULL;
+}
+
+/**
+* @function            PlayerInitialization
+* @description                 Creates a player handler, sets an uri and prepares the handler
+* @parameter[IN]    bool bPrepare      [if it is true, player would be prepared. Otherwise, player would not be prepared]
+*                      [IN]    int eMediaType  [if it is 0, player_set_uri would be set with an audio file. Otherwise, player_set_uri would be set with a video file]
+* @return                      true if successful, otherwise false. 
+*/
+bool PlayerInitialization(bool bPrepare, MediaTypeEnumeration eMediaType)
+{
+       int nRet = PLAYER_ERROR_INVALID_PARAMETER;
+       player_state_e eState;
+       
+       nRet = player_create(&g_PlayerHandler);
+       if ( nRet != PLAYER_ERROR_NONE )
+       {
+               PlayerPrintErrorCode("player_create", nRet);
+               return false;
+       }       
+       
+       if ( g_PlayerHandler == NULL )
+       {
+               fprintf(fpLog, "\\n[%s] player handler is NULL!.", API_NAMESPACE);
+               return false;
+       }       
+       
+       nRet = player_get_state(g_PlayerHandler, &eState);
+       if ( nRet != PLAYER_ERROR_NONE )
+       {
+               PlayerPrintErrorCode("player_get_state", nRet);
+               PlayerDestroy(false);
+               return false;
+       }
+       
+       PrintPlayerState(eState);
+       if ( eState != PLAYER_STATE_IDLE )
+       {
+               fprintf(fpLog, "\\n[%s] Player state is not in PLAYER_STATE_IDLE after player_creation.", API_NAMESPACE);
+               PlayerDestroy(false);
+               return false;
+       }
+       
+       if ( eMediaType == MeidaType_Audio )
+       {
+               nRet = player_set_uri(g_PlayerHandler, MEDIA_PATH_AUDIO);
+       }
+       
+       if ( nRet != PLAYER_ERROR_NONE )
+       {
+               PlayerPrintErrorCode("player_set_uri", nRet);
+               PlayerDestroy(false);
+               return false;
+       }
+       if ( bPrepare )
+       {
+               nRet = player_prepare(g_PlayerHandler);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       PlayerPrintErrorCode("player_prepare", nRet);
+                       PlayerDestroy(false);
+                       return false;
+               }
+
+               player_get_state(g_PlayerHandler, &eState);
+               PrintPlayerState(eState);
+               if ( eState != PLAYER_STATE_READY )
+               {
+                       fprintf(fpLog, "\\n[%s] Player state is not in in PLAYER_STATE_READY after player_prepare.", API_NAMESPACE);
+                       PlayerDestroy(true);
+                       return false;
+               }
+       }
+       return true;
+}
+/**
+* @function            PlayerDestroy
+* @description                 unprepare and destroy the player handler
+* @parameter[IN]       bIsUnprepare, whether unprepare needed or not
+* @return                      true if successful, else false 
+*/
+bool PlayerDestroy(bool bIsUnprepare)
+{
+       int nRet = PLAYER_ERROR_NONE;
+       if ( bIsUnprepare )
+       {
+               nRet = player_unprepare(g_PlayerHandler); 
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       PlayerPrintErrorCode("player_unprepare", nRet);
+                       return false;
+               }
+       }
+       nRet = player_destroy(g_PlayerHandler);
+       if ( nRet != PLAYER_ERROR_NONE )
+       {
+               PlayerPrintErrorCode("player_destroy", nRet);
+               return false;
+       }
+       
+       g_PlayerHandler = NULL;
+       return true;
+}
+/**
+* @function            PlayerSetVolume
+* @description                 get the volume to preserve, and set a new volume of the player
+* @parameter[OUT]      pfPreserveLeftVol, save the left vol
+*                      [OUT]   pfPreserveRightVol, save the right vol
+*                      [IN]    fSetLeftVol, set the current left vol
+*                      [IN]    fSetRightVol, set the current right vol
+* @return                      true if successful, else false 
+*/
+bool PlayerSetVolume(float *pfPreserveLeftVol, float *pfPreserveRightVol, float fSetLeftVol, float fSetRightVol)
+{
+       // to preserve the volume
+       int nRet = player_get_volume(g_PlayerHandler, pfPreserveLeftVol, pfPreserveRightVol);
+       if ( nRet != PLAYER_ERROR_NONE ) 
+       {
+               PlayerPrintErrorCode("player_get_volume", nRet);
+               PlayerDestroy(true);
+               return false;
+       }
+       
+       nRet = player_set_volume(g_PlayerHandler, fSetLeftVol, fSetRightVol);
+       if ( nRet != PLAYER_ERROR_NONE ) 
+       {
+               PlayerPrintErrorCode("player_set_volume", nRet);
+               PlayerDestroy(true);
+               return false;
+       }
+       
+       return true;
+}
+
+/**    
+ * @function                   PlayerGmainLoopCallBack
+ * @description                        callback for GmainLoop and player start during callback time.
+ * @parameter[IN]      data, user data
+ * @return                             true (recommended)
+ */
+gboolean PlayerGmainLoopCallBack(gpointer data)
+{
+       g_nPlayerWaitLoopCounter++;
+       int nRet = PLAYER_ERROR_NONE;
+       player_state_e eState = PLAYER_STATE_NONE;
+       
+       if ( g_nPlayerWaitLoopCounter == 1 )
+       {
+               nRet = player_start(g_PlayerHandler);
+               if( nRet != PLAYER_ERROR_NONE ) 
+               {               
+                       PlayerPrintErrorCode("player_start", nRet);
+                       PlayerDestroy(true);
+               }
+       }
+       if ( g_nPlayerWaitLoopCounter == WAIT_TIME )
+       {
+               #if DEBUG
+                       fprintf(fpLog, "\\n[%s]g_MainLoop quit for timeout!",API_NAMESPACE);
+               #endif
+               nRet = player_get_state(g_PlayerHandler, &eState);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       PlayerPrintErrorCode("player_get_state", nRet);
+                       PlayerDestroy(true);
+               }
+               //Checks the player status is PLAYER_STATE_PLAYING because of player_start called in 1st loop counter
+               if ( eState == PLAYER_STATE_PLAYING )
+               {
+                       nRet = player_stop(g_PlayerHandler);
+                       if( nRet != PLAYER_ERROR_NONE ) 
+                       {               
+                               PlayerPrintErrorCode("player_stop", nRet);
+                               PlayerDestroy(true);
+                       }
+               }
+               g_main_loop_quit(g_MainLoopPlayer);
+               
+       }
+       else
+       {
+               #if DEBUG
+                       fprintf(fpLog, "\\n[%s] GmainLoop runs with wait loop counter: [%d].",API_NAMESPACE, g_nPlayerWaitLoopCounter);
+               #endif
+       }
+       return true;
+}
+
+/**
+* @function                                    RuntimeErrorInfo
+* @description                                         print the error of runtime information
+* @parameter[IN]                               nResult, the error code
+*                      [IN]                            pszApiName, API name
+* @return                                              NA
+*/
+
+void RuntimeErrorInfo(char *pszApiName, int nResult)
+{
+       char* pszErrInfo = NULL;
+    pszErrInfo = (char*)calloc(MEMLOG, MEMLOG * sizeof(char));
+       if ( pszErrInfo == NULL )
+       {
+               return;
+       }
+       switch ( nResult )
+       {
+               case RUNTIME_INFO_ERROR_INVALID_PARAMETER:              strcpy(pszErrInfo, "RUNTIME_INFO_ERROR_INVALID_PARAMETER");             break;
+               case RUNTIME_INFO_ERROR_OUT_OF_MEMORY:                  strcpy(pszErrInfo, "RUNTIME_INFO_ERROR_OUT_OF_MEMORY");                 break;
+               case RUNTIME_INFO_ERROR_IO_ERROR:                               strcpy(pszErrInfo, "RUNTIME_INFO_ERROR_IO_ERROR");                              break;
+               case RUNTIME_INFO_ERROR_PERMISSION_DENIED:              strcpy(pszErrInfo, "RUNTIME_INFO_ERROR_PERMISSION_DENIED");             break; 
+               default:                                                                                strcpy(pszErrInfo, "Unknown Error");
+       }
+       fprintf(fpLog, "\\n[%s] %s is failed, error returned = %s.", API_NAMESPACE, pszApiName, pszErrInfo);
+       free(pszErrInfo);
+       pszErrInfo = NULL;
+}
+
+/**
+* @function            MediaPlayerGetDataPath
+* @description                 Get the path to application data directory
+* @parameter[IN]       char* pszFileName [file name]
+* @return                      NA
+*/
+char* MediaPlayerGetDataPath(char *pszFileName)
+{
+       char *pszAppData = app_get_data_path(),*pszImgPath = NULL;
+       if ( pszAppData == NULL )
+       {
+               fprintf (fpLog, "\\n[%s] app_get_data_path() is failed. Invalid path.", API_NAMESPACE);
+               return NULL;
+       }
+       pszImgPath = (char*) calloc(1, strlen(pszAppData) + strlen(pszFileName)+1);
+       if ( pszImgPath == NULL )
+       {
+               fprintf (fpLog, "\\n[%s] pszImgPath failed invalid path.", API_NAMESPACE);
+               return NULL;
+       }
+       
+       sprintf(pszImgPath, "%s%s",pszAppData, pszFileName );
+       fprintf (fpLog, "\\n[%s] app_get_data_path() is %s.", API_NAMESPACE, pszImgPath);
+       return pszImgPath;
+}
+
+/** @} */ //end of ctc-player
\ No newline at end of file
diff --git a/src/ctc/player/player-common.h b/src/ctc/player/player-common.h
new file mode 100755 (executable)
index 0000000..95a939e
--- /dev/null
@@ -0,0 +1,80 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _PLAYER_COMMON_H_
+#define _PLAYER_COMMON_H_
+
+/* 
+ * Preconditions for these CTs-Test-cases
+ * 
+ * - when there is mentioned "earphone" in testcase, an earphone should be connected with the devie
+ * - when there is mentioned "speaker" in testcase, earphone should be removed from the device
+ */
+
+#include "assert.h"
+#include <player.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <stdint.h>
+#include <sys/types.h>
+#include <sys/times.h>
+#include <runtime_info.h>
+#include <unistd.h>
+#include "app.h"
+
+/** @addtogroup ctc-player
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                                          "CAPI_MEDIA_PLAYER_CTC"
+#define DEBUG                                                          0
+#define MEMLOG                                                                 20
+#define WAIT_TIME                                                      5
+#define MAX_SPEAKER_VOLUME_CONTROL                     5
+#define MAX_EARPHONE_VOLUME_CONTROL                    5
+#define MEDIA_PATH_AUDIO                                       (MediaPlayerGetDataPath("MediaPlayer.mp3"))
+#define ERR_LOG                                                        "/tmp/tclog"
+FILE *fpLog;
+
+typedef enum MediaType
+{
+       MeidaType_Audio = 0,
+       MediaType_Video
+} MediaTypeEnumeration;
+
+// Global variables
+player_h g_PlayerHandler;
+GMainLoop* g_MainLoopPlayer;
+int g_nPlayerWaitLoopCounter;
+
+//Add helper function declarations here
+
+void PlayerPrintErrorCode(char *pszApi,int nResult);
+void PrintPlayerState(player_state_e eState);
+bool PlayerInitialization(bool bPrepare, MediaTypeEnumeration eMediaType);
+bool PlayerDestroy(bool bIsUnprepare);
+bool PlayerSetVolume(float *pfPreserveLeftVol, float *pfPreserveRightVol, float fSetLeftVol, float fSetRightVol);
+gboolean PlayerGmainLoopCallBack(gpointer data);
+void RuntimeErrorInfo(char *pszApiName, int nResult);
+char* MediaPlayerGetDataPath(char *pszFileName);
+
+/** @} */ //end of ctc-player
+#endif  //_PLAYER_COMMON_H_
diff --git a/src/ctc/player/player.c b/src/ctc/player/player.c
new file mode 100755 (executable)
index 0000000..d697acc
--- /dev/null
@@ -0,0 +1,444 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "player-common.h"
+
+/** @addtogroup ctc-player
+* @ingroup             ctc
+* @{
+*/
+
+//& set: Player
+
+/**
+ * @function           CTs_capi_media_player_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void CTs_capi_media_player_startup(void)
+{
+       fpLog = fopen(ERR_LOG,"w");
+       return;
+}
+
+/**
+ * @function           CTs_capi_media_player_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void CTs_capi_media_player_cleanup(void)
+{
+       fclose(fpLog);
+       return;
+}
+
+/** @addtogroup        ctc-player-testcases
+* @brief               Integration testcases for module player
+* @ingroup             ctc-player
+* @{
+*/
+
+//& purpose: check whether the device is speaker supported or not
+//& type : auto
+/**
+ * @testcase                           CTc_Player_IsSupportedSpeaker_p
+ * @type                                       Positive
+ * @scenario                           Gets the boolean value from the runtime information.\n
+ *                                                     Creates a player handle for playing multimedia content.\n
+ *                                                     Gets the player's current state. \n
+ *                                                     Sets the data source (file-path, http or rtsp URI) to use. \n
+ *                                                     Prepares the media player for playback.\n
+ *                                                     get the volume for preservation\n
+ *                                                     Sets the player's volume.\n
+ *                                                     player starts while gmainloop starts.\n
+ *                                                     player stops while gmainloop stops.\n
+ *                                                     set the preserved volume\n
+ *                                                     Resets the media player.\n
+ *                                                     Destroys the media player handle and releases all its resources.
+ * @apicovered                         runtime_info_get_value_bool,player_create, player_get_state, player_set_uri, player_prepare, player_get_volume, player_set_volume, player_start, player_stop, player_unprepare, player_destroy
+ * @passcase                           covered api should return zero success value or earphone is connected not to test speaker
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       Earphone should be removed from the device
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_Player_IsSupportedSpeaker_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_Player_IsSupportedSpeaker_p.", API_NAMESPACE);
+       
+       float fLeft = 1.0, fRight = 1.0, fPreserveLeftVol = 0.0, fPreserveRightVol = 0.0;
+       int nRet = PLAYER_ERROR_NONE;
+       g_PlayerHandler = NULL;
+       g_MainLoopPlayer = g_main_loop_new (NULL, 0);
+       if ( PlayerInitialization(true, MeidaType_Audio) != true )
+       {
+               if ( g_PlayerHandler )
+               {
+                       PlayerDestroy(false);
+               }
+               return 1;
+       }
+       if ( PlayerSetVolume(&fPreserveLeftVol, &fPreserveRightVol, fLeft, fRight) != true )
+       {
+               PlayerDestroy(true);
+               return 1;
+       }       
+       g_nPlayerWaitLoopCounter = 0;
+       g_timeout_add_seconds(1, (GSourceFunc)PlayerGmainLoopCallBack, "Player data");
+       g_main_loop_run(g_MainLoopPlayer);
+       
+       // restore the volume
+       nRet = player_set_volume(g_PlayerHandler, fPreserveLeftVol, fPreserveRightVol);
+       if ( nRet != PLAYER_ERROR_NONE )
+       {               
+               PlayerPrintErrorCode("player_set_volume", nRet);
+               g_main_loop_unref(g_MainLoopPlayer);
+               g_MainLoopPlayer = NULL;
+               PlayerDestroy(true);
+               return 1;
+       }
+       g_main_loop_unref(g_MainLoopPlayer);
+       g_MainLoopPlayer = NULL;
+
+       if ( PlayerDestroy(true) != true )
+       {
+               return 1;
+       }       
+       return 0;
+}
+
+//& purpose: check whether the speaker volume control up is working or not 
+//& type : auto
+/**
+ * @testcase                           CTc_Player_SpeakerVolumeControlUp_p
+ * @type                                       Positive
+ * @scenario                           Gets the boolean value from the runtime information\n
+ *                                                     Creates a player handle for playing multimedia content\n
+ *                                                     Gets the player's current state\n
+ *                                                     Sets the data source (file-path, http or rtsp URI) to use\n
+ *                                                     Prepares the media player for playback\n
+ *                                                     get the volume for preservation\n
+ *                                                     Sets the player's volume\n
+ *                                                     Starts or resumes playback\n
+ *                                                     Get the volume of the player\n
+ *                                                     Set the volume of that player with get-value + 0.1\n
+ *                                                     Match those values\n
+ *                                                     Stops playing media content\n
+ *                                                     set the preserved volume\n
+ *                                                     Resets the media player\n
+ *                                                     Destroys the media player handle and releases all its resources
+ * @apicovered                         runtime_info_get_value_bool,player_create, player_get_state, player_set_uri, player_prepare, player_get_volume, player_set_volume, player_start, player_stop, player_unprepare, player_destroy
+ * @passcase                           covered api should return zero success value or earphone is connected not to test speaker
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       Earphone should be removed from the device
+ * @postcondition                      NA
+ * @remarks                                    Volume sets min(0.0) in loop and increases by .1 in each iteration. 
+ */
+int CTc_Player_SpeakerVolumeControlUp_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_Player_SpeakerVolumeControlUp_p \n", API_NAMESPACE);
+       
+       float fLeft = 0.0, fRight = 0.0, fGetLeftVol1 = 0.0, fGetRightVol1 = 0.0, fGetLeftVol2 = 0.0, fGetRightVol2 = 0.0, fPreserveLeftVol = 0.0, fPreserveRightVol = 0.0;
+       int nRet = PLAYER_ERROR_NONE, nFailCount = 0, nLoopCount = 0;
+       
+       g_PlayerHandler = NULL;
+       g_MainLoopPlayer = g_main_loop_new (NULL, 0);
+       if ( PlayerInitialization(true, MeidaType_Audio) != true )
+       {
+               if ( g_PlayerHandler )
+               {
+                       PlayerDestroy(false);
+               }
+               return 1;
+       }
+       if ( PlayerSetVolume(&fPreserveLeftVol, &fPreserveRightVol, fLeft, fRight) != true )
+       {
+               PlayerDestroy(true);
+               return 1;
+       }
+       
+       g_nPlayerWaitLoopCounter = 0;
+       g_timeout_add_seconds(1, (GSourceFunc)PlayerGmainLoopCallBack, "Player data");
+       g_main_loop_run(g_MainLoopPlayer);
+       
+       for ( nLoopCount = 1; nLoopCount < MAX_SPEAKER_VOLUME_CONTROL; nLoopCount++ )
+       {
+               nRet = player_set_volume(g_PlayerHandler,fGetLeftVol1,fGetRightVol1);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       PlayerPrintErrorCode("player_set_volume", nRet);
+                       nFailCount++;
+                       break;
+               }
+               
+               fGetLeftVol2 = fGetRightVol2 = 0.0;
+               
+               nRet = player_get_volume(g_PlayerHandler,&fGetLeftVol2,&fGetRightVol2);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       PlayerPrintErrorCode("player_get_volume", nRet);
+                       nFailCount++;
+                       break;
+               }
+               if ((fGetLeftVol2 != fGetLeftVol1 ) || (fGetRightVol2 != fGetRightVol1))
+               {
+                       nFailCount++;
+                       fprintf(fpLog,"\\n[%s] set and get values are mismatch ! \n", API_NAMESPACE);
+               }
+               fGetLeftVol1 = fGetLeftVol1 + 0.1;
+               fGetRightVol1 = fGetRightVol1 + 0.1;
+       }
+       if ( nFailCount > 0 )
+       {
+               PlayerDestroy(true);
+               g_main_loop_unref(g_MainLoopPlayer);
+               g_MainLoopPlayer = NULL;
+               return 1;
+       }       
+       g_main_loop_unref(g_MainLoopPlayer);
+       g_MainLoopPlayer = NULL;
+       // restore the volume
+       nRet = player_set_volume(g_PlayerHandler,fPreserveLeftVol,fPreserveRightVol);
+       if ( nRet != PLAYER_ERROR_NONE )
+       {
+               PlayerPrintErrorCode("player_set_volume", nRet);
+               PlayerDestroy(true);
+               return 1;
+       }
+       
+       if ( PlayerDestroy(true) != true )
+       {
+               return 1;
+       }
+       return 0;
+}
+//& purpose: check whether the speaker volume control Down is working or not 
+//& type : auto
+/**
+ * @testcase                           CTc_Player_SpeakerVolumeControlDown_p
+ * @type                                       Positive
+ * @scenario                           Gets the boolean value from the runtime information\n
+ *                                                     Creates a player handle for playing multimedia content\n
+ *                                                     Gets the player's current state\n
+ *                                                     Sets the data source (file-path, http or rtsp URI) to use\n
+ *                                                     Prepares the media player for playback\n
+ *                                                     Get the volume for preservation\n
+ *                                                     Sets the player's volume\n
+ *                                                     Starts or resumes playback\n
+ *                                                     Get the volume of the player\n
+ *                                                     Set the volume of that player with get-value - 0.1\n
+ *                                                     Match those values\n
+ *                                                     Stops playing media content\n
+ *                                                     Set the preserved volume\n
+ *                                                     Resets the media player\n
+ *                                                     Destroys the media player handle and releases all its resources
+ * @apicovered                         runtime_info_get_value_bool,player_create, player_get_state, player_set_uri, player_prepare, player_get_volume, player_set_volume, player_start, player_stop, player_unprepare, player_destroy
+ * @passcase                           covered api should return zero success value or earphone is connected not to test speaker
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       Earphone should be removed from the device
+ * @postcondition                      NA
+ * @remarks                                    Volume sets max(1.0) in loop and decreases by .1 in each iteration.
+ */
+int CTc_Player_SpeakerVolumeControlDown_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_Player_SpeakerVolumeControlDown_p.", API_NAMESPACE);
+       
+       float fLeft = 1.0, fRight = 1.0, fGetLeftVol1 = 1.0, fGetRightVol1 = 1.0, fGetLeftVol2 = 0.0, fGetRightVol2 = 0.0, fPreserveLeftVol = 0.0, fPreserveRightVol = 0.0;
+       int nRet = PLAYER_ERROR_NONE, nFailCount = 0, nLoopCount = 0;
+       g_PlayerHandler = NULL;
+       g_MainLoopPlayer = g_main_loop_new (NULL, 0);
+       if ( PlayerInitialization(true, MeidaType_Audio) != true )
+       {
+               
+               if ( g_PlayerHandler )
+               {
+                       PlayerDestroy(false);
+               }
+               return 1;
+       }
+       if ( PlayerSetVolume(&fPreserveLeftVol, &fPreserveRightVol, fLeft, fRight) != true )
+       {
+               PlayerDestroy(true);
+               return 1;
+       }
+       g_nPlayerWaitLoopCounter = 0;
+       g_timeout_add_seconds(1, (GSourceFunc)PlayerGmainLoopCallBack, "Player data");
+       g_main_loop_run(g_MainLoopPlayer);
+       
+       for ( nLoopCount = 1; nLoopCount < MAX_SPEAKER_VOLUME_CONTROL; nLoopCount++ )
+       {
+               nRet = player_set_volume(g_PlayerHandler, fGetLeftVol1, fGetRightVol1);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       PlayerPrintErrorCode("player_set_volume", nRet);
+                       nFailCount++;
+                       break;
+               }
+               sleep(2);
+               nRet = player_get_volume(g_PlayerHandler, &fGetLeftVol2, &fGetRightVol2);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       PlayerPrintErrorCode("player_get_volume", nRet);
+                       nFailCount++;
+                       break;
+               }
+               
+               if ((fGetLeftVol2 != fGetLeftVol1 ) || (fGetRightVol2 != fGetRightVol1 ))
+               {
+                       nFailCount++;
+                       fprintf(fpLog,"\\n[%s] set and get values are mismatch ! \n", API_NAMESPACE);
+               }
+               fGetLeftVol1 = fGetLeftVol1 - 0.1;
+               fGetRightVol1 = fGetRightVol1 - 0.1;
+       }
+       if (nFailCount > 0)
+       {
+               PlayerDestroy(true);
+               g_main_loop_unref(g_MainLoopPlayer);
+               g_MainLoopPlayer = NULL;
+               return 1;
+       }
+       g_main_loop_unref(g_MainLoopPlayer);
+       g_MainLoopPlayer = NULL;
+       
+       // restore the volume
+       nRet = player_set_volume(g_PlayerHandler, fPreserveLeftVol, fPreserveRightVol);
+       if ( nRet != PLAYER_ERROR_NONE )
+       {
+               PlayerPrintErrorCode("player_set_volume", nRet);
+               PlayerDestroy(true);
+               return 1;
+       }
+
+       if ( PlayerDestroy(true) != true )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: check whether the speaker volume control mute is working or not
+//& type : auto
+/**
+ * @testcase                           CTc_Player_SpeakerVolumeControlMute_p
+ * @type                                       Positive
+ * @scenario                           Gets the boolean value from the runtime information\n
+ *                                                     Creates a player handle for playing multimedia content\n
+ *                                                     Gets the player's current state\n
+ *                                                     Sets the data source (file-path, http or rtsp URI) to use\n
+ *                                                     Prepares the media player for playback\n
+ *                                                     Get the volume for preservation\n
+ *                                                     Sets the player's volume\n
+ *                                                     Starts or resumes playback\n
+ *                                                     Sets the player's mute status\n
+ *                                                     Gets the player's mute status\n
+ *                                                     Stops playing media content\n
+ *                                                     Set the preserved volume\n
+ *                                                     Resets the media player\n
+ *                                                     Destroys the media player handle and releases all its resources
+ * @apicovered                         runtime_info_get_value_bool,player_create, player_get_state, player_set_uri, player_prepare, player_get_volume, player_set_volume, player_start, player_stop, player_set_mute, player_is_muted, player_unprepare, player_destroy
+ * @passcase                           covered api should return zero success value or earphone is connected not to test speaker
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       Earphone should be removed from the device
+ * @postcondition                      NA
+ * @remarks                                    NA 
+ */
+int CTc_Player_SpeakerVolumeControlMute_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_Player_SpeakerVolumeControlMute_p.", API_NAMESPACE);
+       
+       float fLeft = 1.0, fRight = 1.0, fPreserveLeftVol = 0.0, fPreserveRightVol = 0.0;
+       int nRet = PLAYER_ERROR_NONE, nFailCount = 0, nLoopCount = 0;
+       bool bMute = false;
+       bool bIsMuted = true;
+       g_PlayerHandler = NULL;
+       g_MainLoopPlayer = g_main_loop_new (NULL, 0);
+       if ( PlayerInitialization(true, MeidaType_Audio) != true )
+       {
+               if ( g_PlayerHandler )
+               {
+                       PlayerDestroy(false);
+               }
+               return 1;
+       }
+
+       if ( PlayerSetVolume(&fPreserveLeftVol, &fPreserveRightVol, fLeft, fRight) != true )
+       {
+               PlayerDestroy(true);
+               return 1;
+       }
+       
+       g_nPlayerWaitLoopCounter = 0;
+       g_timeout_add_seconds(1, (GSourceFunc)PlayerGmainLoopCallBack, "Player data");
+       g_main_loop_run(g_MainLoopPlayer);
+       
+       for ( nLoopCount = 1; nLoopCount < 9; nLoopCount++ )
+       {
+               bIsMuted = !bIsMuted;
+               bMute = !bMute;
+               
+               nRet = player_set_mute(g_PlayerHandler, bMute);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       nFailCount++;
+                       PlayerPrintErrorCode("player_set_mute", nRet);
+                       break;
+               }
+               sleep(2);
+               nRet = player_is_muted(g_PlayerHandler, &bIsMuted);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       nFailCount++;
+                       PlayerPrintErrorCode("player_is_muted", nRet);
+                       break;
+               }               
+               if (bIsMuted != bMute)
+               {
+                       nFailCount++;
+                       fprintf(fpLog,"\\n[%s] set and get values are mismatched ! \n", API_NAMESPACE);
+               }
+       }
+       
+       if ( nFailCount > 0 )
+       {
+               PlayerDestroy(true);
+               g_main_loop_unref(g_MainLoopPlayer);
+               g_MainLoopPlayer = NULL;
+               return 1;
+       }
+       g_main_loop_unref(g_MainLoopPlayer);
+       g_MainLoopPlayer = NULL;
+       
+       // restore the volume
+       nRet = player_set_volume(g_PlayerHandler, fPreserveLeftVol, fPreserveRightVol);
+       if ( nRet != PLAYER_ERROR_NONE )
+       {
+               PlayerPrintErrorCode("player_set_volume", nRet);
+               PlayerDestroy(true);
+               return 1;
+       }
+       
+       if ( PlayerDestroy(true) != true )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+/** @} */ //end of ctc-player-testcases
+/** @} */ //end of ctc-player
\ No newline at end of file
diff --git a/src/ctc/player/tct-player-native.c b/src/ctc/player/tct-player-native.c
new file mode 100755 (executable)
index 0000000..01a98cb
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-player-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/player/tct-player-native.h b/src/ctc/player/tct-player-native.h
new file mode 100755 (executable)
index 0000000..3c89d72
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_PLAYER_NATIVE_H__
+#define __TCT_PLAYER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_capi_media_player_startup(void);
+extern void CTs_capi_media_player_cleanup(void);
+
+extern int CTc_Player_IsSupportedSpeaker_p(void);
+extern int CTc_Player_SpeakerVolumeControlUp_p(void);
+extern int CTc_Player_SpeakerVolumeControlDown_p(void);
+extern int CTc_Player_SpeakerVolumeControlMute_p(void);
+
+testcase tc_array[] = {
+    {"CTc_Player_IsSupportedSpeaker_p", CTc_Player_IsSupportedSpeaker_p, CTs_capi_media_player_startup, CTs_capi_media_player_cleanup},
+    {"CTc_Player_SpeakerVolumeControlUp_p", CTc_Player_SpeakerVolumeControlUp_p, CTs_capi_media_player_startup, CTs_capi_media_player_cleanup},
+    {"CTc_Player_SpeakerVolumeControlDown_p", CTc_Player_SpeakerVolumeControlDown_p, CTs_capi_media_player_startup, CTs_capi_media_player_cleanup},
+    {"CTc_Player_SpeakerVolumeControlMute_p", CTc_Player_SpeakerVolumeControlMute_p, CTs_capi_media_player_startup, CTs_capi_media_player_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_PLAYER_NATIVE_H__
diff --git a/src/ctc/runtime-info/CMakeLists.txt b/src/ctc/runtime-info/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..bd5fc79
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "runtime-info")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-system-runtime-info")
+SET(TC_SOURCES
+       runtime-info-common.c
+       runtime-info.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       dlog
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/runtime-info/runtime-info-common.c b/src/ctc/runtime-info/runtime-info-common.c
new file mode 100755 (executable)
index 0000000..5401c95
--- /dev/null
@@ -0,0 +1,81 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "runtime-info-common.h"
+
+/** @addtogroup ctc-runtime-info
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+
+/**
+* @function                                    GetSystemRuntimeInfoState
+* @description                                         Gets the boolean value from the runtime information
+* @parameter[IN]                               eRuntimeInfoKey, Enumeration for keys for runtime information
+* @return                                              True if runtime_info_get_value_bool passed otherwise false
+*/
+bool GetSystemRuntimeInfoState(runtime_info_key_e eRuntimeInfoKey)
+{
+       int nRet = RUNTIME_INFO_ERROR_NONE;
+       g_bRuntimeKeyState = false;
+       g_bRuntimeKeyNotSupported = false;
+       
+       nRet = runtime_info_get_value_bool(eRuntimeInfoKey, &g_bRuntimeKeyState);
+       if ( nRet != RUNTIME_INFO_ERROR_NONE )
+       {
+               if ( nRet == TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       g_bRuntimeKeyNotSupported = true;
+                       return true;    
+               }
+               RuntimeErrorInfo("runtime_info_get_value_bool", nRet);
+               return false;
+       }
+
+       return true;
+}
+
+/**
+* @function                                    RuntimeErrorInfo
+* @description                                         print the error of runtime information
+* @parameter[IN]                               nResult, the error code
+*                      [IN]                            pszApiName, API name
+* @return                                              NA
+*/
+void RuntimeErrorInfo(char *pszApiName, int nResult)
+{
+       char* pszErrInfo = NULL;
+       pszErrInfo = (char*)calloc(MEMLOG_SIZE, MEMLOG_SIZE * sizeof(char));
+       if ( NULL == pszErrInfo )
+       {
+               fprintf(fpLog,"\\n[%s] pszErrInfo is NULL \n", API_NAMESPACE);
+               return;
+       }
+       switch(nResult)
+       {
+               case RUNTIME_INFO_ERROR_INVALID_PARAMETER:              strcpy(pszErrInfo, "RUNTIME_INFO_ERROR_INVALID_PARAMETER");             break;
+               case RUNTIME_INFO_ERROR_OUT_OF_MEMORY:                  strcpy(pszErrInfo, "RUNTIME_INFO_ERROR_OUT_OF_MEMORY");                 break;
+               case RUNTIME_INFO_ERROR_IO_ERROR:                               strcpy(pszErrInfo, "RUNTIME_INFO_ERROR_IO_ERROR");                              break;
+               case RUNTIME_INFO_ERROR_PERMISSION_DENIED:              strcpy(pszErrInfo, "RUNTIME_INFO_ERROR_PERMISSION_DENIED");             break; 
+               default:                                                                                strcpy(pszErrInfo, "Unknown Error");
+       }
+       fprintf(fpLog,"\\n[%s] %s is failed, error returned = %s.", API_NAMESPACE, pszApiName, pszErrInfo);
+       free(pszErrInfo);
+       pszErrInfo = NULL;
+}
+
+/** @} */ //end of ctc-runtime-info
\ No newline at end of file
diff --git a/src/ctc/runtime-info/runtime-info-common.h b/src/ctc/runtime-info/runtime-info-common.h
new file mode 100755 (executable)
index 0000000..187d21d
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _RUNTIME_INFO_COMMON_H_
+#define _RUNTIME_INFO_COMMON_H_
+
+//Add test package related includes here
+#include "assert.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <runtime_info.h>
+
+/** @addtogroup ctc-runtime-info
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                  "RUNTIME_INFO_CTC"
+#define MEMLOG_SIZE                            20
+#define TIME_DELAY                             5
+#define        USER_DATA                               "user data"
+#define ERR_LOG                                "/tmp/tclog"
+
+FILE *fpLog;
+
+bool g_bRuntimeKeyState;
+bool g_bRuntimeKeyNotSupported;
+
+//Add helper function declarations here
+
+void RuntimeErrorInfo(char *pszApiName, int nResult);
+bool GetSystemRuntimeInfoState(runtime_info_key_e eRuntimeInfoKey);
+
+/** @} */ //end of ctc-runtime-info
+#endif //_RUNTIME_INFO_COMMON_H_
diff --git a/src/ctc/runtime-info/runtime-info.c b/src/ctc/runtime-info/runtime-info.c
new file mode 100755 (executable)
index 0000000..ad758df
--- /dev/null
@@ -0,0 +1,657 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "runtime-info-common.h"
+
+/** @addtogroup ctc-runtime-info
+* @ingroup             ctc
+* @{
+*/
+
+//& set: RuntimeInfo
+
+/**
+* @function            CTs_runtime_info_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_runtime_info_startup(void)
+{
+       fpLog = NULL;
+       fpLog = fopen(ERR_LOG,"w");
+       return;
+}
+
+/**
+* @function            CTs_runtime_info_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_runtime_info_cleanup(void)
+{
+       fclose(fpLog);
+       fpLog = NULL;
+       return;
+}
+
+/** @addtogroup        ctc-runtime-info-testcases
+* @brief               Integration testcases for module runtime-info
+* @ingroup             ctc-runtime-info
+* @{
+*/
+
+//& purpose: Checks whether Bluetooth is enabled or disabled
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsBluetoothEnabled_p
+ * @type                                       Positive
+ * @scenario                           Checks whether Bluetooth is enabled or disabled from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsBluetoothEnabled_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsBluetoothEnabled_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_BLUETOOTH_ENABLED) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog,"\\n[%s] 'RUNTIME_INFO_KEY_BLUETOOTH_ENABLED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_BLUETOOTH_ENABLED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_BLUETOOTH_ENABLED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether Wifi-Hotspot is enabled or disabled
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsWifiHotspotEnabled_p
+ * @type                                       Positive
+ * @scenario                           Checks whether Wifi-Hotspot is enabled or disabled from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsWifiHotspotEnabled_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsWifiHotspotEnabled_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog,"\\n[%s] 'RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether Bluetooth is enabled or disabled
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsBluetoothTetheringEnabled_p
+ * @type                                       Positive
+ * @scenario                           Checks whether Bluetooth is enabled or disabled from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsBluetoothTetheringEnabled_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsBluetoothTetheringEnabled_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether USB tethering is enabled or disabled
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsUSBTetheringEnabled_p
+ * @type                                       Positive
+ * @scenario                           Checks whether USB tethering is enabled or disabled from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsUSBTetheringEnabled_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsUSBTetheringEnabled_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_USB_TETHERING_ENABLED) == false )
+       {
+               return 1;
+       }
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_USB_TETHERING_ENABLED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_USB_TETHERING_ENABLED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_USB_TETHERING_ENABLED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether the location service is allowed to use location data from GPS satellites
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsLocationServiceEnabled_p
+ * @type                                       Positive
+ * @scenario                           Checks whether the location service is allowed to use location data from GPS satellites from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsLocationServiceEnabled_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsLocationServiceEnabled_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether the location service is allowed to use location data from cellular and Wi-Fi
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsLocationNetPositionEnabled_p
+ * @type                                       Positive
+ * @scenario                           Checks whether the location service is allowed to use location data from cellular and Wi-Fi from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsLocationNetPositionEnabled_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsLocationNetPositionEnabled_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether the packet data through 3G network is enabled
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsKeyPacketDataEnabled_p
+ * @type                                       Positive
+ * @scenario                           Checks whether the packet data through 3G network is enabled from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsKeyPacketDataEnabled_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsKeyPacketDataEnabled_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_PACKET_DATA_ENABLED) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_PACKET_DATA_ENABLED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_PACKET_DATA_ENABLED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_PACKET_DATA_ENABLED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether data roaming is enabled
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsDataRoamingEnabled_p
+ * @type                                       Positive
+ * @scenario                           Checks whether data roaming is enabled from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsDataRoamingEnabled_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsDataRoamingEnabled_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether vibration is enabled
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsVibrationEnabled_p
+ * @type                                       Positive
+ * @scenario                           Checks whether vibration is enabled from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsVibrationEnabled_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsVibrationEnabled_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_VIBRATION_ENABLED) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_VIBRATION_ENABLED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_VIBRATION_ENABLED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_VIBRATION_ENABLED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether audio jack is connected
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsAudioJackConnectedEnabled_p
+ * @type                                       Positive
+ * @scenario                           Checks whether audio jack is connected from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsAudioJackConnectedEnabled_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsAudioJackConnectedEnabled_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether the battery is currently charging or not
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsBatteryCharging_p
+ * @type                                       Positive
+ * @scenario                           Checks whether the battery is currently charging or not from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsBatteryCharging_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsBatteryCharging_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_BATTERY_IS_CHARGING' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_BATTERY_IS_CHARGING Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_BATTERY_IS_CHARGING Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether TV out is connected
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsTVconnected_p
+ * @type                                       Positive
+ * @scenario                           Checks whether TV out is connected from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsTVconnected_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsTVconnected_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_TV_OUT_CONNECTED) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_TV_OUT_CONNECTED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_TV_OUT_CONNECTED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_TV_OUT_CONNECTED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether USB is connected
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsUSBconnected_p
+ * @type                                       Positive
+ * @scenario                           Checks whether USB is connected from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsUSBconnected_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsUSBconnected_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_USB_CONNECTED) == false )
+       {
+               return 1;
+       }
+
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_USB_CONNECTED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_USB_CONNECTED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_USB_CONNECTED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether charger is connected
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsChargerConnected_p
+ * @type                                       Positive
+ * @scenario                           Checks whether charger is connected from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsChargerConnected_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsChargerConnected_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_CHARGER_CONNECTED) == false )
+       {
+               return 1;
+       }
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_CHARGER_CONNECTED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_CHARGER_CONNECTED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_CHARGER_CONNECTED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+//& purpose: Checks whether auto rotation is enabled
+//& type: auto
+/**
+ * @testcase                           CTc_RuntimeInfo_IsAutoRotationEnabled_p
+ * @type                                       Positive
+ * @scenario                           Checks whether auto rotation is enabled from the runtime information.
+ * @apicovered                         runtime_info_get_value_bool
+ * @passcase                           If runtime_info_get_value_bool gets the current state of the given key from runtime information successfully
+ * @failcase                           If runtime_info_get_value_bool fails to get the current state of the given key from runtime information
+ * @precondition                       NA
+ * @postcondition                      NA
+ * @remarks                                    NA
+ */
+int CTc_RuntimeInfo_IsAutoRotationEnabled_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_RuntimeInfo_IsAutoRotationEnabled_p.", API_NAMESPACE);
+       
+       if ( GetSystemRuntimeInfoState(RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED) == false )
+       {
+               return 1;
+       }
+       if ( g_bRuntimeKeyNotSupported )
+       {
+               fprintf(fpLog, "\\n[%s] 'RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED' Key is not supported\\n", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( g_bRuntimeKeyState )
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED Key is Enabled", API_NAMESPACE);
+       }
+       else
+       {
+               fprintf(fpLog,"\\n [%s] RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED Key is Disabled", API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+/** @} */ //end of ctc-runtime-info-testcases
+/** @} */ //end of ctc-runtime-info
\ No newline at end of file
diff --git a/src/ctc/runtime-info/tct-runtime-info-native.c b/src/ctc/runtime-info/tct-runtime-info-native.c
new file mode 100755 (executable)
index 0000000..e7087c2
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-runtime-info-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/runtime-info/tct-runtime-info-native.h b/src/ctc/runtime-info/tct-runtime-info-native.h
new file mode 100755 (executable)
index 0000000..c0c7878
--- /dev/null
@@ -0,0 +1,59 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_RUNTIME_INFO_NATIVE_H__
+#define __TCT_RUNTIME_INFO_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_runtime_info_startup(void);
+extern void CTs_runtime_info_cleanup(void);
+
+extern int CTc_RuntimeInfo_IsBluetoothEnabled_p(void);
+extern int CTc_RuntimeInfo_IsWifiHotspotEnabled_p(void);
+extern int CTc_RuntimeInfo_IsBluetoothTetheringEnabled_p(void);
+extern int CTc_RuntimeInfo_IsUSBTetheringEnabled_p(void);
+extern int CTc_RuntimeInfo_IsLocationServiceEnabled_p(void);
+extern int CTc_RuntimeInfo_IsLocationNetPositionEnabled_p(void);
+extern int CTc_RuntimeInfo_IsKeyPacketDataEnabled_p(void);
+extern int CTc_RuntimeInfo_IsDataRoamingEnabled_p(void);
+extern int CTc_RuntimeInfo_IsVibrationEnabled_p(void);
+extern int CTc_RuntimeInfo_IsAudioJackConnectedEnabled_p(void);
+extern int CTc_RuntimeInfo_IsBatteryCharging_p(void);
+extern int CTc_RuntimeInfo_IsTVconnected_p(void);
+extern int CTc_RuntimeInfo_IsUSBconnected_p(void);
+extern int CTc_RuntimeInfo_IsChargerConnected_p(void);
+extern int CTc_RuntimeInfo_IsAutoRotationEnabled_p(void);
+
+testcase tc_array[] = {
+    {"CTc_RuntimeInfo_IsBluetoothEnabled_p", CTc_RuntimeInfo_IsBluetoothEnabled_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsWifiHotspotEnabled_p", CTc_RuntimeInfo_IsWifiHotspotEnabled_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsBluetoothTetheringEnabled_p", CTc_RuntimeInfo_IsBluetoothTetheringEnabled_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsUSBTetheringEnabled_p", CTc_RuntimeInfo_IsUSBTetheringEnabled_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsLocationServiceEnabled_p", CTc_RuntimeInfo_IsLocationServiceEnabled_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsLocationNetPositionEnabled_p", CTc_RuntimeInfo_IsLocationNetPositionEnabled_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsKeyPacketDataEnabled_p", CTc_RuntimeInfo_IsKeyPacketDataEnabled_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsDataRoamingEnabled_p", CTc_RuntimeInfo_IsDataRoamingEnabled_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsVibrationEnabled_p", CTc_RuntimeInfo_IsVibrationEnabled_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsAudioJackConnectedEnabled_p", CTc_RuntimeInfo_IsAudioJackConnectedEnabled_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsBatteryCharging_p", CTc_RuntimeInfo_IsBatteryCharging_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsTVconnected_p", CTc_RuntimeInfo_IsTVconnected_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsUSBconnected_p", CTc_RuntimeInfo_IsUSBconnected_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsChargerConnected_p", CTc_RuntimeInfo_IsChargerConnected_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {"CTc_RuntimeInfo_IsAutoRotationEnabled_p", CTc_RuntimeInfo_IsAutoRotationEnabled_p, CTs_runtime_info_startup, CTs_runtime_info_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_RUNTIME_INFO_NATIVE_H__
diff --git a/src/ctc/sensor/CMakeLists.txt b/src/ctc/sensor/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..71a071d
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "sensor")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-system-sensor")
+SET(TC_SOURCES
+       sensor-common.c
+       sensor.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/sensor/sensor-common.c b/src/ctc/sensor/sensor-common.c
new file mode 100755 (executable)
index 0000000..985963c
--- /dev/null
@@ -0,0 +1,260 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "sensor-common.h"
+
+/** @addtogroup ctc-sensor
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+
+/**
+ * @function           SystemInformationErrorInfo
+ * @description        Display the details error information
+ * @parameter[IN]      pszApi  [the name of api for which error code is to be checked],
+ *                      [IN]   nError  [the error code which has to be converted to string]
+ * @return                     NA
+ *
+ */
+void SystemInformationErrorInfo(char *pszApi,int nError)
+{
+       char* pszErrInfo = NULL;
+       pszErrInfo = (char*)calloc(MEMLOG_SIZE, MEMLOG_SIZE * sizeof(char));
+       if ( NULL == pszErrInfo )
+       {
+               return;
+       }
+       switch ( nError )
+       {
+               case SYSTEM_INFO_ERROR_PERMISSION_DENIED:       strcpy(pszErrInfo, "SYSTEM_INFO_ERROR_PERMISSION_DENIED");              break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       strcpy(pszErrInfo, "SYSTEM_INFO_ERROR_INVALID_PARAMETER");              break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           strcpy(pszErrInfo, "SYSTEM_INFO_ERROR_OUT_OF_MEMORY");                  break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        strcpy(pszErrInfo, "SYSTEM_INFO_ERROR_IO_ERROR");                               break;
+               default:                                                                        strcpy(pszErrInfo, "Unknown_Error");
+       }
+
+       fprintf(fpLog, "\\n[%s] %s failed , error returned = %s.",API_NAMESPACE, pszApi,pszErrInfo);
+       free(pszErrInfo);
+       pszErrInfo = NULL;
+}
+
+/**
+ * @function                   IsSupportedSensor
+ * @description                        Gets the system information if the specific key supports in device or not
+ * @parameter[IN]              pKey [the specific key]
+ * @return                             true if api passed otherwise false
+ *
+ */
+bool IsSupportedSensor(char *pKey)
+{
+       g_bIsSupportedSensor = false;
+       int nRet = system_info_get_platform_bool(pKey, &g_bIsSupportedSensor);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInformationErrorInfo("system_info_get_platform_bool", nRet);
+               return false;
+       }
+       // Note: The out parameter g_bIsSupportedSensor is checked in Tc file because the TC result will depends on that value.
+       return true;
+}
+
+
+/**
+* @function            SensorApiErrorInfo
+* @description                 Get details error message
+* @parameter[IN]       nRet    [API return Code]
+*                      [IN]    pszApi  [the name of api for which error code is to be checked] 
+* @parameter[OUT]      NA
+* @return                      NA 
+*/
+void SensorApiErrorInfo(char *pszApi,int nRet)
+{
+       char *pszErrMSG = NULL;
+       pszErrMSG = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG_SIZE * sizeof(char));
+       if ( NULL == pszErrMSG )
+       {
+               return;
+       }
+       switch ( nRet )
+       {
+               case SENSOR_ERROR_IO_ERROR:                                     strcpy(pszErrMSG, "SENSOR_ERROR_IO_ERROR");                                     break;
+               case SENSOR_ERROR_INVALID_PARAMETER:                    strcpy(pszErrMSG, "SENSOR_ERROR_INVALID_PARAMETER");            break;
+               case SENSOR_ERROR_OUT_OF_MEMORY:                                strcpy(pszErrMSG, "SENSOR_ERROR_OUT_OF_MEMORY" );                       break;
+               case SENSOR_ERROR_NOT_NEED_CALIBRATION:                 strcpy(pszErrMSG, "SENSOR_ERROR_NOT_NEED_CALIBRATION ");        break;
+               case SENSOR_ERROR_NOT_SUPPORTED:                                strcpy(pszErrMSG, "SENSOR_ERROR_NOT_SUPPORTED");                        break;
+               case SENSOR_ERROR_OPERATION_FAILED:                             strcpy(pszErrMSG, "SENSOR_ERROR_OPERATION_FAILED");                     break;
+               case SENSOR_ERROR_PERMISSION_DENIED:                    strcpy(pszErrMSG, "SENSOR_ERROR_PERMISSION_DENIED");            break;
+               default:                                                                                strcpy(pszErrMSG, "Returned error is UNKNOWN" );
+       
+       }
+       fprintf (fpLog, "\\n[%s] %s is failed, error returned = %s (%d)", API_NAMESPACE, pszApi, pszErrMSG, nRet);
+       free(pszErrMSG);
+       pszErrMSG = NULL;
+}
+
+/**
+* @function            SensorCreate
+* @description                 check if sensor is supported and create sensor
+* @parameter[IN]       NA 
+* @parameter[OUT]      NA
+* @return                      True if sensor is  created otherwise return false. 
+*/
+
+bool  SensorCreate( )
+{
+       int nRet = sensor_create_listener(g_hSensor,&g_listener);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {  
+               SensorApiErrorInfo("sensor_create_listener", nRet);
+        return false;
+       }
+       
+       if ( g_listener == NULL )
+       {
+               fprintf(fpLog, "\\n[%s] sensor_create_listener return Null listener ", API_NAMESPACE);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            SensorCheckSupport
+* @description                 check if sensor is supported 
+* @parameter[IN]       eSensorType 
+* @parameter[OUT]      NA
+* @return                      True if sensor is supported  otherwise return false. 
+*/
+bool SensorCheckSupport(sensor_type_e eSensorType)
+{
+       bool bIsSupported =false;
+       int nRet = sensor_is_supported(eSensorType, &bIsSupported);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {   
+               SensorApiErrorInfo("sensor_is_supported", nRet);
+               return false;
+       }
+       
+       if ( !bIsSupported )
+       {
+               fprintf(fpLog, "\\n[%s] Sensor is not supported ", API_NAMESPACE);
+               return false;
+       }
+       
+       return true;
+}
+
+/**
+* @function            SensorGetDefaultSensor
+* @description                 Gets a specific sensor handle. 
+* @parameter[IN]       eSensorType 
+* @parameter[OUT]      NA
+* @return                      True if gets a specific sensor handle otherwise return false. 
+*/
+bool SensorGetDefaultSensor(sensor_type_e eSensorType)
+{
+       int nRet = sensor_get_default_sensor(eSensorType, &g_hSensor);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {  
+               SensorApiErrorInfo("sensor_get_default_sensor", nRet);
+               return false;
+       }
+       
+       if(g_hSensor == NULL)
+       {
+               fprintf(fpLog, "\\n[%s] sensor_get_default_sensor  return Null handle ", API_NAMESPACE);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            SensorIsStart
+* @description                 start sensor
+* @parameter[IN]       NA
+* @parameter[OUT]      NA
+* @return                      True if sensor is started otherwise return false.
+*/
+bool SensorIsStart()
+{
+       int nRet = sensor_listener_start(g_listener);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {   
+               SensorApiErrorInfo("sensor_listener_start", nRet);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            SensorUnsetcb
+* @description                 Unregisters the  callback function
+* @parameter[IN]       NA
+* @parameter[OUT]      NA
+* @return                      True if Unregisters the  callback function otherwise return false.
+*/
+
+bool SensorUnsetcb()
+{
+       int nRet = sensor_listener_unset_event_cb(g_listener);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_listener_unset_event_cb", nRet);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            SensorStop
+* @description                 stop and destroy sensor
+* @parameter[IN]       NA
+* @parameter[OUT]      NA
+* @return                      True if sensor is stop  properly otherwise return false.
+*/
+
+bool SensorStop()
+{
+       int nRet = sensor_listener_stop(g_listener);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_listener_stop", nRet);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            SensorDestroy
+* @description                 Destroy sensor
+* @parameter[IN]       NA
+* @parameter[OUT]      NA
+* @return                      True if sensor is  destroyed properly otherwise return false.  
+*/
+
+bool SensorDestroy()
+{
+       int nRet = sensor_destroy_listener(g_listener);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_destroy_listener", nRet);
+               return false;
+       }
+       return true;
+}
+
+/** @} */ //end of ctc-sensor
\ No newline at end of file
diff --git a/src/ctc/sensor/sensor-common.h b/src/ctc/sensor/sensor-common.h
new file mode 100755 (executable)
index 0000000..acab0da
--- /dev/null
@@ -0,0 +1,105 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _SENSOR_COMMON_H_
+#define _SENSOR_COMMON_H_
+
+//Add test package related includes here
+#include "assert.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <pthread.h>
+#include <sensor.h>
+#include <sys/time.h>
+#include <glib.h>
+#include <system_info.h>
+
+/** @addtogroup ctc-sensor
+* @ingroup             ctc
+* @{
+*/
+
+static const int MIN_INTERVAL[] = {
+       20, // Acceleration
+       20, // Magnetic
+       20, // Gyro 
+       100, //Light(Photometer)
+       100, //Proximity        
+       100, //Gravity
+       100, //Linear Acceleration
+       100, //Orientation
+       100 //Rotation Vector   
+};
+
+static const float DATA_RANGE[10][3] = {
+       {-19.6,    19.6,     0.1}, // Acceleration
+       {-1200, 1200,  1}, // Magnetic
+       {-573.0, 573.0,  0.1}, // Gyroscope
+       {0,     45000, 1}, // Light (Photometer)
+       {0,     5,     1}, // Proximity
+       {-19.6,     19.6,     0.1}, // Gravity
+       {-19.6,     19.6,     0.1}, // Linear Acceleration
+       {-360,     360,     1}, // Orientation
+       {-1,     1,     1} // Rotation Vector
+};
+
+#define API_NAMESPACE                  "SENSOR_CTC"
+#define MAX_BLOCK_SIZE                 20 
+#define SENSOR_VALUE                   1000
+#define ERR_LOG                                "/tmp/tclog"
+#define MEMLOG_SIZE                            20
+
+FILE *fpLog;
+
+int g_nSensonrDelay;
+bool g_bIsSupportedSensor;
+sensor_type_e eSensorType;
+sensor_h g_hSensor;
+struct sensor_listener_s *g_listener;
+
+enum sensorstype_e {
+       ACCELERATION = 0,
+       MAGNETIC,
+       GYRO,
+       LIGHT,
+       PROXIMITY,
+       GRAVITY,
+       LINEAR_ACCELERATION,
+       ORIENTATION,
+       ROTATION_VECTOR,
+       TILT
+};
+enum sensorspec_e {
+       MIN_RANGE_SENSOR = 0,
+       MAX_RANGE_SENSOR,
+       RESOLUTION_SENSOR
+};
+
+
+//Add helper function declarations here
+void SensorApiErrorInfo(char *pszApi,int nRet);
+bool SensorCreate();
+bool SensorCheckSupport(sensor_type_e eSensorType);
+bool SensorGetDefaultSensor(sensor_type_e eSensorType);
+bool SensorIsStart();
+bool SensorStop();
+bool SensorDestroy();
+bool SensorUnsetcb();
+bool IsSupportedSensor(char *pKey);
+void SystemInformationErrorInfo(char *pszApi,int nError);
+
+/** @} */ //end of ctc-sensor
+#endif  //_SENSOR_COMMON_H_
diff --git a/src/ctc/sensor/sensor.c b/src/ctc/sensor/sensor.c
new file mode 100755 (executable)
index 0000000..5689afb
--- /dev/null
@@ -0,0 +1,896 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "sensor-common.h"
+
+/** @addtogroup ctc-sensor
+* @ingroup             ctc
+* @{
+*/
+
+//& set: Sensor
+
+/**
+* @function            CTs_sensor_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_sensor_startup(void)
+{
+       fpLog = NULL;
+       fpLog = fopen(ERR_LOG,"w");
+       return;
+}
+
+/**
+* @function            CTs_sensor_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_sensor_cleanup(void)
+{
+       fclose(fpLog);
+       fpLog = NULL;
+       g_hSensor = NULL;
+       return;
+}
+
+/**
+ * @function           Sensor_event_cb
+ * @description        Called when an sensor event occurs. 
+ * @parameter          g_hSensor               [The sensor handle.] \n
+ *                                     pEvent                  [The event information.]\n
+ *                                     pUserdata               [The user data passed from the callback registration function.]
+ * @return                     NA
+ *
+ */ 
+
+static void Sensor_event_cb (sensor_h g_hSensor, sensor_event_s *pEvent, void *pUserdata)
+{
+       static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+       pthread_mutex_lock(&mutex);
+       pthread_mutex_unlock(&mutex);
+       pthread_mutex_destroy(&mutex);          
+       
+}
+
+/** @addtogroup        ctc-sensor-testcases
+* @brief               Integration testcases for module sensor
+* @ingroup             ctc-sensor
+* @{
+*/
+
+//& purpose: Check whether the accelerometer sensor is supported or not 
+//& type: auto
+/**
+ *@testcase                                    CTc_Sensor_SensorIsSupported_acceleration_p
+ *@type                                                auto
+ *@scenario                                    Check if acceleration sensor is supported\n
+ *                                                     Gets Acceleration sensor handle\n
+ *                                                     Creates a sensor handle\n
+ *                                                     Registers a callback function to be invoked when a accelerometer event occurs\n
+ *                                                     Starts a sensor server for a given sensor handle and sensor type\n
+ *                                                     Stops a sensor server for a given sensor handle and type\n
+ *                                                     Unregisters the accelerometer callback function\n
+ *                                                     destroy a sensor handle
+ * @apicovered                         sensor_is_supported,sensor_get_default_sensor,sensor_create_listener,sensor_listener_set_event_cb,sensor_listener_start,sensor_listener_unset_event_cb,sensor_listener_stop,sensor_destroy_listener
+ * @passcase                           covered api should return zero success value and and accelerometer sensor must be supported in device.
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       Shake the device for the execution of testcase.
+ * @postcondition                      NA 
+ */
+int CTc_Sensor_SensorIsSupported_acceleration_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_Sensor_SensorIsSupported_acceleration_p ", API_NAMESPACE);
+       
+       g_hSensor = NULL;
+       g_listener = NULL;
+       int nRet = SENSOR_ERROR_NONE;
+       unsigned int nIntervalms = 0;
+       
+       if ( IsSupportedSensor("tizen.org/feature/sensor.accelerometer") == false )
+       {
+               return 1;
+       }
+       
+       if ( g_bIsSupportedSensor == false )
+       {
+               fprintf(fpLog,"\\n[%s] Device doesn't Support Accelerometer.", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( SensorCheckSupport(SENSOR_ACCELEROMETER) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorGetDefaultSensor(SENSOR_ACCELEROMETER) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorCreate() == false )
+       {       
+               return 1;
+       }
+       
+       nIntervalms = MIN_INTERVAL[ACCELERATION];
+       
+       nRet = sensor_listener_set_event_cb(g_listener, nIntervalms, Sensor_event_cb, NULL);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_listener_set_event_cb", nRet);
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorIsStart() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorStop() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorUnsetcb() == false )
+       {       
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorDestroy() == false )
+       {       
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check whether the Magnetic sensor is supported or not 
+//& type: auto
+/**
+ *@testcase                                    CTc_Sensor_SensorIsSupported_Magnetic_p
+ *@type                                                auto
+ *@scenario                                    Check if Magnetic sensor is supported\n
+ *                                                     Gets Magnetic sensor handle\n
+ *                                                     Creates a sensor handle\n
+ *                                                     Registers a callback function to be invoked when a Magnetic event occurs\n
+ *                                                     Starts a sensor server for a given sensor handle and sensor type\n
+ *                                                     Stops a sensor server for a given sensor handle and type\n
+ *                                                     Unregisters the accelerometer callback function\n
+ *                                                     destroy a sensor handle
+ * @apicovered                         sensor_is_supported,sensor_get_default_sensor,sensor_create_listener,sensor_listener_set_event_cb,sensor_listener_start,sensor_listener_unset_event_cb,sensor_listener_stop,sensor_destroy_listener
+ * @passcase                           covered api should return zero success value and and Magnetic sensor must be supported in device.
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       NA
+ * @postcondition                      NA 
+ */
+int CTc_Sensor_SensorIsSupported_Magnetic_p(void)
+{      
+       fprintf(fpLog,"\\n[%s] Executing Testcase:CTc_Sensor_SensorIsSupported_Magnetic_p ", API_NAMESPACE);
+       
+       g_hSensor = NULL;
+       g_listener = NULL;
+       int nRet = SENSOR_ERROR_NONE;
+       unsigned int nIntervalms = 0;
+        
+       if ( IsSupportedSensor("tizen.org/feature/sensor.magnetometer") == false )
+       {
+               return 1;
+       }
+       
+       if ( g_bIsSupportedSensor == false )
+       {
+               fprintf(fpLog,"\\n[%s] Device doesn't Support Magnetometer.", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( SensorCheckSupport(SENSOR_MAGNETIC) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorGetDefaultSensor(SENSOR_MAGNETIC) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorCreate() == false )
+       {       
+               return 1;
+       }
+       
+       nIntervalms = MIN_INTERVAL[MAGNETIC];   
+       nRet = sensor_listener_set_event_cb(g_listener, nIntervalms, Sensor_event_cb, NULL);
+       
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_listener_set_event_cb", nRet);
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorIsStart() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+               
+       if ( SensorStop() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorUnsetcb() == false )
+       {       
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorDestroy() == false )
+       {       
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check whether the light sensor is supported or not 
+//& type: auto
+/**
+ *@testcase                                    CTc_Sensor_SensorIsSupported_light_p
+ *@type                                                auto
+ *@scenario                                    Check if light sensor is supported\n
+ *                                                     Gets Photometer(Light) sensor handle\n
+ *                                                     Creates a sensor handle\n
+ *                                                     Registers a callback function to be invoked when a light event occurs\n
+ *                                                     Starts a sensor server for a given sensor handle and sensor type\n
+ *                                                     Stops a sensor server for a given sensor handle and type\n
+ *                                                     Unregisters the accelerometer callback function\n
+ *                                                     destroy a sensor handle
+ * @apicovered                         sensor_is_supported,sensor_get_default_sensor,sensor_create_listener,sensor_listener_set_event_cb,sensor_listener_start,sensor_listener_unset_event_cb,sensor_listener_stop,sensor_destroy_listener
+ * @passcase                           covered api should return zero success value and and light sensor must be supported in device.
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       NA
+ * @postcondition                      NA 
+ */
+int CTc_Sensor_SensorIsSupported_light_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase:CTc_Sensor_SensorIsSupported_light_p ", API_NAMESPACE);
+       
+       g_hSensor = NULL;
+       g_listener = NULL;
+       int nRet = SENSOR_ERROR_NONE;
+       unsigned int nIntervalms = 0;
+       
+       if ( IsSupportedSensor("tizen.org/feature/sensor.photometer") == false )
+       {
+               return 1;
+       }
+       
+       if ( g_bIsSupportedSensor == false )
+       {
+               fprintf(fpLog,"\\n[%s] Device doesn't Support Photometer.", API_NAMESPACE);
+               return 0;
+       }
+
+       if ( SensorCheckSupport(SENSOR_LIGHT) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorGetDefaultSensor(SENSOR_LIGHT) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorCreate() == false )
+       {       
+               return 1;
+       }
+       
+       nIntervalms = MIN_INTERVAL[LIGHT];
+       nRet = sensor_listener_set_event_cb(g_listener, nIntervalms, Sensor_event_cb, NULL);
+       
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_listener_set_event_cb", nRet);
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorIsStart() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorStop() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorUnsetcb() == false )
+       {       
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorDestroy() == false )
+       {       
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check whether the gyroscope sensor is supported or not 
+//& type: auto
+/**
+ *@testcase                                    CTc_Sensor_SensorIsSupported_gyroscope_p
+ *@type                                                auto
+ *@scenario                                    Check if gyroscope sensor is supported\n
+ *                                                     Gets gyroscope sensor handle\n
+ *                                                     Creates a sensor handle\n
+ *                                                     Registers a callback function to be invoked when a gyroscope event occurs\n
+ *                                                     Starts a sensor server for a given sensor handle and sensor type\n
+ *                                                     Stops a sensor server for a given sensor handle and type\n
+ *                                                     Unregisters the accelerometer callback function\n
+ *                                                     destroy a sensor handle
+ * @apicovered                         sensor_is_supported,sensor_get_default_sensor,sensor_create_listener,sensor_listener_set_event_cb,sensor_listener_start,sensor_listener_unset_event_cb,sensor_listener_stop,sensor_destroy_listener
+ * @passcase                           covered api should return zero success value and and gyroscope sensor must be supported in device.
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       Shake the device for the execution of testcase.
+ * @postcondition                      NA 
+ */
+int CTc_Sensor_SensorIsSupported_gyroscope_p(void)
+{
+       fprintf(fpLog,"\\n[%s]Executing Testcase: CTc_Sensor_SensorIsSupported_gyroscope_p", API_NAMESPACE);
+       
+       g_hSensor = NULL;
+       g_listener = NULL;
+       int nRet = SENSOR_ERROR_NONE;
+       unsigned int nIntervalms = 0;
+       
+       if ( IsSupportedSensor("tizen.org/feature/sensor.gyroscope") == false )
+       {
+               return 1;
+       }
+       
+       if ( g_bIsSupportedSensor == false )
+       {
+               fprintf(fpLog,"\\n[%s] Device doesn't Support Gyroscope.", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( SensorCheckSupport(SENSOR_GYROSCOPE) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorGetDefaultSensor(SENSOR_GYROSCOPE) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorCreate() == false )
+       {       
+               return 1;
+       }
+       
+       nIntervalms = MIN_INTERVAL[GYRO];       
+       nRet = sensor_listener_set_event_cb(g_listener, nIntervalms, Sensor_event_cb, NULL);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_listener_set_event_cb", nRet);
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorIsStart() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       if ( SensorStop() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorUnsetcb() == false )
+       {       
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorDestroy() == false )
+       {       
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check whether the Proximity sensor is supported or not 
+//& type: auto
+/**
+ *@testcase                                    CTc_Sensor_SensorIsSupported_Proximity_p
+ *@type                                                auto
+ *@scenario                                    Check if Proximity sensor is supported\n
+ *                                                     Gets Proximity sensor handle\n
+ *                                                     Creates a sensor handle\n
+ *                                                     Registers a callback function to be invoked when a Proximity event occurs\n
+ *                                                     Starts a sensor server for a given sensor handle and sensor type\n
+ *                                                     Stops a sensor server for a given sensor handle and type\n
+ *                                                     Unregisters the accelerometer callback function\n
+ *                                                     destroy a sensor handle
+ * @apicovered                         sensor_is_supported,sensor_get_default_sensor,sensor_create_listener,sensor_listener_set_event_cb,sensor_listener_start,sensor_listener_unset_event_cb,sensor_listener_stop,sensor_destroy_listener
+ * @passcase                           covered api should return zero success value and and tilt Proximity must be supported in device.
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       Proximity sensor detects how far is the user from the device and detection range start from 4cm.
+ * @postcondition                      NA 
+ */
+int CTc_Sensor_SensorIsSupported_Proximity_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_Sensor_SensorIsSupported_Proximity_p ", API_NAMESPACE);
+       
+       g_hSensor = NULL;
+       g_listener = NULL;
+       int nRet = SENSOR_ERROR_NONE;
+       unsigned int nIntervalms = 0;
+        
+       if ( IsSupportedSensor("tizen.org/feature/sensor.proximity") == false )
+       {
+               return 1;
+       }
+       
+       if ( g_bIsSupportedSensor == false )
+       {
+               fprintf(fpLog,"\\n[%s] Device doesn't Support Proximity.", API_NAMESPACE);
+               return 0;
+       }
+       if ( SensorCheckSupport(SENSOR_PROXIMITY) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorGetDefaultSensor(SENSOR_PROXIMITY) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorCreate() == false )
+       {       
+               return 1;
+       }
+       
+       nIntervalms = MIN_INTERVAL[PROXIMITY];
+       nRet = sensor_listener_set_event_cb(g_listener, nIntervalms, Sensor_event_cb, NULL);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_listener_set_event_cb", nRet);
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorIsStart() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorStop() == false )
+       {
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorUnsetcb() == false )
+       {       
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorDestroy() == false )
+       {       
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check whether the gravity sensor is supported or not 
+//& type: auto
+/**
+ *@testcase                                    CTc_Sensor_SensorIsSupported_Gravity_p
+ *@type                                                auto
+ *@scenario                                    Check if gravity sensor is supported\n
+ *                                                     Gets Gravity sensor handle\n
+ *                                                     Creates a sensor handle\n
+ *                                                     Registers a callback function to be invoked when a gravity event occurs\n
+ *                                                     Starts a sensor server for a given sensor handle and sensor type\n
+ *                                                     Stops a sensor server for a given sensor handle and type\n
+ *                                                     Unregisters the gravity callback function\n
+ *                                                     destroy a sensor handle
+ * @apicovered                         sensor_is_supported,sensor_get_default_sensor,sensor_create_listener,sensor_listener_set_event_cb,sensor_listener_start,sensor_listener_unset_event_cb,sensor_listener_stop,sensor_destroy_listener
+ * @passcase                           covered api should return zero success value and and gravity sensor must be supported in device.
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       NA
+ * @postcondition                      NA 
+ */
+int CTc_Sensor_SensorIsSupported_Gravity_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_Sensor_SensorIsSupported_Gravity_p ", API_NAMESPACE);
+       
+       g_hSensor = NULL;
+       g_listener = NULL;
+       int nRet = SENSOR_ERROR_NONE;
+       unsigned int nIntervalms = 0;
+       
+       if ( IsSupportedSensor("tizen.org/feature/sensor.gravity") == false )
+       {
+               return 1;
+       }
+       
+       if ( g_bIsSupportedSensor == false )
+       {
+               fprintf(fpLog,"\\n[%s] Device doesn't Support Gravity.", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( SensorCheckSupport(SENSOR_GRAVITY) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorGetDefaultSensor(SENSOR_GRAVITY) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorCreate() == false )
+       {       
+               return 1;
+       }
+       
+       nIntervalms = MIN_INTERVAL[GRAVITY];
+       
+       nRet = sensor_listener_set_event_cb(g_listener, nIntervalms, Sensor_event_cb, NULL);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_listener_set_event_cb", nRet);
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorIsStart() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorStop() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorUnsetcb() == false )
+       {       
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorDestroy() == false )
+       {       
+               return 1;
+       }
+       return 0;
+}
+
+
+//& purpose: Check whether the linear acceleration sensor is supported or not 
+//& type: auto
+/**
+ *@testcase                                    CTc_Sensor_SensorIsSupported_Linear_Acceleration_p
+ *@type                                                auto
+ *@scenario                                    Check if linear acceleration sensor is supported\n
+ *                                                     Gets Linear Acceleration sensor handle\n
+ *                                                     Creates a sensor handle\n
+ *                                                     Registers a callback function to be invoked when a linear acceleration event occurs\n
+ *                                                     Starts a sensor server for a given sensor handle and sensor type\n
+ *                                                     Stops a sensor server for a given sensor handle and type\n
+ *                                                     Unregisters the linear acceleration callback function\n
+ *                                                     destroy a sensor handle
+ * @apicovered                         sensor_is_supported,sensor_get_default_sensor,sensor_create_listener,sensor_listener_set_event_cb,sensor_listener_start,sensor_listener_unset_event_cb,sensor_listener_stop,sensor_destroy_listener
+ * @passcase                           covered api should return zero success value and and linear acceleration sensor must be supported in device.
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       NA
+ * @postcondition                      NA 
+ */
+int CTc_Sensor_SensorIsSupported_Linear_Acceleration_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_Sensor_SensorIsSupported_Linear_Acceleration_p ", API_NAMESPACE);
+       
+       g_hSensor = NULL;
+       g_listener = NULL;
+       int nRet = SENSOR_ERROR_NONE;
+       unsigned int nIntervalms = 0;
+       
+       if ( IsSupportedSensor("tizen.org/feature/sensor.linear_acceleration") == false )
+       {
+               return 1;
+       }
+       
+       if ( g_bIsSupportedSensor == false )
+       {
+               fprintf(fpLog,"\\n[%s] Device doesn't Support Linear Acceleration.", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( SensorCheckSupport(SENSOR_LINEAR_ACCELERATION) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorGetDefaultSensor(SENSOR_LINEAR_ACCELERATION) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorCreate() == false )
+       {       
+               return 1;
+       }
+       
+       nIntervalms = MIN_INTERVAL[LINEAR_ACCELERATION];
+       
+       nRet = sensor_listener_set_event_cb(g_listener, nIntervalms, Sensor_event_cb, NULL);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_listener_set_event_cb", nRet);
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorIsStart() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorStop() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorUnsetcb() == false )
+       {       
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorDestroy() == false )
+       {       
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Check whether the orientation sensor is supported or not 
+//& type: auto
+/**
+ *@testcase                                    CTc_Sensor_SensorIsSupported_Orientation_p
+ *@type                                                auto
+ *@scenario                                    Check if orientation sensor is supported\n
+ *                                                     Gets Orientation sensor handle\n
+ *                                                     Creates a sensor handle\n
+ *                                                     Registers a callback function to be invoked when a orientation event occurs\n
+ *                                                     Starts a sensor server for a given sensor handle and sensor type\n
+ *                                                     Stops a sensor server for a given sensor handle and type\n
+ *                                                     Unregisters the orientation callback function\n
+ *                                                     destroy a sensor handle
+ * @apicovered                         sensor_is_supported,sensor_get_default_sensor,sensor_create_listener,sensor_listener_set_event_cb,sensor_listener_start,sensor_listener_unset_event_cb,sensor_listener_stop,sensor_destroy_listener
+ * @passcase                           covered api should return zero success value and and orientation sensor must be supported in device.
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       NA
+ * @postcondition                      NA 
+ */
+int CTc_Sensor_SensorIsSupported_Orientation_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_Sensor_SensorIsSupported_Orientation_p ", API_NAMESPACE);
+       
+       g_hSensor = NULL;
+       g_listener = NULL;
+       int nRet = SENSOR_ERROR_NONE;
+       unsigned int nIntervalms = 0;
+       
+       if ( IsSupportedSensor("http://tizen.org/feature/sensor.tiltmeter") == false )
+       {
+               return 1;
+       }
+       
+       if ( g_bIsSupportedSensor == false )
+       {
+               fprintf(fpLog,"\\n[%s] Device doesn't Support Orientation.", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( SensorCheckSupport(SENSOR_ORIENTATION) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorGetDefaultSensor(SENSOR_ORIENTATION) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorCreate() == false )
+       {       
+               return 1;
+       }
+       
+       nIntervalms = MIN_INTERVAL[ORIENTATION];
+       
+       nRet = sensor_listener_set_event_cb(g_listener, nIntervalms, Sensor_event_cb, NULL);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_listener_set_event_cb", nRet);
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorIsStart() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorStop() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorUnsetcb() == false )
+       {       
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorDestroy() == false )
+       {       
+               return 1;
+       }
+       return 0;
+}
+
+
+//& purpose: Check whether the rotation vector sensor is supported or not 
+//& type: auto
+/**
+ *@testcase                                    CTc_Sensor_SensorIsSupported_Rotation_Vector_p
+ *@type                                                auto
+ *@scenario                                    Check if rotation vector sensor is supported\n
+ *                                                     Gets Rotation Vector sensor handle\n
+ *                                                     Creates a sensor handle\n
+ *                                                     Registers a callback function to be invoked when a Rotation Vector event occurs\n
+ *                                                     Starts a sensor server for a given sensor handle and sensor type\n
+ *                                                     Stops a sensor server for a given sensor handle and type\n
+ *                                                     Unregisters the Rotation vector callback function\n
+ *                                                     destroy a sensor handle
+ * @apicovered                         sensor_is_supported,sensor_get_default_sensor,sensor_create_listener,sensor_listener_set_event_cb,sensor_listener_start,sensor_listener_unset_event_cb,sensor_listener_stop,sensor_destroy_listener
+ * @passcase                           covered api should return zero success value and and Rotation Vector sensor must be supported in device.
+ * @failcase                           covered api returns negative error value 
+ * @precondition                       NA
+ * @postcondition                      NA 
+ */
+int CTc_Sensor_SensorIsSupported_Rotation_Vector_p(void)
+{
+       fprintf(fpLog,"\\n[%s] Executing Testcase: CTc_Sensor_SensorIsSupported_Rotation_Vector_p ", API_NAMESPACE);
+       
+       g_hSensor = NULL;
+       g_listener = NULL;
+       int nRet = SENSOR_ERROR_NONE;
+       unsigned int nIntervalms = 0;
+       
+       if ( IsSupportedSensor("tizen.org/feature/sensor.rotation_vector") == false )
+       {
+               return 1;
+       }
+       
+       if ( g_bIsSupportedSensor == false )
+       {
+               fprintf(fpLog,"\\n[%s] Device doesn't Support Rotation Vector.", API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( SensorCheckSupport(SENSOR_ROTATION_VECTOR) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorGetDefaultSensor(SENSOR_ROTATION_VECTOR) == false )
+       {       
+               return 1;
+       }
+       
+       if ( SensorCreate() == false )
+       {       
+               return 1;
+       }
+       
+       nIntervalms = MIN_INTERVAL[ROTATION_VECTOR];
+       
+       nRet = sensor_listener_set_event_cb(g_listener, nIntervalms, Sensor_event_cb, NULL);
+       if ( nRet != SENSOR_ERROR_NONE )
+       {
+               SensorApiErrorInfo("sensor_listener_set_event_cb", nRet);
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorIsStart() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorStop() == false )
+       {       
+               SensorUnsetcb();
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorUnsetcb() == false )
+       {       
+               SensorDestroy();
+               return 1;
+       }
+       
+       if ( SensorDestroy() == false )
+       {       
+               return 1;
+       }
+       return 0;
+}
+
+/** @} */ //end of ctc-sensor-testcases
+/** @} */ //end of ctc-sensor
\ No newline at end of file
diff --git a/src/ctc/sensor/tct-sensor-native.c b/src/ctc/sensor/tct-sensor-native.c
new file mode 100755 (executable)
index 0000000..686ad79
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-sensor-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/sensor/tct-sensor-native.h b/src/ctc/sensor/tct-sensor-native.h
new file mode 100755 (executable)
index 0000000..74d29b8
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SENSOR_NATIVE_H__
+#define __TCT_SENSOR_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_sensor_startup(void);
+extern void CTs_sensor_cleanup(void);
+
+extern int CTc_Sensor_SensorIsSupported_acceleration_p(void);
+extern int CTc_Sensor_SensorIsSupported_Magnetic_p(void);
+extern int CTc_Sensor_SensorIsSupported_light_p(void);
+extern int CTc_Sensor_SensorIsSupported_gyroscope_p(void);
+extern int CTc_Sensor_SensorIsSupported_Proximity_p(void);
+extern int CTc_Sensor_SensorIsSupported_Gravity_p(void);
+extern int CTc_Sensor_SensorIsSupported_Linear_Acceleration_p(void);
+extern int CTc_Sensor_SensorIsSupported_Orientation_p(void);
+extern int CTc_Sensor_SensorIsSupported_Rotation_Vector_p(void);
+
+testcase tc_array[] = {
+    {"CTc_Sensor_SensorIsSupported_acceleration_p", CTc_Sensor_SensorIsSupported_acceleration_p, CTs_sensor_startup, CTs_sensor_cleanup},
+    {"CTc_Sensor_SensorIsSupported_Magnetic_p", CTc_Sensor_SensorIsSupported_Magnetic_p, CTs_sensor_startup, CTs_sensor_cleanup},
+    {"CTc_Sensor_SensorIsSupported_light_p", CTc_Sensor_SensorIsSupported_light_p, CTs_sensor_startup, CTs_sensor_cleanup},
+    {"CTc_Sensor_SensorIsSupported_gyroscope_p", CTc_Sensor_SensorIsSupported_gyroscope_p, CTs_sensor_startup, CTs_sensor_cleanup},
+    {"CTc_Sensor_SensorIsSupported_Proximity_p", CTc_Sensor_SensorIsSupported_Proximity_p, CTs_sensor_startup, CTs_sensor_cleanup},
+    {"CTc_Sensor_SensorIsSupported_Gravity_p", CTc_Sensor_SensorIsSupported_Gravity_p, CTs_sensor_startup, CTs_sensor_cleanup},
+    {"CTc_Sensor_SensorIsSupported_Linear_Acceleration_p", CTc_Sensor_SensorIsSupported_Linear_Acceleration_p, CTs_sensor_startup, CTs_sensor_cleanup},
+    {"CTc_Sensor_SensorIsSupported_Orientation_p", CTc_Sensor_SensorIsSupported_Orientation_p, CTs_sensor_startup, CTs_sensor_cleanup},
+    {"CTc_Sensor_SensorIsSupported_Rotation_Vector_p", CTc_Sensor_SensorIsSupported_Rotation_Vector_p, CTs_sensor_startup, CTs_sensor_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SENSOR_NATIVE_H__
diff --git a/src/ctc/sound-manager/CMakeLists.txt b/src/ctc/sound-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..a3f7861
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "sound-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-media-sound-manager")
+SET(TC_SOURCES
+       sound-manager-common.c
+       sound-manager.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-system-info
+       capi-media-tone-player
+       capi-media-player
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/sound-manager/sound-manager-common.c b/src/ctc/sound-manager/sound-manager-common.c
new file mode 100755 (executable)
index 0000000..de2dcb1
--- /dev/null
@@ -0,0 +1,52 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "sound-manager-common.h"
+
+/** @addtogroup ctc-sound-manager
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+
+/**
+ * @function           SoundManagerGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* SoundManagerGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               case SOUND_MANAGER_ERROR_NONE : szErrorVal = "SOUND_MANAGER_ERROR_NONE" ; break; 
+               case SOUND_MANAGER_ERROR_OUT_OF_MEMORY : szErrorVal = "SOUND_MANAGER_ERROR_OUT_OF_MEMORY" ; break; 
+               case SOUND_MANAGER_ERROR_INVALID_PARAMETER : szErrorVal = "SOUND_MANAGER_ERROR_INVALID_PARAMETER" ; break; 
+               case SOUND_MANAGER_ERROR_INVALID_OPERATION : szErrorVal = "SOUND_MANAGER_ERROR_INVALID_OPERATION" ; break;
+               case SOUND_MANAGER_ERROR_PERMISSION_DENIED : szErrorVal = "SOUND_MANAGER_ERROR_PERMISSION_DENIED" ; break;
+               case SOUND_MANAGER_ERROR_NOT_SUPPORTED : szErrorVal = "SOUND_MANAGER_ERROR_NOT_SUPPORTED" ; break;
+               case SOUND_MANAGER_ERROR_NO_DATA : szErrorVal = "SOUND_MANAGER_ERROR_NO_DATA" ; break;
+               case SOUND_MANAGER_ERROR_NO_PLAYING_SOUND : szErrorVal = "SOUND_MANAGER_ERROR_NO_PLAYING_SOUND" ; break;
+               case SOUND_MANAGER_ERROR_INTERNAL : szErrorVal = "SOUND_MANAGER_ERROR_INTERNAL" ; break;
+               case SOUND_MANAGER_ERROR_POLICY : szErrorVal = "SOUND_MANAGER_ERROR_POLICY" ; break;
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/** @} */ //end of ctc-sound-manager
\ No newline at end of file
diff --git a/src/ctc/sound-manager/sound-manager-common.h b/src/ctc/sound-manager/sound-manager-common.h
new file mode 100755 (executable)
index 0000000..545ad07
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _SOUND_MANAGER_COMMON_H_
+#define _SOUND_MANAGER_COMMON_H_
+
+//Add test package related includes here
+#include "assert.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <sound_manager.h>
+
+/** @addtogroup ctc-sound-manager
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                  "SOUND_MANAGER_CTC"
+#define ERR_LOG                                "/tmp/tclog"
+FILE *fpLog;
+
+/********************************** HELPER FUNCTIONS *******************************/
+
+//returns sound-manager error messages
+char* SoundManagerGetError(int nRet);
+
+/** @} */ //end of ctc-sound-manager
+#endif  //_SOUND_MANAGER_COMMON_H_
diff --git a/src/ctc/sound-manager/sound-manager.c b/src/ctc/sound-manager/sound-manager.c
new file mode 100755 (executable)
index 0000000..6192d22
--- /dev/null
@@ -0,0 +1,93 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "sound-manager-common.h"
+
+/** @addtogroup ctc-sound-manager
+* @ingroup             ctc
+* @{
+*/
+
+//& set: Audio output devices
+
+/**
+* @function            CTs_sound_manager_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_sound_manager_startup(void)
+{
+       fpLog = fopen(ERR_LOG, "w");
+       return;
+}
+
+/**
+* @function            CTs_sound_manager_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_sound_manager_cleanup(void)
+{
+       fclose(fpLog);
+       return;
+}
+
+/** @addtogroup        ctc-sound-manager-testcases
+* @brief               Integration testcases for module sound-manager
+* @ingroup             ctc-sound-manager
+* @{
+*/
+
+//& purpose: To get the list of audio output devices connected
+//& type: auto
+/**
+ * @testcase                           CTc_sound_manager_get_audio_output_device_list_p
+ * @type                                       Positive
+ * @description                                To get the list of audio output devices connected
+ * @scenario                           gets the list of audio output devices connected
+ * @apicovered                         sound_manager_get_current_device_list
+ * @passcase                           When api return SOUND_MANAGER_ERROR_NONE and the list of audio output devices is not NULL
+ * @failcase                           When api doesn't return SOUND_MANAGER_ERROR_NONE or the list of audio output devices is NULL
+ * @precondition                       None
+ * @postcondition                      None
+ */
+int CTc_sound_manager_get_audio_output_device_list_p(void)
+{
+
+       fprintf(fpLog, "\\n[%s] Executing testcase - CTc_sound_manager_get_audio_output_device_list_p.", API_NAMESPACE);
+       
+       sound_device_list_h audioOutDeviceList = NULL;
+       sound_device_mask_e e_device_mask = SOUND_DEVICE_IO_DIRECTION_OUT_MASK ;                /*< Mask for output devices */
+
+       int nRetVal = sound_manager_get_current_device_list(e_device_mask, &audioOutDeviceList);
+       if ( nRetVal != SOUND_MANAGER_ERROR_NONE )
+       {
+               fprintf(fpLog, "\\n[SoundManager_CTc]sound_manager_get_current_device_list failed , error returned = %s ", SoundManagerGetError(nRetVal));
+               return 1;
+       }
+       if ( audioOutDeviceList == NULL )
+       {
+               fprintf(fpLog, "\\n[SoundManager_CTc]sound_manager_get_current_device_list failed , device list returned is NULL ");
+               return 1;
+       }
+
+       fprintf(fpLog, "\\n[SoundManager_CTc]Target supports at least one audio output device.");
+       return 0;
+}
+
+/** @} */ //end of ctc-sound-manager-testcases
+/** @} */ //end of ctc-sound-manager
\ No newline at end of file
diff --git a/src/ctc/sound-manager/tct-sound-manager-native.c b/src/ctc/sound-manager/tct-sound-manager-native.c
new file mode 100755 (executable)
index 0000000..8baaeed
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-sound-manager-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/sound-manager/tct-sound-manager-native.h b/src/ctc/sound-manager/tct-sound-manager-native.h
new file mode 100755 (executable)
index 0000000..3ff2e49
--- /dev/null
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SOUND_MANAGER_NATIVE_H__
+#define __TCT_SOUND_MANAGER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_sound_manager_startup(void);
+extern void CTs_sound_manager_cleanup(void);
+
+extern int CTc_sound_manager_get_audio_output_device_list_p(void);
+
+testcase tc_array[] = {
+    {"CTc_sound_manager_get_audio_output_device_list_p", CTc_sound_manager_get_audio_output_device_list_p, CTs_sound_manager_startup, CTs_sound_manager_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SOUND_MANAGER_NATIVE_H__
diff --git a/src/ctc/system-info/CMakeLists.txt b/src/ctc/system-info/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..0ca37fc
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "system-info")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-system-info")
+SET(TC_SOURCES
+       system-info-common.c
+       system-info.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       dlog
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/system-info/system-info-common.c b/src/ctc/system-info/system-info-common.c
new file mode 100755 (executable)
index 0000000..d576d06
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "system-info-common.h"
+
+/** @addtogroup ctc-system-info
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+
+/**
+* @function                            SystemInfoError
+* @description                                 print the error of sysinfo information
+* @parameter[IN]                       nResult, the error code
+*                      [IN]                    pszApiName, API name
+* @return                                      NA
+*/
+void SystemInfoError(char *pszApiName, int nResult)
+{
+       char *pszErrLog = NULL;
+       pszErrLog = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG * sizeof(char));
+       if ( NULL == pszErrLog )
+       {
+               fprintf (fpLog,"\\n[%s] Memory Allocation is failed", API_NAMESPACE);
+               return;
+       }
+       switch ( nResult )
+       {
+               case SYSTEM_INFO_ERROR_PERMISSION_DENIED:       strcpy(pszErrLog, "SYSTEM_INFO_ERROR_PERMISSION_DENIED");       break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       strcpy(pszErrLog, "SYSTEM_INFO_ERROR_INVALID_PARAMETER");       break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           strcpy(pszErrLog, "SYSTEM_INFO_ERROR_OUT_OF_MEMORY");           break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        strcpy(pszErrLog,  "SYSTEM_INFO_ERROR_IO_ERROR");                       break;
+               default:                                                                        strcpy(pszErrLog,  "UNKNOWN");
+       }
+       fprintf (fpLog,"\\n[%s] %s is failed, error returned = %s.", API_NAMESPACE, pszApiName, pszErrLog);
+       SAFE_FREE(pszErrLog);
+}
+
+/** @} */ //end of ctc-system-info
\ No newline at end of file
diff --git a/src/ctc/system-info/system-info-common.h b/src/ctc/system-info/system-info-common.h
new file mode 100755 (executable)
index 0000000..a5acdfe
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _SYSTEM_INFO_COMMON_H_
+#define _SYSTEM_INFO_COMMON_H_
+
+#include "assert.h"
+//Add test package related includes here
+#include <system_info.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+/** @addtogroup ctc-system-info
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                  "SYSTEM_INFO_CTC"
+#define MAX_BLOCK_SIZE                 25
+#define MEMLOG                                         20
+#define SCREEN_BPP_VALUES              32
+#define SCREEN_HEIGHT                  320
+#define SCREEN_WIDTH                   240
+#define KEY_SCREEN_BPP                         "tizen.org/feature/screen.bpp"
+#define KEY_SCREEN_HEIGHT              "tizen.org/feature/screen.height"
+#define KEY_SCREEN_WIDTH               "tizen.org/feature/screen.width"
+#define KEY_USB_HOST                   "tizen.org/feature/usb.host"
+#define KEY_USB_ACCESSORY              "tizen.org/feature/usb.accessory"
+#define SAFE_FREE(src)                 { if(src) {free(src); src = NULL;}}
+#define ERR_LOG                                "/tmp/tclog"
+
+FILE *fpLog;
+
+//Add helper function declarations here
+
+void SystemInfoError(char *pszApiName, int nResult);
+
+/** @} */ //end of ctc-system-info
+#endif   //_SYSTEM_INFO_COMMON_H_
diff --git a/src/ctc/system-info/system-info.c b/src/ctc/system-info/system-info.c
new file mode 100755 (executable)
index 0000000..50425b7
--- /dev/null
@@ -0,0 +1,205 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "system-info-common.h"
+
+/** @addtogroup ctc-system-info
+* @ingroup             ctc
+* @{
+*/
+
+//& set: SystemInfo
+
+/**
+* @function            CTs_system_info_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_system_info_startup(void)
+{
+       fpLog = NULL;
+       fpLog = fopen(ERR_LOG, "w");
+       return;
+}
+
+/**
+* @function            CTs_system_info_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_system_info_cleanup(void)
+{
+       fclose(fpLog);
+       fpLog = NULL;
+       return;
+}
+
+/** @addtogroup        ctc-system-info-testcases
+* @brief               Integration testcases for module system-info
+* @ingroup             ctc-system-info
+* @{
+*/
+
+//& purpose: Device screen height and width get test 
+//& type: auto
+/**
+* @testcase                    CTc_SystemInfo_DisplayMinimum_p
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Gets the Device Screen Height\n
+*                                      Gets the Device Screen Width\n
+*                                      Checks the minimum Device screen height and width or not. 
+* @apicovered          system_info_get_platform_int
+* @passcase                    If covered API is success and gives valid output value.
+* @failcase                    If covered API is not success or gives invalid output value.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_SystemInfo_DisplayMinimum_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_SystemInfo_DisplayMinimum_p", API_NAMESPACE);
+       int nRet = SYSTEM_INFO_ERROR_NONE, nScreenHeight = 0, nScreenWidth = 0;
+       
+       nRet = system_info_get_platform_int(KEY_SCREEN_HEIGHT, &nScreenHeight);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+       SystemInfoError("system_info_get_platform_int", nRet);
+               return 1;
+       }
+       fprintf(fpLog, "\\n[%s] Screen height : %d.",API_NAMESPACE, nScreenHeight);
+       
+       nRet = system_info_get_platform_int(KEY_SCREEN_WIDTH, &nScreenWidth);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInfoError("system_info_get_platform_int", nRet);
+               return 1;
+       }
+       fprintf(fpLog, "\\n[%s] Screen width : %d.",API_NAMESPACE,nScreenWidth);
+       if ( nScreenWidth < SCREEN_WIDTH )
+       {
+               fprintf(fpLog, "\\n[%s] Screen width is less than standard screen width : %d !",API_NAMESPACE, SCREEN_HEIGHT);
+               return 1;
+       }
+       if ( nScreenHeight < SCREEN_HEIGHT )
+       {
+               fprintf(fpLog, "\\n[%s] Screen height is less than standard screen height : %d !",API_NAMESPACE, SCREEN_WIDTH);
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: Device screen Bpp(Bit per pixels)get test 
+//& type: auto
+/**
+* @testcase                    CTc_SystemInfo_DisplayBPP_p
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Gets the Device Screen BPP(Bit per pixels)\n
+*                                      Checks the BPP values with standard Screen BPP
+* @apicovered          system_info_get_platform_int
+* @passcase                    If covered API is success and gives valid output value.
+* @failcase                    If covered API is not success or gives invalid output value.
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_SystemInfo_DisplayBPP_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_SystemInfo_DisplayBpp_p", API_NAMESPACE);
+       
+       int nScreenBpp = 0;
+       int nRet = system_info_get_platform_int(KEY_SCREEN_BPP, &nScreenBpp);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInfoError("system_info_get_platform_int", nRet);
+               return 1;
+       }
+       fprintf(fpLog, "\\n[%s] Screen Bpp : %d.",API_NAMESPACE, nScreenBpp);
+       
+       if ( nScreenBpp != (int)SCREEN_BPP_VALUES )
+       {
+               fprintf(fpLog, "\\n[%s] Screen Bpp is getting failed. It is not %d! ",API_NAMESPACE, SCREEN_BPP_VALUES);
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: A purpose of checking if support USB host
+//&type: auto
+/**
+* @testcase                    CTc_SystemInfo_IsSupportedUsbHost_p
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Checks the device if supports USB host
+* @apicovered          system_info_get_platform_bool
+* @passcase                    Covered API return zero success value
+* @failcase                    Covered API returns negative error value 
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_SystemInfo_IsSupportedUsbHost_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_SystemInfo_IsSupportedUsbHost_p.", API_NAMESPACE);
+       
+       bool bIsSupportedUsbHost = false;
+       int nRet = system_info_get_platform_bool(KEY_USB_HOST, &bIsSupportedUsbHost);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInfoError("system_info_get_platform_bool", nRet);
+               return 1;
+       }
+       
+       if ( bIsSupportedUsbHost == false )
+       {
+               fprintf(fpLog, "\\n[%s] Device doesn't Support USB host.", API_NAMESPACE);
+       }
+       return 0;
+}
+
+//& purpose: A purpose of checking if support USB accessory
+//&type: auto
+/**
+* @testcase                    CTc_SystemInfo_IsSupportedUsbAccessory_p
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Checks the device if supports USB Accessory
+* @apicovered          system_info_get_platform_bool
+* @passcase                    covered API return zero success value
+* @failcase                    covered API returns negative error value 
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_SystemInfo_IsSupportedUsbAccessory_p(void)
+{
+       fprintf(fpLog, "\\n[%s] Executing Testcase: CTc_SystemInfo_IsSupportedUsbAccessory_p \n", API_NAMESPACE);
+       
+       bool bIsSupportedUsbAccessory = false;
+       int nRet = system_info_get_platform_bool(KEY_USB_ACCESSORY, &bIsSupportedUsbAccessory);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInfoError("system_info_get_platform_bool", nRet);
+               return 1;
+       }
+       
+       if ( bIsSupportedUsbAccessory == false )
+       {
+               fprintf(fpLog, "\\n[%s] Device doesn't Support USB Accessory.", API_NAMESPACE);
+       }
+       return 0;
+}
+
+/** @} */ //end of ctc-system-info-testcases
+/** @} */ //end of ctc-system-info
\ No newline at end of file
diff --git a/src/ctc/system-info/tct-system-info-native.c b/src/ctc/system-info/tct-system-info-native.c
new file mode 100755 (executable)
index 0000000..1e9bbd1
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-system-info-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/system-info/tct-system-info-native.h b/src/ctc/system-info/tct-system-info-native.h
new file mode 100755 (executable)
index 0000000..94d8ca3
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SYSTEM_INFO_NATIVE_H__
+#define __TCT_SYSTEM_INFO_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_system_info_startup(void);
+extern void CTs_system_info_cleanup(void);
+
+extern int CTc_SystemInfo_DisplayMinimum_p(void);
+extern int CTc_SystemInfo_DisplayBPP_p(void);
+extern int CTc_SystemInfo_IsSupportedUsbHost_p(void);
+extern int CTc_SystemInfo_IsSupportedUsbAccessory_p(void);
+
+testcase tc_array[] = {
+    {"CTc_SystemInfo_DisplayMinimum_p", CTc_SystemInfo_DisplayMinimum_p, CTs_system_info_startup, CTs_system_info_cleanup},
+    {"CTc_SystemInfo_DisplayBPP_p", CTc_SystemInfo_DisplayBPP_p, CTs_system_info_startup, CTs_system_info_cleanup},
+    {"CTc_SystemInfo_IsSupportedUsbHost_p", CTc_SystemInfo_IsSupportedUsbHost_p, CTs_system_info_startup, CTs_system_info_cleanup},
+    {"CTc_SystemInfo_IsSupportedUsbAccessory_p", CTc_SystemInfo_IsSupportedUsbAccessory_p, CTs_system_info_startup, CTs_system_info_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SYSTEM_INFO_NATIVE_H__
diff --git a/src/ctc/telephony/CMakeLists.txt b/src/ctc/telephony/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..929421b
--- /dev/null
@@ -0,0 +1,37 @@
+SET(PKG_NAME "telephony")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "capi-telephony")
+SET(TC_SOURCES
+       telephony-common.c
+       telephony.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-messaging-messages
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/ctc/telephony/tct-telephony-native.c b/src/ctc/telephony/tct-telephony-native.c
new file mode 100755 (executable)
index 0000000..6006b70
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-telephony-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/ctc/telephony/tct-telephony-native.h b/src/ctc/telephony/tct-telephony-native.h
new file mode 100755 (executable)
index 0000000..4593172
--- /dev/null
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_TELEPHONY_NATIVE_H__
+#define __TCT_TELEPHONY_NATIVE_H__
+
+#include "testcase.h"
+
+extern void CTs_telephony_startup(void);
+extern void CTs_telephony_cleanup(void);
+
+extern int CTc_telephony_IsSupportedSMS_p(void);
+
+testcase tc_array[] = {
+    {"CTc_telephony_IsSupportedSMS_p", CTc_telephony_IsSupportedSMS_p, CTs_telephony_startup, CTs_telephony_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_TELEPHONY_NATIVE_H__
diff --git a/src/ctc/telephony/telephony-common.c b/src/ctc/telephony/telephony-common.c
new file mode 100755 (executable)
index 0000000..58f0760
--- /dev/null
@@ -0,0 +1,126 @@
+#include "telephony-common.h"
+
+/** @addtogroup ctc-telephony
+* @ingroup             ctc
+* @{
+*/
+
+//Add helper function definitions here
+struct timeval g_stLibslp_TapiTime;
+struct mallinfo g_stLibslp_TapiMemInfo;
+
+bool g_bTAPI_Add_PB_Entry_Callback = false;
+bool g_bTAPI_Write_SMS_In_SIM_Callback = false;
+extern int g_nTAPI_Write_SMS_In_SIM_Index;
+
+bool g_bTAPI_Response_Callback_DialCall = false;
+
+/**
+ * @function           SystemInformationErrorInfo
+ * @description        Display the details error information
+ * @parameter[IN]      pszApi  [the name of api for which error code is to be checked],
+ *                      [IN]   nError  [the error code which has to be converted to string]
+ * @return                     NA
+ *
+ */
+void SystemInformationErrorInfo(char *pszApi,int nError)
+{
+       char* pszErrInfo = NULL;
+       pszErrInfo = (char*)calloc(MEMLOG_SIZE, MEMLOG_SIZE * sizeof(char));
+       if ( pszErrInfo == NULL )
+       {
+               fprintf(fpLog,"\\n[%s] Memory Allocation Failed for pszErrInfo ", API_NAMESPACE);
+               return;
+       }
+       switch ( nError )
+       {
+               case SYSTEM_INFO_ERROR_PERMISSION_DENIED:       strcpy(pszErrInfo,"SYSTEM_INFO_ERROR_PERMISSION_DENIED");       break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       strcpy(pszErrInfo,"SYSTEM_INFO_ERROR_INVALID_PARAMETER");       break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           strcpy(pszErrInfo,"SYSTEM_INFO_ERROR_OUT_OF_MEMORY");           break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        strcpy(pszErrInfo,"SYSTEM_INFO_ERROR_IO_ERROR");                        break;
+               default:                                                                        strcpy(pszErrInfo,"Unknown_Error");
+       }
+
+       fprintf(fpLog,"\\n[%s] %s failed , error returned = %s.", API_NAMESPACE, pszApi,pszErrInfo);
+       free(pszErrInfo);
+       pszErrInfo = NULL;
+}
+
+/**
+ * @function           MessagesGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* MessagesGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {               
+               case MESSAGES_ERROR_INVALID_PARAMETER : szErrorVal = "MESSAGES_ERROR_INVALID_PARAMETER" ; break; 
+               case MESSAGES_ERROR_OUT_OF_MEMORY : szErrorVal = "MESSAGES_ERROR_OUT_OF_MEMORY" ; break;                
+               case MESSAGES_ERROR_SERVER_NOT_READY : szErrorVal = "MESSAGES_ERROR_SERVER_NOT_READY" ; break; 
+               case MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED : szErrorVal = "MESSAGES_ERROR_COMMUNICATION_WITH" ; break; 
+               case MESSAGES_ERROR_OPERATION_FAILED : szErrorVal = "MESSAGES_ERROR_OPERATION_FAILED" ; break; 
+               case MESSAGES_ERROR_SENDING_FAILED : szErrorVal = "MESSAGES_ERROR_SENDING_FAILED" ; break; 
+               case MESSAGES_ERROR_OUT_OF_RANGE : szErrorVal = "MESSAGES_ERROR_OUT_OF_RANGE" ; break;          
+               case MESSAGES_ERROR_NO_SIM_CARD : szErrorVal = "MESSAGES_ERROR_NO_SIM_CARD" ; break; 
+               case MESSAGES_ERROR_NO_DATA : szErrorVal = "MESSAGES_ERROR_NO_DATA" ; break; 
+               case MESSAGES_ERROR_PERMISSION_DENIED : szErrorVal = "MESSAGES_ERROR_PERMISSION_DENIED" ; break;                
+               case MESSAGES_ERROR_NOT_SUPPORTED : szErrorVal = "MESSAGES_ERROR_NOT_SUPPORTED" ; break;                
+               case MESSAGES_ERROR_NONE : szErrorVal = "MESSAGES_ERROR_NONE" ; break;
+               default : szErrorVal = "MESSAGES_ERROR_UNKNOWN" ; break;
+       }
+       
+       return szErrorVal;
+}
+
+/**
+ * @function                   IsSupportedTelephony
+ * @description                        Gets the system information if the specific key supports in device or not
+ * @parameter[IN]              NA
+ * @return                             true if api passed otherwise false
+ *
+ */
+bool IsSupportedTelephony()
+{
+       bool bIsSupportedTelephony = false;
+       int nRet = system_info_get_platform_bool(TELEPHONY_KEY, &bIsSupportedTelephony);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               SystemInformationErrorInfo("system_info_get_platform_bool", nRet);
+               return false;
+       }
+       if ( bIsSupportedTelephony == false )
+       {
+               fprintf(fpLog,"\\n[%s] Telephony is not supported", API_NAMESPACE);     
+               return false;
+       }
+       
+       // Note: The out parameter bIsSupportedTelephony is checked in Tc file because the TC result will depends on that value.
+       return true;
+}
+/**
+ * @function                   IsSupportedTelephonySms
+ * @description                        Gets the system information if the specific key supports in device or not
+ * @parameter[IN]              NA
+ * @return                             true if api passed otherwise false
+ *
+ */
+bool IsSupportedTelephonySms()
+{
+       bool bIsSupportedTelephonySms = false;
+       int nRet = system_info_get_platform_bool(TELEPHONY_SMS_KEY, &bIsSupportedTelephonySms);
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               return false;
+       }
+       if ( bIsSupportedTelephonySms == false )
+       {       
+               return false;
+       }       
+       // Note: The out parameter g_bIsSupportedTelephony is checked in Tc file because the TC result will depends on that value.
+       return true;
+}
+
+/** @} */ //end of ctc-telephony
\ No newline at end of file
diff --git a/src/ctc/telephony/telephony-common.h b/src/ctc/telephony/telephony-common.h
new file mode 100755 (executable)
index 0000000..bd82c83
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef _TELEPHONY_COMMON_H_
+#define _TELEPHONY_COMMON_H_
+
+//Add test package related includes here
+#include "assert.h"
+#include <stdio.h>
+#include <messages.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <sys/time.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <time.h>
+#include <tapi_common.h>
+#include <TelSim.h>
+#include <TapiUtility.h>
+#include <ITapiSim.h>
+#include <telephony.h>
+#include <system_info.h>
+
+/** @addtogroup ctc-telephony
+* @ingroup             ctc
+* @{
+*/
+
+#define API_NAMESPACE                  "CAPI_TELEPHONY_CTC"
+#define TELEPHONY_KEY                  "http://tizen.org/feature/network.telephony"
+#define TELEPHONY_SMS_KEY              "http://tizen.org/feature/network.telephony.sms"
+#define MEMLOG_SIZE                            20
+#define MEDIA_FILE_PATH                        "/tmp/ITC_Config.txt"
+#define ERR_LOG                                "/tmp/tclog"
+
+FILE *fpLog;
+TapiHandle* g_HandleTAPI;
+bool IsSupportedTelephony();
+bool IsSupportedTelephonySms();
+
+char* MessagesGetError(int nRet);
+
+/** @} */ //end of ctc-telephony
+#endif  //_TELEPHONY_COMMON_H_
diff --git a/src/ctc/telephony/telephony.c b/src/ctc/telephony/telephony.c
new file mode 100755 (executable)
index 0000000..3bc4e02
--- /dev/null
@@ -0,0 +1,103 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "telephony-common.h"
+
+/** @addtogroup ctc-telephony
+* @ingroup             ctc
+* @{
+*/
+
+//& set: Telephony
+
+/**
+* @function            CTs_telephony_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_telephony_startup(void)
+{
+       fpLog = fopen(ERR_LOG,"w");
+       return;
+}
+
+/**
+* @function            CTs_telephony_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void CTs_telephony_cleanup(void)
+{
+       fclose(fpLog);
+       return;
+}
+
+
+/** @addtogroup        ctc-telephony-testcases
+* @brief               Integration testcases for module telephony
+* @ingroup             ctc-telephony
+* @{
+*/
+
+//& purpose: A purpose of sending SMS in device if it supports.
+//&type: auto
+/**
+* @testcase                    CTc_telephony_IsSupportedSMS_MMS_p
+* @since_tizen         2.3
+* @type                        auto
+* @scenario                    Gets a boolean value of the platform feature\n
+*                                      Gets a boolean value of the platform feature for SMS sending
+* @apicovered          system_info_get_platform_bool
+* @passcase                    Covered api should return zero success value
+* @failcase                    Covered api returns negative error value 
+* @precondition                NA
+* @postcondition       NA
+*/
+int CTc_telephony_IsSupportedSMS_p(void)
+{              
+       fprintf(fpLog,"\\n[%d][%s] Executing TestCase CTc_telephony_IsSupportedSMS_p.\n",__LINE__, API_NAMESPACE);
+       int nRet = 0;
+       messages_service_h pstHandleMessageService = NULL;
+       if ( IsSupportedTelephony() == false )
+       {
+               fprintf(fpLog,"\\n[%d][%s] Telephony feature is not supported\n",__LINE__, API_NAMESPACE);      
+               nRet = messages_open_service(&pstHandleMessageService);
+               if ( nRet != MESSAGES_ERROR_NOT_SUPPORTED )
+               {
+                       fprintf(fpLog,"\\n[%d][%s] messages_open_service API return = (%s) for Unsupported telephony feature\n",__LINE__, API_NAMESPACE, MessagesGetError(nRet));       
+                       return 1;
+               }
+               fprintf(fpLog,"\\n[%d][%s] messages_open_service API return Unsupported status for Unsupported telephony feature\n",__LINE__, API_NAMESPACE);                   
+               return 0;
+       }       
+
+       fprintf(fpLog,"\\n[%d][%s] Telephony feature is supported\n",__LINE__, API_NAMESPACE);
+       nRet = messages_open_service(&pstHandleMessageService);
+       if ( nRet != MESSAGES_ERROR_NONE )
+       {
+               fprintf(fpLog,"\\n[%d][%s] messages_open_service API return = (%s) for Supported telephony feature\n",__LINE__, API_NAMESPACE, MessagesGetError(nRet));
+               return 1;       
+       }
+
+       messages_close_service(pstHandleMessageService);
+       
+       fprintf(fpLog,"\\n[%d][%s] messages_open_service API didn't return any error for Supported telephony feature\n",__LINE__, API_NAMESPACE);
+       return 0;
+}
+
+/** @} */ //end of ctc-telephony-testcases
+/** @} */ //end of ctc-telephony
\ No newline at end of file
diff --git a/src/itc/CMakeLists.txt b/src/itc/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..9f63a46
--- /dev/null
@@ -0,0 +1,27 @@
+IF( DEFINED MODULE )
+       SET(MAXCOUNT 1)
+       SET(SPEEDCHECK 0)
+       SET(MEMORYCHECK 0)
+       SET(DEBUGVAL 0)
+       SET(CONFIGFILEPATH "\"/tmp/TC_Config.txt\"")
+       SET(ERR_LOG "\"/tmp/tclog\"")
+IF(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l)
+       SET(ARCHTYPE "\"armv7l\"")
+       SET(ISDEVICE 1)
+ELSE()
+       SET(ARCHTYPE "\"i586\"")
+       SET(ISDEVICE 0)
+ENDIF()
+       add_definitions(-DARCH_TYPE=${ARCHTYPE})
+       add_definitions(-DIS_DEVICE=${ISDEVICE})
+       add_definitions(-DMAX_COUNT=${MAXCOUNT})
+       add_definitions(-DSPEED_CHECK=${SPEEDCHECK})
+       add_definitions(-DMEMORY_CHECK=${MEMORYCHECK})
+       add_definitions(-DDEBUG=${DEBUGVAL})
+       add_definitions(-DCONFIGFILE_PATH=${CONFIGFILEPATH})    
+       add_definitions(-DERR_LOG=${ERR_LOG})
+       MESSAGE(STATUS "Building: ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}")
+       ADD_SUBDIRECTORY(${MODULE})
+ELSE( DEFINED MODULE )
+    MESSAGE(FATAL_ERROR "No module selected to build. Aborting...")
+ENDIF( DEFINED MODULE )
diff --git a/src/itc/app-manager/CMakeLists.txt b/src/itc/app-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..d92aea5
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "app-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-appfw-app-manager")
+SET(TC_SOURCES
+       ITs-app-manager-common.c
+       ITs-app-manager.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-appfw-application
+       bundle
+       capi-base-common
+       dlog
+       gthread-2.0
+       glib-2.0
+       gobject-2.0
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/app-manager/ITs-app-manager-common.c b/src/itc/app-manager/ITs-app-manager-common.c
new file mode 100755 (executable)
index 0000000..0224e73
--- /dev/null
@@ -0,0 +1,202 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-app-manager-common.h"
+
+/** @addtogroup itc-app-manager
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stAppManagerStartTime;
+extern struct mallinfo g_stAppManagerMemInfo;
+
+/**
+* @function            AppManagerGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* AppManagerGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case APP_MANAGER_ERROR_NONE:                                    szErrorVal = "APP_MANAGER_ERROR_NONE";                                          break;
+       case APP_MANAGER_ERROR_INVALID_PARAMETER:               szErrorVal = "APP_MANAGER_ERROR_INVALID_PARAMETE";                      break;
+       case APP_MANAGER_ERROR_OUT_OF_MEMORY:                   szErrorVal = "APP_MANAGER_ERROR_OUT_OF_MEMORY";                         break;
+       case APP_MANAGER_ERROR_IO_ERROR:                                szErrorVal = "APP_MANAGER_ERROR_IO_ERROR";                                      break;
+       case APP_MANAGER_ERROR_NO_SUCH_APP:                             szErrorVal = "APP_MANAGER_ERROR_NO_SUCH_APP";                           break;
+       case APP_MANAGER_ERROR_DB_FAILED:                               szErrorVal = "APP_MANAGER_ERROR_DB_FAILED";                                     break;
+       case APP_MANAGER_ERROR_INVALID_PACKAGE:                 szErrorVal = "APP_MANAGER_ERROR_INVALID_PACKAGE";                       break;
+       case APP_MANAGER_ERROR_APP_NO_RUNNING:                  szErrorVal = "APP_MANAGER_ERROR_APP_NO_RUNNING";                        break;
+       case APP_MANAGER_ERROR_REQUEST_FAILED:                  szErrorVal = "APP_MANAGER_ERROR_REQUEST_FAILED";                        break;
+       case APP_MANAGER_ERROR_PERMISSION_DENIED:               szErrorVal = "APP_MANAGER_ERROR_PERMISSION_DENIED";                     break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function                    AppManagerGetMemStatus
+* @description         Returns the Memory Allocation state
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void AppManagerGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+
+               if(stMemInfo.uordblks > g_stAppManagerMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stAppManagerMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stAppManagerMemInfo.uordblks - stMemInfo.uordblks);
+               }
+
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+#endif
+}
+
+/**
+ * @function           AppManagerGetMemAllocation
+ * @description                Gets the Memory state before API execution
+ * parameter           NA
+ * @return                     NA
+*/
+inline void AppManagerGetMemAllocation(void)
+{
+#if MEMORY_CHECK
+       g_stAppManagerMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           AppManagerExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ */
+void AppManagerExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);
+               ulldifference = ((stEnd.tv_sec - g_stAppManagerStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stAppManagerStartTime.tv_usec;
+
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+#endif
+}
+
+/**
+ * @function           AppManagerGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stAppManagerStartTime
+ * @parameter          NA
+ * @return                     NA
+ */
+void AppManagerGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stAppManagerStartTime, NULL);
+#endif
+}
+
+/**
+ * @function           AppManagerFreeMemory
+ * @description                Function to free the memory allocated
+ * @parameter          pszMem1, pszMem2, pszMem3, pszMem4 [ pointers to allocated memory]
+ * @return                     NA
+ */
+void AppManagerFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+       if (pszMem4 != NULL)
+       {
+               free(pszMem4);
+               pszMem4 = NULL;
+       }
+}
+
+/**
+ * @function           AppManagerAllocateMemory
+ * @description                allocates memory for speed and memory check buffer
+ * @parameter          pszMem, pszSpeed [ pointers to allocated memory]
+ * @return                     NA
+ */
+void AppManagerAllocateMemory(char **pszMem, char **pszSpeed)
+{
+#if MEMORY_CHECK
+       *pszMem =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       *pszSpeed =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+}
+
+/**
+ * @function           AppManagerAllocateMemory2
+ * @description                allocates memory for speed and memory check buffer for two API check scenario
+ * @parameter          pszMem, pszSpeed1, pszSpeed2 [ pointers to allocated memory]
+ * @return                     NA
+ */
+void AppManagerAllocateMemory2(char **pszMem, char **pszSpeed1, char **pszSpeed2)
+{
+#if MEMORY_CHECK
+       *pszMem =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       *pszSpeed1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       *pszSpeed2 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+}
+/** @} */
\ No newline at end of file
diff --git a/src/itc/app-manager/ITs-app-manager-common.h b/src/itc/app-manager/ITs-app-manager-common.h
new file mode 100755 (executable)
index 0000000..3eea168
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_APP_MANAGER_COMMON_H_
+#define _ITS_APP_MANAGER_COMMON_H_
+
+#include "assert.h"
+//Add test package related includes here
+#include <app.h>
+#include <app_manager.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+/** @addtogroup itc-app-manager
+*  @ingroup itc
+*  @{
+*/
+
+#define BUFFER                                                 512
+#define LOG                                                    100
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define TIME_DELAY                                     20
+#define USLEEPDELAY                                    500000
+#define LOCALE                                         "No Locale"
+#define GMAINTIMEOUT                           10000           //10 seconds
+#define ERR_LOG                                        "/tmp/tclog"
+#define APPID                                          "org.tizen.testapplication"
+#define SECONDARYAPPID                         "org.tizen.appmanagertestfile"
+#define MKEY                                           "test"
+#define MVALUE                                         "metavalue"
+
+
+FILE *g_fpLog;
+
+//Add helper function declarations here
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf (g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d] Starting test : %s\\n", __LINE__, __FUNCTION__);\
+       if ( !g_bAppManagerOpen )\
+       {\
+               FPRINTF("[Line : %d] [app-manager_ITC] Precondition of App Manager Open failed\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == 0)\
+       {\
+               if (DEBUG)\
+               {\
+                       FPRINTF("[Line : %d] [app-manager_ITC] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d] [app-manager_ITC] %s failed, error returned = %s \\n", __LINE__, API, AppManagerGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_LOOP(nRetVal, API, nFailCount) {\
+       if (nRetVal != 0)\
+       {\
+               FPRINTF("[Line : %d] [app-manager_ITC] %s failed on iteration %d, error returned = %s \\n", __LINE__, API, nLoopCount, AppManagerGetError(nRetVal));\
+               nFailCount++;\
+               continue;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog) {\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d] [app-manager_ITC] %s_MemoryLeakStatus : %s\\n", __LINE__, #api, memLog);\
+       }\
+}
+
+
+#define PRINT_SPEED_LOG(api, speedLog) {\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d] [app-manager_ITC] %s_TimeInMicrosec : %s\\n", __LINE__, #api, speedLog);\
+       }\
+}
+
+#define RUN_POLLING_LOOP {\
+       g_pMainLoop = g_main_loop_new(NULL, false);\
+       nAppManagerTimeoutId = g_timeout_add(GMAINTIMEOUT, AppManagerCallbackTimeout, g_pMainLoop);\
+       g_main_loop_run(g_pMainLoop);\
+       g_source_remove(nAppManagerTimeoutId);\
+       g_pMainLoop = NULL;\
+}
+
+char *AppManagerGetError(int nRet);
+void AppManagerGetMemAllocation(void);
+void AppManagerExecutionDelay(char* pszAPITime);
+void AppManagerGetTimeOfDay(void);
+void AppManagerGetMemStatus(char *pszAPIMemory);
+void AppManagerFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4);
+void AppManagerAllocateMemory2(char **pszMem, char **pszSpeed1, char **pszSpeed2);
+void AppManagerAllocateMemory(char **pszMem, char **pszSpeed);
+/** @} */
+#endif  //_ITS_APP_MANAGER_COMMON_H_
diff --git a/src/itc/app-manager/ITs-app-manager.c b/src/itc/app-manager/ITs-app-manager.c
new file mode 100755 (executable)
index 0000000..9649273
--- /dev/null
@@ -0,0 +1,3444 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-app-manager-common.h"
+
+/** @addtogroup itc-app-manager
+*  @ingroup itc
+*  @{
+*/
+
+//& set: AppManager
+
+bool g_bAppManagerOpen;
+struct timeval g_stAppManagerStartTime;
+struct mallinfo g_stAppManagerMemInfo;
+app_context_h pstAppContext;
+static bool g_bAppManagerCallback;
+static GMainLoop *g_pMainLoop;
+app_control_h g_app_control_handler = NULL;
+
+/**
+* @function            ITs_app_manager_startup
+* @description         Called before each test, opens pre-defined app
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_app_manager_startup(void)
+{
+       pstAppContext = NULL;
+       g_bAppManagerOpen = false;
+
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       sleep(2);
+       int nRet = APP_MANAGER_ERROR_NONE;
+
+       nRet = app_control_create(&g_app_control_handler);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_control_create fail in startup error returned : %d\\n", __LINE__ , nRet );
+               return ;
+       }
+
+       if ( g_app_control_handler == NULL )
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_control_create fail in startup created handle value null\\n", __LINE__);
+               app_control_destroy(g_app_control_handler);
+               return;
+       }
+
+
+       nRet = app_control_set_app_id(g_app_control_handler, APPID);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_control_set_app_id fail in startup error returned : %d\\n", __LINE__ , nRet );
+               app_control_destroy(g_app_control_handler);
+               return;
+       }
+
+       nRet = app_control_send_launch_request(g_app_control_handler , NULL , NULL);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_control_send_launch_request fail in startup error returned : %d\\n", __LINE__ , nRet );
+               app_control_destroy(g_app_control_handler);
+               return;
+       }
+
+       nRet = app_manager_get_app_context((const char *)APPID , &pstAppContext);
+       if ( nRet != APP_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_context failed in startup, error returned = %s\\n", __LINE__, AppManagerGetError(nRet));
+               app_control_send_terminate_request(g_app_control_handler);
+               app_control_destroy(g_app_control_handler);
+               return;
+       }
+
+       // set precondition value
+       g_bAppManagerOpen = true;
+}
+
+/**
+* @function            ITs_app_manager_cleanup
+* @description         Called after each test, terminates the app opened in startup
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_app_manager_cleanup(void)
+{
+       int nRet = -1;
+       if ( g_bAppManagerOpen )
+       {
+               nRet = app_context_destroy(pstAppContext);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_context_destroy() is failed in cleanup. returned error = %s\\n", __LINE__ , AppManagerGetError(nRet));
+               }
+
+               nRet = app_control_send_terminate_request(g_app_control_handler);
+               if ( nRet != APP_CONTROL_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_control_send_terminate_request() is failed cleanup. err = %d\\n", __LINE__ , nRet);
+               }
+
+               nRet = app_control_destroy(g_app_control_handler);
+               if ( nRet != APP_CONTROL_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_control_destroy() is failed cleanup. err = %d\\n", __LINE__ , nRet);
+               }
+       }
+}
+
+/**
+* @function            AppManagerCallbackTimeout
+* @description         callback function to terminate g_main loop
+* @parameter           data : user data sent to callback
+* @return                      NA
+*/
+gboolean AppManagerCallbackTimeout(gpointer data)
+{
+       GMainLoop* pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               g_main_loop_unref(pMainLoop);
+               pMainLoop = NULL;
+       }
+       return false;
+}
+
+/**
+* @function            AppManagerCreateEventLoop
+* @description         Create Event Loop to support callbacks
+* @parameter           pArg : handle to g_main loop
+* @return                      NA
+*/
+void* AppManagerCreateEventLoop(void* pArg)
+{
+       g_type_init();
+       g_pMainLoop = g_main_loop_new(NULL, FALSE);
+
+       int nTimeoutId = g_timeout_add(GMAINTIMEOUT, AppManagerCallbackTimeout, g_pMainLoop);
+       g_main_loop_run(g_pMainLoop); //blocking call
+       g_source_remove(nTimeoutId);
+       return NULL;
+}
+
+/**
+* @function            AppManagerAppContextEventCallback
+* @description         callback function for capturing context event callbacks
+* @parameter           app_context : app context handle ,event : event captured ,user_data : user data sent to callback
+* @return                      NA
+*/
+void AppManagerAppContextEventCallback(app_context_h app_context, app_context_event_e event, void *user_data)
+{
+#if DEGUG
+       FPRINTF("[Line : %d] [app-manager_ITC] Callback AppManagerAppContextEventCallback is called\\n", __LINE__);
+#endif
+       g_bAppManagerCallback = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_main_loop_unref(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+}
+
+/**
+* @function            AppManagerAppInfoEventCallback
+* @description         callback function for capturing context event callbacks
+* @parameter           app_info : application info handle ,event : event captured ,user_data : user data sent to callback
+* @return                      NA
+*/
+void AppManagerAppInfoEventCallback(app_info_h app_info, app_info_event_e event, void *user_data)
+{
+#if DEGUG
+       FPRINTF("[Line : %d] [app-manager_ITC] Callback AppManagerAppInfoEventCallback is called\\n", __LINE__);
+#endif
+       g_bAppManagerCallback = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_main_loop_unref(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+}
+
+/**
+* @function            AppInfoMetaDataFilterForeachCallback
+* @description         callback function for capturing application filter metadata event callbacks
+* @parameter           app_info : application info handle ,user_data : user data sent to callback
+* @return                      NA
+*/
+bool AppInfoMetaDataFilterForeachCallback (app_info_h app_info, void *user_data)
+{
+#if DEGUG
+       FPRINTF("[Line : %d] [app-manager_ITC] Callback AppInfoMetaDataFilterForeachCallback is called\\n", __LINE__);
+#endif
+       g_bAppManagerCallback = true;
+       return g_bAppManagerCallback;
+}
+
+/**
+* @function            AppInfoMetaDataCallback
+* @description         callback function for capturing application metadata event callbacks
+* @parameter           metadata_key : metadata key, metadata_value : metadata value associated with key ,user_data : user data sent to callback
+* @return                      NA
+*/
+bool AppInfoMetaDataCallback(const char *metadata_key, const char *metadata_value, void *user_data)
+{
+#if DEGUG
+       FPRINTF("[Line : %d] [app-manager_ITC] Callback AppInfoMetaDataCallback is called\\n", __LINE__);
+#endif
+       g_bAppManagerCallback = true;
+       return g_bAppManagerCallback;
+}
+
+/**
+* @function            AppManagerAppContextCallback
+* @description         callback function to get the application context once for each running application
+* @parameter           app_context : app context handle ,user_data : user data sent to callback
+* @return                      NA
+*/
+bool AppManagerAppContextCallback(app_context_h app_context, void *user_data)
+{
+#if DEGUG
+       FPRINTF("[Line : %d] [app-manager_ITC] Callback AppManagerAppContextCallback is called\\n", __LINE__);
+#endif
+       g_bAppManagerCallback = true;
+       return g_bAppManagerCallback;
+}
+
+/** @addtogroup itc-app-manager-testcases
+*  @brief              Integration testcases for module app-manager
+*  @ingroup    itc-app-manager
+*  @{
+*/
+//& type: auto
+//& purpose: Scenario to get event for applications with metadata
+/**
+* @testcase                    ITc_app_manager_app_info_metadata_filter_foreach_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 Scenario to get event for applications with metadata
+* @scenario                            Creates the application's metadata information filter handle from db\n
+*                                              Adds filter condition for the query API\n
+*                                              Register callback for each application with metadata\n
+*                                              Check if callback is invoked\n
+*                                              Destroys the application's metadata information filter handle
+* @apicovered                  app_info_metadata_filter_foreach, app_info_metadata_filter_create, app_info_metadata_filter_add, app_info_metadata_filter_destroy
+* @passcase                            If callback is invoked after app_info_metadata_filter_foreach is called
+* @failcase                            If callback is not invoked after app_info_metadata_filter_foreach is called or any other supporting function fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_metadata_filter_foreach_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0, nDelay = 0;
+       char *pszMetadataFilterForeachMemLog = NULL;
+       char *pszMetadataFilterForeachSpeedLog = NULL;
+       int nMetadataFilterForeachFailCount = 0, nSupport = 0;
+       app_info_metadata_filter_h pstFilterHandle = NULL;
+
+       AppManagerAllocateMemory(&pszMetadataFilterForeachMemLog, &pszMetadataFilterForeachSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bAppManagerCallback = false;
+               nDelay = 0;
+               pstFilterHandle = NULL;
+
+               nRet = app_info_metadata_filter_create(&pstFilterHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_metadata_filter_create",nSupport);
+               if (pstFilterHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_metadata_filter_create failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               nRet = app_info_metadata_filter_add(pstFilterHandle, MKEY, MVALUE);
+               if (nRet != 0)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_metadata_filter_add failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       nSupport++;
+                       nRet = app_info_metadata_filter_destroy(pstFilterHandle);
+                       PRINT_RESULT_LOOP(nRet, "app_info_metadata_filter_destroy",nSupport);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_info_metadata_filter_foreach (pstFilterHandle, AppInfoMetaDataFilterForeachCallback, NULL);
+               AppManagerExecutionDelay(pszMetadataFilterForeachSpeedLog);
+               AppManagerGetMemStatus(pszMetadataFilterForeachMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_info_metadata_filter_foreach", nMetadataFilterForeachFailCount);
+               do
+               {
+                       nDelay = nDelay+2;
+                       if(nDelay >= TIME_DELAY)
+                       {
+                               break;
+                       }
+                       usleep(USLEEPDELAY);
+               }while(!g_bAppManagerCallback);
+
+               if(!g_bAppManagerCallback)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_metadata_filter_foreach failed on iteration %d, error returned = callback function not invoked\\n", __LINE__, nLoopCount);
+                       nMetadataFilterForeachFailCount++;
+               }
+
+               nRet = app_info_metadata_filter_destroy(pstFilterHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_metadata_filter_destroy", nSupport);
+       }
+
+       if (nMetadataFilterForeachFailCount || nSupport)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_metadata_filter_foreach failed %d times, and supporting API failed %d times out of %d times\\n", __LINE__, nMetadataFilterForeachFailCount, nSupport, MAX_COUNT);
+               AppManagerFreeMemory(pszMetadataFilterForeachSpeedLog, pszMetadataFilterForeachMemLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_metadata_filter_foreach, pszMetadataFilterForeachSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_info_metadata_filter_foreach, pszMetadataFilterForeachMemLog);
+#endif
+       AppManagerFreeMemory(pszMetadataFilterForeachSpeedLog, pszMetadataFilterForeachMemLog, NULL, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to get event for each applications with metadata
+/**
+* @testcase                    ITc_app_manager_app_info_foreach_metadata_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 Scenario to get event for each applications with metadata
+* @scenario                            Get application's metadata information handle\n
+*                                              Register callback application with metadata\n
+*                                              Check if callback is invoked\n
+*                                              Destroys the application's metadata information filter handle
+* @apicovered                  app_info_create, app_manager_get_app_info, app_info_foreach_metadata, app_info_destroy
+* @passcase                            If callback is invoked after app_info_metadata_filter_foreach is called
+* @failcase                            If callback is not invoked after app_info_metadata_filter_foreach is called or any other supporting function fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_foreach_metadata_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0, nDelay = 0;
+       char *pszMetadataFilterForeachMemLog = NULL;
+       char *pszMetadataFilterForeachSpeedLog = NULL;
+       int nMetadataFilterForeachFailCount = 0, nSupport = 0;
+       app_info_h pstAppInfoHandle = NULL;
+
+       AppManagerAllocateMemory(&pszMetadataFilterForeachMemLog, &pszMetadataFilterForeachSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bAppManagerCallback = false;
+               nDelay = 0;
+               pstAppInfoHandle = NULL;
+
+               nRet = app_info_create(SECONDARYAPPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_create", nSupport);
+               if (pstAppInfoHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_create failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nSupport++;
+                       continue;
+               }
+
+               nRet = app_manager_get_app_info(SECONDARYAPPID, &pstAppInfoHandle);
+               if (nRet != 0)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nSupport++;
+                       nRet = app_info_destroy(pstAppInfoHandle);
+                       PRINT_RESULT_LOOP(nRet, "app_info_destroy", nSupport);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_info_foreach_metadata(pstAppInfoHandle, AppInfoMetaDataCallback, NULL);
+               AppManagerExecutionDelay(pszMetadataFilterForeachSpeedLog);
+               AppManagerGetMemStatus(pszMetadataFilterForeachMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_info_foreach_metadata", nMetadataFilterForeachFailCount);
+               do
+               {
+                       nDelay = nDelay+2;
+                       if(nDelay >= TIME_DELAY)
+                       {
+                               break;
+                       }
+                       usleep(USLEEPDELAY);
+               }while(!g_bAppManagerCallback);
+
+               if(!g_bAppManagerCallback)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_foreach_metadata failed on iteration %d, error returned = callback function not invoked\\n", __LINE__, nLoopCount);
+                       nMetadataFilterForeachFailCount++;
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_destroy", nSupport);
+       }
+
+       if (nMetadataFilterForeachFailCount || nSupport)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_foreach_metadata failed %d times, and supporting API failed %d times out of %d times\\n", __LINE__, nMetadataFilterForeachFailCount, nSupport, MAX_COUNT);
+               AppManagerFreeMemory(pszMetadataFilterForeachSpeedLog, pszMetadataFilterForeachMemLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_foreach_metadata, pszMetadataFilterForeachSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_info_foreach_metadata, pszMetadataFilterForeachMemLog);
+#endif
+       AppManagerFreeMemory(pszMetadataFilterForeachSpeedLog, pszMetadataFilterForeachMemLog, NULL, NULL);
+       pstAppInfoHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to get event for each applications with metadata
+/**
+* @testcase                    ITc_app_manager_app_info_filter_foreach_appinfo_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 Scenario to get event for each applications with metadata
+* @scenario                            Create filter handle from db\n
+*                                              Add boolean filter property to filter handle\n
+*                                              Add string filter property to the filter handle\n
+*                                              Register callback\n
+*                                              Check if callback is invoked\n
+*                                              Destroys filter handle
+* @apicovered                  app_info_filter_create, app_info_filter_destroy, app_info_filter_add_bool, app_info_filter_add_string, app_info_filter_foreach_appinfo
+* @passcase                            If callback is invoked after app_info_filter_foreach_appinfo is called
+* @failcase                            If callback is not invoked after app_info_filter_foreach_appinfo is called or any other supporting function fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_filter_foreach_appinfo_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0, nDelay = 0;
+       char *pszAppInfoFilterMemLog = NULL;
+       char *pszAppInfoFilterSpeedLog = NULL;
+       int nAppInfoFilterFailCount = 0, nSupport = 0;
+       app_info_filter_h pstAppInfoFilterHandle = NULL;
+
+       AppManagerAllocateMemory(&pszAppInfoFilterMemLog, &pszAppInfoFilterSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bAppManagerCallback = false;
+               nDelay = 0;
+               pstAppInfoFilterHandle = NULL;
+
+               nRet = app_info_filter_create(&pstAppInfoFilterHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_filter_create", nSupport);
+               if (pstAppInfoFilterHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_filter_create failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nSupport++;
+                       continue;
+               }
+
+               nRet = app_info_filter_add_string(pstAppInfoFilterHandle, PACKAGE_INFO_PROP_APP_TYPE, "capp");
+               if (nRet != 0)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_filter_add_string failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       nSupport++;
+                       nRet = app_info_filter_destroy(pstAppInfoFilterHandle);
+                       PRINT_RESULT_LOOP(nRet, "app_info_filter_destroy", nSupport);
+                       continue;
+               }
+
+               nRet = app_info_filter_add_bool(pstAppInfoFilterHandle, PACKAGE_INFO_PROP_APP_NODISPLAY, 1);
+               if (nRet != 0)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_filter_add_bool failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       nSupport++;
+                       nRet = app_info_filter_destroy(pstAppInfoFilterHandle);
+                       PRINT_RESULT_LOOP(nRet, "app_info_filter_destroy", nSupport);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_info_filter_foreach_appinfo(pstAppInfoFilterHandle, AppInfoMetaDataFilterForeachCallback, NULL);
+               AppManagerExecutionDelay(pszAppInfoFilterSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoFilterMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_info_filter_foreach_appinfo", nAppInfoFilterFailCount);
+               do
+               {
+                       nDelay = nDelay+2;
+                       if(nDelay >= TIME_DELAY)
+                       {
+                               break;
+                       }
+                       usleep(USLEEPDELAY);
+               }while(!g_bAppManagerCallback);
+
+               if(!g_bAppManagerCallback)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_filter_foreach_appinfo failed on iteration %d, error returned = callback function not invoked\\n", __LINE__, nLoopCount);
+                       nAppInfoFilterFailCount++;
+               }
+
+               nRet = app_info_filter_destroy(pstAppInfoFilterHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_filter_destroy", nSupport);
+       }
+
+       if (nAppInfoFilterFailCount || nSupport)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_filter_foreach_appinfo failed %d times, and supporting API failed %d times out of %d times\\n", __LINE__, nAppInfoFilterFailCount, nSupport, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoFilterSpeedLog, pszAppInfoFilterMemLog, NULL, NULL);
+               pstAppInfoFilterHandle = NULL;
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_filter_foreach_appinfo, pszAppInfoFilterSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_info_filter_foreach_appinfo, pszAppInfoFilterMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoFilterSpeedLog, pszAppInfoFilterMemLog, NULL, NULL);
+       pstAppInfoFilterHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To retrieve contexts of all running applications.
+/**
+* @testcase                    ITc_app_manager_foreach_app_context_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To retrieve contexts of all running applications.
+* @scenario                            Register callback to get information\n
+*                                              Check if callback is invoked
+* @apicovered                  app_manager_foreach_app_context
+* @passcase                            If callback is invoked after app_manager_foreach_app_context is called
+* @failcase                            If callback is not invoked after app_manager_foreach_app_context is called
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_foreach_app_context_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0, nDelay = 0;
+       char *pszAppManagerForeachAppContextMemLog = NULL;
+       char *pszAppManagerForeachAppContextSpeedLog = NULL;
+       int nAppManagerForeachAppContextFailCount = 0;
+
+       AppManagerAllocateMemory(&pszAppManagerForeachAppContextMemLog, &pszAppManagerForeachAppContextSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bAppManagerCallback = false;
+               nDelay = 0;
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_manager_foreach_app_context(AppManagerAppContextCallback, NULL);
+               AppManagerExecutionDelay(pszAppManagerForeachAppContextSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerForeachAppContextMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_manager_foreach_app_context", nAppManagerForeachAppContextFailCount);
+               do
+               {
+                       nDelay = nDelay+2;
+                       if(nDelay >= TIME_DELAY)
+                       {
+                               break;
+                       }
+                       usleep(USLEEPDELAY);
+               }while(!g_bAppManagerCallback);
+
+               if(!g_bAppManagerCallback)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_foreach_app_context failed on iteration %d, error returned = callback function not invoked\\n", __LINE__, nLoopCount);
+                       nAppManagerForeachAppContextFailCount++;
+               }
+       }
+
+       if (nAppManagerForeachAppContextFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_foreach_app_context failed %d times out of %d times", __LINE__, nAppManagerForeachAppContextFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerForeachAppContextSpeedLog, pszAppManagerForeachAppContextMemLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_manager_foreach_app_context, pszAppManagerForeachAppContextSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_foreach_app_context, pszAppManagerForeachAppContextMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerForeachAppContextSpeedLog, pszAppManagerForeachAppContextMemLog, NULL, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To retrieve all installed applications information
+/**
+* @testcase                    ITc_app_manager_foreach_app_info_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To retrieve all installed applications information
+* @scenario                            Register callback to get information\n
+*                                              Check if callback is invoked\n
+* @apicovered                  app_manager_foreach_app_info
+* @passcase                            If callback is invoked after app_manager_foreach_app_info is called
+* @failcase                            If callback is not invoked after app_manager_foreach_app_info is called
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_foreach_app_info_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0, nDelay = 0;
+       char *pszAppManagerForeachAppInfoMemLog = NULL;
+       char *pszAppManagerForeachAppInfoSpeedLog = NULL;
+       int nAppManagerForeachAppInfoFailCount = 0;
+
+       AppManagerAllocateMemory(&pszAppManagerForeachAppInfoMemLog, &pszAppManagerForeachAppInfoSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bAppManagerCallback = false;
+               nDelay = 0;
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_manager_foreach_app_info(AppInfoMetaDataFilterForeachCallback, NULL);
+               AppManagerExecutionDelay(pszAppManagerForeachAppInfoSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerForeachAppInfoMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_manager_foreach_app_info", nAppManagerForeachAppInfoFailCount);
+               do
+               {
+                       nDelay = nDelay+2;
+                       if(nDelay >= TIME_DELAY)
+                       {
+                               break;
+                       }
+                       usleep(USLEEPDELAY);
+               }while(!g_bAppManagerCallback);
+
+               if(!g_bAppManagerCallback)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_foreach_app_info failed on iteration %d, error returned = callback function not invoked\\n", __LINE__, nLoopCount);
+                       nAppManagerForeachAppInfoFailCount++;
+               }
+       }
+
+       if (nAppManagerForeachAppInfoFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_foreach_app_info failed %d times out of %d times", __LINE__, nAppManagerForeachAppInfoFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerForeachAppInfoSpeedLog, pszAppManagerForeachAppInfoMemLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_manager_foreach_app_info, pszAppManagerForeachAppInfoSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_foreach_app_info, pszAppManagerForeachAppInfoMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerForeachAppInfoSpeedLog, pszAppManagerForeachAppInfoMemLog, NULL, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the application context for the given ID of the application
+/**
+* @testcase                    ITc_app_manager_get_app_context_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the application context for the given ID of the application
+* @scenario                            Get the application context\n
+*                                              Destroy the application context
+* @apicovered                  app_manager_get_app_context, app_context_destroy
+* @passcase                            If app_manager_get_app_context, app_context_destroy returns success and returned handle is not NULL
+* @failcase                            If app_manager_get_app_context or app_context_destroy returns failure or returned handle is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_get_app_context_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerGetAppContextMemLog = NULL;
+       char *pszAppManagerGetAppContextSpeedLog = NULL;
+       int nAppManagerGetAppContextFailCount = 0;
+       app_context_h pstAppContext = NULL;
+
+       AppManagerAllocateMemory(&pszAppManagerGetAppContextMemLog, &pszAppManagerGetAppContextSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppContext = NULL;
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_manager_get_app_context((const char *)APPID, &pstAppContext);
+               AppManagerExecutionDelay(pszAppManagerGetAppContextSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerGetAppContextMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_context", nAppManagerGetAppContextFailCount);
+               if(pstAppContext == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_context failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nAppManagerGetAppContextFailCount++;
+                       continue;
+               }
+               nRet = app_context_destroy(pstAppContext);
+               PRINT_RESULT_LOOP(nRet, "app_context_destroy", nAppManagerGetAppContextFailCount);
+       }
+
+       if (nAppManagerGetAppContextFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_context failed %d times out of %d times", __LINE__, nAppManagerGetAppContextFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerGetAppContextSpeedLog, pszAppManagerGetAppContextMemLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_manager_get_app_context, pszAppManagerGetAppContextSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_get_app_context, pszAppManagerGetAppContextMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerGetAppContextSpeedLog, pszAppManagerGetAppContextMemLog, NULL, NULL);
+       pstAppContext = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the ID of the application for the given process ID
+/**
+* @testcase                    ITc_app_manager_get_app_id_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the ID of the application for the given process ID
+* @scenario                            Get the application context for the given ID of the application\n
+*                                              Get the process ID with the given application context\n
+*                                              Get the ID of the application for the given process ID\n
+*                                              Destroy the application context
+* @apicovered                  app_manager_get_app_id, app_manager_get_app_context, app_context_get_pid, app_context_destroy
+* @passcase                            If API returns success and returned handle is not NULL
+* @failcase                            If either API returns failure or returned handle is NULL or any other supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_get_app_id_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0, nPid = 0;
+       char *pszAppManagerGetAppIdMemLog = NULL;
+       char *pszAppManagerGetAppIdSpeedLog = NULL;
+       int nAppManagerGetAppIdFailCount = 0;
+       app_context_h pstAppContext = NULL;
+       char *pszAppID = NULL;
+
+       nRet = app_manager_get_app_context((const char *)APPID, &pstAppContext);
+       PRINT_RESULT(nRet,"app_manager_get_app_context");
+       if(pstAppContext == NULL)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_context failed, error returned = Handle returned is NULL\\n", __LINE__);
+               return 1;
+       }
+
+       nRet = app_context_get_pid(pstAppContext, &nPid);
+       PRINT_RESULT(nRet,"app_context_get_pid");
+       if (nPid < 0)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_context_get_pid failed, error returned = PID returned is Negative\\n", __LINE__);
+               app_context_destroy(pstAppContext);
+               return 1;
+       }
+
+       AppManagerAllocateMemory(&pszAppManagerGetAppIdMemLog, &pszAppManagerGetAppIdSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pszAppID = NULL;
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_manager_get_app_id(nPid, &pszAppID);
+               AppManagerExecutionDelay(pszAppManagerGetAppIdSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerGetAppIdMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_id", nAppManagerGetAppIdFailCount);
+               if (pszAppID == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_id failed on iteration %d, error returned = AppID returned  is NULL\\n", __LINE__, nLoopCount);
+                       nAppManagerGetAppIdFailCount++;
+               }
+               else if(strcmp(pszAppID, (const char *)APPID) != 0)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_id failed on iteration %d, error returned = AppID returned [ %s ] is not correct\\n", __LINE__, nLoopCount, pszAppID);
+                       nAppManagerGetAppIdFailCount++;
+               }
+               free(pszAppID);
+               pszAppID = NULL;
+       }
+
+       nRet = app_context_destroy(pstAppContext);
+       if(nRet != 0)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_context_destroy failed after loop, error returned = %s\\n", __LINE__, AppManagerGetError(nRet));
+       }
+
+       if (nAppManagerGetAppIdFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_id failed %d times out of %d times", __LINE__, nAppManagerGetAppIdFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerGetAppIdSpeedLog, pszAppManagerGetAppIdMemLog, NULL, NULL);
+               pstAppContext = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_manager_get_app_id, pszAppManagerGetAppIdSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_get_app_id, pszAppManagerGetAppIdMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerGetAppIdSpeedLog, pszAppManagerGetAppIdMemLog, NULL, NULL);
+       pstAppContext = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the application information for the given application ID
+/**
+* @testcase                    ITc_app_manager_get_app_info_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the application information for the given application ID
+* @scenario                            Get the application information\n
+*                                              Destroy the application information
+* @apicovered                  app_manager_get_app_info, app_info_destroy
+* @passcase                            If app_manager_get_app_info, app_info_destroy returns success and returned handle is not NULL
+* @failcase                            If app_manager_get_app_info or app_info_destroy returns failure or returned handle is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_get_app_info_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerGetAppInfoMemLog = NULL;
+       char *pszAppManagerGetAppInfoSpeedLog = NULL;
+       int nAppManagerGetAppInfoFailCount = 0;
+       app_info_h pstAppInfo = NULL;
+
+       AppManagerAllocateMemory(&pszAppManagerGetAppInfoMemLog, &pszAppManagerGetAppInfoSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfo);
+               AppManagerExecutionDelay(pszAppManagerGetAppInfoSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerGetAppInfoMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nAppManagerGetAppInfoFailCount);
+               if(pstAppInfo == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nAppManagerGetAppInfoFailCount++;
+                       continue;
+               }
+               nRet = app_info_destroy(pstAppInfo);
+               PRINT_RESULT_LOOP(nRet, "app_info_destroy", nAppManagerGetAppInfoFailCount);
+       }
+
+       if (nAppManagerGetAppInfoFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed %d times out of %d times", __LINE__, nAppManagerGetAppInfoFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+               pstAppInfo = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_manager_get_app_info, pszAppManagerGetAppInfoSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_get_app_info, pszAppManagerGetAppInfoMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+       pstAppInfo = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To check whether the application with the given package name is running
+/**
+* @testcase                    ITc_app_manager_is_running_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To check whether the application with the given package name is running
+* @scenario                            Check if the application opened in startup is running
+* @apicovered                  app_manager_is_running
+* @passcase                            If API returns success and returned value is true
+* @failcase                            If either API returns failure or returned value is false
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_is_running_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerIsRunningMemLog = NULL;
+       char *pszAppManagerIsRunningSpeedLog = NULL;
+       int nAppManagerIsRunningFailCount = 0;
+       bool bIsRunning = false;
+
+       AppManagerAllocateMemory(&pszAppManagerIsRunningMemLog, &pszAppManagerIsRunningSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               bIsRunning = false;
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_manager_is_running((const char *)APPID, &bIsRunning);
+               AppManagerExecutionDelay(pszAppManagerIsRunningSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerIsRunningMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_manager_is_running", nAppManagerIsRunningFailCount);
+               if(bIsRunning != true)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_is_running failed on iteration %d, error returned = App is not running\\n", __LINE__, nLoopCount);
+                       nAppManagerIsRunningFailCount++;
+               }
+       }
+
+       if (nAppManagerIsRunningFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_is_running failed %d times out of %d times", __LINE__, nAppManagerIsRunningFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerIsRunningSpeedLog, pszAppManagerIsRunningMemLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_manager_is_running, pszAppManagerIsRunningSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_is_running, pszAppManagerIsRunningMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerIsRunningSpeedLog, pszAppManagerIsRunningMemLog, NULL, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To resume an application after opening it
+/**
+* @testcase                    ITc_app_manager_resume_app_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To resume an application after opening it
+* @scenario                            Open an application\n
+*                                              Resume the application\n
+*                                              Get the opened application context\n
+*                                              Terminate the open application
+* @apicovered                  app_control_create, app_control_set_app_id, app_control_send_launch_request, app_manager_get_app_context, app_manager_resume_app \n
+*                                              app_context_destroy, app_control_destroy, app_control_send_terminate_request
+* @passcase                            If app_control_send_launch_request and app_control_send_terminate_request returns success
+* @failcase                            If either app_control_send_launch_request, app_manager_resume_app or app_control_send_launch_request returns false or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_resume_app_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerResumeMemLog = NULL;
+       char *pszAppManagerResumeSpeedLog = NULL;
+       int nAppManagerResumeFailCount = 0, nSupportingFailCount = 0;
+       app_context_h pstOpenAppContext = NULL;
+       bool bIsRunning = false;
+       app_control_h app_control_handler = NULL;
+
+       nRet = app_control_create(&app_control_handler);
+       if (nRet != APP_CONTROL_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_control_create failed, error returned : %d\\n", __LINE__ , nRet );
+               return 1;
+       }
+       if(app_control_handler == NULL)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_control_create failed, created handle value null\\n", __LINE__);
+               return 1;
+       }
+       nRet = app_control_set_app_id(app_control_handler , SECONDARYAPPID );
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_control_set_app_id failed, error returned : %d\\n", __LINE__ , nRet );
+               return 1;
+       }
+               
+       AppManagerAllocateMemory(&pszAppManagerResumeMemLog, &pszAppManagerResumeSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstOpenAppContext = NULL;
+               sleep(1);
+
+               nRet = app_control_send_launch_request(app_control_handler , NULL , NULL);
+               PRINT_RESULT_LOOP(nRet, "app_control_send_launch_request", nSupportingFailCount);
+               sleep(1);
+               nRet = app_manager_get_app_context(SECONDARYAPPID, &pstOpenAppContext);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_context", nSupportingFailCount);
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               
+               nRet = app_manager_resume_app(pstOpenAppContext);
+               AppManagerExecutionDelay(pszAppManagerResumeSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerResumeMemLog);
+               if(nRet != 0)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_resume_app failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       nAppManagerResumeFailCount++;
+               }
+               else
+               {
+                       nRet = app_manager_is_running(SECONDARYAPPID, &bIsRunning);
+                       PRINT_RESULT_LOOP(nRet, "app_manager_is_running", nSupportingFailCount);
+                       if(!bIsRunning)
+                       {
+                               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_is_running failed on iteration %d, error returned = App is not running\\n", __LINE__, nLoopCount);
+                               nSupportingFailCount++;
+                       }
+               }
+               nRet = app_context_destroy(pstOpenAppContext);
+               
+               nRet = app_control_send_terminate_request(app_control_handler);
+               PRINT_RESULT_LOOP(nRet, "app_control_send_terminate_request", nSupportingFailCount);
+       }
+
+       app_control_destroy(app_control_handler);
+       if (nAppManagerResumeFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_resume_app failed %d times and supporting api failed %d times out of %d times", __LINE__, nAppManagerResumeFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerResumeSpeedLog, pszAppManagerResumeMemLog, NULL, NULL);
+               pstOpenAppContext = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_manager_resume_app, pszAppManagerResumeSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_resume_app, pszAppManagerResumeMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerResumeSpeedLog, pszAppManagerResumeMemLog, NULL, NULL);
+       pstOpenAppContext = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To clone the application information handle
+/**
+* @testcase                    ITc_app_manager_app_info_create_clone_destroy_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To clone the application information handle
+* @scenario                            Create an application info\n
+*                                              Get the created application info\n
+*                                              clone the application info\n
+*                                              Terminate the cloned application info\n
+*                                              Terminate the open application info
+* @apicovered                  app_info_create, app_manager_get_app_info, app_info_clone, app_info_destroy
+* @passcase                            If app_info_create, app_manager_get_app_info, app_info_clone and app_info_destroy returns success and handle returned is not NULL
+* @failcase                            If app_info_create or app_manager_get_app_info or app_info_clone or app_info_destroy returns false or handle returned is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_create_clone_destroy_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerAppInfoCloneMemLog = NULL;
+       char *pszAppManagerAppInfoCreateSpeedLog = NULL;
+       char *pszAppManagerAppInfoCloneSpeedLog = NULL;
+       char *pszAppManagerAppInfoDestroySpeedLog = NULL;
+       int nCreateFailCount = 0, nCloneFailCount = 0, nDestroyFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoToCloneHandle = NULL, pstAppInfoFromCloneHandle = NULL;
+
+       AppManagerAllocateMemory2(&pszAppManagerAppInfoCloneMemLog, &pszAppManagerAppInfoCreateSpeedLog, &pszAppManagerAppInfoCloneSpeedLog);
+
+#if SPEED_CHECK
+       pszAppManagerAppInfoDestroySpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoToCloneHandle = NULL;
+               pstAppInfoFromCloneHandle = NULL;
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_create((const char *)APPID, &pstAppInfoFromCloneHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_create", nCreateFailCount);
+               AppManagerExecutionDelay(pszAppManagerAppInfoCreateSpeedLog);
+
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoFromCloneHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoFromCloneHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nSupportingFailCount++;
+                       continue;
+               }
+
+
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_clone(&pstAppInfoToCloneHandle, pstAppInfoFromCloneHandle);
+               AppManagerExecutionDelay(pszAppManagerAppInfoCloneSpeedLog);
+
+               PRINT_RESULT_LOOP(nRet, "app_info_clone", nCloneFailCount);
+
+               if (pstAppInfoToCloneHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_clone failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nCloneFailCount++;
+                       continue;
+               }
+
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_destroy(pstAppInfoToCloneHandle);
+               AppManagerExecutionDelay(pszAppManagerAppInfoCloneSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "app_info_destroy", nDestroyFailCount);
+
+               nRet = app_info_destroy(pstAppInfoFromCloneHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_destroy for cloned app", nDestroyFailCount);
+               AppManagerGetMemStatus(pszAppManagerAppInfoCloneMemLog);
+       }
+
+       if (nDestroyFailCount || nCloneFailCount || nCreateFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_info_create failed %d times, app_info_clone failed %d times, app_info_destroy failed %d times and supporting api failed %d times out of %d times", __LINE__, nCreateFailCount, nCloneFailCount, nDestroyFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerAppInfoCreateSpeedLog, pszAppManagerAppInfoCloneSpeedLog, pszAppManagerAppInfoDestroySpeedLog, pszAppManagerAppInfoCloneMemLog);
+               pstAppInfoToCloneHandle = NULL;
+               pstAppInfoFromCloneHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_create, pszAppManagerAppInfoCreateSpeedLog);
+       PRINT_SPEED_LOG(app_info_clone, pszAppManagerAppInfoCloneSpeedLog);
+       PRINT_SPEED_LOG(app_info_destroy, pszAppManagerAppInfoDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_create_clone_destroy, pszAppManagerAppInfoCloneMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerAppInfoCreateSpeedLog, pszAppManagerAppInfoCloneSpeedLog, pszAppManagerAppInfoDestroySpeedLog, pszAppManagerAppInfoCloneMemLog);
+       pstAppInfoToCloneHandle = NULL;
+       pstAppInfoFromCloneHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to add filter and check them
+/**
+* @testcase                    ITc_app_manager_app_info_filter_add_string_bool_count_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To add filter and check them
+* @scenario                            Create filter handle from db\n
+*                                              Add boolean filter property to filter handle\n
+*                                              Add string filter property to the filter handle\n
+*                                              counts the number of filtered apps\n
+*                                              Destroys filter handle
+* @apicovered                  app_info_filter_create, app_info_filter_add_bool, app_info_filter_add_string, app_info_filter_destroy, app_info_filter_count_appinfo
+* @passcase                            If app_info_filter_add_bool, app_info_filter_add_string and app_info_filter_count_appinfo returns success and Handle returned is not NULL also all supporting API are passed
+* @failcase                            If app_info_filter_add_bool or app_info_filter_add_string or app_info_filter_count_appinfo returns fail or any supporting API is failed or Handle returned is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_filter_add_string_bool_count_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0, nCount = 0;
+       char *pszAppInfoFilterMemLog = NULL;
+       char *pszAppInfoAddBoolSpeedLog = NULL;
+       char *pszAppInfoAddStringSpeedLog = NULL;
+       char *pszAppInfoCountSpeedLog = NULL;
+       int nAddStringFailCount = 0, nAddBoolFailCount = 0, nCountFailCount = 0;
+       app_info_filter_h pstAppInfoFilterHandle = NULL;
+
+       nRet = app_info_filter_create(&pstAppInfoFilterHandle);
+       PRINT_RESULT(nRet, "app_info_filter_create");
+       if (pstAppInfoFilterHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_info_filter_create failed, error returned = Handle returned is NULL\\n", __LINE__);
+               return 1;
+       }
+
+       AppManagerAllocateMemory2(&pszAppInfoFilterMemLog, &pszAppInfoAddBoolSpeedLog, &pszAppInfoAddStringSpeedLog);
+#if SPEED_CHECK
+       pszAppInfoCountSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               nCount = 0;
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_filter_add_string(pstAppInfoFilterHandle, PACKAGE_INFO_PROP_APP_TYPE, "capp");
+               AppManagerExecutionDelay(pszAppInfoAddStringSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "app_info_filter_add_string", nAddStringFailCount);
+
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_filter_add_bool(pstAppInfoFilterHandle, PACKAGE_INFO_PROP_APP_NODISPLAY, 1);
+               AppManagerExecutionDelay(pszAppInfoAddBoolSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "app_info_filter_add_bool", nAddBoolFailCount);
+
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_info_filter_count_appinfo(pstAppInfoFilterHandle, &nCount);
+               AppManagerExecutionDelay(pszAppInfoCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "app_info_filter_count_appinfo", nCountFailCount);
+               if(!nCount)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_filter_count_appinfo failed on iteration %d, error returned = app info count is zero\\n", __LINE__, nLoopCount);
+                       nCountFailCount++;
+               }
+
+               AppManagerGetMemStatus(pszAppInfoFilterMemLog);
+       }
+
+       nRet = app_info_filter_destroy(pstAppInfoFilterHandle);
+       if (nRet != 0)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_info_filter_destroy failed, error returned = %s\\n", __LINE__, AppManagerGetError(nRet));
+       }
+
+       if (nAddStringFailCount || nAddBoolFailCount || nCountFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_info_filter_add_string failed %d times app_info_filter_add_bool failed %d times, app_info_filter_count_appinfo failed %d times out of %d times\\n", __LINE__, nAddStringFailCount, nAddBoolFailCount, nCountFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoAddBoolSpeedLog, pszAppInfoAddStringSpeedLog, pszAppInfoCountSpeedLog, pszAppInfoFilterMemLog);
+               pstAppInfoFilterHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_filter_add_bool, pszAppInfoAddBoolSpeedLog);
+       PRINT_SPEED_LOG(app_info_filter_add_string, pszAppInfoAddStringSpeedLog);
+       PRINT_SPEED_LOG(app_info_filter_count_appinfo, pszAppInfoCountSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_filter_add_string_bool_count, pszAppInfoFilterMemLog);
+#endif
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to create and destroy application info filter
+/**
+* @testcase                    ITc_app_manager_app_info_filter_create_destroy_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To create and destroy application info filter
+* @scenario                            Create filter handle from db\n
+*                                              destroys filter handle
+* @apicovered                  app_info_filter_create, app_info_filter_destroy
+* @passcase                            If app_info_filter_create and app_info_filter_destroy returns success and Handle returned is not NULL
+* @failcase                            If app_info_filter_create or app_info_filter_destroy or Handle returned is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_filter_create_destroy_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoCreateDestroyMemLog = NULL;
+       char *pszAppInfoCreateSpeedLog = NULL;
+       char *pszAppInfoDestroySpeedLog = NULL;
+       int nCreateFailCount = 0, nDestoryFailCount = 0;
+       app_info_filter_h pstAppInfoFilterHandle = NULL;
+
+       AppManagerAllocateMemory2(&pszAppInfoCreateDestroyMemLog, &pszAppInfoCreateSpeedLog, &pszAppInfoDestroySpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoFilterHandle = NULL;
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_filter_create(&pstAppInfoFilterHandle);
+               AppManagerExecutionDelay(pszAppInfoCreateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "app_info_filter_create", nCreateFailCount);
+               if (pstAppInfoFilterHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_filter_create failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nCreateFailCount++;
+                       continue;
+               }
+
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_filter_destroy(pstAppInfoFilterHandle);
+               AppManagerExecutionDelay(pszAppInfoDestroySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "app_info_filter_destroy", nDestoryFailCount);
+               AppManagerGetMemStatus(pszAppInfoCreateDestroyMemLog);
+       }
+
+       if (nDestoryFailCount || nCreateFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_info_filter_create failed %d times app_info_filter_destroy failed %d times out of %d times\\n", __LINE__, nCreateFailCount, nDestoryFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoCreateSpeedLog, pszAppInfoDestroySpeedLog, pszAppInfoCreateDestroyMemLog, NULL);
+               pstAppInfoFilterHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_filter_create, pszAppInfoCreateSpeedLog);
+       PRINT_SPEED_LOG(app_info_filter_destroy, pszAppInfoDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_filter_create_destroy, pszAppInfoCreateDestroyMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoCreateSpeedLog, pszAppInfoDestroySpeedLog, pszAppInfoCreateDestroyMemLog, NULL);
+       pstAppInfoFilterHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to get the application ID with the given application info
+/**
+* @testcase                    ITc_app_manager_app_info_get_app_id_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the application ID with the given application info
+* @scenario                            Get the application information for the given application ID\n
+*                                              Get the application ID with the given application info\n
+*                                              Destroys application info handle
+* @apicovered                  app_manager_get_app_info, app_info_get_app_id, app_info_destroy
+* @passcase                            If app_info_get_app_id returns success and ID returned is not NULL and supporting API are passed
+* @failcase                            If app_info_get_app_id returns fail or ID returned is NULL or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_get_app_id_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoGetIDMemLog = NULL;
+       char *pszAppInfoGetIDSpeedLog = NULL;
+       int nAppInfoGetIDFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL;
+       char *pszAppID = NULL;
+
+       AppManagerAllocateMemory(&pszAppInfoGetIDMemLog, &pszAppInfoGetIDSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_get_app_id(pstAppInfoHandle, &pszAppID);
+               AppManagerExecutionDelay(pszAppInfoGetIDSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoGetIDMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppInfoGetIDFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_app_id failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       continue;
+               }
+               else if (pszAppID == NULL)
+               {
+                       nAppInfoGetIDFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_app_id failed for loop count = %d, error returned = ID returned is NULL\\n", __LINE__,nLoopCount);
+                       continue;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_app_id passed on iteration %d\\n", __LINE__,nLoopCount);
+#endif
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_destroy failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+               }
+               free(pszAppID);
+               pszAppID = NULL;
+       }
+
+       if (nAppInfoGetIDFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_get_app_id failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppInfoGetIDFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoGetIDSpeedLog, pszAppInfoGetIDMemLog, NULL, NULL);
+               pstAppInfoHandle = NULL;
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_get_app_id, pszAppInfoGetIDSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_get_app_id, pszAppInfoGetIDMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoGetIDSpeedLog, pszAppInfoGetIDMemLog, NULL, NULL);
+       pstAppInfoHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to get the executable path of the application
+/**
+* @testcase                    ITc_app_manager_app_info_get_exec_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the executable path of the application
+* @scenario                            Get the application information for the given application ID\n
+*                                              Get the executable path of the application\n
+*                                              Destroys application info handle
+* @apicovered                  app_manager_get_app_info, app_info_get_exec, app_info_destroy
+* @passcase                            If app_info_get_exec returns success and path returned is not NULL and supporting API are passed
+* @failcase                            If app_info_get_exec returns fail or path returned is NULL or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_get_exec_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoGetPathMemLog = NULL;
+       char *pszAppInfoGetPathSpeedLog = NULL;
+       int nAppInfoGetPathFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL;
+       char *pszAppPath = NULL;
+
+       AppManagerAllocateMemory(&pszAppInfoGetPathMemLog, &pszAppInfoGetPathSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               pszAppPath = NULL;
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_get_exec(pstAppInfoHandle, &pszAppPath);
+               AppManagerExecutionDelay(pszAppInfoGetPathSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoGetPathMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppInfoGetPathFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_exec failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       continue;
+               }
+               else if (pszAppPath == NULL)
+               {
+                       nAppInfoGetPathFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_exec failed on iteration %d, error returned = path returned is NULL\\n", __LINE__,nLoopCount);
+                       continue;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_exec passed on iteration %d\\n", __LINE__,nLoopCount);
+#endif
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_destroy failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+               }
+               free(pszAppPath);
+               pszAppPath = NULL;
+       }
+
+       if (nAppInfoGetPathFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_get_exec failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppInfoGetPathFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoGetPathSpeedLog, pszAppInfoGetPathMemLog, NULL, NULL);
+               pszAppPath = NULL;
+               pstAppInfoHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_get_exec, pszAppInfoGetPathSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_get_exec, pszAppInfoGetPathMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoGetPathSpeedLog, pszAppInfoGetPathMemLog, NULL, NULL);
+       pszAppPath = NULL;
+       pstAppInfoHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to get the absolute path to the icon image
+/**
+* @testcase                    ITc_app_manager_app_info_get_icon_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the absolute path to the icon image
+* @scenario                            Get the application information for the given application ID\n
+*                                              Get the absolute path to the icon image\n
+*                                              Destroys application info handle
+* @apicovered                  app_manager_get_app_info, app_info_get_icon, app_info_destroy
+* @passcase                            If app_info_get_icon returns success and path returned is not NULL and supporting API are passed
+* @failcase                            If app_info_get_icon returns fail or path returned is NULL or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_get_icon_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoGetPathMemLog = NULL;
+       char *pszAppInfoGetPathSpeedLog = NULL;
+       int nAppInfoGetPathFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL;
+       char *pszAppPath = NULL;
+
+       AppManagerAllocateMemory(&pszAppInfoGetPathMemLog, &pszAppInfoGetPathSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               pszAppPath = NULL;
+
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_get_icon(pstAppInfoHandle, &pszAppPath);
+               AppManagerExecutionDelay(pszAppInfoGetPathSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoGetPathMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppInfoGetPathFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_icon failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       continue;
+               }
+               else if (pszAppPath == NULL)
+               {
+                       nAppInfoGetPathFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_icon failed on iteration %d, error returned = path returned is NULL\\n", __LINE__,nLoopCount);
+                       continue;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_icon passed on iteration %d\\n", __LINE__,nLoopCount);
+#endif
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_destroy failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+               }
+               free(pszAppPath);
+               pszAppPath = NULL;
+       }
+
+       if (nAppInfoGetPathFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_get_icon failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppInfoGetPathFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoGetPathSpeedLog, pszAppInfoGetPathMemLog, NULL, NULL);
+               pstAppInfoHandle = NULL;
+               pszAppPath = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_get_icon, pszAppInfoGetPathSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_get_icon, pszAppInfoGetPathMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoGetPathSpeedLog, pszAppInfoGetPathMemLog, NULL, NULL);
+       pstAppInfoHandle = NULL;
+       pszAppPath = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to get the name of the application
+/**
+* @testcase                    ITc_app_manager_app_info_get_label_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the name of the application
+* @scenario                            Get the application information for the given application ID\n
+*                                              Get the absolute path to the icon image\n
+*                                              Destroys application info handle
+* @apicovered                  app_manager_get_app_info, app_info_get_label, app_info_destroy
+* @passcase                            If app_info_get_label returns success and path returned is not NULL and supporting API are passed
+* @failcase                            If app_info_get_label returns fail or path returned is NULL or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_get_label_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoGetPathMemLog = NULL;
+       char *pszAppInfoGetPathSpeedLog = NULL;
+       int nAppInfoGetPathFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL;
+       char *pszAppPath = NULL;
+
+       AppManagerAllocateMemory(&pszAppInfoGetPathMemLog, &pszAppInfoGetPathSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               pszAppPath = NULL;
+
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_get_label(pstAppInfoHandle, &pszAppPath);
+               AppManagerExecutionDelay(pszAppInfoGetPathSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoGetPathMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppInfoGetPathFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_label failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       continue;
+               }
+               else if (pszAppPath == NULL)
+               {
+                       nAppInfoGetPathFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_label failed on iteration %d, error returned = path returned is NULL\\n", __LINE__,nLoopCount);
+                       continue;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_label passed on iteration %d\\n", __LINE__,nLoopCount);
+#endif
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_destroy failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+               }
+               free(pszAppPath);
+               pszAppPath = NULL;
+       }
+
+       if (nAppInfoGetPathFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_get_label failed %d times out of %d times\\n", __LINE__, nAppInfoGetPathFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoGetPathSpeedLog, pszAppInfoGetPathMemLog, NULL, NULL);
+               pstAppInfoHandle = NULL;
+               pszAppPath = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_get_label, pszAppInfoGetPathSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_get_label, pszAppInfoGetPathMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoGetPathSpeedLog, pszAppInfoGetPathMemLog, NULL, NULL);
+       pstAppInfoHandle = NULL;
+       pszAppPath = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to get the package name.
+/**
+* @testcase                    ITc_app_manager_app_info_get_package_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the package name.
+* @scenario                            Get the application information for the given application ID\n
+*                                              Get the package name\n
+*                                              Destroys application info handle
+* @apicovered                  app_manager_get_app_info, app_info_get_package, app_info_destroy
+* @passcase                            If app_info_get_package returns success and path returned is not NULL and supporting API are passed
+* @failcase                            If app_info_get_package returns fail or path returned is NULL or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_get_package_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoGetPathMemLog = NULL;
+       char *pszAppInfoGetPathSpeedLog = NULL;
+       int nAppInfoGetPathFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL;
+       char *pszAppPath = NULL;
+
+       AppManagerAllocateMemory(&pszAppInfoGetPathMemLog, &pszAppInfoGetPathSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               pszAppPath = NULL;
+
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_get_package(pstAppInfoHandle, &pszAppPath);
+               AppManagerExecutionDelay(pszAppInfoGetPathSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoGetPathMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppInfoGetPathFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_package failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       continue;
+               }
+               else if (pszAppPath == NULL)
+               {
+                       nAppInfoGetPathFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_package failed on iteration %d, error returned = path returned is NULL\\n", __LINE__,nLoopCount);
+                       continue;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_package passed on iteration %d\\n", __LINE__,nLoopCount);
+#endif
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_destroy failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+               }
+               free(pszAppPath);
+               pszAppPath = NULL;
+       }
+
+       if (nAppInfoGetPathFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_get_package failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppInfoGetPathFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoGetPathSpeedLog, pszAppInfoGetPathMemLog, NULL, NULL);
+               pstAppInfoHandle = NULL;
+               pszAppPath = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_get_package, pszAppInfoGetPathSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_get_package, pszAppInfoGetPathMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoGetPathSpeedLog, pszAppInfoGetPathMemLog, NULL, NULL);
+       pstAppInfoHandle = NULL;
+       pszAppPath = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to get the package type name.
+/**
+* @testcase                    ITc_app_manager_app_info_get_type_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the package type name.
+* @scenario                            Get the application information for the given application ID\n
+*                                              Get the package type name\n
+*                                              Destroys application info handle
+* @apicovered                  app_manager_get_app_info, app_info_get_type, app_info_destroy
+* @passcase                            If app_info_get_type returns success and path returned is not NULL and supporting API are passed
+* @failcase                            If app_info_get_type returns fail or path returned is NULL or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_get_type_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoGetPathMemLog = NULL;
+       char *pszAppInfoGetPathSpeedLog = NULL;
+       int nAppInfoGetPathFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL;
+       char *pszAppPath = NULL;
+
+       AppManagerAllocateMemory(&pszAppInfoGetPathMemLog, &pszAppInfoGetPathSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               pszAppPath = NULL;
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_get_type(pstAppInfoHandle, &pszAppPath);
+               AppManagerExecutionDelay(pszAppInfoGetPathSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoGetPathMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppInfoGetPathFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_type failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       continue;
+               }
+               else if (pszAppPath == NULL)
+               {
+                       nAppInfoGetPathFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_type failed on iteration %d, error returned = path returned is NULL\\n", __LINE__,nLoopCount);
+                       continue;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_type passed on iteration %d\\n", __LINE__,nLoopCount);
+#endif
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_destroy failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+               }
+               free(pszAppPath);
+               pszAppPath = NULL;
+       }
+
+       if (nAppInfoGetPathFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_get_type failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppInfoGetPathFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoGetPathSpeedLog, pszAppInfoGetPathMemLog, NULL, NULL);
+               pstAppInfoHandle = NULL;
+               pszAppPath = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_get_type, pszAppInfoGetPathSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_get_type, pszAppInfoGetPathMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoGetPathSpeedLog, pszAppInfoGetPathMemLog, NULL, NULL);
+       pstAppInfoHandle = NULL;
+       pszAppPath = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to check whether application is enabled.
+
+/**
+* @testcase                    ITc_app_manager_app_info_is_enabled_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To check whether application is enabled.
+* @scenario                            Get the application information for the given application ID\n
+*                                              Check whether application is enabled.\n
+*                                              Destroys application info handle
+* @apicovered                  app_manager_get_app_info, app_info_is_enabled, app_info_destroy
+* @passcase                            If app_info_is_enabled returns success and bool returned is true and supporting API are passed
+* @failcase                            If app_info_is_enabled returns fail or bool returned is false or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_is_enabled_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoIsStatusMemLog = NULL;
+       char *pszAppInfoIsStatusSpeedLog = NULL;
+       int nAppInfoIsStatusFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL;
+       bool bStatus = false;
+
+       AppManagerAllocateMemory(&pszAppInfoIsStatusMemLog, &pszAppInfoIsStatusSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_is_enabled(pstAppInfoHandle, &bStatus);
+               AppManagerExecutionDelay(pszAppInfoIsStatusSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoIsStatusMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppInfoIsStatusFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_is_enabled failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       app_info_destroy(pstAppInfoHandle);
+                       continue;
+               }
+               else if (!bStatus)
+               {
+                       nAppInfoIsStatusFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_is_enabled failed on iteration %d, error returned = status is false\\n", __LINE__,nLoopCount);
+                       app_info_destroy(pstAppInfoHandle);
+                       continue;
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_destroy", nSupportingFailCount);
+       }
+
+       if (nAppInfoIsStatusFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_is_enabled failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppInfoIsStatusFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoIsStatusSpeedLog, pszAppInfoIsStatusMemLog, NULL, NULL);
+               pstAppInfoHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_is_enabled, pszAppInfoIsStatusSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_is_enabled, pszAppInfoIsStatusMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoIsStatusSpeedLog, pszAppInfoIsStatusMemLog, NULL, NULL);
+       pstAppInfoHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to check whether two application information are equal
+
+/**
+* @testcase                    ITc_app_manager_app_info_is_equal_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To check whether two application information are equal
+* @scenario                            Get the application information for the given application ID\n
+*                                              Get the application information for the given application ID to compare\n
+*                                              Check whether two information are equal\n
+*                                              Destroys application info handle\n
+*                                              Destroys compared application info handle
+* @apicovered                  app_manager_get_app_info, app_info_is_equal, app_info_destroy
+* @passcase                            If app_info_is_equal returns success and bool returned is true and supporting API are passed
+* @failcase                            If app_info_is_equal returns fail or bool returned is false or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_is_equal_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoIsStatusMemLog = NULL;
+       char *pszAppInfoIsStatusSpeedLog = NULL;
+       int nAppInfoIsStatusFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL, pstAppInfoCompareHandle = NULL;
+       bool bStatus = false;
+
+       AppManagerAllocateMemory(&pszAppInfoIsStatusMemLog, &pszAppInfoIsStatusSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               pstAppInfoCompareHandle = NULL;
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__,nLoopCount);
+                       continue;
+               }
+
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoCompareHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoCompareHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed for compared app on iteration %d, error returned = Handle returned is NULL\\n", __LINE__,nLoopCount);
+                       app_info_destroy(pstAppInfoHandle);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_is_equal(pstAppInfoHandle, pstAppInfoCompareHandle, &bStatus);
+               AppManagerExecutionDelay(pszAppInfoIsStatusSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoIsStatusMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppInfoIsStatusFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_is_equal failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       app_info_destroy(pstAppInfoHandle);
+                       continue;
+               }
+               else if (!bStatus)
+               {
+                       nAppInfoIsStatusFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_is_equal failed on iteration %d, error returned = status is false\\n", __LINE__,nLoopCount);
+                       app_info_destroy(pstAppInfoHandle);
+                       app_info_destroy(pstAppInfoCompareHandle);
+                       continue;
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_destroy failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+               }
+
+               nRet = app_info_destroy(pstAppInfoCompareHandle);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_destroy failed for compared app on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+               }
+       }
+
+       if (nAppInfoIsStatusFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_is_equal failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppInfoIsStatusFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoIsStatusMemLog, pszAppInfoIsStatusSpeedLog, NULL, NULL);
+               pstAppInfoHandle = NULL;
+               pstAppInfoCompareHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_is_equal, pszAppInfoIsStatusSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_is_equal, pszAppInfoIsStatusMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoIsStatusMemLog, pszAppInfoIsStatusSpeedLog, NULL, NULL);
+       pstAppInfoHandle = NULL;
+       pstAppInfoCompareHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to check whether application information is no display
+
+/**
+* @testcase                    ITc_app_manager_app_info_is_nodisplay_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To check whether application information is no display
+* @scenario                            Get the application information for the given application ID\n
+*                                              Check whether application information is no display\n
+*                                              Destroys application info handle
+* @apicovered                  app_manager_get_app_info, app_info_is_nodisplay, app_info_destroy
+* @passcase                            If app_info_is_nodisplay returns success and supporting API are passed
+* @failcase                            If app_info_is_nodisplay returns fail or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_is_nodisplay_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoIsStatusMemLog = NULL;
+       char *pszAppInfoIsStatusSpeedLog = NULL;
+       int nAppInfoIsStatusFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL;
+       bool bStatus = false;
+
+       AppManagerAllocateMemory(&pszAppInfoIsStatusMemLog, &pszAppInfoIsStatusSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_is_nodisplay(pstAppInfoHandle, &bStatus);
+               AppManagerExecutionDelay(pszAppInfoIsStatusSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoIsStatusMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppInfoIsStatusFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_is_nodisplay failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       app_info_destroy(pstAppInfoHandle);
+                       continue;
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_destroy", nSupportingFailCount);
+       }
+
+       if (nAppInfoIsStatusFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_is_nodisplay failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppInfoIsStatusFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoIsStatusSpeedLog, pszAppInfoIsStatusMemLog, NULL, NULL);
+               pstAppInfoHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_is_nodisplay, pszAppInfoIsStatusSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_is_nodisplay, pszAppInfoIsStatusMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoIsStatusSpeedLog, pszAppInfoIsStatusMemLog, NULL, NULL);
+       pstAppInfoHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to check whether application is launched on booting time
+
+/**
+* @testcase                    ITc_app_manager_app_info_is_onboot_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To check whether application is launched on booting time
+* @scenario                            Get the application information for the given application ID\n
+*                                              Check whether application is launched on booting time\n
+*                                              Destroys application info handle
+* @apicovered                  app_manager_get_app_info, app_info_is_onboot, app_info_destroy
+* @passcase                            If app_info_is_onboot returns success and supporting API are passed
+* @failcase                            If app_info_is_onboot returns fail or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_is_onboot_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoIsStatusMemLog = NULL;
+       char *pszAppInfoIsStatusSpeedLog = NULL;
+       int nAppInfoIsStatusFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL;
+       bool bStatus = false;
+
+       AppManagerAllocateMemory(&pszAppInfoIsStatusMemLog, &pszAppInfoIsStatusSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_is_onboot(pstAppInfoHandle, &bStatus);
+               AppManagerExecutionDelay(pszAppInfoIsStatusSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoIsStatusMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppInfoIsStatusFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_is_onboot failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       app_info_destroy(pstAppInfoHandle);
+                       continue;
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_destroy", nSupportingFailCount);
+       }
+
+       if (nAppInfoIsStatusFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_is_onboot failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppInfoIsStatusFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoIsStatusSpeedLog, pszAppInfoIsStatusMemLog, NULL, NULL);
+               pstAppInfoHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_is_onboot, pszAppInfoIsStatusSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_is_onboot, pszAppInfoIsStatusMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoIsStatusSpeedLog, pszAppInfoIsStatusMemLog, NULL, NULL);
+       pstAppInfoHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to check whether application is launched on booting time
+
+/**
+* @testcase                    ITc_app_manager_app_info_is_preload_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To check whether application is launched on booting time
+* @scenario                            Get the application information for the given application ID\n
+*                                              Check whether application is launched on booting time\n
+*                                              Destroys application info handle
+* @apicovered                  app_manager_get_app_info, app_info_is_preload, app_info_destroy
+* @passcase                            If app_info_is_preload returns success and supporting API are passed
+* @failcase                            If app_info_is_preload returns fail or any supporting API fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_is_preload_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppInfoIsStatusMemLog = NULL;
+       char *pszAppInfoIsStatusSpeedLog = NULL;
+       int nAppInfoIsStatusFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL;
+       bool bStatus = false;
+
+       AppManagerAllocateMemory(&pszAppInfoIsStatusMemLog, &pszAppInfoIsStatusSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_is_preload(pstAppInfoHandle, &bStatus);
+               AppManagerExecutionDelay(pszAppInfoIsStatusSpeedLog);
+               AppManagerGetMemStatus(pszAppInfoIsStatusMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppInfoIsStatusFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_is_preload failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       app_info_destroy(pstAppInfoHandle);
+                       continue;
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_destroy", nSupportingFailCount);
+       }
+
+       if (nAppInfoIsStatusFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_is_preload failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppInfoIsStatusFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppInfoIsStatusSpeedLog, pszAppInfoIsStatusMemLog, NULL, NULL);
+               pstAppInfoHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_is_preload, pszAppInfoIsStatusSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_is_preload, pszAppInfoIsStatusMemLog);
+#endif
+       AppManagerFreeMemory(pszAppInfoIsStatusSpeedLog, pszAppInfoIsStatusMemLog, NULL, NULL);
+       pstAppInfoHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scenario to check create add and destroy metadata filters
+/**
+* @testcase                    ITc_app_manager_app_info_metadata_filter_create_add_destroy_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To check create add and destroy metadata filters
+* @scenario                            Creates the application's metadata information filter handle from db\n
+*                                              Adds filter condition for the query API\n
+*                                              Destroys the application's metadata information filter handle
+* @apicovered                  app_info_metadata_filter_create, app_info_metadata_filter_add, app_info_metadata_filter_destroy
+* @passcase                            If app_info_metadata_filter_create and app_info_metadata_filter_add and app_info_metadata_filter_destroy returns success
+* @failcase                            If app_info_metadata_filter_create or app_info_metadata_filter_add or app_info_metadata_filter_destroy returns fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_metadata_filter_create_add_destroy_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszMetadataFilterMemLog = NULL;
+       char *pszCreateMetadataFilterSpeedLog = NULL;
+       char *pszAddMetadataFilterSpeedLog = NULL;
+       char *pszDestroyMetadataFilterSpeedLog = NULL;
+       int nCreateFailCount = 0, nAddFailCount = 0, nDestroyFailCount = 0;
+       app_info_metadata_filter_h pstFilterHandle = NULL;
+
+       AppManagerAllocateMemory2(&pszMetadataFilterMemLog, &pszCreateMetadataFilterSpeedLog, &pszAddMetadataFilterSpeedLog);
+#if SPEED_CHECK
+       pszDestroyMetadataFilterSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstFilterHandle = NULL;
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_info_metadata_filter_create(&pstFilterHandle);
+               AppManagerExecutionDelay(pszCreateMetadataFilterSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "app_info_metadata_filter_create",nCreateFailCount);
+               if (pstFilterHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_metadata_filter_create failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nCreateFailCount++;
+                       continue;
+               }
+
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_info_metadata_filter_add(pstFilterHandle, MKEY, MVALUE);
+               AppManagerExecutionDelay(pszAddMetadataFilterSpeedLog);
+               if (nRet != 0)
+               {
+                       nAddFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_metadata_filter_add failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       app_info_metadata_filter_destroy(pstFilterHandle);
+                       continue;
+               }
+
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_info_metadata_filter_destroy(pstFilterHandle);
+               AppManagerExecutionDelay(pszDestroyMetadataFilterSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "app_info_metadata_filter_destroy", nDestroyFailCount);
+               AppManagerGetMemStatus(pszMetadataFilterMemLog);
+       }
+
+       if (nDestroyFailCount || nAddFailCount || nCreateFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_info_metadata_filter_create failed %d times, app_info_metadata_filter_add failed %d times, app_info_metadata_filter_destroy failed %d times out of %d times\\n", __LINE__, nCreateFailCount, nAddFailCount, nDestroyFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszMetadataFilterMemLog, pszCreateMetadataFilterSpeedLog, pszAddMetadataFilterSpeedLog, pszDestroyMetadataFilterSpeedLog);
+               pstFilterHandle = NULL;
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_metadata_filter_create, pszCreateMetadataFilterSpeedLog);
+       PRINT_SPEED_LOG(app_info_metadata_filter_add, pszAddMetadataFilterSpeedLog);
+       PRINT_SPEED_LOG(app_info_metadata_filter_destroy, pszDestroyMetadataFilterSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_metadata_filter_create_add_destroy, pszMetadataFilterMemLog);
+#endif
+       AppManagerFreeMemory(pszMetadataFilterMemLog, pszCreateMetadataFilterSpeedLog, pszAddMetadataFilterSpeedLog, pszDestroyMetadataFilterSpeedLog);
+       pstFilterHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To clone and destroy the application context handle
+/**
+* @testcase                    ITc_app_manager_app_context_clone_destroy_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To clone the application context handle
+* @scenario                            Get the application context\n
+*                                              clone the application context\n
+*                                              Terminate the cloned application context\n
+*                                              Terminate the get application context
+* @apicovered                  app_manager_get_app_context, app_context_clone, app_context_destroy
+* @passcase                            If app_manager_get_app_context, app_context_clone and app_context_destroy returns success and handle returned is not NULL
+* @failcase                            If app_manager_get_app_context or app_context_clone or app_context_destroy returns false or handle returned is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_context_clone_destroy_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerAppContextCloneMemLog = NULL;
+       char *pszAppManagerAppContextCloneSpeedLog = NULL;
+       char *pszAppManagerAppContextDestroySpeedLog = NULL;
+       int nCloneFailCount = 0, nDestroyFailCount = 0, nSupportingFailCount = 0;
+       app_context_h pstAppContextToCloneHandle = NULL, pstAppContextFromCloneHandle = NULL;
+
+       AppManagerAllocateMemory2(&pszAppManagerAppContextCloneMemLog, &pszAppManagerAppContextCloneSpeedLog, &pszAppManagerAppContextDestroySpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppContextToCloneHandle = NULL;
+               pstAppContextFromCloneHandle = NULL;
+
+               nRet = app_manager_get_app_context((const char *)APPID, &pstAppContextFromCloneHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_context", nSupportingFailCount);
+               if (pstAppContextFromCloneHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_context failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nSupportingFailCount++;
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_context_clone(&pstAppContextToCloneHandle, pstAppContextFromCloneHandle);
+               AppManagerExecutionDelay(pszAppManagerAppContextCloneSpeedLog);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_context_clone failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount,AppManagerGetError(nRet));
+                       nCloneFailCount++;
+                       app_context_destroy(pstAppContextFromCloneHandle);
+                       continue;
+               }
+
+               if (pstAppContextToCloneHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_context_clone failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nCloneFailCount++;
+                       app_context_destroy(pstAppContextFromCloneHandle);
+                       continue;
+               }
+
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_context_destroy(pstAppContextToCloneHandle);
+               AppManagerExecutionDelay(pszAppManagerAppContextDestroySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "app_context_destroy for cloned app", nDestroyFailCount);
+               AppManagerGetMemStatus(pszAppManagerAppContextCloneMemLog);
+
+               nRet = app_context_destroy(pstAppContextFromCloneHandle);
+               PRINT_RESULT_LOOP(nRet, "app_context_destroy", nDestroyFailCount);
+       }
+
+       if (nDestroyFailCount || nCloneFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_context_clone failed %d times, app_context_destroy failed %d times and supporting api failed %d times out of %d times", __LINE__, nCloneFailCount, nDestroyFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerAppContextCloneMemLog, pszAppManagerAppContextCloneSpeedLog, pszAppManagerAppContextDestroySpeedLog, NULL);
+               pstAppContextToCloneHandle = NULL;
+               pstAppContextFromCloneHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_context_clone, pszAppManagerAppContextCloneSpeedLog);
+       PRINT_SPEED_LOG(app_context_destroy, pszAppManagerAppContextDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_context_clone_destroy, pszAppManagerAppContextCloneMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerAppContextCloneMemLog, pszAppManagerAppContextCloneSpeedLog, pszAppManagerAppContextDestroySpeedLog, NULL);
+       pstAppContextToCloneHandle = NULL;
+       pstAppContextFromCloneHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the ID of the application for the given process ID
+/**
+* @testcase                    ITc_app_manager_app_context_get_app_id_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the ID of the application for the given process ID
+* @scenario                            Get the application context\n
+*                                              Get the ID of the application for the given process ID\n
+*                                              Terminate the application context
+* @apicovered                  app_manager_get_app_context, app_context_get_app_id, app_context_destroy
+* @passcase                            If app_manager_get_app_context, app_context_get_app_id and app_context_destroy returns success and handle returned is not NULL
+* @failcase                            If app_manager_get_app_context or app_context_get_app_id or app_context_destroy returns false or handle returned is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_context_get_app_id_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerAppContextMemLog = NULL;
+       char *pszAppManagerAppContextSpeedLog = NULL;
+       int nAppManagerAppContextFailCount = 0, nSupportingFailCount = 0;
+       app_context_h pstAppContextHandle = NULL;
+       char *pszAppID = NULL;
+
+       AppManagerAllocateMemory(&pszAppManagerAppContextMemLog, &pszAppManagerAppContextSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppContextHandle = NULL;
+               pszAppID = NULL;
+
+               nRet = app_manager_get_app_context((const char *)APPID, &pstAppContextHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_context", nSupportingFailCount);
+               if (pstAppContextHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_context failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nSupportingFailCount++;
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet =  app_context_get_app_id(pstAppContextHandle, &pszAppID);
+               AppManagerExecutionDelay(pszAppManagerAppContextSpeedLog);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_context_get_app_id failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount,AppManagerGetError(nRet));
+                       nAppManagerAppContextFailCount++;
+                       app_context_destroy(pstAppContextHandle);
+                       continue;
+               }
+               if (pszAppID == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_context_get_app_id failed on iteration %d, error returned = App ID returned is NULL\\n", __LINE__, nLoopCount);
+                       nAppManagerAppContextFailCount++;
+                       app_context_destroy(pstAppContextHandle);
+                       continue;
+               }
+               free(pszAppID);
+               pszAppID = NULL;
+               AppManagerGetMemStatus(pszAppManagerAppContextMemLog);
+
+               nRet = app_context_destroy(pstAppContextHandle);
+               PRINT_RESULT_LOOP(nRet, "app_context_destroy", nSupportingFailCount);
+       }
+
+       if (nAppManagerAppContextFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_context_get_app_id failed %d times and supporting api failed %d times out of %d times", __LINE__, nAppManagerAppContextFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerAppContextMemLog, pszAppManagerAppContextSpeedLog, NULL, NULL);
+               pstAppContextHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_context_get_app_id, pszAppManagerAppContextSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_context_get_app_id, pszAppManagerAppContextMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerAppContextMemLog, pszAppManagerAppContextSpeedLog, NULL, NULL);
+       pstAppContextHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the package with the given application context
+/**
+* @testcase                    ITc_app_manager_app_context_get_package_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the package with the given application context
+* @scenario                            Get the application context\n
+*                                              Get the package with the given application context\n
+*                                              Terminate the application context
+* @apicovered                  app_manager_get_app_context, app_context_get_package, app_context_destroy
+* @passcase                            If app_manager_get_app_context, app_context_get_package and app_context_destroy returns success and handle returned is not NULL
+* @failcase                            If app_manager_get_app_context or app_context_get_package or app_context_destroy returns false or handle returned is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_context_get_package_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerAppContextMemLog = NULL;
+       char *pszAppManagerAppContextSpeedLog = NULL;
+       int nAppManagerAppContextFailCount = 0, nSupportingFailCount = 0;
+       app_context_h pstAppContextHandle = NULL;
+       char *pszAppID = NULL;
+
+       AppManagerAllocateMemory(&pszAppManagerAppContextMemLog, &pszAppManagerAppContextSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppContextHandle = NULL;
+               pszAppID = NULL;
+
+               nRet = app_manager_get_app_context((const char *)APPID, &pstAppContextHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_context", nSupportingFailCount);
+               if (pstAppContextHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_context failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nSupportingFailCount++;
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet =  app_context_get_package(pstAppContextHandle, &pszAppID);
+               AppManagerExecutionDelay(pszAppManagerAppContextSpeedLog);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_context_get_package failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount,AppManagerGetError(nRet));
+                       nAppManagerAppContextFailCount++;
+                       app_context_destroy(pstAppContextHandle);
+                       continue;
+               }
+               if (pszAppID == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_context_get_package failed on iteration %d, error returned = Package returned is NULL\\n", __LINE__, nLoopCount);
+                       nAppManagerAppContextFailCount++;
+                       app_context_destroy(pstAppContextHandle);
+                       continue;
+               }
+               free(pszAppID);
+               pszAppID = NULL;
+               AppManagerGetMemStatus(pszAppManagerAppContextMemLog);
+
+               nRet = app_context_destroy(pstAppContextHandle);
+               PRINT_RESULT_LOOP(nRet, "app_context_destroy", nSupportingFailCount);
+       }
+
+       if (nAppManagerAppContextFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_context_get_package failed %d times and supporting api failed %d times out of %d times", __LINE__, nAppManagerAppContextFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerAppContextMemLog, pszAppManagerAppContextSpeedLog, NULL, NULL);
+               pstAppContextHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_context_get_package, pszAppManagerAppContextSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_context_get_package, pszAppManagerAppContextMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerAppContextMemLog, pszAppManagerAppContextSpeedLog, NULL, NULL);
+       pstAppContextHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the process ID with the given application context
+/**
+* @testcase                    ITc_app_manager_app_context_get_pid_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the package with the given application context
+* @scenario                            Get the application context\n
+*                                              Get the process ID with the given application context\n
+*                                              Terminate the application context
+* @apicovered                  app_manager_get_app_context, app_context_get_pid, app_context_destroy
+* @passcase                            If app_manager_get_app_context, app_context_get_pid and app_context_destroy returns success and handle returned is not NULL
+* @failcase                            If app_manager_get_app_context or app_context_get_pid or app_context_destroy returns false or handle returned is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_context_get_pid_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerAppContextMemLog = NULL;
+       char *pszAppManagerAppContextSpeedLog = NULL;
+       int nAppManagerAppContextFailCount = 0, nSupportingFailCount = 0;
+       app_context_h pstAppContextHandle = NULL;
+       pid_t nAppID = 0;
+
+       AppManagerAllocateMemory(&pszAppManagerAppContextMemLog, &pszAppManagerAppContextSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppContextHandle = NULL;
+               nAppID = 0;
+
+               nRet = app_manager_get_app_context((const char *)APPID, &pstAppContextHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_context", nSupportingFailCount);
+               if (pstAppContextHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_context failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nSupportingFailCount++;
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet =  app_context_get_pid(pstAppContextHandle, &nAppID);
+               AppManagerExecutionDelay(pszAppManagerAppContextSpeedLog);
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_context_get_pid failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount,AppManagerGetError(nRet));
+                       nAppManagerAppContextFailCount++;
+                       app_context_destroy(pstAppContextHandle);
+                       continue;
+               }
+               if (nAppID < 0)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_context_get_pid failed on iteration %d, error returned = PID returned is Negative\\n", __LINE__, nLoopCount);
+                       nAppManagerAppContextFailCount++;
+                       app_context_destroy(pstAppContextHandle);
+                       continue;
+               }
+               AppManagerGetMemStatus(pszAppManagerAppContextMemLog);
+
+               nRet = app_context_destroy(pstAppContextHandle);
+               PRINT_RESULT_LOOP(nRet, "app_context_destroy", nSupportingFailCount);
+       }
+
+       if (nAppManagerAppContextFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_context_get_pid failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppManagerAppContextFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerAppContextMemLog, pszAppManagerAppContextSpeedLog, NULL, NULL);
+               pstAppContextHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_context_get_pid , pszAppManagerAppContextSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_context_get_pid , pszAppManagerAppContextMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerAppContextMemLog, pszAppManagerAppContextSpeedLog, NULL, NULL);
+       pstAppContextHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the process ID with the given application context
+/**
+* @testcase                    ITc_app_manager_app_context_is_terminated_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the package with the given application context
+* @scenario                            Get the application context\n
+*                                              Terminate the application context\n
+*                                              Check if application context is terminated
+* @apicovered                  app_control_create, app_control_set_app_id, app_control_send_launch_request, app_manager_get_app_context, app_context_is_terminated, app_context_destroy, app_control_send_terminate_request
+* @passcase                            If app_manager_get_app_context, app_context_is_terminated and app_context_destroy returns success and handle returned is not NULL
+* @failcase                            If app_manager_get_app_context or app_context_is_terminated or app_context_destroy returns false or handle returned is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_context_is_terminated_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerAppContextMemLog = NULL;
+       char *pszAppManagerAppContextSpeedLog = NULL;
+       int nAppManagerAppContextFailCount = 0, nSupportingFailCount = 0;
+       app_context_h pstAppContextHandle = NULL;
+       bool bStatus = true;
+       app_control_h app_control_handler = NULL;
+
+       nRet = app_control_create(&app_control_handler);
+       if (nRet != APP_CONTROL_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_control_create failed, error returned : %d\\n", __LINE__ , nRet );
+               return 1;
+       }
+       if(app_control_handler == NULL)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_control_create failed, created handle value null\\n", __LINE__);
+               return 1;
+       }
+       nRet = app_control_set_app_id(app_control_handler , SECONDARYAPPID );
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_control_set_app_id failed, error returned : %d\\n", __LINE__ , nRet );
+               return 1;
+       }
+       
+       AppManagerAllocateMemory(&pszAppManagerAppContextMemLog, &pszAppManagerAppContextSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppContextHandle = NULL;
+               bStatus = true;
+               sleep(1);
+               
+               nRet = app_control_send_launch_request(app_control_handler , NULL , NULL);
+               PRINT_RESULT_LOOP(nRet, "app_control_send_launch_request", nSupportingFailCount);
+               //sleep for app to open
+               sleep(1);
+               nRet = app_manager_get_app_context(SECONDARYAPPID, &pstAppContextHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_context", nSupportingFailCount);
+               if (pstAppContextHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_context failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nSupportingFailCount++;
+                       continue;
+               }
+
+               nRet = app_context_destroy(pstAppContextHandle);
+               PRINT_RESULT_LOOP(nRet, "app_context_destroy", nSupportingFailCount);
+
+               nRet = app_control_send_terminate_request(app_control_handler);
+               PRINT_RESULT_LOOP(nRet, "app_control_send_terminate_request", nSupportingFailCount);
+               
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet =  app_context_is_terminated(pstAppContextHandle, &bStatus);
+               AppManagerExecutionDelay(pszAppManagerAppContextSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "app_context_is_terminated", nAppManagerAppContextFailCount);
+               if (bStatus == false)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_context_is_terminated failed on iteration %d, error returned = Application is running\\n", __LINE__, nLoopCount);
+                       nAppManagerAppContextFailCount++;
+               }
+               AppManagerGetMemStatus(pszAppManagerAppContextMemLog);
+       }
+       
+       app_control_destroy(app_control_handler);
+       if (nAppManagerAppContextFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_context_is_terminated failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppManagerAppContextFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerAppContextMemLog, pszAppManagerAppContextSpeedLog, NULL, NULL);
+               pstAppContextHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_context_is_terminated , pszAppManagerAppContextSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_context_is_terminated , pszAppManagerAppContextMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerAppContextMemLog, pszAppManagerAppContextSpeedLog, NULL, NULL);
+       pstAppContextHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the process ID with the given application context
+/**
+* @testcase                    ITc_app_manager_app_context_is_equal_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the package with the given application context
+* @scenario                            Get the application context\n
+*                                              Get the application context in another handle\n
+*                                              Compare the two context\n
+*                                              Terminate the application context\n
+*                                              Terminate the application context for compared application
+* @apicovered                  app_manager_get_app_context, app_context_is_equal, app_context_destroy
+* @passcase                            If app_manager_get_app_context, app_context_is_equal and app_context_destroy returns success and handle returned is not NULL
+* @failcase                            If app_manager_get_app_context or app_context_is_equal or app_context_destroy returns false or handle returned is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_app_context_is_equal_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerAppContextMemLog = NULL;
+       char *pszAppManagerAppContextSpeedLog = NULL;
+       int nAppManagerAppContextFailCount = 0, nSupportingFailCount = 0;
+       app_context_h pstAppContextHandle = NULL, pstAppContextDupHandle = NULL;
+       bool bStatus = false;
+
+       AppManagerAllocateMemory(&pszAppManagerAppContextMemLog, &pszAppManagerAppContextSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppContextHandle = NULL;
+               pstAppContextDupHandle = NULL;
+               bStatus = false;
+
+               nRet = app_manager_get_app_context((const char *)APPID, &pstAppContextHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_context", nSupportingFailCount);
+               if (pstAppContextHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_context failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nSupportingFailCount++;
+                       continue;
+               }
+
+               nRet = app_manager_get_app_context((const char *)APPID, &pstAppContextDupHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_context for duplicate", nSupportingFailCount);
+               if (pstAppContextDupHandle == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_context failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       nSupportingFailCount++;
+                       app_context_destroy(pstAppContextHandle);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet =  app_context_is_equal(pstAppContextHandle, pstAppContextDupHandle, &bStatus);
+               AppManagerExecutionDelay(pszAppManagerAppContextSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "app_context_is_equal", nAppManagerAppContextFailCount);
+               if (bStatus != true)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_context_is_equal failed on iteration %d, error returned = Application contexts are not equal\\n", __LINE__, nLoopCount);
+                       nAppManagerAppContextFailCount++;
+               }
+               AppManagerGetMemStatus(pszAppManagerAppContextMemLog);
+
+               nRet = app_context_destroy(pstAppContextHandle);
+               PRINT_RESULT_LOOP(nRet, "app_context_destroy", nSupportingFailCount);
+
+               nRet = app_context_destroy(pstAppContextDupHandle);
+               PRINT_RESULT_LOOP(nRet, "app_context_destroy for duplicate", nSupportingFailCount);
+       }
+
+       if (nAppManagerAppContextFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_context_is_equal failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppManagerAppContextFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerAppContextMemLog, pszAppManagerAppContextSpeedLog, NULL, NULL);
+               pstAppContextHandle = NULL;
+               pstAppContextDupHandle = NULL;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_context_is_equal, pszAppManagerAppContextSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_context_is_equal, pszAppManagerAppContextMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerAppContextMemLog, pszAppManagerAppContextSpeedLog, NULL, NULL);
+       pstAppContextHandle = NULL;
+       pstAppContextDupHandle = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the localed name of the application
+/**
+* @testcase                    ITc_app_manager_app_info_get_localed_label_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the localed name of the application
+* @scenario                            Get the application info\n
+*                                              Get the application ID\n
+*                                              Get the localed name of the application\n
+*                                              Destroy the application info
+* @apicovered                  app_manager_get_app_info, app_info_get_app_id, app_info_get_localed_label, app_info_destroy
+* @passcase                            If app_manager_get_app_info, app_info_get_app_id, app_info_get_localed_label, app_info_destroy returns success and returned handle is not NULL also the label and ID returned is not NULL
+* @failcase                            If app_manager_get_app_info or app_info_get_app_id or app_info_get_localed_label or app_info_destroy returns fail or returned handle is not NULL also the label or ID returned is NULL
+* @precondition                        app manager instance should be created
+* @postcondition               app manager instance should be destroyed
+*/
+int ITc_app_manager_app_info_get_localed_label_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerGetAppInfoMemLog = NULL;
+       char *pszAppManagerGetAppInfoSpeedLog = NULL;
+       int nAppManagerGetAppInfoFailCount = 0, nSupportingFailCount = 0;
+       app_info_h pstAppInfoHandle = NULL;
+       char *pszAppID = NULL;
+       char *pszLabel = NULL;
+       AppManagerAllocateMemory(&pszAppManagerGetAppInfoMemLog, &pszAppManagerGetAppInfoSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               pstAppInfoHandle = NULL;
+               pszAppID = NULL;
+               pszLabel = NULL;
+
+               nRet = app_manager_get_app_info((const char *)APPID, &pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_app_info", nSupportingFailCount);
+               if (pstAppInfoHandle == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_app_info failed on iteration %d, error returned = Handle returned is NULL\\n", __LINE__, nLoopCount);
+                       continue;
+               }
+
+               nRet = app_info_get_app_id(pstAppInfoHandle, &pszAppID);
+               PRINT_RESULT_LOOP(nRet, "app_info_get_app_id", nSupportingFailCount);
+               if (pszAppID == NULL)
+               {
+                       nSupportingFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_app_id failed for loop count = %d, error returned = ID returned is NULL\\n", __LINE__,nLoopCount);
+                       continue;
+               }
+
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               //Target API
+               nRet = app_info_get_localed_label(pszAppID, (const char *)LOCALE, &pszLabel);
+               AppManagerExecutionDelay(pszAppManagerGetAppInfoSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerGetAppInfoMemLog);
+
+               if ( nRet != APP_MANAGER_ERROR_NONE )
+               {
+                       nAppManagerGetAppInfoFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_localed_label failed on iteration %d, error returned = %s\\n", __LINE__,nLoopCount, AppManagerGetError(nRet));
+                       free(pszAppID);
+                       pszAppID = NULL;
+                       continue;
+               }
+               else if (pszLabel == NULL)
+               {
+                       nAppManagerGetAppInfoFailCount++;
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_localed_label failed for loop count = %d, error returned = ID returned is NULL\\n", __LINE__,nLoopCount);
+                       free(pszAppID);
+                       pszAppID = NULL;
+                       continue;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [app-manager_ITC] app_info_get_localed_label passed on iteration %d\\n", __LINE__,nLoopCount);
+#endif
+               }
+
+               nRet = app_info_destroy(pstAppInfoHandle);
+               PRINT_RESULT_LOOP(nRet, "app_info_destroy", nSupportingFailCount);
+               free(pszAppID);
+               pszAppID = NULL;
+               free(pszLabel);
+               pszLabel = NULL;
+       }
+
+       if (nAppManagerGetAppInfoFailCount || nSupportingFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_app_info_get_localed_label failed %d times and supporting api failed %d times out of %d times\\n", __LINE__, nAppManagerGetAppInfoFailCount, nSupportingFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+               pszAppID = NULL;
+               pszLabel = NULL;
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_info_get_localed_label, pszAppManagerGetAppInfoSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_app_info_get_localed_label, pszAppManagerGetAppInfoMemLog);
+#endif
+       AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+       pszAppID = NULL;
+       pszLabel = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the application shared resource path for the given application ID
+/**
+* @testcase                    ITc_app_manager_get_shared_resource_path_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the shared resource path for corresponding application information for the given application ID
+* @scenario                            Get the application information\n
+*                                              Destroy the application information
+* @apicovered                  app_manager_get_shared_resource_path
+* @passcase                            If app_manager_get_shared_resource_path returns success
+* @failcase                            If app_manager_get_shared_resource_path fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_get_shared_resource_path_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerGetAppInfoMemLog = NULL;
+       char *pszAppManagerGetAppInfoSpeedLog = NULL;
+       int nAppManagerFailCount = 0;
+       char *pszSharePath = NULL;
+
+       AppManagerAllocateMemory(&pszAppManagerGetAppInfoMemLog, &pszAppManagerGetAppInfoSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_manager_get_shared_resource_path((const char *)APPID, &pszSharePath);
+               AppManagerExecutionDelay(pszAppManagerGetAppInfoSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerGetAppInfoMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_shared_resource_path", nAppManagerFailCount);
+               
+               if(pszSharePath == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] No shared resource path for given app\\n", __LINE__);
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] shared resource path for given app = %s\\n", __LINE__, pszSharePath);
+               }
+               
+               // Memory allocated by API, has to be freed
+               free(pszSharePath);
+               pszSharePath = NULL;
+       }
+
+       if (nAppManagerFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_shared_resource_path failed %d times out of %d times", __LINE__, nAppManagerFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_manager_get_shared_resource_path, pszAppManagerGetAppInfoSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_get_shared_resource_path, pszAppManagerGetAppInfoMemLog);
+#endif
+
+       AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the application shared trusted path for the given application ID
+/**
+* @testcase                    ITc_app_manager_get_shared_trusted_path_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the shared resource path for corresponding application information for the given application ID
+* @scenario                            Get the application information\n
+*                                              Destroy the application information
+* @apicovered                  app_manager_get_shared_trusted_path
+* @passcase                            If app_manager_get_shared_trusted_path returns success
+* @failcase                            If app_manager_get_shared_trusted_path fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_get_shared_trusted_path_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerGetAppInfoMemLog = NULL;
+       char *pszAppManagerGetAppInfoSpeedLog = NULL;
+       int nAppManagerFailCount = 0;
+       char *pszSharePath = NULL;
+
+       AppManagerAllocateMemory(&pszAppManagerGetAppInfoMemLog, &pszAppManagerGetAppInfoSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_manager_get_shared_trusted_path((const char *)APPID, &pszSharePath);
+               AppManagerExecutionDelay(pszAppManagerGetAppInfoSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerGetAppInfoMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_shared_trusted_path", nAppManagerFailCount);
+               
+               if(pszSharePath == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] No trusted resource path for given app\\n", __LINE__);
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] trusted resource path for given app = %s\\n", __LINE__, pszSharePath);
+               }
+               
+               // Memory allocated by API, has to be freed
+               free(pszSharePath);
+               pszSharePath = NULL;
+       }
+
+       if (nAppManagerFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_shared_trusted_path failed %d times out of %d times", __LINE__, nAppManagerFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_manager_get_shared_trusted_path, pszAppManagerGetAppInfoSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_get_shared_trusted_path, pszAppManagerGetAppInfoMemLog);
+#endif
+
+       AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the application shared trusted path for the given application ID
+/**
+* @testcase                    ITc_app_manager_get_shared_data_path_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the shared resource path for corresponding application information for the given application ID
+* @scenario                            Get the application information\n
+*                                              Destroy the application information
+* @apicovered                  app_manager_get_shared_data_path
+* @passcase                            If app_manager_get_shared_data_path returns success
+* @failcase                            If app_manager_get_shared_data_path fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_get_shared_data_path_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerGetAppInfoMemLog = NULL;
+       char *pszAppManagerGetAppInfoSpeedLog = NULL;
+       int nAppManagerFailCount = 0;
+       char *pszSharePath = NULL;
+
+       AppManagerAllocateMemory(&pszAppManagerGetAppInfoMemLog, &pszAppManagerGetAppInfoSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               // Target API
+               nRet = app_manager_get_shared_data_path((const char *)APPID, &pszSharePath);
+               AppManagerExecutionDelay(pszAppManagerGetAppInfoSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerGetAppInfoMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_shared_data_path", nAppManagerFailCount);
+               
+               if(pszSharePath == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] No shared data path for given app\\n", __LINE__);
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] shared data path for given app = %s\\n", __LINE__, pszSharePath);
+               }
+               
+               // Memory allocated by API, has to be freed
+               free(pszSharePath);
+               pszSharePath = NULL;
+       }
+
+       if (nAppManagerFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_shared_data_path failed %d times out of %d times", __LINE__, nAppManagerFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_manager_get_shared_data_path, pszAppManagerGetAppInfoSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_get_shared_data_path, pszAppManagerGetAppInfoMemLog);
+#endif
+
+       AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the application shared trusted path for the given application ID
+/**
+* @testcase                    ITc_app_manager_get_external_shared_data_path_p
+* @type                                auto
+* @since_tizen                         2.3.1
+* @description                 To get the external shared data path for corresponding application information for the given application ID
+* @scenario                            Get the application information\n
+*                                              Destroy the application information
+* @apicovered                  app_manager_get_external_shared_data_path
+* @passcase                            If app_manager_get_external_shared_data_path returns success
+* @failcase                            If app_manager_get_external_shared_data_path fails
+* @precondition                        app manager instance should be created
+* @postcondition               app should be closed and app manager instance should be destroyed
+*/
+int ITc_app_manager_get_external_shared_data_path_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0, nRet = 0;
+       char *pszAppManagerGetAppInfoMemLog = NULL;
+       char *pszAppManagerGetAppInfoSpeedLog = NULL;
+       int nAppManagerFailCount = 0;
+       char *pszSharePath = NULL;
+
+       AppManagerAllocateMemory(&pszAppManagerGetAppInfoMemLog, &pszAppManagerGetAppInfoSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               AppManagerGetMemAllocation();
+               AppManagerGetTimeOfDay();
+               nRet = app_manager_get_external_shared_data_path((const char *)APPID, &pszSharePath);
+               AppManagerExecutionDelay(pszAppManagerGetAppInfoSpeedLog);
+               AppManagerGetMemStatus(pszAppManagerGetAppInfoMemLog);
+               PRINT_RESULT_LOOP(nRet, "app_manager_get_external_shared_data_path", nAppManagerFailCount);
+               
+               if(pszSharePath == NULL)
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] No external shared data path for given app\\n", __LINE__);
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [app-manager_ITC] external shared data path for given app = %s\\n", __LINE__, pszSharePath);
+               }
+               
+               // Memory allocated by API, has to be freed
+               free(pszSharePath);
+               pszSharePath = NULL;
+       }
+
+       if (nAppManagerFailCount)
+       {
+               FPRINTF("[Line : %d] [app-manager_ITC] app_manager_get_external_shared_data_path failed %d times out of %d times", __LINE__, nAppManagerFailCount, MAX_COUNT);
+               AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_manager_get_external_shared_data_path, pszAppManagerGetAppInfoSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_manager_get_external_shared_data_path, pszAppManagerGetAppInfoMemLog);
+#endif
+
+       AppManagerFreeMemory(pszAppManagerGetAppInfoSpeedLog, pszAppManagerGetAppInfoMemLog, NULL, NULL);
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/app-manager/org.tizen.appmanagertestfile-1.0.0-arm.tpk b/src/itc/app-manager/org.tizen.appmanagertestfile-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..34da0b6
Binary files /dev/null and b/src/itc/app-manager/org.tizen.appmanagertestfile-1.0.0-arm.tpk differ
diff --git a/src/itc/app-manager/org.tizen.appmanagertestfile-1.0.0-i386.tpk b/src/itc/app-manager/org.tizen.appmanagertestfile-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..5c68995
Binary files /dev/null and b/src/itc/app-manager/org.tizen.appmanagertestfile-1.0.0-i386.tpk differ
diff --git a/src/itc/app-manager/org.tizen.testapplication-1.0.0-arm.tpk b/src/itc/app-manager/org.tizen.testapplication-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..3e05d26
Binary files /dev/null and b/src/itc/app-manager/org.tizen.testapplication-1.0.0-arm.tpk differ
diff --git a/src/itc/app-manager/org.tizen.testapplication-1.0.0-i386.tpk b/src/itc/app-manager/org.tizen.testapplication-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..8d2bd7f
Binary files /dev/null and b/src/itc/app-manager/org.tizen.testapplication-1.0.0-i386.tpk differ
diff --git a/src/itc/app-manager/tct-app-manager-native.c b/src/itc/app-manager/tct-app-manager-native.c
new file mode 100755 (executable)
index 0000000..ff5f2d6
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-app-manager-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/app-manager/tct-app-manager-native.h b/src/itc/app-manager/tct-app-manager-native.h
new file mode 100755 (executable)
index 0000000..d13faef
--- /dev/null
@@ -0,0 +1,101 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_APP_MANAGER_NATIVE_H__
+#define __TCT_APP_MANAGER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_app_manager_startup(void);
+extern void ITs_app_manager_cleanup(void);
+
+extern int ITc_app_manager_app_info_metadata_filter_foreach_p(void);
+extern int ITc_app_manager_app_info_foreach_metadata_p(void);
+extern int ITc_app_manager_app_info_filter_foreach_appinfo_p(void);
+extern int ITc_app_manager_foreach_app_context_p(void);
+extern int ITc_app_manager_foreach_app_info_p(void);
+extern int ITc_app_manager_get_app_context_p(void);
+extern int ITc_app_manager_get_app_id_p(void);
+extern int ITc_app_manager_get_app_info_p(void);
+extern int ITc_app_manager_is_running_p(void);
+extern int ITc_app_manager_resume_app_p(void);
+extern int ITc_app_manager_app_info_create_clone_destroy_p(void);
+extern int ITc_app_manager_app_info_filter_add_string_bool_count_p(void);
+extern int ITc_app_manager_app_info_filter_create_destroy_p(void);
+extern int ITc_app_manager_app_info_get_app_id_p(void);
+extern int ITc_app_manager_app_info_get_exec_p(void);
+extern int ITc_app_manager_app_info_get_icon_p(void);
+extern int ITc_app_manager_app_info_get_label_p(void);
+extern int ITc_app_manager_app_info_get_package_p(void);
+extern int ITc_app_manager_app_info_get_type_p(void);
+extern int ITc_app_manager_app_info_is_enabled_p(void);
+extern int ITc_app_manager_app_info_is_equal_p(void);
+extern int ITc_app_manager_app_info_is_nodisplay_p(void);
+extern int ITc_app_manager_app_info_is_onboot_p(void);
+extern int ITc_app_manager_app_info_is_preload_p(void);
+extern int ITc_app_manager_app_info_metadata_filter_create_add_destroy_p(void);
+extern int ITc_app_manager_app_context_clone_destroy_p(void);
+extern int ITc_app_manager_app_context_get_app_id_p(void);
+extern int ITc_app_manager_app_context_get_package_p(void);
+extern int ITc_app_manager_app_context_get_pid_p(void);
+extern int ITc_app_manager_app_context_is_terminated_p(void);
+extern int ITc_app_manager_app_context_is_equal_p(void);
+extern int ITc_app_manager_app_info_get_localed_label_p(void);
+extern int ITc_app_manager_get_shared_resource_path_p(void);
+extern int ITc_app_manager_get_shared_trusted_path_p(void);
+extern int ITc_app_manager_get_shared_data_path_p(void);
+extern int ITc_app_manager_get_external_shared_data_path_p(void);
+
+testcase tc_array[] = {
+    {"ITc_app_manager_app_info_metadata_filter_foreach_p", ITc_app_manager_app_info_metadata_filter_foreach_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_foreach_metadata_p", ITc_app_manager_app_info_foreach_metadata_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_filter_foreach_appinfo_p", ITc_app_manager_app_info_filter_foreach_appinfo_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_foreach_app_context_p", ITc_app_manager_foreach_app_context_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_foreach_app_info_p", ITc_app_manager_foreach_app_info_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_get_app_context_p", ITc_app_manager_get_app_context_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_get_app_id_p", ITc_app_manager_get_app_id_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_get_app_info_p", ITc_app_manager_get_app_info_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_is_running_p", ITc_app_manager_is_running_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_resume_app_p", ITc_app_manager_resume_app_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_create_clone_destroy_p", ITc_app_manager_app_info_create_clone_destroy_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_filter_add_string_bool_count_p", ITc_app_manager_app_info_filter_add_string_bool_count_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_filter_create_destroy_p", ITc_app_manager_app_info_filter_create_destroy_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_get_app_id_p", ITc_app_manager_app_info_get_app_id_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_get_exec_p", ITc_app_manager_app_info_get_exec_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_get_icon_p", ITc_app_manager_app_info_get_icon_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_get_label_p", ITc_app_manager_app_info_get_label_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_get_package_p", ITc_app_manager_app_info_get_package_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_get_type_p", ITc_app_manager_app_info_get_type_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_is_enabled_p", ITc_app_manager_app_info_is_enabled_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_is_equal_p", ITc_app_manager_app_info_is_equal_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_is_nodisplay_p", ITc_app_manager_app_info_is_nodisplay_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_is_onboot_p", ITc_app_manager_app_info_is_onboot_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_is_preload_p", ITc_app_manager_app_info_is_preload_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_metadata_filter_create_add_destroy_p", ITc_app_manager_app_info_metadata_filter_create_add_destroy_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_context_clone_destroy_p", ITc_app_manager_app_context_clone_destroy_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_context_get_app_id_p", ITc_app_manager_app_context_get_app_id_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_context_get_package_p", ITc_app_manager_app_context_get_package_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_context_get_pid_p", ITc_app_manager_app_context_get_pid_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_context_is_terminated_p", ITc_app_manager_app_context_is_terminated_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_context_is_equal_p", ITc_app_manager_app_context_is_equal_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_app_info_get_localed_label_p", ITc_app_manager_app_info_get_localed_label_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_get_shared_resource_path_p", ITc_app_manager_get_shared_resource_path_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_get_shared_trusted_path_p", ITc_app_manager_get_shared_trusted_path_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_get_shared_data_path_p", ITc_app_manager_get_shared_data_path_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {"ITc_app_manager_get_external_shared_data_path_p", ITc_app_manager_get_external_shared_data_path_p, ITs_app_manager_startup, ITs_app_manager_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_APP_MANAGER_NATIVE_H__
diff --git a/src/itc/appcore-agent/CMakeLists.txt b/src/itc/appcore-agent/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..97a9bfc
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "appcore-agent")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-appfw-service-application")
+SET(TC_SOURCES
+       ITs-appcore-agent-common.c
+       ITs-appcore-agent.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       bundle
+       dlog
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/appcore-agent/ITs-appcore-agent-common.c b/src/itc/appcore-agent/ITs-appcore-agent-common.c
new file mode 100755 (executable)
index 0000000..2c240ed
--- /dev/null
@@ -0,0 +1,138 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-appcore-agent-common.h"
+
+/** @addtogroup itc-appcore-agent
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function definitions here
+
+/**
+* @function            AppcoreAgentGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* AppcoreAgentGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case APP_ERROR_INVALID_PARAMETER:       szErrorVal = "APP_ERROR_INVALID_PARAMETER";             break;
+       case APP_ERROR_OUT_OF_MEMORY:           szErrorVal = "APP_ERROR_OUT_OF_MEMORY";                 break;
+       case APP_ERROR_INVALID_CONTEXT:         szErrorVal = "APP_ERROR_INVALID_CONTEXT";               break;
+       case APP_ERROR_NO_SUCH_FILE:            szErrorVal = "APP_ERROR_NO_SUCH_FILE";                  break;
+       case APP_ERROR_ALREADY_RUNNING:         szErrorVal = "APP_ERROR_ALREADY_RUNNING";               break;
+       default:                                                        szErrorVal = "Unknown Error";                                   break;
+       }
+
+       return szErrorVal;
+}
+
+
+/**
+* @function                    AppcoreAgentGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void AppcoreAgentGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if ( stMemInfo.uordblks > g_stAppcoreAgentMemInfo.uordblks )
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stAppcoreAgentMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stAppcoreAgentMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    AppcoreAgentGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void AppcoreAgentGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stAppcoreAgentMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           AppcoreAgentExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void AppcoreAgentExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stAppcoreAgentStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stAppcoreAgentStartTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           AppcoreAgentGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stAppcoreAgentStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void AppcoreAgentGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stAppcoreAgentStartTime, NULL);
+#endif
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/appcore-agent/ITs-appcore-agent-common.h b/src/itc/appcore-agent/ITs-appcore-agent-common.h
new file mode 100755 (executable)
index 0000000..4f59c60
--- /dev/null
@@ -0,0 +1,117 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_APPCORE_AGENT_COMMON_H_
+#define _ITS_APPCORE_AGENT_COMMON_H_
+
+#include "assert.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <malloc.h>
+#include <unistd.h>
+
+#include <service_app.h>
+#include <glib-object.h>
+#include <glib-2.0/glib.h>
+
+/** @addtogroup itc-appcore-agent
+*  @ingroup itc
+*  @{
+*/
+
+FILE *g_fpLog;
+
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+
+struct mallinfo g_stAppcoreAgentMemInfo;
+struct timeval g_stAppcoreAgentStartTime;
+
+//Add helper function declarations here
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][AppcoreAgent_ITc] Starting test : %s\\n",__LINE__, __FUNCTION__);\
+}
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define VALIDATE_RESULT_PAIRAPI(nErrCount1, nErrCount2, szFirstApi, szSecondApi, szMemLog1, szMemLog2, szSpeedLog1, szSpeedLog2, count) {\
+       if ( nErrCount1 > 0 || nErrCount2 > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][AppcoreAgent_ITc] %s failed %d times, %s failed %d times out of %d times\\n", __LINE__, szFirstApi, nErrCount1, szSecondApi, nErrCount2, count );\
+               FREE_MEMORY(szMemLog1);\
+               FREE_MEMORY(szMemLog2);\
+               FREE_MEMORY(szSpeedLog1);\
+               FREE_MEMORY(szSpeedLog2);\
+               return 1;\
+       }\
+}
+
+#define VALIDATE_RESULT(nErrCount1, szApi, szMemLog, szSpeedLog, count) {\
+       if ( nErrCount1 > 0)\
+       {\
+               FPRINTF("\\n[Line : %d][AppcoreAgent_ITc] %s failed %d times, out of %d times\\n", __LINE__, szApi, nErrCount1, count);\
+               FREE_MEMORY(szMemLog);\
+               FREE_MEMORY(szSpeedLog);\
+               return 1;\
+       }\
+}
+
+#define FREE_MEMORY(pszPtr) {\
+       if(pszPtr != NULL)\
+       {\
+               free(pszPtr);\
+               pszPtr = NULL;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, szMemLog) {\
+       int nMLogLen = strlen(szMemLog);\
+       if(nMLogLen > 0) \
+       {  \
+               szMemLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d][AppcoreAgent_ITc] %s_MemoryLeakStatus - %s\\n", __LINE__, #api, szMemLog);\
+               free(szMemLog);\
+               szMemLog = NULL;\
+       }\
+}
+
+#define PRINT_SPEED_LOG(api, szSpeedLog) {\
+       if(strlen(szSpeedLog) > 0) \
+       {\
+               szSpeedLog[strlen(szSpeedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][AppcoreAgent_ITc] %s_TimeInMicrosec- %s\\n", __LINE__, #api, szSpeedLog);\
+               free(szSpeedLog);\
+               szSpeedLog = NULL;\
+       }\
+}
+
+char* AppcoreAgentGetError(int nRet);
+void AppcoreAgentGetMemStatus(char *pszAPIMemory);
+void AppcoreAgentGetMemAllocation();
+void AppcoreAgentExecutionDelay(char* pszAPITime);
+void AppcoreAgentGetTimeOfDay();
+
+/** @} */
+#endif  //_ITS_APPCORE_AGENT_COMMON_H_
diff --git a/src/itc/appcore-agent/ITs-appcore-agent.c b/src/itc/appcore-agent/ITs-appcore-agent.c
new file mode 100755 (executable)
index 0000000..226fd76
--- /dev/null
@@ -0,0 +1,309 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-appcore-agent-common.h"
+
+/** @addtogroup itc-appcore-agent
+*  @ingroup itc
+*  @{
+*/
+//& set: AppcoreAgent
+
+/**
+* @function            SigHandler
+* @description         signal handler
+* @parameter           sig : signal number
+* @return                      error string
+*/
+static void SigHandler(int sig)
+{
+       FPRINTF("\\n[Line : %d][AppcoreAgent_ITc] Inside SigHandler",__LINE__);
+       char *pszMemLogAPI2 = NULL;
+       char *pszSpeedLogAPI2 = NULL;
+
+#if SPEED_CHECK
+       pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLogAPI2 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+       
+       AppcoreAgentGetMemAllocation();
+       AppcoreAgentGetTimeOfDay();
+       service_app_exit();
+       AppcoreAgentExecutionDelay(pszSpeedLogAPI2);
+       AppcoreAgentGetMemStatus(pszMemLogAPI2);
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(service_app_exit, pszSpeedLogAPI2);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(service_app_exit, pszMemLogAPI2);
+#endif
+}
+
+/**
+* @function            ServiceAppCreate
+* @description         callback for service app create
+* @parameter           user_data : user data send to callback
+* @return                      true
+*/
+static bool ServiceAppCreate(void *user_data)
+{
+       return true;
+}
+
+/**
+* @function            ServiceAppControl
+* @description         callback for service app control
+* @parameter           app_control : app control handle, user_data: user data send to callback
+* @return                      NA
+*/
+static void ServiceAppControl(app_control_h app_control, void *user_data)
+{
+}
+
+/**
+* @function            ServiceAppTerminate
+* @description         callback for service app terminate
+* @parameter           user_data: user data send to callback
+* @return                      NA
+*/
+static void ServiceAppTerminate(void *user_data)
+{
+}
+
+/**
+* @function            AppEventHandlerCb
+* @description         callback for app event handle
+* @parameter           event_info: event info, user_data: user data send to callback
+* @return                      NA
+*/
+static void AppEventHandlerCb(app_event_info_h event_info, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][AppcoreAgent_ITc] Inside Callback AppEventHandlerCb ",__LINE__);
+}
+
+/**
+* @function            ITs_appcore_agent_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_appcore_agent_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       alarm(4);
+       return;
+}
+
+
+/** @function          ITs_appcore_agent_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_appcore_agent_cleanup(void)
+{
+       alarm(0);
+       return;
+}
+
+/** @addtogroup itc-appcore-agent-testcases
+*  @brief              Integration testcases for module appcore-agent
+*  @ingroup    itc-appcore-agent
+*  @{
+*/
+
+
+//& purpose: To check the main entry point of Tizen service application and exit the application
+//& type : auto
+/**
+* @testcase                            ITc_appcore_agent_service_app_main_exit_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To check the main entry point of Tizen service application and exit the application
+* @scenario                                    Call API service_app_main to get into main entry point of Tizen service application\n
+*                                                      Call API service_app_exit to exit from Tizen service application\n
+* @apicovered                          service_app_main, service_app_exit
+* @passcase                                    When API returns APP_ERROR_NONE
+* @failcase                                    When API does not return APP_ERROR_NONE
+* @precondition                                None
+* @postcondition                       None
+*/
+int ITc_appcore_agent_service_app_main_exit_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nMainFailCount = 0;
+       int nExpectedResult = APP_ERROR_NONE;
+       char *pszSpeedLogAPI1 = NULL;
+       char *pszMemLogAPI1 = NULL;
+       
+       service_app_lifecycle_callback_s cbHandle;
+       int nArg = 1;
+       char **pszArgv = (char**)malloc(sizeof(char*) * TIMELOG);
+       if ( pszArgv == NULL )
+       {
+               FPRINTF("\\n[Line : %d][AppcoreAgent_ITc] Memory Allocation Failed", __LINE__);
+               return 1;
+       }
+
+       pszArgv[0] = "service_app";
+       signal(SIGALRM, (void *)SigHandler); 
+       
+       memset(&cbHandle, 0x0, sizeof(service_app_lifecycle_callback_s));
+       cbHandle.create = ServiceAppCreate;
+       cbHandle.app_control = ServiceAppControl;
+       cbHandle.terminate = ServiceAppTerminate;
+       
+#if SPEED_CHECK
+       pszSpeedLogAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLogAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               AppcoreAgentGetMemAllocation();
+               AppcoreAgentGetTimeOfDay();
+               nRetVal = service_app_main(nArg, pszArgv, &cbHandle, NULL);
+               AppcoreAgentExecutionDelay(pszSpeedLogAPI1);
+               AppcoreAgentGetMemStatus(pszMemLogAPI1);
+               if ( nRetVal != nExpectedResult )
+               {
+                       FPRINTF("\\n[Line : %d][AppcoreAgent_ITc]service_app_main failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, AppcoreAgentGetError(nRetVal));
+                       nMainFailCount++;
+               }
+       }
+       free(pszArgv);
+       VALIDATE_RESULT(nMainFailCount, "service_app_main", pszMemLogAPI1, pszSpeedLogAPI1, MAX_COUNT);;
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(service_app_main, pszSpeedLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(service_app_main, pszMemLogAPI1);
+#endif
+       return 0;
+}
+
+//& purpose: To check set/unset system event handler callback function 
+//& type : auto
+/**
+* @testcase                            ITc_appcore_agent_service_app_add_remove_event_handler_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To check set/unset system event handler callback function
+* @scenario                                    Call API service_app_add_event_handler to add event handler callback function\n
+*                                                      Call API service_app_remove_event_handler to add event handler callback function 
+* @apicovered                          service_app_add_event_handler, service_app_remove_event_handler
+* @passcase                                    When API returns APP_ERROR_NONE
+* @failcase                                    When API does not return APP_ERROR_NONE
+* @precondition                                None
+* @postcondition                       None
+*/
+int ITc_appcore_agent_service_app_add_remove_event_handler_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nAddFailCount = 0 , nRemoveFailCount = 0, nEnumLoopCount = 0;
+       int nExpectedResult = APP_ERROR_NONE;
+
+       char *pszSpeedLogAPI1 = NULL;
+       char *pszSpeedLogAPI2 = NULL;
+       char *pszMemLogAPI1 = NULL;
+       char *pszMemLogAPI2 = NULL;
+
+       app_event_handler_h hEvent;
+       app_event_type_e eAppEventType = APP_EVENT_LOW_MEMORY;
+       
+       int arrAppEventType[] = {
+                       APP_EVENT_LOW_MEMORY,
+                       APP_EVENT_LOW_BATTERY};
+                       // APP_EVENT_LANGUAGE_CHANGED,                                          /* suggested by developer to be used by UI applications only */
+                       // APP_EVENT_DEVICE_ORIENTATION_CHANGED,
+                       // APP_EVENT_REGION_FORMAT_CHANGED};
+       
+       int nAppEventTypeIteration = sizeof(arrAppEventType) /sizeof(arrAppEventType[0]) ;
+
+#if SPEED_CHECK
+       pszSpeedLogAPI1 = calloc(TIMELOG * MAX_COUNT * nAppEventTypeIteration, sizeof(char));
+       pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT * nAppEventTypeIteration, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLogAPI1 = calloc(MEMLOG * MAX_COUNT * nAppEventTypeIteration, sizeof(char));
+       pszMemLogAPI2 = calloc(MEMLOG * MAX_COUNT * nAppEventTypeIteration, sizeof(char));
+#endif
+
+       for ( nEnumLoopCount = 0; nEnumLoopCount < nAppEventTypeIteration; nEnumLoopCount++ )
+       {
+               eAppEventType = arrAppEventType[nEnumLoopCount];
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+
+                       AppcoreAgentGetMemAllocation();
+                       AppcoreAgentGetTimeOfDay();
+                       nRetVal = service_app_add_event_handler(&hEvent, eAppEventType, AppEventHandlerCb, NULL);
+                       AppcoreAgentExecutionDelay(pszSpeedLogAPI1);
+                       AppcoreAgentGetMemStatus(pszMemLogAPI1);
+                       if(nRetVal != nExpectedResult)
+                       {
+                               FPRINTF("\\n[Line : %d][AppcoreAgent_ITc]service_app_add_event_handler failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, AppcoreAgentGetError(nRetVal));
+                               nAddFailCount++;
+                               continue;
+                       }
+
+                       AppcoreAgentGetMemAllocation();
+                       AppcoreAgentGetTimeOfDay();
+                       nRetVal = service_app_remove_event_handler(hEvent);
+                       if ( nRetVal != nExpectedResult )
+                       {
+                               FPRINTF("\\n[Line : %d][AppcoreAgent_ITc]service_app_remove_event_handler failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, AppcoreAgentGetError(nRetVal));
+                               nRemoveFailCount++;
+                       }
+                       AppcoreAgentExecutionDelay(pszSpeedLogAPI2);
+                       AppcoreAgentGetMemStatus(pszMemLogAPI2);
+               }
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nAddFailCount, nRemoveFailCount, "service_app_add_event_handler", "service_app_remove_event_handler", pszMemLogAPI1, pszMemLogAPI2, pszSpeedLogAPI1, pszSpeedLogAPI2, MAX_COUNT*nAppEventTypeIteration);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(service_app_add_event_handler, pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(service_app_remove_event_handler, pszSpeedLogAPI2);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(service_app_add_event_handler, pszMemLogAPI1);
+       PRINT_MEMORY_LOG(service_app_remove_event_handler, pszMemLogAPI2);
+#endif
+
+       return 0;
+}
+/** @} */ //end of itc-appcore-agent-testcases
+/** @} */ //end of itc-appcore-agent
diff --git a/src/itc/appcore-agent/tct-appcore-agent-native.c b/src/itc/appcore-agent/tct-appcore-agent-native.c
new file mode 100755 (executable)
index 0000000..aaa1259
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-appcore-agent-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/appcore-agent/tct-appcore-agent-native.h b/src/itc/appcore-agent/tct-appcore-agent-native.h
new file mode 100755 (executable)
index 0000000..8d9d9a3
--- /dev/null
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_APPCORE_AGENT_NATIVE_H__
+#define __TCT_APPCORE_AGENT_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_appcore_agent_startup(void);
+extern void ITs_appcore_agent_cleanup(void);
+
+extern int ITc_appcore_agent_service_app_main_exit_p(void);
+extern int ITc_appcore_agent_service_app_add_remove_event_handler_p(void);
+
+testcase tc_array[] = {
+    {"ITc_appcore_agent_service_app_main_exit_p", ITc_appcore_agent_service_app_main_exit_p, ITs_appcore_agent_startup, ITs_appcore_agent_cleanup},
+    {"ITc_appcore_agent_service_app_add_remove_event_handler_p", ITc_appcore_agent_service_app_add_remove_event_handler_p, ITs_appcore_agent_startup, ITs_appcore_agent_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_APPCORE_AGENT_NATIVE_H__
diff --git a/src/itc/appcore-watch/CMakeLists.txt b/src/itc/appcore-watch/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..ff381ea
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "appcore-watch")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-appfw-watch-application elementary")
+SET(TC_SOURCES
+       ITs-appcore-watch-common.c
+       ITs-appcore-watch.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/appcore-watch/ITs-appcore-watch-common.c b/src/itc/appcore-watch/ITs-appcore-watch-common.c
new file mode 100755 (executable)
index 0000000..938db12
--- /dev/null
@@ -0,0 +1,191 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-appcore-watch-common.h"
+
+//Add helper function definitions here
+
+/**
+ * @function           AppcoreWatchGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* AppcoreWatchGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch (nRet)
+       {
+               case APP_ERROR_NONE:
+                       szErrorVal = "APP_ERROR_NONE";
+                       break;
+               case APP_ERROR_INVALID_PARAMETER:
+                       szErrorVal = "APP_ERROR_INVALID_PARAMETER";
+                       break;
+               case APP_ERROR_INVALID_CONTEXT:
+                       szErrorVal = "APP_ERROR_INVALID_CONTEXT";
+                       break;
+               case APP_ERROR_ALREADY_RUNNING:
+                       szErrorVal = "APP_ERROR_ALREADY_RUNNING";
+                       break;
+               //case APP_ERROR_PERMISSION_DENIED:
+               //      szErrorVal = "APP_ERROR_PERMISSION_DENIED";
+               //      break;
+               case APP_ERROR_OUT_OF_MEMORY:
+                       szErrorVal = "APP_ERROR_OUT_OF_MEMORY";
+                       break;
+               default:
+                       szErrorVal = "Unknown Error";
+                       break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function                    handler
+* @description         Called when the exit signal is sent
+* @parameter[IN]       signal
+* @return                      NA
+*/
+void handler(int sig)
+{
+       watch_app_exit();
+}
+
+/**
+* @function                    event_callback
+* @description         Called when a system event is occurred
+* @parameter[IN]       event The system event message
+* @parameter[IN]       data The user data passed to the callback functions
+* @return                      NA
+*/
+void event_callback(void *event, void *data)
+{
+}
+
+/**
+* @function                    watch_app_create_callback
+* @description         Called when the application starts
+* @parameter[IN]       width The width of the window of idle screen that will show the watch UI
+* @parameter[IN]       height The height of the window of idle screen that will show the watch UI
+* @parameter[IN]       user_data The user data passed from the callback registration function
+* @return                      true on success, otherwise false
+*/
+bool watch_app_create_callback(int width, int height, void *user_data)
+{
+       if (g_pAppcoreWatchMainLoop)
+       {
+               g_main_loop_quit(g_pAppcoreWatchMainLoop);
+               g_main_loop_unref(g_pAppcoreWatchMainLoop);
+               g_pAppcoreWatchMainLoop = NULL;
+       }
+       return true;
+}
+
+/**
+* @function                    watch_app_terminate_callback
+* @description         Called when the application's main loop exits
+* @parameter[IN]       user_data The user data passed from the callback registration function
+* @return                      true on success, otherwise false
+*/
+void watch_app_terminate_callback(void *user_data)
+{
+}
+
+/**
+* @function                    watch_app_control_callback
+* @description         Called when another application sends a launch request to the application
+* @parameter[IN]       app_control The handle to the app_control
+* @parameter[IN]       user_data The user data passed from the callback registration function
+* @return                      true on success, otherwise false
+*/
+void watch_app_control_callback(app_control_h app_control, void *user_data)
+{
+}
+
+/**
+* @function                    watch_app_pause_callback
+* @description         Called when the application is completely obscured by another application and becomes invisible
+* @parameter[IN]       user_data The user data passed from the callback registration function
+* @return                      true on success, otherwise false
+*/
+void watch_app_pause_callback(void *user_data)
+{
+}
+
+/**
+* @function                    watch_app_resume_callback
+* @description         Called when the application becomes visible
+* @parameter[IN]       user_data The user data passed from the callback registration function
+* @return                      true on success, otherwise false
+*/
+void watch_app_resume_callback(void *user_data)
+{
+}
+
+/**
+* @function                    watch_app_time_tick_callback
+* @description         Called at each second. This callback is not called while the app is paused or the device is in ambient mode
+* @parameter[IN]       watch_time The watch time handle. watch_time will not be available after returning this callback. It will be freed by the framework.
+* @parameter[IN]       user_data The user data to be passed to the callback functions
+* @return                      true on success, otherwise false
+*/
+void watch_app_time_tick_callback(watch_time_h watch_time, void *user_data)
+{
+}
+
+/**
+* @function                    watch_app_ambient_tick_callback
+* @description         Called at each minute when the device in the ambient mode
+* @parameter[IN]       watch_time The watch time handle. watch_time will not be available after returning this callback. It will be freed by the framework.
+* @parameter[IN]       user_data The user data to be passed to the callback functions
+* @return                      true on success, otherwise false
+*/
+void watch_app_ambient_tick_callback(watch_time_h watch_time, void *user_data)
+{
+}
+
+/**
+* @function                    watch_app_ambient_changed_callback
+* @description         Called when the device enters or exits the ambient mode
+* @parameter[IN]       ambient_mode If true the device enters the ambient mode, otherwise false
+* @parameter[IN]       user_data The user data to be passed to the callback functions
+* @return                      true on success, otherwise false
+*/
+void watch_app_ambient_changed_callback(bool ambient_mode, void *user_data)
+{
+}
+
+/**
+ * @function           AppcoreWatchTimeout
+ * @description                Called if some callback is not invoked for a particular AppcoreWatchTimeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */ 
+gboolean AppcoreWatchTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               g_main_loop_unref(pMainLoop);
+               pMainLoop = NULL;
+       }
+       FPRINTF("[Line : %d][appcore_watch_ITC] Callback AppcoreWatchTimeout\\n", __LINE__);
+       return false;
+}
\ No newline at end of file
diff --git a/src/itc/appcore-watch/ITs-appcore-watch-common.h b/src/itc/appcore-watch/ITs-appcore-watch-common.h
new file mode 100755 (executable)
index 0000000..01c2e6c
--- /dev/null
@@ -0,0 +1,71 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_APPCORE_WATCH_COMMON_H_
+#define _ITS_APPCORE_WATCH_COMMON_H_
+
+#include "assert.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <glib.h>
+
+//Add test package related includes here
+#include <signal.h>
+#include <watch_app.h>
+#include <Evas.h>
+
+#define TIMEZONE_BUFFER_MAX                    1024
+#define TIMEOUT_CB                                     5000
+
+FILE *g_fpLog;
+GMainLoop *g_pAppcoreWatchMainLoop;
+
+//Add helper function declarations here
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][appcore_watch_ITC] Starting test : %s\\n", __LINE__, __FUNCTION__);\
+}
+
+#define RUN_POLLING_LOOP {\
+       g_pAppcoreWatchMainLoop = g_main_loop_new(NULL, false);\
+       nAppcoreWatchTimeoutId = g_timeout_add(TIMEOUT_CB, AppcoreWatchTimeout, g_pAppcoreWatchMainLoop);\
+       g_main_loop_run(g_pAppcoreWatchMainLoop);\
+       g_source_remove(nAppcoreWatchTimeoutId);\
+       g_pAppcoreWatchMainLoop = NULL;\
+}
+
+//Add helper function declarations here
+char* AppcoreWatchGetError(int nRet);
+void handler(int sig);
+void event_callback(void *event, void *data);
+bool watch_app_create_callback(int width, int height, void *user_data);
+void watch_app_terminate_callback(void *user_data);
+void watch_app_control_callback(app_control_h app_control, void *user_data);
+void watch_app_pause_callback(void *user_data);
+void watch_app_resume_callback(void *user_data);
+void watch_app_time_tick_callback(watch_time_h watch_time, void *user_data);
+void watch_app_ambient_tick_callback(watch_time_h watch_time, void *user_data);
+void watch_app_ambient_changed_callback(bool ambient_mode, void *user_data);
+gboolean AppcoreWatchTimeout(gpointer data);
+#endif  //_ITS_APPCORE_WATCH_COMMON_H_
diff --git a/src/itc/appcore-watch/ITs-appcore-watch.c b/src/itc/appcore-watch/ITs-appcore-watch.c
new file mode 100755 (executable)
index 0000000..616b64c
--- /dev/null
@@ -0,0 +1,865 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-appcore-watch-common.h"
+
+//& set: AppcoreWatch
+
+/**
+ * @function           ITs_appcore_watch_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_appcore_watch_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line : %d][appcore_watch_ITC] TEST SUIT start-up: ITs_Appcore_Watch_p\\n", __LINE__);
+#endif
+
+       return;
+}
+
+/**
+ * @function           ITs_appcore_watch_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_appcore_watch_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][appcore_watch_ITC] TEST SUIT clean-up: ITs_Appcore_Watch_p\\n", __LINE__);
+#endif
+       return;
+}
+
+//& purpose: Runs the main loop of the application until watch_app_exit() is called
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_app_main_exit_p
+ * @type                                       auto
+ * @description                                Runs the main loop of the application until watch_app_exit() is called
+ * @scenario                           Run the main loop of the application
+ *                                                     Exit the main loop of the application
+ * @apicovered                         watch_app_main, watch_app_exit
+ * @passcase                           When watch_app_main and watch_app_exit is successful.
+ * @failcase                           If target API watch_app_main or watch_app_exit or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+// Commented as per developer suggestion:
+// "watch application should be launched by the watch viewer application like widget.
+// I think we don't have a proper way to make the positive case of watch_app_main now.."
+/*int ITc_appcore_watch_watch_app_main_exit_p(void)
+{
+       START_TEST;
+       
+       watch_app_lifecycle_callback_s callback = {0,};
+       int argc = 1;
+       char **argv;
+       argv = malloc(1 * sizeof(char *));
+       argv[0] = "watch_app";
+
+       callback.create = watch_app_create_callback;
+       callback.app_control = watch_app_control_callback;
+       callback.terminate = watch_app_terminate_callback;
+       callback.pause = watch_app_pause_callback;
+       callback.resume = watch_app_resume_callback;
+       callback.time_tick = watch_app_time_tick_callback;
+       callback.ambient_tick = watch_app_ambient_tick_callback;
+       callback.ambient_changed = watch_app_ambient_changed_callback;
+
+       // Target API
+       int nRet = watch_app_main(argc, argv, &callback, NULL);
+       free(argv);
+       
+       int nAppcoreWatchTimeoutId = 0;
+       RUN_POLLING_LOOP;
+       
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_app_main failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       //signal(SIGALRM, (void *)handler);
+
+       // Target API
+       watch_app_exit();
+       
+       return 0;
+}*/
+
+//& purpose: Adds and removes the system event handler
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_app_add_remove_event_handler_p
+ * @type                                       auto
+ * @description                                Adds and removes the system event handler
+ * @scenario                           Add the system event handler
+ *                                                     Remove the registered event handler
+ * @apicovered                         watch_app_add_event_handler, watch_app_remove_event_handler
+ * @passcase                           When watch_app_add_event_handler and watch_app_remove_event_handler is successful.
+ * @failcase                           If target API watch_app_add_event_handler or watch_app_remove_event_handler or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_app_add_remove_event_handler_p(void)
+{
+       START_TEST;
+       
+       app_event_handler_h handler;
+
+       // Target API
+       int nRet = watch_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, (app_event_cb) event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_app_add_event_handler failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+
+       // Target API
+       nRet = watch_app_remove_event_handler(handler);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_app_remove_event_handler failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the current time and then deletes the watch time handle to releases all its resources
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_current_time_delete_p
+ * @type                                       auto
+ * @description                                Gets the current time and then deletes the watch time handle to releases all its resources
+ * @scenario                           Get the current time
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_current_time, watch_time_delete
+ * @passcase                           When watch_time_get_current_time and watch_time_delete is successful.
+ * @failcase                           If target API watch_time_get_current_time or watch_time_delete or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_current_time_delete_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+
+       // Target API
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+
+       // Target API
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the year info
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_year_p
+ * @type                                       auto
+ * @description                                Gets the year info
+ * @scenario                           Get the current time
+ *                                                     Get the year info
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_year
+ * @passcase                           When watch_time_get_year is successful.
+ * @failcase                           If target API watch_time_get_year or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_year_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       int year;
+
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       // Target API
+       nRet = watch_time_get_year(watch_time, &year);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_year failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       if ( year < 0 )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_year returned returned invalid value = %d\\n", __LINE__, year);
+               watch_time_delete(watch_time);
+               return 1;
+       }
+
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the month info
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_month_p
+ * @type                                       auto
+ * @description                                Gets the month info
+ * @scenario                           Get the current time
+ *                                                     Get the month info
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_month
+ * @passcase                           When watch_time_get_month is successful.
+ * @failcase                           If target API watch_time_get_month or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_month_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       int month;
+
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       // Target API
+       nRet = watch_time_get_month(watch_time, &month);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_month failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       if ( month < 0 )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_month returned returned invalid value = %d\\n", __LINE__, month);
+               watch_time_delete(watch_time);
+               return 1;
+       }
+
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the day info
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_day_p
+ * @type                                       auto
+ * @description                                Gets the day info
+ * @scenario                           Get the current time
+ *                                                     Get the day info
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_day
+ * @passcase                           When watch_time_get_day is successful.
+ * @failcase                           If target API watch_time_get_day or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_day_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       int day;
+
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       // Target API
+       nRet = watch_time_get_day(watch_time, &day);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_day failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       if ( day < 0 )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_day returned returned invalid value = %d\\n", __LINE__, day);
+               watch_time_delete(watch_time);
+               return 1;
+       }
+
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the day of week info
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_day_of_week_p
+ * @type                                       auto
+ * @description                                Gets the day of week info
+ * @scenario                           Get the current time
+ *                                                     Get the day of week info
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_day_of_week
+ * @passcase                           When watch_time_get_day_of_week is successful.
+ * @failcase                           If target API watch_time_get_day_of_week or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_day_of_week_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       int day_of_week;
+
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       // Target API
+       nRet = watch_time_get_day_of_week(watch_time, &day_of_week);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_day_of_week failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       if ( day_of_week < 0 )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_day_of_week returned returned invalid value = %d\\n", __LINE__, day_of_week);
+               watch_time_delete(watch_time);
+               return 1;
+       }
+
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the hour info
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_hour_p
+ * @type                                       auto
+ * @description                                Gets the hour info
+ * @scenario                           Get the current time
+ *                                                     Get the hour info
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_hour
+ * @passcase                           When watch_time_get_hour is successful.
+ * @failcase                           If target API watch_time_get_hour or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_hour_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       int hour;
+
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       // Target API
+       nRet = watch_time_get_hour(watch_time, &hour);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_hour failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       if ( hour < 0 )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_hour returned returned invalid value = %d\\n", __LINE__, hour);
+               watch_time_delete(watch_time);
+               return 1;
+       }
+
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the hour info in 24-hour presentation
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_hour24_p
+ * @type                                       auto
+ * @description                                Gets the hour info in 24-hour presentation
+ * @scenario                           Get the current time
+ *                                                     Get the hour info in 24-hour presentation
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_hour24
+ * @passcase                           When watch_time_get_hour24 is successful.
+ * @failcase                           If target API watch_time_get_hour24 or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_hour24_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       int hour24;
+
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       // Target API
+       nRet = watch_time_get_hour24(watch_time, &hour24);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_hour24 failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       if ( hour24 < 0 )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_hour24 returned returned invalid value = %d\\n", __LINE__, hour24);
+               watch_time_delete(watch_time);
+               return 1;
+       }
+
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the minute info
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_minute_p
+ * @type                                       auto
+ * @description                                Gets the minute info
+ * @scenario                           Get the current time
+ *                                                     Get the minute info
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_minute
+ * @passcase                           When watch_time_get_minute is successful.
+ * @failcase                           If target API watch_time_get_minute or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_minute_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       int minute;
+
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       // Target API
+       nRet = watch_time_get_minute(watch_time, &minute);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_minute failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       if ( minute < 0 )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_minute returned returned invalid value = %d\\n", __LINE__, minute);
+               watch_time_delete(watch_time);
+               return 1;
+       }
+
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the second info
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_second_p
+ * @type                                       auto
+ * @description                                Gets the second info
+ * @scenario                           Get the current time
+ *                                                     Get the second info
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_second
+ * @passcase                           When watch_time_get_second is successful.
+ * @failcase                           If target API watch_time_get_second or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_second_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       int second;
+
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       // Target API
+       nRet = watch_time_get_second(watch_time, &second);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_second failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       if ( second < 0 )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_second returned returned invalid value = %d\\n", __LINE__, second);
+               watch_time_delete(watch_time);
+               return 1;
+       }
+
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the millisecond info
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_millisecond_p
+ * @type                                       auto
+ * @description                                Gets the millisecond info
+ * @scenario                           Get the current time
+ *                                                     Get the millisecond info
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_millisecond
+ * @passcase                           When watch_time_get_millisecond is successful.
+ * @failcase                           If target API watch_time_get_millisecond or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_millisecond_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       int millisecond;
+
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       // Target API
+       nRet = watch_time_get_millisecond(watch_time, &millisecond);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_millisecond failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       if ( millisecond < 0 )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_millisecond returned returned invalid value = %d\\n", __LINE__, millisecond);
+               watch_time_delete(watch_time);
+               return 1;
+       }
+
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the UTC time
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_utc_time_p
+ * @type                                       auto
+ * @description                                Gets the UTC time
+ * @scenario                           Get the current time
+ *                                                     Get the UTC time
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_utc_time
+ * @passcase                           When watch_time_get_utc_time is successful.
+ * @failcase                           If target API watch_time_get_utc_time or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_utc_time_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       struct tm *utc_time = calloc(1, sizeof(struct tm));
+       
+       // Target API
+       nRet = watch_time_get_utc_time(watch_time, utc_time);
+       free(utc_time);
+       
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_utc_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the UTC timestamp
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_utc_timestamp_p
+ * @type                                       auto
+ * @description                                Gets the UTC timestamp
+ * @scenario                           Get the current time
+ *                                                     Get the UTC timestamp
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_utc_timestamp
+ * @passcase                           When watch_time_get_utc_timestamp is successful.
+ * @failcase                           If target API watch_time_get_utc_timestamp or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_utc_timestamp_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       time_t *time_stamp = calloc(1, sizeof(time_t));
+
+       // Target API
+       nRet = watch_time_get_utc_timestamp(watch_time, time_stamp);
+       free(time_stamp);
+       
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_utc_timestamp failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets the ID of timezone for the watch_time handle
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_time_get_time_zone_p
+ * @type                                       auto
+ * @description                                Gets the ID of timezone for the watch_time handle
+ * @scenario                           Get the current time
+ *                                                     Get the ID of timezone for the watch_time handle
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_time_get_time_zone
+ * @passcase                           When watch_time_get_time_zone is successful.
+ * @failcase                           If target API watch_time_get_time_zone or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_watch_watch_time_get_time_zone_p(void)
+{
+       START_TEST;
+       
+       watch_time_h watch_time = {0,};
+       
+       int nRet = watch_time_get_current_time(&watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_current_time failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       char* timezone = (char*) malloc(TIMEZONE_BUFFER_MAX * sizeof(char));
+
+       // Target API
+       nRet = watch_time_get_time_zone(watch_time, &timezone);
+       free(timezone);
+       
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_get_time_zone failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               watch_time_delete(watch_time);
+               return 1;
+       }
+       
+       nRet = watch_time_delete(watch_time);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_time_delete failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Gets Evas_Object for a Elementary window of watch application
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_watch_watch_app_get_elm_win_p
+ * @type                                       auto
+ * @description                                Gets Evas_Object for a Elementary window of watch application
+ * @scenario                           Get the current time
+ *                                                     Get Evas_Object for a Elementary window of watch application
+ *                                                     Delete the watch time handle and releases all its resources
+ * @apicovered                         watch_app_get_elm_win
+ * @passcase                           When watch_app_get_elm_win is successful.
+ * @failcase                           If target API watch_app_get_elm_win or any supporting API fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+//Commented due to failure on wearable emulator
+/*int ITc_appcore_watch_watch_app_get_elm_win_p(void)
+{
+       START_TEST;
+       
+       Evas_Object *win;
+
+       // Target API
+       int nRet = watch_app_get_elm_win(&win);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_app_get_elm_win failed, error returned = %s\\n", __LINE__, AppcoreWatchGetError(nRet));
+               return 1;
+       }
+       if ( win == NULL )
+       {
+               FPRINTF("[Line : %d][appcore_watch_ITC] watch_app_get_elm_win returned returned invalid value = NULL\\n", __LINE__);
+               return 1;
+       }
+       
+       free(win);
+       return 0;
+}*/
diff --git a/src/itc/appcore-watch/tct-appcore-watch-native.c b/src/itc/appcore-watch/tct-appcore-watch-native.c
new file mode 100755 (executable)
index 0000000..b9b54fa
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-appcore-watch-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/appcore-watch/tct-appcore-watch-native.h b/src/itc/appcore-watch/tct-appcore-watch-native.h
new file mode 100755 (executable)
index 0000000..ef41fb7
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_APPCORE_WATCH_NATIVE_H__
+#define __TCT_APPCORE_WATCH_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_appcore_watch_startup(void);
+extern void ITs_appcore_watch_cleanup(void);
+
+extern int ITc_appcore_watch_watch_app_add_remove_event_handler_p(void);
+extern int ITc_appcore_watch_watch_time_get_current_time_delete_p(void);
+extern int ITc_appcore_watch_watch_time_get_year_p(void);
+extern int ITc_appcore_watch_watch_time_get_month_p(void);
+extern int ITc_appcore_watch_watch_time_get_day_p(void);
+extern int ITc_appcore_watch_watch_time_get_day_of_week_p(void);
+extern int ITc_appcore_watch_watch_time_get_hour_p(void);
+extern int ITc_appcore_watch_watch_time_get_hour24_p(void);
+extern int ITc_appcore_watch_watch_time_get_minute_p(void);
+extern int ITc_appcore_watch_watch_time_get_second_p(void);
+extern int ITc_appcore_watch_watch_time_get_millisecond_p(void);
+extern int ITc_appcore_watch_watch_time_get_utc_time_p(void);
+extern int ITc_appcore_watch_watch_time_get_utc_timestamp_p(void);
+extern int ITc_appcore_watch_watch_time_get_time_zone_p(void);
+
+testcase tc_array[] = {
+    {"ITc_appcore_watch_watch_app_add_remove_event_handler_p", ITc_appcore_watch_watch_app_add_remove_event_handler_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_current_time_delete_p", ITc_appcore_watch_watch_time_get_current_time_delete_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_year_p", ITc_appcore_watch_watch_time_get_year_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_month_p", ITc_appcore_watch_watch_time_get_month_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_day_p", ITc_appcore_watch_watch_time_get_day_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_day_of_week_p", ITc_appcore_watch_watch_time_get_day_of_week_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_hour_p", ITc_appcore_watch_watch_time_get_hour_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_hour24_p", ITc_appcore_watch_watch_time_get_hour24_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_minute_p", ITc_appcore_watch_watch_time_get_minute_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_second_p", ITc_appcore_watch_watch_time_get_second_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_millisecond_p", ITc_appcore_watch_watch_time_get_millisecond_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_utc_time_p", ITc_appcore_watch_watch_time_get_utc_time_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_utc_timestamp_p", ITc_appcore_watch_watch_time_get_utc_timestamp_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {"ITc_appcore_watch_watch_time_get_time_zone_p", ITc_appcore_watch_watch_time_get_time_zone_p, ITs_appcore_watch_startup, ITs_appcore_watch_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_APPCORE_WATCH_NATIVE_H__
diff --git a/src/itc/appcore-widget/CMakeLists.txt b/src/itc/appcore-widget/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..3399cf4
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "appcore-widget")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-appfw-widget-application elementary widget_viewer widget_viewer_evas")
+SET(TC_SOURCES
+       ITs-appcore-widget-common.c
+       ITs-appcore-widget.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/appcore-widget/ITs-appcore-widget-common.c b/src/itc/appcore-widget/ITs-appcore-widget-common.c
new file mode 100755 (executable)
index 0000000..c46ceb3
--- /dev/null
@@ -0,0 +1,237 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-appcore-widget-common.h"
+
+/** @addtogroup itc-appcore-widget
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function definitions here
+
+/**
+ * @function           AppcoreWidgetGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* AppcoreWidgetGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               case WIDGET_ERROR_NONE:
+                       szErrorVal = "WIDGET_ERROR_NONE";
+                       break;
+               case WIDGET_ERROR_INVALID_PARAMETER:
+                       szErrorVal = "WIDGET_ERROR_INVALID_PARAMETER";
+                       break;
+               case WIDGET_ERROR_FAULT:
+                       szErrorVal = "WIDGET_ERROR_FAULT";
+                       break;
+               case WIDGET_ERROR_NOT_SUPPORTED:
+                       szErrorVal = "WIDGET_ERROR_NOT_SUPPORTED";
+                       break;
+               case WIDGET_ERROR_CANCELED:
+                       szErrorVal = "WIDGET_ERROR_CANCELED";
+                       break;
+               case WIDGET_ERROR_OUT_OF_MEMORY:
+                       szErrorVal = "WIDGET_ERROR_OUT_OF_MEMORY";
+                       break;
+               default:
+                       szErrorVal = "Unknown Error";
+                       break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            BundleGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* BundleGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case BUNDLE_ERROR_NONE:
+               szErrorVal = "BUNDLE_ERROR_NONE";
+               break;
+       case BUNDLE_ERROR_OUT_OF_MEMORY:
+               szErrorVal = "BUNDLE_ERROR_OUT_OF_MEMORY";
+               break;
+       case BUNDLE_ERROR_INVALID_PARAMETER:
+               szErrorVal = "BUNDLE_ERROR_INVALID_PARAMETER";
+               break;
+       case BUNDLE_ERROR_KEY_NOT_AVAILABLE:
+               szErrorVal = "BUNDLE_ERROR_KEY_NOT_AVAILABLE";
+               break;
+       case BUNDLE_ERROR_KEY_EXISTS:
+               szErrorVal = "BUNDLE_ERROR_KEY_EXISTS";
+               break;
+       default:
+               szErrorVal = "Unknown Error";
+               break;
+       }
+       return szErrorVal;
+}
+/**
+* @function                    handler
+* @description         Called when the exit signal is sent
+* @parameter[IN]       signal
+* @return                      NA
+*/
+void handler(int sig)
+{
+       widget_app_exit();
+}
+
+/**
+* @function                    event_callback
+* @description         Called when a system event is occurred
+* @parameter[IN]       event The system event message
+* @parameter[IN]       data The user data passed to the callback functions
+* @return                      NA
+*/
+void event_callback(void *event, void *data)
+{
+}
+
+/**
+* @function                    widget_instance_create_callback
+* @description         Called when the widget instance starts
+* @parameter[IN]       context The context of widget instance
+* @parameter[IN]       content The data set for the previous status
+* @parameter[IN]       w The pixel value for widget width
+* @parameter[IN]       h The pixel value for widget height
+* @parameter[IN]       user_data The user data passed from widget_app_class_create function
+* @return                      WIDGET_ERROR_NONE on success, otherwise an error code on failure
+*/
+int widget_instance_create_callback(widget_context_h context, bundle *content, int w, int h, void *user_data)
+{
+       widget_app_exit();
+       
+       if ((user_data == NULL) || (strcmp(user_data, TESTSTRING) != 0) )
+       {
+               FPRINTF("[Line : %d][appcore_widget_ITC] Invalid data passed to callback\\n", __LINE__);
+               return -1;
+       }
+       
+       return WIDGET_ERROR_NONE;
+}
+
+/**
+* @function                    widget_instance_destroy_callback
+* @description         Called before the widget instance is destroyed
+* @parameter[IN]       context The context of widget instance
+* @parameter[IN]       reason The reason for destruction
+* @parameter[IN/OUT] content The data set to save
+* @parameter[IN]       user_data The user data passed from widget_app_class_create function
+* @return                      WIDGET_ERROR_NONE on success, otherwise an error code on failure
+*/
+int widget_instance_destroy_callback(widget_context_h context, widget_app_destroy_type_e reason, bundle *content, void *user_data)
+{
+       return 0;
+}
+
+/**
+* @function                    widget_instance_pause_callback
+* @description         Called when the widget is invisible
+* @parameter[IN]       context The context of widget instance
+* @parameter[IN]       user_data The user data passed from widget_app_class_create function
+* @return                      WIDGET_ERROR_NONE on success, otherwise an error code on failure
+*/
+int widget_instance_pause_callback(widget_context_h context, void *user_data)
+{
+       return 0;
+}
+
+/**
+* @function                    widget_instance_resume_callback
+* @description         Called when the widget is visible
+* @parameter[IN]       context The context of widget instance
+* @parameter[IN]       user_data The user data passed from widget_app_class_create function
+* @return                      WIDGET_ERROR_NONE on success, otherwise an error code on failure
+*/
+int widget_instance_resume_callback(widget_context_h context, void *user_data)
+{
+       return 0;
+}
+
+/**
+* @function                    widget_instance_update_callback
+* @description         Called when the event for updating widget is received
+* @parameter[IN]       context The context of widget instance
+* @parameter[IN]       content The data set for updating this widget. It will be provided by requester
+*                                              Requester can use widget_service_trigger_update()
+* @parameter[IN]       force Although the widget is paused, if it is TRUE, the widget can be updated
+* @parameter[IN]       user_data The user data passed from widget_app_class_create function
+* @return                      WIDGET_ERROR_NONE on success, otherwise an error code on failure
+*/
+int widget_instance_update_callback(widget_context_h context, bundle *content, int force, void *user_data)
+{
+       return 0;
+}
+
+/**
+* @function                    widget_instance_resize_callback
+* @description         Called before the widget size is changed
+* @parameter[IN]       context The context of widget instance
+* @parameter[IN]       w The pixel value for widget width
+* @parameter[IN]       h The pixel value for widget height
+* @parameter[IN]       user_data The user data passed from widget_app_class_create function
+* @return                      WIDGET_ERROR_NONE on success, otherwise an error code on failure
+*/
+int widget_instance_resize_callback(widget_context_h context, int w, int h, void *user_data)
+{
+       return 0;
+}
+
+/**
+* @function                    widget_app_create_callback
+* @description         Called when the application starts
+* @parameter[IN]       user_data The user data passed from the callback registration function
+* @return                      The object of widget class
+*/
+widget_class_h widget_app_create_callback(void *user_data)
+{
+               widget_instance_lifecycle_callback_s ops = {
+               .create = widget_instance_create_callback,
+               .destroy = widget_instance_destroy_callback,
+               .pause = widget_instance_pause_callback,
+               .resume = widget_instance_resume_callback,
+               .update = widget_instance_update_callback,
+               .resize = widget_instance_resize_callback,
+       };
+
+       return widget_app_class_create(ops, user_data);
+}
+
+/**
+* @function                    widget_app_terminate_callback
+* @description         Called when the application's main loop exits
+* @parameter[IN]       user_data The user data passed from the callback registration function
+* @return                      NA
+*/
+void widget_app_terminate_callback(void *user_data)
+{
+}
+
+/** @} */ //end of itc-appcore-widget
\ No newline at end of file
diff --git a/src/itc/appcore-widget/ITs-appcore-widget-common.h b/src/itc/appcore-widget/ITs-appcore-widget-common.h
new file mode 100755 (executable)
index 0000000..8219194
--- /dev/null
@@ -0,0 +1,77 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_APPCORE_WIDGET_COMMON_H_
+#define _ITS_APPCORE_WIDGET_COMMON_H_
+
+#include "assert.h"
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+
+//Add test package related includes here
+#include "bundle.h"
+#include <widget_app.h>
+#include <widget_app_efl.h>
+#include <widget_viewer.h>
+#include <widget_viewer_evas.h>
+#include <Elementary.h>
+#include <Evas.h>
+
+/** @addtogroup itc-appcore-widget
+*  @ingroup itc
+*  @{
+*/
+
+#define TIMEZONE_BUFFER_MAX            1024
+#define MAX_CONTEXT_COUNT              100
+#define TESTSTRING                             "Test"
+
+FILE *g_fpLog;
+widget_context_h g_hWidgetContexts[MAX_CONTEXT_COUNT];
+int g_nContextCount;
+
+//Add helper function declarations here
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][appcore_widget_ITC] Starting test : %s\\n", __LINE__, __FUNCTION__);\
+}
+
+//Add helper function declarations here
+
+char* AppcoreWidgetGetError(int nRet);
+char* BundleGetError(int nRet);
+
+void handler(int sig);
+void event_callback(void *event, void *data);
+int widget_instance_create_callback(widget_context_h context, bundle *content, int w, int h, void *user_data);
+int widget_instance_destroy_callback(widget_context_h context, widget_app_destroy_type_e reason, bundle *content, void *user_data);
+int widget_instance_pause_callback(widget_context_h context, void *user_data);
+int widget_instance_resume_callback(widget_context_h context, void *user_data);
+int widget_instance_resize_callback(widget_context_h context, int w, int h, void *user_data);
+int widget_instance_update_callback(widget_context_h context, bundle *content, int force, void *user_data);
+widget_class_h widget_app_create_callback(void *user_data);
+void widget_app_terminate_callback(void *user_data);
+
+/** @} */ //end of itc-appcore-widget
+
+#endif  //_ITS_APPCORE_WIDGET_COMMON_H_
diff --git a/src/itc/appcore-widget/ITs-appcore-widget.c b/src/itc/appcore-widget/ITs-appcore-widget.c
new file mode 100755 (executable)
index 0000000..dd80d94
--- /dev/null
@@ -0,0 +1,221 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-appcore-widget-common.h"
+
+/** @addtogroup itc-appcore-widget
+*  @ingroup itc
+*  @{
+*/
+
+//& set: AppcoreWidget
+
+/**
+ * @function           ITs_appcore_widget_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_appcore_widget_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line : %d][appcore_widget_ITC] TEST SUIT start-up: ITs_Appcore_Widget_p\\n", __LINE__);
+#endif
+       alarm(4);
+       return;
+}
+
+/**
+ * @function           ITs_appcore_widget_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_appcore_widget_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][appcore_widget_ITC] TEST SUIT clean-up: ITs_Appcore_Widget_p\\n", __LINE__);
+#endif
+       alarm(0);
+       return;
+}
+
+/** @addtogroup itc-appcore-widget-testcases
+*  @brief              Integration testcases for module appcore-widget
+*  @ingroup    itc-appcore-widget
+*  @{
+*/
+
+//& purpose: Runs the main loop of the application until widget_app_exit() is called
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_widget_widget_app_main_exit_p
+ * @type                                       auto
+ * @description                                Runs the main loop of the application until widget_app_exit() is called
+ * @scenario                           Run the main loop of the application
+ *                                                     Exit the main loop of the application
+ * @apicovered                         widget_app_main, widget_app_exit
+ * @passcase                           When widget_app_main and widget_app_exit is successful
+ * @failcase                           If target API widget_app_main or widget_app_exit or any supporting API fails
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_widget_widget_app_main_exit_p(void)
+{
+       START_TEST;
+       
+       widget_app_lifecycle_callback_s callback = {0,};
+       int argc = 1;
+       char **argv;
+       argv = malloc(1 * sizeof(char *));
+       if ( argv == NULL )
+       {
+               FPRINTF("[Line : %d][appcore_widget_ITC] Memory allocation for argv failed\\n", __LINE__);
+               return 1;
+       }
+       
+       argv[0] = "widget_app";
+
+       signal(SIGALRM, (void *)handler);
+
+       callback.create = widget_app_create_callback;
+       callback.terminate = widget_app_terminate_callback;
+       
+       // Target API
+       int nRet = widget_app_main(argc, argv, &callback, NULL);
+       free(argv);
+       if ( nRet == WIDGET_ERROR_NOT_SUPPORTED )
+       {
+               FPRINTF("[Line : %d][appcore_widget_ITC] widget_app_main returned = %s. Skipping Test\\n", __LINE__, AppcoreWidgetGetError(nRet));
+               return 0;
+       }
+       if ( nRet != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_widget_ITC] widget_app_main failed, error returned = %s\\n", __LINE__, AppcoreWidgetGetError(nRet));
+               return 1;
+       }
+       
+       // Target API
+       nRet = widget_app_exit();
+       if ( nRet != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_widget_ITC] widget_app_exit failed, error returned = %s\\n", __LINE__, AppcoreWidgetGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Adds and removes the system event handler
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_widget_widget_app_add_remove_event_handler_p
+ * @type                                       auto
+ * @description                                Adds and removes the system event handler
+ * @scenario                           Add the system event handler
+ *                                                     Remove the registered event handler
+ * @apicovered                         widget_app_add_event_handler, widget_app_remove_event_handler
+ * @passcase                           When widget_app_add_event_handler and widget_app_remove_event_handler is successful
+ * @failcase                           If target API widget_app_add_event_handler or widget_app_remove_event_handler or any supporting API fails
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_widget_widget_app_add_remove_event_handler_p(void)
+{
+       START_TEST;
+       
+       app_event_handler_h handler;
+
+       // Target API
+       int nRet = widget_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, (app_event_cb) event_callback, NULL);
+       if ( nRet == WIDGET_ERROR_NOT_SUPPORTED )
+       {
+               FPRINTF("[Line : %d][appcore_widget_ITC] widget_app_add_event_handler returned = %s. Skipping Test\\n", __LINE__, AppcoreWidgetGetError(nRet));
+               return 0;
+       }
+       if ( nRet != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_widget_ITC] widget_app_add_event_handler failed, error returned = %s\\n", __LINE__, AppcoreWidgetGetError(nRet));
+               return 1;
+       }
+
+       // Target API
+       nRet = widget_app_remove_event_handler(handler);
+       if ( nRet != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_widget_ITC] widget_app_remove_event_handler failed, error returned = %s\\n", __LINE__, AppcoreWidgetGetError(nRet));
+               return 1;
+       }
+       
+       return 0;
+}
+
+//& purpose: Makes a class for widget instances
+//& type: auto
+/**
+ * @testcase                           ITc_appcore_widget_widget_app_class_create_p
+ * @type                                       auto
+ * @description                                Makes a class for widget instances
+ * @scenario                           Make a class for widget instances
+ * @apicovered                         widget_app_class_create
+ * @passcase                           When widget_app_class_create is successful
+ * @failcase                           If target API widget_app_class_create or any supporting API fails
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_appcore_widget_widget_app_class_create_p(void)
+{
+       START_TEST;
+       
+       widget_instance_lifecycle_callback_s ops = {
+               .create = widget_instance_create_callback,
+               .destroy = widget_instance_destroy_callback,
+               .pause = widget_instance_pause_callback,
+               .resume = widget_instance_resume_callback,
+               .update = widget_instance_update_callback,
+               .resize = widget_instance_resize_callback,
+       };
+       
+       void *user_data = TESTSTRING;
+       
+       // Target API
+       widget_class_h ch = widget_app_class_create(ops, user_data);
+       int nRet = get_last_result();
+       if ( nRet == WIDGET_ERROR_NOT_SUPPORTED )
+       {
+               FPRINTF("[Line : %d][appcore_widget_ITC] widget_app_class_create returned = %s. Skipping Test\\n", __LINE__, AppcoreWidgetGetError(nRet));
+               return 0;
+       }
+       if ( nRet != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][appcore_widget_ITC] widget_app_class_create failed, error returned = %s\\n", __LINE__, AppcoreWidgetGetError(nRet));
+               return 1;
+       }
+       if ( ch == NULL )
+       {
+               FPRINTF("[Line : %d][appcore_widget_ITC] widget_app_class_create returned invalid value = NULL\\n", __LINE__);
+               return 1;
+       }
+       
+       return 0;
+}
+
+/** @} */ //end of itc-appcore-widget-testcases
+/** @} */ //end of itc-appcore-widget
diff --git a/src/itc/appcore-widget/tct-appcore-widget-native.c b/src/itc/appcore-widget/tct-appcore-widget-native.c
new file mode 100755 (executable)
index 0000000..2da8fef
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2015 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-appcore-widget-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <widget_app.h>
+#include <dlog.h>
+
+static char *func_name = NULL;
+
+int run_testcases(void)
+{
+       int result = -1;
+       int i;
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if (func_name && !strncmp(func_name, tc_array[i].name, strlen(func_name)))
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult","w");
+                       if ( NULL == fres )
+                       {
+                               printf("File open failed\\n");
+                               free(func_name);
+                               return -1;
+                       }
+
+                       free(func_name);
+                       fprintf(fres, "%d", result);
+                       fclose(fres);
+                       return result;
+               }
+       }
+       free(func_name);
+       return 2;
+}
+
+static widget_class_h widget_app_create(void *user_data)
+{
+       run_testcases();
+       return NULL;
+}
+
+static int check_func_name(int argc, char **argv)
+{
+       gsize byte_size;
+       const gchar *encoded_byte;
+       guchar *byte = NULL;
+       const size_t sz_byte_len = sizeof(size_t);
+       const size_t sz_type = sizeof(int);
+       const size_t sz_keysize = sizeof(size_t);
+       const size_t sz_size = sizeof(size_t);
+
+       if ( argc > 2 )
+       {
+               encoded_byte = argv[3];
+               byte = g_base64_decode(encoded_byte, &byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte);
+               byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte);
+               byte += sz_size;
+               void *val = (void *)byte;
+               byte += size;
+
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return 1;
+               }
+               if ( !strcmp(func_name, "ITc_appcore_widget_widget_app_main_exit_p") )
+               {
+                       printf("Error in strcmp\n");
+                       return 1;
+               }
+       }
+
+       return 0;
+}
+
+int main(int argc, char *argv[])
+{
+       widget_app_lifecycle_callback_s event_callback = {0,};
+
+       if ( check_func_name(argc, argv) )
+       {
+               run_testcases();
+       }
+       else
+       {
+               event_callback.create = widget_app_create;
+               widget_app_main(argc, argv, &event_callback, NULL);
+       }
+
+       if ( func_name )
+       {
+               free(func_name);
+       }
+       return 0;
+}
diff --git a/src/itc/appcore-widget/tct-appcore-widget-native.h b/src/itc/appcore-widget/tct-appcore-widget-native.h
new file mode 100755 (executable)
index 0000000..adb3606
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_APPCORE_WIDGET_NATIVE_H__
+#define __TCT_APPCORE_WIDGET_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_appcore_widget_startup(void);
+extern void ITs_appcore_widget_cleanup(void);
+
+extern int ITc_appcore_widget_widget_app_main_exit_p(void);
+extern int ITc_appcore_widget_widget_app_add_remove_event_handler_p(void);
+extern int ITc_appcore_widget_widget_app_class_create_p(void);
+
+testcase tc_array[] = {
+    {"ITc_appcore_widget_widget_app_main_exit_p", ITc_appcore_widget_widget_app_main_exit_p, ITs_appcore_widget_startup, ITs_appcore_widget_cleanup},
+    {"ITc_appcore_widget_widget_app_add_remove_event_handler_p", ITc_appcore_widget_widget_app_add_remove_event_handler_p, ITs_appcore_widget_startup, ITs_appcore_widget_cleanup},
+    {"ITc_appcore_widget_widget_app_class_create_p", ITc_appcore_widget_widget_app_class_create_p, ITs_appcore_widget_startup, ITs_appcore_widget_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_APPCORE_WIDGET_NATIVE_H__
diff --git a/src/itc/application/CMakeLists.txt b/src/itc/application/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..e9e25cd
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "application")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-appfw-application")
+SET(TC_SOURCES
+       ITs-application-common.c
+       ITs-application.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+    ${CAPI_LIB}
+       capi-appfw-alarm
+       capi-appfw-preference
+       capi-appfw-application
+       bundle
+       glib-2.0
+       gobject-2.0
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/application/ITs-application-common.c b/src/itc/application/ITs-application-common.c
new file mode 100755 (executable)
index 0000000..ee5f83f
--- /dev/null
@@ -0,0 +1,294 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-application-common.h"
+
+/** @addtogroup itc-application
+*  @ingroup itc
+*  @{
+*/
+
+struct timeval g_stApplicationTime;
+struct mallinfo g_stApplicationMemInfo;
+
+/**
+* @function            ApplicationGetDataPath
+* @description         Returnes the application data path
+* @parameter           pAppDataPath: application data path
+* @return                      true if succeed else false
+*/
+bool ApplicationGetDataPath(char* pAppDataPath)
+{
+       if ( NULL == pAppDataPath )
+       {
+               FPRINTF( "[Line : %d][Application_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if ( NULL == pPath )
+       {
+               FPRINTF( "[Line : %d][Application_ITc] Unable to get application data path; app_get_data_path returned null value \\n", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF( "[Line : %d][Application_ITc] application data path returned = %s\\n", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+/**
+* @function            ApplicationAppendToAppDataPath
+* @description         Appends the input string to application data path
+* @parameter           pInputPath: path to append to data path; pFinalPath: final resultant path
+* @return                      true if succeed else false
+*/
+bool ApplicationAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if ( (NULL == pInputPath) || (NULL == pFinalPath) )
+       {
+               FPRINTF( "[Line : %d][Application_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if ( false == ApplicationGetDataPath(pAppDataPath) )
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+
+       FPRINTF( "[Line : %d][Application_ITc] result path returned = %s\\n", __LINE__, pFinalPath);
+
+       return true;
+}
+
+/**
+ * @function           Application_AppControlGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Application_AppControlGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case APP_CONTROL_ERROR_NONE:                                    szErrorVal = "APP_CONTROL_ERROR_NONE";break;
+       case APP_CONTROL_ERROR_INVALID_PARAMETER:               szErrorVal = "APP_CONTROL_ERROR_INVALID_PARAMETER";break;
+       case APP_CONTROL_ERROR_OUT_OF_MEMORY:                   szErrorVal = "APP_CONTROL_ERROR_OUT_OF_MEMORY";break;
+       case APP_CONTROL_ERROR_APP_NOT_FOUND:                   szErrorVal = "APP_CONTROL_ERROR_APP_NOT_FOUND";break;
+       case APP_CONTROL_ERROR_KEY_NOT_FOUND:                   szErrorVal = "APP_CONTROL_ERROR_KEY_NOT_FOUND";break;
+       case APP_CONTROL_ERROR_KEY_REJECTED:                    szErrorVal = "APP_CONTROL_ERROR_KEY_REJECTED";break;
+       case APP_CONTROL_ERROR_INVALID_DATA_TYPE:               szErrorVal = "APP_CONTROL_ERROR_INVALID_DATA_TYPE";break;
+       case APP_CONTROL_ERROR_LAUNCH_REJECTED:                 szErrorVal = "APP_CONTROL_ERROR_LAUNCH_REJECTED";break;
+       case APP_CONTROL_ERROR_PERMISSION_DENIED:               szErrorVal = "APP_CONTROL_ERROR_PERMISSION_DENIED";break;
+       case APP_CONTROL_ERROR_LAUNCH_FAILED:                   szErrorVal = "APP_CONTROL_ERROR_LAUNCH_FAILED";break;
+       case APP_CONTROL_ERROR_TIMED_OUT:                               szErrorVal = "APP_CONTROL_ERROR_TIMED_OUT";break;
+       default:                                                                                szErrorVal = "Undefined Error";break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           Application_PreferenceGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Application_PreferenceGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case PREFERENCE_ERROR_NONE:                                     szErrorVal = "PREFERENCE_ERROR_NONE";break;
+       case PREFERENCE_ERROR_INVALID_PARAMETER:        szErrorVal = "PREFERENCE_ERROR_INVALID_PARAMETER";break;
+       case PREFERENCE_ERROR_OUT_OF_MEMORY:            szErrorVal = "PREFERENCE_ERROR_OUT_OF_MEMORY";break;
+       case PREFERENCE_ERROR_NO_KEY:                           szErrorVal = "PREFERENCE_ERROR_NO_KEY";break;
+       case PREFERENCE_ERROR_IO_ERROR:                         szErrorVal = "PREFERENCE_ERROR_IO_ERROR";break;
+       default:                                                                        szErrorVal = "Undefined Error";break;
+       }
+
+       return szErrorVal;
+}
+
+
+/**
+ * @function           Application_AlarmGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Application_AlarmGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case ALARM_ERROR_NONE:                                  szErrorVal = "ALARM_ERROR_NONE";break;
+       case ALARM_ERROR_INVALID_PARAMETER:             szErrorVal = "ALARM_ERROR_INVALID_PARAMETER";break;
+       case ALARM_ERROR_INVALID_TIME:                  szErrorVal = "ALARM_ERROR_INVALID_TIME";break;
+       case ALARM_ERROR_INVALID_DATE:                  szErrorVal = "ALARM_ERROR_INVALID_DATE";break;
+       case ALARM_ERROR_CONNECTION_FAIL:               szErrorVal = "ALARM_ERROR_CONNECTION_FAIL";break;
+       case ALARM_ERROR_OUT_OF_MEMORY:                 szErrorVal = "ALARM_ERROR_OUT_OF_MEMORY";break;
+       case ALARM_ERROR_PERMISSION_DENIED :    szErrorVal = "ALARM_ERROR_PERMISSION_DENIED";break;
+       default:                                                                szErrorVal = "Undefined Error";break;
+       }
+
+       return szErrorVal;
+}
+
+
+/**
+ * @function           Application_AppGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Application_AppGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case APP_ERROR_NONE :                                   szErrorVal = "APP_ERROR_NONE";                                  break;
+       case APP_ERROR_INVALID_PARAMETER:               szErrorVal = "APP_ERROR_INVALID_PARAMETER";             break;
+       case APP_ERROR_OUT_OF_MEMORY:                   szErrorVal = "APP_ERROR_OUT_OF_MEMORY";                 break;
+       case APP_ERROR_INVALID_CONTEXT:                 szErrorVal = "APP_ERROR_INVALID_CONTEXT";               break;
+       case APP_ERROR_NO_SUCH_FILE:                    szErrorVal = "APP_ERROR_NO_SUCH_FILE";                  break;
+       case APP_ERROR_ALREADY_RUNNING:                 szErrorVal = "APP_ERROR_ALREADY_RUNNING";               break;
+       default:                                                                szErrorVal = "Undefined error";                                 break;
+       }
+
+       return szErrorVal;
+}
+
+
+
+/**
+* @function                    ApplicationGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void ApplicationGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stApplicationMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stApplicationMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stApplicationMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    ApplicationGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void ApplicationGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stApplicationMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void ApplicationExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stApplicationTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stApplicationTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           SystemGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stApplicationTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void ApplicationGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stApplicationTime, NULL);
+#endif
+}
+
+/**
+ * @function           Timeout
+ * @description                Called if some callback is not invoked for a particular timeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */ 
+gboolean Timeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+       }
+       return false;
+}
+/** @} */
\ No newline at end of file
diff --git a/src/itc/application/ITs-application-common.h b/src/itc/application/ITs-application-common.h
new file mode 100755 (executable)
index 0000000..b1ad451
--- /dev/null
@@ -0,0 +1,139 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_APPLICATION_COMMON_H_
+#define _ITS_APPLICATION_COMMON_H_
+
+#include "assert.h"
+#include "app.h"
+#include "app_alarm.h"
+#include "app_preference.h"
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+GMainLoop *g_pApplicationMainLoop;
+
+#define TIMELOG                                                256
+#define MEMLOG                                         256
+#define WAIT_CALLBACK                          5
+#define MICROSECONDS_PER_SECOND                1000000
+#define SET_PACKAGE_LAUNCH                     "org.tizen.testapplication"
+#define BUFFER_SIZE                                    2048
+#define PATH_LEN                                       1024
+#define API_NAMESPACE                          "APPLICATION_ITC"
+#define TIMEOUT_CB                                     10000
+/** @addtogroup itc-application
+*  @ingroup itc
+*  @{
+*/
+
+FILE *g_fpLog;
+
+//Add helper function declarations here
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
+}
+
+#define RUN_POLLING_LOOP {\
+       g_pApplicationMainLoop = g_main_loop_new(NULL, false);\
+       nTimeoutId = g_timeout_add(TIMEOUT_CB, Timeout, g_pApplicationMainLoop);\
+       g_main_loop_run(g_pApplicationMainLoop);\
+       g_source_remove(nTimeoutId);\
+       g_pApplicationMainLoop = NULL;\
+}
+
+#define PRINT_RESULT_CLEANUP(eCompare, eRetVal, API, Error, FreeResource) {\
+       if ( eRetVal == eCompare )\
+{\
+       if ( DEBUG )\
+{\
+       FPRINTF("[Line : %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+}\
+}\
+else \
+{\
+       FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+       FreeResource;\
+       return 1;\
+}\
+}
+
+#define PRINT_RESULT(eCompare, eRetVal, API, Error) {\
+       if ( eRetVal == eCompare )\
+{\
+       if ( DEBUG )\
+       {\
+               FPRINTF("[Line : %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+       }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d][%s] %s_MemoryLeakStatus - %s\\n", __LINE__, API_NAMESPACE, #api, memLog);\
+       }
+
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][%s] %s_TimeInMicrosec- %s\\n", __LINE__, API_NAMESPACE, #api, speedLog);\
+       }
+
+#define FREE_MEMORY(buffer) {\
+       if ( buffer != NULL )\
+       {\
+               free(buffer);\
+               buffer = NULL;\
+       }\
+}
+gboolean Timeout(gpointer data);       
+char* Application_AppControlGetError(int nRet);
+char* Application_PreferenceGetError(int nRet);
+char* Application_AlarmGetError(int nRet);
+char* Application_AppGetError(int nRet);
+void ApplicationGetMemAllocation();
+void ApplicationExecutionDelay(char* pszAPITime);
+void ApplicationGetTimeOfDay();
+void ApplicationGetMemStatus(char *pszAPIMemory);
+
+bool ApplicationGetDataPath(char* pPath); // this function outputs tha application data path
+bool ApplicationAppendToAppDataPath(char* pInputPath, char* pFinalPath); // this function appends the input string to app data path and outputs the final resultant path
+
+/** @} */
+#endif  //_ITS_APPLICATION_COMMON_H_
\ No newline at end of file
diff --git a/src/itc/application/ITs-application.c b/src/itc/application/ITs-application.c
new file mode 100755 (executable)
index 0000000..f02f4be
--- /dev/null
@@ -0,0 +1,4424 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-application-common.h"
+
+/** @addtogroup itc-application
+*  @ingroup itc
+*  @{
+*/
+//& set: Application
+void *g_pUserData = "user_data_1";
+
+int g_bAppControlSendLaunchRequest = false;
+int g_bAppControlAppMatched = false;
+int g_bAppControlExtraData = false;
+
+int g_bPreferenceChangedCallback = false;
+int g_bPreferenceItemCallback = false;
+
+int g_AlarmRegisteredReceived = 0;
+int g_AlarmIDValueReceived = -1;
+
+bool g_bCallBackHit = false;
+bool g_bUserDataMismatch = false;
+
+/**
+* @function            ITs_application_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_application_startup(void)
+{
+       g_bCallBackHit = false;
+       g_bUserDataMismatch = false;
+       
+       g_type_init();
+
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       return;
+}
+
+/**
+* @function            ITs_application_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_application_cleanup(void)
+{
+       return;
+}
+
+/**
+* @function            ui_app_event_callback
+* @description         callback function for capturing app event callbacks
+* @parameter           event_info : event captured, user_data : user data sent to callback
+* @return                      NA
+*/
+void ui_app_event_callback(app_event_info_h event_info, void* user_data)
+{
+       FPRINTF("[Line : %d][Application_ITc] app_event_callback triggered\\n", __LINE__);
+       return;
+}
+
+/**
+* @function            application_preference_item_cb
+* @description         callback function for app preference item
+* @parameter           pszKey : key, user_data : user data sent to callback
+* @return                      true
+*/
+bool application_preference_item_cb(const char *pszKey, void *user_data)
+{
+       g_bPreferenceItemCallback = true;
+       FPRINTF("[Line : %d][Application_ITc] preference_item_callback invoked, key = %s\\n", __LINE__, pszKey);
+       return true;
+}
+
+/** @addtogroup itc-application-testcases
+*  @brief              Integration testcases for module application
+*  @ingroup    itc-application
+*  @{
+*/
+
+//& type: auto
+//& purpose: Creates and Destroys AppControl.
+/**
+* @testcase                    ITc_application_ui_app_add_remove_event_handler_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Adds and Removes event handler
+* @scenario                            Add event handler and check its status
+*                                              Removes event handler
+* @apicovered                  ui_app_add_event_handler, ui_app_remove_event_handler
+* @passcase                            When ui_app_add_event_handler and ui_app_remove_event_handler are successful.
+* @failcase                            If target API fails.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_ui_app_add_remove_event_handler_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppAddRemoveEventHandlerMemLog[MEMLOG * MAX_COUNT];
+       char szAppAddEventHandlerSpeedLog[TIMELOG * MAX_COUNT];
+       char szAppRemoveEventHandlerSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppAddRemoveEventHandlerMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppAddEventHandlerSpeedLog, 0, TIMELOG * MAX_COUNT);
+       memset(szAppRemoveEventHandlerSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAddEventHandlerFailCount = 0;
+       int nRemoveEventHandlerFailCount = 0;
+       
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               app_event_handler_h event_handler;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               int nRetVal = ui_app_add_event_handler(&event_handler, APP_EVENT_DEVICE_ORIENTATION_CHANGED, ui_app_event_callback, NULL);
+               ApplicationExecutionDelay(szAppAddEventHandlerSpeedLog);
+               
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] ui_app_add_event_handler failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppGetError(nRetVal));
+                       nAddEventHandlerFailCount++;
+                       continue;
+               }
+
+               // Give some sleep between create and destroy
+               usleep(2000);
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = ui_app_remove_event_handler(event_handler);
+               ApplicationExecutionDelay(szAppRemoveEventHandlerSpeedLog);
+               
+               ApplicationGetMemStatus(szAppAddRemoveEventHandlerMemLog);
+               
+               if (nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] ui_app_remove_event_handler failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppGetError(nRetVal));
+                       nRemoveEventHandlerFailCount++;
+               }
+       }
+       
+       if ( nAddEventHandlerFailCount > 0 || nRemoveEventHandlerFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] ui_app_add_event_handler failed %d times, ui_app_remove_event_handler failed %d times out of %d times\\n", __LINE__, nAddEventHandlerFailCount, nRemoveEventHandlerFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(ui_app_add_event_handler, szAppAddEventHandlerSpeedLog);
+       PRINT_SPEED_LOG(ui_app_remove_event_handler, szAppRemoveEventHandlerSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ui_app_add_remove_event_handler, szAppAddRemoveEventHandlerMemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets absolute path to application cache directory
+/**
+* @testcase                    ITc_application_app_get_cache_path_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_cache_path
+* @passcase                            When app_get_cache_path is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_cache_path_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_cache_path_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_cache_path_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_cache_path_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_cache_path_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_cache_path_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pPath = NULL;
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               pPath = app_get_cache_path();
+               ApplicationExecutionDelay(szApp_app_get_cache_path_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_cache_path_MemLog);
+
+               if(NULL == pPath)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_cache_path returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_cache_path_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_cache_path returned value = %s on iteration %d\\n", __LINE__, pPath, nLoopCount);
+       }
+
+       if ( nApp_app_get_cache_path_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_cache_path failed %d times out of %d times\\n", __LINE__, nApp_app_get_cache_path_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_cache_path, szApp_app_get_cache_path_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_cache_path, szApp_app_get_cache_path_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets absolute path to application data
+/**
+* @testcase                    ITc_application_app_get_data_path_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_data_path
+* @passcase                            When app_get_data_path is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_data_path_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_data_path_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_data_path_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_data_path_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_data_path_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_data_path_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pPath = NULL;
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               pPath = app_get_data_path();
+               ApplicationExecutionDelay(szApp_app_get_data_path_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_data_path_MemLog);
+
+               if(NULL == pPath)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_data_path returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_data_path_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_data_path returned value = %s on iteration %d\\n", __LINE__, pPath, nLoopCount);
+       }
+
+       if ( nApp_app_get_data_path_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_data_path failed %d times out of %d times\\n", __LINE__, nApp_app_get_data_path_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_data_path, szApp_app_get_data_path_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_data_path, szApp_app_get_data_path_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets absolute path to application external data directory
+/**
+* @testcase                    ITc_application_app_get_external_data_path_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_external_data_path
+* @passcase                            When app_get_external_data_path is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_external_data_path_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_external_data_path_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_external_data_path_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_external_data_path_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_external_data_path_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_external_data_path_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pPath = NULL;
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               pPath = app_get_external_data_path();
+               ApplicationExecutionDelay(szApp_app_get_external_data_path_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_external_data_path_MemLog);
+
+               if(NULL == pPath)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_external_data_path returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_external_data_path_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_external_data_path returned value = %s on iteration %d\\n", __LINE__, pPath, nLoopCount);
+       }
+
+       if ( nApp_app_get_external_data_path_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_external_data_path failed %d times out of %d times\\n", __LINE__, nApp_app_get_external_data_path_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_external_data_path, szApp_app_get_external_data_path_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_external_data_path, szApp_app_get_external_data_path_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets absolute path to application external cache directory
+/**
+* @testcase                    ITc_application_app_get_external_cache_path_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_external_cache_path
+* @passcase                            When app_get_external_cache_path is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_external_cache_path_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_external_cache_path_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_external_cache_path_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_external_cache_path_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_external_cache_path_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_external_cache_path_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pPath = NULL;
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               pPath = app_get_external_cache_path();
+               ApplicationExecutionDelay(szApp_app_get_external_cache_path_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_external_cache_path_MemLog);
+
+               if(NULL == pPath)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_external_cache_path returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_external_cache_path_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_external_cache_path returned value = %s on iteration %d\\n", __LINE__, pPath, nLoopCount);
+       }
+
+       if ( nApp_app_get_external_cache_path_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_external_cache_path failed %d times out of %d times\\n", __LINE__, nApp_app_get_external_cache_path_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_external_cache_path, szApp_app_get_external_cache_path_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_external_cache_path, szApp_app_get_external_cache_path_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets absolute path to application external shared data directory
+/**
+* @testcase                    ITc_application_app_get_external_shared_data_path_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_external_shared_data_path
+* @passcase                            When app_get_external_shared_data_path is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_external_shared_data_path_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_external_shared_data_path_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_external_shared_data_path_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_external_shared_data_path_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_external_shared_data_path_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_external_shared_data_path_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pPath = NULL;
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               pPath = app_get_external_shared_data_path();
+               ApplicationExecutionDelay(szApp_app_get_external_shared_data_path_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_external_shared_data_path_MemLog);
+
+               if(NULL == pPath)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_external_shared_data_path returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_external_shared_data_path_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_external_shared_data_path returned value = %s on iteration %d\\n", __LINE__, pPath, nLoopCount);
+       }
+
+       if ( nApp_app_get_external_shared_data_path_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_external_shared_data_path failed %d times out of %d times\\n", __LINE__, nApp_app_get_external_shared_data_path_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_external_shared_data_path, szApp_app_get_external_shared_data_path_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_external_shared_data_path, szApp_app_get_external_shared_data_path_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets absolute path to application resource directory
+/**
+* @testcase                    ITc_application_app_get_resource_path_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_resource_path
+* @passcase                            When app_get_resource_path is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_resource_path_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_resource_path_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_resource_path_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_resource_path_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_resource_path_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_resource_path_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pPath = NULL;
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               pPath = app_get_resource_path();
+               ApplicationExecutionDelay(szApp_app_get_resource_path_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_resource_path_MemLog);
+
+               if(NULL == pPath)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_resource_path returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_resource_path_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_resource_path returned value = %s on iteration %d\\n", __LINE__, pPath, nLoopCount);
+       }
+
+       if ( nApp_app_get_resource_path_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_resource_path failed %d times out of %d times\\n", __LINE__, nApp_app_get_resource_path_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_resource_path, szApp_app_get_resource_path_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_resource_path, szApp_app_get_resource_path_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets absolute path to application shared data directory
+/**
+* @testcase                    ITc_application_app_get_shared_data_path_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_shared_data_path
+* @passcase                            When app_get_shared_data_path is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_shared_data_path_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_shared_data_path_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_shared_data_path_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_shared_data_path_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_shared_data_path_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_shared_data_path_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pPath = NULL;
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               pPath = app_get_shared_data_path();
+               ApplicationExecutionDelay(szApp_app_get_shared_data_path_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_shared_data_path_MemLog);
+
+               if(NULL == pPath)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_shared_data_path returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_shared_data_path_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_shared_data_path returned value = %s on iteration %d\\n", __LINE__, pPath, nLoopCount);
+       }
+
+       if ( nApp_app_get_shared_data_path_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_shared_data_path failed %d times out of %d times\\n", __LINE__, nApp_app_get_shared_data_path_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_shared_data_path, szApp_app_get_shared_data_path_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_shared_data_path, szApp_app_get_shared_data_path_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets absolute path to application shared resource directory
+/**
+* @testcase                    ITc_application_app_get_shared_resource_path_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_shared_resource_path
+* @passcase                            When app_get_shared_resource_path is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_shared_resource_path_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_shared_resource_path_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_shared_resource_path_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_shared_resource_path_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_shared_resource_path_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_shared_resource_path_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pPath = NULL;
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               pPath = app_get_shared_resource_path();
+               ApplicationExecutionDelay(szApp_app_get_shared_resource_path_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_shared_resource_path_MemLog);
+
+               if(NULL == pPath)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_shared_resource_path returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_shared_resource_path_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_shared_resource_path returned value = %s on iteration %d\\n", __LINE__, pPath, nLoopCount);
+       }
+
+       if ( nApp_app_get_shared_resource_path_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_shared_resource_path failed %d times out of %d times\\n", __LINE__, nApp_app_get_shared_resource_path_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_shared_resource_path, szApp_app_get_shared_resource_path_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_shared_resource_path, szApp_app_get_shared_resource_path_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets absolute path to application shared trusted directory, used to share data with group of trusted applications
+/**
+* @testcase                    ITc_application_app_get_shared_trusted_path_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_shared_trusted_path
+* @passcase                            When app_get_shared_trusted_path is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_shared_trusted_path_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_shared_trusted_path_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_shared_trusted_path_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_shared_trusted_path_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_shared_trusted_path_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_shared_trusted_path_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pPath = NULL;
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               pPath = app_get_shared_trusted_path();
+               ApplicationExecutionDelay(szApp_app_get_shared_trusted_path_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_shared_trusted_path_MemLog);
+
+               if(NULL == pPath)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_shared_trusted_path returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_shared_trusted_path_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_shared_trusted_path returned value = %s on iteration %d\\n", __LINE__, pPath, nLoopCount);
+       }
+
+       if ( nApp_app_get_shared_trusted_path_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_shared_trusted_path failed %d times out of %d times\\n", __LINE__, nApp_app_get_shared_trusted_path_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_shared_trusted_path, szApp_app_get_shared_trusted_path_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_shared_trusted_path, szApp_app_get_shared_trusted_path_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets application id
+/**
+* @testcase                    ITc_application_app_get_id_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_id
+* @passcase                            When app_get_id is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_id_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_id_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_id_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_id_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_id_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_id_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nRetValue = APP_ERROR_NONE;
+               char* pValue = NULL;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetValue = app_get_id(&pValue);
+               ApplicationExecutionDelay(szApp_app_get_id_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_id_MemLog);
+
+               if(APP_ERROR_NONE != nRetValue)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_id returned error value = %s on iteration %d\\n", __LINE__, Application_AppGetError(nRetValue), nLoopCount);
+                       nApp_app_get_id_FailCount++;
+                       continue;
+               }
+
+               if(NULL == pValue)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_id returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_id_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_id returned value = %s on iteration %d\\n", __LINE__, pValue, nLoopCount);
+
+               free(pValue);
+               pValue = NULL;
+       }
+
+       if ( nApp_app_get_id_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_id failed %d times out of %d times\\n", __LINE__, nApp_app_get_id_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_id, szApp_app_get_id_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_id, szApp_app_get_id_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets application version
+/**
+* @testcase                    ITc_application_app_get_version_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_version
+* @passcase                            When app_get_version is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_version_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_version_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_version_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_version_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_version_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_version_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nRetValue = APP_ERROR_NONE;
+               char* pValue = NULL;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetValue = app_get_version(&pValue);
+               ApplicationExecutionDelay(szApp_app_get_version_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_version_MemLog);
+
+               if(APP_ERROR_NONE != nRetValue)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_version returned error value = %s on iteration %d\\n", __LINE__, Application_AppGetError(nRetValue), nLoopCount);
+                       nApp_app_get_version_FailCount++;
+                       continue;
+               }
+
+               if(NULL == pValue)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_version returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_version_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_version returned value = %s on iteration %d\\n", __LINE__, pValue, nLoopCount);
+
+               free(pValue);
+               pValue = NULL;
+       }
+
+       if ( nApp_app_get_version_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_version failed %d times out of %d times\\n", __LINE__, nApp_app_get_version_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_version, szApp_app_get_version_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_version, szApp_app_get_version_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets application localized name
+/**
+* @testcase                    ITc_application_app_get_name_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_name
+* @passcase                            When app_get_name is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_name_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_name_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_name_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_name_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_name_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_name_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nRetValue = APP_ERROR_NONE;
+               char* pValue = NULL;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetValue = app_get_name(&pValue);
+               ApplicationExecutionDelay(szApp_app_get_name_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_name_MemLog);
+
+               if(APP_ERROR_NONE != nRetValue)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_name returned error value = %s on iteration %d\\n", __LINE__, Application_AppGetError(nRetValue), nLoopCount);
+                       nApp_app_get_name_FailCount++;
+                       continue;
+               }
+
+               if(NULL == pValue)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_name returned NULL value on iteration %d\\n", __LINE__, nLoopCount);
+                       nApp_app_get_name_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_name returned value = %s on iteration %d\\n", __LINE__, pValue, nLoopCount);
+
+               free(pValue);
+               pValue = NULL;
+       }
+
+       if ( nApp_app_get_name_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_name failed %d times out of %d times\\n", __LINE__, nApp_app_get_name_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_name, szApp_app_get_name_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_name, szApp_app_get_name_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: gets device orientation
+/**
+* @testcase                    ITc_application_app_get_device_orientation_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call target API and validate the values.
+* @scenario                            Call target API\n
+*                                              Validate the value
+* @apicovered                  app_get_device_orientation
+* @passcase                            When app_get_device_orientation is successful and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_get_device_orientation_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szApp_app_get_device_orientation_MemLog[MEMLOG * MAX_COUNT];
+       char szApp_app_get_device_orientation_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szApp_app_get_device_orientation_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szApp_app_get_device_orientation_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nApp_app_get_device_orientation_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               app_device_orientation_e orientation = APP_DEVICE_ORIENTATION_0 - 1;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               orientation = app_get_device_orientation();
+               ApplicationExecutionDelay(szApp_app_get_device_orientation_SpeedLog);
+               
+               ApplicationGetMemStatus(szApp_app_get_device_orientation_MemLog);
+
+               if( (orientation!=APP_DEVICE_ORIENTATION_0) && (orientation!=APP_DEVICE_ORIENTATION_90) && (orientation!=APP_DEVICE_ORIENTATION_180) && (orientation!=APP_DEVICE_ORIENTATION_270))
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_get_device_orientation returned wrong value = %d on iteration %d\\n", __LINE__, orientation, nLoopCount);
+                       nApp_app_get_device_orientation_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_get_device_orientation returned value = %d on iteration %d\\n", __LINE__, orientation, nLoopCount);
+       }
+
+       if ( nApp_app_get_device_orientation_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_get_device_orientation failed %d times out of %d times\\n", __LINE__, nApp_app_get_device_orientation_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_get_device_orientation, szApp_app_get_device_orientation_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_get_device_orientation, szApp_app_get_device_orientation_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Creates and Destroys AppControl.
+/**
+* @testcase                    ITc_application_app_control_create_destroy_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Creates and Destroys AppControl
+* @scenario                            Create AppControl\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy
+* @passcase                            When app_control_create, app_control_destroy are successful.
+* @failcase                            If target API or any precondition API fails.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_create_destroy_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlCreateDestroyMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlCreateSpeedLog[TIMELOG * MAX_COUNT];
+       char szAppControlDestroySpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlCreateDestroyMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlCreateSpeedLog, 0, TIMELOG * MAX_COUNT);
+       memset(szAppControlDestroySpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+       
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               app_control_h hAppControl;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               int nRetVal = app_control_create(&hAppControl);
+               ApplicationExecutionDelay(szAppControlCreateSpeedLog);
+               
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_create failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nCreateFailCount++;
+                       continue;
+               }
+
+               // Give some sleep between create and destroy
+               usleep(2000);
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_destroy(hAppControl);
+               ApplicationExecutionDelay(szAppControlDestroySpeedLog);
+               
+               ApplicationGetMemStatus(szAppControlCreateDestroyMemLog);
+               
+               if (nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_destroy failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nDestroyFailCount++;
+               }
+       }
+       
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create failed %d times, app_control_destroy failed %d times out of %d times\\n", __LINE__, nCreateFailCount, nDestroyFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_create, szAppControlCreateSpeedLog);
+       PRINT_SPEED_LOG(app_control_destroy, szAppControlDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AppControl_CreateDestroy, szAppControlCreateDestroyMemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Set and Get AppControl Operation.
+/**
+* @testcase                    ITc_application_app_control_set_get_operation_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set AppControl operation, Get AppControl operation and then checks the set value should match the get value
+* @scenario                            Create AppControl\n
+*                                              Set AppControl Operation\n
+*                                              Get AppControl Operation\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_get_operation, app_control_set_operation
+* @passcase                            When app_control_set_operation, app_control_get_operation are successful and set value should match the get value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_set_get_operation_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlSetGetOperationMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlSetOperationSpeedLog[TIMELOG * MAX_COUNT];
+       char szAppControlGetOperationSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlSetGetOperationMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlSetOperationSpeedLog, 0, TIMELOG * MAX_COUNT);
+       memset(szAppControlGetOperationSpeedLog, 0, TIMELOG * MAX_COUNT);
+       
+       int nSetOperationFailCount = 0;
+       int nGetOperationFailCount = 0;
+       int nMismatchFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+       
+       const char *pszOperation = "http://tizen.org/appcontrol/operation/dial";        //sample operation string
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pszGetVal = NULL;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_set_operation(hAppControl, pszOperation);
+               ApplicationExecutionDelay(szAppControlSetOperationSpeedLog);
+               
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_set_operation failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nSetOperationFailCount++;
+                       continue;
+               }
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_get_operation(hAppControl, &pszGetVal);
+               ApplicationExecutionDelay(szAppControlGetOperationSpeedLog);
+
+               ApplicationGetMemStatus(szAppControlSetGetOperationMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_get_operation failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nGetOperationFailCount++;
+                       continue;
+               }
+               
+               //check for value mis-match
+               if(0 != strcmp(pszOperation, pszGetVal))
+               {
+                       FPRINTF("[Line : %d][Application_ITc] set and get operation mis-match occurs on iteration %d, set value = %s, get value = %s \\n", __LINE__, nLoopCount, pszOperation, pszGetVal);
+                       nMismatchFailCount++;
+               }
+
+               free(pszGetVal);
+       }
+
+       app_control_destroy(hAppControl);
+       
+       if ( nSetOperationFailCount > 0 || nGetOperationFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation failed %d times, app_control_get_operation failed %d times, mis-match happens %d times out of %d times\\n", __LINE__, nSetOperationFailCount, nGetOperationFailCount, nMismatchFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_set_operation, szAppControlSetOperationSpeedLog);
+       PRINT_SPEED_LOG(app_control_get_operation, szAppControlGetOperationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AppControl_SetGetOperation, szAppControlSetGetOperationMemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Set and Get AppControl App ID.
+/**
+* @testcase                    ITc_application_app_control_SetGetAppID_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set AppControl AppID, Get AppControl AppID and then checks the set value should match the get value
+* @scenario                            Create AppControl\n
+*                                              Set AppControl AppID\n
+*                                              Get AppControl AppID\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_set_app_id, app_control_get_app_id
+* @passcase                            When app_control_set_app_id, app_control_get_app_id are successful and set value should match the get value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_SetGetAppID_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlSetGetAppIDMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlSetAppIDSpeedLog[TIMELOG * MAX_COUNT];
+       char szAppControlGetAppIDSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlSetGetAppIDMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlSetAppIDSpeedLog, 0, TIMELOG * MAX_COUNT);
+       memset(szAppControlGetAppIDSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nSetAppIDFailCount = 0;
+       int nGetAppIDFailCount = 0;
+       int nMismatchFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+       
+       const char *pszAppID = SET_PACKAGE_LAUNCH;              //sample app string
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pszGetVal = NULL;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_set_app_id(hAppControl, pszAppID);
+               ApplicationExecutionDelay(szAppControlSetAppIDSpeedLog);
+               
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nSetAppIDFailCount++;
+                       continue;
+               }
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_get_app_id(hAppControl, &pszGetVal);
+               ApplicationExecutionDelay(szAppControlGetAppIDSpeedLog);
+
+               ApplicationGetMemStatus(szAppControlSetGetAppIDMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_get_app_id failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nGetAppIDFailCount++;
+                       continue;
+               }
+               
+               //check for value mis-match
+               if(0 != strcmp(pszAppID, pszGetVal))
+               {
+                       FPRINTF("[Line : %d][Application_ITc] set and get operation mis-match occurs on iteration %d, set value = %s, get value = %s \\n", __LINE__, nLoopCount, pszAppID, pszGetVal);
+                       nMismatchFailCount++;
+               }
+
+               free(pszGetVal);
+       }
+
+       app_control_destroy(hAppControl);
+       
+       if ( nSetAppIDFailCount > 0 || nGetAppIDFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id failed %d times, app_control_get_app_id failed %d times, mis-match happens %d times out of %d times\\n", __LINE__, nSetAppIDFailCount, nGetAppIDFailCount, nMismatchFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_set_app_id, szAppControlSetAppIDSpeedLog);
+       PRINT_SPEED_LOG(app_control_get_app_id, szAppControlGetAppIDSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AppControl_Set_GetAppID, szAppControlSetGetAppIDMemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Set and Get AppControl URI.
+/**
+* @testcase                    ITc_application_app_control_SetGetUri_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set AppControl Uri, Get AppControl Uri and then checks the set value should match the get value
+* @scenario                            Create AppControl\n
+*                                              Set AppControl Uri\n
+*                                              Get AppControl Uri\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_set_uri, app_control_get_uri
+* @passcase                            When app_control_set_uri, app_control_get_uri are successful and set value should match the get value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_SetGetUri_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlSetGetUriMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlSetUriSpeedLog[TIMELOG * MAX_COUNT];
+       char szAppControlGetUriSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlSetGetUriMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlSetUriSpeedLog, 0, TIMELOG * MAX_COUNT);
+       memset(szAppControlGetUriSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nSetUriFailCount = 0;
+       int nGetUriFailCount = 0;
+       int nMismatchFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+       
+       const char *pszUri = "file:///tmp/1_photo.jpg"; //sample URI string, the file need not present in this location
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pszGetVal = NULL;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_set_uri(hAppControl, pszUri);
+               ApplicationExecutionDelay(szAppControlSetUriSpeedLog);
+               
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_set_uri failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nSetUriFailCount++;
+                       continue;
+               }
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_get_uri(hAppControl, &pszGetVal);
+               ApplicationExecutionDelay(szAppControlGetUriSpeedLog);
+
+               ApplicationGetMemStatus(szAppControlSetGetUriMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_get_uri failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nGetUriFailCount++;
+                       continue;
+               }
+               
+               //check for value mis-match
+               if(0 != strcmp(pszUri, pszGetVal))
+               {
+                       FPRINTF("[Line : %d][Application_ITc] set and get operation mis-match occurs on iteration %d, set value = %s, get value = %s \\n", __LINE__, nLoopCount, pszUri, pszGetVal);
+                       nMismatchFailCount++;
+               }
+
+               free(pszGetVal);
+       }
+
+       app_control_destroy(hAppControl);
+       
+       if ( nSetUriFailCount > 0 || nGetUriFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_uri failed %d times, app_control_get_uri failed %d times, mis-match happens %d times out of %d times\\n", __LINE__, nSetUriFailCount, nGetUriFailCount, nMismatchFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_set_uri, szAppControlSetUriSpeedLog);
+       PRINT_SPEED_LOG(app_control_get_uri, szAppControlGetUriSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AppControl_Set_GetUri, szAppControlSetGetUriMemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Set and Get AppControl Mime.
+/**
+* @testcase                    ITc_application_app_control_SetGetMime_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set AppControl Mime, Get AppControl Mime and then checks the set value should match the get value
+* @scenario                            Create AppControl\n
+*                                              Set AppControl Mime\n
+*                                              Get AppControl Mime\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_set_mime, app_control_get_mime
+* @passcase                            When app_control_set_mime, app_control_get_mime are successful and set value should match the get value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_SetGetMime_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlSetGetMimeMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlSetMimeSpeedLog[TIMELOG * MAX_COUNT];
+       char szAppControlGetMimeSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlSetGetMimeMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlSetMimeSpeedLog, 0, TIMELOG * MAX_COUNT);
+       memset(szAppControlGetMimeSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nSetMimeFailCount = 0;
+       int nGetMimeFailCount = 0;
+       int nMismatchFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+       
+       const char *pszMime = "image/jpg";              //sample mime string
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pszGetVal = NULL;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_set_mime(hAppControl, pszMime);
+               ApplicationExecutionDelay(szAppControlSetMimeSpeedLog);
+               
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_set_mime failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nSetMimeFailCount++;
+                       continue;
+               }
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_get_mime(hAppControl, &pszGetVal);
+               ApplicationExecutionDelay(szAppControlGetMimeSpeedLog);
+
+               ApplicationGetMemStatus(szAppControlSetGetMimeMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_get_mime failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nGetMimeFailCount++;
+                       continue;
+               }
+               
+               //check for value mis-match
+               if(0 != strcmp(pszMime, pszGetVal))
+               {
+                       FPRINTF("[Line : %d][Application_ITc] set and get operation mis-match occurs on iteration %d, set value = %s, get value = %s \\n", __LINE__, nLoopCount, pszMime, pszGetVal);
+                       nMismatchFailCount++;
+               }
+
+               free(pszGetVal);
+       }
+
+       app_control_destroy(hAppControl);
+       
+       if ( nSetMimeFailCount > 0 || nGetMimeFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_mime failed %d times, app_control_get_mime failed %d times, mis-match happens %d times out of %d times\\n", __LINE__, nSetMimeFailCount, nGetMimeFailCount, nMismatchFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_set_mime, szAppControlSetMimeSpeedLog);
+       PRINT_SPEED_LOG(app_control_get_mime, szAppControlGetMimeSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AppControl_Set_GetMime, szAppControlSetGetMimeMemLog);
+#endif
+               return 0;
+       }
+}
+
+
+//& type: auto
+//& purpose: Set and Get AppControl Category.
+/**
+* @testcase                    ITc_application_app_control_SetGetCategory_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set AppControl Category, Get AppControl Category and then checks the set value should match the get value
+* @scenario                            Create AppControl\n
+*                                              Set AppControl Category\n
+*                                              Get AppControl Category\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_set_category, app_control_get_category
+* @passcase                            When app_control_set_category, app_control_get_category are successful and set value should match the get value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_SetGetCategory_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlSetGetCategoryMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlSetCategorySpeedLog[TIMELOG * MAX_COUNT];
+       char szAppControlGetCategorySpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlSetGetCategoryMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlSetCategorySpeedLog, 0, TIMELOG * MAX_COUNT);
+       memset(szAppControlGetCategorySpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nSetCategoryFailCount = 0;
+       int nGetCategoryFailCount = 0;
+       int nMismatchFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+       
+       const char *pszCategory = "image/jpg";          //sample category string
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pszGetVal = NULL;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_set_category(hAppControl, pszCategory);
+               ApplicationExecutionDelay(szAppControlSetCategorySpeedLog);
+               
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_set_category failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nSetCategoryFailCount++;
+                       continue;
+               }
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_get_category(hAppControl, &pszGetVal);
+               ApplicationExecutionDelay(szAppControlGetCategorySpeedLog);
+
+               ApplicationGetMemStatus(szAppControlSetGetCategoryMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_get_category failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nGetCategoryFailCount++;
+                       continue;
+               }
+               
+               //check for value mis-match
+               if(0 != strcmp(pszCategory, pszGetVal))
+               {
+                       FPRINTF("[Line : %d][Application_ITc] set and get operation mis-match occurs on iteration %d, set value = %s, get value = %s \\n", __LINE__, nLoopCount, pszCategory, pszGetVal);
+                       nMismatchFailCount++;
+               }
+
+               free(pszGetVal);
+       }
+
+       app_control_destroy(hAppControl);
+       
+       if ( nSetCategoryFailCount > 0 || nGetCategoryFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_category failed %d times, app_control_get_category failed %d times, mis-match happens %d times out of %d times\\n", __LINE__, nSetCategoryFailCount, nGetCategoryFailCount, nMismatchFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_set_category, szAppControlSetCategorySpeedLog);
+       PRINT_SPEED_LOG(app_control_get_category, szAppControlGetCategorySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AppControl_Set_GetCategory, szAppControlSetGetCategoryMemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Add extra data to AppControl and Get extra data.
+/**
+* @testcase                    ITc_application_app_control_Add_Get_ExtraData_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Add AppControl Extra Data, Get AppControl Extra Data and then checks the added value should match the get value
+* @scenario                            Create AppControl\n
+*                                              Add Extra Data\n
+*                                              Get Extra Data\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_add_extra_data, app_control_get_extra_data
+* @passcase                            When app_control_add_extra_data, app_control_get_extra_data are successful and get value should match the added value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_Add_Get_ExtraData_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlAddGetExtraDataMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlAddExtraDataSpeedLog[TIMELOG * MAX_COUNT];
+       char szAppControlGetExtraDataSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlAddGetExtraDataMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlAddExtraDataSpeedLog, 0, TIMELOG * MAX_COUNT);
+       memset(szAppControlGetExtraDataSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAddExtraDataFailCount = 0;
+       int nGetExtraDataFailCount = 0;
+       int nMismatchFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+       
+       char *pszKey = "Sample_Key";            //sample key-value string
+       char *pszValue = "Sample_Value";
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pszGetVal = NULL;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_add_extra_data(hAppControl, pszKey, pszValue);
+               ApplicationExecutionDelay(szAppControlAddExtraDataSpeedLog);
+               
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_add_extra_data failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nAddExtraDataFailCount++;
+                       continue;
+               }
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_get_extra_data(hAppControl, pszKey, &pszGetVal);
+               ApplicationExecutionDelay(szAppControlGetExtraDataSpeedLog);
+
+               ApplicationGetMemStatus(szAppControlAddGetExtraDataMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_get_extra_data failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nGetExtraDataFailCount++;
+                       continue;
+               }
+               
+               //check for value mis-match
+               if(0 != strcmp(pszValue, pszGetVal))
+               {
+                       FPRINTF("[Line : %d][Application_ITc] add and get extra data mis-match occurs on iteration %d, added extra data = %s, get extra data = %s \\n", __LINE__, nLoopCount, pszValue, pszGetVal);
+                       nMismatchFailCount++;
+               }
+
+               free(pszGetVal);
+       }
+
+       app_control_destroy(hAppControl);
+       
+       if ( nAddExtraDataFailCount > 0 || nGetExtraDataFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_add_extradata failed %d times, app_control_get_extradata failed %d times, mis-match happens %d times out of %d times\\n", __LINE__, nAddExtraDataFailCount, nGetExtraDataFailCount, nMismatchFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_add_extradata, szAppControlAddExtraDataSpeedLog);
+       PRINT_SPEED_LOG(app_control_get_extradata, szAppControlGetExtraDataSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AppControl_Add_Get_ExtraData, szAppControlAddGetExtraDataMemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Add extra data array to AppControl and Get extra data array.
+/**
+* @testcase                    ITc_application_app_control_Add_Get_ExtraDataArray_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Add AppControl Extra Data array, Get AppControl Extra Data Array and then checks the added value should match the get value
+* @scenario                            Create AppControl\n
+*                                              Add Extra Data Array\n
+*                                              Get Extra Data Array\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_add_extra_data_array, app_control_get_extra_data_array
+* @passcase                            When app_control_add_extra_data_array, app_control_get_extra_data_array are successful and get value should match the added value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_Add_Get_ExtraDataArray_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlAddGetExtraDataArrayMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlAddExtraDataArraySpeedLog[TIMELOG * MAX_COUNT];
+       char szAppControlGetExtraDataArraySpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlAddGetExtraDataArrayMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlAddExtraDataArraySpeedLog, 0, TIMELOG * MAX_COUNT);
+       memset(szAppControlGetExtraDataArraySpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAddExtraDataArrayFailCount = 0;
+       int nGetExtraDataArrayFailCount = 0;
+       int nMismatchFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+       
+       char *pszKey = "Sample_Key";            //sample key string
+       int nArrayLen = 5;
+       const char* psz_array_value[] = {"value1", "value2", "value3", "value4" ,"value5"};
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char** ppsz_array_value_out;
+               int nArrayLenOut = 0;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_add_extra_data_array(hAppControl, pszKey, psz_array_value, nArrayLen);
+               ApplicationExecutionDelay(szAppControlAddExtraDataArraySpeedLog);
+               
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_add_extra_data_array failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nAddExtraDataArrayFailCount++;
+                       continue;
+               }
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_get_extra_data_array(hAppControl, pszKey, &ppsz_array_value_out, &nArrayLenOut);
+               ApplicationExecutionDelay(szAppControlGetExtraDataArraySpeedLog);
+
+               ApplicationGetMemStatus(szAppControlAddGetExtraDataArrayMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_get_extra_data_array failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nGetExtraDataArrayFailCount++;
+                       continue;
+               }
+
+               //check for length mis-match
+               if(nArrayLenOut != nArrayLen)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] add and get extra data array length/size mis-match occurs on iteration %d, added extra data size = %d, get extra data size = %d \\n", __LINE__, nLoopCount, nArrayLen, nArrayLenOut);
+                       nMismatchFailCount++;
+
+                       continue;
+               }
+
+               int i = 0;
+               for(; i < nArrayLen; ++i) 
+               {
+                       if(0 != strcmp(psz_array_value[i], ppsz_array_value_out[i])) 
+                       {
+                               FPRINTF("[Line : %d][Application_ITc] add and get extra data array Value mis-match occurs on iteration %d for index %d, added extra data array value = %s, get extra data array value = %s \\n", __LINE__, nLoopCount, i, psz_array_value[i], ppsz_array_value_out[i]);
+                               nMismatchFailCount++;
+
+                               break;
+                       } 
+               } 
+
+               free(ppsz_array_value_out);
+       }
+
+       app_control_destroy(hAppControl);
+       
+       if ( nAddExtraDataArrayFailCount > 0 || nGetExtraDataArrayFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_add_ExtraDataArray failed %d times, app_control_get_ExtraDataArray failed %d times, mis-match happens %d times out of %d times\\n", __LINE__, nAddExtraDataArrayFailCount, nGetExtraDataArrayFailCount, nMismatchFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_add_ExtraDataArray, szAppControlAddExtraDataArraySpeedLog);
+       PRINT_SPEED_LOG(app_control_get_ExtraDataArray, szAppControlGetExtraDataArraySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AppControl_Add_Get_ExtraDataArray, szAppControlAddGetExtraDataArrayMemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Add extra data array for a given key to AppControl and check if it is extra data array for that key.
+/**
+* @testcase                    ITc_application_app_control_Is_ExtraDataArray_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Add AppControl Extra Data array for a given key and checks if it is Extra Data Array
+* @scenario                            Create AppControl\n
+*                                              Add Extra Data Array for a specified key\n
+*                                              Checks for if it is data array for the specified key\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_add_extra_data_array, app_control_is_extra_data_array
+* @passcase                            When app_control_is_extra_data_arrayis successful and return correct value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_Is_ExtraDataArray_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlIsExtraDataArrayMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlIsExtraDataArraySpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlIsExtraDataArrayMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlIsExtraDataArraySpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nIsExtraDataArrayFailCount = 0;
+       int nMismatchFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+       
+       char *pszKey = "Sample_Key";            //sample key string
+       int nArrayLen = 5;
+       const char* psz_array_value[] = {"value1", "value2", "value3", "value4" ,"value5"};
+       nRetVal = app_control_add_extra_data_array(hAppControl, pszKey, psz_array_value, nArrayLen);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_add_extra_data_array API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               app_control_destroy(hAppControl);
+               return 1;
+       }
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               bool bIsArray = false;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_is_extra_data_array(hAppControl, pszKey, &bIsArray);
+               ApplicationExecutionDelay(szAppControlIsExtraDataArraySpeedLog);
+               
+               ApplicationGetMemStatus(szAppControlIsExtraDataArraySpeedLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_is_extra_data_array failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nIsExtraDataArrayFailCount++;
+                       continue;
+               }
+               
+               //check for length mis-match
+               if(true != bIsArray)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_is_extra_data_array returns false Isarray boolean value on iteration %d, correct value = true, return value = false \\n", __LINE__, nLoopCount);
+                       nMismatchFailCount++;
+               }
+       }
+
+       app_control_destroy(hAppControl);
+
+       if ( nIsExtraDataArrayFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_Is_ExtraDataArray failed %d times, incorrect IsArray boolean value returned = %d times out of %d times\\n", __LINE__, nIsExtraDataArrayFailCount, nMismatchFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_Is_ExtraDataArray, szAppControlIsExtraDataArraySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AppControl_Is_ExtraDataArray, szAppControlIsExtraDataArrayMemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Call app_control_clone and check if it copied app_control values properly.
+/**
+* @testcase                    ITc_application_app_control_Clone_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Create AppControl handle and clone it to get duplicate app_control handle.
+* @scenario                            Create AppControl\n
+*                                              Set AppControl parameters\n
+*                                              Clone app_control handle\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_set_mime, app_control_clone, app_control_get_mime
+* @passcase                            When app_control_is_extra_data_arrayis successful and return correct value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_Clone_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlCloneMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlCloneSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlCloneMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlCloneSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAppControlCloneFailCount = 0;
+       int nMismatchFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+       
+       const char *pszMime = "image/jpg";
+       nRetVal = app_control_set_mime(hAppControl, pszMime);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_mime API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               app_control_destroy(hAppControl);
+               return 1;
+       }
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               app_control_h hAppControlClone;
+               char* pszGetMimeVal = NULL;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_clone(&hAppControlClone, hAppControl);
+               ApplicationExecutionDelay(szAppControlCloneSpeedLog);
+               
+               ApplicationGetMemStatus(szAppControlCloneMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_clone failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nAppControlCloneFailCount++;
+                       continue;
+               }
+               
+               nRetVal = app_control_get_mime(hAppControlClone, &pszGetMimeVal);
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_get_mime failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nMismatchFailCount++;
+                       continue;
+               }
+               
+               //check for value mis-match
+               if(0 != strcmp(pszGetMimeVal, pszMime))
+               {
+                       FPRINTF("[Line : %d][Application_ITc] Clone API call return incorrect mime value on iteration %d, set value = %s, get value = %s \\n", __LINE__, nLoopCount, pszMime, pszGetMimeVal);
+                       nMismatchFailCount++;
+               }
+
+               free(pszGetMimeVal);
+       }
+
+       app_control_destroy(hAppControl);
+
+       if ( nAppControlCloneFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_clone failed %d times, incorrect Mime value returned = %d times out of %d times\\n", __LINE__, nAppControlCloneFailCount, nMismatchFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_Clone, szAppControlCloneSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AppControl_Clone, szAppControlCloneMemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+
+//& type: auto
+//& purpose: Add extra data to AppControl and then remove it.
+/**
+* @testcase                    ITc_application_app_control_Remove_ExtraData_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Add AppControl Extra Data, Remove AppControl Extra Data and then checks the added value has been removed
+* @scenario                            Create AppControl\n
+*                                              Add Extra Data\n
+*                                              Remove Extra Data\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_add_extra_data, app_control_remove_extra_data, app_control_get_extra_data
+* @passcase                            When app_control_remove_extra_data is successful and added value got removed too.
+* @failcase                            If target API fails or added value not removed.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_Remove_ExtraData_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlRemoveExtraDataMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlRemoveExtraDataSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlRemoveExtraDataMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlRemoveExtraDataSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nRemoveExtraDataFailCount = 0;
+       int nMismatchFailCount = 0;
+       int nAddExtraDataFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+       
+       char *pszKey = "Sample_Key";            //sample key-value string
+       char *pszValue = "Sample_Value";
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pszGetVal = NULL;
+
+               nRetVal = app_control_add_extra_data(hAppControl, pszKey, pszValue);
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_add_extra_data failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nAddExtraDataFailCount++;
+                       continue;
+               }
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_remove_extra_data(hAppControl, pszKey);
+               ApplicationExecutionDelay(szAppControlRemoveExtraDataSpeedLog);
+               
+               ApplicationGetMemStatus(szAppControlRemoveExtraDataMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_remove_extra_data failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nRemoveExtraDataFailCount++;
+                       continue;
+               }
+               
+               nRetVal = app_control_get_extra_data(hAppControl, pszKey, &pszGetVal);
+               if( (nRetVal == 0) && (pszGetVal != NULL) )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_get_extra_data return extra data value after app_control_remove_extra_data call on iteration %d, value returned = %s \\n", __LINE__, nLoopCount, pszGetVal);
+                       nMismatchFailCount++;
+               }
+       }
+
+       app_control_destroy(hAppControl);
+       
+       if ( nAddExtraDataFailCount > 0 || nRemoveExtraDataFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_add_extradata failed %d times, app_control_remove_extra_data failed %d times, value not removed properly happens %d times out of %d times\\n", __LINE__, nAddExtraDataFailCount, nRemoveExtraDataFailCount, nMismatchFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_remove_extradata, szAppControlRemoveExtraDataSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_control_remove_extradata, szAppControlRemoveExtraDataMemLog);
+#endif
+               return 0;
+       }
+}
+
+
+/**
+* @function            application_app_control_reply_cb
+* @description         callback function for app control reply
+* @parameter           hRequest : handle for app control request, hReply : app control handle, eResult : result, user_data : user data sent to callback
+* @return                      false
+*/
+void application_app_control_reply_cb(app_control_h hRequest, app_control_h hReply, app_control_result_e eResult, void *user_data)
+{
+     g_bAppControlSendLaunchRequest = true;
+        FPRINTF("[Line : %d][Application_ITc] app_control_reply_callback invoked, error returned = %d \\n", __LINE__, (int)eResult);
+}
+
+
+/**
+* @function            application_app_control_app_matched_cb
+* @description         callback function for app control application match
+* @parameter           app_control : app control handle, package : package name, user_data : user data sent to callback
+* @return                      false
+*/
+bool application_app_control_app_matched_cb(app_control_h app_control, const char *package, void *user_data)
+{
+     g_bAppControlAppMatched = true;
+        FPRINTF("[Line : %d][Application_ITc] app_matched_callback invoked, package = %s \\n", __LINE__, package);
+
+        return false;
+}
+
+
+//& type: auto
+//& purpose: send application launch request.
+/**
+* @testcase                    ITc_application_app_control_Send_Launch_Terminate_Request_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Create app_control, set app_control launch parameter, send the launch request and terminate it.
+* @scenario                            Create AppControl\n
+*                                              Set app_control launch parameter\n
+*                                              Send the launch request\n
+*                                              Terminate the launch request\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_set_app_id, app_control_destroy, app_control_send_launch_request, app_control_set_operation, app_control_send_terminate_request
+* @passcase                            When app_control_send_launch_request, app_control_send_terminate_request are successful and callback function invokes properly.
+* @failcase                            If target API fails or callback not invoked.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_Send_Launch_Terminate_Request_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlLaunchTerminateRequestMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlLaunchRequestSpeedLog[TIMELOG * MAX_COUNT];
+       char szAppControlTerminateRequestSpeedLog[TIMELOG * MAX_COUNT];
+       int nAppControlLaunchRequestFailCount = 0;
+       int nAppControlLaunchRequestCallbackFailCount = 0;
+       int nAppControlTerminateRequestFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               app_control_destroy(hAppControl);
+               return 1;
+       }
+       
+       nRetVal = app_control_set_app_id(hAppControl, SET_PACKAGE_LAUNCH);      
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               app_control_destroy(hAppControl);
+               return 1;
+       }
+       
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bAppControlSendLaunchRequest = false;
+
+               memset(szAppControlLaunchTerminateRequestMemLog, 0, MEMLOG * MAX_COUNT);
+               memset(szAppControlLaunchRequestSpeedLog, 0, TIMELOG * MAX_COUNT);
+               memset(szAppControlTerminateRequestSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_send_launch_request(hAppControl, application_app_control_reply_cb, NULL);
+               ApplicationExecutionDelay(szAppControlLaunchRequestSpeedLog);
+               
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_send_launch_request failed on iteration %d, error returned = %s for app_id = %s\\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal), SET_PACKAGE_LAUNCH);
+                       nAppControlLaunchRequestFailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] app_control_send_launch_request success for app_id = %s on iteration %d\\n", __LINE__, SET_PACKAGE_LAUNCH, nLoopCount);
+
+               usleep(MICROSECONDS_PER_SECOND);
+
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_send_terminate_request(hAppControl);
+               ApplicationExecutionDelay(szAppControlTerminateRequestSpeedLog);
+
+               ApplicationGetMemStatus(szAppControlLaunchTerminateRequestMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_send_terminate_request failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nAppControlTerminateRequestFailCount++;
+                       continue;
+               }
+
+               usleep(MICROSECONDS_PER_SECOND);
+       }
+
+       app_control_destroy(hAppControl);
+
+       if ( nAppControlLaunchRequestFailCount > 0 || nAppControlLaunchRequestCallbackFailCount > 0 || nAppControlTerminateRequestFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_send_launch_request failed %d times, app_control_send_launch_request callback not hit %d times, app_control_send_terminate_request fails %d times out of %d times\\n", __LINE__, nAppControlLaunchRequestFailCount, nAppControlLaunchRequestCallbackFailCount, nAppControlTerminateRequestFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_send_launch_request, szAppControlLaunchRequestSpeedLog);
+       PRINT_SPEED_LOG(app_control_send_terminate_request, szAppControlTerminateRequestSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AppControl_Send_Launch_Terminate_Request, szAppControlLaunchTerminateRequestMemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+
+//& type: auto
+//& purpose: set app_control launch parameter set the app matched callback to check the possible matching apps in callback.
+/**
+* @testcase                    ITc_application_app_control_For_Each_App_Matched_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Create app_control, set app_control launch parameter set the app matched callback to check the possible matching apps in callback.
+* @scenario                            Create AppControl\n
+*                                              Set app_control launch parameter\n
+*                                              Set the App Matched Callback\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_set_operation, app_control_set_mime, app_control_foreach_app_matched
+* @passcase                            When app_control_foreach_app_matched is successful and callback function invokes properly.
+* @failcase                            If target API fails or callback not invoked.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_For_Each_App_Matched_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlForEachAppMatchedMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlForEachAppMatchedSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlForEachAppMatchedMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlForEachAppMatchedSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAppControlForEachAppMatchedFailCount = 0;
+       int nAppControlForEachAppMatchedCallbackFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_VIEW);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               app_control_destroy(hAppControl);
+               return 1;
+       }
+       
+       nRetVal = app_control_set_mime(hAppControl, "application/sasf");
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_mime API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               app_control_destroy(hAppControl);
+               return 1;
+       }
+       
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bAppControlAppMatched = false;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_foreach_app_matched(hAppControl, application_app_control_app_matched_cb, NULL);
+               ApplicationExecutionDelay(szAppControlForEachAppMatchedSpeedLog);
+               
+               ApplicationGetMemStatus(szAppControlForEachAppMatchedMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_foreach_app_matched failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nAppControlForEachAppMatchedFailCount++;
+                       continue;
+               }
+
+               int nTimer = 0;
+               for(; nTimer<WAIT_CALLBACK; ++nTimer)
+               {
+                       if(true == g_bAppControlAppMatched)
+                       {
+                               break;
+                       }
+                       usleep(MICROSECONDS_PER_SECOND);
+               }
+
+               if(nTimer >= WAIT_CALLBACK)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_foreach_app_matched callback not hit on iteration %d\\n", __LINE__, nLoopCount);
+                       nAppControlForEachAppMatchedCallbackFailCount++;
+                       continue;
+               }
+
+               usleep(MICROSECONDS_PER_SECOND);
+       }
+
+       app_control_destroy(hAppControl);
+
+       if ( nAppControlForEachAppMatchedFailCount > 0 || nAppControlForEachAppMatchedCallbackFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_foreach_app_matched failed %d times, app_control_foreach_app_matched callback not hit %d times out of %d times\\n", __LINE__, nAppControlForEachAppMatchedFailCount, nAppControlForEachAppMatchedCallbackFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_foreach_app_matched, szAppControlForEachAppMatchedSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_control_foreach_app_matched, szAppControlForEachAppMatchedMemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+bool application_app_control_extra_data_cb(app_control_h app_control, const char *key, void *user_data)
+{
+     g_bAppControlExtraData = true;
+        FPRINTF("[Line : %d][Application_ITc] extra_data_callback invoked, key = %s \\n", __LINE__, key);
+
+        return false;
+}
+
+
+//& type: auto
+//& purpose: set app_control extra data, set the extra data callback to check the extra data in callback.
+/**
+* @testcase                    ITc_application_app_control_For_Each_Extra_Data_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Create app_control, set app_control extra data, set the extra data callback to check the extra data in callback.
+* @scenario                            Create AppControl\n
+*                                              Set app_control extra data\n
+*                                              Set the extra data Callback\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, app_control_add_extra_data, app_control_foreach_extra_data
+* @passcase                            When app_control_foreach_extra_data is successful and callback function invokes properly.
+* @failcase                            If target API fails or callback not invoked.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_app_control_For_Each_Extra_Data_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szAppControlForEachExtraDataMemLog[MEMLOG * MAX_COUNT];
+       char szAppControlForEachExtraDataSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAppControlForEachExtraDataMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAppControlForEachExtraDataSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAppControlForEachExtraDataFailCount = 0;
+       int nAppControlForEachExtraDataCallbackFailCount = 0;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+
+       char *pszKey = "Sample_Key";            //sample key-value pair
+       char *pszValue = "Sample_Value";
+       nRetVal = app_control_add_extra_data(hAppControl, pszKey, pszValue);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_add_extra_data API call gets failed, error returned = %s \\n", __LINE__, Application_AppControlGetError(nRetVal));
+               app_control_destroy(hAppControl);
+               return 1;
+       }
+       
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bAppControlExtraData = false;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = app_control_foreach_extra_data(hAppControl, application_app_control_extra_data_cb, NULL);
+               ApplicationExecutionDelay(szAppControlForEachExtraDataSpeedLog);
+               
+               ApplicationGetMemStatus(szAppControlForEachExtraDataMemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_foreach_extra_data failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nAppControlForEachExtraDataFailCount++;
+                       continue;
+               }
+
+               int nTimer = 0;
+               for(; nTimer<WAIT_CALLBACK; ++nTimer)
+               {
+                       if(true == g_bAppControlExtraData)
+                       {
+                               break;
+                       }
+                       usleep(MICROSECONDS_PER_SECOND);
+               }
+
+               if(nTimer >= WAIT_CALLBACK)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_foreach_app_matched callback not hit on iteration %d\\n", __LINE__, nLoopCount);
+                       nAppControlForEachExtraDataCallbackFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+       }
+
+       app_control_destroy(hAppControl);
+
+       if ( nAppControlForEachExtraDataFailCount > 0 || nAppControlForEachExtraDataCallbackFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_foreach_extra_data failed %d times, app_control_foreach_extra_data callback not hit %d times out of %d times\\n", __LINE__, nAppControlForEachExtraDataFailCount, nAppControlForEachExtraDataCallbackFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(app_control_foreach_extra_data, szAppControlForEachExtraDataSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(app_control_foreach_extra_data, szAppControlForEachExtraDataMemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+//**************************************************************************************************************************************************
+//*******************************************************Internationalization API*****************************************************************************
+//**************************************************************************************************************************************************
+
+//& type: auto
+//& purpose: Call i18n_get_text to get the localized translation for the specified string.
+/**
+* @testcase                    ITc_application_internationalization_i18n_get_text_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call i18n_get_text to get the localized translation for the specified string.
+* @scenario                            Call i18n_get_text to get the localized translation for the specified string.
+* @apicovered                  i18n_get_text
+* @passcase                            When i18n_get_text is successful and returns correct value
+* @failcase                            If target API fails or returns incorrect value
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_internationalization_i18n_get_text_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szInternationalization_i18n_get_text_MemLog[MEMLOG * MAX_COUNT];
+       char szInternationalization_i18n_get_text_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szInternationalization_i18n_get_text_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szInternationalization_i18n_get_text_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nInternationalization_i18n_get_text_FailCount = 0;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char* pMessage = "Sample Text for Internationalization";        //sample message string
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               char* pTranslatedMsg = i18n_get_text(pMessage);
+               ApplicationExecutionDelay(szInternationalization_i18n_get_text_SpeedLog);
+               
+               ApplicationGetMemStatus(szInternationalization_i18n_get_text_MemLog);
+
+               if( NULL == pTranslatedMsg )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] i18n_get_text failed on iteration %d, values returned = NULL\\n", __LINE__, nLoopCount);
+                       nInternationalization_i18n_get_text_FailCount++;
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] i18n_get_text on iteration = %d, actual text = %s, translated text = %s\\n", __LINE__, nLoopCount, pMessage, pTranslatedMsg);
+       }
+
+       if( nInternationalization_i18n_get_text_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] i18n_get_text failed %d times out of %d times\\n", __LINE__, nInternationalization_i18n_get_text_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(i18n_get_text, szInternationalization_i18n_get_text_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(i18n_get_text, szInternationalization_i18n_get_text_MemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+//**************************************************************************************************************************************************
+//*******************************************************Alarm API*****************************************************************************
+//**************************************************************************************************************************************************
+
+bool application_alarm_registered_alarm_cb(int nAlarmID, void *user_data) 
+{
+       FPRINTF("[Line : %d][Application_ITc] application_alarm_registered_alarm_cb invoked; alarm id = %d\\n", __LINE__, nAlarmID);
+
+       g_AlarmIDValueReceived = nAlarmID;
+       ++g_AlarmRegisteredReceived;
+
+       return true;
+}
+
+//& type: auto
+//& purpose: Set Alarm after Delay.
+/**
+* @testcase                    ITc_application_alarm_schedule_after_delay_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set Alarm after delay and checks the Alarm ID.
+* @scenario                            Create AppControl\n
+*                                              Set Alarm after Delay\n
+*                                              Check Alarm ID\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, alarm_schedule_once_after_delay, alarm_cancel, app_control_set_operation, app_control_set_app_id
+* @passcase                            When alarm_schedule_once_after_delay is success full and return proper Alarm ID.
+* @failcase                            If target API fails or return value is not proper.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_alarm_schedule_after_delay_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal = 0;
+       char szAlarm_schedule_after_delay_MemLog[MEMLOG * MAX_COUNT];
+       char szAlarm_schedule_after_delay_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAlarm_schedule_after_delay_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAlarm_schedule_after_delay_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAlarm_schedule_after_delay_FailCount = 0;
+
+       app_control_h hAppControl;
+        char* pszPackage = SET_PACKAGE_LAUNCH;
+       nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+        nRetVal = app_control_set_app_id(hAppControl, pszPackage);
+        if(nRetVal != 0)
+        {
+                FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+                app_control_destroy(hAppControl);
+                return 1;
+        }
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nAlarmID = -1;
+               int nDelay = 60;        //sample 1 min
+               int nPeriod = 0;
+               
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = alarm_schedule_after_delay(hAppControl, nDelay, nPeriod, &nAlarmID);
+               ApplicationExecutionDelay(szAlarm_schedule_after_delay_SpeedLog);
+               
+               ApplicationGetMemStatus(szAlarm_schedule_after_delay_MemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal));
+                       nAlarm_schedule_after_delay_FailCount++;
+                       continue;
+               }
+
+               if(nAlarmID < 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay on iteration %d returned invalid alarm id = %d\\n", __LINE__, nLoopCount, nAlarmID);
+                       nAlarm_schedule_after_delay_FailCount++;
+                       continue;
+               }
+               
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay returned alarm ID = %d on iteration %d\\n", __LINE__, nAlarmID, nLoopCount);
+
+               alarm_cancel(nAlarmID);
+       }
+
+       app_control_destroy(hAppControl);
+
+       if ( nAlarm_schedule_after_delay_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay failed %d times out of %d times\\n", __LINE__, nAlarm_schedule_after_delay_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(alarm_schedule_after_delay, szAlarm_schedule_after_delay_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(alarm_schedule_after_delay, szAlarm_schedule_after_delay_MemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+//& type: auto
+//& purpose: Set Alarm at Date.
+/**
+* @testcase                    ITc_application_alarm_schedule_at_date_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set Alarm at date and checks the Alarm ID.
+* @scenario                            Create AppControl\n
+*                                              Set Alarm at date\n
+*                                              Check Alarm ID\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, alarm_schedule_once_at_date, alarm_cancel, app_control_set_operation, app_control_set_app_id
+* @passcase                            When alarm_schedule_once_at_date is successful and return proper Alarm ID.
+* @failcase                            If target API fails or return value is not proper.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_alarm_schedule_at_date_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal = 0;
+       char szAlarm_schedule_at_date_MemLog[MEMLOG * MAX_COUNT];
+       char szAlarm_schedule_at_date_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAlarm_schedule_at_date_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAlarm_schedule_at_date_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAlarm_schedule_at_date_FailCount = 0;
+
+       app_control_h hAppControl;
+        char* pszPackage = SET_PACKAGE_LAUNCH;
+       nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+        }
+       nRetVal = app_control_set_app_id(hAppControl, pszPackage);
+        if(nRetVal != 0)
+        {
+                FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+                app_control_destroy(hAppControl);
+                return 1;
+        }
+        
+
+       struct tm stDate;
+       alarm_get_current_time(&stDate);
+       stDate.tm_sec += 60; //set after 1 min
+       
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nAlarmID = -1;
+               int nPeriod = 0;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = alarm_schedule_at_date(hAppControl, &stDate, nPeriod, &nAlarmID);
+               ApplicationExecutionDelay(szAlarm_schedule_at_date_SpeedLog);
+               
+               ApplicationGetMemStatus(szAlarm_schedule_at_date_MemLog);
+
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_at_date failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal));
+                       nAlarm_schedule_at_date_FailCount++;
+                       continue;
+               }
+
+               if(nAlarmID < 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_at_date on iteration %d returned invalid alarm id = %d\\n", __LINE__, nLoopCount, nAlarmID);
+                       nAlarm_schedule_at_date_FailCount++;
+                       continue;
+               }
+               
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_at_date returned alarm ID = %d on iteration %d\\n", __LINE__, nAlarmID, nLoopCount);
+
+               alarm_cancel(nAlarmID);
+       }
+
+       app_control_destroy(hAppControl);
+
+       if ( nAlarm_schedule_at_date_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_at_date failed %d times out of %d times\\n", __LINE__, nAlarm_schedule_at_date_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(alarm_schedule_at_date, szAlarm_schedule_at_date_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(alarm_schedule_at_date, szAlarm_schedule_at_date_MemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+//& type: auto
+//& purpose: Set Alarm at Date with recurrence week set option.
+/**
+* @testcase                    ITc_application_alarm_schedule_with_recurrence_week_flag_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set Alarm at date and with recurrence week flag set option.
+* @scenario                            Create AppControl\n
+*                                              Set Alarm at date with recurrence week flag set option\n
+*                                              Check Alarm ID\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, alarm_schedule_with_recurrence_week_flag, alarm_cancel, app_control_set_operation, app_control_set_app_id
+* @passcase                            When alarm_schedule_with_recurrence_week_flag is successful and return proper Alarm ID.
+* @failcase                            If target API fails or return value is not proper.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_alarm_schedule_with_recurrence_week_flag_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal = 0;
+       
+       app_control_h hAppControl;
+        char* pszPackage = SET_PACKAGE_LAUNCH;
+       nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+        nRetVal = app_control_set_app_id(hAppControl, pszPackage);
+        if(nRetVal != 0)
+        {
+                FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+                app_control_destroy(hAppControl);
+                return 1;
+        }
+
+       struct tm stDate;
+       alarm_get_current_time(&stDate);
+       stDate.tm_sec += 60; //set after 1 min
+       
+       alarm_week_flag_e flag_type[] = { ALARM_WEEK_FLAG_SUNDAY,
+                                                                       ALARM_WEEK_FLAG_MONDAY,
+                                                                       ALARM_WEEK_FLAG_TUESDAY,
+                                                                       ALARM_WEEK_FLAG_WEDNESDAY,
+                                                                       ALARM_WEEK_FLAG_THURSDAY, 
+                                                                       ALARM_WEEK_FLAG_FRIDAY,
+                                                                       ALARM_WEEK_FLAG_SATURDAY};
+
+       int enum_size = sizeof(flag_type) / sizeof(flag_type[0]);
+       int enum_counter = 0;
+
+       char szAlarm_schedule_with_recurrence_week_flag_MemLog[MEMLOG * MAX_COUNT * enum_size];
+       char szAlarm_schedule_with_recurrence_week_flag_SpeedLog[TIMELOG * MAX_COUNT * enum_size];
+
+       memset(szAlarm_schedule_with_recurrence_week_flag_MemLog, 0, MEMLOG * MAX_COUNT * enum_size);
+       memset(szAlarm_schedule_with_recurrence_week_flag_SpeedLog, 0, TIMELOG * MAX_COUNT * enum_size);
+
+       int nAlarm_schedule_with_recurrence_week_flag_FailCount = 0;
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       int nAlarmID = -1;
+                       int nWeekday = flag_type[enum_counter];
+
+                       //Target API
+                       ApplicationGetMemAllocation();
+
+                       ApplicationGetTimeOfDay();
+                       nRetVal = alarm_schedule_with_recurrence_week_flag(hAppControl, &stDate, nWeekday, &nAlarmID);
+                       ApplicationExecutionDelay(szAlarm_schedule_with_recurrence_week_flag_SpeedLog);
+
+                       ApplicationGetMemStatus(szAlarm_schedule_with_recurrence_week_flag_MemLog);
+
+                       if(nRetVal != 0)
+                       {
+                               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_with_recurrence_week_flag failed on iteration %d for alarm_week_flag_e enum value = %d, error returned = %s\\n", __LINE__, nLoopCount, flag_type[enum_counter], Application_AlarmGetError(nRetVal));
+                               nAlarm_schedule_with_recurrence_week_flag_FailCount++;
+                               continue;
+                       }
+
+                       if(nAlarmID < 0)
+                       {
+                               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_with_recurrence_week_flag on iteration %d for alarm_week_flag_e enum value = %d, returned invalid alarm id = %d\\n", __LINE__, nLoopCount, flag_type[enum_counter], nAlarmID);
+                               nAlarm_schedule_with_recurrence_week_flag_FailCount++;
+                               continue;
+                       }
+
+                       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_with_recurrence_week_flag returned alarm ID = %d on iteration %d for alarm_week_flag_e enum value = %d\\n", __LINE__, nAlarmID, nLoopCount, flag_type[enum_counter]);
+
+                       alarm_cancel(nAlarmID);
+               }
+       }
+       app_control_destroy(hAppControl);
+
+       if ( nAlarm_schedule_with_recurrence_week_flag_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_with_recurrence_week_flag failed %d times out of %d times\\n", __LINE__, nAlarm_schedule_with_recurrence_week_flag_FailCount, MAX_COUNT*enum_size);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(alarm_schedule_with_recurrence_week_flag, szAlarm_schedule_with_recurrence_week_flag_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(alarm_schedule_with_recurrence_week_flag, szAlarm_schedule_with_recurrence_week_flag_MemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+//& type: auto
+//& purpose: Call alarm_foreach_registered_alarm to retrieve all the registered alarms.
+/**
+* @testcase                    ITc_application_alarm_foreach_registered_alarm_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call alarm_foreach_registered_alarm to retrieve all the supported alarm information.
+* @scenario                            registered the alarm\n
+*                                              call alarm_foreach_registered_alarm\n
+*                                              check the callback and retrieve all the information
+* @apicovered                  alarm_foreach_registered_alarm, alarm_schedule_once_after_delay, alarm_cancel, app_control_create, app_control_set_operation, app_control_set_app_id, app_control_destroy
+* @passcase                            When alarm_foreach_registered_alarm is successful and callback returns proper value
+* @failcase                            If target API fails or callback doesn't retrieve supported alarm values.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_alarm_foreach_registered_alarm_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal= 0;
+       char szAlarm_foreach_registered_alarm_MemLog[MEMLOG * MAX_COUNT];
+       char szAlarm_foreach_registered_alarm_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAlarm_foreach_registered_alarm_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAlarm_foreach_registered_alarm_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAlarm_foreach_registered_alarm_FailCount = 0;
+
+       app_control_h hAppControl;
+        char* pszPackage = SET_PACKAGE_LAUNCH;
+       nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+        nRetVal = app_control_set_app_id(hAppControl, pszPackage);
+        if(nRetVal != 0)
+        {
+                FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+                app_control_destroy(hAppControl);
+                return 1;
+        }
+
+
+       int nAlarmID = -1;
+       int nDelay = 60;        //sample 1 min
+       int nPeriod = 0;
+       nRetVal = alarm_schedule_after_delay(hAppControl, nDelay, nPeriod, &nAlarmID);
+       if( nRetVal != 0 || nAlarmID < 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay failed, error returned = %s , alarm id = %d\\n", __LINE__, Application_AlarmGetError(nRetVal), nAlarmID);
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+               
+       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay returned alarm ID = %d\\n", __LINE__, nAlarmID);
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_AlarmRegisteredReceived = 0;
+               g_AlarmIDValueReceived = -1;
+
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = alarm_foreach_registered_alarm(application_alarm_registered_alarm_cb, NULL);
+               ApplicationExecutionDelay(szAlarm_foreach_registered_alarm_SpeedLog);
+               
+               ApplicationGetMemStatus(szAlarm_foreach_registered_alarm_MemLog);
+
+               usleep(WAIT_CALLBACK*MICROSECONDS_PER_SECOND); //wait to get callback invoked
+
+               if( nRetVal != 0 )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_foreach_registered_alarm failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal));
+                       nAlarm_foreach_registered_alarm_FailCount++;
+                       continue;
+               }
+
+               if( g_AlarmRegisteredReceived <= 0 )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_foreach_registered_alarm on iteration %d returned invalid total registered alarms = %d\\n", __LINE__, nLoopCount, g_AlarmRegisteredReceived);
+                       nAlarm_foreach_registered_alarm_FailCount++;
+               }
+       }
+
+       alarm_cancel(nAlarmID);
+
+       app_control_destroy(hAppControl);
+
+       if( nAlarm_foreach_registered_alarm_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_foreach_registered_alarm failed %d times out of %d times\\n", __LINE__, nAlarm_foreach_registered_alarm_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(alarm_foreach_registered_alarm, szAlarm_foreach_registered_alarm_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(alarm_foreach_registered_alarm, szAlarm_foreach_registered_alarm_MemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+
+//& type: auto
+//& purpose: Call alarm_get_app_control to get the app_control of the registered alarm.
+/**
+* @testcase                    ITc_application_alarm_get_app_control_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call alarm_get_app_control to get app_control of the registered alarm.
+* @scenario                            registered the alarm\n
+*                                              call alarm_get_app_control\n
+*                                              check the app_control value and compare with original
+* @apicovered                  alarm_get_app_control, alarm_schedule_once_after_delay, alarm_cancel, app_control_set_app_id, app_control_destroy, app_control_create, app_control_set_operation, app_control_get_app_id
+* @passcase                            When alarm_get_app_control is successful and returns correct value
+* @failcase                            If target API fails or callback doesn't retrieve correct values.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_alarm_get_app_control_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal= 0;
+       char szAlarm_get_app_control_MemLog[MEMLOG * MAX_COUNT];
+       char szAlarm_get_app_control_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAlarm_get_app_control_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAlarm_get_app_control_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAlarm_get_app_control_FailCount = 0;
+       int nGetPackageFailCount = 0;
+       int nMismatchFailCount = 0;
+
+       app_control_h hAppControl;
+       char* pszPackage = SET_PACKAGE_LAUNCH;          //sample app string
+       nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+
+       nRetVal = app_control_set_app_id(hAppControl, pszPackage);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+
+       int nAlarmID = -1;
+       int nDelay = 60;        //sample 1 min
+       int nPeriod = 0;
+       nRetVal = alarm_schedule_after_delay(hAppControl, nDelay, nPeriod, &nAlarmID);
+       if( nRetVal != 0 || nAlarmID < 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay failed, error returned = %s , alarm id = %d\\n", __LINE__, Application_AlarmGetError(nRetVal), nAlarmID);
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+               
+       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay returned alarm ID = %d\\n", __LINE__, nAlarmID);
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               app_control_h hAppControlReceived;
+               char* pszGetVal = NULL;
+               
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = alarm_get_app_control(nAlarmID, &hAppControlReceived);
+               ApplicationExecutionDelay(szAlarm_get_app_control_SpeedLog);
+               
+               ApplicationGetMemStatus(szAlarm_get_app_control_MemLog);
+
+               if( nRetVal != 0 )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_get_app_control failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal));
+                       nAlarm_get_app_control_FailCount++;
+                       continue;
+               }
+
+               nRetVal = app_control_get_app_id(hAppControlReceived, &pszGetVal);
+               if( (nRetVal != 0) || (NULL == pszGetVal))
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control_get_app_id failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, Application_AppControlGetError(nRetVal));
+                       nGetPackageFailCount++;
+                       continue;
+               }
+
+               if(0 != strcmp(pszPackage, pszGetVal))
+               {
+                       FPRINTF("[Line : %d][Application_ITc] app_control set and get package value mis-match occurs on iteration %d, set value = %s, get value = %s \\n", __LINE__, nLoopCount, pszPackage, pszGetVal);
+                       nMismatchFailCount++;
+               }
+
+               free(pszGetVal);
+       }
+
+       alarm_cancel(nAlarmID);
+
+       app_control_destroy(hAppControl);
+
+       if( nAlarm_get_app_control_FailCount > 0 || nGetPackageFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_get_app_control failed %d times, app_control_get_package failed %d times, Mismatch happens %d times out of %d times\\n", __LINE__, nAlarm_get_app_control_FailCount, nGetPackageFailCount, nMismatchFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(alarm_get_app_control, szAlarm_get_app_control_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(alarm_get_app_control, szAlarm_get_app_control_MemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+//& type: auto
+//& purpose: Call alarm_get_scheduled_period to get the scheduled period of the registered alarms.
+/**
+* @testcase                    ITc_application_alarm_get_scheduled_period_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call alarm_get_scheduled_period to get the scheduled period of the registered alarms.
+* @scenario                            registered the alarm\n
+*                                              call alarm_get_scheduled_period\n
+*                                              check the value received
+* @apicovered                  alarm_get_scheduled_period, alarm_schedule_once_after_delay, alarm_cancel, app_control_destroy, app_control_create, app_control_set_operation, app_control_set_app_id
+* @passcase                            When alarm_get_scheduled_period is successful and returns proper value
+* @failcase                            If target API fails or doesn't return correct value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_alarm_get_scheduled_period_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal= 0;
+       char szAlarm_get_scheduled_period_MemLog[MEMLOG * MAX_COUNT];
+       char szAlarm_get_scheduled_period_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAlarm_get_scheduled_period_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAlarm_get_scheduled_period_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAlarm_get_scheduled_period_FailCount = 0;
+        char* pszPackage = SET_PACKAGE_LAUNCH;
+
+       app_control_h hAppControl;
+       nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+
+        nRetVal = app_control_set_app_id(hAppControl, pszPackage);
+        if(nRetVal != 0)
+        {
+                FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+                app_control_destroy(hAppControl);
+                return 1;
+        }
+
+       int nAlarmID = -1;
+       int nDelay = 60;        //sample 1 min
+       int nPeriod = 30;       //sample period
+       nRetVal = alarm_schedule_after_delay(hAppControl, nDelay, nPeriod, &nAlarmID);
+       if( nRetVal != 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay failed, error returned = %s\\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+
+       if( nAlarmID < 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay returned invalid alarm id = %d\\n", __LINE__, nAlarmID);
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+               
+       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay returned alarm ID = %d\\n", __LINE__, nAlarmID);
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nGetPeriod = 0;
+               
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = alarm_get_scheduled_period(nAlarmID, &nGetPeriod);
+               ApplicationExecutionDelay(szAlarm_get_scheduled_period_SpeedLog);
+               
+               ApplicationGetMemStatus(szAlarm_get_scheduled_period_MemLog);
+
+               if( nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_get_scheduled_period failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal));
+                       nAlarm_get_scheduled_period_FailCount++;
+                       continue;
+               }
+
+               if( nGetPeriod != nPeriod )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_get_scheduled_period value mismatch on iteration %d, actual value = %d , received value = %d\\n", __LINE__, nLoopCount, nPeriod, nGetPeriod);
+                       nAlarm_get_scheduled_period_FailCount++;
+               }
+       }
+
+       alarm_cancel(nAlarmID);
+
+       app_control_destroy(hAppControl);
+
+       if( nAlarm_get_scheduled_period_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_get_scheduled_period failed %d times out of %d times\\n", __LINE__, nAlarm_get_scheduled_period_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(alarm_get_scheduled_period, szAlarm_get_scheduled_period_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(alarm_get_scheduled_period, szAlarm_get_scheduled_period_MemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+
+//& type: auto
+//& purpose: Call alarm_get_scheduled_date to get the scheduled date of the registered alarms.
+/**
+* @testcase                    ITc_application_alarm_get_scheduled_date_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call alarm_get_scheduled_date to get the scheduled date of the registered alarms.
+* @scenario                            registered the alarm\n
+*                                              call alarm_get_scheduled_date\n
+*                                              check the value received
+* @apicovered                  app_control_create, app_control_destroy, app_control_set_operation, app_control_set_app_id, alarm_get_scheduled_date, alarm_schedule_with_recurrence_week_flag, alarm_cancel
+* @passcase                            When alarm_get_scheduled_date is successful and returns proper value
+* @failcase                            If target API fails or doesn't return correct value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_alarm_get_scheduled_date_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal= 0;
+       char szAlarm_get_scheduled_date_MemLog[MEMLOG * MAX_COUNT];
+       char szAlarm_get_scheduled_date_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAlarm_get_scheduled_date_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAlarm_get_scheduled_date_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAlarm_get_scheduled_date_FailCount = 0;
+
+       app_control_h hAppControl;
+        char* pszPackage = SET_PACKAGE_LAUNCH;
+       nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+        nRetVal = app_control_set_app_id(hAppControl, pszPackage);
+        if(nRetVal != 0)
+        {
+                FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+                app_control_destroy(hAppControl);
+                return 1;
+        }
+
+
+       int nAlarmID = -1;
+       struct tm stDate;
+       alarm_get_current_time(&stDate);
+       stDate.tm_sec = 30; //set sec value to 30 sec
+       int nWeekday = ALARM_WEEK_FLAG_SUNDAY;
+       nRetVal = alarm_schedule_with_recurrence_week_flag(hAppControl, &stDate, nWeekday, &nAlarmID);
+       if( nRetVal != 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_with_recurrence_week_flag failed, error returned = %s\\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+
+       if( nAlarmID < 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_with_recurrence_week_flag returned invalid alarm id = %d\\n", __LINE__, nAlarmID);
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+               
+       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_with_recurrence_week_flag returned alarm ID = %d\\n", __LINE__, nAlarmID);
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               struct tm stGetDate;
+               
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = alarm_get_scheduled_date(nAlarmID, &stGetDate);
+               ApplicationExecutionDelay(szAlarm_get_scheduled_date_SpeedLog);
+               
+               ApplicationGetMemStatus(szAlarm_get_scheduled_date_MemLog);
+
+               if( nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_get_scheduled_date failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal));
+                       nAlarm_get_scheduled_date_FailCount++;
+                       continue;
+               }
+
+               if( stGetDate.tm_sec != stDate.tm_sec )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_get_scheduled_date value mismatch on iteration %d, set second value = %d , received second value = %d\\n", __LINE__, nLoopCount, stDate.tm_sec, stGetDate.tm_sec);
+                       nAlarm_get_scheduled_date_FailCount++;
+               }
+       }
+
+       alarm_cancel(nAlarmID);
+
+       app_control_destroy(hAppControl);
+
+       if( nAlarm_get_scheduled_date_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_get_scheduled_date failed %d times out of %d times\\n", __LINE__, nAlarm_get_scheduled_date_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(alarm_get_scheduled_date, szAlarm_get_scheduled_date_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(alarm_get_scheduled_date, szAlarm_get_scheduled_date_MemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+//& type: auto
+//& purpose: Call alarm_get_scheduled_recurrence_week_flag to get the scheduled recurrence_week_flag of the registered alarms.
+/**
+* @testcase                    ITc_application_alarm_get_scheduled_recurrence_week_flag_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Call alarm_get_scheduled_recurrence_week_flag to get the scheduled recurrence_week_flag of the registered alarms.
+* @scenario                            registered the alarm\n
+*                                              call alarm_get_scheduled_recurrence_week_flag\n
+*                                              check the value received
+* @apicovered                  app_control_create, app_control_set_operation, app_control_set_app_id, alarm_get_scheduled_recurrence_week_flag, alarm_schedule_with_recurrence_week_flag, alarm_cancel, app_control_destroy
+* @passcase                            When alarm_get_scheduled_recurrence_week_flag is successful and returns proper value
+* @failcase                            If target API fails or doesn't return correct value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_alarm_get_scheduled_recurrence_week_flag_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal= 0;
+       char szAlarm_get_scheduled_recurrence_week_flag_MemLog[MEMLOG * MAX_COUNT];
+       char szAlarm_get_scheduled_recurrence_week_flag_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAlarm_get_scheduled_recurrence_week_flag_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAlarm_get_scheduled_recurrence_week_flag_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAlarm_get_scheduled_recurrence_week_flag_FailCount = 0;
+
+       app_control_h hAppControl;
+        char* pszPackage = SET_PACKAGE_LAUNCH;
+       nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+        nRetVal = app_control_set_app_id(hAppControl, pszPackage);
+        if(nRetVal != 0)
+        {
+                FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+                app_control_destroy(hAppControl);
+                return 1;
+        }
+
+       int nAlarmID = -1;
+       struct tm stDate;
+       alarm_get_current_time(&stDate);
+       stDate.tm_sec = 30; //set sec value to 30 sec
+       int nWeekday = ALARM_WEEK_FLAG_SUNDAY;
+       nRetVal = alarm_schedule_with_recurrence_week_flag(hAppControl, &stDate, nWeekday, &nAlarmID);
+       if( nRetVal != 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_with_recurrence_week_flag failed, error returned = %s\\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+
+       if( nAlarmID < 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_with_recurrence_week_flag returned invalid alarm id = %d\\n", __LINE__, nAlarmID);
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+               
+       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_with_recurrence_week_flag returned alarm ID = %d\\n", __LINE__, nAlarmID);
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nGetWeekday;
+               
+               //Target API
+               ApplicationGetMemAllocation();
+               
+               ApplicationGetTimeOfDay();
+               nRetVal = alarm_get_scheduled_recurrence_week_flag(nAlarmID, &nGetWeekday);
+               ApplicationExecutionDelay(szAlarm_get_scheduled_recurrence_week_flag_SpeedLog);
+               
+               ApplicationGetMemStatus(szAlarm_get_scheduled_recurrence_week_flag_MemLog);
+
+               if( nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_get_scheduled_recurrence_week_flag failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal));
+                       nAlarm_get_scheduled_recurrence_week_flag_FailCount++;
+                       continue;
+               }
+
+               if( nWeekday != nGetWeekday )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_get_scheduled_recurrence_week_flag value mismatch on iteration %d, set value = %d , received value = %d\\n", __LINE__, nLoopCount, nWeekday, nGetWeekday);
+                       nAlarm_get_scheduled_recurrence_week_flag_FailCount++;
+               }
+       }
+
+       alarm_cancel(nAlarmID);
+
+       app_control_destroy(hAppControl);
+
+       if( nAlarm_get_scheduled_recurrence_week_flag_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_get_scheduled_recurrence_week_flag failed %d times out of %d times\\n", __LINE__, nAlarm_get_scheduled_recurrence_week_flag_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(alarm_get_scheduled_recurrence_week_flag, szAlarm_get_scheduled_recurrence_week_flag_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(alarm_get_scheduled_recurrence_week_flag, szAlarm_get_scheduled_recurrence_week_flag_MemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+//& type: auto
+//& purpose: Set Alarm after Delay and cancel the alarm.
+/**
+* @testcase                    ITc_application_alarm_cancel_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set Alarm after delay and cancel the alarm.
+* @scenario                            Create AppControl\n
+*                                              Set Alarm after Delay\n
+*                                              cancel Alarm ID\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, alarm_schedule_once_after_delay, alarm_cancel, app_control_set_operation, app_control_set_app_id
+* @passcase                            When alarm_cancel is successful and behave properly.
+* @failcase                            If target API fails or not behaved properly.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_alarm_cancel_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal = 0;
+       char szAlarm_cancel_MemLog[MEMLOG * MAX_COUNT];
+       char szAlarm_cancel_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAlarm_cancel_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAlarm_cancel_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAlarm_schedule_after_delay_FailCount = 0;
+       int nAlarm_cancel_FailCount = 0;
+
+       app_control_h hAppControl;
+        char* pszPackage = SET_PACKAGE_LAUNCH;
+       nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+        nRetVal = app_control_set_app_id(hAppControl, pszPackage);
+        if(nRetVal != 0)
+        {
+                FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+                app_control_destroy(hAppControl);
+                return 1;
+        }
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nAlarmID = -1;
+               int nDelay = 60;        //sample 1 min
+               int nPeriod = 0;
+
+               nRetVal = alarm_schedule_after_delay(hAppControl, nDelay, nPeriod, &nAlarmID);
+               if(nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal));
+                       nAlarm_schedule_after_delay_FailCount++;
+                       continue;
+               }
+
+               if(nAlarmID < 0)
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay on iteration %d returned invalid alarm id = %d\\n", __LINE__, nLoopCount, nAlarmID);
+                       nAlarm_schedule_after_delay_FailCount++;
+                       continue;
+               }
+               
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay returned alarm ID = %d on iteration %d\\n", __LINE__, nAlarmID, nLoopCount);
+
+               //Target API
+               ApplicationGetMemAllocation();
+
+               ApplicationGetTimeOfDay();
+               nRetVal = alarm_cancel(nAlarmID);
+               ApplicationExecutionDelay(szAlarm_cancel_SpeedLog);
+               
+               ApplicationGetMemStatus(szAlarm_cancel_MemLog);
+
+               if( nRetVal != 0 )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_cancel failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal));
+                       nAlarm_cancel_FailCount++;
+               }
+       }
+
+       app_control_destroy(hAppControl);
+
+       if ( nAlarm_schedule_after_delay_FailCount > 0 || nAlarm_cancel_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay failed %d times, alarm_cancel failed %d times out of %d times\\n", __LINE__, nAlarm_schedule_after_delay_FailCount, nAlarm_cancel_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(alarm_cancel, szAlarm_cancel_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(alarm_cancel, szAlarm_cancel_MemLog);
+#endif
+               return 0;
+       }
+}
+
+
+//& type: auto
+//& purpose: Set few Alarms after Delay and cancel_all the alarm.
+/**
+* @testcase                    ITc_application_alarm_cancel_all_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set few Alarms after delay and cancel all the alarms.
+* @scenario                            Create AppControl\n
+*                                              Set Alarm after Delay\n
+*                                              Cancel all alarms\n
+*                                              Destroy AppControl
+* @apicovered                  app_control_create, app_control_destroy, alarm_schedule_once_after_delay, alarm_cancel_all, app_control_set_operation, app_control_set_app_id,
+* @passcase                            When alarm_cancel_all is successful and behave properly.
+* @failcase                            If target API fails or not behaved properly.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_alarm_cancel_all_p(void)
+{
+
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal = 0;
+       char szAlarm_cancel_all_MemLog[MEMLOG * MAX_COUNT];
+       char szAlarm_cancel_all_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAlarm_cancel_all_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAlarm_cancel_all_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAlarm_schedule_after_delay_FailCount = 0;
+       int nAlarm_cancel_all_FailCount = 0;
+
+       app_control_h hAppControl;
+        char* pszPackage = SET_PACKAGE_LAUNCH;
+       nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_create API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+
+               return 1;
+       }
+
+       nRetVal = app_control_set_operation(hAppControl, APP_CONTROL_OPERATION_DEFAULT);
+       if(nRetVal != 0)
+       {
+               FPRINTF("[Line : %d][Application_ITc] app_control_set_operation API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+               app_control_destroy(hAppControl);
+
+               return 1;
+       }
+        nRetVal = app_control_set_app_id(hAppControl, pszPackage);
+        if(nRetVal != 0)
+        {
+                FPRINTF("[Line : %d][Application_ITc] app_control_set_app_id API call gets failed, error returned = %s \\n", __LINE__, Application_AlarmGetError(nRetVal));
+                app_control_destroy(hAppControl);
+                return 1;
+        }
+
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nAlarmID1 = -1;
+               int nAlarmID2 = -1;
+               int nDelay = 60;        //sample 1 min
+               int nPeriod = 0;
+               
+               nRetVal = alarm_schedule_after_delay(hAppControl, nDelay, nPeriod, &nAlarmID1);
+               if( nRetVal != 0 || nAlarmID1 < 0 )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay failed on iteration %d, error returned = %s with alarm id = %d\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal), nAlarmID1);
+                       nAlarm_schedule_after_delay_FailCount++;
+                       continue;
+               }
+
+               nRetVal = alarm_schedule_after_delay(hAppControl, nDelay + 60, nPeriod, &nAlarmID2); //set after 60 sec from first alarm
+               if( nRetVal != 0 || nAlarmID2 < 0 )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay failed on iteration %d, error returned = %s with alarm id = %d\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal), nAlarmID2);
+                       nAlarm_schedule_after_delay_FailCount++;
+                       continue;
+               }
+               
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay returned alarm IDs = %d and %d on iteration %d\\n", __LINE__, nAlarmID1, nAlarmID2, nLoopCount);
+
+               //Target API
+               ApplicationGetMemAllocation();
+
+               ApplicationGetTimeOfDay();
+               nRetVal = alarm_cancel_all();
+               ApplicationExecutionDelay(szAlarm_cancel_all_SpeedLog);
+               
+               ApplicationGetMemStatus(szAlarm_cancel_all_MemLog);
+
+               if( nRetVal != 0 )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_cancel_all failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal));
+                       nAlarm_cancel_all_FailCount++;
+               }
+       }
+
+       app_control_destroy(hAppControl);
+
+       if ( nAlarm_schedule_after_delay_FailCount > 0 || nAlarm_cancel_all_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_schedule_after_delay failed %d times, alarm_cancel_all failed %d times out of %d times\\n", __LINE__, nAlarm_schedule_after_delay_FailCount, nAlarm_cancel_all_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(alarm_cancel_all, szAlarm_cancel_all_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(alarm_cancel_all, szAlarm_cancel_all_MemLog);
+#endif
+               return 0;
+       }
+}
+
+
+//& type: auto
+//& purpose: Get current time.
+/**
+* @testcase                    ITc_application_alarm_get_current_time_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Get current time
+* @scenario                            Get current time\n
+*                                              validate the time
+* @apicovered                  alarm_get_current_time
+* @passcase                            When alarm_get_current_time is successful and and returns correct value.
+* @failcase                            If target API fails or returns incorrect value.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_alarm_get_current_time_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal = 0;
+       char szAlarm_get_current_time_MemLog[MEMLOG * MAX_COUNT];
+       char szAlarm_get_current_time_SpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szAlarm_get_current_time_MemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szAlarm_get_current_time_SpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nAlarm_get_current_time_FailCount = 0;
+       struct timeval stActual;
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               struct tm stdate;
+
+               //Target API
+               ApplicationGetMemAllocation();
+
+               ApplicationGetTimeOfDay();
+               nRetVal = alarm_get_current_time(&stdate);
+               ApplicationExecutionDelay(szAlarm_get_current_time_SpeedLog);
+               
+               ApplicationGetMemStatus(szAlarm_get_current_time_MemLog);
+               gettimeofday(&stActual, NULL);          
+
+               if( nRetVal != 0 )
+               {
+                       FPRINTF("[Line : %d][Application_ITc] alarm_get_current_time failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, Application_AlarmGetError(nRetVal));
+                       nAlarm_get_current_time_FailCount++;
+                       continue;
+               }
+
+               if( (stActual.tv_sec - stdate.tm_sec <= 1) || (stdate.tm_sec - stActual.tv_sec <= 1) )
+               {
+                       continue;
+               }
+
+               FPRINTF("[Line : %d][Application_ITc] alarm_get_current_time value mismatch on iteration %d, actual second val = %d, received second val = %d\\n", __LINE__, nLoopCount, (int)stActual.tv_sec, (int)stdate.tm_sec);
+               nAlarm_get_current_time_FailCount++;
+       }
+
+       if ( nAlarm_get_current_time_FailCount > 0 )
+       {
+               FPRINTF("[Line : %d][Application_ITc] alarm_get_current_time failed %d times out of %d times\\n", __LINE__, nAlarm_get_current_time_FailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(alarm_get_current_time, szAlarm_get_current_time_SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(alarm_get_current_time, szAlarm_get_current_time_MemLog);
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Set and Get Preference Boolean.
+/**
+* @testcase                    ITc_application_preference_SetGetBoolean_p
+* @since_tizen                 2.4
+* @type                                auto
+* @description                 Set Preference Boolean, Get Preference Boolean and then checks the set value should match the get value
+* @scenario                            Set Preference Boolean\n
+*                                              Get Preference Boolean
+* @apicovered                  preference_set_boolean, preference_get_boolean
+* @passcase                            When preference_set_boolean, preference_get_boolean are successful and set value should match the get value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_preference_SetGetBoolean_p(void)
+{
+       START_TEST;
+
+       char *pszKey = "Sample_Key";//sample key-value pair
+       bool bValue = true;
+       bool bGetVal = 0;
+
+       int nRetVal = preference_set_boolean(pszKey, bValue);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_set_boolean", Application_PreferenceGetError(nRetVal));
+
+       nRetVal = preference_get_boolean(pszKey, &bGetVal);
+       preference_remove(pszKey);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_get_boolean", Application_PreferenceGetError(nRetVal));
+
+       //check for value mis-match
+       if ( bValue != bGetVal )
+       {
+               FPRINTF("[Line : %d][Application_ITc] set and get mis-match occurs, set value = %d, get value = %d\\n", __LINE__, bValue, bGetVal);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set and Get Preference Double.
+/**
+* @testcase                    ITc_application_preference_SetGetDouble_p
+* @since_tizen                 2.4
+* @type                                auto
+* @description                 Set Preference Double, Get Preference Double and then checks the set value should match the get value
+* @scenario                            Set Preference Double\n
+*                                              Get Preference Double
+* @apicovered                  preference_set_double, preference_get_double
+* @passcase                            When preference_set_double, preference_get_double are successful and set value should match the get value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_preference_SetGetDouble_p(void)
+{
+       START_TEST;
+
+       char *pszKey = "Sample_Key";//sample key-value pair
+       double dValue = 1911;
+       double dGetVal = 0;
+
+       int nRetVal = preference_set_double(pszKey, dValue);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_set_double", Application_PreferenceGetError(nRetVal));
+
+       nRetVal = preference_get_double(pszKey, &dGetVal);
+       preference_remove(pszKey);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_get_double", Application_PreferenceGetError(nRetVal));
+
+       //check for value mis-match
+       if ( dValue != dGetVal )
+       {
+               FPRINTF("[Line : %d][Application_ITc] set and get mis-match occurs, set value = %d, get value = %d\\n", __LINE__, (int)dValue, (int)dGetVal);
+       }
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set and Get Preference String.
+/**
+* @testcase                    ITc_application_preference_SetGetString_p
+* @type                                auto
+* @since_tizen                 2.4
+* @non-functional-test         Stability, Memory, Speed
+* @description                 Set Preference String, Get Preference String and then checks the set value should match the get value
+* @scenario                            Set Preference String
+*                                              Get Preference String
+* @apicovered                  preference_set_string, preference_get_string
+* @passcase                            When preference_set_string, preference_get_string are successful and set value should match the get value.
+* @failcase                            If target API fails or value mis-match happens.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_preference_SetGetString_p(void)
+{
+       START_TEST;
+
+       char *pszKey = "Sample_Key";//sample key-value pair
+       char *pszValue = "Sample_Value";
+       char* pszGetVal = NULL;
+
+       int nRetVal = preference_set_string(pszKey, pszValue);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_set_string", Application_PreferenceGetError(nRetVal));
+
+       nRetVal = preference_get_string(pszKey, &pszGetVal);
+       preference_remove(pszKey);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_get_string", Application_PreferenceGetError(nRetVal));
+
+       //check for value mis-match
+       if ( 0 != strcmp(pszValue, pszGetVal) )
+       {
+               FPRINTF("[Line : %d][Application_ITc] set and get mis-match occurs, set value = %s, get value = %s\\n", __LINE__, pszValue, pszGetVal);
+               FREE_MEMORY(pszGetVal);
+               return 1;
+       }
+
+       FREE_MEMORY(pszGetVal);
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set Preference Int for a specified key and check if the key is existing and remove it.
+/**
+* @testcase                    ITc_application_preference_Is_Existing_Remove_p
+* @type                                auto
+* @since_tizen                 2.4
+* @non-functional-test         Stability, Memory, Speed
+* @description                 Set Preference Int for a specified key, check if the key is existing and then remove it.
+* @scenario                            Set Preference Int for a specified key
+*                                              check if the key is existing.
+*                                              remove the key.
+* @apicovered                  preference_set_int, preference_is_existing, preference_remove
+* @passcase                            When preference_is_existing, preference_remove are successful and return correct value.
+* @failcase                            If target API fails or return value is incorrect.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_preference_Is_Existing_Remove_p(void)
+{
+       START_TEST;
+
+       char *pszKey = "Sample_Key";//sample key-value pair
+       int nValue = 1911;
+       bool bExisting = false;
+
+       //Target API    
+       int nRetVal = preference_set_int(pszKey, nValue);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_set_int", Application_PreferenceGetError(nRetVal));
+
+       nRetVal = preference_is_existing(pszKey, &bExisting);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_is_existing", Application_PreferenceGetError(nRetVal));
+       if ( true != bExisting )
+       {
+               FPRINTF("[Line : %d][Application_ITc] preference_is_existing failed, error returned = false\\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = preference_remove(pszKey);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_remove", Application_PreferenceGetError(nRetVal));
+
+       nRetVal = preference_is_existing(pszKey, &bExisting);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_is_existing", Application_PreferenceGetError(nRetVal));
+
+       //check for value mis-match
+       if ( bExisting == true )
+       {
+               FPRINTF("[Line : %d][Application_ITc] preference_is_existing returns key existing after preference_remove call\\n", __LINE__);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set Preference Int for some specified keys and then remove it all.
+/**
+* @testcase                    ITc_application_preference_RemoveAll_p
+* @since_tizen                 2.4
+* @type                                auto
+* @description                 Set Preference Int for a specified key and then remove it all.
+* @scenario                            Set Preference Int for some specified keys\n
+*                                              remove all the keys.\n
+*                                              check if any key is existing.
+* @apicovered                  preference_set_int, preference_is_existing, preference_remove_all
+* @passcase                            When preference_remove_all is successful and it properly remove all the keys.
+* @failcase                            If target API fails or didn't receive the key properly.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_preference_RemoveAll_p(void)
+{
+       START_TEST;
+
+       char *pszKey1 = "Sample_Key1";//sample key-value pair
+       char *pszKey2 = "Sample_Key2";//sample key-value pair
+       int nValue1 = 1911;//sample value
+       int nValue2 = 1912;//sample value
+       bool bExisting = true;
+
+       //Target API    
+       int nRetVal = preference_set_int(pszKey1, nValue1);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_set_int", Application_PreferenceGetError(nRetVal));
+
+       nRetVal = preference_set_int(pszKey2, nValue2);
+       PRINT_RESULT_CLEANUP(PREFERENCE_ERROR_NONE, nRetVal, "preference_set_int", Application_PreferenceGetError(nRetVal), preference_remove_all());
+
+       nRetVal = preference_remove_all();  
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_remove_all", Application_PreferenceGetError(nRetVal));
+
+       nRetVal = preference_is_existing(pszKey1, &bExisting);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_is_existing", Application_PreferenceGetError(nRetVal));
+       if ( true == bExisting )
+       {
+               FPRINTF("[Line : %d][Application_ITc] preference_is_existing returns key existing for key value = %s after preference_remove_all call\\n", __LINE__, pszKey1 );
+               return 1;
+       }
+
+       nRetVal = preference_is_existing(pszKey2, &bExisting);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_is_existing", Application_PreferenceGetError(nRetVal));
+       if ( true == bExisting )
+       {
+               FPRINTF("[Line : %d][Application_ITc] preference_is_existing returns key existing for key value = %s after preference_remove_all call\\n", __LINE__, pszKey2);
+               return 1;
+       }
+
+       return 0;
+}
+
+/**
+* @function            application_preference_changed_cb
+* @description         callback function for app preference change
+* @parameter           pszKey : key ,user_data : user data sent to callback
+* @return                      NA
+*/
+void application_preference_changed_cb(const char *pszKey, void *user_data)
+{
+       g_bCallBackHit = true;
+       if(strcmp((char *)user_data,(char *)g_pUserData) != 0)
+       {
+               g_bUserDataMismatch = true;
+       }
+       
+       g_bPreferenceChangedCallback = true;
+       FPRINTF("[Line : %d][Application_ITc] preference_changed_callback invoked, key = %s\\n", __LINE__, pszKey);
+}
+
+//& type: auto
+//& purpose: Set Preference Int for a specified key, set state change callback, update set value, checks the callback for updated value and then unset the callback.
+/**
+* @testcase                    ITc_application_preference_Set_Unset_Changed_Callback_p
+* @since_tizen                 2.4
+* @type                                auto
+* @description                 Set Preference Int for a specified key, set state change callback, update set value, checks the callback for updated value and then unset the callback.
+* @scenario                            Set Preference Int for a specified key\n
+*                                              set state change callback\n
+*                                              update set value\n
+*                                              checks the callback for updated value\n
+*                                              unset state change callback
+* @apicovered                  preference_set_int, preference_set_changed_cb, preference_unset_changed_cb, preference_remove
+* @passcase                            When preference_set_changed_cb, preference_unset_changed_cb are successful and callback is invoked properly for updated set value.
+* @failcase                            If target API fails or callback not invoked properly.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_preference_Set_Unset_Changed_Callback_p(void)
+{
+       START_TEST;
+
+       char *pszKey = "Sample_Key";//sample key-value pair
+       int nValue = 1911;//sample value
+       int nTimeoutId = 0;
+       int nNewValue = 1093; //any sample new value different from original
+       int nRetVal = preference_set_int(pszKey, nValue);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_set_int", Application_PreferenceGetError(nRetVal));
+
+       g_bPreferenceChangedCallback = false;
+
+       nRetVal = preference_set_changed_cb( pszKey, application_preference_changed_cb, g_pUserData);
+       PRINT_RESULT_CLEANUP(PREFERENCE_ERROR_NONE, nRetVal, "preference_set_changed_cb", Application_PreferenceGetError(nRetVal), preference_remove(pszKey));
+
+       nRetVal = preference_set_int(pszKey, nNewValue);
+       PRINT_RESULT_CLEANUP(PREFERENCE_ERROR_NONE, nRetVal, "preference_set_int", Application_PreferenceGetError(nRetVal), preference_unset_changed_cb(pszKey);preference_remove(pszKey));
+
+       int nTimer = 0;
+       for ( ; nTimer<WAIT_CALLBACK; ++nTimer )
+       {
+               if (true == g_bPreferenceChangedCallback)
+               {
+                       break;
+               }
+               RUN_POLLING_LOOP;
+       }
+
+       if ( nTimer >= WAIT_CALLBACK )
+       {
+               FPRINTF("[Line : %d][Application_ITc] preference_changed_cb callback not hit\\n", __LINE__);
+               preference_unset_changed_cb(pszKey);
+               preference_remove(pszKey);
+               return 1;
+       }
+       if(g_bCallBackHit && g_bUserDataMismatch)
+       {
+               FPRINTF("[Line : %d][Application_ITc] User data in callback is not same which is passed through caller function.\\n", __LINE__);
+               preference_unset_changed_cb(pszKey);            
+               preference_remove(pszKey);
+               return 1;
+       }
+       
+       nRetVal = preference_unset_changed_cb(pszKey);
+       PRINT_RESULT_CLEANUP(PREFERENCE_ERROR_NONE, nRetVal, "preference_unset_changed_cb", Application_PreferenceGetError(nRetVal), preference_remove(pszKey));
+       preference_remove(pszKey);
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set Preference Int for a specified key, set item callback, checks the callback for item value.
+/**
+* @testcase                    ITc_application_preference_Foreach_Item_Callback_p
+* @since_tizen                 2.4
+* @type                                auto
+* @description                 Set Preference Int for a specified key, set item callback, checks the callback for item value.
+* @scenario                            Set Preference Int for a specified key\n
+*                                              set item callback\n
+*                                              checks the callback for item value
+* @apicovered                  preference_set_int, preference_foreach_item, preference_remove
+* @passcase                            When preference_foreach_item is successful and callback is invoked properly for set value.
+* @failcase                            If target API fails or callback not invoked properly.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_application_preference_Foreach_Item_Callback_p(void)
+{
+       START_TEST;
+
+       char *pszKey = "Sample_Key";//sample key-value pair
+       int nValue = 1911;//sample value
+
+       int nRetVal = preference_set_int(pszKey, nValue);
+       PRINT_RESULT(PREFERENCE_ERROR_NONE, nRetVal, "preference_set_int", Application_PreferenceGetError(nRetVal));
+
+       g_bPreferenceItemCallback = false;
+
+       nRetVal = preference_foreach_item(application_preference_item_cb, NULL);
+       PRINT_RESULT_CLEANUP(PREFERENCE_ERROR_NONE, nRetVal, "preference_foreach_item", Application_PreferenceGetError(nRetVal), preference_remove(pszKey));
+
+       int nTimer = 0;
+       for ( ; nTimer<WAIT_CALLBACK; ++nTimer )
+       {
+               if ( true == g_bPreferenceItemCallback )
+               {
+                       break;
+               }
+               usleep(2000);
+       }
+
+       if ( nTimer >= WAIT_CALLBACK )
+       {
+               FPRINTF("[Line : %d][Application_ITc] preference_item_cb callback not hit\\n", __LINE__);
+               preference_remove(pszKey);
+               return 1;
+       }
+
+       preference_remove(pszKey);
+
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/application/org.tizen.testapplication-1.0.0-arm.tpk b/src/itc/application/org.tizen.testapplication-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..3e05d26
Binary files /dev/null and b/src/itc/application/org.tizen.testapplication-1.0.0-arm.tpk differ
diff --git a/src/itc/application/org.tizen.testapplication-1.0.0-i386.tpk b/src/itc/application/org.tizen.testapplication-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..8d2bd7f
Binary files /dev/null and b/src/itc/application/org.tizen.testapplication-1.0.0-i386.tpk differ
diff --git a/src/itc/application/tct-application-native.c b/src/itc/application/tct-application-native.c
new file mode 100755 (executable)
index 0000000..cb60460
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-application-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/application/tct-application-native.h b/src/itc/application/tct-application-native.h
new file mode 100755 (executable)
index 0000000..c18a24e
--- /dev/null
@@ -0,0 +1,123 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_APPLICATION_NATIVE_H__
+#define __TCT_APPLICATION_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_application_startup(void);
+extern void ITs_application_cleanup(void);
+
+extern int ITc_application_ui_app_add_remove_event_handler_p(void);
+extern int ITc_application_app_get_cache_path_p(void);
+extern int ITc_application_app_get_data_path_p(void);
+extern int ITc_application_app_get_external_data_path_p(void);
+extern int ITc_application_app_get_external_cache_path_p(void);
+extern int ITc_application_app_get_external_shared_data_path_p(void);
+extern int ITc_application_app_get_resource_path_p(void);
+extern int ITc_application_app_get_shared_data_path_p(void);
+extern int ITc_application_app_get_shared_resource_path_p(void);
+extern int ITc_application_app_get_shared_trusted_path_p(void);
+extern int ITc_application_app_get_id_p(void);
+extern int ITc_application_app_get_version_p(void);
+extern int ITc_application_app_get_name_p(void);
+extern int ITc_application_app_get_device_orientation_p(void);
+extern int ITc_application_app_control_create_destroy_p(void);
+extern int ITc_application_app_control_set_get_operation_p(void);
+extern int ITc_application_app_control_SetGetAppID_p(void);
+extern int ITc_application_app_control_SetGetUri_p(void);
+extern int ITc_application_app_control_SetGetMime_p(void);
+extern int ITc_application_app_control_SetGetCategory_p(void);
+extern int ITc_application_app_control_Add_Get_ExtraData_p(void);
+extern int ITc_application_app_control_Add_Get_ExtraDataArray_p(void);
+extern int ITc_application_app_control_Is_ExtraDataArray_p(void);
+extern int ITc_application_app_control_Clone_p(void);
+extern int ITc_application_app_control_Remove_ExtraData_p(void);
+extern int ITc_application_app_control_Send_Launch_Terminate_Request_p(void);
+extern int ITc_application_app_control_For_Each_App_Matched_p(void);
+extern int ITc_application_app_control_For_Each_Extra_Data_p(void);
+extern int ITc_application_internationalization_i18n_get_text_p(void);
+extern int ITc_application_alarm_schedule_after_delay_p(void);
+extern int ITc_application_alarm_schedule_at_date_p(void);
+extern int ITc_application_alarm_schedule_with_recurrence_week_flag_p(void);
+extern int ITc_application_alarm_foreach_registered_alarm_p(void);
+extern int ITc_application_alarm_get_app_control_p(void);
+extern int ITc_application_alarm_get_scheduled_period_p(void);
+extern int ITc_application_alarm_get_scheduled_date_p(void);
+extern int ITc_application_alarm_get_scheduled_recurrence_week_flag_p(void);
+extern int ITc_application_alarm_cancel_p(void);
+extern int ITc_application_alarm_cancel_all_p(void);
+extern int ITc_application_alarm_get_current_time_p(void);
+extern int ITc_application_preference_SetGetBoolean_p(void);
+extern int ITc_application_preference_SetGetDouble_p(void);
+extern int ITc_application_preference_SetGetString_p(void);
+extern int ITc_application_preference_Is_Existing_Remove_p(void);
+extern int ITc_application_preference_RemoveAll_p(void);
+extern int ITc_application_preference_Set_Unset_Changed_Callback_p(void);
+extern int ITc_application_preference_Foreach_Item_Callback_p(void);
+
+testcase tc_array[] = {
+    {"ITc_application_ui_app_add_remove_event_handler_p", ITc_application_ui_app_add_remove_event_handler_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_cache_path_p", ITc_application_app_get_cache_path_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_data_path_p", ITc_application_app_get_data_path_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_external_data_path_p", ITc_application_app_get_external_data_path_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_external_cache_path_p", ITc_application_app_get_external_cache_path_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_external_shared_data_path_p", ITc_application_app_get_external_shared_data_path_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_resource_path_p", ITc_application_app_get_resource_path_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_shared_data_path_p", ITc_application_app_get_shared_data_path_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_shared_resource_path_p", ITc_application_app_get_shared_resource_path_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_shared_trusted_path_p", ITc_application_app_get_shared_trusted_path_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_id_p", ITc_application_app_get_id_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_version_p", ITc_application_app_get_version_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_name_p", ITc_application_app_get_name_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_get_device_orientation_p", ITc_application_app_get_device_orientation_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_create_destroy_p", ITc_application_app_control_create_destroy_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_set_get_operation_p", ITc_application_app_control_set_get_operation_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_SetGetAppID_p", ITc_application_app_control_SetGetAppID_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_SetGetUri_p", ITc_application_app_control_SetGetUri_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_SetGetMime_p", ITc_application_app_control_SetGetMime_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_SetGetCategory_p", ITc_application_app_control_SetGetCategory_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_Add_Get_ExtraData_p", ITc_application_app_control_Add_Get_ExtraData_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_Add_Get_ExtraDataArray_p", ITc_application_app_control_Add_Get_ExtraDataArray_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_Is_ExtraDataArray_p", ITc_application_app_control_Is_ExtraDataArray_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_Clone_p", ITc_application_app_control_Clone_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_Remove_ExtraData_p", ITc_application_app_control_Remove_ExtraData_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_Send_Launch_Terminate_Request_p", ITc_application_app_control_Send_Launch_Terminate_Request_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_For_Each_App_Matched_p", ITc_application_app_control_For_Each_App_Matched_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_app_control_For_Each_Extra_Data_p", ITc_application_app_control_For_Each_Extra_Data_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_internationalization_i18n_get_text_p", ITc_application_internationalization_i18n_get_text_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_alarm_schedule_after_delay_p", ITc_application_alarm_schedule_after_delay_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_alarm_schedule_at_date_p", ITc_application_alarm_schedule_at_date_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_alarm_schedule_with_recurrence_week_flag_p", ITc_application_alarm_schedule_with_recurrence_week_flag_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_alarm_foreach_registered_alarm_p", ITc_application_alarm_foreach_registered_alarm_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_alarm_get_app_control_p", ITc_application_alarm_get_app_control_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_alarm_get_scheduled_period_p", ITc_application_alarm_get_scheduled_period_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_alarm_get_scheduled_date_p", ITc_application_alarm_get_scheduled_date_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_alarm_get_scheduled_recurrence_week_flag_p", ITc_application_alarm_get_scheduled_recurrence_week_flag_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_alarm_cancel_p", ITc_application_alarm_cancel_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_alarm_cancel_all_p", ITc_application_alarm_cancel_all_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_alarm_get_current_time_p", ITc_application_alarm_get_current_time_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_preference_SetGetBoolean_p", ITc_application_preference_SetGetBoolean_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_preference_SetGetDouble_p", ITc_application_preference_SetGetDouble_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_preference_SetGetString_p", ITc_application_preference_SetGetString_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_preference_Is_Existing_Remove_p", ITc_application_preference_Is_Existing_Remove_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_preference_RemoveAll_p", ITc_application_preference_RemoveAll_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_preference_Set_Unset_Changed_Callback_p", ITc_application_preference_Set_Unset_Changed_Callback_p, ITs_application_startup, ITs_application_cleanup},
+    {"ITc_application_preference_Foreach_Item_Callback_p", ITc_application_preference_Foreach_Item_Callback_p, ITs_application_startup, ITs_application_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_APPLICATION_NATIVE_H__
diff --git a/src/itc/audio-io/CMakeLists.txt b/src/itc/audio-io/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..755eb30
--- /dev/null
@@ -0,0 +1,40 @@
+SET(PKG_NAME "audio-io")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-audio-io")
+SET(TC_SOURCES
+       ITs-audio-input.c
+       ITs-audio-input-common.c
+       ITs-audio-input_create_destroy.c
+       ITs-audio-output_create_destroy.c
+       ITs-audio-output.c
+       ITs-audio-output-common.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       bundle
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/audio-io/ITs-audio-input-common.c b/src/itc/audio-io/ITs-audio-input-common.c
new file mode 100755 (executable)
index 0000000..226b34b
--- /dev/null
@@ -0,0 +1,258 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-audio-input-common.h"
+
+/** @addtogroup itc-audio-input
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stAudioStartTime;
+extern struct mallinfo g_stAudioMemInfo;
+
+/**
+* @function            AudioInputGetError
+* @description         Maps error enums to string values
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* AudioInputGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case AUDIO_IO_ERROR_INVALID_PARAMETER:           szErrorVal = "AUDIO_IO_ERROR_INVALID_PARAMETER";               break;
+       case AUDIO_IO_ERROR_OUT_OF_MEMORY:                       szErrorVal = "AUDIO_IO_ERROR_OUT_OF_MEMORY";                   break;
+       case AUDIO_IO_ERROR_DEVICE_NOT_OPENED:           szErrorVal = "AUDIO_IO_ERROR_DEVICE_NOT_OPENED";               break;
+       case AUDIO_IO_ERROR_INVALID_OPERATION:           szErrorVal = "AUDIO_IO_ERROR_INVALID_OPERATION";               break;
+       case AUDIO_IO_ERROR_DEVICE_NOT_CLOSED:           szErrorVal = "AUDIO_IO_ERROR_DEVICE_NOT_CLOSED";               break;
+       case AUDIO_IO_ERROR_INVALID_BUFFER:              szErrorVal = "AUDIO_IO_ERROR_INVALID_BUFFER";                  break;
+       case AUDIO_IO_ERROR_SOUND_POLICY:                        szErrorVal = "AUDIO_IO_ERROR_SOUND_POLICY";                    break;
+       case AUDIO_IO_ERROR_NONE:                                        szErrorVal = "AUDIO_IO_ERROR_NONE";                                    break;
+       default:                                                                         szErrorVal = "Unknown Error";                                                  break;
+       }
+       return szErrorVal;
+}
+/**
+ * @function           AudioInput_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool AudioInput_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if(NULL == pszKey)
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] Null key value passed to function : AudioInput_Check_System_Info_Feature_Supported\\n",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n",__LINE__, AudioInput_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if(false == bValue)
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)\\n",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] system_info_get_platform_bool returned Supported status feature for (key = %s)\\n",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           AudioInput_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* AudioInput_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Cannot find key in model config file " ; break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR  : szErrorVal = "Error - An input/output error occurred when read value from model config file " ; break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY   : szErrorVal = "Error - Out of memory  " ; break;
+                       
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+/**
+* @function            AudioChannel
+* @description         Maps error enums 
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* AudioChannel(audio_channel_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case AUDIO_CHANNEL_STEREO:              szErrorVal = "AUDIO_CHANNEL_STEREO";    break;
+       case AUDIO_CHANNEL_MONO:                szErrorVal = "AUDIO_CHANNEL_MONO";              break;
+       default:                                                szErrorVal = "Unknown Error";                   break;
+       }
+       return szErrorVal;
+}
+/**
+* @function            AudioSampleRate
+* @description         Maps error enums 
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* AudioSampleRate(audio_sample_type_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case AUDIO_SAMPLE_TYPE_U8:                      szErrorVal = "AUDIO_SAMPLE_TYPE_U8";            break;
+       case AUDIO_SAMPLE_TYPE_S16_LE:          szErrorVal = "AUDIO_SAMPLE_TYPE_S16_LE";        break;
+       default:                                                        szErrorVal = "Unknown Error";                           break;
+       }
+       return szErrorVal;
+}
+/**
+* @function                    AudioInputGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void AudioInputGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stAudioMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stAudioMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stAudioMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf( pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    AudioInputGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void AudioInputGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stAudioMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           AudioInputExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void AudioInputExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK        
+       if (pszAPITime != NULL)
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stAudioStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stAudioStartTime.tv_usec;
+                       
+               sprintf( pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }               
+#endif
+}
+/**
+ * @function           AudioInputFreeMemory
+ * @description                Function to free the memory allocated
+ * @parameter          pszMem1, pszMem2, pszMem3 [ pointers to allocated memory]
+ * @return                     NA
+ *
+ */ 
+void AudioInputFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+
+}
+
+/**
+ * @function           AudioInputGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stAudioStartTime
+ * @parameter          NA
+ * @return                 NA
+ *
+ */ 
+void AudioInputGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stAudioStartTime, NULL);
+#endif
+}
+/** @} */
+//Add helper function definitions here
\ No newline at end of file
diff --git a/src/itc/audio-io/ITs-audio-input-common.h b/src/itc/audio-io/ITs-audio-input-common.h
new file mode 100755 (executable)
index 0000000..4fc29ce
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_AUDIO_INPUT_COMMON_H_
+#define _ITS_AUDIO_INPUT_COMMON_H_
+
+#include "assert.h"
+#include <media/audio_io.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <system_info.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib-object.h>
+#include <glib-2.0/glib.h>
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+/** @addtogroup itc-audio-input
+*  @ingroup itc
+*  @{
+*/
+
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define SAMPLERATE                                     44100
+#define SAMPLE_RATE                 44000
+#define TRANSCODE_FEATURE                      "http://tizen.org/feature/microphone"
+FILE *g_fpLog;
+bool g_bFeatureNotSupported;
+bool g_bFeatureMismatched;
+bool g_bAudioInputIsSupported;
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][audio-io-input_ITC] Starting test : %s\\n",__LINE__,__FUNCTION__);\
+    if ( g_bFeatureNotSupported )\
+       {\
+               FPRINTF("[Line : %d][audio-io-input_ITC] [ NOT SUPPORTED ]  Required feature of Audio input is not supported. So leaving test\\n", __LINE__);\
+               return 0;\
+       }\
+       if ( g_bFeatureMismatched )\
+       {\
+               FPRINTF("[Line : %d][audio-io-input_ITC] Required feature of Audio io do mismatch. So leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+       if ( !g_bAudioCreation )\
+       {\
+               FPRINTF("[Line : %d][audio-io-input_ITC]\nPrecondition of audio create failed so leaving test\\n",__LINE__);\
+               return 1;\
+       }\
+}
+
+#define CHECK_UNSUPPORTED_ERROR_CONTINUE(szApi, nErrorCount)\
+       if ( !g_bAudioInputIsSupported )\
+       {\
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )\
+               {\
+                       FPRINTF("[Line : %d][audio-io-input_ITC] %s returned %s error for unsupported feature \\n", __LINE__, szApi, AudioInputGetError(nRet));\
+                       nErrorCount++;\
+               }\
+               else\
+               {\
+                       FPRINTF("[Line : %d][audio-io-input_ITC] %s is not supported \\n", __LINE__, szApi);\
+               }\
+               continue;\
+       }\
+       
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF("[Line : %d][audio-io-input_ITC]%s passed\\n",__LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][audio-io-input_ITC]%s failed, error returned = %s \\n",__LINE__, API, AudioInputGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d][audio-io-input_ITC]%s_MemoryLeakStatus - %s\\n",__LINE__, #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d][audio-io-input_ITC]%s_TimeInMicrosec- %s\\n",__LINE__, #api, speedLog);\
+       }
+
+char *AudioChannel(audio_channel_e nRet);      
+char *AudioSampleRate(audio_sample_type_e nRet);       
+char *AudioInputGetError(int nRet);
+void AudioInputGetMemAllocation();
+void AudioInputExecutionDelay(char* pszAPITime);
+void AudioInputGetTimeOfDay();
+void AudioInputGetMemStatus(char *pszAPIMemory);
+void AudioInputFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3);
+bool AudioInput_Check_System_Info_Feature_Supported(char* pszKey);
+char* AudioInput_System_Info_GetError(int nRet);
+
+/** @} */
+#endif  //_ITS_AUDIO_INPUT_COMMON_H_
diff --git a/src/itc/audio-io/ITs-audio-input.c b/src/itc/audio-io/ITs-audio-input.c
new file mode 100755 (executable)
index 0000000..755ec79
--- /dev/null
@@ -0,0 +1,985 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-audio-input-common.h"
+
+/** @addtogroup itc-audio-input
+*  @ingroup itc
+*  @{
+*/
+
+//& set: AudioInput
+
+audio_in_h g_pstAudioInputHandle;
+bool g_bAudioCreation;
+struct timeval g_stAudioStartTime;
+struct mallinfo g_stAudioMemInfo;
+static bool g_bAudioIoStreamCallback = false;
+int g_nPeekFailCount = 0;
+int g_nDropFailCount = 0;
+static GMainLoop *g_pMainLoop;
+
+gboolean Timeout_Function(gpointer data)
+{
+       g_main_loop_quit((GMainLoop *)data);
+       return false;
+}
+
+/**
+* @function            ITs_audio_input_startup
+* @description         Called before each test, creates Audio handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_audio_input_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bFeatureNotSupported = false;
+       g_bFeatureMismatched = false;
+       
+       int nRet;
+       g_bAudioCreation = false;
+       audio_channel_e eAudioChannel = AUDIO_CHANNEL_STEREO;
+       audio_sample_type_e eAudioSampleRate = AUDIO_SAMPLE_TYPE_S16_LE;
+       nRet = audio_in_create(SAMPLERATE, eAudioChannel ,eAudioSampleRate, &g_pstAudioInputHandle);
+       if ( !AudioInput_Check_System_Info_Feature_Supported(TRANSCODE_FEATURE) )
+       {
+               if( nRet == TIZEN_ERROR_NOT_SUPPORTED)
+               {
+                       g_bFeatureNotSupported = true;
+                       return;
+               }
+               
+               g_bFeatureMismatched = true;
+               return;
+       }
+       
+       if (nRet == AUDIO_IO_ERROR_NONE) 
+       {
+           nRet = audio_in_ignore_session(g_pstAudioInputHandle);
+               if ( !AudioInput_Check_System_Info_Feature_Supported(TRANSCODE_FEATURE) )
+               {
+                       if( nRet == TIZEN_ERROR_NOT_SUPPORTED)
+                       {
+                               g_bFeatureNotSupported = true;
+                               return;
+                       }
+                       
+                       g_bFeatureMismatched = true;
+                       return;
+               }
+                       if ( nRet != AUDIO_IO_ERROR_NONE )
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_ignore_session creation failed\\n", __LINE__);
+#endif
+                               g_bAudioCreation = false;
+                       }
+                       else
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_ignore_session created  successfully\\n", __LINE__);
+#endif
+                               g_bAudioCreation = true;
+                       }
+       }
+       else
+       {
+#if DEBUG
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_create creation failed, error returned = %s\\n", __LINE__, AudioInputGetError(nRet));
+#endif
+         
+       }
+       return;
+}
+
+/**
+* @function            ITs_audio_input_cleanup
+* @description         Called after each test, destroys Audio handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_audio_input_cleanup(void)
+{
+       if ( g_bAudioCreation )
+       {
+               int nRet = audio_in_destroy (g_pstAudioInputHandle);
+               if ( nRet != AUDIO_IO_ERROR_NONE )
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_destroy failed, error returned = %s\\n", __LINE__, AudioInputGetError(nRet));
+#endif
+               }
+       }
+       return;
+}
+
+/**
+* @function                    AudioIoStreamCallback
+* @description         Called when audio handle stream is created.
+* @parameter[IN]       The audio handle
+* @parameter[IN]       Size in bytes
+* @parameter[IN]       The user data passed from the callback registration function                    
+* @return                      NA
+*/
+void AudioIoStreamCallback(audio_in_h g_pstAudioInputHandle, size_t nBytes, void *userdata)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][audio-io-input_ITC] AudioIoStreamCallback is called\\n", __LINE__);
+#endif
+       g_bAudioIoStreamCallback = true;
+}
+
+/**
+* @function                    AudioIoStreamCallbackPeekDrop
+* @description         Called when audio handle stream is registered and audio is prepared.
+* @parameter[IN]       The audio handle
+* @parameter[IN]       Size in bytes
+* @parameter[IN]       The user data passed from the callback registration function                    
+* @return                      NA
+*/
+void AudioIoStreamCallbackPeekDrop(audio_in_h g_pstAudioInputHandle, size_t nBytes, void *userdata)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][audio-io-input_ITC] AudioIoStreamCallback is called\\n", __LINE__);
+#endif
+       g_bAudioIoStreamCallback = true;
+       const void *pszBuffer = NULL;
+       unsigned int punLength = 0 ;
+       int nRet = -1;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       
+       AudioInputGetMemAllocation();           
+       AudioInputGetTimeOfDay();
+       nRet = audio_in_peek(g_pstAudioInputHandle, &pszBuffer, &punLength);
+       AudioInputExecutionDelay(pszAPI1SpeedLog);
+       if ( nRet != 0 )
+       {
+               g_nPeekFailCount++;
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_peek failed, error returned = %s\\n", __LINE__, AudioInputGetError(nRet));
+       }
+       if ( pszBuffer == NULL )
+       {
+               g_nPeekFailCount++;
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_peek failed,as pszBuffer is NULL\\n", __LINE__);
+       }
+       
+       AudioInputGetTimeOfDay();
+       nRet = audio_in_drop(g_pstAudioInputHandle);
+       AudioInputExecutionDelay(pszAPI2SpeedLog);
+       if ( nRet != 0 )
+       {
+               g_nDropFailCount++;
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_drop failed, error returned = %s\\n", __LINE__, AudioInputGetError(nRet));
+       }
+       AudioInputGetMemStatus(pszMemLog);
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_peek , pszAPI1SpeedLog);       
+       PRINT_SPEED_LOG(audio_in_drop , pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_peek_drop , pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+       
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+
+/** @addtogroup itc-audio-input-testcases
+*  @brief              Integration testcases for module audio-input
+*  @ingroup    itc-audio-input
+*  @{
+*/
+
+//& purpose: Prepare reading audio input by starting buffering the audio data and Unprepare by stopping that .
+//& type: auto
+/**
+* @testcase                            ITc_audio_in_prepare_unprepare_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Prepare reading audio input by starting buffering the audio data and unprepare by stopping that .
+* @scenario                                    Start buffering of audio data\n
+*                                                      Read audio input\n
+*                                                      Stop buffering of audio data
+* @apicovered                          audio_in_prepare, audio_in_unprepare
+* @passcase                                    When audio_in_prepare and audio_in_unprepare are successful
+* @failcase                                    If target API audio_in_create fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_in_prepare_unprepare_p(void)
+{
+    START_TEST;
+       int nRet;
+       int nPrepareFailCount = 0, nUnPrepareFailCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nLoopCount; 
+       
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               //Target API
+               AudioInputGetMemAllocation();           
+               AudioInputGetTimeOfDay();
+               nRet = audio_in_prepare(g_pstAudioInputHandle);
+               AudioInputExecutionDelay(pszAPI1SpeedLog);
+               
+               if ( nRet != 0 )
+               {
+                       nPrepareFailCount++;
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_prepare failed, error returned = %s\\n", __LINE__, AudioInputGetError(nRet));
+                       continue;
+               }
+               
+               AudioInputGetTimeOfDay();
+               nRet = audio_in_unprepare(g_pstAudioInputHandle);
+               AudioInputExecutionDelay(pszAPI2SpeedLog);
+               
+               if ( nRet != 0 )
+               {
+                       nUnPrepareFailCount++;
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_unprepare failed, error returned = %s\\n", __LINE__, AudioInputGetError(nRet));
+                       nUnPrepareFailCount++;
+               }
+               AudioInputGetMemStatus(pszMemLog);
+       }
+       
+       if ( nPrepareFailCount > 0 || nUnPrepareFailCount > 0)
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_prepare failed %d times and audio_in_unprepare failed %d times out of %d times\\n", __LINE__, nPrepareFailCount, nUnPrepareFailCount, MAX_COUNT);
+               AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_prepare , pszAPI1SpeedLog);    
+       PRINT_SPEED_LOG(audio_in_unprepare , pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_prepare_unprepare , pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+       return 0;
+}
+
+//& purpose: To get the size to be allocated for audio input buffer
+//& type: auto
+/**
+* @testcase                            ITc_audio_in_get_buffer_size_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To get the size to be allocated for audio input buffer
+* @scenario                                    Get the size of buffer\n
+*                                                      Allocate it to audio input buffer
+* @apicovered                          audio_in_get_buffer_size
+* @passcase                                    When audio_in_get_buffer_size is successful
+* @failcase                                    If target API audio_in_get_buffer_size fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_in_get_buffer_size_p(void)
+{
+       START_TEST;
+       
+    int nSize ;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               AudioInputGetMemAllocation();
+               AudioInputGetTimeOfDay();
+               nRetVal = audio_in_get_buffer_size( g_pstAudioInputHandle, &nSize);
+               AudioInputExecutionDelay(pszAPI1SpeedLog);
+               AudioInputGetMemStatus(pszMemLog);
+               
+               if(nRetVal != 0 )
+               { 
+                   nSize = 50000;
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_get_buffer_size is unsuccessful on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioInputGetError(nRetVal));
+                       nFailCount ++;
+               }
+               else if (nSize == -1)
+               {
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_get_buffer_size is successful\\n", __LINE__);
+#endif
+               }               
+       }
+       
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_get_buffer_size failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_get_buffer_size , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_get_buffer_size , pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+       return 0;
+}
+
+//& purpose: To read audio data from the audio input buffer
+//& type: auto
+/**
+* @testcase                            ITc_audio_in_read_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To read audio data from the audio input buffer
+* @scenario                                    Prepare reading input audio\n
+*                                                      Read audio data from buffer\n
+*                                                      Unprepare reading of input audio
+* @apicovered                          audio_in_read, audio_in_prepare, audio_in_get_buffer_size, audio_in_unprepare
+* @passcase                                    When audio_in_read is successful
+* @failcase                                    If target API audio_in_read fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_in_read_p(void)
+{
+    START_TEST;
+       
+       int nFailCount = 0;
+       int nRetVal = -1, nLoopCount = 0;
+    unsigned int unSize = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszbuffer = NULL;
+       //Preconditions
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               pszbuffer = (char *) malloc (unSize * sizeof(char));
+               AudioInputGetMemAllocation();           
+               AudioInputGetTimeOfDay();
+               nRetVal = audio_in_read( g_pstAudioInputHandle,(void*)pszbuffer, unSize);
+               AudioInputExecutionDelay(pszAPI1SpeedLog);
+               AudioInputGetMemStatus(pszMemLog);
+               
+               if ( nRetVal < 0 )
+               { 
+                       FILE* fp = fopen ("/root/test.raw", "wb+");
+                       if ( fp == NULL )
+                       {
+                               printf("Insufficient memory Avaialble\n");
+                               return 1;
+                       }
+                       fwrite (pszbuffer, unSize, sizeof(char), fp);
+                       fclose (fp);
+                       FPRINTF("[Line : %d][audio-io-input_ITC]FAIL, size=%d, nRetVal=%d\\n", __LINE__, unSize, nRetVal);
+                       nFailCount ++;
+               }
+               else 
+               {
+                       FPRINTF("[Line : %d][audio-io-input_ITC]PASS, size=%d, nRetVal=%d\\n", __LINE__, unSize, nRetVal);
+               }
+               free(pszbuffer);
+               pszbuffer = NULL;               
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_read failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_read , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_read , pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+       return 0;
+}
+
+//& purpose: To get the channel type of audio input data stream
+//& type: auto
+/**
+* @testcase                            ITc_audio_in_get_channel_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To get the channel type of audio input data stream.
+* @scenario                                    Get channel type\n
+*                                                      Check whether its mono or stereo
+* @apicovered                          audio_in_get_channel
+* @passcase                                    When audio_in_get_channel is successful
+* @failcase                                    If target API audio_in_get_channel, fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_in_get_channel_p(void)
+{
+       START_TEST;
+       
+       audio_channel_e  eAudioChannel ;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+               
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               AudioInputGetMemAllocation();
+               AudioInputGetTimeOfDay();
+               nRetVal = audio_in_get_channel(g_pstAudioInputHandle,&eAudioChannel);
+               AudioInputExecutionDelay(pszAPI1SpeedLog);
+               AudioInputGetMemStatus(pszMemLog);
+               
+               if(nRetVal != 0 && eAudioChannel == AUDIO_CHANNEL_MONO )
+               {
+                       FPRINTF("[audio-input_ITC] audio_in_get_channel is unsuccessful on iteration = %d , error returned =  %s", nLoopCount, AudioInputGetError(nRetVal));
+                       nFailCount ++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_get_channel is successful\\n", __LINE__);
+#endif
+               }       
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_get_channel failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_get_channel , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_get_channel , pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+       return 0;
+}
+
+//& purpose: To get the sample audio format of audio input data stream.
+//& type: auto
+/**
+* @testcase                            ITc_audio_in_get_sample_type_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To get the channel type of audio input data stream.
+* @scenario                                    Get input data stream\n
+*                                                      Get the sample audio format
+* @apicovered                          audio_in_get_sample_type
+* @passcase                                    When audio_in_get_sample_type is successful
+* @failcase                                    If target API audio_in_get_sample_type fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_in_get_sample_type_p(void)
+{
+       START_TEST;
+       
+       audio_sample_type_e eAudioSampleRate;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               AudioInputGetMemAllocation();
+               AudioInputGetTimeOfDay();
+               nRetVal = audio_in_get_sample_type(g_pstAudioInputHandle,&eAudioSampleRate);
+               AudioInputExecutionDelay(pszAPI1SpeedLog);
+               AudioInputGetMemStatus(pszMemLog);
+               
+               if(nRetVal != 0 && eAudioSampleRate == AUDIO_SAMPLE_TYPE_S16_LE)
+               { 
+               
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_get_sample_type is unsuccessful on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioInputGetError(nRetVal));
+                       nFailCount ++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_get_sample_type is successful\\n", __LINE__);
+#endif
+               }               
+       }
+       
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_get_sample_type failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_get_sample_type , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_get_sample_type , pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+       return 0;
+}
+
+//& purpose: To get the sample rate of audio input data stream.
+//& type: auto
+/**
+* @testcase                            ITc_audio_in_get_sample_rate_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To get the channel type of audio input data stream.
+* @scenario                                    gets input data stream \n
+*                                                      gets the sample rate
+* @apicovered                          audio_in_get_sample_rate
+* @passcase                                    When audio_in_get_sample_rate is successful
+* @failcase                                    If target API audio_in_get_sample_rate fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_in_get_sample_rate_p(void)
+{
+       START_TEST;
+
+       int  nSample_rate;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               AudioInputGetMemAllocation();
+               AudioInputGetTimeOfDay();
+               nRetVal = audio_in_get_sample_rate(g_pstAudioInputHandle,&nSample_rate);
+               AudioInputExecutionDelay(pszAPI1SpeedLog);
+               AudioInputGetMemStatus(pszMemLog);
+               
+               if(nRetVal != 0 )
+               { 
+               
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_get_sample_rate is unsuccessful on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioInputGetError(nRetVal));
+                       nFailCount ++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_get_sample_rate is successful\\n", __LINE__);
+#endif
+               }       
+       }       
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_get_sample_rate failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_get_sample_rate , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_get_sample_rate , pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+       return 0;
+}
+
+//& purpose: To ignore the session for input.
+//& type: auto
+/**
+* @testcase                            ITc_audio_in_ignore_session_p
+* @since_tizen                         2.4
+* @type                                        auto
+* @description                         To ignore the session for input.
+* @scenario                                    -gets the handle to the audio input \n
+                            -prepares reading audio input \n
+* @apicovered                          audio_in_ignore_session                         
+* @passcase                                    When audio_in_ignore_session  is successful.
+* @failcase                                    If target api audio_in_ignore_session fails or any precondition api fails.
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+* 
+*/
+int ITc_audio_in_ignore_session_p(void)
+{
+       START_TEST;
+
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               AudioInputGetMemAllocation();
+               AudioInputGetTimeOfDay();
+               nRetVal = audio_in_ignore_session(g_pstAudioInputHandle);
+               AudioInputExecutionDelay(pszAPI1SpeedLog);
+               AudioInputGetMemStatus(pszMemLog);
+               
+               if(nRetVal != 0 )
+               { 
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_ignore_session is unsuccessful on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioInputGetError(nRetVal));
+                       nFailCount ++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_ignore_session is successful\\n", __LINE__);
+#endif
+               }       
+       }
+       
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_ignore_session failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_ignore_session , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_ignore_session , pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+       return 0;
+}
+#if EXECUTE_MANUAL
+
+//& purpose: Registers a callback function to be invoked when the audio input handle is interrupted or the interrupt is completed.
+//& type: auto
+/**
+* @testcase                            ITc_audio_in_set_unset_interrupted_cb_p
+* @since_tizen                         2.4
+* @type                                        auto
+* @description                         Registers a callback function to be invoked when the audio input handle is interrupted or the interrupt is completed.
+* @scenario                                    Registers a callback function \n
+                            UnRegisters a callback function 
+* @apicovered                          audio_in_set_interrupted_cb, audio_in_unset_interrupted_cb                              
+* @passcase                                    When audio_in_set_interrupted_cb  is successful.
+* @failcase                                    If target api audio_in_set_interrupted_cb fails or any precondition api fails.
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+* 
+*/
+//int ITc_audio_in_set_unset_interrupted_cb_p(void)
+{
+    START_TEST;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nFailCount = 0, nUnsetFailCount = 0;
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bAudioIoInterruptedCallback = false;
+               // Target API
+               AudioInputGetMemAllocation();           
+               AudioInputGetTimeOfDay();
+               nRetVal = audio_in_set_interrupted_cb(g_pstAudioInputHandle,AudioIoInterruptedCallbackInput,"test");
+               AudioInputExecutionDelay(pszAPI1SpeedLog);
+       
+               if (nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_set_interrupted_cb failed on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioInputGetError(nRetVal));
+                       nFailCount ++;
+                       continue;
+               }
+
+               sleep(10);
+               
+               if (!g_bAudioIoInterruptedCallback)
+               {
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_set_interrupted_cb failed on iteration = %d , error returned = callback not invoked\\n", __LINE__, nLoopCount);
+                       nFailCount ++;
+               }
+               AudioInputGetTimeOfDay();
+               nRetVal = audio_in_unset_interrupted_cb (g_pstAudioInputHandle);
+               AudioInputExecutionDelay(pszAPI2SpeedLog);
+               if (nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_unset_interrupted_cb failed on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioInputGetError(nRetVal));
+                       nUnsetFailCount ++;
+               }
+               AudioInputGetMemStatus(pszMemLog);
+       }
+       
+       if ( nFailCount > 0 || nUnsetFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_set_interrupted_cb failed %d and audio_in_unset_interrupted_cb failed %d time out of %d times\\n", __LINE__, nFailCount, nUnsetFailCount, MAX_COUNT);
+               AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_set_interrupted_cb , pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(audio_in_unset_interrupted_cb , pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_set_unset_interrupted_cb , pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+       return 0;
+}
+#endif
+
+//& purpose: Peek from audio in buffer and then drop it.
+//& type: auto
+/**
+* @testcase                            ITc_audio_in_peek_drop_p
+* @since_tizen                         2.4
+* @type                                        auto
+* @description                         Peek from audio in buffer and then drop it.
+* @scenario                                    Get the handle to the audio input\n
+* @apicovered                          audio_in_peek,audio_in_drop
+* @passcase                                    When audio_in_peek and  audio_in_drop are successful.
+* @failcase                                    If target api audio_in_peek fails or any precondition api fails.
+* @precondition                                Audio  handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_in_peek_drop_p(void)
+{
+    START_TEST;
+       int nRet = -1;
+       int nLoopCount;
+       int nTtimeoutId = 0;
+       g_pMainLoop = g_main_loop_new(NULL, false);
+       g_nPeekFailCount = 0;
+       g_nDropFailCount = 0;
+       
+       nRet = audio_in_set_stream_cb(g_pstAudioInputHandle, AudioIoStreamCallbackPeekDrop, NULL);
+       if ( nRet != 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_set_stream_cb failed in precondition, error returned = %s\\n", __LINE__, AudioInputGetError(nRet));
+               return 1;
+       }
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bAudioIoStreamCallback = false;
+               
+               nRet = audio_in_prepare(g_pstAudioInputHandle);
+               if ( nRet != 0 )
+               {
+                       g_nPeekFailCount++;
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_prepare failed, error returned = %s\\n", __LINE__, AudioInputGetError(nRet));
+                       continue;
+               }
+               
+               nTtimeoutId = g_timeout_add(5000, Timeout_Function, g_pMainLoop);
+               g_main_loop_run(g_pMainLoop);
+               g_source_remove(nTtimeoutId);
+               
+               if (g_bAudioIoStreamCallback == false)
+               {
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_peek failed, unable to invoke callback\\n", __LINE__);
+                       g_nPeekFailCount++;
+               }
+       }
+       
+       nRet = audio_in_unset_stream_cb (g_pstAudioInputHandle);
+       if ( nRet != 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_unset_stream_cb failed in post condition, error returned = %s\\n", __LINE__, AudioInputGetError(nRet));
+       }
+               
+       if ( g_nPeekFailCount > 0 || g_nDropFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_peek failed %d times and audio_in_drop failed %d times  out of %d times\\n", __LINE__, g_nPeekFailCount, g_nDropFailCount, MAX_COUNT);
+               return 1;
+       }       
+       return 0;
+}
+
+//& purpose: Sets and Un-sets an asynchronous callback function to handle recording PCM data.
+//& type: auto
+/**
+* @testcase                            ITc_audio_in_set_unset_stream_cb_p
+* @since_tizen                         2.4
+* @type                                        auto
+* @description                         Sets and Un-sets an asynchronous callback function to handle recording PCM data.
+* @scenario                                    -gets the handle to the audio input \n
+                            -The callback function to register, The user data is passed to callback function  \n
+* @apicovered                          audio_in_set_stream_cb, audio_in_unset_stream_cb                        
+* @passcase                                    When audio_in_set_stream_cb is successful.
+* @failcase                                    If target api audio_in_set_stream_cb or audio_in_unset_stream_cb fails or any precondition api fails.
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+* 
+*/
+int ITc_audio_in_set_unset_stream_cb_p(void)
+{
+       START_TEST;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nFailCount = 0, nUnsetFailCount = 0;
+       
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bAudioIoStreamCallback = false;
+               // Target API
+               AudioInputGetMemAllocation();           
+               AudioInputGetTimeOfDay();
+               nRetVal = audio_in_set_stream_cb(g_pstAudioInputHandle, AudioIoStreamCallback, NULL);
+               AudioInputExecutionDelay(pszAPI1SpeedLog);
+               
+               if (nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_set_stream_cb failed on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioInputGetError(nRetVal));
+                       nFailCount ++;
+                       continue;
+               }
+               usleep(5000);
+               AudioInputGetTimeOfDay();
+               nRetVal = audio_in_unset_stream_cb (g_pstAudioInputHandle);
+               AudioInputExecutionDelay(pszAPI2SpeedLog);
+               AudioInputGetMemStatus(pszMemLog);
+               if (nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_unset_stream_cb failed on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioInputGetError(nRetVal));
+                       nUnsetFailCount ++;
+               }
+       }
+       if ( nFailCount > 0 ||  nUnsetFailCount > 0)
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_set_stream_cb failed %d and audio_in_unset_stream_cb failed %d time out of %d times\\n", __LINE__, nFailCount, nUnsetFailCount, MAX_COUNT);
+               AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog, pszAPI2SpeedLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_set_stream_cb , pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(audio_in_unset_stream_cb, pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_set_unset_stream_cb, pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog, pszAPI2SpeedLog);
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/audio-io/ITs-audio-input_create_destroy.c b/src/itc/audio-io/ITs-audio-input_create_destroy.c
new file mode 100755 (executable)
index 0000000..ecceb8f
--- /dev/null
@@ -0,0 +1,245 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-audio-input-common.h"
+
+/** @addtogroup itc-audio-input
+*  @ingroup itc
+*  @{
+*/
+//& set: AudioInput1
+
+/**
+* @function            ITs_audio_input1_startup
+* @description         Called before each test, creates Audio handle
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_audio_input1_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       return;
+}
+
+/**
+* @function            ITs_audio_input1_cleanup
+* @description         Called after each test, destroys Audio handle
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_audio_input1_cleanup(void)
+{
+       return;
+}
+
+/** @addtogroup itc-audio-input-testcases
+*  @brief              Integration testcases for module audio-input
+*  @ingroup    itc-audio-input
+*  @{
+*/
+
+//& purpose:To create an audio device instance and to return an input handle to record PCM and to release it
+//& type: auto 
+/**
+* @testcase                    ITc_audio_in_create_destroy_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To create an audio device instance and to return an input handle to record PCM and to release it 
+* @scenario                            Create an audio device\n
+*                                              Create a local audio handle\n
+*                                              Destroy the audio handle
+* @apicovered                  audio_in_create, audio_in_destroy                                               
+* @passcase                            When audio_in_create and audio_in_destroy are successful.
+* @failcase                            If target API audio_in_create fails or any precondition API fails.
+* @precondition                        Audio handle must be created
+* @postcondition               Audio handle must be released
+*/
+int ITc_audio_in_create_destroy_p(void)
+{
+       FPRINTF("[audio-input1_ITC] Starting test : %s\\n","ITc_audio_in_create_destroy_p");
+       
+       int nRet;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nLoopCount; 
+       int nDestroyFailCount = 0, nCreateFailCount = 0;
+       audio_in_h pstAudioInputHandle;
+       
+       g_bAudioInputIsSupported = AudioInput_Check_System_Info_Feature_Supported(TRANSCODE_FEATURE);
+       
+       audio_channel_e eAudioChannel[] = {AUDIO_CHANNEL_STEREO, AUDIO_CHANNEL_MONO};
+       audio_sample_type_e eAudioSampleRate[] = {AUDIO_SAMPLE_TYPE_U8, AUDIO_SAMPLE_TYPE_S16_LE};
+       int enum_size1 = sizeof(eAudioChannel) / sizeof(eAudioChannel[0]);
+       int enum_counter1 = 0;
+       int enum_size2 = sizeof(eAudioSampleRate) / sizeof(eAudioSampleRate[0]);
+       int enum_counter2 = 0;
+#if MEMORY_CHECK
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT * enum_size1 * enum_size2, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * enum_size1 * enum_size2, sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size1 * enum_size2, sizeof(char));
+#endif
+       
+       for ( enum_counter1=0; enum_counter1<enum_size1; enum_counter1++)
+       {
+               for ( enum_counter2=0; enum_counter2<enum_size2; enum_counter2++)
+               {
+               
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               //Target API
+                               AudioInputGetMemAllocation();           
+                               AudioInputGetTimeOfDay();
+                               nRet = audio_in_create(SAMPLERATE, eAudioChannel[enum_counter1] ,eAudioSampleRate[enum_counter2], &pstAudioInputHandle);
+                               AudioInputExecutionDelay(pszAPI1SpeedLog);
+                               CHECK_UNSUPPORTED_ERROR_CONTINUE("audio_in_create", nCreateFailCount);
+                               if ( nRet != 0 )
+                               {
+                                       nCreateFailCount++;
+                                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_create failed, error returned = %s and enum returned for AudioChannel = %s or enum eAudioSampleRate returned is =%s \\n",__LINE__, AudioInputGetError(nRet), AudioChannel(eAudioChannel[enum_counter1]), AudioSampleRate(eAudioSampleRate[enum_counter2]));
+                                       continue;
+                               }
+                               
+                               AudioInputGetTimeOfDay();
+                               nRet = audio_in_destroy(pstAudioInputHandle);
+                               AudioInputExecutionDelay(pszAPI2SpeedLog);
+                               CHECK_UNSUPPORTED_ERROR_CONTINUE("audio_in_destroy", nDestroyFailCount);
+                               if ( nRet != 0 )
+                               {
+                                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_destroy failed, error returned = %s\\n",__LINE__, AudioInputGetError(nRet));
+                                       nDestroyFailCount++;
+                               }
+                               AudioInputGetMemStatus(pszMemLog);
+                       }
+               }
+       }
+
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_create failed %d times and audio_in_destroy failed %d times out of %d times\\n",__LINE__, nCreateFailCount, nDestroyFailCount, MAX_COUNT * enum_size1 * enum_size2);
+               AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_create , pszAPI1SpeedLog);     
+       PRINT_SPEED_LOG(audio_in_destroy , pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_create_destroy , pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+       return 0;
+}
+
+//& purpose: To read audio data from the audio input buffer.
+//& type: auto 
+/**
+* @testcase                    ITc_audio_in_create_loopback_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To read audio data from the audio input buffer. 
+* @scenario                            prepares reading input audio
+*                       read audio data from buffer
+*                                              unprepares reading of input audio
+* @apicovered                  audio_in_create_loopback                                        
+* @passcase                            When audio_in_create_loopback is successful.
+* @failcase                            If target api audio_in_create_loopback fails or any precondition api fails.
+* @precondition                        Audio  handle must be created
+* @postcondition               Audio  handle must be released
+* 
+*/
+
+int ITc_audio_in_create_loopback_p(void)
+{
+       FPRINTF("[audio-input1_ITC] Starting test : %s\\n","ITc_audio_in_create_loopback_p\\n");
+       int nFailCount = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       audio_in_h pstAudioInputHandle;
+       
+       g_bAudioInputIsSupported = AudioInput_Check_System_Info_Feature_Supported(TRANSCODE_FEATURE);
+
+       audio_sample_type_e eAudioSampleRate[] = {AUDIO_SAMPLE_TYPE_U8, 
+                                                                                         AUDIO_SAMPLE_TYPE_S16_LE};
+       int enum_size1 = sizeof(eAudioSampleRate) / sizeof(eAudioSampleRate[0]);
+       int enum_counter1 = 0;
+       audio_channel_e  eAudioChannel[] = {AUDIO_CHANNEL_STEREO, AUDIO_CHANNEL_MONO};
+       int enum_size2 = sizeof(eAudioChannel) / sizeof(eAudioChannel[0]);
+       int enum_counter2 = 0;
+       
+#if MEMORY_CHECK
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT * enum_size1 * enum_size2 , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * enum_size1 * enum_size2 , sizeof(char));
+#endif
+       for ( enum_counter1=0; enum_counter1<enum_size1; enum_counter1++)
+       {
+               for ( enum_counter2=0; enum_counter2<enum_size2; enum_counter2++)
+               {
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               // Target API
+                               AudioInputGetMemAllocation();           
+                               AudioInputGetTimeOfDay();
+                               nRet = audio_in_create_loopback(SAMPLERATE, eAudioChannel[enum_counter2] ,eAudioSampleRate[enum_counter1], &pstAudioInputHandle);
+                               AudioInputExecutionDelay(pszAPI1SpeedLog);
+                               AudioInputGetMemStatus(pszMemLog);
+                               CHECK_UNSUPPORTED_ERROR_CONTINUE("audio_in_create_loopback", nFailCount);
+                               if ( nRet != 0 )
+                               {
+                                       nFailCount++;
+                                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_create_loopback failed, error returned = %s and enum returned for AudioChannel = %s or enum eAudioSampleRate returned is =%s \\n",__LINE__, AudioInputGetError(nRet), AudioChannel(eAudioChannel[enum_counter2]), AudioSampleRate(eAudioSampleRate[enum_counter1]));
+                                       continue;
+                               }
+                               nRet = audio_in_destroy (pstAudioInputHandle);
+                               CHECK_UNSUPPORTED_ERROR_CONTINUE("audio_in_destroy", nFailCount);
+                               if ( nRet != 0 )
+                               {
+                                       nFailCount++;
+                                       FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_destroy failed, error returned = %s  \\n",__LINE__, AudioInputGetError(nRet));
+                               }                               
+                       }
+               }       
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-input_ITC] audio_in_create_loopback failed %d time out of %d times\\n",__LINE__, nFailCount, MAX_COUNT * enum_size1 * enum_size2);
+               AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_in_create_loopback , pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_in_create_loopback , pszMemLog);
+#endif
+       AudioInputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+       return 0;
+}
+/** @} */
+/** @} */
diff --git a/src/itc/audio-io/ITs-audio-output-common.c b/src/itc/audio-io/ITs-audio-output-common.c
new file mode 100755 (executable)
index 0000000..0b2a60c
--- /dev/null
@@ -0,0 +1,219 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-audio-output-common.h"
+
+//Add helper function definitions here
+/** @addtogroup itc-audio-output
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stAudioStartTime;
+extern struct mallinfo g_stAudioMemInfo;
+/**
+* @function            AudioOutputGetError
+* @description         Maps error enums to string values
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* AudioOutputGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case AUDIO_IO_ERROR_INVALID_PARAMETER:                  szErrorVal = "AUDIO_IO_ERROR_INVALID_PARAMETER";                break;
+       case AUDIO_IO_ERROR_OUT_OF_MEMORY:                              szErrorVal = "AUDIO_IO_ERROR_OUT_OF_MEMORY";                    break;
+       case AUDIO_IO_ERROR_DEVICE_NOT_OPENED:                  szErrorVal = "AUDIO_IO_ERROR_DEVICE_NOT_OPENED";                break;
+       case AUDIO_IO_ERROR_INVALID_OPERATION:                  szErrorVal = "AUDIO_IO_ERROR_INVALID_OPERATION";                break;
+       case AUDIO_IO_ERROR_DEVICE_NOT_CLOSED:                  szErrorVal = "AUDIO_IO_ERROR_DEVICE_NOT_CLOSED";                break;
+       case AUDIO_IO_ERROR_INVALID_BUFFER:                     szErrorVal = "AUDIO_IO_ERROR_INVALID_BUFFER";                   break;
+       case AUDIO_IO_ERROR_SOUND_POLICY:                               szErrorVal = "AUDIO_IO_ERROR_SOUND_POLICY";                             break;
+       case AUDIO_IO_ERROR_NONE:                                               szErrorVal = "AUDIO_IO_ERROR_NONE";                                             break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            AudioChannel
+* @description         Maps error enums 
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* AudioOutputChannel(audio_channel_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case AUDIO_CHANNEL_STEREO:              szErrorVal = "AUDIO_CHANNEL_STEREO";    break;
+       case AUDIO_CHANNEL_MONO:                szErrorVal = "AUDIO_CHANNEL_MONO";              break;
+       default:                                                szErrorVal = "Unknown Error";                   break;
+       }
+       return szErrorVal;
+}
+/**
+* @function            AudioSampleRate
+* @description         Maps error enums 
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* AudioOutputSampleRate(audio_sample_type_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case AUDIO_SAMPLE_TYPE_U8:                      szErrorVal = "AUDIO_SAMPLE_TYPE_U8";            break;
+       case AUDIO_SAMPLE_TYPE_S16_LE:          szErrorVal = "AUDIO_SAMPLE_TYPE_S16_LE";        break;
+       default:                                                        szErrorVal = "Unknown Error";                           break;
+       }
+       return szErrorVal;
+}
+/**
+* @function            SoundType
+* @description         Maps error enums 
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* SoundType(sound_type_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case SOUND_TYPE_SYSTEM:                         szErrorVal = "SOUND_TYPE_SYSTEM";                       break;
+       case SOUND_TYPE_NOTIFICATION:           szErrorVal = "SOUND_TYPE_NOTIFICATION"; break;
+       case SOUND_TYPE_MEDIA:                          szErrorVal = "SOUND_TYPE_MEDIA";                        break;
+       case SOUND_TYPE_ALARM:                          szErrorVal = "SOUND_TYPE_ALARM";                        break;
+       case SOUND_TYPE_VOICE:                          szErrorVal = "SOUND_TYPE_VOICE";                        break;          
+       default:                                                        szErrorVal = "Unknown Error";                           break;
+       }
+       return szErrorVal;
+}
+/**
+* @function                    AudioOutputGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void AudioOutputGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stAudioMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stAudioMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stAudioMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    AudioOutputGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void AudioOutputGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stAudioMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           AudioOutputExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void AudioOutputExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stAudioStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stAudioStartTime.tv_usec;
+               
+       sprintf(pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+/**
+ * @function           AudioOutputFreeMemory
+ * @description                Function to free the memory allocated
+ * @parameter          pszMem1, pszMem2, pszMem3 [ pointers to allocated memory]
+ * @return                     NA
+ *
+ */ 
+void AudioOutputFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+
+}
+
+/**
+ * @function           AudioOutputGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stAudioStartTime
+ * @parameter          NA
+ * @return                 NA
+ *
+ */ 
+void AudioOutputGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stAudioStartTime, NULL);
+#endif
+}
+/** @} */
\ No newline at end of file
diff --git a/src/itc/audio-io/ITs-audio-output-common.h b/src/itc/audio-io/ITs-audio-output-common.h
new file mode 100755 (executable)
index 0000000..0bf26da
--- /dev/null
@@ -0,0 +1,108 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_AUDIO_OUTPUT_COMMON_H_
+#define _ITS_AUDIO_OUTPUT_COMMON_H_
+
+//Add test package related includes here
+
+#include "assert.h"
+#include <media/audio_io.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+/** @addtogroup itc-audio-output
+*  @ingroup itc
+*  @{
+*/
+
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define SAMPLERATE                                     44100
+#define SAMPLE_RATE                 44000
+FILE *g_fpLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][audio-io-output_ITC] Starting test : %s\\n",__LINE__,__FUNCTION__);\
+       if ( !g_bAudioCreation )\
+       {\
+               FPRINTF("[Line : %d][audio-io-output_ITC]\\nPrecondition of audio create failed so leaving test\\n",__LINE__);\
+               return 1;\
+       }\
+}
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF("[Line : %d][audio-io-output_ITC]%s passed\\n",__LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][audio-io-output_ITC]%s failed, error returned = %s \\n",__LINE__, API, AudioOutputGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d][audio-io-output_ITC]%s_MemoryLeakStatus - %s\\n",__LINE__, #api, memLog);\
+       }
+
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d][audio-io-output_ITC]%s_TimeInMicrosec- %s\\n",__LINE__, #api, speedLog);\
+       }
+
+//Add helper function declarations here
+       
+char *AudioOutputChannel(audio_channel_e nRet);        
+char *AudioOutputSampleRate(audio_sample_type_e nRet);
+char *SoundType(sound_type_e nRet);
+char* AudioOutputGetError(int nRet);
+void AudioOutputGetMemAllocation();
+void AudioOutputExecutionDelay(char* pszAPITime);
+void AudioOutputGetTimeOfDay();
+void AudioOutputGetMemStatus(char *pszAPIMemory);
+void AudioOutputFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3);
+
+/** @} */
+#endif  //_ITS_AUDIO_OUTPUT_COMMON_H_
diff --git a/src/itc/audio-io/ITs-audio-output.c b/src/itc/audio-io/ITs-audio-output.c
new file mode 100755 (executable)
index 0000000..17a9d32
--- /dev/null
@@ -0,0 +1,899 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-audio-output-common.h"
+
+/** @addtogroup itc-audio-output
+*  @ingroup itc
+*  @{
+*/
+
+//& set: AudioOutput
+
+audio_out_h g_pstAudioOutputHandle;
+bool g_bAudioCreation;
+struct timeval g_stAudioStartTime;
+struct mallinfo g_stAudioMemInfo;
+bool g_bAudioIoInterruptedCallback;
+bool g_bAudioOutputStreamCallback;
+
+/**
+* @function            ITs_audio_output_startup
+* @description         Called before each test, creates Audio handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_audio_output_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       int nRet;
+       audio_channel_e eAudioChannel = AUDIO_CHANNEL_STEREO;
+       audio_sample_type_e eAudioSampleRate = AUDIO_SAMPLE_TYPE_S16_LE;
+       sound_type_e  eSoundType = SOUND_TYPE_SYSTEM ;
+       
+       if ( (nRet = audio_out_create(SAMPLERATE, eAudioChannel ,eAudioSampleRate ,eSoundType ,&g_pstAudioOutputHandle)) == AUDIO_IO_ERROR_NONE )
+       {
+                       nRet = audio_out_ignore_session(g_pstAudioOutputHandle);
+                       if ( nRet != AUDIO_IO_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_ignore_session failed\\n", __LINE__);
+                               g_bAudioCreation = false;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_ignore_session created  successfully\\n", __LINE__);
+                               g_bAudioCreation = true;
+                       }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_create creation failed, error returned = %s\\n", __LINE__, AudioOutputGetError(nRet));
+               g_bAudioCreation = false;
+       }
+       return;
+}
+
+/**
+* @function            ITs_audio_output_cleanup
+* @description         Called after each test, destroys Audio handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_audio_output_cleanup(void)
+{
+       if ( g_bAudioCreation )
+       {
+               int nRet = audio_out_destroy (g_pstAudioOutputHandle);
+               if ( nRet != AUDIO_IO_ERROR_NONE )
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_destroy failed, error returned = %s\\n", __LINE__, AudioOutputGetError(nRet));
+#endif
+               }
+       }
+       return;
+}
+/**
+* @function                    AudioIoStreamCallback
+* @description         Called when audio handle stream is created.
+* @parameter[IN]       The audio handle
+* @parameter[IN]       Size in bytes
+* @parameter[IN]       The user data passed from the callback registration function                    
+* @return                      NA
+*/
+void AudioOutputStreamCallback(audio_out_h g_pstAudioOutputStreamCallback, size_t nBytes, void *userdata)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][audio-io-output_ITC] AudioOutStreamCallback is called\\n", __LINE__);
+#endif
+       g_bAudioOutputStreamCallback = true;
+}
+
+/** @addtogroup itc-audio-output-testcases
+*  @brief              Integration testcases for module audio-output
+*  @ingroup    itc-audio-output
+*  @{
+*/
+
+//& purpose:To prepare reading audio output by starting buffering the audio data and un Prepare by stopping that .
+//& type: auto
+/**
+* @testcase                            ITc_audio_out_prepare_unprepare_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To prepare reading audio output by starting buffering the audio data and un-Prepare by stopping that .
+* @scenario                                    Start buffering of audio data\n
+*                                                      Read audio output\n
+*                                                      Stop buffering of audio data
+* @apicovered                          audio_out_prepare, audio_out_unprepare                                          
+* @passcase                                    When audio_out_unprepare and audio_out_unprepare are successful
+* @failcase                                    If target API audio_out_prepare fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_out_prepare_unprepare_p(void)
+{
+       START_TEST;
+       
+       int nRet;
+       int nPrepareFailCount = 0, nUnPrepareFailCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nLoopCount;
+       
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               AudioOutputGetMemAllocation();
+               AudioOutputGetTimeOfDay();
+               nRet = audio_out_prepare(g_pstAudioOutputHandle);
+               AudioOutputExecutionDelay(pszAPI1SpeedLog);
+               
+               if ( nRet != 0 )
+               {
+                       nPrepareFailCount++;
+                       FPRINTF("[Line : %d][audio-io-output_ITC]audio_out_prepare failed, error returned = %s\\n", __LINE__, AudioOutputGetError(nRet));
+                       continue;
+               }
+               
+               AudioOutputGetTimeOfDay();
+               nRet = audio_out_unprepare(g_pstAudioOutputHandle);
+               AudioOutputExecutionDelay(pszAPI2SpeedLog);
+               
+               if ( nRet != 0 )
+               {
+                       nUnPrepareFailCount++;
+                       FPRINTF("[Line : %d][audio-io-output_ITC]audio_out_unprepare failed, error returned = %s\\n", __LINE__, AudioOutputGetError(nRet));
+                       nUnPrepareFailCount++;
+               }
+               AudioOutputGetMemStatus(pszMemLog);
+       }
+
+       if ( nPrepareFailCount > 0 || nUnPrepareFailCount > 0)
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC]audio_out_prepare failed %d times and  audio_out_unprepare failed %d time out of %d times\\n", __LINE__, nPrepareFailCount, nUnPrepareFailCount, MAX_COUNT);
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_out_prepare , pszAPI1SpeedLog);
+    PRINT_SPEED_LOG(audio_out_unprepare , pszAPI2SpeedLog);            
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_out_prepare_unprepare, pszMemLog);
+#endif
+       AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+       return 0;
+}
+
+//& purpose:To get the size to be allocated for audio output buffer
+//& type: auto
+/**
+* @testcase                            ITc_audio_out_get_buffer_size_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To get the size to be allocated for audio output buffer
+* @scenario                                    Get the size of buffer\n
+*                                                      Allocate it to audio output buffer
+* @apicovered                          audio_out_get_buffer_size                                               
+* @passcase                                    When audio_out_get_buffer_size is successful
+* @failcase                                    If target API audio_out_get_buffer_size fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_out_get_buffer_size_p(void)
+{
+       START_TEST;
+       
+       int nSize = 0;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               AudioOutputGetMemAllocation();
+               AudioOutputGetTimeOfDay();
+               nRetVal = audio_out_get_buffer_size( g_pstAudioOutputHandle, &nSize);
+               AudioOutputExecutionDelay(pszAPI1SpeedLog);
+               AudioOutputGetMemStatus(pszMemLog);
+               
+               if(nRetVal != 0 )
+               { 
+                   nSize = 50000;
+                       FPRINTF("[Line : %d] [audio-output_ITC] audio_out_get_buffer_size is unsuccessful on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioOutputGetError(nRetVal));
+                       nFailCount ++;
+               }
+               else if (nSize == -1)
+               {
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG              
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_buffer_size is successful\\n", __LINE__);
+#endif
+               }
+               
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_buffer_size failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_out_get_buffer_size , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_out_get_buffer_size, pszMemLog);
+#endif
+       AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get the channel type of audio output data stream
+//& type: auto
+/**
+* @testcase                            ITc_audio_out_get_channel_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To get the channel type of audio output data stream.
+* @scenario                                    Get channel type\n
+*                                                      Checks whether its mono or stereo
+* @apicovered                          audio_out_get_channel
+* @passcase                                    When audio_out_get_channel is successful
+* @failcase                                    If target API audio_out_get_channel fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_out_get_channel_p(void)
+{
+       START_TEST;
+       
+       audio_channel_e  eAudioChannel ;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               AudioOutputGetMemAllocation();
+               AudioOutputGetTimeOfDay();
+               nRetVal = audio_out_get_channel(g_pstAudioOutputHandle,&eAudioChannel);
+               AudioOutputExecutionDelay(pszAPI1SpeedLog);
+               AudioOutputGetMemStatus(pszMemLog);
+               
+               if(nRetVal != 0 && eAudioChannel == AUDIO_CHANNEL_MONO )
+               { 
+               
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_channel is unsuccessful on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioOutputGetError(nRetVal));
+                       nFailCount ++;
+               }
+               else
+               {
+#if DEBUG              
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_channel is successful\\n", __LINE__);
+#endif
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_channel failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_out_get_channel , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_out_get_channel, pszMemLog);
+#endif
+       AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get the sample audio format of audio output data stream.
+//& type: auto
+/**
+* @testcase                            ITc_audio_out_get_sample_type_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To get the channel type of audio output data stream.
+* @scenario                                    Get output data stream\n
+*                                                      Get the sample audio format
+* @apicovered                          audio_out_get_sample_type                               
+* @passcase                                    When audio_out_get_sample_type is successful
+* @failcase                                    If target API audio_out_get_sample_type fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_out_get_sample_type_p(void)
+{
+       START_TEST;
+
+       audio_sample_type_e eAudioSampleRate;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               AudioOutputGetMemAllocation();
+               AudioOutputGetTimeOfDay();
+               nRetVal = audio_out_get_sample_type(g_pstAudioOutputHandle,&eAudioSampleRate);
+               AudioOutputExecutionDelay(pszAPI1SpeedLog);
+               AudioOutputGetMemStatus(pszMemLog);
+               if(nRetVal != 0 && eAudioSampleRate == AUDIO_SAMPLE_TYPE_S16_LE)
+               { 
+               
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_sample_type is unsuccessful on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioOutputGetError(nRetVal));
+                       nFailCount ++;
+               }
+               else
+               {
+#if DEBUG              
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_sample_type is successful\\n", __LINE__);
+#endif
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_sample_type failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_out_get_sample_type , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_out_get_sample_type, pszMemLog);
+#endif
+       AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get the sample rate of audio output data stream.
+//& type: auto
+/**
+* @testcase                            ITc_audio_out_get_sample_rate_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To get the channel type of audio output data stream.
+* @scenario                                    Get output data stream\n
+*                                                      Get the sample rate
+* @apicovered                          audio_out_get_sample_rate                               
+* @passcase                                    When audio_out_get_sample_rate is successful
+* @failcase                                    If target API audio_out_get_sample_rate fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_out_get_sample_rate_p(void)
+{
+       START_TEST;
+       
+       int nSample_rate;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               AudioOutputGetMemAllocation();
+               AudioOutputGetTimeOfDay();
+               nRetVal = audio_out_get_sample_rate(g_pstAudioOutputHandle,&nSample_rate);
+               AudioOutputExecutionDelay(pszAPI1SpeedLog);
+               AudioOutputGetMemStatus(pszMemLog);
+               
+               if(nRetVal != 0 )
+               { 
+               
+                       FPRINTF("[Line : %d] [audio-output_ITC] audio_out_get_sample_rate is unsuccessful on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioOutputGetError(nRetVal));
+                       nFailCount ++;
+               }
+               else
+               {
+#if DEBUG              
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_sample_rate is successful\\n", __LINE__);
+#endif
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_sample_rate failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_out_get_sample_rate , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_out_get_sample_rate, pszMemLog);
+#endif
+       AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get the sound type supported by the audio output device.
+//& type: auto
+/**
+* @testcase                            ITc_audio_out_get_sound_type_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         To get the channel type of audio output data stream.
+* @scenario                                    Get the type of sound
+* @apicovered                          audio_out_get_sound_type                                
+* @passcase                                    When audio_out_get_sound_type is successful
+* @failcase                                    If target API audio_out_get_sound_type fails or any precondition API fails
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_out_get_sound_type_p(void)
+{
+       START_TEST;
+
+       sound_type_e eSoundType;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               AudioOutputGetMemAllocation();
+               
+               AudioOutputGetTimeOfDay();
+               nRetVal = audio_out_get_sound_type(g_pstAudioOutputHandle,&eSoundType);
+               AudioOutputExecutionDelay(pszAPI1SpeedLog);
+               AudioOutputGetMemStatus(pszMemLog);
+               
+               if(nRetVal != 0 )
+               { 
+               
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_sound_type is unsuccessful on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioOutputGetError(nRetVal));
+                       nFailCount ++;
+               }
+               else
+               {
+#if DEBUG              
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_sound_type is successful\\n", __LINE__);
+#endif
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_get_sound_type failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_out_get_sound_type , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_out_get_sound_type, pszMemLog);
+#endif
+       AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+       return 0;
+}
+
+
+//& purpose:To ignore session for output.
+//& type: auto
+/**
+* @testcase                            ITc_audio_out_ignore_session_p
+* @since_tizen                         2.4
+* @type                                        auto
+* @description                         To ignore session for output.
+* @scenario                                    -gets the handle to the audio output
+                            -prepares reading audio output
+* @apicovered                          audio_out_ignore_session
+* @passcase                                    When audio_out_ignore_session  is successful.
+* @failcase                                    If target api audio_out_ignore_session  fails or any precondition api fails.
+* @precondition                                Audio handle must be created
+* @postcondition                       Audio handle must be released
+*/
+int ITc_audio_out_ignore_session_p(void)
+{
+       START_TEST;
+       
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               AudioOutputGetMemAllocation();
+               
+               AudioOutputGetTimeOfDay();
+               nRetVal = audio_out_ignore_session(g_pstAudioOutputHandle);
+               AudioOutputExecutionDelay(pszAPI1SpeedLog);
+               AudioOutputGetMemStatus(pszMemLog);
+               
+               if(nRetVal != 0 )
+               { 
+               
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_ignore_session is unsuccessful on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioOutputGetError(nRetVal));
+                       nFailCount ++;
+               }
+               else
+               {
+#if DEBUG              
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_ignore_session is successful\\n", __LINE__);
+#endif
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_ignore_session failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_out_ignore_session , pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_out_ignore_session, pszMemLog);
+#endif
+       AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose:To start writing the audio data to the device.  
+//& type: auto 
+/**
+ * @testcase                           ITc_audio_out_write_p
+ * @type                                       auto
+ * @description                                To start writing the audio data to the device.  
+ * @scenario                           prepares writing output audio\n
+                            write audio data from buffer\n
+                                                       return Written data size on success
+ * @apicovered                         audio_in_prepare,audio_in_unprepare     ,audio_out_write                                        
+ * @passcase                           When audio_in_read is successful.
+ * @failcase                           If target api audio_out_write fails or any precondition api fails.
+ * @precondition                       Audio  handle must be created
+ * @postcondition                      Audio  handle must be released
+ * 
+ */
+int ITc_audio_out_write_p(void)
+{
+       START_TEST;
+       
+       unsigned int unSize = 0;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszbuffer = NULL;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+    int nFailCount = 0;
+
+       //Preconditions
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+               
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               pszbuffer = (char *) malloc (unSize * sizeof(char));
+               AudioOutputGetMemAllocation();          
+               AudioOutputGetTimeOfDay();
+               nRetVal = audio_out_write( g_pstAudioOutputHandle,(void*)pszbuffer, unSize);
+               AudioOutputExecutionDelay(pszAPI1SpeedLog);
+               AudioOutputGetMemStatus(pszMemLog);
+               
+               if ( nRetVal < 0 )
+               { 
+                       FILE* fp = fopen ("/root/test.raw", "wb+");
+                       if ( fp == NULL )
+                       {
+                               FPRINTF("[Line : %d][audio-io-output_ITC] Insufficient memory\\n", __LINE__);
+                               return 1;
+                       }
+                       fwrite (pszbuffer, unSize, sizeof(char), fp);
+                       fclose (fp);
+                       FPRINTF("[Line : %d][audio-io-output_ITC] FAIL, size=%d, nRetVal=%d\\n", __LINE__, unSize, nRetVal);
+                       nFailCount ++;
+               }
+               else 
+               {
+                       FPRINTF("[Line : %d][audio-io-output_ITC] PASS, size=%d, nRetVal=%d\\n", __LINE__, unSize, nRetVal);
+               }
+               free(pszbuffer);
+                               
+       }
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_write failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_out_write , pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_out_write, pszMemLog);
+#endif
+       AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Un-sets an asynchronous callback function to handle recording PCM data.
+//& type: auto  
+/**
+ * @testcase                           ITc_audio_out_set_unset_stream_cb_p
+ * @type                                       auto
+ * @description                                Sets and Un-sets an asynchronous callback function to handle recording PCM data.
+ * @scenario                           gets the handle to the audio output\n
+                            The callback function to register \n
+                                                       The user data is passed to callback function
+ * @apicovered                         audio_out_set_stream_cb, audio_out_unset_stream_cb                              
+ * @passcase                           When audio_out_set_stream_cb is successful.
+ * @failcase                           If target api audio_out_set_stream_cb or audio_out_unset_stream_cb fails or any precondition api fails.
+ * @precondition                       Audio handle must be created
+ * @postcondition                      Audio handle must be released
+ * 
+ */
+int ITc_audio_out_set_unset_stream_cb_p(void)
+{
+       START_TEST;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nFailCount = 0, nUnsetFailCount = 0;
+       
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bAudioOutputStreamCallback = false;
+               // Target API
+               AudioOutputGetMemAllocation();          
+               AudioOutputGetTimeOfDay();
+               nRetVal = audio_out_set_stream_cb(g_pstAudioOutputHandle, AudioOutputStreamCallback, NULL);
+               AudioOutputExecutionDelay(pszAPI1SpeedLog);
+               
+               if (nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_set_stream_cb failed on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioOutputGetError(nRetVal));
+                       nFailCount ++;
+                       continue;
+               }
+               usleep(5000);
+               AudioOutputGetTimeOfDay();
+               nRetVal = audio_out_unset_stream_cb (g_pstAudioOutputHandle);
+               AudioOutputExecutionDelay(pszAPI2SpeedLog);
+               AudioOutputGetMemStatus(pszMemLog);
+               if (nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_unset_stream_cb failed on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioOutputGetError(nRetVal));
+                       nUnsetFailCount ++;
+               }
+       }
+       if ( nFailCount > 0 ||  nUnsetFailCount > 0)
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_set_stream_cb failed %d and audio_out_unset_stream_cb failed %d time out of %d times\\n", __LINE__, nFailCount, nUnsetFailCount, MAX_COUNT);
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, pszAPI2SpeedLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_out_set_stream_cb , pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(audio_out_unset_stream_cb, pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_out_set_unset_stream_cb, pszMemLog);
+#endif
+       AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, pszAPI2SpeedLog);
+       return 0;
+}
+
+#if EXECUTE_MANUAL
+//& purpose: To register a callback when the audio output handle is interrupted
+//& type: auto  
+/**
+ * @testcase                           ITc_audio_out_set_unset_interrupted_cb_p
+ * @type                                       auto
+ * @description                                to register a callback when the audio output handle is interrupted
+ * @scenario                           -gets the handle to the audio output\n
+                            -The callback function to register \n
+                                                       -The user data is passed to callback function
+ * @apicovered                         audio_out_set_interrupted_cb, audio_out_unset_interrupted_cb                            
+ * @passcase                           When audio_out_set_interrupted_cb is successful.
+ * @failcase                           If target api audio_out_set_interrupted_cb or audio_out_unset_interrupted_cb fails or any precondition api fails.
+ * @precondition                       Audio handle must be created
+ * @postcondition                      Audio handle must be released
+ * 
+ */
+//int ITc_audio_out_set_unset_interrupted_cb_p(void)
+{
+       START_TEST;
+       
+       int nRet;
+    int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nFailCount = 0, nUnsetFailCount = 0;
+       
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       nRet = audio_out_prepare(g_pstAudioOutputHandle);
+       if (nRet != 0)
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_prepare failed, error returned = %s\\n", __LINE__, AudioOutputGetError(nRet));
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bAudioIoInterruptedCallback = false;
+               // Target API
+               AudioOutputGetMemAllocation();          
+               AudioOutputGetTimeOfDay();
+               nRetVal = audio_out_set_interrupted_cb(g_pstAudioOutputHandle,AudioIoInterruptedCallbackOutput,NULL);
+               AudioOutputExecutionDelay(pszAPI1SpeedLog);
+               
+               if (nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_set_interrupted_cb failed on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioOutputGetError(nRetVal));
+                       nFailCount ++;
+                       continue;
+               }
+               usleep(2000);
+               
+               if (!g_bAudioIoInterruptedCallback)
+               {
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_set_interrupted_cb failed on iteration = %d , error returned = callback not invoked\\n", __LINE__, nLoopCount);
+                       nFailCount ++;
+               }
+               
+               AudioOutputGetTimeOfDay();
+               nRetVal = audio_out_unset_interrupted_cb (g_pstAudioOutputHandle);
+               AudioOutputExecutionDelay(pszAPI2SpeedLog);
+               AudioOutputGetMemStatus(pszMemLog);
+               if (nRetVal != 0)
+               {
+                       FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_unset_interrupted_cb failed on iteration = %d , error returned =  %s\\n", __LINE__, nLoopCount, AudioOutputGetError(nRetVal));
+                       nUnsetFailCount ++;
+               }
+       }
+       nRet = audio_out_unprepare(g_pstAudioOutputHandle);
+       if (nRet != 0)
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_unprepare failed, error returned = %s\\n", __LINE__, AudioOutputGetError(nRet));
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_set_interrupted_cb failed %d and audio_out_unset_interrupted_cb failed %d time out of %d times\\n", __LINE__, nFailCount, nUnsetFailCount, MAX_COUNT);
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, pszAPI2SpeedLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_out_set_interrupted_cb , pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(audio_out_unset_interrupted_cb, pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_out_set_unset_interrupted_cb, pszMemLog);
+#endif
+       AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog, pszAPI2SpeedLog);
+       return 0;
+}
+#endif
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/audio-io/ITs-audio-output_create_destroy.c b/src/itc/audio-io/ITs-audio-output_create_destroy.c
new file mode 100755 (executable)
index 0000000..fb33eb7
--- /dev/null
@@ -0,0 +1,157 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-audio-output-common.h"
+
+/** @addtogroup itc-audio-output
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Audiooutput1
+
+/**
+* @function            ITs_audio_input1_startup
+* @description         Called before each test, creates Audio handle
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_audio_output1_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       return;
+}
+
+/**
+* @function            ITs_audio_input1_cleanup
+* @description         Called after each test, destroys Audio handle
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_audio_output1_cleanup(void)
+{
+       return;
+}
+
+/** @addtogroup itc-audio-output-testcases
+*  @brief              Integration testcases for module audio-output
+*  @ingroup    itc-audio-output
+*  @{
+*/
+
+//& purpose:To create an audio device instance and to return an output handle to record PCM and to release it
+//& type: auto 
+/**
+* @testcase                    ITc_audio_out_create_destroy_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To create an audio device instance and to return an output handle to record PCM and to release it
+* @scenario                            Create an audio device\n
+*                                              Create a local audio handle\n
+*                                              Destroy the audio handle
+* @apicovered                  audio_out_create, audio_out_destroy
+* @passcase                            When audio_out_create and  audio_out_destroy are successful.
+* @failcase                            If target API audio_out_create fails or any precondition API fails.
+* @precondition                        Audio handle must be created
+* @postcondition               Audio handle must be released
+*/
+int ITc_audio_out_create_destroy_p(void)
+{
+    FPRINTF("[audio-output1_ITC] Starting test : %s\\n","ITc_audio_out_create_destroy_p");
+       
+       int nRet;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nLoopCount; 
+       int nDestroyFailCount = 0, nCreateFailCount = 0;
+    audio_out_h pstAudioOutputHandle;
+       audio_channel_e  eAudioChannel[] = {AUDIO_CHANNEL_STEREO, AUDIO_CHANNEL_MONO};
+       audio_sample_type_e eAudioSampleRate[] = {AUDIO_SAMPLE_TYPE_U8, AUDIO_SAMPLE_TYPE_S16_LE};
+       sound_type_e  eSoundType[] = {SOUND_TYPE_SYSTEM, SOUND_TYPE_NOTIFICATION, SOUND_TYPE_MEDIA, SOUND_TYPE_ALARM, SOUND_TYPE_VOICE};
+
+       int enum_size1 = sizeof(eAudioChannel) / sizeof(eAudioChannel[0]);
+       int enum_counter1 = 0;
+       int enum_size2 = sizeof(eAudioSampleRate) / sizeof(eAudioSampleRate[0]);
+       int enum_counter2 = 0;
+       int enum_size3 = sizeof(eSoundType) / sizeof(eSoundType[0]);
+       int enum_counter3 = 0;
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT * enum_size1 * enum_size2 * enum_size3, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * enum_size1 * enum_size2 * enum_size3, sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size1 * enum_size2 * enum_size3, sizeof(char));
+#endif
+for ( enum_counter1=0; enum_counter1<enum_size1; enum_counter1++)
+       {
+               for ( enum_counter2=0; enum_counter2<enum_size2; enum_counter2++)
+               {
+                       for( enum_counter3=0; enum_counter3<enum_size3; enum_counter3++)
+                       {
+                               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                               {
+                                       //Target API
+                                       AudioOutputGetMemAllocation();          
+                                       AudioOutputGetTimeOfDay();
+                                       nRet = audio_out_create(SAMPLERATE, eAudioChannel[enum_counter1] ,eAudioSampleRate[enum_counter2] ,eSoundType[enum_counter3] ,&pstAudioOutputHandle);
+                                       AudioOutputExecutionDelay(pszAPI1SpeedLog);
+                                       
+                                       if ( nRet != 0 )
+                                       {
+                                               nCreateFailCount++;
+                                               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_create failed, error returned = %s and enum eAudioChannel returned is = %s or enum eAudioSampleRate returned is =%s or enum eSoundType returned is = %s\\n",__LINE__, AudioOutputGetError(nRet), AudioOutputChannel(eAudioChannel[enum_counter1]), AudioOutputSampleRate(eAudioSampleRate[enum_counter2]), SoundType(eSoundType[enum_counter3]));
+                                               continue;
+                                       }
+                                       
+                                       AudioOutputGetTimeOfDay();
+                                       nRet = audio_out_destroy(pstAudioOutputHandle);
+                                       AudioOutputExecutionDelay(pszAPI2SpeedLog);
+                                       
+                                       if ( nRet != 0 )
+                                       {
+                                               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_create failed, error returned = %s\\n",__LINE__, AudioOutputGetError(nRet));
+                                               nDestroyFailCount++;
+                                       }
+                                       AudioOutputGetMemStatus(pszMemLog);
+                               }
+                       }
+               }
+       }       
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0)
+       {
+               FPRINTF("[Line : %d][audio-io-output_ITC] audio_out_create failed %d times and audio_out_destroy failed %d times out of %d times\\n",__LINE__, nCreateFailCount, nDestroyFailCount, MAX_COUNT * enum_size1 * enum_size2 * enum_size3);
+               AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_out_create , pszAPI1SpeedLog);    
+       PRINT_SPEED_LOG(audio_out_destroy , pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(audio_out_create_destroy , pszMemLog);
+#endif
+       AudioOutputFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/audio-io/tct-audio-io-native.c b/src/itc/audio-io/tct-audio-io-native.c
new file mode 100755 (executable)
index 0000000..c8abc8b
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-audio-io-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/audio-io/tct-audio-io-native.h b/src/itc/audio-io/tct-audio-io-native.h
new file mode 100755 (executable)
index 0000000..e007cce
--- /dev/null
@@ -0,0 +1,77 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_AUDIO_IO_NATIVE_H__
+#define __TCT_AUDIO_IO_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_audio_input1_startup(void);
+extern void ITs_audio_input1_cleanup(void);
+extern void ITs_audio_input_startup(void);
+extern void ITs_audio_input_cleanup(void);
+extern void ITs_audio_output1_startup(void);
+extern void ITs_audio_output1_cleanup(void);
+extern void ITs_audio_output_startup(void);
+extern void ITs_audio_output_cleanup(void);
+
+extern int ITc_audio_in_create_destroy_p(void);
+extern int ITc_audio_in_create_loopback_p(void);
+extern int ITc_audio_in_prepare_unprepare_p(void);
+extern int ITc_audio_in_get_buffer_size_p(void);
+extern int ITc_audio_in_read_p(void);
+extern int ITc_audio_in_get_channel_p(void);
+extern int ITc_audio_in_get_sample_type_p(void);
+extern int ITc_audio_in_get_sample_rate_p(void);
+extern int ITc_audio_in_ignore_session_p(void);
+extern int ITc_audio_in_peek_drop_p(void);
+extern int ITc_audio_in_set_unset_stream_cb_p(void);
+extern int ITc_audio_out_create_destroy_p(void);
+extern int ITc_audio_out_prepare_unprepare_p(void);
+extern int ITc_audio_out_get_buffer_size_p(void);
+extern int ITc_audio_out_get_channel_p(void);
+extern int ITc_audio_out_get_sample_type_p(void);
+extern int ITc_audio_out_get_sample_rate_p(void);
+extern int ITc_audio_out_get_sound_type_p(void);
+extern int ITc_audio_out_ignore_session_p(void);
+extern int ITc_audio_out_write_p(void);
+extern int ITc_audio_out_set_unset_stream_cb_p(void);
+
+testcase tc_array[] = {
+    {"ITc_audio_in_create_destroy_p", ITc_audio_in_create_destroy_p, ITs_audio_input1_startup, ITs_audio_input1_cleanup},
+    {"ITc_audio_in_create_loopback_p", ITc_audio_in_create_loopback_p, ITs_audio_input1_startup, ITs_audio_input1_cleanup},
+    {"ITc_audio_in_prepare_unprepare_p", ITc_audio_in_prepare_unprepare_p, ITs_audio_input_startup, ITs_audio_input_cleanup},
+    {"ITc_audio_in_get_buffer_size_p", ITc_audio_in_get_buffer_size_p, ITs_audio_input_startup, ITs_audio_input_cleanup},
+    {"ITc_audio_in_read_p", ITc_audio_in_read_p, ITs_audio_input_startup, ITs_audio_input_cleanup},
+    {"ITc_audio_in_get_channel_p", ITc_audio_in_get_channel_p, ITs_audio_input_startup, ITs_audio_input_cleanup},
+    {"ITc_audio_in_get_sample_type_p", ITc_audio_in_get_sample_type_p, ITs_audio_input_startup, ITs_audio_input_cleanup},
+    {"ITc_audio_in_get_sample_rate_p", ITc_audio_in_get_sample_rate_p, ITs_audio_input_startup, ITs_audio_input_cleanup},
+    {"ITc_audio_in_ignore_session_p", ITc_audio_in_ignore_session_p, ITs_audio_input_startup, ITs_audio_input_cleanup},
+    {"ITc_audio_in_peek_drop_p", ITc_audio_in_peek_drop_p, ITs_audio_input_startup, ITs_audio_input_cleanup},
+    {"ITc_audio_in_set_unset_stream_cb_p", ITc_audio_in_set_unset_stream_cb_p, ITs_audio_input_startup, ITs_audio_input_cleanup},
+    {"ITc_audio_out_create_destroy_p", ITc_audio_out_create_destroy_p, ITs_audio_output1_startup, ITs_audio_output1_cleanup},
+    {"ITc_audio_out_prepare_unprepare_p", ITc_audio_out_prepare_unprepare_p, ITs_audio_output_startup, ITs_audio_output_cleanup},
+    {"ITc_audio_out_get_buffer_size_p", ITc_audio_out_get_buffer_size_p, ITs_audio_output_startup, ITs_audio_output_cleanup},
+    {"ITc_audio_out_get_channel_p", ITc_audio_out_get_channel_p, ITs_audio_output_startup, ITs_audio_output_cleanup},
+    {"ITc_audio_out_get_sample_type_p", ITc_audio_out_get_sample_type_p, ITs_audio_output_startup, ITs_audio_output_cleanup},
+    {"ITc_audio_out_get_sample_rate_p", ITc_audio_out_get_sample_rate_p, ITs_audio_output_startup, ITs_audio_output_cleanup},
+    {"ITc_audio_out_get_sound_type_p", ITc_audio_out_get_sound_type_p, ITs_audio_output_startup, ITs_audio_output_cleanup},
+    {"ITc_audio_out_ignore_session_p", ITc_audio_out_ignore_session_p, ITs_audio_output_startup, ITs_audio_output_cleanup},
+    {"ITc_audio_out_write_p", ITc_audio_out_write_p, ITs_audio_output_startup, ITs_audio_output_cleanup},
+    {"ITc_audio_out_set_unset_stream_cb_p", ITc_audio_out_set_unset_stream_cb_p, ITs_audio_output_startup, ITs_audio_output_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_AUDIO_IO_NATIVE_H__
diff --git a/src/itc/badge/CMakeLists.txt b/src/itc/badge/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..f970ba9
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "badge")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "badge")
+SET(TC_SOURCES
+       ITs-badge-common.c
+       ITs-badge.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/badge/ITs-badge-common.c b/src/itc/badge/ITs-badge-common.c
new file mode 100755 (executable)
index 0000000..94f43a9
--- /dev/null
@@ -0,0 +1,181 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-badge-common.h"
+
+/** @addtogroup itc-badge
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stBadgeStartTime;
+extern struct mallinfo g_stBadgeMemInfo;
+
+/**
+* @function            BadgeGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char *BadgeGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case BADGE_ERROR_INVALID_PARAMETER:             szErrorVal = "BADGE_ERROR_INVALID_PARAMETER";           break;
+       case BADGE_ERROR_OUT_OF_MEMORY:                 szErrorVal = "BADGE_ERROR_OUT_OF_MEMORY";                       break;
+       case BADGE_ERROR_IO_ERROR:                              szErrorVal = "BADGE_ERROR_IO_ERROR";                            break;
+       case BADGE_ERROR_FROM_DB:                               szErrorVal = "BADGE_ERROR_FROM_DB";                                     break;
+       case BADGE_ERROR_ALREADY_EXIST:                 szErrorVal = "BADGE_ERROR_ALREADY_EXIST";                       break;
+       case BADGE_ERROR_FROM_DBUS:                             szErrorVal = "BADGE_ERROR_FROM_DBUS";                           break;
+       case BADGE_ERROR_NOT_EXIST:                             szErrorVal = "BADGE_ERROR_NOT_EXIST";                           break;
+       case BADGE_ERROR_PERMISSION_DENIED:             szErrorVal = "BADGE_ERROR_PERMISSION_DENIED";           break;
+       case BADGE_ERROR_SERVICE_NOT_READY:             szErrorVal = "BADGE_ERROR_SERVICE_NOT_READY";           break;
+       default:                                                                szErrorVal = "Unknown Error";                                           break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function                    BadgeGetMemStatus
+* @description         Returns the Memory Allocation state
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void BadgeGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+
+               if(stMemInfo.uordblks > g_stBadgeMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stBadgeMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stBadgeMemInfo.uordblks - stMemInfo.uordblks);
+               }
+
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+#endif
+}
+
+/**
+* @function                    BadgeGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void BadgeGetMemAllocation(void)
+{
+#if MEMORY_CHECK
+       g_stBadgeMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           BadgeExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void BadgeExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);
+               ulldifference = ((stEnd.tv_sec - g_stBadgeStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stBadgeStartTime.tv_usec;
+
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+#endif
+}
+
+/**
+ * @function           BadgeGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stBadgeStartTime
+ * @parameter          NA
+ * @return                     NA
+ */
+void BadgeGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stBadgeStartTime, NULL);
+#endif
+}
+
+
+/**
+ * @function           BadgeFreeMemory
+ * @description                Function to free the memory allocated
+ * @parameter          pszMem1, pszMem2, pszMem3, pszMem4 [ pointers to allocated memory]
+ * @return                     NA
+ */
+void BadgeFreeMemory(char *pszMem1, char *pszMem2, char *pszMem3)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+}
+
+/**
+ * @function           BadgeAllocateMemory
+ * @description                allocates memory for speed and memory check buffer for two API check scenario
+ * @parameter          pszMem, pszSpeed1, pszSpeed2 [ pointers to allocated memory]
+ * @return                     NA
+ */
+void BadgeAllocateMemory(char **pszMem, char **pszSpeed1, char **pszSpeed2)
+{
+#if MEMORY_CHECK
+       *pszMem =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       *pszSpeed1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       *pszSpeed2 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/badge/ITs-badge-common.h b/src/itc/badge/ITs-badge-common.h
new file mode 100755 (executable)
index 0000000..4ddea22
--- /dev/null
@@ -0,0 +1,114 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_BADGE_COMMON_H_
+#define _ITS_BADGE_COMMON_H_
+
+#include "assert.h"
+//Add test package related includes here
+#include <badge.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/** @addtogroup itc-badge
+*  @ingroup itc
+*  @{
+*/
+
+#define BUFFER                                                 512
+#define LOG                                                    100
+#define TIMELOG                                                10
+#define MEMLOG                                         10
+#define MICROSECONDS_PER_SECOND                1000000
+#define BADGE_PACKAGE                          "native.badge-itc"
+//#define ERR_LOG                                      "/tmp/tclog"
+
+FILE *g_fpLog;
+
+//Add helper function declarations here
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d] Starting test : %s\\n", __LINE__ ,__FUNCTION__);\
+       if ( !g_bBadgeInit )\
+       {\
+               FPRINTF("[Line : %d] [badge_ITC] Precondition of badge create failed\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(eRetVal, API) {\
+       if (eRetVal == BADGE_ERROR_NONE)\
+       {\
+               if (DEBUG)\
+               {\
+                       FPRINTF("[Line : %d] [badge_ITC] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d] [badge_ITC] %s failed, error returned = %s \\n", __LINE__, API, BadgeGetError(eRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_LOOP(eRetVal, API, nFailCount) {\
+       if (eRetVal != BADGE_ERROR_NONE)\
+       {\
+               FPRINTF("[Line : %d] [badge_ITC] %s failed on iteration %d, error returned = %s \\n", __LINE__, API, nLoopCount, BadgeGetError(eRetVal));\
+               nFailCount++;\
+               continue;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog) {\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d] [badge_ITC] %s_MemoryLeakStatus : %s\\n", __LINE__, #api, memLog);\
+       }\
+}
+
+
+#define PRINT_SPEED_LOG(api, speedLog) {\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d] [badge_ITC] %s_TimeInMicrosec : %s\\n", __LINE__, #api, speedLog);\
+       }\
+}
+
+void BadgeFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3);
+void BadgeAllocateMemory(char **pszMem, char **pszSpeed1, char **pszSpeed2);
+char *BadgeGetError(int nRet);
+void BadgeGetMemAllocation(void);
+void BadgeExecutionDelay(char* pszAPITime);
+void BadgeGetTimeOfDay(void);
+void BadgeGetMemStatus(char *pszAPIMemory);
+
+/** @} */
+#endif  //_ITS_BADGE_COMMON_H_
diff --git a/src/itc/badge/ITs-badge.c b/src/itc/badge/ITs-badge.c
new file mode 100755 (executable)
index 0000000..8e0c652
--- /dev/null
@@ -0,0 +1,311 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-badge-common.h"
+
+/** @addtogroup itc-badge
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Badge
+struct timeval g_stBadgeStartTime;
+struct mallinfo g_stBadgeMemInfo;
+bool g_bBadgeInit = false;
+
+/**
+* @function            ITs_badge_startup
+* @description         Called before each test, creates a badge for the application itself.
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_badge_startup(void)
+{
+       g_bBadgeInit = false;
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       
+       badge_error_e eRetValue = badge_new(BADGE_PACKAGE);
+       if (eRetValue == BADGE_ERROR_NONE || eRetValue == BADGE_ERROR_ALREADY_EXIST)
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [badge_ITC] badge_new passed in startup\\n", __LINE__);
+#endif
+               g_bBadgeInit = true;
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [badge_ITC] badge_new failed in startup, error = %s\\n",__LINE__, BadgeGetError(eRetValue));
+               g_bBadgeInit = false;
+       }
+}
+
+/**
+* @function            ITs_badge_cleanup
+* @description         Called after each test, removes the created badge for the application
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_badge_cleanup(void)
+{
+       if(g_bBadgeInit)
+       {
+               badge_error_e eRetValue = badge_remove(BADGE_PACKAGE);
+               if (eRetValue == BADGE_ERROR_NONE)
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [badge_ITC] badge_remove passed in cleanup\\n", __LINE__);
+#endif
+                       g_bBadgeInit = false;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [badge_ITC] badge_remove failed in cleanup, error = %s\\n", __LINE__,BadgeGetError(eRetValue));
+               }
+       }
+}
+
+/** @addtogroup itc-badge-testcases
+*  @brief              Integration testcases for module badge
+*  @ingroup    itc-badge
+*  @{
+*/
+
+//& type: auto
+//& purpose: to create and remove a badge
+/**
+* @testcase                    ITc_badge_new_remove_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To create and remove a badge
+* @scenario                            Remove the badge created in startup\n
+*                                              Create a badge\n
+*                                              Remove badge\n
+*                                              Create a badge
+* @apicovered                  badge_new, badge_remove
+* @passcase                            If badge_new, badge_remove returns success
+* @failcase                            If badge_new, badge_remove returns false
+* @precondition                        badge should be created
+* @postcondition               badge should be removed
+*/
+int ITc_badge_new_remove_p(void)
+{
+       START_TEST;
+       int nLoopCount;
+       badge_error_e eRetValue = BADGE_ERROR_NONE;
+       char *pszBadgeNewRemoveMemLog = NULL;
+       char *pszBadgeNewSpeedLog = NULL;
+       char *pszBadgeRemoveSpeedLog = NULL;
+       int nNewFailCount = 0, nRemoveFailCount = 0;
+
+       eRetValue = badge_remove(BADGE_PACKAGE);
+       if (eRetValue != BADGE_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [badge_ITC] badge_remove failed, error returned = %s \\n", __LINE__ , BadgeGetError(eRetValue));
+               return 1;
+       }
+
+       BadgeAllocateMemory(&pszBadgeNewRemoveMemLog, &pszBadgeNewSpeedLog, &pszBadgeRemoveSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sleep(1);
+               BadgeGetMemAllocation();
+               BadgeGetTimeOfDay();
+               // Target API
+               eRetValue = badge_new(BADGE_PACKAGE);
+               BadgeExecutionDelay(pszBadgeNewSpeedLog);
+               PRINT_RESULT_LOOP(eRetValue, "badge_new", nNewFailCount);
+               sleep(1);
+
+               // Target API
+               BadgeGetTimeOfDay();
+               eRetValue = badge_remove(BADGE_PACKAGE);
+               BadgeExecutionDelay(pszBadgeRemoveSpeedLog);
+               PRINT_RESULT_LOOP(eRetValue, "badge_remove", nRemoveFailCount);
+               BadgeGetMemStatus(pszBadgeNewRemoveMemLog);
+       }
+
+       eRetValue = badge_new(BADGE_PACKAGE);
+       if (eRetValue != BADGE_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [badge_ITC] badge_new failed after loop, error returned = %s \\n", __LINE__ , BadgeGetError(eRetValue));
+       }
+
+       if (nRemoveFailCount || nNewFailCount)
+       {
+               FPRINTF("[Line : %d] [badge_ITC] badge_new failed %d times, badge_remove failed %d times out of %d times\\n", __LINE__ , nNewFailCount, nRemoveFailCount, MAX_COUNT);
+               BadgeFreeMemory(pszBadgeNewRemoveMemLog, pszBadgeNewSpeedLog, pszBadgeRemoveSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(badge_new, pszBadgeNewSpeedLog);
+       PRINT_SPEED_LOG(badge_remove, pszBadgeRemoveSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(badge_new_remove, pszBadgeNewRemoveMemLog);
+#endif
+       BadgeFreeMemory(pszBadgeNewRemoveMemLog, pszBadgeNewSpeedLog, pszBadgeRemoveSpeedLog);
+       return 0;
+
+}
+
+//& type: auto
+//& purpose: to set and get badge count for the designated package
+/**
+* @testcase                    ITc_badge_set_get_count_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To set and get badge count for the designated package
+* @scenario                            Set badge count for the designated package\n
+*                                              Get badge count for the designated package\n
+*                                              Compare set and get values
+* @apicovered                  badge_set_count, badge_get_count
+* @passcase                            If badge_set_count, badge_get_count returns success and set get values are same
+* @failcase                            If either badge_set_count or badge_get_count returns false or set get values are not same
+* @precondition                        badge should be created
+* @postcondition               badge should be removed
+*/
+int ITc_badge_set_get_count_p(void)
+{
+       START_TEST;
+       int nLoopCount;
+       badge_error_e eRetValue = BADGE_ERROR_NONE;
+       char *pszBadgeSetGetMemLog = NULL;
+       char *pszBadgeSetSpeedLog = NULL;
+       char *pszBadgeGetSpeedLog = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+       unsigned int unSetCount = 2, unGetCount = 0;
+
+       BadgeAllocateMemory(&pszBadgeSetGetMemLog, &pszBadgeSetSpeedLog, &pszBadgeGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BadgeGetMemAllocation();
+               BadgeGetTimeOfDay();
+               // Target API
+               eRetValue = badge_set_count(BADGE_PACKAGE, unSetCount);
+               BadgeExecutionDelay(pszBadgeSetSpeedLog);
+               PRINT_RESULT_LOOP(eRetValue, "badge_set_count", nSetFailCount);
+
+               BadgeGetTimeOfDay();
+               // Target API
+               eRetValue = badge_get_count(BADGE_PACKAGE, &unGetCount);
+               BadgeExecutionDelay(pszBadgeGetSpeedLog);
+               PRINT_RESULT_LOOP(eRetValue, "badge_get_count", nGetFailCount);
+
+               if(unGetCount != unSetCount)
+               {
+                       FPRINTF("[Line : %d] [badge_ITC] badge_get_count failed on iteration %d, error returned = get and set values are not same \\n", __LINE__ , nLoopCount);
+                       nMismatchCount++;
+               }
+               BadgeGetMemStatus(pszBadgeSetGetMemLog);
+       }
+
+       if (nMismatchCount || nGetFailCount || nSetFailCount)
+       {
+               FPRINTF("[Line : %d] [badge_ITC] badge_set_count failed %d times badge_get_count failed %d times, mismatch in set and get value %d times out of %d times \\n", __LINE__ , nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               BadgeFreeMemory(pszBadgeSetGetMemLog, pszBadgeSetSpeedLog, pszBadgeGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(badge_set_count, pszBadgeSetSpeedLog);
+       PRINT_SPEED_LOG(badge_get_count, pszBadgeGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(badge_set_get_count, pszBadgeSetGetMemLog);
+#endif
+       BadgeFreeMemory(pszBadgeSetGetMemLog, pszBadgeSetSpeedLog, pszBadgeGetSpeedLog);
+       return 0;
+
+}
+
+//& type: auto
+//& purpose: to set and get the display option for the designated package.
+/**
+* @testcase                    ITc_badge_set_get_display_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To set and get the display option for the designated package.
+* @scenario                            Set the display option for the designated package\n
+*                                              Get the display option for the designated package\n
+*                                              Compare set and get values
+* @apicovered                  badge_set_display, badge_get_display
+* @passcase                            If badge_set_display, badge_get_display returns success and set get values are same
+* @failcase                            If either badge_set_display or badge_get_display returns false or set get values are not same
+* @precondition                        badge should be created
+* @postcondition               badge should be removed
+*/
+int ITc_badge_set_get_display_p(void)
+{
+       START_TEST;
+       int nLoopCount;
+       badge_error_e eRetValue = BADGE_ERROR_NONE;
+       char *pszBadgeSetGetMemLog = NULL;
+       char *pszBadgeSetSpeedLog = NULL;
+       char *pszBadgeGetSpeedLog = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+       unsigned int unSetDisplay = 1, unGetDisplay = 0;
+
+       BadgeAllocateMemory(&pszBadgeSetGetMemLog, &pszBadgeSetSpeedLog, &pszBadgeGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BadgeGetMemAllocation();
+               BadgeGetTimeOfDay();
+               // Target API
+               eRetValue =  badge_set_display(BADGE_PACKAGE, unSetDisplay);
+               BadgeExecutionDelay(pszBadgeSetSpeedLog);
+               PRINT_RESULT_LOOP(eRetValue, "badge_set_display", nSetFailCount);
+
+               BadgeGetTimeOfDay();
+               // Target API
+               eRetValue = badge_get_display(BADGE_PACKAGE, &unGetDisplay);
+               BadgeExecutionDelay(pszBadgeGetSpeedLog);
+               PRINT_RESULT_LOOP(eRetValue, "badge_get_display", nGetFailCount);
+
+               if(unGetDisplay != unSetDisplay)
+               {
+                       FPRINTF("[Line : %d] [badge_ITC] badge_get_display failed on iteration %d, error returned = get and set values are not same\\n", __LINE__ , nLoopCount);
+                       nMismatchCount++;
+               }
+               BadgeGetMemStatus(pszBadgeSetGetMemLog);
+       }
+
+       if (nMismatchCount || nGetFailCount || nSetFailCount)
+       {
+               FPRINTF("[Line : %d] [badge_ITC] badge_set_display failed %d times badge_set_display failed %d times, mismatch in set and get value %d times out of %d times \\n", __LINE__ , nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               BadgeFreeMemory(pszBadgeSetGetMemLog, pszBadgeSetSpeedLog, pszBadgeGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(badge_set_display, pszBadgeSetSpeedLog);
+       PRINT_SPEED_LOG(badge_set_display, pszBadgeGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(badge_set_get_display, pszBadgeSetGetMemLog);
+#endif
+       BadgeFreeMemory(pszBadgeSetGetMemLog, pszBadgeSetSpeedLog, pszBadgeGetSpeedLog);
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/badge/tct-badge-native.c b/src/itc/badge/tct-badge-native.c
new file mode 100755 (executable)
index 0000000..3931a43
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-badge-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/badge/tct-badge-native.h b/src/itc/badge/tct-badge-native.h
new file mode 100755 (executable)
index 0000000..f2e3a52
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_BADGE_NATIVE_H__
+#define __TCT_BADGE_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_badge_startup(void);
+extern void ITs_badge_cleanup(void);
+
+extern int ITc_badge_new_remove_p(void);
+extern int ITc_badge_set_get_count_p(void);
+extern int ITc_badge_set_get_display_p(void);
+
+testcase tc_array[] = {
+    {"ITc_badge_new_remove_p", ITc_badge_new_remove_p, ITs_badge_startup, ITs_badge_cleanup},
+    {"ITc_badge_set_get_count_p", ITc_badge_set_get_count_p, ITs_badge_startup, ITs_badge_cleanup},
+    {"ITc_badge_set_get_display_p", ITc_badge_set_get_display_p, ITs_badge_startup, ITs_badge_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_BADGE_NATIVE_H__
diff --git a/src/itc/base-utils/CMakeLists.txt b/src/itc/base-utils/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..db1b450
--- /dev/null
@@ -0,0 +1,44 @@
+SET(PKG_NAME "base-utils")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-base-utils-i18n")
+SET(TC_SOURCES
+       ITs-base-utils-common.c
+       ITs-base-utils.c
+       ITs-base-utils-locale.c
+       ITs-base-utils-ucalendar.c
+       ITs-base-utils-udate.c
+       ITs-base-utils-ubrk.c
+       ITs-base-utils-unumber.c
+       ITs-base-utils-udatepg.c
+       ITs-base-utils-uenumeration.c
+       ITs-base-utils-ulocale.c
+       ITs-base-utils-uset.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/base-utils/ITs-base-utils-common.c b/src/itc/base-utils/ITs-base-utils-common.c
new file mode 100755 (executable)
index 0000000..aeb37a7
--- /dev/null
@@ -0,0 +1,1179 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-base-utils-common.h"
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function definitions here
+extern struct timeval g_stBaseUtilsStartTime;
+extern struct mallinfo g_stBaseUtilsMemInfo;
+/**
+* @function            BaseUtilsGetError
+* @description         Maps error enums to string values
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* BaseUtilsGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               //case I18N_ERROR_ILLEGAL_ARGUMENT:                             szErrorVal = "I18N_ERROR_ILLEGAL_ARGUMENT";                                     break;
+               case I18N_ERROR_MISSING_RESOURCE:                               szErrorVal = "I18N_ERROR_MISSING_RESOURCE";                                     break;
+               case I18N_ERROR_INVALID_FORMAT:                                 szErrorVal = "I18N_ERROR_INVALID_FORMAT";                                       break;
+               case I18N_ERROR_FILE_ACCESS:                                    szErrorVal = "I18N_ERROR_FILE_ACCESS";                                          break;
+               case I18N_ERROR_INTERNAL_PROGRAM:                               szErrorVal = "I18N_ERROR_INTERNAL_PROGRAM";                                     break;
+               //case I18N_ERROR_MEMORY_ALLOCATION:                    szErrorVal = "I18N_ERROR_MEMORY_ALLOCATION";                            break;
+               case I18N_ERROR_INDEX_OUTOFBOUNDS:                              szErrorVal = "I18N_ERROR_INDEX_OUTOFBOUNDS";                            break;
+               case I18N_ERROR_INVALID_CHAR_FOUND:                             szErrorVal = "I18N_ERROR_INVALID_CHAR_FOUND";                           break;
+               case I18N_ERROR_BUFFER_OVERFLOW:                                szErrorVal = "I18N_ERROR_BUFFER_OVERFLOW";                                      break;
+               //case I18N_ERROR_UNSUPPORTED:                                  szErrorVal = "I18N_ERROR_UNSUPPORTED";                                          break;
+               case I18N_ERROR_COLLATOR_VERSION_MISMATCH:              szErrorVal = "I18N_ERROR_COLLATOR_VERSION_MISMATCH";            break;
+               case I18N_ERROR_USELESS_COLLATOR:                               szErrorVal = "I18N_ERROR_USELESS_COLLATOR";                                     break;
+               case I18N_ERROR_NO_WRITE_PERMISSION:                    szErrorVal = "I18N_ERROR_NO_WRITE_PERMISSION";                          break;
+               case I18N_ERROR_RESOURCE_TYPE_MISMATCH:                 szErrorVal = "I18N_ERROR_RESOURCE_TYPE_MISMATCH";                       break;
+               case I18N_ERROR_TOO_MANY_ALIASES:                               szErrorVal = "I18N_ERROR_TOO_MANY_ALIASES";                                     break;
+               case I18N_ERROR_INVALID_PARAMETER:                              szErrorVal = "I18N_ERROR_INVALID_PARAMETER";                            break;
+               default:                                                                                szErrorVal = "I18N_ERROR_UNKNOWN";                                                      break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            UcalenderGetType
+* @description         Maps Ucalender Type enum values to string.
+* @parameter           nRet: result code returned
+* @return                      Ucalender Type represented as string
+*/
+char* UcalenderGetType(int nRet)
+{
+       char *szUcalenderType = NULL;
+
+       switch ( nRet )
+       {
+       case I18N_UCALENDAR_TRADITIONAL:                szUcalenderType = "I18N_UCALENDAR_TRADITIONAL";         break;
+       case I18N_UCALENDAR_GREGORIAN:                  szUcalenderType = "I18N_UCALENDAR_GREGORIAN";           break;
+       default:                                                                szUcalenderType = "Unknown Ucalender Type";                     break;
+       }
+       return szUcalenderType;
+}
+
+/**
+* @function            UnormalizationModeValue
+* @description         Maps Unormalization Mode Values to string.
+* @parameter           nRet: result code returned
+* @return                      Unormalization Mode Value represented as string
+*/
+char* UnormalizationModeValue(int nRet)
+{
+       char *szUnormalizationMode = NULL;
+
+       switch ( nRet )
+       {
+       case I18N_UNORMALIZATION_COMPOSE:                               szUnormalizationMode = "I18N_UNORMALIZATION_COMPOSE";                           break;
+       case I18N_UNORMALIZATION_DECOMPOSE:                     szUnormalizationMode = "I18N_UNORMALIZATION_DECOMPOSE";                         break;
+       case I18N_UNORMALIZATION_FCD:                                   szUnormalizationMode = "I18N_UNORMALIZATION_FCD";                                       break;
+       case I18N_UNORMALIZATION_COMPOSE_CONTIGUOUS:    szUnormalizationMode = "I18N_UNORMALIZATION_COMPOSE_CONTIGUOUS";        break;
+       default:                                                                                szUnormalizationMode = "Unknown Unormalization Mode";                           break;
+       }
+       return szUnormalizationMode;
+}
+
+/**
+* @function            UcalenderDateFieldValue
+* @description         Maps Ucalender DateField Type enum values to string.
+* @parameter           nRet: result code returned
+* @return                      Ucalender DateField Type represented as string
+*/
+char* UcalenderDateFieldValue(int nRet)
+{
+       char *szUcalenderDFType = NULL;
+
+       switch ( nRet )
+       {
+       case I18N_UCALENDAR_ERA:                                                szUcalenderDFType = "I18N_UCALENDAR_ERA";                                               break;
+       case I18N_UCALENDAR_YEAR:                                               szUcalenderDFType = "I18N_UCALENDAR_YEAR";                                              break;
+       case I18N_UCALENDAR_MONTH:                                              szUcalenderDFType = "I18N_UCALENDAR_MONTH";                                             break;
+       case I18N_UCALENDAR_WEEK_OF_YEAR:                               szUcalenderDFType = "I18N_UCALENDAR_WEEK_OF_YEAR";                              break;
+       case I18N_UCALENDAR_WEEK_OF_MONTH:                              szUcalenderDFType = "I18N_UCALENDAR_WEEK_OF_MONTH";                             break;
+       case I18N_UCALENDAR_DATE:                                               szUcalenderDFType = "I18N_UCALENDAR_DATE";                                              break;
+       case I18N_UCALENDAR_DAY_OF_YEAR:                                szUcalenderDFType = "I18N_UCALENDAR_DAY_OF_YEAR";                               break;
+       case I18N_UCALENDAR_DAY_OF_WEEK:                                szUcalenderDFType = "I18N_UCALENDAR_DAY_OF_WEEK";                               break;
+       case I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH:               szUcalenderDFType = "I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH";              break;
+       case I18N_UCALENDAR_AM_PM:                                              szUcalenderDFType = "I18N_UCALENDAR_AM_PM";                                             break;
+       case I18N_UCALENDAR_HOUR:                                               szUcalenderDFType = "I18N_UCALENDAR_HOUR";                                              break;
+       case I18N_UCALENDAR_HOUR_OF_DAY:                                szUcalenderDFType = "I18N_UCALENDAR_HOUR_OF_DAY";                               break;
+       case I18N_UCALENDAR_MINUTE:                                             szUcalenderDFType = "I18N_UCALENDAR_MINUTE";                                    break;
+       case I18N_UCALENDAR_SECOND:                                             szUcalenderDFType = "I18N_UCALENDAR_SECOND";                                    break;
+       case I18N_UCALENDAR_MILLISECOND:                                szUcalenderDFType = "I18N_UCALENDAR_MILLISECOND";                               break;
+       case I18N_UCALENDAR_ZONE_OFFSET:                                szUcalenderDFType = "I18N_UCALENDAR_ZONE_OFFSET";                               break;
+       case I18N_UCALENDAR_DST_OFFSET:                                 szUcalenderDFType = "I18N_UCALENDAR_DST_OFFSET";                                break;
+       case I18N_UCALENDAR_YEAR_WOY:                                   szUcalenderDFType = "I18N_UCALENDAR_YEAR_WOY";                                  break;
+       case I18N_UCALENDAR_DOW_LOCAL:                                  szUcalenderDFType = "I18N_UCALENDAR_DOW_LOCAL";                                 break;
+       case I18N_UCALENDAR_EXTENDED_YEAR:                              szUcalenderDFType = "I18N_UCALENDAR_EXTENDED_YEAR";                             break;
+       case I18N_UCALENDAR_JULIAN_DAY:                                 szUcalenderDFType = "I18N_UCALENDAR_JULIAN_DAY";                                break;
+       case I18N_UCALENDAR_MILLISECONDS_IN_DAY:                szUcalenderDFType = "I18N_UCALENDAR_MILLISECONDS_IN_DAY";               break;
+       case I18N_UCALENDAR_IS_LEAP_MONTH:                              szUcalenderDFType = "I18N_UCALENDAR_IS_LEAP_MONTH";                             break;
+       case I18N_UCALENDAR_FIELD_COUNT:                                szUcalenderDFType = "I18N_UCALENDAR_FIELD_COUNT";                               break;
+       default:                                                                                szUcalenderDFType = "Unknown Ucalender Date Field Type Value";  break;
+       }
+       return szUcalenderDFType;
+}
+
+/**
+* @function            UcalenderGetAttributeType
+* @description         Maps Ucalender Attributes Type values to string.
+* @parameter           nRet: result code returned
+* @return                      Ucalender Attributes Type value represented as string
+*/
+char* UcalenderGetAttributeType(int nRet)
+{
+       char *szUcalenderType = NULL;
+
+       switch ( nRet )
+       {
+       case I18N_UCALENDAR_LENIENT:                                            szUcalenderType = "I18N_UCALENDAR_LENIENT";                                             break;
+       case I18N_UCALENDAR_FIRST_DAY_OF_WEEK:                          szUcalenderType = "I18N_UCALENDAR_FIRST_DAY_OF_WEEK";                   break;
+       case I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK:         szUcalenderType = "I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK";  break;
+       default:                                                                                        szUcalenderType = "Unknown Type";                                                               break;
+       }
+       return szUcalenderType;
+}
+
+/**
+* @function            UcalenderGetDisplayNameType
+* @description         Maps Ucalender DisplayName Type enum values to string.
+* @parameter           nRet: result code returned
+* @return                      Ucalender DisplayName Type represented as string
+*/
+char* UcalenderGetDisplayNameType(int nRet)
+{
+       char *szDisplayNameTypeVal = NULL;
+
+       switch ( nRet )
+       {
+       case I18N_UCALENDAR_STANDARD:                           szDisplayNameTypeVal = "I18N_UCALENDAR_STANDARD";                               break;
+       case I18N_UCALENDAR_SHORT_STANDARD:             szDisplayNameTypeVal = "I18N_UCALENDAR_SHORT_STANDARD";                 break;
+       case I18N_UCALENDAR_DST:                                        szDisplayNameTypeVal = "I18N_UCALENDAR_DST";                                    break;
+       case I18N_UCALENDAR_SHORT_DST:                          szDisplayNameTypeVal = "I18N_UCALENDAR_SHORT_DST";                              break;
+       default:                                                                        szDisplayNameTypeVal = "Unknown Type";                                                  break;
+       }
+       return szDisplayNameTypeVal;
+}
+
+/**
+* @function            UnumberGetFormatStyle
+* @description         Maps Style of given unumber style format enum values to string.
+* @parameter           nRet: result code returned
+* @return                      Type represented as string
+*/
+char* UnumberGetFormatStyle(int nRet)
+{
+       char *szStyleVal = NULL;
+
+       switch ( nRet )
+       {
+       case I18N_UNUMBER_PATTERN_DECIMAL:                      szStyleVal = "I18N_UNUMBER_PATTERN_DECIMAL";                    break;
+       case I18N_UNUMBER_CURRENCY:                             szStyleVal = "I18N_UNUMBER_CURRENCY";                                   break;
+       case I18N_UNUMBER_PERCENT:                                      szStyleVal = "I18N_UNUMBER_PERCENT";                                    break;
+       case I18N_UNUMBER_SCIENTIFIC:                           szStyleVal = "I18N_UNUMBER_SCIENTIFIC";                                 break;
+       case I18N_UNUMBER_SPELLOUT:                             szStyleVal = "I18N_UNUMBER_SPELLOUT";                                   break;
+       case I18N_UNUMBER_ORDINAL:                                      szStyleVal = "I18N_UNUMBER_ORDINAL";                                    break;
+       case I18N_UNUMBER_DURATION:                             szStyleVal = "I18N_UNUMBER_DURATION";                                   break;
+       case I18N_UNUMBER_NUMBERING_SYSTEM:             szStyleVal = "I18N_UNUMBER_NUMBERING_SYSTEM";                   break;
+       case I18N_UNUMBER_PATTERN_RULEBASED:            szStyleVal = "I18N_UNUMBER_PATTERN_RULEBASED";                  break;
+       case I18N_UNUMBER_CURRENCY_ISO:                         szStyleVal = "I18N_UNUMBER_CURRENCY_ISO";                               break;
+       case I18N_UNUMBER_CURRENCY_PLURAL:                      szStyleVal = "I18N_UNUMBER_CURRENCY_PLURAL";                    break;
+       case I18N_UNUMBER_FORMAT_STYLE_COUNT:           szStyleVal = "I18N_UNUMBER_FORMAT_STYLE_COUNT";                 break;
+       case I18N_UNUMBER_DECIMAL:                                      szStyleVal = "I18N_UNUMBER_DECIMAL";                                    break;
+       default:                                                                        szStyleVal = "Unknown Unumber Format Style";                    break;
+       }
+       return szStyleVal;
+}
+
+/**
+* @function            UnumberGetFormatSymbol
+* @description         Maps symbol of given unumber format enum values to string.
+* @parameter           nRet: result code returned
+* @return                      Type represented as string
+*/
+char* UnumberGetFormatSymbol(int nRet)
+{
+       char *szSymbolVal = NULL;
+
+       switch ( nRet )
+       {
+       case I18N_UNUMBER_DECIMAL_SEPARATOR_SYMBOL:                                     szSymbolVal = "I18N_UNUMBER_DECIMAL_SEPARATOR_SYMBOL";                          break;
+       case I18N_UNUMBER_GROUPING_SEPARATOR_SYMBOL:                                    szSymbolVal = "I18N_UNUMBER_GROUPING_SEPARATOR_SYMBOL";                         break;
+       case I18N_UNUMBER_PATTERN_SEPARATOR_SYMBOL:                                     szSymbolVal = "I18N_UNUMBER_PATTERN_SEPARATOR_SYMBOL";                          break;
+       case I18N_UNUMBER_ZERO_DIGIT_SYMBOL:                                                    szSymbolVal = "I18N_UNUMBER_ZERO_DIGIT_SYMBOL";                                         break;
+       case I18N_UNUMBER_PERCENT_SYMBOL:                                                               szSymbolVal = "I18N_UNUMBER_PERCENT_SYMBOL";                                            break;
+       case I18N_UNUMBER_DIGIT_SYMBOL:                                                                 szSymbolVal = "I18N_UNUMBER_DIGIT_SYMBOL";                                                      break;
+       case I18N_UNUMBER_MINUS_SIGN_SYMBOL:                                                    szSymbolVal = "I18N_UNUMBER_MINUS_SIGN_SYMBOL";                                         break;
+       case I18N_UNUMBER_PLUS_SIGN_SYMBOL:                                                     szSymbolVal = "I18N_UNUMBER_PLUS_SIGN_SYMBOL";                                          break;
+       case I18N_UNUMBER_CURRENCY_SYMBOL:                                                              szSymbolVal = "I18N_UNUMBER_CURRENCY_SYMBOL";                                           break;
+       case I18N_UNUMBER_INTL_CURRENCY_SYMBOL:                                                 szSymbolVal = "I18N_UNUMBER_INTL_CURRENCY_SYMBOL";                                      break;
+       case I18N_UNUMBER_MONETARY_SEPARATOR_SYMBOL:                                    szSymbolVal = "I18N_UNUMBER_MONETARY_SEPARATOR_SYMBOL";                         break;
+       case I18N_UNUMBER_EXPONENTIAL_SYMBOL:                                                   szSymbolVal = "I18N_UNUMBER_EXPONENTIAL_SYMBOL";                                        break;
+       case I18N_UNUMBER_PERMILL_SYMBOL:                                                               szSymbolVal = "I18N_UNUMBER_PERMILL_SYMBOL";                                            break;
+       case I18N_UNUMBER_PAD_ESCAPE_SYMBOL:                                                    szSymbolVal = "I18N_UNUMBER_PAD_ESCAPE_SYMBOL";                                         break;
+       case I18N_UNUMBER_INFINITY_SYMBOL:                                                              szSymbolVal = "I18N_UNUMBER_INFINITY_SYMBOL";                                           break;
+       case I18N_UNUMBER_NAN_SYMBOL:                                                                   szSymbolVal = "I18N_UNUMBER_NAN_SYMBOL";                                                        break;
+       case I18N_UNUMBER_SIGNIFICANT_DIGIT_SYMBOL:                                     szSymbolVal = "I18N_UNUMBER_SIGNIFICANT_DIGIT_SYMBOL";                          break;
+       case I18N_UNUMBER_MONETARY_GROUPING_SEPARATOR_SYMBOL:                   szSymbolVal = "I18N_UNUMBER_MONETARY_GROUPING_SEPARATOR_SYMBOL";        break;
+       case I18N_UNUMBER_ONE_DIGIT_SYMBOL:                                                     szSymbolVal = "I18N_UNUMBER_ONE_DIGIT_SYMBOL";                                          break;
+       case I18N_UNUMBER_TWO_DIGIT_SYMBOL:                                                     szSymbolVal = "I18N_UNUMBER_TWO_DIGIT_SYMBOL";                                          break;
+       case I18N_UNUMBER_THREE_DIGIT_SYMBOL:                                                   szSymbolVal = "I18N_UNUMBER_THREE_DIGIT_SYMBOL";                                        break;
+       case I18N_UNUMBER_FOUR_DIGIT_SYMBOL:                                                    szSymbolVal = "I18N_UNUMBER_FOUR_DIGIT_SYMBOL";                                         break;
+       case I18N_UNUMBER_FIVE_DIGIT_SYMBOL:                                                    szSymbolVal = "I18N_UNUMBER_FIVE_DIGIT_SYMBOL";                                         break;
+       case I18N_UNUMBER_SIX_DIGIT_SYMBOL:                                                     szSymbolVal = "I18N_UNUMBER_SIX_DIGIT_SYMBOL";                                          break;
+       case I18N_UNUMBER_SEVEN_DIGIT_SYMBOL:                                                   szSymbolVal = "I18N_UNUMBER_SEVEN_DIGIT_SYMBOL";                                        break;
+       case I18N_UNUMBER_EIGHT_DIGIT_SYMBOL:                                                   szSymbolVal = "I18N_UNUMBER_EIGHT_DIGIT_SYMBOL";                                        break;
+       case I18N_UNUMBER_NINE_DIGIT_SYMBOL:                                                    szSymbolVal = "I18N_UNUMBER_NINE_DIGIT_SYMBOL";                                         break;
+       case I18N_UNUMBER_FORMAT_SYMBOL_COUNT:                                                  szSymbolVal = "I18N_UNUMBER_FORMAT_SYMBOL_COUNT";                                       break;
+       default:                                                                                                                szSymbolVal = "Unknown Style";                                                                          break;
+       }
+       return szSymbolVal;
+}
+
+/**
+ * @function           UdateGetFormatStyle
+ * @description                Maps symbol of given udate format enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     Type represented as string
+ */
+char* UdateGetFormatStyle(int nRet)
+{
+       char *szFormatStyleVal = NULL;
+
+       switch ( nRet )
+       {
+       case I18N_UDATE_FULL:                           szFormatStyleVal = "I18N_UDATE_FULL";                           break;
+       case I18N_UDATE_LONG:                           szFormatStyleVal = "I18N_UDATE_LONG";                           break;
+       case I18N_UDATE_MEDIUM:                         szFormatStyleVal = "I18N_UDATE_MEDIUM";                         break;
+       case I18N_UDATE_SHORT:                          szFormatStyleVal = "I18N_UDATE_SHORT";                          break;
+       //case I18N_UDATE_DEFAULT:                      szFormatStyleVal = "I18N_UDATE_DEFAULT";                        break;
+       case I18N_UDATE_RELATIVE:                       szFormatStyleVal = "I18N_UDATE_RELATIVE";                       break;
+       case I18N_UDATE_LONG_RELATIVE:  szFormatStyleVal = "I18N_UDATE_LONG_RELATIVE";                  break;
+       case I18N_UDATE_MEDIUM_RELATIVE:        szFormatStyleVal = "I18N_UDATE_MEDIUM_RELATIVE";        break;
+       case I18N_UDATE_SHORT_RELATIVE:         szFormatStyleVal = "I18N_UDATE_SHORT_RELATIVE";         break;
+       case I18N_UDATE_NONE:                           szFormatStyleVal = "I18N_UDATE_NONE";                           break;
+       default:                                                        szFormatStyleVal = "Unknown Style";                                     break;
+       }
+       return szFormatStyleVal;
+}
+
+/**
+ * @function           UcalendarGetTimezoneType
+ * @description                Maps symbol of given timezone type enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     Type represented as string
+ */
+char* UcalendarGetTimezoneType(int nRet)
+{
+       char *pszReturnString = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UCALENDAR_ZONE_TYPE_ANY:                                      pszReturnString = "I18N_UCALENDAR_ZONE_TYPE_ANY";                                       break;
+               case I18N_UCALENDAR_ZONE_TYPE_CANONICAL:                        pszReturnString = "I18N_UCALENDAR_ZONE_TYPE_CANONICAL";                         break;
+               case I18N_UCALENDAR_ZONE_TYPE_CANONICAL_LOCATION:       pszReturnString = "I18N_UCALENDAR_ZONE_TYPE_CANONICAL_LOCATION";        break;
+               default:                                                                                        pszReturnString = "Unknown Timezone type";                                                      break;
+       }
+       return pszReturnString;
+}
+
+/**
+ * @function           UcalendarGetLimitType
+ * @description                Maps symbol of given limit type enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     Type represented as string
+ */
+char* UcalendarGetLimitType(int nRet)
+{
+       char *pszReturnString = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UCALENDAR_MINIMUM:                            pszReturnString = "I18N_UCALENDAR_MINIMUM";                                     break;
+               case I18N_UCALENDAR_MAXIMUM:                            pszReturnString = "I18N_UCALENDAR_MAXIMUM";                                     break;
+               case I18N_UCALENDAR_GREATEST_MINIMUM:           pszReturnString = "I18N_UCALENDAR_GREATEST_MINIMUM";            break;
+               case I18N_UCALENDAR_LEAST_MAXIMUM:                      pszReturnString = "I18N_UCALENDAR_LEAST_MAXIMUM";                       break;
+               case I18N_UCALENDAR_ACTUAL_MINIMUM:                     pszReturnString = "I18N_UCALENDAR_ACTUAL_MINIMUM";                      break;
+               case I18N_UCALENDAR_ACTUAL_MAXIMUM:                     pszReturnString = "I18N_UCALENDAR_ACTUAL_MAXIMUM";                      break;
+               default:                                                                        pszReturnString = "Unknown Limit type";                                         break;
+       }
+       return pszReturnString;
+}
+
+/**
+ * @function           UcalendarGetLocaleType
+ * @description                Maps symbol of given locale type enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     Type represented as string
+ */
+char* UcalendarGetLocaleType(int nRet)
+{
+       char *pszReturnString = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE:               pszReturnString = "I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE";                break;
+               case I18N_ULOCALE_DATA_LOCALE_TYPE_VALID_LOCALE:                pszReturnString = "I18N_ULOCALE_DATA_LOCALE_TYPE_VALID_LOCALE";                 break;
+               default:                                                                                                pszReturnString = "Unknown Locale type";                                                                break;
+       }
+       return pszReturnString;
+}
+
+/**
+ * @function           UcalendarGetDaysOfWeek
+ * @description                Maps symbol of given day of week enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     Type represented as string
+ */
+char* UcalendarGetDaysOfWeek(int nRet)
+{
+       char *pszReturnString = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UCALENDAR_SUNDAY:                     pszReturnString = "I18N_UCALENDAR_SUNDAY";                              break;
+               case I18N_UCALENDAR_MONDAY:                     pszReturnString = "I18N_UCALENDAR_MONDAY";                              break;
+               case I18N_UCALENDAR_TUESDAY:            pszReturnString = "I18N_UCALENDAR_TUESDAY";                             break;
+               case I18N_UCALENDAR_WEDNESDAY:          pszReturnString = "I18N_UCALENDAR_WEDNESDAY";                   break;
+               case I18N_UCALENDAR_THURSDAY:           pszReturnString = "I18N_UCALENDAR_THURSDAY";                    break;
+               case I18N_UCALENDAR_FRIDAY:                     pszReturnString = "I18N_UCALENDAR_FRIDAY";                              break;
+               case I18N_UCALENDAR_SATURDAY:           pszReturnString = "I18N_UCALENDAR_SATURDAY";                    break;
+               default:                                                        pszReturnString = "Unknown day of the week";                    break;
+       }
+       return pszReturnString;
+}
+
+/**
+ * @function           UcalendarGetTimezoneTransitionType
+ * @description                Maps symbol of given day of week enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     Type represented as string
+ */
+char* UcalendarGetTimezoneTransitionType(int nRet)
+{
+       char *pszReturnString = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UCALENDAR_TZ_TRANSITION_NEXT:                                 pszReturnString = "I18N_UCALENDAR_TZ_TRANSITION_NEXT";                                  break;
+               case I18N_UCALENDAR_TZ_TRANSITION_NEXT_INCLUSIVE:               pszReturnString = "I18N_UCALENDAR_TZ_TRANSITION_NEXT_INCLUSIVE";                break;
+               case I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS:                             pszReturnString = "I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS";                              break;
+               case I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS_INCLUSIVE:   pszReturnString = "I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS_INCLUSIVE";    break;
+               default:                                                                                                pszReturnString = "Unknown Timezone transition type";                                   break;
+       }
+       return pszReturnString;
+}
+
+/**
+ * @function           UdateGetDateFormatFieldValue
+ * @description                Maps Udate Date Format Field enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     Udate Date Format Field represented as string
+ */
+char* UdateGetDateFormatFieldValue(int nRet)
+{
+       char *szUcalenderDFType = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UDATE_FORMAT_ERA_FIELD:                                                               szUcalenderDFType = "I18N_UDATE_FORMAT_ERA_FIELD";                                                              break;
+               case I18N_UDATE_FORMAT_YEAR_FIELD:                                                              szUcalenderDFType = "I18N_UDATE_FORMAT_YEAR_FIELD";                                                             break;
+               case I18N_UDATE_FORMAT_MONTH_FIELD:                                                             szUcalenderDFType = "I18N_UDATE_FORMAT_MONTH_FIELD";                                                    break;
+               case I18N_UDATE_FORMAT_DATE_FIELD:                                                              szUcalenderDFType = "I18N_UDATE_FORMAT_DATE_FIELD";                                                             break;
+               case I18N_UDATE_FORMAT_HOUR_OF_DAY1_FIELD:                                              szUcalenderDFType = "I18N_UDATE_FORMAT_HOUR_OF_DAY1_FIELD";                                             break;
+               case I18N_UDATE_FORMAT_HOUR_OF_DAY0_FIELD:                                              szUcalenderDFType = "I18N_UDATE_FORMAT_HOUR_OF_DAY0_FIELD";                                             break;
+               case I18N_UDATE_FORMAT_MINUTE_FIELD:                                                    szUcalenderDFType = "I18N_UDATE_FORMAT_MINUTE_FIELD";                                                   break;
+               case I18N_UDATE_FORMAT_SECOND_FIELD:                                                    szUcalenderDFType = "I18N_UDATE_FORMAT_SECOND_FIELD";                                                   break;
+               case I18N_UDATE_FORMAT_FRACTIONAL_SECOND_FIELD:                                 szUcalenderDFType = "I18N_UDATE_FORMAT_FRACTIONAL_SECOND_FIELD";                                break;
+               case I18N_UDATE_FORMAT_DAY_OF_WEEK_FIELD:                                               szUcalenderDFType = "I18N_UDATE_FORMAT_DAY_OF_WEEK_FIELD";                                              break;
+               case I18N_UDATE_FORMAT_DAY_OF_YEAR_FIELD:                                               szUcalenderDFType = "I18N_UDATE_FORMAT_DAY_OF_YEAR_FIELD";                                              break;
+               case I18N_UDATE_FORMAT_DAY_OF_WEEK_IN_MONTH_FIELD:                              szUcalenderDFType = "I18N_UDATE_FORMAT_DAY_OF_WEEK_IN_MONTH_FIELD";                             break;
+               case I18N_UDATE_FORMAT_WEEK_OF_YEAR_FIELD:                                              szUcalenderDFType = "I18N_UDATE_FORMAT_WEEK_OF_YEAR_FIELD";                                             break;
+               case I18N_UDATE_FORMAT_WEEK_OF_MONTH_FIELD:                                             szUcalenderDFType = "I18N_UDATE_FORMAT_WEEK_OF_MONTH_FIELD";                                    break;
+               case I18N_UDATE_FORMAT_AM_PM_FIELD:                                                             szUcalenderDFType = "I18N_UDATE_FORMAT_AM_PM_FIELD";                                                    break;
+               case I18N_UDATE_FORMAT_HOUR1_FIELD:                                                             szUcalenderDFType = "I18N_UDATE_FORMAT_HOUR1_FIELD";                                                    break;
+               case I18N_UDATE_FORMAT_HOUR0_FIELD:                                                             szUcalenderDFType = "I18N_UDATE_FORMAT_HOUR0_FIELD";                                                    break;
+               case I18N_UDATE_FORMAT_TIMEZONE_FIELD:                                                  szUcalenderDFType = "I18N_UDATE_FORMAT_TIMEZONE_FIELD";                                                 break;
+               case I18N_UDATE_FORMAT_YEAR_WOY_FIELD:                                                  szUcalenderDFType = "I18N_UDATE_FORMAT_YEAR_WOY_FIELD";                                                 break;
+               case I18N_UDATE_FORMAT_DOW_LOCAL_FIELD:                                                 szUcalenderDFType = "I18N_UDATE_FORMAT_DOW_LOCAL_FIELD";                                                break;
+               case I18N_UDATE_FORMAT_EXTENDED_YEAR_FIELD:                                             szUcalenderDFType = "I18N_UDATE_FORMAT_EXTENDED_YEAR_FIELD";                                    break;
+               case I18N_UDATE_FORMAT_JULIAN_DAY_FIELD:                                                szUcalenderDFType = "I18N_UDATE_FORMAT_JULIAN_DAY_FIELD";                                               break;
+               case I18N_UDATE_FORMAT_MILLISECONDS_IN_DAY_FIELD:                               szUcalenderDFType = "I18N_UDATE_FORMAT_MILLISECONDS_IN_DAY_FIELD";                              break;
+               case I18N_UDATE_FORMAT_TIMEZONE_RFC_FIELD:                                              szUcalenderDFType = "I18N_UDATE_FORMAT_TIMEZONE_RFC_FIELD";                                             break;
+               case I18N_UDATE_FORMAT_STANDALONE_DAY_FIELD:                                    szUcalenderDFType = "I18N_UDATE_FORMAT_STANDALONE_DAY_FIELD";                                   break;
+               case I18N_UDATE_FORMAT_STANDALONE_MONTH_FIELD:                                  szUcalenderDFType = "I18N_UDATE_FORMAT_STANDALONE_MONTH_FIELD";                                 break;
+               case I18N_UDATE_FORMAT_QUARTER_FIELD:                                                   szUcalenderDFType = "I18N_UDATE_FORMAT_QUARTER_FIELD";                                                  break;
+               case I18N_UDATE_FORMAT_STANDALONE_QUARTER_FIELD:                                szUcalenderDFType = "I18N_UDATE_FORMAT_STANDALONE_QUARTER_FIELD";                               break;
+               case I18N_UDATE_FORMAT_TIMEZONE_SPECIAL_FIELD:                                  szUcalenderDFType = "I18N_UDATE_FORMAT_TIMEZONE_SPECIAL_FIELD";                                 break;
+               case I18N_UDATE_FORMAT_YEAR_NAME_FIELD:                                                 szUcalenderDFType = "I18N_UDATE_FORMAT_YEAR_NAME_FIELD";                                                break;
+               case I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD:             szUcalenderDFType = "I18N_UDATE_FORMAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD";    break;
+               case I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD:                                              szUcalenderDFType = "I18N_UDATE_FORMAT_TIMEZONE_ISO_FIELD";                                             break;
+               case I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD:                                szUcalenderDFType = "I18N_UDATE_FORMAT_TIMEZONE_ISO_LOCAL_FIELD";                               break;
+               case I18N_UDATE_FORMAT_FIELD_COUNT:                                                             szUcalenderDFType = "I18N_UDATE_FORMAT_FIELD_COUNT";                                                    break;
+               default:                                                                                                                szUcalenderDFType = "Unknown Udate Date Format Field value";                                    break;
+       }
+       return szUcalenderDFType;
+}
+
+/**
+ * @function           UdateGetFormatSymbolType
+ * @description                Maps Udate Format Symbol type enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     Udate Format Symbol type represented as string
+ */
+char* UdateGetFormatSymbolType(int nRet)
+{
+       char *szUcalenderDFType = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_ERAS:                                                                szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_ERAS";                                                       break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS:                                                              szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS";                                                     break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_MONTHS:                                                szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_MONTHS";                                       break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_WEEKDAYS:                                                    szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_WEEKDAYS";                                           break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_WEEKDAYS:                                              szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_WEEKDAYS";                                     break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_AM_PMS:                                                              szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_AM_PMS";                                                     break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_LOCALIZED_CHARS:                                             szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_LOCALIZED_CHARS";                            break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_ERA_NAMES:                                                   szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_ERA_NAMES";                                          break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_MONTHS:                                               szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_MONTHS";                                      break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_WEEKDAYS:                                             szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_WEEKDAYS";                            break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_MONTHS:                                   szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_MONTHS";                          break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_MONTHS:                             szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_MONTHS";            break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_MONTHS:                    szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_MONTHS";           break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_WEEKDAYS:                                 szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_WEEKDAYS";                        break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_WEEKDAYS:                   szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_WEEKDAYS";          break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_WEEKDAYS:                  szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_WEEKDAYS";         break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_QUARTERS:                                                    szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_QUARTERS";                                           break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_QUARTERS:                                              szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_QUARTERS";                                     break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_QUARTERS:                                 szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_QUARTERS";                        break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_QUARTERS:                   szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_QUARTERS";          break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORTER_WEEKDAYS:                                    szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORTER_WEEKDAYS";                           break;
+               case I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORTER_WEEKDAYS:                 szUcalenderDFType = "I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORTER_WEEKDAYS";        break;
+               default:                                                                                                                                szUcalenderDFType = "Unknown Udate Format Symbol type";                                                         break;
+       }
+       return szUcalenderDFType;
+}
+
+/**
+ * @function           UdateGetDisplayContext
+ * @description                Maps Udate Display context type enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     Udate Display context type represented as string
+ */
+char* UdateGetDisplayContext(int nRet)
+{
+       char *szUcalenderDFType = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE:                               szUcalenderDFType = "I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE";                              break;
+               case I18N_UDISPLAY_CONTEXT_STANDARD_NAMES:                                                              szUcalenderDFType = "I18N_UDISPLAY_CONTEXT_STANDARD_NAMES";                                                             break;
+               case I18N_UDISPLAY_CONTEXT_DIALECT_NAMES:                                                               szUcalenderDFType = "I18N_UDISPLAY_CONTEXT_DIALECT_NAMES";                                                              break;
+               case I18N_UDISPLAY_CONTEXT_CAPITALIZATION_NONE:                                                 szUcalenderDFType = "I18N_UDISPLAY_CONTEXT_CAPITALIZATION_NONE";                                                break;
+               case I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE:               szUcalenderDFType = "I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE";              break;
+               case I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE:    szUcalenderDFType = "I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE";   break;
+               case I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_UI_LIST_OR_MENU:                  szUcalenderDFType = "I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_UI_LIST_OR_MENU";                 break;
+               default:                                                                                                                                szUcalenderDFType = "Unknown Udate Display context type";                                                               break;
+       }
+       return szUcalenderDFType;
+}
+
+/**
+ * @function           UbrkGetIteratorType
+ * @description                Maps Ubrk Iterator type enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     Ubrk Iterator type represented as string
+ */
+char* UbrkGetIteratorType(int nRet)
+{
+       char *szUcalenderDFType = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UBRK_CHARACTER:                       szUcalenderDFType = "I18N_UBRK_CHARACTER";                              break;
+               case I18N_UBRK_WORD:                            szUcalenderDFType = "I18N_UBRK_WORD";                                   break;
+               case I18N_UBRK_LINE:                            szUcalenderDFType = "I18N_UBRK_LINE";                                   break;
+               case I18N_UBRK_SENTENCE:                        szUcalenderDFType = "I18N_UBRK_SENTENCE";                               break;
+               default:                                                        szUcalenderDFType = "Unknown Ubrk Iterator type";               break;
+       }
+       return szUcalenderDFType;
+}
+
+/**
+ * @function           UcollatorResult
+ * @description                Maps UCollator Result Values
+ * @parameter          nRet: result code returned
+ * @return                     Type represented as string
+ */
+char* UcollatorResult(int nRet)
+{
+       char *szCollatorResultVal = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UCOLLATOR_EQUAL:                      szCollatorResultVal = "I18N_UCOLLATOR_EQUAL";                                   break;
+               case I18N_UCOLLATOR_GREATER:            szCollatorResultVal = "I18N_UCOLLATOR_GREATER";                                 break;
+               case I18N_UCOLLATOR_LESS:                       szCollatorResultVal = "I18N_UCOLLATOR_LESS";                                    break;
+               default:                                                        szCollatorResultVal = "Unknown Collator Result Value";                  break;
+       }
+       return szCollatorResultVal;
+}
+
+/**
+ * @function           UcollatorStrengthValues
+ * @description                Maps Strength Ucollator format enum values to string.
+ * @parameter          nRet: result Ucollator Strength Value String returned
+ * @return                     Type represented as string
+ */
+char* UcollatorStrengthValues(int nRet)
+{
+       char *szStrengthVal = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UCOLLATOR_DEFAULT:                            szStrengthVal = "I18N_UCOLLATOR_DEFAULT";                                       break;
+               case I18N_UCOLLATOR_PRIMARY:                            szStrengthVal = "I18N_UCOLLATOR_PRIMARY";                                       break;
+               case I18N_UCOLLATOR_SECONDARY:                          szStrengthVal = "I18N_UCOLLATOR_SECONDARY";                                     break;
+               case I18N_UCOLLATOR_TERTIARY:                           szStrengthVal = "I18N_UCOLLATOR_TERTIARY";                                      break;
+               //case I18N_UCOLLATOR_DEFAULT_STRENGTH:         szStrengthVal = "I18N_UCOLLATOR_DEFAULT_STRENGTH";                      break;
+               case I18N_UCOLLATOR_QUATERNARY:                         szStrengthVal = "I18N_UCOLLATOR_QUATERNARY";                            break;
+               case I18N_UCOLLATOR_IDENTICAL:                          szStrengthVal = "I18N_UCOLLATOR_IDENTICAL";                                     break;
+       }
+       return szStrengthVal;
+}
+
+/**
+ * @function           UcollatorAttributes
+ * @description                Maps Strength Ucollator format enum values to string.
+ * @parameter          nRet: Ucollator Attributes String returned
+ * @return                     Type represented as string
+ */
+char* UcollatorAttributes(int nRet)
+{
+       char *szAttributeVal = NULL;
+       switch ( nRet )
+       {
+               case I18N_UCOLLATOR_FRENCH_COLLATION:                           szAttributeVal = "I18N_UCOLLATOR_FRENCH_COLLATION";                             break;
+               case I18N_UCOLLATOR_ALTERNATE_HANDLING:                         szAttributeVal = "I18N_UCOLLATOR_ALTERNATE_HANDLING";                   break;
+               case I18N_UCOLLATOR_CASE_FIRST:                                         szAttributeVal = "I18N_UCOLLATOR_CASE_FIRST";                                   break;
+               case I18N_UCOLLATOR_CASE_LEVEL:                                         szAttributeVal = "I18N_UCOLLATOR_CASE_LEVEL";                                   break;
+               case I18N_UCOLLATOR_NORMALIZATION_MODE:                         szAttributeVal = "I18N_UCOLLATOR_NORMALIZATION_MODE";                   break;
+               //case I18N_UCOLLATOR_DECOMPOSITION_MODE:                       szAttributeVal = "I18N_UCOLLATOR_DECOMPOSITION_MODE";                   break;
+               case I18N_UCOLLATOR_STRENGTH:                                           szAttributeVal = "I18N_UCOLLATOR_STRENGTH";                                             break;
+               case I18N_UCOLLATOR_NUMERIC_COLLATION:                          szAttributeVal = "I18N_UCOLLATOR_NUMERIC_COLLATION";                    break;
+               case I18N_UCOLLATOR_ATTRIBUTE_COUNT:                            szAttributeVal = "I18N_UCOLLATOR_ATTRIBUTE_COUNT";                              break;
+       }
+       return szAttributeVal;
+}
+
+/**
+ * @function           uCharBlockCode
+ * @description                Maps uChar block Code enum values to string.
+ * @parameter          nRet: uChar block Code String returned
+ * @return                     uChar block Code represented as string
+ */
+char* uCharBlockCode(int nRet)
+{
+       char *szAttributeVal = NULL;
+       switch ( nRet )
+       {
+               case I18N_UCHAR_UBLOCK_NO_BLOCK:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_NO_BLOCK";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_BASIC_LATIN:                                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_BASIC_LATIN";                                                                               break;
+               case I18N_UCHAR_UBLOCK_LATIN_1_SUPPLEMENT:                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_LATIN_1_SUPPLEMENT";                                                                break;
+               case I18N_UCHAR_UBLOCK_LATIN_EXTENDED_A:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_LATIN_EXTENDED_A";                                                                  break;
+               case I18N_UCHAR_UBLOCK_LATIN_EXTENDED_B:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_LATIN_EXTENDED_B";                                                                  break;
+               case I18N_UCHAR_UBLOCK_IPA_EXTENSIONS:                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_IPA_EXTENSIONS";                                                                    break;
+               case I18N_UCHAR_UBLOCK_SPACING_MODIFIER_LETTERS:                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_SPACING_MODIFIER_LETTERS";                                                  break;
+               case I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS:                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS";                                               break;
+               case I18N_UCHAR_UBLOCK_GREEK:                                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_GREEK";                                                                                             break;
+               case I18N_UCHAR_UBLOCK_CYRILLIC:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_CYRILLIC";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_ARMENIAN:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_ARMENIAN";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_HEBREW:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_HEBREW";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_ARABIC:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_ARABIC";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_SYRIAC:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_SYRIAC";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_THAANA:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_THAANA";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_DEVANAGARI:                                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_DEVANAGARI";                                                                                break;
+               case I18N_UCHAR_UBLOCK_BENGALI:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_BENGALI";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_GURMUKHI:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_GURMUKHI";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_GUJARATI:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_GUJARATI";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_ORIYA:                                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_ORIYA";                                                                                             break;
+               case I18N_UCHAR_UBLOCK_TAMIL:                                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_TAMIL";                                                                                             break;
+               case I18N_UCHAR_UBLOCK_TELUGU:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_TELUGU";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_KANNADA:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_KANNADA";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_MALAYALAM:                                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_MALAYALAM";                                                                                 break;
+               case I18N_UCHAR_UBLOCK_SINHALA:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_SINHALA";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_THAI:                                                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_THAI";                                                                                              break;
+               case I18N_UCHAR_UBLOCK_LAO:                                                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_LAO";                                                                                               break;
+               case I18N_UCHAR_UBLOCK_TIBETAN:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_TIBETAN";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_MYANMAR:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_MYANMAR";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_GEORGIAN:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_GEORGIAN";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_HANGUL_JAMO:                                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_HANGUL_JAMO";                                                                               break;
+               case I18N_UCHAR_UBLOCK_ETHIOPIC:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_ETHIOPIC";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_CHEROKEE:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_CHEROKEE";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS:                           szAttributeVal = "I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS";                             break;
+               case I18N_UCHAR_UBLOCK_OGHAM:                                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_OGHAM";                                                                                             break;
+               case I18N_UCHAR_UBLOCK_RUNIC:                                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_RUNIC";                                                                                             break;
+               case I18N_UCHAR_UBLOCK_KHMER:                                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_KHMER";                                                                                             break;
+               case I18N_UCHAR_UBLOCK_MONGOLIAN:                                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_MONGOLIAN";                                                                                 break;
+               case I18N_UCHAR_UBLOCK_LATIN_EXTENDED_ADDITIONAL:                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_LATIN_EXTENDED_ADDITIONAL";                                                 break;
+               case I18N_UCHAR_UBLOCK_GREEK_EXTENDED:                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_GREEK_EXTENDED";                                                                    break;
+               case I18N_UCHAR_UBLOCK_GENERAL_PUNCTUATION:                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_GENERAL_PUNCTUATION";                                                               break;
+               case I18N_UCHAR_UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS:                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS";                                               break;
+               case I18N_UCHAR_UBLOCK_CURRENCY_SYMBOLS:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_CURRENCY_SYMBOLS";                                                                  break;
+               case I18N_UCHAR_UBLOCK_COMBINING_MARKS_FOR_SYMBOLS:                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_COMBINING_MARKS_FOR_SYMBOLS";                                               break;
+               case I18N_UCHAR_UBLOCK_LETTERLIKE_SYMBOLS:                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_LETTERLIKE_SYMBOLS";                                                                break;
+               case I18N_UCHAR_UBLOCK_NUMBER_FORMS:                                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_NUMBER_FORMS";                                                                              break;
+               case I18N_UCHAR_UBLOCK_ARROWS:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_ARROWS";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_MATHEMATICAL_OPERATORS:                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_MATHEMATICAL_OPERATORS";                                                    break;
+               case I18N_UCHAR_UBLOCK_MISCELLANEOUS_TECHNICAL:                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_MISCELLANEOUS_TECHNICAL";                                                   break;
+               case I18N_UCHAR_UBLOCK_CONTROL_PICTURES:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_CONTROL_PICTURES";                                                                  break;
+               case I18N_UCHAR_UBLOCK_OPTICAL_CHARACTER_RECOGNITION:                                           szAttributeVal = "I18N_UCHAR_UBLOCK_OPTICAL_CHARACTER_RECOGNITION";                                             break;
+               case I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERICS:                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERICS";                                                    break;
+               case I18N_UCHAR_UBLOCK_BOX_DRAWING:                                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_BOX_DRAWING";                                                                               break;
+               case I18N_UCHAR_UBLOCK_BLOCK_ELEMENTS:                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_BLOCK_ELEMENTS";                                                                    break;
+               case I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES";                                                                  break;
+               case I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS:                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS";                                                             break;
+               case I18N_UCHAR_UBLOCK_DINGBATS:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_DINGBATS";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_BRAILLE_PATTERNS:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_BRAILLE_PATTERNS";                                                                  break;
+               case I18N_UCHAR_UBLOCK_CJK_RADICALS_SUPPLEMENT:                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_RADICALS_SUPPLEMENT";                                                   break;
+               case I18N_UCHAR_UBLOCK_KANGXI_RADICALS:                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_KANGXI_RADICALS";                                                                   break;
+               case I18N_UCHAR_UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS:                                      szAttributeVal = "I18N_UCHAR_UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS";                                break;
+               case I18N_UCHAR_UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION:                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION";                                               break;
+               case I18N_UCHAR_UBLOCK_HIRAGANA:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_HIRAGANA";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_KATAKANA:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_KATAKANA";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_BOPOMOFO:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_BOPOMOFO";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_HANGUL_COMPATIBILITY_JAMO:                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_HANGUL_COMPATIBILITY_JAMO";                                                 break;
+               case I18N_UCHAR_UBLOCK_KANBUN:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_KANBUN";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_BOPOMOFO_EXTENDED:                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_BOPOMOFO_EXTENDED";                                                                 break;
+               case I18N_UCHAR_UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS:                                         szAttributeVal = "I18N_UCHAR_UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS";                                   break;
+               case I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY:                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY";                                                                 break;
+               case I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A:                                      szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A";                                break;
+               case I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS:                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS";                                                    break;
+               case I18N_UCHAR_UBLOCK_YI_SYLLABLES:                                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_YI_SYLLABLES";                                                                              break;
+               case I18N_UCHAR_UBLOCK_YI_RADICALS:                                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_YI_RADICALS";                                                                               break;
+               case I18N_UCHAR_UBLOCK_HANGUL_SYLLABLES:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_HANGUL_SYLLABLES";                                                                  break;
+               case I18N_UCHAR_UBLOCK_HIGH_SURROGATES:                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_HIGH_SURROGATES";                                                                   break;
+               case I18N_UCHAR_UBLOCK_HIGH_PRIVATE_USE_SURROGATES:                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_HIGH_PRIVATE_USE_SURROGATES";                                               break;
+               case I18N_UCHAR_UBLOCK_LOW_SURROGATES:                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_LOW_SURROGATES";                                                                    break;
+               case I18N_UCHAR_UBLOCK_PRIVATE_USE_AREA:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_PRIVATE_USE_AREA";                                                                  break;
+               case I18N_UCHAR_UBLOCK_PRIVATE_USE:                                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_PRIVATE_USE";                                                                               break;
+               case I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS:                                            szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS";                                              break;
+               case I18N_UCHAR_UBLOCK_ALPHABETIC_PRESENTATION_FORMS:                                           szAttributeVal = "I18N_UCHAR_UBLOCK_ALPHABETIC_PRESENTATION_FORMS";                                             break;
+               case I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_A:                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_A";                                               break;
+               case I18N_UCHAR_UBLOCK_COMBINING_HALF_MARKS:                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_COMBINING_HALF_MARKS";                                                              break;
+               case I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_FORMS:                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_FORMS";                                                   break;
+               case I18N_UCHAR_UBLOCK_SMALL_FORM_VARIANTS:                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_SMALL_FORM_VARIANTS";                                                               break;
+               case I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_B:                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_B";                                               break;
+               case I18N_UCHAR_UBLOCK_SPECIALS:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_SPECIALS";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS:                                           szAttributeVal = "I18N_UCHAR_UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS";                                             break;
+               case I18N_UCHAR_UBLOCK_OLD_ITALIC:                                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_OLD_ITALIC";                                                                                break;
+               case I18N_UCHAR_UBLOCK_GOTHIC:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_GOTHIC";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_DESERET:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_DESERET";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_BYZANTINE_MUSICAL_SYMBOLS:                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_BYZANTINE_MUSICAL_SYMBOLS";                                                 break;
+               case I18N_UCHAR_UBLOCK_MUSICAL_SYMBOLS:                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_MUSICAL_SYMBOLS";                                                                   break;
+               case I18N_UCHAR_UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS:                                       szAttributeVal = "I18N_UCHAR_UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS";                                 break;
+               case I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B:                                      szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B";                                break;
+               case I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT:                         szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT";                   break;
+               case I18N_UCHAR_UBLOCK_TAGS:                                                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_TAGS";                                                                                              break;
+               case I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENT:                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENT";                                                               break;
+               case I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENTARY:                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENTARY";                                                    break;
+               case I18N_UCHAR_UBLOCK_TAGALOG:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_TAGALOG";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_HANUNOO:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_HANUNOO";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_BUHID:                                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_BUHID";                                                                                             break;
+               case I18N_UCHAR_UBLOCK_TAGBANWA:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_TAGBANWA";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A:                            szAttributeVal = "I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A";                              break;
+               case I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_A:                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_A";                                                             break;
+               case I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_B:                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_B";                                                             break;
+               case I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B:                            szAttributeVal = "I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B";                              break;
+               case I18N_UCHAR_UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS:                                     szAttributeVal = "I18N_UCHAR_UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS";                               break;
+               case I18N_UCHAR_UBLOCK_KATAKANA_PHONETIC_EXTENSIONS:                                            szAttributeVal = "I18N_UCHAR_UBLOCK_KATAKANA_PHONETIC_EXTENSIONS";                                              break;
+               case I18N_UCHAR_UBLOCK_VARIATION_SELECTORS:                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_VARIATION_SELECTORS";                                                               break;
+               case I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A:                                        szAttributeVal = "I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A";                                  break;
+               case I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B:                                        szAttributeVal = "I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B";                                  break;
+               case I18N_UCHAR_UBLOCK_LIMBU:                                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_LIMBU";                                                                                             break;
+               case I18N_UCHAR_UBLOCK_TAI_LE:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_TAI_LE";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_KHMER_SYMBOLS:                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_KHMER_SYMBOLS";                                                                             break;
+               case I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS:                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS";                                                               break;
+               case I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS:                                        szAttributeVal = "I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS";                                  break;
+               case I18N_UCHAR_UBLOCK_YIJING_HEXAGRAM_SYMBOLS:                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_YIJING_HEXAGRAM_SYMBOLS";                                                   break;
+               case I18N_UCHAR_UBLOCK_LINEAR_B_SYLLABARY:                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_LINEAR_B_SYLLABARY";                                                                break;
+               case I18N_UCHAR_UBLOCK_LINEAR_B_IDEOGRAMS:                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_LINEAR_B_IDEOGRAMS";                                                                break;
+               case I18N_UCHAR_UBLOCK_AEGEAN_NUMBERS:                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_AEGEAN_NUMBERS";                                                                    break;
+               case I18N_UCHAR_UBLOCK_UGARITIC:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_UGARITIC";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_SHAVIAN:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_SHAVIAN";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_OSMANYA:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_OSMANYA";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_CYPRIOT_SYLLABARY:                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_CYPRIOT_SYLLABARY";                                                                 break;
+               case I18N_UCHAR_UBLOCK_TAI_XUAN_JING_SYMBOLS:                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_TAI_XUAN_JING_SYMBOLS";                                                             break;
+               case I18N_UCHAR_UBLOCK_VARIATION_SELECTORS_SUPPLEMENT:                                          szAttributeVal = "I18N_UCHAR_UBLOCK_VARIATION_SELECTORS_SUPPLEMENT";                                    break;
+               case I18N_UCHAR_UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION:                                          szAttributeVal = "I18N_UCHAR_UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION";                                    break;
+               case I18N_UCHAR_UBLOCK_ANCIENT_GREEK_NUMBERS:                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_ANCIENT_GREEK_NUMBERS";                                                             break;
+               case I18N_UCHAR_UBLOCK_ARABIC_SUPPLEMENT:                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_ARABIC_SUPPLEMENT";                                                                 break;
+               case I18N_UCHAR_UBLOCK_BUGINESE:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_BUGINESE";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_CJK_STROKES:                                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_STROKES";                                                                               break;
+               case I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT:                          szAttributeVal = "I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT";                    break;
+               case I18N_UCHAR_UBLOCK_COPTIC:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_COPTIC";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED:                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED";                                                                 break;
+               case I18N_UCHAR_UBLOCK_ETHIOPIC_SUPPLEMENT:                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_ETHIOPIC_SUPPLEMENT";                                                               break;
+               case I18N_UCHAR_UBLOCK_GEORGIAN_SUPPLEMENT:                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_GEORGIAN_SUPPLEMENT";                                                               break;
+               case I18N_UCHAR_UBLOCK_GLAGOLITIC:                                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_GLAGOLITIC";                                                                                break;
+               case I18N_UCHAR_UBLOCK_KHAROSHTHI:                                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_KHAROSHTHI";                                                                                break;
+               case I18N_UCHAR_UBLOCK_MODIFIER_TONE_LETTERS:                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_MODIFIER_TONE_LETTERS";                                                             break;
+               case I18N_UCHAR_UBLOCK_NEW_TAI_LUE:                                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_NEW_TAI_LUE";                                                                               break;
+               case I18N_UCHAR_UBLOCK_OLD_PERSIAN:                                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_OLD_PERSIAN";                                                                               break;
+               case I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT:                                          szAttributeVal = "I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT";                                    break;
+               case I18N_UCHAR_UBLOCK_SUPPLEMENTAL_PUNCTUATION:                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_SUPPLEMENTAL_PUNCTUATION";                                                  break;
+               case I18N_UCHAR_UBLOCK_SYLOTI_NAGRI:                                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_SYLOTI_NAGRI";                                                                              break;
+               case I18N_UCHAR_UBLOCK_TIFINAGH:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_TIFINAGH";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_VERTICAL_FORMS:                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_VERTICAL_FORMS";                                                                    break;
+               case I18N_UCHAR_UBLOCK_NKO:                                                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_NKO";                                                                                               break;
+               case I18N_UCHAR_UBLOCK_BALINESE:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_BALINESE";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_LATIN_EXTENDED_C:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_LATIN_EXTENDED_C";                                                                  break;
+               case I18N_UCHAR_UBLOCK_LATIN_EXTENDED_D:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_LATIN_EXTENDED_D";                                                                  break;
+               case I18N_UCHAR_UBLOCK_PHAGS_PA:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_PHAGS_PA";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_PHOENICIAN:                                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_PHOENICIAN";                                                                                break;
+               case I18N_UCHAR_UBLOCK_CUNEIFORM:                                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_CUNEIFORM";                                                                                 break;
+               case I18N_UCHAR_UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION:                                       szAttributeVal = "I18N_UCHAR_UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION";                                 break;
+               case I18N_UCHAR_UBLOCK_COUNTING_ROD_NUMERALS:                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_COUNTING_ROD_NUMERALS";                                                             break;
+               case I18N_UCHAR_UBLOCK_SUNDANESE:                                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_SUNDANESE";                                                                                 break;
+               case I18N_UCHAR_UBLOCK_LEPCHA:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_LEPCHA";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_OL_CHIKI:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_OL_CHIKI";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_A:                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_A";                                                               break;
+               case I18N_UCHAR_UBLOCK_VAI:                                                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_VAI";                                                                                               break;
+               case I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_B:                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_B";                                                               break;
+               case I18N_UCHAR_UBLOCK_SAURASHTRA:                                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_SAURASHTRA";                                                                                break;
+               case I18N_UCHAR_UBLOCK_KAYAH_LI:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_KAYAH_LI";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_REJANG:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_REJANG";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_CHAM:                                                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_CHAM";                                                                                              break;
+               case I18N_UCHAR_UBLOCK_ANCIENT_SYMBOLS:                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_ANCIENT_SYMBOLS";                                                                   break;
+               case I18N_UCHAR_UBLOCK_PHAISTOS_DISC:                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_PHAISTOS_DISC";                                                                             break;
+               case I18N_UCHAR_UBLOCK_LYCIAN:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_LYCIAN";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_CARIAN:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_CARIAN";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_LYDIAN:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_LYDIAN";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_MAHJONG_TILES:                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_MAHJONG_TILES";                                                                             break;
+               case I18N_UCHAR_UBLOCK_DOMINO_TILES:                                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_DOMINO_TILES";                                                                              break;
+               case I18N_UCHAR_UBLOCK_SAMARITAN:                                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_SAMARITAN";                                                                                 break;
+               case I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED:          szAttributeVal = "I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED";    break;
+               case I18N_UCHAR_UBLOCK_TAI_THAM:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_TAI_THAM";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_VEDIC_EXTENSIONS:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_VEDIC_EXTENSIONS";                                                                  break;
+               case I18N_UCHAR_UBLOCK_LISU:                                                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_LISU";                                                                                              break;
+               case I18N_UCHAR_UBLOCK_BAMUM:                                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_BAMUM";                                                                                             break;
+               case I18N_UCHAR_UBLOCK_COMMON_INDIC_NUMBER_FORMS:                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_COMMON_INDIC_NUMBER_FORMS";                                                 break;
+               case I18N_UCHAR_UBLOCK_DEVANAGARI_EXTENDED:                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_DEVANAGARI_EXTENDED";                                                               break;
+               case I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_A:                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_A";                                                    break;
+               case I18N_UCHAR_UBLOCK_JAVANESE:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_JAVANESE";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_A:                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_A";                                                                break;
+               case I18N_UCHAR_UBLOCK_TAI_VIET:                                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_TAI_VIET";                                                                                  break;
+               case I18N_UCHAR_UBLOCK_MEETEI_MAYEK:                                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_MEETEI_MAYEK";                                                                              break;
+               case I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_B:                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_B";                                                    break;
+               case I18N_UCHAR_UBLOCK_IMPERIAL_ARAMAIC:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_IMPERIAL_ARAMAIC";                                                                  break;
+               case I18N_UCHAR_UBLOCK_OLD_SOUTH_ARABIAN:                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_OLD_SOUTH_ARABIAN";                                                                 break;
+               case I18N_UCHAR_UBLOCK_AVESTAN:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_AVESTAN";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PARTHIAN:                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PARTHIAN";                                                    break;
+               case I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PAHLAVI:                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PAHLAVI";                                                             break;
+               case I18N_UCHAR_UBLOCK_OLD_TURKIC:                                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_OLD_TURKIC";                                                                                break;
+               case I18N_UCHAR_UBLOCK_RUMI_NUMERAL_SYMBOLS:                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_RUMI_NUMERAL_SYMBOLS";                                                              break;
+               case I18N_UCHAR_UBLOCK_KAITHI:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_KAITHI";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_EGYPTIAN_HIEROGLYPHS:                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_EGYPTIAN_HIEROGLYPHS";                                                              break;
+               case I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT:                                        szAttributeVal = "I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT";                                  break;
+               case I18N_UCHAR_UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT:                                         szAttributeVal = "I18N_UCHAR_UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT";                                   break;
+               case I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C:                                      szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C";                                break;
+               case I18N_UCHAR_UBLOCK_MANDAIC:                                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_MANDAIC";                                                                                   break;
+               case I18N_UCHAR_UBLOCK_BATAK:                                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_BATAK";                                                                                             break;
+               case I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED_A:                                                                     szAttributeVal = "I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED_A";                                                               break;
+               case I18N_UCHAR_UBLOCK_BRAHMI:                                                                                          szAttributeVal = "I18N_UCHAR_UBLOCK_BRAHMI";                                                                                    break;
+               case I18N_UCHAR_UBLOCK_BAMUM_SUPPLEMENT:                                                                        szAttributeVal = "I18N_UCHAR_UBLOCK_BAMUM_SUPPLEMENT";                                                                  break;
+               case I18N_UCHAR_UBLOCK_KANA_SUPPLEMENT:                                                                         szAttributeVal = "I18N_UCHAR_UBLOCK_KANA_SUPPLEMENT";                                                                   break;
+               case I18N_UCHAR_UBLOCK_PLAYING_CARDS:                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_PLAYING_CARDS";                                                                             break;
+               case I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS:                           szAttributeVal = "I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS";                             break;
+               case I18N_UCHAR_UBLOCK_EMOTICONS:                                                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_EMOTICONS";                                                                                 break;
+               case I18N_UCHAR_UBLOCK_TRANSPORT_AND_MAP_SYMBOLS:                                                       szAttributeVal = "I18N_UCHAR_UBLOCK_TRANSPORT_AND_MAP_SYMBOLS";                                                 break;
+               case I18N_UCHAR_UBLOCK_ALCHEMICAL_SYMBOLS:                                                                      szAttributeVal = "I18N_UCHAR_UBLOCK_ALCHEMICAL_SYMBOLS";                                                                break;
+               case I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D:                                      szAttributeVal = "I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D";                                break;
+               case I18N_UCHAR_UBLOCK_COUNT:                                                                                           szAttributeVal = "I18N_UCHAR_UBLOCK_COUNT";                                                                                             break;
+               case I18N_UCHAR_UBLOCK_INVALID_CODE:                                                                            szAttributeVal = "I18N_UCHAR_UBLOCK_INVALID_CODE";                                                                              break;
+               default:                                                                                                                                        szAttributeVal = "Unknown";                                                                                                                             break;
+
+       }
+       return szAttributeVal;
+}
+
+/**
+ * @function           uCharPropertyName
+ * @description                Maps uChar Property Name enum values to string.
+ * @parameter          nRet: uChar Property Name String returned
+ * @return                     Type represented as string
+ */
+char* uCharPropertyName(int nRet)
+{
+       char *szAttributeVal = NULL;
+       switch ( nRet )
+       {
+               case I18N_UCHAR_ALPHABETIC:                                                                     szAttributeVal = "I18N_UCHAR_ALPHABETIC";                                                               break;
+               //case I18N_UCHAR_BINARY_START:                                                         szAttributeVal = "I18N_UCHAR_BINARY_START";                                                             break;
+               case I18N_UCHAR_ASCII_HEX_DIGIT:                                                        szAttributeVal = "I18N_UCHAR_ASCII_HEX_DIGIT";                                                  break;
+               case I18N_UCHAR_BIDI_CONTROL:                                                           szAttributeVal = "I18N_UCHAR_BIDI_CONTROL";                                                             break;
+               case I18N_UCHAR_BIDI_MIRRORED:                                                          szAttributeVal = "I18N_UCHAR_BIDI_MIRRORED";                                                    break;
+               case I18N_UCHAR_DASH:                                                                           szAttributeVal = "I18N_UCHAR_DASH";                                                                             break;
+               case I18N_UCHAR_DEFAULT_IGNORABLE_CODE_POINT:                           szAttributeVal = "I18N_UCHAR_DEFAULT_IGNORABLE_CODE_POINT";                             break;
+               case I18N_UCHAR_DEPRECATED:                                                                     szAttributeVal = "I18N_UCHAR_DEPRECATED";                                                               break;
+               case I18N_UCHAR_DIACRITIC:                                                                      szAttributeVal = "I18N_UCHAR_DIACRITIC";                                                                break;
+               case I18N_UCHAR_EXTENDER:                                                                       szAttributeVal = "I18N_UCHAR_EXTENDER";                                                                 break;
+               case I18N_UCHAR_FULL_COMPOSITION_EXCLUSION:                                     szAttributeVal = "I18N_UCHAR_FULL_COMPOSITION_EXCLUSION";                               break;
+               case I18N_UCHAR_GRAPHEME_BASE:                                                          szAttributeVal = "I18N_UCHAR_GRAPHEME_BASE";                                                    break;
+               case I18N_UCHAR_GRAPHEME_EXTEND:                                                        szAttributeVal = "I18N_UCHAR_GRAPHEME_EXTEND";                                                  break;
+               case I18N_UCHAR_GRAPHEME_LINK:                                                          szAttributeVal = "I18N_UCHAR_GRAPHEME_LINK";                                                    break;
+               case I18N_UCHAR_HEX_DIGIT:                                                                      szAttributeVal = "I18N_UCHAR_HEX_DIGIT";                                                                break;
+               case I18N_UCHAR_HYPHEN:                                                                         szAttributeVal = "I18N_UCHAR_HYPHEN";                                                                   break;
+               case I18N_UCHAR_ID_CONTINUE:                                                            szAttributeVal = "I18N_UCHAR_ID_CONTINUE";                                                              break;
+               case I18N_UCHAR_ID_START:                                                                       szAttributeVal = "I18N_UCHAR_ID_START";                                                                 break;
+               case I18N_UCHAR_IDEOGRAPHIC:                                                            szAttributeVal = "I18N_UCHAR_IDEOGRAPHIC";                                                              break;
+               case I18N_UCHAR_IDS_BINARY_OPERATOR:                                            szAttributeVal = "I18N_UCHAR_IDS_BINARY_OPERATOR";                                              break;
+               case I18N_UCHAR_IDS_TRINARY_OPERATOR:                                           szAttributeVal = "I18N_UCHAR_IDS_TRINARY_OPERATOR";                                             break;
+               case I18N_UCHAR_JOIN_CONTROL:                                                           szAttributeVal = "I18N_UCHAR_JOIN_CONTROL";                                                             break;
+               case I18N_UCHAR_LOGICAL_ORDER_EXCEPTION:                                        szAttributeVal = "I18N_UCHAR_LOGICAL_ORDER_EXCEPTION";                                  break;
+               case I18N_UCHAR_LOWERCASE:                                                                      szAttributeVal = "I18N_UCHAR_LOWERCASE";                                                                break;
+               case I18N_UCHAR_MATH:                                                                           szAttributeVal = "I18N_UCHAR_MATH";                                                                             break;
+               case I18N_UCHAR_NONCHARACTER_CODE_POINT:                                        szAttributeVal = "I18N_UCHAR_NONCHARACTER_CODE_POINT";                                  break;
+               case I18N_UCHAR_QUOTATION_MARK:                                                         szAttributeVal = "I18N_UCHAR_QUOTATION_MARK";                                                   break;
+               case I18N_UCHAR_RADICAL:                                                                        szAttributeVal = "I18N_UCHAR_RADICAL";                                                                  break;
+               case I18N_UCHAR_SOFT_DOTTED:                                                            szAttributeVal = "I18N_UCHAR_SOFT_DOTTED";                                                              break;
+               case I18N_UCHAR_TERMINAL_PUNCTUATION:                                           szAttributeVal = "I18N_UCHAR_TERMINAL_PUNCTUATION";                                             break;
+               case I18N_UCHAR_UNIFIED_IDEOGRAPH:                                                      szAttributeVal = "I18N_UCHAR_UNIFIED_IDEOGRAPH";                                                break;
+               case I18N_UCHAR_UPPERCASE:                                                                      szAttributeVal = "I18N_UCHAR_UPPERCASE";                                                                break;
+               case I18N_UCHAR_WHITE_SPACE:                                                            szAttributeVal = "I18N_UCHAR_WHITE_SPACE";                                                              break;
+               case I18N_UCHAR_XID_CONTINUE:                                                           szAttributeVal = "I18N_UCHAR_XID_CONTINUE";                                                             break;
+               case I18N_UCHAR_XID_START:                                                                      szAttributeVal = "I18N_UCHAR_XID_START";                                                                break;
+               case I18N_UCHAR_CASE_SENSITIVE:                                                         szAttributeVal = "I18N_UCHAR_CASE_SENSITIVE";                                                   break;
+               case I18N_UCHAR_S_TERM:                                                                         szAttributeVal = "I18N_UCHAR_S_TERM";                                                                   break;
+               case I18N_UCHAR_VARIATION_SELECTOR:                                                     szAttributeVal = "I18N_UCHAR_VARIATION_SELECTOR";                                               break;
+               case I18N_UCHAR_NFD_INERT:                                                                      szAttributeVal = "I18N_UCHAR_NFD_INERT";                                                                break;
+               case I18N_UCHAR_NFKD_INERT:                                                                     szAttributeVal = "I18N_UCHAR_NFKD_INERT";                                                               break;
+               case I18N_UCHAR_NFC_INERT:                                                                      szAttributeVal = "I18N_UCHAR_NFC_INERT";                                                                break;
+               case I18N_UCHAR_NFKC_INERT:                                                                     szAttributeVal = "I18N_UCHAR_NFKC_INERT";                                                               break;
+               case I18N_UCHAR_SEGMENT_STARTER:                                                        szAttributeVal = "I18N_UCHAR_SEGMENT_STARTER";                                                  break;
+               case I18N_UCHAR_PATTERN_SYNTAX:                                                         szAttributeVal = "I18N_UCHAR_PATTERN_SYNTAX";                                                   break;
+               case I18N_UCHAR_PATTERN_WHITE_SPACE:                                            szAttributeVal = "I18N_UCHAR_PATTERN_WHITE_SPACE";                                              break;
+               case I18N_UCHAR_POSIX_ALNUM:                                                            szAttributeVal = "I18N_UCHAR_POSIX_ALNUM";                                                              break;
+               case I18N_UCHAR_POSIX_BLANK:                                                            szAttributeVal = "I18N_UCHAR_POSIX_BLANK";                                                              break;
+               case I18N_UCHAR_POSIX_GRAPH:                                                            szAttributeVal = "I18N_UCHAR_POSIX_GRAPH";                                                              break;
+               case I18N_UCHAR_POSIX_PRINT:                                                            szAttributeVal = "I18N_UCHAR_POSIX_PRINT";                                                              break;
+               case I18N_UCHAR_POSIX_XDIGIT:                                                           szAttributeVal = "I18N_UCHAR_POSIX_XDIGIT";                                                             break;
+               case I18N_UCHAR_CASED:                                                                          szAttributeVal = "I18N_UCHAR_CASED";                                                                    break;
+               case I18N_UCHAR_CASE_IGNORABLE:                                                         szAttributeVal = "I18N_UCHAR_CASE_IGNORABLE";                                                   break;
+               case I18N_UCHAR_CHANGES_WHEN_LOWERCASED:                                        szAttributeVal = "I18N_UCHAR_CHANGES_WHEN_LOWERCASED";                                  break;
+               case I18N_UCHAR_CHANGES_WHEN_UPPERCASED:                                        szAttributeVal = "I18N_UCHAR_CHANGES_WHEN_UPPERCASED";                                  break;
+               case I18N_UCHAR_CHANGES_WHEN_TITLECASED:                                        szAttributeVal = "I18N_UCHAR_CHANGES_WHEN_TITLECASED";                                  break;
+               case I18N_UCHAR_CHANGES_WHEN_CASEFOLDED:                                        szAttributeVal = "I18N_UCHAR_CHANGES_WHEN_CASEFOLDED";                                  break;
+               case I18N_UCHAR_CHANGES_WHEN_CASEMAPPED:                                        szAttributeVal = "I18N_UCHAR_CHANGES_WHEN_CASEMAPPED";                                  break;
+               case I18N_UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED:                           szAttributeVal = "I18N_UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED";                             break;
+               case I18N_UCHAR_BINARY_LIMIT:                                                           szAttributeVal = "I18N_UCHAR_BINARY_LIMIT";                                                             break;
+               //case I18N_UCHAR_BIDI_CLASS:                                                           szAttributeVal = "I18N_UCHAR_BIDI_CLASS";                                                               break;
+               case I18N_UCHAR_INT_START:                                                                      szAttributeVal = "I18N_UCHAR_INT_START";                                                                break;
+               case I18N_UCHAR_BLOCK:                                                                          szAttributeVal = "I18N_UCHAR_BLOCK";                                                                    break;
+               case I18N_UCHAR_CANONICAL_COMBINING_CLASS:                                      szAttributeVal = "I18N_UCHAR_CANONICAL_COMBINING_CLASS";                                break;
+               case I18N_UCHAR_DECOMPOSITION_TYPE:                                                     szAttributeVal = "I18N_UCHAR_DECOMPOSITION_TYPE";                                               break;
+               case I18N_UCHAR_EAST_ASIAN_WIDTH:                                                       szAttributeVal = "I18N_UCHAR_EAST_ASIAN_WIDTH";                                                 break;
+               case I18N_UCHAR_GENERAL_CATEGORY:                                                       szAttributeVal = "I18N_UCHAR_GENERAL_CATEGORY";                                                 break;
+               case I18N_UCHAR_JOINING_GROUP:                                                          szAttributeVal = "I18N_UCHAR_JOINING_GROUP";                                                    break;
+               case I18N_UCHAR_JOINING_TYPE:                                                           szAttributeVal = "I18N_UCHAR_JOINING_TYPE";                                                             break;
+               case I18N_UCHAR_LINE_BREAK:                                                                     szAttributeVal = "I18N_UCHAR_LINE_BREAK";                                                               break;
+               case I18N_UCHAR_NUMERIC_TYPE:                                                           szAttributeVal = "I18N_UCHAR_NUMERIC_TYPE";                                                             break;
+               case I18N_UCHAR_SCRIPT:                                                                         szAttributeVal = "I18N_UCHAR_SCRIPT";                                                                   break;
+               case I18N_UCHAR_HANGUL_SYLLABLE_TYPE:                                           szAttributeVal = "I18N_UCHAR_HANGUL_SYLLABLE_TYPE";                                             break;
+               case I18N_UCHAR_NFD_QUICK_CHECK:                                                        szAttributeVal = "I18N_UCHAR_NFD_QUICK_CHECK";                                                  break;
+               case I18N_UCHAR_NFKD_QUICK_CHECK:                                                       szAttributeVal = "I18N_UCHAR_NFKD_QUICK_CHECK";                                                 break;
+               case I18N_UCHAR_NFC_QUICK_CHECK:                                                        szAttributeVal = "I18N_UCHAR_NFC_QUICK_CHECK";                                                  break;
+               case I18N_UCHAR_NFKC_QUICK_CHECK:                                                       szAttributeVal = "I18N_UCHAR_NFKC_QUICK_CHECK";                                                 break;
+               case I18N_UCHAR_LEAD_CANONICAL_COMBINING_CLASS:                         szAttributeVal = "I18N_UCHAR_LEAD_CANONICAL_COMBINING_CLASS";                   break;
+               case I18N_UCHAR_TRAIL_CANONICAL_COMBINING_CLASS:                        szAttributeVal = "I18N_UCHAR_TRAIL_CANONICAL_COMBINING_CLASS";                  break;
+               case I18N_UCHAR_GRAPHEME_CLUSTER_BREAK:                                         szAttributeVal = "I18N_UCHAR_GRAPHEME_CLUSTER_BREAK";                                   break;
+               case I18N_UCHAR_SENTENCE_BREAK:                                                         szAttributeVal = "I18N_UCHAR_SENTENCE_BREAK";                                                   break;
+               case I18N_UCHAR_WORD_BREAK:                                                                     szAttributeVal = "I18N_UCHAR_WORD_BREAK";                                                               break;
+               case I18N_UCHAR_BIDI_PAIRED_BRACKET_TYPE:                                       szAttributeVal = "I18N_UCHAR_BIDI_PAIRED_BRACKET_TYPE";                                 break;
+               case I18N_UCHAR_INT_LIMIT:                                                                      szAttributeVal = "I18N_UCHAR_INT_LIMIT";                                                                break;
+               //case I18N_UCHAR_GENERAL_CATEGORY_MASK:                                        szAttributeVal = "I18N_UCHAR_GENERAL_CATEGORY_MASK";                                    break;
+               case I18N_UCHAR_MASK_START:                                                                     szAttributeVal = "I18N_UCHAR_MASK_START";                                                               break;
+               case I18N_UCHAR_MASK_LIMIT:                                                                     szAttributeVal = "I18N_UCHAR_MASK_LIMIT";                                                               break;
+               case I18N_UCHAR_NUMERIC_VALUE:                                                          szAttributeVal = "I18N_UCHAR_NUMERIC_VALUE";                                                    break;
+               //case I18N_UCHAR_DOUBLE_START:                                                         szAttributeVal = "I18N_UCHAR_DOUBLE_START";                                                             break;
+               case I18N_UCHAR_DOUBLE_LIMIT:                                                           szAttributeVal = "I18N_UCHAR_DOUBLE_LIMIT";                                                             break;
+               case I18N_UCHAR_AGE:                                                                            szAttributeVal = "I18N_UCHAR_AGE";                                                                              break;
+               //case I18N_UCHAR_STRING_START:                                                         szAttributeVal = "I18N_UCHAR_STRING_START";                                                             break;
+               case I18N_UCHAR_BIDI_MIRRORING_GLYPH:                                           szAttributeVal = "I18N_UCHAR_BIDI_MIRRORING_GLYPH";                                             break;
+               case I18N_UCHAR_CASE_FOLDING:                                                           szAttributeVal = "I18N_UCHAR_CASE_FOLDING";                                                             break;
+               case I18N_UCHAR_LOWERCASE_MAPPING:                                                      szAttributeVal = "I18N_UCHAR_LOWERCASE_MAPPING";                                                break;
+               case I18N_UCHAR_NAME:                                                                           szAttributeVal = "I18N_UCHAR_NAME";                                                                             break;
+               case I18N_UCHAR_SIMPLE_CASE_FOLDING:                                            szAttributeVal = "I18N_UCHAR_SIMPLE_CASE_FOLDING";                                              break;
+               case I18N_UCHAR_SIMPLE_LOWERCASE_MAPPING:                                       szAttributeVal = "I18N_UCHAR_SIMPLE_LOWERCASE_MAPPING";                                 break;
+               case I18N_UCHAR_SIMPLE_TITLECASE_MAPPING:                                       szAttributeVal = "I18N_UCHAR_SIMPLE_TITLECASE_MAPPING";                                 break;
+               case I18N_UCHAR_SIMPLE_UPPERCASE_MAPPING:                                       szAttributeVal = "I18N_UCHAR_SIMPLE_UPPERCASE_MAPPING";                                 break;
+               case I18N_UCHAR_TITLECASE_MAPPING:                                                      szAttributeVal = "I18N_UCHAR_TITLECASE_MAPPING";                                                break;
+               case I18N_UCHAR_UPPERCASE_MAPPING:                                                      szAttributeVal = "I18N_UCHAR_UPPERCASE_MAPPING";                                                break;
+               case I18N_UCHAR_BIDI_PAIRED_BRACKET:                                            szAttributeVal = "I18N_UCHAR_BIDI_PAIRED_BRACKET";                                              break;
+               case I18N_UCHAR_STRING_LIMIT:                                                           szAttributeVal = "I18N_UCHAR_STRING_LIMIT";                                                             break;
+               case I18N_UCHAR_SCRIPT_EXTENSIONS:                                                      szAttributeVal = "I18N_UCHAR_SCRIPT_EXTENSIONS";                                                break;
+               //case I18N_UCHAR_OTHER_PROPERTY_START:                                         szAttributeVal = "I18N_UCHAR_OTHER_PROPERTY_START";                                             break;
+               case I18N_UCHAR_OTHER_PROPERTY_LIMIT:                                           szAttributeVal = "I18N_UCHAR_OTHER_PROPERTY_LIMIT";                                             break;
+               case I18N_UCHAR_INVALID_CODE:                                                           szAttributeVal = "I18N_UCHAR_INVALID_CODE";                                                             break;
+               default:                                                                                                        szAttributeVal = "Unknown";                                                                                             break;
+
+       }
+       return szAttributeVal;
+}
+
+/**
+* @function                    BaseUtilsGetMemoryLeakStatus
+* @description         Returns the Memory Allocation state
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void BaseUtilsGetMemoryLeakStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char * pszLog;
+
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+
+               if(stMemInfo.uordblks > g_stBaseUtilsMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stBaseUtilsMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stBaseUtilsMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+
+#endif
+}
+
+/**
+* @function                    BaseUtilsGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void BaseUtilsGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stBaseUtilsMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           BaseUtilsGetExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void BaseUtilsGetExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+
+               pszLogTime=calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);
+               ulldifference = ((stEnd.tv_sec -g_stBaseUtilsStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stBaseUtilsStartTime.tv_usec;
+
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+#endif
+}
+
+/**
+ * @function           BaseUtilsGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stBaseUtilsStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */
+void BaseUtilsGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stBaseUtilsStartTime, NULL);
+#endif
+}
+/**
+ * @function           FREE_MEMORY
+ * @description                Function to free the memory allocated
+ * @parameter          NA
+ * @return                     NA
+ *
+ */
+void FREE_MEMORY(char *pszMem1, char *pszMem2,char *pszMem3)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+}
+/**
+ * @function           UdatepgGetDateTimePatternField
+ * @description                Maps udatepg date time pattern filed type enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     udatepg date time pattern filed as string
+ */
+char* UdatepgGetDateTimePatternField(int nRet)
+{
+       char *szVal = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UDATEPG_ERA_FIELD:                                    szVal = "I18N_UDATEPG_ERA_FIELD";                                       break;
+               case I18N_UDATEPG_YEAR_FIELD:                                   szVal = "I18N_UDATEPG_YEAR_FIELD";                                      break;
+               case I18N_UDATEPG_QUARTER_FIELD:                                szVal = "I18N_UDATEPG_QUARTER_FIELD";                           break;
+               case I18N_UDATEPG_MONTH_FIELD:                                  szVal = "I18N_UDATEPG_MONTH_FIELD";                                     break;
+               case I18N_UDATEPG_WEEK_OF_YEAR_FIELD:                   szVal = "I18N_UDATEPG_WEEK_OF_YEAR_FIELD";                      break;
+               case I18N_UDATEPG_WEEK_OF_MONTH_FIELD:                  szVal = "I18N_UDATEPG_WEEK_OF_MONTH_FIELD";                     break;
+               case I18N_UDATEPG_WEEKDAY_FIELD:                                szVal = "I18N_UDATEPG_WEEKDAY_FIELD";                           break;
+               case I18N_UDATEPG_DAY_OF_YEAR_FIELD:                    szVal = "I18N_UDATEPG_DAY_OF_YEAR_FIELD";                       break;
+               case I18N_UDATEPG_DAY_OF_WEEK_IN_MONTH_FIELD:   szVal = "I18N_UDATEPG_DAY_OF_WEEK_IN_MONTH_FIELD";      break;
+               case I18N_UDATEPG_DAY_FIELD:                                    szVal = "I18N_UDATEPG_DAY_FIELD";                                       break;
+               case I18N_UDATEPG_DAYPERIOD_FIELD:                              szVal = "I18N_UDATEPG_DAYPERIOD_FIELD";                         break;
+               case I18N_UDATEPG_HOUR_FIELD:                                   szVal = "I18N_UDATEPG_HOUR_FIELD";                                      break;
+               case I18N_UDATEPG_MINUTE_FIELD:                                 szVal = "I18N_UDATEPG_MINUTE_FIELD";                            break;
+               case I18N_UDATEPG_SECOND_FIELD:                                 szVal = "I18N_UDATEPG_SECOND_FIELD";                            break;
+               case I18N_UDATEPG_FRACTIONAL_SECOND_FIELD:              szVal = "I18N_UDATEPG_FRACTIONAL_SECOND_FIELD";         break;
+               case I18N_UDATEPG_ZONE_FIELD:                                   szVal = "I18N_UDATEPG_ZONE_FIELD";                                      break;
+               case I18N_UDATEPG_FIELD_COUNT:                                  szVal = "I18N_UDATEPG_FIELD_COUNT";                                     break;
+               default:                                                                                szVal = "Unknown Udatepg date time pattern field";      break;
+       }
+       return szVal;
+}
+
+/**
+ * @function           UdatepgGetDateTimePatternMatchField
+ * @description                Maps udatepg date time pattern match filed type enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     udatepg date time pattern match filed as string
+ */
+char* UdatepgGetDateTimePatternMatchField(int nRet)
+{
+       char *szVal = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UDATEPG_MATCH_NO_OPTIONS:                     szVal = "I18N_UDATEPG_MATCH_NO_OPTIONS";                                                break;
+               case I18N_UDATEPG_MATCH_HOUR_FIELD_LENGTH:              szVal = "I18N_UDATEPG_MATCH_HOUR_FIELD_LENGTH";                                 break;
+               case I18N_UDATEPG_MATCH_ALL_FIELDS_LENGTH:              szVal = "I18N_UDATEPG_MATCH_ALL_FIELDS_LENGTH";                                 break;
+               default:                                                                                szVal = "Unknown Udatepg date time pattern match field";                break;
+       }
+       return szVal;
+}
+
+/**
+ * @function           UnumberGetFormatAttr
+ * @description                Maps unumber format attribute filed type enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     unumber format attribute filed as string
+ */
+char* UnumberGetFormatAttr(int nRet)
+{
+       char *szVal = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UNUMBER_PARSE_INT_ONLY:                                               szVal = "I18N_UNUMBER_PARSE_INT_ONLY";                                          break;
+               case I18N_UNUMBER_GROUPING_USED:                                                szVal = "I18N_UNUMBER_GROUPING_USED";                                           break;
+               case I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN:                                 szVal = "I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN";                            break;
+               case I18N_UNUMBER_MAX_INTEGER_DIGITS:                                   szVal = "I18N_UNUMBER_MAX_INTEGER_DIGITS";                                      break;
+               case I18N_UNUMBER_MIN_INTEGER_DIGITS:                                   szVal = "I18N_UNUMBER_MIN_INTEGER_DIGITS";                                      break;
+               case I18N_UNUMBER_INTEGER_DIGITS:                                               szVal = "I18N_UNUMBER_INTEGER_DIGITS";                                          break;
+               case I18N_UNUMBER_MAX_FRACTION_DIGITS:                                  szVal = "I18N_UNUMBER_MAX_FRACTION_DIGITS";                                     break;
+               case I18N_UNUMBER_MIN_FRACTION_DIGITS:                                  szVal = "I18N_UNUMBER_MIN_FRACTION_DIGITS";                                     break;
+               case I18N_UNUMBER_FRACTION_DIGITS:                                              szVal = "I18N_UNUMBER_FRACTION_DIGITS";                                         break;
+               case I18N_UNUMBER_MULTIPLIER:                                                   szVal = "I18N_UNUMBER_MULTIPLIER";                                                      break;
+               case I18N_UNUMBER_GROUPING_SIZE:                                                szVal = "I18N_UNUMBER_GROUPING_SIZE";                                           break;
+               case I18N_UNUMBER_ROUNDING_MODE:                                                szVal = "I18N_UNUMBER_ROUNDING_MODE";                                           break;
+               case I18N_UNUMBER_ROUNDING_INCREMENT:                                   szVal = "I18N_UNUMBER_ROUNDING_INCREMENT";                                      break;
+               case I18N_UNUMBER_FORMAT_WIDTH:                                                 szVal = "I18N_UNUMBER_FORMAT_WIDTH";                                            break;
+               case I18N_UNUMBER_PADDING_POSITION:                                     szVal = "I18N_UNUMBER_PADDING_POSITION";                                        break;
+               case I18N_UNUMBER_SECONDARY_GROUPING_SIZE:                              szVal = "I18N_UNUMBER_SECONDARY_GROUPING_SIZE";                         break;
+               case I18N_UNUMBER_SIGNIFICANT_DIGITS_USED:                              szVal = "I18N_UNUMBER_SIGNIFICANT_DIGITS_USED";                         break;
+               case I18N_UNUMBER_MIN_SIGNIFICANT_DIGITS:                               szVal = "I18N_UNUMBER_MIN_SIGNIFICANT_DIGITS";                          break;
+               case I18N_UNUMBER_MAX_SIGNIFICANT_DIGITS:                               szVal = "I18N_UNUMBER_MAX_SIGNIFICANT_DIGITS";                          break;
+               case I18N_UNUMBER_LENIENT_PARSE:                                                szVal = "I18N_UNUMBER_LENIENT_PARSE";                                           break;
+               case I18N_UNUM_SCALE:                                                                   szVal = "I18N_UNUM_SCALE";                                                                      break;
+               case I18N_UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS:     szVal = "I18N_UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS";        break;
+               case I18N_UNUM_PARSE_NO_EXPONENT:                                               szVal = "I18N_UNUM_PARSE_NO_EXPONENT";                                          break;
+               default:                                                                                                szVal = "Unknown unumber format attribute";                                     break;
+       }
+       return szVal;
+}
+
+/**
+ * @function           UnumberGetFormatTextAttr
+ * @description                Maps unumber format attribute filed type enum values to string.
+ * @parameter          nRet: result code returned
+ * @return                     unumber format attribute field as string
+ */
+char* UnumberGetFormatTextAttr(int nRet)
+{
+       char *szVal = NULL;
+
+       switch ( nRet )
+       {
+               case I18N_UNUMBER_POSITIVE_PREFIX:              szVal = "I18N_UNUMBER_POSITIVE_PREFIX";                                         break;
+               case I18N_UNUMBER_POSITIVE_SUFFIX:              szVal = "I18N_UNUMBER_POSITIVE_SUFFIX";                                         break;
+               case I18N_UNUMBER_NEGATIVE_PREFIX:              szVal = "I18N_UNUMBER_NEGATIVE_PREFIX";                                         break;
+               case I18N_UNUMBER_NEGATIVE_SUFFIX:              szVal = "I18N_UNUMBER_NEGATIVE_SUFFIX";                                         break;
+               case I18N_UNUMBER_PADDING_CHARACTER:    szVal = "I18N_UNUMBER_PADDING_CHARACTER";                                       break;
+               case I18N_UNUMBER_CURRENCY_CODE:                szVal = "I18N_UNUMBER_CURRENCY_CODE";                                           break;
+               case I18N_UNUMBER_DEFAULT_RULESET:              szVal = "I18N_UNUMBER_DEFAULT_RULESET";                                         break;
+               case I18N_UNUMBER_PUBLIC_RULESETS:              szVal = "I18N_UNUMBER_PUBLIC_RULESETS";                                         break;
+               default:                                                                szVal = "Unknown Udatepg date time pattern match field";        break;
+       }
+       return szVal;
+}
+
+/** @} */
diff --git a/src/itc/base-utils/ITs-base-utils-common.h b/src/itc/base-utils/ITs-base-utils-common.h
new file mode 100755 (executable)
index 0000000..ec50404
--- /dev/null
@@ -0,0 +1,259 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_BASE_UTILS_COMMON_H_
+#define _ITS_BASE_UTILS_COMMON_H_
+
+#include "assert.h"
+//Add test package related includes here
+#include <unicode/uchar.h>
+#include <utils_i18n.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <malloc.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <string.h>
+#include <math.h>
+#include <glib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+
+FILE *g_fpLog;
+//Add helper function declarations here
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+//#define ms2sec(ms) (long long int)(ms)/1000.0
+#define LOG                    100
+#define TIMEOUT_CB     10000
+#define TIMELOG                20
+#define MEMLOG         20
+#define BUFFER         256
+#define MICROSECONDS_PER_SECOND                1000000
+#define API_NAMESPACE                                  "Base-Utils_ITC"
+#define LOCALE                                                 I18N_ULOCALE_US
+#define I18N_RESULT_LEN                                        100
+#define I18N_LANG_CAPACITY                             64
+#define I18N_ULOCALE_CAPACITY                  64
+#define I18N_UNUMBER_SYMBOL_CAPACITY   64
+#define I18N_UNUMBER_PATTERN_LENGTH            -1
+#define I18N_DEFAULT_T_ZONE                    "Etc/GMT"
+#define I18N_DATE_TIME_CUSTOM_FORMAT   "yyyy.MM.dd G 'at' HH:mm:ss zzz"
+#define I18N_DATEPG_PATTERN_CAPACITY   64
+#define I18N_DATEPG_BEST_PATTERN_CAPACITY      64
+#define I18N_FORMATED_DATE_CAPACITY                    64
+#define I18N_UCHAR_CAPACITY                                    256
+#define UNKNOWN_RESULT_VALUE                           "Unknown Result"
+#define UCALENDER_AMOUNT_VALUE                         10
+#define YEAR_VALUE                                                     2014
+#define MONTH_VALUE                                                    9
+#define DATE_VALUE                                                     11
+#define HOUR_VALUE                                                     18
+#define MINUTE_VALUE                                           35
+#define SEC_VALUE                                                      20
+#define SOURCE_STRING                                          "Test TIZEN"
+#define USEARCH_KEYWORD                                                "TI"
+#define USEARCH_MATCHED_POSITION                       5
+#define USEARCH_MATCHED_LENGTH                         2
+#define UNORMALIZATION_NFC_NAME                                "nfkc"
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][%s] Starting test : %s\\n",__LINE__, API_NAMESPACE,__FUNCTION__);\
+       if ( !g_bBaseUtilsInitFlag )\
+       {\
+               FPRINTF("\\n[Line : %d][%s] Precondition of Base-Utils create pkglist failed so leaving test\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+}
+
+#define START_TEST_PRINT {\
+       FPRINTF("\\n[Line : %d][%s] Starting test : %s\\n",__LINE__, API_NAMESPACE,__FUNCTION__);\
+}
+
+#define CHECK_HANDLE(Handle, API) {\
+       if ( Handle == NULL )\
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s failed, error returned = Handle returned is NULL\\n", __LINE__, API_NAMESPACE, API);\
+               return 1;\
+       }\
+}
+
+#define CHECK_RETURN_VAL(nVal, API) {\
+       if(nVal < 0)\
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s failed, return value is less than zero \n", __LINE__, API_NAMESPACE, API);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal != I18N_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s failed, error returned = %s \n", __LINE__, API_NAMESPACE, API, BaseUtilsGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_STARTUP(nRetVal, API) {\
+       if (nRetVal == I18N_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s passed\n", __LINE__, API_NAMESPACE, API);\
+       }\
+       else \
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s failed, error returned = %s \n", __LINE__, API_NAMESPACE, API, BaseUtilsGetError(nRetVal));\
+               return;\
+       }\
+}
+
+#define PRINT_RESULT_LOOP(nRetVal, API, nFailCount) {\
+       if (nRetVal == I18N_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s passed \n", __LINE__, API_NAMESPACE, API);\
+       }\
+       else \
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s failed for loop count = %d, error returned = %s \n", __LINE__, API_NAMESPACE, API, nLoopCount, BaseUtilsGetError(nRetVal));\
+               ++nFailCount;\
+               continue;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if(strlen(memLog) > 0) \
+       {\
+               memLog[strlen(memLog)-1] = '\0';\
+               FPRINTF("\\n[%s] %s_MemoryLeakStatus : %s\n", API_NAMESPACE, #api, memLog);\
+       }
+
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[%s] %s_TimeInMicrosec - %s\n", API_NAMESPACE, #api, speedLog);\
+       }
+
+#define VALIDATE_RESULT(nErrCount1, szTargetApi, szApi1,szApi2, count) {\
+       if ( nErrCount1 > 0)\
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s failed %d times, out of %d times\n", __LINE__, API_NAMESPACE, szTargetApi, nErrCount1, count);\
+               if (szApi1 != NULL)\
+               {\
+                       free(szApi1);\
+                       szApi1 = NULL;\
+               }\
+               if (szApi2 != NULL)\
+               {\
+                       free(szApi2);\
+                       szApi2 = NULL;\
+               }\
+               return 1;\
+       }\
+}
+#define VALIDATE_RESULT_PAIRAPI(nErrCount1, nErrCount2, strTargetApi1, strTargetApi2, szApi1, szApi2, szApi3, count) {\
+       if ( nErrCount1 > 0 || nErrCount2 > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s failed %d times, %s failed %d times out of %d times\n", __LINE__, API_NAMESPACE, strTargetApi1, nErrCount1, strTargetApi2, nErrCount2, count);\
+               if (szApi1 != NULL)\
+               {\
+                       free(szApi1);\
+                       szApi1 = NULL;\
+               }\
+               if (szApi2 != NULL)\
+               {\
+                       free(szApi2);\
+                       szApi2 = NULL;\
+               }\
+               if (szApi3 != NULL)\
+               {\
+                       free(szApi3);\
+                       szApi3 = NULL;\
+               }\
+               return 1;\
+       }\
+}
+#define FREE_MEMORY1(MEM1) {\
+       if(MEM1 != NULL) \
+       {\
+               free(MEM1);\
+               MEM1 = NULL;\
+       }\
+}
+
+#define PRINT_RESULT_CLEANUP(eCompare, eRetVal, API, Error, FreeResource) {\
+       if ( eRetVal == eCompare )\
+       {\
+               if ( DEBUG )\
+               {\
+                       FPRINTF("[Line : %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+               FreeResource;\
+               return 1;\
+       }\
+}
+
+bool g_bBaseUtilsInitFlag;
+int g_nLengthDefaultTimeZone;
+const char *g_pszDefaultLocale;
+i18n_uchar *g_pDefaultTzid;
+char* BaseUtilsGetError(int nRet);
+char* uCharPropertyName(int nRet);
+char *uCharBlockCode(int nRet);
+char* UcalenderGetAttributeType(int nRet);
+char* UnormalizationModeValue(int nRet);
+char* UcalenderGetType(int nRet);
+char* UcalenderGetDisplayNameType(int nRet);
+char* UcalenderDateFieldValue(int nRet);
+char* UcollatorAttributes(int nRet);
+char* UcollatorStrengthValues(int nRet);
+char* UnumberGetFormatSymbol(int nRet);
+char* UnumberGetFormatStyle(int nRet);
+char* UdateGetFormatStyle(int nRet);
+char* UcollatorResult(int nRet);
+void BaseUtilsGetMemAllocation();
+void BaseUtilsGetExecutionDelay(char* pszAPITime);
+void BaseUtilsGetTimeOfDay();
+void BaseUtilsGetMemoryLeakStatus(char *pszAPIMemory);
+void FREE_MEMORY(char *pszMem1, char *pszMem2,char *pszMem3);
+char* UcalendarGetTimezoneType(int nRet);
+char* UcalendarGetLimitType(int nRet);
+char* UcalendarGetLocaleType(int nRet);
+char* UcalendarGetDaysOfWeek(int nRet);
+char* UcalendarGetTimezoneTransitionType(int nRet);
+char* UdateGetDateFormatFieldValue(int nRet);
+char* UdateGetFormatSymbolType(int nRet);
+char* UdateGetDisplayContext(int nRet);
+char* UbrkGetIteratorType(int nRet);
+char* UdatepgGetDateTimePatternField(int nRet);
+char* UdatepgGetDateTimePatternMatchField(int nRet);
+char* UnumberGetFormatAttr(int nRet);
+char* UnumberGetFormatTextAttr(int nRet);
+
+/** @} */
+#endif  //_ITS_BASE_UTILS_COMMON_H_
diff --git a/src/itc/base-utils/ITs-base-utils-locale.c b/src/itc/base-utils/ITs-base-utils-locale.c
new file mode 100755 (executable)
index 0000000..4ea8e34
--- /dev/null
@@ -0,0 +1,3121 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-base-utils-common.h"
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+struct timeval g_stBaseUtilsStartTime;
+struct mallinfo g_stBaseUtilsMemInfo;
+bool g_CallbackCalled = false;
+
+//& set: BaseUtils
+
+/**
+* @function            ITs_base_utils_locale_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_locale_startup(void)
+{
+       i18n_uchar *pRet = NULL;
+
+       g_bBaseUtilsInitFlag = false;
+       g_nLengthDefaultTimeZone = 0;
+       g_pDefaultTzid = NULL;
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_pszDefaultLocale = I18N_ULOCALE_US;
+       /*nRetVal = i18n_ulocale_get_default(&g_pszDefaultLocale);              // Locale to be used I18N_ULOCALE_US as suggested by HQ
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ulocale_get_default failed in STARTUP, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               return;
+       }*/
+
+       g_pDefaultTzid = (i18n_uchar*)calloc(strlen(I18N_DEFAULT_T_ZONE) + 1, sizeof(i18n_uchar));
+       if (g_pDefaultTzid == NULL)
+       {
+               FPRINTF("\\n[Line : %d][%s] g_pDefaultTzid, memory not allocated properly\n", __LINE__, API_NAMESPACE);
+               return;
+       }
+       pRet = i18n_ustring_copy_ua(g_pDefaultTzid, (char *)I18N_DEFAULT_T_ZONE);
+       if(i18n_ustring_get_length(pRet) == 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in start-up\n", __LINE__, API_NAMESPACE);
+               return;
+       }
+       //PRINT_RESULT_STARTUP(nRetVal, "i18n_ustring_copy_ua");
+       // gets length of 'g_pDefaultTzid'
+       g_nLengthDefaultTimeZone = i18n_ustring_get_length(g_pDefaultTzid);
+       FPRINTF("\\n[Line : %d][%s] i18n_ustring_get_length returns value = %d \n", __LINE__, API_NAMESPACE, g_nLengthDefaultTimeZone);
+
+       g_bBaseUtilsInitFlag = true;
+       return;
+}
+
+/**
+* @function            ITs_base_utils_locale_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_locale_cleanup(void)
+{
+       g_bBaseUtilsInitFlag = false;
+       if(g_pDefaultTzid != NULL)
+       {
+               free(g_pDefaultTzid);
+               g_pDefaultTzid = NULL;
+       }
+       g_nLengthDefaultTimeZone = 0;
+       return;
+}
+
+/**
+* @function            TimeZoneIdCallBack
+* @description         Callback Function
+* @parameter           const char *timezone_id, void *user_data
+* @return                      NA
+*/
+bool TimeZoneIdCallBack(const char *timezone_id, void *user_data)
+{
+       FPRINTF("\\n[Line : %d] Inside TimeZoneIdCallBack. timezone_id = %s\n",__LINE__, timezone_id);
+       g_CallbackCalled = true;
+       return true;
+}
+
+/** @addtogroup itc-base-utils-testcases
+*  @brief              Integration testcases for module base-utils
+*  @ingroup    itc-base-utils
+*  @{
+*/
+
+//& type: auto
+//& purpose: Creates and Destroy i18n_ucalendar.
+/**
+* @testcase                            ITc_i18n_ucalendar_create_destroy_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Creates i18n_ucalendar.\n
+*                                              Destroy i18n_ucalendar.
+* @apicovered                  i18n_ucalendar_create, i18n_ucalendar_destroy
+* @passcase                            When i18n_ucalendar_create, i18n_ucalendar_destroy are successful
+* @failcase                            If target i18n_ucalendar_create or i18n_ucalendar_destroy fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_create_destroy_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszCalenderCreateDestroyMemLog = NULL;
+       char *pszCalenderCreateSpeedLog = NULL;
+       char *pszCalenderDestroySpeedLog = NULL;
+       int nCalenderCreateFailCount = 0;
+       int nCalenderDestroyFailCount = 0;
+       i18n_ucalendar_type_e eCalenderType[] = {       I18N_UCALENDAR_TRADITIONAL,
+                                                                                       I18N_UCALENDAR_GREGORIAN};
+       int nEnumSize = sizeof(eCalenderType) / sizeof(eCalenderType[0]);
+       int nEnumCounter = 0;
+#if MEMORY_CHECK
+       pszCalenderCreateDestroyMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCalenderCreateSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       pszCalenderDestroySpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       i18n_ucalendar_h ucalender = NULL;
+                       FPRINTF("\\n[Line : %d][%s] Executing i18n_ucalendar_create with Calender Type(%s) and default Locale=%s on iteration %d, \n", __LINE__, API_NAMESPACE, UcalenderGetType(eCalenderType[nEnumCounter]), g_pszDefaultLocale, nLoopCount);
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_ucalendar_create(g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, eCalenderType[nEnumCounter], &ucalender);
+                       BaseUtilsGetExecutionDelay(pszCalenderCreateSpeedLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_create",nCalenderCreateFailCount);
+
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_ucalendar_destroy(ucalender);
+                       BaseUtilsGetExecutionDelay(pszCalenderDestroySpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszCalenderCreateDestroyMemLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_destroy",nCalenderDestroyFailCount);
+               }
+       }
+       VALIDATE_RESULT_PAIRAPI(nCalenderCreateFailCount, nCalenderDestroyFailCount, "i18n_ucalendar_create", "i18n_ucalendar_destroy", pszCalenderCreateDestroyMemLog, pszCalenderCreateSpeedLog, pszCalenderDestroySpeedLog, MAX_COUNT * nEnumSize);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ucalendar_create", pszCalenderCreateSpeedLog);
+               PRINT_SPEED_LOG("i18n_ucalendar_destroy", pszCalenderDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ucalendar_create_destroy", pszCalenderCreateDestroyMemLog);
+#endif
+       FREE_MEMORY(pszCalenderCreateDestroyMemLog, pszCalenderCreateSpeedLog, pszCalenderDestroySpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Adds a specified signed amount to a particular field in a i18n_ucalendar. Gets the current value of a field from a i18n_ucalendar.
+/**
+* @testcase                            ITc_i18n_ucalendar_add_get_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Adds a specified signed amount to a particular field in a i18n_ucalendar.\n
+*                                              Gets the current value of a field from a i18n_ucalendar..
+* @apicovered                  i18n_ucalendar_add, i18n_ucalendar_get, i18n_ucalendar_create, i18n_ucalendar_destroy
+* @passcase                            When i18n_ucalendar_add, i18n_ucalendar_get are successful
+* @failcase                            If target i18n_ucalendar_add or i18n_ucalendar_get fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_add_get_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszCalenderAddGetMemLog = NULL;
+       char *pszCalenderAddSpeedLog = NULL;
+       char *pszCalenderGetSpeedLog = NULL;
+       int nCalenderAddFailCount = 0;
+       int nCalenderGetFailCount = 0;
+       i18n_ucalendar_h ucalender = NULL;
+       nRetVal = i18n_ucalendar_create(g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, I18N_UCALENDAR_DEFAULT, &ucalender);
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_create");
+       i18n_ucalendar_date_fields_e eDateFields[] = {  I18N_UCALENDAR_ERA,
+                                                                               I18N_UCALENDAR_YEAR,
+                                                                               I18N_UCALENDAR_MONTH,
+                                                                               I18N_UCALENDAR_WEEK_OF_YEAR,
+                                                                               I18N_UCALENDAR_WEEK_OF_MONTH,
+                                                                               I18N_UCALENDAR_DATE,
+                                                                               I18N_UCALENDAR_DAY_OF_YEAR,
+                                                                               I18N_UCALENDAR_DAY_OF_WEEK,
+                                                                               I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH,
+                                                                               I18N_UCALENDAR_AM_PM,
+                                                                               I18N_UCALENDAR_HOUR,
+                                                                               I18N_UCALENDAR_HOUR_OF_DAY,
+                                                                               I18N_UCALENDAR_MINUTE,
+                                                                               I18N_UCALENDAR_SECOND,
+                                                                               I18N_UCALENDAR_MILLISECOND,
+                                                                               /*I18N_UCALENDAR_ZONE_OFFSET,
+                                                                               I18N_UCALENDAR_DST_OFFSET*/};
+       int nEnumSize = sizeof(eDateFields) / sizeof(eDateFields[0]);
+       int nEnumCounter = 0;
+#if MEMORY_CHECK
+       pszCalenderAddGetMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCalenderAddSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       pszCalenderGetSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       FPRINTF("\\n[Line : %d][%s] Executing i18n_ucalendar_add with DateField Value(%s) and UCALENDER_AMOUNT_VALUE=%d on iteration %d, \n", __LINE__, API_NAMESPACE, UcalenderDateFieldValue(eDateFields[nEnumCounter]), UCALENDER_AMOUNT_VALUE, nLoopCount);
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_ucalendar_add(ucalender, eDateFields[nEnumCounter], UCALENDER_AMOUNT_VALUE);
+                       BaseUtilsGetExecutionDelay(pszCalenderAddSpeedLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_add",nCalenderAddFailCount);
+
+                       int nValue = 0;
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_ucalendar_get(ucalender, eDateFields[nEnumCounter], &nValue);
+                       BaseUtilsGetExecutionDelay(pszCalenderGetSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszCalenderAddGetMemLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_get",nCalenderGetFailCount);
+               }
+       }
+       i18n_ucalendar_destroy(ucalender);
+       VALIDATE_RESULT_PAIRAPI(nCalenderAddFailCount, nCalenderGetFailCount, "i18n_ucalendar_add", "i18n_ucalendar_get", pszCalenderAddGetMemLog, pszCalenderAddSpeedLog, pszCalenderGetSpeedLog, MAX_COUNT * nEnumSize);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ucalendar_add", pszCalenderAddSpeedLog);
+               PRINT_SPEED_LOG("i18n_ucalendar_get", pszCalenderGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ucalendar_add_get", pszCalenderAddGetMemLog);
+#endif
+       FREE_MEMORY(pszCalenderAddGetMemLog, pszCalenderAddSpeedLog, pszCalenderGetSpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets a i18n_ucalendar's current date. Gets a i18n_ucalendar's current time in millis.
+/**
+* @testcase                            ITc_i18n_ucalendar_set_date_time_get_milliseconds_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Sets a i18n_ucalendar's current date.\n
+*                                              Gets a i18n_ucalendar's current time in millis.
+* @apicovered                  i18n_ucalendar_set_date_time, i18n_ucalendar_get_milliseconds, i18n_ucalendar_create, i18n_ucalendar_destroy
+* @passcase                            When i18n_ucalendar_set_date_time, i18n_ucalendar_get_milliseconds are successful
+* @failcase                            If target i18n_ucalendar_set_date_time or i18n_ucalendar_get_milliseconds fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_set_date_time_get_milliseconds_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszCalenderSetDateGetMSMemLog = NULL;
+       char *pszCalenderSetDateSpeedLog = NULL;
+       char *pszCalenderGetMSSpeedLog = NULL;
+       int nCalenderSetDateFailCount = 0;
+       int nCalenderGetMSFailCount = 0;
+       i18n_ucalendar_h ucalender = NULL;
+       nRetVal = i18n_ucalendar_create(g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, I18N_UCALENDAR_DEFAULT, &ucalender);
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_create");
+#if MEMORY_CHECK
+       pszCalenderSetDateGetMSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCalenderSetDateSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszCalenderGetMSSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucalendar_set_date_time(ucalender, YEAR_VALUE, MONTH_VALUE, DATE_VALUE, HOUR_VALUE, MINUTE_VALUE, SEC_VALUE);
+               BaseUtilsGetExecutionDelay(pszCalenderSetDateSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_set_date_time",nCalenderSetDateFailCount);
+
+               i18n_udate uDate;
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucalendar_get_milliseconds(ucalender, &uDate);
+               BaseUtilsGetExecutionDelay(pszCalenderGetMSSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszCalenderSetDateGetMSMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_get_milliseconds",nCalenderGetMSFailCount);
+       }
+       i18n_ucalendar_destroy(ucalender);
+       VALIDATE_RESULT_PAIRAPI(nCalenderSetDateFailCount, nCalenderGetMSFailCount, "i18n_ucalendar_set_date_time", "i18n_ucalendar_get_milliseconds", pszCalenderSetDateGetMSMemLog, pszCalenderSetDateSpeedLog, pszCalenderGetMSSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ucalendar_set_date_time", pszCalenderSetDateSpeedLog);
+               PRINT_SPEED_LOG("i18n_ucalendar_get_milliseconds", pszCalenderGetMSSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ucalendar_set_date_time_get_milliseconds", pszCalenderSetDateGetMSMemLog);
+#endif
+       FREE_MEMORY(pszCalenderSetDateGetMSMemLog, pszCalenderSetDateSpeedLog, pszCalenderGetMSSpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets and gets numeric attribute associated with a i18n_ucalendar.
+/**
+* @testcase                            ITc_i18n_ucalendar_set_get_attribute_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Sets and gets numeric attribute associated with a i18n_ucalendar.
+* @apicovered                  i18n_ucalendar_set_attribute, i18n_ucalendar_get_attribute, i18n_ucalendar_create, i18n_ucalendar_destroy
+* @passcase                            When i18n_ucalendar_set_attribute and i18n_ucalendar_get_attribute is successful
+* @failcase                            If target i18n_ucalendar_set_attribute or i18n_ucalendar_get_attribute fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_set_get_attribute_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszCalenderSetGetAttributeMemLog = NULL;
+       char *pszCalenderSetAttributeSpeedLog = NULL;
+       char *pszCalenderGetAttributeSpeedLog = NULL;
+       int nCalenderSetAttributeFailCount = 0;
+       int nCalenderGetAttributeFailCount = 0;
+       i18n_ucalendar_h ucalender = NULL;
+       nRetVal = i18n_ucalendar_create(g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, I18N_UCALENDAR_DEFAULT, &ucalender);
+       PRINT_RESULT(nRetVal, "i18n_ucalendar_create");
+       i18n_ucalendar_attribute_e eCalenderAttributeType[] = { I18N_UCALENDAR_LENIENT,
+                                                                                                               I18N_UCALENDAR_FIRST_DAY_OF_WEEK,
+                                                                                                               I18N_UCALENDAR_MINIMAL_DAYS_IN_FIRST_WEEK};
+       int nEnumSize = sizeof(eCalenderAttributeType) / sizeof(eCalenderAttributeType[0]);
+       int nEnumCounter = 0;
+       int nGetVal = 0;
+#if MEMORY_CHECK
+       pszCalenderSetGetAttributeMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCalenderSetAttributeSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       pszCalenderGetAttributeSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       FPRINTF("\\n[Line : %d][%s] Executing i18n_ucalendar_set_attribute with Attribute Type(%s) and Value = %d on iteration %d, \n", __LINE__, API_NAMESPACE, UcalenderGetAttributeType(eCalenderAttributeType[nEnumCounter]), nEnumCounter, nLoopCount);
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_ucalendar_set_attribute(ucalender, eCalenderAttributeType[nEnumCounter], nEnumCounter);
+                       BaseUtilsGetExecutionDelay(pszCalenderSetAttributeSpeedLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_set_attribute",nCalenderSetAttributeFailCount);
+
+                       FPRINTF("\\n[Line : %d][%s] Executing i18n_ucalendar_get_attribute with Attribute Type(%s) on iteration %d, \n", __LINE__, API_NAMESPACE, UcalenderGetAttributeType(eCalenderAttributeType[nEnumCounter]), nLoopCount);
+                       BaseUtilsGetTimeOfDay();
+                       nGetVal = 0;
+                       nRetVal = i18n_ucalendar_get_attribute(ucalender, eCalenderAttributeType[nEnumCounter], &nGetVal);
+                       BaseUtilsGetMemoryLeakStatus(pszCalenderSetGetAttributeMemLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_get_attribute",nCalenderGetAttributeFailCount);
+
+                       if(nEnumCounter != nGetVal)
+                       {
+                               nCalenderGetAttributeFailCount++;
+                               FPRINTF("\\n[Line : %d][%s]Target API i18n_ucalendar_get_attribute Failed in iteration %d, as expected Set Attribute(%d) not equal with Get Attribute(%d)\n", __LINE__, API_NAMESPACE, nEnumCounter * MAX_COUNT+nLoopCount, nEnumCounter, nGetVal);
+                       }
+               }
+       }
+       VALIDATE_RESULT_PAIRAPI(nCalenderSetAttributeFailCount,nCalenderGetAttributeFailCount, "i18n_ucalendar_set_attribute","i18n_ucalendar_get_attribute", pszCalenderSetGetAttributeMemLog, pszCalenderSetAttributeSpeedLog, pszCalenderGetAttributeSpeedLog, MAX_COUNT * nEnumSize);
+
+       i18n_ucalendar_destroy(ucalender);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ucalendar_set_attribute", pszCalenderSetAttributeSpeedLog);
+               PRINT_SPEED_LOG("i18n_ucalendar_get_attribute", pszCalenderGetAttributeSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ucalendar_set_get_attribute", pszCalenderSetGetAttributeMemLog);
+#endif
+       FREE_MEMORY(pszCalenderSetGetAttributeMemLog, pszCalenderSetAttributeSpeedLog, pszCalenderGetAttributeSpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the display name for a i18n_ucalendar's TimeZone.
+/**
+* @testcase                            ITc_i18n_ucalendar_get_timezone_displayname_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Gets the display name for a i18n_ucalendar's TimeZone.
+* @apicovered                  i18n_ucalendar_get_timezone_displayname, i18n_ucalendar_create, i18n_ucalendar_destroy, i18n_ustring_copy_au_n
+* @passcase                            When i18n_ucalendar_get_timezone_displayname is successful
+* @failcase                            If target i18n_ucalendar_get_timezone_displayname fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_timezone_displayname_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszCalenderGetTimeZoneMemLog = NULL;
+       char *pszCalenderGetTimeZoneSpeedLog = NULL;
+       int nCalenderGetTimeZoneFailCount = 0;
+       i18n_ucalendar_h ucalender = NULL;
+       nRetVal = i18n_ucalendar_create(g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, I18N_UCALENDAR_DEFAULT, &ucalender);
+       PRINT_RESULT(nRetVal, "i18n_ucalendar_create");
+
+       i18n_ucalendar_displayname_type_e eCalenderDisplayNameType[] = {        I18N_UCALENDAR_STANDARD,
+                                                                                                               I18N_UCALENDAR_SHORT_STANDARD,
+                                                                                                               I18N_UCALENDAR_DST,
+                                                                                                               I18N_UCALENDAR_SHORT_DST};
+       int nEnumSize = sizeof(eCalenderDisplayNameType) / sizeof(eCalenderDisplayNameType[0]);
+       int nEnumCounter = 0;
+#if MEMORY_CHECK
+       pszCalenderGetTimeZoneMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCalenderGetTimeZoneSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       i18n_uchar timeZoneDisplayName[I18N_RESULT_LEN];
+                       int nDisplayNameSizeNeeded = 0;
+                       FPRINTF("\\n[Line : %d][%s] Executing i18n_ucalendar_get_timezone_displayname with Display Name Type(%s) and default Locale=%s on iteration %d, \n", __LINE__, API_NAMESPACE, UcalenderGetDisplayNameType(eCalenderDisplayNameType[nEnumCounter]), g_pszDefaultLocale, nLoopCount);
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_ucalendar_get_timezone_displayname(ucalender, eCalenderDisplayNameType[nEnumCounter], g_pszDefaultLocale, timeZoneDisplayName, I18N_RESULT_LEN, &nDisplayNameSizeNeeded);
+                       BaseUtilsGetExecutionDelay(pszCalenderGetTimeZoneSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszCalenderGetTimeZoneMemLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_get_timezone_displayname",nCalenderGetTimeZoneFailCount);
+                       if(nDisplayNameSizeNeeded > I18N_RESULT_LEN)
+                       {
+                               FPRINTF("\\n[Line : %d][%s] The Returned TimeZone Display Name Buffer Size(%d) is greater than Display Name capacity(%d)\n", __LINE__, API_NAMESPACE, nDisplayNameSizeNeeded, I18N_RESULT_LEN);
+                       }
+                       char pstTimeZoneDisplayName[I18N_RESULT_LEN] = {0,};
+                       i18n_ustring_copy_au_n(pstTimeZoneDisplayName, timeZoneDisplayName, I18N_RESULT_LEN);
+                       if(strlen(pstTimeZoneDisplayName) <= 0)
+                       {
+                               nCalenderGetTimeZoneFailCount++;
+                               FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_get_timezone_displayname failed on iteration %d, as The result Formatted Date Char Length is either less than or Equal to Zero.", __LINE__, API_NAMESPACE, nLoopCount);
+                       }
+               }
+       }
+       VALIDATE_RESULT(nCalenderGetTimeZoneFailCount, "i18n_ucalendar_get_timezone_displayname", pszCalenderGetTimeZoneMemLog, pszCalenderGetTimeZoneSpeedLog, MAX_COUNT * nEnumSize);
+       i18n_ucalendar_destroy(ucalender);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ucalendar_get_timezone_displayname", pszCalenderGetTimeZoneSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ucalendar_get_timezone_displayname", pszCalenderGetTimeZoneMemLog);
+#endif
+       FREE_MEMORY(pszCalenderGetTimeZoneMemLog, pszCalenderGetTimeZoneSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets a i18n_ucalendar's current time in millis.
+/**
+* @testcase                            ITc_i18n_ucalendar_set_milliseconds_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Sets a i18n_ucalendar's current time in millis.
+* @apicovered                  i18n_ucalendar_set_milliseconds, i18n_ucalendar_create, i18n_ucalendar_destroy, i18n_ucalendar_get_now
+* @passcase                            When i18n_ucalendar_set_milliseconds is successful
+* @failcase                            If target i18n_ucalendar_set_milliseconds fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_set_milliseconds_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszCalenderGetTimeZoneMemLog = NULL;
+       char *pszCalenderGetTimeZoneSpeedLog = NULL;
+       int nCalenderGetTimeZoneFailCount = 0;
+       i18n_ucalendar_h ucalender = NULL;
+       nRetVal = i18n_ucalendar_create(g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, I18N_UCALENDAR_DEFAULT, &ucalender);
+       PRINT_RESULT(nRetVal, "i18n_ucalendar_create");
+       i18n_udate uDate;
+       nRetVal = i18n_ucalendar_get_now(&uDate);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_get_now failed, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               i18n_ucalendar_destroy(ucalender);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszCalenderGetTimeZoneMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCalenderGetTimeZoneSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucalendar_set_milliseconds(ucalender, uDate);
+               BaseUtilsGetExecutionDelay(pszCalenderGetTimeZoneSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszCalenderGetTimeZoneMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_set_milliseconds",nCalenderGetTimeZoneFailCount);
+       }
+       VALIDATE_RESULT(nCalenderGetTimeZoneFailCount, "i18n_ucalendar_set_milliseconds", pszCalenderGetTimeZoneMemLog, pszCalenderGetTimeZoneSpeedLog, MAX_COUNT);
+       i18n_ucalendar_destroy(ucalender);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_ucalendar_set_milliseconds", pszCalenderGetTimeZoneSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_ucalendar_set_milliseconds", pszCalenderGetTimeZoneMemLog);
+#endif
+       FREE_MEMORY(pszCalenderGetTimeZoneMemLog, pszCalenderGetTimeZoneSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Determines if a i18n_ucalendar is currently in daylight savings time.
+/**
+* @testcase                            ITc_i18n_ucalendar_is_in_daylight_time_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Determines if a i18n_ucalendar is currently in daylight savings time.
+* @apicovered                  i18n_ucalendar_is_in_daylight_time, i18n_ucalendar_create, i18n_ucalendar_destroy
+* @passcase                            When i18n_ucalendar_is_in_daylight_time is successful
+* @failcase                            If target i18n_ucalendar_is_in_daylight_time fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_is_in_daylight_time_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszDayLightTimeStatusMemLog = NULL;
+       char *pszDayLightTimeStatusSpeedLog = NULL;
+       int nDayLightTimeStatusFailCount = 0;
+       i18n_ucalendar_h ucalender = NULL;
+       nRetVal = i18n_ucalendar_create(g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, I18N_UCALENDAR_DEFAULT, &ucalender);
+       PRINT_RESULT(nRetVal, "i18n_ucalendar_create");
+#if MEMORY_CHECK
+       pszDayLightTimeStatusMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszDayLightTimeStatusSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               i18n_ubool bEqualityResult = false;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucalendar_is_in_daylight_time(ucalender, &bEqualityResult);
+               BaseUtilsGetExecutionDelay(pszDayLightTimeStatusSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszDayLightTimeStatusMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_is_in_daylight_time",nDayLightTimeStatusFailCount);
+       }
+       i18n_ucalendar_destroy(ucalender);
+       VALIDATE_RESULT(nDayLightTimeStatusFailCount, "i18n_ucalendar_is_in_daylight_time", pszDayLightTimeStatusMemLog, pszDayLightTimeStatusSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_ucalendar_is_in_daylight_time", pszDayLightTimeStatusSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_ucalendar_is_in_daylight_time", pszDayLightTimeStatusMemLog);
+#endif
+       FREE_MEMORY(pszDayLightTimeStatusMemLog, pszDayLightTimeStatusSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Checks Two i18n_ucalendars are equivalent.
+/**
+* @testcase                            ITc_i18n_ucalendar_is_equivalent_to_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Checks Two i18n_ucalendars are equivalent.
+* @apicovered                  i18n_ucalendar_is_equivalent_to, i18n_ucalendar_create, i18n_ucalendar_destroy, i18n_ucalendar_set_date_time
+* @passcase                            When i18n_ucalendar_is_equivalent_to is successful
+* @failcase                            If target i18n_ucalendar_is_equivalent_to fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_is_equivalent_to_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszIsEqualMemLog = NULL;
+       char *pszIsEqualSpeedLog = NULL;
+       int nIsEqualFailCount = 0;
+       i18n_ucalendar_h ucalender1 = NULL;
+       nRetVal = i18n_ucalendar_create(g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, I18N_UCALENDAR_DEFAULT, &ucalender1);
+       PRINT_RESULT(nRetVal, "i18n_ucalendar_create");
+       nRetVal = i18n_ucalendar_set_date_time(ucalender1, YEAR_VALUE, MONTH_VALUE, DATE_VALUE, HOUR_VALUE, MINUTE_VALUE, SEC_VALUE);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_set_date_time failed, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               i18n_ucalendar_destroy(ucalender1);
+               return 1;
+       }
+       i18n_ucalendar_h ucalender2 = NULL;
+       nRetVal = i18n_ucalendar_create(g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, I18N_UCALENDAR_DEFAULT, &ucalender2);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_create failed, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               i18n_ucalendar_destroy(ucalender1);
+               return 1;
+       }
+       nRetVal = i18n_ucalendar_set_date_time(ucalender2, YEAR_VALUE, MONTH_VALUE, DATE_VALUE, HOUR_VALUE, MINUTE_VALUE, SEC_VALUE);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_set_date_time failed, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               i18n_ucalendar_destroy(ucalender1);
+               i18n_ucalendar_destroy(ucalender2);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszIsEqualMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszIsEqualSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               i18n_ubool bEqualityResult = false;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucalendar_is_equivalent_to(ucalender1, ucalender2, &bEqualityResult);
+               BaseUtilsGetExecutionDelay(pszIsEqualSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszIsEqualMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_is_equivalent_to",nIsEqualFailCount);
+               if (!bEqualityResult)
+               {
+                       ++nIsEqualFailCount;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_is_equivalent_to failed as returned Equivalent value is False and Expected is True for loop count = %d\n", __LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       i18n_ucalendar_destroy(ucalender1);
+       i18n_ucalendar_destroy(ucalender2);
+       VALIDATE_RESULT(nIsEqualFailCount, "i18n_ucalendar_is_equivalent_to", pszIsEqualMemLog, pszIsEqualSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_ucalendar_is_equivalent_to", pszIsEqualSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_ucalendar_is_equivalent_to", pszIsEqualMemLog);
+#endif
+       FREE_MEMORY(pszIsEqualMemLog, pszIsEqualSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates a i18n_ucollator_h for comparing strings And Destroy given i18n_ucollator_h
+/**
+* @testcase                            ITc_i18n_ucollator_create_destroy_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Creates a i18n_ucollator_h for comparing strings.\n
+*                                              Destroy given i18n_ucollator_h.
+* @apicovered                  i18n_ucollator_create, i18n_ucollator_destroy
+* @passcase                            When i18n_ucollator_create, i18n_ucollator_destroy are successful
+* @failcase                            If target i18n_ucollator_create or i18n_ucollator_destroy fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucollator_create_destroy_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszUcollatorCreateDestroyMemLog = NULL;
+       char *pszUcollatorCreateSpeedLog = NULL;
+       char *pszUcollatorDestroySpeedLog = NULL;
+       int nUcollatorCreateFailCount = 0;
+       int nUcollatorDestroyFailCount = 0;
+#if MEMORY_CHECK
+       pszUcollatorCreateDestroyMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUcollatorCreateSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUcollatorDestroySpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               i18n_ucollator_h uCollator = NULL;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucollator_create(g_pszDefaultLocale, &uCollator);
+               BaseUtilsGetExecutionDelay(pszUcollatorCreateSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ucollator_create",nUcollatorCreateFailCount);
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucollator_destroy(uCollator);
+               BaseUtilsGetExecutionDelay(pszUcollatorDestroySpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUcollatorCreateDestroyMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ucollator_destroy",nUcollatorDestroyFailCount);
+       }
+       VALIDATE_RESULT_PAIRAPI(nUcollatorCreateFailCount, nUcollatorDestroyFailCount, "i18n_ucollator_create", "i18n_ucollator_destroy", pszUcollatorCreateDestroyMemLog, pszUcollatorCreateSpeedLog, pszUcollatorDestroySpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_ucollator_create", pszUcollatorCreateSpeedLog);
+       PRINT_SPEED_LOG("i18n_ucollator_destroy", pszUcollatorDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_ucollator_create_destroy", pszUcollatorCreateDestroyMemLog);
+#endif
+       FREE_MEMORY(pszUcollatorCreateDestroyMemLog, pszUcollatorCreateSpeedLog, pszUcollatorDestroySpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compares two strings with collator using the options already specified.
+/**
+* @testcase                            ITc_i18n_ucollator_str_collator_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compares two strings using the options already specified.
+* @apicovered                  i18n_ucollator_str_collator, i18n_ucollator_create, i18n_ustring_from_UTF8, i18n_ustring_get_length, i18n_ucollator_destroy
+* @passcase                            When i18n_ucollator_str_collator is successful
+* @failcase                            If target i18n_ucollator_str_collator fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucollator_str_collator_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char szSource[I18N_UCHAR_CAPACITY] = {0};
+       char szTarget[I18N_UCHAR_CAPACITY] = {0};
+
+       char *pszStrCollatorMemLog = NULL;
+       char *pszStrCollatorSpeedLog = NULL;
+       i18n_uchar *pRet = NULL;
+
+       int nStrCollatorFailCount = 0;
+       i18n_ucollator_h uCollator = NULL;
+       nRetVal = i18n_ucollator_create(g_pszDefaultLocale, &uCollator);
+       PRINT_RESULT(nRetVal, "i18n_ucollator_create");
+#if MEMORY_CHECK
+       pszStrCollatorMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszStrCollatorSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sprintf(szSource, "Tizen%d", (nLoopCount+1));
+               sprintf(szTarget, "Bada%d", (nLoopCount+1));
+               int nSourceLength = 0;
+               int nTargetLength = 0;
+               i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
+               i18n_uchar ucharTarget[I18N_UCHAR_CAPACITY] = {0,};
+               i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+               pRet = i18n_ustring_from_UTF8(ucharSource, I18N_UCHAR_CAPACITY, NULL, (const char*)szSource, -1, &ErrorCode);
+               nSourceLength = i18n_ustring_get_length(ucharSource);
+               if (pRet == NULL || ErrorCode != I18N_ERROR_NONE || nSourceLength <= 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8 pre-requisite API failed in iteration %d\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nStrCollatorFailCount++;
+                       continue;
+               }
+               pRet = i18n_ustring_from_UTF8(ucharTarget, I18N_UCHAR_CAPACITY, NULL, (const char*)szTarget, -1, &ErrorCode);
+               nTargetLength = i18n_ustring_get_length(ucharTarget);
+               if (pRet == NULL || ErrorCode != I18N_ERROR_NONE || nTargetLength <= 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8 pre-requisite API failed in iteration %d\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nStrCollatorFailCount++;
+                       continue;
+               }
+               i18n_ucollator_result_e collatorResult;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucollator_str_collator(uCollator, ucharSource, nSourceLength, ucharTarget, nTargetLength, &collatorResult);
+               BaseUtilsGetExecutionDelay(pszStrCollatorSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszStrCollatorMemLog);
+               if (nRetVal == I18N_ERROR_NONE && (strcmp(UcollatorResult(collatorResult), UNKNOWN_RESULT_VALUE) != 0))
+               {
+                       FPRINTF("\\n[Line : %d][%s] i18n_ucollator_str_collator passed with Result Value = %s in Iteration (%d)\n", __LINE__, API_NAMESPACE, UcollatorResult(collatorResult), nLoopCount);
+               }
+               else
+               {
+                       ++nStrCollatorFailCount;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ucollator_str_collator failed as uCollator Compare Result Value = %s for loop count = %d, error returned = %s \n", __LINE__, API_NAMESPACE, UcollatorResult(collatorResult), nLoopCount, BaseUtilsGetError(nRetVal));
+               }
+       }
+       i18n_ucollator_destroy(uCollator);
+       VALIDATE_RESULT(nStrCollatorFailCount, "i18n_ucollator_str_collator", pszStrCollatorMemLog, pszStrCollatorSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_ucollator_str_collator", pszStrCollatorSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_ucollator_str_collator", pszStrCollatorMemLog);
+#endif
+       FREE_MEMORY(pszStrCollatorMemLog, pszStrCollatorSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compares two strings for equality
+/**
+* @testcase                            ITc_i18n_ucollator_equal_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compares two strings for equality
+* @apicovered                  i18n_ucollator_create, i18n_ucollator_equal, i18n_ustring_from_UTF8, i18n_ustring_get_length
+* @passcase                            When i18n_ucollator_equal is successful
+* @failcase                            If target i18n_ucollator_equal fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucollator_equal_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char szSource[I18N_UCHAR_CAPACITY] = {0};
+       char szTarget[I18N_UCHAR_CAPACITY] = {0};
+
+       char *pszCollatorEqualMemLog = NULL;
+       char *pszCollatorEqualSpeedLog = NULL;
+       int nCollatorEqualFailCount = 0;
+       i18n_ucollator_h uCollator = NULL;
+       nRetVal = i18n_ucollator_create(g_pszDefaultLocale, &uCollator);
+       PRINT_RESULT(nRetVal, "i18n_ucollator_create");
+#if MEMORY_CHECK
+       pszCollatorEqualMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCollatorEqualSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sprintf(szSource, "Tizen%d", (nLoopCount+1));
+               sprintf(szTarget, "Bada%d", (nLoopCount+1));
+               int nSourceLength = 0;
+               int nTargetLength = 0;
+               i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
+               i18n_uchar ucharTarget[I18N_UCHAR_CAPACITY] = {0,};
+               i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+               i18n_uchar *pRet = NULL;
+
+               pRet = i18n_ustring_from_UTF8(ucharSource, I18N_UCHAR_CAPACITY, NULL, (const char*)szSource, -1, &ErrorCode );
+               nSourceLength = i18n_ustring_get_length(ucharSource);
+               if (pRet == NULL || ErrorCode != I18N_ERROR_NONE || nSourceLength <= 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8 pre-requisite API failed in iteration %d \n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nCollatorEqualFailCount++;
+                       continue;
+               }
+               pRet = i18n_ustring_from_UTF8(ucharTarget, I18N_UCHAR_CAPACITY, NULL, (const char*)szTarget, -1, &ErrorCode);
+               nTargetLength = i18n_ustring_get_length(ucharTarget);
+               if (pRet == NULL || ErrorCode != I18N_ERROR_NONE || nTargetLength <= 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8 pre-requisite API failed in iteration %d\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nCollatorEqualFailCount++;
+                       continue;
+               }
+               i18n_ubool bEqualityResult = false;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucollator_equal(uCollator, ucharSource, nSourceLength, ucharTarget, nTargetLength, &bEqualityResult);
+               BaseUtilsGetExecutionDelay(pszCollatorEqualSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszCollatorEqualMemLog);
+               if (nRetVal == I18N_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][%s] i18n_i18n_ucollator_equal passed with Equality Result Value = %s in Iteration (%d)\n", __LINE__, API_NAMESPACE, bEqualityResult ? "TRUE" : "FALSE", nLoopCount);
+               }
+               else
+               {
+                       ++nCollatorEqualFailCount;
+                       FPRINTF("\\n[Line : %d][%s] i18n_i18n_ucollator_equal failed for loop count = %d, error returned = %s \n", __LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(nRetVal));
+               }
+       }
+       i18n_ucollator_destroy(uCollator);
+       VALIDATE_RESULT(nCollatorEqualFailCount, "i18n_ucollator_equal", pszCollatorEqualMemLog, pszCollatorEqualSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_ucollator_equal", pszCollatorEqualSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_ucollator_equal", pszCollatorEqualMemLog);
+#endif
+       FREE_MEMORY(pszCollatorEqualMemLog, pszCollatorEqualSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compares two strings for equality
+/**
+* @testcase                            ITc_i18n_ucollator_set_strength_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compares two strings for equality
+* @apicovered                  i18n_ucollator_set_strength, i18n_ucollator_create, i18n_ucollator_destroy
+* @passcase                            When i18n_ucollator_set_strength is successful
+* @failcase                            If target i18n_ucollator_set_strength fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucollator_set_strength_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszCollatorEqualMemLog = NULL;
+       char *pszCollatorEqualSpeedLog = NULL;
+       int nCollatorEqualFailCount = 0;
+       i18n_ucollator_h uCollator = NULL;
+       nRetVal = i18n_ucollator_create(g_pszDefaultLocale, &uCollator);
+       PRINT_RESULT(nRetVal, "i18n_ucollator_create");
+
+       i18n_ucollator_strength_e eCollatorStrength[] = {       I18N_UCOLLATOR_DEFAULT,
+                                                                                                               I18N_UCOLLATOR_PRIMARY,
+                                                                                                               I18N_UCOLLATOR_SECONDARY,
+                                                                                                               I18N_UCOLLATOR_TERTIARY,
+                                                                                                               //I18N_UCOLLATOR_DEFAULT_STRENGTH,
+                                                                                                               I18N_UCOLLATOR_QUATERNARY,
+                                                                                                               I18N_UCOLLATOR_IDENTICAL};
+
+       int nEnumSize = sizeof(eCollatorStrength) / sizeof(eCollatorStrength[0]);
+       int nEnumCounter = 0;
+
+#if MEMORY_CHECK
+       pszCollatorEqualMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCollatorEqualSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       FPRINTF("\\n[Line : %d][%s] Executing i18n_ucollator_set_strength with Strength Value = %s in iteration %d, \n", __LINE__, API_NAMESPACE, UcollatorStrengthValues(eCollatorStrength[nEnumCounter]), nLoopCount);
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_ucollator_set_strength(uCollator, eCollatorStrength[nEnumCounter]);
+                       BaseUtilsGetExecutionDelay(pszCollatorEqualSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszCollatorEqualMemLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_ucollator_set_strength",nCollatorEqualFailCount);
+               }
+       }
+       i18n_ucollator_destroy(uCollator);
+       VALIDATE_RESULT(nCollatorEqualFailCount, "i18n_ucollator_set_strength", pszCollatorEqualMemLog, pszCollatorEqualSpeedLog, MAX_COUNT * nEnumSize);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_ucollator_set_strength", pszCollatorEqualSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_ucollator_set_strength", pszCollatorEqualMemLog);
+#endif
+       FREE_MEMORY(pszCollatorEqualMemLog, pszCollatorEqualSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compares two strings for equality
+/**
+* @testcase                            ITc_i18n_ucollator_set_attribute_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compares two strings for equality
+* @apicovered                  i18n_ucollator_set_attribute, i18n_ucollator_create, i18n_ucollator_destroy
+* @passcase                            When i18n_ucollator_set_attribute is successful
+* @failcase                            If target i18n_ucollator_set_attribute fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucollator_set_attribute_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszCollatorEqualMemLog = NULL;
+       char *pszCollatorEqualSpeedLog = NULL;
+       int nCollatorEqualFailCount = 0;
+       i18n_ucollator_h uCollator = NULL;
+       nRetVal = i18n_ucollator_create(g_pszDefaultLocale, &uCollator);
+       PRINT_RESULT(nRetVal, "i18n_ucollator_create");
+
+       i18n_ucollator_strength_e eCollatorAttributes[] = {I18N_UCOLLATOR_FRENCH_COLLATION,
+                                                                                               I18N_UCOLLATOR_ALTERNATE_HANDLING,
+                                                                                               I18N_UCOLLATOR_CASE_FIRST,
+                                                                                               I18N_UCOLLATOR_CASE_LEVEL,
+                                                                                               I18N_UCOLLATOR_NORMALIZATION_MODE,
+                                                                                               //I18N_UCOLLATOR_DECOMPOSITION_MODE,
+                                                                                               I18N_UCOLLATOR_STRENGTH,
+                                                                                               I18N_UCOLLATOR_NUMERIC_COLLATION};
+                                                                                               //I18N_UCOLLATOR_ATTRIBUTE_COUNT};
+
+       int nEnumSize = sizeof(eCollatorAttributes) / sizeof(eCollatorAttributes[0]);
+       int nEnumCounter = 0;
+
+#if MEMORY_CHECK
+       pszCollatorEqualMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCollatorEqualSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       FPRINTF("\\n[Line : %d][%s] Executing i18n_ucollator_set_attribute with Attribute Value = %s in iteration %d, \n", __LINE__, API_NAMESPACE, UcollatorAttributes(eCollatorAttributes[nEnumCounter]), nLoopCount);
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_ucollator_set_attribute(uCollator, eCollatorAttributes[nEnumCounter], I18N_UCOLLATOR_DEFAULT);
+                       BaseUtilsGetExecutionDelay(pszCollatorEqualSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszCollatorEqualMemLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_ucollator_set_attribute",nCollatorEqualFailCount);
+               }
+       }
+       i18n_ucollator_destroy(uCollator);
+       VALIDATE_RESULT(nCollatorEqualFailCount, "i18n_ucollator_set_attribute", pszCollatorEqualMemLog, pszCollatorEqualSpeedLog, MAX_COUNT * nEnumSize);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_ucollator_set_attribute", pszCollatorEqualSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_ucollator_set_attribute", pszCollatorEqualMemLog);
+#endif
+       FREE_MEMORY(pszCollatorEqualMemLog, pszCollatorEqualSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates and Destroy i18n_udate_format.
+/**
+* @testcase                            ITc_i18n_udate_create_destroy_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Creates i18n_udate_format.\n
+*                                              Destroy i18n_udate_format.
+* @apicovered                  i18n_udate_create, i18n_udate_destroy
+* @passcase                            When i18n_udate_create, i18n_udate_destroy are successful
+* @failcase                            If target i18n_udate_create or i18n_udate_destroy fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_create_destroy_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszDateCreateDestroyMemLog = NULL;
+       char *pszDateCreateSpeedLog = NULL;
+       char *pszDateDestroySpeedLog = NULL;
+       int nDateCreateFailCount = 0;
+       int nDateDestroyFailCount = 0;
+       i18n_udate_format_style_e eTimeFormatStyle[] = {        I18N_UDATE_FULL,
+                                                                                       I18N_UDATE_LONG,
+                                                                                       I18N_UDATE_MEDIUM,
+                                                                                       I18N_UDATE_SHORT,
+                                                                                       I18N_UDATE_NONE};
+       i18n_udate_format_style_e eDateFormatStyle[] = {        I18N_UDATE_FULL,
+                                                                                       I18N_UDATE_LONG,
+                                                                                       I18N_UDATE_MEDIUM,
+                                                                                       I18N_UDATE_SHORT,
+                                                                                       I18N_UDATE_RELATIVE,
+                                                                                       I18N_UDATE_LONG_RELATIVE,
+                                                                                       I18N_UDATE_MEDIUM_RELATIVE,
+                                                                                       I18N_UDATE_SHORT_RELATIVE,
+                                                                                       I18N_UDATE_NONE};
+       int nDateEnumSize = sizeof(eDateFormatStyle) / sizeof(eDateFormatStyle[0]);
+       int nEnumDateCounter = 0;
+       int nTimeEnumSize = sizeof(eTimeFormatStyle) / sizeof(eTimeFormatStyle[0]);
+       int nEnumTimeCounter = 0;
+       i18n_udatepg_h udatepgHandle = NULL;
+       nRetVal = i18n_udatepg_create(g_pszDefaultLocale, &udatepgHandle);
+       PRINT_RESULT(nRetVal, "i18n_udatepg_create");
+       int nCustomFormatLength = 0;
+       i18n_uchar ucharCustomFormat[I18N_DATEPG_BEST_PATTERN_CAPACITY];
+       i18n_uchar *pRet = NULL;
+
+       pRet = i18n_ustring_copy_ua(ucharCustomFormat, (char *)I18N_DATE_TIME_CUSTOM_FORMAT);
+       nCustomFormatLength = i18n_ustring_get_length(ucharCustomFormat);
+       if (pRet == NULL || nCustomFormatLength <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition \n", __LINE__, API_NAMESPACE);
+               i18n_udatepg_destroy(udatepgHandle);
+               return 1;
+       }
+       i18n_uchar bestPattern[I18N_DATEPG_BEST_PATTERN_CAPACITY] = { 0, };
+       int nBestPatternCapacity = (int)(sizeof(bestPattern)/sizeof(bestPattern[0]));
+       int nBestPatternLength = 0;
+       nRetVal = i18n_udatepg_get_best_pattern(udatepgHandle, ucharCustomFormat, nCustomFormatLength, bestPattern, nBestPatternCapacity, &nBestPatternLength);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_udatepg_get_best_pattern failed, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               i18n_udatepg_destroy(udatepgHandle);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszDateCreateDestroyMemLog = calloc(MEMLOG * MAX_COUNT * nDateEnumSize * nTimeEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszDateCreateSpeedLog = calloc(TIMELOG * MAX_COUNT * nDateEnumSize * nTimeEnumSize, sizeof(char));
+       pszDateDestroySpeedLog = calloc(TIMELOG * MAX_COUNT * nDateEnumSize * nTimeEnumSize, sizeof(char));
+#endif
+       for (nEnumTimeCounter = 0; nEnumTimeCounter < nTimeEnumSize; nEnumTimeCounter++)
+       {
+               for (nEnumDateCounter = 0; nEnumDateCounter < nDateEnumSize; nEnumDateCounter++)
+               {
+                       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               i18n_udate_format_h uDate = NULL;
+                               FPRINTF("\\n[Line : %d][%s] Executing i18n_udate_create with Time Format Style = %s, Date Format Style = %s and default Locale=%s on iteration %d, \n", __LINE__, API_NAMESPACE, UdateGetFormatStyle(eTimeFormatStyle[nEnumTimeCounter]), UdateGetFormatStyle(eDateFormatStyle[nEnumDateCounter]), g_pszDefaultLocale, nLoopCount);
+                               BaseUtilsGetMemAllocation();
+                               BaseUtilsGetTimeOfDay();
+                               nRetVal = i18n_udate_create(eTimeFormatStyle[nEnumTimeCounter], eDateFormatStyle[nEnumDateCounter], g_pszDefaultLocale, g_pDefaultTzid, g_nLengthDefaultTimeZone, bestPattern, nBestPatternLength, &uDate);
+                               BaseUtilsGetExecutionDelay(pszDateCreateSpeedLog);
+                               PRINT_RESULT_LOOP(nRetVal,"i18n_udate_create",nDateCreateFailCount);
+                               BaseUtilsGetTimeOfDay();
+                               nRetVal = i18n_udate_destroy(uDate);
+                               BaseUtilsGetExecutionDelay(pszDateDestroySpeedLog);
+                               BaseUtilsGetMemoryLeakStatus(pszDateCreateDestroyMemLog);
+                               PRINT_RESULT_LOOP(nRetVal,"i18n_udate_destroy",nDateDestroyFailCount);
+                       }
+               }
+       }
+       i18n_udatepg_destroy(udatepgHandle);
+       VALIDATE_RESULT_PAIRAPI(nDateCreateFailCount, nDateDestroyFailCount, "i18n_udate_create", "i18n_udate_destroy", pszDateCreateDestroyMemLog, pszDateCreateSpeedLog, pszDateDestroySpeedLog, MAX_COUNT * nDateEnumSize * nTimeEnumSize);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_udate_create", pszDateCreateSpeedLog);
+               PRINT_SPEED_LOG("i18n_udate_destroy", pszDateDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_udate_create_destroy", pszDateCreateDestroyMemLog);
+#endif
+       FREE_MEMORY(pszDateCreateDestroyMemLog, pszDateCreateSpeedLog, pszDateDestroySpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Formats a date using an i18n_udate_format.
+/**
+* @testcase                            ITc_i18n_udate_format_date_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Formats a date using an i18n_udate_format.
+* @apicovered                  i18n_udate_format_date
+* @passcase                            When i18n_udate_format_date is successful
+* @failcase                            If target i18n_udate_format_date fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_format_date_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       i18n_uchar *pRet = NULL;
+       char *pszFormatDateMemLog = NULL;
+       char *pszFormatDateSpeedLog = NULL;
+       int nFormatDateFailCount = 0;
+       int nCustomFormatLength = 0;
+       i18n_udatepg_h udatepgHandle = NULL;
+       i18n_uchar ucharCustomFormat[I18N_DATEPG_BEST_PATTERN_CAPACITY];
+       pRet = i18n_ustring_copy_ua(ucharCustomFormat, (char *)I18N_DATE_TIME_CUSTOM_FORMAT);
+       nCustomFormatLength = i18n_ustring_get_length(ucharCustomFormat);
+       if(pRet == NULL || nCustomFormatLength <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar bestPattern[I18N_DATEPG_BEST_PATTERN_CAPACITY] = { 0, };
+       int nBestPatternCapacity = (int)(sizeof(bestPattern)/sizeof(bestPattern[0]));
+       int nBestPatternLength = 0;
+       nRetVal = i18n_udatepg_create(g_pszDefaultLocale, &udatepgHandle);
+       PRINT_RESULT(nRetVal, "i18n_udatepg_create");
+       nRetVal = i18n_udatepg_get_best_pattern(udatepgHandle, ucharCustomFormat, nCustomFormatLength, bestPattern, nBestPatternCapacity, &nBestPatternLength);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_udatepg_get_best_pattern failed, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               i18n_udatepg_destroy(udatepgHandle);
+               return 1;
+       }
+       i18n_udate_format_h uDateFormat = NULL;
+       nRetVal = i18n_udate_create(I18N_UDATE_DEFAULT, I18N_UDATE_DEFAULT, g_pszDefaultLocale, g_pDefaultTzid, g_nLengthDefaultTimeZone, bestPattern, nBestPatternLength, &uDateFormat);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_udate_create failed, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               i18n_udatepg_destroy(udatepgHandle);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszFormatDateMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFormatDateSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               i18n_udate uDate;
+               nRetVal = i18n_ucalendar_get_now(&uDate);
+               PRINT_RESULT(nRetVal, "i18n_ucalendar_get_now");
+               i18n_uchar resultFormattedDate[I18N_FORMATED_DATE_CAPACITY] = {0,};
+               int nFormattedDateBufferSizeNeeded = 0;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_udate_format_date(uDateFormat, uDate, resultFormattedDate, I18N_FORMATED_DATE_CAPACITY, NULL, &nFormattedDateBufferSizeNeeded);
+               BaseUtilsGetExecutionDelay(pszFormatDateSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszFormatDateMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_udate_format_date",nFormatDateFailCount);
+               if(nFormattedDateBufferSizeNeeded > I18N_FORMATED_DATE_CAPACITY)
+               {
+                       FPRINTF("\\n[Line : %d][%s] The Returned Formatted Date Buffer Size(%d) is greater than formatted date capacity(%d)\n", __LINE__, API_NAMESPACE, nFormattedDateBufferSizeNeeded, I18N_FORMATED_DATE_CAPACITY);
+               }
+               char formattedDateChar[I18N_FORMATED_DATE_CAPACITY] = {0,};
+               i18n_ustring_copy_au_n(formattedDateChar, resultFormattedDate, I18N_FORMATED_DATE_CAPACITY);
+               if(strlen(formattedDateChar) <= 0)
+               {
+                       nFormatDateFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] update_format_date failed on iteration %d, as The result Formatted Date Char Length is either less than or Equal to Zero.", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+       }
+       i18n_udate_destroy(uDateFormat);
+       i18n_udatepg_destroy(udatepgHandle);
+       VALIDATE_RESULT(nFormatDateFailCount, "i18n_udate_format_date", pszFormatDateMemLog, pszFormatDateSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_udate_format_date", pszFormatDateSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_udate_format_date", pszFormatDateMemLog);
+#endif
+       FREE_MEMORY(pszFormatDateMemLog, pszFormatDateSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the first index at which the string text matches the search and Returns the matched text.
+/**
+* @testcase                            ITc_i18n_usearch_first_get_macthed_text_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the first index at which the string text matches the search.\n
+*                                              Returns the text that was matched by the most recent call to i18n_usearch_first.
+* @apicovered                  i18n_usearch_first, i18n_usearch_get_matched_text, i18n_ustring_from_UTF8, i18n_usearch_create, i18n_usearch_get_matched_text, i18n_usearch_destroy
+* @passcase                            When i18n_usearch_first, i18n_usearch_get_matched_text are successful
+* @failcase                            If target i18n_usearch_first or i18n_usearch_get_matched_text fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_usearch_first_get_macthed_text_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       i18n_uchar *pRet = NULL;
+
+       char *pszUsearchFirstGetMatchedMemLog = NULL;
+       char *pszUsearchFirstSpeedLog = NULL;
+       char *pszUsearchGetMatchedSpeedLog = NULL;
+       int nUsearchFirstFailCount = 0;
+       int nUsearchGetMatchedFailCount = 0;
+
+       i18n_uchar target[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_uchar pattern[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_usearch_h uSearch = NULL;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+       pRet = i18n_ustring_from_UTF8(target, I18N_UCHAR_CAPACITY, NULL, SOURCE_STRING, -1 , &ErrorCode);
+       if(pRet == NULL || i18n_ustring_get_length(target) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8 Failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PRINT_RESULT(ErrorCode, "i18n_ustring_from_UTF8");
+       pRet = i18n_ustring_from_UTF8(pattern, I18N_UCHAR_CAPACITY, NULL, USEARCH_KEYWORD, -1, &ErrorCode);
+       if(pRet == NULL || i18n_ustring_get_length(pattern) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8 Failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PRINT_RESULT(ErrorCode, "i18n_ustring_from_UTF8");
+       nRetVal = i18n_usearch_create_new(pattern, I18N_UCHAR_CAPACITY, target, I18N_UCHAR_CAPACITY, g_pszDefaultLocale, NULL, &uSearch);
+       PRINT_RESULT(nRetVal, "i18n_usearch_create_new");
+
+#if MEMORY_CHECK
+       pszUsearchFirstGetMatchedMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUsearchFirstSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUsearchGetMatchedSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nPosition = 0;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_usearch_first(uSearch, &nPosition);
+               BaseUtilsGetExecutionDelay(pszUsearchFirstSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_usearch_first",nUsearchFirstFailCount);
+               if (nPosition != USEARCH_MATCHED_POSITION)
+               {
+                       nUsearchFirstFailCount++;
+                       FPRINTF("\\n[Line : %d][%s]Target API i18n_usearch_first Failed in iteration %d, as expected search position(%d) not matched with actual search position(%d)\n", __LINE__, API_NAMESPACE, nLoopCount, USEARCH_MATCHED_POSITION, nPosition);
+                       continue;
+               }
+               i18n_uchar matchedPattern[I18N_UCHAR_CAPACITY] = {0,};
+               int nMatchedLength = 0;
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_usearch_get_matched_text(uSearch, matchedPattern, I18N_UCHAR_CAPACITY, &nMatchedLength);
+               BaseUtilsGetExecutionDelay(pszUsearchGetMatchedSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUsearchFirstGetMatchedMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_usearch_get_matched_text",nUsearchGetMatchedFailCount);
+               if(nMatchedLength != USEARCH_MATCHED_LENGTH)
+               {
+                       nUsearchGetMatchedFailCount++;
+                       FPRINTF("\\n[Line : %d][%s]Target API i18n_usearch_get_matched_text Failed in iteration %d, as expected matched Length(%d) not equal with actual matched length(%d)\n", __LINE__, API_NAMESPACE, nLoopCount, USEARCH_MATCHED_LENGTH, nMatchedLength);
+               }
+       }
+       i18n_usearch_destroy(uSearch);
+       VALIDATE_RESULT_PAIRAPI(nUsearchFirstFailCount, nUsearchGetMatchedFailCount, "i18n_usearch_first", "i18n_usearch_get_matched_text", pszUsearchFirstGetMatchedMemLog, pszUsearchFirstSpeedLog, pszUsearchGetMatchedSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_usearch_first", pszUsearchFirstSpeedLog);
+               PRINT_SPEED_LOG("i18n_usearch_get_matched_text", pszUsearchGetMatchedSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_usearch_first_get_matched_text", pszUsearchFirstGetMatchedMemLog);
+#endif
+       FREE_MEMORY(pszUsearchFirstGetMatchedMemLog, pszUsearchFirstSpeedLog, pszUsearchGetMatchedSpeedLog);;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the collator used for the language rules.
+/**
+* @testcase                            ITc_i18n_usearch_get_collator_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Gets the collator used for the language rules.
+* @apicovered                  i18n_usearch_get_collator, i18n_usearch_create, i18n_usearch_destroy
+* @passcase                            When i18n_usearch_get_collator is successful
+* @failcase                            If target i18n_usearch_get_collator fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_usearch_get_collator_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszUsearchGetCollatorMemLog = NULL;
+       char *pszUsearchGetCollatorSpeedLog = NULL;
+       int nUsearchGetCollatorFailCount = 0;
+       i18n_uchar target[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_uchar pattern[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+       i18n_ustring_from_UTF8(target, I18N_UCHAR_CAPACITY, NULL, SOURCE_STRING, -1, &ErrorCode );
+       PRINT_RESULT(ErrorCode, "i18n_ustring_from_UTF8");
+       i18n_ustring_from_UTF8(pattern, I18N_UCHAR_CAPACITY, NULL, USEARCH_KEYWORD, -1, &ErrorCode);
+       PRINT_RESULT(ErrorCode, "i18n_ustring_from_UTF8");
+
+#if MEMORY_CHECK
+       pszUsearchGetCollatorMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUsearchGetCollatorSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               i18n_usearch_h uSearch = NULL;
+               i18n_ucollator_h uCollator = NULL;
+               nRetVal = i18n_usearch_create_new(pattern, I18N_UCHAR_CAPACITY, target, I18N_UCHAR_CAPACITY, g_pszDefaultLocale, NULL, &uSearch);
+               if(nRetVal != I18N_ERROR_NONE)
+               {
+                       nUsearchGetCollatorFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_usearch_create_new PreRequiste-API failed while testing target API i18n_usearch_get_collator in iteration %d, Error Code = %s\n", __LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(nRetVal));
+                       continue;
+               }
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_usearch_get_collator(uSearch, &uCollator);
+               BaseUtilsGetExecutionDelay(pszUsearchGetCollatorSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUsearchGetCollatorMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_usearch_get_collator",nUsearchGetCollatorFailCount);
+               if (uCollator == NULL)
+               {
+                       nUsearchGetCollatorFailCount++;
+                       FPRINTF("\\n[Line : %d][%s]Target API i18n_usearch_get_collator Failed in iteration %d, as ucollator is not initialized (NULL)\n", __LINE__, API_NAMESPACE, nLoopCount);
+               }
+               nRetVal = i18n_usearch_destroy(uSearch);
+       }
+       VALIDATE_RESULT(nUsearchGetCollatorFailCount, "i18n_usearch_get_collator", pszUsearchGetCollatorMemLog, pszUsearchGetCollatorSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_usearch_get_collator", pszUsearchGetCollatorSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_usearch_get_collator", pszUsearchGetCollatorMemLog);
+#endif
+       FREE_MEMORY(pszUsearchGetCollatorMemLog, pszUsearchGetCollatorSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Making clone of existing calendar.
+/**
+* @testcase                            ITc_i18n_ucalendar_clone_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Making clone  of existing calendar
+* @apicovered                  i18n_ucalendar_clone, i18n_ucalendar_create, i18n_ucalendar_destroy
+* @passcase                            When i18n_ucalendar_clone is successful
+* @failcase                            If target i18n_ucalendar_clone fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_clone_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_ucalendar_h ucalender = NULL;
+       i18n_ucalendar_h ucalender_clone = NULL;
+       nRetVal = i18n_ucalendar_create(g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, I18N_UCALENDAR_DEFAULT, &ucalender);
+       PRINT_RESULT(nRetVal, "i18n_ucalendar_create");
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucalendar_clone(ucalender, &ucalender_clone);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_clone",nFailCount);
+       }
+       i18n_ucalendar_destroy(ucalender);
+       VALIDATE_RESULT(nFailCount, "i18n_ucalendar_clone", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_ucalendar_clone", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_ucalendar_clone", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Used to set data fields.
+/**
+* @testcase                            ITc_i18n_ucalendar_set_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Used to set data fields
+* @apicovered                  i18n_ucalendar_set, i18n_ucalendar_create, i18n_ucalendar_destroy
+* @passcase                            When i18n_ucalendar_set is successful
+* @failcase                            If target i18n_ucalendar_set fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_set_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_ucalendar_h ucalender = NULL;
+       int nVal = 0;
+       i18n_ucalendar_date_fields_e eDateFields[] = {  I18N_UCALENDAR_ERA,
+                                                                               I18N_UCALENDAR_YEAR,
+                                                                               I18N_UCALENDAR_MONTH,
+                                                                               I18N_UCALENDAR_WEEK_OF_YEAR,
+                                                                               I18N_UCALENDAR_WEEK_OF_MONTH,
+                                                                               I18N_UCALENDAR_DATE,
+                                                                               I18N_UCALENDAR_DAY_OF_YEAR,
+                                                                               I18N_UCALENDAR_DAY_OF_WEEK,
+                                                                               I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH,
+                                                                               I18N_UCALENDAR_AM_PM,
+                                                                               I18N_UCALENDAR_HOUR,
+                                                                               I18N_UCALENDAR_HOUR_OF_DAY,
+                                                                               I18N_UCALENDAR_MINUTE,
+                                                                               I18N_UCALENDAR_SECOND,
+                                                                               I18N_UCALENDAR_MILLISECOND,
+                                                                               /*I18N_UCALENDAR_ZONE_OFFSET,
+                                                                               I18N_UCALENDAR_DST_OFFSET*/};
+       int nEnumSize = sizeof(eDateFields) / sizeof(eDateFields[0]);
+       nRetVal = i18n_ucalendar_create(g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, I18N_UCALENDAR_DEFAULT, &ucalender);
+       PRINT_RESULT(nRetVal, "i18n_ucalendar_create");
+       int nEnumCounter = 0;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT*nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT*nEnumSize, sizeof(char));
+#endif
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_ucalendar_set(ucalender, eDateFields[nEnumCounter], nVal);
+                       BaseUtilsGetExecutionDelay(pszSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszMemLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_set",nFailCount);
+               }
+       }
+       i18n_ucalendar_destroy(ucalender);
+       VALIDATE_RESULT(nFailCount, "i18n_ucalendar_set", pszMemLog, pszSpeedLog, MAX_COUNT*nEnumSize);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_ucalendar_set", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_ucalendar_set", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Setting default time zone.
+/**
+* @testcase                            ITc_i18n_ucalendar_set_default_timezone_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            - Setting default time zone.
+* @apicovered                  i18n_ucalendar_set_default_timezone
+* @passcase                            When i18n_ucalendar_set_default_timezone is successful
+* @failcase                            If target i18n_ucalendar_set_default_timezone fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_set_default_timezone_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar nZoneId = 0;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucalendar_set_default_timezone(&nZoneId);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_set_default_timezone",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ucalendar_set_default_timezone", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_ucalendar_set_default_timezone", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_ucalendar_set_default_timezone", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the unknown time zone.
+/**
+* @testcase                            ITc_i18n_timezone_create_unknown_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns the unknown time zone.
+* @apicovered                  i18n_timezone_create_unknown, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_create_unknown is successful
+* @failcase                            If target i18n_timezone_create_unknown API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_create_unknown_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h nTimeZone = NULL;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_create_unknown(&nTimeZone);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_create_unknown",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_create_unknown", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_create_unknown", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_create_unknown", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the GMT time zone.
+/**
+* @testcase                            ITc_i18n_timezone_create_gmt_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            - returns the GMT time zone.
+* @apicovered                  i18n_timezone_create_gmt, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_create_gmt is successful
+* @failcase                            If target i18n_timezone_create_gmt API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_create_gmt_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h nTimeZone = NULL;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_create_gmt(&nTimeZone);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_create_gmt",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_create_gmt", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_create_gmt", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_create_gmt", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Create and destroy an i18n_timezone_h for the given timezone_id.
+/**
+* @testcase                            ITc_i18n_timezone_create_destroy_p
+* @since_tizen                         2.4
+* @type                                auto
+* @scenario                            - Create and destroy an i18n_timezone_h for the given timezone_id.
+* @apicovered                  i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_create and i18n_timezone_destroy are successful
+* @failcase                            If target i18n_timezone_create or i18n_timezone_destroy API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_create_destroy_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszTimeZoneCreateDestroyMemLog = NULL;
+       char *pszTimeZoneCreateSpeedLog = NULL;
+       char *pszTimeZoneDestroySpeedLog = NULL;
+       int nTimeZoneCreateFailCount = 0;
+       int nTimeZoneDestroyFailCount = 0;
+       i18n_timezone_h nTimeZone = NULL;
+       char szZoneId[] = "India/New_Delhi";
+
+#if MEMORY_CHECK
+       pszTimeZoneCreateDestroyMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszTimeZoneCreateSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszTimeZoneDestroySpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_create(&nTimeZone, szZoneId);
+               BaseUtilsGetExecutionDelay(pszTimeZoneCreateSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_create",nTimeZoneCreateFailCount);
+
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_destroy(nTimeZone);
+               BaseUtilsGetExecutionDelay(pszTimeZoneDestroySpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszTimeZoneCreateDestroyMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_destroy",nTimeZoneDestroyFailCount);
+       }
+       VALIDATE_RESULT_PAIRAPI(nTimeZoneCreateFailCount, nTimeZoneDestroyFailCount, "i18n_timezone_create", "i18n_timezone_destroy", pszTimeZoneCreateDestroyMemLog, pszTimeZoneCreateSpeedLog, pszTimeZoneDestroySpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_timezone_create", pszTimeZoneCreateSpeedLog);
+       PRINT_SPEED_LOG("i18n_timezone_destroy", pszTimeZoneDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_timezone_create_destroy", pszTimeZoneCreateDestroyMemLog);
+#endif
+       FREE_MEMORY(pszTimeZoneCreateDestroyMemLog, pszTimeZoneCreateSpeedLog, pszTimeZoneDestroySpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the no of IDs in the equivalency group that include the given id.
+/**
+* @testcase                            ITc_i18n_timezone_count_equivalent_ids_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns the no of IDs in the equivalency group that include the given id.
+* @apicovered                  i18n_timezone_count_equivalent_ids
+* @passcase                            When i18n_timezone_count_equivalent_ids is successful
+* @failcase                            If target i18n_timezone_count_equivalent_ids API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_count_equivalent_ids_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nIdCount;
+       char szZoneId[] = "India/New_Delhi";
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_count_equivalent_ids(szZoneId, &nIdCount);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_count_equivalent_ids returns id count = %d \n", __LINE__, API_NAMESPACE, nIdCount);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_count_equivalent_ids",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_count_equivalent_ids", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_count_equivalent_ids", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_count_equivalent_ids", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the ID in equivalency group that include the given id.
+/**
+* @testcase                            ITc_i18n_timezone_get_equivalent_id_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns the ID in equivalency group that include the given id.
+* @apicovered                  i18n_timezone_get_equivalent_id
+* @passcase                            When i18n_timezone_get_equivalent_id is successful
+* @failcase                            If target i18n_timezone_get_equivalent_id API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_get_equivalent_id_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nIdCount;
+       int nIndex = 0;
+       char *pEquivalentId = NULL;
+       char szZoneId[] = "India/New_Delhi";
+
+       nRetVal = i18n_timezone_count_equivalent_ids(szZoneId, &nIdCount);
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_count_equivalent_ids failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       if(nIdCount == 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] Given ID is not a system time zone\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       nIndex = nIdCount-1;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_equivalent_id(szZoneId, nIndex, &pEquivalentId);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_get_equivalent_id",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_get_equivalent_id", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_get_equivalent_id", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_get_equivalent_id", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Create a new copy of the default i18n_timezone_h for this host.
+/**
+* @testcase                            ITc_i18n_timezone_create_default_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Create a new copy of the default i18n_timezone_h for this host.
+* @apicovered                  i18n_timezone_create_default, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_create_default is successful
+* @failcase                            If target i18n_timezone_create_default API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_create_default_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       //int nIdCount;
+       i18n_timezone_h timezone;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_create_default(&timezone);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_create_default",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_create_default", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_create_default", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_create_default", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set the default time zone to be the specified time zone.
+/**
+* @testcase                            ITc_i18n_timezone_set_default_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            -Set the default time zone to be the specified time zone.
+* @apicovered                  i18n_timezone_set_default, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_set_default is successful
+* @failcase                            If target i18n_timezone_set_default API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_set_default_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone = NULL;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_set_default(timezone);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_set_default",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_set_default", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_set_default", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_set_default", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose:Returns the timezone data version currently used by I18N.
+/**
+* @testcase                            ITc_i18n_timezone_get_tzdata_version_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns the timezone data version currently used by I18N.
+* @apicovered                  i18n_timezone_get_tzdata_version
+* @passcase                            When i18n_timezone_get_tzdata_version is successful
+* @failcase                            If target i18n_timezone_get_tzdata_version API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_get_tzdata_version_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       const char *pRetVal;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRetVal = i18n_timezone_get_tzdata_version();
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_get_tzdata_version returns : %s\n",__LINE__, API_NAMESPACE,pRetVal);
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_timezone_get_tzdata_version", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_get_tzdata_version", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_get_tzdata_version", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the region code associated with the given system time zone id.
+/**
+* @testcase                            ITc_i18n_timezone_get_region_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Get the region code associated with the given system time zone id.
+* @apicovered                  i18n_timezone_get_region
+* @passcase                            When i18n_timezone_get_region is successful
+* @failcase                            If target i18n_timezone_get_region API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_get_region_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       const char szTimeZoneId[] = "UTC+05:30";
+       char szRegion[BUFFER] = {'\0'};
+       int32_t region_len;
+       int32_t region_capacity = BUFFER;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_region(szTimeZoneId, szRegion, &region_len, region_capacity);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_get_region returns region = %s and return value = %d \n",__LINE__, API_NAMESPACE,szRegion, nRetVal);
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_timezone_get_region", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_get_region", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_get_region", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the offset of given time zone.
+/**
+* @testcase                            ITc_i18n_timezone_get_offset_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            -Get the offset of given time zone.
+* @apicovered                  i18n_timezone_get_offset
+* @passcase                            When i18n_timezone_get_offset is successful.
+* @failcase                            If target i18n_timezone_get_offset api fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+/*int ITc_i18n_timezone_get_offset_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone;
+       uint8_t era;
+       int32_t year;
+       int32_t month;
+       int32_t day;
+       uint8_t day_of_week;
+       int32_t milliseconds;
+       int32_t offset;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_offset(timezone, era, year, month, day, day_of_week, milliseconds, &offset);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_get_offset returns : %d\n",__LINE__, API_NAMESPACE,nRetVal);
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_timezone_get_offset", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_get_offset", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_get_offset", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}*/
+
+//& type: auto
+//& purpose: Get the offset of given time zone with month length.
+/**
+* @testcase                            ITc_i18n_timezone_get_offset_with_monthlength_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            -Get the offset of given time zone with month length.
+* @apicovered                  i18n_timezone_get_offset_with_monthlength
+* @passcase                            When i18n_timezone_get_offset_with_monthlength is successful.
+* @failcase                            If target i18n_timezone_get_offset_with_monthlength api fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+/*int ITc_i18n_timezone_get_offset_with_monthlength_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone;
+       uint8_t era;
+       int32_t year;
+       int32_t month;
+       int32_t day;
+       uint8_t day_of_week;
+       int32_t milliseconds;
+       int32_t month_length;
+       int32_t offset;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_offset_with_monthlength(timezone, era, year, month, day, day_of_week, milliseconds, &offset);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_get_offset_with_monthlength returns : %d\n",__LINE__, API_NAMESPACE,nRetVal);
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_timezone_get_offset_with_monthlength", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_get_offset_with_monthlength", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_get_offset_with_monthlength", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}*/
+
+//& type: auto
+//& purpose: Returns the timezone raw and GMT offset for the given moment in time.
+/**
+* @testcase                            ITc_i18n_timezone_get_offset_with_date_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns the timezone raw and GMT offset for the given moment in time.
+* @apicovered                  i18n_timezone_get_offset_with_date, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_get_offset_with_date is successful
+* @failcase                            If target i18n_timezone_get_offset_with_date API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_get_offset_with_date_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone = NULL;
+       i18n_udate date;
+       i18n_ubool local = true;
+       int32_t raw_offset;
+       int32_t dst_offset;
+
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_ucalendar_get_now(&date);
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_offset_with_date(timezone, date, local, &raw_offset, &dst_offset);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_get_offset_with_date",nFailCount);
+               //FPRINTF("\\n[Line : %d][%s] i18n_timezone_get_offset_with_date returns : %d\n",__LINE__, API_NAMESPACE,nRetVal);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_get_offset_with_date", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_get_offset_with_date", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_get_offset_with_date", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get and set the region code associated with the given system time zone id.
+/**
+* @testcase                            ITc_i18n_timezone_set_get_raw_offset_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Get and set the region code associated with the given system time zone id.
+* @apicovered                  i18n_timezone_set_raw_offset, i18n_timezone_get_raw_offset, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_set_raw_offset and i18n_timezone_get_raw_offset is successful
+* @failcase                            If target i18n_timezone_set_raw_offset or i18n_timezone_get_raw_offset API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_set_get_raw_offset_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       i18n_timezone_h timezone = NULL;
+       int32_t offset_milliseconds = 10000;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t nGetVal;
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_set_raw_offset(timezone, offset_milliseconds);
+               BaseUtilsGetExecutionDelay(pszSetSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_set_raw_offset",nSetFailCount);
+
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_raw_offset(timezone, &nGetVal);
+               BaseUtilsGetExecutionDelay(pszGetSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszSetGetMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_get_raw_offset",nGetFailCount);
+               if(nGetVal != offset_milliseconds)
+               {
+                       nGetFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] Set and Get value didn't match\n",__LINE__, API_NAMESPACE);
+               }
+       }
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nGetFailCount, "i18n_timezone_set_raw_offset", "i18n_timezone_get_raw_offset", pszSetGetMemLog, pszSetSpeedLog,pszGetSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_set_raw_offset", pszSetSpeedLog);
+               PRINT_SPEED_LOG("i18n_timezone_get_raw_offset", pszGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_set_get_raw_offset", pszSetGetMemLog);
+#endif
+       FREE_MEMORY(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get and set the i18n_timezone_h ID to the specified value.
+/**
+* @testcase                            ITc_i18n_timezone_set_get_id_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Get and set the i18n_timezone_h ID to the specified value.
+* @apicovered                  i18n_timezone_set_id, i18n_timezone_get_id, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_set_id and i18n_timezone_get_id is successful
+* @failcase                            If target i18n_timezone_set_id or i18n_timezone_get_id API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_set_get_id_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       i18n_timezone_h timezone = NULL;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       char szTimeZoneid[] = "India/Kolkata";
+       char *pGetTimeZoneId;
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_set_id(timezone, szTimeZoneid);
+               BaseUtilsGetExecutionDelay(pszSetSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_set_id",nSetFailCount);
+
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_id(timezone, &pGetTimeZoneId);
+               BaseUtilsGetExecutionDelay(pszGetSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszSetGetMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_get_id",nGetFailCount);
+               if(strcmp(szTimeZoneid, pGetTimeZoneId) != 0)
+               {
+                       nGetFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] Set and Get value didn't match\n",__LINE__, API_NAMESPACE);
+               }
+       }
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nGetFailCount, "i18n_timezone_set_id", "i18n_timezone_get_id", pszSetGetMemLog, pszSetSpeedLog,pszGetSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_set_id", pszSetSpeedLog);
+               PRINT_SPEED_LOG("i18n_timezone_get_id", pszGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_set_get_raw_offset", pszSetGetMemLog);
+#endif
+       FREE_MEMORY(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns a name of this time zone suitable for presentation to the user in the default locale.
+/**
+* @testcase                            ITc_i18n_timezone_get_display_name_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns a name of this time zone suitable for presentation to the user in the default locale.
+* @apicovered                  i18n_timezone_get_display_name, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_get_display_name is successful
+* @failcase                            If target i18n_timezone_get_display_name API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_get_display_name_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone = NULL;
+       char *pDisplayName;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_display_name(timezone, &pDisplayName);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_get_display_name",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_get_display_name", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_get_display_name", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_get_display_name", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns a name of this time zone suitable for presentation to the user in the default locale.
+/**
+* @testcase                            ITc_i18n_timezone_get_display_name_with_locale_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns a name of this time zone suitable for presentation to the user in the default locale.
+* @apicovered                  i18n_timezone_get_display_name_with_locale, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_get_display_name_with_locale is successful
+* @failcase                            If target i18n_timezone_get_display_name_with_locale API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_get_display_name_with_locale_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone = NULL;
+       char szLanguage[] = "ENG";
+       char szCountry[] = "India";
+       char *pDisplayName;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_display_name_with_locale(timezone, szLanguage, szCountry, &pDisplayName);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_get_display_name_with_locale",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_get_display_name_with_locale", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_get_display_name_with_locale", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_get_display_name_with_locale", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns a name of this time zone suitable for presentation to the user in default locale.
+/**
+* @testcase                            ITc_i18n_timezone_get_display_name_with_type_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns a name of this time zone suitable for presentation to the user in default locale.
+* @apicovered                  i18n_timezone_get_display_name_with_type, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_get_display_name_with_type is successful
+* @failcase                            If target i18n_timezone_get_display_name_with_type API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_get_display_name_with_type_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone = NULL;
+       i18n_ubool daylight = true;
+       i18n_timezone_display_type_e style = I18N_TIMEZONE_DISPLAY_TYPE_LONG;
+       char *pDisplayName;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_display_name_with_type(timezone, daylight, style, &pDisplayName);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_get_display_name_with_type",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_get_display_name_with_type", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_get_display_name_with_type", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_get_display_name_with_type", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns a name of this time zone suitable for presentation to the user in the default locale.
+/**
+* @testcase                            ITc_i18n_timezone_get_display_name_with_type_locale_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns a name of this time zone suitable for presentation to the user in the default locale.
+* @apicovered                  i18n_timezone_get_display_name_with_type_locale, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_get_display_name_with_type_locale is successful
+* @failcase                            If target i18n_timezone_get_display_name_with_type_locale API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_get_display_name_with_type_locale_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone;
+       i18n_ubool daylight = true;
+       i18n_timezone_display_type_e style = I18N_TIMEZONE_DISPLAY_TYPE_LONG;
+       const char *pLang = "English";
+       const char *pCountry = "India";
+       char *pDisplayName;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_display_name_with_type_locale(timezone, daylight, style, pLang, pCountry, &pDisplayName);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_get_display_name_with_type_locale",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_get_display_name_with_type_locale", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_get_display_name_with_type_locale", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_get_display_name_with_type_locale", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Queries if the given date is in daylight saving time in this time zone.
+/**
+* @testcase                            ITc_i18n_timezone_use_daylight_time_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Queries if the given date is in daylight saving time in this time zone.
+* @apicovered                  i18n_timezone_use_daylight_time, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_use_daylight_time is successful
+* @failcase                            If target i18n_timezone_use_daylight_time API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_use_daylight_time_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone = NULL;
+       i18n_ubool daylight_time;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_use_daylight_time(timezone, &daylight_time);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_use_daylight_time",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_use_daylight_time", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_use_daylight_time", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_use_daylight_time", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+#if 0
+//& type: auto
+//& purpose: Queries if this time zone uses daylight saving time.
+/**
+* @testcase                            ITc_i18n_timezone_in_daylight_time_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Queries if this time zone uses daylight saving time.
+* @apicovered                  i18n_timezone_in_daylight_time, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_in_daylight_time is successful
+* @failcase                            If target i18n_timezone_in_daylight_time API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+//Implict declaraion error for function 'i18n_timezone_in_daylight_time'
+//int ITc_i18n_timezone_in_daylight_time_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone;
+       i18n_udate date;
+       i18n_ubool daylight_time;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_ucalendar_get_now(&date);
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_in_daylight_time(timezone, date, &daylight_time);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_in_daylight_time",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_in_daylight_time", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_in_daylight_time", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_in_daylight_time", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+#endif
+
+//& type: auto
+//& purpose: Returns true if this zone has the same rule and offset as another zone.
+/**
+* @testcase                            ITc_i18n_timezone_has_same_rule_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns true if this zone has the same rule and offset as another zone.
+* @apicovered                  i18n_timezone_has_same_rule, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_has_same_rule is successful
+* @failcase                            If target i18n_timezone_has_same_rule API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_has_same_rule_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone = NULL;
+       i18n_timezone_h other = NULL;
+       i18n_ubool same_rule;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRetVal = i18n_timezone_create(&other,"India/Kolkata");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_has_same_rule(timezone, other, &same_rule);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_has_same_rule",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_has_same_rule", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_has_same_rule", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_has_same_rule", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Clone i18n_timezone_h polymorphically.
+/**
+* @testcase                            ITc_i18n_timezone_clone_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Clone i18n_timezone_h polymorphically.
+* @apicovered                  i18n_timezone_clone, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_clone is successful
+* @failcase                            If target i18n_timezone_clone API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_clone_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone = NULL;
+       i18n_timezone_h clone;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_clone(timezone, &clone);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_clone",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_clone", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_clone", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_clone", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the amount of time to be added to local standard time to get local wall clock time.
+/**
+* @testcase                            ITc_i18n_timezone_get_dst_savings_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns the amount of time to be added to local standard time to get local wall clock time.
+* @apicovered                  i18n_timezone_get_dst_savings, i18n_timezone_create, i18n_timezone_destroy
+* @passcase                            When i18n_timezone_get_dst_savings is successful
+* @failcase                            If target i18n_timezone_get_dst_savings API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_get_dst_savings_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_timezone_h timezone = NULL;
+       int32_t dst_savings;
+       nRetVal = i18n_timezone_create(&timezone,"India/New_Delhi");
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_timezone_create_default failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_get_dst_savings(timezone, &dst_savings);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_get_dst_savings",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_get_dst_savings", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_get_dst_savings", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_get_dst_savings", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose:Returns an enumeration over system time zone ids with the given filter condition.
+/**
+* @testcase                            ITc_i18n_timezone_foreach_timezone_id_by_region_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns an enumeration over system time zone ids with the given filter condition.
+* @apicovered                  i18n_timezone_foreach_timezone_id_by_region
+* @passcase                            When i18n_timezone_foreach_timezone_id_by_region is successful
+* @failcase                            If target i18n_timezone_foreach_timezone_id_by_region API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_foreach_timezone_id_by_region_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_system_timezone_type_e timezone_type[] = {
+               I18N_UCALENDAR_ZONE_TYPE_ANY,
+               I18N_UCALENDAR_ZONE_TYPE_CANONICAL,
+               I18N_UCALENDAR_ZONE_TYPE_CANONICAL_LOCATION
+       };
+
+       char *pRegion = NULL;
+       int32_t *raw_offset = NULL;
+       int nEnumSize = sizeof(timezone_type) / sizeof(timezone_type[0]);
+       int nEnumCounter = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for(nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       g_CallbackCalled = false;
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_timezone_foreach_timezone_id_by_region(timezone_type[nEnumCounter], pRegion, raw_offset, TimeZoneIdCallBack, NULL);
+                       BaseUtilsGetExecutionDelay(pszSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszMemLog);
+                       if(g_CallbackCalled == false)
+                       {
+                               nFailCount++;
+                               FPRINTF("\\n[Line : %d][%s] TimeZoneIdCallBack function not called\n",__LINE__, API_NAMESPACE);
+                               continue;
+                       }
+                       //FPRINTF("\\n[Line : %d][%s] i18n_timezone_foreach_timezone_id_by_region returns : %s\n",__LINE__, API_NAMESPACE,nRetVal);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_foreach_timezone_id_by_region",nFailCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_foreach_timezone_id_by_region", pszMemLog, pszSpeedLog, MAX_COUNT * nEnumSize);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_foreach_timezone_id_by_region", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_foreach_timezone_id_by_region", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+//& type: auto
+//& purpose: Returns an enumeration over all recognized time zone IDs.
+/**
+* @testcase                            ITc_i18n_timezone_foreach_timezone_id_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns an enumeration over all recognized time zone IDs.
+* @apicovered                  i18n_timezone_foreach_timezone_id
+* @passcase                            When i18n_timezone_foreach_timezone_id is successful
+* @failcase                            If target i18n_timezone_foreach_timezone_id API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_foreach_timezone_id_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_CallbackCalled = false;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_foreach_timezone_id(TimeZoneIdCallBack, NULL);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(g_CallbackCalled == false)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] TimeZoneIdCallBack function not called\n",__LINE__, API_NAMESPACE);
+                       continue;
+               }
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_foreach_timezone_id",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_foreach_timezone_id", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_foreach_timezone_id", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_foreach_timezone_id", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns an enumeration over time zone IDs with a given raw offset from GMT.
+/**
+* @testcase                            ITc_i18n_timezone_foreach_timezone_id_with_offset_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns an enumeration over time zone IDs with a given raw offset from GMT.
+* @apicovered                  i18n_timezone_foreach_timezone_id_with_offset
+* @passcase                            When i18n_timezone_foreach_timezone_id_with_offset is successful
+* @failcase                            If target i18n_timezone_foreach_timezone_id_with_offset API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_foreach_timezone_id_with_offset_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int32_t raw_offset = 3600000;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_CallbackCalled = false;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_foreach_timezone_id_with_offset(raw_offset, TimeZoneIdCallBack, NULL);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(g_CallbackCalled == false)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] TimeZoneIdCallBack function not called\n",__LINE__, API_NAMESPACE);
+                       continue;
+               }
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_foreach_timezone_id_with_offset",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_foreach_timezone_id_with_offset", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_foreach_timezone_id_with_offset", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_foreach_timezone_id_with_offset", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns an enumeration over time zone IDs associated with the given country.
+/**
+* @testcase                            ITc_i18n_timezone_foreach_timezone_id_by_country_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            returns an enumeration over time zone IDs associated with the given country.
+* @apicovered                  i18n_timezone_foreach_timezone_id_by_country
+* @passcase                            When i18n_timezone_foreach_timezone_id_by_country is successful
+* @failcase                            If target i18n_timezone_foreach_timezone_id_by_country API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_timezone_foreach_timezone_id_by_country_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       char *pCountry = NULL;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_CallbackCalled = false;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_timezone_foreach_timezone_id_by_country(pCountry, TimeZoneIdCallBack, NULL);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(g_CallbackCalled == false)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] TimeZoneIdCallBack function not called\n",__LINE__, API_NAMESPACE);
+                       continue;
+               }
+               PRINT_RESULT_LOOP(nRetVal,"i18n_timezone_foreach_timezone_id_by_country",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_timezone_foreach_timezone_id_by_country", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_timezone_foreach_timezone_id_by_country", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_timezone_foreach_timezone_id_by_country", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Creates an #i18n_usearch_h using the argument locale language rule set.
+/**
+* @testcase                    ITc_i18n_usearch_create_new_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Creates an #i18n_usearch_h using the argument locale language rule set.
+* @scenario                            Creates an #i18n_usearch_h using the argument locale language rule set.\n
+*                                              Destroys an #i18n_usearch_h set.
+* @apicovered                  i18n_usearch_create_new, i18n_usearch_destroy
+* @passcase                            When i18n_usearch_create_new is successful.
+* @failcase                            If target i18n_usearch_create_new fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_usearch_create_new_p(void)
+{
+       START_TEST;
+       i18n_uchar target[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_uchar pattern[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_usearch_h uSearch = NULL;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+       i18n_ubreak_iterator_h break_iter = NULL;
+
+       i18n_uchar *pRet = i18n_ustring_from_UTF8(target, I18N_UCHAR_CAPACITY, NULL, SOURCE_STRING, -1, &ErrorCode);
+       if(pRet == NULL || ErrorCode != I18N_ERROR_NONE || i18n_ustring_get_length(target) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8 API failed while testing target API i18n_usearch_create_new\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       pRet = i18n_ustring_from_UTF8(pattern, I18N_UCHAR_CAPACITY, NULL, USEARCH_KEYWORD, -1, &ErrorCode);
+       if(pRet == NULL || ErrorCode != I18N_ERROR_NONE || i18n_ustring_get_length(pattern) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8 API failed while testing target API i18n_usearch_create_new\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       int nRetVal = i18n_usearch_create_new(pattern, I18N_UCHAR_CAPACITY, target, I18N_UCHAR_CAPACITY, g_pszDefaultLocale, break_iter, &uSearch);
+       PRINT_RESULT(nRetVal, "i18n_usearch_create_new");
+
+       nRetVal = i18n_usearch_destroy(uSearch);
+       PRINT_RESULT(nRetVal, "i18n_usearch_destroy");
+
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/base-utils/ITs-base-utils-ubrk.c b/src/itc/base-utils/ITs-base-utils-ubrk.c
new file mode 100755 (executable)
index 0000000..40eca9c
--- /dev/null
@@ -0,0 +1,581 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-base-utils-common.h"
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+static i18n_ubreak_iterator_h g_hUbrkIter = NULL;
+
+//& set: BaseUtilsUbrk
+
+/**
+* @function            ITs_base_utils_ubrk_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_ubrk_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("\\n[Line : %d][%s] TEST SUIT start-up: ITs_Base_Utils_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       const char *pszLocale = I18N_ULOCALE_US;
+       char *pszText = "Tizen Native Testing";
+       i18n_uchar *pszUchar = (i18n_uchar*)calloc(strlen(pszText) + 1, sizeof(i18n_uchar));
+
+       /*int nRetVal= i18n_ulocale_get_default(&pszLocale);            // Locale to be used I18N_ULOCALE_US as suggested by HQ
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ulocale_get_default failed in startup\\n", __LINE__, API_NAMESPACE);
+               g_bBaseUtilsInitFlag = false;
+               free(pszUchar);
+               return;
+       }*/
+
+       i18n_uchar *pRet = i18n_ustring_copy_ua(pszUchar, pszText);
+       if ( pRet == NULL || i18n_ustring_get_length(pszUchar) <= 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in startup\\n", __LINE__, API_NAMESPACE);
+               g_bBaseUtilsInitFlag = false;
+               free(pszUchar);
+               return;
+       }
+
+       int nRetVal = i18n_ubrk_create(I18N_UBRK_WORD, pszLocale, pszUchar, strlen(pszText), &g_hUbrkIter);
+       if(nRetVal != I18N_ERROR_NONE || g_hUbrkIter == NULL)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ubrk_create failed in startup\\n", __LINE__, API_NAMESPACE);
+               g_bBaseUtilsInitFlag = false;
+               free(pszUchar);
+               return;
+       }
+       free(pszUchar);
+       g_bBaseUtilsInitFlag = true;
+       return;
+}
+
+/**
+* @function            ITs_base_utils_ubrk_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_ubrk_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][%s] TEST SUIT clean-up: ITs_Base_Utils_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       if( i18n_ubrk_destroy(g_hUbrkIter) != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ubrk_destroy failed in cleanup\\n", __LINE__, API_NAMESPACE);
+       }
+       g_bBaseUtilsInitFlag = false;
+       return;
+}
+
+/** @addtogroup itc-base-utils-testcases
+*  @brief              Integration testcases for module base-utils ubrk
+*  @ingroup    itc-base-utils
+*  @{
+*/
+
+//& type: auto
+//& purpose: Creates and Destroy a new iterator for locating text boundaries for a specified locale
+/**
+* @testcase                            ITc_i18n_ubrk_create_destroy_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Get default locale and copy text to uchar
+*                                              - Creates a new iterator for locating text boundaries for a specified locale
+*                                              - Destroys iterator
+* @apicovered                  i18n_ubrk_create, i18n_ubrk_destroy, i18n_ustring_copy_ua
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_create and i18n_ubrk_destroy
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_create or i18n_ubrk_destroy or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_create_destroy_p(void)
+{
+       START_TEST_PRINT;
+       int nRetVal = -1;
+       i18n_ubreak_iterator_type_e eUbrkIteratorType[] = {     I18N_UBRK_CHARACTER,
+                                                                                                               I18N_UBRK_WORD,
+                                                                                                               I18N_UBRK_LINE,
+                                                                                                               I18N_UBRK_SENTENCE};
+       int nEnumSize = sizeof(eUbrkIteratorType) / sizeof(eUbrkIteratorType[0]);
+       int nEnumCounter = 0;
+
+       const char *pszLocale = I18N_ULOCALE_US;
+       char *pszText = "Tizen Native Api Testing";
+       i18n_uchar *pszUchar = (i18n_uchar*)calloc(strlen(pszText) + 1, sizeof(i18n_uchar));
+       i18n_ubreak_iterator_h hUbrkIter = NULL;
+       
+       i18n_uchar *pRet = i18n_ustring_copy_ua(pszUchar, pszText);
+       if ( pRet == NULL || i18n_ustring_get_length(pszUchar) <= 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed\\n", __LINE__, API_NAMESPACE);
+               free(pszUchar);
+               return 1;
+       }
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Iterator type (%s) \\n", __LINE__, API_NAMESPACE, UbrkGetIteratorType(eUbrkIteratorType[nEnumCounter]));
+               nRetVal = i18n_ubrk_create(eUbrkIteratorType[nEnumCounter], pszLocale, pszUchar, strlen(pszText), &hUbrkIter);
+               PRINT_RESULT(nRetVal,"i18n_ubrk_create");
+               CHECK_HANDLE(hUbrkIter, "i18n_ubrk_create");
+
+               nRetVal = i18n_ubrk_destroy(hUbrkIter);
+               PRINT_RESULT(nRetVal,"i18n_ubrk_destroy");
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates new breaking rules
+/**
+* @testcase                            ITc_i18n_ubrk_create_rules_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Creates new breaking rules
+*                                              - Creates a new iterator for locating text boundaries for a specified locale
+*                                              - Destroys iterator
+* @apicovered                  i18n_ubrk_create_rules, i18n_ustring_copy_ua
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_create_rules
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_create_rules or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_create_rules_p(void)
+{
+       START_TEST_PRINT;
+       int nRetVal = -1;
+
+       char szRules[] = "#  This is a rule comment on line 1\n"
+                                        "[ERR_LOG];      # this rule is correct.\n"
+                                        "error);         # Error, mismatched \n";
+       i18n_uchar *pUcharRules = (i18n_uchar*)calloc(strlen(szRules) + 1, sizeof(i18n_uchar));
+
+       char *pszText = "rules ";
+       i18n_uchar *pUcharText = (i18n_uchar*)calloc(strlen(pszText) + 1, sizeof(i18n_uchar));
+       i18n_ubreak_iterator_h hUbrkIter = NULL;
+
+       i18n_uchar *pRet = i18n_ustring_copy_ua(pUcharRules, szRules);
+       if ( pRet == NULL || i18n_ustring_get_length(pUcharRules) <= 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in copy rules\\n", __LINE__, API_NAMESPACE);
+               free(pUcharRules);
+               free(pUcharText);
+               return 1;
+       }
+
+       i18n_uchar *pRet1 = i18n_ustring_copy_ua(pUcharText, pszText);
+       if ( pRet1 == NULL || i18n_ustring_get_length(pUcharText) <= 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in copy text\\n", __LINE__, API_NAMESPACE);
+               free(pUcharRules);
+               free(pUcharText);
+               return 1;
+       }
+
+       nRetVal = i18n_ubrk_create_rules(pUcharRules, 4, pUcharText, -1, &hUbrkIter, NULL);
+       PRINT_RESULT(nRetVal,"i18n_ubrk_create_rules");
+       CHECK_HANDLE(hUbrkIter, "i18n_ubrk_create_rules");
+       free(pUcharRules);
+       free(pUcharText);
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Thread safe cloning operation
+/**
+* @testcase                            ITc_i18n_ubrk_safe_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Thread safe cloning operation
+* @apicovered                  i18n_ubrk_safe_clone
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_safe_clone
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_safe_clone or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_safe_clone_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       int32_t nBuffSize = sizeof(g_hUbrkIter);
+       i18n_ubreak_iterator_h hUbrkIterClone = NULL;
+
+       nRetVal = i18n_ubrk_safe_clone(g_hUbrkIter, NULL, &nBuffSize, &hUbrkIterClone);
+       PRINT_RESULT(nRetVal,"i18n_ubrk_safe_clone");
+       CHECK_HANDLE(hUbrkIterClone, "i18n_ubrk_safe_clone");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets an existing iterator to point a new text
+/**
+* @testcase                            ITc_i18n_ubrk_set_text_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Sets an existing iterator to point a new text
+* @apicovered                  i18n_ubrk_set_text, i18n_ustring_copy_ua
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_set_text
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_set_text or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_set_text_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+
+       char *pszText = "APITESTING";
+       i18n_uchar *pUcharText = (i18n_uchar*)calloc(strlen(pszText) + 1, sizeof(i18n_uchar));
+
+       i18n_uchar *pRet = i18n_ustring_copy_ua(pUcharText, pszText);
+       if ( pRet == NULL || i18n_ustring_get_length(pUcharText) <= 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed \\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nRetVal = i18n_ubrk_set_text(g_hUbrkIter, pUcharText, strlen(pszText));
+       PRINT_RESULT(nRetVal,"i18n_ubrk_set_text");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Determines recently-returned text boundary
+/**
+* @testcase                            ITc_i18n_ubrk_current_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Determines recently-returned text boundary
+* @apicovered                  i18n_ubrk_current
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_current
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_current or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_current_p(void)
+{
+       START_TEST;
+       int32_t nIndex = -1;
+
+       nIndex = i18n_ubrk_current(g_hUbrkIter);
+       CHECK_RETURN_VAL(nIndex, "i18n_ubrk_current");
+
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ubrk_current");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets the iterator position to the boundary following and preceding the current boundary
+/**
+* @testcase                            ITc_i18n_ubrk_next_previous_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Sets the iterator position to the boundary following and preceding the current boundary
+* @apicovered                  i18n_ubrk_next, i18n_ubrk_previous
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_next and i18n_ubrk_previous
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_next, i18n_ubrk_previous or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_next_previous_p(void)
+{
+       START_TEST;
+       int32_t nIndex = -1;
+
+       nIndex = i18n_ubrk_next(g_hUbrkIter);
+       CHECK_RETURN_VAL(nIndex, "i18n_ubrk_next");
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ubrk_next");
+
+       nIndex = -1;
+       nIndex = i18n_ubrk_previous(g_hUbrkIter);
+       CHECK_RETURN_VAL(nIndex, "i18n_ubrk_previous");
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ubrk_previous");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets the iterator position to the index of the first and last character in the text
+/**
+* @testcase                            ITc_i18n_ubrk_first_last_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Sets the iterator position to the index of the first and last character in the text
+* @apicovered                  i18n_ubrk_first, i18n_ubrk_last
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_first and i18n_ubrk_last
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_first, i18n_ubrk_last or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_first_last_p(void)
+{
+       START_TEST;
+       int32_t nIndex = -1;
+
+       nIndex = i18n_ubrk_first(g_hUbrkIter);
+       CHECK_RETURN_VAL(nIndex, "i18n_ubrk_first");
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ubrk_first");
+
+       nIndex = -1;
+       nIndex = i18n_ubrk_last(g_hUbrkIter);
+       CHECK_RETURN_VAL(nIndex, "i18n_ubrk_last");
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ubrk_last");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets the iterator position to the first boundary preceding and following the specified offset
+/**
+* @testcase                            ITc_i18n_ubrk_preceding_following_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Sets the iterator position to the first boundary preceding and following the specified offset
+* @apicovered                  i18n_ubrk_preceding, i18n_ubrk_following
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_preceding and i18n_ubrk_following
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_preceding, i18n_ubrk_following or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_preceding_following_p(void)
+{
+       START_TEST;
+       int32_t nIndex = -1, nOffset = 2;
+
+       nIndex = i18n_ubrk_preceding(g_hUbrkIter, nOffset);
+       CHECK_RETURN_VAL(nIndex, "i18n_ubrk_preceding");
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ubrk_preceding");
+
+       nIndex = -1;
+       nIndex = i18n_ubrk_following(g_hUbrkIter, nOffset);
+       CHECK_RETURN_VAL(nIndex, "i18n_ubrk_following");
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ubrk_following");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets a locale for which text breaking information is available
+/**
+* @testcase                            ITc_i18n_ubrk_get_available_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Gets a locale for which text breaking information is available
+* @apicovered                  i18n_ubrk_get_available
+* @passcase                            API i18n_ubrk_get_available doesn't crash
+* @failcase                            API i18n_ubrk_get_available crashes
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_get_available_p(void)
+{
+       START_TEST_PRINT;
+       int32_t nIndex = 1;
+
+       i18n_ubrk_get_available(nIndex);
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Determines how many locales have text breaking information available
+/**
+* @testcase                            ITc_i18n_ubrk_count_available_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Determines how many locales have text breaking information available
+* @apicovered                  i18n_ubrk_count_available
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_count_available
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_count_available or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_count_available_p(void)
+{
+       START_TEST_PRINT;
+       int32_t nCount = -1;
+
+       nCount = i18n_ubrk_count_available();
+       CHECK_RETURN_VAL(nCount, "i18n_ubrk_count_available");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns true/false for specified position is a boundary position or not
+/**
+* @testcase                            ITc_i18n_ubrk_is_boundary_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Returns true/false for specified position is a boundary position or not
+* @apicovered                  i18n_ubrk_is_boundary
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_is_boundary
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_is_boundary or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_is_boundary_p(void)
+{
+       START_TEST;
+       int32_t nOffset = 2;
+
+       i18n_ubool bRetVal = i18n_ubrk_is_boundary(g_hUbrkIter, nOffset);
+       if(bRetVal != true && bRetVal != false)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ubrk_is_boundary failed, return value is = %d \n", __LINE__, API_NAMESPACE, bRetVal);
+               return 1;
+       }
+
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ubrk_is_boundary");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the status from the break rule that determined the most recently returned break position
+/**
+* @testcase                            ITc_i18n_ubrk_get_rule_status_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Returns the status from the break rule that determined the most recently returned break position
+* @apicovered                  i18n_ubrk_get_rule_status
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_get_rule_status
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_get_rule_status or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_get_rule_status_p(void)
+{
+       START_TEST;
+       int32_t nIndex = -1;
+
+       nIndex = i18n_ubrk_get_rule_status(g_hUbrkIter);
+       CHECK_RETURN_VAL(nIndex, "i18n_ubrk_get_rule_status");
+
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ubrk_get_rule_status");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the status vector from the break rule that determined the most recently returned break position
+/**
+* @testcase                            ITc_i18n_ubrk_get_rule_status_vec_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Returns the status vector from the break rule that determined the most recently returned break position
+* @apicovered                  i18n_ubrk_get_rule_status_vec
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_get_rule_status_vec
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_get_rule_status_vec or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_get_rule_status_vec_p(void)
+{
+       START_TEST;
+       int32_t nIndex = -1;
+       int32_t nArrayStatusVal[I18N_UNUMBER_SYMBOL_CAPACITY]={0};
+       int32_t nCapacity = I18N_UNUMBER_SYMBOL_CAPACITY;
+
+       char *pszText = "Tizen Native Api Testing";
+       i18n_uchar *pszUchar = (i18n_uchar*)calloc(strlen(pszText) + 1, sizeof(i18n_uchar));
+
+       i18n_uchar *pRet = i18n_ustring_copy_ua(pszUchar, pszText);
+       if ( pRet == NULL || i18n_ustring_get_length(pszUchar) <= 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nIndex = i18n_ubrk_get_rule_status_vec(g_hUbrkIter, nArrayStatusVal, nCapacity);
+       CHECK_RETURN_VAL(nIndex, "i18n_ubrk_get_rule_status_vec");
+
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ubrk_get_rule_status_vec");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the locale of the break iterator
+/**
+* @testcase                            ITc_i18n_ubrk_get_locale_by_type_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Returns the locale of the break iterator
+* @apicovered                  i18n_ubrk_get_locale_by_type
+* @passcase                            I18N_ERROR_NONE returned by i18n_ubrk_get_locale_by_type
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ubrk_get_locale_by_type or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ubrk_get_locale_by_type_p(void)
+{
+       START_TEST;
+       
+       i18n_ulocale_data_locale_type_e eLocaleType[] = {
+               I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE,
+               I18N_ULOCALE_DATA_LOCALE_TYPE_VALID_LOCALE
+       };
+       
+       int nEnumSize = sizeof(eLocaleType) / sizeof(eLocaleType[0]);
+       int nEnumCounter = 0, nRetVal = -1;
+       const char *pszLocale = NULL;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Locale type (%s) \\n", __LINE__, API_NAMESPACE, UcalendarGetLocaleType(eLocaleType[nEnumCounter]));
+               pszLocale = i18n_ubrk_get_locale_by_type(g_hUbrkIter, eLocaleType[nEnumCounter]);
+               CHECK_HANDLE(pszLocale, "i18n_ubrk_get_locale_by_type");
+
+               nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal,"i18n_ubrk_get_locale_by_type");
+       }
+
+       return 0;
+}
+
+/** @}*/
+/** @}*/
\ No newline at end of file
diff --git a/src/itc/base-utils/ITs-base-utils-ucalendar.c b/src/itc/base-utils/ITs-base-utils-ucalendar.c
new file mode 100755 (executable)
index 0000000..6b788ef
--- /dev/null
@@ -0,0 +1,1014 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-base-utils-common.h"
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+static i18n_ucalendar_h g_hUcalender = NULL;
+
+//& set: BaseUtilsUcalendar
+
+/**
+* @function            ITs_base_utils_ucalendar_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_ucalendar_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("\\n[Line : %d][%s] TEST SUIT start-up: ITs_Base_Utils_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       const char *pszDefaultLocale = I18N_ULOCALE_US;
+       /*int nRetVal = i18n_ulocale_get_default(&pszDefaultLocale);            // Locale to be used I18N_ULOCALE_US as suggested by HQ
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ulocale_get_default failed in startup, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               g_bBaseUtilsInitFlag = false;
+               return;
+       }*/
+
+       i18n_uchar *pszUcharTzone = (i18n_uchar*)calloc(strlen(I18N_DEFAULT_T_ZONE) + 1, sizeof(i18n_uchar));
+       if (pszUcharTzone == NULL)
+       {
+               FPRINTF("\\n[Line : %d][%s] pszUcharTzone, memory not allocated \n", __LINE__, API_NAMESPACE);
+               g_bBaseUtilsInitFlag = false;
+               return;
+       }
+
+       i18n_uchar *pRet = i18n_ustring_copy_ua(pszUcharTzone, I18N_DEFAULT_T_ZONE);
+       int32_t nLength = i18n_ustring_get_length(pszUcharTzone);
+
+       if ( pRet == NULL || nLength <= 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in startup\\n", __LINE__, API_NAMESPACE);
+               g_bBaseUtilsInitFlag = false;
+               return;
+       }
+
+       int nRetVal = i18n_ucalendar_create(pszUcharTzone, nLength, pszDefaultLocale, I18N_UCALENDAR_TRADITIONAL, &g_hUcalender);
+       if (nRetVal != I18N_ERROR_NONE || g_hUcalender == NULL)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_create failed in startup, error returned = %s or handle is NULL \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               g_bBaseUtilsInitFlag = false;
+               return;
+       }
+
+       g_bBaseUtilsInitFlag = true;
+       return;
+}
+
+/**
+* @function            ITs_base_utils_ucalendar_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_ucalendar_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][%s] TEST SUIT clean-up: ITs_Base_Utils_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       int nRetVal = i18n_ucalendar_destroy(g_hUcalender);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_destroy failed in cleanup, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+       }
+
+       g_hUcalender = NULL;
+       g_bBaseUtilsInitFlag = false;
+       return;
+}
+
+/** @addtogroup itc-base-utils-testcases
+*  @brief              Integration testcases for module base-utils ucalendar
+*  @ingroup    itc-base-utils
+*  @{
+*/
+
+//& type: auto
+//& purpose: Creates an enumeration over system time zone IDs with given filter conditions
+/**
+* @testcase                            ITc_i18n_ucalendar_timezone_id_enumeration_create_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Creates an enumeration over system time zone IDs with given filter conditions
+* @apicovered                  i18n_ucalendar_timezone_id_enumeration_create, i18n_uenumeration_destroy
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_timezone_id_enumeration_create
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_timezone_id_enumeration_create or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_timezone_id_enumeration_create_p(void)
+{
+       START_TEST_PRINT;
+       char *pszCountryCode = "KR";
+       i18n_uenumeration_h hEnumeration = NULL;
+
+       i18n_system_timezone_type_e eTimezoneType[] = {
+               I18N_UCALENDAR_ZONE_TYPE_ANY,
+               I18N_UCALENDAR_ZONE_TYPE_CANONICAL,
+               I18N_UCALENDAR_ZONE_TYPE_CANONICAL_LOCATION
+       };
+       
+       int nEnumSize = sizeof(eTimezoneType) / sizeof(eTimezoneType[0]);
+       int nEnumCounter = 0, nRetVal = -1;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for TimeZone type (%s) \\n", __LINE__, API_NAMESPACE, UcalendarGetTimezoneType(eTimezoneType[nEnumCounter]));
+               nRetVal = i18n_ucalendar_timezone_id_enumeration_create(eTimezoneType[nEnumCounter], pszCountryCode, NULL, &hEnumeration);
+               CHECK_HANDLE(hEnumeration, "i18n_ucalendar_timezone_id_enumeration_create");
+               PRINT_RESULT(nRetVal,"i18n_ucalendar_timezone_id_enumeration_create");
+
+               i18n_uenumeration_destroy(hEnumeration);
+               hEnumeration = NULL;
+       }
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates an enumeration over all time zones
+/**
+* @testcase                            ITc_i18n_ucalendar_timezones_create_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Creates an enumeration over all time zones
+* @apicovered                  i18n_ucalendar_timezones_create, i18n_uenumeration_destroy
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_timezones_create
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_timezones_create or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_timezones_create_p(void)
+{
+       START_TEST_PRINT;
+       int nRetVal = -1;
+       i18n_uenumeration_h hEnumeration = NULL;
+
+       nRetVal = i18n_ucalendar_timezones_create(&hEnumeration);
+       CHECK_HANDLE(hEnumeration, "i18n_ucalendar_timezones_create");
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_timezones_create");
+
+       i18n_uenumeration_destroy(hEnumeration);
+       hEnumeration = NULL;
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates an enumeration over all time zones associated with the given country
+/**
+* @testcase                            ITc_i18n_ucalendar_country_timezones_create_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Creates an enumeration over all time zones associated with the given country
+* @apicovered                  i18n_ucalendar_country_timezones_create, i18n_uenumeration_destroy
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_country_timezones_create
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_country_timezones_create or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_country_timezones_create_p(void)
+{
+       START_TEST_PRINT;
+       int nRetVal = -1;
+       char *pszCountryCode = "KR";
+       i18n_uenumeration_h hEnumeration = NULL;
+
+       nRetVal = i18n_ucalendar_country_timezones_create(pszCountryCode, &hEnumeration);
+       CHECK_HANDLE(hEnumeration, "i18n_ucalendar_country_timezones_create");
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_country_timezones_create");
+
+       i18n_uenumeration_destroy(hEnumeration);
+       hEnumeration = NULL;
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the default time zone
+/**
+* @testcase                            ITc_i18n_ucalendar_get_default_timezone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Returns the default time zone
+* @apicovered                  i18n_ucalendar_get_default_timezone
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_get_default_timezone
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_get_default_timezone or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_default_timezone_p(void)
+{
+       START_TEST_PRINT;
+       int nRetVal = -1;
+       int32_t nLength = -1;
+       i18n_uchar szTimeZone[I18N_UNUMBER_SYMBOL_CAPACITY] = {0};
+       int nCapacity = I18N_UNUMBER_SYMBOL_CAPACITY;
+
+       nLength = i18n_ucalendar_get_default_timezone(szTimeZone, nCapacity);
+       CHECK_RETURN_VAL(nLength, "i18n_ucalendar_get_default_timezone");
+       CHECK_HANDLE(szTimeZone, "i18n_ucalendar_get_default_timezone");
+
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_default_timezone");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets the TimeZone
+/**
+* @testcase                            ITc_i18n_ucalendar_set_timezone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Sets the TimeZone
+* @apicovered                  i18n_ucalendar_set_timezone
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_set_timezone
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_set_timezone or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_set_timezone_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       int32_t nLength = -1;
+       int nCapacity = I18N_UNUMBER_SYMBOL_CAPACITY;
+       char *pszCountryCode = "US";
+       i18n_uchar *pszUcharCountryCode = (i18n_uchar*)calloc(strlen(pszCountryCode) + 1, sizeof(i18n_uchar));
+
+       i18n_uchar *pRet = i18n_ustring_copy_ua(pszUcharCountryCode, pszCountryCode);
+       if ( pRet == NULL || i18n_ustring_get_length(pszUcharCountryCode) <= 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nLength =i18n_ucalendar_set_timezone(g_hUcalender, pszUcharCountryCode, nCapacity);
+       CHECK_RETURN_VAL(nLength, "i18n_ucalendar_set_timezone");
+
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_set_timezone");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the TimeZone ID and cannonical TimeZone ID
+/**
+* @testcase                            ITc_i18n_ucalendar_get_timezone_id_get_canonical_timezone_id_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Sets the TimeZone and gets the TimeZone ID and cannonical TimeZone ID
+* @apicovered                  i18n_ucalendar_set_timezone, i18n_ucalendar_get_timezone_id, i18n_ucalendar_get_canonical_timezone_id
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_set_timezone, i18n_ucalendar_get_timezone_id and i18n_ucalendar_get_canonical_timezone_id
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_set_timezone, i18n_ucalendar_get_timezone_id, i18n_ucalendar_get_canonical_timezone_id or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_timezone_id_get_canonical_timezone_id_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       int32_t nLength = -1, nLengthTzId = -1;
+       i18n_uchar szTimeZone[I18N_UNUMBER_SYMBOL_CAPACITY] = {0};
+       i18n_uchar szCanTimeZone[I18N_UNUMBER_SYMBOL_CAPACITY] = {0};
+       int nCapacity = I18N_UNUMBER_SYMBOL_CAPACITY;
+       i18n_ubool bSystemId = false;
+
+       /* Target API i18n_ucalendar_get_timezone_id*/
+       nLength = i18n_ucalendar_get_timezone_id(g_hUcalender, szTimeZone, nCapacity);
+       CHECK_RETURN_VAL(nLength, "i18n_ucalendar_get_timezone_id");
+       CHECK_HANDLE(szTimeZone, "i18n_ucalendar_get_timezone_id");
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_timezone_id");
+
+       /* Target API i18n_ucalendar_get_canonical_timezone_id*/
+       nLengthTzId = i18n_ucalendar_get_canonical_timezone_id(szTimeZone, nLength, szCanTimeZone, nCapacity, &bSystemId);
+       CHECK_RETURN_VAL(nLengthTzId, "i18n_ucalendar_get_canonical_timezone_id");
+       CHECK_HANDLE(szCanTimeZone, "i18n_ucalendar_get_canonical_timezone_id");
+       if(bSystemId != true && bSystemId != false)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_get_canonical_timezone_id failed, bool return value is = %d \n", __LINE__, API_NAMESPACE, bSystemId);
+               return 1;
+       }
+
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_canonical_timezone_id");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets and gets the Gregorian Calendar change date
+/**
+* @testcase                            ITc_i18n_ucalendar_set_get_gregorian_change_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Sets and gets the Gregorian Calendar change date
+* @apicovered                  i18n_ucalendar_set_gregorian_change, i18n_ucalendar_get_gregorian_change
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_set_gregorian_change and i18n_ucalendar_get_gregorian_change
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_set_gregorian_change, i18n_ucalendar_get_gregorian_change or pre-condition APIs fail
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_set_get_gregorian_change_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       i18n_udate nUdateSet = 1500;
+       i18n_udate nUdateGet = 0;
+
+       nRetVal = i18n_ucalendar_set_gregorian_change(g_hUcalender, nUdateSet);
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_set_gregorian_change");
+
+       nRetVal = i18n_ucalendar_get_gregorian_change(g_hUcalender, &nUdateGet);
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_gregorian_change");
+
+       if(nUdateGet != nUdateSet)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_get_gregorian_change failed, set and get values are different \\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets a locale for which calendars are available
+/**
+* @testcase                            ITc_i18n_ucalendar_get_available_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets a locale for which calendars are available
+* @apicovered                  i18n_ucalendar_get_available
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_get_available
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_get_available
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_available_p(void)
+{
+       START_TEST_PRINT;
+       int nRetVal = -1;
+       int32_t nLocaleIndex = 1;
+       const char *pszLocale = NULL;
+
+       pszLocale = i18n_ucalendar_get_available(nLocaleIndex);
+       CHECK_HANDLE(pszLocale, "i18n_ucalendar_get_available");
+
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_available");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Determines how many locales have calendars available
+/**
+* @testcase                            ITc_i18n_ucalendar_count_available_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Determines how many locales have calendars available
+* @apicovered                  i18n_ucalendar_count_available
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_count_available
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_count_available
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_count_available_p(void)
+{
+       START_TEST_PRINT;
+       int nRetVal = -1;
+       int32_t nLocaleCount = -1;
+
+       nLocaleCount = i18n_ucalendar_count_available();
+       CHECK_RETURN_VAL(nLocaleCount, "i18n_ucalendar_count_available");
+
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_count_available");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Adds a specified signed amount to a particular field in the calendar
+/**
+* @testcase                            ITc_i18n_ucalendar_roll_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Adds a specified signed amount to a particular field in the calendar
+* @apicovered                  i18n_ucalendar_roll
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_roll or pre-condition APIs fail
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_roll
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_roll_p(void)
+{
+       START_TEST;
+       int32_t nAmount = 2;
+       int nEnumCounter = 0, nRetVal = -1;
+
+       i18n_ucalendar_date_fields_e eDateFields[] = {  I18N_UCALENDAR_ERA,
+                                                                                                       I18N_UCALENDAR_YEAR,
+                                                                                                       I18N_UCALENDAR_MONTH,
+                                                                                                       I18N_UCALENDAR_WEEK_OF_YEAR,
+                                                                                                       I18N_UCALENDAR_WEEK_OF_MONTH,
+                                                                                                       I18N_UCALENDAR_DATE,
+                                                                                                       I18N_UCALENDAR_DAY_OF_YEAR,
+                                                                                                       I18N_UCALENDAR_DAY_OF_WEEK,
+                                                                                                       I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH,
+                                                                                                       I18N_UCALENDAR_AM_PM,
+                                                                                                       I18N_UCALENDAR_HOUR,
+                                                                                                       I18N_UCALENDAR_HOUR_OF_DAY,
+                                                                                                       I18N_UCALENDAR_MINUTE,
+                                                                                                       I18N_UCALENDAR_SECOND,
+                                                                                                       I18N_UCALENDAR_MILLISECOND,
+                                                                                                       /*I18N_UCALENDAR_ZONE_OFFSET,
+                                                                                                       I18N_UCALENDAR_DST_OFFSET*/ //As requested by developer 22-05-2015
+                                                                                               };
+       int nEnumSize = sizeof(eDateFields) / sizeof(eDateFields[0]);
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for DateField Value (%s) \\n", __LINE__, API_NAMESPACE, UcalenderDateFieldValue(eDateFields[nEnumCounter]));
+               nRetVal = i18n_ucalendar_roll(g_hUcalender, eDateFields[nEnumCounter], nAmount);
+               PRINT_RESULT(nRetVal,"i18n_ucalendar_roll");
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Determines if a field in a calendar is set
+/**
+* @testcase                            ITc_i18n_ucalendar_is_set_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Determines if a field in a calendar is set
+* @apicovered                  i18n_ucalendar_is_set
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_is_set or pre-condition APIs fail
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_is_set
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_is_set_p(void)
+{
+       START_TEST;
+       i18n_ubool bIsSet = false;
+       int nEnumCounter = 0, nRetVal = -1;
+
+       i18n_ucalendar_date_fields_e eDateFields[] = {  I18N_UCALENDAR_ERA,
+                                                                                                       I18N_UCALENDAR_YEAR,
+                                                                                                       I18N_UCALENDAR_MONTH,
+                                                                                                       I18N_UCALENDAR_WEEK_OF_YEAR,
+                                                                                                       I18N_UCALENDAR_WEEK_OF_MONTH,
+                                                                                                       I18N_UCALENDAR_DATE,
+                                                                                                       I18N_UCALENDAR_DAY_OF_YEAR,
+                                                                                                       I18N_UCALENDAR_DAY_OF_WEEK,
+                                                                                                       I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH,
+                                                                                                       I18N_UCALENDAR_AM_PM,
+                                                                                                       I18N_UCALENDAR_HOUR,
+                                                                                                       I18N_UCALENDAR_HOUR_OF_DAY,
+                                                                                                       I18N_UCALENDAR_MINUTE,
+                                                                                                       I18N_UCALENDAR_SECOND,
+                                                                                                       I18N_UCALENDAR_MILLISECOND,
+                                                                                                       I18N_UCALENDAR_ZONE_OFFSET,
+                                                                                                       I18N_UCALENDAR_DST_OFFSET,
+                                                                                                       I18N_UCALENDAR_YEAR_WOY,
+                                                                                                       I18N_UCALENDAR_DOW_LOCAL,
+                                                                                                       I18N_UCALENDAR_EXTENDED_YEAR,
+                                                                                                       I18N_UCALENDAR_JULIAN_DAY,
+                                                                                                       I18N_UCALENDAR_MILLISECONDS_IN_DAY,
+                                                                                                       I18N_UCALENDAR_IS_LEAP_MONTH,
+                                                                                                       I18N_UCALENDAR_FIELD_COUNT,
+                                                                                                       I18N_UCALENDAR_DAY_OF_MONTH };
+       int nEnumSize = sizeof(eDateFields) / sizeof(eDateFields[0]);
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for DateField Value (%s) \\n", __LINE__, API_NAMESPACE, UcalenderDateFieldValue(eDateFields[nEnumCounter]));
+               bIsSet = i18n_ucalendar_is_set(g_hUcalender, eDateFields[nEnumCounter]);
+               if(bIsSet != true && bIsSet != false)
+               {
+                       FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_is_set failed, return value is = %d \n", __LINE__, API_NAMESPACE, bIsSet);
+                       return 1;
+               }
+
+               nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal,"i18n_ucalendar_is_set");
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Clears a field in a calendar
+/**
+* @testcase                            ITc_i18n_ucalendar_clear_field_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Clears a field in a calendar
+* @apicovered                  i18n_ucalendar_clear_field
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_clear_field or pre-condition APIs fail
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_clear_field
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_clear_field_p(void)
+{
+       START_TEST;
+       int nEnumCounter = 0, nRetVal = -1;
+
+       i18n_ucalendar_date_fields_e eDateFields[] = {  I18N_UCALENDAR_ERA,
+                                                                                                       I18N_UCALENDAR_YEAR,
+                                                                                                       I18N_UCALENDAR_MONTH,
+                                                                                                       I18N_UCALENDAR_WEEK_OF_YEAR,
+                                                                                                       I18N_UCALENDAR_WEEK_OF_MONTH,
+                                                                                                       I18N_UCALENDAR_DATE,
+                                                                                                       I18N_UCALENDAR_DAY_OF_YEAR,
+                                                                                                       I18N_UCALENDAR_DAY_OF_WEEK,
+                                                                                                       I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH,
+                                                                                                       I18N_UCALENDAR_AM_PM,
+                                                                                                       I18N_UCALENDAR_HOUR,
+                                                                                                       I18N_UCALENDAR_HOUR_OF_DAY,
+                                                                                                       I18N_UCALENDAR_MINUTE,
+                                                                                                       I18N_UCALENDAR_SECOND,
+                                                                                                       I18N_UCALENDAR_MILLISECOND,
+                                                                                                       I18N_UCALENDAR_ZONE_OFFSET,
+                                                                                                       I18N_UCALENDAR_DST_OFFSET,
+                                                                                                       I18N_UCALENDAR_YEAR_WOY,
+                                                                                                       I18N_UCALENDAR_DOW_LOCAL,
+                                                                                                       I18N_UCALENDAR_EXTENDED_YEAR,
+                                                                                                       I18N_UCALENDAR_JULIAN_DAY,
+                                                                                                       I18N_UCALENDAR_MILLISECONDS_IN_DAY,
+                                                                                                       I18N_UCALENDAR_IS_LEAP_MONTH,
+                                                                                                       I18N_UCALENDAR_FIELD_COUNT,
+                                                                                                       I18N_UCALENDAR_DAY_OF_MONTH };
+       int nEnumSize = sizeof(eDateFields) / sizeof(eDateFields[0]);
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for DateField Value (%s) \\n", __LINE__, API_NAMESPACE, UcalenderDateFieldValue(eDateFields[nEnumCounter]));
+               nRetVal = i18n_ucalendar_clear_field(g_hUcalender, eDateFields[nEnumCounter]);
+               PRINT_RESULT(nRetVal,"i18n_ucalendar_clear_field");
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Clears all fields in a calendar
+/**
+* @testcase                            ITc_i18n_ucalendar_clear_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Clears all fields in a calendar
+* @apicovered                  i18n_ucalendar_clear
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_clear or pre-condition APIs fail
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_clear
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_clear_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ucalendar_clear(g_hUcalender);
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_clear");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Determines a limit for a field in a calendar
+/**
+* @testcase                            ITc_i18n_ucalendar_get_limit_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Determines a limit for a field in a calendar
+* @apicovered                  i18n_ucalendar_get_limit
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_get_limit or pre-condition APIs fail
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_get_limit
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_limit_p(void)
+{
+       START_TEST;
+       int nEnumCounter1 = 0, nEnumCounter2 = 0, nRetVal = -1;
+       int32_t nLimit = -1;
+
+       i18n_ucalendar_date_fields_e eDateFields[] = {  I18N_UCALENDAR_ERA,
+                                                                                                       I18N_UCALENDAR_YEAR,
+                                                                                                       I18N_UCALENDAR_MONTH,
+                                                                                                       I18N_UCALENDAR_WEEK_OF_YEAR,
+                                                                                                       I18N_UCALENDAR_WEEK_OF_MONTH,
+                                                                                                       I18N_UCALENDAR_DATE,
+                                                                                                       I18N_UCALENDAR_DAY_OF_YEAR,
+                                                                                                       I18N_UCALENDAR_DAY_OF_WEEK,
+                                                                                                       I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH,
+                                                                                                       I18N_UCALENDAR_AM_PM,
+                                                                                                       I18N_UCALENDAR_HOUR,
+                                                                                                       I18N_UCALENDAR_HOUR_OF_DAY,
+                                                                                                       I18N_UCALENDAR_MINUTE,
+                                                                                                       I18N_UCALENDAR_SECOND,
+                                                                                                       I18N_UCALENDAR_MILLISECOND,
+                                                                                                       I18N_UCALENDAR_ZONE_OFFSET,
+                                                                                                       I18N_UCALENDAR_DST_OFFSET };
+
+       i18n_ucalendar_limit_type_e eLimitType[] = {    I18N_UCALENDAR_MINIMUM,
+                                                                                                       I18N_UCALENDAR_MAXIMUM,
+                                                                                                       I18N_UCALENDAR_GREATEST_MINIMUM,
+                                                                                                       I18N_UCALENDAR_LEAST_MAXIMUM,
+                                                                                                       I18N_UCALENDAR_ACTUAL_MINIMUM,
+                                                                                                       I18N_UCALENDAR_ACTUAL_MAXIMUM };
+
+       int nEnumSize1 = sizeof(eDateFields) / sizeof(eDateFields[0]);
+       int nEnumSize2 = sizeof(eLimitType) / sizeof(eLimitType[0]);
+
+       for (nEnumCounter1 = 0; nEnumCounter1 < nEnumSize1; nEnumCounter1++)
+       {
+               for (nEnumCounter2 = 0; nEnumCounter2 < nEnumSize2; nEnumCounter2++)
+               {
+                       FPRINTF("[Line : %d][%s] Executing for DateField Value (%s) and Limit type (%s)\\n", __LINE__, API_NAMESPACE, UcalenderDateFieldValue(eDateFields[nEnumCounter1]),UcalendarGetLimitType(eLimitType[nEnumCounter2]));
+                       nLimit = i18n_ucalendar_get_limit(g_hUcalender, eDateFields[nEnumCounter1], eLimitType[nEnumCounter2]);
+                       FPRINTF("[Line : %d][%s] i18n_ucalendar_get_limit return limit value = %d for DateField Value (%s) and Limit type (%s)\\n", __LINE__, API_NAMESPACE, nLimit, UcalenderDateFieldValue(eDateFields[nEnumCounter1]),UcalendarGetLimitType(eLimitType[nEnumCounter2]));
+
+                       nRetVal = get_last_result();
+                       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_limit");
+               }
+       }
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the locale for calendar object
+/**
+* @testcase                            ITc_i18n_ucalendar_get_locale_by_type_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the locale for calendar object
+* @apicovered                  i18n_ucalendar_get_locale_by_type
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_get_locale_by_type or pre-condition APIs fail
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_get_locale_by_type
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_locale_by_type_p(void)
+{
+       START_TEST;
+       int nEnumCounter = 0, nRetVal = -1;
+
+       i18n_ulocale_data_locale_type_e eLocaleType[] = {       I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE,
+                                                                                                               I18N_ULOCALE_DATA_LOCALE_TYPE_VALID_LOCALE      };
+
+       int nEnumSize = sizeof(eLocaleType) / sizeof(eLocaleType[0]);
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Locale type (%s)\\n", __LINE__, API_NAMESPACE, UcalendarGetLocaleType(eLocaleType[nEnumCounter]));
+               const char *pszLocale = i18n_ucalendar_get_locale_by_type(g_hUcalender, eLocaleType[nEnumCounter]);
+               CHECK_HANDLE(pszLocale, "i18n_ucalendar_get_locale_by_type");
+
+               nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal,"i18n_ucalendar_get_locale_by_type");
+       }
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the current timezone data version
+/**
+* @testcase                            ITc_i18n_ucalendar_get_tz_data_version_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the current timezone data version
+* @apicovered                  i18n_ucalendar_get_tz_data_version
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_get_tz_data_version
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_get_tz_data_version
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_tz_data_version_p(void)
+{
+       START_TEST_PRINT;
+       int nRetVal = -1;
+       const char *pszVersion = NULL;
+
+       pszVersion = i18n_ucalendar_get_tz_data_version();
+       CHECK_HANDLE(pszVersion, "i18n_ucalendar_get_tz_data_version");
+
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_tz_data_version");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the resource keyword value string designating the calendar type
+/**
+* @testcase                            ITc_i18n_ucalendar_get_type_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the resource keyword value string designating the calendar type
+* @apicovered                  i18n_ucalendar_get_type
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_get_type
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_get_type or any pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_type_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       const char *pszKeyType = NULL;
+
+       pszKeyType = i18n_ucalendar_get_type(g_hUcalender);
+       CHECK_HANDLE(pszKeyType, "i18n_ucalendar_get_type");
+
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_type");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets an array of string values in a preferred order for a given key and locale
+/**
+* @testcase                            ITc_i18n_ucalendar_get_keyword_values_for_locale_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets an array of string values in a preferred order for a given key and locale
+* @apicovered                  i18n_ucalendar_get_keyword_values_for_locale, i18n_ucalendar_get_type, i18n_ucalendar_get_available
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_get_keyword_values_for_locale
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_get_keyword_values_for_locale or any pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_keyword_values_for_locale_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       const char *pszKeyType = NULL, *pszLocale = NULL;
+       int32_t nLocaleIndex = 1;
+       i18n_ubool bCommonlyUsed = false;
+       i18n_uenumeration_h hEnumeration = NULL;
+
+       pszKeyType = i18n_ucalendar_get_type(g_hUcalender);
+       CHECK_HANDLE(pszKeyType, "i18n_ucalendar_get_type");
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_type");
+
+       pszLocale = i18n_ucalendar_get_available(nLocaleIndex);
+       CHECK_HANDLE(pszLocale, "i18n_ucalendar_get_available");
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_available");
+
+       nRetVal = i18n_ucalendar_get_keyword_values_for_locale(pszKeyType, pszLocale, bCommonlyUsed, &hEnumeration);
+       CHECK_HANDLE(hEnumeration, "i18n_ucalendar_get_keyword_values_for_locale");
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_keyword_values_for_locale");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the given day of the week is a weekday or a weekend day
+/**
+* @testcase                            ITc_i18n_ucalendar_get_day_of_week_type_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the given day of the week is a weekday or a weekend day
+* @apicovered                  i18n_ucalendar_get_day_of_week_type
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_get_day_of_week_type or pre-condition APIs fail
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_get_day_of_week_type
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_day_of_week_type_p(void)
+{
+       START_TEST;
+       int nEnumCounter = 0, nRetVal = -1;
+       i18n_ucalendar_weekday_type_e eWeekdayType;
+
+       i18n_ucalendar_days_of_week_e eDayOfWeek[] = {  I18N_UCALENDAR_SUNDAY,
+                                                                                                       I18N_UCALENDAR_MONDAY,
+                                                                                                       I18N_UCALENDAR_TUESDAY,
+                                                                                                       I18N_UCALENDAR_WEDNESDAY,
+                                                                                                       I18N_UCALENDAR_THURSDAY,
+                                                                                                       I18N_UCALENDAR_FRIDAY,
+                                                                                                       I18N_UCALENDAR_SATURDAY };
+       int nEnumSize = sizeof(eDayOfWeek) / sizeof(eDayOfWeek[0]);
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Day (%s)\\n", __LINE__, API_NAMESPACE, UcalendarGetDaysOfWeek(eDayOfWeek[nEnumCounter]));
+               nRetVal = i18n_ucalendar_get_day_of_week_type(g_hUcalender, eDayOfWeek[nEnumCounter], &eWeekdayType);
+               PRINT_RESULT(nRetVal,"i18n_ucalendar_get_day_of_week_type");
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the time during the day at which the weekend begins or ends
+/**
+* @testcase                            ITc_i18n_ucalendar_get_weekend_transition_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the time during the day at which the weekend begins or ends
+* @apicovered                  i18n_ucalendar_get_weekend_transition
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_get_weekend_transition or pre-condition APIs fail
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_get_weekend_transition
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_weekend_transition_p(void)
+{
+       START_TEST;
+       int nEnumCounter = 0, nRetVal = -1;
+       int32_t nMiliSec = -1;
+
+       i18n_ucalendar_days_of_week_e eDayOfWeek[] = {  I18N_UCALENDAR_SATURDAY,
+                                                                                                       I18N_UCALENDAR_SUNDAY};
+       int nEnumSize = sizeof(eDayOfWeek) / sizeof(eDayOfWeek[0]);
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Day (%s)\\n", __LINE__, API_NAMESPACE, UcalendarGetDaysOfWeek(eDayOfWeek[nEnumCounter]));
+               nMiliSec = i18n_ucalendar_get_weekend_transition(g_hUcalender, eDayOfWeek[nEnumCounter]);
+               CHECK_RETURN_VAL(nMiliSec, "i18n_ucalendar_get_weekend_transition");
+
+               nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal,"i18n_ucalendar_get_weekend_transition");
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets if the given udate is in weekend
+/**
+* @testcase                            ITc_i18n_ucalendar_is_weekend_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets if the given udate is in weekend
+* @apicovered                  i18n_ucalendar_is_weekend
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_is_weekend
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_is_weekend or any pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_is_weekend_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       i18n_udate nUdate;
+       i18n_ubool bIsWeekend = false;
+
+       nRetVal = i18n_ucalendar_get_milliseconds(g_hUcalender, &nUdate);
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_milliseconds");
+
+       bIsWeekend = i18n_ucalendar_is_weekend(g_hUcalender, nUdate);
+       if(bIsWeekend != true && bIsWeekend != false)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_is_weekend failed, bool return value is = %d \n", __LINE__, API_NAMESPACE, bIsWeekend);
+               return 1;
+       }
+
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_is_weekend");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the difference between the target time and the time of calendar object
+/**
+* @testcase                            ITc_i18n_ucalendar_get_field_difference_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the difference between the target time and the time of calendar object
+* @apicovered                  i18n_ucalendar_get_field_difference
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_get_field_difference
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_get_field_difference or any pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_field_difference_p(void)
+{
+       START_TEST;
+       i18n_udate nUdateTarget;
+       i18n_error_code_e eErrorCode = I18N_ERROR_NONE;
+       int32_t nFieldDiff = -1;
+       int nEnumCounter = 0;
+
+       i18n_ucalendar_date_fields_e eDateFields[] = {  I18N_UCALENDAR_YEAR,
+                                                                                                       I18N_UCALENDAR_MONTH,
+                                                                                                       I18N_UCALENDAR_WEEK_OF_YEAR,
+                                                                                                       I18N_UCALENDAR_WEEK_OF_MONTH,
+                                                                                                       I18N_UCALENDAR_DATE,
+                                                                                                       I18N_UCALENDAR_DAY_OF_YEAR,
+                                                                                                       I18N_UCALENDAR_DAY_OF_WEEK,
+                                                                                                       I18N_UCALENDAR_DAY_OF_WEEK_IN_MONTH,
+                                                                                                       I18N_UCALENDAR_AM_PM,
+                                                                                                       I18N_UCALENDAR_HOUR,
+                                                                                                       I18N_UCALENDAR_HOUR_OF_DAY,
+                                                                                                       I18N_UCALENDAR_MINUTE,
+                                                                                                       I18N_UCALENDAR_SECOND,
+                                                                                                       I18N_UCALENDAR_MILLISECOND,
+                                                                                                       I18N_UCALENDAR_ZONE_OFFSET,
+                                                                                                       I18N_UCALENDAR_DST_OFFSET,
+                                                                                                       I18N_UCALENDAR_ERA,
+                                                                                                       I18N_UCALENDAR_YEAR_WOY,
+                                                                                                       I18N_UCALENDAR_DOW_LOCAL,
+                                                                                                       I18N_UCALENDAR_EXTENDED_YEAR,
+                                                                                                       I18N_UCALENDAR_JULIAN_DAY,
+                                                                                                       I18N_UCALENDAR_MILLISECONDS_IN_DAY,
+                                                                                                       I18N_UCALENDAR_IS_LEAP_MONTH,
+                                                                                                       I18N_UCALENDAR_FIELD_COUNT,
+                                                                                                       I18N_UCALENDAR_DAY_OF_MONTH };
+       int nEnumSize = sizeof(eDateFields) / sizeof(eDateFields[0]);
+
+       int nRetVal = i18n_ucalendar_get_now(&nUdateTarget);
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_get_now");
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Datefield value (%s)\\n", __LINE__, API_NAMESPACE, UcalenderDateFieldValue(eDateFields[nEnumCounter]));
+               nFieldDiff = i18n_ucalendar_get_field_difference(g_hUcalender, nUdateTarget, eDateFields[nEnumCounter], &eErrorCode);
+               CHECK_RETURN_VAL(nFieldDiff, "i18n_ucalendar_get_field_difference");
+               PRINT_RESULT(eErrorCode,"i18n_ucalendar_get_field_difference");
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the next/previous time zone transition relative
+/**
+* @testcase                            ITc_i18n_ucalendar_get_timezone_transition_date_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the next/previous time zone transition relative
+* @apicovered                  i18n_ucalendar_get_timezone_transition_date
+* @passcase                            I18N_ERROR_NONE returned by i18n_ucalendar_get_timezone_transition_date
+* @failcase                            I18N_ERROR_NONE not returned by i18n_ucalendar_get_timezone_transition_date or any pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_timezone_transition_date_p(void)
+{
+       START_TEST;
+       i18n_udate nUdateTransition;
+       int nEnumCounter = 0;
+       i18n_ubool bIsWeekend = false;
+
+       i18n_utimezone_transition_type_e eTransitionType[] = {  I18N_UCALENDAR_TZ_TRANSITION_NEXT,
+                                                                                                                       I18N_UCALENDAR_TZ_TRANSITION_NEXT_INCLUSIVE,
+                                                                                                                       I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS,
+                                                                                                                       I18N_UCALENDAR_TZ_TRANSITION_PREVIOUS_INCLUSIVE };
+       int nEnumSize = sizeof(eTransitionType) / sizeof(eTransitionType[0]);
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Timezone transition type (%s)\\n", __LINE__, API_NAMESPACE, UcalendarGetTimezoneTransitionType(eTransitionType[nEnumCounter]));
+               bIsWeekend = i18n_ucalendar_get_timezone_transition_date(g_hUcalender, eTransitionType[nEnumCounter], &nUdateTransition);
+               if(bIsWeekend != true && bIsWeekend != false)
+               {
+                       FPRINTF("\\n[Line : %d][%s] i18n_ucalendar_get_timezone_transition_date failed, bool return value is = %d \n", __LINE__, API_NAMESPACE, bIsWeekend);
+                       return 1;
+               }
+
+               int nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal,"i18n_ucalendar_get_timezone_transition_date");
+       }
+       return 0;
+}
+
+/** @}*/
+/** @}*/
diff --git a/src/itc/base-utils/ITs-base-utils-udate.c b/src/itc/base-utils/ITs-base-utils-udate.c
new file mode 100755 (executable)
index 0000000..7d34ae4
--- /dev/null
@@ -0,0 +1,707 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-base-utils-common.h"
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+static i18n_udate_format_h g_hUdateFormat = NULL;
+
+//& set: BaseUtilsUdate
+
+/**
+* @function            ITs_base_utils_udate_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_udate_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("\\n[Line : %d][%s] TEST SUIT start-up: ITs_Base_Utils_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       //Set locale "en_US" not the default one": As per request
+       const char *pszDefaultLocale = "en_US";
+       const i18n_uchar *pUcharPattern = NULL;
+       int32_t nPatternLength = 0;
+
+       i18n_uchar *pUcharDefaultTzid = (i18n_uchar*)calloc(strlen(I18N_DEFAULT_T_ZONE) + 1, sizeof(i18n_uchar));
+       if (pUcharDefaultTzid == NULL)
+       {
+               FPRINTF("\\n[Line : %d][%s] pUcharDefaultTzid, memory not allocated properly\n", __LINE__, API_NAMESPACE);
+               g_bBaseUtilsInitFlag = false;
+               return;
+       }
+
+       i18n_uchar *pRet = i18n_ustring_copy_ua(pUcharDefaultTzid, (char *)I18N_DEFAULT_T_ZONE);
+       int nLengthDefaultTimeZone = i18n_ustring_get_length(pUcharDefaultTzid);
+
+       if (pRet == NULL || nLengthDefaultTimeZone < 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in start-up\n", __LINE__, API_NAMESPACE);
+               g_bBaseUtilsInitFlag = false;
+               return;
+       }
+
+       int nRetVal = i18n_udate_create(I18N_UDATE_DEFAULT, I18N_UDATE_DEFAULT, pszDefaultLocale, pUcharDefaultTzid, nLengthDefaultTimeZone, pUcharPattern, nPatternLength, &g_hUdateFormat);
+       if (nRetVal != I18N_ERROR_NONE || g_hUdateFormat == NULL)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_udate_create failed in startup, error returned = %s or handle is NULL \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               g_bBaseUtilsInitFlag = false;
+               return;
+       }
+
+       g_bBaseUtilsInitFlag = true;
+       return;
+}
+
+/**
+* @function            ITs_base_utils_udate_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_udate_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][%s] TEST SUIT clean-up: ITs_Base_Utils_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       int nRetVal = i18n_udate_destroy(g_hUdateFormat);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_udate_destroy failed in cleanup, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+       }
+
+       g_hUdateFormat = NULL;
+       g_bBaseUtilsInitFlag = false;
+       return;
+}
+
+/** @addtogroup itc-base-utils-testcases
+*  @brief              Integration testcases for module base-utils ucalendar
+*  @ingroup    itc-base-utils
+*  @{
+*/
+
+//& type: auto
+//& purpose: Maps from an date format to the corresponding date fields
+/**
+* @testcase                            ITc_i18n_udate_to_calendar_date_field_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Maps from an date format to the corresponding date fields
+* @scenario                            Maps from an date format to the corresponding date fields
+* @apicovered                  i18n_udate_to_calendar_date_field
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_to_calendar_date_field
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_to_calendar_date_field
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_to_calendar_date_field_p(void)
+{
+       START_TEST_PRINT;
+
+       i18n_ucalendar_date_fields_e eDateField;
+       i18n_udate_format_field_e eDateFormat[] = {     I18N_UDATE_FORMAT_ERA_FIELD,
+                                                                                               I18N_UDATE_FORMAT_YEAR_FIELD,
+                                                                                               I18N_UDATE_FORMAT_MONTH_FIELD,
+                                                                                               I18N_UDATE_FORMAT_DATE_FIELD,
+                                                                                               I18N_UDATE_FORMAT_HOUR_OF_DAY1_FIELD,
+                                                                                               I18N_UDATE_FORMAT_HOUR_OF_DAY0_FIELD,
+                                                                                               I18N_UDATE_FORMAT_MINUTE_FIELD,
+                                                                                               I18N_UDATE_FORMAT_SECOND_FIELD,
+                                                                                               I18N_UDATE_FORMAT_FRACTIONAL_SECOND_FIELD,
+                                                                                               I18N_UDATE_FORMAT_DAY_OF_WEEK_FIELD,
+                                                                                               I18N_UDATE_FORMAT_DAY_OF_YEAR_FIELD,
+                                                                                               I18N_UDATE_FORMAT_DAY_OF_WEEK_IN_MONTH_FIELD,
+                                                                                               I18N_UDATE_FORMAT_WEEK_OF_YEAR_FIELD,
+                                                                                               I18N_UDATE_FORMAT_WEEK_OF_MONTH_FIELD,
+                                                                                               I18N_UDATE_FORMAT_AM_PM_FIELD,
+                                                                                               I18N_UDATE_FORMAT_HOUR1_FIELD,
+                                                                                               I18N_UDATE_FORMAT_HOUR0_FIELD,
+                                                                                               I18N_UDATE_FORMAT_TIMEZONE_FIELD,
+                                                                                               I18N_UDATE_FORMAT_YEAR_WOY_FIELD,
+                                                                                               I18N_UDATE_FORMAT_DOW_LOCAL_FIELD,
+                                                                                               I18N_UDATE_FORMAT_EXTENDED_YEAR_FIELD,
+                                                                                               I18N_UDATE_FORMAT_JULIAN_DAY_FIELD,
+                                                                                               I18N_UDATE_FORMAT_MILLISECONDS_IN_DAY_FIELD,
+                                                                                               I18N_UDATE_FORMAT_TIMEZONE_RFC_FIELD,
+                                                                                               I18N_UDATE_FORMAT_TIMEZONE_GENERIC_FIELD,
+                                                                                               I18N_UDATE_FORMAT_STANDALONE_DAY_FIELD,
+                                                                                               I18N_UDATE_FORMAT_STANDALONE_MONTH_FIELD,
+                                                                                               I18N_UDATE_FORMAT_QUARTER_FIELD,
+                                                                                               I18N_UDATE_FORMAT_STANDALONE_QUARTER_FIELD,
+                                                                                               I18N_UDATE_FORMAT_TIMEZONE_SPECIAL_FIELD,
+                                                                                               I18N_UDATE_FORMAT_YEAR_NAME_FIELD };
+
+       int nEnumSize = sizeof(eDateFormat) / sizeof(eDateFormat[0]);
+       int nEnumCounter = 0, nRetVal = -1;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Date Format field value (%s) \\n", __LINE__, API_NAMESPACE, UdateGetDateFormatFieldValue(eDateFormat[nEnumCounter]));
+               nRetVal = i18n_udate_to_calendar_date_field(eDateFormat[nEnumCounter], &eDateField);
+               PRINT_RESULT(nRetVal,"i18n_udate_to_calendar_date_field");
+       }
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates a copy of a date format handle
+/**
+* @testcase                            ITc_i18n_udate_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Creates a copy of a date format handle
+* @apicovered                  i18n_udate_clone
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_clone
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_clone or pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_clone_p(void)
+{
+       START_TEST;
+       i18n_udate_format_h hUdateClone = NULL;
+
+       int nRetVal = i18n_udate_clone(g_hUdateFormat, &hUdateClone);
+       PRINT_RESULT(nRetVal,"i18n_udate_clone");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Parses a string into an date/time udate format
+/**
+* @testcase                            ITc_i18n_udate_parse_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Parses a string into an date/time udate format
+* @apicovered                  i18n_udate_parse, i18n_ustring_copy_ua
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_parse
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_parse or pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_parse_p(void)
+{
+       START_TEST;
+       i18n_uchar uCharDate[I18N_UNUMBER_SYMBOL_CAPACITY] = {0};
+       char *pszDateText = "May 1, 2015, 6:00:00 AM";
+       int32_t nTextLength = -1;
+       int32_t nParsePos = 0;
+       i18n_udate hParsedDate;
+
+       i18n_ustring_copy_ua(uCharDate, pszDateText);
+
+       int nRetVal = i18n_udate_parse(g_hUdateFormat, uCharDate, nTextLength, &nParsePos, &hParsedDate);
+       PRINT_RESULT(nRetVal,"i18n_udate_parse");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: The date will be parsed using the conventions
+/**
+* @testcase                            ITc_i18n_udate_parse_calendar_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 The date will be parsed using the conventions
+* @scenario                            - The date will be parsed using the conventions
+* @apicovered                  i18n_udate_parse_calendar
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_parse_calendar
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_parse_calendar or pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_parse_calendar_p(void)
+{
+       START_TEST;
+       i18n_uchar uCharDate[I18N_UNUMBER_SYMBOL_CAPACITY] = {0};
+       char *pszDateText = "May 1, 2015, 6:00:00 AM";
+       int32_t nTextLength = -1;
+       int32_t nParsePos = 0;
+       i18n_ucalendar_h hUcalender = NULL;
+       //Set locale "en_US" not the default one": As per request
+       const char *pszDefaultLocale = "en_US";
+
+       i18n_ustring_copy_ua(uCharDate, pszDateText);
+
+       i18n_uchar *pszUcharTzone = (i18n_uchar*)calloc(strlen(I18N_DEFAULT_T_ZONE) + 1, sizeof(i18n_uchar));
+       CHECK_HANDLE(pszUcharTzone, "Memory not allocated");
+
+       i18n_uchar *pRet = i18n_ustring_copy_ua(pszUcharTzone, I18N_DEFAULT_T_ZONE);
+       int32_t nLength = i18n_ustring_get_length(pszUcharTzone);
+
+       if ( pRet == NULL || nLength <= 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in startup\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       int nRetVal = i18n_ucalendar_create(pszUcharTzone, nLength, pszDefaultLocale, I18N_UCALENDAR_TRADITIONAL, &hUcalender);
+       CHECK_HANDLE(hUcalender, "i18n_ucalendar_create");
+       PRINT_RESULT(nRetVal,"i18n_ucalendar_create");
+
+       nRetVal = i18n_udate_parse_calendar(g_hUdateFormat, hUcalender, uCharDate, nTextLength, &nParsePos);
+       PRINT_RESULT(nRetVal,"i18n_udate_parse_calendar");
+
+       i18n_ucalendar_destroy(hUcalender);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Determines if a format handle will perform lenient parsing and set/unset the lenient parsing
+/**
+* @testcase                            ITc_i18n_udate_is_set_lenient_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Determines if a format handle will perform lenient parsing and set/unset the lenient parsing
+* @apicovered                  i18n_udate_is_lenient, i18n_udate_set_lenient
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_is_lenient and i18n_udate_set_lenient
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_is_lenient or i18n_udate_set_lenient or pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_is_set_lenient_p(void)
+{
+       START_TEST;
+       i18n_ubool bIsLenient = false;
+
+       int nRetVal = i18n_udate_set_lenient(g_hUdateFormat, true);
+       PRINT_RESULT(nRetVal,"i18n_udate_set_lenient");
+
+       bIsLenient = i18n_udate_is_lenient(g_hUdateFormat);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_udate_is_lenient");
+       if(bIsLenient != true)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_udate_is_lenient failed, return value is = %d \n", __LINE__, API_NAMESPACE, bIsLenient);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get and set the calendar handle associated with an udate format
+/**
+* @testcase                            ITc_i18n_udate_get_set_calendar_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Get and set the calendar handle associated with an udate format
+* @apicovered                  i18n_udate_get_calendar, i18n_udate_set_calendar
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_get_calendar and i18n_udate_set_calendar
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_get_calendar or i18n_udate_set_calendar or pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_get_set_calendar_p(void)
+{
+       START_TEST;
+       i18n_ucalendar_h hCalendar = NULL;
+
+       int nRetVal = i18n_udate_get_calendar(g_hUdateFormat, &hCalendar);
+       CHECK_HANDLE(hCalendar, "i18n_udate_get_calendar");
+       PRINT_RESULT(nRetVal,"i18n_udate_get_calendar");
+
+       nRetVal = i18n_udate_set_calendar(g_hUdateFormat, hCalendar);
+       PRINT_RESULT(nRetVal,"i18n_udate_set_calendar");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get and set the unumber formath associated with an udate format
+/**
+* @testcase                            ITc_i18n_udate_get_set_number_format_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Get and set the unumber formath associated with an udate format
+* @apicovered                  i18n_udate_get_number_format, i18n_udate_set_number_format
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_get_number_format and i18n_udate_set_number_format
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_get_number_format or i18n_udate_set_number_format or pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_get_set_number_format_p(void)
+{
+       START_TEST;
+       i18n_unumber_format_h hNumberFormat = NULL;
+
+       int nRetVal = i18n_udate_get_number_format(g_hUdateFormat, &hNumberFormat);
+       CHECK_HANDLE(hNumberFormat, "i18n_udate_get_number_format");
+       PRINT_RESULT(nRetVal,"i18n_udate_get_number_format");
+
+       nRetVal = i18n_udate_set_number_format(g_hUdateFormat, hNumberFormat);
+       PRINT_RESULT(nRetVal,"i18n_udate_set_number_format");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get and set the year relative to which all 2-digit years are interpreted
+/**
+* @testcase                            ITc_i18n_udate_get_set_2digit_year_start_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Get and set the year relative to which all 2-digit years are interpreted
+* @apicovered                  i18n_udate_get_2digit_year_start, i18n_udate_set_2digit_year_start
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_get_2digit_year_start and i18n_udate_set_2digit_year_start
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_get_2digit_year_start or i18n_udate_set_2digit_year_start or pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_get_set_2digit_year_start_p(void)
+{
+       START_TEST;
+       i18n_udate nUdate = 0;
+
+       int nRetVal = i18n_udate_get_2digit_year_start(g_hUdateFormat, &nUdate);
+       PRINT_RESULT(nRetVal,"i18n_udate_get_2digit_year_start");
+
+       nRetVal = i18n_udate_set_2digit_year_start(g_hUdateFormat, nUdate);
+       PRINT_RESULT(nRetVal,"i18n_udate_set_2digit_year_start");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set and get the symbols associated with an udate format
+/**
+* @testcase                            ITc_i18n_udate_set_get_symbols_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Set and get the symbols associated with an udate format
+* @apicovered                  i18n_udate_set_symbols, i18n_udate_get_symbols
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_set_symbols and i18n_udate_get_symbols
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_set_symbols or i18n_udate_get_symbols or pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_set_get_symbols_p(void)
+{
+       START_TEST;
+       int32_t nSymbolIndex = 0;
+       const char *pszSymbol = "MAY";
+       i18n_uchar uCharSymbolSet[I18N_UNUMBER_SYMBOL_CAPACITY] = {0};
+       i18n_uchar uCharSymbolGet[I18N_UNUMBER_SYMBOL_CAPACITY] = {0};
+       int nLength = -1;
+
+       i18n_udate_format_symbol_type_e eSymbolType[] = {       I18N_UDATE_FORMAT_SYMBOL_TYPE_ERAS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_AM_PMS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_LOCALIZED_CHARS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_ERA_NAMES,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_QUARTERS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_QUARTERS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_QUARTERS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_QUARTERS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORTER_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORTER_WEEKDAYS
+                                                                                                       };
+
+       int nEnumSize = sizeof(eSymbolType) / sizeof(eSymbolType[0]);
+       int nEnumCounter = 0, nRetVal = -1;
+
+       i18n_ustring_copy_ua(uCharSymbolSet, pszSymbol);
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Format Symbol type (%s) \\n", __LINE__, API_NAMESPACE, UdateGetFormatSymbolType(eSymbolType[nEnumCounter]));
+
+               nLength = i18n_udate_set_symbols(g_hUdateFormat, eSymbolType[nEnumCounter], nSymbolIndex, uCharSymbolSet, -1);
+               CHECK_RETURN_VAL(nLength, "i18n_udate_set_symbols");
+               nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal,"i18n_udate_set_symbols");
+
+               nLength = -1;
+               nLength = i18n_udate_get_symbols(g_hUdateFormat, eSymbolType[nEnumCounter], nSymbolIndex, uCharSymbolGet, I18N_UNUMBER_SYMBOL_CAPACITY);
+               CHECK_RETURN_VAL(nLength, "i18n_udate_get_symbols");
+               nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal,"i18n_udate_get_symbols");
+               if(i18n_ustring_compare(uCharSymbolGet, uCharSymbolSet) != 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] i18n_udate_get_symbols failed, get value is not same as set value \n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               nLength = -1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets a locale for which date/time formatting patterns are available
+/**
+* @testcase                            ITc_i18n_udate_get_available_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Gets a locale for which date/time formatting patterns are available
+* @apicovered                  i18n_udate_get_available
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_get_available
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_get_available
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_get_available_p(void)
+{
+       START_TEST_PRINT;
+       const char *pszLocale = NULL;
+       int32_t nLocaleIndex = 1;
+
+       pszLocale = i18n_udate_get_available(nLocaleIndex);
+       CHECK_HANDLE(pszLocale, "i18n_udate_get_available");
+
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_udate_get_available");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Determines how many locales have date/time formatting patterns available
+/**
+* @testcase                            ITc_i18n_udate_count_available_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Determines how many locales have date/time formatting patterns available
+* @apicovered                  i18n_udate_count_available
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_count_available
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_count_available
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_count_available_p(void)
+{
+       START_TEST_PRINT;
+       int32_t nLocaleCount = -1;
+
+       nLocaleCount = i18n_udate_count_available();
+       CHECK_RETURN_VAL(nLocaleCount, "i18n_udate_count_available");
+
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_udate_count_available");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets the pattern in an udate format
+/**
+* @testcase                            ITc_i18n_udate_apply_pattern_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Sets the pattern used by an udate format
+* @apicovered                  i18n_udate_apply_pattern, i18n_ustring_copy_ua
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_apply_pattern
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_apply_pattern or any pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_apply_pattern_p(void)
+{
+       START_TEST;
+       i18n_ubool bLocalized = true;
+       i18n_uchar uCharPatternSet[I18N_UNUMBER_SYMBOL_CAPACITY] = {0};
+       const char *pszPattern = "MM, DD, YYYY";
+
+       i18n_ustring_copy_ua(uCharPatternSet, pszPattern);
+
+       int nRetVal = i18n_udate_apply_pattern(g_hUdateFormat, bLocalized, uCharPatternSet, I18N_UNUMBER_SYMBOL_CAPACITY);
+       PRINT_RESULT(nRetVal,"i18n_udate_apply_pattern");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Extracts the pattern from an udate format
+/**
+* @testcase                            ITc_i18n_udate_apply_to_pattern_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Extracts the pattern from an udate format
+* @apicovered                  i18n_udate_to_pattern, i18n_ustring_copy_ua
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_to_pattern
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_to_pattern or any pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_apply_to_pattern_p(void)
+{
+       START_TEST;
+       i18n_ubool bLocalized = true;
+       i18n_uchar uCharPatternGet[I18N_UNUMBER_SYMBOL_CAPACITY] = {0};
+       int32_t nPatternSize = -1;
+
+       nPatternSize = i18n_udate_to_pattern(g_hUdateFormat, bLocalized, uCharPatternGet, I18N_UNUMBER_SYMBOL_CAPACITY);
+       CHECK_RETURN_VAL(nPatternSize, "i18n_udate_to_pattern");
+       CHECK_HANDLE(uCharPatternGet, "i18n_udate_to_pattern");
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal,"i18n_udate_to_pattern");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Counts the number of particular symbols for an udate format
+/**
+* @testcase                            ITc_i18n_udate_count_symbols_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Counts the number of particular symbols for an udate format
+* @apicovered                  i18n_udate_count_symbols
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_count_symbols
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_count_symbols or pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_count_symbols_p(void)
+{
+       START_TEST;
+
+       i18n_udate_format_symbol_type_e eSymbolType[] = {       I18N_UDATE_FORMAT_SYMBOL_TYPE_ERAS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_AM_PMS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_LOCALIZED_CHARS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_ERA_NAMES,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_NARROW_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_MONTHS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_NARROW_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_QUARTERS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORT_QUARTERS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_QUARTERS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORT_QUARTERS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_SHORTER_WEEKDAYS,
+                                                                                                               I18N_UDATE_FORMAT_SYMBOL_TYPE_STANDALONE_SHORTER_WEEKDAYS};
+
+       int nEnumSize = sizeof(eSymbolType) / sizeof(eSymbolType[0]);
+       int nEnumCounter = 0, nRetVal = -1;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Format Symbol type (%s) \\n", __LINE__, API_NAMESPACE, UdateGetFormatSymbolType(eSymbolType[nEnumCounter]));
+               int nSymbolCount = i18n_udate_count_symbols(g_hUdateFormat, eSymbolType[nEnumCounter]);
+               CHECK_RETURN_VAL(nSymbolCount, "i18n_udate_count_symbols");
+
+               nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal,"i18n_udate_count_symbols");
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the locale for date format
+/**
+* @testcase                            ITc_i18n_udate_get_locale_by_type_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Gets the locale for date format
+* @apicovered                  i18n_udate_get_locale_by_type
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_get_locale_by_type
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_get_locale_by_type or pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_get_locale_by_type_p(void)
+{
+       START_TEST;
+
+       i18n_ulocale_data_locale_type_e eLocaleType[] = {       I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE,
+                                                                                                               I18N_ULOCALE_DATA_LOCALE_TYPE_VALID_LOCALE};
+
+       int nEnumSize = sizeof(eLocaleType) / sizeof(eLocaleType[0]);
+       int nEnumCounter = 0, nRetVal = -1;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Locale type (%s) \\n", __LINE__, API_NAMESPACE, UcalendarGetLocaleType(eLocaleType[nEnumCounter]));
+               const char *pszLocale = i18n_udate_get_locale_by_type(g_hUdateFormat, eLocaleType[nEnumCounter]);
+               CHECK_HANDLE(pszLocale, "i18n_udate_get_locale_by_type");
+
+               nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal,"i18n_udate_get_locale_by_type");
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets a display context value in the formatter
+/**
+* @testcase                            ITc_i18n_udate_set_context_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Sets a display context value in the formatter
+* @apicovered                  i18n_udate_set_context
+* @passcase                            I18N_ERROR_NONE returned by i18n_udate_set_context
+* @failcase                            I18N_ERROR_NONE not returned by i18n_udate_set_context or pre-condition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udate_set_context_p(void)
+{
+       START_TEST;
+
+       i18n_udisplay_context_e eDisplayContext[] = {   I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE,
+                                                                                                       /*I18N_UDISPLAY_CONTEXT_STANDARD_NAMES,
+                                                                                                       I18N_UDISPLAY_CONTEXT_DIALECT_NAMES,*/ //As requested by developer 22-05-2015
+                                                                                                       I18N_UDISPLAY_CONTEXT_CAPITALIZATION_NONE,
+                                                                                                       I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE,
+                                                                                                       I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE,
+                                                                                                       I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_UI_LIST_OR_MENU };
+
+       int nEnumSize = sizeof(eDisplayContext) / sizeof(eDisplayContext[0]);
+       int nEnumCounter = 0, nRetVal = -1;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               FPRINTF("[Line : %d][%s] Executing for Display context value (%s) \\n", __LINE__, API_NAMESPACE, UdateGetDisplayContext(eDisplayContext[nEnumCounter]));
+               nRetVal = i18n_udate_set_context(g_hUdateFormat, eDisplayContext[nEnumCounter]);
+               PRINT_RESULT(nRetVal,"i18n_udate_set_context");
+       }
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/base-utils/ITs-base-utils-udatepg.c b/src/itc/base-utils/ITs-base-utils-udatepg.c
new file mode 100755 (executable)
index 0000000..8207c81
--- /dev/null
@@ -0,0 +1,841 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-base-utils-common.h"
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+i18n_udatepg_h dtpg = NULL;
+
+/**
+* @function            ITs_base_utils_udatepg_startup
+* @description         Called before each test. Creates a i18n_udatepg_h handle and get default locale
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_udatepg_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("\\n[Line : %d][%s] TEST SUIT start-up: ITs_base_utils_udatepg_startup\\n", __LINE__, API_NAMESPACE);
+#endif
+       g_bBaseUtilsInitFlag = false;
+       int nRetVal = -1;
+       g_pszDefaultLocale = I18N_ULOCALE_US;
+       /*nRetVal = i18n_ulocale_get_default(&g_pszDefaultLocale);              // Locale to be used I18N_ULOCALE_US as suggested by HQ
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ulocale_get_default failed in STARTUP, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               g_bBaseUtilsInitFlag = false;
+               return;
+       }*/
+       
+       nRetVal = i18n_udatepg_create(g_pszDefaultLocale, &dtpg);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_udatepg_create failed in STARTUP, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               g_bBaseUtilsInitFlag = false;
+               return;
+       }
+       g_bBaseUtilsInitFlag = true;
+       return;
+}
+
+/**
+* @function            ITs_base_utils_udatepg_cleanup
+* @description         Called after each test. Destroy the created i18n_udatepg_h handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_udatepg_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][%s] TEST SUIT clean-up: ITs_base_utils_udatepg_cleanup\\n", __LINE__, API_NAMESPACE);
+#endif
+       i18n_udatepg_destroy(dtpg);
+       g_bBaseUtilsInitFlag = false;
+       return;
+}
+
+/** @addtogroup itc-base-utils-testcases
+*  @brief              Integration testcases for module base-utils ucalendar
+*  @ingroup    itc-base-utils
+*  @{
+*/
+
+//& type: auto
+//& purpose: Opens and closes a generator according to a given locale.
+/**
+* @testcase                            ITc_i18n_udatepg_create_destroy_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Opens a generator according to a given locale.
+*                                              Closes a given generator
+* @apicovered                  i18n_udatepg_create, i18n_udatepg_destroy       
+* @passcase                            When i18n_udatepg_create, i18n_udatepg_destroy are successful.
+* @failcase                            If target i18n_udatepg_create or i18n_udatepg_destroy fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_create_destroy_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszUdatePGCreateDestroyMemLog = NULL;
+       char *pszUdatePGCreateSpeedLog = NULL;
+       char *pszUdatePGDestroySpeedLog = NULL;
+       int nUdatePGCreateFailCount = 0;
+       int nUdatePGDestroyFailCount = 0;
+#if MEMORY_CHECK
+       pszUdatePGCreateDestroyMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUdatePGCreateSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUdatePGDestroySpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               i18n_udatepg_h udatepgHandle = NULL;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_udatepg_create(g_pszDefaultLocale, &udatepgHandle);
+               BaseUtilsGetExecutionDelay(pszUdatePGCreateSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_udatepg_create",nUdatePGCreateFailCount);
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_udatepg_destroy(udatepgHandle);
+               BaseUtilsGetExecutionDelay(pszUdatePGDestroySpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUdatePGCreateDestroyMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_udatepg_destroy",nUdatePGDestroyFailCount);
+       }
+       VALIDATE_RESULT_PAIRAPI(nUdatePGCreateFailCount, nUdatePGDestroyFailCount, "i18n_udatepg_create", "i18n_udatepg_destroy", pszUdatePGCreateDestroyMemLog, pszUdatePGCreateSpeedLog, pszUdatePGDestroySpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_udatepg_create", pszUdatePGCreateSpeedLog);
+       PRINT_SPEED_LOG("i18n_udatepg_destroy", pszUdatePGDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_udatepg_create_destroy", pszUdatePGCreateDestroyMemLog);
+#endif
+       FREE_MEMORY(pszUdatePGCreateDestroyMemLog, pszUdatePGCreateSpeedLog, pszUdatePGDestroySpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the best pattern matching the input skeleton.
+/**
+* @testcase                            ITc_i18n_udatepg_get_best_pattern_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Opens a generator according to a given locale.
+*                                              Gets the best pattern matching the input skeleton.
+*                                              Closes a given generator
+* @apicovered                  i18n_udatepg_create, i18n_udatepg_get_best_pattern      
+* @passcase                            When i18n_udatepg_create, i18n_udatepg_get_best_pattern are successful.
+* @failcase                            If target i18n_udatepg_create or i18n_udatepg_get_best_pattern fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_get_best_pattern_p(void)
+{
+       START_TEST;
+       i18n_udatepg_h udatepgHandle = NULL;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszUdatepgGetPatternMemLog = NULL;
+       char *pszUdatepgGetPatternSpeedLog = NULL;
+       int nUdatepgGetPatternFailCount = 0;
+
+       nRetVal = i18n_udatepg_create(g_pszDefaultLocale, &udatepgHandle);
+       PRINT_RESULT(nRetVal, "i18n_udatepg_create");
+       int nCustomFormatLength = 0;
+       i18n_uchar ucharCustomFormat[I18N_DATEPG_PATTERN_CAPACITY];
+       i18n_uchar *pRet = NULL;
+
+       pRet = i18n_ustring_copy_ua(ucharCustomFormat, (char *)I18N_DATE_TIME_CUSTOM_FORMAT);
+       nCustomFormatLength = i18n_ustring_get_length(ucharCustomFormat);
+       if (pRet == NULL || nCustomFormatLength <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed \n", __LINE__, API_NAMESPACE);
+               i18n_udatepg_destroy(udatepgHandle);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszUdatepgGetPatternMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUdatepgGetPatternSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               i18n_uchar bestPattern[I18N_DATEPG_PATTERN_CAPACITY] = { 0, };
+               int nBestPatternCapacity = (int)(sizeof(bestPattern)/sizeof(bestPattern[0]));
+               int nBestPatternLength = 0;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_udatepg_get_best_pattern(udatepgHandle, ucharCustomFormat, nCustomFormatLength, bestPattern, nBestPatternCapacity, &nBestPatternLength);
+               BaseUtilsGetExecutionDelay(pszUdatepgGetPatternSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUdatepgGetPatternMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_udatepg_get_best_pattern",nUdatepgGetPatternFailCount);
+       }
+       i18n_udatepg_destroy(udatepgHandle);
+       VALIDATE_RESULT(nUdatepgGetPatternFailCount, "i18n_udatepg_get_best_pattern", pszUdatepgGetPatternMemLog, pszUdatepgGetPatternSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("i18n_udatepg_get_best_pattern", pszUdatepgGetPatternSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("i18n_udatepg_get_best_pattern", pszUdatepgGetPatternMemLog);
+#endif
+       FREE_MEMORY(pszUdatepgGetPatternMemLog, pszUdatepgGetPatternSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set/Gets the decimal value used in formatting fractions of seconds.
+/**
+* @testcase                            ITc_i18n_udatepg_set_get_decimal_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Set the decimal value used in formatting fractions of seconds\n.
+*                                              Gets the decimal value used in formatting fractions of seconds\n.
+*                                              Match set value with get value
+* @apicovered                  i18n_udatepg_set_decimal, i18n_udatepg_get_decimal
+* @passcase                            When i18n_udatepg_set_decimal, i18n_udatepg_get_decimal are successful
+* @failcase                            When i18n_udatepg_set_decimal or i18n_udatepg_get_decimal failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_set_get_decimal_p(void)
+{
+       START_TEST;
+
+       int nSetLength = 0;
+       i18n_uchar ucharCustomFormat[I18N_DATEPG_PATTERN_CAPACITY];
+       const i18n_uchar *pRet = i18n_ustring_copy_ua(ucharCustomFormat, (char *)I18N_DATE_TIME_CUSTOM_FORMAT);
+       nSetLength = i18n_ustring_get_length(ucharCustomFormat);
+       int nRetVal = -1;
+       if ( pRet == NULL || nSetLength <= 0 )
+       {
+               FPRINTF("[Line : %d][%s] i18n_ustring_copy_ua failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nRetVal = i18n_udatepg_set_decimal(dtpg, ucharCustomFormat, nSetLength);
+       PRINT_RESULT( nRetVal, "i18n_udatepg_set_decimal");
+
+       int nGetLength;
+       pRet = i18n_udatepg_get_decimal(dtpg, &nGetLength);
+       if(pRet == NULL)
+       {
+               FPRINTF("[Line : %d][%s] i18n_udatepg_get_decimal failed, Returned value is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if(nGetLength != nSetLength)
+       {
+               FPRINTF("[Line : %d][%s] Set/Get Decimal Value mismatched\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set/Gets the date time format in a message format pattern used to compose date and time patterns.
+/**
+* @testcase                            ITc_i18n_udatepg_set_get_date_time_format_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Set the date time format in a message format\n
+*                                              Gets the date time format length in a message format\n
+*                                              Match set length value with get length value
+* @apicovered                  i18n_udatepg_set_date_time_format, i18n_udatepg_get_date_time_format
+* @passcase                            When i18n_udatepg_set_date_time_format, i18n_udatepg_get_date_time_format are successful
+* @failcase                            When i18n_udatepg_set_date_time_format or i18n_udatepg_get_date_time_format failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_set_get_date_time_format_p(void)
+{
+       START_TEST;
+
+       int nSetLength = 0;
+       i18n_uchar ucharDateTimeFormat[I18N_DATEPG_PATTERN_CAPACITY];
+       const i18n_uchar *pRet = i18n_ustring_copy_ua(ucharDateTimeFormat, (char *)I18N_DATE_TIME_CUSTOM_FORMAT);
+       nSetLength = i18n_ustring_get_length(ucharDateTimeFormat);
+       int nRetVal = -1;
+       if ( pRet == NULL || nSetLength <= 0 )
+       {
+               FPRINTF("[Line : %d][%s] i18n_ustring_copy_ua failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nRetVal = i18n_udatepg_set_date_time_format(dtpg, ucharDateTimeFormat, nSetLength);
+       PRINT_RESULT( nRetVal, "i18n_udatepg_set_date_time_format");
+
+       int nGetLength;
+       pRet = i18n_udatepg_get_date_time_format(dtpg, &nGetLength);
+       if(pRet == NULL)
+       {
+               FPRINTF("[Line : %d][%s] i18n_udatepg_get_date_time_format failed, Returned value is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if(nGetLength != nSetLength)
+       {
+               FPRINTF("[Line : %d][%s] Set/Get date time format length value mismatched\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set/Gets the name of field.
+/**
+* @testcase                            ITc_i18n_udatepg_set_get_append_item_name_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Set the name of field\n
+*                                              Gets the name of field\n
+*                                              Match set filed length value with get filed length value
+* @apicovered                  i18n_udatepg_set_append_item_name, i18n_udatepg_get_append_item_name
+* @passcase                            When i18n_udatepg_set_append_item_name, i18n_udatepg_get_append_item_name are successful
+* @failcase                            When i18n_udatepg_set_append_item_name or i18n_udatepg_get_append_item_name failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_set_get_append_item_name_p(void)
+{
+       START_TEST;
+
+       int nSetFieldLength = 0;
+       i18n_uchar ucharFieldName[I18N_DATEPG_PATTERN_CAPACITY];
+       const i18n_uchar *pRet = i18n_ustring_copy_ua(ucharFieldName, (char *)I18N_DATE_TIME_CUSTOM_FORMAT);
+       nSetFieldLength = i18n_ustring_get_length(ucharFieldName);
+       int nRetVal = -1;
+       int nSetLength = strlen(I18N_DATE_TIME_CUSTOM_FORMAT);
+       if ( pRet == NULL || nSetFieldLength <= 0 )
+       {
+               FPRINTF("[Line : %d][%s] i18n_ustring_copy_ua failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_udatepg_date_time_pattern_field_e eDateTimePatternField[] = {I18N_UDATEPG_ERA_FIELD,
+                                                                                                                                               I18N_UDATEPG_YEAR_FIELD,
+                                                                                                                                               I18N_UDATEPG_QUARTER_FIELD,
+                                                                                                                                               I18N_UDATEPG_MONTH_FIELD,
+                                                                                                                                               I18N_UDATEPG_WEEK_OF_YEAR_FIELD,
+                                                                                                                                               I18N_UDATEPG_WEEK_OF_MONTH_FIELD,
+                                                                                                                                               I18N_UDATEPG_WEEKDAY_FIELD,
+                                                                                                                                               I18N_UDATEPG_DAY_OF_YEAR_FIELD,
+                                                                                                                                               I18N_UDATEPG_DAY_OF_WEEK_IN_MONTH_FIELD,
+                                                                                                                                               I18N_UDATEPG_DAY_FIELD,
+                                                                                                                                               I18N_UDATEPG_DAYPERIOD_FIELD,
+                                                                                                                                               I18N_UDATEPG_HOUR_FIELD,
+                                                                                                                                               I18N_UDATEPG_MINUTE_FIELD,
+                                                                                                                                               I18N_UDATEPG_SECOND_FIELD,
+                                                                                                                                               I18N_UDATEPG_FRACTIONAL_SECOND_FIELD,
+                                                                                                                                               I18N_UDATEPG_ZONE_FIELD
+                                                                                                                                       };
+       int nPatternFieldSize = sizeof(eDateTimePatternField)/sizeof(eDateTimePatternField[0]);
+       int nIndex = 0;
+       for(nIndex = 0; nIndex < nPatternFieldSize; nIndex++)
+       {
+               nRetVal = i18n_udatepg_set_append_item_name(dtpg, eDateTimePatternField[nIndex], ucharFieldName, nSetLength);
+               if(nRetVal != I18N_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][%s] i18n_udatepg_set_append_item_name failed for %s, Returned value is = %s\\n", __LINE__, API_NAMESPACE, UdatepgGetDateTimePatternField(eDateTimePatternField[nIndex]), BaseUtilsGetError(nRetVal));
+                       return 1;
+               }
+
+               int nGetLength;
+               pRet = i18n_udatepg_get_append_item_name(dtpg, eDateTimePatternField[nIndex], &nGetLength);
+               if(pRet == NULL)
+               {
+                       FPRINTF("[Line : %d][%s] i18n_udatepg_get_append_item_name failed for %s, Returned value is NULL\\n", __LINE__, API_NAMESPACE, UdatepgGetDateTimePatternField(eDateTimePatternField[nIndex]));
+                       return 1;
+               }
+
+               if(nGetLength != nSetLength)
+               {
+                       FPRINTF("[Line : %d][%s] Set/Get field length mismatched\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set a pattern used to append a field and then Get the appended pattern length.
+/**
+* @testcase                            ITc_i18n_udatepg_set_get_append_item_format_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Set a pattern used to append a field\n
+*                                              Gets the appended pattern length\n
+*                                              Match set pattern length value with get pattern length value
+* @apicovered                  i18n_udatepg_set_append_item_format, i18n_udatepg_get_append_item_format
+* @passcase                            When i18n_udatepg_set_append_item_format, i18n_udatepg_get_append_item_format are successful
+* @failcase                            When i18n_udatepg_set_append_item_format or i18n_udatepg_get_append_item_format failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_set_get_append_item_format_p(void)
+{
+       START_TEST;
+
+       int nSetFieldLength = 0;
+       i18n_uchar ucharFieldName[I18N_DATEPG_PATTERN_CAPACITY];
+       const i18n_uchar *pRet = i18n_ustring_copy_ua(ucharFieldName, (char *)I18N_DATE_TIME_CUSTOM_FORMAT);
+       nSetFieldLength = i18n_ustring_get_length(ucharFieldName);
+       int nRetVal = -1;
+       if ( pRet == NULL || nSetFieldLength <= 0 )
+       {
+               FPRINTF("[Line : %d][%s] i18n_ustring_copy_ua failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t nSetLength = strlen(I18N_DATE_TIME_CUSTOM_FORMAT);
+       i18n_udatepg_date_time_pattern_field_e eDateTimePatternField[] = {I18N_UDATEPG_ERA_FIELD,
+                                                                                                                                               I18N_UDATEPG_YEAR_FIELD,
+                                                                                                                                               I18N_UDATEPG_QUARTER_FIELD,
+                                                                                                                                               I18N_UDATEPG_MONTH_FIELD,
+                                                                                                                                               I18N_UDATEPG_WEEK_OF_YEAR_FIELD,
+                                                                                                                                               I18N_UDATEPG_WEEK_OF_MONTH_FIELD,
+                                                                                                                                               I18N_UDATEPG_WEEKDAY_FIELD,
+                                                                                                                                               I18N_UDATEPG_DAY_OF_YEAR_FIELD,
+                                                                                                                                               I18N_UDATEPG_DAY_OF_WEEK_IN_MONTH_FIELD,
+                                                                                                                                               I18N_UDATEPG_DAY_FIELD,
+                                                                                                                                               I18N_UDATEPG_DAYPERIOD_FIELD,
+                                                                                                                                               I18N_UDATEPG_HOUR_FIELD,
+                                                                                                                                               I18N_UDATEPG_MINUTE_FIELD,
+                                                                                                                                               I18N_UDATEPG_SECOND_FIELD,
+                                                                                                                                               I18N_UDATEPG_FRACTIONAL_SECOND_FIELD,
+                                                                                                                                               I18N_UDATEPG_ZONE_FIELD
+                                                                                                                                       };
+       int nPatternFieldSize = sizeof(eDateTimePatternField)/sizeof(eDateTimePatternField[0]);
+       int nIndex = 0;
+       for(nIndex = 0; nIndex < nPatternFieldSize; nIndex++)
+       {
+               nRetVal = i18n_udatepg_set_append_item_format(dtpg, eDateTimePatternField[nIndex], ucharFieldName, nSetLength);
+               if(nRetVal != I18N_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][%s] i18n_udatepg_set_append_item_format failed for %s, Returned value is = %s\\n", __LINE__, API_NAMESPACE, UdatepgGetDateTimePatternField(eDateTimePatternField[nIndex]), BaseUtilsGetError(nRetVal));
+                       return 1;
+               }
+
+               int nGetLength;
+               pRet = i18n_udatepg_get_append_item_format(dtpg, eDateTimePatternField[nIndex], &nGetLength);
+               if(pRet == NULL)
+               {
+                       FPRINTF("[Line : %d][%s] i18n_udatepg_get_append_item_format failed for %s, Returned value is NULL\\n", __LINE__, API_NAMESPACE, UdatepgGetDateTimePatternField(eDateTimePatternField[nIndex]));
+                       return 1;
+               }
+
+               if(nGetLength != nSetLength)
+               {
+                       FPRINTF("[Line : %d][%s] Set/Get field length mismatched\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Adjusts the field types (width and subtype) of a pattern to match what is in a skeleton.
+/**
+* @testcase                            ITc_i18n_udatepg_replace_field_types_with_options_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Adjusts the field types (width and subtype) of a pattern to match
+* @apicovered                  i18n_udatepg_replace_field_types_with_options,
+* @passcase                            When i18n_udatepg_replace_field_types_with_options is successful
+* @failcase                            When i18n_udatepg_replace_field_types_with_options failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_replace_field_types_with_options_p(void)
+{
+       START_TEST;
+
+       const char *pSrcPattern = "d-M H:m";
+       i18n_uchar szPattern[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int32_t nPatternLength = strlen(pSrcPattern);
+       const char *pSrcSkeleton = "MMMMddhhmm";
+       i18n_uchar szSkeleton[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int32_t nSkeletonLength = strlen(pSrcSkeleton);
+       i18n_udatepg_date_time_pattern_match_options_e nOptions[] = {
+               I18N_UDATEPG_MATCH_NO_OPTIONS,
+               I18N_UDATEPG_MATCH_HOUR_FIELD_LENGTH,
+               I18N_UDATEPG_MATCH_ALL_FIELDS_LENGTH
+       };
+
+       int nDateTimePatternMatchSize = sizeof(nOptions)/sizeof(nOptions[0]);
+       int nIndex;
+
+       i18n_uchar szDest[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int32_t nDestCapacity = I18N_DATEPG_PATTERN_CAPACITY;
+       int nRetVal = -1;
+       for(nIndex = 0; nIndex < nDateTimePatternMatchSize; nIndex++)
+       {
+               nRetVal =i18n_udatepg_replace_field_types_with_options(dtpg, szPattern, nPatternLength, szSkeleton, nSkeletonLength, nOptions[nIndex], szDest, nDestCapacity);
+               if(nRetVal == -1)
+               {
+                       FPRINTF("[Line : %d][%s] i18n_udatepg_replace_field_types_with_options failed for %s, Returned value is negative\\n", __LINE__, API_NAMESPACE, UdatepgGetDateTimePatternMatchField(nOptions[nIndex]));
+                       return 1;
+               }
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Adjusts the field types (width and subtype) of a pattern to match what is in a skeleton.
+/**
+* @testcase                            ITc_i18n_udatepg_replace_field_types_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Adjusts the field types (width and subtype) of a pattern to match
+* @apicovered                  i18n_udatepg_replace_field_types
+* @passcase                            When i18n_udatepg_replace_field_types are successful
+* @failcase                            When i18n_udatepg_replace_field_types failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_replace_field_types_p(void)
+{
+       START_TEST;
+
+       const char *pSrcPattern = "d-M H:m";
+       i18n_uchar szPattern[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int32_t nPatternLength = strlen(pSrcPattern);
+       const char *pSrcSkeleton = "MMMMddhhmm";
+       i18n_uchar szSkeleton[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int32_t nSkeletonLength = strlen(pSrcSkeleton);
+       i18n_uchar szDest[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int32_t nDestCapacity = I18N_DATEPG_PATTERN_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal =i18n_udatepg_replace_field_types(dtpg, szPattern, nPatternLength, szSkeleton, nSkeletonLength, szDest, nDestCapacity);
+       if(nRetVal < 0)
+       {
+               FPRINTF("[Line : %d][%s] i18n_udatepg_replace_field_types failed, Returned value is negative\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Adjusts the field types (width and subtype) of a pattern to match what is in a skeleton.
+/**
+* @testcase                            ITc_i18n_udatepg_get_skeleton_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Adjusts the field types (width and subtype) of a pattern to match.
+* @apicovered                  i18n_udatepg_get_best_pattern, i18n_udatepg_get_skeleton
+* @passcase                            When i18n_udatepg_get_best_pattern and i18n_udatepg_get_skeleton are successful
+* @failcase                            When i18n_udatepg_get_best_pattern or i18n_udatepg_get_skeleton failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_get_skeleton_p(void)
+{
+       START_TEST;
+
+       const char *pSkeleton = "yyyyMMMdd";
+       i18n_uchar szBuffer[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int nCapacityBuffer = I18N_DATEPG_PATTERN_CAPACITY;
+       int nLength = strlen(pSkeleton);
+       i18n_uchar szBestPattern[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int nCapacityBestPattern = I18N_DATEPG_PATTERN_CAPACITY;
+       int32_t nBestPatternLen = -1;
+       int nRetVal = -1;
+
+       nRetVal =i18n_udatepg_get_best_pattern(dtpg, i18n_ustring_copy_ua(szBuffer, pSkeleton), nLength, szBestPattern, nCapacityBestPattern, &nBestPatternLen);
+       PRINT_RESULT( nRetVal, "i18n_udatepg_get_best_pattern");
+
+       nRetVal =i18n_udatepg_get_skeleton(dtpg, szBestPattern, i18n_ustring_get_length(szBestPattern), szBuffer, nCapacityBuffer);
+       if(nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_udatepg_get_skeleton failed, Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the best pattern matching the input skeleton.
+/**
+* @testcase                            ITc_i18n_udatepg_get_best_pattern_with_options_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the best pattern matching the input skeleton.
+* @apicovered                  i18n_udatepg_get_best_pattern_with_options
+* @passcase                            When i18n_udatepg_get_best_pattern_with_options is successful
+* @failcase                            When i18n_udatepg_get_best_pattern_with_options failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_get_best_pattern_with_options_p(void)
+{
+       START_TEST;
+
+       const char *pSkeleton = "yyyyMMMdd";
+       i18n_uchar szBuffer[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int nLength = strlen(pSkeleton);
+       i18n_uchar szBestPattern[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int nCapacity = I18N_DATEPG_PATTERN_CAPACITY;
+       i18n_udatepg_date_time_pattern_match_options_e nOptions[] = {
+               I18N_UDATEPG_MATCH_NO_OPTIONS,
+               I18N_UDATEPG_MATCH_HOUR_FIELD_LENGTH,
+               I18N_UDATEPG_MATCH_ALL_FIELDS_LENGTH
+       };
+
+       int nDateTimePatternMatchSize = sizeof(nOptions)/sizeof(nOptions[0]);
+       int nIndex;
+       int nRetVal = -1;
+       for(nIndex = 0; nIndex < nDateTimePatternMatchSize; nIndex++)
+       {
+               nRetVal =i18n_udatepg_get_best_pattern_with_options(dtpg, i18n_ustring_copy_ua(szBuffer, pSkeleton), nLength, nOptions[nIndex], szBestPattern, nCapacity);
+               if(nRetVal == -1)
+               {
+                       FPRINTF("[Line : %d][%s] i18n_udatepg_get_best_pattern_with_options failed for %s, Returned value is = -1\\n", __LINE__, API_NAMESPACE, UdatepgGetDateTimePatternMatchField(nOptions[nIndex]));
+                       return 1;
+               }
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets a unique base skeleton from a given pattern
+/**
+* @testcase                            ITc_i18n_udatepg_get_base_skeleton_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets a unique base skeleton from a given pattern.
+* @apicovered                  i18n_udatepg_get_best_pattern, i18n_udatepg_get_base_skeleton
+* @passcase                            When i18n_udatepg_get_best_pattern and i18n_udatepg_get_base_skeleton are successful
+* @failcase                            When i18n_udatepg_get_best_pattern or i18n_udatepg_get_base_skeleton failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_get_base_skeleton_p(void)
+{
+       START_TEST;
+
+       const char *pSkeleton = "yyyyMMMdd";
+       i18n_uchar szBuffer[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int nCapacityBuffer = I18N_DATEPG_PATTERN_CAPACITY;
+       int nLength = strlen(pSkeleton);
+       i18n_uchar szBestPattern[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int nCapacityBestPattern = I18N_DATEPG_PATTERN_CAPACITY;
+       int32_t nBestPatternLen = -1;
+       int nRetVal = -1;
+
+       nRetVal = i18n_udatepg_get_best_pattern(dtpg, i18n_ustring_copy_ua(szBuffer, pSkeleton), nLength, szBestPattern, nCapacityBestPattern, &nBestPatternLen);
+       PRINT_RESULT( nRetVal, "i18n_udatepg_get_best_pattern");
+
+       nRetVal =i18n_udatepg_get_base_skeleton(dtpg, szBestPattern, i18n_ustring_get_length(szBestPattern), szBuffer, nCapacityBuffer);
+       if(nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_udatepg_get_base_skeleton failed. Returned value is -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates an i18n_uenumeration_h for list of all the skeletons in canonical form.
+/**
+* @testcase                            ITc_i18n_udatepg_skeletons_create_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Creates an i18n_uenumeration_h for list of all the skeletons in canonical form.
+* @scenario                            Creates an i18n_uenumeration_h for list of all the skeletons in canonical form.
+* @apicovered                  i18n_udatepg_skeletons_create
+* @passcase                            When i18n_udatepg_skeletons_create is successful
+* @failcase                            When i18n_udatepg_skeletons_create failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_skeletons_create_p(void)
+{
+       START_TEST;
+
+       i18n_uenumeration_h enumeration = NULL;
+       int nRetVal = -1;
+
+       nRetVal =i18n_udatepg_skeletons_create(dtpg, &enumeration);
+       PRINT_RESULT( nRetVal, "i18n_udatepg_skeletons_create");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates an i18n_uenumeration_h for list of all the base skeletons in canonical form.
+/**
+* @testcase                            ITc_i18n_udatepg_base_skeletons_create_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Creates an i18n_uenumeration_h for list of all the base skeletons in canonical form.
+* @scenario                            Creates an i18n_uenumeration_h for list of all the base skeletons in canonical form.
+* @apicovered                  i18n_udatepg_base_skeletons_create, i18n_udatepg_destroy
+* @passcase                            When i18n_udatepg_base_skeletons_create are successful
+* @failcase                            When i18n_udatepg_base_skeletons_create failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_base_skeletons_create_p(void)
+{
+       START_TEST;
+
+       i18n_uenumeration_h enumeration = NULL;
+       int nRetVal = -1;
+
+       nRetVal =i18n_udatepg_base_skeletons_create(dtpg, &enumeration);
+       PRINT_RESULT( nRetVal, "i18n_udatepg_base_skeletons_create");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates an empty generator.
+/**
+* @testcase                            ITc_i18n_udatepg_create_empty_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Creates an empty generator.
+* @scenario                            Creates an empty generator.\n
+*                                              Destroy the udatepg handle.
+* @apicovered                  i18n_udatepg_create_empty, i18n_udatepg_destroy
+* @passcase                            When i18n_udatepg_create_empty are successful
+* @failcase                            When i18n_udatepg_create_empty failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_create_empty_p(void)
+{
+       START_TEST;
+       i18n_udatepg_h udatepgHandle = NULL;
+       int nRetVal = -1;
+
+       nRetVal =i18n_udatepg_create_empty(&udatepgHandle);
+       PRINT_RESULT( nRetVal, "i18n_udatepg_create_empty");
+
+       i18n_udatepg_destroy(udatepgHandle);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates a copy of a generator.
+/**
+* @testcase                            ITc_i18n_udatepg_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Creates a copy of a generator.
+* @scenario                            Creates a copy of a generator.
+* @apicovered                  i18n_udatepg_clone
+* @passcase                            When i18n_udatepg_clone is successful
+* @failcase                            When i18n_udatepg_clone failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_clone_p(void)
+{
+       START_TEST;
+
+       i18n_udatepg_h udatepgCloneHandle = NULL;
+       int nRetVal = -1;
+
+       nRetVal = i18n_udatepg_clone(dtpg, &udatepgCloneHandle);
+       PRINT_RESULT( nRetVal, "i18n_udatepg_clone");
+
+       i18n_udatepg_destroy(udatepgCloneHandle);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Adds a pattern to the generator.
+/**
+* @testcase                            ITc_i18n_udatepg_add_pattern_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Adds a pattern to the generator.
+* @scenario                            Adds a pattern to the generator.
+* @apicovered                  i18n_udatepg_add_pattern
+* @passcase                            When i18n_udatepg_add_pattern is successful
+* @failcase                            When i18n_udatepg_add_pattern failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_add_pattern_p(void)
+{
+       START_TEST;
+
+       const char* pSrc = "yyyy/MM/dd";
+       i18n_uchar szPattern[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int32_t nPatternLength = strlen(pSrc);
+       i18n_ubool bOverride = false;
+       i18n_uchar szConflictingPattern[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int32_t nCapacity = I18N_DATEPG_PATTERN_CAPACITY;
+       i18n_udatepg_date_time_pattern_conflict_e nConflictStatus;
+       int nRetVal     = -1;
+
+       nRetVal =i18n_udatepg_add_pattern(dtpg, i18n_ustring_copy_ua(szPattern, pSrc), nPatternLength, bOverride, szConflictingPattern, nCapacity, &nConflictStatus);
+       if(nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_udatepg_add_pattern failed. Returned value is -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the pattern corresponding to a given skeleton.
+/**
+* @testcase                            ITc_i18n_udatepg_get_pattern_for_skeleton_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the pattern corresponding to a given skeleton.\n
+* @apicovered                  i18n_udatepg_get_pattern_for_skeleton
+* @passcase                            When i18n_udatepg_create, i18n_udatepg_get_pattern_for_skeleton are successful
+* @failcase                            When i18n_udatepg_create or i18n_udatepg_get_pattern_for_skeleton failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_udatepg_get_pattern_for_skeleton_p(void)
+{
+       START_TEST;
+
+       const char *pSrc = "yMd";
+       i18n_uchar szSkeleton[I18N_DATEPG_PATTERN_CAPACITY] = {0,};
+       int32_t nSkeletonLength = strlen(pSrc);
+       int32_t szPatternLength = 0;
+       const i18n_uchar *pRet = NULL;
+
+       pRet = i18n_udatepg_get_pattern_for_skeleton(dtpg, i18n_ustring_copy_ua(szSkeleton, pSrc), nSkeletonLength, &szPatternLength);
+       if(pRet == NULL)
+       {
+               FPRINTF("[Line : %d][%s] i18n_udatepg_get_pattern_for_skeleton failed. Returned value is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/base-utils/ITs-base-utils-uenumeration.c b/src/itc/base-utils/ITs-base-utils-uenumeration.c
new file mode 100755 (executable)
index 0000000..ac88a29
--- /dev/null
@@ -0,0 +1,243 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-base-utils-common.h"
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+const i18n_uchar ustring_1[] = { 't', 0 }, ustring_2[] = { 'i', 0 }, ustring_3[] = { 'z', 0 }, ustring_4[] = { 'e', 0 }, ustring_5[] = { 'n', 0 };
+const i18n_uchar* ustrings[] = { ustring_1, ustring_2, ustring_3, ustring_4, ustring_5 };
+i18n_uenumeration_h g_uenum = NULL;
+
+/**
+* @function            ITs_base_utils_enumeration_startup
+* @description         Called before each test. Create the i18n_uenumeration_h handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_enumeration_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       int nRetVal = i18n_uenumeration_uchar_strings_enumeration_create(ustrings, sizeof(ustrings)/sizeof(ustrings[0]), &g_uenum);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d][%s] i18n_uenumeration_uchar_strings_enumeration_create failed in startup. Error returned = %s\\n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               g_bBaseUtilsInitFlag = false;
+               return;
+       }
+       g_bBaseUtilsInitFlag = true;
+       return;
+}
+/**
+* @function            ITs_base_utils_enumeration_cleanup
+* @description         Called after each test. Destroy the created i18n_uenumeration_h handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_enumeration_cleanup(void)
+{
+       int nRetVal = i18n_uenumeration_destroy(g_uenum);
+       g_uenum = NULL;
+       if(nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d][%s] i18n_uenumeration_destroy failed in cleanup. Error returned = %s\\n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+       }
+       g_bBaseUtilsInitFlag = false;
+       return;
+}
+
+/** @addtogroup itc-base-utils-testcases
+*  @brief              Integration testcases for module base-utils ucalendar
+*  @ingroup    itc-base-utils
+*  @{
+*/
+
+//& type: auto
+//& purpose: Create/Destroy an i18n_uenumeration_h from const i18n_uchar* strings.
+/**
+* @testcase                            ITc_i18n_uenumeration_uchar_strings_enumeration_create_destroy_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create an i18n_uenumeration_h handle.\n
+*                                              Destroy the created i18n_uenumeration_h handle.
+* @apicovered                  i18n_uenumeration_uchar_strings_enumeration_create, i18n_uenumeration_destroy
+* @passcase                            When i18n_uenumeration_uchar_strings_enumeration_create and i18n_uenumeration_destroy are successful
+* @failcase                            When i18n_uenumeration_uchar_strings_enumeration_create or i18n_uenumeration_destroy failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uenumeration_uchar_strings_enumeration_create_destroy_p(void)
+{
+       START_TEST;
+       i18n_uenumeration_h uenum = NULL;
+
+       int nRetVal = i18n_uenumeration_uchar_strings_enumeration_create(ustrings, sizeof(ustrings)/sizeof(ustrings[0]), &uenum);
+       PRINT_RESULT(nRetVal, "i18n_uenumeration_uchar_strings_enumeration_create");
+
+       nRetVal =i18n_uenumeration_destroy(uenum);
+       PRINT_RESULT(nRetVal, "i18n_uenumeration_destroy");
+
+       uenum = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Create/Destroy an i18n_uenumeration_h from a const char* strings.
+/**
+* @testcase                            ITc_i18n_uenumeration_char_strings_enumeration_create_destroy_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create an i18n_uenumeration_h handle.\n
+*                                              Destroy the created i18n_uenumeration_h handle.
+* @apicovered                  i18n_uenumeration_char_strings_enumeration_create, i18n_uenumeration_destroy
+* @passcase                            When i18n_uenumeration_char_strings_enumeration_create and i18n_uenumeration_destroy are successful
+* @failcase                            When i18n_uenumeration_char_strings_enumeration_create or i18n_uenumeration_destroy failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uenumeration_char_strings_enumeration_create_destroy_p(void)
+{
+       START_TEST;
+       const char string_1[] = { 't', 0 }, string_2[] = { 'e', 0 }, string_3[] = { 's', 0 }, string_4[] = { 't', 0 };
+       const char* pStrings[] = { string_1, string_2, string_3, string_4 };
+
+       i18n_uenumeration_h local_uenum;
+
+       int nRetVal = i18n_uenumeration_char_strings_enumeration_create(pStrings, sizeof(pStrings)/sizeof(pStrings[0]), &local_uenum);
+       PRINT_RESULT(nRetVal, "i18n_uenumeration_char_strings_enumeration_create");
+
+       nRetVal =i18n_uenumeration_destroy(local_uenum);
+       PRINT_RESULT(nRetVal, "i18n_uenumeration_destroy");
+
+       local_uenum = NULL;
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the number of elements that the iterator traverses.
+/**
+* @testcase                            ITc_i18n_uenumeration_count_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Returns the number of elements that the iterator traverses.\n
+* @apicovered                  i18n_uenumeration_count
+* @passcase                            When i18n_uenumeration_count is successful
+* @failcase                            When i18n_uenumeration_count failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uenumeration_count_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+
+       nRetVal = i18n_uenumeration_count(g_uenum);
+       if( nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_uenumeration_count failed. Returned value = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the next element in the iterator's list.
+/**
+* @testcase                            ITc_i18n_uenumeration_unext_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Get the next element in the iterator's list.
+* @apicovered                  i18n_uenumeration_unext
+* @passcase                            When i18n_uenumeration_unext is successful
+* @failcase                            When i18n_uenumeration_unext failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uenumeration_unext_p(void)
+{
+       START_TEST;
+       const i18n_uchar *pRet = NULL;
+       int32_t result_length = 0;
+
+       pRet = i18n_uenumeration_unext(g_uenum, &result_length);
+       if( pRet == NULL)
+       {
+               FPRINTF("[Line : %d][%s] i18n_uenumeration_unext failed. Returned value is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the next element in the iterator's list.
+/**
+* @testcase                            ITc_i18n_uenumeration_next_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Get the next element in the iterator's list.
+* @apicovered                  i18n_uenumeration_next
+* @passcase                            When i18n_uenumeration_next is successful
+* @failcase                            When i18n_uenumeration_next failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uenumeration_next_p(void)
+{
+       START_TEST;
+       int32_t result_length = 0;
+       const char *pRet = NULL;
+
+       pRet = i18n_uenumeration_next(g_uenum, &result_length);
+       if( pRet == NULL)
+       {
+               FPRINTF("[Line : %d][%s] i18n_uenumeration_next failed. Returned value is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Resets the iterator to the current list of service IDs.
+/**
+* @testcase                            ITc_i18n_uenumeration_reset_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Resets the iterator to the current list of service IDs.
+* @apicovered                  i18n_uenumeration_reset
+* @passcase                            When i18n_uenumeration_reset is successful
+* @failcase                            When i18n_uenumeration_reset failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uenumeration_reset_p(void)
+{
+       START_TEST;
+       int nRetVal;
+
+       nRetVal = i18n_uenumeration_reset(g_uenum);
+       PRINT_RESULT(nRetVal, "i18n_uenumeration_reset");
+
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/base-utils/ITs-base-utils-ulocale.c b/src/itc/base-utils/ITs-base-utils-ulocale.c
new file mode 100755 (executable)
index 0000000..61b87f2
--- /dev/null
@@ -0,0 +1,1196 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-base-utils-common.h"
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+struct timeval g_stBaseUtilsStartTime;
+struct mallinfo g_stBaseUtilsMemInfo;
+
+/**
+* @function            ITs_base_utils_ulocale_startup
+* @description         Called before each test. Get the default locale to be used
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_ulocale_startup(void)
+{
+       g_bBaseUtilsInitFlag = false;
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_pszDefaultLocale = I18N_ULOCALE_US;
+
+       g_bBaseUtilsInitFlag = true;
+       return;
+}
+/**
+* @function            ITs_base_utils_ulocale_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_ulocale_cleanup(void)
+{
+       g_bBaseUtilsInitFlag = false;
+       return;
+}
+
+/** @addtogroup itc-base-utils-testcases
+*  @brief              Integration testcases for module base-utils ucalendar
+*  @ingroup    itc-base-utils
+*  @{
+*/
+
+//& type: auto
+//& purpose: Gets the language code for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_language_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the language code for the specified locale.
+* @apicovered                  i18n_ulocale_get_language
+* @passcase                            When i18n_ulocale_get_language is successful.
+* @failcase                            If target i18n_ulocale_get_language api fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_language_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszLocaleGetMemLog = NULL;
+       char *pszLocaleGetSpeedLog = NULL;
+       int nLocaleGetFailCount = 0;
+#if MEMORY_CHECK
+       pszLocaleGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszLocaleGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char pstLanguage[I18N_LANG_CAPACITY] = {0,};
+               int nLanguageBufSize;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ulocale_get_language(g_pszDefaultLocale, pstLanguage, I18N_LANG_CAPACITY, &nLanguageBufSize);
+               BaseUtilsGetExecutionDelay(pszLocaleGetSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszLocaleGetMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ulocale_get_language",nLocaleGetFailCount);
+               if(nLanguageBufSize > I18N_LANG_CAPACITY)
+               {
+                       FPRINTF("\\n[Line : %d][%s] As Returned Language Buffer Size(%d) is greater than language capacity(%d), the returned language code=%s is truncated.", __LINE__, API_NAMESPACE, nLanguageBufSize, I18N_LANG_CAPACITY, pstLanguage);
+               }
+       }
+       VALIDATE_RESULT(nLocaleGetFailCount, "i18n_ulocale_get_language", pszLocaleGetMemLog, pszLocaleGetSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ulocale_get_language", pszLocaleGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ulocale_get_language", pszLocaleGetMemLog);
+#endif
+       FREE_MEMORY(pszLocaleGetMemLog, pszLocaleGetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the language code for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_display_name_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the language code for the specified locale.
+* @apicovered                  i18n_ulocale_get_display_name
+* @passcase                            When i18n_ulocale_get_display_name is successful.
+* @failcase                            If target i18n_ulocale_get_display_name api fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_display_name_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszLocaleGetMemLog = NULL;
+       char *pszLocaleGetSpeedLog = NULL;
+       int nLocaleGetFailCount = 0;
+#if MEMORY_CHECK
+       pszLocaleGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszLocaleGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nDisplayNameBufSize;
+               i18n_uchar localeDisplayName[I18N_RESULT_LEN] = { 0, };
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ulocale_get_display_name(g_pszDefaultLocale, g_pszDefaultLocale, localeDisplayName, I18N_RESULT_LEN, &nDisplayNameBufSize);
+               BaseUtilsGetExecutionDelay(pszLocaleGetSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszLocaleGetMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ulocale_get_display_name",nLocaleGetFailCount);
+               if(nDisplayNameBufSize > I18N_RESULT_LEN)
+               {
+                       char *pszDisplayName = NULL;
+                       i18n_ustring_copy_au(pszDisplayName, localeDisplayName);
+                       FPRINTF("\\n[Line : %d][%s] As Returned DisplayName Buffer Size(%d) is greater than DisplayName capacity(%d), the returned Locale Display Name=%s is truncated.", __LINE__, API_NAMESPACE, nDisplayNameBufSize, I18N_RESULT_LEN, pszDisplayName);
+               }
+       }
+       VALIDATE_RESULT(nLocaleGetFailCount, "i18n_ulocale_get_display_name", pszLocaleGetMemLog, pszLocaleGetSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ulocale_get_display_name", pszLocaleGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ulocale_get_display_name", pszLocaleGetMemLog);
+#endif
+       FREE_MEMORY(pszLocaleGetMemLog, pszLocaleGetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set and Gets default locale.
+/**
+* @testcase                            ITc_i18n_ulocale_set_get_default_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Set default locale and Get default locale.
+* @apicovered                  i18n_ulocale_set_default, i18n_ulocale_get_default
+* @passcase                            When i18n_ulocale_set_default, i18n_ulocale_get_default are successful.
+* @failcase                            If target i18n_ulocale_set_default or i18n_ulocale_get_default fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_set_get_default_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszLocaleSetGetMemLog = NULL;
+       char *pszLocaleSetSpeedLog = NULL;
+       char *pszLocaleGetSpeedLog = NULL;
+       int nLocaleSetFailCount = 0;
+       int nLocaleGetFailCount = 0;
+       #if MEMORY_CHECK
+       pszLocaleSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszLocaleSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszLocaleGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ulocale_set_default(LOCALE);
+               BaseUtilsGetExecutionDelay(pszLocaleSetSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ulocale_set_default",nLocaleSetFailCount);
+
+               const char *pszGetDefaultLocale = NULL;
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ulocale_get_default(&pszGetDefaultLocale);
+               BaseUtilsGetExecutionDelay(pszLocaleGetSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszLocaleSetGetMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ulocale_get_default",nLocaleGetFailCount);
+               if(strcmp(LOCALE, pszGetDefaultLocale) != 0)
+               {
+                       nLocaleGetFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ulocale_get_default failed, as Actual Default Locale=%s not matched with the expected Locale=%s on iteration %d, \n", __LINE__, API_NAMESPACE, pszGetDefaultLocale, LOCALE, nLoopCount);
+               }
+               //free(pszGetDefaultLocale);
+       }
+       VALIDATE_RESULT_PAIRAPI(nLocaleSetFailCount, nLocaleGetFailCount, "i18n_ulocale_set_default", "i18n_ulocale_get_default", pszLocaleSetGetMemLog, pszLocaleSetSpeedLog, pszLocaleGetSpeedLog, MAX_COUNT);
+       //free(pszLocale);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ulocale_set_default", pszLocaleSetSpeedLog);
+               PRINT_SPEED_LOG("i18n_ulocale_get_default", pszLocaleGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ulocale_set_get_default", pszLocaleSetGetMemLog);
+#endif
+       FREE_MEMORY(pszLocaleSetGetMemLog, pszLocaleSetSpeedLog, pszLocaleGetSpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the specified locale from a list of all available locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_available_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the specified locale from a list of all available locale.
+* @apicovered                  i18n_ulocale_get_available
+* @passcase                            When i18n_ulocale_get_available is successful.
+* @failcase                            If target i18n_ulocale_get_available api fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_available_p(void)
+{
+       START_TEST;
+       const char *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ulocale_get_available(0);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       FPRINTF("[Line : %d][base-util_ITC] i18n_ulocale_get_available failed in iteration = %d\\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ulocale_get_available", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ulocale_get_available", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ulocale_get_available", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the country code for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_country_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the country code for the specified locale.
+* @apicovered                  i18n_ulocale_get_country
+* @passcase                            When i18n_ulocale_get_country is successful.
+* @failcase                            If target i18n_ulocale_get_country api fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_country_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       const char *pLocaleId = I18N_ULOCALE_US;
+       char szCountry[I18N_LANG_CAPACITY] = {0,};
+       int nCountryCapacity = I18N_LANG_CAPACITY;
+       int nError = I18N_ERROR_NONE;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               i18n_ulocale_get_country(pLocaleId, szCountry, nCountryCapacity, &nError);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               PRINT_RESULT_LOOP(nError,"i18n_ulocale_get_country",nFailCount);
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ulocale_get_country", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ulocale_get_country", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ulocale_get_country", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the size of all available locale list
+/**
+* @testcase                            ITc_i18n_ulocale_count_available_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Gets the size of all available locale list.
+* @apicovered                  i18n_ulocale_count_available
+* @passcase                            When i18n_ulocale_count_available is successful.
+* @failcase                            If target i18n_ulocale_count_available api fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_count_available_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ulocale_count_available();
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRetVal < 0)
+               {
+                       FPRINTF("[Line : %d][base-util_ITC] i18n_ulocale_count_available failed in iteration = %d\\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ulocale_count_available", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ulocale_count_available", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ulocale_count_available", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Adds the likely subtags for a provided locale ID, per the algorithm described.
+/**
+* @testcase                            ITc_i18n_ulocale_add_likely_subtags_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Adds the likely subtags for a provided locale ID, per the algorithm described
+* @apicovered                  i18n_ulocale_add_likely_subtags
+* @passcase                            When i18n_ulocale_add_likely_subtags is successful
+* @failcase                            When i18n_ulocale_add_likely_subtags failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_add_likely_subtags_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "My_Id";
+       char szMaximizedLocaleId[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nMaximizedLocaleIdCapacity = I18N_ULOCALE_CAPACITY;
+
+       int nRetVal = i18n_ulocale_add_likely_subtags(pLocaleId, szMaximizedLocaleId, nMaximizedLocaleIdCapacity);
+       if(nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_add_likely_subtags failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the full name for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_canonicalize_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the full name for the specified locale.
+* @apicovered                  i18n_ulocale_canonicalize
+* @passcase                            When i18n_ulocale_canonicalize is successful
+* @failcase                            When i18n_ulocale_canonicalize failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_canonicalize_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "My_Id";
+       char szName[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nNameCapacity = I18N_ULOCALE_CAPACITY;
+       int nBufSize = -1;
+
+       nBufSize = i18n_ulocale_canonicalize(pLocaleId, szName, nNameCapacity);
+       if( nBufSize == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_canonicalize failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns a locale ID for the specified BCP47 language tag string.
+/**
+* @testcase                            ITc_i18n_ulocale_for_language_tag_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Returns a locale ID for the specified BCP47 language tag string.
+* @apicovered                  i18n_ulocale_for_language_tag
+* @passcase                            When i18n_ulocale_for_language_tag is successful
+* @failcase                            When i18n_ulocale_for_language_tag failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_for_language_tag_p(void)
+{
+       START_TEST;
+
+       const char *pLangTag = "en";
+       char szLocaleId[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nLocaleIdCapacity = I18N_ULOCALE_CAPACITY;
+       int32_t nParsedLength;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_for_language_tag(pLangTag, szLocaleId, nLocaleIdCapacity, &nParsedLength);
+       if( nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_for_language_tag failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the full name for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_base_name_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the full name for the specified locale.
+* @apicovered                  i18n_ulocale_get_base_name
+* @passcase                            When i18n_ulocale_get_base_name is successful
+* @failcase                            When i18n_ulocale_get_base_name failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_base_name_p(void)
+{
+       START_TEST;
+
+       const char*pLocaleId = "zh_Hans_HK_USD@currency=USD;president=WHO";
+       char szName[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nNameCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_base_name(pLocaleId, szName, nNameCapacity);
+       if(nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_base_name failed. Returned value is -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the layout character orientation for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_character_orientation_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the layout character orientation for the specified locale.
+* @apicovered                  i18n_ulocale_get_character_orientation
+* @passcase                            When i18n_ulocale_get_character_orientation is successful
+* @failcase                            When i18n_ulocale_get_character_orientation failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_character_orientation_p(void)
+{
+       START_TEST;
+
+       const char*pLocaleId = "zh_Hans_HK_USD@currency=USD";
+       i18n_ulocale_layout_type_e layout_type;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_character_orientation(pLocaleId, &layout_type);
+       PRINT_RESULT(nRetVal, "i18n_ulocale_get_character_orientation");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the country name suitable for display for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_display_country_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the country name suitable for display for the specified locale.
+* @apicovered                  i18n_ulocale_get_display_country
+* @passcase                            When i18n_ulocale_get_display_country is successful
+* @failcase                            When i18n_ulocale_get_display_country failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_display_country_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       const char *pDisplayLocale = "en_US";
+       i18n_uchar szCountry[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nCountryCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_display_country(pLocaleId, pDisplayLocale, szCountry, nCountryCapacity);
+       if(nRetVal == 0)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_display_country failed. Returned value is 0\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the keyword name suitable for display for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_display_keyword_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the keyword name suitable for display for the specified locale.
+* @apicovered                  i18n_ulocale_get_display_keyword
+* @passcase                            When i18n_ulocale_get_display_keyword is successful
+* @failcase                            When i18n_ulocale_get_display_keyword failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_display_keyword_p(void)
+{
+       START_TEST;
+
+       const char *pKeyword = "currency";
+       const char *pDisplayLocale = "en_US";
+       i18n_uchar szDest[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nDestCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_display_keyword(pKeyword, pDisplayLocale, szDest, nDestCapacity);
+       if(nRetVal == 0)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_display_keyword failed. Returned value is 0\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the value of the keyword suitable for display for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_display_keyword_value_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the value of the keyword suitable for display for the specified locale.
+* @apicovered                  i18n_ulocale_get_display_keyword_value
+* @passcase                            When i18n_ulocale_get_display_keyword_value is successful
+* @failcase                            When i18n_ulocale_get_display_keyword_value failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_display_keyword_value_p(void)
+{
+       START_TEST;
+
+       const char*pLocaleId = "zh_Hans_HK_USD@currency=USD";
+       const char *pKeyword = "currency";
+       const char *pDisplayLocale = "en_US";
+       i18n_uchar szDest[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nDestCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_display_keyword_value(pLocaleId, pKeyword, pDisplayLocale, szDest, nDestCapacity);
+       if(nRetVal == 0)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_display_keyword_value failed. Returned value is 0\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the language name suitable for display for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_display_language_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the language name suitable for display for the specified locale.
+* @apicovered                  i18n_ulocale_get_display_language
+* @passcase                            When i18n_ulocale_get_display_language is successful
+* @failcase                            When i18n_ulocale_get_display_language failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_display_language_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       const char *pDisplayLocale = "en_US";
+       i18n_uchar szLanguage[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nLanguageCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_display_language(pLocaleId, pDisplayLocale, szLanguage, nLanguageCapacity);
+       if(nRetVal == 0)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_display_language failed. Returned value is 0\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the script name suitable for display for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_display_script_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the script name suitable for display for the specified locale.
+* @apicovered                  i18n_ulocale_get_display_script
+* @passcase                            When i18n_ulocale_get_display_script is successful
+* @failcase                            When i18n_ulocale_get_display_script failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_display_script_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       const char *pDisplayLocale = "en_US";
+       i18n_uchar szScript[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nScriptCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_display_script(pLocaleId, pDisplayLocale, szScript, nScriptCapacity);
+       if(nRetVal == 0)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_display_script failed. Returned value is 0\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the variant name suitable for display for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_display_variant_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the variant name suitable for display for the specified locale.
+* @apicovered                  i18n_ulocale_get_display_variant
+* @passcase                            When i18n_ulocale_get_display_variant is successful
+* @failcase                            When i18n_ulocale_get_display_variant failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_display_variant_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       const char *pDisplayLocale = "en_US";
+       i18n_uchar szVariant[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nVariantCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_display_variant(pLocaleId, pDisplayLocale, szVariant, nVariantCapacity);
+       if(nRetVal == 0)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_display_variant failed. Returned value is 0\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the ISO country code for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_iso3_country_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the ISO country code for the specified locale.
+* @apicovered                  i18n_ulocale_get_iso3_country
+* @passcase                            When i18n_ulocale_get_iso3_country is successful
+* @failcase                            When i18n_ulocale_get_iso3_country failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_iso3_country_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       const char *pRet = NULL;
+
+       pRet = i18n_ulocale_get_iso3_country(pLocaleId);
+       if(pRet == NULL)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_iso3_country failed. Returned value is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the ISO language code for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_iso3_language_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the ISO language code for the specified locale.
+* @apicovered                  i18n_ulocale_get_iso3_language
+* @passcase                            When i18n_ulocale_get_iso3_language is successful
+* @failcase                            When i18n_ulocale_get_iso3_language failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_iso3_language_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       const char *pRet = NULL;
+
+       pRet = i18n_ulocale_get_iso3_language(pLocaleId);
+       if(pRet == NULL)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_iso3_language failed. Returned value is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets a list of all available 2-letter country codes defined in ISO 639.
+/**
+* @testcase                            ITc_i18n_ulocale_get_iso_countries_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets a list of all available 2-letter country codes defined in ISO 639.
+* @apicovered                  i18n_ulocale_get_iso_countries
+* @passcase                            When i18n_ulocale_get_iso_countries is successful
+* @failcase                            When i18n_ulocale_get_iso_countries failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_iso_countries_p(void)
+{
+       START_TEST;
+
+       const char *const *pRet = NULL;
+
+       pRet = i18n_ulocale_get_iso_countries();
+       if(pRet == NULL)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_iso_countries failed. Returned value is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets a list of all available 2-letter language codes plus additional 3-letter codes.
+/**
+* @testcase                            ITc_i18n_ulocale_get_iso_languages_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets a list of all available 2-letter language codes plus additional 3-letter codes.
+* @apicovered                  i18n_ulocale_get_iso_languages
+* @passcase                            When i18n_ulocale_get_iso_languages is successful
+* @failcase                            When i18n_ulocale_get_iso_languages failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_iso_languages_p(void)
+{
+       START_TEST;
+
+       const char *const *pRet = NULL;
+
+       pRet = i18n_ulocale_get_iso_languages();
+       if(pRet == NULL)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_iso_languages failed. Returned value is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set/Get the value for a keyword.
+/**
+* @testcase                            ITc_i18n_ulocale_set_get_keyword_value_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Sets or removes the value of the specified keyword.\n
+*                                              Gets the value for a keyword.\n
+*                                              Match set and get value.
+* @apicovered                  i18n_ulocale_set_keyword_value, i18n_ulocale_get_keyword_value
+* @passcase                            When i18n_ulocale_set_keyword_value, i18n_ulocale_get_keyword_value are successful
+* @failcase                            When i18n_ulocale_set_keyword_value or i18n_ulocale_get_keyword_value failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_set_get_keyword_value_p(void)
+{
+       START_TEST;
+
+       const char *pKeywordName = "currency";
+       const char *pKeywordValue = "USD";
+       char szBuffer[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nBufferCapacity = I18N_ULOCALE_CAPACITY;
+       const char*pLocaleId = "zh_Hans_HK_USD@currency=USD";
+       int nRetVal = -1;
+
+       i18n_ulocale_set_keyword_value(pKeywordName, pKeywordValue, szBuffer, nBufferCapacity);
+       if(strlen(szBuffer) <= 0)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_set_keyword_value failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nRetVal = i18n_ulocale_get_keyword_value(pLocaleId, pKeywordName, szBuffer, nBufferCapacity);
+       if(nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_keyword_value failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       if(strcmp(pKeywordValue, szBuffer) != 0)
+       {
+               FPRINTF("[Line : %d][%s] Set and get value not matched\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the Win32 LCID value for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_lcid_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the Win32 LCID value for the specified locale.
+* @apicovered                  i18n_ulocale_get_lcid
+* @passcase                            When i18n_ulocale_get_lcid is successful
+* @failcase                            When i18n_ulocale_get_lcid failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_lcid_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       int nRetVal = -1;
+
+       i18n_ulocale_get_lcid(pLocaleId);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "i18n_ulocale_get_lcid");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the layout line orientation for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_line_orientation_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the layout line orientation for the specified locale.
+* @apicovered                  i18n_ulocale_get_line_orientation
+* @passcase                            When i18n_ulocale_get_line_orientation is successful
+* @failcase                            When i18n_ulocale_get_line_orientation failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_line_orientation_p(void)
+{
+       START_TEST;
+
+       const char*pLocaleId = "zh_Hans_HK_USD@currency=USD";
+       i18n_ulocale_layout_type_e layout_type;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_line_orientation(pLocaleId, &layout_type);
+       PRINT_RESULT(nRetVal, "i18n_ulocale_get_line_orientation");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the I18N locale ID for the specified Win32 LCID value.
+/**
+* @testcase                            ITc_i18n_ulocale_get_locale_for_lcid_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the I18N locale ID for the specified Win32 LCID value.
+* @apicovered                  i18n_ulocale_get_lcid, i18n_ulocale_get_locale_for_lcid
+* @passcase                            When i18n_ulocale_get_lcid and i18n_ulocale_get_locale_for_lcid are successful
+* @failcase                            When i18n_ulocale_get_lcid or i18n_ulocale_get_locale_for_lcid failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_locale_for_lcid_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       char szLocale[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nLocaleCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+       uint32_t nLcid;
+
+       nLcid = i18n_ulocale_get_lcid(pLocaleId);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "i18n_ulocale_get_lcid");
+
+       nRetVal = i18n_ulocale_get_locale_for_lcid(nLcid, szLocale, nLocaleCapacity);
+       if( nRetVal < 0 )
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_locale_for_lcid failed. Returned value is negative\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the full name for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_name_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the full name for the specified locale.
+* @apicovered                  i18n_ulocale_get_name
+* @passcase                            When i18n_ulocale_get_name is successful
+* @failcase                            When i18n_ulocale_get_name failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_name_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       char szName[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nNameCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_name(pLocaleId, szName, nNameCapacity);
+       if( nRetVal <= 0 && strlen(szName) <= 0)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_name failed.\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Truncates the locale ID string to get the parent locale ID.
+/**
+* @testcase                            ITc_i18n_ulocale_get_parent_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Truncates the locale ID string to get the parent locale ID.
+* @apicovered                  i18n_ulocale_get_parent
+* @passcase                            When i18n_ulocale_get_parent is successful
+* @failcase                            When i18n_ulocale_get_parent failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_parent_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       char szParent[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nParentCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_parent(pLocaleId, szParent, nParentCapacity);
+       if( nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_parent failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the script code for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_script_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the script code for the specified locale.
+* @apicovered                  i18n_ulocale_get_script
+* @passcase                            When i18n_ulocale_get_script is successful
+* @failcase                            When i18n_ulocale_get_script failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_script_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK";
+       char szScript[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nScriptCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_script(pLocaleId, szScript, nScriptCapacity);
+       if( nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_script failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the variant code for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_get_variant_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the variant code for the specified locale.
+* @apicovered                  i18n_ulocale_get_variant
+* @passcase                            When i18n_ulocale_get_variant is successful
+* @failcase                            When i18n_ulocale_get_variant failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_get_variant_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       char szVariant[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nVariantCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_get_variant(pLocaleId, szVariant, nVariantCapacity);
+       if( nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s] i18n_ulocale_get_variant failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets an enumeration of keywords for the specified locale.
+/**
+* @testcase                            ITc_i18n_ulocale_keywords_create_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets an enumeration of keywords for the specified locale.
+* @apicovered                  i18n_ulocale_keywords_create
+* @passcase                            When i18n_ulocale_keywords_create is successful
+* @failcase                            When i18n_ulocale_keywords_create failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_keywords_create_p(void)
+{
+       START_TEST;
+
+       const char*pLocaleId = "zh_Hans_HK_USD@currency=USD;president=WHO";
+       i18n_uenumeration_h keywords = NULL;
+       int nRetVal = -1;
+
+       nRetVal =i18n_ulocale_keywords_create(pLocaleId, &keywords);
+       PRINT_RESULT(nRetVal, "i18n_ulocale_keywords_create");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Minimizes the subtags for a provided locale ID
+/**
+* @testcase                            ITc_i18n_ulocale_minimize_subtags_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Minimizes the subtags for a provided locale ID.
+* @apicovered                  i18n_ulocale_minimize_subtags
+* @passcase                            When i18n_ulocale_minimize_subtags is successful
+* @failcase                            When i18n_ulocale_minimize_subtags failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_minimize_subtags_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_Hans_HK_USD";
+       char szMinimizedLocaleId[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nMinimizedLocaleIdCapacity = I18N_ULOCALE_CAPACITY;
+       int nRetVal = -1;
+
+       nRetVal =i18n_ulocale_minimize_subtags(pLocaleId, szMinimizedLocaleId, nMinimizedLocaleIdCapacity);
+       if(nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s]i18n_ulocale_minimize_subtags failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns a well-formed language tag for this locale ID.
+/**
+* @testcase                            ITc_i18n_ulocale_to_language_tag_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Returns a well-formed language tag for this locale ID.
+* @apicovered                  i18n_ulocale_to_language_tag
+* @passcase                            When i18n_ulocale_to_language_tag is successful
+* @failcase                            When i18n_ulocale_to_language_tag failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ulocale_to_language_tag_p(void)
+{
+       START_TEST;
+
+       const char *pLocaleId = "zh_HK";
+       char szLangTag[I18N_ULOCALE_CAPACITY] = {0,};
+       int32_t nLangtagCapacity = I18N_ULOCALE_CAPACITY;
+       i18n_ubool bStrict = true;
+       int nRetVal = -1;
+
+       nRetVal = i18n_ulocale_to_language_tag(pLocaleId, szLangTag, nLangtagCapacity, bStrict);
+       if(nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s]i18n_ulocale_to_language_tag failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/base-utils/ITs-base-utils-unumber.c b/src/itc/base-utils/ITs-base-utils-unumber.c
new file mode 100755 (executable)
index 0000000..648801e
--- /dev/null
@@ -0,0 +1,937 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-base-utils-common.h"
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+i18n_unumber_format_h num_format;
+
+/**
+* @function            ITs_base_utils_unumber_startup
+* @description         Called before each test. Creates an i18n_unumber_format_h handle and get default locale
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_unumber_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bBaseUtilsInitFlag = false;
+       g_pDefaultTzid = NULL;
+       int nRetVal = -1;
+       i18n_uchar *pRet = NULL;
+       int nLength = 8;
+       g_pszDefaultLocale = I18N_ULOCALE_US;
+       /*nRetVal = i18n_ulocale_get_default(&g_pszDefaultLocale);              // Locale to be used I18N_ULOCALE_US as suggested by HQ
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ulocale_get_default failed in STARTUP, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               return;
+       }*/
+       
+       nRetVal = i18n_unumber_create(I18N_UNUMBER_DEFAULT, g_pDefaultTzid, nLength, g_pszDefaultLocale, NULL, &num_format);
+       if (nRetVal != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_unumber_create failed in STARTUP, error returned = %s \n", __LINE__, API_NAMESPACE, BaseUtilsGetError(nRetVal));
+               return;
+       }
+       if ( num_format == NULL )
+       {
+               FPRINTF("[Line : %d][%s] i18n_unumber_create failed, num_format = NULL\\n", __LINE__, API_NAMESPACE);
+               return;
+       }
+       g_pDefaultTzid = (i18n_uchar*)calloc(strlen(I18N_DEFAULT_T_ZONE) + 1, sizeof(i18n_uchar));
+       if (g_pDefaultTzid == NULL)
+       {
+               FPRINTF("\\n[Line : %d][%s] g_pDefaultTzid, memory not allocated properly\n", __LINE__, API_NAMESPACE);
+               return;
+       }
+       pRet = i18n_ustring_copy_ua(g_pDefaultTzid, (char *)I18N_DEFAULT_T_ZONE);
+       if(i18n_ustring_get_length(pRet) == 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in start-up\n", __LINE__, API_NAMESPACE);
+               return;
+       }
+       g_nLengthDefaultTimeZone = i18n_ustring_get_length(g_pDefaultTzid);
+       g_bBaseUtilsInitFlag = true;
+}
+/**
+* @function            ITs_base_utils_udatepg_cleanup
+* @description         Called after each test. Destroy the created i18n_unumber_format_h handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_unumber_cleanup(void)
+{
+       i18n_unumber_destroy(num_format);
+       if(g_pDefaultTzid != NULL)
+       {
+               free(g_pDefaultTzid);
+               g_pDefaultTzid = NULL;
+       }
+       g_bBaseUtilsInitFlag = false;
+}
+
+bool AreSame(double a, double b){
+       double epsilon = 0.000000001;
+       return fabs(a - b) < epsilon;
+}
+
+/** @addtogroup itc-base-utils-testcases
+*  @brief              Integration testcases for module base-utils ucalendar
+*  @ingroup    itc-base-utils
+*  @{
+*/
+
+//& type: auto
+//& purpose: Creates and Destroy given unumber_format. unumber_format is used for formatting and parsing numbers.
+/**
+* @testcase                            ITc_i18n_unumber_create_destroy_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            - Creates and return a new unumber_format for formatting and parsing numbers.
+* @apicovered                  i18n_unumber_create, i18n_unumber_destroy
+* @passcase                            When i18n_unumber_create, i18n_unumber_destroy is successful.
+* @failcase                            If target i18n_unumber_create, i18n_unumber_destroy api fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_create_destroy_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszUnumberCreateDestroyMemLog = NULL;
+       char *pszUnumberCreateSpeedLog = NULL;
+       char *pszUnumberDestroySpeedLog = NULL;
+       int nUnumberCreateFailCount = 0;
+       int nUnumberDestroyFailCount = 0;
+       i18n_unumber_format_style_e eUnumberFormatStyle[] = {   I18N_UNUMBER_PATTERN_DECIMAL,
+                                                                                       I18N_UNUMBER_DECIMAL,
+                                                                                       I18N_UNUMBER_CURRENCY,
+                                                                                       I18N_UNUMBER_PERCENT,
+                                                                                       I18N_UNUMBER_SCIENTIFIC,
+                                                                                       I18N_UNUMBER_SPELLOUT,
+                                                                                       I18N_UNUMBER_ORDINAL,
+                                                                                       I18N_UNUMBER_DURATION,
+                                                                                       I18N_UNUMBER_NUMBERING_SYSTEM,
+                                                                                       I18N_UNUMBER_PATTERN_RULEBASED,
+                                                                                       /*I18N_UNUMBER_CURRENCY_ISO,
+                                                                                       I18N_UNUMBER_CURRENCY_PLURAL,
+                                                                                       I18N_UNUMBER_FORMAT_STYLE_COUNT,*/
+                                                                                       I18N_UNUMBER_DEFAULT};
+       int nEnumSize = sizeof(eUnumberFormatStyle) / sizeof(eUnumberFormatStyle[0]);
+       int nEnumCounter = 0;
+#if MEMORY_CHECK
+       pszUnumberCreateDestroyMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUnumberCreateSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       pszUnumberDestroySpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       i18n_unumber_format_h unumber_format = NULL;
+                       FPRINTF("\\n[Line : %d][%s] Executing i18n_unumber_create with Format Style = %s and default Locale=%s on iteration %d, \n", __LINE__, API_NAMESPACE, UnumberGetFormatStyle(eUnumberFormatStyle[nEnumCounter]), g_pszDefaultLocale, nLoopCount);
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_unumber_create(eUnumberFormatStyle[nEnumCounter], g_pDefaultTzid, g_nLengthDefaultTimeZone, g_pszDefaultLocale, NULL, &unumber_format);
+                       BaseUtilsGetExecutionDelay(pszUnumberCreateSpeedLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_unumber_create",nUnumberCreateFailCount);
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_unumber_destroy(unumber_format);
+                       BaseUtilsGetExecutionDelay(pszUnumberDestroySpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszUnumberCreateDestroyMemLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_unumber_destroy",nUnumberDestroyFailCount);
+               }
+       }
+       VALIDATE_RESULT_PAIRAPI(nUnumberCreateFailCount, nUnumberDestroyFailCount, "i18n_unumber_create", "i18n_unumber_destroy", pszUnumberCreateDestroyMemLog, pszUnumberCreateSpeedLog, pszUnumberDestroySpeedLog, MAX_COUNT*nEnumSize);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_unumber_create", pszUnumberCreateSpeedLog);
+               PRINT_SPEED_LOG("i18n_unumber_destroy", pszUnumberDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_unumber_create_destroy", pszUnumberCreateDestroyMemLog);
+#endif
+       FREE_MEMORY(pszUnumberCreateDestroyMemLog, pszUnumberCreateSpeedLog, pszUnumberDestroySpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets the pattern used by an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_apply_pattern_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Sets the pattern used by an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_apply_pattern
+* @passcase                            When i18n_unumber_apply_pattern is successful
+* @failcase                            When i18n_unumber_apply_pattern failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_apply_pattern_p(void)
+{
+       START_TEST;
+
+       i18n_uchar szPattern[8] = {'#', ',', '#', '#', ',', '#', '#', '#'};
+       int nLength = 8;
+       int nRetVal = I18N_ERROR_NONE;
+
+       nRetVal = i18n_unumber_apply_pattern(num_format, true, szPattern, nLength, NULL);
+       PRINT_RESULT(nRetVal, "i18n_unumber_apply_pattern");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates a copy of an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Creates a copy of an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_clone
+* @passcase                            When i18n_unumber_clone is successful
+* @failcase                            When i18n_unumber_clone failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_clone_p(void)
+{
+       START_TEST;
+
+       i18n_unumber_format_h num_format_clone;
+       int nRetVal = I18N_ERROR_NONE;
+
+       nRetVal = i18n_unumber_clone(num_format, &num_format_clone);
+       PRINT_RESULT(nRetVal, "i18n_unumber_clone");
+
+       i18n_unumber_destroy(num_format_clone);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Determines how many locales have decimal formatting patterns available.
+/**
+* @testcase                            ITc_i18n_unumber_count_available_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Determines how many locales have decimal formatting patterns available.
+* @apicovered                  i18n_unumber_count_available
+* @passcase                            When i18n_unumber_count_available is successful
+* @failcase                            When i18n_unumber_count_available failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_count_available_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1;
+
+       nRetVal = i18n_unumber_count_available();
+       if(nRetVal == -1)
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_count_available failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Formats a decimal number using an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_format_decimal_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Formats a decimal number using an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_format_decimal
+* @passcase                            When i18n_unumber_format_decimal is successful
+* @failcase                            When i18n_unumber_format_decimal failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_format_decimal_p(void)
+{
+       START_TEST;
+
+       i18n_uchar szResult[I18N_UNUMBER_SYMBOL_CAPACITY] = {0,};
+       int nResultCapacity = I18N_UNUMBER_SYMBOL_CAPACITY;
+       int nBufSize = -1;
+
+       nBufSize = i18n_unumber_format_decimal(num_format, "2014.0", 5, szResult, nResultCapacity, NULL);
+       if(nBufSize == -1 || i18n_ustring_get_length(szResult) <= 0)
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_format_decimal failed.\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Formats a double using an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_format_double_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Formats a double using an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_format_double
+* @passcase                            When i18n_unumber_format_double is successful
+* @failcase                            When i18n_unumber_format_double failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_format_double_p(void)
+{
+       START_TEST;
+
+       i18n_uchar szResult[I18N_UNUMBER_SYMBOL_CAPACITY] = {0,};
+       int nResultCapacity = I18N_UNUMBER_SYMBOL_CAPACITY;
+       int nBufSize = -1;
+
+       nBufSize = i18n_unumber_format_double(num_format, 2014.0, szResult, nResultCapacity, NULL);
+       if(nBufSize == -1 || i18n_ustring_get_length(szResult) <= 0)
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_format_double failed.\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Formats a double currency amount using an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_format_double_currency_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Formats a double currency amount using an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_format_double_currency
+* @passcase                            When i18n_unumber_format_double_currency is successful
+* @failcase                            When i18n_unumber_format_double_currency failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_format_double_currency_p(void)
+{
+       START_TEST;
+
+       i18n_uchar szResult[I18N_UNUMBER_SYMBOL_CAPACITY] = {0,};
+       int nResultCapacity = I18N_UNUMBER_SYMBOL_CAPACITY;
+       char *pCurrency = "KRW";
+       i18n_uchar *pCurrencyTemp = NULL;
+       pCurrencyTemp = (i18n_uchar*)calloc(strlen(pCurrency) + 1, sizeof(i18n_uchar));
+       i18n_ustring_copy_ua(pCurrencyTemp, pCurrency);
+       int nBufSize = -1;
+
+       nBufSize = i18n_unumber_format_double_currency(num_format, 2014.0, pCurrencyTemp, szResult, nResultCapacity, NULL);
+       if(nBufSize == -1 || i18n_ustring_get_length(szResult) <= 0)
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_format_double_currency failed.\\n", __LINE__, API_NAMESPACE);
+               free(pCurrencyTemp);
+               return 1;
+       }
+       free(pCurrencyTemp);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Formats an int64 using an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_format_int64_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Formats an int64 using an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_format_int64
+* @passcase                            When i18n_unumber_format_int64 is successful
+* @failcase                            When i18n_unumber_format_int64 failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_format_int64_p(void)
+{
+       START_TEST;
+
+       i18n_uchar szResult[I18N_UNUMBER_SYMBOL_CAPACITY] = {0,};
+       int nResultCapacity = I18N_UNUMBER_SYMBOL_CAPACITY;
+       int nBufSize = -1;
+
+       nBufSize = i18n_unumber_format_int64(num_format, 1994, szResult, nResultCapacity, NULL);
+       if(nBufSize == -1 || i18n_ustring_get_length(szResult) <= 0)
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_format_int64 failed.\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set/Gets a numeric attribute associated with an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_set_get_attribute_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Set a numeric attribute associated with an i18n_unumber_format_h.\n
+*                                              Gets a numeric attribute associated with an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_set_attribute, i18n_unumber_get_attribute
+* @passcase                            When i18n_unumber_set_attribute and i18n_unumber_get_attribute are successful
+* @failcase                            When i18n_unumber_set_attribute or i18n_unumber_get_attribute failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_set_get_attribute_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1;
+       int nGetAttr = -1;
+       i18n_unumber_format_attribute_e eUnumberFormatAttr[] = {I18N_UNUMBER_PARSE_INT_ONLY,
+                                                                                                                       I18N_UNUMBER_GROUPING_USED,
+                                                                                                                       I18N_UNUMBER_MAX_INTEGER_DIGITS,
+                                                                                                                       I18N_UNUMBER_MIN_INTEGER_DIGITS,
+                                                                                                                       I18N_UNUMBER_INTEGER_DIGITS,
+                                                                                                                       I18N_UNUMBER_MAX_FRACTION_DIGITS,
+                                                                                                                       I18N_UNUMBER_MIN_FRACTION_DIGITS,
+                                                                                                                       I18N_UNUMBER_FRACTION_DIGITS,
+                                                                                                                       I18N_UNUMBER_MULTIPLIER,
+                                                                                                                       I18N_UNUMBER_GROUPING_SIZE,
+                                                                                                                       I18N_UNUMBER_ROUNDING_MODE,
+                                                                                                                       I18N_UNUMBER_FORMAT_WIDTH,
+                                                                                                                       I18N_UNUMBER_PADDING_POSITION,
+                                                                                                                       I18N_UNUMBER_SECONDARY_GROUPING_SIZE,
+                                                                                                                       I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN,
+                                                                                                                       I18N_UNUM_SCALE
+                                                                                                                       };
+
+       int nUnumberFormatAttrSize = sizeof(eUnumberFormatAttr)/sizeof(eUnumberFormatAttr[0]);
+       int nIndex ;
+       for(nIndex = 0; nIndex < nUnumberFormatAttrSize; nIndex++)
+       {
+               if(eUnumberFormatAttr[nIndex] == I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN){
+                       nRetVal = i18n_unumber_set_attribute(num_format, eUnumberFormatAttr[nIndex], false); // As per developer request need to pass parameter as bool(true/false) instead of nIndex
+               }else{
+                       nRetVal = i18n_unumber_set_attribute(num_format, eUnumberFormatAttr[nIndex], nIndex);
+               }
+
+               if(nRetVal != I18N_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][%s]i18n_unumber_set_attribute failed for %s. Returned value = %s\\n", __LINE__, API_NAMESPACE, UnumberGetFormatAttr(eUnumberFormatAttr[nIndex]), BaseUtilsGetError(nRetVal));
+                       return 1;
+               }
+
+               nGetAttr = i18n_unumber_get_attribute(num_format, eUnumberFormatAttr[nIndex]);
+
+               nRetVal = get_last_result();
+               if(nRetVal != I18N_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][%s]i18n_unumber_get_attribute failed for %s. Returned value = %s\\n", __LINE__, API_NAMESPACE, UnumberGetFormatAttr(eUnumberFormatAttr[nIndex]), BaseUtilsGetError(nRetVal));
+                       return 1;
+               }
+
+               if(eUnumberFormatAttr[nIndex] == I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN ){
+                       if(nGetAttr != false ){
+                               FPRINTF("[Line : %d][%s]i18n_unumber_get_attribute failed for %s. Returned value not equal for I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN \\n", __LINE__, API_NAMESPACE, UnumberGetFormatAttr(eUnumberFormatAttr[nIndex]));
+                               return 1;
+                       }
+
+               }else {
+                       if(nGetAttr != nIndex ){
+                               FPRINTF("[Line : %d][%s]i18n_unumber_get_attribute failed for %s. Returned value not equal to set attribute\\n", __LINE__, API_NAMESPACE, UnumberGetFormatAttr(eUnumberFormatAttr[nIndex]));
+                               return 1;
+                       }
+
+               }
+               FPRINTF("[Line : %d][%s]i18n_unumber_set_attribute and i18n_unumber_get_attribute passed for %s.\\n", __LINE__, API_NAMESPACE, UnumberGetFormatAttr(eUnumberFormatAttr[nIndex]));
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets a locale for which decimal formatting patterns are available.
+/**
+* @testcase                            ITc_i18n_unumber_get_available_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets a locale for which decimal formatting patterns are available.
+* @apicovered                  i18n_unumber_get_available
+* @passcase                            When i18n_unumber_get_available is successful
+* @failcase                            When i18n_unumber_get_available failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_get_available_p(void)
+{
+       START_TEST;
+
+       const char *pRetVal = NULL;
+
+       pRetVal = i18n_unumber_get_available(0);
+       if(pRetVal == NULL)
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_get_available failed. Returned value is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set/Gets a numeric attribute associated with an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_set_get_double_attribute_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Set a numeric attribute associated with an i18n_unumber_format_h.\n
+*                                              Gets a numeric attribute associated with an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_set_double_attribute, i18n_unumber_get_double_attribute
+* @passcase                            When i18n_unumber_set_double_attribute and i18n_unumber_get_double_attribute are successful
+* @failcase                            When i18n_unumber_set_double_attribute or i18n_unumber_get_double_attribute failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_set_get_double_attribute_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1;
+       double dGetAttr = -1;
+       i18n_unumber_format_attribute_e eUnumberFormatAttr[] = {I18N_UNUMBER_ROUNDING_INCREMENT /*,
+                                                                                                                       I18N_UNUMBER_PARSE_INT_ONLY,
+                                                                                                                       I18N_UNUMBER_GROUPING_USED,
+                                                                                                                       I18N_UNUMBER_DECIMAL_ALWAYS_SHOWN,
+                                                                                                                       I18N_UNUMBER_MAX_INTEGER_DIGITS,
+                                                                                                                       I18N_UNUMBER_MIN_INTEGER_DIGITS,
+                                                                                                                       I18N_UNUMBER_INTEGER_DIGITS,
+                                                                                                                       I18N_UNUMBER_MAX_FRACTION_DIGITS,
+                                                                                                                       I18N_UNUMBER_MIN_FRACTION_DIGITS,
+                                                                                                                       I18N_UNUMBER_FRACTION_DIGITS,
+                                                                                                                       I18N_UNUMBER_MULTIPLIER,
+                                                                                                                       I18N_UNUMBER_GROUPING_SIZE,
+                                                                                                                       I18N_UNUMBER_ROUNDING_MODE,
+                                                                                                                       I18N_UNUMBER_FORMAT_WIDTH,
+                                                                                                                       I18N_UNUMBER_PADDING_POSITION,
+                                                                                                                       I18N_UNUMBER_SECONDARY_GROUPING_SIZE,
+                                                                                                                       I18N_UNUMBER_SIGNIFICANT_DIGITS_USED,
+                                                                                                                       I18N_UNUMBER_MIN_SIGNIFICANT_DIGITS,
+                                                                                                                       I18N_UNUMBER_MAX_SIGNIFICANT_DIGITS,
+                                                                                                                       I18N_UNUMBER_LENIENT_PARSE,
+                                                                                                                       I18N_UNUM_SCALE,
+                                                                                                                       I18N_UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS,
+                                                                                                                       I18N_UNUM_PARSE_NO_EXPONENT*/}; // As suggested by developers
+
+       int nUnumberFormatAttrSize = sizeof(eUnumberFormatAttr)/sizeof(eUnumberFormatAttr[0]);
+       int nIndex ;
+       double dVar;
+       for(nIndex = 0; nIndex < nUnumberFormatAttrSize; nIndex++)
+       {
+               dVar = (double)nIndex+1.1;
+               nRetVal = i18n_unumber_set_double_attribute(num_format, eUnumberFormatAttr[nIndex], dVar);
+               if(nRetVal != I18N_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][%s]i18n_unumber_set_double_attribute failed for %s. Returned value = %s\\n", __LINE__, API_NAMESPACE, UnumberGetFormatAttr(eUnumberFormatAttr[nIndex]), BaseUtilsGetError(nRetVal));
+                       return 1;
+               }
+
+               dGetAttr = i18n_unumber_get_double_attribute(num_format, eUnumberFormatAttr[nIndex]);
+
+               nRetVal = get_last_result();
+               if(nRetVal != I18N_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][%s]i18n_unumber_get_double_attribute failed for %s. Returned value = %s\\n", __LINE__, API_NAMESPACE, UnumberGetFormatAttr(eUnumberFormatAttr[nIndex]), BaseUtilsGetError(nRetVal));
+                       return 1;
+               }
+
+               if(!AreSame(dGetAttr, dVar))
+               {
+                       FPRINTF("[Line : %d][%s]i18n_unumber_get_double_attribute failed for %s. Returned value not matched with set value\\n", __LINE__, API_NAMESPACE, UnumberGetFormatAttr(eUnumberFormatAttr[nIndex]));
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s]i18n_unumber_set_double_attribute and i18n_unumber_get_double_attribute passed for %s.\\n", __LINE__, API_NAMESPACE, UnumberGetFormatAttr(eUnumberFormatAttr[nIndex]));
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the locale for this number format object
+/**
+* @testcase                            ITc_i18n_unumber_get_locale_by_type_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Gets the locale for this number format object.
+* @apicovered                  i18n_unumber_get_locale_by_type
+* @passcase                            When i18n_unumber_get_locale_by_type is successful
+* @failcase                            When i18n_unumber_get_locale_by_type failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_get_locale_by_type_p(void)
+{
+       START_TEST;
+
+       const char *pRet = NULL;
+
+       pRet = i18n_unumber_get_locale_by_type(num_format, I18N_ULOCALE_DATA_LOCALE_TYPE_VALID_LOCALE);
+       if(pRet == NULL)
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_get_locale_by_type failed. Returned value is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set/Gets a text attribute associated with an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_set_get_text_attribute_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Set a text attribute associated with an i18n_unumber_format_h.\n
+*                                              Gets a text attribute associated with an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_set_text_attribute, i18n_unumber_get_text_attribute
+* @passcase                            When i18n_unumber_set_text_attribute and i18n_unumber_get_text_attribute are successful
+* @failcase                            When i18n_unumber_set_text_attribute or i18n_unumber_get_text_attribute failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_set_get_text_attribute_p(void)
+{
+       START_TEST;
+
+       i18n_uchar szResult[I18N_UNUMBER_SYMBOL_CAPACITY] = {0,};
+       int nResultCapacity = I18N_UNUMBER_SYMBOL_CAPACITY;
+       int nRetVal = -1;
+       i18n_uchar szNewValue[I18N_UNUMBER_SYMBOL_CAPACITY] = {0,};
+       i18n_unumber_format_text_attribute_e eFormatTextAttr[] = {
+               I18N_UNUMBER_POSITIVE_PREFIX,
+               I18N_UNUMBER_POSITIVE_SUFFIX,
+               I18N_UNUMBER_NEGATIVE_PREFIX,
+               I18N_UNUMBER_NEGATIVE_SUFFIX,
+               I18N_UNUMBER_PADDING_CHARACTER,
+               I18N_UNUMBER_CURRENCY_CODE,
+               /*I18N_UNUMBER_DEFAULT_RULESET,
+               I18N_UNUMBER_PUBLIC_RULESETS*/};
+
+       int nFormatTextSize = sizeof(eFormatTextAttr)/sizeof(eFormatTextAttr[0]);
+       int nIndex;
+       int nBufSize =-1;
+       for(nIndex = 0; nIndex < nFormatTextSize; nIndex++)
+       {
+               nRetVal = i18n_unumber_set_text_attribute(num_format, eFormatTextAttr[nIndex], szNewValue, 8);
+               if(nRetVal != I18N_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][%s]i18n_unumber_set_text_attribute failed for %s. Error Returned = %s.\\n", __LINE__, API_NAMESPACE, UnumberGetFormatTextAttr(eFormatTextAttr[nIndex]), BaseUtilsGetError(nRetVal));
+                       return 1;
+               }
+
+               nBufSize = i18n_unumber_get_text_attribute(num_format, eFormatTextAttr[nIndex], szResult, nResultCapacity);
+               if(nBufSize == -1 || i18n_ustring_get_length(szResult) < 0)
+               {
+                       FPRINTF("[Line : %d][%s]i18n_unumber_get_text_attribute failed for %s.\\n", __LINE__, API_NAMESPACE, UnumberGetFormatTextAttr(eFormatTextAttr[nIndex]));
+                       return 1;
+               }
+               nRetVal = get_last_result();
+               if(nRetVal != I18N_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][%s]i18n_unumber_get_text_attribute failed for %s.\\n", __LINE__, API_NAMESPACE, UnumberGetFormatTextAttr(eFormatTextAttr[nIndex]));
+                       return 1;
+               }
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Parses a string into an integer using an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_parse_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Parses a string into an integer using an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_parse
+* @passcase                            When i18n_unumber_parse is successful
+* @failcase                            When i18n_unumber_parse failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_parse_p(void)
+{
+       START_TEST;
+
+       i18n_uchar *pText = NULL;
+       char *pTextSample = "232310";
+       pText = (i18n_uchar*)calloc(strlen(pTextSample) + 1, sizeof(i18n_uchar));
+       i18n_ustring_copy_ua(pText, pTextSample);
+       int nValue = -1;
+
+       nValue = i18n_unumber_parse(num_format, pText, 16, NULL);
+       if(nValue == -1)
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_parse failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               free(pText);
+               return 1;
+       }
+       free(pText);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Parses a number from a string into an unformatted numeric string using an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_parse_decimal_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Parses a number from a string into an unformatted numeric string using an #i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_parse_decimal
+* @passcase                            When i18n_unumber_parse_decimal is successful
+* @failcase                            When i18n_unumber_parse_decimal failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_parse_decimal_p(void)
+{
+       START_TEST;
+
+       char szResult[I18N_UNUMBER_SYMBOL_CAPACITY] = {0,};
+       int nResultCapacity = I18N_UNUMBER_SYMBOL_CAPACITY;
+       i18n_uchar *pText = NULL;
+       char *pTextSample = "12345678.1234";
+       pText = (i18n_uchar*)calloc(strlen(pTextSample) + 1, sizeof(i18n_uchar));
+       i18n_ustring_copy_ua(pText, pTextSample);
+       int nLength = -1;
+
+       nLength = i18n_unumber_parse_decimal(num_format, pText, 16, NULL, szResult, nResultCapacity);
+       if(nLength == -1 )
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_parse_decimal failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               free(pText);
+               return 1;
+       }
+       free(pText);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Parses a string into a double using an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_parse_double_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Parses a string into a double using an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_parse_double
+* @passcase                            When i18n_unumber_parse_double is successful
+* @failcase                            When i18n_unumber_parse_double failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_parse_double_p(void)
+{
+       START_TEST;
+
+       i18n_uchar parse_double[]= { 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33,
+                                                               0x32, 0x31, 0x30, 0x2E, 0x31, 0x32, 0x33, 0 };
+       int nValue = -1;
+
+       nValue = i18n_unumber_parse_double(num_format, parse_double, 16, NULL);
+       if(nValue == -1)
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_parse_double failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Parses a string into a double and a currency using an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_parse_double_currency_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Parses a string into a double and a currency using an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_parse_double_currency
+* @passcase                            When i18n_unumber_parse_double_currency is successful
+* @failcase                            When i18n_unumber_parse_double_currency failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_parse_double_currency_p(void)
+{
+       START_TEST;
+
+       i18n_uchar szCurrency[I18N_UNUMBER_SYMBOL_CAPACITY] = {0,};
+       i18n_uchar szText[] = {0x0024,0x0031,0x0032,0x002E,0x0030,0x0030,0};
+       double dRet = -1;
+
+       dRet = i18n_unumber_parse_double_currency(num_format, szText, 16, NULL, szCurrency);
+       FPRINTF("[Line : %d][%s]i18n_unumber_parse_double_currency returned value = %lf\\n", __LINE__, API_NAMESPACE, dRet);
+       if(AreSame(dRet, (double)-1))
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_parse_double_currency failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Parses a string into an int64 using an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_parse_int64_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Parses a string into an int64 using an i18n_unumber_format_h.\n
+* @apicovered                  i18n_unumber_parse_int64
+* @passcase                            When i18n_unumber_parse_int64 is successful
+* @failcase                            When i18n_unumber_parse_int64 failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_parse_int64_p(void)
+{
+       START_TEST;
+
+       i18n_uchar *pText = NULL;
+       char *pTextSample = "0982523554243";
+       pText = (i18n_uchar*)calloc(strlen(pTextSample) + 1, sizeof(i18n_uchar));
+       i18n_ustring_copy_ua(pText, pTextSample);
+       int nValue = -1;
+
+       nValue = i18n_unumber_parse_int64(num_format, pText, 16, NULL);
+       if(nValue == -1)
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_parse_int64 failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               free(pText);
+               return 1;
+       }
+       free(pText);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Extracts the pattern from an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_to_pattern_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Extracts the pattern from an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_to_pattern
+* @passcase                            When i18n_unumber_to_pattern is successful
+* @failcase                            When i18n_unumber_to_pattern failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_to_pattern_p(void)
+{
+       START_TEST;
+
+       i18n_uchar szResult[I18N_UNUMBER_SYMBOL_CAPACITY] = {0,};
+       int nResultCapacity = I18N_UNUMBER_SYMBOL_CAPACITY;
+       int nBufSize = -1;
+
+       nBufSize = i18n_unumber_to_pattern(num_format, 0, szResult, nResultCapacity);
+       if(nBufSize == -1)
+       {
+               FPRINTF("[Line : %d][%s]i18n_unumber_to_pattern failed. Returned value is = -1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets/Gets a symbol associated with an i18n_unumber_format_h.
+/**
+* @testcase                            ITc_i18n_unumber_set_get_symbol_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Sets/Gets symbol associated with an i18n_unumber_format_h.
+* @apicovered                  i18n_unumber_set_symbol, i18n_unumber_get_symbol
+* @passcase                            When i18n_unumber_set_symbol and i18n_unumber_get_symbol are successful
+* @failcase                            When i18n_unumber_set_symbol or i18n_unumber_get_symbol failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unumber_set_get_symbol_p(void)
+{
+       START_TEST;
+
+       i18n_uchar szResult[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szResult, "XYZ", strlen("XYZ"));
+
+       i18n_uchar szResultTemp[I18N_UCHAR_CAPACITY] = {0,};
+       int nLength = i18n_ustring_get_length(szResult);
+       int nRetVal = -1;
+       i18n_unumber_format_symbol_e eUnumberFormatSymbol[] = { I18N_UNUMBER_DECIMAL_SEPARATOR_SYMBOL,
+                                                                                                                       I18N_UNUMBER_GROUPING_SEPARATOR_SYMBOL,
+                                                                                                                       I18N_UNUMBER_PATTERN_SEPARATOR_SYMBOL,
+                                                                                                                       I18N_UNUMBER_ZERO_DIGIT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_PERCENT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_DIGIT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_MINUS_SIGN_SYMBOL,
+                                                                                                                       I18N_UNUMBER_PLUS_SIGN_SYMBOL,
+                                                                                                                       I18N_UNUMBER_CURRENCY_SYMBOL,
+                                                                                                                       I18N_UNUMBER_INTL_CURRENCY_SYMBOL,
+                                                                                                                       I18N_UNUMBER_MONETARY_SEPARATOR_SYMBOL,
+                                                                                                                       I18N_UNUMBER_EXPONENTIAL_SYMBOL,
+                                                                                                                       I18N_UNUMBER_PERMILL_SYMBOL,
+                                                                                                                       I18N_UNUMBER_PAD_ESCAPE_SYMBOL,
+                                                                                                                       I18N_UNUMBER_INFINITY_SYMBOL,
+                                                                                                                       I18N_UNUMBER_NAN_SYMBOL,
+                                                                                                                       I18N_UNUMBER_SIGNIFICANT_DIGIT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_MONETARY_GROUPING_SEPARATOR_SYMBOL,
+                                                                                                                       I18N_UNUMBER_ONE_DIGIT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_TWO_DIGIT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_THREE_DIGIT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_FOUR_DIGIT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_FIVE_DIGIT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_SIX_DIGIT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_SEVEN_DIGIT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_EIGHT_DIGIT_SYMBOL,
+                                                                                                                       I18N_UNUMBER_NINE_DIGIT_SYMBOL,
+                                                                                                                       /*I18N_UNUMBER_FORMAT_SYMBOL_COUNT*/ // As requested by developer 22-05-2015
+                                                                                                                       };
+
+       int nUnumberFormatSymbolSize = sizeof(eUnumberFormatSymbol)/sizeof(eUnumberFormatSymbol[0]);
+       int nIndex = 0;
+       int nBufLen;
+       for(nIndex = 0; nIndex < nUnumberFormatSymbolSize; nIndex++)
+       {
+               nRetVal = i18n_unumber_set_symbol(num_format, eUnumberFormatSymbol[nIndex], szResult, -1);
+               if(nRetVal != I18N_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][%s]i18n_unumber_set_symbol failed for %s. Returned value is = %s\\n", __LINE__, API_NAMESPACE, UnumberGetFormatSymbol(eUnumberFormatSymbol[nIndex]), BaseUtilsGetError(nRetVal));
+                       return 1;
+               }
+
+               nRetVal = i18n_unumber_get_symbol(num_format, eUnumberFormatSymbol[nIndex], szResultTemp, I18N_UCHAR_CAPACITY, &nBufLen);
+               if(nRetVal != I18N_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][%s]i18n_unumber_get_symbol failed for %s. Returned value is = %s\\n", __LINE__, API_NAMESPACE, UnumberGetFormatSymbol(eUnumberFormatSymbol[nIndex]), BaseUtilsGetError(nRetVal));
+                       return 1;
+               }
+               if(i18n_ustring_compare_n(szResult, szResultTemp, nLength) != 0)
+               {
+                       FPRINTF("[Line : %d][%s]Set and Get value mismatched.\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+       }
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/base-utils/ITs-base-utils-uset.c b/src/itc/base-utils/ITs-base-utils-uset.c
new file mode 100755 (executable)
index 0000000..88aef00
--- /dev/null
@@ -0,0 +1,1697 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-base-utils-common.h"
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+static i18n_uset_h uset = NULL;
+static i18n_uchar32 start = 0x41;
+static i18n_uchar32 end = 0x50;
+
+//& set: BaseUtils
+
+/**
+* @function            ITs_base_utils_uset_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_uset_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       int nRetVal = i18n_uset_create(start, end, &uset);
+       if( nRetVal == I18N_ERROR_NONE)
+       {
+               g_bBaseUtilsInitFlag = true;
+       }
+       return;
+}
+
+/**
+* @function            ITs_base_utils_uset_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_uset_cleanup(void)
+{
+       int nRetVal = i18n_uset_destroy(uset);
+       if( nRetVal == I18N_ERROR_NONE)
+       {
+               g_bBaseUtilsInitFlag = false;
+       }
+       return;
+}
+
+/** @addtogroup itc-base-utils-testcases
+*  @brief              Integration testcases for module base-utils ucalendar
+*  @ingroup    itc-base-utils
+*  @{
+*/
+
+//& purpose: Creates an empty #i18n_uset_h object
+/**
+* @testcase                    ITc_i18n_uset_create_empty_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Creates an empty #i18n_uset_h object.
+* @scenario                            Creates an empty #i18n_uset_h object.\n
+*                                              Disposes an empty #i18n_uset_h object.
+* @apicovered                  ITc_i18n_uset_create_empty_p, i18n_uset_destroy
+* @passcase                            When ITc_i18n_uset_create_empty_p is successful.
+* @failcase                            If target ITc_i18n_uset_create_empty_p fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_create_empty_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset = NULL;
+
+       //Target Api
+       int nRetVal = i18n_uset_create_empty(&uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_create_empty");
+
+       nRetVal = i18n_uset_destroy(uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+//& purpose: Creates and destroys an #i18n_uset_h object that contains the range of characters
+/**
+* @testcase                    ITc_i18n_uset_create_destroy_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Creates and destroys an #i18n_uset_h object that contains the range of characters
+* @scenario                            Creates an #i18n_uset_h object that contains the range of characters\n
+*                                              Disposes an #i18n_uset_h object that contains the range of characters
+* @apicovered                  i18n_uset_create, i18n_uset_destroy
+* @passcase                            When i18n_uset_create & i18n_uset_destroy is successful.
+* @failcase                            If target i18n_uset_create & i18n_uset_destroy fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_create_destroy_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset = NULL;
+
+       //Target Api
+       int nRetVal = i18n_uset_create(start, end, &uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_create");
+
+       nRetVal = i18n_uset_destroy(uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+//& purpose: Creates a set based on a given pattern
+/**
+* @testcase                    ITc_i18n_uset_create_pattern_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Creates a set based on a given pattern.
+* @scenario                            Creates a set based on a given pattern.\n
+*                                              Disposes a set based on a given pattern.
+* @apicovered                  i18n_uset_create_pattern
+* @passcase                            When i18n_uset_create_pattern is successful.
+* @failcase                            If target i18n_uset_create_pattern fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_create_pattern_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset = NULL;
+       char *pattern = "[:Hyphen:]";
+       i18n_uchar *_pattern = NULL;
+
+       _pattern = (i18n_uchar*) calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+       i18n_uchar *pRet = i18n_ustring_copy_ua(_pattern, pattern);
+       int32_t nSourceLength = i18n_ustring_get_length(_pattern);
+       if(pRet == NULL || nSourceLength <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       //Target Api
+       int nRetVal = i18n_uset_create_pattern(_pattern, nSourceLength, &uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_create_pattern");
+
+       nRetVal = i18n_uset_destroy(uset);
+       PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal,"i18n_uset_destroy", BaseUtilsGetError(nRetVal), FREE_MEMORY1(_pattern));
+
+       FREE_MEMORY1(_pattern);
+
+       return 0;
+}
+
+//& purpose: Creates a set based on a given pattern
+/**
+* @testcase                    ITc_i18n_uset_create_pattern_options_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Creates a set based on a given pattern.
+* @scenario                            Creates a set based on a given pattern.\n
+*                                              Disposes a set based on a given pattern.
+* @apicovered                  i18n_uset_create_pattern_options
+* @passcase                            When i18n_uset_create_pattern_options is successful.
+* @failcase                            If target i18n_uset_create_pattern_options fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_create_pattern_options_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset = NULL;
+       char *pattern = "[:Hyphen:]";
+       i18n_uchar *_pattern = NULL;
+       int nRetVal = -1;
+
+       _pattern = (i18n_uchar*) calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+       i18n_uchar *pRet = i18n_ustring_copy_ua(_pattern, pattern);
+       int32_t nSourceLength = i18n_ustring_get_length(_pattern);
+       if(pRet == NULL || nSourceLength <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       uint32_t BitmaskType[] = { I18N_USET_IGNORE_SPACE, I18N_USET_CASE_INSENSITIVE};
+       int nEnumSize = sizeof(BitmaskType) / sizeof(BitmaskType[0]);
+       int nEnumCounter = 0;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               //Target Api
+               nRetVal = i18n_uset_create_pattern_options(_pattern, nSourceLength, BitmaskType[nEnumCounter], &uset);
+               PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal,"i18n_uset_create_pattern_options", BaseUtilsGetError(nRetVal), i18n_uset_destroy(uset);FREE_MEMORY1(_pattern));
+       }
+
+       nRetVal = i18n_uset_destroy(uset);
+       PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal,"i18n_uset_destroy", BaseUtilsGetError(nRetVal), FREE_MEMORY1(_pattern));
+
+       FREE_MEMORY1(_pattern);
+
+       return 0;
+}
+
+//& purpose: Returns a copy of this object
+/**
+* @testcase                    ITc_i18n_uset_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns a copy of this object.
+* @scenario                            Returns a copy of this object.\n
+*                                              Disposes the copied object.
+* @apicovered                  i18n_uset_clone, i18n_uset_destroy
+* @passcase                            When i18n_uset_clone is successful.
+* @failcase                            If target i18n_uset_clone fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_clone_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset_c = NULL;
+
+       //Target Api
+       int nRetVal = i18n_uset_clone (uset, &uset_c);
+       PRINT_RESULT(nRetVal, "i18n_uset_clone");
+
+       nRetVal = i18n_uset_destroy(uset_c);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+//& purpose: Freezes the set (make it immutable).
+/**
+* @testcase                    ITc_i18n_uset_freeze_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Freezes the set (make it immutable).
+* @scenario                            Freezes the set.
+* @apicovered                  i18n_uset_freeze
+* @passcase                            When i18n_uset_freeze is successful.
+* @failcase                            If target i18n_uset_freeze fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_freeze_p(void)
+{
+       START_TEST;
+
+       //Target Api
+       int nRetVal = i18n_uset_freeze(uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_freeze");
+
+       return 0;
+}
+
+//& purpose:Determines whether the set has been frozen (made immutable) or not.
+/**
+* @testcase                    ITc_i18n_uset_is_frozen_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Determines whether the set has been frozen (made immutable) or not.
+* @scenario                            Freezes the set.\n
+*                                              Determines whether the set has been frozen or not.
+* @apicovered                  i18n_uset_is_frozen, i18n_uset_freeze
+* @passcase                            When i18n_uset_is_frozen is successful.
+* @failcase                            If target i18n_uset_is_frozen fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_is_frozen_p(void)
+{
+       START_TEST;
+
+       int nRetVal = i18n_uset_freeze(uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_freeze");
+
+       //Target Api
+       i18n_uset_is_frozen (uset);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+//& purpose: Clones the set and make the clone mutable.
+/**
+* @testcase                    ITc_i18n_uset_clone_as_thawed_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Clones the set and make the clone mutable.
+* @scenario                            Freezes the set.\n
+*                                              Clones the set and make the clone mutable.\n
+*                                              Disposes the cloned set.
+* @apicovered                  i18n_ustring_to_title, i18n_uset_freeze, i18n_uset_destroy
+* @passcase                            When i18n_uset_clone_as_thawed is successful.
+* @failcase                            If target i18n_uset_clone_as_thawed fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_clone_as_thawed_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset_c = NULL;
+
+       int nRetVal = i18n_uset_freeze(uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_freeze");
+
+       //Target Api
+       nRetVal = i18n_uset_clone_as_thawed(uset, &uset_c);
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       nRetVal = i18n_uset_destroy(uset_c);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Causes the #i18n_uset_h object to represent the range <code>start - end</code>.
+/**
+* @testcase                    ITc_i18n_uset_set_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Causes the #i18n_uset_h object to represent the range <code>start - end</code>.
+* @scenario                            Creates the empty set.\n
+*                                                      Set the empty set to represent the range <code>start - end</code>.\n
+*                                              Disposes the set.
+* @apicovered                  i18n_uset_set, i18n_uset_create_empty, i18n_uset_destroy
+* @passcase                            When i18n_uset_set is successful.
+* @failcase                            If target i18n_uset_set fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_set_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset1 = NULL;
+
+       int nRetVal = i18n_uset_create_empty(&uset1);
+       PRINT_RESULT(nRetVal, "i18n_uset_create_empty");
+
+       //Target Api
+       nRetVal = i18n_uset_set(uset1, start, end);
+       PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal,"i18n_uset_set", BaseUtilsGetError(nRetVal), i18n_uset_destroy(uset));
+
+       nRetVal = i18n_uset_destroy(uset1);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Modifies the set to represent the set specified by the given
+/**
+* @testcase                    ITc_i18n_uset_apply_pattern_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Modifies the set to represent the set specified by the given.
+* @scenario                            Modifies the set to represent the set specified by the given
+* @apicovered                  i18n_uset_set, i18n_uset_create_empty, i18n_uset_destroy
+* @passcase                            When i18n_uset_set is successful.
+* @failcase                            If target i18n_uset_set fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_apply_pattern_p(void)
+{
+       START_TEST;
+       const char *pattern = "[:Hyphen:]";
+       i18n_uchar *upattern = NULL;
+
+       upattern = (i18n_uchar*) calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+       i18n_uchar *pRet = i18n_ustring_copy_ua(upattern, pattern);
+       int32_t upattern_length = i18n_ustring_get_length(upattern);
+       if(pRet == NULL || upattern_length <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       uint32_t BitmaskType[] = { I18N_USET_IGNORE_SPACE, I18N_USET_CASE_INSENSITIVE};
+       int nEnumSize = sizeof(BitmaskType) / sizeof(BitmaskType[0]);
+       int nEnumCounter = 0;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               i18n_uset_apply_pattern(uset, upattern, upattern_length, BitmaskType[nEnumCounter]);
+               int nRetVal = get_last_result();
+               PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal,"get_last_result", BaseUtilsGetError(nRetVal), FREE_MEMORY1(upattern));
+       }
+
+       FREE_MEMORY1(upattern);
+       return 0;
+}
+
+//& purpose: Modifies the set to contain those code points which have the given value
+/**
+* @testcase                    ITc_i18n_uset_apply_int_property_value_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Modifies the set to contain those code points which have the given value.
+* @scenario                            Modifies the set to contain those code points which have the given value.
+* @apicovered                  i18n_uset_apply_int_property_value
+* @passcase                            When i18n_uset_apply_int_property_value is successful.
+* @failcase                            If target i18n_uset_apply_int_property_value fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_apply_int_property_value_p(void)
+{
+       START_TEST;
+       i18n_uchar_uproperty_e prop = I18N_UCHAR_NUMERIC_TYPE;
+       int32_t value = 10;
+
+       //Target Api
+       int nRetVal = i18n_uset_apply_int_property_value(uset, prop, value);
+       PRINT_RESULT(nRetVal, "i18n_uset_apply_int_property_value");
+
+       return 0;
+}
+
+//& purpose: Modifies the set to contain those code points which have the given value for the given property.
+/**
+* @testcase                    ITc_i18n_uset_apply_property_alias_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Modifies the set to contain those code points which have the given value for the given property.
+* @scenario                            Modifies the set to contain those code points which have the given value for the given property.
+* @apicovered                  i18n_uset_apply_property_alias
+* @passcase                            When i18n_uset_apply_property_alias is successful.
+* @failcase                            If target i18n_uset_apply_property_alias fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_apply_property_alias_p(void)
+{
+       START_TEST;
+       const i18n_uchar prop[] = {0x6C, 0x62, 0x0}; /* "lb"*/
+       int32_t prop_length = 3;
+       const i18n_uchar value[] = {0x53, 0x50, 0x0}; /* "SP"*/
+       int32_t value_length = 3;
+
+       //Target Api
+       int nRetVal = i18n_uset_apply_property_alias(uset, prop, prop_length, value, value_length);
+       PRINT_RESULT(nRetVal, "i18n_uset_apply_property_alias");
+
+       return 0;
+}
+
+//& purpose: Resembles the pattern
+/**
+* @testcase                    ITc_i18n_uset_resembles_pattern_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Return true if the given position, in the given pattern, appears to be the start of a UnicodeSet pattern.
+* @scenario                            Resembles the pattern for the given positionand pattern.
+* @apicovered                  i18n_uset_resembles_pattern
+* @passcase                            When i18n_uset_resembles_pattern is successful.
+* @failcase                            If target i18n_uset_resembles_pattern fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_resembles_pattern_p(void)
+{
+       START_TEST;
+       char *pattern = "[:NewPattern:]";
+       i18n_uchar *upattern = NULL;
+       int32_t pos = 0;
+
+       upattern = (i18n_uchar*) calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+       i18n_uchar *pRet = i18n_ustring_copy_ua(upattern, pattern);
+       int32_t upattern_length = i18n_ustring_get_length(upattern);
+       if(pRet == NULL || upattern_length <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       //Target Api
+       i18n_uset_resembles_pattern(upattern, upattern_length, pos);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+//& purpose: Modifies the set to represent the set specified by the given pattern
+/**
+* @testcase                    ITc_i18n_uset_to_pattern_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Modifies the set to represent the set specified by the given pattern.
+* @scenario                            Modifies the set to represent the set specified by the given pattern.
+* @apicovered                  i18n_uset_to_pattern
+* @passcase                            When i18n_uset_to_pattern is successful.
+* @failcase                            If target i18n_uset_to_pattern fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_to_pattern_p(void)
+{
+       START_TEST;
+       i18n_uchar res[12] = {0,};
+       int32_t res_capacity = sizeof(res)/sizeof(res[0]);
+       i18n_ubool escape_unprintable = true;
+
+       //Target api
+       i18n_uset_to_pattern(uset, res, res_capacity, escape_unprintable);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+//& purpose: Adds and Removes the given character to the given #i18n_uset_h.
+/**
+* @testcase                    ITc_i18n_uset_add_remove_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Adds and Removes the given character to the given #i18n_uset_h.
+* @scenario                            Adds the given character to the given #i18n_uset_h.
+*                                              Removes the given character to the given #i18n_uset_h.
+* @apicovered                  i18n_uset_add, i18n_uset_remove
+* @passcase                            When i18n_uset_add & i18n_uset_remove is successful.
+* @failcase                            If target i18n_uset_add & i18n_uset_remove fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_add_remove_p(void)
+{
+       START_TEST;
+       i18n_uchar32 c = 0x61;
+
+       //Target Api
+       int nRetVal = i18n_uset_add(uset, c);
+       PRINT_RESULT(nRetVal, "i18n_uset_add");
+
+       //Target Api
+       nRetVal = i18n_uset_remove(uset, c);
+       PRINT_RESULT(nRetVal, "i18n_uset_remove");
+
+       return 0;
+}
+
+//& purpose: Adds and Removes all of the elements in the specified set to this set if they are not already present.
+/**
+* @testcase                    ITc_i18n_uset_add_remove_all_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Adds and Removes all of the elements in the specified set to this set if they are not already present.
+* @scenario                            Adds all of the elements in the specified set
+*                                              Removes all of the elements in the specified set
+* @apicovered                  i18n_uset_create, i18n_uset_add_all, i18n_uset_remove_all, i18n_uset_destroy
+* @passcase                            When i18n_uset_add_all & i18n_uset_remove_all is successful.
+* @failcase                            If target i18n_uset_add_all & i18n_uset_remove_all fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_add_remove_all_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset_new = NULL;
+       i18n_uchar32 start1 = 0x51;
+       i18n_uchar32 end1 = 0x60;
+
+       int nRetVal = i18n_uset_create(start1, end1, &uset_new);
+       PRINT_RESULT(nRetVal, "i18n_uset_create");
+
+       //Target Api
+       nRetVal = i18n_uset_add_all(uset, uset_new);
+       PRINT_RESULT(nRetVal, "i18n_uset_add_all");
+
+       //Target Api
+       nRetVal = i18n_uset_remove_all(uset, uset_new);
+       PRINT_RESULT(nRetVal, "i18n_uset_remove_all");
+
+       nRetVal = i18n_uset_destroy(uset_new);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+ //& purpose:Adds and Removes the given range of characters to the given #i18n_uset_h.
+/**
+* @testcase                    ITc_i18n_uset_add_remove_range_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Adds and removes the given range of characters to the given #i18n_uset_h.
+* @scenario                            Adds the given range of characters to the given #i18n_uset_h.\n
+*                                              Removes the given range of characters to the given #i18n_uset_h.
+* @apicovered                  i18n_uset_add_range, i18n_uset_remove_range
+* @passcase                            When i18n_uset_add_range, i18n_uset_remove_range is successful.
+* @failcase                            If target i18n_uset_add_range, i18n_uset_remove_range fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_add_remove_range_p(void)
+{
+       START_TEST;
+       i18n_uchar32 start1 = 0x51;
+       i18n_uchar32 end1 = 0x60;
+
+       //Target Api
+       int nRetVal = i18n_uset_add_range(uset, start1, end1);
+       PRINT_RESULT(nRetVal, "i18n_uset_add_range");
+
+       //Target Api
+       nRetVal = i18n_uset_remove_range(uset, start1, end1);
+       PRINT_RESULT(nRetVal, "i18n_uset_remove_range");
+
+       return 0;
+}
+
+ //& purpose: Adds and Removes the given string to the given #i18n_uset_h.
+/**
+* @testcase                    ITc_i18n_uset_add_remove_string_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Adds and Removes the given string to the given #i18n_uset_h.
+* @scenario                            Adds the given string to the given #i18n_uset_h.\n
+*                                              Removes the given string to the given #i18n_uset_h.
+* @apicovered                  i18n_uset_add_string, i18n_uset_remove_string
+* @passcase                            When i18n_uset_add_string & i18n_uset_remove_string is successful.
+* @failcase                            If target i18n_uset_add_string & i18n_uset_remove_string fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_add_remove_string_p(void)
+{
+       START_TEST;
+       const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+       int32_t str_len = i18n_ustring_get_length(str);
+       if(str_len <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       //Target Api
+       int nRetVal = i18n_uset_add_string(uset, str, str_len);
+       PRINT_RESULT(nRetVal, "i18n_uset_add_string");
+
+       //Target Api
+       nRetVal = i18n_uset_remove_string(uset, str, str_len);
+       PRINT_RESULT(nRetVal, "i18n_uset_remove_string");
+
+       return 0;
+}
+
+ //& purpose: Adds each of the characters in this string to the set.
+/**
+* @testcase                    ITc_i18n_uset_add_all_code_points_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Adds each of the characters in this string to the set.
+* @scenario                            Adds each of the characters in this string to the set.
+* @apicovered                  i18n_uset_add_all_code_points
+* @passcase                            When i18n_uset_add_all_code_points is successful.
+* @failcase                            If target i18n_uset_add_all_code_points fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_add_all_code_points_p(void)
+{
+       START_TEST;
+       const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+       int32_t str_len = i18n_ustring_get_length(str);
+       if(str_len <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       //Target Api
+       int nRetVal = i18n_uset_add_all_code_points(uset, str, str_len);
+       PRINT_RESULT(nRetVal, "i18n_uset_add_all_code_points");
+
+       return 0;
+}
+
+ //& purpose: Retains only the elements in this set that are contained in the specified range.
+/**
+* @testcase                    ITc_i18n_uset_retain_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Retains only the elements in this set that are contained in the specified range.
+* @scenario                            Retains only the elements in this set that are contained in the given range.
+* @apicovered                  i18n_uset_retain
+* @passcase                            When i18n_uset_retain is successful.
+* @failcase                            If target i18n_uset_retain fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_retain_p(void)
+{
+       START_TEST;
+       i18n_uchar32 start1 = 0x41;
+       i18n_uchar32 end1 = 0x42;
+
+       //Target Api
+       int nRetVal = i18n_uset_retain(uset, start1, end1);
+       PRINT_RESULT(nRetVal, "i18n_uset_retain");
+
+       return 0;
+}
+
+ //& purpose: Retains only the elements in this set that are contained in the specified set.
+/**
+* @testcase                    ITc_i18n_uset_retain_all_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Retains only the elements in this set that are contained in the specified set.
+* @scenario                            Retains only the elements in this set that are contained in the given set.
+* @apicovered                  i18n_uset_create, i18n_uset_retain_all, i18n_uset_destroy
+* @passcase                            When i18n_uset_retain_all is successful.
+* @failcase                            If target i18n_uset_retain_all fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_retain_all_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset_ret = NULL;
+       i18n_uchar32 start1 = 0x51;
+       i18n_uchar32 end1 = 0x60;
+
+       int nRetVal = i18n_uset_create(start1, end1, &uset_ret);
+       PRINT_RESULT(nRetVal, "i18n_uset_create");
+
+       //Target Api
+       nRetVal = i18n_uset_retain_all(uset, uset_ret);
+       PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal, "i18n_uset_retain_all", BaseUtilsGetError(nRetVal), i18n_uset_destroy(uset_ret));
+
+       nRetVal = i18n_uset_destroy(uset_ret);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+ //& purpose: Compacts the given set.
+/**
+* @testcase                    ITc_i18n_uset_compact_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Reallocates this objects internal structures to take up the least possible space, without changing this object's value.
+* @scenario                            Compacts the given set.
+* @apicovered                  i18n_uset_compact
+* @passcase                            When i18n_uset_compact is successful.
+* @failcase                            If target i18n_uset_compact fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_compact_p(void)
+{
+       START_TEST;
+
+       //Target Api
+       int nRetVal = i18n_uset_compact(uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_compact");
+
+       return 0;
+}
+
+ //& purpose: Inverts the given set.
+/**
+* @testcase                    ITc_i18n_uset_complement_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Inverts this set. This operation modifies this set so that its value is its complement.
+* @scenario                            Complement the given set.
+* @apicovered                  i18n_uset_complement
+* @passcase                            When i18n_uset_complement is successful.
+* @failcase                            If target i18n_uset_complement fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_complement_p(void)
+{
+       START_TEST;
+
+       //Target Api
+       int nRetVal = i18n_uset_complement(uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_complement");
+
+       return 0;
+}
+
+ //& purpose: Complements in this set all elements contained in the specified set.
+/**
+* @testcase                    ITc_i18n_uset_complement_all_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Complements in this set all elements contained in the specified set.
+* @scenario                            Complements the specified set.
+* @apicovered                  i18n_uset_create, i18n_uset_complement_all, i18n_uset_destroy
+* @passcase                            When i18n_uset_complement_all is successful.
+* @failcase                            If target i18n_uset_complement_all fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_complement_all_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset_com = NULL;
+       i18n_uchar32 start1 = 0x51;
+       i18n_uchar32 end1 = 0x60;
+
+       int nRetVal = i18n_uset_create(start1, end1, &uset_com);
+       PRINT_RESULT(nRetVal, "i18n_uset_create");
+
+       //Target Api
+       nRetVal = i18n_uset_complement_all(uset, uset_com);
+       PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal,"i18n_uset_complement_all", BaseUtilsGetError(nRetVal), i18n_uset_destroy(uset_com));
+
+       nRetVal = i18n_uset_destroy(uset_com);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+ //& purpose:Removes all of the elements from this set.
+/**
+* @testcase                    ITc_i18n_uset_clear_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Removes all of the elements from this set.
+* @scenario                            Clears the set.
+* @apicovered                  i18n_uset_clear
+* @passcase                            When i18n_uset_clear is successful.
+* @failcase                            If target i18n_uset_clear fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_clear_p(void)
+{
+       START_TEST;
+
+       //Target Api
+       int nRetVal = i18n_uset_clear(uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_clear");
+
+       return 0;
+}
+
+ //& purpose: Closes this set over the given attribute.
+/**
+* @testcase                    ITc_i18n_uset_destroy_over_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Closes this set over the given attribute.
+* @scenario                            Disposes the set over the given attribute.
+* @apicovered                  i18n_uset_destroy_over
+* @passcase                            When i18n_uset_destroy_over is successful.
+* @failcase                            If target i18n_uset_destroy_over fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_destroy_over_p(void)
+{
+       START_TEST;
+       int32_t attributes[] = { I18N_USET_IGNORE_SPACE, I18N_USET_CASE_INSENSITIVE, I18N_USET_ADD_CASE_MAPPINGS};
+       int nEnumSize = sizeof(attributes) / sizeof(attributes[0]);
+       int nEnumCounter = 0;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               //Target Api
+               int nRetVal = i18n_uset_destroy_over(uset, attributes[nEnumCounter]);
+               PRINT_RESULT(nRetVal, "i18n_uset_destroy_over");
+       }
+       return 0;
+}
+
+ //& purpose: Removes all strings from this set.
+/**
+* @testcase                    ITc_i18n_uset_remove_all_strings_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Removes all strings from this set.
+* @scenario                            Removes all strings from this set.
+* @apicovered                  i18n_uset_remove_all_strings
+* @passcase                            When i18n_uset_remove_all_strings is successful.
+* @failcase                            If target i18n_uset_remove_all_strings fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_remove_all_strings_p(void)
+{
+       START_TEST;
+
+       //Target Api
+       int nRetVal = i18n_uset_remove_all_strings(uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy_over");
+
+       return 0;
+}
+
+//& purpose: checks whether set contains no characters and no strings.
+/**
+* @testcase                    ITc_i18n_uset_destroy_over_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns true if the given #i18n_uset_h contains no characters and no strings.
+* @scenario                            Clears the set.\n
+*                                              Check whether set is empty or not.
+* @apicovered                  i18n_uset_clear, i18n_uset_is_empty
+* @passcase                            When i18n_uset_is_empty is successful.
+* @failcase                            If target i18n_uset_is_empty fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_is_empty_p(void)
+{
+       START_TEST;
+
+       int nRetVal = i18n_uset_clear(uset);
+       PRINT_RESULT(nRetVal, "i18n_uset_clear");
+
+       //Target Api
+       i18n_uset_is_empty(uset);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+//& purpose: Checks if the given set contains the specified character.
+/**
+* @testcase                    ITc_i18n_uset_contains_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns @c true if the given #i18n_uset_h contains the given @a character.
+* @scenario                            Add the specified character.\n
+*                                              Determines whether set contains the specified character.
+* @apicovered                  i18n_uset_add, i18n_uset_contains
+* @passcase                            When i18n_uset_contains is successful.
+* @failcase                            If target i18n_uset_contains fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_contains_p(void)
+{
+       START_TEST;
+       i18n_uchar32 c = 0x61;
+
+       int nRetVal = i18n_uset_add(uset, c);
+       PRINT_RESULT(nRetVal, "i18n_uset_add");
+
+       //Target Api
+       i18n_uset_contains(uset, c);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+//& purpose: Determines whether set contains the specified range of characters.
+/**
+* @testcase                    ITc_i18n_uset_contains_range_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns true if the given #i18n_uset_h contains all characters c where start <= c && c <= end.
+* @scenario                            Add the specified range of characters.\n
+*                                              Determines whether set contains the specified range of characters.
+* @apicovered                  i18n_uset_add_range, i18n_uset_contains_range
+* @passcase                            When i18n_uset_contains_range is successful.
+* @failcase                            If target i18n_uset_contains_range fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_contains_range_p(void)
+{
+       START_TEST;
+       i18n_uchar32 start1 = 0x51;
+       i18n_uchar32 end1 = 0x60;
+
+       int nRetVal = i18n_uset_add_range(uset, start1, end1);
+       PRINT_RESULT(nRetVal, "i18n_uset_add_range");
+
+       //Target Api
+       i18n_uset_contains_range(uset, start1, end1);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+//& purpose: Determines whether set contains the specified string.
+/**
+* @testcase                    ITc_i18n_uset_contains_string_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns true if the given #i18n_uset_h contains the given string.
+* @scenario                            Add the specified string.\n
+*                                              Determines whether set contains the specified string.
+* @apicovered                  i18n_uset_add_string, i18n_uset_contains_string
+* @passcase                            When i18n_uset_contains_string is successful.
+* @failcase                            If target i18n_uset_contains_string fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_contains_string_p(void)
+{
+       START_TEST;
+        const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+       int32_t str_len = i18n_ustring_get_length(str);
+       if(str_len <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       int nRetVal = i18n_uset_add_string(uset, str, str_len);
+       PRINT_RESULT(nRetVal, "i18n_uset_add_string");
+
+       //Target Api
+       i18n_uset_contains_string(uset, str, str_len);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+ //& purpose: Returns the index of the given character within the given set.
+/**
+* @testcase                    ITc_i18n_uset_index_of_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns the index of the given @a character within this @a set, where the @a set is ordered by ascending code point.
+* @scenario                            Returns the index of the given character within this set.
+* @apicovered                  i18n_uset_index_of
+* @passcase                            When i18n_uset_index_of is successful.
+* @failcase                            If target i18n_uset_index_of fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_index_of_p(void)
+{
+       START_TEST;
+       i18n_uchar32 c = 0x41;
+
+       //Target Api
+       i18n_uset_index_of(uset, c);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+ //& purpose: Returns character at the given index within the given set.
+/**
+* @testcase                    ITc_i18n_uset_char_at_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns the character at the given index within this set, where the set is ordered by ascending code point.
+* @scenario                            Returns character at the given index within the given set.
+* @apicovered                  i18n_uset_char_at
+* @passcase                            When i18n_uset_char_at is successful.
+* @failcase                            If target i18n_uset_char_at fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_char_at_p(void)
+{
+       START_TEST;
+       int32_t char_index = 0;
+
+       //Target Api
+       i18n_uset_char_at(uset, char_index);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+ //& purpose: Returns the size of the set.
+/**
+* @testcase                    ITc_i18n_uset_size_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns the number of characters and strings contained in the given #i18n_uset_h.
+* @scenario                            Returns the size of the set.
+* @apicovered                  i18n_uset_size
+* @passcase                            When i18n_uset_size is successful.
+* @failcase                            If target i18n_uset_size fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_size_p(void)
+{
+       START_TEST;
+
+       //Target Api
+       i18n_uset_size(uset);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+ //& purpose:Returns the number of items in this set.
+/**
+* @testcase                    ITc_i18n_uset_get_item_count_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns the number of items (either a range of characters or a single multicharacter string)in this set.
+* @scenario                            Returns the number of items in this set.
+* @apicovered                  i18n_uset_get_item_count
+* @passcase                            When i18n_uset_get_item_count is successful.
+* @failcase                            If target i18n_uset_get_item_count fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_get_item_count_p(void)
+{
+       START_TEST;
+
+       //Target Api
+       i18n_uset_get_item_count(uset);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+ //& purpose: Returns an item of this set.
+/**
+* @testcase                    ITc_i18n_uset_get_item_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns an item (either a range of characters or a single multicharacter string)in this set.
+* @scenario                            Returns an item of this set.
+* @apicovered                  i18n_uset_get_item
+* @passcase                            When i18n_uset_get_item is successful.
+* @failcase                            If target i18n_uset_get_item fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_get_item_p(void)
+{
+       START_TEST;
+       i18n_uchar32 start1 = 0;
+       i18n_uchar32 end1 = 0;
+       i18n_uchar str[12] = {0,};
+       int32_t str_capacity = sizeof(str)/sizeof(str[0]);
+
+       //Target Api
+       i18n_uset_get_item (uset, 0, &start1, &end1, str, str_capacity);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+ //& purpose: Determines that set1 a superset of set2.
+/**
+* @testcase                    ITc_i18n_uset_contains_all_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns true if set1 contains all the characters and strings of set2. It answers the question, 'Is set1 a superset of set2?'
+* @scenario                            Determines that set1 a superset of set2.
+* @apicovered                  i18n_uset_create,i18n_uset_contains_all, i18n_uset_destroy
+* @passcase                            When i18n_uset_contains_all is successful.
+* @failcase                            If target i18n_uset_contains_all fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_contains_all_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset2 = NULL;
+       i18n_uchar32 start1 = 0x41;
+       i18n_uchar32 end1 = 0x48;
+
+       int nRetVal = i18n_uset_create(start1, end1, &uset2);
+       PRINT_RESULT(nRetVal, "i18n_uset_create");
+
+       //Target Api
+       i18n_uset_contains_all(uset, uset2);
+       nRetVal = get_last_result();
+       PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal,"get_last_result", BaseUtilsGetError(nRetVal), i18n_uset_destroy(uset2));
+
+       nRetVal = i18n_uset_destroy(uset2);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+ //& purpose: Returns true if this set contains all the characters of the given string.
+/**
+* @testcase                    ITc_i18n_uset_contains_all_code_points_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns true if this set contains all the characters of the given string.
+* @scenario                            Add all code points.\n
+*                                              checks whether uset contains all added code points.
+* @apicovered                  i18n_uset_add_all_code_points, i18n_uset_contains_all_code_points
+* @passcase                            When i18n_uset_contains_all_code_points is successful.
+* @failcase                            If target i18n_uset_contains_all_code_points fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_contains_all_code_points_p(void)
+{
+       START_TEST;
+       const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+       int32_t str_len = i18n_ustring_get_length(str);
+       if(str_len <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       int nRetVal = i18n_uset_add_all_code_points(uset, str, str_len);
+       PRINT_RESULT(nRetVal, "i18n_uset_add_all_code_points");
+
+       //Target Api
+       i18n_uset_contains_all_code_points(uset, str, str_len);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "i18n_uset_contains_all_code_points");
+
+       return 0;
+}
+
+ //& purpose: Determines whether set1 a disjoint set of set2.
+/**
+* @testcase                    ITc_i18n_uset_contains_none_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns true if set1 contains none of the characters and strings of set2.
+* @scenario                            Determines whether set1 a disjoint set of set2.
+* @apicovered                  i18n_uset_create, i18n_uset_contains_none, i18n_uset_destroy
+* @passcase                            When i18n_uset_contains_none is successful.
+* @failcase                            If target i18n_uset_contains_none fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_contains_none_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset2 = NULL;
+       i18n_uchar32 start1 = 0x51;
+       i18n_uchar32 end1 = 0x60;
+
+       int nRetVal = i18n_uset_create(start1, end1, &uset2);
+       PRINT_RESULT(nRetVal, "i18n_uset_create");
+
+       //Target Api
+       i18n_uset_contains_none(uset, uset2);
+       nRetVal = get_last_result();
+       PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal,"get_last_result", BaseUtilsGetError(nRetVal), i18n_uset_destroy(uset2));
+
+       nRetVal = i18n_uset_destroy(uset2);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+ //& purpose: Determines whether set1 and set2 have an intersection.
+/**
+* @testcase                    ITc_i18n_uset_contains_some_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns true if set1 contains some of the characters and strings of set2.
+* @scenario                            Determines whether set1 and set2 have an intersection.
+* @apicovered                  i18n_uset_create, i18n_uset_contains_some, i18n_uset_destroy
+* @passcase                            When i18n_uset_contains_some is successful.
+* @failcase                            If target i18n_uset_contains_some fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_contains_some_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset2 = NULL;
+       i18n_uchar32 start1 = 0x45;
+       i18n_uchar32 end1 = 0x55;
+
+       int nRetVal = i18n_uset_create(start1, end1, &uset2);
+       PRINT_RESULT(nRetVal, "i18n_uset_create");
+
+       //Target Api
+       i18n_uset_contains_some(uset, uset2);
+       nRetVal = get_last_result();
+       PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal,"get_last_result", BaseUtilsGetError(nRetVal), i18n_uset_destroy(uset2));
+
+       nRetVal = i18n_uset_destroy(uset2);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+ //& purpose: Returns the length of the initial substring of the input string for the give condition
+/**
+* @testcase                    ITc_i18n_uset_span_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns the length of the initial substring of the input string which consists only of characters\n
+*                                              and strings that are contained/not contained in this set
+* @scenario                            Returns the length of the initial substring of the input string for the give condition
+* @apicovered                  i18n_uset_span
+* @passcase                            When i18n_uset_span is successful.
+* @failcase                            If target i18n_uset_span fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_span_p(void)
+{
+       START_TEST;
+       const i18n_uchar str[] = {'q', 'w', 'e', 'r', '\0'};
+       int32_t str_len = i18n_ustring_get_length(str);
+       if(str_len <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       i18n_uset_span_condition_e span_condition[] = { I18N_USET_SPAN_NOT_CONTAINED, I18N_USET_SPAN_CONTAINED, I18N_USET_SPAN_SIMPLE,
+               I18N_USET_SPAN_CONDITION_COUNT };
+       int nEnumSize = sizeof(span_condition) / sizeof(span_condition[0]);
+       int nEnumCounter = 0;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               i18n_uset_span(uset, str, str_len, span_condition[nEnumCounter]);
+               int nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal, "get_last_result");
+       }
+
+       return 0;
+}
+
+ //& purpose: Returns the start of the trailing substring of the input string for the give condition
+/**
+* @testcase                    ITc_i18n_uset_span_back_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns the start of the trailing substring of the input string which
+*                                              consists only of characters and strings that are contained/not contained in this set
+* @scenario                            Returns the length of the triling substring of the input string for the give condition
+* @apicovered                  i18n_uset_span_back
+* @passcase                            When i18n_uset_span_back is successful.
+* @failcase                            If target i18n_uset_span_back fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_span_back_p(void)
+{
+       START_TEST;
+       const i18n_uchar str[] = {'q', 'w', 'e', 'r', '\0'};
+       int32_t str_len = i18n_ustring_get_length(str);
+       if(str_len <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uset_span_condition_e span_condition[] = { I18N_USET_SPAN_NOT_CONTAINED, I18N_USET_SPAN_CONTAINED, I18N_USET_SPAN_SIMPLE,
+               I18N_USET_SPAN_CONDITION_COUNT };
+       int nEnumSize = sizeof(span_condition) / sizeof(span_condition[0]);
+       int nEnumCounter = 0;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               i18n_uset_span_back(uset, str, str_len, span_condition[nEnumCounter]);
+               int nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal, "get_last_result");
+       }
+
+       return 0;
+}
+
+ //& purpose: Returns the length of the initial substring of the input string for the give condition
+/**
+* @testcase                    ITc_i18n_uset_span_utf8_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns the length of the initial substring of the input string which
+*                                              consists only of characters and strings that are contained/not contained in this set
+* @scenario                            Returns the length of the initial substring of the input string for the give condition
+* @apicovered                  i18n_uset_span_utf8
+* @passcase                            When i18n_uset_span_utf8 is successful.
+* @failcase                            If target i18n_uset_span_utf8 fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_span_utf8_p(void)
+{
+       START_TEST;
+       const char *s = "qwer";
+       int32_t length = strlen(s);
+       i18n_uset_span_condition_e span_condition[] = { I18N_USET_SPAN_NOT_CONTAINED, I18N_USET_SPAN_CONTAINED, I18N_USET_SPAN_SIMPLE,
+               I18N_USET_SPAN_CONDITION_COUNT };
+       int nEnumSize = sizeof(span_condition) / sizeof(span_condition[0]);
+       int nEnumCounter = 0;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               i18n_uset_span_utf8 (uset, s, length, span_condition[nEnumCounter]);
+               int nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal, "get_last_result");
+       }
+
+       return 0;
+}
+
+ //& purpose: Returns the start of the trailing substring of the input string for the give condition
+/**
+* @testcase                    ITc_i18n_uset_span_back_utf8_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns the start of the trailing substring of the input string which
+*                                              consists only of characters and strings that are contained/not contained in this set
+* @scenario                            Returns the start of the trailing substring of the input string for the give condition
+* @apicovered                  i18n_uset_span_back_utf8
+* @passcase                            When i18n_uset_span_back_utf8 is successful.
+* @failcase                            If target i18n_uset_span_back_utf8 fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_span_back_utf8_p(void)
+{
+       START_TEST;
+       const char *s = "qwer";
+       int32_t length = strlen(s);
+       i18n_uset_span_condition_e span_condition[] = { I18N_USET_SPAN_NOT_CONTAINED, I18N_USET_SPAN_CONTAINED, I18N_USET_SPAN_SIMPLE,
+               I18N_USET_SPAN_CONDITION_COUNT };
+       int nEnumSize = sizeof(span_condition) / sizeof(span_condition[0]);
+       int nEnumCounter = 0;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               i18n_uset_span_back_utf8 (uset, s, length, span_condition[nEnumCounter]);
+               int nRetVal = get_last_result();
+               PRINT_RESULT(nRetVal, "get_last_result");
+       }
+
+       return 0;
+}
+
+ //& purpose: Checks that set1 is equal to set2 or not.
+/**
+* @testcase                    ITc_i18n_uset_equals_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns true if set1 contains all of the characters and strings of set2, and vice versa.
+* @scenario                            Checks that set1 is equal to set2 or not.
+* @apicovered                  i18n_uset_create, i18n_uset_equals, i18n_uset_destroy
+* @passcase                            When i18n_uset_equals is successful.
+* @failcase                            If target i18n_uset_equals fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_equals_p(void)
+{
+       START_TEST;
+       i18n_uset_h uset2 = NULL;
+       i18n_uchar32 start1 = 0x41;
+       i18n_uchar32 end1 = 0x50;
+
+       int nRetVal = i18n_uset_create(start1, end1, &uset2);
+       PRINT_RESULT(nRetVal, "i18n_uset_create");
+
+       //Target Api
+       i18n_uset_equals(uset, uset2);
+       nRetVal = get_last_result();
+       PRINT_RESULT_CLEANUP(I18N_ERROR_NONE, nRetVal,"get_last_result", BaseUtilsGetError(nRetVal), i18n_uset_destroy(uset2));
+
+       nRetVal = i18n_uset_destroy(uset2);
+       PRINT_RESULT(nRetVal, "i18n_uset_destroy");
+
+       return 0;
+}
+
+ //& purpose: Sets the serialized set.
+/**
+* @testcase                    ITc_i18n_uset_serialize_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Serializes this @a set into an array of 16-bit integers.
+* @scenario                            Serializes the set.
+* @apicovered                  i18n_uset_serialize
+* @passcase                            When i18n_uset_serialize is successful.
+* @failcase                            If target i18n_uset_serialize fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_serialize_p(void)
+{
+       START_TEST;
+       uint16_t dest[48] = {0, 1, 2, 0};
+       int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+       //Target Api
+       i18n_uset_serialize(uset, dest, dest_capacity);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+ //& purpose: Gets the serialized set.
+/**
+* @testcase                    ITc_i18n_uset_get_serialized_set_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Given a serialized array, fill in the given serialized set object.
+* @scenario                            Sets the serialized set.
+*                                              Gets the serialized set.
+* @apicovered                  i18n_uset_serialize, i18n_uset_get_serialized_set
+* @passcase                            When i18n_uset_get_serialized_set is successful.
+* @failcase                            If target i18n_uset_get_serialized_set fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_get_serialized_set_p(void)
+{
+       START_TEST;
+       uint16_t dest[48] = {0, 1, 2, 0};
+       int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+       i18n_uset_serialize(uset, dest, dest_capacity);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       i18n_userialized_set_s fill_set;
+       //Target Api
+       i18n_uset_get_serialized_set(dest, dest_capacity, &fill_set);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+ //& purpose: Sets the serialized set with given character.
+/**
+* @testcase                    ITc_i18n_uset_set_serialized_to_one_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Sets the #i18n_userialized_set_s to contain the given @a character (and nothing else).
+* @scenario                            Sets the serialized set with given character.
+* @apicovered                  i18n_uset_set_serialized_to_one
+* @passcase                            When i18n_uset_set_serialized_to_one is successful.
+* @failcase                            If target i18n_uset_set_serialized_to_one fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_set_serialized_to_one_p(void)
+{
+       START_TEST;
+       i18n_uchar32 c = 0x41;
+       i18n_userialized_set_s fill_set;
+
+       //Target Api
+       int nRetVal = i18n_uset_set_serialized_to_one(c, &fill_set);
+       PRINT_RESULT(nRetVal, "i18n_uset_set_serialized_to_one");
+
+       return 0;
+}
+
+ //& purpose: checks whether the serialized set contains the given character.
+/**
+* @testcase                    ITc_i18n_uset_serialized_contains_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns @c true if the given #i18n_userialized_set_s contains the given @a character.
+* @scenario                            Sets the serialize set.\n
+*                                              Gets the serialized set.\n
+*                                              checks whether the serialized set contains the given character.
+* @apicovered                  i18n_uset_serialize, i18n_uset_get_serialized_set, i18n_uset_serialized_contains
+* @passcase                            When i18n_uset_serialized_contains is successful.
+* @failcase                            If target i18n_uset_serialized_contains fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_serialized_contains_p(void)
+{
+       START_TEST;
+       uint16_t dest[48] = {0, 1, 2, 0};
+       int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+       i18n_uset_serialize(uset, dest, dest_capacity);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       i18n_userialized_set_s fill_set;
+       i18n_uset_get_serialized_set(dest, dest_capacity, &fill_set);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       i18n_uchar32 c = 0x41;
+       //Target Api
+       i18n_uset_serialized_contains(&fill_set, c);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+ //& purpose: Returns the number of disjoint ranges of characters contained in the given serialized set.
+/**
+* @testcase                    ITc_i18n_uset_get_serialized_range_count_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Returns the number of disjoint ranges of characters contained in the given serialized set.
+* @scenario                            Sets the serialize set.\n
+*                                              Gets the serialized set.\n
+*                                              Gets the range count for the serialized set.
+* @apicovered                  i18n_uset_get_serialized_range_count, i18n_uset_get_serialized_set, i18n_uset_get_serialized_range_count
+* @passcase                            When i18n_uset_get_serialized_range_count is successful.
+* @failcase                            If target i18n_uset_get_serialized_range_count fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_get_serialized_range_count_p(void)
+{
+       START_TEST;
+       uint16_t dest[48] = {0, 1, 2, 0};
+       int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+       i18n_uset_serialize(uset, dest, dest_capacity);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       i18n_userialized_set_s fill_set;
+       i18n_uset_get_serialized_set(dest, dest_capacity, &fill_set);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       //Target Api
+       i18n_uset_get_serialized_range_count (&fill_set);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+ //& purpose: Gets the current date and time.
+/**
+* @testcase                    ITc_i18n_uset_get_serialized_range_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Play and stop various type of reactions e.g media or vibration patterns
+* @scenario                            Gets the current date and time.
+* @apicovered                  i18n_ustring_to_title
+* @passcase                            When i18n_ustring_to_title is successful.
+* @failcase                            If target i18n_ustring_to_title fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uset_get_serialized_range_p(void)
+{
+       START_TEST;
+       uint16_t dest[48] = {0, 1, 2, 0};
+       int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+       i18n_uset_serialize(uset, dest, dest_capacity);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       i18n_userialized_set_s fill_set;
+       i18n_uset_get_serialized_set(dest, dest_capacity, &fill_set);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       int32_t range_index = 0;
+       i18n_uchar32 p_start = 0;
+       i18n_uchar32 p_end = 0;
+       //Target Api
+       i18n_uset_get_serialized_range(&fill_set, range_index, &p_start, &p_end);
+       nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/base-utils/ITs-base-utils.c b/src/itc/base-utils/ITs-base-utils.c
new file mode 100755 (executable)
index 0000000..78b963b
--- /dev/null
@@ -0,0 +1,4502 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-base-utils-common.h"
+
+/** @addtogroup itc-base-utils
+*  @ingroup itc
+*  @{
+*/
+
+struct timeval g_stBaseUtilsStartTime;
+struct mallinfo g_stBaseUtilsMemInfo;
+
+void *g_pContext = NULL;
+int32_t g_Offset = 0;
+int g_UnescapeCallback = false;
+
+/**
+* @function            UStringUnescapeCharAtCB
+* @description         Callback Function
+* @parameter           int32_t offset, void *context
+* @return                      NA
+*/
+i18n_uchar UStringUnescapeCharAtCB(int32_t offset, void *context)
+{
+       FPRINTF("\\n[Line : %d] Inside UStringUnescapeCharAtCB. Offset value = %d\n",__LINE__, offset);
+       g_UnescapeCallback = true;
+       return (i18n_uchar)offset;
+}
+
+/**
+* @function            ITs_bundle_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bBaseUtilsInitFlag = true;
+       return;
+}
+
+/**
+* @function            ITs_base_utils_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_base_utils_cleanup(void)
+{
+       g_bBaseUtilsInitFlag = false;
+       return;
+}
+
+/** @addtogroup itc-base-utils-testcases
+*  @brief              Integration testcases for module base-utils
+*  @ingroup    itc-base-utils
+*  @{
+*/
+
+//& type: auto
+//& purpose: Gets the current date and time.
+/**
+* @testcase                            ITc_i18n_ucalendar_get_now_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Gets the current date and time.
+* @apicovered                  i18n_ucalendar_get_now
+* @passcase                            When i18n_ucalendar_get_now is successful
+* @failcase                            If target i18n_ucalendar_get_now API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ucalendar_get_now_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszUcalenderGetNowMemLog = NULL;
+       char *pszUcalenderGetNowSpeedLog = NULL;
+       int nUcalenderGetNowFailCount = 0;
+#if MEMORY_CHECK
+       pszUcalenderGetNowMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUcalenderGetNowSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               i18n_udate uDate;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ucalendar_get_now(&uDate);
+               BaseUtilsGetExecutionDelay(pszUcalenderGetNowSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUcalenderGetNowMemLog);
+               PRINT_RESULT_LOOP(nRetVal,"i18n_ucalendar_get_now",nUcalenderGetNowFailCount);
+       }
+       VALIDATE_RESULT(nUcalenderGetNowFailCount, "i18n_ucalendar_get_now", pszUcalenderGetNowMemLog, pszUcalenderGetNowSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ucalendar_get_now", pszUcalenderGetNowSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ucalendar_get_now", pszUcalenderGetNowMemLog);
+#endif
+       FREE_MEMORY(pszUcalenderGetNowMemLog, pszUcalenderGetNowSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets a Unormalizer instance and Writes the normalized form of the source string to the destination string.
+/**
+* @testcase                            ITc_i18n_unormalization_get_instance_normalize_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Gets a Unormalizer instance
+*                                              Writes the normalized form of the source string to the destination string(replacing its contents). The source and destination strings must be different buffers..
+* @apicovered                  i18n_unormalization_get_instance, i18n_unormalization_normalize, i18n_ustring_copy_ua_n, i18n_ustring_get_length
+* @passcase                            When i18n_unormalization_get_instance, i18n_unormalization_normalize are successful
+* @failcase                            If target i18n_unormalization_get_instance or i18n_unormalization_normalize fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_unormalization_get_instance_normalize_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       i18n_uchar *pRet = NULL;
+
+       char *pszUnormalizationModeNormalizeMemLog = NULL;
+       char *pszUnormalizationModeSpeedLog = NULL;
+       char *pszNormalizeSpeedLog = NULL;
+       int nUnormalizationModeFailCount = 0;
+       int nNormalizeFailCount = 0;
+       i18n_uchar uSourceStr[I18N_UCHAR_CAPACITY] = { 0, };
+       int nSourceLength = -1;
+       pRet = i18n_ustring_copy_ua_n(uSourceStr, (char *)SOURCE_STRING, strlen(SOURCE_STRING));
+       nSourceLength = i18n_ustring_get_length(uSourceStr);
+       if(pRet == NULL || nSourceLength <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n Failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_unormalization_mode_e eUnormalizationMode[] = {    I18N_UNORMALIZATION_COMPOSE,
+                                                                                       I18N_UNORMALIZATION_DECOMPOSE,
+                                                                                       I18N_UNORMALIZATION_FCD,
+                                                                                       I18N_UNORMALIZATION_COMPOSE_CONTIGUOUS};
+       int nEnumSize = sizeof(eUnormalizationMode) / sizeof(eUnormalizationMode[0]);
+       int nEnumCounter = 0;
+#if MEMORY_CHECK
+       pszUnormalizationModeNormalizeMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUnormalizationModeSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       pszNormalizeSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       i18n_unormalizer_h uNormalizer = NULL;
+                       FPRINTF("\\n[Line : %d][%s] Executing i18n_unormalization_get_instance with Unormalization-Mode(%s) and NAME =%s on iteration %d, \n", __LINE__, API_NAMESPACE, UnormalizationModeValue(eUnormalizationMode[nEnumCounter]), UNORMALIZATION_NFC_NAME, nLoopCount);
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_unormalization_get_instance(NULL, UNORMALIZATION_NFC_NAME, eUnormalizationMode[nEnumCounter], &uNormalizer);
+                       BaseUtilsGetExecutionDelay(pszUnormalizationModeSpeedLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_unormalization_get_instance",nUnormalizationModeFailCount);
+
+                       i18n_uchar uDestinationStr[I18N_UCHAR_CAPACITY] = { 0, };
+                       int nDestinationLength = -1;
+
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_unormalization_normalize(uNormalizer, uSourceStr, nSourceLength, uDestinationStr, I18N_UCHAR_CAPACITY, &nDestinationLength);
+                       BaseUtilsGetExecutionDelay(pszNormalizeSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszUnormalizationModeNormalizeMemLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_unormalization_normalize",nNormalizeFailCount);
+               }
+       }
+       VALIDATE_RESULT_PAIRAPI(nUnormalizationModeFailCount, nNormalizeFailCount, "i18n_unormalization_get_instance", "i18n_unormalization_normalize", pszUnormalizationModeNormalizeMemLog, pszUnormalizationModeSpeedLog, pszNormalizeSpeedLog, MAX_COUNT * nEnumSize);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_unormalization_get_instance", pszUnormalizationModeSpeedLog);
+               PRINT_SPEED_LOG("i18n_unormalization_normalize", pszNormalizeSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_unormalization_get_instance_normalize", pszUnormalizationModeNormalizeMemLog);
+#endif
+       FREE_MEMORY(pszUnormalizationModeNormalizeMemLog, pszUnormalizationModeSpeedLog, pszNormalizeSpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Copies a ustring. Adds a null terminator. And Compare Two Unicode Strings.
+/**
+* @testcase                            ITc_i18n_ustring_copy_compare_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Copies a ustring. Adds a null terminator
+*                                              Compares two Unicode strings for bitwise equality
+* @apicovered                  i18n_ustring_copy, i18n_ustring_compare
+* @passcase                            When i18n_ustring_copy, i18n_ustring_compare are successful
+* @failcase                            If target i18n_ustring_copy or i18n_ustring_compare fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_copy_compare_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       i18n_uchar *pRet = NULL;
+
+       char *pszUStringCopyCompareMemLog = NULL;
+       char *pszUStringCopySpeedLog = NULL;
+       char *pszUStringCompareSpeedLog = NULL;
+       int nUStringCopyFailCount = 0;
+       int nUStringCompareFailCount = 0;
+       i18n_uchar uSourceStr[I18N_UCHAR_CAPACITY] = { 0, };
+       pRet = i18n_ustring_copy_ua_n(uSourceStr, (char *)SOURCE_STRING, strlen(SOURCE_STRING));
+       if(pRet == NULL || i18n_ustring_get_length(uSourceStr) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n Failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       //PRINT_RESULT(nRetVal,"i18n_ustring_copy_ua_n");
+#if MEMORY_CHECK
+       pszUStringCopyCompareMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUStringCopySpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUStringCompareSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               i18n_uchar uDestStr[I18N_UCHAR_CAPACITY] = { 0, };
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_copy(uDestStr, uSourceStr);
+               BaseUtilsGetExecutionDelay(pszUStringCopySpeedLog);
+               //PRINT_RESULT_LOOP(nRetVal,"i18n_ustring_copy",nUStringCopyFailCount);
+               if(pRet == NULL || i18n_ustring_get_length(uDestStr) <= 0)
+               {
+                       nUStringCopyFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy Failed in iteration = %d, \n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               int nResult = -1;
+               BaseUtilsGetTimeOfDay();
+               nResult = i18n_ustring_compare(uSourceStr, uDestStr);
+               BaseUtilsGetExecutionDelay(pszUStringCompareSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUStringCopyCompareMemLog);
+               //PRINT_RESULT_LOOP(nRetVal,"i18n_ustring_compare",nUStringCompareFailCount);
+               if (nResult != 0)
+               {
+                       nUStringCompareFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_compare Failed as expected Result value is 0, but Actual Result value is %d on iteration %d, \n", __LINE__, API_NAMESPACE, nResult, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT_PAIRAPI(nUStringCopyFailCount, nUStringCompareFailCount, "i18n_ustring_copy", "i18n_ustring_compare", pszUStringCopyCompareMemLog, pszUStringCopySpeedLog, pszUStringCompareSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_copy", pszUStringCopySpeedLog);
+               PRINT_SPEED_LOG("i18n_ustring_compare", pszUStringCompareSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_copy_compare", pszUStringCopyCompareMemLog);
+#endif
+       FREE_MEMORY(pszUStringCopyCompareMemLog, pszUStringCopySpeedLog, pszUStringCompareSpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Determines the length of an array of i18n_uchar. And Upper cases the characters in a string.
+/**
+* @testcase                            ITc_i18n_ustring_get_length_to_upper_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Determines the length of an array of i18n_uchar
+*                                              Upper-cases the characters in a string.
+* @apicovered                  i18n_ustring_get_length, i18n_ustring_to_upper
+* @passcase                            When i18n_ustring_get_length, i18n_ustring_to_upper are successful
+* @failcase                            If target i18n_ustring_get_length or i18n_ustring_to_upper fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_get_length_to_upper_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       i18n_uchar *pRet = NULL;
+
+       char *pszUStringCopyCompareMemLog = NULL;
+       char *pszUStringCopySpeedLog = NULL;
+       char *pszUStringCompareSpeedLog = NULL;
+       int nUStringCopyFailCount = 0;
+       int nUStringCompareFailCount = 0;
+       i18n_uchar uSourceStr[I18N_UCHAR_CAPACITY] = { 0, };
+       pRet = i18n_ustring_copy_ua_n(uSourceStr, (char *)SOURCE_STRING, strlen(SOURCE_STRING));
+       if(pRet == NULL || i18n_ustring_get_length(uSourceStr) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n Failed in precondition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       //PRINT_RESULT(nRetVal,"i18n_ustring_copy_ua_n");
+       const char *pszDefaultLocale = I18N_ULOCALE_US;
+
+#if MEMORY_CHECK
+       pszUStringCopyCompareMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUStringCopySpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUStringCompareSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nSourceLength = 0;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nSourceLength = i18n_ustring_get_length(uSourceStr);
+               BaseUtilsGetExecutionDelay(pszUStringCopySpeedLog);
+               if(nSourceLength <= 0)
+               {
+                       nUStringCompareFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_get_length failed in iteration = %d\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               //PRINT_RESULT_LOOP(nRetVal,"i18n_ustring_get_length",nUStringCopyFailCount);
+               BaseUtilsGetTimeOfDay();
+               i18n_uchar uDestStr[I18N_UCHAR_CAPACITY] = { 0, };
+               i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+               nRetVal = i18n_ustring_to_upper(uDestStr, I18N_UCHAR_CAPACITY, uSourceStr, nSourceLength, pszDefaultLocale, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszUStringCompareSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUStringCopyCompareMemLog);
+               PRINT_RESULT_LOOP(ErrorCode,"i18n_ustring_to_upper",nUStringCompareFailCount);
+               if (nRetVal != nSourceLength)
+               {
+                       nUStringCompareFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_upper Failed as Source Uchar String Length value is %d, but Destination Uchar String Length value is %d on iteration %d, \n", __LINE__, API_NAMESPACE, nSourceLength, nRetVal, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT_PAIRAPI(nUStringCopyFailCount, nUStringCompareFailCount, "i18n_ustring_get_length", "i18n_ustring_to_upper", pszUStringCopyCompareMemLog, pszUStringCopySpeedLog, pszUStringCompareSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_get_length", pszUStringCopySpeedLog);
+               PRINT_SPEED_LOG("i18n_ustring_to_upper", pszUStringCompareSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_get_length_upper", pszUStringCopyCompareMemLog);
+#endif
+       FREE_MEMORY(pszUStringCopyCompareMemLog, pszUStringCopySpeedLog, pszUStringCompareSpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Converts a UTF-8 string to UTF-16. Converts a UTF-16 string to UTF-8.
+/**
+* @testcase                            ITc_i18n_ustring_from_UTF8_to_UTF8_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Converts a UTF-8 string to UTF-16
+*                                              Converts a UTF-16 string to UTF-8.
+* @apicovered                  i18n_ustring_from_UTF8, i18n_ustring_to_UTF8
+* @passcase                            When i18n_ustring_from_UTF8, i18n_ustring_to_UTF8 are successful
+* @failcase                            If target i18n_ustring_from_UTF8 or i18n_ustring_to_UTF8 fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_from_UTF8_to_UTF8_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+
+       i18n_uchar *pRet = NULL;
+       char *pRetVal = NULL;
+
+       char szSource[I18N_UCHAR_CAPACITY] = {0};
+       char szDest[I18N_UCHAR_CAPACITY] = {0};
+       char *pszUStringFromToUTF8MemLog = NULL;
+       char *pszUStringFromUTF8SpeedLog = NULL;
+       char *pszUStringToUTF8SpeedLog = NULL;
+       int nUStringFromUTF8FailCount = 0;
+       int nUStringToUTF8FailCount = 0;
+#if MEMORY_CHECK
+       pszUStringFromToUTF8MemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUStringFromUTF8SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUStringToUTF8SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               memset(szSource, 0, sizeof(szSource));
+               memset(szDest, 0, sizeof(szDest));
+               sprintf(szSource, "Tizen%d", (nLoopCount+1));
+               int nSourceLength = strlen((const char*)szSource);
+               i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
+               int nUcharSourceLength = 0;
+               int nDestLength = 0;
+               i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_from_UTF8(ucharSource, I18N_UCHAR_CAPACITY, &nUcharSourceLength, szSource, nSourceLength,&ErrorCode);
+               BaseUtilsGetExecutionDelay(pszUStringFromUTF8SpeedLog);
+               //PRINT_RESULT_LOOP(nRetVal,"i18n_ustring_from_UTF8",nUStringFromUTF8FailCount);
+               if(pRet == NULL || i18n_ustring_get_length(ucharSource) <= 0 || ErrorCode != I18N_ERROR_NONE)
+               {
+                       nUStringFromUTF8FailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8 failed in iteration = %d \n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               ErrorCode = I18N_ERROR_NONE;
+               BaseUtilsGetTimeOfDay();
+               pRetVal = i18n_ustring_to_UTF8(szDest, I18N_UCHAR_CAPACITY, &nDestLength, ucharSource, nUcharSourceLength,&ErrorCode);
+               BaseUtilsGetExecutionDelay(pszUStringToUTF8SpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUStringFromToUTF8MemLog);
+               if( pRetVal == NULL || strlen(szDest) <= 0 || ErrorCode != I18N_ERROR_NONE)
+               {
+                       nUStringToUTF8FailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_UTF8 Failed on iteration %d, \n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if (strcmp((char *)szSource, (char *)szDest) != 0)
+               {
+                       nUStringToUTF8FailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_UTF8 Failed as Source String and Destination String Contents Mismatched. Source String = %s, Destination String = %s, on iteration %d, \n", __LINE__, API_NAMESPACE, (char *)szSource, (char *)szDest, nLoopCount);
+               }
+       }
+       memset(szSource, 0, sizeof(szSource));
+       memset(szDest, 0, sizeof(szDest));
+       VALIDATE_RESULT_PAIRAPI(nUStringFromUTF8FailCount, nUStringToUTF8FailCount, "i18n_ustring_from_UTF8", "i18n_ustring_to_UTF8", pszUStringFromToUTF8MemLog, pszUStringFromUTF8SpeedLog, pszUStringToUTF8SpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_from_UTF8", pszUStringFromUTF8SpeedLog);
+               PRINT_SPEED_LOG("i18n_ustring_to_UTF8", pszUStringToUTF8SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_from_UTF8_to_UTF8", pszUStringFromToUTF8MemLog);
+#endif
+       FREE_MEMORY(pszUStringFromToUTF8MemLog, pszUStringFromUTF8SpeedLog, pszUStringToUTF8SpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Copies ustring to a byte string encoded in the default codepage.
+/**
+* @testcase                            ITc_i18n_ustring_copy_au_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Copies ustring to a byte string encoded in the default codepage.
+* @apicovered                  i18n_ustring_copy_au
+* @passcase                            When i18n_ustring_copy_au is successful
+* @failcase                            If target i18n_ustring_copy_au fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_copy_au_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       i18n_uchar *pRet = NULL;
+       char *pRetVal = NULL;
+
+       char szSource[I18N_UCHAR_CAPACITY] = {0};
+       char szDest[I18N_UCHAR_CAPACITY] = {0};
+       char *pszUStringCopyAUMemLog = NULL;
+       char *pszUStringCopyAUSpeedLog = NULL;
+       int nUStringCopyAUFailCount = 0;
+#if MEMORY_CHECK
+       pszUStringCopyAUMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUStringCopyAUSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               memset(szSource, 0, sizeof(szSource));
+               memset(szDest, 0, sizeof(szDest));
+               sprintf(szSource, "Tizen%d", (nLoopCount+1));
+               i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
+               pRet = i18n_ustring_copy_ua_n(ucharSource, szSource, strlen(szSource));
+               if(i18n_ustring_get_length(ucharSource) <= 0 || pRet == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][%s]Pre-Requisite API i18n_ustring_copy_ua_n Failed during the testing of target API i18n_ustring_copy_au on iteration %d\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nUStringCopyAUFailCount++;
+                       continue;
+               }
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRetVal = i18n_ustring_copy_au(szDest, ucharSource);
+               BaseUtilsGetExecutionDelay(pszUStringCopyAUSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUStringCopyAUMemLog);
+               if(pRetVal == NULL || strlen(szDest) == 0)
+               {
+                       nUStringCopyAUFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_au Failed in iteration = %d, \n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               //PRINT_RESULT_LOOP(nRetVal,"i18n_ustring_copy_au",nUStringCopyAUFailCount);
+               if (strcmp((char *)szSource, (char *)szDest) != 0)
+               {
+                       nUStringCopyAUFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_au Failed as Source String and Destination String Contents Mismatched. Source String = %s, Destination String = %s, on iteration %d, \n", __LINE__, API_NAMESPACE, szSource, szDest, nLoopCount);
+               }
+       }
+       memset(szSource, 0, sizeof(szSource));
+       memset(szDest, 0, sizeof(szDest));
+       VALIDATE_RESULT(nUStringCopyAUFailCount, "i18n_ustring_copy_au", pszUStringCopyAUMemLog, pszUStringCopyAUSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_copy_au", pszUStringCopyAUSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_copy_au", pszUStringCopyAUMemLog);
+#endif
+       FREE_MEMORY(pszUStringCopyAUMemLog, pszUStringCopyAUSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Copies ustring to a byte string encoded in the default codepage. Copies at most n characters.
+/**
+* @testcase                            ITc_i18n_ustring_copy_au_n_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Copies ustring to a byte string encoded in the default codepage. Copies at most n characters.
+* @apicovered                  i18n_ustring_copy_au_n
+* @passcase                            When i18n_ustring_copy_au_n is successful
+* @failcase                            If target i18n_ustring_copy_au_n fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_copy_au_n_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       i18n_uchar *pRet = NULL;
+       char *pRetVal = NULL;
+       char szSource[I18N_UCHAR_CAPACITY] = {0};
+       char szDest[I18N_UCHAR_CAPACITY] = {0};
+       char *pszUStringCopyAUMemLog = NULL;
+       char *pszUStringCopyAUSpeedLog = NULL;
+       int nUStringCopyAUFailCount = 0;
+#if MEMORY_CHECK
+       pszUStringCopyAUMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUStringCopyAUSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nUcharSourceLength = 0;
+               memset(szSource, 0, sizeof(szSource));
+               memset(szDest, 0, sizeof(szDest));
+               sprintf(szSource, "Tizen%d", (nLoopCount+1));
+               i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
+               pRet = i18n_ustring_copy_ua_n(ucharSource, szSource, strlen(szSource));
+               nUcharSourceLength = i18n_ustring_get_length(ucharSource);
+               if(nUcharSourceLength <= 0 || pRet == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][%s]Pre-Requisite API i18n_ustring_copy_ua_n Failed during the testing of target API i18n_ustring_copy_au_n on iteration %d. \n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nUStringCopyAUFailCount++;
+                       continue;
+               }
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRetVal = i18n_ustring_copy_au_n(szDest, ucharSource, nUcharSourceLength);
+               BaseUtilsGetExecutionDelay(pszUStringCopyAUSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUStringCopyAUMemLog);
+               if(pRetVal == NULL || strlen(szDest) <= 0)
+               {
+                       nUStringCopyAUFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_au_n Failed in iteration = %d, \n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               //PRINT_RESULT_LOOP(nRetVal,"i18n_ustring_copy_au_n",nUStringCopyAUFailCount);
+               if (strcmp((char *)szSource, (char *)szDest) != 0)
+               {
+                       nUStringCopyAUFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_au_n Failed as Source String and Destination String Contents Mismatched. Source String = %s, Destination String = %s, on iteration %d, \n", __LINE__, API_NAMESPACE, szSource, szDest, nLoopCount);
+               }
+       }
+       memset(szSource, 0, sizeof(szSource));
+       memset(szDest, 0, sizeof(szDest));
+       VALIDATE_RESULT(nUStringCopyAUFailCount, "i18n_ustring_copy_au_n", pszUStringCopyAUMemLog, pszUStringCopyAUSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_copy_au_n", pszUStringCopyAUSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_copy_au_n", pszUStringCopyAUMemLog);
+#endif
+       FREE_MEMORY(pszUStringCopyAUMemLog, pszUStringCopyAUSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Copies a byte string encoded in the default codepage to a ustring. Copies at most n characters.
+/**
+* @testcase                            ITc_i18n_ustring_copy_ua_n_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Copies a byte string encoded in the default codepage to a ustring. Copies at most n characters.
+* @apicovered                  i18n_ustring_copy_ua_n
+* @passcase                            When i18n_ustring_copy_ua_n is successful
+* @failcase                            If target i18n_ustring_copy_ua_n fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_copy_ua_n_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       i18n_uchar *pRet = NULL;
+
+       char szSource[I18N_UCHAR_CAPACITY] = {0};
+       char *pszUStringCopyAUMemLog = NULL;
+       char *pszUStringCopyAUSpeedLog = NULL;
+       int nUStringCopyAUFailCount = 0;
+#if MEMORY_CHECK
+       pszUStringCopyAUMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUStringCopyAUSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               int nUcharSourceLength = 0;
+               memset(szSource, 0, sizeof(szSource));
+               sprintf(szSource, "Tizen%d", (nLoopCount+1));
+               i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
+               i18n_uchar ucharDest[I18N_UCHAR_CAPACITY] = {0,};
+               i18n_ustring_copy_ua_n(ucharSource, szSource, strlen(szSource));
+               nUcharSourceLength = i18n_ustring_get_length(ucharSource);
+               if(nUcharSourceLength <= 0)
+               {
+                       nUStringCopyAUFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed \n", __LINE__, API_NAMESPACE);
+                       continue;
+               }
+
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_copy_ua_n(ucharDest, szSource, nUcharSourceLength);
+               BaseUtilsGetExecutionDelay(pszUStringCopyAUSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUStringCopyAUMemLog);
+               if(pRet == NULL || i18n_ustring_get_length(ucharDest) <= 0)
+               {
+                       nUStringCopyAUFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n Failed in iteration %d \n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               //PRINT_RESULT_LOOP(nRetVal,"i18n_ustring_copy_ua_n",nUStringCopyAUFailCount);
+               int nResult = -1;
+               nResult = i18n_ustring_compare(ucharSource, ucharDest);
+               /*if(nRetVal != I18N_ERROR_NONE)
+               {
+                       nUStringCopyAUFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] PostRequisite API i18n_ustring_compare Failed after the execution of target API i18n_ustring_copy_ua_n, on iteration %d, ErrorCode Returned = %s\n", __LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(nRetVal));
+                       continue;
+               }*/
+               if(nResult != 0)
+               {
+                       nUStringCopyAUFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed on iteration %d, as uChar Source and uchar Destination Strings are NOT Equal\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+       }
+       memset(szSource, 0, sizeof(szSource));
+       VALIDATE_RESULT(nUStringCopyAUFailCount, "i18n_ustring_copy_ua_n", pszUStringCopyAUMemLog, pszUStringCopyAUSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_copy_ua_n", pszUStringCopyAUSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_copy_ua_n", pszUStringCopyAUMemLog);
+#endif
+       FREE_MEMORY(pszUStringCopyAUMemLog, pszUStringCopyAUSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Copies a byte string encoded in the default codepage to a ustring.
+/**
+* @testcase                            ITc_i18n_ustring_copy_ua_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Copies a byte string encoded in the default codepage to a ustring.
+* @apicovered                  i18n_ustring_copy_ua
+* @passcase                            When i18n_ustring_copy_ua is successful
+* @failcase                            If target i18n_ustring_copy_ua fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_copy_ua_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       i18n_uchar *pRet = NULL;
+
+       char szSource[I18N_UCHAR_CAPACITY] = {0};
+       char *pszUStringCopyAUMemLog = NULL;
+       char *pszUStringCopyAUSpeedLog = NULL;
+       int nUStringCopyAUFailCount = 0;
+#if MEMORY_CHECK
+       pszUStringCopyAUMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUStringCopyAUSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               memset(szSource, 0, sizeof(szSource));
+               sprintf(szSource, "Tizen%d", (nLoopCount+1));
+               i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
+               i18n_uchar ucharDest[I18N_UCHAR_CAPACITY] = {0,};
+               i18n_ustring_copy_ua(ucharSource, szSource);
+
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_copy_ua(ucharDest, szSource);
+               BaseUtilsGetExecutionDelay(pszUStringCopyAUSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUStringCopyAUMemLog);
+               if(pRet == NULL || i18n_ustring_get_length(ucharDest) <= 0)
+               {
+                       nUStringCopyAUFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed on iteration %d \n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               //PRINT_RESULT_LOOP(nRetVal,"i18n_ustring_copy_ua",nUStringCopyAUFailCount);
+               int nResult = -1;
+               nResult = i18n_ustring_compare(ucharSource, ucharDest);
+               /*if(nRetVal != I18N_ERROR_NONE)
+               {
+                       nUStringCopyAUFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] PostRequisite API i18n_ustring_compare Failed after the execution of target API i18n_ustring_copy_ua, on iteration %d, ErrorCode Returned = %s\n", __LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(nRetVal));
+                       continue;
+               }*/
+               if(nResult != 0)
+               {
+                       nUStringCopyAUFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed on iteration %d, as uChar Source and uchar Destination Strings are NOT Equal\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+       }
+       memset(szSource, 0, sizeof(szSource));
+       VALIDATE_RESULT(nUStringCopyAUFailCount, "i18n_ustring_copy_ua", pszUStringCopyAUMemLog, pszUStringCopyAUSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_copy_ua", pszUStringCopyAUSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_copy_ua", pszUStringCopyAUMemLog);
+#endif
+       FREE_MEMORY(pszUStringCopyAUMemLog, pszUStringCopyAUSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Copies a ustring. Copies at most n characters.
+/**
+* @testcase                            ITc_i18n_ustring_copy_n_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Copies a ustring. Adds a null terminator.  Copies at most n characters.
+* @apicovered                  i18n_ustring_copy_n
+* @passcase                            When i18n_ustring_copy_n is successful
+* @failcase                            If target i18n_ustring_copy_n fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_copy_n_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       i18n_uchar *pRet = NULL;
+
+       char *pszUStringCopyMemLog = NULL;
+       char *pszUStringCopySpeedLog = NULL;
+       int nUStringCopyFailCount = 0;
+       i18n_uchar uSourceStr[I18N_UCHAR_CAPACITY] = { 0, };
+       pRet = i18n_ustring_copy_ua_n(uSourceStr, (char *)SOURCE_STRING, strlen(SOURCE_STRING));
+       int nSourceLength = 0;
+       nSourceLength = i18n_ustring_get_length(uSourceStr);
+       if(pRet == NULL || nSourceLength <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in pre-condition\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       //PRINT_RESULT(nRetVal,"i18n_ustring_copy_ua_n");
+       //PRINT_RESULT(nRetVal,"i18n_ustring_get_length");
+#if MEMORY_CHECK
+       pszUStringCopyMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUStringCopySpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               i18n_uchar uDestStr[I18N_UCHAR_CAPACITY] = { 0, };
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_copy_n(uDestStr, uSourceStr, nSourceLength);
+               BaseUtilsGetExecutionDelay(pszUStringCopySpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszUStringCopyMemLog);
+               if(pRet == NULL || i18n_ustring_get_length(uDestStr) <= 0)
+               {
+                       nUStringCopyFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_n failed on iteration %d \n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               //PRINT_RESULT_LOOP(nRetVal,"i18n_ustring_copy_n",nUStringCopyFailCount);
+               int nResult = -1;
+               nResult = i18n_ustring_compare(uSourceStr, uDestStr);
+               /*if(nRetVal != I18N_ERROR_NONE)
+               {
+                       nUStringCopyFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] PostRequisite API i18n_ustring_compare Failed after the execution of target API i18n_ustring_copy_n, on iteration %d, ErrorCode Returned = %s\n", __LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(nRetVal));
+                       continue;
+               }*/
+               if(nResult != 0)
+               {
+                       nUStringCopyFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua failed on iteration %d, as uChar Source and uchar Destination Strings are NOT Equal\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+       }
+       VALIDATE_RESULT(nUStringCopyFailCount, "i18n_ustring_copy_n",pszUStringCopyMemLog, pszUStringCopySpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_copy_n", pszUStringCopySpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_copy_n", pszUStringCopyMemLog);
+#endif
+       FREE_MEMORY(pszUStringCopyMemLog, pszUStringCopySpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the property value for an enumerated property for a code point.
+/**
+* @testcase                            ITc_i18n_uchar_get_int_property_value_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Gets the property value for an enumerated property for a code point.
+* @apicovered                  i18n_uchar_get_int_property_value
+* @passcase                            When i18n_uchar_get_int_property_value is successful
+* @failcase                            If target i18n_uchar_get_int_property_value fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uchar_get_int_property_value_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszUStringTCaseMemLog = NULL;
+       char *pszUStringTCaseSpeedLog = NULL;
+       int nUStringTCaseFailCount = 0;
+       i18n_uchar_uproperty_e eUCharProperty[] = {     I18N_UCHAR_ALPHABETIC,
+                                                                                       //I18N_UCHAR_BINARY_START,
+                                                                                       I18N_UCHAR_ASCII_HEX_DIGIT,
+                                                                                       I18N_UCHAR_BIDI_CONTROL,
+                                                                                       I18N_UCHAR_BIDI_MIRRORED,
+                                                                                       I18N_UCHAR_DASH,
+                                                                                       I18N_UCHAR_DEFAULT_IGNORABLE_CODE_POINT,
+                                                                                       I18N_UCHAR_DEPRECATED,
+                                                                                       I18N_UCHAR_DIACRITIC,
+                                                                                       I18N_UCHAR_EXTENDER,
+                                                                                       I18N_UCHAR_FULL_COMPOSITION_EXCLUSION,
+                                                                                       I18N_UCHAR_GRAPHEME_BASE,
+                                                                                       I18N_UCHAR_GRAPHEME_EXTEND,
+                                                                                       I18N_UCHAR_GRAPHEME_LINK,
+                                                                                       I18N_UCHAR_HEX_DIGIT,
+                                                                                       I18N_UCHAR_HYPHEN,
+                                                                                       I18N_UCHAR_ID_CONTINUE,
+                                                                                       I18N_UCHAR_ID_START,
+                                                                                       I18N_UCHAR_IDEOGRAPHIC,
+                                                                                       I18N_UCHAR_IDS_BINARY_OPERATOR,
+                                                                                       I18N_UCHAR_IDS_TRINARY_OPERATOR,
+                                                                                       I18N_UCHAR_JOIN_CONTROL,
+                                                                                       I18N_UCHAR_LOGICAL_ORDER_EXCEPTION,
+                                                                                       I18N_UCHAR_LOWERCASE,
+                                                                                       I18N_UCHAR_MATH,
+                                                                                       I18N_UCHAR_NONCHARACTER_CODE_POINT,
+                                                                                       I18N_UCHAR_QUOTATION_MARK,
+                                                                                       I18N_UCHAR_RADICAL,
+                                                                                       I18N_UCHAR_SOFT_DOTTED,
+                                                                                       I18N_UCHAR_TERMINAL_PUNCTUATION,
+                                                                                       I18N_UCHAR_UNIFIED_IDEOGRAPH,
+                                                                                       I18N_UCHAR_UPPERCASE,
+                                                                                       I18N_UCHAR_WHITE_SPACE,
+                                                                                       I18N_UCHAR_XID_CONTINUE,
+                                                                                       I18N_UCHAR_XID_START,
+                                                                                       I18N_UCHAR_CASE_SENSITIVE,
+                                                                                       I18N_UCHAR_S_TERM,
+                                                                                       I18N_UCHAR_VARIATION_SELECTOR,
+                                                                                       I18N_UCHAR_NFD_INERT,
+                                                                                       I18N_UCHAR_NFKD_INERT,
+                                                                                       I18N_UCHAR_NFC_INERT,
+                                                                                       I18N_UCHAR_NFKC_INERT,
+                                                                                       I18N_UCHAR_SEGMENT_STARTER,
+                                                                                       I18N_UCHAR_PATTERN_SYNTAX,
+                                                                                       I18N_UCHAR_PATTERN_WHITE_SPACE,
+                                                                                       I18N_UCHAR_POSIX_ALNUM,
+                                                                                       I18N_UCHAR_POSIX_BLANK,
+                                                                                       I18N_UCHAR_POSIX_GRAPH,
+                                                                                       I18N_UCHAR_POSIX_PRINT,
+                                                                                       I18N_UCHAR_POSIX_XDIGIT,
+                                                                                       I18N_UCHAR_CASED,
+                                                                                       I18N_UCHAR_CASE_IGNORABLE,
+                                                                                       I18N_UCHAR_CHANGES_WHEN_LOWERCASED,
+                                                                                       I18N_UCHAR_CHANGES_WHEN_UPPERCASED,
+                                                                                       I18N_UCHAR_CHANGES_WHEN_TITLECASED,
+                                                                                       I18N_UCHAR_CHANGES_WHEN_CASEFOLDED,
+                                                                                       I18N_UCHAR_CHANGES_WHEN_CASEMAPPED,
+                                                                                       I18N_UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED,
+                                                                                       I18N_UCHAR_BINARY_LIMIT,
+                                                                                       I18N_UCHAR_BIDI_CLASS,
+                                                                                       I18N_UCHAR_INT_START,
+                                                                                       I18N_UCHAR_BLOCK,
+                                                                                       I18N_UCHAR_CANONICAL_COMBINING_CLASS,
+                                                                                       I18N_UCHAR_DECOMPOSITION_TYPE,
+                                                                                       I18N_UCHAR_EAST_ASIAN_WIDTH,
+                                                                                       I18N_UCHAR_GENERAL_CATEGORY,
+                                                                                       I18N_UCHAR_JOINING_GROUP,
+                                                                                       I18N_UCHAR_JOINING_TYPE,
+                                                                                       I18N_UCHAR_LINE_BREAK,
+                                                                                       I18N_UCHAR_NUMERIC_TYPE,
+                                                                                       I18N_UCHAR_SCRIPT,
+                                                                                       I18N_UCHAR_HANGUL_SYLLABLE_TYPE,
+                                                                                       I18N_UCHAR_NFD_QUICK_CHECK,
+                                                                                       I18N_UCHAR_NFKD_QUICK_CHECK,
+                                                                                       I18N_UCHAR_NFC_QUICK_CHECK,
+                                                                                       I18N_UCHAR_NFKC_QUICK_CHECK,
+                                                                                       I18N_UCHAR_LEAD_CANONICAL_COMBINING_CLASS,
+                                                                                       I18N_UCHAR_TRAIL_CANONICAL_COMBINING_CLASS,
+                                                                                       I18N_UCHAR_GRAPHEME_CLUSTER_BREAK,
+                                                                                       I18N_UCHAR_SENTENCE_BREAK,
+                                                                                       I18N_UCHAR_WORD_BREAK,
+                                                                                       I18N_UCHAR_BIDI_PAIRED_BRACKET_TYPE,
+                                                                                       I18N_UCHAR_INT_LIMIT,
+                                                                                       I18N_UCHAR_GENERAL_CATEGORY_MASK,
+                                                                                       I18N_UCHAR_MASK_START,
+                                                                                       I18N_UCHAR_MASK_LIMIT,
+                                                                                       I18N_UCHAR_NUMERIC_VALUE,
+                                                                                       I18N_UCHAR_DOUBLE_START,
+                                                                                       I18N_UCHAR_DOUBLE_LIMIT,
+                                                                                       I18N_UCHAR_AGE,
+                                                                                       I18N_UCHAR_STRING_START,
+                                                                                       I18N_UCHAR_BIDI_MIRRORING_GLYPH,
+                                                                                       I18N_UCHAR_CASE_FOLDING,
+                                                                                       I18N_UCHAR_LOWERCASE_MAPPING,
+                                                                                       I18N_UCHAR_NAME,
+                                                                                       I18N_UCHAR_SIMPLE_CASE_FOLDING,
+                                                                                       I18N_UCHAR_SIMPLE_LOWERCASE_MAPPING,
+                                                                                       I18N_UCHAR_SIMPLE_TITLECASE_MAPPING,
+                                                                                       I18N_UCHAR_SIMPLE_UPPERCASE_MAPPING,
+                                                                                       I18N_UCHAR_TITLECASE_MAPPING,
+                                                                                       I18N_UCHAR_UPPERCASE_MAPPING,
+                                                                                       I18N_UCHAR_BIDI_PAIRED_BRACKET,
+                                                                                       I18N_UCHAR_STRING_LIMIT,
+                                                                                       I18N_UCHAR_SCRIPT_EXTENSIONS,
+                                                                                       I18N_UCHAR_OTHER_PROPERTY_START,
+                                                                                       I18N_UCHAR_OTHER_PROPERTY_LIMIT,
+                                                                                       I18N_UCHAR_INVALID_CODE};
+       int nEnumSize = sizeof(eUCharProperty) / sizeof(eUCharProperty[0]);
+       int nEnumCounter = 0;
+#if MEMORY_CHECK
+       pszUStringTCaseMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUStringTCaseSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       i18n_uchar32 uChar32TextCode = 0xA;
+                       //i18n_uchar_uproperty_e which = I18N_UCHAR_ASCII_HEX_DIGIT;
+                       int nPropertyValue = 0;
+                       //FPRINTF("\\n[Line : %d][%s] Executing i18n_uchar_get_int_property_value with eUCharProperty = %s and uChar32Code =%s on iteration %d, \n", __LINE__, API_NAMESPACE, uCharPropertyName(eUCharProperty[nEnumCounter]), uChar32TextCode, nLoopCount);
+                       FPRINTF("\\n[Line : %d][%s] Executing i18n_uchar_get_int_property_value with eUCharProperty = %s on iteration %d, \n", __LINE__, API_NAMESPACE, uCharPropertyName(eUCharProperty[nEnumCounter]), nLoopCount);
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_uchar_get_int_property_value(uChar32TextCode, eUCharProperty[nEnumCounter], &nPropertyValue);
+                       BaseUtilsGetExecutionDelay(pszUStringTCaseSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszUStringTCaseMemLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_uchar_get_int_property_value",nUStringTCaseFailCount);
+               }
+       }
+       VALIDATE_RESULT(nUStringTCaseFailCount, "i18n_uchar_get_int_property_value",pszUStringTCaseMemLog, pszUStringTCaseSpeedLog, MAX_COUNT * nEnumSize);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_uchar_get_int_property_value", pszUStringTCaseSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_uchar_get_int_property_value", pszUStringTCaseMemLog);
+#endif
+       FREE_MEMORY(pszUStringTCaseMemLog, pszUStringTCaseSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the Unicode allocation block that contains the character.
+/**
+* @testcase                            ITc_i18n_uchar_get_ublock_code_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns the Unicode allocation block that contains the character.
+* @apicovered                  i18n_uchar_get_ublock_code
+* @passcase                            When i18n_uchar_get_ublock_code is successful
+* @failcase                            If target i18n_uchar_get_ublock_code fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_uchar_get_ublock_code_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszUStringTCaseMemLog = NULL;
+       char *pszUStringTCaseSpeedLog = NULL;
+       int nUStringTCaseFailCount = 0;
+       i18n_uchar_ublock_code_e eUCharBlockCode[] = {  I18N_UCHAR_UBLOCK_NO_BLOCK,
+                                                                                               I18N_UCHAR_UBLOCK_BASIC_LATIN,
+                                                                                               I18N_UCHAR_UBLOCK_LATIN_1_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_LATIN_EXTENDED_A,
+                                                                                               I18N_UCHAR_UBLOCK_LATIN_EXTENDED_B,
+                                                                                               I18N_UCHAR_UBLOCK_IPA_EXTENSIONS,
+                                                                                               I18N_UCHAR_UBLOCK_SPACING_MODIFIER_LETTERS,
+                                                                                               I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS,
+                                                                                               I18N_UCHAR_UBLOCK_GREEK,
+                                                                                               I18N_UCHAR_UBLOCK_CYRILLIC,
+                                                                                               I18N_UCHAR_UBLOCK_ARMENIAN,
+                                                                                               I18N_UCHAR_UBLOCK_HEBREW,
+                                                                                               I18N_UCHAR_UBLOCK_ARABIC,
+                                                                                               I18N_UCHAR_UBLOCK_SYRIAC,
+                                                                                               I18N_UCHAR_UBLOCK_THAANA,
+                                                                                               I18N_UCHAR_UBLOCK_DEVANAGARI,
+                                                                                               I18N_UCHAR_UBLOCK_BENGALI,
+                                                                                               I18N_UCHAR_UBLOCK_GURMUKHI,
+                                                                                               I18N_UCHAR_UBLOCK_GUJARATI,
+                                                                                               I18N_UCHAR_UBLOCK_ORIYA,
+                                                                                               I18N_UCHAR_UBLOCK_TAMIL,
+                                                                                               I18N_UCHAR_UBLOCK_TELUGU,
+                                                                                               I18N_UCHAR_UBLOCK_KANNADA,
+                                                                                               I18N_UCHAR_UBLOCK_MALAYALAM,
+                                                                                               I18N_UCHAR_UBLOCK_SINHALA,
+                                                                                               I18N_UCHAR_UBLOCK_THAI,
+                                                                                               I18N_UCHAR_UBLOCK_LAO,
+                                                                                               I18N_UCHAR_UBLOCK_TIBETAN,
+                                                                                               I18N_UCHAR_UBLOCK_MYANMAR,
+                                                                                               I18N_UCHAR_UBLOCK_GEORGIAN,
+                                                                                               I18N_UCHAR_UBLOCK_HANGUL_JAMO,
+                                                                                               I18N_UCHAR_UBLOCK_ETHIOPIC,
+                                                                                               I18N_UCHAR_UBLOCK_CHEROKEE,
+                                                                                               I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS,
+                                                                                               I18N_UCHAR_UBLOCK_OGHAM,
+                                                                                               I18N_UCHAR_UBLOCK_RUNIC,
+                                                                                               I18N_UCHAR_UBLOCK_KHMER,
+                                                                                               I18N_UCHAR_UBLOCK_MONGOLIAN,
+                                                                                               I18N_UCHAR_UBLOCK_LATIN_EXTENDED_ADDITIONAL,
+                                                                                               I18N_UCHAR_UBLOCK_GREEK_EXTENDED,
+                                                                                               I18N_UCHAR_UBLOCK_GENERAL_PUNCTUATION,
+                                                                                               I18N_UCHAR_UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS,
+                                                                                               I18N_UCHAR_UBLOCK_CURRENCY_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_COMBINING_MARKS_FOR_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_LETTERLIKE_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_NUMBER_FORMS,
+                                                                                               I18N_UCHAR_UBLOCK_ARROWS,
+                                                                                               I18N_UCHAR_UBLOCK_MATHEMATICAL_OPERATORS,
+                                                                                               I18N_UCHAR_UBLOCK_MISCELLANEOUS_TECHNICAL,
+                                                                                               I18N_UCHAR_UBLOCK_CONTROL_PICTURES,
+                                                                                               I18N_UCHAR_UBLOCK_OPTICAL_CHARACTER_RECOGNITION,
+                                                                                               I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERICS,
+                                                                                               I18N_UCHAR_UBLOCK_BOX_DRAWING,
+                                                                                               I18N_UCHAR_UBLOCK_BLOCK_ELEMENTS,
+                                                                                               I18N_UCHAR_UBLOCK_GEOMETRIC_SHAPES,
+                                                                                               I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_DINGBATS,
+                                                                                               I18N_UCHAR_UBLOCK_BRAILLE_PATTERNS,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_RADICALS_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_KANGXI_RADICALS,
+                                                                                               I18N_UCHAR_UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION,
+                                                                                               I18N_UCHAR_UBLOCK_HIRAGANA,
+                                                                                               I18N_UCHAR_UBLOCK_KATAKANA,
+                                                                                               I18N_UCHAR_UBLOCK_BOPOMOFO,
+                                                                                               I18N_UCHAR_UBLOCK_HANGUL_COMPATIBILITY_JAMO,
+                                                                                               I18N_UCHAR_UBLOCK_KANBUN,
+                                                                                               I18N_UCHAR_UBLOCK_BOPOMOFO_EXTENDED,
+                                                                                               I18N_UCHAR_UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS,
+                                                                                               I18N_UCHAR_UBLOCK_YI_SYLLABLES,
+                                                                                               I18N_UCHAR_UBLOCK_YI_RADICALS,
+                                                                                               I18N_UCHAR_UBLOCK_HANGUL_SYLLABLES,
+                                                                                               I18N_UCHAR_UBLOCK_HIGH_SURROGATES,
+                                                                                               I18N_UCHAR_UBLOCK_HIGH_PRIVATE_USE_SURROGATES,
+                                                                                               I18N_UCHAR_UBLOCK_LOW_SURROGATES,
+                                                                                               I18N_UCHAR_UBLOCK_PRIVATE_USE_AREA,
+                                                                                               I18N_UCHAR_UBLOCK_PRIVATE_USE,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS,
+                                                                                               I18N_UCHAR_UBLOCK_ALPHABETIC_PRESENTATION_FORMS,
+                                                                                               I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_A,
+                                                                                               I18N_UCHAR_UBLOCK_COMBINING_HALF_MARKS,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_FORMS,
+                                                                                               I18N_UCHAR_UBLOCK_SMALL_FORM_VARIANTS,
+                                                                                               I18N_UCHAR_UBLOCK_ARABIC_PRESENTATION_FORMS_B,
+                                                                                               I18N_UCHAR_UBLOCK_SPECIALS,
+                                                                                               I18N_UCHAR_UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS,
+                                                                                               I18N_UCHAR_UBLOCK_OLD_ITALIC,
+                                                                                               I18N_UCHAR_UBLOCK_GOTHIC,
+                                                                                               I18N_UCHAR_UBLOCK_DESERET,
+                                                                                               I18N_UCHAR_UBLOCK_BYZANTINE_MUSICAL_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_MUSICAL_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_TAGS,
+                                                                                               I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_CYRILLIC_SUPPLEMENTARY,
+                                                                                               I18N_UCHAR_UBLOCK_TAGALOG,
+                                                                                               I18N_UCHAR_UBLOCK_HANUNOO,
+                                                                                               I18N_UCHAR_UBLOCK_BUHID,
+                                                                                               I18N_UCHAR_UBLOCK_TAGBANWA,
+                                                                                               I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A,
+                                                                                               I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_A,
+                                                                                               I18N_UCHAR_UBLOCK_SUPPLEMENTAL_ARROWS_B,
+                                                                                               I18N_UCHAR_UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B,
+                                                                                               I18N_UCHAR_UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS,
+                                                                                               I18N_UCHAR_UBLOCK_KATAKANA_PHONETIC_EXTENSIONS,
+                                                                                               I18N_UCHAR_UBLOCK_VARIATION_SELECTORS,
+                                                                                               I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A,
+                                                                                               I18N_UCHAR_UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B,
+                                                                                               I18N_UCHAR_UBLOCK_LIMBU,
+                                                                                               I18N_UCHAR_UBLOCK_TAI_LE,
+                                                                                               I18N_UCHAR_UBLOCK_KHMER_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS,
+                                                                                               I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS,
+                                                                                               I18N_UCHAR_UBLOCK_YIJING_HEXAGRAM_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_LINEAR_B_SYLLABARY,
+                                                                                               I18N_UCHAR_UBLOCK_LINEAR_B_IDEOGRAMS,
+                                                                                               I18N_UCHAR_UBLOCK_AEGEAN_NUMBERS,
+                                                                                               I18N_UCHAR_UBLOCK_UGARITIC,
+                                                                                               I18N_UCHAR_UBLOCK_SHAVIAN,
+                                                                                               I18N_UCHAR_UBLOCK_OSMANYA,
+                                                                                               I18N_UCHAR_UBLOCK_CYPRIOT_SYLLABARY,
+                                                                                               I18N_UCHAR_UBLOCK_TAI_XUAN_JING_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_VARIATION_SELECTORS_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION,
+                                                                                               I18N_UCHAR_UBLOCK_ANCIENT_GREEK_NUMBERS,
+                                                                                               I18N_UCHAR_UBLOCK_ARABIC_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_BUGINESE,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_STROKES,
+                                                                                               I18N_UCHAR_UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_COPTIC,
+                                                                                               I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED,
+                                                                                               I18N_UCHAR_UBLOCK_ETHIOPIC_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_GEORGIAN_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_GLAGOLITIC,
+                                                                                               I18N_UCHAR_UBLOCK_KHAROSHTHI,
+                                                                                               I18N_UCHAR_UBLOCK_MODIFIER_TONE_LETTERS,
+                                                                                               I18N_UCHAR_UBLOCK_NEW_TAI_LUE,
+                                                                                               I18N_UCHAR_UBLOCK_OLD_PERSIAN,
+                                                                                               I18N_UCHAR_UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_SUPPLEMENTAL_PUNCTUATION,
+                                                                                               I18N_UCHAR_UBLOCK_SYLOTI_NAGRI,
+                                                                                               I18N_UCHAR_UBLOCK_TIFINAGH,
+                                                                                               I18N_UCHAR_UBLOCK_VERTICAL_FORMS,
+                                                                                               I18N_UCHAR_UBLOCK_NKO,
+                                                                                               I18N_UCHAR_UBLOCK_BALINESE,
+                                                                                               I18N_UCHAR_UBLOCK_LATIN_EXTENDED_C,
+                                                                                               I18N_UCHAR_UBLOCK_LATIN_EXTENDED_D,
+                                                                                               I18N_UCHAR_UBLOCK_PHAGS_PA,
+                                                                                               I18N_UCHAR_UBLOCK_PHOENICIAN,
+                                                                                               I18N_UCHAR_UBLOCK_CUNEIFORM,
+                                                                                               I18N_UCHAR_UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION,
+                                                                                               I18N_UCHAR_UBLOCK_COUNTING_ROD_NUMERALS,
+                                                                                               I18N_UCHAR_UBLOCK_SUNDANESE,
+                                                                                               I18N_UCHAR_UBLOCK_LEPCHA,
+                                                                                               I18N_UCHAR_UBLOCK_OL_CHIKI,
+                                                                                               I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_A,
+                                                                                               I18N_UCHAR_UBLOCK_VAI,
+                                                                                               I18N_UCHAR_UBLOCK_CYRILLIC_EXTENDED_B,
+                                                                                               I18N_UCHAR_UBLOCK_SAURASHTRA,
+                                                                                               I18N_UCHAR_UBLOCK_KAYAH_LI,
+                                                                                               I18N_UCHAR_UBLOCK_REJANG,
+                                                                                               I18N_UCHAR_UBLOCK_CHAM,
+                                                                                               I18N_UCHAR_UBLOCK_ANCIENT_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_PHAISTOS_DISC,
+                                                                                               I18N_UCHAR_UBLOCK_LYCIAN,
+                                                                                               I18N_UCHAR_UBLOCK_CARIAN,
+                                                                                               I18N_UCHAR_UBLOCK_LYDIAN,
+                                                                                               I18N_UCHAR_UBLOCK_MAHJONG_TILES,
+                                                                                               I18N_UCHAR_UBLOCK_DOMINO_TILES,
+                                                                                               I18N_UCHAR_UBLOCK_SAMARITAN,
+                                                                                               I18N_UCHAR_UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED,
+                                                                                               I18N_UCHAR_UBLOCK_TAI_THAM,
+                                                                                               I18N_UCHAR_UBLOCK_VEDIC_EXTENSIONS,
+                                                                                               I18N_UCHAR_UBLOCK_LISU,
+                                                                                               I18N_UCHAR_UBLOCK_BAMUM,
+                                                                                               I18N_UCHAR_UBLOCK_COMMON_INDIC_NUMBER_FORMS,
+                                                                                               I18N_UCHAR_UBLOCK_DEVANAGARI_EXTENDED,
+                                                                                               I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_A,
+                                                                                               I18N_UCHAR_UBLOCK_JAVANESE,
+                                                                                               I18N_UCHAR_UBLOCK_MYANMAR_EXTENDED_A,
+                                                                                               I18N_UCHAR_UBLOCK_TAI_VIET,
+                                                                                               I18N_UCHAR_UBLOCK_MEETEI_MAYEK,
+                                                                                               I18N_UCHAR_UBLOCK_HANGUL_JAMO_EXTENDED_B,
+                                                                                               I18N_UCHAR_UBLOCK_IMPERIAL_ARAMAIC,
+                                                                                               I18N_UCHAR_UBLOCK_OLD_SOUTH_ARABIAN,
+                                                                                               I18N_UCHAR_UBLOCK_AVESTAN,
+                                                                                               I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PARTHIAN,
+                                                                                               I18N_UCHAR_UBLOCK_INSCRIPTIONAL_PAHLAVI,
+                                                                                               I18N_UCHAR_UBLOCK_OLD_TURKIC,
+                                                                                               I18N_UCHAR_UBLOCK_RUMI_NUMERAL_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_KAITHI,
+                                                                                               I18N_UCHAR_UBLOCK_EGYPTIAN_HIEROGLYPHS,
+                                                                                               I18N_UCHAR_UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C,
+                                                                                               I18N_UCHAR_UBLOCK_MANDAIC,
+                                                                                               I18N_UCHAR_UBLOCK_BATAK,
+                                                                                               I18N_UCHAR_UBLOCK_ETHIOPIC_EXTENDED_A,
+                                                                                               I18N_UCHAR_UBLOCK_BRAHMI,
+                                                                                               I18N_UCHAR_UBLOCK_BAMUM_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_KANA_SUPPLEMENT,
+                                                                                               I18N_UCHAR_UBLOCK_PLAYING_CARDS,
+                                                                                               I18N_UCHAR_UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS,
+                                                                                               I18N_UCHAR_UBLOCK_EMOTICONS,
+                                                                                               I18N_UCHAR_UBLOCK_TRANSPORT_AND_MAP_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_ALCHEMICAL_SYMBOLS,
+                                                                                               I18N_UCHAR_UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D,
+                                                                                               I18N_UCHAR_UBLOCK_COUNT,
+                                                                                               I18N_UCHAR_UBLOCK_INVALID_CODE};
+       int nEnumSize = sizeof(eUCharBlockCode) / sizeof(eUCharBlockCode[0]);
+       int nEnumCounter = 0;
+#if MEMORY_CHECK
+       pszUStringTCaseMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszUStringTCaseSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       FPRINTF("\\n[Line : %d][%s] Executing i18n_uchar_get_ublock_code with eUCharBlockCode = %s on iteration %d, \n", __LINE__, API_NAMESPACE, uCharBlockCode(eUCharBlockCode[nEnumCounter]), nLoopCount);
+                       i18n_uchar32 uChar32TextCode = 0xA;
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRetVal = i18n_uchar_get_ublock_code(uChar32TextCode, &eUCharBlockCode[nEnumCounter]);
+                       BaseUtilsGetExecutionDelay(pszUStringTCaseSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszUStringTCaseMemLog);
+                       PRINT_RESULT_LOOP(nRetVal,"i18n_uchar_get_ublock_code",nUStringTCaseFailCount);
+               }
+       }
+       VALIDATE_RESULT(nUStringTCaseFailCount, "i18n_uchar_get_ublock_code",pszUStringTCaseMemLog, pszUStringTCaseSpeedLog, MAX_COUNT * nEnumSize);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_uchar_get_ublock_code", pszUStringTCaseSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_uchar_get_ublock_code", pszUStringTCaseMemLog);
+#endif
+       FREE_MEMORY(pszUStringTCaseMemLog, pszUStringTCaseSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Upper case the character in a string.
+/**
+* @testcase                            ITc_i18n_ustring_to_upper_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Upper case the character in a string.
+* @apicovered                  i18n_ustring_to_upper
+* @passcase                            When i18n_ustring_to_upper is successful
+* @failcase                            If target i18n_ustring_to_upper API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_to_upper_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, SOURCE_STRING, strlen(SOURCE_STRING));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       int32_t src_len = -1;
+       const char *locale = NULL;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ustring_to_upper(szDest, dest_capacity, szSrc, src_len, locale, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRetVal < 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_upper failed in iteration : %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if(ErrorCode != I18N_ERROR_NONE)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_upper failed in iteration %d. Error code returned = %s\n",__LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(ErrorCode));
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_to_upper", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_to_upper", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_to_upper", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Count unicode code points in the length i18n_uchar code units of the string.
+/**
+* @testcase                            ITc_i18n_ustring_count_char32_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Count unicode code points in the length i18n_uchar code units of the string.
+* @apicovered                  i18n_ustring_count_char32
+* @passcase                            When i18n_ustring_count_char32 is successful
+* @failcase                            If target i18n_ustring_count_char32 API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_count_char32_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, SOURCE_STRING, strlen(SOURCE_STRING));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t length = -1;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRetVal = i18n_ustring_count_char32(szSrc, length);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRetVal < 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_count_char32 failed in iteration = %d. Returned value = %d\n",__LINE__, API_NAMESPACE, nLoopCount,nRetVal);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_count_char32", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_count_char32", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_count_char32", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Check if the string contain more unicode code than a certain number.
+/**
+* @testcase                            ITc_i18n_ustring_has_more_char32_than_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Check if the string contain more unicode code than a certain number.
+* @apicovered                  i18n_ustring_has_more_char32_than
+* @passcase                            When i18n_ustring_has_more_char32_than is successful
+* @failcase                            If target i18n_ustring_has_more_char32_than API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_has_more_char32_than_p(void)
+{
+       START_TEST;
+       bool bRetVal = false;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, SOURCE_STRING, strlen(SOURCE_STRING));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t length = -1;
+       int32_t number = 1;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               bRetVal = i18n_ustring_has_more_char32_than(szSrc, length, number);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(bRetVal == false)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_has_more_char32_than failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_has_more_char32_than", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_has_more_char32_than", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_has_more_char32_than", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Concatenate two string.
+/**
+* @testcase                            ITc_i18n_ustring_cat_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Concatenate two string.
+* @apicovered                  i18n_ustring_cat
+* @passcase                            When i18n_ustring_cat is successful
+* @failcase                            If target i18n_ustring_cat API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_cat_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, (char *)SOURCE_STRING, strlen((char *)SOURCE_STRING));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_cat(szDest, szSrc);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(i18n_ustring_get_length(szDest) <= 0 || pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_cat failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_cat", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_cat", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_cat", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Concatenate two string.
+/**
+* @testcase                            ITc_i18n_ustring_cat_n_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Concatenate two string.
+* @apicovered                  i18n_ustring_cat_n
+* @passcase                            When i18n_ustring_cat_n is successful
+* @failcase                            If target i18n_ustring_cat_n API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_cat_n_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, SOURCE_STRING, strlen(SOURCE_STRING));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+       int32_t number = 5;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_cat_n(szDest, szSrc, number);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(i18n_ustring_get_length(szDest) <= 0 || pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_cat_n failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_cat_n", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_cat_n", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_cat_n", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the first occurrence of a substring in a string.
+/**
+* @testcase                            ITc_i18n_ustring_string_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the first occurrence of a substring in a string.
+* @apicovered                  i18n_ustring_string
+* @passcase                            When i18n_ustring_string is successful
+* @failcase                            If target i18n_ustring_string API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_string_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "XYZABC", strlen("XYZABC"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar szSubStr[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSubStr, "ABC", strlen("ABC"));
+       if(i18n_ustring_get_length(szSubStr) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_string(szSrc, szSubStr);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_string failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_string", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_string", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_string", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the first occurrence of a substring in a string.
+/**
+* @testcase                            ITc_i18n_ustring_find_first_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the first occurrence of a substring in a string.
+* @apicovered                  i18n_ustring_find_first
+* @passcase                            When i18n_ustring_find_first is successful
+* @failcase                            If target i18n_ustring_find_first API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_find_first_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "XYZABC", strlen("XYZABC"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t length = -1;
+       i18n_uchar szSubStr[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSubStr, "ABC", strlen("ABC"));
+       if(i18n_ustring_get_length(szSubStr) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t sub_length = -1;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_find_first(szSrc, length, szSubStr, sub_length);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_find_first failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_find_first", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_find_first", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_find_first", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the first occurrence of a BMP code point in a string.
+/**
+* @testcase                            ITc_i18n_ustring_char_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the first occurrence of a BMP code point in a string.
+* @apicovered                  i18n_ustring_char
+* @passcase                            When i18n_ustring_char is successful
+* @failcase                            If target i18n_ustring_char API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_char_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "XYZABC", strlen("XYZABC"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar szBMPPoint = 'A';
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_char(szSrc, szBMPPoint);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_char failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_char", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_char", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_char", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the first occurrence of a code point in a string.
+/**
+* @testcase                            ITc_i18n_ustring_char32_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the first occurrence of a code point in a string.
+* @apicovered                  i18n_ustring_char32
+* @passcase                            When i18n_ustring_char32 is successful
+* @failcase                            If target i18n_ustring_char32 API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_char32_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "XYZABC", strlen("XYZABC"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar szPoint = 'A';
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_char32(szSrc, szPoint);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_char32 failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_char32", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_char32", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_char32", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the last occurrence of a substring in a string.
+/**
+* @testcase                            ITc_i18n_ustring_r_string_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the last occurrence of a substring in a string.
+* @apicovered                  i18n_ustring_r_string
+* @passcase                            When i18n_ustring_r_string is successful
+* @failcase                            If target i18n_ustring_r_string API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_r_string_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "XYZABCQWEABC", strlen("XYZABCQWEABC"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar szSubStr[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSubStr, "ABC", strlen("ABC"));
+       if(i18n_ustring_get_length(szSubStr) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_r_string(szSrc, szSubStr);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_r_string failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_r_string", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_r_string", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_r_string", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the last occurrence of a substring in a string.
+/**
+* @testcase                            ITc_i18n_ustring_find_last_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the last occurrence of a substring in a string.
+* @apicovered                  i18n_ustring_find_last
+* @passcase                            When i18n_ustring_find_last is successful
+* @failcase                            If target i18n_ustring_find_last API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_find_last_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "XYZABCQWEABC", strlen("XYZABCQWEABC"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar szSubStr[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSubStr, "ABC", strlen("ABC"));
+       if(i18n_ustring_get_length(szSubStr) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t length = -1;
+       int32_t sub_length = -1;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_find_last(szSrc, length, szSubStr, sub_length);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_find_last failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_find_last", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_find_last", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_find_last", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the last occurrence of a BMP code point in a string.
+/**
+* @testcase                            ITc_i18n_ustring_r_char_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the last occurrence of a BMP code point in a string.
+* @apicovered                  i18n_ustring_r_char
+* @passcase                            When i18n_ustring_r_char is successful
+* @failcase                            If target i18n_ustring_r_char API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_r_char_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "AXZABC", strlen("AXZABC"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar chBMPPoint = 'C';
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_r_char(szSrc, chBMPPoint);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_r_char failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_r_char", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_r_char", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_r_char", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the last occurrence of a BMP code point in a string.
+/**
+* @testcase                            ITc_i18n_ustring_r_char32_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the last occurrence of a BMP code point in a string.
+* @apicovered                  i18n_ustring_r_char32
+* @passcase                            When i18n_ustring_r_char32 is successful
+* @failcase                            If target i18n_ustring_r_char32 API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_r_char32_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "AXZABC", strlen("AXZABC"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar32 chBMPPoint = 'B';
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_r_char32(szSrc, chBMPPoint);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_r_char32 failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_r_char32", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_r_char32", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_r_char32", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Locate the first occurrence in the string string of any of the character in the string matche_set.
+/**
+* @testcase                            ITc_i18n_ustring_pbrk_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Locate the first occurrence in the string string of any of the character in the string matche_set.
+* @apicovered                  i18n_ustring_pbrk
+* @passcase                            When i18n_ustring_pbrk is successful
+* @failcase                            If target i18n_ustring_pbrk API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_pbrk_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar string[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(string, "ABC3XYZ4", strlen("ABC3XYZ4"));
+       if(i18n_ustring_get_length(string) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar match_set[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(match_set, "34", strlen("34"));
+       if(i18n_ustring_get_length(match_set) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_pbrk(string, match_set);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_pbrk failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_pbrk", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_pbrk", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_pbrk", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the number of consecutive character in string, beginning with the first, that do not occur somewhere in match set.
+/**
+* @testcase                            ITc_i18n_ustring_cspn_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns the number of consecutive character in string, beginning with the first, that do not occur somewhere in match set.
+* @apicovered                  i18n_ustring_cspn
+* @passcase                            When i18n_ustring_cspn is successful
+* @failcase                            If target i18n_ustring_cspn API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_cspn_p(void)
+{
+       START_TEST;
+       int nRet = -1;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar string[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(string, "ABCXYZ01234", strlen("ABCXYZ01234"));
+       if(i18n_ustring_get_length(string) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar match_set[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(match_set, "015", strlen("015"));
+       if(i18n_ustring_get_length(match_set) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRet = i18n_ustring_cspn(string, match_set);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRet == -1)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_cspn failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_cspn", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_cspn", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_cspn", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the number of consecutive character in string, beginning with the first, that occur somewhere in match set.
+/**
+* @testcase                            ITc_i18n_ustring_spn_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Returns the number of consecutive character in string, beginning with the first, that occur somewhere in match set.
+* @apicovered                  i18n_ustring_spn
+* @passcase                            When i18n_ustring_spn is successful
+* @failcase                            If target i18n_ustring_spn API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_spn_p(void)
+{
+       START_TEST;
+       int nRet = -1;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_uchar string[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(string, "ABCDEFGHXYZ01234", strlen("ABCDEFGHXYZ01234"));
+       if(i18n_ustring_get_length(string) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar match_set[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(match_set, "ABCD", strlen("ABCD"));
+       if(i18n_ustring_get_length(match_set) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRet = i18n_ustring_spn(string, match_set);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRet == -1)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_spn failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_spn", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_spn", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_spn", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: The string tokenizer API allows to break a string into tokens.
+/**
+* @testcase                            ITc_i18n_ustring_tokenizer_r_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            The string tokenizer API allows to break a string into tokens.
+* @apicovered                  i18n_ustring_tokenizer_r
+* @passcase                            When i18n_ustring_tokenizer_r is successful
+* @failcase                            If target i18n_ustring_tokenizer_r API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_tokenizer_r_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar src[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(src, "This-is-just-testing", strlen("This-is-just-testing"));
+       if(i18n_ustring_get_length(src) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar delim[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(delim, "-", strlen("-"));
+       if(i18n_ustring_get_length(delim) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar *save_state;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_tokenizer_r(src, delim, &save_state);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_tokenizer_r failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_tokenizer_r", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_tokenizer_r", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_tokenizer_r", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compare two unicode string in code point order.
+/**
+* @testcase                            ITc_i18n_ustring_compare_code_point_order_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compare two unicode string in code point order.
+* @apicovered                  i18n_ustring_compare_code_point_order
+* @passcase                            When i18n_ustring_compare_code_point_order is successful
+* @failcase                            If target i18n_ustring_compare_code_point_order API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_compare_code_point_order_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       //int nFailCount = 0;
+
+       i18n_uchar s1[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s1, "ABCD", strlen("ABCD"));
+       if(i18n_ustring_get_length(s1) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar s2[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s2, "ADBC", strlen("ADBC"));
+       if(i18n_ustring_get_length(s2) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRet = i18n_ustring_compare_code_point_order(s1, s2);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRet == 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is equal to second one in code point order\n",__LINE__, API_NAMESPACE);
+               }
+               else if(nRet > 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is greater than second one in code point order\n",__LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is less than second one in code point order\n",__LINE__, API_NAMESPACE);
+               }
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_ustring_compare_code_point_order", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_compare_code_point_order", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_compare_code_point_order", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compare two unicode string in binary order.
+/**
+* @testcase                            ITc_i18n_ustring_compare_binary_order_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compare two unicode string in binary order.
+* @apicovered                  i18n_ustring_compare_binary_order
+* @passcase                            When i18n_ustring_compare_binary_order is successful
+* @failcase                            If target i18n_ustring_compare_binary_order API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_compare_binary_order_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       //int nFailCount = 0;
+
+       i18n_uchar s1[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s1, "ABCD", strlen("ABCD"));
+       if(i18n_ustring_get_length(s1) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar s2[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s2, "ADBC", strlen("ADBC"));
+       if(i18n_ustring_get_length(s2) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t length1 = -1;
+       int32_t length2 = -1;
+       i18n_ubool code_point_order = false;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRet = i18n_ustring_compare_binary_order(s1, length1, s2, length2, code_point_order);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRet == 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is equal to second one in binary order\n",__LINE__, API_NAMESPACE);
+               }
+               else if(nRet > 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is greater than second one in binary order\n",__LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is less than second one in binary order\n",__LINE__, API_NAMESPACE);
+               }
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_ustring_compare_binary_order", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_compare_binary_order", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_compare_binary_order", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compare two string case-insensitively using full case folding.
+/**
+* @testcase                            ITc_i18n_ustring_case_compare_with_length_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compare two string case-insensitively using full case folding.
+* @apicovered                  i18n_ustring_case_compare_with_length
+* @passcase                            When i18n_ustring_case_compare_with_length is successful
+* @failcase                            If target i18n_ustring_case_compare_with_length API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_case_compare_with_length_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar s1[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s1, "ABCD", strlen("ABCD"));
+       if(i18n_ustring_get_length(s1) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar s2[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s2, "ADBC", strlen("ADBC"));
+       if(i18n_ustring_get_length(s2) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t length1 = -1;
+       int32_t length2 = -1;
+       uint32_t options[] = {I18N_USTRING_U_FOLD_CASE_DEFAULT, I18N_USTRING_U_COMPARE_CODE_POINT_ORDER,
+                                               I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I};
+       int nEnumSize = sizeof(options)/sizeof(options[0]);
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+       int nEnumCounter = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for(nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRet = i18n_ustring_case_compare_with_length(s1, length1, s2, length2, options[nEnumCounter], &ErrorCode);
+                       BaseUtilsGetExecutionDelay(pszSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszMemLog);
+                       if(ErrorCode != I18N_ERROR_NONE)
+                       {
+                               nFailCount++;
+                               FPRINTF("\\n[Line : %d][%s] i18n_ustring_case_compare_with_length failed in iteration = %d, Error Code = %s\n",__LINE__, API_NAMESPACE, nEnumCounter*MAX_COUNT+nLoopCount, BaseUtilsGetError(nRet));
+                               continue;
+                       }
+                       if(nRet == 0)
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is equal to second one\n",__LINE__, API_NAMESPACE);
+                       }
+                       else if(nRet > 0)
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is greater than second\n",__LINE__, API_NAMESPACE);
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is less than second\n",__LINE__, API_NAMESPACE);
+                       }
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_case_compare_with_length", pszMemLog, pszSpeedLog, MAX_COUNT*nEnumSize);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_case_compare_with_length", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_case_compare_with_length", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compare two string for bitwise equally. Compare at most n character.
+/**
+* @testcase                            ITc_i18n_ustring_compare_n_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compare two string for bitwise equally. Compare at most n character.
+* @apicovered                  i18n_ustring_compare_n
+* @passcase                            When i18n_ustring_compare_n is successful
+* @failcase                            If target i18n_ustring_compare_n API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_compare_n_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       //int nFailCount = 0;
+
+       i18n_uchar s1[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s1, "ABCDEFGH113", strlen("ABCDEFGH113"));
+       if(i18n_ustring_get_length(s1) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar s2[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s2, "ABCD1234", strlen("ABCD1234"));
+       if(i18n_ustring_get_length(s2) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t n = 4;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRet = i18n_ustring_compare_n(s1, s2, n);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRet == 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is equal to second one\n",__LINE__, API_NAMESPACE);
+               }
+               else if(nRet > 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is greater than second one\n",__LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is less than second one\n",__LINE__, API_NAMESPACE);
+               }
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_ustring_compare_n", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_compare_n", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_compare_n", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compare two uni code string in code point order.
+/**
+* @testcase                            ITc_i18n_ustring_compare_n_code_point_order_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compare two uni code string in code point order.
+* @apicovered                  i18n_ustring_compare_n_code_point_order
+* @passcase                            When i18n_ustring_compare_n_code_point_order is successful
+* @failcase                            If target i18n_ustring_compare_n_code_point_order API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_compare_n_code_point_order_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       //int nFailCount = 0;
+
+       i18n_uchar s1[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s1, "ABCDEFGH113", strlen("ABCDEFGH113"));
+       if(i18n_ustring_get_length(s1) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar s2[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s2, "ABCD1234", strlen("ABCD1234"));
+       if(i18n_ustring_get_length(s2) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t n = 4;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRet = i18n_ustring_compare_n_code_point_order(s1, s2, n);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRet == 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is equal to second one in code point order\n",__LINE__, API_NAMESPACE);
+               }
+               else if(nRet > 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is greater than second one in code point order\n",__LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is less than second one in code point order\n",__LINE__, API_NAMESPACE);
+               }
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_ustring_compare_n_code_point_order", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_compare_n_code_point_order", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_compare_n_code_point_order", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compare two string case-insensitively using full case folding.
+/**
+* @testcase                            ITc_i18n_ustring_case_compare_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compare two string case-insensitively using full case folding.
+* @apicovered                  i18n_ustring_case_compare
+* @passcase                            When i18n_ustring_case_compare is successful
+* @failcase                            If target i18n_ustring_case_compare API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_case_compare_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       //int nFailCount = 0;
+
+       i18n_uchar s1[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s1, "ABCDE", strlen("ABCDE"));
+       if(i18n_ustring_get_length(s1) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar s2[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s2, "ABDCE", strlen("ABDCE"));
+       if(i18n_ustring_get_length(s2) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       uint32_t options[] = {I18N_USTRING_U_FOLD_CASE_DEFAULT, I18N_USTRING_U_COMPARE_CODE_POINT_ORDER,
+                                               I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I};
+       int nEnumSize = sizeof(options)/sizeof(options[0]);
+       int nEnumCounter = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for(nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRet = i18n_ustring_case_compare(s1, s2, options[nEnumCounter]);
+                       BaseUtilsGetExecutionDelay(pszSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszMemLog);
+                       if(nRet == 0)
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is equal to second one\n",__LINE__, API_NAMESPACE);
+                       }
+                       else if(nRet > 0)
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is greater than second one\n",__LINE__, API_NAMESPACE);
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is less than second one\n",__LINE__, API_NAMESPACE);
+                       }
+               }
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_ustring_case_compare", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_case_compare", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_case_compare", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compare two string case-insensitively using full case folding.
+/**
+* @testcase                            ITc_i18n_ustring_case_compare_n_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compare two string case-insensitively using full case folding.
+* @apicovered                  i18n_ustring_case_compare_n
+* @passcase                            When i18n_ustring_case_compare_n is successful
+* @failcase                            If target i18n_ustring_case_compare_n API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_case_compare_n_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       //int nFailCount = 0;
+
+       i18n_uchar s1[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s1, "ABCDE234", strlen("ABCDE234"));
+       if(i18n_ustring_get_length(s1) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar s2[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s2, "ABCD1234", strlen("ABCD1234"));
+       if(i18n_ustring_get_length(s2) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       uint32_t options[] = {I18N_USTRING_U_FOLD_CASE_DEFAULT, I18N_USTRING_U_COMPARE_CODE_POINT_ORDER,
+                                               I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I};
+       int nEnumSize = sizeof(options)/sizeof(options[0]);
+       int32_t n = 4;
+       int nEnumCounter = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for(nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRet = i18n_ustring_case_compare_n(s1, s2, n, options[nEnumCounter]);
+                       BaseUtilsGetExecutionDelay(pszSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszMemLog);
+                       if(nRet == 0)
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is equal to second one\n",__LINE__, API_NAMESPACE);
+                       }
+                       else if(nRet > 0)
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is greater than second one\n",__LINE__, API_NAMESPACE);
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is less than second one\n",__LINE__, API_NAMESPACE);
+                       }
+               }
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_ustring_case_compare_n", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_case_compare_n", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_case_compare_n", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compare two string case-insensitively using full case folding.
+/**
+* @testcase                            ITc_i18n_ustring_mem_case_compare_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compare two string case-insensitively using full case folding.
+* @apicovered                  i18n_ustring_mem_case_compare
+* @passcase                            When i18n_ustring_mem_case_compare is successful
+* @failcase                            If target i18n_ustring_mem_case_compare API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_mem_case_compare_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       //int nFailCount = 0;
+
+       i18n_uchar s1[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s1, "ABCDE234", strlen("ABCDE234"));
+       if(i18n_ustring_get_length(s1) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar s2[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s2, "ABCD1234", strlen("ABCD1234"));
+       if(i18n_ustring_get_length(s2) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       uint32_t options[] = {I18N_USTRING_U_FOLD_CASE_DEFAULT, I18N_USTRING_U_COMPARE_CODE_POINT_ORDER,
+                                               I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I};
+       int nEnumSize = sizeof(options)/sizeof(options[0]);
+       int32_t n = 4;
+       int nEnumCounter = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for(nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRet = i18n_ustring_mem_case_compare(s1, s2, n, options[nEnumCounter]);
+                       BaseUtilsGetExecutionDelay(pszSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszMemLog);
+                       if(nRet == 0)
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is equal to second one\n",__LINE__, API_NAMESPACE);
+                       }
+                       else if(nRet > 0)
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is greater than second one\n",__LINE__, API_NAMESPACE);
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][%s] First string is less than second one\n",__LINE__, API_NAMESPACE);
+                       }
+               }
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_ustring_mem_case_compare", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_mem_case_compare", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_mem_case_compare", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Synonym for memcpy but with i18n_uchar only.
+/**
+* @testcase                            ITc_i18n_ustring_mem_copy_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Synonym for memcpy but with i18n_uchar only.
+* @apicovered                  i18n_ustring_mem_copy
+* @passcase                            When i18n_ustring_mem_copy is successful
+* @failcase                            If target i18n_ustring_mem_copy API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_mem_copy_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "ABCDE234", strlen("ABCDE234"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+
+       int32_t count = 4;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_mem_copy(szDest, szSrc, count);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL || i18n_ustring_get_length(szDest) <= 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_mem_copy failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_mem_copy", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_mem_copy", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_mem_copy", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Synonym for memmove but with i18n_uchar only.
+/**
+* @testcase                            ITc_i18n_ustring_mem_move_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Synonym for memmove but with i18n_uchar only.
+* @apicovered                  i18n_ustring_mem_move
+* @passcase                            When i18n_ustring_mem_move is successful
+* @failcase                            If target i18n_ustring_mem_move API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_mem_move_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "ABCDE234", strlen("ABCDE234"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+
+       int32_t count = 4;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_mem_move(szDest, szSrc, count);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL || i18n_ustring_get_length(szDest) <= 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_mem_move failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_mem_move", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_mem_move", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_mem_move", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Initialize count characters of dest to c.
+/**
+* @testcase                            ITc_i18n_ustring_mem_set_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Initialize count characters of dest to c.
+* @apicovered                  i18n_ustring_mem_set
+* @passcase                            When i18n_ustring_mem_set is successful
+* @failcase                            If target i18n_ustring_mem_set API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_mem_set_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       const i18n_uchar c = 'a';
+       int32_t count = 5;
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szDest, "ABCDE234", strlen("ABCDE234"));
+       if(i18n_ustring_get_length(szDest) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_mem_set(szDest, c, count);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_mem_set failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_mem_set", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_mem_set", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_mem_set", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compare the first count i18n_uchar of each buffer.
+/**
+* @testcase                            ITc_i18n_ustring_mem_compare_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compare the first count i18n_uchar of each buffer.
+* @apicovered                  i18n_ustring_mem_compare
+* @passcase                            When i18n_ustring_mem_compare is successful
+* @failcase                            If target i18n_ustring_mem_compare API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_mem_compare_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       //int nFailCount = 0;
+
+       i18n_uchar s1[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s1, "ABCDEFGHI", strlen("ABCDEFGHI"));
+       if(i18n_ustring_get_length(s1) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar s2[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s2, "ABCDEXYZ12", strlen("ABCDEXYZ12"));
+       if(i18n_ustring_get_length(s2) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t count = 5;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRet = i18n_ustring_mem_compare(s1, s2, count);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRet == 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is equal to second one\n",__LINE__, API_NAMESPACE);
+               }
+               else if(nRet > 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is greater than second one\n",__LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is less than second one\n",__LINE__, API_NAMESPACE);
+               }
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_ustring_mem_compare", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_mem_compare", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_mem_compare", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Compare two uni code string in code point order.
+/**
+* @testcase                            ITc_i18n_ustring_mem_compare_code_point_order_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Compare two uni code string in code point order.
+* @apicovered                  i18n_ustring_mem_compare_code_point_order
+* @passcase                            When i18n_ustring_mem_compare_code_point_order is successful
+* @failcase                            If target i18n_ustring_mem_compare_code_point_order API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_mem_compare_code_point_order_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       //int nFailCount = 0;
+
+       i18n_uchar s1[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s1, "ABCD123XYZI", strlen("ABCD123XYZI"));
+       if(i18n_ustring_get_length(s1) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar s2[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s2, "ABCDEXYZ12", strlen("ABCDEXYZ12"));
+       if(i18n_ustring_get_length(s2) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t count = 8;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRet = i18n_ustring_mem_compare_code_point_order(s1, s2, count);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRet == 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is equal to second one\n",__LINE__, API_NAMESPACE);
+               }
+               else if(nRet > 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is greater than second one\n",__LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][%s] First string is less than second one\n",__LINE__, API_NAMESPACE);
+               }
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_ustring_mem_compare_code_point_order", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_mem_compare_code_point_order", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_mem_compare_code_point_order", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the first occurrence of a BMP code point in a string.
+/**
+* @testcase                            ITc_i18n_ustring_mem_char_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the first occurrence of a BMP code point in a string.
+* @apicovered                  i18n_ustring_mem_char
+* @passcase                            When i18n_ustring_mem_char is successful
+* @failcase                            If target i18n_ustring_mem_char API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_mem_char_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar s[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s, "ABCDE12FGH", strlen("ABCDE12FGH"));
+       int32_t count = i18n_ustring_get_length(s);
+       if(count <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar c = '1';
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_mem_char(s, c, count);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_mem_char failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_mem_char", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_mem_char", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_mem_char", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the first occurrence of a code point in a string.
+/**
+* @testcase                            ITc_i18n_ustring_mem_char32_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the first occurrence of a code point in a string.
+* @apicovered                  i18n_ustring_mem_char32
+* @passcase                            When i18n_ustring_mem_char32 is successful
+* @failcase                            If target i18n_ustring_mem_char32 API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_mem_char32_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar s[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s, "ABCD13XYZ", strlen("ABCD13XYZ"));
+       int32_t count = i18n_ustring_get_length(s);
+       if(count <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar c = 'D';
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_mem_char32(s, c, count);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_mem_char32 failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_mem_char32", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_mem_char32", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_mem_char32", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the last occurrence of a BMP code point in a string.
+/**
+* @testcase                            ITc_i18n_ustring_mem_r_char_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the last occurrence of a BMP code point in a string.
+* @apicovered                  i18n_ustring_mem_r_char
+* @passcase                            When i18n_ustring_mem_r_char is successful
+* @failcase                            If target i18n_ustring_mem_r_char API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_mem_r_char_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar s[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s, "XYZ1ABCD", strlen("XYZ1ABCD"));
+       int32_t count = i18n_ustring_get_length(s);
+       if(count <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar c = 'Y';
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_mem_r_char(s, c, count);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_mem_r_char failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_mem_r_char", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_mem_r_char", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_mem_r_char", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Find the last occurrence of a code point in a string.
+/**
+* @testcase                            ITc_i18n_ustring_mem_r_char32_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Find the last occurrence of a code point in a string.
+* @apicovered                  i18n_ustring_mem_r_char32
+* @passcase                            When i18n_ustring_mem_r_char32 is successful
+* @failcase                            If target i18n_ustring_mem_r_char32 API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_mem_r_char32_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar s[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(s, "ABCD13XYZ", strlen("ABCD13XYZ"));
+       int32_t count = i18n_ustring_get_length(s);
+       if(count <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar c = 'X';
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_mem_r_char32(s, c, count);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_mem_r_char32 failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_mem_r_char32", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_mem_r_char32", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_mem_r_char32", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Unescape a string of characters and write the resulting uni code characters to the destination buffer.
+/**
+* @testcase                            ITc_i18n_ustring_unescape_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Unescape a string of characters and write the resulting uni code characters to the destination buffer.
+* @apicovered                  i18n_ustring_unescape
+* @passcase                            When i18n_ustring_unescape is successful
+* @failcase                            If target i18n_ustring_unescape API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_unescape_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       //int nFailCount = 0;
+
+       const char szSrc[I18N_UCHAR_CAPACITY] = "[a-z]";
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {'\0'};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRet = i18n_ustring_unescape(szSrc, szDest, dest_capacity);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               FPRINTF("\\n[Line : %d][%s] Length of unescape string is = %d\n",__LINE__, API_NAMESPACE, nRet);
+       }
+       //VALIDATE_RESULT(nFailCount, "i18n_ustring_unescape", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_unescape", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_unescape", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Unescape a single sequence.
+/**
+* @testcase                            ITc_i18n_ustring_unescape_at_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Unescape a single sequence.
+* @apicovered                  i18n_ustring_unescape_at
+* @passcase                            When i18n_ustring_unescape_at is successful
+* @failcase                            If target i18n_ustring_unescape_at API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_unescape_at_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       int32_t dest_capacity = BUFFER;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_UnescapeCallback = false;
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRet = i18n_ustring_unescape_at(UStringUnescapeCharAtCB, &g_Offset, dest_capacity, g_pContext);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if( nRet == -1 || g_UnescapeCallback == false)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_unescape_at failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_unescape_at", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_unescape_at", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_unescape_at", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Lower case the characters in a string.
+/**
+* @testcase                            ITc_i18n_ustring_to_lower_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Lower case the characters in a string.
+* @apicovered                  i18n_ustring_to_lower
+* @passcase                            When i18n_ustring_to_lower is successful
+* @failcase                            If target i18n_ustring_to_lower API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_to_lower_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "ABCDXYZ", strlen("ABCDXYZ"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t src_len = -1;
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       const char *locale = NULL;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               nRet = i18n_ustring_to_lower(szDest, dest_capacity, szSrc, src_len, locale, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(nRet < 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_lower failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if(ErrorCode != I18N_ERROR_NONE)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_lower failed in iteration = %d. Error code is = %s \n",__LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(ErrorCode));
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_to_lower", pszMemLog, pszSpeedLog, MAX_COUNT);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_to_lower", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_to_lower", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Case-folds the character in a string.
+/**
+* @testcase                            ITc_i18n_ustring_fold_case_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Case-folds the character in a string.
+* @apicovered                  i18n_ustring_fold_case
+* @passcase                            When i18n_ustring_fold_case is successful
+* @failcase                            If target i18n_ustring_fold_case API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_fold_case_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "ABCDXYZ", strlen("ABCDXYZ"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t src_len = -1;
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+
+       uint32_t options[] = {I18N_USTRING_U_FOLD_CASE_DEFAULT, I18N_USTRING_U_FOLD_CASE_EXCLUDE_SPECIAL_I};
+       int nEnumSize = sizeof(options)/sizeof(options[0]);
+       int nEnumCounter = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for(nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       BaseUtilsGetMemAllocation();
+                       BaseUtilsGetTimeOfDay();
+                       nRet = i18n_ustring_fold_case(szDest, dest_capacity, szSrc, src_len, options[nEnumCounter], &ErrorCode);
+                       BaseUtilsGetExecutionDelay(pszSpeedLog);
+                       BaseUtilsGetMemoryLeakStatus(pszMemLog);
+                       if(nRet < 0)
+                       {
+                               nFailCount++;
+                               FPRINTF("\\n[Line : %d][%s] i18n_ustring_fold_case failed in iteration = %d\n",__LINE__, API_NAMESPACE, nEnumCounter * MAX_COUNT + nLoopCount);
+                               continue;
+                       }
+                       if(ErrorCode != I18N_ERROR_NONE)
+                       {
+                               nFailCount++;
+                               FPRINTF("\\n[Line : %d][%s] i18n_ustring_fold_case failed in iteration = %d. Error code is = %s \n",__LINE__, API_NAMESPACE, nEnumCounter * MAX_COUNT + nLoopCount, BaseUtilsGetError(ErrorCode));
+                       }
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_fold_case", pszMemLog, pszSpeedLog, MAX_COUNT * nEnumSize);
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_fold_case", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_fold_case", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Convert a UTF-16 string to wchar_t string.
+/**
+* @testcase                            ITc_i18n_ustring_to_WCS_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Convert a UTF-16 string to wchar_t string.
+* @apicovered                  i18n_ustring_to_WCS
+* @passcase                            When i18n_ustring_to_WCS is successful
+* @failcase                            If target i18n_ustring_to_WCS API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_to_WCS_p(void)
+{
+       START_TEST;
+       wchar_t *wpRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "ABCDXYZ", strlen("ABCDXYZ"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t src_len = -1;
+       wchar_t szDest[I18N_UCHAR_CAPACITY] = {'\0'};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       int32_t dest_len;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               wpRet = i18n_ustring_to_WCS(szDest, dest_capacity, &dest_len, szSrc, src_len, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(wpRet == NULL || wcslen(szDest) <= 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_WCS failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if(ErrorCode != I18N_ERROR_NONE)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_WCS failed in iteration = %d. Error code is = %s \n",__LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(ErrorCode));
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_to_WCS", pszMemLog, pszSpeedLog, MAX_COUNT );
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_to_WCS", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_to_WCS", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Convert a wchar_t string to UTF-16 string.
+/**
+* @testcase                            ITc_i18n_ustring_from_WCS_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Convert a wchar_t  string to UTF-16 string.
+* @apicovered                  i18n_ustring_from_WCS
+* @passcase                            When i18n_ustring_from_WCS is successful
+* @failcase                            If target i18n_ustring_from_WCS API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_from_WCS_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       const wchar_t szSrc[I18N_UCHAR_CAPACITY] = L"ABCDXYZ";
+       int32_t src_len = -1;
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       int32_t dest_len;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+       //i18n_uchar szTemp[I18N_UCHAR_CAPACITY] = {0,}
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_from_WCS(szDest, dest_capacity, &dest_len, szSrc, src_len, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL || i18n_ustring_get_length(szDest) <= 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_WCS failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if(ErrorCode != I18N_ERROR_NONE)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_WCS failed in iteration = %d. Error code is = %s \n",__LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(ErrorCode));
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_from_WCS", pszMemLog, pszSpeedLog, MAX_COUNT );
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_from_WCS", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_from_WCS", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Convert a UTF-16 string to UTF-8.
+/**
+* @testcase                            ITc_i18n_ustring_to_UTF8_with_sub_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Convert a UTF-16  string to UTF-8.
+* @apicovered                  i18n_ustring_to_UTF8_with_sub
+* @passcase                            When i18n_ustring_to_UTF8_with_sub is successful
+* @failcase                            If target i18n_ustring_to_UTF8_with_sub API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_to_UTF8_with_sub_p(void)
+{
+       START_TEST;
+       char *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       char szDest[I18N_UCHAR_CAPACITY] = {'\0'};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       int32_t dest_len;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "ABCDXYZ", strlen("ABCDXYZ"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t src_len = -1;
+       i18n_uchar32 sub_char = 0xFFFD;
+       int32_t num_substitutions;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_to_UTF8_with_sub(szDest, dest_capacity, &dest_len, szSrc, src_len, sub_char, &num_substitutions, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL || strlen(szDest) <= 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_UTF8_with_sub failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if(ErrorCode != I18N_ERROR_NONE)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_UTF8_with_sub failed in iteration = %d. Error code is = %s \n",__LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(ErrorCode));
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_to_UTF8_with_sub", pszMemLog, pszSpeedLog, MAX_COUNT );
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_to_UTF8_with_sub", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_to_UTF8_with_sub", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Convert a UTF-8 string to UTF-16.
+/**
+* @testcase                            ITc_i18n_ustring_from_UTF8_with_sub_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Convert a UTF-8  string to UTF-16.
+* @apicovered                  i18n_ustring_from_UTF8_with_sub
+* @passcase                            When i18n_ustring_from_UTF8_with_sub is successful
+* @failcase                            If target i18n_ustring_from_UTF8_with_sub API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_from_UTF8_with_sub_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       int32_t dest_len;
+       const char szSrc[I18N_UCHAR_CAPACITY] = "ABCDXYZ";
+       int32_t src_len = -1;
+       i18n_uchar32 sub_char = 0xFFFD;
+       int32_t num_substitutions;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_from_UTF8_with_sub(szDest, dest_capacity, &dest_len, szSrc, src_len, sub_char, &num_substitutions, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL || i18n_ustring_get_length(szDest) <= 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8_with_sub failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if(ErrorCode != I18N_ERROR_NONE)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8_with_sub failed in iteration = %d. Error code is = %s \n",__LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(ErrorCode));
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_from_UTF8_with_sub", pszMemLog, pszSpeedLog, MAX_COUNT );
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_from_UTF8_with_sub", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_from_UTF8_with_sub", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Convert a UTF-8 string to UTF-16.
+/**
+* @testcase                            ITc_i18n_ustring_from_UTF8_lenient_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Convert a UTF-8  string to UTF-16.
+* @apicovered                  i18n_ustring_from_UTF8_lenient
+* @passcase                            When i18n_ustring_from_UTF8_lenient is successful
+* @failcase                            If target i18n_ustring_from_UTF8_lenient API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_from_UTF8_lenient_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       int32_t dest_len;
+       const char szSrc[I18N_UCHAR_CAPACITY] = "ABCDXYZ";
+       int32_t src_len = -1;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_from_UTF8_lenient(szDest, dest_capacity, &dest_len, szSrc, src_len, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL || i18n_ustring_get_length(szDest) <= 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8_lenient failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if(ErrorCode != I18N_ERROR_NONE)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF8_lenient failed in iteration = %d. Error code is = %s \n",__LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(ErrorCode));
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_from_UTF8_lenient", pszMemLog, pszSpeedLog, MAX_COUNT );
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_from_UTF8_lenient", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_from_UTF8_lenient", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Convert a UTF-16 string to UTF-32.
+/**
+* @testcase                            ITc_i18n_ustring_to_UTF32_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Convert a UTF-16 string to UTF-32.
+* @apicovered                  i18n_ustring_to_UTF32
+* @passcase                            When i18n_ustring_to_UTF32 is successful
+* @failcase                            If target i18n_ustring_to_UTF32 API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_to_UTF32_p(void)
+{
+       START_TEST;
+       i18n_uchar32 *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar32 szDest[I18N_UCHAR_CAPACITY] = {0,};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       int32_t dest_len;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "ABCDXYZ", strlen("ABCDXYZ"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t src_len = -1;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_to_UTF32(szDest, dest_capacity, &dest_len, szSrc, src_len, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL )
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_UTF32 failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if(ErrorCode != I18N_ERROR_NONE)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_UTF32 failed in iteration = %d. Error code is = %s \n",__LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(ErrorCode));
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_to_UTF32", pszMemLog, pszSpeedLog, MAX_COUNT );
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_to_UTF32", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_to_UTF32", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Convert a UTF-32 string to UTF-16.
+/**
+* @testcase                            ITc_i18n_ustring_from_UTF32_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Convert a UTF-32 string to UTF-16.
+* @apicovered                  i18n_ustring_from_UTF32
+* @passcase                            When i18n_ustring_from_UTF32 is successful
+* @failcase                            If target i18n_ustring_from_UTF32 API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_from_UTF32_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       int32_t dest_len;
+       int32_t nDestLen;
+       i18n_uchar szTemp[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szTemp, "ABCDXYZ", strlen("ABCDXYZ"));
+       if(i18n_ustring_get_length(szTemp) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       i18n_uchar32 szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_to_UTF32(szSrc, I18N_UCHAR_CAPACITY, &nDestLen, szTemp, i18n_ustring_get_length(szTemp), &ErrorCode);
+       if(ErrorCode != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_UTF32 failed in precondition. Error code = %s\n",__LINE__, API_NAMESPACE, BaseUtilsGetError(ErrorCode));
+               return 1;
+       }
+       int32_t src_len = -1;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_from_UTF32(szDest, dest_capacity, &dest_len, szSrc, src_len, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL || i18n_ustring_get_length(szDest) <= 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF32 failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if(ErrorCode != I18N_ERROR_NONE)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF32 failed in iteration = %d. Error code is = %s \n",__LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(ErrorCode));
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_from_UTF32", pszMemLog, pszSpeedLog, MAX_COUNT );
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_from_UTF32", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_from_UTF32", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Convert a UTF-32 string to UTF-16.
+/**
+* @testcase                            ITc_i18n_ustring_from_UTF32_with_sub_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Convert a UTF-32 string to UTF-16.
+* @apicovered                  i18n_ustring_from_UTF32_with_sub
+* @passcase                            When i18n_ustring_from_UTF32_with_sub is successful
+* @failcase                            If target i18n_ustring_from_UTF32_with_sub API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_from_UTF32_with_sub_p(void)
+{
+       START_TEST;
+       i18n_uchar *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+
+       i18n_uchar szDest[I18N_UCHAR_CAPACITY] = {0,};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       int32_t dest_len;
+       int32_t nDestLen;
+       i18n_uchar szTemp[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_uchar32 szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szTemp, "ABCDXYZ", strlen("ABCDXYZ"));
+       if(i18n_ustring_get_length(szTemp) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       i18n_ustring_to_UTF32(szSrc, I18N_UCHAR_CAPACITY, &nDestLen, szTemp, i18n_ustring_get_length(szTemp), &ErrorCode);
+       if(ErrorCode != I18N_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_UTF32 failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t src_len = -1;
+       i18n_uchar32 sub_char = (i18n_uchar32)0xFFFD;
+       int32_t num_substituitions;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_from_UTF32_with_sub(szDest, dest_capacity, &dest_len, szSrc, src_len, sub_char, &num_substituitions, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL || i18n_ustring_get_length(szDest) <= 0)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF32_with_sub failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if(ErrorCode != I18N_ERROR_NONE)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_from_UTF32_with_sub failed in iteration = %d. Error code is = %s \n",__LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(ErrorCode));
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_from_UTF32_with_sub", pszMemLog, pszSpeedLog, MAX_COUNT );
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_from_UTF32_with_sub", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_from_UTF32_with_sub", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Convert a UTF-16 string to UTF-32.
+/**
+* @testcase                            ITc_i18n_ustring_to_UTF32_with_sub_p
+* @since_tizen                         2.3
+* @type                                auto
+* @scenario                            Convert a UTF-16 string to UTF-32.
+* @apicovered                  i18n_ustring_to_UTF32_with_sub
+* @passcase                            When i18n_ustring_to_UTF32_with_sub is successful
+* @failcase                            If target i18n_ustring_to_UTF32_with_sub API fails or any precondition and postcondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_to_UTF32_with_sub_p(void)
+{
+       START_TEST;
+       i18n_uchar32 *pRet = NULL;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       i18n_uchar32 szDest[I18N_UCHAR_CAPACITY] = {0,};
+       int32_t dest_capacity = I18N_UCHAR_CAPACITY;
+       int32_t dest_len;
+       i18n_uchar szSrc[I18N_UCHAR_CAPACITY] = {0,};
+       i18n_ustring_copy_ua_n(szSrc, "ABCDXYZ", strlen("ABCDXYZ"));
+       if(i18n_ustring_get_length(szSrc) <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition\n",__LINE__, API_NAMESPACE);
+               return 1;
+       }
+       int32_t src_len = -1;
+       //i18n_uchar32 sub_char [SEC_VALUE] = {0,};
+       //memset(&sub_char, 0xFFFD, 2);
+       i18n_uchar32 sub_char = 0xFFFD;
+       int32_t num_substituitions;
+       i18n_error_code_e ErrorCode = I18N_ERROR_NONE;
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BaseUtilsGetMemAllocation();
+               BaseUtilsGetTimeOfDay();
+               pRet = i18n_ustring_to_UTF32_with_sub(szDest, dest_capacity, &dest_len, szSrc, src_len, sub_char, &num_substituitions, &ErrorCode);
+               BaseUtilsGetExecutionDelay(pszSpeedLog);
+               BaseUtilsGetMemoryLeakStatus(pszMemLog);
+               if(pRet == NULL )
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_UTF32_with_sub failed in iteration = %d\n",__LINE__, API_NAMESPACE, nLoopCount);
+                       continue;
+               }
+               if(ErrorCode != I18N_ERROR_NONE)
+               {
+                       nFailCount++;
+                       FPRINTF("\\n[Line : %d][%s] i18n_ustring_to_UTF32_with_sub failed in iteration = %d. Error code is = %s \n",__LINE__, API_NAMESPACE, nLoopCount, BaseUtilsGetError(ErrorCode));
+               }
+       }
+       VALIDATE_RESULT(nFailCount, "i18n_ustring_to_UTF32_with_sub", pszMemLog, pszSpeedLog, MAX_COUNT );
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("i18n_ustring_to_UTF32_with_sub", pszSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("i18n_ustring_to_UTF32_with_sub", pszMemLog);
+#endif
+       FREE_MEMORY(pszMemLog, pszSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Titlecases a string.
+/**
+* @testcase                    ITc_i18n_ustring_to_title_new_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Titlecasing uses a break iterator to find the first characters of wordsthat are to be titlecased.
+* @scenario                            Titlecases a string.
+* @apicovered                  i18n_ustring_to_title_new, i18n_ustring_copy_ua_n
+* @passcase                            When i18n_ustring_to_title_new is successful.
+* @failcase                            If target i18n_ustring_to_title_new fails or any precondition and postcondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_i18n_ustring_to_title_new_p(void)
+{
+       START_TEST;
+       i18n_uchar uSourceStr[I18N_UCHAR_CAPACITY] = { 0, };
+
+       i18n_uchar *pRet = i18n_ustring_copy_ua_n(uSourceStr, (char *)SOURCE_STRING, strlen(SOURCE_STRING));
+       int32_t nSourceLength = i18n_ustring_get_length(uSourceStr);
+       if(pRet == NULL || nSourceLength <= 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] i18n_ustring_copy_ua_n failed in precondition \n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       const char *pszDefaultLocale = I18N_ULOCALE_US;
+       i18n_uchar uDestStr[I18N_UCHAR_CAPACITY] = { 0, };
+
+       i18n_ustring_to_title_new(uDestStr, I18N_UCHAR_CAPACITY, uSourceStr, nSourceLength, NULL, pszDefaultLocale);
+       int nRetVal = get_last_result();
+       PRINT_RESULT(nRetVal, "get_last_result");
+
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/base-utils/tct-base-utils-native.c b/src/itc/base-utils/tct-base-utils-native.c
new file mode 100755 (executable)
index 0000000..c3f066b
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-base-utils-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/base-utils/tct-base-utils-native.h b/src/itc/base-utils/tct-base-utils-native.h
new file mode 100755 (executable)
index 0000000..2ce48c0
--- /dev/null
@@ -0,0 +1,615 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_BASE_UTILS_NATIVE_H__
+#define __TCT_BASE_UTILS_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_base_utils_enumeration_startup(void);
+extern void ITs_base_utils_enumeration_cleanup(void);
+extern void ITs_base_utils_locale_startup(void);
+extern void ITs_base_utils_locale_cleanup(void);
+extern void ITs_base_utils_startup(void);
+extern void ITs_base_utils_cleanup(void);
+extern void ITs_base_utils_ubrk_startup(void);
+extern void ITs_base_utils_ubrk_cleanup(void);
+extern void ITs_base_utils_ucalendar_startup(void);
+extern void ITs_base_utils_ucalendar_cleanup(void);
+extern void ITs_base_utils_udatepg_startup(void);
+extern void ITs_base_utils_udatepg_cleanup(void);
+extern void ITs_base_utils_udate_startup(void);
+extern void ITs_base_utils_udate_cleanup(void);
+extern void ITs_base_utils_ulocale_startup(void);
+extern void ITs_base_utils_ulocale_cleanup(void);
+extern void ITs_base_utils_unumber_startup(void);
+extern void ITs_base_utils_unumber_cleanup(void);
+extern void ITs_base_utils_uset_startup(void);
+extern void ITs_base_utils_uset_cleanup(void);
+
+extern int ITc_i18n_uenumeration_uchar_strings_enumeration_create_destroy_p(void);
+extern int ITc_i18n_uenumeration_char_strings_enumeration_create_destroy_p(void);
+extern int ITc_i18n_uenumeration_count_p(void);
+extern int ITc_i18n_uenumeration_unext_p(void);
+extern int ITc_i18n_uenumeration_next_p(void);
+extern int ITc_i18n_uenumeration_reset_p(void);
+extern int ITc_i18n_ucalendar_create_destroy_p(void);
+extern int ITc_i18n_ucalendar_add_get_p(void);
+extern int ITc_i18n_ucalendar_set_date_time_get_milliseconds_p(void);
+extern int ITc_i18n_ucalendar_set_get_attribute_p(void);
+extern int ITc_i18n_ucalendar_get_timezone_displayname_p(void);
+extern int ITc_i18n_ucalendar_set_milliseconds_p(void);
+extern int ITc_i18n_ucalendar_is_in_daylight_time_p(void);
+extern int ITc_i18n_ucalendar_is_equivalent_to_p(void);
+extern int ITc_i18n_ucollator_create_destroy_p(void);
+extern int ITc_i18n_ucollator_str_collator_p(void);
+extern int ITc_i18n_ucollator_equal_p(void);
+extern int ITc_i18n_ucollator_set_strength_p(void);
+extern int ITc_i18n_ucollator_set_attribute_p(void);
+extern int ITc_i18n_udate_create_destroy_p(void);
+extern int ITc_i18n_udate_format_date_p(void);
+extern int ITc_i18n_usearch_first_get_macthed_text_p(void);
+extern int ITc_i18n_usearch_get_collator_p(void);
+extern int ITc_i18n_ucalendar_clone_p(void);
+extern int ITc_i18n_ucalendar_set_p(void);
+extern int ITc_i18n_ucalendar_set_default_timezone_p(void);
+extern int ITc_i18n_timezone_create_unknown_p(void);
+extern int ITc_i18n_timezone_create_gmt_p(void);
+extern int ITc_i18n_timezone_create_destroy_p(void);
+extern int ITc_i18n_timezone_count_equivalent_ids_p(void);
+extern int ITc_i18n_timezone_get_equivalent_id_p(void);
+extern int ITc_i18n_timezone_create_default_p(void);
+extern int ITc_i18n_timezone_set_default_p(void);
+extern int ITc_i18n_timezone_get_tzdata_version_p(void);
+extern int ITc_i18n_timezone_get_region_p(void);
+extern int ITc_i18n_timezone_get_offset_with_date_p(void);
+extern int ITc_i18n_timezone_set_get_raw_offset_p(void);
+extern int ITc_i18n_timezone_set_get_id_p(void);
+extern int ITc_i18n_timezone_get_display_name_p(void);
+extern int ITc_i18n_timezone_get_display_name_with_locale_p(void);
+extern int ITc_i18n_timezone_get_display_name_with_type_p(void);
+extern int ITc_i18n_timezone_get_display_name_with_type_locale_p(void);
+extern int ITc_i18n_timezone_use_daylight_time_p(void);
+extern int ITc_i18n_timezone_has_same_rule_p(void);
+extern int ITc_i18n_timezone_clone_p(void);
+extern int ITc_i18n_timezone_get_dst_savings_p(void);
+extern int ITc_i18n_timezone_foreach_timezone_id_by_region_p(void);
+extern int ITc_i18n_timezone_foreach_timezone_id_p(void);
+extern int ITc_i18n_timezone_foreach_timezone_id_with_offset_p(void);
+extern int ITc_i18n_timezone_foreach_timezone_id_by_country_p(void);
+extern int ITc_i18n_usearch_create_new_p(void);
+extern int ITc_i18n_ucalendar_get_now_p(void);
+extern int ITc_i18n_unormalization_get_instance_normalize_p(void);
+extern int ITc_i18n_ustring_copy_compare_p(void);
+extern int ITc_i18n_ustring_get_length_to_upper_p(void);
+extern int ITc_i18n_ustring_from_UTF8_to_UTF8_p(void);
+extern int ITc_i18n_ustring_copy_au_p(void);
+extern int ITc_i18n_ustring_copy_au_n_p(void);
+extern int ITc_i18n_ustring_copy_ua_n_p(void);
+extern int ITc_i18n_ustring_copy_ua_p(void);
+extern int ITc_i18n_ustring_copy_n_p(void);
+extern int ITc_i18n_uchar_get_int_property_value_p(void);
+extern int ITc_i18n_uchar_get_ublock_code_p(void);
+extern int ITc_i18n_ustring_to_upper_p(void);
+extern int ITc_i18n_ustring_count_char32_p(void);
+extern int ITc_i18n_ustring_has_more_char32_than_p(void);
+extern int ITc_i18n_ustring_cat_p(void);
+extern int ITc_i18n_ustring_cat_n_p(void);
+extern int ITc_i18n_ustring_string_p(void);
+extern int ITc_i18n_ustring_find_first_p(void);
+extern int ITc_i18n_ustring_char_p(void);
+extern int ITc_i18n_ustring_char32_p(void);
+extern int ITc_i18n_ustring_r_string_p(void);
+extern int ITc_i18n_ustring_find_last_p(void);
+extern int ITc_i18n_ustring_r_char_p(void);
+extern int ITc_i18n_ustring_r_char32_p(void);
+extern int ITc_i18n_ustring_pbrk_p(void);
+extern int ITc_i18n_ustring_cspn_p(void);
+extern int ITc_i18n_ustring_spn_p(void);
+extern int ITc_i18n_ustring_tokenizer_r_p(void);
+extern int ITc_i18n_ustring_compare_code_point_order_p(void);
+extern int ITc_i18n_ustring_compare_binary_order_p(void);
+extern int ITc_i18n_ustring_case_compare_with_length_p(void);
+extern int ITc_i18n_ustring_compare_n_p(void);
+extern int ITc_i18n_ustring_compare_n_code_point_order_p(void);
+extern int ITc_i18n_ustring_case_compare_p(void);
+extern int ITc_i18n_ustring_case_compare_n_p(void);
+extern int ITc_i18n_ustring_mem_case_compare_p(void);
+extern int ITc_i18n_ustring_mem_copy_p(void);
+extern int ITc_i18n_ustring_mem_move_p(void);
+extern int ITc_i18n_ustring_mem_set_p(void);
+extern int ITc_i18n_ustring_mem_compare_p(void);
+extern int ITc_i18n_ustring_mem_compare_code_point_order_p(void);
+extern int ITc_i18n_ustring_mem_char_p(void);
+extern int ITc_i18n_ustring_mem_char32_p(void);
+extern int ITc_i18n_ustring_mem_r_char_p(void);
+extern int ITc_i18n_ustring_mem_r_char32_p(void);
+extern int ITc_i18n_ustring_unescape_p(void);
+extern int ITc_i18n_ustring_unescape_at_p(void);
+extern int ITc_i18n_ustring_to_lower_p(void);
+extern int ITc_i18n_ustring_fold_case_p(void);
+extern int ITc_i18n_ustring_to_WCS_p(void);
+extern int ITc_i18n_ustring_from_WCS_p(void);
+extern int ITc_i18n_ustring_to_UTF8_with_sub_p(void);
+extern int ITc_i18n_ustring_from_UTF8_with_sub_p(void);
+extern int ITc_i18n_ustring_from_UTF8_lenient_p(void);
+extern int ITc_i18n_ustring_to_UTF32_p(void);
+extern int ITc_i18n_ustring_from_UTF32_p(void);
+extern int ITc_i18n_ustring_from_UTF32_with_sub_p(void);
+extern int ITc_i18n_ustring_to_UTF32_with_sub_p(void);
+extern int ITc_i18n_ustring_to_title_new_p(void);
+extern int ITc_i18n_ubrk_create_destroy_p(void);
+extern int ITc_i18n_ubrk_create_rules_p(void);
+extern int ITc_i18n_ubrk_safe_clone_p(void);
+extern int ITc_i18n_ubrk_set_text_p(void);
+extern int ITc_i18n_ubrk_current_p(void);
+extern int ITc_i18n_ubrk_next_previous_p(void);
+extern int ITc_i18n_ubrk_first_last_p(void);
+extern int ITc_i18n_ubrk_preceding_following_p(void);
+extern int ITc_i18n_ubrk_get_available_p(void);
+extern int ITc_i18n_ubrk_count_available_p(void);
+extern int ITc_i18n_ubrk_is_boundary_p(void);
+extern int ITc_i18n_ubrk_get_rule_status_p(void);
+extern int ITc_i18n_ubrk_get_rule_status_vec_p(void);
+extern int ITc_i18n_ubrk_get_locale_by_type_p(void);
+extern int ITc_i18n_ucalendar_timezone_id_enumeration_create_p(void);
+extern int ITc_i18n_ucalendar_timezones_create_p(void);
+extern int ITc_i18n_ucalendar_country_timezones_create_p(void);
+extern int ITc_i18n_ucalendar_get_default_timezone_p(void);
+extern int ITc_i18n_ucalendar_set_timezone_p(void);
+extern int ITc_i18n_ucalendar_get_timezone_id_get_canonical_timezone_id_p(void);
+extern int ITc_i18n_ucalendar_set_get_gregorian_change_p(void);
+extern int ITc_i18n_ucalendar_get_available_p(void);
+extern int ITc_i18n_ucalendar_count_available_p(void);
+extern int ITc_i18n_ucalendar_roll_p(void);
+extern int ITc_i18n_ucalendar_is_set_p(void);
+extern int ITc_i18n_ucalendar_clear_field_p(void);
+extern int ITc_i18n_ucalendar_clear_p(void);
+extern int ITc_i18n_ucalendar_get_limit_p(void);
+extern int ITc_i18n_ucalendar_get_locale_by_type_p(void);
+extern int ITc_i18n_ucalendar_get_tz_data_version_p(void);
+extern int ITc_i18n_ucalendar_get_type_p(void);
+extern int ITc_i18n_ucalendar_get_keyword_values_for_locale_p(void);
+extern int ITc_i18n_ucalendar_get_day_of_week_type_p(void);
+extern int ITc_i18n_ucalendar_get_weekend_transition_p(void);
+extern int ITc_i18n_ucalendar_is_weekend_p(void);
+extern int ITc_i18n_ucalendar_get_field_difference_p(void);
+extern int ITc_i18n_ucalendar_get_timezone_transition_date_p(void);
+extern int ITc_i18n_udatepg_create_destroy_p(void);
+extern int ITc_i18n_udatepg_get_best_pattern_p(void);
+extern int ITc_i18n_udatepg_set_get_decimal_p(void);
+extern int ITc_i18n_udatepg_set_get_date_time_format_p(void);
+extern int ITc_i18n_udatepg_set_get_append_item_name_p(void);
+extern int ITc_i18n_udatepg_set_get_append_item_format_p(void);
+extern int ITc_i18n_udatepg_replace_field_types_with_options_p(void);
+extern int ITc_i18n_udatepg_replace_field_types_p(void);
+extern int ITc_i18n_udatepg_get_skeleton_p(void);
+extern int ITc_i18n_udatepg_get_best_pattern_with_options_p(void);
+extern int ITc_i18n_udatepg_get_base_skeleton_p(void);
+extern int ITc_i18n_udatepg_skeletons_create_p(void);
+extern int ITc_i18n_udatepg_base_skeletons_create_p(void);
+extern int ITc_i18n_udatepg_create_empty_p(void);
+extern int ITc_i18n_udatepg_clone_p(void);
+extern int ITc_i18n_udatepg_add_pattern_p(void);
+extern int ITc_i18n_udatepg_get_pattern_for_skeleton_p(void);
+extern int ITc_i18n_udate_to_calendar_date_field_p(void);
+extern int ITc_i18n_udate_clone_p(void);
+extern int ITc_i18n_udate_parse_p(void);
+extern int ITc_i18n_udate_parse_calendar_p(void);
+extern int ITc_i18n_udate_is_set_lenient_p(void);
+extern int ITc_i18n_udate_get_set_calendar_p(void);
+extern int ITc_i18n_udate_get_set_number_format_p(void);
+extern int ITc_i18n_udate_get_set_2digit_year_start_p(void);
+extern int ITc_i18n_udate_set_get_symbols_p(void);
+extern int ITc_i18n_udate_get_available_p(void);
+extern int ITc_i18n_udate_count_available_p(void);
+extern int ITc_i18n_udate_apply_pattern_p(void);
+extern int ITc_i18n_udate_apply_to_pattern_p(void);
+extern int ITc_i18n_udate_count_symbols_p(void);
+extern int ITc_i18n_udate_get_locale_by_type_p(void);
+extern int ITc_i18n_udate_set_context_p(void);
+extern int ITc_i18n_ulocale_get_language_p(void);
+extern int ITc_i18n_ulocale_get_display_name_p(void);
+extern int ITc_i18n_ulocale_set_get_default_p(void);
+extern int ITc_i18n_ulocale_get_available_p(void);
+extern int ITc_i18n_ulocale_get_country_p(void);
+extern int ITc_i18n_ulocale_count_available_p(void);
+extern int ITc_i18n_ulocale_add_likely_subtags_p(void);
+extern int ITc_i18n_ulocale_canonicalize_p(void);
+extern int ITc_i18n_ulocale_for_language_tag_p(void);
+extern int ITc_i18n_ulocale_get_base_name_p(void);
+extern int ITc_i18n_ulocale_get_character_orientation_p(void);
+extern int ITc_i18n_ulocale_get_display_country_p(void);
+extern int ITc_i18n_ulocale_get_display_keyword_p(void);
+extern int ITc_i18n_ulocale_get_display_keyword_value_p(void);
+extern int ITc_i18n_ulocale_get_display_language_p(void);
+extern int ITc_i18n_ulocale_get_display_script_p(void);
+extern int ITc_i18n_ulocale_get_display_variant_p(void);
+extern int ITc_i18n_ulocale_get_iso3_country_p(void);
+extern int ITc_i18n_ulocale_get_iso3_language_p(void);
+extern int ITc_i18n_ulocale_get_iso_countries_p(void);
+extern int ITc_i18n_ulocale_get_iso_languages_p(void);
+extern int ITc_i18n_ulocale_set_get_keyword_value_p(void);
+extern int ITc_i18n_ulocale_get_lcid_p(void);
+extern int ITc_i18n_ulocale_get_line_orientation_p(void);
+extern int ITc_i18n_ulocale_get_locale_for_lcid_p(void);
+extern int ITc_i18n_ulocale_get_name_p(void);
+extern int ITc_i18n_ulocale_get_parent_p(void);
+extern int ITc_i18n_ulocale_get_script_p(void);
+extern int ITc_i18n_ulocale_get_variant_p(void);
+extern int ITc_i18n_ulocale_keywords_create_p(void);
+extern int ITc_i18n_ulocale_minimize_subtags_p(void);
+extern int ITc_i18n_ulocale_to_language_tag_p(void);
+extern int ITc_i18n_unumber_create_destroy_p(void);
+extern int ITc_i18n_unumber_apply_pattern_p(void);
+extern int ITc_i18n_unumber_clone_p(void);
+extern int ITc_i18n_unumber_count_available_p(void);
+extern int ITc_i18n_unumber_format_decimal_p(void);
+extern int ITc_i18n_unumber_format_double_p(void);
+extern int ITc_i18n_unumber_format_double_currency_p(void);
+extern int ITc_i18n_unumber_format_int64_p(void);
+extern int ITc_i18n_unumber_set_get_attribute_p(void);
+extern int ITc_i18n_unumber_get_available_p(void);
+extern int ITc_i18n_unumber_set_get_double_attribute_p(void);
+extern int ITc_i18n_unumber_get_locale_by_type_p(void);
+extern int ITc_i18n_unumber_set_get_text_attribute_p(void);
+extern int ITc_i18n_unumber_parse_p(void);
+extern int ITc_i18n_unumber_parse_decimal_p(void);
+extern int ITc_i18n_unumber_parse_double_p(void);
+extern int ITc_i18n_unumber_parse_double_currency_p(void);
+extern int ITc_i18n_unumber_parse_int64_p(void);
+extern int ITc_i18n_unumber_to_pattern_p(void);
+extern int ITc_i18n_unumber_set_get_symbol_p(void);
+extern int ITc_i18n_uset_create_empty_p(void);
+extern int ITc_i18n_uset_create_destroy_p(void);
+extern int ITc_i18n_uset_create_pattern_p(void);
+extern int ITc_i18n_uset_create_pattern_options_p(void);
+extern int ITc_i18n_uset_clone_p(void);
+extern int ITc_i18n_uset_freeze_p(void);
+extern int ITc_i18n_uset_is_frozen_p(void);
+extern int ITc_i18n_uset_clone_as_thawed_p(void);
+extern int ITc_i18n_uset_set_p(void);
+extern int ITc_i18n_uset_apply_pattern_p(void);
+extern int ITc_i18n_uset_apply_int_property_value_p(void);
+extern int ITc_i18n_uset_apply_property_alias_p(void);
+extern int ITc_i18n_uset_resembles_pattern_p(void);
+extern int ITc_i18n_uset_to_pattern_p(void);
+extern int ITc_i18n_uset_add_remove_p(void);
+extern int ITc_i18n_uset_add_remove_all_p(void);
+extern int ITc_i18n_uset_add_remove_range_p(void);
+extern int ITc_i18n_uset_add_remove_string_p(void);
+extern int ITc_i18n_uset_add_all_code_points_p(void);
+extern int ITc_i18n_uset_retain_p(void);
+extern int ITc_i18n_uset_retain_all_p(void);
+extern int ITc_i18n_uset_compact_p(void);
+extern int ITc_i18n_uset_complement_p(void);
+extern int ITc_i18n_uset_complement_all_p(void);
+extern int ITc_i18n_uset_clear_p(void);
+extern int ITc_i18n_uset_destroy_over_p(void);
+extern int ITc_i18n_uset_remove_all_strings_p(void);
+extern int ITc_i18n_uset_is_empty_p(void);
+extern int ITc_i18n_uset_contains_p(void);
+extern int ITc_i18n_uset_contains_range_p(void);
+extern int ITc_i18n_uset_contains_string_p(void);
+extern int ITc_i18n_uset_index_of_p(void);
+extern int ITc_i18n_uset_char_at_p(void);
+extern int ITc_i18n_uset_size_p(void);
+extern int ITc_i18n_uset_get_item_count_p(void);
+extern int ITc_i18n_uset_get_item_p(void);
+extern int ITc_i18n_uset_contains_all_p(void);
+extern int ITc_i18n_uset_contains_all_code_points_p(void);
+extern int ITc_i18n_uset_contains_none_p(void);
+extern int ITc_i18n_uset_contains_some_p(void);
+extern int ITc_i18n_uset_span_p(void);
+extern int ITc_i18n_uset_span_back_p(void);
+extern int ITc_i18n_uset_span_utf8_p(void);
+extern int ITc_i18n_uset_span_back_utf8_p(void);
+extern int ITc_i18n_uset_equals_p(void);
+extern int ITc_i18n_uset_serialize_p(void);
+extern int ITc_i18n_uset_get_serialized_set_p(void);
+extern int ITc_i18n_uset_set_serialized_to_one_p(void);
+extern int ITc_i18n_uset_serialized_contains_p(void);
+extern int ITc_i18n_uset_get_serialized_range_count_p(void);
+extern int ITc_i18n_uset_get_serialized_range_p(void);
+
+testcase tc_array[] = {
+    {"ITc_i18n_uenumeration_uchar_strings_enumeration_create_destroy_p", ITc_i18n_uenumeration_uchar_strings_enumeration_create_destroy_p, ITs_base_utils_enumeration_startup, ITs_base_utils_enumeration_cleanup},
+    {"ITc_i18n_uenumeration_char_strings_enumeration_create_destroy_p", ITc_i18n_uenumeration_char_strings_enumeration_create_destroy_p, ITs_base_utils_enumeration_startup, ITs_base_utils_enumeration_cleanup},
+    {"ITc_i18n_uenumeration_count_p", ITc_i18n_uenumeration_count_p, ITs_base_utils_enumeration_startup, ITs_base_utils_enumeration_cleanup},
+    {"ITc_i18n_uenumeration_unext_p", ITc_i18n_uenumeration_unext_p, ITs_base_utils_enumeration_startup, ITs_base_utils_enumeration_cleanup},
+    {"ITc_i18n_uenumeration_next_p", ITc_i18n_uenumeration_next_p, ITs_base_utils_enumeration_startup, ITs_base_utils_enumeration_cleanup},
+    {"ITc_i18n_uenumeration_reset_p", ITc_i18n_uenumeration_reset_p, ITs_base_utils_enumeration_startup, ITs_base_utils_enumeration_cleanup},
+    {"ITc_i18n_ucalendar_create_destroy_p", ITc_i18n_ucalendar_create_destroy_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucalendar_add_get_p", ITc_i18n_ucalendar_add_get_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucalendar_set_date_time_get_milliseconds_p", ITc_i18n_ucalendar_set_date_time_get_milliseconds_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucalendar_set_get_attribute_p", ITc_i18n_ucalendar_set_get_attribute_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucalendar_get_timezone_displayname_p", ITc_i18n_ucalendar_get_timezone_displayname_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucalendar_set_milliseconds_p", ITc_i18n_ucalendar_set_milliseconds_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucalendar_is_in_daylight_time_p", ITc_i18n_ucalendar_is_in_daylight_time_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucalendar_is_equivalent_to_p", ITc_i18n_ucalendar_is_equivalent_to_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucollator_create_destroy_p", ITc_i18n_ucollator_create_destroy_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucollator_str_collator_p", ITc_i18n_ucollator_str_collator_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucollator_equal_p", ITc_i18n_ucollator_equal_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucollator_set_strength_p", ITc_i18n_ucollator_set_strength_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucollator_set_attribute_p", ITc_i18n_ucollator_set_attribute_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_udate_create_destroy_p", ITc_i18n_udate_create_destroy_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_udate_format_date_p", ITc_i18n_udate_format_date_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_usearch_first_get_macthed_text_p", ITc_i18n_usearch_first_get_macthed_text_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_usearch_get_collator_p", ITc_i18n_usearch_get_collator_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucalendar_clone_p", ITc_i18n_ucalendar_clone_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucalendar_set_p", ITc_i18n_ucalendar_set_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucalendar_set_default_timezone_p", ITc_i18n_ucalendar_set_default_timezone_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_create_unknown_p", ITc_i18n_timezone_create_unknown_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_create_gmt_p", ITc_i18n_timezone_create_gmt_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_create_destroy_p", ITc_i18n_timezone_create_destroy_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_count_equivalent_ids_p", ITc_i18n_timezone_count_equivalent_ids_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_get_equivalent_id_p", ITc_i18n_timezone_get_equivalent_id_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_create_default_p", ITc_i18n_timezone_create_default_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_set_default_p", ITc_i18n_timezone_set_default_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_get_tzdata_version_p", ITc_i18n_timezone_get_tzdata_version_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_get_region_p", ITc_i18n_timezone_get_region_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_get_offset_with_date_p", ITc_i18n_timezone_get_offset_with_date_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_set_get_raw_offset_p", ITc_i18n_timezone_set_get_raw_offset_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_set_get_id_p", ITc_i18n_timezone_set_get_id_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_get_display_name_p", ITc_i18n_timezone_get_display_name_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_get_display_name_with_locale_p", ITc_i18n_timezone_get_display_name_with_locale_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_get_display_name_with_type_p", ITc_i18n_timezone_get_display_name_with_type_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_get_display_name_with_type_locale_p", ITc_i18n_timezone_get_display_name_with_type_locale_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_use_daylight_time_p", ITc_i18n_timezone_use_daylight_time_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_has_same_rule_p", ITc_i18n_timezone_has_same_rule_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_clone_p", ITc_i18n_timezone_clone_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_get_dst_savings_p", ITc_i18n_timezone_get_dst_savings_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_foreach_timezone_id_by_region_p", ITc_i18n_timezone_foreach_timezone_id_by_region_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_foreach_timezone_id_p", ITc_i18n_timezone_foreach_timezone_id_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_foreach_timezone_id_with_offset_p", ITc_i18n_timezone_foreach_timezone_id_with_offset_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_timezone_foreach_timezone_id_by_country_p", ITc_i18n_timezone_foreach_timezone_id_by_country_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_usearch_create_new_p", ITc_i18n_usearch_create_new_p, ITs_base_utils_locale_startup, ITs_base_utils_locale_cleanup},
+    {"ITc_i18n_ucalendar_get_now_p", ITc_i18n_ucalendar_get_now_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_unormalization_get_instance_normalize_p", ITc_i18n_unormalization_get_instance_normalize_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_copy_compare_p", ITc_i18n_ustring_copy_compare_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_get_length_to_upper_p", ITc_i18n_ustring_get_length_to_upper_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_from_UTF8_to_UTF8_p", ITc_i18n_ustring_from_UTF8_to_UTF8_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_copy_au_p", ITc_i18n_ustring_copy_au_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_copy_au_n_p", ITc_i18n_ustring_copy_au_n_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_copy_ua_n_p", ITc_i18n_ustring_copy_ua_n_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_copy_ua_p", ITc_i18n_ustring_copy_ua_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_copy_n_p", ITc_i18n_ustring_copy_n_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_uchar_get_int_property_value_p", ITc_i18n_uchar_get_int_property_value_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_uchar_get_ublock_code_p", ITc_i18n_uchar_get_ublock_code_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_to_upper_p", ITc_i18n_ustring_to_upper_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_count_char32_p", ITc_i18n_ustring_count_char32_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_has_more_char32_than_p", ITc_i18n_ustring_has_more_char32_than_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_cat_p", ITc_i18n_ustring_cat_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_cat_n_p", ITc_i18n_ustring_cat_n_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_string_p", ITc_i18n_ustring_string_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_find_first_p", ITc_i18n_ustring_find_first_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_char_p", ITc_i18n_ustring_char_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_char32_p", ITc_i18n_ustring_char32_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_r_string_p", ITc_i18n_ustring_r_string_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_find_last_p", ITc_i18n_ustring_find_last_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_r_char_p", ITc_i18n_ustring_r_char_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_r_char32_p", ITc_i18n_ustring_r_char32_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_pbrk_p", ITc_i18n_ustring_pbrk_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_cspn_p", ITc_i18n_ustring_cspn_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_spn_p", ITc_i18n_ustring_spn_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_tokenizer_r_p", ITc_i18n_ustring_tokenizer_r_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_compare_code_point_order_p", ITc_i18n_ustring_compare_code_point_order_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_compare_binary_order_p", ITc_i18n_ustring_compare_binary_order_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_case_compare_with_length_p", ITc_i18n_ustring_case_compare_with_length_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_compare_n_p", ITc_i18n_ustring_compare_n_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_compare_n_code_point_order_p", ITc_i18n_ustring_compare_n_code_point_order_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_case_compare_p", ITc_i18n_ustring_case_compare_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_case_compare_n_p", ITc_i18n_ustring_case_compare_n_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_mem_case_compare_p", ITc_i18n_ustring_mem_case_compare_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_mem_copy_p", ITc_i18n_ustring_mem_copy_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_mem_move_p", ITc_i18n_ustring_mem_move_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_mem_set_p", ITc_i18n_ustring_mem_set_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_mem_compare_p", ITc_i18n_ustring_mem_compare_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_mem_compare_code_point_order_p", ITc_i18n_ustring_mem_compare_code_point_order_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_mem_char_p", ITc_i18n_ustring_mem_char_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_mem_char32_p", ITc_i18n_ustring_mem_char32_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_mem_r_char_p", ITc_i18n_ustring_mem_r_char_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_mem_r_char32_p", ITc_i18n_ustring_mem_r_char32_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_unescape_p", ITc_i18n_ustring_unescape_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_unescape_at_p", ITc_i18n_ustring_unescape_at_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_to_lower_p", ITc_i18n_ustring_to_lower_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_fold_case_p", ITc_i18n_ustring_fold_case_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_to_WCS_p", ITc_i18n_ustring_to_WCS_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_from_WCS_p", ITc_i18n_ustring_from_WCS_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_to_UTF8_with_sub_p", ITc_i18n_ustring_to_UTF8_with_sub_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_from_UTF8_with_sub_p", ITc_i18n_ustring_from_UTF8_with_sub_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_from_UTF8_lenient_p", ITc_i18n_ustring_from_UTF8_lenient_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_to_UTF32_p", ITc_i18n_ustring_to_UTF32_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_from_UTF32_p", ITc_i18n_ustring_from_UTF32_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_from_UTF32_with_sub_p", ITc_i18n_ustring_from_UTF32_with_sub_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_to_UTF32_with_sub_p", ITc_i18n_ustring_to_UTF32_with_sub_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ustring_to_title_new_p", ITc_i18n_ustring_to_title_new_p, ITs_base_utils_startup, ITs_base_utils_cleanup},
+    {"ITc_i18n_ubrk_create_destroy_p", ITc_i18n_ubrk_create_destroy_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_create_rules_p", ITc_i18n_ubrk_create_rules_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_safe_clone_p", ITc_i18n_ubrk_safe_clone_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_set_text_p", ITc_i18n_ubrk_set_text_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_current_p", ITc_i18n_ubrk_current_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_next_previous_p", ITc_i18n_ubrk_next_previous_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_first_last_p", ITc_i18n_ubrk_first_last_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_preceding_following_p", ITc_i18n_ubrk_preceding_following_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_get_available_p", ITc_i18n_ubrk_get_available_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_count_available_p", ITc_i18n_ubrk_count_available_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_is_boundary_p", ITc_i18n_ubrk_is_boundary_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_get_rule_status_p", ITc_i18n_ubrk_get_rule_status_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_get_rule_status_vec_p", ITc_i18n_ubrk_get_rule_status_vec_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ubrk_get_locale_by_type_p", ITc_i18n_ubrk_get_locale_by_type_p, ITs_base_utils_ubrk_startup, ITs_base_utils_ubrk_cleanup},
+    {"ITc_i18n_ucalendar_timezone_id_enumeration_create_p", ITc_i18n_ucalendar_timezone_id_enumeration_create_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_timezones_create_p", ITc_i18n_ucalendar_timezones_create_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_country_timezones_create_p", ITc_i18n_ucalendar_country_timezones_create_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_default_timezone_p", ITc_i18n_ucalendar_get_default_timezone_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_set_timezone_p", ITc_i18n_ucalendar_set_timezone_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_timezone_id_get_canonical_timezone_id_p", ITc_i18n_ucalendar_get_timezone_id_get_canonical_timezone_id_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_set_get_gregorian_change_p", ITc_i18n_ucalendar_set_get_gregorian_change_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_available_p", ITc_i18n_ucalendar_get_available_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_count_available_p", ITc_i18n_ucalendar_count_available_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_roll_p", ITc_i18n_ucalendar_roll_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_is_set_p", ITc_i18n_ucalendar_is_set_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_clear_field_p", ITc_i18n_ucalendar_clear_field_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_clear_p", ITc_i18n_ucalendar_clear_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_limit_p", ITc_i18n_ucalendar_get_limit_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_locale_by_type_p", ITc_i18n_ucalendar_get_locale_by_type_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_tz_data_version_p", ITc_i18n_ucalendar_get_tz_data_version_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_type_p", ITc_i18n_ucalendar_get_type_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_keyword_values_for_locale_p", ITc_i18n_ucalendar_get_keyword_values_for_locale_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_day_of_week_type_p", ITc_i18n_ucalendar_get_day_of_week_type_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_weekend_transition_p", ITc_i18n_ucalendar_get_weekend_transition_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_is_weekend_p", ITc_i18n_ucalendar_is_weekend_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_field_difference_p", ITc_i18n_ucalendar_get_field_difference_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_ucalendar_get_timezone_transition_date_p", ITc_i18n_ucalendar_get_timezone_transition_date_p, ITs_base_utils_ucalendar_startup, ITs_base_utils_ucalendar_cleanup},
+    {"ITc_i18n_udatepg_create_destroy_p", ITc_i18n_udatepg_create_destroy_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_get_best_pattern_p", ITc_i18n_udatepg_get_best_pattern_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_set_get_decimal_p", ITc_i18n_udatepg_set_get_decimal_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_set_get_date_time_format_p", ITc_i18n_udatepg_set_get_date_time_format_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_set_get_append_item_name_p", ITc_i18n_udatepg_set_get_append_item_name_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_set_get_append_item_format_p", ITc_i18n_udatepg_set_get_append_item_format_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_replace_field_types_with_options_p", ITc_i18n_udatepg_replace_field_types_with_options_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_replace_field_types_p", ITc_i18n_udatepg_replace_field_types_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_get_skeleton_p", ITc_i18n_udatepg_get_skeleton_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_get_best_pattern_with_options_p", ITc_i18n_udatepg_get_best_pattern_with_options_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_get_base_skeleton_p", ITc_i18n_udatepg_get_base_skeleton_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_skeletons_create_p", ITc_i18n_udatepg_skeletons_create_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_base_skeletons_create_p", ITc_i18n_udatepg_base_skeletons_create_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_create_empty_p", ITc_i18n_udatepg_create_empty_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_clone_p", ITc_i18n_udatepg_clone_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_add_pattern_p", ITc_i18n_udatepg_add_pattern_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udatepg_get_pattern_for_skeleton_p", ITc_i18n_udatepg_get_pattern_for_skeleton_p, ITs_base_utils_udatepg_startup, ITs_base_utils_udatepg_cleanup},
+    {"ITc_i18n_udate_to_calendar_date_field_p", ITc_i18n_udate_to_calendar_date_field_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_clone_p", ITc_i18n_udate_clone_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_parse_p", ITc_i18n_udate_parse_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_parse_calendar_p", ITc_i18n_udate_parse_calendar_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_is_set_lenient_p", ITc_i18n_udate_is_set_lenient_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_get_set_calendar_p", ITc_i18n_udate_get_set_calendar_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_get_set_number_format_p", ITc_i18n_udate_get_set_number_format_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_get_set_2digit_year_start_p", ITc_i18n_udate_get_set_2digit_year_start_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_set_get_symbols_p", ITc_i18n_udate_set_get_symbols_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_get_available_p", ITc_i18n_udate_get_available_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_count_available_p", ITc_i18n_udate_count_available_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_apply_pattern_p", ITc_i18n_udate_apply_pattern_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_apply_to_pattern_p", ITc_i18n_udate_apply_to_pattern_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_count_symbols_p", ITc_i18n_udate_count_symbols_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_get_locale_by_type_p", ITc_i18n_udate_get_locale_by_type_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_udate_set_context_p", ITc_i18n_udate_set_context_p, ITs_base_utils_udate_startup, ITs_base_utils_udate_cleanup},
+    {"ITc_i18n_ulocale_get_language_p", ITc_i18n_ulocale_get_language_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_display_name_p", ITc_i18n_ulocale_get_display_name_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_set_get_default_p", ITc_i18n_ulocale_set_get_default_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_available_p", ITc_i18n_ulocale_get_available_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_country_p", ITc_i18n_ulocale_get_country_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_count_available_p", ITc_i18n_ulocale_count_available_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_add_likely_subtags_p", ITc_i18n_ulocale_add_likely_subtags_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_canonicalize_p", ITc_i18n_ulocale_canonicalize_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_for_language_tag_p", ITc_i18n_ulocale_for_language_tag_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_base_name_p", ITc_i18n_ulocale_get_base_name_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_character_orientation_p", ITc_i18n_ulocale_get_character_orientation_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_display_country_p", ITc_i18n_ulocale_get_display_country_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_display_keyword_p", ITc_i18n_ulocale_get_display_keyword_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_display_keyword_value_p", ITc_i18n_ulocale_get_display_keyword_value_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_display_language_p", ITc_i18n_ulocale_get_display_language_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_display_script_p", ITc_i18n_ulocale_get_display_script_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_display_variant_p", ITc_i18n_ulocale_get_display_variant_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_iso3_country_p", ITc_i18n_ulocale_get_iso3_country_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_iso3_language_p", ITc_i18n_ulocale_get_iso3_language_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_iso_countries_p", ITc_i18n_ulocale_get_iso_countries_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_iso_languages_p", ITc_i18n_ulocale_get_iso_languages_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_set_get_keyword_value_p", ITc_i18n_ulocale_set_get_keyword_value_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_lcid_p", ITc_i18n_ulocale_get_lcid_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_line_orientation_p", ITc_i18n_ulocale_get_line_orientation_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_locale_for_lcid_p", ITc_i18n_ulocale_get_locale_for_lcid_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_name_p", ITc_i18n_ulocale_get_name_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_parent_p", ITc_i18n_ulocale_get_parent_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_script_p", ITc_i18n_ulocale_get_script_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_get_variant_p", ITc_i18n_ulocale_get_variant_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_keywords_create_p", ITc_i18n_ulocale_keywords_create_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_minimize_subtags_p", ITc_i18n_ulocale_minimize_subtags_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_ulocale_to_language_tag_p", ITc_i18n_ulocale_to_language_tag_p, ITs_base_utils_ulocale_startup, ITs_base_utils_ulocale_cleanup},
+    {"ITc_i18n_unumber_create_destroy_p", ITc_i18n_unumber_create_destroy_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_apply_pattern_p", ITc_i18n_unumber_apply_pattern_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_clone_p", ITc_i18n_unumber_clone_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_count_available_p", ITc_i18n_unumber_count_available_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_format_decimal_p", ITc_i18n_unumber_format_decimal_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_format_double_p", ITc_i18n_unumber_format_double_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_format_double_currency_p", ITc_i18n_unumber_format_double_currency_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_format_int64_p", ITc_i18n_unumber_format_int64_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_set_get_attribute_p", ITc_i18n_unumber_set_get_attribute_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_get_available_p", ITc_i18n_unumber_get_available_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_set_get_double_attribute_p", ITc_i18n_unumber_set_get_double_attribute_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_get_locale_by_type_p", ITc_i18n_unumber_get_locale_by_type_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_set_get_text_attribute_p", ITc_i18n_unumber_set_get_text_attribute_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_parse_p", ITc_i18n_unumber_parse_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_parse_decimal_p", ITc_i18n_unumber_parse_decimal_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_parse_double_p", ITc_i18n_unumber_parse_double_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_parse_double_currency_p", ITc_i18n_unumber_parse_double_currency_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_parse_int64_p", ITc_i18n_unumber_parse_int64_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_to_pattern_p", ITc_i18n_unumber_to_pattern_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_unumber_set_get_symbol_p", ITc_i18n_unumber_set_get_symbol_p, ITs_base_utils_unumber_startup, ITs_base_utils_unumber_cleanup},
+    {"ITc_i18n_uset_create_empty_p", ITc_i18n_uset_create_empty_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_create_destroy_p", ITc_i18n_uset_create_destroy_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_create_pattern_p", ITc_i18n_uset_create_pattern_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_create_pattern_options_p", ITc_i18n_uset_create_pattern_options_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_clone_p", ITc_i18n_uset_clone_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_freeze_p", ITc_i18n_uset_freeze_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_is_frozen_p", ITc_i18n_uset_is_frozen_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_clone_as_thawed_p", ITc_i18n_uset_clone_as_thawed_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_set_p", ITc_i18n_uset_set_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_apply_pattern_p", ITc_i18n_uset_apply_pattern_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_apply_int_property_value_p", ITc_i18n_uset_apply_int_property_value_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_apply_property_alias_p", ITc_i18n_uset_apply_property_alias_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_resembles_pattern_p", ITc_i18n_uset_resembles_pattern_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_to_pattern_p", ITc_i18n_uset_to_pattern_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_add_remove_p", ITc_i18n_uset_add_remove_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_add_remove_all_p", ITc_i18n_uset_add_remove_all_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_add_remove_range_p", ITc_i18n_uset_add_remove_range_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_add_remove_string_p", ITc_i18n_uset_add_remove_string_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_add_all_code_points_p", ITc_i18n_uset_add_all_code_points_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_retain_p", ITc_i18n_uset_retain_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_retain_all_p", ITc_i18n_uset_retain_all_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_compact_p", ITc_i18n_uset_compact_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_complement_p", ITc_i18n_uset_complement_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_complement_all_p", ITc_i18n_uset_complement_all_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_clear_p", ITc_i18n_uset_clear_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_destroy_over_p", ITc_i18n_uset_destroy_over_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_remove_all_strings_p", ITc_i18n_uset_remove_all_strings_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_is_empty_p", ITc_i18n_uset_is_empty_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_contains_p", ITc_i18n_uset_contains_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_contains_range_p", ITc_i18n_uset_contains_range_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_contains_string_p", ITc_i18n_uset_contains_string_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_index_of_p", ITc_i18n_uset_index_of_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_char_at_p", ITc_i18n_uset_char_at_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_size_p", ITc_i18n_uset_size_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_get_item_count_p", ITc_i18n_uset_get_item_count_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_get_item_p", ITc_i18n_uset_get_item_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_contains_all_p", ITc_i18n_uset_contains_all_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_contains_all_code_points_p", ITc_i18n_uset_contains_all_code_points_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_contains_none_p", ITc_i18n_uset_contains_none_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_contains_some_p", ITc_i18n_uset_contains_some_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_span_p", ITc_i18n_uset_span_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_span_back_p", ITc_i18n_uset_span_back_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_span_utf8_p", ITc_i18n_uset_span_utf8_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_span_back_utf8_p", ITc_i18n_uset_span_back_utf8_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_equals_p", ITc_i18n_uset_equals_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_serialize_p", ITc_i18n_uset_serialize_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_get_serialized_set_p", ITc_i18n_uset_get_serialized_set_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_set_serialized_to_one_p", ITc_i18n_uset_set_serialized_to_one_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_serialized_contains_p", ITc_i18n_uset_serialized_contains_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_get_serialized_range_count_p", ITc_i18n_uset_get_serialized_range_count_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {"ITc_i18n_uset_get_serialized_range_p", ITc_i18n_uset_get_serialized_range_p, ITs_base_utils_uset_startup, ITs_base_utils_uset_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_BASE_UTILS_NATIVE_H__
diff --git a/src/itc/bluetooth/CMakeLists.txt b/src/itc/bluetooth/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..8ba9854
--- /dev/null
@@ -0,0 +1,37 @@
+SET(PKG_NAME "bluetooth")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-network-bluetooth")
+SET(TC_SOURCES
+       ITs-bluetooth-common.c
+       ITs-bluetooth.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-appfw-application
+       glib-2.0
+       bundle
+       capi-system-info
+       storage
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/bluetooth/ITs-bluetooth-common.c b/src/itc/bluetooth/ITs-bluetooth-common.c
new file mode 100755 (executable)
index 0000000..0942394
--- /dev/null
@@ -0,0 +1,440 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-bluetooth-common.h"
+
+/** @addtogroup itc-bluetooth
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stBluetoothStartTime;
+extern struct mallinfo g_stBluetoothMemInfo;
+
+/**
+* @function                                    BluetoothErrorInfo
+* @description                                         print the error information
+* @parameter[in]                               nResult: the error code
+* @return                                              pszErrorMsg: return the error message
+*/
+char *BluetoothErrorInfo(int nResult)
+{
+       char *pszErrorMsg = NULL;
+
+       switch ( nResult )
+       {
+       case BT_ERROR_CANCELLED :
+               pszErrorMsg = "BT_ERROR_CANCELLED  \n";
+               break;
+       case BT_ERROR_INVALID_PARAMETER :
+               pszErrorMsg = "BT_ERROR_INVALID_PARAMETER \n";
+               break;
+       case BT_ERROR_OUT_OF_MEMORY :
+               pszErrorMsg = "BT_ERROR_OUT_OF_MEMORY \n";
+               break;
+       case BT_ERROR_RESOURCE_BUSY :
+               pszErrorMsg = "BT_ERROR_RESOURCE_BUSY \n";
+               break;
+       case BT_ERROR_TIMED_OUT :
+               pszErrorMsg = "BT_ERROR_TIMED_OUT  \n";
+               break;
+       case BT_ERROR_NOW_IN_PROGRESS:
+               pszErrorMsg = "BT_ERROR_NOW_IN_PROGRESS \n";
+               break;
+       case BT_ERROR_NOT_INITIALIZED:
+               pszErrorMsg = "BT_ERROR_NOT_INITIALIZED \n";
+               break;
+       case BT_ERROR_NOT_ENABLED :
+               pszErrorMsg = "BT_ERROR_NOT_ENABLED  \n";
+               break;
+       case BT_ERROR_ALREADY_DONE :
+               pszErrorMsg = "BT_ERROR_ALREADY_DONE \n";
+               break;
+       case BT_ERROR_OPERATION_FAILED :
+               pszErrorMsg = "BT_ERROR_OPERATION_FAILED  \n";
+               break;
+       case BT_ERROR_NOT_IN_PROGRESS :
+               pszErrorMsg = "BT_ERROR_NOT_IN_PROGRESS  \n";
+               break;
+       case BT_ERROR_REMOTE_DEVICE_NOT_BONDED :
+               pszErrorMsg = "BT_ERROR_REMOTE_DEVICE_NOT_BONDED  \n";
+               break;
+       case BT_ERROR_AUTH_REJECTED :
+               pszErrorMsg = "BT_ERROR_AUTH_REJECTED \n";
+               break;
+       case BT_ERROR_AUTH_FAILED:
+               pszErrorMsg = "BT_ERROR_AUTH_FAILED \n";
+               break;
+       case BT_ERROR_REMOTE_DEVICE_NOT_FOUND :
+               pszErrorMsg = "BT_ERROR_REMOTE_DEVICE_NOT_FOUND  \n";
+               break;
+       case BT_ERROR_SERVICE_SEARCH_FAILED :
+               pszErrorMsg = "BT_ERROR_SERVICE_SEARCH_FAILED  \n";
+               break;
+       case BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED:
+               pszErrorMsg = "BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED \n";
+               break;
+       case BT_ERROR_PERMISSION_DENIED :
+               pszErrorMsg = "BT_ERROR_PERMISSION_DENIED  \n";
+               break;
+       default:
+               pszErrorMsg = "UNDEFINED ERROR \n";
+               break;
+       }
+       return pszErrorMsg;
+}
+
+/**
+* @function            BluetoothGetEnumString
+* @description         Maps type enums to string values
+* @parameter[IN]       enum_discoverable_mode: enum value
+* @return                      pszEnumString: enum value as a string
+*/
+char* BluetoothGetEnumString(bt_adapter_visibility_mode_e enum_discoverable_mode)
+{
+       char *pszEnumString = NULL;
+       switch ( enum_discoverable_mode )
+       {
+       case BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE: 
+               pszEnumString = "BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE"; 
+               break;  
+       case BT_ADAPTER_VISIBILITY_MODE_GENERAL_DISCOVERABLE: 
+               pszEnumString = "BT_ADAPTER_VISIBILITY_MODE_GENERAL_DISCOVERABLE"; 
+               break;  
+       case BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE: 
+               pszEnumString = "BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE"; 
+               break;  
+       default : 
+               pszEnumString = "UNKNOWN" ; 
+               break;
+       }
+       return pszEnumString;
+}
+
+
+/**
+* @function            BluetoothGetPacketTypeEnumString
+* @description         Maps type enums to string values
+* @parameter[IN]       nRet: enum value
+* @return                      pszEnumString: enum value as a string
+*/
+char* BluetoothGetPacketTypeEnumString(int nRet)
+{
+       char *pszEnumString = NULL;
+       switch ( nRet )
+       {
+       case BT_ADAPTER_LE_PACKET_ADVERTISING:
+               pszEnumString = "BT_ADAPTER_LE_PACKET_ADVERTISING"; 
+               break;
+       case BT_ADAPTER_LE_PACKET_SCAN_RESPONSE:
+               pszEnumString = "BT_ADAPTER_LE_PACKET_SCAN_RESPONSE"; 
+               break;
+       default : 
+               pszEnumString = "UNKNOWN"; 
+               break;
+       }
+       return pszEnumString;
+}
+
+/**
+* @function                    BluetoothGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory: String pointer containing the difference of total number of bytes for Current and Previous Memory Allocation.
+* @return                      NA
+*/
+void BluetoothGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stBluetoothMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stBluetoothMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stBluetoothMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+       return;
+}
+
+/**
+* @function                    BluetoothGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void BluetoothGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stBluetoothMemInfo = mallinfo();
+#endif
+       return;
+}
+
+/**
+* @function            BluetoothExecutionDelay
+* @description         Returns a log for a code-block of statements execution delay
+* @parameter[OUT]      pszAPITime: String pointer containing the time difference
+* @return                      NA
+*/
+void BluetoothExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       if (pszAPITime != NULL)
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stBluetoothStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stBluetoothStartTime.tv_usec;
+                       
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+#endif
+       return;
+}
+
+/**
+* @function            BluetoothGetTimeOfDay
+* @description         Get time prior to target api call & set it to g_stBluetoothStartTime
+* @parameter           NA
+* @return                      NA
+*/ 
+void BluetoothGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stBluetoothStartTime, NULL);
+#endif
+       return;
+}
+
+
+/**
+* @function            BluetoothInitAudio
+* @description         Initialize bluetooth audio and create device bond
+* @parameter[IN]       pszRemoteDeviceAddress: Address of the remote device to connect with.
+* @return                      true or false
+*/
+bool BluetoothInitAudio(char *pszRemoteDeviceAddress)
+{
+       int nRet = 0;
+       
+       nRet = bt_audio_initialize();
+       if (nRet != BT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] bt_audio_initialize failed. Error returned = %s ", __LINE__, BluetoothErrorInfo(nRet));
+               return false;
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] bt_audio_initialize passed ", __LINE__);
+       }
+       
+       nRet = bt_device_create_bond(pszRemoteDeviceAddress);
+       if (nRet != BT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] bt_device_create_bond failed. Error returned = %s ", __LINE__, BluetoothErrorInfo(nRet));
+               bt_audio_deinitialize();
+               return false;
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] bt_device_create_bond passed ", __LINE__);
+       }
+       sleep(5);
+       return true;
+}
+
+/**
+* @function            BluetoothDeinitAudio
+* @description         Destroy device bonding, deinitialize bluetooth audio
+* @parameter[IN]       pszRemoteDeviceAddress: Address of the remote device to disconnect
+* @return                      NA
+*/ 
+void BluetoothDeinitAudio(char *pszRemoteDeviceAddress)
+{
+       int nRet = 0;
+       nRet = bt_device_destroy_bond(pszRemoteDeviceAddress);
+       PRINT_ERROR("bt_device_destroy_bond");
+       sleep(2);
+       
+       nRet = bt_audio_deinitialize();
+       PRINT_ERROR("bt_audio_deinitialize");
+
+       return;
+}
+
+/**
+* @function            BluetoothGetDataPath
+* @description         Returns the application data path
+* @parameter           pAppDataPath: application data path
+* @return                      true if succeed else false
+*/
+bool BluetoothGetDataPath(char* pAppDataPath)
+{
+       if ( NULL == pAppDataPath )
+       {
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] Null Path provided; Check the input string. ", __LINE__);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if(NULL == pPath)
+       {
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] Unable to get application data path; app_get_data_path returned null value. ", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF("\\n[Line : %d] [Bluetooth_ITc] application data path returned = %s ", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+
+/**
+ * @function           BluetoothCheckSystemInfoFeatureSupported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool BluetoothCheckSystemInfoFeatureSupported(char* pszKey)
+{
+       if(NULL == pszKey)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Null key value passed to function : BluetoothCheckSystemInfoFeatureSupported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRet = system_info_get_platform_bool (pszKey, &bValue);
+
+       if(nRet != SYSTEM_INFO_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] system_info_get_platform_bool returned (error = %s) for (key = %s)",__LINE__, BluetoothSystemInfoGetError(nRet), pszKey);
+               return false;
+       }
+
+       if(false == bValue)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] system_info_get_platform_bool returned Supported status feature for (key = %s)",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+/**
+ * @function           BluetoothSystemInfoGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* BluetoothSystemInfoGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Cannot find key in model config file " ; break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR  : szErrorVal = "Error - An input/output error occurred when read value from model config file " ; break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY   : szErrorVal = "Error - Out of memory  " ; break;
+                       
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            StorageGetError
+* @description         Maps storage_error_e enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* StorageGetError(storage_error_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case STORAGE_ERROR_NONE:                szErrorVal = "STORAGE_ERROR_NONE";                      break;
+       case STORAGE_ERROR_INVALID_PARAMETER:   szErrorVal = "STORAGE_ERROR_INVALID_PARAMETER";         break;
+       case STORAGE_ERROR_OUT_OF_MEMORY:       szErrorVal = "STORAGE_ERROR_OUT_OF_MEMORY";             break;
+       case STORAGE_ERROR_NOT_SUPPORTED:       szErrorVal = "STORAGE_ERROR_NOT_SUPPORTED";             break;
+       case STORAGE_ERROR_OPERATION_FAILED:    szErrorVal = "STORAGE_ERROR_OPERATION_FAILED";          break;
+       default:                                szErrorVal = "Unknown Error";                           break;
+       }
+       return szErrorVal;
+}
+
+
+/**
+* @function            BluetoothGetStorageDownloadsPath
+* @description         Returns downloads directory path
+* @parameter           pszPath: path of downloads directory
+* @return                      true if succeed else false
+*/
+bool BluetoothGetStorageDownloadsPath(char *pszPath)
+{
+       char *pszTempPath = NULL;
+       storage_error_e nRet = storage_get_directory(STORAGE_TYPE_INTERNAL, STORAGE_DIRECTORY_DOWNLOADS, &pszTempPath);//target api
+       if ( nRet != STORAGE_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] storage_get_directory failed to get path for STORAGE_DIRECTORY_DOWNLOADS, error returned = %s", __LINE__, StorageGetError(nRet));
+               return false;   
+       }
+
+       if ( pszTempPath == NULL )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] storage_get_directory returned NULL path for STORAGE_DIRECTORY_DOWNLOADS", __LINE__);
+               return false;   
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] STORAGE_DIRECTORY_DOWNLOADS path is = %s", __LINE__, pszTempPath);
+               strcpy(pszPath, pszTempPath);
+               free(pszTempPath);
+               pszTempPath = NULL;
+       }
+       return true;
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/bluetooth/ITs-bluetooth-common.h b/src/itc/bluetooth/ITs-bluetooth-common.h
new file mode 100755 (executable)
index 0000000..a028bfb
--- /dev/null
@@ -0,0 +1,287 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_BLUETOOTH_COMMON_H_
+#define _ITS_BLUETOOTH_COMMON_H_
+
+#include "assert.h"
+#include "assert.h"
+#include "bluetooth.h"
+#include <storage.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <glib-2.0/glib.h>
+#include <time.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <system_info.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <app.h>
+
+/** @addtogroup itc-bluetooth
+*  @ingroup itc
+*  @{
+*/
+
+#define CONFIG_LINE_LEN_MAX                            2048    //maximum key-value line length
+#define CONFIG_VALUE_LEN_MAX                   1024    //maximum length of value 
+#define LOG                                                            100
+#define EXECUTE_MANUAL                                 0
+#define TIMELOG                                                        20
+#define MEMLOG                                                 20
+#define MICROSECONDS_PER_SECOND                        1000000
+#define ADAPTER_NAME                                   "BT_TEST"
+#define ADAPTER_NAME_LENGTH                            15
+#define SHORT_DELAY                                            2000
+#define LONG_DELAY                                             5000
+#define CALLBACK_DELAY                                 40000
+#define PATH_LEN                                               1024
+#define OPP_FILE_NAME                                  "TestFile.vcf"
+#define BLUETOOTH_SERVICE_UUID                 "00001105-0000-1000-8000-00805f9b34fb"  
+#define SLEEP_TIME                                             5
+#define BLUETOOTH_FEATURE                              "http://tizen.org/feature/network.bluetooth"
+#define BLUETOOTH_OPP_FEATURE                  "http://tizen.org/feature/network.bluetooth.opp"
+#define BLUETOOTH_AUDIOMEDIA_FEATURE   "http://tizen.org/feature/network.bluetooth.audio.media"
+#define BLUETOOTH_AUDIOCALL_FEATURE            "http://tizen.org/feature/network.bluetooth.audio.call"
+#define BLUETOOTH_LE_FEATURE                   "http://tizen.org/feature/network.bluetooth.le"
+                                                                       
+FILE *g_fpLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d] [Bluetooth_ITc] Starting test : %s", __LINE__,__FUNCTION__);\
+       if (g_bBluetoothMismatch)\
+       {\
+               FPRINTF("[Line : %d][Bluetooth_ITc] Feature support as returned by BluetoothCheckSystemInfoFeatureSupported() and error code as returned by bt_initialize() mismatched, Leaving test ", __LINE__);\
+               return 1;\
+       }\
+       else if (g_bBluetoothNotSupported)\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] Bluetooth feature not supported, Leaving test ", __LINE__);\
+               return 0;\
+       }\
+       if ( !g_bBluetoothInit )\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] Precondition of bluetooth initialaztion failed, Leaving test ", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define VALIDATE_RESULT(nErrCount1, szTargetApi, szApi1,szApi2) \
+       if ( nErrCount1 > 0)\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] %s failed %d times, out of %d times", __LINE__, szTargetApi, nErrCount1, MAX_COUNT);\
+               if (szApi1 != NULL)\
+               {\
+                       free(szApi1);\
+                       szApi1 = NULL;\
+               }\
+               if (szApi2 != NULL)\
+               {\
+                       free(szApi2);\
+                       szApi2 = NULL;\
+               }\
+               return 1;\
+       }\
+       
+#define VALIDATE_RESULT_PAIRAPI(nErrCount1, nErrCount2, strTargetApi1, strTargetApi2, szApi1, szApi2, szApi3) \
+       if ( nErrCount1 > 0 || nErrCount2 > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] %s failed %d times, %s failed %d times out of %d times", __LINE__, strTargetApi1, nErrCount1, strTargetApi2, nErrCount2, MAX_COUNT);\
+               if (szApi1 != NULL)\
+               {\
+                       free(szApi1);\
+                       szApi1 = NULL;\
+               }\
+               if (szApi2 != NULL)\
+               {\
+                       free(szApi2);\
+                       szApi2 = NULL;\
+               }\
+               if (szApi3 != NULL)\
+               {\
+                       free(szApi3);\
+                       szApi3 = NULL;\
+               }\
+               return 1;\
+       }\
+       
+#define PRINT_MEMORY_LOG(api, memLog){\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] %s_MemoryLeakStatus - %s", __LINE__, #api, memLog);\
+       }\
+}
+
+#define PRINT_SPEED_LOG(api, szSpeedLog)\
+       if(strlen(szSpeedLog) > 0) \
+       {\
+               szSpeedLog[strlen(szSpeedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] %s_TimeInMicrosec- %s", __LINE__, #api, szSpeedLog);\
+       }\
+
+#define FREE_MEMORY_PAIR(szApi1, szApi2, szApi3)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+       if (szApi3 != NULL)\
+       {\
+               free(szApi3);\
+               szApi3 = NULL;\
+       }\
+       
+#define FREE_MEMORY(szApi1, szApi2)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+       
+#define CHECK_CALLBACK_STATUS(szApiName, nErrorCount) {\
+       nTimeoutId = g_timeout_add(CALLBACK_DELAY, TimeoutFunction, g_pMainLoop);\
+       g_main_loop_run(g_pMainLoop);\
+       g_source_remove(nTimeoutId);\
+       if (g_bCallbackResult == false)\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] After %s, callback has not been invoked. Iteration %d ", __LINE__, szApiName, nLoopCount);\
+               nErrorCount++;\
+               continue;\
+       }\
+       else\
+       {\
+               g_bCallbackResult = false;\
+       }\
+}
+
+#define CHECK_UNSET_CALLBACK_STATUS(nTime, szApiName, nErrorCount)\
+       nTimeoutId = g_timeout_add(nTime, TimeoutFunction, g_pMainLoop);\
+       g_main_loop_run(g_pMainLoop);\
+       g_source_remove(nTimeoutId);\
+       if (g_bCallbackResult == true)\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] After %s, callback is invoked. Iteration %d ", __LINE__, szApiName, nLoopCount);\
+               nErrorCount++;\
+       }\
+
+#define CHECK_ERROR_CONTINUE(szApi, nErrorCount)\
+       if (nRet != BT_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] %s failed on iteration %d, error returned = %s ", __LINE__, szApi, nLoopCount, BluetoothErrorInfo(nRet));\
+               nErrorCount++;\
+               continue;\
+       }\
+       else\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] %s passed on iteration %d ", __LINE__, szApi, nLoopCount);\
+       }\
+
+#define CHECK_ERROR(szApi, nErrorCount)\
+       if (nRet != BT_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] %s failed on iteration %d, error returned = %s ", __LINE__, szApi, nLoopCount, BluetoothErrorInfo(nRet));\
+               nErrorCount++;\
+       }\
+       else\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] %s passed on iteration %d ", __LINE__, szApi, nLoopCount);\
+       }\
+       
+#define PRINT_ERROR(szApi)\
+       if (nRet != BT_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] %s failed, error returned = %s ", __LINE__,szApi, BluetoothErrorInfo(nRet));\
+       }\
+       else\
+       {\
+               FPRINTF("\\n[Line : %d] [Bluetooth_ITc] %s passed ", __LINE__, szApi);\
+       }\
+
+#define CHECK_UNSUPPORTED_ERROR_CONTINUE(szApi, nErrorCount)\
+       if ( !g_bBluetoothIsSupported )\
+       {\
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )\
+               {\
+                       FPRINTF("[Line : %d][Bluetooth_ITC] %s returned %s error for unsupported feature", __LINE__, szApi, BluetoothErrorInfo(nRet));\
+                       nErrorCount++;\
+               }\
+               else\
+               {\
+                       FPRINTF("[Line : %d][Bluetooth_ITC] %s is not supported", __LINE__, szApi);\
+               }\
+               continue;\
+       }\
+       
+#define CHECK_UNSUPPORTED_ERROR_RETURN(szApi)\
+       if ( !g_bBluetoothIsSupported )\
+       {\
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )\
+               {\
+                       FPRINTF("[Line : %d][Bluetooth_ITC] %s returned %s error for unsupported feature", __LINE__, szApi, BluetoothErrorInfo(nRet));\
+                       return 1;\
+               }\
+               else\
+               {\
+                       FPRINTF("[Line : %d][Bluetooth_ITC] %s is not supported", __LINE__, szApi);\
+                       return 0;\
+               }\
+       }\
+               
+#define WAIT(nTime)\
+       g_pMainLoop = g_main_loop_new(NULL, false);\
+       nTimeoutId = g_timeout_add(nTime, TimeoutFunction, g_pMainLoop);\
+       g_main_loop_run(g_pMainLoop);\
+       g_source_remove(nTimeoutId);\
+       
+char* BluetoothErrorInfo(int nRet);
+bool BluetoothCheckSystemInfoFeatureSupported(char* pszKey);
+char* BluetoothSystemInfoGetError(int nRet);
+char* BluetoothGetEnumString(bt_adapter_visibility_mode_e enum_discoverable_mode);
+char* BluetoothGetPacketTypeEnumString(int nRet);
+void BluetoothGetMemAllocation();
+void BluetoothExecutionDelay(char* pszAPITime);
+void BluetoothGetTimeOfDay();
+void BluetoothGetMemStatus(char *pszAPIMemory);
+bool BluetoothInitAudio(char *pszRemoteDeviceAddress);
+void BluetoothDeinitAudio(char *pszRemoteDeviceAddress);
+bool BluetoothGetDataPath(char* pPath);
+bool BluetoothGetStorageDownloadsPath(char *pszPath);
+char* StorageGetError(storage_error_e nRet);
+
+/** @} */
+#endif  //_ITS_BLUETOOTH_COMMON_H_
diff --git a/src/itc/bluetooth/ITs-bluetooth.c b/src/itc/bluetooth/ITs-bluetooth.c
new file mode 100755 (executable)
index 0000000..feb946a
--- /dev/null
@@ -0,0 +1,3658 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "ITs-bluetooth-common.h"
+
+/** @addtogroup itc-bluetooth
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Bluetooth
+
+struct timeval         g_stBluetoothStartTime;
+struct mallinfo g_stBluetoothMemInfo;
+static GMainLoop *g_pMainLoop;
+static bool g_bCallbackResult = false;
+static bool g_bCallbackPushRequested = false;
+static bool g_bReturnValueState = false;
+static bool g_bAdapterState = false;
+char g_pszLocalAdapterName[ADAPTER_NAME_LENGTH];
+int g_nBluetoothSocketFd;
+bool g_bBluetoothInit = false;
+bool g_bBluetoothMismatch = false;
+bool g_bBluetoothNotSupported = false;
+bool g_bBluetoothIsSupported = false;
+char **g_pszBluetoothUuids;
+int g_nBluetoothServiceCount = 0;
+
+gboolean TimeoutFunction(gpointer data);
+
+gboolean TimeoutFunction(gpointer data)
+{
+       g_main_loop_quit((GMainLoop *)data);
+       return false;
+}
+
+/**
+* @function            Bluetooth_adapter_state_changed_cb_p
+* @description         Callback Function
+* @parameter           int nResult, bt_adapter_state_e adapter_state, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_adapter_state_changed_cb_p(int nResult, bt_adapter_state_e adapter_state, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for adpter state change", __LINE__);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Result value: %d", __LINE__,  nResult);
+
+       g_bReturnValueState = false;
+
+       switch(adapter_state)
+       {
+               case BT_ADAPTER_ENABLED:
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Adpter State: BT_ADAPTER_ENABLED", __LINE__);
+                       if (g_bAdapterState == true)
+                       {
+                               g_bReturnValueState = true;
+                       }
+                       break;
+               case BT_ADAPTER_DISABLED:
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Adpter State: BT_ADAPTER_DISABLED", __LINE__);
+                       if (g_bAdapterState == false)
+                       {
+                               g_bReturnValueState = true;
+                       }
+                       break;
+               default:
+                       g_bReturnValueState = false;
+                       break;
+       }
+
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+
+/**
+* @function            Bluetooth_adapter_visibility_mode_changed_cb_p
+* @description         Callback Function
+* @parameter           int result, bt_adapter_visibility_mode_e visibility_mode, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_adapter_visibility_mode_changed_cb_p(int result, bt_adapter_visibility_mode_e visibility_mode, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for adpter visibility mode change", __LINE__);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Result value: %d", __LINE__,  result);
+       g_bReturnValueState = false;
+
+       switch(visibility_mode)
+       {
+               case BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE:
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Adpter Visibility mode: %s", __LINE__,  "BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE");
+                       g_bReturnValueState = true;
+                       break;
+               case BT_ADAPTER_VISIBILITY_MODE_GENERAL_DISCOVERABLE:
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Adpter Visibility mode: %s",__LINE__,  "BT_ADAPTER_VISIBILITY_MODE_GENERAL_DISCOVERABLE");
+                       g_bReturnValueState = true;
+                       break;
+               case BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE:
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Adpter Visibility mode: %s",__LINE__,  "BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE");
+                       g_bReturnValueState = true;
+                       break;
+               default:
+                       g_bReturnValueState = false;
+                       break;
+       }
+
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+/**
+* @function            Bluetooth_bt_adapter_name_changed_cb_p
+* @description         Callback Function
+* @parameter           char *pszDeviceName, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_adapter_name_changed_cb_p(char *pszDeviceName, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for adapter name change", __LINE__);
+       g_bReturnValueState = false;
+
+       if (strcmp(g_pszLocalAdapterName, pszDeviceName) == 0)
+       {
+               g_bReturnValueState = true;
+       }
+
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+/**
+* @function            Bluetooth_bt_adapter_visibility_duration_changed_cb_p
+* @description         Callback Function
+* @parameter           int nDuration, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_adapter_visibility_duration_changed_cb_p(int nDuration, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for adapter visibility duration change", __LINE__);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Duration value: %d", __LINE__, nDuration);
+
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+/**
+* @function            Bluetooth_bt_opp_server_connection_requested_cb_p
+* @description         Callback Function
+* @parameter           const char *pszRemoteAddress, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_opp_server_connection_requested_cb_p(const char *pszRemoteAddress, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked: opp_server_connection_requested", __LINE__);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Remote Device Address: %s", __LINE__, pszRemoteAddress);
+       g_bCallbackPushRequested = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+/**
+* @function            Bluetooth_adapter_device_discovery_state_changed_cb_p
+* @description         Callback Function
+* @parameter           int result, bt_adapter_device_discovery_state_e discovery_state, bt_adapter_device_discovery_info_s *discovery_info, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_adapter_device_discovery_state_changed_cb_p(int result, bt_adapter_device_discovery_state_e discovery_state, bt_adapter_device_discovery_info_s *discovery_info, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for device discovery state change", __LINE__);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Result value: %d", __LINE__, result);
+       g_bReturnValueState = false;
+
+       switch(discovery_state)
+       {
+               case BT_ADAPTER_DEVICE_DISCOVERY_STARTED:
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Device discovery state: %s", __LINE__, "BT_ADAPTER_DEVICE_DISCOVERY_STARTED");
+                       g_bReturnValueState = true;
+                       break;
+               case BT_ADAPTER_DEVICE_DISCOVERY_FINISHED:
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Device discovery state: %s", __LINE__, "BT_ADAPTER_DEVICE_DISCOVERY_FINISHED");
+                       g_bReturnValueState = true;
+                       break;
+               case BT_ADAPTER_DEVICE_DISCOVERY_FOUND:
+                       {
+                               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Device discovery state: %s", __LINE__, "BT_ADAPTER_DEVICE_DISCOVERY_FOUND");
+                               if (discovery_info != NULL)
+                               {
+                                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Remote Address: %s", __LINE__, discovery_info->remote_address);
+                                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Remote Name: %s", __LINE__, discovery_info->remote_name);
+                                       g_bReturnValueState = true;
+                               }
+                               else
+                               {
+                                       g_bReturnValueState = false;
+                               }
+                       }
+                       break;
+               default:
+                       g_bReturnValueState = false;
+                       break;
+       }
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+
+/**
+* @function            Bluetooth_bt_socket_connection_requested_cb_p
+* @description         Callback Function
+* @parameter           int socket_fd, const char *remote_address, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_socket_connection_requested_cb_p(int socket_fd, const char *remote_address, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for socket connection requested", __LINE__);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Socketfd value: %d", __LINE__, socket_fd);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Remote address: %s", __LINE__, remote_address);
+}
+
+/**
+* @function            Bluetooth_bt_socket_data_received_cb_p
+* @description         Callback Function
+* @parameter           bt_socket_received_data_s *pData, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_socket_data_received_cb_p(bt_socket_received_data_s *pData, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for socket data received", __LINE__);
+
+       if ( pData != NULL )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Socketfd value: %d", __LINE__, pData->socket_fd);
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Data size: %d", __LINE__, pData->data_size);
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Data : %s", __LINE__, pData->data);
+       }
+}
+/**
+* @function            Bluetooth_bt_audio_connection_state_changed_cb_p
+* @description         Callback Function
+* @parameter           int result, bool connected, const char *remote_address, bt_audio_profile_type_e type, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_audio_connection_state_changed_cb_p(int result, bool connected, const char *remote_address, bt_audio_profile_type_e type, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked: bt_audio_connection_state_changed", __LINE__);
+       switch(type)
+       {
+               case BT_AUDIO_PROFILE_TYPE_ALL:
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] PROIFLE: BT_AUDIO_PROFILE_TYPE_ALL Profile", __LINE__);
+                       break;
+               case BT_AUDIO_PROFILE_TYPE_HSP_HFP:
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] PROIFLE: BT_AUDIO_PROFILE_TYPE_HSP_HFP Profile", __LINE__);
+                       break;
+               case BT_AUDIO_PROFILE_TYPE_A2DP :
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] PROIFLE: BT_AUDIO_PROFILE_TYPE_A2DP", __LINE__);
+                       break;
+               default:
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] PROIFLE: UNKNOWN", __LINE__);
+                       break;
+       }
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] RemoteAddress: %s", __LINE__, remote_address);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Connected: %d", __LINE__, connected);
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+/**
+* @function            Bluetooth_bt_device_authorization_changed_cb_p
+* @description         Callback Function
+* @parameter           bt_device_authorization_e authorization, char *remote_address, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_device_authorization_changed_cb_p(bt_device_authorization_e authorization, char *remote_address, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for device set authorization", __LINE__);
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+/**
+* @function            Bluetooth_bt_device_service_searched_cb_p
+* @description         Callback Function
+* @parameter           int result, bt_device_sdp_info_s *sdp_info, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_device_service_searched_cb_p(int result, bt_device_sdp_info_s *sdp_info, void *user_data)
+{
+       int nCounter = 0;
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for service search", __LINE__);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] result is: %d", __LINE__,result);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] service_count is: %d", __LINE__, sdp_info->service_count);
+
+       if (sdp_info->service_count > 0)
+       {
+               g_nBluetoothServiceCount = sdp_info->service_count;
+               g_pszBluetoothUuids = malloc(sdp_info->service_count * sizeof(char*));
+               for(nCounter = 0; nCounter < g_nBluetoothServiceCount; nCounter++)
+               {
+                       g_pszBluetoothUuids[nCounter] = malloc(50 * sizeof(char));
+                       strcpy(g_pszBluetoothUuids[nCounter], sdp_info->service_uuid[nCounter]);
+               }
+       }
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+/**
+* @function            Bluetooth_bt_device_bond_created_cb_p
+* @description         Callback Function
+* @parameter           int result, bt_device_info_s * device_info, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_device_bond_created_cb_p(int result, bt_device_info_s * device_info, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for device bonding creation", __LINE__);
+       if (device_info != NULL)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Remote Address: %s", __LINE__, device_info->remote_address);
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Remote Name: %s", __LINE__, device_info->remote_name);
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Is Bonded: %d", __LINE__, device_info->is_bonded);
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Is Connected: %d", __LINE__, device_info->is_connected);
+       }
+
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+
+/**
+* @function            Bluetooth_bt_device_bond_destroyed_cb_p
+* @description         Callback Function
+* @parameter           int result, char *remote_address, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_device_bond_destroyed_cb_p(int result, char *remote_address, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for device bonding destroy", __LINE__);
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+/**
+* @function            Bluetooth_bt_device_connection_state_changed_cb_p
+* @description         Callback Function
+* @parameter           bool connected, bt_device_connection_info_s *conn_info, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_device_connection_state_changed_cb_p(bool connected, bt_device_connection_info_s *conn_info, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for connection state change", __LINE__);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Connection Status: %d", __LINE__, connected);
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+
+//Bluetooth Socket Callbacks
+
+/**
+* @function            Bluetooth_socket_connection_state_changed_cb_p
+* @description         Callback Function
+* @parameter           int result, bt_socket_connection_state_e connection_state, bt_socket_connection_s *connection, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_socket_connection_state_changed_cb_p(int result, bt_socket_connection_state_e connection_state, bt_socket_connection_s *connection, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback invoked for socket connection state change", __LINE__);
+       if (connection_state == BT_SOCKET_CONNECTED)
+       {
+               if (result == BT_ERROR_NONE)
+               {
+                       g_bCallbackResult = true;
+                       g_nBluetoothSocketFd = connection->socket_fd;
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback (CONNECTED): socket_fd = %d", __LINE__, g_nBluetoothSocketFd);
+                       if (g_pMainLoop)
+                       {
+                               g_main_loop_quit(g_pMainLoop);
+                       }
+               }
+       }
+       else if (connection_state == BT_SOCKET_DISCONNECTED)
+       {
+               if (result == BT_ERROR_NONE)
+               {
+                       g_bCallbackResult = true;
+                       g_nBluetoothSocketFd = connection->socket_fd;
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Callback (DISCONNECTED): socket_fd = %d", __LINE__, g_nBluetoothSocketFd);
+                       if (g_pMainLoop)
+                       {
+                               g_main_loop_quit(g_pMainLoop);
+                       }
+               }
+       }
+}
+
+/**
+* @function            Bluetooth_bt_adapter_le_scan_start_stop_result_cb
+* @description         Callback Function
+* @parameter           int result,bt_adapter_le_device_scan_result_info_s *info, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_adapter_le_scan_start_stop_result_cb(int result,bt_adapter_le_device_scan_result_info_s *info, void *user_data)
+{
+       g_bCallbackResult = true;
+       FPRINTF("\\n[Line : %d][Bluetooth_ITC] Bluetooth_bt_adapter_le_scan_start_stop_result_cb  called successfully!", __LINE__);
+       return;
+}
+
+/**
+* @function            Bluetooth_bt_adapter_le_scan_result_cb
+* @description         Callback Function
+* @parameter           int result,bt_adapter_le_device_scan_result_info_s *info, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_adapter_le_scan_result_cb(int result,bt_adapter_le_device_scan_result_info_s *info, void *user_data)
+{
+       g_bCallbackResult = true;
+       bt_adapter_le_packet_type_e pkt_type = BT_ADAPTER_LE_PACKET_ADVERTISING;
+       char **uuids = NULL;
+       char *device_name = NULL;
+       int tx_power_level = 0;
+       bt_adapter_le_service_data_s *data_list = NULL;
+       int appearance = 0;
+       int manufacturer_id = 0;
+       char *manufacturer_data = NULL;
+       int manufacturer_data_len = 0;
+       int count = 0;
+
+       if (info == NULL)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] No discovery_info!", __LINE__);
+               return ;
+       }
+
+       FPRINTF("\\n%s Adv %d Scan resp %d RSSI %d Addr_type %d", info->remote_address,info->adv_data_len,info->scan_data_len, info->rssi, info->address_type);
+
+       if (info->adv_data_len > 31 || info->scan_data_len > 31)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] info->adv_data_len or info->scan_data_len exceed data length", __LINE__);
+               bt_adapter_le_stop_scan();
+               return;
+       }
+
+       int nRet = bt_adapter_le_get_scan_result_service_uuids(info, pkt_type, &uuids, &count);
+       if ( nRet == BT_ERROR_NONE || nRet == BT_ERROR_NO_DATA )
+       {
+               int i;
+               for (i = 0; i < count; i++)
+               {
+                       if (nRet==BT_ERROR_NO_DATA) {
+                               FPRINTF("No data");
+                       }
+                       else {
+                               FPRINTF("\\nUUID[%d] = %s", i + 1, uuids[i]);
+                       }
+
+                       if( nRet == BT_ERROR_NONE && uuids[i] != NULL){
+                               free(uuids[i]);
+                               uuids[i] = NULL;
+                       }
+               }
+               if(nRet == BT_ERROR_NONE && count > 0 && uuids != NULL){
+                       free(uuids);
+                       uuids = NULL;
+               }
+       } else {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_get_scan_result_service_uuids", BluetoothErrorInfo(nRet));
+               g_bCallbackResult = false;
+               return;
+       }
+
+       nRet = bt_adapter_le_get_scan_result_device_name(info, pkt_type, &device_name);
+       if ( nRet == BT_ERROR_NONE  || nRet == BT_ERROR_NO_DATA )
+       {
+               if (nRet==BT_ERROR_NO_DATA) {
+                       FPRINTF(" device_name No data");
+               }
+               else {
+                       FPRINTF("\\nDevice name = %s", device_name);
+               }
+
+               if ( device_name != NULL )
+               {
+                       free(device_name);
+               }
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_get_scan_result_device_name", BluetoothErrorInfo(nRet));
+               g_bCallbackResult = false;
+               return;
+       }
+
+       nRet = bt_adapter_le_get_scan_result_tx_power_level(info, pkt_type, &tx_power_level);
+       if ( nRet == BT_ERROR_NONE || nRet == BT_ERROR_NO_DATA )
+       {
+               if (nRet==BT_ERROR_NO_DATA) {
+                       FPRINTF("No data");
+               } else {
+                       FPRINTF("\\nTX Power level = %d", tx_power_level);
+               }
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_get_scan_result_tx_power_level", BluetoothErrorInfo(nRet));
+               g_bCallbackResult = false;
+               return;
+       }
+
+       nRet = bt_adapter_le_get_scan_result_service_solicitation_uuids(info, pkt_type, &uuids, &count);
+       if ( nRet == BT_ERROR_NONE || nRet == BT_ERROR_NO_DATA)
+       {
+               int i;
+               for (i = 0; i < count; i++) {
+                       if (nRet==BT_ERROR_NO_DATA) {
+                               FPRINTF("No data");
+                       } else {
+                               FPRINTF("\\nSolicitation UUID[%d] = %s", i + 1, uuids[i]);
+                       }
+                       if(nRet == BT_ERROR_NONE && uuids[i] != NULL){
+                               free(uuids[i]);
+                               uuids[i] = NULL;
+                       }
+               }
+               if(nRet == BT_ERROR_NONE && count > 0 && uuids != NULL){
+                       free(uuids);
+                       uuids = NULL;
+               }
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_get_scan_result_service_solicitation_uuids", BluetoothErrorInfo(nRet));
+               g_bCallbackResult = false;
+               return;
+       }
+
+       nRet = bt_adapter_le_get_scan_result_service_data_list(info, pkt_type, &data_list, &count);
+       if ( nRet == BT_ERROR_NONE || nRet == BT_ERROR_NO_DATA)
+       {
+               int i;
+               for (i = 0; i < count; i++)
+               {
+                       if (nRet==BT_ERROR_NO_DATA) {
+                               FPRINTF("No data");
+                       } else {
+                               FPRINTF("\\nService Data[%d] = [0x%2.2X%2.2X:0x%.2X...]", i + 1, data_list[i].service_uuid[0], data_list[i].service_uuid[1], data_list[i].service_data[0]);
+                       }
+               }
+               if(nRet == BT_ERROR_NONE && count > 0 && data_list != NULL){
+                       bt_adapter_le_free_service_data_list(data_list, count);
+               }
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_get_scan_result_service_data_list", BluetoothErrorInfo(nRet));
+               g_bCallbackResult = false;
+               return;
+       }
+
+       nRet = bt_adapter_le_get_scan_result_appearance(info, pkt_type, &appearance);
+       if ( nRet == BT_ERROR_NONE || nRet == BT_ERROR_NO_DATA)
+       {
+               if (nRet==BT_ERROR_NO_DATA) {
+                               FPRINTF(" appearance No data");
+               } else {
+                               FPRINTF("\\nAppearance = %d", appearance);
+               }
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_get_scan_result_appearance", BluetoothErrorInfo(nRet));
+               g_bCallbackResult = false;
+               return;
+       }
+
+       nRet = bt_adapter_le_get_scan_result_manufacturer_data(info, pkt_type, &manufacturer_id, &manufacturer_data, &manufacturer_data_len);
+       if ( nRet == BT_ERROR_NONE || nRet == BT_ERROR_NO_DATA)
+       {
+               if (nRet==BT_ERROR_NO_DATA) {
+                               FPRINTF(" manufacturer_data No data");
+               } else {
+                       FPRINTF("\\nManufacturer data[ID:%.4X, 0x%.2X%.2X...(len:%d)]", manufacturer_id, manufacturer_data[0], manufacturer_data[1], manufacturer_data_len);
+               }
+               if (nRet == BT_ERROR_NONE && manufacturer_data != NULL )
+               {
+                       free(manufacturer_data);
+               }
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_get_scan_result_manufacturer_data", BluetoothErrorInfo(nRet));
+               g_bCallbackResult = false;
+               return;
+       }
+       return;
+}
+
+/**
+* @function            Bluetooth_bt_adapter_le_advertising_state_changed_cb
+* @description         Callback Function
+* @parameter           int result, bt_advertiser_h advertiser, bt_adapter_le_advertising_state_e adv_state, void *user_data
+* @return                      NA
+*/
+static void Bluetooth_bt_adapter_le_advertising_state_changed_cb(int result,
+               bt_advertiser_h advertiser, bt_adapter_le_advertising_state_e adv_state, void *user_data)
+{
+       FPRINTF("Result : %d", result);
+       FPRINTF("Advertiser : %p", advertiser);
+       FPRINTF("Advertising %s [%d]", adv_state == BT_ADAPTER_LE_ADVERTISING_STARTED ?
+                               "started" : "stopped", adv_state);
+}
+
+/**
+* @function            ITs_bluetooth_startup
+* @description         Called before each test, Bluetooth is initialized.
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_bluetooth_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_FEATURE);
+
+       int nRet = bt_initialize();
+       if (false == g_bBluetoothIsSupported)
+       {
+               if (nRet != TIZEN_ERROR_NOT_SUPPORTED)
+               {
+                       g_bBluetoothMismatch = true;
+               }
+               else
+               {
+                       g_bBluetoothNotSupported = true;
+               }
+               return;
+       }
+
+       if(nRet != BT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Bluetooth initialization failed, error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               g_bBluetoothInit = false;
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Bluetooth initialized successfully", __LINE__);
+               g_bBluetoothInit = true;
+       }
+       return;
+}
+/**
+* @function            ITs_bluetooth_cleanup
+* @description         Called after each test, Bluetooth is deinitialized.
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_bluetooth_cleanup(void)
+{
+       int nRet = 0;
+
+       if (g_bBluetoothInit)
+       {
+               nRet = bt_deinitialize();
+               if(nRet != BT_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Bluetooth deinitialization failed, error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Bluetooth deinitialized successfully", __LINE__);
+               }
+       }
+
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+       sleep(SLEEP_TIME);
+       return;
+}
+
+/** @addtogroup itc-bluetooth-testcases
+*  @brief              Integration testcases for module bluetooth
+*  @ingroup    itc-bluetooth
+*  @{
+*/
+
+//& purpose: Set and Get the name of the local Bluetooth adapter.
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_set_get_name_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set and Get the name of the local Bluetooth adapter.
+* @scenario                            Register name change callback\n
+*                                              Set the name of the local Bluetooth adapter. \n
+*                                              Check callback\n
+*                                              Get the name of the local Bluetooth adapter. \n
+*                                              Unregister name change callback
+* @apicovered                  bt_adapter_set_name_changed_cb, bt_adapter_set_name, bt_adapter_get_name and bt_adapter_unset_name_changed_cb
+* @passcase                            When bt_adapter_set_name and bt_adapter_get_name is successful and both set and get values matches.
+* @failcase                            If targest APIs bt_adapter_set_name or bt_adapter_get_name fails or set and get values doesn't match.
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_set_get_name_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       char pszSetLocalName[ADAPTER_NAME_LENGTH] = {0};
+       char* pszGetLocalName = NULL;
+       char* pszTempGetLocalName = NULL;
+
+       g_pMainLoop = g_main_loop_new(NULL, false);
+
+       nRet = bt_adapter_get_name(&pszTempGetLocalName);
+       PRINT_ERROR("bt_adapter_get_name");
+
+       nRet = bt_adapter_set_name_changed_cb(Bluetooth_bt_adapter_name_changed_cb_p, NULL);
+       if (nRet != BT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_set_name_changed_cb failed. Error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               memset(g_pszLocalAdapterName, '\0', sizeof(g_pszLocalAdapterName));
+               g_bReturnValueState = false;
+               g_bCallbackResult = false;
+               sprintf(pszSetLocalName, "%s%d", ADAPTER_NAME, nLoopCount);
+               if (pszTempGetLocalName != NULL)
+               {
+                       if(strcmp(pszSetLocalName, pszTempGetLocalName)==0)
+                       {
+                               sprintf(pszSetLocalName, "%s%d%d", ADAPTER_NAME, nLoopCount, nLoopCount);
+                       }
+               }
+               strcpy(g_pszLocalAdapterName, pszSetLocalName);
+
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_set_name(pszSetLocalName);
+               BluetoothExecutionDelay(pszSetSpeedLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_set_name", nSetFailCount);
+               CHECK_CALLBACK_STATUS("bt_adapter_set_name", nSetFailCount);
+               if (g_bReturnValueState == false)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] After 'bt_adapter_set_name' api, Bluetooth_bt_adapter_name_changed_cb_p callback is failed. Callback returned invalid value on iteration = %d", __LINE__, nLoopCount);
+                       nSetFailCount++;
+               }
+
+               WAIT(SHORT_DELAY);
+
+               BluetoothGetTimeOfDay();
+               nRet =  bt_adapter_get_name(&pszGetLocalName);
+               BluetoothExecutionDelay(pszGetSpeedLog);
+               BluetoothGetMemStatus(pszSetGetMemLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_get_name", nGetFailCount);
+
+               if(strcmp(pszSetLocalName, pszGetLocalName) != 0 )
+               {
+                       nSetFailCount++;
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Set and Get values mismatch. Set value is: %s, Get value is: %s in iteration: %d", __LINE__, pszSetLocalName, pszGetLocalName, nLoopCount);
+                       free(pszGetLocalName);
+                       pszGetLocalName = NULL;
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Set Adapter name is: %s", __LINE__, pszSetLocalName);
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Get Adapter name is: %s", __LINE__, pszGetLocalName);
+                       memset(pszGetLocalName, '\0', strlen(pszGetLocalName)+1);
+               }
+       }
+
+       if (pszTempGetLocalName != NULL)
+       {
+               nRet = bt_adapter_set_name(pszTempGetLocalName);
+               if(nRet != BT_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_set_name failed after for loop, error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               }
+               free(pszTempGetLocalName);
+               pszTempGetLocalName = NULL;
+       }
+
+       nRet = bt_adapter_unset_name_changed_cb();
+       PRINT_ERROR("bt_adapter_unset_name_changed_cb");
+
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nGetFailCount, "bt_adapter_set_name", "bt_adapter_get_name", pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_set_name, pszSetSpeedLog);
+       PRINT_SPEED_LOG(bt_adapter_get_name, pszGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_set_get_name, pszSetGetMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog);
+       return 0;
+}
+
+//& purpose: Register and unregister a callback function to be invoked when the name of Bluetooth adapter changes.
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_set_unset_name_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Register and unregister callback function to be invoked when the name of Bluetooth adapter changes.
+* @scenario                            Register a callback function to be invoked when the name of Bluetooth adapter changes.\n
+*                                              Set Bluetooth adapter name\n
+*                                              Check, whether callback is invoked or not\n
+*                                              Unregister the callback\n
+*                                              Set Bluetooth adapter name.\n
+*                                              Check, whether callback is invoked or not
+* @apicovered                  bt_adapter_set_name_changed_cb, bt_adapter_set_name and bt_adapter_unset_name_changed_cb
+* @passcase                            When bt_adapter_set_name_changed_cb is successful and callback is invoked and\n
+*                                              When bt_adapter_unset_name_changed_cb is successful and callback is not invoked
+* @failcase                            If targest APIs bt_adapter_set_name_changed_cb fails or callback is not invoked or\n
+*                                              If bt_adapter_unset_name_changed_cb fails or callback is invoked
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_set_unset_name_changed_cb_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetErrorCount = 0;
+       int nUnsetErrorCount = 0;
+       char pszSetLocalName[ADAPTER_NAME_LENGTH] = {0};
+       char* pszTempGetLocalName = NULL;
+
+       g_pMainLoop = g_main_loop_new(NULL, false);
+
+       nRet = bt_adapter_get_name(&pszTempGetLocalName);
+       PRINT_ERROR("bt_adapter_get_name");
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =     calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog =                calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog =              calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               memset(g_pszLocalAdapterName, '\0', sizeof(g_pszLocalAdapterName));
+               g_bReturnValueState = false;
+               g_bCallbackResult = false;
+               sprintf(pszSetLocalName, "%s%d", ADAPTER_NAME, nLoopCount);
+               if (pszTempGetLocalName != NULL)
+               {
+                       if(strcmp(pszSetLocalName, pszTempGetLocalName)==0)
+                       {
+                               sprintf(pszSetLocalName, "%s%d%d", ADAPTER_NAME, nLoopCount, nLoopCount);
+                       }
+               }
+               strcpy(g_pszLocalAdapterName, pszSetLocalName);
+
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_set_name_changed_cb(Bluetooth_bt_adapter_name_changed_cb_p, NULL);
+               BluetoothExecutionDelay(pszSetSpeedLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_set_name_changed_cb", nSetErrorCount);
+
+               nRet = bt_adapter_set_name(pszSetLocalName);
+               PRINT_ERROR("bt_adapter_set_name");
+
+               CHECK_CALLBACK_STATUS("bt_adapter_set_name_changed_cb", nSetErrorCount);
+               if (g_bReturnValueState == false)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] After 'bt_adapter_set_name' api, Bluetooth_adapter_state_changed_cb_p callback is failed. Callback returned invalid value on iteration = %d", __LINE__, nLoopCount);
+                       nSetErrorCount++;
+               }
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_unset_name_changed_cb();
+               BluetoothExecutionDelay(pszUnsetSpeedLog);
+               BluetoothGetMemStatus(pszSetUnsetMemLog);
+               CHECK_ERROR_CONTINUE("bt_adapter_unset_name_changed_cb", nUnsetErrorCount);
+
+               g_bCallbackResult = false;
+
+               nRet = bt_adapter_set_name(pszSetLocalName);
+               PRINT_ERROR("bt_adapter_set_name");
+
+               CHECK_UNSET_CALLBACK_STATUS(LONG_DELAY, "bt_adapter_unset_name_changed_cb", nUnsetErrorCount);
+       }
+
+       if (pszTempGetLocalName != NULL)
+       {
+               nRet = bt_adapter_set_name(pszTempGetLocalName);
+               if(nRet != BT_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_set_name failed after for loop, error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               }
+               free(pszTempGetLocalName);
+               pszTempGetLocalName = NULL;
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nSetErrorCount, nUnsetErrorCount, "bt_adapter_set_name_changed_cb", "bt_adapter_unset_name_changed_cb", pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_set_name_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(bt_adapter_unset_name_changed_cb, pszUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_set_unset_name_changed_cb, pszSetUnsetMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: Gets the address of the local Bluetooth adapter
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_get_address_p
+* @type                                Positive
+* @description                 Gets the address of the local Bluetooth adapter
+* @scenario                            - Get the address of the local Bluetooth adapter
+* @apicovered                  bt_adapter_get_address
+* @passcase                            When bt_adapter_get_address is successfull.
+* @failcase                            If target API bt_adapter_get_address fail.
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_get_address_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszGetAddrMemLog   = NULL;
+       char *pszGetAddrSpeedLog = NULL;
+       int nGetAddrFailCount = 0;
+       char *pszLocalAddress = NULL;
+
+#if MEMORY_CHECK
+       pszGetAddrMemLog =              calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAddrSpeedLog =    calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_get_address(&pszLocalAddress);
+               BluetoothExecutionDelay(pszGetAddrSpeedLog);
+               BluetoothGetMemStatus(pszGetAddrMemLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_get_address", nGetAddrFailCount);
+
+               if (pszLocalAddress != NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Adapter address is: %s", __LINE__, pszLocalAddress);
+                       free(pszLocalAddress);
+                       pszLocalAddress = NULL;
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_get_address failed as adapter address is NULL on iteration %d, error returned = %s", __LINE__, nLoopCount, BluetoothErrorInfo(nRet));
+                       nGetAddrFailCount++;
+               }
+       }
+
+       VALIDATE_RESULT(nGetAddrFailCount, "bt_adapter_get_address", pszGetAddrMemLog, pszGetAddrSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_get_address, pszGetAddrSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_get_address, pszGetAddrMemLog);
+#endif
+       FREE_MEMORY(pszGetAddrMemLog, pszGetAddrSpeedLog);
+       return 0;
+}
+
+//& purpose: Gets the current state of the local Bluetooth adapter
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_get_state_p
+* @type                                Positive
+* @description                 Gets the current state of the local Bluetooth adapter. State may be either BT_ADAPTER_ENABLED or BT_ADAPTER_DISABLED.
+* @scenario                            - Gets the current state of the local Bluetooth adapter
+* @apicovered                  bt_adapter_get_state
+* @passcase                            When bt_adapter_get_state is successfull.
+* @failcase                            If target API bt_adapter_get_state fail.
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_get_state_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszGetStateMemLog   = NULL;
+       char *pszGetStateSpeedLog = NULL;
+       int nGetStateFailCount = 0;
+       bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+
+#if MEMORY_CHECK
+       pszGetStateMemLog =     calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetStateSpeedLog =   calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_get_state(&adapter_state);
+               BluetoothExecutionDelay(pszGetStateSpeedLog);
+               BluetoothGetMemStatus(pszGetStateMemLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_get_state", nGetStateFailCount);
+
+               if (adapter_state == BT_ADAPTER_ENABLED)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_get_state returned state as BT_ADAPTER_ENABLED in iteration %d", __LINE__, nLoopCount);
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_get_state returned state as BT_ADAPTER_DISABLED in iteration %d", __LINE__, nLoopCount);
+               }
+       }
+
+       VALIDATE_RESULT(nGetStateFailCount, "bt_adapter_get_state", pszGetStateMemLog, pszGetStateSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_get_state, pszGetStateSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_get_state, pszGetStateMemLog);
+#endif
+       FREE_MEMORY(pszGetStateMemLog, pszGetStateSpeedLog);
+       return 0;
+}
+
+//& purpose: Get the visibility mode of the local Bluetooth adapter
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_get_visibility_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Get the visibility mode of the local Bluetooth adapter.
+* @scenario                            Get the visibility mode of the local Bluetooth adapter
+* @apicovered                  bt_adapter_get_visibility
+* @passcase                            When bt_adapter_get_visibility is successful
+* @failcase                            If targest API bt_adapter_get_visibility fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_get_visibility_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszGetVisibilityMemLog   = NULL;
+       char *pszGetVisibilitySpeedLog = NULL;
+       int nGetVisibilityFailCount = 0;
+       int nGetDuration = 0;
+
+       bt_adapter_visibility_mode_e get_discoverable_mode;
+
+#if MEMORY_CHECK
+       pszGetVisibilityMemLog =  calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetVisibilitySpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_get_visibility(&get_discoverable_mode, &nGetDuration);
+               BluetoothExecutionDelay(pszGetVisibilitySpeedLog);
+               BluetoothGetMemStatus(pszGetVisibilityMemLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_get_visibility", nGetVisibilityFailCount);
+
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Discoverable Mode: %s in iteration %d", __LINE__, BluetoothGetEnumString(get_discoverable_mode), nLoopCount);
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Duration: %d in iteration %d", __LINE__, nGetDuration, nLoopCount);
+       }
+
+       VALIDATE_RESULT(nGetVisibilityFailCount, "bt_adapter_get_address", pszGetVisibilityMemLog, pszGetVisibilitySpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_get_visibility, pszGetVisibilitySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_get_visibility, pszGetVisibilityMemLog);
+#endif
+       FREE_MEMORY(pszGetVisibilityMemLog, pszGetVisibilitySpeedLog);
+       return 0;
+}
+
+//& purpose: Checks if the device discovery is in progress or not
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_is_discovering_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks if the device discovery is in progress or not.
+* @scenario                            Start device discovery\n
+*                                              Checks if the device discovery is in progress or not\n
+*                                              Stop device discovery
+* @apicovered                  bt_adapter_start_device_discovery, bt_adapter_is_discovering and bt_adapter_stop_device_discovery
+* @passcase                            When bt_adapter_is_discovering is successful.
+* @failcase                            If targest API bt_adapter_is_discovering fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_is_discovering_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszIsDiscoveringMemLog   = NULL;
+       char *pszIsDiscoveringSpeedLog = NULL;
+       int nIsDiscoveringFailCount = 0;
+       bool bIsDiscovering = false;
+
+#if MEMORY_CHECK
+       pszIsDiscoveringMemLog =        calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszIsDiscoveringSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               nRet = bt_adapter_start_device_discovery();
+               if(nRet != BT_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_start_device_discovery failed on iteration %d, error returned = %s", __LINE__, nLoopCount, BluetoothErrorInfo(nRet));
+                       nIsDiscoveringFailCount++;
+                       continue;
+               }
+
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_is_discovering(&bIsDiscovering);
+               BluetoothExecutionDelay(pszIsDiscoveringSpeedLog);
+               BluetoothGetMemStatus(pszIsDiscoveringMemLog);
+
+               if(nRet != BT_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_is_discovering failed on iteration %d, error returned = %s", __LINE__, nLoopCount, BluetoothErrorInfo(nRet));
+                       nIsDiscoveringFailCount++;
+                       nRet = bt_adapter_stop_device_discovery();
+                       PRINT_ERROR("bt_adapter_stop_device_discovery");
+                       continue;
+               }
+               else if (bIsDiscovering == false)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_is_discovering returned false on iteration %d", __LINE__, nLoopCount);
+                       nIsDiscoveringFailCount++;
+                       nRet = bt_adapter_stop_device_discovery();
+                       PRINT_ERROR("bt_adapter_stop_device_discovery");
+                       continue;
+               }
+               WAIT(SHORT_DELAY);
+
+               nRet = bt_adapter_stop_device_discovery();
+               PRINT_ERROR("bt_adapter_stop_device_discovery");
+               WAIT(SHORT_DELAY);
+       }
+
+       VALIDATE_RESULT(nIsDiscoveringFailCount, "bt_adapter_is_discovering", pszIsDiscoveringMemLog, pszIsDiscoveringSpeedLog);
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_is_discovering, pszIsDiscoveringSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_is_discovering, pszIsDiscoveringMemLog);
+#endif
+       FREE_MEMORY(pszIsDiscoveringMemLog, pszIsDiscoveringSpeedLog);
+       return 0;
+}
+
+//& purpose: Start and Stop the device discovery
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_start_stop_device_discovery_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Start and Stop the device discovery
+* @scenario                            Set callback\n
+*                                              Start device discovery\n
+*                                              Check callback\n
+*                                              Stop device discovery\n
+*                                              Check callback\n
+*                                              Unset callback
+* @apicovered                  bt_adapter_is_discovering, bt_adapter_set_device_discovery_state_changed_cb, bt_adapter_unset_device_discovery_state_changed_cb, bt_adapter_start_device_discovery and bt_adapter_stop_device_discovery
+* @passcase                            When bt_adapter_start_device_discovery and bt_adapter_stop_device_discovery is successful and callback is invoked for both APIs
+* @failcase                            If targest API bt_adapter_start_device_discovery or bt_adapter_stop_device_discovery fails or callback is not invoked for any API
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_start_stop_device_discovery_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszStartStopMemLog   = NULL;
+       char *pszStartSpeedLog = NULL;
+       char *pszStopSpeedLog = NULL;
+       int nStartFailCount = 0;
+       int nStopFailCount = 0;
+       bool bIsDiscovering = false;
+
+       g_pMainLoop = g_main_loop_new(NULL, false);
+
+       nRet = bt_adapter_is_discovering(&bIsDiscovering);
+       if (nRet != BT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_is_discovering failed. Error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               return 1;
+       }
+
+       if (bIsDiscovering == true)
+       {
+               nRet = bt_adapter_stop_device_discovery();
+               PRINT_ERROR("bt_adapter_stop_device_discovery");
+               WAIT(SHORT_DELAY);
+       }
+
+       nRet = bt_adapter_set_device_discovery_state_changed_cb(Bluetooth_adapter_device_discovery_state_changed_cb_p, NULL);
+       if (nRet != BT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_set_device_discovery_state_changed_cb failed. Error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszStartStopMemLog =    calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszStartSpeedLog =      calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszStopSpeedLog =               calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackResult = false;
+               g_bReturnValueState = false;
+
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_start_device_discovery();
+               BluetoothExecutionDelay(pszStartSpeedLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_start_device_discovery", nStartFailCount);
+               CHECK_CALLBACK_STATUS("bt_adapter_start_device_discovery", nStartFailCount);
+               if (g_bReturnValueState == false)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Bluetooth_adapter_device_discovery_state_changed_cb_p callback is failed. Callback returned invalid value on iteration = %d", __LINE__, nLoopCount);
+                       nStartFailCount++;
+               }
+
+               g_bCallbackResult = false;
+               g_bReturnValueState = false;
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_stop_device_discovery();
+               BluetoothExecutionDelay(pszStopSpeedLog);
+               BluetoothGetMemStatus(pszStartStopMemLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_stop_device_discovery", nStopFailCount);
+               CHECK_CALLBACK_STATUS("bt_adapter_stop_device_discovery", nStopFailCount);
+               if (g_bReturnValueState == false)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Bluetooth_adapter_device_discovery_state_changed_cb_p callback is failed. Callback returned invalid value on iteration = %d", __LINE__, nLoopCount);
+                       nStopFailCount++;
+               }
+       }
+
+       nRet = bt_adapter_unset_device_discovery_state_changed_cb();
+       PRINT_ERROR("bt_adapter_unset_device_discovery_state_changed_cb");
+
+       VALIDATE_RESULT_PAIRAPI(nStartFailCount, nStopFailCount, "bt_adapter_start_device_discovery", "bt_adapter_stop_device_discovery", pszStartStopMemLog, pszStartSpeedLog, pszStopSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_start_device_discovery, pszStartSpeedLog);
+       PRINT_SPEED_LOG(bt_adapter_stop_device_discovery, pszStopSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_start_stop_device_discovery, pszStartStopMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszStartStopMemLog, pszStartSpeedLog, pszStopSpeedLog);
+       return 0;
+}
+
+//& purpose: Initialize and Deinitialize the Bluetooth API
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_bt_initialize_deinitialize_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Initialize and Deinitialize the Bluetooth API
+* @scenario                            Initialize bluetooth API\n
+*                                              Deinitialize bluetooth API
+* @apicovered                  bt_initialize and bt_deinitialize
+* @passcase                            When bt_initialize and bt_deinitialize is successful
+* @failcase                            If targest API bt_initialize or bt_deinitialize fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_bluetooth_bt_initialize_deinitialize_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszInitDeinitMemLog   = NULL;
+       char *pszInitSpeedLog = NULL;
+       char *pszDeinitSpeedLog = NULL;
+       int nInitFailCount = 0;
+       int nDeinitFailCount = 0;
+
+       nRet = bt_deinitialize();
+       PRINT_ERROR("bt_deinitialize");
+
+#if MEMORY_CHECK
+       pszInitDeinitMemLog =   calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInitSpeedLog =               calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszDeinitSpeedLog =     calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WAIT(SHORT_DELAY);
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_initialize();
+               BluetoothExecutionDelay(pszInitSpeedLog);
+
+               CHECK_ERROR_CONTINUE("bt_initialize", nInitFailCount);
+               WAIT(SHORT_DELAY);
+               BluetoothGetTimeOfDay();
+               nRet = bt_deinitialize();
+               BluetoothExecutionDelay(pszDeinitSpeedLog);
+               BluetoothGetMemStatus(pszInitDeinitMemLog);
+
+               CHECK_ERROR("bt_deinitialize", nDeinitFailCount);
+       }
+
+       nRet = bt_initialize();
+       PRINT_ERROR("bt_initialize");
+
+       VALIDATE_RESULT_PAIRAPI(nInitFailCount, nDeinitFailCount, "bt_initialize", "bt_deinitialize", pszInitDeinitMemLog, pszInitSpeedLog, pszDeinitSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_initialize, pszInitSpeedLog);
+       PRINT_SPEED_LOG(bt_deinitialize, pszDeinitSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_initialize_deinitialize, pszInitDeinitMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszInitDeinitMemLog, pszInitSpeedLog, pszDeinitSpeedLog);
+       return 0;
+}
+//& purpose: Registers and Deregister callback functions for bluetooth adapter state changes
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_set_unset_state_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers callback functions for bluetooth adapter state changes and unregister the callback
+* @scenario                            Register callback\n
+*                                              Unregister callback
+* @apicovered                  bt_adapter_set_state_changed_cb and bt_adapter_unset_state_changed_cb
+* @passcase                            When bt_adapter_set_state_changed_cb and bt_adapter_unset_state_changed_cb is successful
+* @failcase                            If targest API bt_adapter_set_state_changed_cb or bt_adapter_unset_state_changed_cb fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_set_unset_state_changed_cb_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =     calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog =                calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog =              calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_set_state_changed_cb(Bluetooth_adapter_state_changed_cb_p, NULL);
+               BluetoothExecutionDelay(pszSetSpeedLog);
+               CHECK_ERROR_CONTINUE("bt_adapter_set_state_changed_cb", nSetFailCount);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_unset_state_changed_cb();
+               BluetoothExecutionDelay(pszUnsetSpeedLog);
+               BluetoothGetMemStatus(pszSetUnsetMemLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_unset_state_changed_cb", nUnsetFailCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nUnsetFailCount, "bt_adapter_set_state_changed_cb", "bt_adapter_unset_state_changed_cb", pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_set_state_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(bt_adapter_unset_state_changed_cb, pszUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_set_unset_state_changed_cb, pszSetUnsetMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when the visibility mode changes and Unregister callback.
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_mode_changed_cb_p
+* @type                                Positive
+* @description                 Registers a callback function to be invoked when the visibility mode of bluetooth adapter changes and Unregister callback
+* @scenario                            - Register callback
+*                                              - Unregister callback
+* @apicovered                  bt_adapter_set_visibility_mode_changed_cb and bt_adapter_unset_visibility_mode_changed_cb
+* @passcase                            When bt_adapter_set_visibility_mode_changed_cb and bt_adapter_unset_visibility_mode_changed_cb is successful
+* @failcase                            If target apis bt_adapter_set_visibility_mode_changed_cb or bt_adapter_unset_visibility_mode_changed_cb fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_mode_changed_cb_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetVisibilityMemLog   = NULL;
+       char *pszSetVisibilityLog = NULL;
+       char *pszUnsetVisibilityLog = NULL;
+       int nSetVisibilityFailCount = 0;
+       int nUnsetVisibilityFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetVisibilityMemLog =  calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetVisibilityLog =   calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetVisibilityLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_set_visibility_mode_changed_cb(Bluetooth_adapter_visibility_mode_changed_cb_p, NULL);
+               BluetoothExecutionDelay(pszSetVisibilityLog);
+               CHECK_ERROR_CONTINUE("bt_adapter_set_visibility_mode_changed_cb", nSetVisibilityFailCount);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_unset_visibility_mode_changed_cb();
+               BluetoothExecutionDelay(pszUnsetVisibilityLog);
+               BluetoothGetMemStatus(pszSetUnsetVisibilityMemLog);
+
+               CHECK_ERROR("bt_adapter_unset_visibility_mode_changed_cb", nUnsetVisibilityFailCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nSetVisibilityFailCount, nUnsetVisibilityFailCount, "bt_adapter_set_visibility_mode_changed_cb", "bt_adapter_unset_visibility_mode_changed_cb", pszSetUnsetVisibilityMemLog, pszSetVisibilityLog, pszUnsetVisibilityLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_set_visibility_mode_changed_cb, pszSetVisibilityLog);
+       PRINT_SPEED_LOG(bt_adapter_unset_visibility_mode_changed_cb, pszUnsetVisibilityLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_set_unset_visibility_mode_changed_cb, pszSetUnsetVisibilityMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszSetUnsetVisibilityMemLog, pszSetVisibilityLog, pszUnsetVisibilityLog);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when visibility duration is change and Unregister callback.
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_duration_changed_cb_p
+* @type                                Positive
+* @description                 Registers a callback function to be invoked every second until the when visibility mode is changed and Unregister the callback
+* @scenario                            - Register callback
+*                                              - Unregister callback
+* @apicovered                  bt_adapter_set_visibility_duration_changed_cb and bt_adapter_unset_visibility_duration_changed_cb
+* @passcase                            When bt_adapter_set_visibility_duration_changed_cb and bt_adapter_unset_visibility_duration_changed_cb is successful
+* @failcase                            If target apis bt_adapter_set_visibility_duration_changed_cb or bt_adapter_unset_visibility_duration_changed_cb fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_duration_changed_cb_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetVisibilityMemLog   = NULL;
+       char *pszSetVisibilityLog = NULL;
+       char *pszUnsetVisibilityLog = NULL;
+       int nSetVisibilityFailCount = 0;
+       int nUnsetVisibilityFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetVisibilityMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetVisibilityLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetVisibilityLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_set_visibility_duration_changed_cb(Bluetooth_bt_adapter_visibility_duration_changed_cb_p, NULL);
+               BluetoothExecutionDelay(pszSetVisibilityLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_set_visibility_duration_changed_cb", nSetVisibilityFailCount);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_unset_visibility_duration_changed_cb();
+               BluetoothExecutionDelay(pszUnsetVisibilityLog);
+               BluetoothGetMemStatus(pszSetUnsetVisibilityMemLog);
+
+               CHECK_ERROR("bt_adapter_unset_visibility_duration_changed_cb", nUnsetVisibilityFailCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nSetVisibilityFailCount, nUnsetVisibilityFailCount, "bt_adapter_set_visibility_duration_changed_cb", "bt_adapter_unset_visibility_duration_changed_cb", pszSetUnsetVisibilityMemLog, pszSetVisibilityLog, pszUnsetVisibilityLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_set_visibility_duration_changed_cb, pszSetVisibilityLog);
+       PRINT_SPEED_LOG(bt_adapter_unset_visibility_duration_changed_cb, pszUnsetVisibilityLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_set_unset_visibility_duration_changed_cb, pszSetUnsetVisibilityMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszSetUnsetVisibilityMemLog, pszSetVisibilityLog, pszUnsetVisibilityLog);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when the device discovery state changes and unregister the callback
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_set_unset_device_discovery_state_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function to be invoked when the device discovery state changes and unregister the callback
+* @scenario                            Register callback\n
+*                                              Start device discovery\n
+*                                              Check callback\n
+*                                              Unregister callback\n
+*                                              Stop device discovery\n
+*                                              Check callback
+* @apicovered                  bt_adapter_is_discovering, bt_adapter_set_device_discovery_state_changed_cb, bt_adapter_unset_device_discovery_state_changed_cb, bt_adapter_start_device_discovery and bt_adapter_stop_device_discovery
+* @passcase                            When bt_adapter_set_device_discovery_state_changed_cb is successful and callback is invoked and\n
+*                                              When bt_adapter_unset_device_discovery_state_changed_cb is successful and callback is not invoked
+* @failcase                            If targest API bt_adapter_set_device_discovery_state_changed_cb fails or callback is not invoked or\n
+*                                              If targest API bt_adapter_unset_device_discovery_state_changed_cb fails or callback is invoked
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_set_unset_device_discovery_state_changed_cb_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       bool bIsDiscovering = false;
+
+       g_pMainLoop = g_main_loop_new(NULL, false);
+
+       nRet = bt_adapter_is_discovering(&bIsDiscovering);
+       if (nRet != BT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_is_discovering failed. Error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               return 1;
+       }
+
+       if (bIsDiscovering == true)
+       {
+               nRet = bt_adapter_stop_device_discovery();
+               PRINT_ERROR("bt_adapter_stop_device_discovery");
+               WAIT(SHORT_DELAY);;
+       }
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog =        calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog =      calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackResult = false;
+               g_bReturnValueState = false;
+
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_set_device_discovery_state_changed_cb(Bluetooth_adapter_device_discovery_state_changed_cb_p, NULL);
+               BluetoothExecutionDelay(pszSetSpeedLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_set_device_discovery_state_changed_cb", nSetFailCount);
+
+               nRet = bt_adapter_start_device_discovery();
+               PRINT_ERROR("bt_adapter_start_device_discovery");
+
+               CHECK_CALLBACK_STATUS("bt_adapter_set_device_discovery_state_changed_cb", nSetFailCount);
+               if (g_bReturnValueState == false)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] After 'bt_adapter_start_device_discovery' api, Bluetooth_adapter_device_discovery_state_changed_cb_p callback is failed. Callback returned invalid value on iteration = %d", __LINE__, nLoopCount);
+                       nSetFailCount++;
+               }
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_unset_device_discovery_state_changed_cb();
+               BluetoothExecutionDelay(pszUnsetSpeedLog);
+               BluetoothGetMemStatus(pszSetUnsetMemLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_unset_device_discovery_state_changed_cb", nUnsetFailCount);
+
+               nRet = bt_adapter_stop_device_discovery();
+               PRINT_ERROR("bt_adapter_stop_device_discovery");
+               CHECK_UNSET_CALLBACK_STATUS(LONG_DELAY, "bt_adapter_unset_device_discovery_state_changed_cb", nUnsetFailCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nUnsetFailCount, "bt_adapter_set_device_discovery_state_changed_cb", "bt_adapter_Unset_device_discovery_state_changed_cb", pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_set_device_discovery_state_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(bt_adapter_Unset_device_discovery_state_changed_cb, pszUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_set_unset_device_discovery_state_changed_cb, pszSetUnsetMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: Checks whether the UUID of a service is used or not
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_is_service_used_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks whether the UUID of a service is used or not
+* @scenario                            Checks whether the UUID (OPP service) of a service is used or not
+* @apicovered                  bt_adapter_is_service_used
+* @passcase                            When bt_adapter_is_service_used is successful.
+* @failcase                            If targest API bt_adapter_is_service_used fail.
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_is_service_used_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszServiceUsedMemLog   = NULL;
+       char *pszServiceUsedSpeedLog = NULL;
+       int nServiceUsedFailCount = 0;
+       bool bUsedStatus = false;
+
+#if MEMORY_CHECK
+       pszServiceUsedMemLog =  calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszServiceUsedSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               bUsedStatus = false;
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_is_service_used(BLUETOOTH_SERVICE_UUID, &bUsedStatus);
+               BluetoothExecutionDelay(pszServiceUsedSpeedLog);
+               BluetoothGetMemStatus(pszServiceUsedMemLog);
+
+               CHECK_ERROR_CONTINUE("bt_adapter_is_service_used", nServiceUsedFailCount);
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Service used status: %d", __LINE__, bUsedStatus);
+       }
+
+       VALIDATE_RESULT(nServiceUsedFailCount, "bt_adapter_is_service_used", pszServiceUsedMemLog, pszServiceUsedSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_is_service_used, pszServiceUsedSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_is_service_used, pszServiceUsedMemLog);
+#endif
+       FREE_MEMORY(pszServiceUsedMemLog, pszServiceUsedSpeedLog);
+       return 0;
+}
+
+//Bluetooth Socket ITc
+
+//& purpose: Registers a RFCOMM socket with a specific UUID
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_socket_bt_socket_create_destroy_rfcomm_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a RFCOMM socket with a specific UUID
+* @scenario                            Create a RFCOMM socket\n
+*                                              Destroy RFCOMM socket
+* @apicovered                  bt_socket_create_rfcomm and bt_socket_destroy_rfcomm
+* @passcase                            When bt_socket_create_rfcomm and bt_socket_destroy_rfcomm are successful.
+* @failcase                            If targest APIs bt_socket_create_rfcomm or bt_socket_destroy_rfcomm fails.
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_socket_bt_socket_create_destroy_rfcomm_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszCreateDestroyMemLog   = NULL;
+       char *pszCreateSpeedLog = NULL;
+       char *pszDestroySpeedLog = NULL;
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+       int nSocketFd = -1;
+
+#if MEMORY_CHECK
+       pszCreateDestroyMemLog =        calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCreateSpeedLog =             calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszDestroySpeedLog =            calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_socket_create_rfcomm(BLUETOOTH_SERVICE_UUID, &nSocketFd);
+               BluetoothExecutionDelay(pszCreateSpeedLog);
+
+               CHECK_ERROR_CONTINUE("bt_socket_create_rfcomm", nCreateFailCount);
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] Socketfd is: %d", __LINE__, nSocketFd);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_socket_destroy_rfcomm(nSocketFd);
+               BluetoothExecutionDelay(pszDestroySpeedLog);
+               BluetoothGetMemStatus(pszCreateDestroyMemLog);
+
+               CHECK_ERROR("bt_socket_destroy_rfcomm", nDestroyFailCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nCreateFailCount, nDestroyFailCount, "bt_socket_create_rfcomm", "bt_socket_destroy_rfcomm", pszCreateDestroyMemLog, pszCreateSpeedLog, pszDestroySpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_socket_create_rfcomm, pszCreateSpeedLog);
+       PRINT_SPEED_LOG(bt_socket_destroy_rfcomm, pszDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_socket_create_destroy_rfcomm, pszCreateDestroyMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszCreateDestroyMemLog, pszCreateSpeedLog, pszDestroySpeedLog);
+       return 0;
+}
+
+//& purpose: Starts listening on passed RFCOMM socket and accepts connection requests.
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_socket_bt_socket_listen_and_accept_rfcomm_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Starts listening on passed RFCOMM socket and accepts connection requests.
+* @scenario                            Create a RFCOMM socket
+*                                              Starts listening on passed RFCOMM socket and accepts connection requests
+*                                              Destroy RFCOMM socket
+* @apicovered                  bt_socket_create_rfcomm, bt_socket_destroy_rfcomm and bt_socket_listen_and_accept_rfcomm
+* @passcase                            When bt_socket_listen_and_accept_rfcomm is successful.
+* @failcase                            If targest API bt_socket_listen_and_accept_rfcomm fails.
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_socket_bt_socket_listen_and_accept_rfcomm_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszListenAcceptMemLog   = NULL;
+       char *pszListenAcceptSpeedLog = NULL;
+       int nListenAcceptFailCount = 0;
+       int nSocketFd = -1;
+       int nMaxConnections = 2;
+
+       nRet = bt_socket_create_rfcomm(BLUETOOTH_SERVICE_UUID, &nSocketFd);
+       if (nRet != BT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_socket_create_rfcomm failed, error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       WAIT(SHORT_DELAY);
+
+#if MEMORY_CHECK
+       pszListenAcceptMemLog =  calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszListenAcceptSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_socket_listen_and_accept_rfcomm(nSocketFd, nMaxConnections);
+               BluetoothExecutionDelay(pszListenAcceptSpeedLog);
+               BluetoothGetMemStatus(pszListenAcceptMemLog);
+
+               CHECK_ERROR("bt_socket_listen_and_accept_rfcomm", nListenAcceptFailCount);
+       }
+
+       nRet = bt_socket_destroy_rfcomm(nSocketFd);
+       PRINT_ERROR("bt_socket_destroy_rfcomm");
+
+       VALIDATE_RESULT(nListenAcceptFailCount, "bt_socket_listen_and_accept_rfcomm", pszListenAcceptMemLog, pszListenAcceptSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_socket_listen_and_accept_rfcomm, pszListenAcceptSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_socket_listen_and_accept_rfcomm, pszListenAcceptMemLog);
+#endif
+       FREE_MEMORY(pszListenAcceptMemLog, pszListenAcceptSpeedLog);
+       return 0;
+}
+
+//& purpose: Registers a callback function that will be invoked when a RFCOMM connection is requested and unregister callback
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_socket_bt_socket_set_unset_connection_requested_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function that will be invoked when a RFCOMM connection is requested and unregister callback
+* @scenario                            Set callback\n
+*                                              Unset callback
+* @apicovered                  bt_socket_set_connection_requested_cb and bt_socket_unset_connection_requested_cb
+* @passcase                            When bt_socket_set_connection_requested_cb and bt_socket_unset_connection_requested_cb is successful
+* @failcase                            If targest API bt_socket_set_connection_requested_cb or bt_socket_unset_connection_requested_cb fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_socket_bt_socket_set_unset_connection_requested_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog =        calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_socket_set_connection_requested_cb(Bluetooth_bt_socket_connection_requested_cb_p, NULL);
+               BluetoothExecutionDelay(pszSetSpeedLog);
+               CHECK_ERROR_CONTINUE("bt_socket_set_connection_requested_cb", nSetFailCount);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_socket_unset_connection_requested_cb();
+               BluetoothExecutionDelay(pszUnsetSpeedLog);
+               BluetoothGetMemStatus(pszSetUnsetMemLog);
+               CHECK_ERROR("bt_socket_unset_connection_requested_cb", nUnsetFailCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nUnsetFailCount, "bt_socket_set_connection_requested_cb", "bt_socket_unset_connection_requested_cb", pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_socket_set_connection_requested_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(bt_socket_unset_connection_requested_cb, pszUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_socket_set_unset_connection_requested_cb, pszSetUnsetMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: Registers a callback function that will be invoked when data is received and unregister the callback
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_socket_bt_socket_set_unset_data_received_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function that will be invoked when data is received and unregister the callback
+* @scenario                            Set callback\n
+*                                              Unset callback
+* @apicovered                  bt_socket_set_data_received_cb and bt_socket_unset_data_received_cb
+* @passcase                            When bt_socket_set_data_received_cb and bt_socket_unset_data_received_cb is successful
+* @failcase                            If targest API bt_socket_set_data_received_cb or bt_socket_unset_data_received_cb fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_socket_bt_socket_set_unset_data_received_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog =        calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_socket_set_data_received_cb(Bluetooth_bt_socket_data_received_cb_p, NULL);
+               BluetoothExecutionDelay(pszSetSpeedLog);
+               CHECK_ERROR_CONTINUE("bt_socket_set_data_received_cb", nSetFailCount);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_socket_unset_data_received_cb();
+               BluetoothExecutionDelay(pszUnsetSpeedLog);
+               BluetoothGetMemStatus(pszSetUnsetMemLog);
+               CHECK_ERROR("bt_socket_unset_data_received_cb", nUnsetFailCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nUnsetFailCount, "bt_socket_set_data_received_cb", "bt_socket_unset_data_received_cb", pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_socket_set_data_received_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(bt_socket_unset_data_received_cb, pszUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_socket_set_unset_data_received_cb, pszSetUnsetMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+//Bluetooth OPP Client
+
+//& purpose: Initialize and Deinitialize the Bluetooth OPP Client
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_client_OPP_bt_opp_client_initialize_deinitialize_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Initialize and Deinitialize the Bluetooth API
+* @scenario                            Initialize bluetooth OPP Client\n
+*                                              Deinitialize bluetooth OPP Client
+* @apicovered                  bt_opp_client_initialize and bt_opp_client_deinitialize
+* @passcase                            When bt_opp_client_initialize and bt_opp_client_deinitialize is successful
+* @failcase                            If targest APIs bt_opp_client_initialize or bt_opp_client_deinitialize fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_client_OPP_bt_opp_client_initialize_deinitialize_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszInitDeinitMemLog   = NULL;
+       char *pszInitSpeedLog = NULL;
+       char *pszDeinitSpeedLog = NULL;
+       int nInitFailCount = 0;
+       int nDeinitFailCount = 0;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_OPP_FEATURE);
+
+#if MEMORY_CHECK
+       pszInitDeinitMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInitSpeedLog =       calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszDeinitSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_opp_client_initialize();
+               BluetoothExecutionDelay(pszInitSpeedLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_opp_client_initialize", nInitFailCount);
+
+               CHECK_ERROR_CONTINUE("bt_opp_client_initialize", nInitFailCount);
+               WAIT(SHORT_DELAY);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_opp_client_deinitialize();
+               BluetoothExecutionDelay(pszDeinitSpeedLog);
+               BluetoothGetMemStatus(pszInitDeinitMemLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_opp_client_deinitialize", nDeinitFailCount);
+
+               CHECK_ERROR("bt_opp_client_deinitialize", nDeinitFailCount);
+               WAIT(SHORT_DELAY);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nInitFailCount, nDeinitFailCount, "bt_opp_client_initialize", "bt_opp_client_deinitialize", pszInitDeinitMemLog, pszInitSpeedLog, pszDeinitSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_opp_client_initialize, pszInitSpeedLog);
+       PRINT_SPEED_LOG(bt_opp_client_deinitialize, pszDeinitSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_opp_client_initialize_deinitialize, pszInitDeinitMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszInitDeinitMemLog, pszInitSpeedLog, pszDeinitSpeedLog);
+       return 0;
+}
+
+//& purpose: Adds a file to be pushed and clear the file
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_client_OPP_bt_opp_client_add_file_clear_files_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Adds a file to be pushed and clear the file
+* @scenario                            Initialize bluetooth OPP Client\n
+*                                              Add file\n
+*                                              Clear file\n
+*                                              Deinitialize bluetooth OPP Client
+* @apicovered                  bt_opp_client_initialize, bt_opp_client_add_file, bt_opp_client_clear_files and bt_opp_client_deinitialize
+* @passcase                            When bt_opp_client_add_file and bt_opp_client_clear_files are successful
+* @failcase                            If targest APIs bt_opp_client_add_file or bt_opp_client_clear_files fails
+* @precondition                        Bluetooth must be initialized
+*                                              File (to be added) must be present at application data path
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_client_OPP_bt_opp_client_add_file_clear_files_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszAddClearMemLog   = NULL;
+       char *pszAddSpeedLog = NULL;
+       char *pszClearSpeedLog = NULL;
+       int nAddFailCount = 0;
+       int nClearFailCount = 0;
+       char pPath[PATH_LEN] = {0,};
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_OPP_FEATURE);
+
+       if(false == BluetoothGetDataPath(pPath))
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] unable to get the app data path", __LINE__);
+               return 1;
+       }
+
+       strcat(pPath, OPP_FILE_NAME);
+       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Complete file path is: %s", __LINE__, pPath);
+
+       nRet = bt_opp_client_initialize();
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_opp_client_initialize");
+
+       if (nRet != BT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_opp_client_initialize failed. Error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       WAIT(SHORT_DELAY);
+
+#if MEMORY_CHECK
+       pszAddClearMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAddSpeedLog =        calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszClearSpeedLog =      calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_opp_client_add_file(pPath);
+               BluetoothExecutionDelay(pszAddSpeedLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_opp_client_add_file", nAddFailCount);
+
+               CHECK_ERROR_CONTINUE("bt_opp_client_add_file", nAddFailCount);
+               WAIT(SHORT_DELAY);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_opp_client_clear_files();
+               BluetoothExecutionDelay(pszClearSpeedLog);
+               BluetoothGetMemStatus(pszAddClearMemLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_opp_client_clear_files", nClearFailCount);
+
+               CHECK_ERROR("bt_opp_client_clear_files", nClearFailCount);
+               WAIT(SHORT_DELAY);
+       }
+
+       nRet = bt_opp_client_deinitialize();
+       PRINT_ERROR("bt_opp_client_deinitialize");
+       WAIT(SHORT_DELAY);
+
+       VALIDATE_RESULT_PAIRAPI(nAddFailCount, nClearFailCount, "bt_opp_client_add_file", "bt_opp_client_clear_files", pszAddClearMemLog, pszAddSpeedLog, pszClearSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_opp_client_add_file, pszAddSpeedLog);
+       PRINT_SPEED_LOG(bt_opp_client_clear_files, pszClearSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_opp_client_add_file_clear, pszAddClearMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszAddClearMemLog, pszAddSpeedLog, pszClearSpeedLog);
+       return 0;
+}
+
+//Bluetooth OPP Server
+
+//& purpose: Initialize and Deinitialize the Bluetooth OPP Server
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_server_OPP_bt_opp_server_initialize_deinitialize_connection_request_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Initializes the Bluetooth OPP server requested by bt_opp_server_connection_requested_cb(). Deinitialize the Bluetooth OPP Server
+* @scenario                            Initialize bluetooth OPP Server requested by bt_opp_server_connection_requested_cb()\n
+*                                              Deinitialize bluetooth OPP Server
+* @apicovered                  bt_opp_server_initialize_by_connection_request and bt_opp_server_deinitialize
+* @passcase                            When bt_opp_server_initialize_by_connection_request and bt_opp_server_deinitialize is successful
+* @failcase                            If targest APIs bt_opp_server_initialize_by_connection_request or bt_opp_server_deinitialize failso
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_server_OPP_bt_opp_server_initialize_deinitialize_connection_request_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszInitDeinitMemLog   = NULL;
+       char *pszInitSpeedLog = NULL;
+       char *pszDeinitSpeedLog = NULL;
+       int nInitFailCount = 0;
+       int nDeinitFailCount = 0;
+       char szFilePath[PATH_LEN] = {0,};
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_OPP_FEATURE);
+
+       if ( false == BluetoothGetStorageDownloadsPath(szFilePath))
+       {
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszInitDeinitMemLog =   calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInitSpeedLog =               calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszDeinitSpeedLog =     calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_opp_server_initialize_by_connection_request(szFilePath, Bluetooth_bt_opp_server_connection_requested_cb_p, NULL);
+               BluetoothExecutionDelay(pszInitSpeedLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_opp_server_initialize_by_connection_request", nInitFailCount);
+
+               CHECK_ERROR_CONTINUE("bt_opp_server_initialize_by_connection_request", nInitFailCount);
+               WAIT(SHORT_DELAY);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_opp_server_deinitialize();
+               BluetoothExecutionDelay(pszDeinitSpeedLog);
+               BluetoothGetMemStatus(pszInitDeinitMemLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_opp_server_deinitialize", nDeinitFailCount);
+
+               CHECK_ERROR("bt_opp_server_deinitialize", nDeinitFailCount);
+               WAIT(SHORT_DELAY);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nInitFailCount, nDeinitFailCount, "bt_opp_server_initialize_by_connection_request", "bt_opp_server_deinitialize", pszInitDeinitMemLog, pszInitSpeedLog, pszDeinitSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_opp_server_initialize_by_connection_request, pszInitSpeedLog);
+       PRINT_SPEED_LOG(bt_opp_server_deinitialize, pszDeinitSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_opp_server_initialize_deinitialize_connection_request, pszInitDeinitMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszInitDeinitMemLog, pszInitSpeedLog, pszDeinitSpeedLog);
+       return 0;
+}
+
+//& purpose: Sets the destination path of the file to be pushed.
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_server_OPP_bt_opp_server_set_destination_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets the destination path of the file to be pushed.
+* @scenario                            Initialize bluetooth OPP Server\n
+*                                              Set destination path\n
+*                                              Deinitialize bluetooth OPP Server
+* @apicovered                  bt_opp_server_initialize, bt_opp_server_set_destination and bt_opp_server_deinitialize
+* @passcase                            When bt_opp_server_set_destination is successful
+* @failcase                            If targest API bt_opp_server_set_destination fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_server_OPP_bt_opp_server_set_destination_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetDestMemLog   = NULL;
+       char *pszSetDestSpeedLog = NULL;
+       int nSetDestFailCount = 0;
+       char szFilePath[PATH_LEN] = {0,};
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_OPP_FEATURE);
+
+       if ( false == BluetoothGetStorageDownloadsPath(szFilePath))
+       {
+               return 1;
+       }
+
+       nRet = bt_opp_server_initialize_by_connection_request(szFilePath, Bluetooth_bt_opp_server_connection_requested_cb_p, NULL);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_opp_server_initialize_by_connection_request");
+
+       if (nRet != BT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_opp_server_initialize_by_connection_request failed. Error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       WAIT(SHORT_DELAY);
+
+#if MEMORY_CHECK
+       pszSetDestMemLog =  calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetDestSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_opp_server_set_destination(szFilePath);
+               BluetoothExecutionDelay(pszSetDestSpeedLog);
+               BluetoothGetMemStatus(pszSetDestMemLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_opp_server_set_destination", nSetDestFailCount);
+
+               CHECK_ERROR("bt_opp_server_set_destination", nSetDestFailCount);
+       }
+
+       nRet = bt_opp_server_deinitialize();
+       PRINT_ERROR("bt_opp_server_deinitialize");
+       WAIT(SHORT_DELAY);
+
+       VALIDATE_RESULT(nSetDestFailCount, "bt_opp_server_set_destination", pszSetDestMemLog, pszSetDestSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_opp_server_set_destination, pszSetDestSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_opp_server_set_destination, pszSetDestMemLog);
+#endif
+       FREE_MEMORY(pszSetDestMemLog, pszSetDestSpeedLog);
+       return 0;
+}
+
+// Bluetooth Audio
+
+//& purpose: Initialize and Deinitialize the Bluetooth profile which is related with audio
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Initialize and Deinitialize the Bluetooth profile which is related with audio
+* @scenario                            Initialize bluetooth audio profile
+*                                              Deinitialize bluetooth audio profile
+* @apicovered                  bt_audio_initialize and bt_audio_deinitialize
+* @passcase                            When bt_audio_initialize and bt_audio_deinitialize is successful
+* @failcase                            If targest API bt_audio_initialize or bt_audio_deinitialize fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszInitDeinitMemLog   = NULL;
+       char *pszInitSpeedLog = NULL;
+       char *pszDeinitSpeedLog = NULL;
+       int nInitFailCount = 0;
+       int nDeinitFailCount = 0;
+
+       if( (false == BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_AUDIOMEDIA_FEATURE)) && (false == BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_AUDIOCALL_FEATURE)))
+       {
+               g_bBluetoothIsSupported = false;
+       }
+       else
+       {
+               g_bBluetoothIsSupported = true;
+       }
+
+#if MEMORY_CHECK
+       pszInitDeinitMemLog =   calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInitSpeedLog =               calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszDeinitSpeedLog =     calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WAIT(SHORT_DELAY);
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_audio_initialize();
+               BluetoothExecutionDelay(pszInitSpeedLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_audio_initialize", nInitFailCount);
+               CHECK_ERROR_CONTINUE("bt_audio_initialize", nInitFailCount);
+               WAIT(SHORT_DELAY);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_audio_deinitialize();
+               BluetoothExecutionDelay(pszDeinitSpeedLog);
+               BluetoothGetMemStatus(pszInitDeinitMemLog);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_audio_deinitialize", nDeinitFailCount);
+               CHECK_ERROR("bt_audio_deinitialize", nDeinitFailCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nInitFailCount, nDeinitFailCount, "bt_audio_initialize", "bt_audio_deinitialize", pszInitDeinitMemLog, pszInitSpeedLog, pszDeinitSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_audio_initialize, pszInitSpeedLog);
+       PRINT_SPEED_LOG(bt_audio_deinitialize, pszDeinitSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_audio_initialize_deinitialize, pszInitDeinitMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszInitDeinitMemLog, pszInitSpeedLog, pszDeinitSpeedLog);
+       return 0;
+}
+
+//& purpose: Registers a callback function that will be invoked when the connection state is changed and Unregister the callback
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_audio_bt_audio_set_unset_connection_state_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function that will be invoked when the connection state is changed and Unregister the callback
+* @scenario                            Initialize bluetooth audio profile\n
+*                                              Register connection state change callback\n
+*                                              Unregister connection state change callback\n
+*                                              Deinitialize bluetooth audio profile
+* @apicovered                  bt_audio_initialize, bt_audio_set_connection_state_changed_cb, bt_audio_unset_connection_state_changed_cb and bt_audio_deinitialize
+* @passcase                            When bt_audio_set_connection_state_changed_cb and bt_audio_unset_connection_state_changed_cb is successful
+* @failcase                            If bt_audio_set_connection_state_changed_cb or bt_audio_unset_connection_state_changed_cb fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_audio_bt_audio_set_unset_connection_state_changed_cb_p(void)
+{
+       START_TEST;
+
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+       if( (false == BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_AUDIOMEDIA_FEATURE)) && (false == BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_AUDIOCALL_FEATURE)))
+       {
+               g_bBluetoothIsSupported = false;
+       }
+       else
+       {
+               g_bBluetoothIsSupported = true;
+       }
+
+       nRet = bt_audio_initialize();
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_audio_initialize");
+
+       if (nRet != BT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_audio_initialize failed. Error returned = %s", __LINE__, BluetoothErrorInfo(nRet));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog =        calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog =      calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_audio_set_connection_state_changed_cb(Bluetooth_bt_audio_connection_state_changed_cb_p, "AudioDeviceConnection");
+               BluetoothExecutionDelay(pszSetSpeedLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_audio_set_connection_state_changed_cb", nSetFailCount);
+               CHECK_ERROR_CONTINUE("bt_audio_set_connection_state_changed_cb", nSetFailCount);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_audio_unset_connection_state_changed_cb();
+               BluetoothExecutionDelay(pszUnsetSpeedLog);
+               BluetoothGetMemStatus(pszSetUnsetMemLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_audio_unset_connection_state_changed_cb", nUnsetFailCount);
+               CHECK_ERROR("bt_audio_unset_connection_state_changed_cb", nUnsetFailCount);
+       }
+
+       nRet = bt_audio_deinitialize();
+       PRINT_ERROR("bt_audio_deinitialize");
+       WAIT(SHORT_DELAY);
+
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nUnsetFailCount, "bt_audio_set_connection_state_changed_cb", "bt_audio_unset_connection_state_changed_cb", pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_audio_set_connection_state_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(bt_audio_unset_connection_state_changed_cb, pszUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_audio_set_unset_connection_state_changed_cb, pszSetUnsetMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when the authorization of device changes and Unregister the callback.
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_device_bt_device_set_unset_authorization_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function to be invoked when the authorization of device changes and Unregister the callback.
+* @scenario                            Register callback for set authorization\n
+*                                              Unregister callback for set authorization
+* @apicovered                  bt_device_set_authorization_changed_cb, bt_device_unset_authorization_changed_cb
+* @passcase                            When bt_device_set_authorization_changed_cb and bt_device_unset_authorization_changed_cb is successful.
+* @failcase                            If targest API bt_device_set_authorization_changed_cb or bt_device_unset_authorization_changed_cb fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_device_bt_device_set_unset_authorization_changed_cb_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetAuthorizationMemLog   = NULL;
+       char *pszSetAuthorizationSpeedLog = NULL;
+       char *pszUnsetAuthorizationSpeedLog = NULL;
+       int nSetAuthorizationFailCount = 0;
+       int nUnsetAuthorizationFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetAuthorizationMemLog =        calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetAuthorizationSpeedLog =           calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetAuthorizationSpeedLog =         calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_device_set_authorization_changed_cb(Bluetooth_bt_device_authorization_changed_cb_p, "SetAuthorization");
+               BluetoothExecutionDelay(pszSetAuthorizationSpeedLog);
+
+               CHECK_ERROR_CONTINUE("bt_device_set_authorization_changed_cb", nSetAuthorizationFailCount);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_device_unset_authorization_changed_cb();
+               BluetoothExecutionDelay(pszUnsetAuthorizationSpeedLog);
+               BluetoothGetMemStatus(pszSetUnsetAuthorizationMemLog);
+
+               CHECK_ERROR("bt_device_unset_authorization_changed_cb", nUnsetAuthorizationFailCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nSetAuthorizationFailCount, nUnsetAuthorizationFailCount, "bt_device_set_authorization_changed_cb", "bt_device_unset_authorization_changed_cb", pszSetUnsetAuthorizationMemLog, pszSetAuthorizationSpeedLog, pszUnsetAuthorizationSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_device_set_authorization_changed_cb, pszSetAuthorizationSpeedLog);
+       PRINT_SPEED_LOG(bt_device_unset_authorization_changed_cb, pszUnsetAuthorizationSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_device_set_unset_authorization_changed_cb, pszSetUnsetAuthorizationMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszSetUnsetAuthorizationMemLog, pszSetAuthorizationSpeedLog, pszUnsetAuthorizationSpeedLog);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when a bond is created and unregister the callback
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_device_bt_device_set_unset_bond_created_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function to be invoked when a bond is created and unregister the callback
+* @scenario                            Register callback\n
+*                                              Unregister the callback
+* @apicovered                  bt_device_set_bond_created_cb, bt_device_unset_bond_created_cb,
+* @passcase                            When bt_device_set_bond_created_cb and bt_device_unset_bond_created_cb is successful.
+* @failcase                            If targest API bt_device_set_bond_created_cb or bt_device_unset_bond_created_cb fails.
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_device_bt_device_set_unset_bond_created_cb_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetMemLog   = NULL;
+       char *pszUnsetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetMemLog =          calloc(MEMLOG * MAX_COUNT, sizeof(char));
+       pszUnsetMemLog =        calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog =        calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog =      calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_device_set_bond_created_cb(Bluetooth_bt_device_bond_created_cb_p, "CreateBond");
+               BluetoothExecutionDelay(pszSetSpeedLog);
+               BluetoothGetMemStatus(pszSetMemLog);
+               CHECK_ERROR_CONTINUE("bt_device_set_bond_created_cb", nSetFailCount);
+
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_device_unset_bond_created_cb();
+               BluetoothExecutionDelay(pszUnsetSpeedLog);
+               BluetoothGetMemStatus(pszUnsetMemLog);
+
+               CHECK_ERROR("bt_device_unset_bond_created_cb", nUnsetFailCount);
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_device_set_bond_created_cb failed %d times, bt_device_unset_bond_created_cb failed %d times out of %d times", __LINE__, nSetFailCount, nUnsetFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetMemLog, pszUnsetMemLog);
+               FREE_MEMORY(pszSetSpeedLog, pszUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_device_set_bond_created_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(bt_device_unset_bond_created_cb, pszUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_device_set_bond_created_cb, pszSetMemLog);
+       PRINT_MEMORY_LOG(bt_device_unset_bond_created_cb, pszUnsetMemLog);
+#endif
+       FREE_MEMORY(pszSetMemLog, pszUnsetMemLog);
+       FREE_MEMORY(pszSetSpeedLog, pszUnsetSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when a bond is destroyed and Unregister the callback
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_device_bt_device_set_unset_bond_destroyed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function to be invoked when a bond is destroyed and Unregister the callback
+* @scenario                            Register callback\n
+*                                              Unregister the callback
+* @apicovered                  bt_device_set_bond_destroyed_cb and bt_device_unset_bond_destroyed_cb
+* @passcase                            When bt_device_set_bond_destroyed_cb and bt_device_unset_bond_destroyed_cb is successful
+* @failcase                            If targest API bt_device_set_bond_destroyed_cb or bt_device_unset_bond_destroyed_cb is failed
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_device_bt_device_set_unset_bond_destroyed_cb_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetMemLog   = NULL;
+       char *pszUnsetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetMemLog =          calloc(MEMLOG * MAX_COUNT, sizeof(char));
+       pszUnsetMemLog =        calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog =        calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog =      calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_device_set_bond_destroyed_cb(Bluetooth_bt_device_bond_destroyed_cb_p, "DestroyBond");
+               BluetoothExecutionDelay(pszSetSpeedLog);
+               BluetoothGetMemStatus(pszSetMemLog);
+               CHECK_ERROR_CONTINUE("bt_device_set_bond_destroyed_cb", nSetFailCount);
+
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_device_unset_bond_destroyed_cb();
+               BluetoothExecutionDelay(pszUnsetSpeedLog);
+               BluetoothGetMemStatus(pszUnsetMemLog);
+
+               CHECK_ERROR("bt_device_unset_bond_destroyed_cb", nUnsetFailCount);
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_device_set_bond_destroyed_cb failed %d times, bt_device_unset_bond_destroyed_cb failed %d times out of %d times", __LINE__, nSetFailCount, nUnsetFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetMemLog, pszUnsetMemLog);
+               FREE_MEMORY(pszSetSpeedLog, pszUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_device_set_bond_destroyed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(bt_device_unset_bond_destroyed_cb, pszUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_device_set_bond_destroyed_cb, pszSetMemLog);
+       PRINT_MEMORY_LOG(bt_device_unset_bond_destroyed_cb, pszUnsetMemLog);
+#endif
+       FREE_MEMORY(pszSetMemLog, pszUnsetMemLog);
+       FREE_MEMORY(pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when the connection state is changed and Unregister callback
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_device_bt_device_set_unset_connection_state_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function to be invoked when the connection state is changed and Unregister callback
+* @scenario                            Register callback\n
+*                                              Unregister the callback
+* @apicovered                  bt_device_set_connection_state_changed_cb and bt_device_unset_connection_state_changed_cb
+* @passcase                            When bt_device_set_connection_state_changed_cb and bt_device_unset_connection_state_changed_cb is successful
+* @failcase                            If targest API bt_device_set_connection_state_changed_cb or bt_device_unset_connection_state_changed_cb is failed
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_device_bt_device_set_unset_connection_state_changed_cb_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetMemLog   = NULL;
+       char *pszUnsetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetMemLog =          calloc(MEMLOG * MAX_COUNT, sizeof(char));
+       pszUnsetMemLog =        calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog =        calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog =      calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_device_set_connection_state_changed_cb(Bluetooth_bt_device_connection_state_changed_cb_p, "SetConnection");
+               BluetoothExecutionDelay(pszSetSpeedLog);
+               BluetoothGetMemStatus(pszSetMemLog);
+               CHECK_ERROR_CONTINUE("bt_device_set_connection_state_changed_cb", nSetFailCount);
+
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_device_unset_connection_state_changed_cb();
+               BluetoothExecutionDelay(pszUnsetSpeedLog);
+               BluetoothGetMemStatus(pszUnsetMemLog);
+               CHECK_ERROR("bt_device_unset_connection_state_changed_cb", nUnsetFailCount);
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_device_set_connection_state_changed_cb failed %d times, bt_device_unset_connection_state_changed_cb failed %d times out of %d times", __LINE__, nSetFailCount, nUnsetFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetMemLog, pszUnsetMemLog);
+               FREE_MEMORY(pszSetSpeedLog, pszUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_device_set_connection_state_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(bt_device_unset_connection_state_changed_cb, pszUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_device_set_connection_state_changed_cb, pszSetMemLog);
+       PRINT_MEMORY_LOG(bt_device_unset_connection_state_changed_cb, pszUnsetMemLog);
+#endif
+       FREE_MEMORY(pszSetMemLog, pszUnsetMemLog);
+       FREE_MEMORY(pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when the process of service search finishes and unregister callback
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_device_bt_device_set_unset_service_searched_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function to be invoked when the process of service search finishes and unregister callback
+* @scenario                            Register callback\n
+*                                              Unregister callback
+* @apicovered                  bt_device_set_service_searched_cb, and bt_device_unset_service_searched_cb
+* @passcase                            When bt_device_set_service_searched_cb and bt_device_unset_service_searched_cb is successful
+* @failcase                            If targest API bt_device_set_service_searched_cb or bt_device_unset_service_searched_cb is failed
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_device_bt_device_set_unset_service_searched_cb_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszStartStopSearchMemLog   = NULL;
+       char *pszStartSearchSpeedLog = NULL;
+       char *pszStopSearchSpeedLog = NULL;
+       int nStartSearchCount = 0;
+       int nStopSearchCount = 0;
+
+#if MEMORY_CHECK
+       pszStartStopSearchMemLog =  calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszStartSearchSpeedLog =        calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszStopSearchSpeedLog   =   calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_device_set_service_searched_cb(Bluetooth_bt_device_service_searched_cb_p, "SetServiceSearch");
+               BluetoothExecutionDelay(pszStartSearchSpeedLog);
+               CHECK_ERROR_CONTINUE("bt_device_set_service_searched_cb", nStartSearchCount);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_device_unset_service_searched_cb();
+               BluetoothExecutionDelay(pszStopSearchSpeedLog);
+               BluetoothGetMemStatus(pszStartStopSearchMemLog);
+               CHECK_ERROR("bt_device_unset_service_searched_cb", nStopSearchCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nStartSearchCount, nStopSearchCount, "bt_device_set_service_searched_cb", "bt_device_unset_service_searched_cb", pszStartStopSearchMemLog, pszStartSearchSpeedLog, pszStopSearchSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_device_set_service_searched_cb, pszStartSearchSpeedLog);
+       PRINT_SPEED_LOG(bt_device_unset_service_searched_cb, pszStopSearchSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_device_set_unset_service_searched_cb, pszStartStopSearchMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszStartStopSearchMemLog, pszStartSearchSpeedLog, pszStopSearchSpeedLog);
+       return 0;
+}
+
+//& purpose: Registers a callback function that will be invoked when the connection state changes and Unregister
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_socket_bt_socket_set_unset_connection_state_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function that will be invoked when the connection state changes and Unregister
+* @scenario                            Register callback for socket connection state change\n
+*                                              Unregister the callback
+* @apicovered                  bt_socket_set_connection_state_changed_cb and bt_socket_unset_connection_state_changed_cb
+* @passcase                            When bt_socket_set_connection_state_changed_cb and bt_socket_unset_connection_state_changed_cb is successful
+* @failcase                            If targest APIs bt_socket_set_connection_state_changed_cb or bt_socket_unset_connection_state_changed_cb fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_socket_bt_socket_set_unset_connection_state_changed_cb_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszConnectDisconnectMemLog   = NULL;
+       char *pszConnectSpeedLog = NULL;
+       char *pszDisconnectSpeedLog = NULL;
+       int nConnectFailCount = 0;
+       int nDisconnectFailCount = 0;
+
+#if MEMORY_CHECK
+       pszConnectDisconnectMemLog =    calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszConnectSpeedLog =            calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszDisconnectSpeedLog =                 calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_socket_set_connection_state_changed_cb(Bluetooth_socket_connection_state_changed_cb_p, "SocketConnectionChange");
+               BluetoothExecutionDelay(pszConnectSpeedLog);
+               CHECK_ERROR_CONTINUE("bt_socket_set_connection_state_changed_cb", nConnectFailCount);
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_socket_unset_connection_state_changed_cb();
+               BluetoothExecutionDelay(pszDisconnectSpeedLog);
+               BluetoothGetMemStatus(pszConnectDisconnectMemLog);
+               CHECK_ERROR("bt_socket_unset_connection_state_changed_cb", nDisconnectFailCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nConnectFailCount, nDisconnectFailCount, "bt_socket_set_connection_state_changed_cb", "bt_socket_unset_connection_state_changed_cb", pszConnectDisconnectMemLog, pszConnectSpeedLog, pszDisconnectSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_socket_set_connection_state_changed_cb, pszConnectSpeedLog);
+       PRINT_SPEED_LOG(bt_socket_unset_connection_state_changed_cb, pszDisconnectSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_socket_set_unset_connection_state_changed_cb, pszConnectDisconnectMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszConnectDisconnectMemLog, pszConnectSpeedLog, pszDisconnectSpeedLog);
+       return 0;
+}
+
+//& purpose: Get local OOB data (Hash and Randomizer values)
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_le_create_destroy_advertiser_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Create advertiser to advertise device's existence or respond to LE scanning reqeust and destroy advertiser
+* @scenario                            Create advertiser\n
+*                                              Destroy advertiser
+* @apicovered                  bt_adapter_le_create_advertiser and bt_adapter_le_destroy_advertiser
+* @passcase                            When bt_adapter_le_create_advertiser and bt_adapter_le_destroy_advertiser is successful
+* @failcase                            If targest APIs bt_adapter_le_create_advertiser or bt_adapter_le_destroy_advertiser fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be de-initialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_get_local_oob_data_p(void)
+{
+       START_TEST;
+
+       unsigned char*  pszHash = NULL;
+       unsigned char*  pszRandomizer = NULL;
+       int nRet = -1, nLoopCount;
+       int nHashLength = 0;
+       int nRandomizerLength = 0;
+       char* pszGetMemLog = NULL;
+       char* pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_get_local_oob_data(&pszHash, &pszRandomizer, &nHashLength, &nRandomizerLength);
+               BluetoothExecutionDelay(pszGetSpeedLog);
+               BluetoothGetMemStatus(pszGetMemLog);
+               CHECK_ERROR_CONTINUE("bt_adapter_get_local_oob_data", nGetFailCount);
+
+               if (pszHash == NULL)
+               {
+                       nGetFailCount++;
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] After bt_adapter_get_local_oob_data, pszHash value is null in iteration %d", __LINE__, nLoopCount);
+                       continue;
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Get hash value : %s", __LINE__, pszHash);
+                       free(pszHash);
+                       pszHash = NULL;
+               }
+
+               if (pszRandomizer == NULL)
+               {
+                       nGetFailCount++;
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] After bt_adapter_get_local_oob_data, pszRandomizer value is null in iteration %d", __LINE__, nLoopCount);
+                       continue;
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] Get randomizer value : %s", __LINE__, pszRandomizer);
+                       free(pszRandomizer);
+                       pszRandomizer = NULL;
+               }
+       }
+
+       VALIDATE_RESULT(nGetFailCount, "bt_adapter_get_local_oob_data", pszGetMemLog, pszGetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_get_local_oob_data, pszGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_get_local_oob_data, pszGetMemLog);
+#endif
+
+       FREE_MEMORY(pszGetMemLog, pszGetSpeedLog);
+       return 0;
+}
+
+//& purpose: Create advertiser to advertise device's existence or respond to LE scanning reqeust and destroy advertiser
+//& type: auto
+/**
+* @testcase                    ITc_bluetooth_adapter_bt_adapter_le_create_destroy_advertiser_p
+* @type                                Positive
+* @description                 Create advertiser to advertise device's existence or respond to LE scanning reqeust and destroy advertiser
+* @scenario                            - Create advertiser
+*                                              - Destroy advertiser
+* @apicovered                  bt_adapter_le_create_advertiser and bt_adapter_le_destroy_advertiser
+* @passcase                            When bt_adapter_le_create_advertiser and bt_adapter_le_destroy_advertiser is successfull
+* @failcase                            If target apis bt_adapter_le_create_advertiser or bt_adapter_le_destroy_advertiser fails
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bluetooth_adapter_bt_adapter_le_create_destroy_advertiser_p(void)
+{
+       START_TEST;
+
+       int nRet = -1, nLoopCount = 0;
+       char *pszCreateDestroyMemLog   = NULL;
+       char *pszCreateSpeedLog = NULL;
+       char *pszDestroySpeedLog = NULL;
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+       bt_advertiser_h advertiser = NULL;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+#if MEMORY_CHECK
+       pszCreateDestroyMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCreateSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszDestroySpeedLog =    calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BluetoothGetMemAllocation();
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_le_create_advertiser(&advertiser);
+               BluetoothExecutionDelay(pszCreateSpeedLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_adapter_le_create_advertiser", nCreateFailCount);
+               CHECK_ERROR_CONTINUE("bt_adapter_le_create_advertiser", nCreateFailCount);
+
+               if (advertiser == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Bluetooth_ITc] bt_adapter_le_create_advertiser failed in iteration: %d. advertiser value is NULL", __LINE__, nLoopCount);
+                       nCreateFailCount++;
+                       continue;
+               }
+
+               BluetoothGetTimeOfDay();
+               nRet = bt_adapter_le_destroy_advertiser(advertiser);
+               BluetoothExecutionDelay(pszDestroySpeedLog);
+               BluetoothGetMemStatus(pszCreateDestroyMemLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("bt_adapter_le_destroy_advertiser", nDestroyFailCount);
+               CHECK_ERROR("bt_adapter_le_destroy_advertiser", nDestroyFailCount);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nCreateFailCount, nDestroyFailCount, "bt_adapter_le_create_advertiser", "bt_adapter_le_destroy_advertiser", pszCreateDestroyMemLog, pszCreateSpeedLog, pszDestroySpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bt_adapter_le_create_advertiser, pszCreateSpeedLog);
+       PRINT_SPEED_LOG(bt_adapter_le_destroy_advertiser, pszDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bt_adapter_le_create_destroy_advertiser, pszCreateDestroyMemLog);
+#endif
+       FREE_MEMORY_PAIR(pszCreateDestroyMemLog, pszCreateSpeedLog, pszDestroySpeedLog);
+       return 0;
+}
+
+//& purpose: To test bt_adapter_le_add_advertising_service_uuid
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_add_advertising_service_uuid_p
+* @since_tizen                 2.3
+* @type                                Positive
+* @description                 To test bt_adapter_le_add_advertising_service_uuid
+* @scenario                            Call bt_adapter_le_add_advertising_service_uuid
+* @apicovered                  bt_adapter_le_add_advertising_service_uuid
+* @passcase                            If target API bt_adapter_le_add_advertising_service_uuid return 0
+* @failcase                            If target API bt_adapter_le_add_advertising_service_uuid return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_add_advertising_service_uuid_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       bt_advertiser_h advertiser = NULL;
+       const char *time_svc_uuid_16 = "1805";
+       int nRet = bt_adapter_le_create_advertiser(&advertiser);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_create_advertiser");
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_create_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_add_advertising_service_uuid(advertiser,BT_ADAPTER_LE_PACKET_ADVERTISING, time_svc_uuid_16);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_add_advertising_service_uuid", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_destroy_advertiser(advertiser);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_destroy_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: To test bt_adapter_le_add_advertising_service_solicitation_uuid
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_add_advertising_service_solicitation_uuid_p
+* @since_tizen                 2.3
+* @type                                Positive
+* @description                 To test bt_adapter_le_add_advertising_service_solicitation_uuid
+* @scenario                            Call bt_adapter_le_add_advertising_service_solicitation_uuid
+* @apicovered                  bt_adapter_le_add_advertising_service_solicitation_uuid
+* @passcase                            If target API bt_adapter_le_add_advertising_service_solicitation_uuid return 0
+* @failcase                            If target API bt_adapter_le_add_advertising_service_solicitation_uuid return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_add_advertising_service_solicitation_uuid_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       bt_advertiser_h advertiser = NULL;
+       const char *heart_rate_svc_uuid_16 = "180d";
+       int nRet = bt_adapter_le_create_advertiser(&advertiser);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_create_advertiser");
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_create_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_add_advertising_service_solicitation_uuid(advertiser,BT_ADAPTER_LE_PACKET_ADVERTISING, heart_rate_svc_uuid_16);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_add_advertising_service_solicitation_uuid", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_destroy_advertiser(advertiser);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_destroy_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: To test bt_adapter_le_add_advertising_service_data
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_add_advertising_service_data_p
+* @since_tizen                 2.3
+* @type                                Positive
+* @description                 To test bt_adapter_le_add_advertising_service_data
+* @scenario                            Call bt_adapter_le_add_advertising_service_data
+* @apicovered                  bt_adapter_le_add_advertising_service_data
+* @passcase                            If target API bt_adapter_le_add_advertising_service_data return 0
+* @failcase                            If target API bt_adapter_le_add_advertising_service_data return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_add_advertising_service_data_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       bt_advertiser_h advertiser = NULL;
+       char service_data[] = {0x01, 0x02, 0x03};
+       const char *time_svc_uuid_16 = "1805";
+       int nRet = bt_adapter_le_create_advertiser(&advertiser);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_create_advertiser");
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_create_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_add_advertising_service_data(advertiser,BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, time_svc_uuid_16,service_data, sizeof(service_data));
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_add_advertising_service_data", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_destroy_advertiser(advertiser);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_destroy_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: To test bt_adapter_le_set_advertising_appearance
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_set_advertising_appearance_p
+* @since_tizen                 2.3
+* @type                                Positive
+* @description                 To test bt_adapter_le_set_advertising_appearance
+* @scenario                            Call bt_adapter_le_set_advertising_appearance
+* @apicovered                  bt_adapter_le_set_advertising_appearance
+* @passcase                            If target API bt_adapter_le_set_advertising_appearance  return 0
+* @failcase                            If target API bt_adapter_le_set_advertising_appearance   return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_set_advertising_appearance_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       bt_advertiser_h advertiser = NULL;
+       int appearance = 192;  // 192 is generic watch
+       int nRet = bt_adapter_le_create_advertiser(&advertiser);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_create_advertiser");
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_create_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_set_advertising_appearance(advertiser,     BT_ADAPTER_LE_PACKET_ADVERTISING, appearance);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_set_advertising_appearance", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_destroy_advertiser(advertiser);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_destroy_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: To test bt_adapter_le_add_advertising_manufacturer_data
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_add_advertising_manufacturer_data_p
+* @since_tizen                 2.3
+* @type                                Positive
+* @description                 To test bt_adapter_le_add_advertising_manufacturer_data
+* @scenario                            Call bt_adapter_le_add_advertising_manufacturer_data
+* @apicovered                  bt_adapter_le_add_advertising_manufacturer_data
+* @passcase                            If target API bt_adapter_le_add_advertising_manufacturer_data   return 0
+* @failcase                            If target API bt_adapter_le_add_advertising_manufacturer_data   return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_add_advertising_manufacturer_data_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       bt_advertiser_h advertiser = NULL;
+       int manufacturer_id = 117;
+       char *manufacture = NULL;
+       char manufacture_0[] = {0x0, 0x0, 0x0, 0x0};
+       manufacture = manufacture_0;
+       int nRet = bt_adapter_le_create_advertiser(&advertiser);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_create_advertiser");
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_create_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_add_advertising_manufacturer_data(advertiser,BT_ADAPTER_LE_PACKET_SCAN_RESPONSE,manufacturer_id,manufacture, sizeof(manufacture_0));
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_add_advertising_manufacturer_data", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_destroy_advertiser(advertiser);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_destroy_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: To test bt_adapter_le_set_advertising_device_name
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_set_advertising_device_name_p
+* @since_tizen                 2.3
+* @type                                Positive
+* @description                 To test bt_adapter_le_set_advertising_device_name
+* @scenario                            Call bt_adapter_le_set_advertising_device_name
+* @apicovered                  bt_adapter_le_set_advertising_device_name
+* @passcase                            If target API bt_adapter_le_set_advertising_device_name return 0
+* @failcase                            If target API bt_adapter_le_set_advertising_device_name  return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_set_advertising_device_name_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       bt_advertiser_h advertiser = NULL;
+       int nRet = bt_adapter_le_create_advertiser(&advertiser);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_create_advertiser");
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_create_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_set_advertising_device_name(advertiser,BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, true);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_set_advertising_device_name", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_destroy_advertiser(advertiser);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_destroy_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: To test bt_adapter_le_set_advertising_tx_power_level
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_set_advertising_tx_power_level_p
+* @since_tizen                 2.3
+* @type                                Positive
+* @description                 To test bt_adapter_le_set_advertising_tx_power_level
+* @scenario                            Call bt_adapter_le_set_advertising_tx_power_level
+* @apicovered                  bt_adapter_le_set_advertising_tx_power_level
+* @passcase                            If target API bt_adapter_le_set_advertising_tx_power_level          return 0
+* @failcase                            If target API bt_adapter_le_set_advertising_tx_power_level          return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_set_advertising_tx_power_level_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       bt_advertiser_h advertiser = NULL;
+       int nRet = bt_adapter_le_create_advertiser(&advertiser);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_create_advertiser");
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_create_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_set_advertising_tx_power_level(advertiser,BT_ADAPTER_LE_PACKET_ADVERTISING, true);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_set_advertising_tx_power_level", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_destroy_advertiser(advertiser);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_destroy_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: To test bt_adapter_le_start_advertising_new
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_start_advertising_new_p
+* @since_tizen                 2.3
+* @type                                Positive
+* @description                 To test bt_adapter_le_start_advertising_new
+* @scenario                            Call bt_adapter_le_start_advertising_new
+* @apicovered                  bt_adapter_le_start_advertising_new
+* @passcase                            If target API bt_adapter_le_start_advertising_new           return 0
+* @failcase                            If target API bt_adapter_le_start_advertising_new           return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_start_advertising_new_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       bt_advertiser_h advertiser = NULL;
+       bt_adapter_le_advertising_state_changed_cb cb;
+       cb = Bluetooth_bt_adapter_le_advertising_state_changed_cb;
+       int nRet = bt_adapter_le_create_advertiser(&advertiser);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_create_advertiser");
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_create_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_start_advertising_new(advertiser, cb, NULL);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_start_advertising_new", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_destroy_advertiser(advertiser);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_destroy_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: To test bt_adapter_le_set_advertising_mode
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_set_advertising_mode_p
+* @since_tizen                 2.3
+* @type                                Positive
+* @description                 To test bt_adapter_le_set_advertising_mode
+* @scenario                            Call bt_adapter_le_set_advertising_mode
+* @apicovered                  bt_adapter_le_set_advertising_mode
+* @passcase                            If target API bt_adapter_le_set_advertising_mode            return 0
+* @failcase                            If target API bt_adapter_le_set_advertising_mode            return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_set_advertising_mode_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       bt_advertiser_h advertiser = NULL;
+       int mode = BT_ADAPTER_LE_ADVERTISING_MODE_BALANCED;
+       int nRet = bt_adapter_le_create_advertiser(&advertiser);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_create_advertiser");
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_create_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_set_advertising_mode(advertiser, mode);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_set_advertising_mode", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_destroy_advertiser(advertiser);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_destroy_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: To test bt_adapter_le_set_advertising_connectable
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_set_advertising_connectable_p
+* @since_tizen                 2.3
+* @type                                Positive
+* @description                 To test bt_adapter_le_set_advertising_connectable
+* @scenario                            Call bt_adapter_le_set_advertising_connectable
+* @apicovered                  bt_adapter_le_set_advertising_connectable
+* @passcase                            If target API bt_adapter_le_set_advertising_connectable return 0
+* @failcase                            If target API bt_adapter_le_set_advertising_connectable return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_set_advertising_connectable_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       bt_advertiser_h advertiser = NULL;
+       bool connectable = true;
+       int nRet = bt_adapter_le_create_advertiser(&advertiser);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_create_advertiser");
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_create_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_set_advertising_connectable(advertiser, connectable);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_set_advertising_connectable", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet = bt_adapter_le_destroy_advertiser(advertiser);
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_destroy_advertiser", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: To test bt_adapter_le_start_scan
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_start_stop_scan_p
+* @type                                Positive
+* @description                 To test bt_adapter_le_start_scan
+* @scenario                            - Call bt_adapter_le_start_scan
+* @apicovered                  bt_adapter_le_start_scan, bt_adapter_le_stop_scan
+* @passcase                            If target API bt_adapter_le_start_scan return 0
+* @failcase                            If target API bt_adapter_le_start_scan return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_start_stop_scan_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       int nTimeoutId = 0;
+       g_bCallbackResult = false;
+
+       int nRet = bt_adapter_le_start_scan(Bluetooth_bt_adapter_le_scan_start_stop_result_cb,NULL);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_start_scan");
+       g_pMainLoop = g_main_loop_new(NULL, false);
+       nTimeoutId = g_timeout_add(CALLBACK_DELAY, TimeoutFunction, g_pMainLoop);
+       g_main_loop_run(g_pMainLoop);
+       g_source_remove(nTimeoutId);
+       if ( g_bCallbackResult == false )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, g_bCallbackResult is false", __LINE__, "bt_adapter_le_start_scan");
+       }
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_start_scan", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet =  bt_adapter_le_stop_scan();
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_stop_scan", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: To test all le get APIs
+//& type: auto
+/**
+* @testcase                    ITc_bt_adapter_le_get_scan_info_p
+* @type                                Positive
+* @description                 To test bt_adapter_le_start_scan
+* @scenario                            - Call bt_adapter_le_start_scan
+* @apicovered                  bt_adapter_le_start_scan, bt_adapter_le_stop_scan, bt_adapter_le_get_scan_result_service_uuids,
+*                                              bt_adapter_le_get_scan_result_device_name, bt_adapter_le_get_scan_result_tx_power_level,
+*                                              bt_adapter_le_get_scan_result_service_solicitation_uuids,bt_adapter_le_get_scan_result_service_data_list,
+*                                              bt_adapter_le_free_service_data_list,bt_adapter_le_get_scan_result_appearance,
+*                                              bt_adapter_le_get_scan_result_manufacturer_data
+* @passcase                            If target API bt_adapter_le_start_scan return 0
+* @failcase                            If target API bt_adapter_le_start_scan return 1
+* @precondition                        Bluetooth must be initialized
+* @postcondition               Bluetooth must be deinitialized
+*/
+int ITc_bt_adapter_le_get_scan_info_p(void)
+{
+       START_TEST;
+
+       g_bBluetoothIsSupported = BluetoothCheckSystemInfoFeatureSupported(BLUETOOTH_LE_FEATURE);
+
+       int nTimeoutId = 0;
+       g_bCallbackResult = false; 
+
+       int nRet = bt_adapter_le_start_scan(Bluetooth_bt_adapter_le_scan_result_cb,NULL);
+       CHECK_UNSUPPORTED_ERROR_RETURN("bt_adapter_le_start_scan");
+       g_pMainLoop = g_main_loop_new(NULL, false);
+       nTimeoutId = g_timeout_add(CALLBACK_DELAY, TimeoutFunction, g_pMainLoop);
+       g_main_loop_run(g_pMainLoop);
+       g_source_remove(nTimeoutId);
+       if ( g_bCallbackResult == false )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, g_bCallbackResult is false", __LINE__, "bt_adapter_le_start_scan");
+       }
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_start_scan", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       nRet =  bt_adapter_le_stop_scan();
+       if ( nRet != BT_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Bluetooth_ITC] %s failed, returned %s error", __LINE__, "bt_adapter_le_stop_scan", BluetoothErrorInfo(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/bluetooth/TestFile.vcf b/src/itc/bluetooth/TestFile.vcf
new file mode 100755 (executable)
index 0000000..31f3191
--- /dev/null
@@ -0,0 +1,7 @@
+BEGIN:VCARD
+VERSION:3.0
+N;CHARSET=UTF-8:;Temp2;;;
+FN;CHARSET=UTF-8:Temp2
+TEL;TYPE=CELL;PREF;CHARSET=UTF-8:995866552244
+REV:2014-01-03T01:07:04Z
+END:VCARD
diff --git a/src/itc/bluetooth/tct-bluetooth-native.c b/src/itc/bluetooth/tct-bluetooth-native.c
new file mode 100755 (executable)
index 0000000..6616e79
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-bluetooth-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/bluetooth/tct-bluetooth-native.h b/src/itc/bluetooth/tct-bluetooth-native.h
new file mode 100755 (executable)
index 0000000..fbbf744
--- /dev/null
@@ -0,0 +1,115 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_BLUETOOTH_NATIVE_H__
+#define __TCT_BLUETOOTH_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_bluetooth_startup(void);
+extern void ITs_bluetooth_cleanup(void);
+
+extern int ITc_bluetooth_adapter_bt_adapter_set_get_name_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_set_unset_name_changed_cb_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_get_address_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_get_state_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_get_visibility_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_is_discovering_p(void);
+extern int ITc_bluetooth_adapter_bt_start_stop_device_discovery_p(void);
+extern int ITc_bluetooth_bt_initialize_deinitialize_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_set_unset_state_changed_cb_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_mode_changed_cb_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_duration_changed_cb_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_set_unset_device_discovery_state_changed_cb_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_is_service_used_p(void);
+extern int ITc_bluetooth_socket_bt_socket_create_destroy_rfcomm_p(void);
+extern int ITc_bluetooth_socket_bt_socket_listen_and_accept_rfcomm_p(void);
+extern int ITc_bluetooth_socket_bt_socket_set_unset_connection_requested_cb_p(void);
+extern int ITc_bluetooth_socket_bt_socket_set_unset_data_received_cb_p(void);
+extern int ITc_bluetooth_client_OPP_bt_opp_client_initialize_deinitialize_p(void);
+extern int ITc_bluetooth_client_OPP_bt_opp_client_add_file_clear_files_p(void);
+extern int ITc_bluetooth_server_OPP_bt_opp_server_initialize_deinitialize_connection_request_p(void);
+extern int ITc_bluetooth_server_OPP_bt_opp_server_set_destination_p(void);
+extern int ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p(void);
+extern int ITc_bluetooth_audio_bt_audio_set_unset_connection_state_changed_cb_p(void);
+extern int ITc_bluetooth_device_bt_device_set_unset_authorization_changed_cb_p(void);
+extern int ITc_bluetooth_device_bt_device_set_unset_bond_created_cb_p(void);
+extern int ITc_bluetooth_device_bt_device_set_unset_bond_destroyed_cb_p(void);
+extern int ITc_bluetooth_device_bt_device_set_unset_connection_state_changed_cb_p(void);
+extern int ITc_bluetooth_device_bt_device_set_unset_service_searched_cb_p(void);
+extern int ITc_bluetooth_socket_bt_socket_set_unset_connection_state_changed_cb_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_get_local_oob_data_p(void);
+extern int ITc_bluetooth_adapter_bt_adapter_le_create_destroy_advertiser_p(void);
+extern int ITc_bt_adapter_le_add_advertising_service_uuid_p(void);
+extern int ITc_bt_adapter_le_add_advertising_service_solicitation_uuid_p(void);
+extern int ITc_bt_adapter_le_add_advertising_service_data_p(void);
+extern int ITc_bt_adapter_le_set_advertising_appearance_p(void);
+extern int ITc_bt_adapter_le_add_advertising_manufacturer_data_p(void);
+extern int ITc_bt_adapter_le_set_advertising_device_name_p(void);
+extern int ITc_bt_adapter_le_set_advertising_tx_power_level_p(void);
+extern int ITc_bt_adapter_le_start_advertising_new_p(void);
+extern int ITc_bt_adapter_le_set_advertising_mode_p(void);
+extern int ITc_bt_adapter_le_set_advertising_connectable_p(void);
+extern int ITc_bt_adapter_le_start_stop_scan_p(void);
+extern int ITc_bt_adapter_le_get_scan_info_p(void);
+
+testcase tc_array[] = {
+    {"ITc_bluetooth_adapter_bt_adapter_set_get_name_p", ITc_bluetooth_adapter_bt_adapter_set_get_name_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_set_unset_name_changed_cb_p", ITc_bluetooth_adapter_bt_adapter_set_unset_name_changed_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_get_address_p", ITc_bluetooth_adapter_bt_adapter_get_address_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_get_state_p", ITc_bluetooth_adapter_bt_adapter_get_state_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_get_visibility_p", ITc_bluetooth_adapter_bt_adapter_get_visibility_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_is_discovering_p", ITc_bluetooth_adapter_bt_adapter_is_discovering_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_start_stop_device_discovery_p", ITc_bluetooth_adapter_bt_start_stop_device_discovery_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_bt_initialize_deinitialize_p", ITc_bluetooth_bt_initialize_deinitialize_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_set_unset_state_changed_cb_p", ITc_bluetooth_adapter_bt_adapter_set_unset_state_changed_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_mode_changed_cb_p", ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_mode_changed_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_duration_changed_cb_p", ITc_bluetooth_adapter_bt_adapter_set_unset_visibility_duration_changed_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_set_unset_device_discovery_state_changed_cb_p", ITc_bluetooth_adapter_bt_adapter_set_unset_device_discovery_state_changed_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_is_service_used_p", ITc_bluetooth_adapter_bt_adapter_is_service_used_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_socket_bt_socket_create_destroy_rfcomm_p", ITc_bluetooth_socket_bt_socket_create_destroy_rfcomm_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_socket_bt_socket_listen_and_accept_rfcomm_p", ITc_bluetooth_socket_bt_socket_listen_and_accept_rfcomm_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_socket_bt_socket_set_unset_connection_requested_cb_p", ITc_bluetooth_socket_bt_socket_set_unset_connection_requested_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_socket_bt_socket_set_unset_data_received_cb_p", ITc_bluetooth_socket_bt_socket_set_unset_data_received_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_client_OPP_bt_opp_client_initialize_deinitialize_p", ITc_bluetooth_client_OPP_bt_opp_client_initialize_deinitialize_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_client_OPP_bt_opp_client_add_file_clear_files_p", ITc_bluetooth_client_OPP_bt_opp_client_add_file_clear_files_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_server_OPP_bt_opp_server_initialize_deinitialize_connection_request_p", ITc_bluetooth_server_OPP_bt_opp_server_initialize_deinitialize_connection_request_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_server_OPP_bt_opp_server_set_destination_p", ITc_bluetooth_server_OPP_bt_opp_server_set_destination_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p", ITc_bluetooth_audio_bt_audio_initialize_deinitialize_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_audio_bt_audio_set_unset_connection_state_changed_cb_p", ITc_bluetooth_audio_bt_audio_set_unset_connection_state_changed_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_device_bt_device_set_unset_authorization_changed_cb_p", ITc_bluetooth_device_bt_device_set_unset_authorization_changed_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_device_bt_device_set_unset_bond_created_cb_p", ITc_bluetooth_device_bt_device_set_unset_bond_created_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_device_bt_device_set_unset_bond_destroyed_cb_p", ITc_bluetooth_device_bt_device_set_unset_bond_destroyed_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_device_bt_device_set_unset_connection_state_changed_cb_p", ITc_bluetooth_device_bt_device_set_unset_connection_state_changed_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_device_bt_device_set_unset_service_searched_cb_p", ITc_bluetooth_device_bt_device_set_unset_service_searched_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_socket_bt_socket_set_unset_connection_state_changed_cb_p", ITc_bluetooth_socket_bt_socket_set_unset_connection_state_changed_cb_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_get_local_oob_data_p", ITc_bluetooth_adapter_bt_adapter_get_local_oob_data_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bluetooth_adapter_bt_adapter_le_create_destroy_advertiser_p", ITc_bluetooth_adapter_bt_adapter_le_create_destroy_advertiser_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_add_advertising_service_uuid_p", ITc_bt_adapter_le_add_advertising_service_uuid_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_add_advertising_service_solicitation_uuid_p", ITc_bt_adapter_le_add_advertising_service_solicitation_uuid_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_add_advertising_service_data_p", ITc_bt_adapter_le_add_advertising_service_data_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_set_advertising_appearance_p", ITc_bt_adapter_le_set_advertising_appearance_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_add_advertising_manufacturer_data_p", ITc_bt_adapter_le_add_advertising_manufacturer_data_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_set_advertising_device_name_p", ITc_bt_adapter_le_set_advertising_device_name_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_set_advertising_tx_power_level_p", ITc_bt_adapter_le_set_advertising_tx_power_level_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_start_advertising_new_p", ITc_bt_adapter_le_start_advertising_new_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_set_advertising_mode_p", ITc_bt_adapter_le_set_advertising_mode_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_set_advertising_connectable_p", ITc_bt_adapter_le_set_advertising_connectable_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_start_stop_scan_p", ITc_bt_adapter_le_start_stop_scan_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {"ITc_bt_adapter_le_get_scan_info_p", ITc_bt_adapter_le_get_scan_info_p, ITs_bluetooth_startup, ITs_bluetooth_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_BLUETOOTH_NATIVE_H__
diff --git a/src/itc/bundle/CMakeLists.txt b/src/itc/bundle/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..14106ad
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "bundle")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "bundle")
+SET(TC_SOURCES
+       ITs-bundle-common.c
+       ITs-bundle.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/bundle/ITs-bundle-common.c b/src/itc/bundle/ITs-bundle-common.c
new file mode 100755 (executable)
index 0000000..8b06d66
--- /dev/null
@@ -0,0 +1,203 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-bundle-common.h"
+
+/** @addtogroup itc-bundle
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stBundleStartTime;
+extern struct mallinfo g_stBundleMemInfo;
+
+/**
+* @function            BundleGetType
+* @description         Maps Types of given values to string.
+* @parameter           nRet : result code returned
+* @return                      Type represented as string
+*/
+char* BundleGetType(int nRet)
+{
+       char *szTypeVal = NULL;
+
+       switch ( nRet )
+       {
+       case BUNDLE_TYPE_NONE:                  szTypeVal = "BUNDLE_TYPE_NONE";                 break;
+       case BUNDLE_TYPE_ANY:                   szTypeVal = "BUNDLE_TYPE_ANY";                  break;
+       case BUNDLE_TYPE_STR:                   szTypeVal = "BUNDLE_TYPE_STR";                  break;
+       case BUNDLE_TYPE_STR_ARRAY:             szTypeVal = "BUNDLE_TYPE_STR_ARRAY";    break;
+       case BUNDLE_TYPE_BYTE:                  szTypeVal = "BUNDLE_TYPE_BYTE";                 break;
+       case BUNDLE_TYPE_BYTE_ARRAY:    szTypeVal = "BUNDLE_TYPE_BYTE_ARRAY";   break;
+       default:                                                szTypeVal = "Unknown Type";                             break;
+       }
+       return szTypeVal;
+}
+
+/**
+* @function            BundleGetTypePropertyValue
+* @description         Maps Types of given values to string.
+* @parameter           nRet : result code returned
+* @return                      Type represented as string
+*/
+char* BundleGetTypePropertyValue(int nRet)
+{
+       char *szTypeVal = NULL;
+       switch ( nRet )
+       {
+       case BUNDLE_TYPE_ARRAY:                 szTypeVal = "BUNDLE_TYPE_ARRAY";                break;
+       case BUNDLE_TYPE_PRIMITIVE:             szTypeVal = "BUNDLE_TYPE_PRIMITIVE";    break;
+       case BUNDLE_TYPE_MEASURABLE:    szTypeVal = "BUNDLE_TYPE_MEASURABLE";   break;
+       default:                                                szTypeVal = "Unknown Type";                             break;
+       }
+       return szTypeVal;
+}
+
+/**
+* @function            BundleGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* BundleGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+               case EINVAL : szErrorVal = "bundle is invalid" ; break; 
+               case ENOKEY : szErrorVal = "No key exists" ; break; 
+               case EKEYREJECTED : szErrorVal = "invalid key (NULL or sth)." ; break; 
+               case EPERM : szErrorVal = "key already exists, not permitted to overwrite value"; break; 
+               default : szErrorVal = "Unknown error" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function                    BundleGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void BundleGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char * pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stBundleMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stBundleMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stBundleMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    BundleGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void BundleGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stBundleMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void BundleExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime=calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stBundleStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stBundleStartTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           SystemGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void BundleGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stBundleStartTime, NULL);
+#endif
+}
+
+/**
+ * @function           FREE_MEMORY
+ * @description                Function to free the memory allocated
+ * @parameter          NA
+ * @return                     NA
+ *
+ */ 
+void FREE_MEMORY(char *pszMem1, char *pszMem2,char *pszMem3)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/bundle/ITs-bundle-common.h b/src/itc/bundle/ITs-bundle-common.h
new file mode 100755 (executable)
index 0000000..b0fed50
--- /dev/null
@@ -0,0 +1,143 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_BUNDLE_COMMON_H_
+#define _ITS_BUNDLE_COMMON_H_
+
+#include "assert.h"
+
+//Add test package related includes here
+
+#include "bundle.h"
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <string.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <errno.h>
+#include <glib.h>
+
+/** @addtogroup itc-bundle
+*  @ingroup itc
+*  @{
+*/
+
+FILE *g_fpLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+#define API_NAMESPACE                          "BUNDLE_ITC"
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define MINIMUM_SLEEP_TIME                     2000
+#define TIMEOUT_CB                                     10000
+#define KEY1                                           "key1"
+#define KEY1_VALUE                                     "myvalue"
+#define KEY2                                           "key2"
+#define KEY2_VALUE                                     "myvalue2"
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][%s] Starting test : %s\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
+       if ( !g_bBundleCreation )\
+       {\
+               FPRINTF("\\n[Line : %d][%s]Precondition of bundle create failed so leaving test\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s passed\n", __LINE__, API_NAMESPACE, API);\
+       }\
+       else \
+       {\
+               FPRINTF("\\n[Line : %d][%s] %s failed, %d error returned = %s \n", __LINE__, API_NAMESPACE, API, nRetVal, BundleGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if(strlen(memLog) > 0) \
+       {  \
+               memLog[strlen(memLog)-1] = '\0';\
+               FPRINTF("\\n[%s] %s_MemoryLeakStatus - %s\n", API_NAMESPACE, #api, memLog);\
+       }
+
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[%s] %s_TimeInMicrosec- %s\n", API_NAMESPACE, #api, speedLog);\
+       }
+
+#define FREE_MEMORY1(MEM1) {\
+       if(MEM1 != NULL) \
+       {\
+               free(MEM1);\
+               MEM1 = NULL;\
+       }\
+}
+
+#define RUN_POLLING_LOOP {\
+       mainloop = g_main_loop_new(NULL, false);\
+       nBundleTimeoutId = g_timeout_add(TIMEOUT_CB, BundleTimeout, mainloop);\
+       g_main_loop_run(mainloop);\
+       g_source_remove(nBundleTimeoutId);\
+       mainloop = NULL;\
+}
+
+void BundleGetMemAllocation();
+void BundleExecutionDelay(char* pszAPITime);
+void BundleGetTimeOfDay();
+void BundleGetMemStatus(char *pszAPIMemory);
+void FREE_MEMORY(char *pszMem1, char *pszMem2,char *pszMem3);
+
+//Add helper function declarations here
+
+/**
+* @function            BundleGetType
+* @description         Maps Types of given values to string.
+* @parameter           nRet : result code returned
+* @return                      Type represented as string
+*/
+char* BundleGetType(int nRet);
+/**
+* @function            BundleGetTypePropertyValue
+* @description         Maps Types of given values to string.
+* @parameter           nRet : result code returned
+* @return                      Type represented as string
+*/
+char* BundleGetTypePropertyValue(int nRet);
+/**
+* @function            BundleGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* BundleGetError(int nRet);
+/** @} */
+#endif  //_ITS_BUNDLE_COMMON_H_
diff --git a/src/itc/bundle/ITs-bundle.c b/src/itc/bundle/ITs-bundle.c
new file mode 100755 (executable)
index 0000000..b536135
--- /dev/null
@@ -0,0 +1,1027 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-bundle-common.h"
+
+/** @addtogroup itc-bundle
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Bundle
+
+bundle *g_bundle;
+bool g_bBundleCreation = false;
+bundle_keyval_t *g_BundlestKeyVal;
+struct timeval g_stBundleStartTime;
+struct mallinfo g_stBundleMemInfo;
+static GMainLoop *mainloop;
+
+/**
+* @function            ITs_bundle_startup
+* @description         Called before each test, created bundle handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_bundle_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       if ( g_bBundleCreation )
+       {
+               int nRet = bundle_free (g_bundle);
+               if ( nRet != BUNDLE_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_free failed, error returned = %s \n", __LINE__, API_NAMESPACE, strerror(nRet));
+               }
+               g_bBundleCreation = false;
+       }
+       
+       g_bundle = bundle_create();
+       if ( g_bundle == NULL )
+       {
+               FPRINTF("\\n[Line : %d][%s] Unable to create bundle \n", __LINE__, API_NAMESPACE);
+               g_bBundleCreation = false;
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][%s] Bundle created successfully \n", __LINE__, API_NAMESPACE);
+               g_bBundleCreation = true;
+       }
+
+   return;
+}
+
+/**
+* @function            ITs_bundle_cleanup
+* @description         Called after each test, destroys bundle handle
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_bundle_cleanup(void)
+{
+       if (g_bBundleCreation)
+       {
+               int nRet = bundle_free (g_bundle);
+               if ( nRet != 0 )
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_free failed, error returned = %s \n", __LINE__, API_NAMESPACE, strerror(nRet));
+               }
+               g_bBundleCreation = false;
+       }
+       return;
+}
+
+/**
+* @function            BundleTimeout
+* @description         Called if some callback is not invoked for a particular BundleTimeout
+* @parameter           gpointer data
+* @return                      gboolean
+*/ 
+gboolean BundleTimeout(gpointer data)
+{
+       g_main_loop_quit((GMainLoop *)data);
+       FPRINTF("\\n[Line : %d][%s] Callback BundleTimeout", __LINE__, API_NAMESPACE);
+       return false;
+}
+
+/** @addtogroup itc-bundle-testcases
+*  @brief              Integration testcases for module bundle
+*  @ingroup    itc-bundle
+*  @{
+*/
+
+//& purpose: Encodes and Decodes Bundle
+//& type: auto
+/**
+* @testcase                    ITc_bundle_EncodeDecodeBundle_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Encode and Decode Bundle
+* @scenario                            Adds a string type key-value pair into Bundle\\n
+*                                              Encode the Bundle\n
+*                                              Decode the Bundle\n
+*                                              Check whether the decoded bundle is the same before encoding, by checking string value with given key
+* @apicovered                  bundle_encode, bundle_decode
+* @passcase                            When bundle_encode, bundle_decode are successful.
+* @failcase                            If target API bundle_encode or bundle_decode fails or any precondition and postcondition API fails
+* @precondition                        Bundle must be created
+* @postcondition               Bundle must be released
+*/
+int ITc_bundle_EncodeDecodeBundle_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1, nLoopCount = 0;
+
+       char *pszEncodeDecodeMemLog =  NULL;
+       char *pszEncodeSpeedLog = NULL;
+       char *pszDecodeSpeedLog= NULL;
+
+       int nEncodeFailCount = 0;
+       int nDecodeFailCount = 0;
+       bundle_raw *pstBundleRaw;
+       int nLength = 0;
+       
+       //Precondition 
+       nRetVal = bundle_add_str(g_bundle, (char*)KEY1, (char*)KEY1_VALUE);
+       PRINT_RESULT(nRetVal, "bundle_add_str");
+       
+#if MEMORY_CHECK       
+       pszEncodeDecodeMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if    SPEED_CHECK
+       pszEncodeSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszDecodeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal = bundle_encode(g_bundle,&pstBundleRaw,&nLength);;
+               BundleExecutionDelay(pszEncodeSpeedLog);
+               
+               if (nRetVal != 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s]bundle_encode failed on iteration %d, error returned = %s ", __LINE__, API_NAMESPACE, nLoopCount, strerror(nRetVal));
+                       nEncodeFailCount++;
+                       continue;
+               }
+
+               // Give some sleep between encode and decode
+               usleep(MINIMUM_SLEEP_TIME);
+               
+               BundleGetTimeOfDay();
+               bundle *tempBundle = bundle_decode(pstBundleRaw,nLength);
+               BundleExecutionDelay(pszDecodeSpeedLog);
+               BundleGetMemStatus(pszEncodeDecodeMemLog);
+               
+               if (tempBundle == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_decode failed on iteration %d, error returned = %s ", __LINE__, API_NAMESPACE, nLoopCount, strerror(nRetVal));
+                       nDecodeFailCount++;
+                       free(pstBundleRaw);
+                       continue;
+               } 
+               else {
+                       char* pTempBundleStr = NULL;
+                       nRetVal = bundle_get_str(tempBundle, (char *)KEY1, &pTempBundleStr);
+                       PRINT_RESULT(nRetVal, "bundle_get_str");
+
+                       if(strcmp((char*)KEY1_VALUE, pTempBundleStr) != 0)//not equal 
+                       {
+                               FPRINTF("\\n[Line : %d][%s] bundle_decode failed on iteration %d, error returned = %s ", __LINE__, API_NAMESPACE, nLoopCount, strerror(nRetVal));
+                               nDecodeFailCount++;
+                               free(pstBundleRaw);
+                               free(tempBundle);
+                               continue;                               
+                       }
+               }
+               free(pstBundleRaw);
+               free(tempBundle);
+       }
+
+       if (nEncodeFailCount > 0 || nDecodeFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] bundle_encode failed %d times, bundle_decode failed %d times out of %d times", __LINE__, API_NAMESPACE, nEncodeFailCount, nDecodeFailCount, MAX_COUNT);
+               FREE_MEMORY(pszEncodeSpeedLog,pszDecodeSpeedLog, pszEncodeDecodeMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bundle_encode, pszEncodeSpeedLog);
+       PRINT_SPEED_LOG(bundle_decode, pszDecodeSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(BundleEncodeDecode, pszEncodeDecodeMemLog);
+#endif
+       FREE_MEMORY(pszEncodeSpeedLog,pszDecodeSpeedLog,pszEncodeDecodeMemLog);
+       return 0;
+}
+
+//& purpose: Add StringArray and Get String Array. 
+//& type: auto
+/**
+* @testcase                    ITc_bundle_AddGetStringArrayBundle_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Add String Array, Set its element and Get String Array
+* @scenario                            Add Empty StringArray with defined length\n
+*                                              Set StringArray Elements\n
+*                                              Get StringArray
+* @apicovered                  bundle_add_str_array and bundle_get_str_array
+* @passcase                            When bundle_add_str_array and bundle_get_str_array are successful.
+* @failcase                            If target API's bundle_add_str_array or bundle_get_str_array fails or any precondition or postcondition API fails
+* @precondition                        Bundle must be created
+* @postcondition               Bundle must be released
+*/
+int ITc_bundle_AddGetStringArrayBundle_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszAddStrArrayMemLog = NULL;
+       char *pszGetStrArrayMemLog = NULL;
+       char *pszAddStrArraySpeedLog = NULL;
+       char *pszGetStrArraySpeedLog = NULL;
+
+       int nAddStrArrayFailCount = 0;
+       int nGetStrArrayFailCount = 0;
+
+       const char **pszStringArray = (const char *[]){"aaa", "bbb", "ccc"};
+       int nStringArrayLength =  3;
+#if MEMORY_CHECK       
+       pszAddStrArrayMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       pszGetStrArrayMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+#if SPEED_CHECK        
+       pszAddStrArraySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetStrArraySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal = bundle_add_str_array(g_bundle, (char*)KEY1, pszStringArray, nStringArrayLength); // add a String-array with length 3
+               BundleExecutionDelay(pszAddStrArraySpeedLog);
+               BundleGetMemStatus(pszAddStrArrayMemLog);
+               if (nRetVal != 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_add_str_array failed on iteration %d, error returned = %s ", __LINE__, API_NAMESPACE, nLoopCount, BundleGetError(nRetVal));
+                       nAddStrArrayFailCount++;
+                       continue;
+               }
+               const char **pStringArrayOutput = NULL;
+               int nLengthOutput = 0;
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               pStringArrayOutput = bundle_get_str_array(g_bundle, (const char *)KEY1, &nLengthOutput);
+               BundleExecutionDelay(pszGetStrArraySpeedLog);
+               BundleGetMemStatus(pszGetStrArrayMemLog);
+               if (pStringArrayOutput == NULL || (nLengthOutput != nStringArrayLength) )
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_get_str_array failed on iteration %d, pStringArrayOutput returned = %s ", __LINE__, API_NAMESPACE, nLoopCount, (char *)pStringArrayOutput);
+                       nGetStrArrayFailCount++;
+                       bundle_del(g_bundle, (char *)KEY1);
+                       continue;
+               }
+               else 
+               {
+                       int nCount = 0;
+                       for(nCount =0; nCount < nStringArrayLength; nCount++) 
+                       {
+                               if(strcmp(pszStringArray[nCount], pStringArrayOutput[nCount]) != 0)//not equal 
+                               {
+                                       FPRINTF("\\n[Line : %d][%s]bundle_get_str_array failed on iteration %d, as returned values of getByte Array %d element not matched with original Value %s ", __LINE__, API_NAMESPACE, nLoopCount, nCount, pStringArrayOutput[nCount]);
+                                       nGetStrArrayFailCount++;
+                                       break;                          
+                               }
+                       }
+               }
+               nRetVal = bundle_del(g_bundle, (char *)KEY1);
+               PRINT_RESULT(nRetVal, "bundle_del");
+       }
+       
+       if ( nAddStrArrayFailCount > 0 || nGetStrArrayFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] bundle_add_str_array failed %d times, bundle_get_str_array failed %d times out of %d times", __LINE__, API_NAMESPACE, nAddStrArrayFailCount, nGetStrArrayFailCount, MAX_COUNT);
+               FREE_MEMORY(pszAddStrArraySpeedLog, pszGetStrArraySpeedLog, pszAddStrArrayMemLog);
+               FREE_MEMORY1(pszGetStrArrayMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG( bundle_add_str_array, pszAddStrArraySpeedLog);
+       PRINT_SPEED_LOG(bundle_get_str_array, pszGetStrArraySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bundle_add_str_array, pszAddStrArrayMemLog);
+       PRINT_MEMORY_LOG(bundle_get_str_array, pszGetStrArrayMemLog);
+#endif
+       FREE_MEMORY(pszAddStrArraySpeedLog, pszGetStrArraySpeedLog, pszAddStrArrayMemLog);
+       FREE_MEMORY1(pszGetStrArrayMemLog);
+       return 0;
+}
+
+//& purpose: Create Bundle Add KeyValue Pair to Bundle And Frees given bundle object with key-value pairs in it.
+//& type: auto
+/**
+* @testcase                    ITc_bundle_CreateBundleFreeBundle_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Creates a Bundle, Add key value-pair's, and Frees given bundle object with key-value pairs in it
+* @scenario                            Create a Bundle\n
+*                                              Adds a key-value pair into bundle\n
+*                                              Frees given bundle object with key-value pairs in it
+* @apicovered                  bundle_create, bundle_add_str, bundle_free
+* @passcase                            When bundle_create, or bundle_free are successful.
+* @failcase                            If target API's bundle_create or bundle_free fails or any precondition or postcondition API fails
+* @precondition                        Bundle must be created
+* @postcondition               Bundle must be released
+*/
+int ITc_bundle_CreateBundleFreeBundle_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszBundleCreateMemLog = NULL;
+       char *pszBundleFreeMemLog = NULL;
+       char *pszBundleCreateSpeedLog = NULL;
+       char *pszBundleFreeSpeedLog = NULL;
+       int nBundleCreateFailCount = 0;
+       int nBundleFreeFailCount = 0;
+       
+#if MEMORY_CHECK       
+       pszBundleCreateMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       pszBundleFreeMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszBundleCreateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszBundleFreeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif 
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char szKey[20] = {0};
+               char szValue[20] = {0};
+               bundle *pBundle = NULL;
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               pBundle = bundle_create();
+               BundleExecutionDelay(pszBundleCreateSpeedLog);
+               BundleGetMemStatus(pszBundleCreateMemLog);      
+               if (pBundle == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_create failed on iteration %d", __LINE__, API_NAMESPACE, nLoopCount);
+                       nBundleCreateFailCount++;
+                       continue;
+               }
+               sprintf(szKey, "KEY%d", (nLoopCount+1));
+               sprintf(szValue, "VALUE%d", (nLoopCount+1));
+               usleep(MINIMUM_SLEEP_TIME);
+               bundle_add_str(pBundle, szKey, szValue);
+               
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal = bundle_free(pBundle); 
+               BundleExecutionDelay(pszBundleFreeSpeedLog);
+               BundleGetMemStatus(pszBundleFreeMemLog);        
+               if (nRetVal != 0) 
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_free failed on iteration %d, error returned = %s ", __LINE__, API_NAMESPACE, nLoopCount, strerror(nRetVal));
+                       nBundleFreeFailCount++;
+                       continue;
+               }
+               usleep(MINIMUM_SLEEP_TIME);
+       }
+       
+       if ( nBundleCreateFailCount > 0 || nBundleFreeFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] bundle_create failed %d times, bundle_free failed %d times out of %d times", __LINE__, API_NAMESPACE, nBundleCreateFailCount, nBundleFreeFailCount, MAX_COUNT);
+               FREE_MEMORY(pszBundleCreateSpeedLog,pszBundleFreeSpeedLog,pszBundleCreateMemLog);
+               FREE_MEMORY1(pszBundleFreeMemLog);              
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bundle_create, pszBundleCreateSpeedLog);
+       PRINT_SPEED_LOG(bundle_free, pszBundleFreeSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bundle_create, pszBundleCreateMemLog);
+       PRINT_MEMORY_LOG(bundle_free, pszBundleFreeMemLog);
+
+#endif
+       FREE_MEMORY(pszBundleCreateSpeedLog,pszBundleFreeSpeedLog,pszBundleCreateMemLog);
+       FREE_MEMORY1(pszBundleFreeMemLog);
+       return 0;
+}
+
+//& purpose:  Adds a Byte Key Value pair into a given bundle And Gets Value of given key(byte) from the bundle
+//& type: auto
+/**
+* @testcase                    ITc_bundle_AddByteGetByte_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Adds a byte type key-value pair into a given bundle And Gets a value from a given byte key
+* @scenario                            Adds a byte type key-value pair into a given bundle And Gets a value from a given byte key
+* @apicovered                  bundle_add_byte, bundle_get_byte
+* @passcase                            When bundle_add_byte, bundle_get_byteare successful.
+* @failcase                            If target API's bundle_add_byte or bundle_get_byte fails or any precondition or postcondition API fails
+* @precondition                        Bundle must be created
+* @postcondition               Bundle must be released
+*/
+int ITc_bundle_AddByteGetByte_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszAddByteMemLog = NULL;  
+       char *pszGetByteMemLog = NULL;  
+       char *pszAddByteSpeedLog = NULL;        
+       char *pszGetByteSpeedLog = NULL;        
+       int nBundleAddByteFailCount = 0;
+       int nBundleGetByteFailCount = 0;
+#if MEMORY_CHECK
+       pszAddByteMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));   
+       pszGetByteMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));   
+#endif
+#if SPEED_CHECK
+       pszAddByteSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetByteSpeedLog = calloc(MEMLOG * MAX_COUNT , sizeof(char)); 
+#endif 
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char szKeyByte[20] = {0};
+               char szValueByte[20] = {0};
+               sprintf(szKeyByte, "KEY%dB", (nLoopCount+1));
+               sprintf(szValueByte, "VALUE%dB", (nLoopCount+1));
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal = bundle_add_byte(g_bundle, szKeyByte, szValueByte, 20);
+               BundleExecutionDelay(pszAddByteSpeedLog);
+               BundleGetMemStatus(pszAddByteMemLog);
+               if (nRetVal != 0) 
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_add_byte failed on iteration %d, error returned = %s for key = %s and value = %s", __LINE__, API_NAMESPACE, nLoopCount, BundleGetError(nRetVal), szKeyByte, szValueByte);
+                       nBundleAddByteFailCount++;
+                       continue;
+               }
+               unsigned char *pTempByteValue = NULL;
+               size_t  nByteSize = 0;
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal = bundle_get_byte(g_bundle, (const char *)szKeyByte, (void **)&pTempByteValue, &nByteSize);
+               BundleExecutionDelay(pszGetByteSpeedLog);
+               BundleGetMemStatus(pszGetByteMemLog);
+               if (nRetVal != 0 || pTempByteValue == NULL || (strcmp((char *)szValueByte, (char *)pTempByteValue) != 0) || (nByteSize!= 20) )
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_get_byte failed on iteration %d, error returned = %s for key = %s", __LINE__, API_NAMESPACE, nLoopCount, BundleGetError(nRetVal), (char *)szKeyByte);
+                       nBundleGetByteFailCount++;
+                       bundle_del(g_bundle, (char *)szKeyByte);                        
+                       continue;
+               }
+               bundle_del(g_bundle, (char *)szKeyByte);                        
+       }
+
+       if (nBundleAddByteFailCount > 0 || nBundleGetByteFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] bundle_add_byte failed %d times, bundle_get_byte failed %d times out of %d times", __LINE__, API_NAMESPACE, nBundleAddByteFailCount, nBundleGetByteFailCount, MAX_COUNT);
+               FREE_MEMORY(pszAddByteSpeedLog,pszGetByteSpeedLog,pszAddByteMemLog);
+               FREE_MEMORY1(pszGetByteMemLog);         
+               return 1;
+       }       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bundle_add_byte, pszAddByteSpeedLog);
+       PRINT_SPEED_LOG(bundle_get_byte, pszGetByteSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bundle_add_byte, pszAddByteMemLog);
+       PRINT_MEMORY_LOG(bundle_get_byte, pszGetByteMemLog);
+#endif
+       FREE_MEMORY(pszAddByteSpeedLog,pszGetByteSpeedLog,pszAddByteMemLog);
+       FREE_MEMORY1(pszGetByteMemLog); 
+       return 0;
+}
+
+//& purpose:  Adds a String Key Value pair into a given bundle And Gets Value of given key(String) from the bundle
+//& type: auto
+/**
+* @testcase                    ITc_bundle_AddStringGetString_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Adds a String type key-value pair into a given bundle And Gets a value from a given String key
+* @scenario                            Adds a String type key-value pair into a given bundle And Gets a value from a given String key
+* @apicovered                  bundle_add_str, bundle_get_str
+* @passcase                            When bundle_add_str, bundle_get_str are successful.
+* @failcase                            If target API's bundle_add_str or bundle_get_str fails or any precondition or postcondition API fails
+* @precondition                        Bundle must be created
+* @postcondition               Bundle must be released
+*/
+int ITc_bundle_AddStringGetString_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszAddStrMemLog = NULL;   
+       char *pszGetStrMemLog = NULL;   
+       char *pszAddStrSpeedLog = NULL; 
+       char *pszGetStrSpeedLog = NULL; 
+       int nBundleAddStrFailCount = 0;
+       int nBundleGetStrFailCount = 0;
+
+#if MEMORY_CHECK
+       pszAddStrMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       pszGetStrMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));    
+#endif
+#if SPEED_CHECK
+       pszAddStrSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetStrSpeedLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));  
+#endif 
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal = bundle_add_str(g_bundle, (char *)KEY1, (char *)KEY1_VALUE);
+               BundleExecutionDelay(pszAddStrSpeedLog);
+               BundleGetMemStatus(pszAddStrMemLog);
+               if (nRetVal != 0) 
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_add_str failed on iteration %d, error returned = %s for key = %s and value = %s", __LINE__, API_NAMESPACE, nLoopCount, BundleGetError(nRetVal), KEY1, KEY1_VALUE);
+                       nBundleAddStrFailCount++;
+                       continue;
+               }
+               char *tempStrValue = NULL;
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal = bundle_get_str(g_bundle, (char *)KEY1, &tempStrValue);
+               BundleExecutionDelay(pszGetStrSpeedLog);
+               BundleGetMemStatus(pszGetStrMemLog);
+               if (nRetVal != 0 ) 
+               {
+                       if (tempStrValue == NULL)
+                       {
+                       FPRINTF("\\n[Line : %d][%s] bundle_get_str failed on iteration %d, error returned = %s for key = %s", __LINE__, API_NAMESPACE, nLoopCount, BundleGetError(nRetVal), (char *)KEY1);
+                       nBundleGetStrFailCount++;
+                       bundle_del(g_bundle, (char *)KEY1);
+                       continue;
+                       }
+               }
+               bundle_del(g_bundle, (char *)KEY1);     
+       }
+
+       if (nBundleAddStrFailCount > 0 || nBundleGetStrFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] bundle_add_str failed %d times, bundle_get_str failed %d times out of %d times", __LINE__, API_NAMESPACE, nBundleAddStrFailCount, nBundleGetStrFailCount, MAX_COUNT);
+               FREE_MEMORY(pszAddStrSpeedLog,pszGetStrSpeedLog,pszAddStrMemLog);
+               FREE_MEMORY1(pszGetStrMemLog);          
+               return 1;
+       }       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bundle_add_str, pszAddStrSpeedLog);
+       PRINT_SPEED_LOG(bundle_get_str, pszGetStrSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bundle_add_str, pszAddStrMemLog);
+       PRINT_MEMORY_LOG(bundle_get_str, pszGetStrMemLog);
+#endif
+       FREE_MEMORY(pszAddStrSpeedLog,pszGetStrSpeedLog,pszAddStrMemLog);
+       FREE_MEMORY1(pszGetStrMemLog);  
+       return 0;
+}
+
+//& purpose: Get the Type of Key Values added in the Bundle and Deletes added key-value pair from the given bundle. 
+//& type: auto
+/**
+* @testcase                    ITc_bundle_GetTypeofKeyValuesAndDelKeyValues_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Get the Type of Key Values added in the Bundle and Deletes added key-value pair from the given bundle
+* @scenario                            Adds byte and string type key-value pair into a given bundle\n
+*                                              Gets the type of added key-values pairs of the given bundle\n
+*                                              Delete the added key values pair from the given bundle
+* @apicovered                  bundle_get_type, bundle_del
+* @passcase                            Whenbundle_get_type, bundle_del are successful.
+* @failcase                            If target API's bundle_get_type or bundle_del fails or any precondition or postcondition API fails
+* @precondition                        Bundle must be created
+* @postcondition               Bundle must be released
+*/
+int ITc_bundle_GetTypeofKeyValuesAndDelKeyValues_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char szKey[20] = {0};
+       char szValue[20] = {0};
+       char *pszGetTypeMemLog = NULL;
+       char *pszDelMemLog = NULL;
+       char *pszGetTypeSpeedLog = NULL;
+       char *pszDelSpeedLog = NULL;
+       int nBundleGetTypeFailCount = 0;
+       int nBundleDelFailCount = 0;
+
+#if MEMORY_CHECK       
+       pszGetTypeMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       pszDelMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK                
+       pszGetTypeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszDelSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sprintf(szKey, "KEY%d", (nLoopCount+1));
+               sprintf(szValue, "VALUE%d", (nLoopCount+1));
+               bundle_add_str(g_bundle, szKey, szValue);
+
+               char szKeyByte[20] = {0};
+               char szValueByte[20] = {0};
+               sprintf(szKeyByte, "KEY%dB", (nLoopCount+1));
+               sprintf(szValueByte, "VALUE%dB", (nLoopCount+1));
+               bundle_add_byte(g_bundle, szKeyByte, szValueByte, 20);
+
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal =  bundle_get_type(g_bundle, (char *)szKey);
+               BundleExecutionDelay(pszGetTypeSpeedLog);
+               BundleGetMemStatus(pszGetTypeMemLog);           
+               if (nRetVal != BUNDLE_TYPE_STR)
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_get_type failed on iteration %d, as for Key = %s the Actual Get Type = %s is not valid ", __LINE__, API_NAMESPACE, nLoopCount, szKey, BundleGetType(nRetVal));
+                       nBundleGetTypeFailCount++;
+                       bundle_del(g_bundle, (char *)szKey);
+                       bundle_del(g_bundle, (char *)szKeyByte);
+                       continue;               
+               }
+               
+               nRetVal =  bundle_get_type(g_bundle, (char *)szKeyByte);
+               if (nRetVal != BUNDLE_TYPE_BYTE)
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_get_type failed on iteration %d, as for Key = %s the Actual Get Type = %s is not valid ", __LINE__, API_NAMESPACE, nLoopCount, szKeyByte, BundleGetType(nRetVal));
+                       nBundleGetTypeFailCount++;
+                       bundle_del(g_bundle, (char *)szKey);
+                       bundle_del(g_bundle, (char *)szKeyByte);
+                       continue;               
+               }
+               
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal =  bundle_del(g_bundle, (char *)szKey);
+               BundleExecutionDelay(pszDelSpeedLog);
+               BundleGetMemStatus(pszDelMemLog);       
+               if (nRetVal != 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_del failed on iteration %d, for Key = %s with Error-Code = %s", __LINE__, API_NAMESPACE, nLoopCount, szKey, BundleGetError(nRetVal));
+                       nBundleDelFailCount++;
+                       bundle_del(g_bundle, (char *)szKey);
+                       bundle_del(g_bundle, (char *)szKeyByte);
+                       continue;               
+               }
+               
+               nRetVal = bundle_del(g_bundle, (char *)szKeyByte);
+               if (nRetVal != 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_del failed on iteration %d, for Key = %s with Error-Code = %s", __LINE__, API_NAMESPACE, nLoopCount, szKeyByte, BundleGetError(nRetVal));
+                       nBundleDelFailCount++;
+                       bundle_del(g_bundle, (char *)szKeyByte);
+                       continue;               
+               }
+       }
+       
+       if (nBundleGetTypeFailCount > 0 || nBundleDelFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] bundle_get_type failed %d times, bundle_del failed %d times out of %d times", __LINE__, API_NAMESPACE, nBundleGetTypeFailCount, nBundleDelFailCount, MAX_COUNT);
+               FREE_MEMORY(pszGetTypeSpeedLog,pszDelSpeedLog,pszGetTypeMemLog);
+               FREE_MEMORY1(pszDelMemLog);     
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bundle_get_type, pszGetTypeSpeedLog);
+       PRINT_SPEED_LOG(bundle_del, pszDelSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bundle_get_type, pszGetTypeMemLog);
+       PRINT_MEMORY_LOG(bundle_del, pszDelMemLog);
+#endif
+       FREE_MEMORY(pszGetTypeSpeedLog,pszDelSpeedLog,pszGetTypeMemLog);
+       FREE_MEMORY1(pszDelMemLog);     
+       return 0;
+}
+
+  /**
+* @function            KeyValuePairInBundleCallback
+* @description         callback function for each key-value pairs in a given bundle.
+* @parameter           key: Bundle Key, type: type of value of given key, bundle_keyval_t: The key-value pair handle, user_data: User data sent to callback
+* @return                      NA
+*/
+
+void KeyValuePairInBundleCallback(const char *key, const int type, const bundle_keyval_t *kv, void *user_data) 
+{
+       g_BundlestKeyVal = (bundle_keyval_t *)kv;
+#if DEBUG
+       FPRINTF("\\n[Line : %d][%s] reached bundle keyValue pairs callback \n", __LINE__, API_NAMESPACE);
+#endif
+       if (mainloop)
+       {
+               g_main_loop_quit(mainloop);
+       }
+       return;
+}
+  
+//& purpose: Iterates a callback function for each key-value pairs in a given bundle And fetch information inside key-value pair handle.
+//& type: auto
+/**
+* @testcase                    ITc_bundle_KeyValTargetApis_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Creates a Bundle, Add String type key-pair's, Iterates a callback function for key-value pairs added in a given bundle and Destroy the Bundle.
+* @scenario                            Create a Bundle\\n
+*                                              Adds a string type key-value pair into bundle\n
+*                                              Adds a strings array type key-value pair into a given bundle\n
+*                                              Iterates a callback function for each key-value pairs in a given bundle\n
+*                                              Fetch information inside key-value pair handle provided by callback\n
+*                                              Frees given bundle object with key-value pairs in it
+* @apicovered                  bundle_foreach, bundle_keyval_get_type, bundle_keyval_type_is_array, bundle_keyval_get_basic_val, bundle_keyval_get_array_val
+* @passcase                            When bundle_create, bundle_add_str, bundle_keyval_get_type, bundle_keyval_type_is_array, bundle_keyval_get_basic_val, bundle_keyval_get_array_val, bundle_free are successful.
+* @failcase                            If target API's bundle_keyval_get_type or bundle_keyval_type_is_array or bundle_keyval_get_basic_val or bundle_keyval_get_array_val fails or any precondition or postcondition API fails
+* @precondition                        Bundle must be created
+* @postcondition               Bundle must be released
+*/
+int ITc_bundle_KeyValTargetApis_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0, nBundleTimeoutId = 0;
+       char *pszBundleForEachMemLog = NULL;
+       char *pszBundleKeyValTypeisArrayMemLog = NULL;
+       char *pszBundleKeyValGetTypeMemLog = NULL;
+       char *pszBundleKeyValGetBasicValMemLog = NULL;
+       char *pszBundleGetArrayValMemLog = NULL;
+       
+       char *pszBundleForEachSpeedLog = NULL;
+       char *pszBundleKeyValTypeisArraySpeedLog = NULL;
+       char *pszBundleKeyValGetTypeSpeedLog = NULL;
+       char *pszBundleKeyValGetBasicValSpeedLog = NULL;
+       char *pszBundleGetArrayValSpeedLog = NULL;      
+       
+       int nBundleForEachFailCount = 0;
+       int nBundleKeyValTypeisArrayFailCount = 0;
+       int nBundleKeyValGetTypeFailCount = 0;
+       int nBundleKeyValGetBasicValFailCount = 0;
+       int nBundleKeyValGetArrayValFailCount = 0;
+#if MEMORY_CHECK
+       pszBundleForEachMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       pszBundleKeyValTypeisArrayMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       pszBundleKeyValGetBasicValMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       pszBundleGetArrayValMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       pszBundleKeyValGetTypeMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszBundleForEachSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszBundleKeyValTypeisArraySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszBundleKeyValGetTypeSpeedLog =   calloc(TIMELOG * MAX_COUNT , sizeof(char));          
+       pszBundleKeyValGetBasicValSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));        
+       pszBundleGetArrayValSpeedLog =   calloc(TIMELOG * MAX_COUNT , sizeof(char));    
+#endif 
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char szKey[20] = {0};
+               char szValue[20] = {0};
+               g_BundlestKeyVal = NULL;
+               sprintf(szKey, "KEY%d", (nLoopCount+1));
+               sprintf(szValue, "VALUE%d", (nLoopCount+1));
+               nRetVal = bundle_add_str(g_bundle, szKey, szValue);
+               PRINT_RESULT(nRetVal, "bundle_add_str");                
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               bundle_foreach(g_bundle, KeyValuePairInBundleCallback, NULL); 
+               BundleExecutionDelay(pszBundleForEachSpeedLog);
+               BundleGetMemStatus(pszBundleForEachMemLog);     
+               RUN_POLLING_LOOP;
+
+               if (g_BundlestKeyVal == NULL) 
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_foreach failed on iteration %d, with key %s ", __LINE__, API_NAMESPACE, nLoopCount, szKey);
+                       nBundleForEachFailCount++;
+                       bundle_del(g_bundle, szKey);
+                       continue;
+               }
+
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal = bundle_keyval_get_type(g_BundlestKeyVal);
+               BundleExecutionDelay(pszBundleKeyValGetTypeSpeedLog);
+               BundleGetMemStatus(pszBundleKeyValGetTypeMemLog);
+               if (nRetVal < 0) 
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_keyval_get_type failed on iteration %d, with key = %s and error code = %s", __LINE__, API_NAMESPACE, nLoopCount, szKey, BundleGetError(nRetVal));
+                       nBundleKeyValGetTypeFailCount++;
+                       bundle_del(g_bundle, szKey);
+                       g_BundlestKeyVal = NULL;                        
+                       continue;
+               }
+#if DEBUG              
+               FPRINTF("\\n[Line : %d][%s] Type of a key-value pair = %s for key = %s\n", __LINE__, API_NAMESPACE, BundleGetTypePropertyValue(nRetVal), szKey);
+#endif         
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal = bundle_keyval_type_is_array(g_BundlestKeyVal);
+               BundleExecutionDelay(pszBundleKeyValTypeisArraySpeedLog);
+               BundleGetMemStatus(pszBundleKeyValTypeisArrayMemLog);   
+               
+               if (nRetVal != 0) 
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_keyval_type_is_array failed on iteration %d, with key = %s", __LINE__, API_NAMESPACE, nLoopCount, szKey);
+                       nBundleKeyValTypeisArrayFailCount++;
+                       bundle_del(g_bundle, szKey);
+                       g_BundlestKeyVal = NULL;                        
+                       continue;
+               }
+               
+               void *pBasicVal = NULL;
+               size_t nBasicSize = 0;
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal = bundle_keyval_get_basic_val(g_BundlestKeyVal, &pBasicVal, &nBasicSize);
+               BundleExecutionDelay(pszBundleKeyValGetBasicValSpeedLog);
+               BundleGetMemStatus(pszBundleKeyValGetBasicValMemLog);                   
+               if (nRetVal != 0 || pBasicVal == NULL || (strcmp(szValue, (char *)pBasicVal) != 0) || (nBasicSize == 0)) 
+               {
+                       FPRINTF("\\n[Line : %d][%s] The ErrorCode = %s ", __LINE__, API_NAMESPACE, BundleGetError(nRetVal));
+                       FPRINTF("\\n[Line : %d][%s] bundle_keyval_get_basic_val failed on iteration %d, with key = %s as returned basic value = %s and expected returned value = %s", __LINE__, API_NAMESPACE, nLoopCount, szKey, (char *)pBasicVal, szValue);
+                       nBundleKeyValGetBasicValFailCount++;
+                       bundle_del(g_bundle, szKey);
+                       g_BundlestKeyVal = NULL;
+                       pBasicVal = NULL;
+                       nBasicSize = 0;
+                       continue;
+               }
+       
+               pBasicVal = NULL;
+               g_BundlestKeyVal = NULL;
+               nBasicSize = 0;
+               bundle_del(g_bundle, szKey);
+
+               
+               const char *pszStringArray[] = {"abc", "bcd", "cde"};
+               const int nStringArrayLength = 3;
+               bundle_add_str_array(g_bundle, (const char*)szKey, pszStringArray, nStringArrayLength); // add a String array
+               bundle_foreach(g_bundle, KeyValuePairInBundleCallback, NULL); 
+               RUN_POLLING_LOOP;
+               
+               if (g_BundlestKeyVal == NULL) 
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_foreach failed on iteration %d, with key %s ", __LINE__, API_NAMESPACE, nLoopCount, szKey);
+                       nBundleForEachFailCount++;
+                       bundle_del(g_bundle, szKey);
+                       continue;
+               }
+               
+               nRetVal = bundle_keyval_type_is_array(g_BundlestKeyVal);
+               
+               if (nRetVal != 1) 
+               {
+                       FPRINTF("\\n[Line : %d][%s] The ErrorCode = %s ", __LINE__, API_NAMESPACE, BundleGetError(nRetVal));
+                       FPRINTF("\\n[Line : %d][%s] bundle_keyval_type_is_array failed on iteration %d, with key = %s", __LINE__, API_NAMESPACE, nLoopCount, szKey);
+                       nBundleKeyValTypeisArrayFailCount++;
+                       bundle_del(g_bundle, szKey);
+                       g_BundlestKeyVal = NULL;                        
+                       continue;                       
+               }
+               
+               void **pKeyValueArray = NULL;
+               unsigned int nKeyValueLength  = 0;
+               size_t *pKeyValueArrayElemSize = NULL;
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal = bundle_keyval_get_array_val(g_BundlestKeyVal, &pKeyValueArray, &nKeyValueLength, &pKeyValueArrayElemSize);
+               BundleExecutionDelay(pszBundleGetArrayValSpeedLog);
+               BundleGetMemStatus(pszBundleGetArrayValMemLog); 
+               
+               if (nRetVal != 0 || pKeyValueArray == NULL || nKeyValueLength != nStringArrayLength || pKeyValueArrayElemSize == NULL) 
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_keyval_get_array_val Failed with ErrorCode = %s ", __LINE__, API_NAMESPACE, BundleGetError(nRetVal));
+                       FPRINTF("\\n[Line : %d][%s] The Returned Array Length = %d, And Expected Length = %d\n", __LINE__, API_NAMESPACE, nKeyValueLength, nStringArrayLength);
+                       nBundleKeyValGetArrayValFailCount++;
+                       g_BundlestKeyVal = NULL;
+                       pKeyValueArray = NULL;
+                       pKeyValueArrayElemSize = NULL;
+                       bundle_del(g_bundle, szKey);
+                       continue;
+               }
+               //free(pKeyValueArray);
+               //free(pKeyValueArrayElemSize);
+               pKeyValueArray = NULL;
+               pKeyValueArrayElemSize = NULL;
+               g_BundlestKeyVal = NULL;
+               bundle_del(g_bundle, szKey);
+               //bundle_del(g_bundle, (char *)KEY1);
+       }
+       if (nBundleForEachFailCount > 0 || nBundleKeyValGetTypeFailCount > 0    || nBundleKeyValTypeisArrayFailCount > 0 || nBundleKeyValGetBasicValFailCount > 0 || nBundleKeyValGetArrayValFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] bundle_foreach failed %d times,  bundle_keyval_get_type failed %d times, bundle_keyval_type_is_array failed %d times,  bundle_keyval_get_basic_val failed %d times, bundle_keyval_get_arr_val failed %d times out of %d times", __LINE__, API_NAMESPACE, nBundleForEachFailCount, nBundleKeyValGetTypeFailCount, nBundleKeyValTypeisArrayFailCount, nBundleKeyValGetBasicValFailCount, nBundleKeyValGetArrayValFailCount, MAX_COUNT);
+               FREE_MEMORY(pszBundleKeyValTypeisArraySpeedLog, pszBundleKeyValGetTypeSpeedLog, pszBundleKeyValGetBasicValSpeedLog);
+               FREE_MEMORY(pszBundleForEachSpeedLog, pszBundleGetArrayValSpeedLog, pszBundleKeyValTypeisArrayMemLog);  
+               FREE_MEMORY(pszBundleKeyValGetTypeMemLog, pszBundleForEachMemLog, pszBundleKeyValGetBasicValMemLog);
+               FREE_MEMORY1(pszBundleGetArrayValMemLog);               
+               return 1;
+       }       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bundle_keyval_type_is_array, pszBundleKeyValTypeisArraySpeedLog);
+       PRINT_SPEED_LOG(bundle_keyval_get_type, pszBundleKeyValGetTypeSpeedLog);
+       PRINT_SPEED_LOG(bundle_keyval_get_val_str, pszBundleKeyValGetBasicValSpeedLog);
+       PRINT_SPEED_LOG(bundle_foreach, pszBundleForEachSpeedLog);
+       PRINT_SPEED_LOG(bundle_keyval_get_arr_val, pszBundleGetArrayValSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bundle_keyval_type_is_array, pszBundleKeyValTypeisArrayMemLog);
+       PRINT_MEMORY_LOG(bundle_keyval_get_type, pszBundleKeyValGetTypeMemLog);
+       PRINT_MEMORY_LOG(bundle_foreach, pszBundleForEachMemLog);
+       PRINT_MEMORY_LOG(bundle_keyval_get_val_str, pszBundleKeyValGetBasicValMemLog);
+       PRINT_MEMORY_LOG(bundle_keyval_get_arr_val, pszBundleGetArrayValMemLog);        
+#endif
+       FREE_MEMORY(pszBundleKeyValTypeisArraySpeedLog, pszBundleKeyValGetTypeSpeedLog, pszBundleKeyValGetBasicValSpeedLog);
+       FREE_MEMORY(pszBundleForEachSpeedLog, pszBundleGetArrayValSpeedLog, pszBundleKeyValTypeisArrayMemLog);  
+       FREE_MEMORY(pszBundleKeyValGetTypeMemLog, pszBundleForEachMemLog, pszBundleKeyValGetBasicValMemLog);
+       FREE_MEMORY1(pszBundleGetArrayValMemLog);       
+       return 0;
+}
+
+//& purpose: Get the Total Count of Key Value pairs inside given bundle
+//& type: auto
+/**
+* @testcase                    ITc_bundle_get_count_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Get the Total Count of Key Value pairs inside given bundle
+* @scenario                            Create a Bundle\n
+*                                              Adds 3 Times a string type key-value pair into bundle\n
+*                                              Use bundle_get_count to verify the count\n
+*                                              Frees given bundle object with key-value pairs in it
+* @apicovered                  bundle_add_str, bundle_get_count
+* @passcase                            When bundle_get_count or any precondition or postcondition API successful.
+* @failcase                            If target API's bundle_get_count or any precondition or postcondition API fails
+* @precondition                        Bundle must be created
+* @postcondition               Bundle must be released
+*/
+int ITc_bundle_get_count_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszGetCountSpeedLog = NULL;
+       char *pszGetCountMemLog = NULL; 
+       int nBundleGetCountFailCount = 0;
+#if MEMORY_CHECK       
+       pszGetCountMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetCountSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif 
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               char szKey[20] = {0};
+               char szValue[20] = {0};
+               int nCounter = 0;
+               nRetVal = bundle_add_str(g_bundle,(char *)KEY1, (char *)KEY1_VALUE); 
+               PRINT_RESULT(nRetVal, "bundle_add_str");                
+               nCounter++;
+               nRetVal = bundle_add_str(g_bundle,(char *)KEY2, (char *)KEY2_VALUE); 
+               PRINT_RESULT(nRetVal, "bundle_add_str");                        
+               nCounter++;
+               sprintf(szKey, "KEY%d", (nLoopCount+1));
+               sprintf(szValue, "VALUE%d", (nLoopCount+1));
+               nRetVal = bundle_add_str(g_bundle,szKey, szValue); 
+               PRINT_RESULT(nRetVal, "bundle_add_str");                        
+               nCounter++;
+               
+               BundleGetMemAllocation();
+               BundleGetTimeOfDay();
+               nRetVal =  bundle_get_count(g_bundle);
+               BundleExecutionDelay(pszGetCountSpeedLog);
+               BundleGetMemStatus(pszGetCountMemLog);
+               
+               if (nRetVal != nCounter) 
+               {
+                       FPRINTF("\\n[Line : %d][%s] bundle_get_count failed on iteration %d, as Actual Count = %d not equal to expected count = %d", __LINE__, API_NAMESPACE, nLoopCount, nRetVal, nCounter);
+                       nBundleGetCountFailCount++;
+               }
+               bundle_del(g_bundle,(char *)KEY1);
+               bundle_del(g_bundle,(char *)KEY2);
+               bundle_del(g_bundle,szKey);
+       }
+       
+       if (nBundleGetCountFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s] bundle_get_count failed %d times out of %d times", __LINE__, API_NAMESPACE, nBundleGetCountFailCount, MAX_COUNT);
+               FREE_MEMORY(pszGetCountMemLog, pszGetCountSpeedLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(bundle_get_count, pszGetCountSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(bundle_get_count, pszGetCountMemLog);  
+#endif
+       FREE_MEMORY(pszGetCountMemLog, pszGetCountSpeedLog, NULL);
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/bundle/tct-bundle-native.c b/src/itc/bundle/tct-bundle-native.c
new file mode 100755 (executable)
index 0000000..ce0484e
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-bundle-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/bundle/tct-bundle-native.h b/src/itc/bundle/tct-bundle-native.h
new file mode 100755 (executable)
index 0000000..26ceeec
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_BUNDLE_NATIVE_H__
+#define __TCT_BUNDLE_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_bundle_startup(void);
+extern void ITs_bundle_cleanup(void);
+
+extern int ITc_bundle_EncodeDecodeBundle_p(void);
+extern int ITc_bundle_AddGetStringArrayBundle_p(void);
+extern int ITc_bundle_CreateBundleFreeBundle_p(void);
+extern int ITc_bundle_AddByteGetByte_p(void);
+extern int ITc_bundle_AddStringGetString_p(void);
+extern int ITc_bundle_GetTypeofKeyValuesAndDelKeyValues_p(void);
+extern int ITc_bundle_KeyValTargetApis_p(void);
+extern int ITc_bundle_get_count_p(void);
+
+testcase tc_array[] = {
+    {"ITc_bundle_EncodeDecodeBundle_p", ITc_bundle_EncodeDecodeBundle_p, ITs_bundle_startup, ITs_bundle_cleanup},
+    {"ITc_bundle_AddGetStringArrayBundle_p", ITc_bundle_AddGetStringArrayBundle_p, ITs_bundle_startup, ITs_bundle_cleanup},
+    {"ITc_bundle_CreateBundleFreeBundle_p", ITc_bundle_CreateBundleFreeBundle_p, ITs_bundle_startup, ITs_bundle_cleanup},
+    {"ITc_bundle_AddByteGetByte_p", ITc_bundle_AddByteGetByte_p, ITs_bundle_startup, ITs_bundle_cleanup},
+    {"ITc_bundle_AddStringGetString_p", ITc_bundle_AddStringGetString_p, ITs_bundle_startup, ITs_bundle_cleanup},
+    {"ITc_bundle_GetTypeofKeyValuesAndDelKeyValues_p", ITc_bundle_GetTypeofKeyValuesAndDelKeyValues_p, ITs_bundle_startup, ITs_bundle_cleanup},
+    {"ITc_bundle_KeyValTargetApis_p", ITc_bundle_KeyValTargetApis_p, ITs_bundle_startup, ITs_bundle_cleanup},
+    {"ITc_bundle_get_count_p", ITc_bundle_get_count_p, ITs_bundle_startup, ITs_bundle_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_BUNDLE_NATIVE_H__
diff --git a/src/itc/cairo/CMakeLists.txt b/src/itc/cairo/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..3e38f90
--- /dev/null
@@ -0,0 +1,42 @@
+SET(PKG_NAME "cairo")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "cairo")
+SET(TC_SOURCES
+       ITs-cairo-common.c
+       ITs-cairo.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-base-common
+       dlog
+       gthread-2.0
+       glib-2.0
+       gobject-2.0
+       cairo
+       evas
+       elementary
+       capi-system-info
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/cairo/ITs-cairo-common.c b/src/itc/cairo/ITs-cairo-common.c
new file mode 100755 (executable)
index 0000000..41855c6
--- /dev/null
@@ -0,0 +1,218 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-cairo-common.h"
+
+/** @addtogroup itc-cairo
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function definitions here
+/**
+ * @function           CairoGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* CairoGetError(int nRet)
+{
+       char *pszErrorVal = NULL;
+       switch ( nRet )
+       {
+               case CAIRO_STATUS_SUCCESS:
+                       pszErrorVal = "CAIRO_STATUS_SUCCESS";
+                       break;
+               case CAIRO_STATUS_NO_MEMORY:
+                       pszErrorVal = "CAIRO_STATUS_NO_MEMORY";
+                       break;
+               case CAIRO_STATUS_INVALID_RESTORE:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_RESTORE";
+                       break;
+               case CAIRO_STATUS_INVALID_POP_GROUP:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_POP_GROUP";
+                       break;
+               case CAIRO_STATUS_NO_CURRENT_POINT:
+                       pszErrorVal = "CAIRO_STATUS_NO_CURRENT_POINT";
+                       break;
+               case CAIRO_STATUS_INVALID_MATRIX:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_MATRIX";
+                       break;
+               case CAIRO_STATUS_INVALID_STATUS:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_STATUS";
+                       break;
+               case CAIRO_STATUS_NULL_POINTER:
+                       pszErrorVal = "CAIRO_STATUS_NULL_POINTER";
+                       break;
+               case CAIRO_STATUS_INVALID_STRING:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_STRING";
+                       break;
+               case CAIRO_STATUS_INVALID_PATH_DATA:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_PATH_DATA";
+                       break;
+               case CAIRO_STATUS_READ_ERROR:
+                       pszErrorVal = "CAIRO_STATUS_READ_ERROR";
+                       break;
+               case CAIRO_STATUS_WRITE_ERROR:
+                       pszErrorVal = "CAIRO_STATUS_WRITE_ERROR";
+                       break;
+               case CAIRO_STATUS_SURFACE_FINISHED:
+                       pszErrorVal = "CAIRO_STATUS_SURFACE_FINISHED";
+                       break;
+               case CAIRO_STATUS_SURFACE_TYPE_MISMATCH:
+                       pszErrorVal = "CAIRO_STATUS_SURFACE_TYPE_MISMATCH";
+                       break;
+               case CAIRO_STATUS_PATTERN_TYPE_MISMATCH:
+                       pszErrorVal = "CAIRO_STATUS_PATTERN_TYPE_MISMATCH";
+                       break;
+               case CAIRO_STATUS_INVALID_CONTENT:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_CONTENT";
+                       break;
+               case CAIRO_STATUS_INVALID_FORMAT:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_FORMAT";
+                       break;
+               case CAIRO_STATUS_INVALID_VISUAL:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_VISUAL";
+                       break;
+               case CAIRO_STATUS_FILE_NOT_FOUND:
+                       pszErrorVal = "CAIRO_STATUS_FILE_NOT_FOUND";
+                       break;
+               case CAIRO_STATUS_INVALID_DASH:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_DASH";
+                       break;
+               case CAIRO_STATUS_INVALID_DSC_COMMENT:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_DSC_COMMENT";
+                       break;
+               case CAIRO_STATUS_INVALID_INDEX:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_INDEX";
+                       break;
+               case CAIRO_STATUS_CLIP_NOT_REPRESENTABLE:
+                       pszErrorVal = "CAIRO_STATUS_CLIP_NOT_REPRESENTABLE";
+                       break;
+               case CAIRO_STATUS_TEMP_FILE_ERROR:
+                       pszErrorVal = "CAIRO_STATUS_TEMP_FILE_ERROR";
+                       break;
+               case CAIRO_STATUS_INVALID_STRIDE:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_STRIDE";
+                       break;
+               case CAIRO_STATUS_FONT_TYPE_MISMATCH:
+                       pszErrorVal = "CAIRO_STATUS_FONT_TYPE_MISMATCH";
+                       break;
+               case CAIRO_STATUS_USER_FONT_IMMUTABLE:
+                       pszErrorVal = "CAIRO_STATUS_USER_FONT_IMMUTABLE";
+                       break;
+               case CAIRO_STATUS_USER_FONT_ERROR:
+                       pszErrorVal = "CAIRO_STATUS_USER_FONT_ERROR";
+                       break;
+               case CAIRO_STATUS_NEGATIVE_COUNT:
+                       pszErrorVal = "CAIRO_STATUS_NEGATIVE_COUNT";
+                       break;
+               case CAIRO_STATUS_INVALID_CLUSTERS:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_CLUSTERS";
+                       break;
+               case CAIRO_STATUS_INVALID_SLANT:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_SLANT";
+                       break;
+               case CAIRO_STATUS_INVALID_WEIGHT:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_WEIGHT";
+                       break;
+               case CAIRO_STATUS_INVALID_SIZE:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_SIZE";
+                       break;
+               case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED:
+                       pszErrorVal = "CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED";
+                       break;
+               case CAIRO_STATUS_DEVICE_TYPE_MISMATCH:
+                       pszErrorVal = "CAIRO_STATUS_DEVICE_TYPE_MISMATCH";
+                       break;
+               case CAIRO_STATUS_DEVICE_ERROR:
+                       pszErrorVal = "CAIRO_STATUS_DEVICE_ERROR";
+                       break;
+               case CAIRO_STATUS_INVALID_MESH_CONSTRUCTION:
+                       pszErrorVal = "CAIRO_STATUS_INVALID_MESH_CONSTRUCTION";
+                       break;
+               case CAIRO_STATUS_DEVICE_FINISHED:
+                       pszErrorVal = "CAIRO_STATUS_DEVICE_FINISHED";
+                       break;
+               case CAIRO_STATUS_LAST_STATUS:
+                       pszErrorVal = "CAIRO_STATUS_LAST_STATUS";
+                       break;
+               default:
+                       pszErrorVal = "Unknown Error";
+                       break;
+       }
+
+       return pszErrorVal;
+}
+
+/**
+ * @function           system_info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* SystemInfoGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Cannot find key in model config file " ; break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR  : szErrorVal = "Error - An input/output error occurred when read value from model config file " ; break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY   : szErrorVal = "Error - Out of memory  " ; break;                        
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+
+/**
+ * @function           CheckSystemInfoFeatureSupported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey : key value
+ * @return                     true if supported else false
+ */
+bool CheckSystemInfoFeatureSupported(char* pszKey)
+{
+       if(NULL == pszKey)
+       {
+               FPRINTF("\\n[Line : %d][NFC_ITc] Null key value passed to function : CheckSystemInfoFeatureSupported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][NFC_ITc] system_info_get_platform_bool returned (error = %s) for (key = %s)",__LINE__, SystemInfoGetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if(false == bValue)
+       {
+               FPRINTF("\\n[Line : %d][NFC_ITc] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][NFC_ITc] system_info_get_platform_bool returned Supported status feature for (key = %s)",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/cairo/ITs-cairo-common.h b/src/itc/cairo/ITs-cairo-common.h
new file mode 100755 (executable)
index 0000000..613f1ff
--- /dev/null
@@ -0,0 +1,91 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_CAIRO_COMMON_H_
+#define _ITS_CAIRO_COMMON_H_
+
+#include <cairo.h>
+#include <cairo-gl.h>
+#include <cairo-evas-gl.h>
+#include <Evas_GL.h>
+#include <Elementary.h>
+#include <stdbool.h>
+#include <system_info.h>
+#include <tizen.h>
+
+/** @addtogroup itc-cairo
+*  @ingroup itc
+*  @{
+*/
+
+//Add test package related includes here
+#define API_NAMESPACE          "ITC_Cairo"
+#define WIDTH                          300
+#define HEIGHT                         300
+#define CAIRO_FEATURE          "http://tizen.org/feature/opengles.version.2_0"
+
+FILE *g_fpLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line No : %d][%s]Starting test : %s\n", __LINE__,API_NAMESPACE, __FUNCTION__);\
+       if (!g_nEvas_state) {\
+               FPRINTF("\\n[Line No : %d][%s] Precondition failed in startup \\n", __LINE__,API_NAMESPACE);\
+               return 1;\
+       }\
+       CHECK_FEATURE;\
+}
+
+#define PRINT_RESULT(nRetVal, API, bIsSupported) {\
+       if(!bIsSupported) {\
+               if (nRetVal == TIZEN_ERROR_NOT_SUPPORTED)\
+               {\
+                       FPRINTF( "\\n [Line : %d] [%s]  %s passed\\n",__LINE__, API_NAMESPACE, API);\
+               }\
+               else {\
+                       FPRINTF( "\\n [Line : %d] [%s] %s failed. Mismatch in value. Expected = TIZEN_ERROR_NOT_SUPPORTED, returned = %s \\n",__LINE__, API_NAMESPACE, API, CairoGetError(nRetVal));\
+                       return 1;\
+               }\
+       }\
+       if (nRetVal == CAIRO_STATUS_SUCCESS)\
+       {\
+               FPRINTF( "\\n [Line : %d] [%s]  %s passed\\n",__LINE__, API_NAMESPACE, API);\
+       }\
+       else \
+       {\
+               FPRINTF( "\\n [Line : %d] [%s] %s failed, error returned = %s \\n",__LINE__, API_NAMESPACE, API, CairoGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define CHECK_FEATURE {\
+       bIsSupported = CheckSystemInfoFeatureSupported(CAIRO_FEATURE);\
+       if (!bIsSupported) {\
+               FPRINTF("\\n[Line No : %d][%s] Feature  : %s is not supported \\n", __LINE__,API_NAMESPACE, CAIRO_FEATURE);\
+       }\
+}
+
+//Add helper function declarations here
+char* CairoGetError(int nRet);
+bool CheckSystemInfoFeatureSupported(char* pszKey);
+char* SystemInfoGetError(int nRet);
+
+/** @} */
+#endif  //_ITS_CAIRO_COMMON_H_
diff --git a/src/itc/cairo/ITs-cairo.c b/src/itc/cairo/ITs-cairo.c
new file mode 100755 (executable)
index 0000000..1d6dd67
--- /dev/null
@@ -0,0 +1,291 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-cairo-common.h"
+
+/** @addtogroup itc-cairo
+*  @ingroup itc
+*  @{
+*/
+
+Evas_Object *g_pWin;
+Evas_GL *g_pEvas_gl;
+Evas_GL_Config *g_pEvas_gl_config;
+Evas_GL_Surface *g_pEvas_gl_surface;
+Evas_GL_Context *g_pEvas_gl_context;
+cairo_device_t *g_pCairo_device = NULL;
+cairo_surface_t *g_pSurface = NULL;
+
+int g_nEvas_state = 1;
+
+//& set: Cairo
+
+/**
+ * @function           ITs_cairo_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_cairo_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       elm_init(0,NULL);
+       elm_config_accel_preference_set("opengl");
+       
+       g_pWin = elm_win_add(NULL, "test cairo", ELM_WIN_BASIC);
+       if(g_pWin == NULL)
+       {
+               g_nEvas_state = 0;
+       }                       
+       else
+       {
+               elm_win_title_set(g_pWin, "test cairo");
+               evas_object_show(g_pWin);
+               
+               g_pEvas_gl = evas_gl_new(evas_object_evas_get(g_pWin));
+               if(g_pEvas_gl == NULL) 
+               {
+                       g_nEvas_state = 0;
+               }               
+               
+               g_pEvas_gl_config = evas_gl_config_new();
+               if(g_pEvas_gl_config == NULL)
+               {
+                       g_nEvas_state = 0;      
+               }                       
+               else 
+               {
+                       g_pEvas_gl_config->color_format = EVAS_GL_RGBA_8888;
+               }                       
+
+               if(g_nEvas_state)
+               {
+                       g_pEvas_gl_surface = evas_gl_surface_create(g_pEvas_gl, g_pEvas_gl_config, WIDTH, HEIGHT);
+                       if(g_pEvas_gl_surface == NULL) 
+                       {
+                               g_nEvas_state = 0;
+                       }                       
+                       
+                       g_pEvas_gl_context = evas_gl_context_create(g_pEvas_gl, NULL);
+                       if(g_pEvas_gl_context == NULL)
+                       {
+                               g_nEvas_state = 0;
+                       }                       
+                       setenv("CAIRO_GL_COMPOSITOR", "msaa", 1);
+               }
+       }       
+       return;
+}
+
+/**
+ * @function           ITs_cairo_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_cairo_cleanup(void)
+{
+       if(g_pSurface)
+       {
+               cairo_surface_destroy (g_pSurface);
+       }
+       
+       if(g_pCairo_device)     
+       {       
+               cairo_device_destroy(g_pCairo_device);
+       }
+
+       if(g_pEvas_gl_surface)  
+       {       
+               evas_gl_surface_destroy(g_pEvas_gl, g_pEvas_gl_surface);
+       }
+       
+       if(g_pEvas_gl_context)  
+       {       
+               evas_gl_context_destroy(g_pEvas_gl, g_pEvas_gl_context);
+       }
+       
+       if(g_pEvas_gl_config)   
+       {       
+               evas_gl_config_free(g_pEvas_gl_config);
+       }
+       
+       if(g_pEvas_gl)          
+       {       
+               evas_gl_free(g_pEvas_gl);
+       }
+
+       if(g_pWin)                      
+       {       
+               evas_object_del(g_pWin);
+       }
+       
+       elm_shutdown();
+
+       return;
+}
+
+/** @addtogroup itc-cairo-testcases
+*  @brief              Integration testcases for module cairo
+*  @ingroup    itc-cairo
+*  @{
+*/
+
+//& purpose: Creates and returns a new cairo_device structure for interface to underlying rendering system. 
+//& type: auto 
+/**
+* @testcase                    ITs_cairo_evas_gl_device_create_p
+* @since_tizen                         2.4
+* @type                                auto
+* @description                 Creates and returns a new cairo_device structure.
+* @scenario                            Creates and returns a new cairo_device.
+* @apicovered                  cairo_evas_gl_device_create                                     
+* @passcase                            When cairo_evas_gl_device_create are execute successful and return 0
+* @failcase                            If target api cairo_evas_gl_device_create are return negative number.
+* @precondition                        NA
+* @postcondition               NA
+ * 
+*/
+int ITs_cairo_evas_gl_device_create_p(void)
+{
+       bool bIsSupported = false;
+       START_TEST;
+       int nRetVal = -1;
+       
+       g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create (g_pEvas_gl, g_pEvas_gl_context);
+       nRetVal = cairo_device_status(g_pCairo_device);
+       PRINT_RESULT(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
+       return 0;
+}
+
+//& purpose: Creates and returns a new cairo_surface structure for representing Evas_GL_Surface object that cairo can render to.
+//& type: auto 
+/**
+* @testcase                    ITc_cairo_gl_surface_create_for_evas_gl_p
+* @since_tizen                         2.4
+* @type                                auto
+* @description                 Creates and returns a new cairo_surface structure.
+* @scenario                            Creates and returns a new cairo_surface.
+* @apicovered                  cairo_gl_surface_create_for_evas_gl                                     
+* @passcase                            When cairo_gl_surface_create_for_evas_gl are execute successful and return 0
+* @failcase                            If target api cairo_gl_surface_create_for_evas_gl are return negative number.
+* @precondition                        cairo_evas_gl_device_create
+* @postcondition               NA
+ * 
+*/
+int ITc_cairo_gl_surface_create_for_evas_gl_p(void)
+{
+       bool bIsSupported = false;
+       START_TEST;
+       int nRetVal = -1;
+       
+       g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create (g_pEvas_gl, g_pEvas_gl_context);
+       nRetVal = cairo_device_status(g_pCairo_device);
+       PRINT_RESULT(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
+       
+       g_pSurface = (cairo_surface_t *)cairo_gl_surface_create_for_evas_gl(g_pCairo_device, g_pEvas_gl_surface, g_pEvas_gl_config, WIDTH, HEIGHT);
+       nRetVal = cairo_surface_status(g_pSurface);
+       PRINT_RESULT(nRetVal, "cairo_gl_surface_create_for_evas_gl", bIsSupported);
+       
+       return 0;
+}
+
+//& purpose: Returns the underlying EvasGL object used to create cairo device object.
+//& type: auto 
+/**
+* @testcase                    ITs_cairo_evas_gl_device_get_gl_p
+* @since_tizen                         2.4
+* @type                                auto
+* @description                 Returns the underlying EvasGL object used to create cairo device object.
+* @scenario                            Get underlying EvasGL object.
+* @apicovered                  cairo_evas_gl_device_get_gl                                     
+* @passcase                            When cairo_evas_gl_device_get_gl executes successfully.
+* @failcase                            If target api cairo_evas_gl_device_get_gl returns NULL.
+* @precondition                        cairo_evas_gl_device_create
+* @postcondition               NA
+ * 
+*/
+int ITs_cairo_evas_gl_device_get_gl_p(void)
+{
+       bool bIsSupported = false;
+       START_TEST;
+       int nRetVal = -1;
+       Evas_GL *pRetEvasGl = NULL;
+
+       g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create (g_pEvas_gl, g_pEvas_gl_context);
+       nRetVal = cairo_device_status(g_pCairo_device);
+       PRINT_RESULT(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
+
+       pRetEvasGl = cairo_evas_gl_device_get_gl(g_pCairo_device);
+       if (pRetEvasGl == NULL) 
+       {
+               FPRINTF("[Line : %d][%s] cairo_evas_gl_device_get_gl failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, CairoGetError(nRetVal), nRetVal);
+               return 1;
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] cairo_evas_gl_device_get_gl passed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       return 0;
+}
+
+//& purpose: Returns the underlying Evasl_GL_Context object used to create cairo device object.
+//& type: auto 
+/**
+* @testcase                    ITs_cairo_evas_gl_device_get_context_p
+* @since_tizen                         2.4
+* @type                                auto
+* @description                 Returns the underlying Evasl_GL_Context object used to create cairo device object.
+* @scenario                            Get underlying Evasl_GL_Context object.
+* @apicovered                  cairo_evas_gl_device_get_context                                        
+* @passcase                            When cairo_evas_gl_device_get_context executes successfully.
+* @failcase                            If target api cairo_evas_gl_device_get_context returns NULL.
+* @precondition                        cairo_evas_gl_device_create
+* @postcondition               NA
+ * 
+*/
+int ITs_cairo_evas_gl_device_get_context_p(void)
+{
+       bool bIsSupported = false;
+       START_TEST;
+       int nRetVal = -1;
+       Evas_GL_Context *pRetEvasGlContext;
+
+       g_pCairo_device = (cairo_device_t *)cairo_evas_gl_device_create (g_pEvas_gl, g_pEvas_gl_context);
+       nRetVal = cairo_device_status(g_pCairo_device);
+       PRINT_RESULT(nRetVal, "cairo_evas_gl_device_create", bIsSupported);
+
+       pRetEvasGlContext = cairo_evas_gl_device_get_context(g_pCairo_device);
+       if (pRetEvasGlContext == NULL) 
+       {
+               FPRINTF("[Line : %d][%s] cairo_evas_gl_device_get_context failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, CairoGetError(nRetVal), nRetVal);
+               return 1;
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] cairo_evas_gl_device_get_context passed\\n", __LINE__, API_NAMESPACE);
+       }
+       
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/cairo/tct-cairo-native.c b/src/itc/cairo/tct-cairo-native.c
new file mode 100755 (executable)
index 0000000..cfe1e2a
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-cairo-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/cairo/tct-cairo-native.h b/src/itc/cairo/tct-cairo-native.h
new file mode 100755 (executable)
index 0000000..c0c5f78
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CAIRO_NATIVE_H__
+#define __TCT_CAIRO_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_cairo_startup(void);
+extern void ITs_cairo_cleanup(void);
+
+extern int ITs_cairo_evas_gl_device_create_p(void);
+extern int ITc_cairo_gl_surface_create_for_evas_gl_p(void);
+extern int ITs_cairo_evas_gl_device_get_gl_p(void);
+extern int ITs_cairo_evas_gl_device_get_context_p(void);
+
+testcase tc_array[] = {
+    {"ITs_cairo_evas_gl_device_create_p", ITs_cairo_evas_gl_device_create_p, ITs_cairo_startup, ITs_cairo_cleanup},
+    {"ITc_cairo_gl_surface_create_for_evas_gl_p", ITc_cairo_gl_surface_create_for_evas_gl_p, ITs_cairo_startup, ITs_cairo_cleanup},
+    {"ITs_cairo_evas_gl_device_get_gl_p", ITs_cairo_evas_gl_device_get_gl_p, ITs_cairo_startup, ITs_cairo_cleanup},
+    {"ITs_cairo_evas_gl_device_get_context_p", ITs_cairo_evas_gl_device_get_context_p, ITs_cairo_startup, ITs_cairo_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CAIRO_NATIVE_H__
diff --git a/src/itc/camera/CMakeLists.txt b/src/itc/camera/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..419c2a5
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "camera")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-camera")
+SET(TC_SOURCES
+       ITs-camera-common.c
+       ITs-camera.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       bundle
+       capi-appfw-application
+       capi-system-info
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/camera/ITs-camera-common.c b/src/itc/camera/ITs-camera-common.c
new file mode 100755 (executable)
index 0000000..49cedd1
--- /dev/null
@@ -0,0 +1,270 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-camera-common.h"
+
+/** @addtogroup itc-camera
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stCameraStartTime;
+extern struct mallinfo g_stCameraMemInfo;
+
+/**
+* @function            CameraGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* CameraGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case CAMERA_ERROR_INVALID_PARAMETER : szErrorVal = "CAMERA_ERROR_INVALID_PARAMETER" ; break; 
+               case CAMERA_ERROR_OUT_OF_MEMORY : szErrorVal = "CAMERA_ERROR_OUT_OF_MEMORY" ; break; 
+               case CAMERA_ERROR_SOUND_POLICY : szErrorVal = "CAMERA_ERROR_SOUND_POLICY" ; break; 
+               case CAMERA_ERROR_INVALID_OPERATION : szErrorVal = "CAMERA_ERROR_INVALID_OPERATION" ; break;
+               case CAMERA_ERROR_INVALID_STATE : szErrorVal = "CAMERA_ERROR_INVALID_STATE" ; break;
+               case CAMERA_ERROR_DEVICE : szErrorVal = "CAMERA_ERROR_DEVICE" ; break;
+               case CAMERA_ERROR_SECURITY_RESTRICTED : szErrorVal = "CAMERA_ERROR_SECURITY_RESTRICTED" ; break;
+               case CAMERA_ERROR_DEVICE_BUSY : szErrorVal = "CAMERA_ERROR_DEVICE_BUSY" ; break;
+               case CAMERA_ERROR_DEVICE_NOT_FOUND : szErrorVal = "CAMERA_ERROR_DEVICE_NOT_FOUND" ; break;
+               case CAMERA_ERROR_SOUND_POLICY_BY_CALL : szErrorVal = "CAMERA_ERROR_SOUND_POLICY_BY_CALL" ; break;
+               case CAMERA_ERROR_SOUND_POLICY_BY_ALARM : szErrorVal = "CAMERA_ERROR_SOUND_POLICY_BY_ALARM" ; break;
+               case CAMERA_ERROR_ESD  : szErrorVal = "CAMERA_ERROR_ESD" ; break;
+               case CAMERA_ERROR_NOT_SUPPORTED : szErrorVal = "CAMERA_ERROR_NOT_SUPPORTED" ; break;
+               case CAMERA_ERROR_PERMISSION_DENIED : szErrorVal = "CAMERA_ERROR_PERMISSION_DENIED" ; break;
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+ * @function           CameraGetFlip
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     flip string
+ */
+char* CameraGetFlip(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch(nRet)
+       {
+               case CAMERA_FLIP_NONE : szErrorVal = "CAMERA_FLIP_NONE" ; break;
+               case CAMERA_FLIP_HORIZONTAL : szErrorVal = "CAMERA_FLIP_HORIZONTAL" ; break;
+               case CAMERA_FLIP_VERTICAL : szErrorVal = "CAMERA_FLIP_VERTICAL" ; break;
+               case CAMERA_FLIP_BOTH : szErrorVal = "CAMERA_FLIP_BOTH" ; break;
+               default : szErrorVal = "Unknown error" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           CameraGetMode
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     mode string
+ */
+char* CameraGetMode(int nMode)
+{
+       char *szErrorVal = NULL;
+       switch(nMode)
+       {
+               case CAMERA_DISPLAY_MODE_LETTER_BOX : szErrorVal = "CAMERA_DISPLAY_MODE_LETTER_BOX" ; break;
+               case CAMERA_DISPLAY_MODE_ORIGIN_SIZE : szErrorVal = "CAMERA_DISPLAY_MODE_ORIGIN_SIZE" ; break;
+               case CAMERA_DISPLAY_MODE_FULL : szErrorVal = "CAMERA_DISPLAY_MODE_FULL" ; break;
+               case CAMERA_DISPLAY_MODE_CROPPED_FULL : szErrorVal = "CAMERA_DISPLAY_MODE_CROPPED_FULL" ; break;
+               default : szErrorVal = "Unknown error" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           CameraGetRotation
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     rotation string
+ */
+char* CameraGetRotation(int nRotation)
+{
+       char *szErrorVal = NULL;
+       switch(nRotation)
+       {
+               case CAMERA_ROTATION_NONE : szErrorVal = "CAMERA_ROTATION_NONE" ; break;
+               case CAMERA_ROTATION_90 : szErrorVal = "CAMERA_ROTATION_90" ; break;
+               case CAMERA_ROTATION_180 : szErrorVal = "CAMERA_ROTATION_180" ; break;
+               case CAMERA_ROTATION_270 : szErrorVal = "CAMERA_ROTATION_270" ; break;
+               default : szErrorVal = "Unknown error" ; break;
+       }
+       return szErrorVal;
+}
+
+
+/**
+* @function                    CameraGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void CameraGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stCameraMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stCameraMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stCameraMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    CameraGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void CameraGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stCameraMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void CameraExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec - g_stCameraStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stCameraStartTime.tv_usec;
+                       
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+               
+#endif
+}
+
+/**
+ * @function           SystemGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stCameraStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void CameraGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stCameraStartTime, NULL);
+#endif
+}
+
+/**
+ * @function           Camera_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Camera_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] Null key value passed to function : Camera_Check_System_Info_Feature_Supported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool(pszKey, &bValue);
+
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] system_info_get_platform_bool returned (error = %s) for (key = %s)",__LINE__, Camera_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] system_info_get_platform_bool returned Supported status feature for (key = %s)",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           Camera_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Camera_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Cannot find key in model config file " ; break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR  : szErrorVal = "Error - An input/output error occurred when read value from model config file " ; break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY   : szErrorVal = "Error - Out of memory  " ; break;
+                       
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+/** @} */ 
\ No newline at end of file
diff --git a/src/itc/camera/ITs-camera-common.h b/src/itc/camera/ITs-camera-common.h
new file mode 100755 (executable)
index 0000000..dfb7200
--- /dev/null
@@ -0,0 +1,207 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_CAMERA_COMMON_H_
+#define _ITS_CAMERA_COMMON_H_
+
+#include "assert.h"
+#include "camera.h"
+
+#include <system_info.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/** @addtogroup itc-camera
+*  @ingroup itc
+*  @{
+*/
+
+#define LOG                                                    100
+#define WIDTH                                          10
+#define HEIGHT                                         10
+#define TIMELOG                                                10
+#define MEMLOG                                         10
+#define MICROSECONDS_PER_SECOND                1000000
+#define TIMEOUT_CB                                     5000
+#define IMAGECOUNT                                     5
+#define IMAGE_INTERVAL                         10
+#define CAMERA_FEATURE                         "http://tizen.org/feature/camera"
+#define CAMERA_FEATURE_BACK                    "http://tizen.org/feature/camera.back"
+#define CAMERA_FEATURE_FRONT           "http://tizen.org/feature/camera.front"
+#define CAMERA_FEATURE_BACK_FLASH      "http://tizen.org/feature/camera.back.flash"
+#define CAMERA_FEATURE_FRONT_FLASH     "http://tizen.org/feature/camera.front.flash"
+
+FILE *g_fpLog;
+
+typedef struct speedmemory
+{
+       char *pszMemLog1;
+       char *pszMemLog2;
+       char *pszAPI1SpeedLog;
+       char *pszAPI2SpeedLog;
+} CameraSpeedMemoryLog;
+
+typedef struct Resolution{
+       int nWidth;
+       int nHeight;
+} CameraResolution;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][Camera_ITc] Starting test : %s\\n", __LINE__, __FUNCTION__);\
+       if (g_bSkipExecutionWithPass == true)\
+       {\
+               FPRINTF("[Line : %d][Camera_ITc] Required feature of camera_create is not supported. So leaving test", __LINE__);\
+               return 0;\
+       }\
+       if ( g_bSkipExecutionWithFail == true )\
+       {\
+               FPRINTF("[Line : %d][Camera_ITc] camera_create returned not supported, although feature supported as seen from model_config.xml So leaving test", __LINE__);\
+               return 1;\
+       }\
+       if ( !g_bCameraCreation )\
+       {\
+               FPRINTF("\\n[Line : %d][Camera_ITc]Precondition of camera create failed so leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == CAMERA_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][Camera_ITc]%s passed\\n", __LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("\\n[Line : %d][Camera_ITc]%s failed, error returned = %s \\n", __LINE__, API, CameraGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if(strlen(memLog) > 0) \
+       {  \
+               memLog[strlen(memLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][Camera_ITc]%s_MemoryLeakStatus - %s\\n", __LINE__, #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][Camera_ITc]%s_TimeInMicrosec- %s\\n", __LINE__, #api, speedLog);\
+       }
+       
+#define CAMERA_INITIALISE_MEM_LOGS {\
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       stCameraSpeedMemoryLog.pszMemLog2 = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }
+       
+#define CAMERA_INITIALISE_SPEED_LOGS {\
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       stCameraSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }
+       
+#define CAMERA_DEINITIALISE_LOGS {\
+               if ( stCameraSpeedMemoryLog.pszMemLog1 != NULL)\
+               {\
+                       free(stCameraSpeedMemoryLog.pszMemLog1);\
+                       stCameraSpeedMemoryLog.pszMemLog1 = NULL;\
+               }\
+               if ( stCameraSpeedMemoryLog.pszMemLog2 != NULL)\
+               {\
+                       free(stCameraSpeedMemoryLog.pszMemLog2);\
+                       stCameraSpeedMemoryLog.pszMemLog2 = NULL;\
+               }\
+               if ( stCameraSpeedMemoryLog.pszAPI1SpeedLog != NULL)\
+               {\
+                       free (stCameraSpeedMemoryLog.pszAPI1SpeedLog);\
+                       stCameraSpeedMemoryLog.pszAPI1SpeedLog = NULL;\
+               }\
+               if ( stCameraSpeedMemoryLog.pszAPI2SpeedLog != NULL)\
+               {\
+                       free (stCameraSpeedMemoryLog.pszAPI2SpeedLog);\
+                       stCameraSpeedMemoryLog.pszAPI2SpeedLog = NULL;\
+               }\
+       }
+       
+#define RUN_POLLING_LOOP {\
+       g_pCameraMainLoop = g_main_loop_new(NULL, false);\
+       nCameraTimeoutId = g_timeout_add(TIMEOUT_CB, CameraTimeout, g_pCameraMainLoop);\
+       g_main_loop_run(g_pCameraMainLoop);\
+       g_source_remove(nCameraTimeoutId);\
+       g_pCameraMainLoop = NULL;\
+       }
+
+#define CHECK_UNSUPPORTED_ERROR_RETURN(bSupported, szApi)\
+       if ( !bSupported )\
+       {\
+               if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )\
+               {\
+                       FPRINTF("[Line : %d][Camera_ITc] %s returned %s for unsupported feature", __LINE__, szApi, CameraGetError(nRetVal));\
+                       return 1;\
+               }\
+               else\
+               {\
+                       FPRINTF("[Line : %d][Camera_ITc] %s API call correctly returned %s error for unsupported feature", __LINE__, szApi, CameraGetError(nRetVal));\
+                       return 0;\
+               }\
+       }\
+       
+#define CHECK_UNSUPPORTED_ERROR_CONTINUE(bSupported, szApi, nErrorCount)\
+       if ( !bSupported )\
+       {\
+               if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )\
+               {\
+                       FPRINTF("[Line : %d][Camera_ITc] %s returned %s for unsupported feature", __LINE__, szApi, CameraGetError(nRetVal));\
+                       nErrorCount++;\
+               }\
+               else\
+               {\
+                       FPRINTF("[Line : %d][Camera_ITc] %s API call correctly returned %s error for unsupported feature", __LINE__, szApi, CameraGetError(nRetVal));\
+               }\
+               continue;\
+       }\
+       
+char* CameraGetError(int nRet);
+char* CameraGetFlip(int nRet);
+char* CameraGetMode(int nMode);
+char* CameraGetRotation(int nRotation);
+void CameraGetMemAllocation();
+void CameraExecutionDelay(char *pszAPITime);
+void CameraGetTimeOfDay();
+void CameraGetMemStatus(char *pszAPIMemory);
+
+// Check the supported feature for the given key value
+bool Camera_Check_System_Info_Feature_Supported(char* pszKey);
+
+// Maps error enums to string values
+char* Camera_System_Info_GetError(int nRet);
+
+/** @} */
+#endif  //_ITS_CAMERA_COMMON_H_
diff --git a/src/itc/camera/ITs-camera.c b/src/itc/camera/ITs-camera.c
new file mode 100755 (executable)
index 0000000..8955f53
--- /dev/null
@@ -0,0 +1,8402 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-camera-common.h"
+
+/** @addtogroup itc-camera
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Camera
+
+camera_h g_camera;
+camera_device_e g_eCameraDev = CAMERA_DEVICE_CAMERA0;
+bool g_bCameraCreation = false;
+//bool g_bFeatureSupported = false;
+bool g_bCallbackHit = false;
+bool g_bCameraCaptureStarted = false;
+bool g_bCameraCaptureStopped = false;
+struct timeval g_stCameraStartTime;
+struct mallinfo g_stCameraMemInfo;
+static GMainLoop *g_pCameraMainLoop = NULL;
+
+bool g_bFeatureCamera = false;
+bool g_bFeatureCameraBack = false;
+bool g_bFeatureCameraFront = false;
+bool g_bFeatureCameraBackFlash = false;
+bool g_bFeatureCameraFrontFlash = false;
+bool g_bCameraReadFeatureStatusDone = false;
+
+bool g_bSkipExecutionWithPass = false;
+bool g_bSkipExecutionWithFail = false;
+
+camera_pixel_format_e g_eCamPixFmt;
+int g_nCapResWidth;
+int g_nCapResHeight;
+
+/**
+* @function            ITs_camera_startup
+* @description         Called before each test, created camera handle
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_camera_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       
+       if ( false == g_bCameraReadFeatureStatusDone )
+       {
+               g_bFeatureCamera = Camera_Check_System_Info_Feature_Supported(CAMERA_FEATURE);
+               g_bFeatureCameraBack = Camera_Check_System_Info_Feature_Supported(CAMERA_FEATURE_BACK);
+               g_bFeatureCameraFront = Camera_Check_System_Info_Feature_Supported(CAMERA_FEATURE_FRONT);
+               g_bFeatureCameraBackFlash = Camera_Check_System_Info_Feature_Supported(CAMERA_FEATURE_BACK_FLASH);
+               g_bFeatureCameraFrontFlash = Camera_Check_System_Info_Feature_Supported(CAMERA_FEATURE_FRONT_FLASH);
+               
+               g_bCameraReadFeatureStatusDone = true;
+       }
+       
+       /** camera_create required atleast one feature "http://tizen.org/feature/camera.back" or
+       "http://tizen.org/feature/camera.front" so checking accordingly, As we have used camera_create 
+       in startup, if this is not supported we will skip execution for TC, as this is precondition for all*/
+       
+       
+       int nRet = camera_create(g_eCameraDev, &g_camera);
+       if ( (g_bFeatureCameraBack == false) && (g_bFeatureCameraFront == false) )
+       {
+               if(nRet == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       /* The api required atleast one feature "http://tizen.org/feature/camera.back" || "http://tizen.org/feature/camera.front"
+                       But both camera back and camera front features are not supported, 
+                       also the api returned CAMERA_ERROR_NOT_SUPPORTED, hence we can conclude that feature not supported and skip execution
+                       with verdict as pass tc as feature could not be checked*/
+                       
+                       g_bSkipExecutionWithPass = true;
+                       return;
+               }
+               
+               /* The api required atleast one feature "http://tizen.org/feature/camera.back" || "http://tizen.org/feature/camera.front"
+               both camera back and camera front features are not supported, but the api did not return CAMERA_ERROR_NOT_SUPPORTED,
+               we can conclude that feature values in model_config does not match with API return type*/
+               
+               g_bSkipExecutionWithFail = true;
+               return;
+       }
+
+       if ( nRet != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] Unable to create camera, error returned = %s \\n", __LINE__, CameraGetError(nRet));
+               g_bCameraCreation = false;
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] Camera created successfully \\n", __LINE__);
+               g_bCameraCreation = true;
+       }
+       return;
+}
+
+/**
+* @function            ITs_camera_cleanup
+* @description         Called after each test, destroys camera handle
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_camera_cleanup(void)
+{
+       int nRet = camera_destroy (g_camera);
+       if ( nRet != 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_destroy failed, error returned = %s \\n", __LINE__, CameraGetError(nRet));
+       }else
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] Camera destroyed successfully \\n", __LINE__);
+       }
+       return;
+}
+
+/**
+ * @function           CameraTimeout
+ * @description                Called if some callback is not invoked for a particular CameraTimeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */ 
+gboolean CameraTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               g_main_loop_unref(pMainLoop);
+               pMainLoop = NULL;
+       }
+       FPRINTF("\\n[Line : %d][Camera_ITc] Callback CameraTimeout \\n", __LINE__);
+       return false;
+}
+
+/**
+ * @function           CameraPreviewCB
+ * @description                Callback function which is invoked when startpreview is called
+ * @parameter          camera_preview_data_s *frame : preview frame, void *user_data : user data to be passed
+ * @return                     NA
+ */
+static void CameraPreviewCB(camera_preview_data_s *frame, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached preview callback \\n", __LINE__);
+#endif
+       usleep(5000);
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+ * @function           CameraFaceDetectionCB
+ * @description                callback to check start and stop face detection
+ * @parameter          camera_detected_face_s *faces , count ,  user data to be passed
+ * @return                     NA
+ */
+static void CameraFaceDetectionCB(camera_detected_face_s *faces, int count, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] inside camera face detection callback \\n", __LINE__);
+#endif
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+ * @function           CameraCapturingCB
+ * @description                Callback function which is invoked when capture starts
+ * @parameter          camera_image_data_s *image, camera_image_data_s *postview, camera_image_data_s *thumbnail, void *user_data
+ * @return                     NA
+ */
+static void CameraCapturingCB(camera_image_data_s *image, camera_image_data_s *postview, camera_image_data_s *thumbnail, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached capturing started callback \\n", __LINE__);
+#endif
+       
+       g_bCameraCaptureStarted = true;
+       return;
+}
+
+/**
+* @function            CameraCapturingCompletedCB
+* @description         Callback function which is invoked when capture completed
+* @parameter           void *user_data : user data to be passed
+* @return                      NA
+*/
+static void CameraCapturingCompletedCB(void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached capturing completed callback \\n", __LINE__);
+#endif
+       
+       usleep(5000);
+       g_bCameraCaptureStopped = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+* @function            CameraStateChangedCB
+* @description         Callback function which is invoked when capture completed
+* @parameter           void *user_data : user data to be passed
+* @return                      NA
+*/
+void CameraStateChangedCB(camera_state_e previous, camera_state_e current, bool by_policy, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera state changed callback \\n", __LINE__);
+#endif
+       
+       usleep(5000);
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+ }
+
+ /**
+ * @function           CameraAttrSupportedAfModeCB
+ * @description                Callback function which is invoked when camera_attr_foreach_supported_af_mode is called
+ * @parameter          camera_attr_af_mode_e mode, void *user_data : user data to be passed
+ * @return                     false: skip next value, true: check next value
+ */ 
+bool CameraAttrSupportedAfModeCB(camera_attr_af_mode_e mode, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported af mode callback, supported mode = %d \\n", __LINE__, mode);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if ( user_data != NULL )
+       {
+               *( (camera_attr_af_mode_e *)user_data) = mode;
+       }
+
+       return true;
+ }
+  /**
+ * @function           CameraAttrSupportedEffectCB
+ * @description                Callback function which is invoked when camera_attr_foreach_supported_effect is called
+ * @parameter          camera_attr_af_mode_e mode, void *user_data : user data to be passed
+ * @return                     false: skip next value, true: check next value
+ */ 
+bool CameraAttrSupportedEffectCB(camera_attr_effect_mode_e effect, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported effect callback, supported effect = %d \\n", __LINE__, effect);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if ( user_data != NULL )
+       {
+               *( (camera_attr_effect_mode_e *)user_data) = effect;
+       }
+
+       return true;
+}
+
+
+ /**
+ * @function           CameraAttrSupportedExposureModeCB
+ * @description                Callback function which is invoked when camera_attr_foreach_supported_exposure_mode is called
+ * @parameter          camera_attr_af_mode_e mode, void *user_data : user data to be passed
+ * @return                     false: skip next value, true: check next value
+ */ 
+static bool CameraAttrSupportedExposureModeCB(camera_attr_exposure_mode_e mode, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported exposure mode callback, supported mode = %d \\n", __LINE__, mode);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if ( user_data != NULL )
+       {
+               *( (camera_attr_exposure_mode_e *)user_data) = mode;
+       }
+       return false;
+}
+
+
+/**
+* @function            CameraAttrSupportedFlashModeCB
+* @description         Callback function which is invoked when camera_attr_foreach_supported_flash_mode is called
+* @parameter           camera_attr_flash_mode_e mode, void *user_data : user data to be passed
+* @return                      false: skip next value, true: check next value
+*/ 
+static bool CameraAttrSupportedFlashModeCB(camera_attr_flash_mode_e mode, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported flash mode callback, supported mode = %d \\n", __LINE__, mode);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if ( user_data != NULL )
+       {
+               *( (camera_attr_flash_mode_e *)user_data) = mode;
+       }
+
+       return true;
+}
+
+/**
+* @function            CameraAttrSupportedFpsCB
+* @description         Callback function which is invoked when camera_attr_foreach_supported_fps is called
+* @parameter           camera_attr_fps_e mode, void *user_data : user data to be passed
+* @return                      false: skip next value, true: check next value
+*/ 
+static bool CameraAttrSupportedFpsCB(camera_attr_fps_e mode, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported fps callback, supported mode = %d \\n", __LINE__, mode);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if ( user_data != NULL )
+       {
+               *( (camera_attr_fps_e *)user_data) = mode;
+       }
+       return false;
+}
+
+/**
+* @function            CameraAttrSupportedIsoCB
+* @description         Callback function which is invoked when camera_attr_foreach_supported_iso is called
+* @parameter           camera_attr_iso_e mode, void *user_data : user data to be passed
+* @return                      false: skip next value, true: check next value
+*/ 
+static bool CameraAttrSupportedIsoCB(camera_attr_iso_e mode, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported iso callback, supported mode = %d \\n", __LINE__, mode);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if ( user_data != NULL )
+       {
+               *( (camera_attr_iso_e *)user_data) = mode;
+       }
+       return false;
+}
+/**
+* @function            CameraAttrSupportedSceneModeCB
+* @description         Callback function which is invoked when camera_attr_foreach_supported_scene_mode is called
+* @parameter           camera_attr_scene_mode_e mode, void *user_data : user data to be passed
+* @return                      false: skip next value, true: check next value
+*/ 
+static bool CameraAttrSupportedSceneModeCB(camera_attr_scene_mode_e mode, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported scene mode callback, supported mode = %d \\n", __LINE__, mode);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if ( user_data != NULL )
+       {
+               *( (camera_attr_scene_mode_e *)user_data) = mode;
+       }
+       return false;
+}
+
+/**
+* @function            CameraAttrSupportedWhiteBalanceCB
+* @description         Callback function which is invoked when camera_attr_foreach_supported_whitebalance is called
+* @parameter           camera_attr_whitebalance_e mode, void *user_data : user data to be passed
+* @return                      NA
+*/ 
+static bool CameraAttrSupportedWhiteBalanceCB(camera_attr_whitebalance_e  mode, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported white balance callback, supported mode = %d \\n", __LINE__, mode);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if ( user_data != NULL )
+       {
+               *((camera_attr_whitebalance_e* ) user_data ) = mode;
+       }
+
+       return true;
+}
+
+/**
+* @function            CameraAttrSupportedCaptureFormatCB
+* @description         Callback function which is invoked when camera_foreach_supported_capture_format is called
+* @parameter           camera_pixel_format_e mode, void *user_data : user data to be passed
+* @return                      false: skip next value, true: check next value
+*/ 
+static bool CameraAttrSupportedCaptureFormatCB(camera_pixel_format_e  mode, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported capture format callback, supported mode = %d \\n", __LINE__, mode);
+#endif
+       usleep(5000);
+       g_bCallbackHit = true;
+       g_eCamPixFmt = mode;
+       
+       if ( user_data == NULL )
+       {
+               FPRINTF("[Line : %d][Camera_ITc] user data is null \\n", __LINE__);
+       }
+
+       if ( user_data != NULL )
+       {
+               *( (camera_pixel_format_e *)user_data) = mode;
+       }
+
+       return true;
+}
+
+/**
+* @function            CameraAttrSupportedStreamFlipCB
+* @description         Callback function which is invoked when camera_attr_foreach_supported_stream_flip  is called
+* @parameter           camera_flip_e flip, void *user_data : user data to be passed
+* @return                      false: skip next value, true: check next value
+*/ 
+static bool CameraAttrSupportedStreamFlipCB(camera_flip_e flip, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported stream flip callback, supported mode = %d \\n", __LINE__, flip);
+#endif
+       usleep(5000);
+       g_bCallbackHit = true;
+       if ( user_data != NULL )
+       {
+               *( (camera_flip_e *)user_data) = flip;
+       }
+       return true;
+}
+
+/**
+* @function            CameraAttrSupportedStreamRotationCB
+* @description         Callback function which is invoked when camera_attr_foreach_supported_stream_rotation is called
+* @parameter           camera_rotation_e rotation, void *user_data : user data to be passed
+* @return                      false: skip next value, true: check next value
+*/ 
+static bool CameraAttrSupportedStreamRotationCB(camera_rotation_e rotation, void *user_data)
+ {
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported stream rotation callback, supported mode = %d \\n", __LINE__, rotation);
+#endif
+       usleep(5000);
+       g_bCallbackHit = true;
+       if ( user_data != NULL )
+       {
+               *( (camera_rotation_e *)user_data) = rotation;
+       }
+
+       return true;
+}
+
+/**
+* @function            CameraAttrSupportedTheaterModeCB
+* @description         Callback function which is invoked when camera_attr_foreach_supported_theater_mode is called
+* @parameter           camera_attr_theater_mode_e mode, void *user_data : user data to be passed
+* @return                      false: skip next value, true: check next value
+*/ 
+static bool CameraAttrSupportedTheaterModeCB(camera_attr_theater_mode_e mode, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported theater mode callback, supported mode = %d \\n", __LINE__, mode);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if ( user_data != NULL )
+       {
+               *( (camera_attr_theater_mode_e *)user_data) = mode;
+       }
+
+       return true;
+}
+
+/**
+* @function            CameraAttrSupportedCaptureResolutionCB
+* @description         Callback function which is invoked when camera_foreach_supported_capture_resolution is called
+* @parameter           int width, int height, void *user_data : user data to be passed
+* @return                      false: skip next value, true: check next value
+*/ 
+static bool CameraAttrSupportedCaptureResolutionCB(int width, int height, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported capture resolution callback, supported width = %d, height = %d \\n", __LINE__, width, height);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       g_nCapResWidth = width;
+       g_nCapResHeight = height;
+       CameraResolution *pstCamRes = NULL;
+
+       if ( user_data == NULL )
+       {
+               FPRINTF("[Line : %d][Camera_ITc] user data is null \\n", __LINE__);
+       }
+
+       if ( user_data != NULL )
+       {
+               pstCamRes = (CameraResolution *)user_data;
+               pstCamRes->nWidth = width;
+               pstCamRes->nHeight = height;
+       }
+       
+       return false;
+}
+
+/**
+* @function            CameraAttrSupportedPreviewResolutionCB
+* @description         Callback function which is invoked when camera_foreach_supported_preview_resolution is called
+* @parameter           int width, int height, void *user_data : user data to be passed
+* @return                      false: skip next value, true: check next value
+*/ 
+static bool CameraAttrSupportedPreviewResolutionCB(int width, int height, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported preview resolution callback, supported width = %d, height = %d \\n", __LINE__, width, height);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       g_nCapResWidth = width;
+       g_nCapResHeight = height;
+       CameraResolution *pstCamRes = NULL;
+
+       if ( user_data == NULL )
+       {
+               FPRINTF("[Line : %d][Camera_ITc] user data is null \\n", __LINE__);
+       }
+
+       if ( user_data != NULL )
+       {
+               pstCamRes = (CameraResolution *)user_data;
+               pstCamRes->nWidth = width;
+               pstCamRes->nHeight = height;
+       }
+       
+       return false;
+}
+
+/**
+* @function            CameraAttrSupportedPreviewFormatCB
+* @description         Callback function which is invoked when camera_foreach_supported_preview_format is called
+* @parameter           camera_pixel_format_e format, void *user_data : user data to be passed
+* @return                      false: skip next value, true: check next value
+*/ 
+static bool CameraAttrSupportedPreviewFormatCB(camera_pixel_format_e  format, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported preview format callback, supported format = %d \\n", __LINE__, format);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       g_eCamPixFmt = format;
+       camera_pixel_format_e *peFormat = NULL;
+
+       if ( user_data == NULL )
+       {
+               FPRINTF("[Line : %d][Camera_ITc] user data is null \\n", __LINE__);
+       }
+
+       if ( user_data != NULL )
+       {
+               peFormat = (camera_pixel_format_e *)user_data;
+               *peFormat = format;
+       }
+
+       return false;
+}
+
+/**
+* @function            CameraAttrHdrProgressCB
+* @description         Callback function which is invoked when camera_start_capture is called
+* @parameter           int nPercent, void *user_data
+* @return                      NA
+*/ 
+void CameraAttrHdrProgressCB(int nPercent, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached camera supported preview format callback, percent = %d \\n", __LINE__, nPercent);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+}
+
+
+/**
+ * @function           CameraShutterSoundCB
+ * @description                Callback function which is invoked when shutter sound is played
+ * @parameter          void *user_data : user data to be passed
+ * @return                     NA
+ */
+void CameraShutterSoundCB(void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached shutter sound callback \\n", __LINE__);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+ * @function           CameraShutterSoundCompletedCB
+ * @description                Callback function which is invoked when shutter sound is played
+ * @parameter          void *user_data : user data to be passed
+ * @return                     NA
+ */
+void CameraShutterSoundCompletedCB(void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached shutter sound callback \\n", __LINE__);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+ * @function           CameraErrorCB
+ * @description                Callback function which is invoked when shutter sound is played
+ * @parameter          camera_error_e error : error occurred, camera_state_e current_state : state of camera, void *user_data: user data to be passed
+ * @return                     NA
+ */
+void CameraErrorCB(camera_error_e error, camera_state_e current_state, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached shutter sound callback \\n", __LINE__);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+ * @function           CameraFocusChangedCB
+ * @description                Callback function which is invoked when focus changes
+ * @parameter          camera_error_e error : error occurred, camera_state_e current_state : state of camera, void *user_data: user data to be passed
+ * @return                     NA
+ */
+void CameraFocusChangedCB(camera_focus_state_e state, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached shutter sound callback \\n", __LINE__);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+ * @function           CameraLowLightStateChangedCB
+ * @description                Callback function which is invoked when low light state changes
+ * @parameter          camera_error_e error : error occurred, camera_state_e current_state : state of camera, void *user_data: user data to be passed
+ * @return                     NA
+ */
+/*void CameraLowLightStateChangedCB(camera_light_state_e state, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached shutter sound callback \\n", __LINE__);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+}*/
+
+/**
+ * @function           CameraInterruptedCB
+ * @description                Callback function which is invoked when camera is interrupted by policy
+ * @parameter          camera_error_e error : error occurred, camera_state_e current_state : state of camera, void *user_data: user data to be passed
+ * @return                     NA
+ */
+void CameraInterruptedCB(camera_policy_e policy, camera_state_e previous, camera_state_e current, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached shutter sound callback \\n", __LINE__);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+ * @function           CameraMediaPacketCB
+ * @description                Call to register for notification about delivering media packet when every preview frame is displayed
+ * @parameter          media_packet_h pkt : media packet occurred, void *user_data: user data to be passed
+ * @return                     NA
+ */
+void CameraMediaPacketCB(media_packet_h pkt, void *user_data)
+{
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached media packet callback \\n", __LINE__);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+ * @function           CameraFaceDetectedCallback
+ * @description                Callback function which is invoked when face detected
+ * @parameter          void *user_data: user data to be passed
+ * @return                     NA
+ */
+/*void CameraFaceDetectedCallback(camera_detected_face_s *faces, int count, void *user_data)
+{
+       int nFaceIdDetected = -1;
+       if ( faces != NULL )
+       {
+               if ( user_data != NULL )
+               {
+                       *(int *)(user_data) = faces->id;
+                       nFaceIdDetected = faces->id;
+               }
+       }
+#if DEBUG
+       FPRINTF("\\n[Line : %d][Camera_ITc] reached shutter sound callback , Face id detected = %d \\n", __LINE__, nFaceIdDetected);
+#endif
+
+       usleep(5000);
+       g_bCallbackHit = true;
+       if (g_pCameraMainLoop)
+       {
+               g_main_loop_quit(g_pCameraMainLoop);
+               g_main_loop_unref(g_pCameraMainLoop);
+               g_pCameraMainLoop = NULL;
+       }
+       
+       return;
+}*/
+
+/** @addtogroup itc-camera-testcases
+*  @brief              Integration testcases for module camera
+*  @ingroup    itc-camera
+*  @{
+*/
+
+//& purpose: Enables antishake and checks if it is enabled. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_enable_is_enabled_antishake_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 enables antishake and checks if it is enabled.
+* @scenario                            Check if antishake is supported\n
+*                                              Enable antishake\n
+*                                              check if antishake is enabled
+* @apicovered                  camera_attr_enable_anti_shake, camera_attr_is_enabled_anti_shake
+* @passcase                            When camera_attr_enable_anti_shake and  camera_attr_is_enabled_anti_shake are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_enable_anti_shake or camera_attr_is_enabled_anti_shake fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_enable_is_enabled_antishake_p(void)
+{
+       START_TEST;
+       bool bSetVal = true;
+       bool bGetVal;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       bool bRet = camera_attr_is_supported_anti_shake(g_camera );
+       if ( g_bFeatureCamera == false )
+       {
+               if(bRet == true)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] According to feature value from model_config, anti_shake should not be supported, but API says supported \\n", __LINE__);
+                       return 1;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] anti shake not supported on the device\\n", __LINE__);
+               return 0;
+       }
+       else
+       {
+               if(bRet == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] anti shake not supported on the device\\n", __LINE__);
+                       return 0;
+               }
+       }
+       
+               
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_enable_anti_shake( g_camera, bSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_enable_anti_shake failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_is_enabled_anti_shake( g_camera, &bGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_is_enabled_anti_shake failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (bSetVal != bGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_enable_anti_shake failed %d times, camera_attr_is_enabled_anti_shake failed %d times, enable/is enable values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_enable_anti_shake, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_is_enabled_anti_shake, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_enable_anti_shake, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_is_enabled_anti_shake, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Sets and gets exposure value. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_exposure_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets exposure value
+* @scenario                            Set exposure\n
+*                                              Get exposure
+* @apicovered                  camera_attr_set_exposure, camera_attr_get_exposure
+* @passcase                            When camera_attr_set_exposure and  camera_attr_get_exposure are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_exposure or camera_attr_get_exposure fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_exposure_p(void)
+{
+       START_TEST;
+       int nSetVal, nGetVal;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       int nMinVal = 0, nMaxVal = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+               
+       nRetVal = camera_attr_get_exposure_range(g_camera, &nMinVal, &nMaxVal);
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_get_exposure_range");
+       
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] exposure not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_contrast_range failed , error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+       
+       nSetVal = (nMinVal + nMaxVal)/2;
+       FPRINTF("\\n[Line : %d] set val = %d\\n", __LINE__, nSetVal);
+       if (nMinVal > nMaxVal)
+       {
+               // If Max value is less than Min value, it indicates exposure not supported
+               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] exposure not supported on the device \\n", __LINE__);
+               return 0;
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_exposure( g_camera, nSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_exposure failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_exposure( g_camera, &nGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_exposure failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (nSetVal != nGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_exposure failed %d times, camera_attr_get_exposure failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_exposure, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_exposure, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_exposure, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_exposure, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets tag image description. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_tag_image_description_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets tag image description
+* @scenario                            Set tag image description\n
+*                                              Get tag image description
+* @apicovered                  camera_attr_set_tag_image_description, camera_attr_get_tag_image_description
+* @passcase                            When camera_attr_set_tag_image_description and  camera_attr_get_tag_image_description are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_tag_image_description or camera_attr_get_tag_image_description fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_tag_image_description_p(void)
+{
+       START_TEST;
+       char szSetDescription[LOG]= {0};
+       char *pszGetDescription = NULL;
+       strncpy(szSetDescription, "Core API TCT-test", LOG);
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_tag_image_description( g_camera, szSetDescription);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_set_tag_image_description", nSetFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_tag_image_description failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_tag_image_description( g_camera, &pszGetDescription);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_tag_image_description failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (strcmp(szSetDescription, pszGetDescription) != 0)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_tag_image_description failed %d times, camera_attr_get_tag_image_description failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_tag_image_description, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_tag_image_description, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_tag_image_description, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_tag_image_description, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets preview fps. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_preview_fps_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets preview fps
+* @scenario                            Set preview fps\n
+*                                              Get preview fps
+* @apicovered                  camera_attr_set_preview_fps, camera_attr_get_preview_fps
+* @passcase                            When camera_attr_set_preview_fps and  camera_attr_get_preview_fps are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_preview_fps or camera_attr_get_preview_fps fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_preview_fps_p(void)
+{
+       START_TEST;
+       camera_attr_fps_e eSetPreviewsFps /*= CAMERA_ATTR_FPS_AUTO*/;
+       camera_attr_fps_e eGetPreviewsFps;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       g_bCallbackHit = false;
+       nRetVal =  camera_attr_foreach_supported_fps( g_camera,  CameraAttrSupportedFpsCB , (void*)(&eSetPreviewsFps));
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_fps");
+       
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] fps not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc]camera_attr_foreach_supported_fps failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;       
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_preview_fps( g_camera, eSetPreviewsFps);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_preview_fps failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_preview_fps( g_camera, &eGetPreviewsFps);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_preview_fps failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetPreviewsFps != eGetPreviewsFps)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_preview_fps failed %d times, camera_attr_get_preview_fps failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_preview_fps, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_preview_fps, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_preview_fps, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_preview_fps, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Sets and gets af mode. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_af_mode_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets af mode
+* @scenario                            Set af mode\n
+*                                              Get af mode
+* @apicovered                  camera_attr_set_af_mode, camera_attr_get_af_mode
+* @passcase                            When camera_attr_set_af_mode and  camera_attr_get_af_mode are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_af_mode or camera_attr_get_af_mode fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_af_mode_p(void)
+{
+       START_TEST;
+       camera_attr_af_mode_e eSetAFmode;
+       camera_attr_af_mode_e eGetAFmode;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       g_bCallbackHit = false;
+       nRetVal = camera_attr_foreach_supported_af_mode(g_camera, CameraAttrSupportedAfModeCB, (void*)(&eSetAFmode));
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_af_mode");
+       
+       if ( nRetVal != CAMERA_ERROR_NONE )
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] auto focus not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_af_mode failed, error returned = %s\\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+
+       if (eSetAFmode == CAMERA_ATTR_AF_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] for each only gave CAMERA_ATTR_AF_NONE, which means not supported on the device \\n", __LINE__);
+               return 0;
+       }
+
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_af_mode( g_camera, eSetAFmode);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_af_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_af_mode passed on iteration %d \\n", __LINE__, nLoopCount);
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_af_mode( g_camera, &eGetAFmode);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               
+               CameraGetMemStatus(stCameraSpeedMemoryLog. pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_af_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetAFmode != eGetAFmode)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_af_mode failed %d times, camera_attr_get_af_mode failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_af_mode, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_af_mode, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_af_mode, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_af_mode, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Sets and gets brightness. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_brightness_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets auto white balance lock
+* @scenario                            Set brightness\n
+*                                              Get brightness
+* @apicovered                  camera_attr_set_brightness, camera_attr_get_brightness
+* @passcase                            When camera_attr_set_brightness and  camera_attr_get_brightness are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_brightness or camera_attr_get_brightness fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_brightness_p(void)
+{
+       START_TEST;
+       int nSetValue = 1;
+       int nGetValue;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       int nMinVal = 0, nMaxVal = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       
+       nRetVal = camera_attr_get_brightness_range(g_camera, &nMinVal, &nMaxVal);
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_get_brightness_range");
+       
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] brightness not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_brightness_range failed , error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+       
+       //PRINT_RESULT(nRetVal, "camera_attr_get_brightness_range");
+       
+       nSetValue = (nMinVal + nMaxVal)/2;
+       FPRINTF("\\n[Line : %d] set val = %d\\n", __LINE__, nSetValue);
+       if (nMinVal > nMaxVal)
+       {
+               // If Max value is less than Min value, it indicates exposure not supported
+               FPRINTF("\\n[Line : %d][Camera_ITc]Although feature http://tizen.org/feature/camera is true, min val is less than max val, which means brightness not supported device \\n", __LINE__);
+               return 1;
+       }
+       
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_brightness( g_camera, nSetValue);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_brightness failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_brightness( g_camera, &nGetValue);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_brightness failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (nSetValue != nGetValue)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_brightness failed %d times, camera_attr_get_brightness failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_brightness, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_brightness, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_brightness, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_brightness, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Find contrast range, then set and get contrast. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_contrast_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Find contrast range, then set and get contrast
+* @scenario                            Find contrast range\n
+*                                              Set contrast\n
+*                                              Get contrast
+* @apicovered                  camera_attr_get_contrast_range, camera_attr_set_contrast, camera_attr_get_contrast
+* @passcase                            When camera_attr_get_contrast_range, camera_attr_set_contrast and  camera_attr_get_contrast are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_get_contrast_range, camera_attr_set_contrast or camera_attr_get_contrast fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_contrast_p(void)
+{
+       START_TEST;
+       int nSetVal;
+       int nGetVal;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nRetVal = -1, nLoopCount = 0;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       int nContrastMin = 0, nContrastMax = 0;
+       
+       nRetVal = camera_attr_get_contrast_range( g_camera, &nContrastMin, &nContrastMax);
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_get_contrast_range");
+       
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] contrast not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_contrast_range failed , error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+
+       nSetVal = (nContrastMin + nContrastMax ) / 2;
+               
+       if (nContrastMin > nContrastMax)
+       {
+               /** If Max value is less than Min value, it indicates zoom not supported*/
+               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] contrast not supported on the device \\n", __LINE__);
+               return 0;
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_contrast( g_camera, nSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc]camera_attr_set_contrast failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_contrast( g_camera, &nGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_contrast failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (nSetVal != nGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_contrast failed %d times, camera_attr_get_contrast failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_contrast, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_contrast, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_contrast, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_contrast, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Sets and gets effect. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_effect_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets effect
+* @scenario                            Set effect\n
+*                                              Get effect
+* @apicovered                  camera_attr_set_effect, camera_attr_get_effect                                          
+* @passcase                            When camera_attr_set_effect and  camera_attr_get_effect are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_effect or camera_attr_get_effect fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_effect_p(void)
+{
+       START_TEST;
+       camera_attr_effect_mode_e eSetVal;
+       camera_attr_effect_mode_e eGetVal;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       g_bCallbackHit = false;
+       nRetVal =  camera_attr_foreach_supported_effect( g_camera,  CameraAttrSupportedEffectCB , (void*)(&eSetVal));
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_effect");       
+       
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] effect not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc]camera_attr_foreach_supported_effect failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;       
+       }
+       else if (g_bCallbackHit == false)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] [Not Supported] Effect not supported \\n", __LINE__);
+               return 0;
+       }
+       if (eSetVal == CAMERA_ATTR_EFFECT_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] for each only gave CAMERA_ATTR_EFFECT_NONE, which means not supported on the device \\n", __LINE__);
+               return 0;
+       }
+               
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_effect( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_effect failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_effect( g_camera, &eGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_effect failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != eGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+               
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_effect failed %d times, camera_attr_get_effect failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_effect, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_effect, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_effect, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_effect, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets exposure mode. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_exposure_mode_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets exposure mode
+* @scenario                            Set exposure mode\n
+*                                              Get exposure mode
+* @apicovered                  camera_attr_set_exposure_mode, camera_attr_get_exposure_mode                                            
+* @passcase                            When camera_attr_set_exposure_mode and  camera_attr_get_exposure_mode are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_exposure_mode or camera_attr_get_exposure_mode fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_exposure_mode_p(void)
+{
+       START_TEST;
+       camera_attr_exposure_mode_e eSetVal;
+       camera_attr_exposure_mode_e eGetVal;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       g_bCallbackHit = false;
+       nRetVal =  camera_attr_foreach_supported_exposure_mode( g_camera,  CameraAttrSupportedExposureModeCB , (void*)(&eSetVal)); 
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_exposure_mode");
+       
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] exposure mode not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc]camera_attr_foreach_supported_exposure_mode  failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;       
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_exposure_mode( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_exposure_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_exposure_mode( g_camera, &eGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_exposure_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != eGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_exposure_mode failed %d times, camera_attr_get_exposure_mode failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_exposure_mode, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_exposure_mode, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_exposure_mode, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_exposure_mode, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Sets, gets and remove geotag. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_remove_geotag_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets exposure value
+* @scenario                            Set geotag\n
+*                                              Get geotag\n
+*                                              Remove geotag
+* @apicovered                  camera_attr_set_geotag, camera_attr_get_geotag                                          
+* @passcase                            When camera_attr_set_geotag and  camera_attr_get_geotag are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_geotag or camera_attr_get_geotag fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_remove_geotag_p(void)
+{
+       START_TEST;
+       double dSetLat = 20.0, dSetLong = 20.0, dSetAlt = 20.0;
+       double dGetLat, dGetLong, dGetAlt;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0, nRemoveFailCount = 0;
+       char *pszRemoveGeoTagSpeedLog = NULL, *pszRemoveGeoTagMemLog = NULL;
+       
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+       pszRemoveGeoTagSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+       pszRemoveGeoTagMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_geotag( g_camera, dSetLat, dSetLong, dSetAlt);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_set_geotag", nSetFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_geotag failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_geotag( g_camera, &dGetLat, &dGetLong, &dGetAlt);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);           
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_geotag failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+                               
+               else if (dSetLat != dGetLat || dSetLong != dGetLong || dSetAlt != dGetAlt)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_remove_geotag( g_camera);
+               CameraExecutionDelay(pszRemoveGeoTagSpeedLog);
+               CameraGetMemStatus(pszRemoveGeoTagMemLog);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_geotag failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nRemoveFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 || nRemoveFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_geotag failed %d times, camera_attr_get_geotag failed %d times, set/get values mismatch %d times, camera_attr_remove_geotag failed %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, nRemoveFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_geotag, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_geotag, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_geotag, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_geotag, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets hdr mode. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_hdr_mode_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets hdr mode
+* @scenario                            Set hdr mode\n
+*                                              Get hdr mode
+* @apicovered                  camera_attr_set_hdr_mode, camera_attr_get_hdr_mode                                              
+* @passcase                            When camera_attr_set_hdr_mode and  camera_attr_get_hdr_mode are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_hdr_mode or camera_attr_get_hdr_mode fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_hdr_mode_p(void)
+{
+       START_TEST;
+       camera_attr_hdr_mode_e  eSetVal = CAMERA_ATTR_HDR_MODE_ENABLE;
+       camera_attr_hdr_mode_e  eGetVal;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       bool bRet = camera_attr_is_supported_hdr_capture(g_camera );
+       if ( g_bFeatureCamera == false )
+       {
+               if(bRet == true)
+               {
+                       /** camera_attr_is_supported_anti_shake required feature http://tizen.org/feature/camera, whose value is true, but is_supported still returns false*/
+                       FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] According to feature value from model_config, it should be supported, but API says not supported \\n", __LINE__);
+                       return 1;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] hdr capture not supported on the device\\n", __LINE__);
+               return 0;
+       }
+       else 
+       {
+               if(bRet == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] hdr capture not supported on the device\\n", __LINE__);
+                       return 0;
+               }
+       }
+       
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_hdr_mode( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_hdr_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_hdr_mode( g_camera, &eGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_hdr_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != eGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_hdr_mode failed %d times, camera_attr_get_hdr_mode failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_hdr_mode, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_hdr_mode, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_hdr_mode, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_hdr_mode, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets iso. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_iso_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets iso
+* @scenario                            Set iso\n
+*                                              Get iso
+* @apicovered                  camera_attr_set_iso, camera_attr_get_iso                                                
+* @passcase                            When camera_attr_set_iso and  camera_attr_get_iso are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_iso or camera_attr_get_iso fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_iso_p(void)
+{
+       START_TEST;
+       camera_attr_iso_e  eSetVal /*= CAMERA_ATTR_ISO_AUTO*/;
+       camera_attr_iso_e  eGetVal;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       g_bCallbackHit = false;
+       nRetVal =  camera_attr_foreach_supported_iso( g_camera,  CameraAttrSupportedIsoCB , (void*)(&eSetVal)); 
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_iso");
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] iso not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc]camera_attr_foreach_supported_iso  failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;       
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_iso( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_iso failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_iso( g_camera, &eGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_iso failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != eGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_iso failed %d times, camera_attr_get_iso failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_iso, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_iso, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_iso, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_iso, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets scene mode. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_scene_mode_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets scene mode
+* @scenario                            Set scene mode\n
+*                                              Get scene mode
+* @apicovered                  camera_attr_set_scene_mode, camera_attr_get_scene_mode                                          
+* @passcase                            When camera_attr_set_scene_mode and  camera_attr_get_scene_mode are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_scene_mode or camera_attr_get_scene_mode fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_scene_mode_p(void)
+{
+       START_TEST;
+       camera_attr_scene_mode_e  eSetVal /*= CAMERA_ATTR_SCENE_MODE_NORMAL*/;
+       camera_attr_scene_mode_e  eGetVal;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       g_bCallbackHit = false;
+       nRetVal =  camera_attr_foreach_supported_scene_mode( g_camera,  CameraAttrSupportedSceneModeCB , (void*)(&eSetVal)); 
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_scene_mode");
+       
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] scene mode not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc]camera_attr_foreach_supported_scene_mode  failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;       
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_scene_mode( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_scene_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_scene_mode( g_camera, &eGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_scene_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != eGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_scene_mode failed %d times, camera_attr_get_scene_mode failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_scene_mode, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_scene_mode, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_scene mode, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_scene mode, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Gets contrast range. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_get_contrast_range_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets contrast range
+* @scenario                            gets contrast range
+* @apicovered                  camera_attr_get_contrast_range                                  
+* @passcase                            When camera_attr_get_contrast_range is successful
+* @failcase                            If target API camera_attr_get_contrast_range fails.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_get_contrast_range_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0;
+       int nMinVal = 0, nMaxVal = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_contrast_range( g_camera, &nMinVal, &nMaxVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_get_contrast_range", nFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] contrast not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+               
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_contrast_range failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else 
+               {
+                       FPRINTF("\\n[Line : %d] Contrast range = %d ~ %d\\n", __LINE__, nMinVal, nMaxVal);
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_contrast_range failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_get_contrast_range, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_get_contrast_range, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets image quality. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_image_quality_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets image quality
+* @scenario                            Set image quality\n
+*                                              Get image quality
+* @apicovered                  camera_attr_set_image_quality, camera_attr_get_image_quality                                            
+* @passcase                            When camera_attr_set_image_quality and  camera_attr_get_image_quality are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_image_quality or camera_attr_get_image_quality fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_image_quality_p(void)
+{
+       START_TEST;
+       int nSetVal = 1;
+       int nGetVal;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_image_quality( g_camera, nSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_set_image_quality", nSetFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_image_quality failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_image_quality( g_camera, &nGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_image_quality failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (nSetVal != nGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_image_quality failed %d times, camera_attr_get_image_quality failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_image_quality, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_image_quality, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_image_quality, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_image_quality, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets stream flip. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_stream_flip_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets stream flip
+* @scenario                            Set stream flip\n
+*                                              Get stream flip
+* @apicovered                  camera_attr_set_stream_flip, camera_attr_get_stream_flip                                                
+* @passcase                            When camera_attr_set_stream_flip and  camera_attr_get_stream_flip are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_stream_flip or camera_attr_get_stream_flip fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_stream_flip_p(void)
+{
+       START_TEST;
+       camera_flip_e eSetVal;// = CAMERA_FLIP_HORIZONTAL;
+       camera_flip_e nGetVal;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       g_bCallbackHit = false;
+       
+       nRetVal = camera_attr_foreach_supported_stream_flip( g_camera, CameraAttrSupportedStreamFlipCB, (void*)(&eSetVal)); 
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_stream_flip");
+       
+       if ( nRetVal != CAMERA_ERROR_NONE )
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] stream flip not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_stream_flip failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+               
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_stream_flip( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_stream_flip failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_stream_flip( g_camera, &nGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_stream_flip failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != nGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_stream_flip failed %d times, camera_attr_get_stream_flip failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_stream_flip, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_stream_flip, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_stream_flip, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_stream_flip, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets stream rotation. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_stream_rotation_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets stream rotation
+* @scenario                            Set stream rotation\n
+*                                              Get stream rotation
+* @apicovered                  camera_attr_set_stream_rotation, camera_attr_get_stream_rotation                                                
+* @passcase                            When camera_attr_set_stream_rotation and  camera_attr_get_stream_rotation are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_stream_rotation or camera_attr_get_stream_rotation fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_stream_rotation_p(void)
+{
+       START_TEST;
+       camera_rotation_e eSetVal;// = CAMERA_ROTATION_90;
+       camera_rotation_e nGetVal;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+
+       g_bCallbackHit = false;
+       nRetVal = camera_attr_foreach_supported_stream_rotation( g_camera, CameraAttrSupportedStreamRotationCB, (void*) &eSetVal); 
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_stream_rotation");
+       
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] stream rotation not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_stream_rotation  failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;       
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_stream_rotation( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_stream_rotation failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_stream_rotation( g_camera, &nGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_stream_rotation failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != nGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_stream_rotation failed %d times, camera_attr_get_stream_rotation failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_stream_rotation, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_stream_rotation, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_stream_rotation, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_stream_rotation, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets tag orientation. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_tag_orientation_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets tag orientation
+* @scenario                            Set tag orientation\n
+*                                              Get tag orientation
+* @apicovered                  camera_attr_set_tag_orientation, camera_attr_get_tag_orientation                                                
+* @passcase                            When camera_attr_set_tag_orientation and  camera_attr_get_tag_orientation are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_tag_orientation or camera_attr_get_tag_orientation fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_tag_orientation_p(void)
+{
+       START_TEST;
+       camera_attr_tag_orientation_e eSetVal = CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT;
+       camera_attr_tag_orientation_e nGetVal;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_tag_orientation( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_set_tag_orientation", nSetFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_tag_orientation failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_tag_orientation( g_camera, &nGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_tag_orientation failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != nGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_tag_orientation failed %d times, camera_attr_get_tag_orientation failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_tag_orientation, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_tag_orientation, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_tag_orientation, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_tag_orientation, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets tag software. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_tag_software_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets tag software
+* @scenario                            Set tag software\n
+*                                              Get tag software
+* @apicovered                  camera_attr_set_tag_software, camera_attr_get_tag_software                                              
+* @passcase                            When camera_attr_set_tag_software and  camera_attr_get_tag_software are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_tag_software or camera_attr_get_tag_software fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_tag_software_p(void)
+{
+       START_TEST;
+       char szSetSoftwareInfo[LOG]= {0};
+       char *pszGetSoftwareInfo = NULL;
+       strncpy(szSetSoftwareInfo, "Tizen 2.3", LOG);
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_tag_software( g_camera, szSetSoftwareInfo);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_set_tag_software", nSetFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_tag_software failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_tag_software( g_camera, &pszGetSoftwareInfo);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_tag_software failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (strcmp(szSetSoftwareInfo, pszGetSoftwareInfo) != 0)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_tag_software failed %d times, camera_attr_get_tag_software failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_tag_software, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_tag_software, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_tag_software, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_tag_software, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets theatre mode. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_theater_mode_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets theatre mode
+* @scenario                            Set theatre mode\n
+*                                              Get theatre mode
+* @apicovered                  camera_attr_set_theater_mode, camera_attr_get_theater_mode                                              
+* @passcase                            When camera_attr_set_theater_mode and  camera_attr_get_theater_mode are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_theater_mode or camera_attr_get_theater_mode fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_theater_mode_p(void)
+{
+       START_TEST;
+       camera_attr_theater_mode_e eSetVal;// = CAMERA_ATTR_THEATER_MODE_ENABLE;
+       camera_attr_theater_mode_e nGetVal;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       g_bCallbackHit = false;
+       nRetVal = camera_attr_foreach_supported_theater_mode( g_camera, CameraAttrSupportedTheaterModeCB, (void*)(&eSetVal));
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_theater_mode");
+       
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] theater mode not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_theater_mode failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;       
+       }
+
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_theater_mode( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_theater_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_theater_mode( g_camera, &nGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_theater_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != nGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_theater_mode failed %d times, camera_attr_get_theater_mode failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_theater_mode, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_theater_mode, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_theater_mode, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_theater_mode, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets whitebalance
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_whitebalance_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets whitebalance 
+* @scenario                            Set whitebalance\n
+*                                              Get whitebalance
+* @apicovered                  camera_attr_set_whitebalance , camera_attr_get_whitebalance
+* @passcase                            When camera_attr_set_whitebalance  and  camera_attr_get_whitebalance  are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_whitebalance  or camera_attr_get_whitebalance  fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_whitebalance_p(void)
+{
+       START_TEST;
+       camera_attr_whitebalance_e eSetVal;
+       camera_attr_whitebalance_e nGetVal;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       g_bCallbackHit = false;
+       nRetVal = camera_attr_foreach_supported_whitebalance( g_camera, CameraAttrSupportedWhiteBalanceCB, (void*) &eSetVal); 
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_whitebalance");
+       
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] whitebalance not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_whitebalance  failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;       
+       }
+       
+       FPRINTF("\\n[Line : %d] Setting for enum %d \\n", __LINE__, eSetVal);
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_whitebalance ( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_whitebalance  failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_whitebalance ( g_camera, &nGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_whitebalance  failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != nGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+               
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_whitebalance  failed %d times, camera_attr_get_whitebalance  failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_whitebalance , stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_whitebalance , stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_whitebalance , stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_whitebalance , stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets zoom . 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_zoom_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets zoom 9
+* @scenario                            Set zoom\n
+*                                              Get zoom
+* @apicovered                  camera_attr_set_zoom , camera_attr_get_zoom
+* @passcase                            When camera_attr_set_zoom  and  camera_attr_get_zoom  are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_zoom  or camera_attr_get_zoom  fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_zoom_p(void)
+{
+       START_TEST;
+       int nSetVal = 0;
+       int nGetVal;
+       int nRetVal = -1, nLoopCount = 0;
+       int nMin = 0, nMax = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       nRetVal =  camera_attr_get_zoom_range( g_camera, &nMin, &nMax);
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_get_zoom_range");
+       
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] zoom not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_zoom_range failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_zoom_range  min = %d, max = %d \\n", __LINE__, nMin, nMax);
+               nSetVal = ( nMin + nMax ) / 2;
+       }
+
+       if (nMin > nMax)
+       {
+               /** If Max value is less than Min value, it indicates zoom not supported*/
+               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] zoom not supported on the device \\n", __LINE__);
+               return 0;
+       }
+
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_zoom ( g_camera, nSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_zoom  failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_zoom ( g_camera, &nGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_zoom  failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (nSetVal != nGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_zoom  failed %d times, camera_attr_get_zoom  failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_zoom , stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_zoom , stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_zoom , stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_zoom , stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets zoom range. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_get_zoom_range_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets zoom range
+* @scenario                            gets zoom range
+* @apicovered                  camera_attr_get_zoom_range                                      
+* @passcase                            When camera_attr_get_zoom_range is successful
+* @failcase                            If target API camera_attr_get_zoom_range fails.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_get_zoom_range_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0;
+       int nMinVal = 0, nMaxVal = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_zoom_range( g_camera, &nMinVal, &nMaxVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_get_zoom_range", nFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_zoom_range failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else 
+               {
+                       FPRINTF("\\n[Line : %d] zoom range = %d ~ %d\\n", __LINE__, nMinVal, nMaxVal);
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_zoom_range failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_get_zoom_range, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_get_zoom_range, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Gets lens orientation. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_get_lens_orientation_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets zoom 
+* @scenario                            Get lens orientation
+* @apicovered                  camera_attr_get_lens_orientation
+* @passcase                            When camera_attr_get_lens_orientation is successful
+* @failcase                            If target API camera_attr_get_lens_orientation fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_get_lens_orientation_p(void)
+{
+       START_TEST;
+       int nGetLensOrientation = -1;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nGetFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_lens_orientation (g_camera, &nGetLensOrientation);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_get_lens_orientation", nGetFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_lens_orientation  failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] orientation = %d\\n", __LINE__, nGetLensOrientation);
+               }
+       }
+       
+       if ( nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_lens_orientation  failed %d times, out of %d times\\n", __LINE__, nGetFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {                       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_get_lens_orientation , stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_get_lens_orientation , stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets exposure range. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_get_exposure_range_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets exposure range
+* @scenario                            gets exposure range
+* @apicovered                  camera_attr_get_exposure_range                                  
+* @passcase                            When camera_attr_get_exposure_range is successful
+* @failcase                            If target API camera_attr_get_exposure_range fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_get_exposure_range_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0;
+       int nMinVal = 0, nMaxVal = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_exposure_range( g_camera, &nMinVal, &nMaxVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_get_contrast_range", nFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_exposure_range failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else 
+               {
+                       FPRINTF("\\n[Line : %d] exposure range = %d ~ %d\\n", __LINE__, nMinVal, nMaxVal);
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_exposure_range failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_get_exposure_range, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_get_exposure_range, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and gets flash mode. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_flash_mode_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets flash mode
+* @scenario                            Set flash mode\n
+*                                              Get flash mode
+* @apicovered                  camera_attr_set_flash_mode, camera_attr_get_flash_mode                                          
+* @passcase                            When camera_attr_set_flash_mode and  camera_attr_get_flash_mode are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_flash_mode or camera_attr_get_flash_mode fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_flash_mode_p(void)
+{
+       START_TEST;
+       
+       if ( !(Camera_Check_System_Info_Feature_Supported("http://tizen.org/feature/camera.back.flash") ||
+                       Camera_Check_System_Info_Feature_Supported("http://tizen.org/feature/camera.front.flash")) )
+       {
+               FPRINTF("[Line : %d][Camera_ITc] Required feature of camera is not supported. So leaving test", __LINE__);
+               return 0;
+       }
+       
+       camera_attr_flash_mode_e eSetVal;// = CAMERA_ATTR_FLASH_MODE_AUTO;
+       camera_attr_flash_mode_e eGetVal;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       g_bCallbackHit = false;
+       nRetVal = camera_attr_foreach_supported_flash_mode( g_camera, CameraAttrSupportedFlashModeCB, (void*)(&eSetVal)); 
+
+       if ( g_bFeatureCameraBackFlash == false && g_bFeatureCameraFrontFlash == false )
+       {
+               /** Flash feature not supported according to model-config.xml */
+               
+               if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       /** camera_attr_foreach_supported_flash_mode required either of feature http://tizen.org/feature/camera.back.flash 'OR' http://tizen.org/feature/camera.front.flash, 
+                       whose value is true, but is_supported still returns false*/
+                       FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] According to feature value from model_config, it should be supported, but API says not supported \\n", __LINE__);
+                       return 1;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][Camera_ITc] camera_attr_foreach_supported_flash_mode call correctly returned %s error for unsupported feature", __LINE__, CameraGetError(nRetVal));
+                       return 0;
+               }
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_flash_mode( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_flash_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_flash_mode( g_camera, &eGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog. pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_flash_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != eGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_flash_mode failed %d times, camera_attr_get_flash_mode failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_flash_mode, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_get_flash_mode, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_flash_mode, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_get_flash_mode, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets brightness range. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_get_brightness_range_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets brightness range
+* @scenario                            gets brightness range
+* @apicovered                  camera_attr_get_brightness_range                                        
+* @passcase                            When camera_attr_get_brightness_range is successful
+* @failcase                            If target API camera_attr_get_brightness_range fails.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_get_brightness_range_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0;
+       int nMinVal = 0, nMaxVal = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_get_brightness_range( g_camera, &nMinVal, &nMaxVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_get_brightness_range", nFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_brightness_range failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else 
+               {
+                       FPRINTF("\\n[Line : %d] brightness range = %d ~ %d\\n", __LINE__, nMinVal, nMaxVal);
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_get_brightness_range failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_get_brightness_range, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_get_brightness_range, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and clears af area. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_clear_af_area_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and clears af area
+* @scenario                            Set af area\n
+*                                              clear af area
+* @apicovered                  camera_attr_set_af_area, camera_attr_clear_af_area                                              
+* @passcase                            When camera_attr_set_af_area and  camera_attr_clear_af_area are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_set_af_area or camera_attr_clear_af_area fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_clear_af_area_p(void)
+{
+       START_TEST;
+       int nSetX = 1, nSetY = 1;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       camera_attr_af_mode_e eSetAFmode = CAMERA_ATTR_AF_NORMAL;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nClearFailCount = 0;
+       
+       g_bCallbackHit = false;
+       nRetVal = camera_attr_foreach_supported_af_mode(g_camera, CameraAttrSupportedAfModeCB, (void*)(&eSetAFmode));
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_af_mode");
+       
+       if ( nRetVal != CAMERA_ERROR_NONE )
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] Auto focus not supported \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_af_mode failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+       else if ( g_bCallbackHit == false || eSetAFmode == CAMERA_ATTR_AF_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc][Not Supported] Auto focus not supported \\n", __LINE__);
+               return 0;
+       }
+       
+       nRetVal = camera_attr_set_af_mode( g_camera, eSetAFmode);
+       if ( nRetVal != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_af_mode failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_af_area( g_camera, nSetX, nSetY);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_af_area failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_clear_af_area(g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog. pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_clear_af_area failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nClearFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nClearFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_af_area failed %d times, camera_attr_clear_af_area failed %d times out of %d times\\n", __LINE__, nSetFailCount, nClearFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_af_area, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_clear_af_area, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_af_area, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_clear_af_area, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Checks if antishake is supported. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_is_supported_antishake_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Checks if antishake is supported
+* @scenario                            Check if antishake is supported
+* @apicovered                  camera_attr_is_supported_anti_shake
+* @passcase                            Always pass if API does not crash, just prints if anti shake is supported or not.
+* @failcase                            If camera_attr_is_supported_anti_shake crashes or throws exception.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_is_supported_antishake_p(void)
+{
+       START_TEST;
+       bool bRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               bRetVal = camera_attr_is_supported_anti_shake(g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+
+               if ( g_bFeatureCamera == false )
+               {
+                       if(bRetVal == true)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] According to feature value from model_config, it should not be supported, but API says supported \\n", __LINE__);
+                               nFailCount++;
+                               continue;
+                       }
+                       else 
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] anti shake is not supported on the device\\n", __LINE__);
+                       }
+               }
+               else 
+               {
+                       /** even if tizen.org/feature/camera feature is true, still antishake might not be supported */
+                       if (bRetVal == false)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] anti shake is not supported on the device\\n", __LINE__);
+                       }
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_is_supported_anti_shake failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_is_supported_anti_shake, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_is_supported_anti_shake, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Enables auto_contrast and checks if its is enabled. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_enable_is_enabled_auto_contrast_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Enables auto_contrast and checks if its is enabled
+* @scenario                            Enable auto_contrast\n
+*                                              check if auto_contrast is enabled
+* @apicovered                  camera_attr_enable_auto_contrast, camera_attr_is_enabled_auto_contrast                                          
+* @passcase                            When camera_attr_enable_auto_contrast and  camera_attr_is_enabled_auto_contrast are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_enable_auto_contrast or camera_attr_is_enabled_auto_contrast fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_enable_is_enabled_auto_contrast_p(void)
+{
+       START_TEST;
+       bool bSetVal = true;
+       bool bGetVal;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+
+       bool bRet = camera_attr_is_supported_auto_contrast(g_camera);
+       if ( g_bFeatureCamera == false )
+       {
+               /** If feature tizen.org/feature/camera is false then auto contrast should also not be supported*/
+               if(bRet == true)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] According to feature value from model_config, camera_attr_is_supported_auto_contrast should not be supported, but API says supported \\n", __LINE__);
+                       return 1;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] auto contrast not supported on the device\\n", __LINE__);
+               return 0;
+       }
+       else
+       {
+               /** If feature tizen.org/feature/camera is present then still specific feature auto contrast might not be supported*/
+               if (bRet == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] auto contrast not supported on the device\\n", __LINE__);
+                       return 0;
+               }
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_enable_auto_contrast( g_camera, bSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_enable_auto_contrast failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_is_enabled_auto_contrast( g_camera, &bGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_is_enabled_auto_contrast failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (bSetVal != bGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_enable_auto_contrast failed %d times, camera_attr_is_enabled_auto_contrast failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_enable_auto_contrast, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_is_enabled_auto_contrast, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_enable_auto_contrast, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_is_enabled_auto_contrast, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Enables tag and checks if its is enabled. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_enable_is_enabled_tag_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Enables tag and checks if its is enabled
+* @scenario                            Enable tag\n
+*                                              check if tag is enabled
+* @apicovered                  camera_attr_enable_tag, camera_attr_is_enabled_tag                                              
+* @passcase                            When camera_attr_enable_tag and  camera_attr_is_enabled_tag are successful
+* @failcase                            If target API camera_attr_enable_tag or camera_attr_is_enabled_tag fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_enable_is_enabled_tag_p(void)
+{
+       START_TEST;
+       bool bSetVal = true;
+       bool bGetVal;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_enable_tag( g_camera, bSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_enable_tag", nSetFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_enable_tag failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_is_enabled_tag( g_camera, &bGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_is_enabled_tag failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (bSetVal != bGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc]Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_enable_tag failed %d times, camera_attr_is_enabled_tag failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_enable_tag, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_is_enabled_tag, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_enable_tag, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_is_enabled_tag, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Enables video stabilization and checks if its is enabled. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_enable_is_enabled_video_stabilization_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Enables video stabilization and checks if its is enabled
+* @scenario                            Enable video stabilization\n
+*                                              check if video stabilization is enabled
+* @apicovered                  camera_attr_enable_video_stabilization, camera_attr_is_enabled_video_stabilization                                              
+* @passcase                            When camera_attr_enable_video_stabilization and  camera_attr_is_enabled_video_stabilization are successful and set/get values are matched.
+* @failcase                            If target API camera_attr_enable_video_stabilization or camera_attr_is_enabled_video_stabilization fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_enable_is_enabled_video_stabilization_p(void)
+{
+       START_TEST;
+       bool bSetVal = true;
+       bool bGetVal;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+               
+       bool bRet = camera_attr_is_supported_video_stabilization(g_camera );
+       if ( g_bFeatureCamera == false )
+       {
+               if(bRet == true)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] According to feature value from model_config, video_stabilization should not be supported, but API says supported \\n", __LINE__);
+                       return 1;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] video stabilisation not supported on the device\\n", __LINE__);
+               return 0;
+       }
+       else 
+       {
+               if (bRet == false)
+               {
+                       /** feature tizen.org/feature/camera is true, but video stabilisation might not be supported */
+                       FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] video stabilisation not supported on the device\\n", __LINE__);
+                       return 0;
+               }
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_enable_video_stabilization( g_camera, bSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_enable_video_stabilization failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_is_enabled_video_stabilization( g_camera, &bGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_is_enabled_video_stabilization failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (bSetVal != bGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_enable_video_stabilization failed %d times, camera_attr_is_enabled_video_stabilization failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_enable_video_stabilization, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_is_enabled_video_stabilization, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_enable_video_stabilization, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_is_enabled_video_stabilization, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Checks if video_stabilization is supported. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_is_supported_video_stabilization_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Checks if video_stabilization is supported
+* @scenario                            Check if video_stabilization is supported
+* @apicovered                  camera_attr_is_supported_video_stabilization                                    
+* @passcase                            Always passes if camera_attr_is_supported_video_stabilization does not crash, and tells if video_stabilization is supported or not on the device.
+* @failcase                            If camera_attr_is_supported_video_stabilization crashes or throws exception.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_is_supported_video_stabilization_p(void)
+{
+       START_TEST;
+       bool bRetVal = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               bRetVal = camera_attr_is_supported_video_stabilization(g_camera );
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               
+               if ( g_bFeatureCamera == false )
+               {
+                       if(bRetVal == true)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] According to feature value from model_config, it should not be supported, but API says supported \\n", __LINE__);
+                               nFailCount++;
+                               continue;
+                       }
+                       else 
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] video stabilization is not supported on the device\\n", __LINE__);
+                       }
+               }
+               else 
+               {
+                       /** even if feature http://tizen.org/feature/camera, is true, still video_stabilisation may not be supported */
+                       if ( bRetVal == false )
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] video stabilization is not supported on the device\\n", __LINE__);
+                       }
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_is_supported_video_stabilization failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_is_supported_video_stabilization, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_is_supported_video_stabilization, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Creates and destroys camera handle 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_create_destroy_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Create and Destroy the camera handle
+* @scenario                            Destroy created handle in startup\n
+*                                              Create camera handle\n
+*                                              Destroy camera handle
+* @apicovered                  camera_create, camera_destroy                                   
+* @passcase                            When camera_Create and  camera_Destroy are successful
+* @failcase                            If target API camera_Create or camera_Destroy fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_create_destroy_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+       /** As we have created in startup so destroying it first before our test*/
+       camera_destroy (g_camera);
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_create(g_eCameraDev, &g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               //CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_create failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nCreateFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               //CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_destroy( g_camera );
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               //CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_destroy failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nDestroyFailCount++;
+               }
+       }
+
+       camera_create(g_eCameraDev, &g_camera);
+       
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_create failed %d times, camera_destroy failed %d times out of %d times\\n", __LINE__, nCreateFailCount, nDestroyFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_create, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_destroy, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_create_destroy, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets device count. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_get_device_count_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get device count
+* @scenario                            Get device count
+* @apicovered                  camera_get_device_count                                         
+* @passcase                            When camera_get_device_count is successful
+* @failcase                            If target API camera_get_device_count fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_get_device_count_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       int nDeviceCount = -1;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0;
+               
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_get_device_count(g_camera, &nDeviceCount);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_get_device_count", nFailCount);
+               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_device_count failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if( nDeviceCount == -1 )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] unable to get device count \\n", __LINE__);
+                       nFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_device_count failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_get_device_count, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_get_device_count, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Disable shutter sound. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_disable_shutter_sound_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Disable shutter sound
+* @scenario                            Disable shutter sound
+* @apicovered                  camera_attr_disable_shutter_sound
+* @passcase                            When camera_attr_disable_shutter_sound  is successful
+* @failcase                            If target API camera_attr_disable_shutter_sound  fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_disable_shutter_sound_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0;
+               
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_disable_shutter_sound (g_camera, true);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_disable_shutter_sound", nFailCount);
+               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_disable_shutter_sound  failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_disable_shutter_sound  failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_disable_shutter_sound , stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_disable_shutter_sound , stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets state change callback, check if state change is detected in callback. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_set_unset_state_change_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and unsets state changes callback.
+* @scenario                            Set state change callback\n
+*                                              Start preview\n
+*                                              Stop preview\n
+*                                              unset state change callback
+* @apicovered                  camera_set_state_changed_cb, camera_start_preview, camera_stop_preview, camera_unset_state_changed_cb
+* @passcase                            When camera_set_state_changed_cb, camera_unset_state_changed_cb succeeds and callback is hit on state change
+* @failcase                            If camera_set_state_changed_cb, camera_unset_state_changed_cb fails or callback is not hit on state change
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_set_unset_state_change_cb_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = -1, nLoopCount = 0, nCameraTimeoutId = 0;
+       //bool bCallbackhit = false;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetCbFailCount = 0, nUnsetCbFailCount = 0;
+       int nCallbackFailCount = 0;
+
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+                       
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               
+               nRetVal = camera_set_state_changed_cb(g_camera, CameraStateChangedCB, NULL);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_set_state_changed_cb", nSetCbFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_state_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetCbFailCount++;
+                       continue;
+               }
+               
+               //nRetVal = camera_start_preview (g_camera);
+               camera_start_preview (g_camera);
+               usleep(5000);
+               camera_stop_preview(g_camera);
+               
+               RUN_POLLING_LOOP;
+               
+               if ( g_bCallbackHit == false)
+               {
+                       nCallbackFailCount++;
+               }
+               
+               //camera_stop_preview(g_camera);
+                               
+               CameraGetTimeOfDay();
+               nRetVal = camera_unset_state_changed_cb(g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_unset_state_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nUnsetCbFailCount++;
+               }
+               
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+       }
+       
+       if ( nSetCbFailCount > 0 || nUnsetCbFailCount > 0 || nCallbackFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_state_changed_cb failed %d times, camera_unset_state_changed_cb failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nSetCbFailCount, nUnsetCbFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_set_state_changed_cb, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_unset_state_changed_cb, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_unset_state_changed_cb, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+//& purpose: Gets camera state 
+//& type: auto
+/**
+* @testcase                    ITc_camera_get_state_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets camera state
+* @scenario                            get camera state
+* @apicovered                  camera_get_state
+* @passcase                            When camera_get_state passes
+* @failcase                            If target API camera_get_state fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_get_state_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0;
+       camera_state_e eGetState;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_get_state(g_camera, &eGetState);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_get_state", nFailCount);
+               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( eGetState != CAMERA_STATE_CREATED )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state returned wrong state \\n", __LINE__);
+                       nFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_get_state, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_get_state, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose:Get supported af mode. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_attr_for_each_supported_af_mode_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported af mode
+* @scenario                            Get supported af mode
+* @apicovered                  camera_attr_foreach_supported_af_mode
+* @passcase                            When camera_attr_foreach_supported_af_mode passes
+* @failcase                            If target API camera_attr_foreach_supported_af_mode fails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_for_each_supported_af_mode_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+       
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal =  camera_attr_foreach_supported_af_mode( g_camera,  CameraAttrSupportedAfModeCB , NULL); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_foreach_supported_af_mode", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] auto focus not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_af_mode failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_foreach_supported_af_mode, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_foreach_supported_af_mode, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported effect. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_attr_for_each_supported_effect_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported af mode
+* @scenario                            Get supported af mode
+* @apicovered                  camera_attr_foreach_supported_effect
+* @passcase                            When camera_attr_foreach_supported_effect passes
+* @failcase                            If target API camera_attr_foreach_supported_effectfails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_for_each_supported_effect_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+                       
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal =  camera_attr_foreach_supported_effect ( g_camera,  CameraAttrSupportedEffectCB , NULL); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_foreach_supported_effect", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] effect not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_effect failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_foreach_supported_effect, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_foreach_supported_effect, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported exposure mode. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_attr_foreach_supported_exposure_mode_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported af mode
+* @scenario                            Get supported af mode
+* @apicovered                  camera_attr_foreach_supported_exposure_mode
+* @passcase                            When camera_attr_foreach_supported_exposure_mode passes
+* @failcase                            If target API camera_attr_foreach_supported_exposure_modefails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_foreach_supported_exposure_mode_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_foreach_supported_exposure_mode( g_camera, CameraAttrSupportedExposureModeCB, NULL); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_foreach_supported_exposure_mode", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] exposure not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_exposure_mode failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_foreach_supported_exposure_mode, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_foreach_supported_exposure_mode, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported flash mode. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_attr_foreach_supported_flash_mode_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported flash mode
+* @scenario                            Get supported flash mode
+* @apicovered                  camera_attr_foreach_supported_flash_mode
+* @passcase                            When camera_attr_foreach_supported_flash_mode passes
+* @failcase                            If target API camera_attr_foreach_supported_flash_mode fails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_foreach_supported_flash_mode_p(void)
+{
+       START_TEST;
+       
+       if ( !(Camera_Check_System_Info_Feature_Supported("http://tizen.org/feature/camera.back.flash") ||
+                       Camera_Check_System_Info_Feature_Supported("http://tizen.org/feature/camera.front.flash")) )
+       {
+               FPRINTF("[Line : %d][Camera_ITc] Required feature of camera is not supported. So leaving test", __LINE__);
+               return 0;
+       }
+
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_foreach_supported_flash_mode( g_camera, CameraAttrSupportedFlashModeCB, NULL); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_foreach_supported_flash_mode", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] flash mode not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_flash_mode failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_foreach_supported_flash_mode, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_foreach_supported_flash_mode, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported fps. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_attr_foreach_supported_fps_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported fps
+* @scenario                            Get supported fps
+* @apicovered                  camera_attr_foreach_supported_fps
+* @passcase                            When camera_attr_foreach_supported_fps passes
+* @failcase                            If target API camera_attr_foreach_supported_fpsfails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_foreach_supported_fps_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_foreach_supported_fps( g_camera, CameraAttrSupportedFpsCB, NULL); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_foreach_supported_fps", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_fps failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_foreach_supported_fps, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_foreach_supported_fps, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported iso. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_attr_foreach_supported_iso_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported iso
+* @scenario                            Get supported iso
+* @apicovered                  camera_attr_foreach_supported_iso
+* @passcase                            When camera_attr_foreach_supported_iso passes
+* @failcase                            If target API camera_attr_foreach_supported_isofails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_foreach_supported_iso_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_foreach_supported_iso( g_camera, CameraAttrSupportedIsoCB, NULL); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_foreach_supported_iso", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] iso not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_iso failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_foreach_supported_iso, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_foreach_supported_iso, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported scene mode. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_attr_foreach_supported_scene_mode_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported scene mode
+* @scenario                            Get supported scene mode
+* @apicovered                  camera_attr_foreach_supported_scene_mode
+* @passcase                            When camera_attr_foreach_supported_scene_mode passes
+* @failcase                            If target API camera_attr_foreach_supported_scene_modefails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_foreach_supported_scene_mode_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_foreach_supported_scene_mode( g_camera, CameraAttrSupportedSceneModeCB, NULL); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_foreach_supported_scene_mode", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] scene mode not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc]callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc]camera_attr_foreach_supported_scene_mode failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_foreach_supported_scene_mode, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_foreach_supported_scene_mode, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported white balance. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_attr_foreach_supported_whitebalance_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported white balance
+* @scenario                            Get supported white balance
+* @apicovered                  camera_attr_foreach_supported_whitebalance
+* @passcase                            When camera_attr_foreach_supported_whitebalance passes
+* @failcase                            If target API camera_attr_foreach_supported_whitebalancefails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_foreach_supported_whitebalance_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_foreach_supported_whitebalance( g_camera, CameraAttrSupportedWhiteBalanceCB, NULL); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_foreach_supported_whitebalance", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] whitebalance not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+
+       if ( nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_whitebalance failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_foreach_supported_whitebalance, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_foreach_supported_whitebalance, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Get supported capture format. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_foreach_supported_capture_format_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported capture format
+* @scenario                            Get supported capture format
+* @apicovered                  camera_foreach_supported_capture_format
+* @passcase                            When camera_foreach_supported_capture_format passes
+* @failcase                            If target API camera_foreach_supported_capture_formatfails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_foreach_supported_capture_format_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0, nCallbackValueFailCount = 0;
+       camera_pixel_format_e eSetVal;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_foreach_supported_capture_format( g_camera, CameraAttrSupportedCaptureFormatCB, (void*)(&eSetVal)); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_foreach_supported_capture_format", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] capture format not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_foreach_supported_capture_format failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc]callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+
+               if ( eSetVal != g_eCamPixFmt )
+               {
+                       FPRINTF("[Line : %d][Camera_ITc] eSetVal is not properly passed from CB funtion. \\n", __LINE__);
+                       nCallbackValueFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0 || nCallbackValueFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc]camera_foreach_supported_capture_format failed %d times, callback did not invoke %d times out of %d times, callback values are not properly passed from CB function %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT, nCallbackValueFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_foreach_supported_capture_format, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_foreach_supported_capture_format, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported capture resolution 
+//& type: auto
+/**
+* @testcase                    ITc_camera_foreach_supported_capture_resolution_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported capture resolution
+* @scenario                            Get supported capture resolution
+* @apicovered                  camera_foreach_supported_capture_resolution
+* @passcase                            When camera_foreach_supported_capture_resolution passes
+* @failcase                            If target API camera_foreach_supported_capture_resolutionfails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_foreach_supported_capture_resolution_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0, nCallbackValueFailCount = 0;
+       CameraResolution stSetCamRes;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_foreach_supported_capture_resolution( g_camera, CameraAttrSupportedCaptureResolutionCB, (void *)(&stSetCamRes)); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_foreach_supported_capture_resolution", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] capture resolution not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+
+               if ( (stSetCamRes.nWidth != g_nCapResWidth) || (stSetCamRes.nHeight != g_nCapResHeight) )
+               {
+                       FPRINTF("[Line : %d][Camera_ITc] stSetCamRes values are not properly passed from CB funtion. \\n", __LINE__);
+                       nCallbackValueFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0 || nCallbackValueFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_foreach_supported_capture_resolution failed %d times, callback did not invoke %d times out of %d times, callback values are not properly passed from CB function %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT, nCallbackValueFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_foreach_supported_capture_resolution, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_foreach_supported_capture_resolution, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported preview resolution 
+//& type: auto
+/**
+* @testcase                    ITc_camera_foreach_supported_preview_resolution_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported preview resolution
+* @scenario                            Get supported preview resolution
+* @apicovered                  camera_foreach_supported_preview_resolution
+* @passcase                            When camera_foreach_supported_preview_resolution passes
+* @failcase                            If target API camera_foreach_supported_preview_resolution fails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_foreach_supported_preview_resolution_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0, nCallbackValueFailCount = 0;
+       CameraResolution stSetCamRes;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_foreach_supported_preview_resolution( g_camera, CameraAttrSupportedPreviewResolutionCB, (void*)(&stSetCamRes)); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_foreach_supported_preview_resolution", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] preview resolution not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+               
+               if ( (stSetCamRes.nWidth != g_nCapResWidth) || (stSetCamRes.nHeight != g_nCapResHeight) )
+               {
+                       FPRINTF("[Line : %d][Camera_ITc] stSetCamRes values are not properly passed from CB funtion. \\n", __LINE__);
+                       nCallbackValueFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0 || nCallbackValueFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_foreach_supported_preview_resolution failed %d times, callback did not invoke %d times out of %d times, callback values are not properly passed from CB function %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT, nCallbackValueFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_foreach_supported_preview_resolution, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_foreach_supported_preview_resolution, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported preview format. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_foreach_supported_preview_format_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported preview format
+* @scenario                            Get supported preview format
+* @apicovered                  camera_foreach_supported_preview_format
+* @passcase                            When camera_foreach_supported_preview_format passes
+* @failcase                            If target API camera_foreach_supported_preview_formatfails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_foreach_supported_preview_format_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0, nCallbackValueFailCount = 0;
+       camera_pixel_format_e eSetVal;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_foreach_supported_preview_format( g_camera, CameraAttrSupportedPreviewFormatCB, (void*)(&eSetVal)); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_foreach_supported_preview_format", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] preview format not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc]callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+               
+               if ( eSetVal != g_eCamPixFmt )
+               {
+                       FPRINTF("[Line : %d][Camera_ITc] eSetVal is not properly passed from CB funtion. \\n", __LINE__);
+                       nCallbackValueFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0 || nCallbackValueFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc]camera_foreach_supported_preview_format failed %d times, callback did not invoke %d times out of %d times, callback values are not properly passed from CB function %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT, nCallbackValueFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_foreach_supported_preview_format, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_foreach_supported_preview_format, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Set/Get supported preview resolution 
+//& type: auto
+/**
+* @testcase                    ITc_camera_set_get_preview_resolution_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Set/Get supported preview resolution
+* @scenario                            Get supported preview resolution\n
+*                                              Set preview resolution\n
+*                                              Get preview resolution
+* @apicovered                  camera_foreach_supported_preview_resolution, camera_set_preview_resolution, camera_get_preview_resolution
+* @passcase                            When camera_set_preview_resolution and camera_get_preview_resolution passes, and set/get values match.
+* @failcase                            If target API camera_set_preview_resolution and camera_get_preview_resolution fails or set/get values do not match.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+
+int ITc_camera_set_get_preview_resolution_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       g_bCallbackHit = false;
+       int nGetWidth = 0, nGetHeight = 0;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+       
+       CameraResolution stPreviewresolution = {0};
+       
+       g_bCallbackHit = false;
+       nRetVal = camera_foreach_supported_preview_resolution( g_camera, CameraAttrSupportedPreviewResolutionCB, (void *)(&stPreviewresolution));
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_foreach_supported_preview_resolution");
+       
+       if ( nRetVal != CAMERA_ERROR_NONE || g_bCallbackHit == false )
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] preview not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc]failed to get supported resolution \\n", __LINE__);
+               return 1;
+       }
+       
+       if ( (stPreviewresolution.nWidth != g_nCapResWidth) || (stPreviewresolution.nHeight != g_nCapResHeight) )
+       {
+               FPRINTF("[Line : %d][Camera_ITc] stPreviewresolution values are not properly passed from CB funtion. \\n", __LINE__);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_set_preview_resolution( g_camera, stPreviewresolution.nWidth, stPreviewresolution.nHeight);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc]camera_set_preview_resolution failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_get_preview_resolution( g_camera, &nGetWidth, &nGetHeight);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_preview_resolution failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if ( (nGetWidth != stPreviewresolution.nWidth) || (nGetHeight != stPreviewresolution.nHeight) )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_preview_resolution failed %d times, camera_get_preview_resolution failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_set_preview_resolution, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_get_preview_resolution, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_preview_resolution, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_get_preview_resolution, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Set/Get supported capture resolution 
+//& type: auto
+/**
+* @testcase                    ITc_camera_set_get_capture_resolution_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Set/Get supported capture resolution
+* @scenario                            Get supported capture resolution\n
+*                                              Set capture resolution\n
+*                                              Get capture resolution
+* @apicovered                  camera_foreach_supported_capture_resolution, camera_set_capture_resolution, camera_get_capture_resolution
+* @passcase                            When camera_set_capture_resolution and camera_get_capture_resolution passes, and set/get values match.
+* @failcase                            If target API camera_set_capture_resolution and camera_get_capture_resolution fails or set/get values do not match.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_set_get_capture_resolution_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       g_bCallbackHit = false;
+       int nGetWidth = 0, nGetHeight = 0;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+       
+       CameraResolution stCaptureResolution = {0};
+       
+       nRetVal = camera_foreach_supported_capture_resolution( g_camera, CameraAttrSupportedCaptureResolutionCB, (void *)(&stCaptureResolution));
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_foreach_supported_capture_resolution");
+       
+       if ( nRetVal != CAMERA_ERROR_NONE || g_bCallbackHit == false )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc]failed to get supported resolution \\n", __LINE__);
+               return 1;
+       }
+       
+       if ( (stCaptureResolution.nWidth != g_nCapResWidth) || (stCaptureResolution.nHeight != g_nCapResHeight) )
+       {
+               FPRINTF("[Line : %d][Camera_ITc] stCaptureResolution values are not properly passed from CB funtion. \\n", __LINE__);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_set_capture_resolution( g_camera, stCaptureResolution.nWidth, stCaptureResolution.nHeight);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_capture_resolution failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_get_capture_resolution( g_camera, &nGetWidth, &nGetHeight);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_capture_resolution failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if ( (nGetWidth != stCaptureResolution.nWidth) || (nGetHeight != stCaptureResolution.nHeight) )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_capture_resolution failed %d times, camera_get_capture_resolution failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_set_capture_resolution, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_get_capture_resolution, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_capture_resolution, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_get_capture_resolution, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets preview callback, check if state change is detected in callback. 
+//& type: auto
+ /**
+ * @testcase                           ITc_camera_start_stop_preview_set_unset_preview_cb_p
+ * @since_tizen                        2.3 
+ * @type                                       auto
+ * @description                                Starts and stop Camera preview, and check if preview callback is invoked.
+ * @scenario                           set preview callback \n
+ *                                                     start preview \n
+ *                                                     stop preview \n
+ *                                                     unset preview format
+ * @apicovered                         camera_set_preview_cb, camera_start_preview, camera_stop_preview, camera_unset_preview_cb
+ * @passcase                           When camera_set_preview_cb, camera_start_preview, camera_stop_preview, camera_unset_preview_cb and  preview callback is invoked.
+ * @failcase                           If target api camera_start_preview or camera_stop_preview fails or any precondition api fails.
+ * @precondition                       Camera handle must be created
+ * @postcondition                      Camera handle must be released
+ * 
+ */
+int ITc_camera_start_stop_preview_set_unset_preview_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0, nCameraTimeoutId = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nStartFailCount = 0, nSetCbFailCount = 0, nStopFailCount = 0, nUnsetCbFailCount = 0;
+       int nCallbackFailCount = 0;
+       char *pszSetCBSpeedLog = NULL, *pszUnsetCBSpeedLog = NULL;
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+       pszSetCBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetCBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_set_preview_cb(g_camera, CameraPreviewCB, NULL);
+               CameraExecutionDelay(pszSetCBSpeedLog);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_set_preview_cb", nSetCbFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_preview_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetCbFailCount++;
+                       continue;
+               }
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_start_preview (g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               RUN_POLLING_LOOP;
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_preview failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStartFailCount++;
+                       camera_unset_preview_cb(g_camera);
+                       continue;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       nCallbackFailCount++;
+               }
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_stop_preview(g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+                               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_stop_preview failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStopFailCount++;
+               }
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_unset_preview_cb(g_camera);
+               CameraExecutionDelay(pszUnsetCBSpeedLog);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_unset_preview_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nUnsetCbFailCount++;
+               }
+               
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+       }
+       
+       if ( nStartFailCount > 0 || nStopFailCount > 0 || nCallbackFailCount > 0 || nSetCbFailCount > 0 || nUnsetCbFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_preview_cb failed %d times, camera_start_preview failed %d times, camera_stop_preview failed %d times,camera_unset_preview_cb failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nSetCbFailCount, nStartFailCount, nStopFailCount, nUnsetCbFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+#if SPEED_CHECK
+               if ( pszSetCBSpeedLog != NULL)
+               {
+                       free(pszSetCBSpeedLog); pszSetCBSpeedLog = NULL;
+               }
+               if ( pszUnsetCBSpeedLog != NULL)
+               {
+                       free(pszUnsetCBSpeedLog); pszUnsetCBSpeedLog = NULL;
+               }
+#endif
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_start_preview, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_stop_preview, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_SPEED_LOG(camera_set_preview_cb, pszSetCBSpeedLog);
+               PRINT_SPEED_LOG(camera_unset_preview_cb, pszUnsetCBSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_unset_previe_cb_start_stop_preview, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+#if SPEED_CHECK
+               if ( pszSetCBSpeedLog != NULL)
+               {
+                       free(pszSetCBSpeedLog); pszSetCBSpeedLog = NULL;
+               }
+               if ( pszUnsetCBSpeedLog != NULL)
+               {
+                       free(pszUnsetCBSpeedLog); pszUnsetCBSpeedLog = NULL;
+               }
+#endif
+               return 0;
+       }
+}
+
+//& purpose: To check camera start capture. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_start_capture_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Starts camera capture
+* @scenario                            Start preview\n
+*                                              Start capture\n
+*                                              Stop preview
+* @apicovered                  camera_start_preview, camera_start_capture, camera_stop_preview
+* @passcase                            When camera_start_preview, camera_start_capture are successful and capturing callback and capturing completed callback are invoked.
+* @failcase                            If camera_start_preview, camera_start_capture fails or capturing callback and capturing completed callback are not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_start_capture_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nStartCaptureFailCount = 0, nStartPreviewFailCount = 0;
+       int nCallbackFailCount = 0;
+       int nCameraTimeoutId = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCameraCaptureStarted = false;
+               g_bCameraCaptureStopped = false;
+                               
+               nRetVal = camera_start_preview (g_camera);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_start_preview", nStartPreviewFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_preview failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStartPreviewFailCount++;
+                       continue;
+               }
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_start_capture( g_camera, &CameraCapturingCB, &CameraCapturingCompletedCB, NULL);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+                               
+               RUN_POLLING_LOOP;
+                               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_capture failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStartCaptureFailCount++;
+               }
+               else if ( g_bCameraCaptureStarted == false || g_bCameraCaptureStopped == false )
+               {
+                       FPRINTF("\\n[Line : %d] callback not invoked on iteration %d\\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+
+               camera_stop_preview(g_camera);
+       }
+       
+       if ( nStartPreviewFailCount > 0 || nStartCaptureFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d] camera_start_preview failed %d times, camera_start_capture failed %d times, Callback did not invoke %d times out of %d times\\n", __LINE__, nStartPreviewFailCount, nStartCaptureFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_start_capture, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_start_capture, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Set/Get supported preview format. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_set_get_preview_format_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Set/Get supported preview format
+* @scenario                            Get supported preview format\n
+*                                              Set preview format\n
+*                                              Get preview format
+* @apicovered                  camera_foreach_supported_preview_format, camera_set_preview_format, camera_get_preview_format
+* @passcase                            When camera_set_preview_format and camera_get_preview_format passes, and set/get values match.
+* @failcase                            If target API camera_set_preview_format and camera_get_preview_format fails or set/get values do not match.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_set_get_preview_format_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       g_bCallbackHit = false;
+       camera_pixel_format_e eGetFormat, eSetFormat;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0, nCameraTimeoutId = 0;
+       
+       //Cameraformat stPreviewformat = {0};
+       
+       g_bCallbackHit = false;
+       nRetVal = camera_foreach_supported_preview_format( g_camera, CameraAttrSupportedPreviewFormatCB, (void *)(&eSetFormat));
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_foreach_supported_preview_format");    
+       RUN_POLLING_LOOP;
+       
+       if ( nRetVal != CAMERA_ERROR_NONE || g_bCallbackHit == false )
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] preview format not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] failed to get supported format \\n", __LINE__);
+               return 1;
+       }
+       
+       if ( eSetFormat != g_eCamPixFmt )
+       {
+               FPRINTF("[Line : %d][Camera_ITc] eSetFormat is not properly passed from CB funtion. \\n", __LINE__);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_set_preview_format( g_camera, eSetFormat);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_preview_format failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_get_preview_format( g_camera, &eGetFormat);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_preview_format failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eGetFormat != eSetFormat)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_preview_format failed %d times, camera_get_preview_format failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_set_preview_format, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_get_preview_format, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_preview_format, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_get_preview_format, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Checks if hdr capture is supported. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_is_supported_hdr_capture_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Checks if hdr capture is supported
+* @scenario                            Check if hdr capture is supported
+* @apicovered                  camera_attr_is_supported_hdr_capture                                            
+* @passcase                            Always pass if API does not crash, and just prints if hdr capture is supported or not.
+* @failcase                            If camera_attr_is_supported_hdr_capture crashes or throws exception.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_is_supported_hdr_capture_p(void)
+{
+       START_TEST;
+       bool bRetVal = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               bRetVal = camera_attr_is_supported_hdr_capture(g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               if ( g_bFeatureCamera == false )
+               {
+                       if(bRetVal == true)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc]  According to feature value from model_config, it should not be supported, but API says supported \\n", __LINE__);
+                               nFailCount++;
+                               continue;
+                       }
+                       else 
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] hdr capture is not supported on the device\\n", __LINE__);
+                       }
+               }
+               else 
+               {
+                       /** even if http://tizen.org/feature/camera, is true, still hdr capture might not be supported*/
+                       if ( bRetVal == false )
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] hdr capture is not supported on the device\\n", __LINE__);
+                       }
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_is_supported_video_stabilization failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_is_supported_hdr_capture, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_is_supported_hdr_capture, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets/unsets hdr capture progress callback.
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_unset_hdr_capture_progress_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Checks if hdr capture is supported, sets /unsets hdr capture callback
+* @scenario                            Check if hdr capture is supported\n
+*                                              Sets hdr mode\n
+*                                              Sets hdr progress callback\n
+*                                              starts capture\n
+*                                              unset hdr progress callback
+* @apicovered                  camera_attr_is_supported_hdr_capture                                            
+* @passcase                            Pass if camera_attr_set_hdr_capture_progress_cb, camera_attr_unset_hdr_capture_progress_cb and  camera_start_capture pass and callback is invoked.
+* @failcase                            If camera_attr_set_hdr_capture_progress_cb, camera_attr_unset_hdr_capture_progress_cb or camera_start_capture fails, or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_unset_hdr_capture_progress_cb_p(void)
+{
+       START_TEST;
+       bool bRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nRetVal = -1, nCameraTimeoutId = 0;
+       int nSetFailCount = 0, nUnsetFailCount = 0, nStartCaptureFailCount = 0, nCallbackFailCount = 0;
+       
+       bRetVal = camera_attr_is_supported_hdr_capture(g_camera);
+       if ( g_bFeatureCamera == false )
+       {
+               if(bRetVal == true)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] According to feature value from model_config, hdr capture should not be supported, but API says supported \\n", __LINE__);
+                       return 1;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] hdr capture not supported on the device\\n", __LINE__);
+               return 0;
+       }
+       else
+       {
+               if(bRetVal == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] hdr capture not supported on the device\\n", __LINE__);
+                       return 0;
+               }
+       }
+       
+       nRetVal = camera_attr_set_hdr_mode( g_camera,CAMERA_ATTR_HDR_MODE_ENABLE );
+       if ( nRetVal != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_hdr_mode failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+       if ( !(camera_is_supported_media_packet_preview_cb(g_camera)) )
+    {
+            FPRINTF("\\n[Line : %d][Camera_ITc][Not Supported] Media packet preview is not supported on this device \\n", __LINE__);
+            return 0;
+    }
+       nRetVal = camera_start_preview (g_camera);
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_preview failed , error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_set_hdr_capture_progress_cb(g_camera, CameraAttrHdrProgressCB, NULL);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_set_hdr_capture_progress_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+               }
+               
+               nRetVal = camera_start_capture( g_camera, CameraCapturingCB, CameraCapturingCompletedCB, NULL );
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_capture failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStartCaptureFailCount++;
+                       camera_attr_unset_hdr_capture_progress_cb(g_camera);
+               }
+
+               RUN_POLLING_LOOP;
+               
+               if ( g_bCallbackHit == false )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_unset_hdr_capture_progress_cb(g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_unset_hdr_capture_progress_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nUnsetFailCount++;
+               }
+       }
+       
+       if (nSetFailCount > 0 || nStartCaptureFailCount > 0 || nUnsetFailCount > 0 || nCallbackFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] nSetFailCount failed %d times, camera_start_capture failed %d times, camera_attr_unset_hdr_capture_progress_cb failed %d times,callback did not invoke %d times, out of %d times\\n", __LINE__, nSetFailCount, nStartCaptureFailCount, nUnsetFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               camera_stop_preview(g_camera);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_set_hdr_capture_progress_cb, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_attr_unset_hdr_capture_progress_cb, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_set_hdr_capture_progress_cb, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_attr_unset_hdr_capture_progress_cb, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               camera_stop_preview(g_camera);
+               return 0;
+       }
+}
+
+
+//& purpose: Sets and gets capture format. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_get_capture_format_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets capture format
+* @scenario                            Set capture format\n
+*                                              Get capture format
+* @apicovered                  camera_set_capture_format, camera_get_capture_format                                            
+* @passcase                            When camera_set_capture_format and  camera_get_capture_format are successful and set/get values are matched.
+* @failcase                            If target API camera_set_capture_format or camera_get_capture_format fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_get_capture_format_p(void)
+{
+       START_TEST;
+       camera_pixel_format_e eSetVal;// = CAMERA_PIXEL_FORMAT_NV12;
+       camera_pixel_format_e eGetVal;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       
+       g_bCallbackHit = false;
+       nRetVal = camera_foreach_supported_capture_format( g_camera, CameraAttrSupportedCaptureFormatCB, (void*)(&eSetVal)); 
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_foreach_supported_capture_format");
+       
+       if ( nRetVal != CAMERA_ERROR_NONE )
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] capture format supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc]camera_foreach_supported_capture_format failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+       
+       if ( eSetVal != g_eCamPixFmt )
+       {
+               FPRINTF("[Line : %d][Camera_ITc] eSetVal is not properly passed from CB funtion. \\n", __LINE__);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_set_capture_format( g_camera, eSetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc]camera_set_capture_format failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_get_capture_format( g_camera, &eGetVal);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_capture_format failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (eSetVal != eGetVal)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] Set/Get values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_capture_format failed %d times, camera_get_capture_format failed %d times, set/get values mismatch %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_set_capture_format, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_get_capture_format, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_capture_format, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_get_capture_format, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets recommended preview resolution 
+//& type: auto
+/**
+* @testcase                    ITc_camera_get_recommended_preview_resolution_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets recommended preview resolution
+* @scenario                            get recommended preview resolution
+* @apicovered                  camera_get_recommended_preview_resolution
+* @passcase                            When camera_get_recommended_preview_resolution passes
+* @failcase                            If target API camera_get_recommended_preview_resolution fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_get_recommended_preview_resolution_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0;
+       int nGetWidth = 0, nGetHeight = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_get_recommended_preview_resolution(g_camera, &nGetWidth, &nGetHeight);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_get_recommended_preview_resolution", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_recommended_preview_resolution failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] recommended preview resolution : width = %d, height = %d \\n", __LINE__, nGetWidth, nGetHeight);
+               }
+       }
+       
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_recommended_preview_resolution failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_get_recommended_preview_resolution, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_get_recommended_preview_resolution, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Checks if zero shutter lag is supported. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_is_supported_zero_shutter_lag_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Checks if zero shutter lag is supported
+* @scenario                            Check if zero shutter lag is supported
+* @apicovered                  camera_is_supported_zero_shutter_lag                                    
+* @passcase                            Always passes if camera_is_supported_zero_shutter_lag  does not crash, and tells if zero shutter lag is supported or not on the device.
+* @failcase                            If camera_is_supported_zero_shutter_lag crashes or throws exception.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_is_supported_zero_shutter_lag_p(void)
+{
+       START_TEST;
+       bool bRetVal = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               bRetVal = camera_is_supported_zero_shutter_lag(g_camera );
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               if ( g_bFeatureCamera == false )
+               {
+                       if(bRetVal == true)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc]According to feature value from model_config, zero shutter lag should not be supported, but API says supported \\n", __LINE__);
+                               nFailCount++;
+                               continue;
+                       }
+                       else 
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] zero shutter lag is not supported on the device\\n", __LINE__);
+                       }
+               }
+               else 
+               {
+                       /** although feature http://tizen.org/feature/camera, is true, still zero shutter might not be supported */
+                       if ( bRetVal == false )
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] zero shutter lag is not supported on the device\\n", __LINE__);
+                       }
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_is_supported_zero_shutter_lag failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_is_supported_zero_shutter_lag, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_is_supported_zero_shutter_lag, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Checks if face detection is supported. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_is_supported_face_detection_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Checks if face detection is supported
+* @scenario                            Check if face detection is supported
+* @apicovered                  camera_is_supported_face_detection                                      
+* @passcase                            Always passes if camera_is_supported_face_detection  does not crash, and tells if face detection is supported or not on the device.
+* @failcase                            If camera_is_supported_face_detection crashes or throws exception.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_is_supported_face_detection_p(void)
+{
+       START_TEST;
+       bool bRetVal = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               bRetVal = camera_is_supported_face_detection(g_camera );
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               if ( g_bFeatureCamera == false )
+               {
+                       if(bRetVal == true)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc]  According to feature value from model_config, it should not be supported, but API says supported \\n", __LINE__);
+                               nFailCount++;
+                               continue;
+                       }
+                       else 
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] face detection is not supported on the device\\n", __LINE__);
+                       }
+               }
+               else 
+               {
+                       /** camera_is_supported_face_detection required feature http://tizen.org/feature/camera, whose value is true, but is_supported still returns false*/
+                       if ( bRetVal == false )
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] face detection is not supported on the device\\n", __LINE__);
+                       }
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_is_supported_video_stabilization failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_is_supported_video_stabilization, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_is_supported_video_stabilization, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: To check camera start stop continuous capture. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_start_stop_continuous_capture_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Starts and stops camera continuous capture
+* @scenario                            Start preview\n
+*                                              Start continuous capture\n
+*                                              Stop continuous capture\n
+*                                              Stop preview
+* @apicovered                  camera_start_preview, camera_start_continuous_capture, camera_stop_continuous_capture, camera_stop_preview
+* @passcase                            When camera_start_preview, camera_start_continuous_capture, camera_stop_continuous_capture are successful and capturing callback and capturing completed callback are invoked.
+* @failcase                            If camera_start_preview, camera_start_continuous_capture, camera_stop_continuous_capture fails or capturing callback and capturing completed callback are not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_start_stop_continuous_capture_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nStartCaptureFailCount = 0, nStartPreviewFailCount = 0, nStopCaptureFailCount = 0;
+       int nCallbackFailCount = 0;
+       int nCameraTimeoutId = 0;
+
+       bool bRet = camera_is_supported_continuous_capture(g_camera);
+       if ( g_bFeatureCamera == false )
+       {
+               if(bRet == true)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] According to feature value from model_config, continuous capture should not be supported, but API says supported \\n", __LINE__);
+                       return 1;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] continuous capture not supported on the device\\n", __LINE__);
+               return 0;
+       }
+       else
+       {
+               if(bRet == false)
+               {
+                       /** although tizen.org/feature/camera is true in model-config, specific feature continuous capture might not be supported*/
+                       FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] continuous capture not supported on the device\\n", __LINE__);
+                       return 0;
+               }
+       }
+       
+
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCameraCaptureStarted = false;
+               g_bCameraCaptureStopped = false;
+                               
+               nRetVal = camera_start_preview (g_camera);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_preview failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStartPreviewFailCount++;
+                       continue;
+               }
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_start_continuous_capture( g_camera, IMAGECOUNT, IMAGE_INTERVAL, &CameraCapturingCB, &CameraCapturingCompletedCB, NULL);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+                               
+               RUN_POLLING_LOOP;
+                               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_continuous_capture failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStartCaptureFailCount++;
+                       camera_stop_preview(g_camera);
+                       continue;
+               }
+               else if ( g_bCameraCaptureStarted == false || g_bCameraCaptureStopped == false )
+               {
+                       FPRINTF("\\n[Line : %d] callback not invoked on iteration %d\\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+               
+               // If capturing completed, no need to stop
+               if (!g_bCameraCaptureStopped)
+               {
+                       CameraGetMemAllocation();
+                       CameraGetTimeOfDay();
+                       nRetVal = camera_stop_continuous_capture(g_camera);
+                       CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+                       CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+                       if (nRetVal != CAMERA_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_preview failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                               nStopCaptureFailCount++;
+                               continue;
+                       }
+               }
+               
+               camera_stop_preview(g_camera);
+       }
+
+       if ( nStartPreviewFailCount > 0 || nStartCaptureFailCount > 0 || nStopCaptureFailCount)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_preview failed %d times, camera_start_continuous_capture failed %d times, camera_stop_continuous_capture failed %d times out of %d times\\n", __LINE__, nStartPreviewFailCount, nStartCaptureFailCount, nStopCaptureFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_start_continuous_capture, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_stop_continuous_capture, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_start_continuous_capture, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_stop_continuous_capture, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and unsets error cb. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_unset_error_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and unsets error cb
+* @scenario                            Set error cb\n
+*                                              Get error cb
+* @apicovered                  camera_set_error_cb, camera_unset_error_cb                                              
+* @passcase                            When camera_set_error_cb and  camera_unset_error_cb are successful and set/get values are matched.
+* @failcase                            If target API camera_set_error_cb or camera_unset_error_cb fails or set/get values are unmatched.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_unset_error_cb_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_set_error_cb( g_camera, CameraErrorCB, NULL);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_set_error_cb", nSetFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_error_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_unset_error_cb( g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_unset_error_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_error_cb failed %d times, camera_unset_error_cb failed %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_set_error_cb, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_unset_error_cb, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_error_cb, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_unset_error_cb, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Check camera start and cancel focusing . 
+//& type: auto
+/**
+* @testcase                    ITc_camera_start_cancel_focusing_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Starts and cancels camera focusing 
+* @scenario                            Start preview\n
+*                                              Start focusing\n
+*                                              cancel focusing\n
+*                                              cancel preview
+* @apicovered                  camera_start_preview, camera_start_focusing , camera_cancel_focusing, camera_cancel_preview
+* @passcase                            When camera_start_preview, camera_start_focusing , camera_cancel_focusing are successful and capturing callback and capturing completed callback are invoked.
+* @failcase                            If camera_start_preview, camera_start_focusing , camera_cancel_focusing fails or capturing callback and capturing completed callback are not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_start_cancel_focusing_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nStartFocusFailCount = 0, nStartPreviewFailCount = 0, nStopFocusFailCount = 0;
+       camera_attr_af_mode_e eSetAFmode = CAMERA_ATTR_AF_NORMAL;
+       
+       g_bCallbackHit = false;
+       nRetVal = camera_attr_foreach_supported_af_mode(g_camera, CameraAttrSupportedAfModeCB, (void*)(&eSetAFmode));
+       CHECK_UNSUPPORTED_ERROR_RETURN(g_bFeatureCamera, "camera_attr_foreach_supported_af_mode");
+       
+       if ( nRetVal != CAMERA_ERROR_NONE )
+       {
+               if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] exposure not supported on the device \\n", __LINE__);
+                       return 0;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc]camera_attr_foreach_supported_af_mode failed, error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+       else if ( g_bCallbackHit == false || eSetAFmode == CAMERA_ATTR_AF_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc][Not Supported] It gives CAMERA_ATTR_AF_NONE , although camera_attr_foreach_supported_af_mode did not return NOT_SUPPORTED \\n", __LINE__);
+               return 0;
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               nRetVal = camera_start_preview (g_camera);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_preview failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStartPreviewFailCount++;
+                       continue;
+               }
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               //If the result value of camera_start_focusing()</span> with continuous mode true is CAMERA_ERROR_NOT_SUPPORTED, please set second parameter value as false
+
+               nRetVal = camera_start_focusing ( g_camera, false);
+
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_focusing  failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStartFocusFailCount++;
+                       camera_stop_preview(g_camera);
+                       continue;
+               }
+
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_cancel_focusing(g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_preview failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStopFocusFailCount++;
+               }
+               
+               camera_stop_preview(g_camera);
+       }
+       
+       if ( nStartPreviewFailCount > 0 || nStartFocusFailCount > 0 || nStopFocusFailCount)
+       {
+               FPRINTF("\\n[Line : %d] camera_start_preview failed %d times, camera_start_focusing  failed %d times, camera_cancel_focusing failed %d times out of %d times\\n", __LINE__, nStartPreviewFailCount, nStartFocusFailCount, nStopFocusFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_start_focusing , stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_cancel_focusing, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_start_focusing , stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_cancel_focusing, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and unsets focus changed cb. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_set_unset_focus_changed_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and unsets focus changed cb
+* @scenario                            Set focus changed cb\n
+*                                              Get focus changed cb\n
+* @apicovered                  camera_set_focus_changed_cb, camera_unset_focus_changed_cb                                              
+* @passcase                            When camera_set_focus_changed_cb and  camera_unset_focus_changed_cb are successful
+* @failcase                            If target API camera_set_focus_changed_cb or camera_unset_focus_changed_cb fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_set_unset_focus_changed_cb_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_set_focus_changed_cb( g_camera, CameraFocusChangedCB, NULL);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_set_focus_changed_cb", nSetFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_focus_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_unset_focus_changed_cb( g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_unset_focus_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_focus_changed_cb failed %d times, camera_unset_focus_changed_cb failed %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_set_focus_changed_cb, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_unset_focus_changed_cb, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_focus_changed_cb, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_unset_focus_changed_cb, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+
+//& purpose: Sets and unsets interrupt cb. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_set_unset_interrupted_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and unsets interrupt cb
+* @scenario                            Set interrupt cb\n
+*                                              Get interrupt cb
+* @apicovered                  camera_set_interrupted_cb, camera_unset_interrupted_cb                                          
+* @passcase                            When camera_set_interrupted_cb and  camera_unset_interrupted_cb are successful
+* @failcase                            If target API camera_set_interrupted_cb or camera_unset_interrupted_cb fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_set_unset_interrupted_cb_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+               
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       CAMERA_INITIALISE_MEM_LOGS;
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_set_interrupted_cb( g_camera, CameraInterruptedCB, NULL);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_set_interrupted_cb", nSetFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_interrupted_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_unset_interrupted_cb( g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog2);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_unset_interrupted_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nGetFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_interrupted_cb failed %d times, camera_unset_interrupted_cb failed %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_set_interrupted_cb, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_unset_interrupted_cb, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_interrupted_cb, stCameraSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(camera_unset_interrupted_cb, stCameraSpeedMemoryLog.pszMemLog2);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported stream flip. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_foreach_supported_stream_flip_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported stream flip
+* @scenario                            Get supported stream flip
+* @apicovered                  camera_attr_foreach_supported_stream_flip
+* @passcase                            When camera_attr_foreach_supported_stream_flip passes
+* @failcase                            If target API camera_attr_foreach_supported_stream_flip fails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_foreach_supported_stream_flip_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_foreach_supported_stream_flip( g_camera, CameraAttrSupportedStreamFlipCB, NULL); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_foreach_supported_stream_flip", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] stream flip not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_stream_flip failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_stream_flip failed %d times, callback did not invoke %d times out of %d times", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_foreach_supported_stream_flip, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_foreach_supported_stream_flip, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Get supported stream rotation. 
+//& type: auto
+/**
+* @testcase                    ITc_camera_foreach_supported_stream_rotation_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get supported stream rotation
+* @scenario                            Get supported stream rotation
+* @apicovered                  camera_attr_foreach_supported_stream_rotation
+* @passcase                            When camera_attr_foreach_supported_stream_rotation passes
+* @failcase                            If target API camera_attr_foreach_supported_stream_rotation fails or callback is not invoked.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_foreach_supported_stream_rotation_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nFailCount = 0, nCallbackFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               
+               CameraGetMemAllocation();
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_attr_foreach_supported_stream_rotation( g_camera, CameraAttrSupportedStreamRotationCB, NULL); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_attr_foreach_supported_stream_rotation", nFailCount);
+                               
+               if ( nRetVal != CAMERA_ERROR_NONE )
+               {
+                       if (nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc][NOT SUPPORTED] stream rotation not supported on the device \\n", __LINE__);
+                               continue;
+                       }
+                       
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_foreach_supported_stream_rotation failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nFailCount++;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc]callback did not invoke  on iteration %d \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc]camera_foreach_supported_stream_rotation failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_foreach_supported_stream_rotation, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_foreach_supported_stream_rotation, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Checks if auto_contrast is supported. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_attr_is_supported_auto_contrast_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Checks if auto_contrast is supported
+* @scenario                            Check if auto_contrast is supported
+* @apicovered                  camera_attr_is_supported_auto_contrast                                          
+* @passcase                            Always pass if API does not crash, just prints if auto contrast is supported or not.
+* @failcase                            If camera_attr_is_supported_auto_contrast crashes or throws exception.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_attr_is_supported_auto_contrast_p(void)
+{
+       START_TEST;
+       bool bRetVal = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               bRetVal = camera_attr_is_supported_auto_contrast(g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               if ( g_bFeatureCamera == false )
+               {
+                       if(bRetVal == true)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] According to feature value from model_config, auto contrast should not be supported, but API says supported \\n", __LINE__);
+                               nFailCount++;
+                               continue;
+                       }
+                       else 
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] auto contrast is not supported on the device\\n", __LINE__);
+                       }
+               }
+               else 
+               {
+                       if ( bRetVal == false )
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] According to feature value from model_config, auto contrast should be supported, but API says not supported \\n", __LINE__);
+                       }
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_attr_is_supported_auto_contrast failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_attr_is_supported_auto_contrast, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_attr_is_supported_auto_contrast, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Checks if continuous_capture is supported. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_is_supported_continuous_capture_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Checks if continuous_capture is supported
+* @scenario                            Check if continuous_capture is supported
+* @apicovered                  camera_is_supported_continuous_capture                                          
+* @passcase                            Always pass if API does not crash, just prints if anti shake is supported or not.
+* @failcase                            If camera_is_supported_continuous_capture crashes or throws exception.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_is_supported_continuous_capture_p(void)
+{
+       START_TEST;
+       bool bRetVal = -1, nLoopCount = 0;
+       int nFailCount= 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               bRetVal = camera_is_supported_continuous_capture(g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               if ( g_bFeatureCamera == false )
+               {
+                       if(bRetVal == true)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] According to feature value from model_config, continuous_capture should not be supported, but API says supported \\n", __LINE__);
+                               nFailCount++;
+                               continue;
+                       }
+                       else 
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] continuous_capture is not supported on the device\\n", __LINE__);
+                       }
+               }
+               else 
+               {
+                       /** although feature http://tizen.org/feature/camera, is true, still continuous capture might not be supported*/
+                       if ( bRetVal == false )
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] continuous_capture is not supported on the device\\n", __LINE__);
+                       }
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_is_supported_continuous_capture failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_is_supported_continuous_capture, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_is_supported_continuous_capture, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets and unset media packet cb. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_set_unset_media_packet_preview_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and unset media packet cb
+* @scenario                            Set media packet cb\n
+*                                              Get media packet cb
+* @apicovered                  camera_is_supported_media_packet_preview_cb, camera_set_media_packet_preview_cb, camera_start_preview, camera_stop_preview,camera_unset_media_packet_preview_cb                                         
+* @passcase                            When camera_set_media_packet_preview_cb, camera_start_preview, camera_stop_preview and  camera_unset_media_packet_preview_cb are successful
+* @failcase                            If target API camera_set_media_packet_preview_cb or camera_unset_media_packet_preview_cb fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_set_unset_media_packet_preview_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0, nCameraTimeoutId = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nStartFailCount = 0, nSetCbFailCount = 0, nStopFailCount = 0, nUnsetCbFailCount = 0;
+       int nCallbackFailCount = 0;
+       char *pszSetCBSpeedLog = NULL, *pszUnsetCBSpeedLog = NULL;
+
+       bool bRet = camera_is_supported_media_packet_preview_cb(g_camera );
+       if ( g_bFeatureCamera == false )
+       {
+               if(bRet == true)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] According to feature value from model_config, media packet preview should not be supported, but API says supported \\n", __LINE__);
+                       return 1;
+               }
+               
+               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] media packet preview not supported on the device\\n", __LINE__);
+               return 0;
+       }
+       else 
+       {
+               if(bRet == false)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] media packet preview not supported on the device\\n", __LINE__);
+                       return 0;
+               }
+       }
+       
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+       pszSetCBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetCBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_set_media_packet_preview_cb(g_camera, CameraMediaPacketCB, NULL);
+               
+               CameraExecutionDelay(pszSetCBSpeedLog);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_media_packet_preview_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetCbFailCount++;
+                       continue;
+               }
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_start_preview (g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_preview failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStartFailCount++;
+                       camera_unset_media_packet_preview_cb(g_camera);
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               
+               if ( g_bCallbackHit == false)
+               {
+                       nCallbackFailCount++;
+               }
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_stop_preview(g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+                               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_stop_preview failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStopFailCount++;
+               }
+               
+               CameraGetTimeOfDay();
+               nRetVal = camera_unset_media_packet_preview_cb(g_camera);
+               CameraExecutionDelay(pszUnsetCBSpeedLog);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_unset_media_packet_preview_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nUnsetCbFailCount++;
+               }
+               
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+       }
+       
+       if ( nStartFailCount > 0 || nStopFailCount > 0 || nCallbackFailCount > 0 || nSetCbFailCount > 0 || nUnsetCbFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_media_packet_preview_cb failed %d times, camera_start_preview failed %d times, camera_stop_preview failed %d times,camera_unset_media_packet_preview_cb failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nSetCbFailCount, nStartFailCount, nStopFailCount, nUnsetCbFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+#if SPEED_CHECK
+               if ( pszSetCBSpeedLog != NULL)
+               {
+                       free(pszSetCBSpeedLog); pszSetCBSpeedLog = NULL;
+               }
+               if ( pszUnsetCBSpeedLog != NULL)
+               {
+                       free(pszUnsetCBSpeedLog); pszUnsetCBSpeedLog = NULL;
+               }
+#endif
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_start_preview, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_stop_preview, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_SPEED_LOG(camera_set_media_packet_preview_cb, pszSetCBSpeedLog);
+               PRINT_SPEED_LOG(camera_unset_media_packet_preview_cb, pszUnsetCBSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_unset_media_packet_preview_cb, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               if ( pszSetCBSpeedLog != NULL)
+               {
+                       free(pszSetCBSpeedLog); pszSetCBSpeedLog = NULL;
+               }
+               if ( pszUnsetCBSpeedLog != NULL)
+               {
+                       free(pszUnsetCBSpeedLog); pszUnsetCBSpeedLog = NULL;
+               }
+               return 0;
+       }
+}
+
+//& purpose: Gets the media packet preview callback feature's supported state
+//& type: auto
+/**
+* @testcase                    ITc_camera_is_supported_media_packet_preview_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets the media packet preview callback feature's supported state
+* @scenario                            Gets the media packet preview callback feature's supported state
+* @apicovered                  camera_is_supported_media_packet_preview_cb
+* @passcase                            When camera_is_supported_media_packet_preview_cb does not crash, it just tells if media preview is supported or not
+* @failcase                            If target API camera_is_supported_media_packet_preview_cb crashes.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_is_supported_media_packet_preview_cb_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       int nFailCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       bool bRetVal = false;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {       
+               CameraGetMemAllocation();       
+               CameraGetTimeOfDay();
+               bRetVal = camera_is_supported_media_packet_preview_cb( g_camera); 
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               
+               if ( g_bFeatureCamera == false )
+               {
+                       if(bRetVal == true)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] According to feature value from model_config, media_packet_preview should not be supported, but API says supported \\n", __LINE__);
+                               nFailCount++;
+                               continue;
+                       }
+                       else 
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] media_packet_preview is not supported on the device\\n", __LINE__);
+                       }
+               }
+               else 
+               {
+                       if ( bRetVal == false )
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] [Not supported] According to feature value from model_config, media_packet_preview should be supported, but API says not supported \\n", __LINE__);
+                       }
+               }
+       }
+       
+       if ( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_is_supported_media_packet_preview_cb failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_is_supported_media_packet_preview_cb, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_is_supported_media_packet_preview_cb, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Sets display. 
+//& type: auto 
+/**
+* @testcase                    ITc_camera_set_display_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and gets zoom 
+* @scenario                            Sets display 
+* @apicovered                  camera_set_display
+* @passcase                            When camera_set_display is successful
+* @failcase                            If target API camera_set_display fails
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_set_display_p(void)
+{
+       START_TEST;
+       camera_display_type_e eSetDispType = CAMERA_DISPLAY_TYPE_NONE;
+       
+       int nRetVal = -1, nLoopCount = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nSetFailCount = 0;
+       
+#if SPEED_CHECK
+       stCameraSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_set_display (g_camera, eSetDispType,0);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_set_display", nSetFailCount);
+               
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_display  failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_display failed %d times, out of %d times\\n", __LINE__, nSetFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {                       
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_set_display , stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_display , stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+               CAMERA_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+ //& purpose:  To check face detection functionality
+//& type: auto 
+/**
+* @testcase                    ITc_camera_start_stop_face_detection_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 to check face detection functionality for camera
+* @scenario                            set preview callback \n
+*                                              start preview \n
+*                                              start face detection through invoking api call \n
+*                                              stop face detection through invoking api call \n
+*                                              stop preview \n
+*                                              unset preview format
+* @apicovered                  camera_set_preview_cb, camera_start_preview, camera_stop_preview, camera_unset_preview_cb, camera_start_face_detection , camera_stop_face_detection                                     
+* @passcase                            When camera_set_preview_cb, camera_start_preview, camera_stop_preview, camera_unset_preview_cb , camera_start_face_detection , camera_stop_face_detection and  preview callback is invoked.
+* @failcase                            If target camera_start_face_detection , camera_stop_face_detection or any precondition api fails.
+* @precondition                        Camera handle must be created
+* @postcondition               Camera handle must be released
+*/
+int ITc_camera_start_stop_face_detection_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0, nCameraTimeoutId = 0;
+       CameraSpeedMemoryLog stCameraSpeedMemoryLog;
+       memset(&stCameraSpeedMemoryLog, 0, sizeof(stCameraSpeedMemoryLog));
+       int nStartFailCount = 0, nSetCbFailCount = 0, nStopFailCount = 0, nUnsetCbFailCount = 0 , nStartFaceDetectionFailCount = 0 , nStopFaceDetectionFailCount = 0;
+       int nCallbackFailCount = 0 , nCallbackFaceDetectionCount = 0;
+       char *pszSetCBSpeedLog = NULL, *pszUnsetCBSpeedLog = NULL ,*pszFaceDetectStartSpeedLog = NULL , *pszFaceDetectStopSpeedLog = NULL ;
+       bool b_face_detection_supported = false;
+
+#if SPEED_CHECK
+       CAMERA_INITIALISE_SPEED_LOGS;
+       pszSetCBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetCBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszFaceDetectStartSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszFaceDetectStopSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       stCameraSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+
+               CameraGetMemAllocation();
+               CameraGetTimeOfDay();
+               nRetVal = camera_set_preview_cb(g_camera, CameraPreviewCB, NULL);
+               CameraExecutionDelay(pszSetCBSpeedLog);
+
+               CHECK_UNSUPPORTED_ERROR_CONTINUE(g_bFeatureCamera, "camera_set_preview_cb", nSetCbFailCount);
+
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_preview_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nSetCbFailCount++;
+                       continue;
+               }
+
+               CameraGetTimeOfDay();
+               nRetVal = camera_start_preview (g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+
+               RUN_POLLING_LOOP;
+
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_preview failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStartFailCount++;
+                       camera_unset_preview_cb(g_camera);
+                       continue;
+               }
+               else if ( g_bCallbackHit == false)
+               {
+                       nCallbackFailCount++;
+               }
+
+               /* start and stop face detection */
+
+               b_face_detection_supported = camera_is_supported_face_detection(g_camera);
+
+               if(b_face_detection_supported) {
+
+                       g_bCallbackHit = false;
+                       CameraGetTimeOfDay();
+                       nRetVal = camera_start_face_detection(g_camera, CameraFaceDetectionCB , NULL);
+                       CameraExecutionDelay(pszFaceDetectStartSpeedLog);
+                       if(nRetVal != CAMERA_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_face_detection failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                               nStartFaceDetectionFailCount++;
+                       }
+                       /*RUN_POLLING_LOOP;
+
+                       if ( g_bCallbackHit == false)
+                       {
+                                nCallbackFaceDetectionCount++;
+                       }*/
+
+                       CameraGetTimeOfDay();
+                       nRetVal  = camera_stop_face_detection(g_camera);
+                       CameraExecutionDelay(pszFaceDetectStopSpeedLog);
+                       if(nRetVal != CAMERA_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] camera_stop_face_detection failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                               nStopFaceDetectionFailCount++;
+                       }
+
+               } else {
+                       // if face detection not supported then checking for expected error
+                       nRetVal = camera_start_face_detection(g_camera,CameraFaceDetectionCB, NULL);
+                       if(nRetVal == CAMERA_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Camera_ITc] camera_start_face_detection failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       }
+               }
+
+               /* start and stop face detection */
+
+               CameraGetTimeOfDay();
+               nRetVal = camera_stop_preview(g_camera);
+               CameraExecutionDelay(stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_stop_preview failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nStopFailCount++;
+               }
+
+               CameraGetTimeOfDay();
+               nRetVal = camera_unset_preview_cb(g_camera);
+               CameraExecutionDelay(pszUnsetCBSpeedLog);
+
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_unset_preview_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, CameraGetError(nRetVal));
+                       nUnsetCbFailCount++;
+               }
+
+               CameraGetMemStatus(stCameraSpeedMemoryLog.pszMemLog1);
+       }
+
+       if ( nStartFailCount > 0 || nStopFailCount > 0 || nCallbackFailCount > 0 || nSetCbFailCount > 0 || nUnsetCbFailCount > 0 ||nCallbackFaceDetectionCount > 0 ||nStopFaceDetectionFailCount > 0 ||nStartFaceDetectionFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_preview_cb failed %d times, camera_start_preview failed %d times, camera_stop_preview failed %d times,camera_unset_preview_cb failed %d times, callback did not invoke %d times out of %d times\\n", __LINE__, nSetCbFailCount, nStartFailCount, nStopFailCount, nUnsetCbFailCount, nCallbackFailCount, MAX_COUNT);
+               CAMERA_DEINITIALISE_LOGS;
+#if SPEED_CHECK
+               if ( pszSetCBSpeedLog != NULL)
+               {
+                       free(pszSetCBSpeedLog); pszSetCBSpeedLog = NULL;
+               }
+               if ( pszUnsetCBSpeedLog != NULL)
+               {
+                       free(pszUnsetCBSpeedLog); pszUnsetCBSpeedLog = NULL;
+               }
+               if ( pszFaceDetectStopSpeedLog != NULL)
+               {
+                       free(pszFaceDetectStopSpeedLog); pszFaceDetectStopSpeedLog = NULL;
+               }
+               if ( pszFaceDetectStartSpeedLog != NULL)
+               {
+                       free(pszFaceDetectStartSpeedLog); pszFaceDetectStartSpeedLog = NULL;
+               }
+#endif
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(camera_start_preview, stCameraSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(camera_stop_preview, stCameraSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_SPEED_LOG(camera_stop_face_detection, pszFaceDetectStopSpeedLog);
+               PRINT_SPEED_LOG(camera_start_face_detection, pszFaceDetectStartSpeedLog);
+               PRINT_SPEED_LOG(camera_set_preview_cb, pszSetCBSpeedLog);
+               PRINT_SPEED_LOG(camera_unset_preview_cb, pszUnsetCBSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(camera_set_unset_previe_cb_start_stop_preview, stCameraSpeedMemoryLog.pszMemLog1);
+#endif
+
+               CAMERA_DEINITIALISE_LOGS;
+#if SPEED_CHECK
+               if ( pszSetCBSpeedLog != NULL)
+               {
+                       free(pszSetCBSpeedLog); pszSetCBSpeedLog = NULL;
+               }
+               if ( pszUnsetCBSpeedLog != NULL)
+               {
+                       free(pszUnsetCBSpeedLog); pszUnsetCBSpeedLog = NULL;
+               }
+               if ( pszFaceDetectStopSpeedLog != NULL)
+               {
+                       free(pszFaceDetectStopSpeedLog); pszFaceDetectStopSpeedLog = NULL;
+               }
+
+               if ( pszFaceDetectStartSpeedLog != NULL)
+               {
+                       free(pszFaceDetectStartSpeedLog); pszFaceDetectStartSpeedLog = NULL;
+               }
+#endif
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: To check visible properties of camera
+/**
+ * @testcase                           ITc_camera_set_display_visible_p
+ * @since_tizen                                2.3.1
+ * @type                                       auto
+ * @description                                to check visible properties of camera
+ * @scenario                           set visible properties of camera \n
+ *                                                     get visible properties of camera
+ * @apicovered                         camera_set_display_visible, camera_is_display_visible
+ * @passcase                           When camera_set_display_visible and  camera_is_display_visible are successful and set/get values are matched.
+ * @failcase                           If target api camera_set_display_visible or camera_is_display_visible fails or set/get values are unmatched.
+ * @precondition                       Camera handle must be created
+ * @postcondition                      Camera handle must be released
+ */
+int ITc_camera_set_display_visible_p(void)
+{
+       START_TEST;
+
+       int nRetVal = 0; // to check return value
+       bool  b_set_value = true , b_get_value = false;
+
+       nRetVal = camera_set_display_visible( g_camera, b_set_value);
+
+       if(nRetVal != CAMERA_ERROR_NONE ){
+               if(g_bFeatureCamera == false && nRetVal == TIZEN_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("[Line : %d][Camera_ITc] %s API call correctly returned %s error for unsupported feature", __LINE__, "camera_set_display_visible", CameraGetError(nRetVal));
+                       return 0;
+               }
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_display_visible failed on error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+
+
+       nRetVal = camera_is_display_visible( g_camera, &b_get_value);
+       if (nRetVal != CAMERA_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_is_display_visible failed on , error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+
+
+       if (b_set_value != b_get_value)
+       {
+               FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_display_visible failed on , error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: To check display flip of camera
+/**
+ * @testcase                           ITc_camera_set_get_display_flip_p
+ * @since_tizen                                2.3.1
+ * @type                                       auto
+ * @description                                To check display flip of camera
+ * @scenario                           set display flip of camera \n
+ *                                                     get display flip of camera
+ * @apicovered                         camera_set_display_flip, camera_get_display_flip
+ * @passcase                           When camera_set_display_flip and  camera_get_display_flip are successful and set/get values are matched.
+ * @failcase                           If target api camera_get_display_flip or camera_set_display_flip fails or set/get values are unmatched.
+ * @precondition                       Camera handle must be created
+ * @postcondition                      Camera handle must be released
+ *
+ */
+int ITc_camera_set_get_display_flip_p(void)
+{
+       START_TEST;
+
+       int nRetVal = 0 , count = 0; // to check return value
+       camera_flip_e  e_default_flip = 0 , e_set_flip = 0 , e_get_flip = 0;
+
+       // default flip value
+       nRetVal = camera_get_display_flip( g_camera, &e_default_flip);
+
+       camera_flip_e flipvalues[] = {CAMERA_FLIP_NONE , CAMERA_FLIP_HORIZONTAL , CAMERA_FLIP_VERTICAL , CAMERA_FLIP_BOTH };
+
+       for(count = 0 ; count < 4 ; count++){
+               e_set_flip = flipvalues[count];
+               nRetVal = camera_set_display_flip( g_camera, e_set_flip);
+
+               if(nRetVal != CAMERA_ERROR_NONE ){
+                       if(g_bFeatureCamera == false && nRetVal == TIZEN_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("[Line : %d][Camera_ITc] %s API call correctly returned %s error for unsupported feature", __LINE__, "camera_set_display_flip", CameraGetError(nRetVal));
+                               return 0;
+                       }
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_display_flip failed for flip : %s, error returned = %s \\n", __LINE__, CameraGetFlip(e_set_flip), CameraGetError(nRetVal));
+                       return 1;
+               }
+
+
+               nRetVal = camera_get_display_flip( g_camera, &e_get_flip);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_display_flip failed on , error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+                       return 1;
+               }
+
+
+               if (e_set_flip != e_get_flip)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_get_display_flip failed on , mismatch in values set:get ::%s:%s \\n", __LINE__, CameraGetFlip(e_set_flip) , CameraGetFlip(e_get_flip));
+                       return 1;
+               }
+       }
+
+
+       // restoring default flip value
+       nRetVal = camera_set_display_flip( g_camera, e_default_flip);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To check display mode of camera
+/**
+ * @testcase                           ITc_camera_set_get_display_mode_p
+ * @since_tizen                                2.3.1
+ * @type                                       auto
+ * @description                                To check display mode of camera
+ * @scenario                           set display mode of camera \n
+ *                                                     get display mode of camera
+ * @apicovered                         camera_set_display_mode, camera_get_display_mode
+ * @passcase                           When camera_set_display_mode and  camera_get_display_mode are successful and set/get values are matched.
+ * @failcase                           If target api camera_get_display_mode or camera_set_display_mode fails or set/get values are unmatched.
+ * @precondition                       Camera handle must be created
+ * @postcondition                      Camera handle must be released
+ *
+ */
+int ITc_camera_set_get_display_mode_p(void)
+{
+       START_TEST;
+
+       int nRetVal = 0 , count = 0; // to check return value
+       camera_display_mode_e  e_default_mode = 0 , e_set_mode = 0 , e_get_mode = 0;
+
+       // default flip value
+       nRetVal = camera_get_display_mode( g_camera, &e_default_mode);
+
+       camera_display_mode_e modevalues[] = {CAMERA_DISPLAY_MODE_LETTER_BOX , CAMERA_DISPLAY_MODE_ORIGIN_SIZE , CAMERA_DISPLAY_MODE_FULL , CAMERA_DISPLAY_MODE_CROPPED_FULL };
+
+       for(count = 0 ; count < 4 ; count++){
+               e_set_mode = modevalues[count];
+               nRetVal = camera_set_display_mode( g_camera, e_set_mode);
+
+               if(nRetVal != CAMERA_ERROR_NONE ){
+                       if(g_bFeatureCamera == false && nRetVal == TIZEN_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("[Line : %d][Camera_ITc] %s API call correctly returned %s error for unsupported feature", __LINE__, "camera_set_display_mode", CameraGetError(nRetVal));
+                               return 0;
+                       }
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_display_mode failed for mode : %s, error returned = %s \\n", __LINE__, CameraGetMode(e_set_mode), CameraGetError(nRetVal));
+                       return 1;
+               }
+
+
+               nRetVal = camera_get_display_mode( g_camera, &e_get_mode);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_display_mode failed on , error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+                       return 1;
+               }
+
+
+               if (e_set_mode != e_get_mode)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_get_display_mode failed on , mismatch in values set:get ::%s:%s \\n", __LINE__, CameraGetMode(e_set_mode) , CameraGetMode(e_get_mode));
+                       return 1;
+               }
+       }
+
+
+       // restoring default mode value
+       nRetVal = camera_set_display_mode( g_camera, e_default_mode);
+       return 0;
+}
+
+
+//& type: auto
+//& purpose: To check display rotation of camera
+/**
+ * @testcase                           ITc_camera_set_get_display_rotation_p
+ * @since_tizen                                2.3.1
+ * @type                                       auto
+ * @description                                To check display rotation of camera
+ * @scenario                           set display rotation of camera \n
+ *                                                     get display rotation of camera
+ * @apicovered                         camera_set_display_rotation, camera_get_display_rotation
+ * @passcase                           When camera_set_display_rotation and  camera_get_display_rotation are successful and set/get values are matched.
+ * @failcase                           If target api camera_set_display_rotation or camera_get_display_rotation fails or set/get values are unmatched.
+ * @precondition                       Camera handle must be created
+ * @postcondition                      Camera handle must be released
+ *
+ */
+int ITc_camera_set_get_display_rotation_p(void)
+{
+       START_TEST;
+
+       int nRetVal = 0 , count = 0; // to check return value
+       camera_rotation_e  e_default_rotation = 0 , e_set_rotation = 0 , e_get_rotation = 0;
+
+       // default flip value
+       nRetVal = camera_get_display_rotation( g_camera, &e_default_rotation);
+
+       camera_rotation_e ratationvalues[] = {CAMERA_ROTATION_NONE , CAMERA_ROTATION_90 , CAMERA_ROTATION_180 , CAMERA_ROTATION_270 };
+
+       for(count = 0 ; count < 4 ; count++){
+               e_set_rotation = ratationvalues[count];
+               nRetVal = camera_set_display_rotation( g_camera, e_set_rotation);
+
+               if(nRetVal != CAMERA_ERROR_NONE ){
+                       if(g_bFeatureCamera == false && nRetVal == TIZEN_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("[Line : %d][Camera_ITc] %s API call correctly returned %s error for unsupported feature", __LINE__, "camera_set_display_rotation", CameraGetError(nRetVal));
+                               return 0;
+                       }
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_display_rotation failed for rotation : %s, error returned = %s \\n", __LINE__, CameraGetRotation(e_set_rotation), CameraGetError(nRetVal));
+                       return 1;
+               }
+
+
+               nRetVal = camera_get_display_rotation( g_camera, &e_get_rotation);
+               if (nRetVal != CAMERA_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_get_display_rotation failed on , error returned = %s \\n", __LINE__, CameraGetError(nRetVal));
+                       return 1;
+               }
+
+
+               if (e_set_rotation != e_get_rotation)
+               {
+                       FPRINTF("\\n[Line : %d][Camera_ITc] camera_set_get_display_rotation failed on , mismatch in values set:get ::%s:%s \\n", __LINE__, CameraGetRotation(e_set_rotation) , CameraGetRotation(e_get_rotation));
+                       return 1;
+               }
+       }
+
+
+       // restoring default rotation value
+       nRetVal = camera_set_display_rotation( g_camera, e_default_rotation);
+       return 0;
+}
+
+/** @} */ 
+/** @} */
diff --git a/src/itc/camera/tct-camera-native.c b/src/itc/camera/tct-camera-native.c
new file mode 100755 (executable)
index 0000000..068de51
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-camera-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/camera/tct-camera-native.h b/src/itc/camera/tct-camera-native.h
new file mode 100755 (executable)
index 0000000..8f84a45
--- /dev/null
@@ -0,0 +1,185 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CAMERA_NATIVE_H__
+#define __TCT_CAMERA_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_camera_startup(void);
+extern void ITs_camera_cleanup(void);
+
+extern int ITc_camera_attr_enable_is_enabled_antishake_p(void);
+extern int ITc_camera_attr_set_get_exposure_p(void);
+extern int ITc_camera_attr_set_get_tag_image_description_p(void);
+extern int ITc_camera_attr_set_get_preview_fps_p(void);
+extern int ITc_camera_attr_set_get_af_mode_p(void);
+extern int ITc_camera_attr_set_get_brightness_p(void);
+extern int ITc_camera_attr_set_get_contrast_p(void);
+extern int ITc_camera_attr_set_get_effect_p(void);
+extern int ITc_camera_attr_set_get_exposure_mode_p(void);
+extern int ITc_camera_attr_set_get_remove_geotag_p(void);
+extern int ITc_camera_attr_set_get_hdr_mode_p(void);
+extern int ITc_camera_attr_set_get_iso_p(void);
+extern int ITc_camera_attr_set_get_scene_mode_p(void);
+extern int ITc_camera_attr_get_contrast_range_p(void);
+extern int ITc_camera_attr_set_get_image_quality_p(void);
+extern int ITc_camera_attr_set_get_stream_flip_p(void);
+extern int ITc_camera_attr_set_get_stream_rotation_p(void);
+extern int ITc_camera_attr_set_get_tag_orientation_p(void);
+extern int ITc_camera_attr_set_get_tag_software_p(void);
+extern int ITc_camera_attr_set_get_theater_mode_p(void);
+extern int ITc_camera_attr_set_get_whitebalance_p(void);
+extern int ITc_camera_attr_set_get_zoom_p(void);
+extern int ITc_camera_attr_get_zoom_range_p(void);
+extern int ITc_camera_attr_get_lens_orientation_p(void);
+extern int ITc_camera_attr_get_exposure_range_p(void);
+extern int ITc_camera_attr_set_get_flash_mode_p(void);
+extern int ITc_camera_attr_get_brightness_range_p(void);
+extern int ITc_camera_attr_set_clear_af_area_p(void);
+extern int ITc_camera_attr_is_supported_antishake_p(void);
+extern int ITc_camera_attr_enable_is_enabled_auto_contrast_p(void);
+extern int ITc_camera_attr_enable_is_enabled_tag_p(void);
+extern int ITc_camera_attr_enable_is_enabled_video_stabilization_p(void);
+extern int ITc_camera_attr_is_supported_video_stabilization_p(void);
+extern int ITc_camera_create_destroy_p(void);
+extern int ITc_camera_get_device_count_p(void);
+extern int ITc_camera_attr_disable_shutter_sound_p(void);
+extern int ITc_camera_set_unset_state_change_cb_p(void);
+extern int ITc_camera_get_state_p(void);
+extern int ITc_camera_attr_for_each_supported_af_mode_p(void);
+extern int ITc_camera_attr_for_each_supported_effect_p(void);
+extern int ITc_camera_attr_foreach_supported_exposure_mode_p(void);
+extern int ITc_camera_attr_foreach_supported_flash_mode_p(void);
+extern int ITc_camera_attr_foreach_supported_fps_p(void);
+extern int ITc_camera_attr_foreach_supported_iso_p(void);
+extern int ITc_camera_attr_foreach_supported_scene_mode_p(void);
+extern int ITc_camera_attr_foreach_supported_whitebalance_p(void);
+extern int ITc_camera_foreach_supported_capture_format_p(void);
+extern int ITc_camera_foreach_supported_capture_resolution_p(void);
+extern int ITc_camera_foreach_supported_preview_resolution_p(void);
+extern int ITc_camera_foreach_supported_preview_format_p(void);
+extern int ITc_camera_set_get_preview_resolution_p(void);
+extern int ITc_camera_set_get_capture_resolution_p(void);
+extern int ITc_camera_start_stop_preview_set_unset_preview_cb_p(void);
+extern int ITc_camera_start_capture_p(void);
+extern int ITc_camera_set_get_preview_format_p(void);
+extern int ITc_camera_attr_is_supported_hdr_capture_p(void);
+extern int ITc_camera_attr_set_unset_hdr_capture_progress_cb_p(void);
+extern int ITc_camera_attr_set_get_capture_format_p(void);
+extern int ITc_camera_get_recommended_preview_resolution_p(void);
+extern int ITc_camera_is_supported_zero_shutter_lag_p(void);
+extern int ITc_camera_is_supported_face_detection_p(void);
+extern int ITc_camera_start_stop_continuous_capture_p(void);
+extern int ITc_camera_attr_set_unset_error_cb_p(void);
+extern int ITc_camera_start_cancel_focusing_p(void);
+extern int ITc_camera_set_unset_focus_changed_cb_p(void);
+extern int ITc_camera_attr_set_unset_interrupted_cb_p(void);
+extern int ITc_camera_foreach_supported_stream_flip_p(void);
+extern int ITc_camera_foreach_supported_stream_rotation_p(void);
+extern int ITc_camera_attr_is_supported_auto_contrast_p(void);
+extern int ITc_camera_is_supported_continuous_capture_p(void);
+extern int ITc_camera_set_unset_media_packet_preview_cb_p(void);
+extern int ITc_camera_is_supported_media_packet_preview_cb_p(void);
+extern int ITc_camera_set_display_p(void);
+extern int ITc_camera_start_stop_face_detection_p(void);
+extern int ITc_camera_set_display_visible_p(void);
+extern int ITc_camera_set_get_display_flip_p(void);
+extern int ITc_camera_set_get_display_mode_p(void);
+extern int ITc_camera_set_get_display_rotation_p(void);
+
+testcase tc_array[] = {
+    {"ITc_camera_attr_enable_is_enabled_antishake_p", ITc_camera_attr_enable_is_enabled_antishake_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_exposure_p", ITc_camera_attr_set_get_exposure_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_tag_image_description_p", ITc_camera_attr_set_get_tag_image_description_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_preview_fps_p", ITc_camera_attr_set_get_preview_fps_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_af_mode_p", ITc_camera_attr_set_get_af_mode_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_brightness_p", ITc_camera_attr_set_get_brightness_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_contrast_p", ITc_camera_attr_set_get_contrast_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_effect_p", ITc_camera_attr_set_get_effect_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_exposure_mode_p", ITc_camera_attr_set_get_exposure_mode_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_remove_geotag_p", ITc_camera_attr_set_get_remove_geotag_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_hdr_mode_p", ITc_camera_attr_set_get_hdr_mode_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_iso_p", ITc_camera_attr_set_get_iso_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_scene_mode_p", ITc_camera_attr_set_get_scene_mode_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_get_contrast_range_p", ITc_camera_attr_get_contrast_range_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_image_quality_p", ITc_camera_attr_set_get_image_quality_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_stream_flip_p", ITc_camera_attr_set_get_stream_flip_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_stream_rotation_p", ITc_camera_attr_set_get_stream_rotation_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_tag_orientation_p", ITc_camera_attr_set_get_tag_orientation_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_tag_software_p", ITc_camera_attr_set_get_tag_software_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_theater_mode_p", ITc_camera_attr_set_get_theater_mode_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_whitebalance_p", ITc_camera_attr_set_get_whitebalance_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_zoom_p", ITc_camera_attr_set_get_zoom_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_get_zoom_range_p", ITc_camera_attr_get_zoom_range_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_get_lens_orientation_p", ITc_camera_attr_get_lens_orientation_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_get_exposure_range_p", ITc_camera_attr_get_exposure_range_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_flash_mode_p", ITc_camera_attr_set_get_flash_mode_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_get_brightness_range_p", ITc_camera_attr_get_brightness_range_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_clear_af_area_p", ITc_camera_attr_set_clear_af_area_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_is_supported_antishake_p", ITc_camera_attr_is_supported_antishake_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_enable_is_enabled_auto_contrast_p", ITc_camera_attr_enable_is_enabled_auto_contrast_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_enable_is_enabled_tag_p", ITc_camera_attr_enable_is_enabled_tag_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_enable_is_enabled_video_stabilization_p", ITc_camera_attr_enable_is_enabled_video_stabilization_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_is_supported_video_stabilization_p", ITc_camera_attr_is_supported_video_stabilization_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_create_destroy_p", ITc_camera_create_destroy_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_get_device_count_p", ITc_camera_get_device_count_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_disable_shutter_sound_p", ITc_camera_attr_disable_shutter_sound_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_set_unset_state_change_cb_p", ITc_camera_set_unset_state_change_cb_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_get_state_p", ITc_camera_get_state_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_for_each_supported_af_mode_p", ITc_camera_attr_for_each_supported_af_mode_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_for_each_supported_effect_p", ITc_camera_attr_for_each_supported_effect_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_foreach_supported_exposure_mode_p", ITc_camera_attr_foreach_supported_exposure_mode_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_foreach_supported_flash_mode_p", ITc_camera_attr_foreach_supported_flash_mode_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_foreach_supported_fps_p", ITc_camera_attr_foreach_supported_fps_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_foreach_supported_iso_p", ITc_camera_attr_foreach_supported_iso_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_foreach_supported_scene_mode_p", ITc_camera_attr_foreach_supported_scene_mode_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_foreach_supported_whitebalance_p", ITc_camera_attr_foreach_supported_whitebalance_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_foreach_supported_capture_format_p", ITc_camera_foreach_supported_capture_format_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_foreach_supported_capture_resolution_p", ITc_camera_foreach_supported_capture_resolution_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_foreach_supported_preview_resolution_p", ITc_camera_foreach_supported_preview_resolution_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_foreach_supported_preview_format_p", ITc_camera_foreach_supported_preview_format_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_set_get_preview_resolution_p", ITc_camera_set_get_preview_resolution_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_set_get_capture_resolution_p", ITc_camera_set_get_capture_resolution_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_start_stop_preview_set_unset_preview_cb_p", ITc_camera_start_stop_preview_set_unset_preview_cb_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_start_capture_p", ITc_camera_start_capture_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_set_get_preview_format_p", ITc_camera_set_get_preview_format_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_is_supported_hdr_capture_p", ITc_camera_attr_is_supported_hdr_capture_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_unset_hdr_capture_progress_cb_p", ITc_camera_attr_set_unset_hdr_capture_progress_cb_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_get_capture_format_p", ITc_camera_attr_set_get_capture_format_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_get_recommended_preview_resolution_p", ITc_camera_get_recommended_preview_resolution_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_is_supported_zero_shutter_lag_p", ITc_camera_is_supported_zero_shutter_lag_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_is_supported_face_detection_p", ITc_camera_is_supported_face_detection_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_start_stop_continuous_capture_p", ITc_camera_start_stop_continuous_capture_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_unset_error_cb_p", ITc_camera_attr_set_unset_error_cb_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_start_cancel_focusing_p", ITc_camera_start_cancel_focusing_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_set_unset_focus_changed_cb_p", ITc_camera_set_unset_focus_changed_cb_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_set_unset_interrupted_cb_p", ITc_camera_attr_set_unset_interrupted_cb_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_foreach_supported_stream_flip_p", ITc_camera_foreach_supported_stream_flip_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_foreach_supported_stream_rotation_p", ITc_camera_foreach_supported_stream_rotation_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_attr_is_supported_auto_contrast_p", ITc_camera_attr_is_supported_auto_contrast_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_is_supported_continuous_capture_p", ITc_camera_is_supported_continuous_capture_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_set_unset_media_packet_preview_cb_p", ITc_camera_set_unset_media_packet_preview_cb_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_is_supported_media_packet_preview_cb_p", ITc_camera_is_supported_media_packet_preview_cb_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_set_display_p", ITc_camera_set_display_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_start_stop_face_detection_p", ITc_camera_start_stop_face_detection_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_set_display_visible_p", ITc_camera_set_display_visible_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_set_get_display_flip_p", ITc_camera_set_get_display_flip_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_set_get_display_mode_p", ITc_camera_set_get_display_mode_p, ITs_camera_startup, ITs_camera_cleanup},
+    {"ITc_camera_set_get_display_rotation_p", ITc_camera_set_get_display_rotation_p, ITs_camera_startup, ITs_camera_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CAMERA_NATIVE_H__
diff --git a/src/itc/capi-media-tool/CMakeLists.txt b/src/itc/capi-media-tool/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..c63a200
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "capi-media-tool")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-tool gthread-2.0 gobject-2.0 capi-appfw-application")
+SET(TC_SOURCES
+       ITs-capi-media-tool-common.c
+       ITs-capi-media-tool.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       gthread-2.0
+       gobject-2.0
+       libtbm
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/capi-media-tool/ITs-capi-media-tool-common.c b/src/itc/capi-media-tool/ITs-capi-media-tool-common.c
new file mode 100755 (executable)
index 0000000..69c9401
--- /dev/null
@@ -0,0 +1,284 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-capi-media-tool-common.h"
+
+/** @addtogroup itc-capi-media-tool
+*  @ingroup itc
+*  @{
+*/
+
+/**
+ * @function           MediaToolsGetDataPath
+ * @description                Returnes the application data path
+ * @parameter          pAppDataPath: application data path
+ * @return                     true if succeed else false
+ */
+bool MediaToolsGetDataPath(char* pAppDataPath)
+{
+       if(NULL == pAppDataPath)
+       {
+               FPRINTF( "[Line : %d] [mediaTools_ITC] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if(NULL == pPath)
+       {
+               FPRINTF( "[Line : %d] [mediaTools_ITC] Unable to get application data path; app_get_data_path returned null value \\n", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF( "[Line : %d] [mediaTools_ITC] application data path returned = %s\\n", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+
+
+/**
+ * @function           MediaToolsAppendToAppDataPath
+ * @description                Appends the input string to application data path
+ * @parameter          pInputPath: path to append to data path; pFinalPath: final resultant path
+ * @return                     true if succeed else false
+ */
+bool MediaToolsAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if( (NULL == pInputPath) || (NULL == pFinalPath) )
+       {
+               FPRINTF( "[Line : %d] [mediaTools_ITC] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if(false == MediaToolsGetDataPath(pAppDataPath))
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+       
+       FPRINTF( "[Line : %d] [mediaTools_ITC] result path returned = %s\\n", __LINE__, pFinalPath);
+
+       return true;
+}
+
+/**
+ * @function           MediaToolsGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* MediaToolsGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {               
+               case MEDIA_PACKET_ERROR_INVALID_PARAMETER : szErrorVal = "MEDIA_PACKET_ERROR_INVALID_PARAMETER" ; break; 
+               case MEDIA_PACKET_ERROR_OUT_OF_MEMORY : szErrorVal = "MEDIA_PACKET_ERROR_OUT_OF_MEMORY" ; break;
+               case MEDIA_PACKET_ERROR_INVALID_OPERATION : szErrorVal = "MEDIA_PACKET_ERROR_INVALID_OPERATION" ; break;
+               default : szErrorVal = "MEDIA_ERROR_UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+
+/**
+* @function                    MediaToolsGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void MediaToolsGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char * pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stMediaToolsMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stMediaToolsMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stMediaToolsMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    MediaToolsGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void MediaToolsGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stMediaToolsMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           MediaToolsExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void MediaToolsExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime=calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stMediaToolsStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stMediaToolsStartTime.tv_usec;
+                       
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }               
+#endif
+}
+
+/**
+ * @function           MediaToolsTimeout
+ * @description                Called if some callback is not invoked for a particular timeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */ 
+gboolean MediaToolsTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               pMainLoop = NULL; 
+       }
+       FPRINTF("[Line : %d][mediaTools_ITC] Callback Timeout\\n",__LINE__);
+       return false;
+}
+
+/**
+ * @function           MediaToolsGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stMediaToolsStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void MediaToolsGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stMediaToolsStartTime, NULL);
+#endif
+}
+
+
+/**
+ * @function           GetValueFromConfigFile
+ * @description                gets the corresponding value for a key from config file
+ * @parameter          pstrKeyString : Key, pstrValue : Value
+ * @return                     true for success, false for failure
+ */ 
+bool GetValueFromConfigFile(char* pstrKeyString, char* pstrValue)
+{
+       if(NULL == pstrKeyString)
+       {
+               FPRINTF("[Line : %d] [mediaTools_ITC] The key string provided to fetch config file value is null\\n", __LINE__);
+               return false;
+       }
+               
+       
+       FILE* pfilePtr = fopen(CONFIGFILE_PATH, "r");
+       if(NULL == pfilePtr)
+       {
+               FPRINTF("[Line : %d] [mediaTools_ITC] Unable to open configuration file : %s\\n", __LINE__, CONFIGFILE_PATH);
+               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(pszKey != NULL)
+                       {
+                               if(0 == strcmp(pszKey, pstrKeyString))
+                               {
+#if DEBUG
+                                       FPRINTF("[Line : %d] [mediaTools_ITC] [Key = %s; Config value = %s]\\n", __LINE__, pszKey, pszValue);
+#endif
+                                       break;
+                               }
+
+                       }
+                       pszKey = NULL;
+                       pszValue = NULL;
+               }
+       }
+       
+       fclose(pfilePtr);
+       if(NULL == pszValue)
+       {
+               FPRINTF("[Line : %d] [mediaTools_ITC] [Key = %s; Unable to retrieve config value for this key. Check key at config file location : %s]\\n", __LINE__, pstrKeyString, CONFIGFILE_PATH);
+               return false;
+       }
+
+       if(strlen(pszValue) >= CONFIG_VALUE_LEN_MAX)
+       {
+               FPRINTF("[Line : %d] [mediaTools_ITC] [Key = %s; Config Value should be less than %d characters in length]\\n", __LINE__, pszKey, CONFIG_VALUE_LEN_MAX);
+               return false;
+       }
+
+       memset(pstrValue, 0, CONFIG_VALUE_LEN_MAX);
+       strcpy(pstrValue, pszValue);
+       return true;
+}
+
+/** @} */
diff --git a/src/itc/capi-media-tool/ITs-capi-media-tool-common.h b/src/itc/capi-media-tool/ITs-capi-media-tool-common.h
new file mode 100755 (executable)
index 0000000..c06f6f0
--- /dev/null
@@ -0,0 +1,142 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS__COMMON_H_
+#define _ITS__COMMON_H_
+
+#include "assert.h"
+#include <media_packet.h>
+#include <media_format.h>
+#include <tbm_surface.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <string.h>
+#include <glib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <app.h>
+
+/** @addtogroup itc-capi-media-tool
+*  @ingroup itc
+*  @{
+*/
+
+#define ERR_LOG                                "/tmp/tclog"
+#define LOG                    100
+#define TIMELOG                20
+#define MEMLOG         20
+#define BUFFER         256
+#define MICROSECONDS_PER_SECOND  1000000
+#define CONFIG_LINE_LEN_MAX                    2048
+#define CONFIG_VALUE_LEN_MAX           1024
+#define TIMEOUT_CB 30000
+#define PATH_LEN                                                       1024
+#define USER_DATA                                                      NULL
+
+FILE *g_fpLog;
+GMainLoop *g_loop;
+struct timeval g_stMediaToolsStartTime;
+struct mallinfo g_stMediaToolsMemInfo;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+
+#define START_TEST {\
+       FPRINTF("Starting test : %s \\n",__FUNCTION__);\
+       if ( !g_bMediaTools )\
+       {\
+               FPRINTF("[Line : %d][mediaTools_ITC] Precondition of media tools create failed so leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+} 
+
+#define START_TEST_MMS {\
+       FPRINTF("Starting test : %s \\n",__FUNCTION__);\
+       if ( !g_bMediaTools )\
+       {\
+               FPRINTF("[Line : %d][mediaTools_ITC] Precondition of media tools open service failed so leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+} 
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF("[Line : %d][mediaTools_ITC] %s passed\\n",__LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][mediaTools_ITC] %s failed, error returned = %s \\n",__LINE__, API, MediaToolsGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_LOOP(nRetVal, API, nFailCount) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF("[Line : %d][mediaTools_ITC] %s passed\\n",__LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][mediaTools_ITC] %s failed for loop count = %d, error returned = %s \\n",__LINE__, API, nLoopCount, MediaToolsGetError(nRetVal));\
+               ++nFailCount;\
+               continue;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if(strlen(memLog) > 0) \
+       {  \
+               memLog[strlen(memLog)-1] = '\0';\
+               FPRINTF("[Line : %d][mediaTools_ITC] %s_MemoryLeakStatus : %s\\n",__LINE__, #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d][mediaTools_ITC] %s_TimeInMicrosec : %s\\n", __LINE__, #api, speedLog);\
+       }
+       
+#define RUN_POLLING_LOOP {\
+       if(g_bMessagesCB == false)\
+       {\
+               g_loop = g_main_loop_new(NULL, false);\
+               nTimeoutId = g_timeout_add(TIMEOUT_CB, MediaToolsTimeout, g_loop);\
+               g_main_loop_run(g_loop);\
+               g_source_remove(nTimeoutId);\
+               g_loop = NULL;\
+       }\
+}
+char* MediaToolsGetError(int nRet);
+void MediaToolsGetMemAllocation();
+void MediaToolsExecutionDelay(char* pszAPITime);
+void MediaToolsGetTimeOfDay();
+void MediaToolsGetMemStatus(char *pszAPIMemory);
+gboolean MediaToolsTimeout(gpointer data);
+bool GetValueFromConfigFile(char* pstrKeyString, char* pstrValue);
+bool MediaToolsGetDataPath(char* pPath);
+bool MediaToolsAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+
+/** @} */ 
+#endif  //_ITS__COMMON_H_
diff --git a/src/itc/capi-media-tool/ITs-capi-media-tool.c b/src/itc/capi-media-tool/ITs-capi-media-tool.c
new file mode 100755 (executable)
index 0000000..8ebdd05
--- /dev/null
@@ -0,0 +1,2761 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-capi-media-tool-common.h"
+
+/** @addtogroup itc-capi-media-tool
+*  @ingroup itc
+*  @{
+*/
+
+static media_format_h g_hfmt = NULL;
+static media_packet_h g_hPacket;
+static media_format_h fmt;
+static bool g_bMediaTools = false;
+
+static int FinalizeCallback(media_packet_h packet, int err, void * userdata)
+{
+    return MEDIA_PACKET_FINALIZE;
+}
+
+void ITs_media_tools_startup(void)
+{
+       int nRet = 0;
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       nRet = media_format_create(&g_hfmt);
+       nRet = media_format_ref(g_hfmt);
+       if( nRet == 0)
+       {
+               g_bMediaTools = true;
+       }
+
+       if (media_format_create(&g_hfmt) == MEDIA_FORMAT_ERROR_NONE)
+           {
+               int ret_video = MEDIA_FORMAT_ERROR_NONE;
+               ret_video = media_format_set_video_mime(g_hfmt, MEDIA_FORMAT_H264_HP);
+               ret_video = media_format_set_video_width(g_hfmt, 480);
+               ret_video = media_format_set_video_height(g_hfmt, 640);
+               ret_video = media_format_set_video_avg_bps(g_hfmt, 10000000);
+               ret_video = media_format_set_video_max_bps(g_hfmt, 15000000);
+               if (ret_video != MEDIA_FORMAT_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][media-tools_ITC] media_format_set_video_xxxx failed! \\n",__LINE__);
+               }
+
+           }
+           else
+           {
+               FPRINTF("[Line : %d][media-tools_ITC] media_format_create ,format failed! \\n",__LINE__);
+           }
+
+
+           if (media_packet_create(g_hfmt, NULL, NULL, &g_hPacket) != MEDIA_PACKET_ERROR_NONE)
+           {
+               FPRINTF("[Line : %d][media-tools_ITC] media_packet_create , pkt_create failed! \\n",__LINE__);
+           }
+           else
+           {
+               media_format_unref(g_hfmt);
+           }
+
+
+           if (media_packet_create_alloc(g_hfmt, NULL, NULL, &g_hPacket) != MEDIA_PACKET_ERROR_NONE)
+           {
+               FPRINTF("[Line : %d][media-tools_ITC] media_packet_create_alloc , pkt_create_alloc failed! \\n",__LINE__);
+           }
+           else
+           {
+               media_format_unref(g_hfmt);
+           }
+
+       return;
+}
+
+void ITs_media_tools_cleanup(void)
+{
+       media_format_unref(g_hfmt);
+       g_bMediaTools = false;
+
+       return;
+}
+
+/** @addtogroup itc-capi-media-tool-testcases
+*  @brief              Integration testcases for module capi-media-tool
+*  @ingroup    itc-capi-media-tool
+*  @{
+*/
+
+//& purpose: Increase/Decrease reference count of media_format_h object
+//& type: auto
+/**
+* @testcase                    ITc_media_format_ref_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Increase/Decrease reference count of media_format_h object
+* @scenario                            Creates a media format\n
+*                                              Increase reference count of media_format_h object\n
+*                                              Decrease reference count of media_format_h object
+* @apicovered                  media_format_ref, media_format_unref
+* @passcase                            When media_format_ref, media_format_unref is successful.
+* @failcase                            If target API media_format_ref, media_format_unref fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_ref_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       char *pszMediaPacketAllocGetSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       
+       media_format_make_writable(g_hfmt, &fmt);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszMediaPacketAllocGetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_ref(g_hfmt);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_ref",nMediaToolFailCount);
+
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_unref(g_hfmt);
+               MediaToolsExecutionDelay(pszMediaPacketAllocGetSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_unref",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_ref_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               free (pszMediaPacketAllocGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_ref, pszMediaPacketAllocSpeedLog);
+       PRINT_SPEED_LOG(media_format_unref, pszMediaPacketAllocGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_ref_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+       free (pszMediaPacketAllocGetSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Check whether the media_format_h is writable or not
+//& type: auto
+/**
+* @testcase                    ITc_media_format_is_writable_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Check whether the media_format_h is writable or not
+* @scenario                            Creates a media format\n
+*                                              Check whether the media_format_h is writable or not
+* @apicovered                  media_format_is_writable
+* @passcase                            When media_format_is_writable is successful.
+* @failcase                            If target API media_format_is_writable fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_is_writable_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       bool bIsWritable;
+
+       media_format_make_writable(g_hfmt, &fmt);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_is_writable(g_hfmt, &bIsWritable);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_is_writable",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_is_writable_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_is_writable, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_is_writable_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Returns a writable copy of media_format_h
+//& type: auto
+/**
+* @testcase                    ITc_media_format_make_writable_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Returns a writable copy of media_format_h
+* @scenario                            Creates a media format\n
+*                                              Returns a writable copy of media_format_h
+* @apicovered                  media_format_make_writable
+* @passcase                            When media_format_make_writable is successful.
+* @failcase                            If target API media_format_make_writable fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_make_writable_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_make_writable(g_hfmt, &fmt);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_make_writable",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_make_writable_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_make_writable, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_make_writable_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Sets video MIME type of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_set_video_mime_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets video MIME type of media format
+* @scenario                            Creates a media format\n
+*                                              Sets video MIME type of media format
+* @apicovered                  media_format_set_video_mime
+* @passcase                            When media_format_set_video_mime is successful.
+* @failcase                            If target API media_format_set_video_mime fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_set_video_mime_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_format_make_writable(g_hfmt, &fmt);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_set_video_mime(g_hfmt, MEDIA_FORMAT_MPEG1);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_set_video_mime",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_set_video_mime_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_set_video_mime, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_set_video_mime_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Sets video width of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_set_video_width_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets video width of media format
+* @scenario                            Creates a media format\n
+*                                              Sets video width of media format
+* @apicovered                  media_format_set_video_width
+* @passcase                            When media_format_set_video_width is successful.
+* @failcase                            If target API media_format_set_video_width fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_set_video_width_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       int nWidth = 480;
+
+       media_format_make_writable(g_hfmt, &fmt);
+       media_format_set_video_mime(g_hfmt, MEDIA_FORMAT_MPEG1);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_set_video_width(g_hfmt, nWidth);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_set_video_width",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_set_video_width_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_set_video_width, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_set_video_width_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Sets video height of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_set_video_height_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets video height of media format
+* @scenario                            Creates a media format\n
+*                                              Sets video height of media format
+* @apicovered                  media_format_set_video_height
+* @passcase                            When media_format_set_video_height is successful.
+* @failcase                            If target API media_format_set_video_height fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_set_video_height_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       int nHeight = 640;
+
+       media_format_make_writable(g_hfmt, &fmt);
+       media_format_set_video_mime(g_hfmt, MEDIA_FORMAT_MPEG1);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_set_video_height(g_hfmt, nHeight);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_set_video_height",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_set_video_height_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_set_video_height, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_set_video_height_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+//& purpose: Sets video avg_bps of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_set_video_avg_bps_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets video avg_bps of media format
+* @scenario                            Creates a media format\n
+*                                              Sets video avg_bps of media format
+* @apicovered                  media_format_set_video_avg_bps
+* @passcase                            When media_format_set_video_avg_bps is successful.
+* @failcase                            If target API media_format_set_video_avg_bps fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_set_video_avg_bps_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       int nAvgBps = 10000000;
+
+       media_format_make_writable(g_hfmt, &fmt);
+       media_format_set_video_mime(g_hfmt, MEDIA_FORMAT_MPEG1);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_set_video_avg_bps(g_hfmt, nAvgBps);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_set_video_avg_bps",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_set_video_avg_bps_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_set_video_avg_bps, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_set_video_avg_bps_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Sets video max_bps of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_set_video_max_bps_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets video max_bps of media format
+* @scenario                            Creates a media format\n
+*                                              Sets video max_bps of media format
+* @apicovered                  media_format_set_video_max_bps
+* @passcase                            When media_format_set_video_max_bps is successful.
+* @failcase                            If target API media_format_set_video_max_bps fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_set_video_max_bps_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       int nMaxBps = 15000000;
+
+       media_format_make_writable(g_hfmt, &fmt);
+       media_format_set_video_mime(g_hfmt, MEDIA_FORMAT_MPEG1);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_set_video_max_bps(g_hfmt, nMaxBps);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_set_video_max_bps",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_set_video_max_bps_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_set_video_max_bps, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_set_video_max_bps_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Gets video information of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_get_video_info_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets video information of media format
+* @scenario                            Creates a media format\n
+*                                              Gets video information of media format
+* @apicovered                  media_format_get_video_info
+* @passcase                            When media_format_get_video_info is successful.
+* @failcase                            If target API media_format_get_video_info fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_get_video_info_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_format_mimetype_e eMediaFormatMimetype;
+       int nWwidth, nHeight, nAvgBps, nMaxBps;
+
+       media_format_make_writable(g_hfmt, &fmt);
+       media_format_set_video_mime(g_hfmt, MEDIA_FORMAT_MPEG1);
+       media_format_set_video_width(g_hfmt, 640);
+       media_format_set_video_height(g_hfmt, 480);
+       media_format_set_video_avg_bps(g_hfmt, 10000);
+       media_format_set_video_max_bps(g_hfmt, 15000);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_get_video_info(g_hfmt, &eMediaFormatMimetype, &nWwidth, &nHeight, &nAvgBps, &nMaxBps);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_get_video_info",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_get_video_info_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_get_video_info, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_get_video_info_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+//& purpose: Sets audio MIME type of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_set_audio_mime_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets audio MIME type of media format
+* @scenario                            Creates a media format\n
+*                                              Sets audio MIME type of media format
+* @apicovered                  media_format_set_audio_mime
+* @passcase                            When media_format_set_audio_mime is successful.
+* @failcase                            If target API media_format_set_audio_mime fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_set_audio_mime_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       
+       media_format_make_writable(g_hfmt, &fmt);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_set_audio_mime(g_hfmt, MEDIA_FORMAT_MP3);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_set_audio_mime",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_set_audio_mime_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_set_audio_mime, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_set_audio_mime_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+//& purpose: Sets audio channel of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_set_audio_channel_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets audio channel of media format
+* @scenario                            Creates a media format\n
+*                                              Sets audio channel of media format
+* @apicovered                  media_format_set_audio_channel
+* @passcase                            When media_format_set_audio_channel is successful.
+* @failcase                            If target API media_format_set_audio_channel fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_set_audio_channel_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       int nChannel = 1;
+
+       media_format_make_writable(g_hfmt, &fmt);
+       media_format_set_audio_mime(g_hfmt, MEDIA_FORMAT_MP3);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_set_audio_channel(g_hfmt, nChannel);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_set_audio_channel",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_set_audio_channel_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_set_audio_channel, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_set_audio_channel_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Sets audio samplerate of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_set_audio_samplerate_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets audio samplerate of media format
+* @scenario                            Creates a media format\n
+*                                              Sets audio samplerate of media format
+* @apicovered                  media_format_set_audio_samplerate
+* @passcase                            When media_format_set_audio_samplerate is successful.
+* @failcase                            If target API media_format_set_audio_samplerate fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_set_audio_samplerate_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       int nSamplerate = 30;
+
+       media_format_make_writable(g_hfmt, &fmt);
+       media_format_set_audio_mime(g_hfmt, MEDIA_FORMAT_MP3);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_set_audio_samplerate(g_hfmt, nSamplerate);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_set_audio_samplerate",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_set_audio_samplerate_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_set_audio_samplerate, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_set_audio_samplerate_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+//& purpose: Sets audio bit of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_set_audio_bit_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets audio bit of media format
+* @scenario                            Creates a media format\n
+*                                              Sets audio bit of media format
+* @apicovered                  media_format_set_audio_bit
+* @passcase                            When media_format_set_audio_bit is successful.
+* @failcase                            If target API media_format_set_audio_bit fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_set_audio_bit_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       int nBit = 20;
+
+       media_format_make_writable(g_hfmt, &fmt);
+       media_format_set_audio_mime(g_hfmt, MEDIA_FORMAT_MP3);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_set_audio_bit(g_hfmt, nBit);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_set_audio_bit",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_set_audio_bit_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_set_audio_bit, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_set_audio_bit_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+//& purpose: Sets audio avg_bps of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_set_audio_avg_bps_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets audio avg_bps of media format
+* @scenario                            Creates a media format\n
+*                                              Sets audio avg_bps of media format
+* @apicovered                  media_format_set_audio_avg_bps
+* @passcase                            When media_format_set_audio_avg_bps is successful.
+* @failcase                            If target API media_format_set_audio_avg_bps fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_set_audio_avg_bps_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       int nAvgBps = 15;
+
+       media_format_make_writable(g_hfmt, &fmt);
+       media_format_set_audio_mime(g_hfmt, MEDIA_FORMAT_MP3);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_set_audio_avg_bps(g_hfmt, nAvgBps);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_set_audio_avg_bps",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_set_audio_avg_bps_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_set_audio_avg_bps, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_set_audio_avg_bps_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Get audio information of media format
+//& type: auto
+/**
+* @testcase                    ITc_media_format_get_audio_info_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Get audio information of media format
+* @scenario                            Creates a media format\n
+*                                              Get audio information of media format
+* @apicovered                  media_format_get_audio_info
+* @passcase                            When media_format_get_audio_info is successful.
+* @failcase                            If target API media_format_get_audio_info fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_format_get_audio_info_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_format_mimetype_e eMediaFormatMimetype;
+       int  nChannel, nSamplerate, nBit, nAvgBps;
+
+       media_format_make_writable(g_hfmt, &fmt);
+       media_format_set_audio_mime(g_hfmt, MEDIA_FORMAT_MP3);
+       media_format_set_audio_channel(g_hfmt, 1);
+       media_format_set_audio_samplerate(g_hfmt, 30);
+       media_format_set_audio_bit(g_hfmt, 20);
+       media_format_set_audio_avg_bps(g_hfmt, 15);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_format_get_audio_info(g_hfmt, &eMediaFormatMimetype, &nChannel, &nSamplerate, &nBit, &nAvgBps);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_format_get_audio_info",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_format_get_audio_info_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_format_get_audio_info, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_format_get_audio_info_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Creates a media packet handle
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_create_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 It creates only media packet handle without allocated buffer
+* @scenario                            Creates a media format\n
+*                                              It creates only media packet handle without allocated buffer
+* @apicovered                  media_packet_create
+* @passcase                            When media_packet_create is successful.
+* @failcase                            If target API media_packet_create fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_create_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       media_format_make_writable(g_hfmt, &fmt);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_create",nMediaToolFailCount);
+
+               media_packet_destroy(hPacket);
+
+       }
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_create_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_create, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_create_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Copies a media packet handle
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_copy_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 It re-creates only media packet handle with exist media packet handle
+* @scenario                            Creates a media format\n
+*                                              Copies a media packet handle
+* @apicovered                  media_packet_copy
+* @passcase                            When media_packet_copy is successful.
+* @failcase                            If target API media_packet_copy fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_copy_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       media_packet_h hPacketCopy;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_copy(hPacket, FinalizeCallback, NULL, &hPacketCopy);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_copy",nMediaToolFailCount);
+
+               media_packet_destroy(hPacket);
+
+       }
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_copy_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_copy, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_copy_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Allocates buffer with media packet handle
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_alloc_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Allocates buffer with media packet handle
+* @scenario                            Creates a media format\n
+*                                              Allocates buffer with media packet handle
+* @apicovered                  media_packet_alloc
+* @passcase                            When media_packet_alloc is successful.
+* @failcase                            If target API media_packet_alloc fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_alloc_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_alloc(hPacket);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_alloc",nMediaToolFailCount);
+
+               media_packet_destroy(hPacket);
+
+       }
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_alloc_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_alloc, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_alloc_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Creates a media packet handle and allocates buffer
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_create_alloc_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Creates a media packet handle and allocates buffer.
+* @scenario                            Creates a media format\n
+*                                              Creates a media packet handle and allocates buffer
+* @apicovered                  media_packet_create_alloc
+* @passcase                            When media_packet_create_alloc is successful.
+* @failcase                            If target API media_packet_create_alloc fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_create_alloc_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       media_format_make_writable(g_hfmt, &fmt);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_create_alloc(g_hfmt, NULL, NULL, &hPacket);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_create_alloc",nMediaToolFailCount);
+
+               media_packet_destroy(hPacket);
+
+       }
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_create_alloc_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_create_alloc, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_create_alloc_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Gets buffer data pointer of media packet
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_get_buffer_data_ptr_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets buffer data pointer of media packet
+* @scenario                            Creates a media format\n
+*                                              Gets buffer data pointer of media packet
+* @apicovered                  media_packet_get_buffer_data_ptr
+* @passcase                            When media_packet_get_buffer_data_ptr is successful.
+* @failcase                            If target API media_packet_get_buffer_data_ptr fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_get_buffer_data_ptr_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       void* pData;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_get_buffer_data_ptr(hPacket, &pData);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_get_buffer_data_ptr",nMediaToolFailCount);
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_get_buffer_data_ptr_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_get_buffer_data_ptr, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_get_buffer_data_ptr_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Checks whether the given media packet is for video
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_is_video_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks whether the given media packet is for video
+* @scenario                            Creates a media format\n
+*                                              Checks whether the given media packet is for video
+* @apicovered                  media_packet_is_video
+* @passcase                            When media_packet_is_video is successful.
+* @failcase                            If target API media_packet_is_video fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_is_video_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       bool bIsVideo = false;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_is_video(hPacket, &bIsVideo);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_is_video",nMediaToolFailCount);
+               if(bIsVideo == true)
+               {
+                       FPRINTF("[Line : %d][media-tools_ITC] given media packet is for video ",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_is_video_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_is_video, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_is_video_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Checks whether the given media packet is for audio
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_is_audio_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks whether the given media packet is for audio
+* @scenario                            Creates a media format\n
+*                                              Checks whether the given media packet is for audio
+* @apicovered                  media_packet_is_audio
+* @passcase                            When media_packet_is_audio is successful.
+* @failcase                            If target API media_packet_is_audio fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_is_audio_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       bool bIsAudio = false;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_is_audio(hPacket, &bIsAudio);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_is_audio",nMediaToolFailCount);
+               if(bIsAudio == true)
+               {
+                       FPRINTF("[Line : %d][media-tools_ITC] given media packet is for audio ",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_is_audio_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_is_audio, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_is_audio_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Checks whether the given media packet is codec data
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_is_codec_config_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks whether the given media packet is codec data
+* @scenario                            Creates a media format\n
+*                                              Checks whether the given media packet is codec data
+* @apicovered                  media_packet_is_codec_config
+* @passcase                            When media_packet_is_codec_config is successful.
+* @failcase                            If target API media_packet_is_codec_config fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_is_codec_config_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       bool   bIsCodecConfig = false;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_is_codec_config(hPacket, &bIsCodecConfig);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_is_codec_config",nMediaToolFailCount);
+               if(bIsCodecConfig == true)
+               {
+                       FPRINTF("[Line : %d][media-tools_ITC] given media packet is codec data ",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_is_codec_config_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_is_codec_config, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_is_codec_config_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Checks whether the given media packet is encoded type
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_is_encoded_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks whether the given media packet is encoded type
+* @scenario                            Creates a media format\n
+*                                              Checks whether the given media packet is encoded type
+* @apicovered                  media_packet_is_encoded
+* @passcase                            When media_packet_is_encoded is successful.
+* @failcase                            If target API media_packet_is_encoded fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_is_encoded_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       bool   bIsEncoded = false;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_is_encoded(hPacket, &bIsEncoded);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_is_encoded",nMediaToolFailCount);
+               if(bIsEncoded == true)
+               {
+                       FPRINTF("[Line : %d][media-tools_ITC] given media packet is encoded type ",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_is_encoded_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_is_encoded, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_is_encoded_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+//& purpose: Checks whether the given media packet is eos
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_is_end_of_stream_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks whether the given media packet is eos
+* @scenario                            Creates a media format\n
+*                                              Checks whether the given media packet is eos
+* @apicovered                  media_packet_is_end_of_stream
+* @passcase                            When media_packet_is_end_of_stream is successful.
+* @failcase                            If target API media_packet_is_end_of_stream fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+
+int ITc_media_packet_is_end_of_stream_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       bool   bIsEos = false;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_is_end_of_stream(hPacket, &bIsEos);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_is_end_of_stream",nMediaToolFailCount);
+               if(bIsEos == true)
+               {
+                       FPRINTF("[Line : %d][media-tools_ITC] given media packet is eos ",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_is_end_of_stream_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_is_end_of_stream, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_is_end_of_stream_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Checks whether the given media packet is raw type
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_is_raw_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks whether the given media packet is raw type
+* @scenario                            Creates a media format\n
+*                                              Checks whether the given media packet is raw type
+* @apicovered                  media_packet_is_raw
+* @passcase                            When media_packet_is_raw is successful.
+* @failcase                            If target API media_packet_is_raw fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+
+int ITc_media_packet_is_raw_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       bool   bIsRaw = false;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_is_raw(hPacket, &bIsRaw);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_is_raw",nMediaToolFailCount);
+               if(bIsRaw == true)
+               {
+                       FPRINTF("[Line : %d][media-tools_ITC] given media packet is raw type ",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_is_raw_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_is_raw, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_is_raw_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Checks whether the given media packet is sync frame
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_is_sync_frame_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks whether the given media packet is sync frame
+* @scenario                            Creates a media format\n
+*                                              Checks whether the given media packet is sync frame
+* @apicovered                  media_packet_is_sync_frame
+* @passcase                            When media_packet_is_sync_frame is successful.
+* @failcase                            If target API media_packet_is_sync_frame fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+
+int ITc_media_packet_is_sync_frame_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       bool   bIsSync = false;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_is_sync_frame(hPacket, &bIsSync);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_is_sync_frame",nMediaToolFailCount);
+               if(bIsSync == true)
+               {
+                       FPRINTF("[Line : %d][media-tools_ITC] given media packet is sync frame ",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_is_sync_frame_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_is_sync_frame, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_is_sync_frame_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+//& purpose: Set/Gets media_format_h of media packet
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_set_get_format_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set/Gets media_format_h of media packet.
+* @scenario                            Creates a media format\n
+*                                              Sets media_format_h of media packet\n
+*                                              Gets media_format_h of media packet
+* @apicovered                  media_packet_get_format, media_packet_set_format
+* @passcase                            When media_packet_get_format, media_packet_set_format is successful.
+* @failcase                            If target API media_packet_get_format, media_packet_set_format fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_set_get_format_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       char *pszMediaPacketAllocGetSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       media_format_h hfmt;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszMediaPacketAllocGetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_set_format(hPacket, g_hfmt);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_get_format(hPacket, &hfmt);
+               MediaToolsExecutionDelay(pszMediaPacketAllocGetSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_get_format",nMediaToolFailCount);
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_set_get_format_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               free (pszMediaPacketAllocGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_set_format, pszMediaPacketAllocSpeedLog);
+       PRINT_SPEED_LOG(media_packet_get_format, pszMediaPacketAllocGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_set_get_format_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+       free (pszMediaPacketAllocGetSpeedLog);
+
+       return 0;
+}
+
+//& purpose:  Set/Gets PTS of media packet
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_set_get_pts_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set/Gets PTS of media packet
+* @scenario                            Creates a media format\n
+*                                              Sets PTS of media packet\n
+*                                              Gets PTS of media packet
+* @apicovered                  media_packet_set_pts, media_packet_get_pts
+* @passcase                            When media_packet_set_pts, media_packet_get_pts is successful.
+* @failcase                            If target API media_packet_set_pts, media_packet_get_pts fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_set_get_pts_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       char *pszMediaPacketAllocGetSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       uint64_t nPts = 1234567;
+       uint64_t nGetPts;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszMediaPacketAllocGetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_set_pts(hPacket, nPts);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_set_pts",nMediaToolFailCount);
+
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_get_pts(hPacket, &nGetPts);
+               MediaToolsExecutionDelay(pszMediaPacketAllocGetSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_get_pts",nMediaToolFailCount);
+
+               if( nPts != nGetPts )
+               {
+                       nMediaToolFailCount++;
+                       FPRINTF("[Line : %d][media-tools_ITC] nPts !=  nGetPts \\n",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_set_get_pts_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               free (pszMediaPacketAllocGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_set_pts, pszMediaPacketAllocSpeedLog);
+       PRINT_SPEED_LOG(media_packet_get_pts, pszMediaPacketAllocGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_set_get_pts_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+       free (pszMediaPacketAllocGetSpeedLog);
+
+       return 0;
+}
+
+
+//& purpose:  Set/Gets DTS of media packet
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_set_get_dts_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set/Gets DTS of media packet
+* @scenario                            Creates a media format\n
+*                                              Sets DTS of media packet\n
+*                                              Gets DTS of media packet
+* @apicovered                  media_packet_set_dts, media_packet_get_dts
+* @passcase                            When media_packet_set_dts, media_packet_get_dts is successful.
+* @failcase                            If target API media_packet_set_dts, media_packet_get_pts fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_set_get_dts_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       char *pszMediaPacketAllocGetSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       uint64_t nDts = 7654321;
+       uint64_t nGetDts;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszMediaPacketAllocGetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_set_dts(hPacket, nDts);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_set_dts",nMediaToolFailCount);
+
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_get_dts(hPacket, &nGetDts);
+               MediaToolsExecutionDelay(pszMediaPacketAllocGetSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_get_dts",nMediaToolFailCount);
+
+               if( nDts != nGetDts )
+               {
+                       nMediaToolFailCount++;
+                       FPRINTF("[Line : %d][media-tools_ITC]  nDts != nGetDts \\n",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_set_get_pts_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               free (pszMediaPacketAllocGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_set_dts, pszMediaPacketAllocSpeedLog);
+       PRINT_SPEED_LOG(media_packet_get_dts, pszMediaPacketAllocGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_set_get_pts_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+       free (pszMediaPacketAllocGetSpeedLog);
+
+       return 0;
+}
+
+//& purpose:  Set/Gets duration of media packet
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_set_get_duration_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set/Gets duration of media packet
+* @scenario                            Creates a media format\n
+*                                              Sets duration of media packet\n
+*                                              Gets duration of media packet
+* @apicovered                  media_packet_set_duration, media_packet_get_duration
+* @passcase                            When media_packet_set_duration, media_packet_get_duration is successful.
+* @failcase                            If target API media_packet_set_duration, media_packet_get_duration fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_set_get_duration_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       char *pszMediaPacketAllocGetSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       uint64_t nDuration = 5000000;
+       uint64_t nGetDuration;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszMediaPacketAllocGetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_set_duration(hPacket, nDuration);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_set_duration",nMediaToolFailCount);
+
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_get_duration(hPacket, &nGetDuration);
+               MediaToolsExecutionDelay(pszMediaPacketAllocGetSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_get_duration",nMediaToolFailCount);
+
+               if( nDuration != nGetDuration )
+               {
+                       nMediaToolFailCount++;
+                       FPRINTF("[Line : %d][media-tools_ITC] nDuration != nGetDuration  \\n",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_set_get_pts_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               free (pszMediaPacketAllocGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_set_duration, pszMediaPacketAllocSpeedLog);
+       PRINT_SPEED_LOG(media_packet_get_duration, pszMediaPacketAllocGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_set_get_pts_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+       free (pszMediaPacketAllocGetSpeedLog);
+
+       return 0;
+}
+
+
+//& purpose:  Set/Gets buffer size of media packet
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_set_get_buffer_size_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set/Gets buffer size of media packet
+* @scenario                            Creates a media format\n
+*                                              Sets buffer size of media packet\n
+*                                              Gets buffer size of media packet
+* @apicovered                  media_packet_set_buffer_size, media_packet_get_buffer_size
+* @passcase                            When media_packet_set_buffer_size, media_packet_get_buffer_size is successful.
+* @failcase                            If target API media_packet_set_buffer_size, media_packet_get_buffer_size fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_set_get_buffer_size_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       char *pszMediaPacketAllocGetSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       uint64_t nBuff = 1024;
+       uint64_t nGetBuff;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszMediaPacketAllocGetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_set_buffer_size(hPacket, nBuff);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_set_buffer_size",nMediaToolFailCount);
+
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_get_buffer_size(hPacket, &nGetBuff);
+               MediaToolsExecutionDelay(pszMediaPacketAllocGetSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_get_buffer_size",nMediaToolFailCount);
+
+               if( nBuff != nGetBuff )
+               {
+                       nMediaToolFailCount++;
+                       FPRINTF("[Line : %d][media-tools_ITC]  nBuff != nGetBuff  \\n",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_set_get_buffer_size_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               free (pszMediaPacketAllocGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_set_buffer_size, pszMediaPacketAllocSpeedLog);
+       PRINT_SPEED_LOG(media_packet_get_buffer_size, pszMediaPacketAllocGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_set_get_buffer_size_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+       free (pszMediaPacketAllocGetSpeedLog);
+
+       return 0;
+}
+
+
+//& purpose:  Set/Gets extra data of media packet
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_set_get_extra_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set/Gets extra data of media packet
+* @scenario                            Creates a media format\n
+*                                              Sets extra data of media packet\n
+*                                              Gets extra data of media packet
+* @apicovered                  media_packet_set_extra, media_packet_get_extra
+* @passcase                            When media_packet_set_extra, media_packet_get_extra is successful.
+* @failcase                            If target API media_packet_set_extra, media_packet_get_extra fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_set_get_extra_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       char *pszMediaPacketAllocGetSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       char* pExtra = "extra";
+       void *pGetExtra;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszMediaPacketAllocGetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_set_extra(hPacket, pExtra);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_set_extra",nMediaToolFailCount);
+
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_get_extra(hPacket, &pGetExtra);
+               MediaToolsExecutionDelay(pszMediaPacketAllocGetSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_get_extra",nMediaToolFailCount);
+
+               if( pExtra != pGetExtra )
+               {
+                       nMediaToolFailCount++;
+                       FPRINTF("[Line : %d][media-tools_ITC] pExtra != pGetExtra \\n",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_set_get_buffer_size_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               free (pszMediaPacketAllocGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_set_extra, pszMediaPacketAllocSpeedLog);
+       PRINT_SPEED_LOG(media_packet_get_extra, pszMediaPacketAllocGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_set_get_buffer_size_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+       free (pszMediaPacketAllocGetSpeedLog);
+
+       return 0;
+}
+
+//& purpose:  Set/unset media_buffer_flags_e of media packet
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_set_unset_flags_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set/unset media_buffer_flags_e of media packet
+* @scenario                            Creates a media format\n
+*                                              Sets media_buffer_flags_e of media packet\n
+*                                              unset media_buffer_flags_e of media packet
+* @apicovered                  media_packet_set_flags, media_packet_unset_flags
+* @passcase                            When media_packet_set_flags, media_packet_unset_flags is successful.
+* @failcase                            If target API media_packet_set_flags, media_packet_unset_flags fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_set_unset_flags_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       char *pszMediaPacketAllocGetSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+       media_buffer_flags_e eMediaBufferFlags[] = {
+                               MEDIA_PACKET_CODEC_CONFIG,
+                               MEDIA_PACKET_END_OF_STREAM,
+                               MEDIA_PACKET_SYNC_FRAME
+                               };
+
+       int nEnumSize = sizeof(eMediaBufferFlags) / sizeof(eMediaBufferFlags[0]);
+       int nEnumCounter = 0;
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszMediaPacketAllocGetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nEnumCounter=0; nEnumCounter<nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       char *szEnumVal = NULL;
+                       MediaToolsGetMemAllocation();
+                       MediaToolsGetTimeOfDay();
+                       nRet = media_packet_set_flags(hPacket, eMediaBufferFlags[nEnumCounter]);
+                       MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+                       PRINT_RESULT_LOOP(nRet, "media_packet_set_flags",nMediaToolFailCount);
+                       switch( eMediaBufferFlags[nEnumCounter] )
+                       {
+                               case MEDIA_PACKET_CODEC_CONFIG : szEnumVal = "MEDIA_PACKET_CODEC_CONFIG" ; break;
+                               case MEDIA_PACKET_END_OF_STREAM : szEnumVal = "MEDIA_PACKET_END_OF_STREAM" ; break;
+                               case MEDIA_PACKET_SYNC_FRAME : szEnumVal = "MEDIA_PACKET_SYNC_FRAME" ; break;
+                       }
+                       if(nRet !=0)
+                       {
+                               FPRINTF("[Line : %d][media-tools_ITC] Failed for [ %d] times, for enum  = [ %s ] \\n", __LINE__, nMediaToolFailCount, szEnumVal);
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][media-tools_ITC] pass for enum  = [ %s ] \\n",__LINE__, szEnumVal);
+                       }
+
+                       MediaToolsGetTimeOfDay();
+                       nRet = media_packet_unset_flags(hPacket, eMediaBufferFlags[nEnumCounter]);
+                       MediaToolsExecutionDelay(pszMediaPacketAllocGetSpeedLog);
+                       MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+                       PRINT_RESULT_LOOP(nRet, "media_packet_unset_flags",nMediaToolFailCount);
+                       switch( eMediaBufferFlags[nEnumCounter] )
+                       {
+                               case MEDIA_PACKET_CODEC_CONFIG : szEnumVal = "MEDIA_PACKET_CODEC_CONFIG" ; break;
+                               case MEDIA_PACKET_END_OF_STREAM : szEnumVal = "MEDIA_PACKET_END_OF_STREAM" ; break;
+                               case MEDIA_PACKET_SYNC_FRAME : szEnumVal = "MEDIA_PACKET_SYNC_FRAME" ; break;
+                       }
+                       if(nRet !=0)
+                       {
+                               FPRINTF("[Line : %d][media-tools_ITC] Failed for [ %d] times, for enum  = [ %s ] \\n", __LINE__, nMediaToolFailCount, szEnumVal);
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][media-tools_ITC] pass for enum  = [ %s ] \\n",__LINE__, szEnumVal);
+                       }
+
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_set_unset_flags_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               free (pszMediaPacketAllocGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_set_flags, pszMediaPacketAllocSpeedLog);
+       PRINT_SPEED_LOG(media_packet_unset_flags, pszMediaPacketAllocGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_set_unset_flags_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+       free (pszMediaPacketAllocGetSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Gets TBM surface data of media packet
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_get_tbm_surface_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets TBM surface data of media packet
+* @scenario                            Creates a media format\n
+*                                              Gets TBM surface data of media packet
+* @apicovered                  media_packet_get_tbm_surface
+* @passcase                            When media_packet_get_tbm_surface is successful.
+* @failcase                            If target API media_packet_get_tbm_surface fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_get_tbm_surface_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       tbm_surface_h hSurface;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_get_tbm_surface(hPacket, &hSurface);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_get_tbm_surface",nMediaToolFailCount);
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_get_tbm_surface_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_get_tbm_surface, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_get_tbm_surface_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+//& purpose: Creates media packet handle and allocates buffer with tbm_surface_h
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_create_from_tbm_surface_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Creates media packet handle and allocates buffer with tbm_surface_h
+* @scenario                            Creates a media format\n
+*                                              Creates media packet handle\n
+*                                              Allocates buffer with tbm_surface_h
+* @apicovered                  media_packet_create_from_tbm_surface
+* @passcase                            When media_packet_create_from_tbm_surface is successful.
+* @failcase                            If target API media_packet_create_from_tbm_surface fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_create_from_tbm_surface_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacketTbm;
+       media_format_make_writable(g_hfmt, &fmt);
+       media_format_set_video_mime(g_hfmt, MEDIA_FORMAT_MPEG1);
+       media_format_set_video_width(g_hfmt, 640);
+       media_format_set_video_height(g_hfmt, 480);
+       media_format_set_video_avg_bps(g_hfmt, 10000);
+       media_format_set_video_max_bps(g_hfmt, 15000);  
+       
+       unsigned int *nTbmFormatArray = NULL;
+       unsigned int g_nTotalFormatCount = 0;
+       tbm_surface_query_formats(&nTbmFormatArray, &g_nTotalFormatCount);
+       tbm_surface_h hSurface = tbm_surface_create(128,128, nTbmFormatArray[0]);
+       free(nTbmFormatArray);
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_create_from_tbm_surface(g_hfmt, hSurface, FinalizeCallback, NULL, &hPacketTbm);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_create_from_tbm_surface",nMediaToolFailCount);
+       }
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_create_from_tbm_surface_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_create_from_tbm_surface, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_create_from_tbm_surface_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Checks whether the allocated buffer is tbm surface or not
+//& type: auto
+/**
+* @testcase                    ITc_media_packet_has_tbm_surface_buffer_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks whether the allocated buffer is tbm surface or not
+* @scenario                            Creates a media format\n
+*                                              Checks whether the allocated buffer is tbm surface or not
+* @apicovered                  media_packet_has_tbm_surface_buffer
+* @passcase                            When media_packet_has_tbm_surface_buffer is successful.
+* @failcase                            If target API media_packet_has_tbm_surface_buffer fails or any precondition API fails.
+* @precondition                        Creates a media format
+* @postcondition               None
+*/
+int ITc_media_packet_has_tbm_surface_buffer_p(void)
+{
+       START_TEST;
+       char *pszMediaPacketAllocMemLog = NULL;
+       char *pszMediaPacketAllocSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaToolFailCount = 0;
+       media_packet_h hPacket;
+       bool   bHasTbmSurface = false;
+       media_format_make_writable(g_hfmt, &fmt);
+
+       nRet = media_packet_create(g_hfmt, FinalizeCallback, NULL, &hPacket);
+       PRINT_RESULT(nRet, "media_packet_create");
+
+#if MEMORY_CHECK
+       pszMediaPacketAllocMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaPacketAllocSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MediaToolsGetMemAllocation();
+               MediaToolsGetTimeOfDay();
+               nRet = media_packet_has_tbm_surface_buffer(hPacket, &bHasTbmSurface);
+               MediaToolsExecutionDelay(pszMediaPacketAllocSpeedLog);
+               MediaToolsGetMemStatus(pszMediaPacketAllocMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_packet_has_tbm_surface_buffer",nMediaToolFailCount);
+               if(bHasTbmSurface == true)
+               {
+                       FPRINTF("[Line : %d][media-tools_ITC] allocated buffer is tbm surface  ",__LINE__);
+               }
+       }
+       media_packet_destroy(hPacket);
+
+       if (nMediaToolFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][media-tools_ITC] ITc_media_packet_has_tbm_surface_buffer_p failed for %d out of %d times\\n",__LINE__, nMediaToolFailCount, MAX_COUNT);
+               free (pszMediaPacketAllocSpeedLog);
+               free (pszMediaPacketAllocMemLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_packet_has_tbm_surface_buffer, pszMediaPacketAllocSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_packet_has_tbm_surface_buffer_p, pszMediaPacketAllocMemLog);
+#endif
+
+       free (pszMediaPacketAllocSpeedLog);
+       free (pszMediaPacketAllocMemLog);
+
+       return 0;
+}
+
+/** @} */ 
+/** @} */
diff --git a/src/itc/capi-media-tool/tct-capi-media-tool-native.c b/src/itc/capi-media-tool/tct-capi-media-tool-native.c
new file mode 100755 (executable)
index 0000000..e4ea39a
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-capi-media-tool-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/capi-media-tool/tct-capi-media-tool-native.h b/src/itc/capi-media-tool/tct-capi-media-tool-native.h
new file mode 100755 (executable)
index 0000000..be9cc24
--- /dev/null
@@ -0,0 +1,103 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CAPI_MEDIA_TOOL_NATIVE_H__
+#define __TCT_CAPI_MEDIA_TOOL_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_media_tools_startup(void);
+extern void ITs_media_tools_cleanup(void);
+
+extern int ITc_media_format_ref_p(void);
+extern int ITc_media_format_is_writable_p(void);
+extern int ITc_media_format_make_writable_p(void);
+extern int ITc_media_format_set_video_mime_p(void);
+extern int ITc_media_format_set_video_width_p(void);
+extern int ITc_media_format_set_video_height_p(void);
+extern int ITc_media_format_set_video_avg_bps_p(void);
+extern int ITc_media_format_set_video_max_bps_p(void);
+extern int ITc_media_format_get_video_info_p(void);
+extern int ITc_media_format_set_audio_mime_p(void);
+extern int ITc_media_format_set_audio_channel_p(void);
+extern int ITc_media_format_set_audio_samplerate_p(void);
+extern int ITc_media_format_set_audio_bit_p(void);
+extern int ITc_media_format_set_audio_avg_bps_p(void);
+extern int ITc_media_format_get_audio_info_p(void);
+extern int ITc_media_packet_create_p(void);
+extern int ITc_media_packet_copy_p(void);
+extern int ITc_media_packet_alloc_p(void);
+extern int ITc_media_packet_create_alloc_p(void);
+extern int ITc_media_packet_get_buffer_data_ptr_p(void);
+extern int ITc_media_packet_is_video_p(void);
+extern int ITc_media_packet_is_audio_p(void);
+extern int ITc_media_packet_is_codec_config_p(void);
+extern int ITc_media_packet_is_encoded_p(void);
+extern int ITc_media_packet_is_end_of_stream_p(void);
+extern int ITc_media_packet_is_raw_p(void);
+extern int ITc_media_packet_is_sync_frame_p(void);
+extern int ITc_media_packet_set_get_format_p(void);
+extern int ITc_media_packet_set_get_pts_p(void);
+extern int ITc_media_packet_set_get_dts_p(void);
+extern int ITc_media_packet_set_get_duration_p(void);
+extern int ITc_media_packet_set_get_buffer_size_p(void);
+extern int ITc_media_packet_set_get_extra_p(void);
+extern int ITc_media_packet_set_unset_flags_p(void);
+extern int ITc_media_packet_get_tbm_surface_p(void);
+extern int ITc_media_packet_create_from_tbm_surface_p(void);
+extern int ITc_media_packet_has_tbm_surface_buffer_p(void);
+
+testcase tc_array[] = {
+    {"ITc_media_format_ref_p", ITc_media_format_ref_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_is_writable_p", ITc_media_format_is_writable_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_make_writable_p", ITc_media_format_make_writable_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_set_video_mime_p", ITc_media_format_set_video_mime_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_set_video_width_p", ITc_media_format_set_video_width_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_set_video_height_p", ITc_media_format_set_video_height_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_set_video_avg_bps_p", ITc_media_format_set_video_avg_bps_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_set_video_max_bps_p", ITc_media_format_set_video_max_bps_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_get_video_info_p", ITc_media_format_get_video_info_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_set_audio_mime_p", ITc_media_format_set_audio_mime_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_set_audio_channel_p", ITc_media_format_set_audio_channel_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_set_audio_samplerate_p", ITc_media_format_set_audio_samplerate_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_set_audio_bit_p", ITc_media_format_set_audio_bit_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_set_audio_avg_bps_p", ITc_media_format_set_audio_avg_bps_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_format_get_audio_info_p", ITc_media_format_get_audio_info_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_create_p", ITc_media_packet_create_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_copy_p", ITc_media_packet_copy_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_alloc_p", ITc_media_packet_alloc_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_create_alloc_p", ITc_media_packet_create_alloc_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_get_buffer_data_ptr_p", ITc_media_packet_get_buffer_data_ptr_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_is_video_p", ITc_media_packet_is_video_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_is_audio_p", ITc_media_packet_is_audio_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_is_codec_config_p", ITc_media_packet_is_codec_config_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_is_encoded_p", ITc_media_packet_is_encoded_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_is_end_of_stream_p", ITc_media_packet_is_end_of_stream_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_is_raw_p", ITc_media_packet_is_raw_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_is_sync_frame_p", ITc_media_packet_is_sync_frame_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_set_get_format_p", ITc_media_packet_set_get_format_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_set_get_pts_p", ITc_media_packet_set_get_pts_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_set_get_dts_p", ITc_media_packet_set_get_dts_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_set_get_duration_p", ITc_media_packet_set_get_duration_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_set_get_buffer_size_p", ITc_media_packet_set_get_buffer_size_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_set_get_extra_p", ITc_media_packet_set_get_extra_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_set_unset_flags_p", ITc_media_packet_set_unset_flags_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_get_tbm_surface_p", ITc_media_packet_get_tbm_surface_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_create_from_tbm_surface_p", ITc_media_packet_create_from_tbm_surface_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {"ITc_media_packet_has_tbm_surface_buffer_p", ITc_media_packet_has_tbm_surface_buffer_p, ITs_media_tools_startup, ITs_media_tools_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CAPI_MEDIA_TOOL_NATIVE_H__
diff --git a/src/itc/capi-message-port/CMakeLists.txt b/src/itc/capi-message-port/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..6c5eef2
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "capi-message-port")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-message-port")
+SET(TC_SOURCES
+       ITs-capi-message-port-common.c
+       ITs-capi-message-port.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-appfw-app-manager 
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/capi-message-port/ITs-capi-message-port-common.c b/src/itc/capi-message-port/ITs-capi-message-port-common.c
new file mode 100755 (executable)
index 0000000..0028d49
--- /dev/null
@@ -0,0 +1,251 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-capi-message-port-common.h"
+
+/** @addtogroup itc-message-port
+* @ingroup             itc
+* @{
+*/
+
+extern app_control_h g_app_control_handler;
+
+/**
+* @function            MessagePortGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* MessagePortGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case MESSAGE_PORT_ERROR_IO_ERROR:                               szErrorVal = "MESSAGE_PORT_ERROR_IO_ERROR";                                     break;
+       case MESSAGE_PORT_ERROR_OUT_OF_MEMORY:                  szErrorVal = "MESSAGE_PORT_ERROR_OUT_OF_MEMORY";                        break;
+       case MESSAGE_PORT_ERROR_INVALID_PARAMETER:              szErrorVal = "MESSAGE_PORT_ERROR_INVALID_PARAMETER";            break;
+       case MESSAGE_PORT_ERROR_PORT_NOT_FOUND:                 szErrorVal = "MESSAGE_PORT_ERROR_PORT_NOT_FOUND";                       break;
+       case MESSAGE_PORT_ERROR_CERTIFICATE_NOT_MATCH:  szErrorVal = "MESSAGE_PORT_ERROR_CERTIFICATE_NOT_MATCH";        break;
+       case MESSAGE_PORT_ERROR_MAX_EXCEEDED:                   szErrorVal = "MESSAGE_PORT_ERROR_MAX_EXCEEDED";                         break;
+       case MESSAGE_PORT_ERROR_RESOURCE_UNAVAILABLE:   szErrorVal = "MESSAGE_PORT_ERROR_RESOURCE_UNAVAILABLE";         break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function                    MessagePortGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void MessagePortGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stCameraMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stCameraMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stCameraMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    MessagePortGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void MessagePortGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stCameraMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           MessagePortExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void MessagePortExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec - g_stCameraStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stCameraStartTime.tv_usec;
+                       
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+               
+#endif
+}
+
+/**
+ * @function           MessagePortGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stCameraStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void MessagePortGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stCameraStartTime, NULL);
+#endif
+}
+
+/**
+* @function            AppControlGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* AppControlGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case APP_CONTROL_ERROR_NONE:                                    szErrorVal = "APP_CONTROL_ERROR_NONE";                                          break;
+       case APP_CONTROL_ERROR_INVALID_PARAMETER:               szErrorVal = "APP_CONTROL_ERROR_INVALID_PARAMETER";                     break;
+       case APP_CONTROL_ERROR_OUT_OF_MEMORY:                   szErrorVal = "APP_CONTROL_ERROR_OUT_OF_MEMORY";                         break;
+       case APP_CONTROL_ERROR_APP_NOT_FOUND:                   szErrorVal = "APP_CONTROL_ERROR_APP_NOT_FOUND";                         break;
+       case APP_CONTROL_ERROR_KEY_NOT_FOUND:                   szErrorVal = "APP_CONTROL_ERROR_KEY_NOT_FOUND";                         break;
+       case APP_CONTROL_ERROR_KEY_REJECTED:                    szErrorVal = "APP_CONTROL_ERROR_KEY_REJECTED";                          break;
+       case APP_CONTROL_ERROR_INVALID_DATA_TYPE:               szErrorVal = "APP_CONTROL_ERROR_INVALID_DATA_TYPE";                     break;
+       case APP_CONTROL_ERROR_LAUNCH_REJECTED:                 szErrorVal = "APP_CONTROL_ERROR_LAUNCH_REJECTED";                       break;
+       case APP_CONTROL_ERROR_PERMISSION_DENIED:               szErrorVal = "APP_CONTROL_ERROR_PERMISSION_DENIED";                     break;
+       case APP_CONTROL_ERROR_LAUNCH_FAILED:                   szErrorVal = "APP_CONTROL_ERROR_LAUNCH_FAILED";                         break;
+       case APP_CONTROL_ERROR_TIMED_OUT:                               szErrorVal = "APP_CONTROL_ERROR_TIMED_OUT";                                     break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            reply_cb
+* @description         Callback function for quit wait_for_async
+* @parameter
+* @return              FALSE
+*/
+void reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
+{
+       g_main_loop_quit(g_pMessagePortMainLoop);
+}
+
+/**
+* @function            timeout_func
+* @description         Callback function called after timeout
+* @parameter
+* @return              FALSE
+*/
+static gboolean timeout_func(gpointer data)
+{
+    FPRINTF("[Line : %d][%s] g_main_loop timeout \\n", __LINE__, API_NAMESPACE);
+    g_main_loop_quit((GMainLoop *) data);
+    return G_SOURCE_REMOVE;
+}
+
+/**
+* @function            LaunchAppToSendMsg
+* @description         launches application needed for send message
+* @parameter           NA
+* @return              true : if app is launched successfully, false : if app is not launched
+*/
+bool LaunchAppToSendMsg(const char *pszRemoteAppId)
+{
+       bool bIsRunning = false;
+       int nCounter = COUNTER;
+       
+       int nRet = app_control_create(&g_app_control_handler);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] app_control_create fail error returned : %s \\n", __LINE__, API_NAMESPACE , AppControlGetError(nRet));
+               return false;
+       }
+               
+       if ( g_app_control_handler == NULL )
+       {
+               FPRINTF("[Line : %d][%s] app_control_create fail created handle value null \\n", __LINE__, API_NAMESPACE);
+               app_control_destroy(g_app_control_handler);
+               return false;
+       }
+       
+       nRet = app_control_set_app_id(g_app_control_handler , pszRemoteAppId);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] app_control_set_app_id fail error returned : %s \\n", __LINE__, API_NAMESPACE , AppControlGetError(nRet));
+               app_control_destroy(g_app_control_handler);
+               return false;
+       }
+       
+       int messageport_timeout_id = 0;
+       nRet = app_control_send_launch_request(g_app_control_handler , reply_cb , NULL);
+       RUN_POLLING_LOOP;
+       app_manager_is_running(pszRemoteAppId, &bIsRunning);
+       
+       if ( !bIsRunning )
+       {
+               FPRINTF("[Line : %d][%s] app_control_send_launch_request failed \\n", __LINE__, API_NAMESPACE);
+               app_control_destroy(g_app_control_handler);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            TerminateSendToApp
+* @description         terminates application launched for sending message
+* @parameter           NA
+* @return                      NA
+*/
+void TerminateSendToApp()
+{
+       app_control_send_terminate_request(g_app_control_handler);
+       app_control_destroy(g_app_control_handler);     
+}
+/** @} */ //end of itc-message-port
diff --git a/src/itc/capi-message-port/ITs-capi-message-port-common.h b/src/itc/capi-message-port/ITs-capi-message-port-common.h
new file mode 100755 (executable)
index 0000000..ab674e2
--- /dev/null
@@ -0,0 +1,135 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_MESSAGE_PORT_COMMON_H_
+#define _ITS_MESSAGE_PORT_COMMON_H_
+
+//Add test package related includes here
+
+#include "assert.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <malloc.h>
+#include <message_port.h>
+#include <app_manager.h>
+#include <app.h>
+#include <glib.h>
+
+/** @addtogroup itc-message-port
+* @ingroup             itc
+* @{
+*/
+
+#define TIMELOG                                                10
+#define MEMLOG                                         10
+#define API_NAMESPACE                          "MESSAGE_PORT_ITC"
+#define COUNTER                                        30
+#define TIMEOUT_CB                                     20000
+
+FILE *g_fpLog;
+GMainLoop *g_pMessagePortMainLoop;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+typedef struct speedmemory
+{
+       char *pszMemLog1;
+       char *pszMemLog2;
+       char *pszAPI1SpeedLog;
+       char *pszAPI2SpeedLog;
+} MessagePortSpeedMemoryLog;
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][capi-message-port_ITc] Starting test : %s\\n", __LINE__, __FUNCTION__);\
+       }
+
+#define RUN_POLLING_LOOP {\
+       g_pMessagePortMainLoop = g_main_loop_new(NULL, false);\
+       messageport_timeout_id = g_timeout_add(TIMEOUT_CB, timeout_func, g_pMessagePortMainLoop);\
+       g_main_loop_run(g_pMessagePortMainLoop);\
+       g_source_remove(messageport_timeout_id);\
+       g_pMessagePortMainLoop = NULL;\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if(strlen(memLog) > 0) \
+       {  \
+               memLog[strlen(memLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc]%s_MemoryLeakStatus - %s\\n", __LINE__, #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc]%s_TimeInMicrosec- %s\\n", __LINE__, #api, speedLog);\
+       }
+       
+#define MESSAGE_PORT_INITIALISE_MEM_LOGS {\
+       stMessagePortSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       stMessagePortSpeedMemoryLog.pszMemLog2 = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }
+       
+#define MESSAGE_PORT_INITIALISE_SPEED_LOGS {\
+       stMessagePortSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       stMessagePortSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }
+       
+#define MESSAGE_PORT_DEINITIALISE_LOGS {\
+               if ( stMessagePortSpeedMemoryLog.pszMemLog1 != NULL)\
+               {\
+                       free(stMessagePortSpeedMemoryLog.pszMemLog1);\
+                       stMessagePortSpeedMemoryLog.pszMemLog1 = NULL;\
+               }\
+               if ( stMessagePortSpeedMemoryLog.pszMemLog2 != NULL)\
+               {\
+                       free(stMessagePortSpeedMemoryLog.pszMemLog2);\
+                       stMessagePortSpeedMemoryLog.pszMemLog2 = NULL;\
+               }\
+               if ( stMessagePortSpeedMemoryLog.pszAPI1SpeedLog != NULL)\
+               {\
+                       free (stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);\
+                       stMessagePortSpeedMemoryLog.pszAPI1SpeedLog = NULL;\
+               }\
+               if ( stMessagePortSpeedMemoryLog.pszAPI2SpeedLog != NULL)\
+               {\
+                       free (stMessagePortSpeedMemoryLog.pszAPI2SpeedLog);\
+                       stMessagePortSpeedMemoryLog.pszAPI2SpeedLog = NULL;\
+               }\
+       }
+
+//Add helper function declarations here
+
+char* MessagePortGetError(int nRet);
+void MessagePortGetMemAllocation();
+void MessagePortGetMemStatus(char *pszAPIMemory);
+void MessagePortExecutionDelay(char* pszAPITime);
+void MessagePortGetTimeOfDay();
+char* AppControlGetError(int nRet);
+bool LaunchAppToSendMsg(const char *pszRemoteAppId);
+void TerminateSendToApp();
+static gboolean timeout_func(gpointer data);
+void reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data);
+
+/** @} */ //end of itc-message-port
+#endif  //_ITS_MESSAGE_PORT_COMMON_H_
diff --git a/src/itc/capi-message-port/ITs-capi-message-port.c b/src/itc/capi-message-port/ITs-capi-message-port.c
new file mode 100755 (executable)
index 0000000..df7ce2a
--- /dev/null
@@ -0,0 +1,717 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-capi-message-port-common.h"
+
+/** @addtogroup itc-message-port
+* @ingroup             itc
+* @{
+*/
+
+//& set: MessagePort
+
+static const int g_nLocalPortId = 1;
+static bundle* __bundle = NULL;
+static const char g_szLocalPort[] = "my_test_local_port";
+static const char g_szRemotePort[] = "my_test_remote_port";
+static const char g_szTrustedRemotePort[] = "my_test_trusted_remote_port";
+static const char g_szRemoteAppId[] = "org.tizen.messageportapp";
+app_control_h g_app_control_handler = NULL;
+bool g_bMessagePort = false;
+
+/**
+* @function            ITs_message_port_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_message_port_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       if(LaunchAppToSendMsg(g_szRemoteAppId))
+       {
+               g_bMessagePort = true;
+       }
+       __bundle = bundle_create();
+       return;
+}
+
+/**
+* @function            ITs_message_port_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_message_port_cleanup(void)
+{
+       if(g_bMessagePort)
+       {
+               TerminateSendToApp();
+       }
+       bundle_free(__bundle);
+       return;
+}
+
+/**
+* @function            __message_port_cb
+* @description         callback function for message port
+* @parameter           int local_nPortId, const char *remote_app_id, const char *remote_port, bool trusted_remote_port, bundle *message, void *user_data
+* @return                      NA
+*/ 
+static void __message_port_cb(int local_nPortId, const char *remote_app_id,
+        const char *remote_port, bool trusted_remote_port, bundle *message, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][capi-message-port_ITc] Reached message port callback\\n", __LINE__);
+       return;
+}
+
+/** @addtogroup        itc-message-port-testcases
+* @brief               Integration testcases for module message-port
+* @ingroup             itc-message-port
+* @{
+*/
+
+//& purpose: Registers and unregisters local port. 
+//& type: auto 
+/**
+* @testcase                    ITc_message_port_register_unregister_local_port_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers and unregisters local port
+* @scenario                            Register local port\n
+*                                              Unregister local port
+* @apicovered                  message_port_register_local_port, message_port_unregister_local_port                                            
+* @passcase                            When message_port_register_local_port and  message_port_unregister_local_port are successful.
+* @failcase                            If target API message_port_register_local_port or message_port_unregister_local_port fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_message_port_register_unregister_local_port_p(void)
+{
+       START_TEST;
+    int nPortId = -1;
+       int nRegisterFailCount = 0;
+       int nUnRegisterFailCount = 0;
+       int nRet;
+       int nLoopCount = 0;
+       MessagePortSpeedMemoryLog stMessagePortSpeedMemoryLog;
+       memset(&stMessagePortSpeedMemoryLog, 0, sizeof(stMessagePortSpeedMemoryLog));
+       
+       
+#if SPEED_CHECK
+       MESSAGE_PORT_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       MESSAGE_PORT_INITIALISE_MEM_LOGS;
+#endif
+  
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagePortGetMemAllocation();
+               MessagePortGetTimeOfDay();
+               nPortId = message_port_register_local_port(g_szLocalPort, __message_port_cb, NULL);
+               MessagePortExecutionDelay(stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+               MessagePortGetMemStatus(stMessagePortSpeedMemoryLog.pszMemLog1);
+               
+               if (nPortId > 0)
+               {
+                       FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_register_local_port successful, nPortId = %d\\n", __LINE__, nPortId);
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_register_local_port failed, error returned = %d (%s)\\n", __LINE__, nPortId, MessagePortGetError(nPortId));
+                       nRegisterFailCount++;
+                       continue;
+               }
+               
+               MessagePortGetMemAllocation();
+               MessagePortGetTimeOfDay();
+               nRet = message_port_unregister_local_port(nPortId);
+               MessagePortExecutionDelay(stMessagePortSpeedMemoryLog.pszAPI2SpeedLog);
+               MessagePortGetMemStatus(stMessagePortSpeedMemoryLog.pszMemLog2);
+               
+               if (nRet != MESSAGE_PORT_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_unregister_local_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+                       nUnRegisterFailCount++;
+               }
+               else
+               {       
+                       FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_unregister_local_port successful \\n", __LINE__);
+               }
+       
+       }
+
+    if ( nRegisterFailCount > 0 || nUnRegisterFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][MessagePort_ITc] message_port_register_local_port failed %d times, message_port_unregister_local_port failed %d times out of %d times\\n", __LINE__, nRegisterFailCount, nUnRegisterFailCount, MAX_COUNT);
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(message_port_register_local_port, stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(message_port_unregister_local_port, stMessagePortSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(message_port_register_local_port, stMessagePortSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(message_port_unregister_local_port, stMessagePortSpeedMemoryLog.pszMemLog2);
+#endif
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Registers and unregisters trusted local port. 
+//& type: auto 
+/**
+* @testcase                    ITc_message_port_register_unregister_trusted_local_port_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers and unregisters trusted local port
+* @scenario                            Register trusted local port\n
+*                                              Unregister trusted local port
+* @apicovered                  message_port_register_trusted_local_port, message_port_unregister_trusted_local_port                                            
+* @passcase                            When message_port_register_trusted_local_port and  message_port_unregister_trusted_local_port are successful.
+* @failcase                            If target api message_port_register_trusted_local_port or message_port_unregister_trusted_local_port fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_message_port_register_unregister_trusted_local_port_p(void)
+{
+       START_TEST;
+    int nPortId = -1;
+       int nRegisterFailCount = 0;
+       int nUnRegisterFailCount = 0;
+       int nRet;
+       int nLoopCount = 0;
+       MessagePortSpeedMemoryLog stMessagePortSpeedMemoryLog;
+       memset(&stMessagePortSpeedMemoryLog, 0, sizeof(stMessagePortSpeedMemoryLog));
+       
+#if SPEED_CHECK
+       MESSAGE_PORT_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       MESSAGE_PORT_INITIALISE_MEM_LOGS;
+#endif
+  
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagePortGetMemAllocation();
+               MessagePortGetTimeOfDay();
+               nPortId = message_port_register_trusted_local_port(g_szLocalPort, __message_port_cb, NULL);
+               MessagePortExecutionDelay(stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+               MessagePortGetMemStatus(stMessagePortSpeedMemoryLog.pszMemLog1);
+               
+               if (nPortId > 0)
+               {
+                       FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_register_trusted_local_port successful, nPortId = %d\\n", __LINE__, nPortId);
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_register_trusted_local_port failed, error returned = %d (%s)\\n", __LINE__, nPortId, MessagePortGetError(nPortId));
+                       nRegisterFailCount++;
+                       continue;
+               }
+               
+               MessagePortGetMemAllocation();
+               MessagePortGetTimeOfDay();
+               nRet = message_port_unregister_trusted_local_port(nPortId);
+               MessagePortExecutionDelay(stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+               MessagePortGetMemStatus(stMessagePortSpeedMemoryLog.pszMemLog1);
+               
+               if (nRet != MESSAGE_PORT_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_unregister_trusted_local_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+                       nUnRegisterFailCount++;
+               }
+       
+       }
+
+    if ( nRegisterFailCount > 0 || nUnRegisterFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][MessagePort_ITc] message_port_register_trusted_local_port failed %d times, message_port_unregister_trusted_local_port failed %d times, out of %d times\\n", __LINE__, nRegisterFailCount, nUnRegisterFailCount, MAX_COUNT);
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(message_port_register_trusted_local_port, stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(message_port_unregister_trusted_local_port, stMessagePortSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(message_port_register_trusted_local_port, stMessagePortSpeedMemoryLog.pszMemLog1);
+               PRINT_MEMORY_LOG(message_port_unregister_trusted_local_port, stMessagePortSpeedMemoryLog.pszMemLog2);
+#endif
+
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Checks remote port. 
+//& type: auto 
+/**
+* @testcase                    ITc_message_port_check_remote_port_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks remote port
+* @scenario                            Check remote port
+* @apicovered                  message_port_check_remote_port                                          
+* @passcase                            When message_port_check_remote_port is successful.
+* @failcase                            If target api message_port_check_remote_port fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_message_port_check_remote_port_p(void)
+{
+       START_TEST;
+    int nFailCount = 0;
+       int nRet;
+       int nLoopCount = 0;
+       MessagePortSpeedMemoryLog stMessagePortSpeedMemoryLog;
+       memset(&stMessagePortSpeedMemoryLog, 0, sizeof(stMessagePortSpeedMemoryLog));
+       bool bExist = false;
+
+#if SPEED_CHECK
+       stMessagePortSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stMessagePortSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagePortGetMemAllocation();
+               MessagePortGetTimeOfDay();
+               nRet = message_port_check_remote_port(g_szRemoteAppId, g_szRemotePort, &bExist);
+               MessagePortExecutionDelay(stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+               MessagePortGetMemStatus(stMessagePortSpeedMemoryLog.pszMemLog1);
+               
+               if (nRet != MESSAGE_PORT_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_check_remote_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+                       nFailCount++;
+               }
+               else 
+               {
+                       if (bExist)
+                       {
+                               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_check_remote_port passed, remote port bExist \\n", __LINE__);
+                       }
+               }
+               if (!bExist)
+               {
+                       FPRINTF("[Line: %d][%s] message_port_check_remote_port failed, returned bExist :: false\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][MessagePort_ITc] message_port_check_remote_port failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(message_port_check_remote_port, stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(message_port_check_remote_port, stMessagePortSpeedMemoryLog.pszMemLog1);
+#endif
+
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Checks trusted remote port. 
+//& type: auto 
+/**
+* @testcase                    ITc_message_port_check_trusted_remote_port_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks trusted remote port
+* @scenario                            Check trusted remote port
+* @apicovered                  message_port_check_trusted_remote_port                                          
+* @passcase                            When message_port_check_trusted_remote_port is successful.
+* @failcase                            If target api message_port_check_trusted_remote_port fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_message_port_check_trusted_remote_port_p(void)
+{
+       START_TEST;
+    int nFailCount = 0;
+       int nRet;
+       MessagePortSpeedMemoryLog stMessagePortSpeedMemoryLog;
+       memset(&stMessagePortSpeedMemoryLog, 0, sizeof(stMessagePortSpeedMemoryLog));
+       bool bExist = false;
+       int nLoopCount = 0;
+
+#if SPEED_CHECK
+       stMessagePortSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stMessagePortSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagePortGetMemAllocation();
+               MessagePortGetTimeOfDay();
+               nRet = message_port_check_trusted_remote_port(g_szRemoteAppId, g_szTrustedRemotePort, &bExist);
+               MessagePortExecutionDelay(stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+               MessagePortGetMemStatus(stMessagePortSpeedMemoryLog.pszMemLog1);
+               
+               if (nRet != MESSAGE_PORT_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_check_trusted_remote_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+                       nFailCount++;
+               }
+               else 
+               {
+                       if (bExist)
+                       {
+                               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_check_trusted_remote_port passed, remote port bExist \\n", __LINE__);
+                       }
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][MessagePort_ITc] message_port_check_trusted_remote_port failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(message_port_check_remote_port, stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(message_port_check_remote_port, stMessagePortSpeedMemoryLog.pszMemLog1);
+#endif
+
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Send message. 
+//& type: auto 
+/**
+* @testcase                    ITc_message_port_send_message_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers local port, check remote port and send message
+* @scenario                            Register local port\n
+*                                              Check remote port\n
+*                                              Send message\n
+*                                              Unregister local port
+* @apicovered                  message_port_register_local_port, message_port_check_remote_port, message_port_send_message, message_port_unregister_local_port                                         
+* @passcase                            When message_port_register_local_port, message_port_check_remote_port and message_port_send_message are successful.
+* @failcase                            If api message_port_register_local_port, message_port_check_remote_port and message_port_send_message fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_message_port_send_message_p(void)
+{
+       START_TEST;
+    int nRet = MESSAGE_PORT_ERROR_NONE;
+       bool bExist = false;
+       int nPortId = 0;
+       int nFailCount = 0;
+       int nLoopCount = 0;
+       MessagePortSpeedMemoryLog stMessagePortSpeedMemoryLog;
+       memset(&stMessagePortSpeedMemoryLog, 0, sizeof(stMessagePortSpeedMemoryLog));
+       
+       nPortId = message_port_register_local_port(g_szLocalPort, __message_port_cb, NULL);
+       if (nPortId < 0)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_register_local_port failed, error returned = %d(%s)\\n", __LINE__, nPortId,MessagePortGetError(nPortId));
+               return 1;
+       }
+
+       nRet = message_port_check_remote_port(g_szRemoteAppId, g_szRemotePort, &bExist);
+       if (nRet != MESSAGE_PORT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_check_remote_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+               return 1;
+       }
+       if (!bExist)
+       {
+               FPRINTF("[Line: %d][%s] message_port_check_remote_port failed, returned bExist :: false\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       stMessagePortSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stMessagePortSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagePortGetMemAllocation();
+               MessagePortGetTimeOfDay();
+               nRet = message_port_send_message(g_szRemoteAppId, g_szRemotePort, __bundle);
+               if (nRet != MESSAGE_PORT_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_send_message_with_local_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+                       nFailCount++;
+               }
+               MessagePortExecutionDelay(stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+               MessagePortGetMemStatus(stMessagePortSpeedMemoryLog.pszMemLog1);
+       }
+
+       message_port_unregister_local_port(nPortId);
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][MessagePort_ITc] message_port_send_message_with_local_port failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(message_port_send_message_with_local_port, stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(message_port_send_message_with_local_port, stMessagePortSpeedMemoryLog.pszMemLog1);
+#endif
+
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Send message. 
+//& type: auto 
+/**
+* @testcase                    ITc_message_port_send_message_with_local_port_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers local port, check remote port and send message\n
+* @scenario                            Register local port\n
+*                                              Check remote port\n
+*                                              Send message\n
+*                                              Unregister local port.
+* @apicovered                  message_port_register_local_port, message_port_check_remote_port, message_port_send_message, message_port_unregister_local_port                                         
+* @passcase                            When message_port_register_local_port, message_port_check_remote_port and message_port_send_message are successful.
+* @failcase                            If api message_port_register_local_port, message_port_check_remote_port and message_port_send_message fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_message_port_send_message_with_local_port_p(void)
+{
+       START_TEST;
+    int nRet = MESSAGE_PORT_ERROR_NONE;
+       bool bExist = false;
+       int nPortId = 0;
+       int nFailCount = 0;
+       int nLoopCount = 0;
+       MessagePortSpeedMemoryLog stMessagePortSpeedMemoryLog;
+       memset(&stMessagePortSpeedMemoryLog, 0, sizeof(stMessagePortSpeedMemoryLog));
+       
+       nPortId = message_port_register_local_port(g_szLocalPort, __message_port_cb, NULL);
+       if (nPortId < 0)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_register_local_port failed, error returned = %d(%s)\\n", __LINE__, nPortId,MessagePortGetError(nPortId));
+               return 1;
+       }
+
+       nRet = message_port_check_remote_port(g_szRemoteAppId, g_szRemotePort, &bExist);
+       if (nRet != MESSAGE_PORT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_check_remote_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+               return 1;
+       }
+       if (!bExist)
+       {
+               FPRINTF("[Line: %d][%s] message_port_check_remote_port failed, returned bExist :: false\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       stMessagePortSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       stMessagePortSpeedMemoryLog.pszMemLog1 = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagePortGetMemAllocation();
+               MessagePortGetTimeOfDay();
+               nRet = message_port_send_message_with_local_port(g_szRemoteAppId, g_szRemotePort, __bundle, nPortId);
+               if (nRet != MESSAGE_PORT_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_send_message_with_local_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+                       nFailCount++;
+               }
+               MessagePortExecutionDelay(stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+               MessagePortGetMemStatus(stMessagePortSpeedMemoryLog.pszMemLog1);
+       }
+
+       message_port_unregister_local_port(nPortId);
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][MessagePort_ITc] message_port_send_message_with_local_port failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(message_port_send_message_with_local_port, stMessagePortSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(message_port_send_message_with_local_port, stMessagePortSpeedMemoryLog.pszMemLog1);
+#endif
+
+               MESSAGE_PORT_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Send trusted message with local port information to the message port of remote application. 
+//& type: auto 
+/**
+* @testcase                    ITc_message_port_send_trusted_message_with_local_port_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers trusted local port, check trusted remote port and send trusted message\n
+* @scenario                            Register trusted local port\n
+*                                              Check trusted remote port\n
+*                                              Send trusted message\n
+*                                              Unregister trusted local port.
+* @apicovered                  message_port_register_trusted_local_port, message_port_check_trusted_remote_port, message_port_send_trusted_message, message_port_unregister_trusted_local_port                                         
+* @passcase                            When message_port_register_trusted_local_port, message_port_check_trusted_remote_port and message_port_send_trusted_message are successful.
+* @failcase                            If api message_port_register_trusted_local_port, message_port_check_trusted_remote_port and message_port_send_trusted_message fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_message_port_send_trusted_message_with_local_port_p(void)
+{
+       START_TEST;
+    int nRet = MESSAGE_PORT_ERROR_NONE;
+       bool bExist = false;
+       int nPortId = 0;
+       
+       nPortId = message_port_register_trusted_local_port(g_szLocalPort, __message_port_cb, NULL);
+       if (nPortId < 0)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_register_trusted_local_port failed, error returned = %d(%s)\\n", __LINE__, nPortId,MessagePortGetError(nPortId));
+               return 1;
+       }
+
+       nRet = message_port_check_trusted_remote_port(g_szRemoteAppId, g_szTrustedRemotePort, &bExist);
+       if (nRet != MESSAGE_PORT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_check_trusted_remote_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+               return 1;
+       }
+       nRet = message_port_send_trusted_message_with_local_port(g_szRemoteAppId, g_szTrustedRemotePort, __bundle, nPortId);
+       if (nRet != MESSAGE_PORT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_send_trusted_message_with_local_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+               return 1;
+       }
+       
+       nRet = message_port_unregister_trusted_local_port(nPortId);
+       if (nRet != MESSAGE_PORT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_unregister_trusted_local_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+
+//& purpose: Send trusted message. 
+//& type: auto 
+/**
+* @testcase                    ITc_message_port_send_trusted_message_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers trusted local port, check trusted remote port and send trusted message
+* @scenario                            Register local port\n
+*                                              Check remote port\n
+*                                              Send trusted message\n
+*                                              Unregister local port
+* @apicovered                  message_port_register_trusted_local_port, message_port_check_trusted_remote_port, message_port_send_trusted_message, message_port_unregister_trusted_local_port                                         
+* @passcase                            When message_port_register_trusted_local_port, message_port_check_trusted_remote_port and message_port_send_trusted_message are successful.
+* @failcase                            If api message_port_register_trusted_local_port, message_port_check_trusted_remote_port and message_port_send_trusted_message fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_message_port_send_trusted_message_p(void)
+{
+       START_TEST;
+    int nRet = MESSAGE_PORT_ERROR_NONE;
+       bool bExist = false;
+       int nPortId = 0;
+       
+       nPortId = message_port_register_trusted_local_port(g_szLocalPort, __message_port_cb, NULL);
+       if (nPortId < 0)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_register_trusted_local_port failed, error returned = %d(%s)\\n", __LINE__, nPortId,MessagePortGetError(nPortId));
+               return 1;
+       }
+
+       nRet = message_port_check_trusted_remote_port(g_szRemoteAppId, g_szTrustedRemotePort, &bExist);
+       if (nRet != MESSAGE_PORT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_check_trusted_remote_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+               return 1;
+       }
+
+       nRet = message_port_send_trusted_message(g_szRemoteAppId, g_szTrustedRemotePort, __bundle);
+       if (nRet != MESSAGE_PORT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_send_trusted_message failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+               return 1;
+       }
+
+       nRet = message_port_unregister_trusted_local_port(nPortId);
+       if (nRet != MESSAGE_PORT_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][capi-message-port_ITc] message_port_unregister_trusted_local_port failed, error returned = %d (%s)\\n", __LINE__, nRet, MessagePortGetError(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+/** @} */ //end of itc-message-port
+/** @} */ //end of itc-message-port-testcases
\ No newline at end of file
diff --git a/src/itc/capi-message-port/native-capi-message-port-itc.sh b/src/itc/capi-message-port/native-capi-message-port-itc.sh
new file mode 100755 (executable)
index 0000000..f4c7eb5
--- /dev/null
@@ -0,0 +1,16 @@
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+( echo 3 ; sleep 1 ; echo cert ; sleep 1 ; echo 0 ) | pkginfo --setcert native-capi-message-port-itc
diff --git a/src/itc/capi-message-port/native-message-port-itc.sh b/src/itc/capi-message-port/native-message-port-itc.sh
new file mode 100755 (executable)
index 0000000..f4c7eb5
--- /dev/null
@@ -0,0 +1,16 @@
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+( echo 3 ; sleep 1 ; echo cert ; sleep 1 ; echo 0 ) | pkginfo --setcert native-capi-message-port-itc
diff --git a/src/itc/capi-message-port/res/org.tizen.messageportapp-1.0.0-arm.tpk b/src/itc/capi-message-port/res/org.tizen.messageportapp-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..62a16f3
Binary files /dev/null and b/src/itc/capi-message-port/res/org.tizen.messageportapp-1.0.0-arm.tpk differ
diff --git a/src/itc/capi-message-port/res/org.tizen.messageportapp-1.0.0-i386.tpk b/src/itc/capi-message-port/res/org.tizen.messageportapp-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..775ea91
Binary files /dev/null and b/src/itc/capi-message-port/res/org.tizen.messageportapp-1.0.0-i386.tpk differ
diff --git a/src/itc/capi-message-port/tct-capi-message-port-native.c b/src/itc/capi-message-port/tct-capi-message-port-native.c
new file mode 100755 (executable)
index 0000000..31ea4a9
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-capi-message-port-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/capi-message-port/tct-capi-message-port-native.h b/src/itc/capi-message-port/tct-capi-message-port-native.h
new file mode 100755 (executable)
index 0000000..5054c98
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CAPI_MESSAGE_PORT_NATIVE_H__
+#define __TCT_CAPI_MESSAGE_PORT_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_message_port_startup(void);
+extern void ITs_message_port_cleanup(void);
+
+extern int ITc_message_port_register_unregister_local_port_p(void);
+extern int ITc_message_port_register_unregister_trusted_local_port_p(void);
+extern int ITc_message_port_check_remote_port_p(void);
+extern int ITc_message_port_check_trusted_remote_port_p(void);
+extern int ITc_message_port_send_message_p(void);
+extern int ITc_message_port_send_message_with_local_port_p(void);
+extern int ITc_message_port_send_trusted_message_with_local_port_p(void);
+extern int ITc_message_port_send_trusted_message_p(void);
+
+testcase tc_array[] = {
+    {"ITc_message_port_register_unregister_local_port_p", ITc_message_port_register_unregister_local_port_p, ITs_message_port_startup, ITs_message_port_cleanup},
+    {"ITc_message_port_register_unregister_trusted_local_port_p", ITc_message_port_register_unregister_trusted_local_port_p, ITs_message_port_startup, ITs_message_port_cleanup},
+    {"ITc_message_port_check_remote_port_p", ITc_message_port_check_remote_port_p, ITs_message_port_startup, ITs_message_port_cleanup},
+    {"ITc_message_port_check_trusted_remote_port_p", ITc_message_port_check_trusted_remote_port_p, ITs_message_port_startup, ITs_message_port_cleanup},
+    {"ITc_message_port_send_message_p", ITc_message_port_send_message_p, ITs_message_port_startup, ITs_message_port_cleanup},
+    {"ITc_message_port_send_message_with_local_port_p", ITc_message_port_send_message_with_local_port_p, ITs_message_port_startup, ITs_message_port_cleanup},
+    {"ITc_message_port_send_trusted_message_with_local_port_p", ITc_message_port_send_trusted_message_with_local_port_p, ITs_message_port_startup, ITs_message_port_cleanup},
+    {"ITc_message_port_send_trusted_message_p", ITc_message_port_send_trusted_message_p, ITs_message_port_startup, ITs_message_port_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CAPI_MESSAGE_PORT_NATIVE_H__
diff --git a/src/itc/connection/CMakeLists.txt b/src/itc/connection/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..9172732
--- /dev/null
@@ -0,0 +1,41 @@
+SET(PKG_NAME "connection")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-network-connection")
+SET(TC_SOURCES
+       ITs-connection-common.c
+       ITs-connection.c
+       ITs-connection-profile.c
+       ITs-connection-wifi-profile.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-media-tone-player
+       capi-system-system-settings
+       capi-network-wifi
+       bundle
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/connection/ITs-connection-common.c b/src/itc/connection/ITs-connection-common.c
new file mode 100755 (executable)
index 0000000..c8ea6f0
--- /dev/null
@@ -0,0 +1,573 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-connection-common.h"
+
+/** @addtogroup itc-connection
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stConnectionStartTime;
+extern struct mallinfo g_stConnectionMemInfo;
+
+/**
+* @function            ConnectionGetError
+* @description         Maps error enums to string values
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* ConnectionGetError(connection_error_e nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case CONNECTION_ERROR_NONE : szErrorVal = "CONNECTION_ERROR_NONE"; break; /**< Successful */
+               case CONNECTION_ERROR_INVALID_PARAMETER : szErrorVal = "CONNECTION_ERROR_INVALID_PARAMETER"; break; /**< Invalid parameter */
+               case CONNECTION_ERROR_OUT_OF_MEMORY: szErrorVal = "CONNECTION_ERROR_OUT_OF_MEMORY"; break; /**< Out of memory error */
+               case CONNECTION_ERROR_INVALID_OPERATION : szErrorVal = "CONNECTION_ERROR_INVALID_OPERATION"; break; /**< Invalid Operation */
+               case CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED : szErrorVal = "CONNECTION_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED"; break; /**< Address family not supported */
+               case CONNECTION_ERROR_OPERATION_FAILED : szErrorVal = "CONNECTION_ERROR_OPERATION_FAILED"; break; /**< Operation failed */
+               case CONNECTION_ERROR_ITERATOR_END : szErrorVal = "CONNECTION_ERROR_ITERATOR_END"; break; /**< End of iteration */
+               case CONNECTION_ERROR_NO_CONNECTION : szErrorVal = "CONNECTION_ERROR_NO_CONNECTION"; break; /**< There is no connection */
+               case CONNECTION_ERROR_NOW_IN_PROGRESS : szErrorVal = "CONNECTION_ERROR_NOW_IN_PROGRESS"; break; /** Now in progress */
+               case CONNECTION_ERROR_ALREADY_EXISTS : szErrorVal = "CONNECTION_ERROR_ALREADY_EXISTS"; break; /**< Already exists */
+               case CONNECTION_ERROR_OPERATION_ABORTED : szErrorVal = "CONNECTION_ERROR_OPERATION_ABORTED"; break; /**< Operation is aborted */
+               case CONNECTION_ERROR_DHCP_FAILED : szErrorVal = "CONNECTION_ERROR_DHCP_FAILED"; break; /**< DHCP failed  */
+               case CONNECTION_ERROR_INVALID_KEY : szErrorVal = "CONNECTION_ERROR_INVALID_KEY"; break; /**< Invalid key  */
+               case CONNECTION_ERROR_NO_REPLY : szErrorVal = "CONNECTION_ERROR_NO_REPLY"; break; /**< No reply */
+               case CONNECTION_ERROR_PERMISSION_DENIED : szErrorVal = "CONNECTION_ERROR_PERMISSION_DENIED"; break; /**< Permission denied */
+               case CONNECTION_ERROR_NOT_SUPPORTED : szErrorVal = "CONNECTION_ERROR_NOT_SUPPORTED"; break; /**< Not supported */
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+
+/**
+ * @function           ConnectionGetCellularStateType
+ * @description                Maps Cellular status  enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* ConnectionGetCellularStateType(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE: szErrorVal = "CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE"; break;  /**< Out of service */
+               case CONNECTION_CELLULAR_STATE_FLIGHT_MODE: szErrorVal = "CONNECTION_CELLULAR_STATE_FLIGHT_MODE"; break;  /**< Flight mode */
+               case CONNECTION_CELLULAR_STATE_ROAMING_OFF: szErrorVal = "CONNECTION_CELLULAR_STATE_ROAMING_OFF"; break;  /**< Roaming is turned off */
+               case CONNECTION_CELLULAR_STATE_CALL_ONLY_AVAILABLE: szErrorVal = "CONNECTION_CELLULAR_STATE_CALL_ONLY_AVAILABLE"; break; /**< Call is only available */
+               case CONNECTION_CELLULAR_STATE_AVAILABLE: szErrorVal = "CONNECTION_CELLULAR_STATE_AVAILABLE"; break;  /**< Available but not connected yet */
+               case CONNECTION_CELLULAR_STATE_CONNECTED: szErrorVal = "CONNECTION_CELLULAR_STATE_CONNECTED"; break;  /**< Connected */
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           ConnectionGetType
+ * @description                Maps type enums to string values
+ * @parameter          nRet : code returned
+ * @return                     error string
+ */
+char* ConnectionGetType(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case CONNECTION_TYPE_DISCONNECTED: szErrorVal = "CONNECTION_TYPE_DISCONNECTED"; break;  /**< Disconnected */
+               case CONNECTION_TYPE_WIFI: szErrorVal = "CONNECTION_TYPE_WIFI"; break;  /**< Wi-Fi type */
+               case CONNECTION_TYPE_CELLULAR: szErrorVal = "CONNECTION_TYPE_CELLULAR"; break;  /**< Cellular type */
+               case CONNECTION_TYPE_ETHERNET: szErrorVal = "CONNECTION_TYPE_ETHERNET"; break;  /**< Ethernet type */
+               case CONNECTION_TYPE_BT: szErrorVal = "CONNECTION_TYPE_BT"; break; /**< Bluetooth type */
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           ConnectionGetAddressFamily
+ * @description                Maps type enums to string values
+ * @parameter          nRet : code returned
+ * @return                     error string
+ */
+char* ConnectionGetAddressFamily(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch(nRet)
+       {
+               case CONNECTION_ADDRESS_FAMILY_IPV4: szErrorVal = "CONNECTION_ADDRESS_FAMILY_IPV4"; break;  /**< Disconnected */
+               case CONNECTION_ADDRESS_FAMILY_IPV6: szErrorVal = "CONNECTION_ADDRESS_FAMILY_IPV6"; break;  /**< Wi-Fi type */
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           ConnectionGetCellularServiceType
+ * @description                Maps type enums to string values
+ * @parameter          nRet : code returned
+ * @return                     error string
+ */
+char* ConnectionGetCellularServiceType(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch(nRet)
+       {
+               case CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN: szErrorVal = "CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN"; break;                                           /**< Unknown */
+               case CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET: szErrorVal = "CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET"; break;                                         /**< Internet */
+               case CONNECTION_CELLULAR_SERVICE_TYPE_MMS: szErrorVal = "CONNECTION_CELLULAR_SERVICE_TYPE_MMS"; break;                                                           /**< MMS */
+               case CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET: szErrorVal = "CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET"; break;         /**< Prepaid internet */
+               case CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_MMS: szErrorVal = "CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_MMS"; break;                           /**< Prepaid MMS */
+               case CONNECTION_CELLULAR_SERVICE_TYPE_TETHERING: szErrorVal = "CONNECTION_CELLULAR_SERVICE_TYPE_TETHERING"; break;                                       /**< Tethering */
+               case CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION: szErrorVal = "CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION"; break;                           /**< Specific application */
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           ConnectionGetCellularAuthType
+ * @description                Maps type enums to string values
+ * @parameter          nRet : enum value
+ * @return                     string of enum value
+ */
+char* ConnectionGetCellularAuthType(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch(nRet)
+       {
+               case CONNECTION_CELLULAR_AUTH_TYPE_NONE: szErrorVal = "CONNECTION_CELLULAR_AUTH_TYPE_NONE"; break;                                               /**< Unknown */
+               case CONNECTION_CELLULAR_AUTH_TYPE_PAP: szErrorVal = "CONNECTION_CELLULAR_AUTH_TYPE_PAP"; break;                                         /**< Internet */
+               case CONNECTION_CELLULAR_AUTH_TYPE_CHAP: szErrorVal = "CONNECTION_CELLULAR_AUTH_TYPE_CHAP"; break;                                                               /**< MMS */
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           ConnectionGetIpConfigType
+ * @description                Maps type enums to string values
+ * @parameter          nRet : enum value
+ * @return                     string of enum value
+ */
+char* ConnectionGetIpConfigType(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch(nRet)
+       {
+               case CONNECTION_IP_CONFIG_TYPE_NONE: szErrorVal = "CONNECTION_IP_CONFIG_TYPE_NONE"; break;                                               /**< Unknown */
+               case CONNECTION_IP_CONFIG_TYPE_STATIC: szErrorVal = "CONNECTION_IP_CONFIG_TYPE_STATIC"; break;                                   /**< Internet */
+               case CONNECTION_IP_CONFIG_TYPE_DYNAMIC: szErrorVal = "CONNECTION_IP_CONFIG_TYPE_DYNAMIC"; break;
+               case CONNECTION_IP_CONFIG_TYPE_AUTO: szErrorVal = "CONNECTION_IP_CONFIG_TYPE_AUTO"; break;
+               case CONNECTION_IP_CONFIG_TYPE_FIXED: szErrorVal = "CONNECTION_IP_CONFIG_TYPE_FIXED"; break;
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           ConnectionGetProxyType
+ * @description                Maps type enums to string values
+ * @parameter          nRet : enum value
+ * @return                     string of enum value
+ */
+char* ConnectionGetProxyType(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch(nRet)
+       {
+               case CONNECTION_PROXY_TYPE_DIRECT: szErrorVal = "CONNECTION_PROXY_TYPE_DIRECT"; break;
+               case CONNECTION_PROXY_TYPE_AUTO: szErrorVal = "CONNECTION_PROXY_TYPE_AUTO"; break;
+               case CONNECTION_PROXY_TYPE_MANUAL: szErrorVal = "CONNECTION_PROXY_TYPE_MANUAL"; break;
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           ConnectionGetIteratorType
+ * @description                Maps type enums to string values
+ * @parameter          nRet : enum value
+ * @return                     string of enum value
+ */
+char* ConnectionGetIteratorType(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch(nRet)
+       {
+               case CONNECTION_ITERATOR_TYPE_REGISTERED: szErrorVal = "CONNECTION_ITERATOR_TYPE_REGISTERED"; break;
+               case CONNECTION_ITERATOR_TYPE_CONNECTED: szErrorVal = "CONNECTION_ITERATOR_TYPE_CONNECTED"; break;
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           ConnectionGetStatisticTypeData
+ * @description                Maps type enums to string values
+ * @parameter          nRet : enum value
+ * @return                     string of enum value
+ */
+char* ConnectionGetStatisticTypeData(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch(nRet)
+       {
+               case CONNECTION_STATISTICS_TYPE_LAST_RECEIVED_DATA: szErrorVal = "CONNECTION_STATISTICS_TYPE_LAST_RECEIVED_DATA"; break;
+               case CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA: szErrorVal = "CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA"; break;
+               case CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA: szErrorVal = "CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA"; break;
+               case CONNECTION_STATISTICS_TYPE_TOTAL_SENT_DATA: szErrorVal = "CONNECTION_STATISTICS_TYPE_TOTAL_SENT_DATA"; break;
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function                    ConnectionGetMemStatus
+* @description         Returns the Memory Allocation state
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void ConnectionGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+
+               if(stMemInfo.uordblks > g_stConnectionMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stConnectionMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stConnectionMemInfo.uordblks - stMemInfo.uordblks);
+               }
+
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+
+#endif
+}
+
+/**
+* @function                    ConnectionGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void ConnectionGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stConnectionMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void ConnectionExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);
+       ulldifference = ((stEnd.tv_sec -g_stConnectionStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stConnectionStartTime.tv_usec;
+
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+
+#endif
+}
+
+/**
+ * @function           SystemGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stConnectionStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */
+void ConnectionGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stConnectionStartTime, NULL);
+#endif
+}
+
+
+/**
+ * @function           ConnectionManager_get_celluar_profile
+ * @description                Get registered cellular profile
+ * @parameter          [in] connection_h [out] connection_profile_h
+ * @return                     int
+ *
+ */
+int ConnectionManager_get_celluar_profile(connection_h connection ,connection_profile_h *profile)
+{
+ int nReturnValue = 0;
+ connection_profile_h profile_h;
+ connection_profile_iterator_h profile_iter;
+ connection_profile_type_e eConnectionProfileType;
+
+ nReturnValue = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_REGISTERED, &profile_iter);
+ if (nReturnValue != CONNECTION_ERROR_NONE)
+ {
+         FPRINTF("\\n[Line : %d][Connection_ITc]Fail to get profile iterator [%d]\\n",__LINE__, nReturnValue);
+         return 0;
+ }
+
+ while (connection_profile_iterator_has_next(profile_iter))
+ {
+        nReturnValue = connection_profile_iterator_next(profile_iter, &profile_h);
+        if (nReturnValue != CONNECTION_ERROR_NONE)
+        {
+                 FPRINTF("\\n[Line : %d][Connection_ITc]Fail to get profile handle [%s]\\n",__LINE__, ConnectionGetError(nReturnValue));
+                 return 0;
+        }
+
+        nReturnValue = connection_profile_get_type(profile_h, &eConnectionProfileType );
+        if (nReturnValue != CONNECTION_ERROR_NONE)
+        {
+                 FPRINTF("\\n[Line : %d][Connection_ITc]Fail to get profile type [%s]\\n",__LINE__, ConnectionGetError(nReturnValue));
+                 return 0;
+        }
+
+        if(eConnectionProfileType == CONNECTION_PROFILE_TYPE_CELLULAR)
+        {
+                nReturnValue = connection_profile_clone(profile, profile_h);
+                if (nReturnValue != CONNECTION_ERROR_NONE)
+                {
+                        connection_profile_destroy(&profile);
+                        FPRINTF("\\n[Line : %d][Connection_ITc]Fail to clone cellular profile handle [%s]\\n",__LINE__, ConnectionGetError(nReturnValue));
+                        return 0;
+                }
+                return 1;
+        }
+ }
+ FPRINTF("\\n[Line : %d][Connection_ITc]ConnectionManager_get_celluar_profile fail to get cellular profile handle",__LINE__);
+ return 0;
+}
+
+/**
+ * @function           ConnectionManager_get_celluar_profile_by_name
+ * @description                Get registered cellular profile by name
+ * @parameter          [in] connection_h [in] profile name [out] connection_profile_h
+ * @return                     int
+ *
+ */
+int ConnectionManager_get_celluar_profile_by_name(connection_h connection , char* profileName , connection_profile_h *profile)
+{
+ int nReturnValue = 0;
+ connection_profile_h profile_h;
+ connection_profile_iterator_h profile_iter;
+ connection_profile_type_e eConnectionProfileType;
+
+ nReturnValue = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_REGISTERED, &profile_iter);
+ if (nReturnValue != CONNECTION_ERROR_NONE)
+ {
+         FPRINTF("\\n[Line : %d][Connection_ITc]Fail to get profile iterator [%d]\\n",__LINE__, nReturnValue);
+         return 0;
+ }
+
+ while (connection_profile_iterator_has_next(profile_iter))
+ {
+        nReturnValue = connection_profile_iterator_next(profile_iter, &profile_h);
+        if (nReturnValue != CONNECTION_ERROR_NONE)
+        {
+                 FPRINTF("\\n[Line : %d][Connection_ITc]Fail to get profile handle [%s]\\n",__LINE__, ConnectionGetError(nReturnValue));
+                 return 0;
+        }
+
+        nReturnValue = connection_profile_get_type(profile_h, &eConnectionProfileType );
+        if (nReturnValue != CONNECTION_ERROR_NONE)
+        {
+                 FPRINTF("\\n[Line : %d][Connection_ITc]Fail to get profile type [%s]\\n",__LINE__, ConnectionGetError(nReturnValue));
+                 return 0;
+        }
+
+        if(eConnectionProfileType == CONNECTION_PROFILE_TYPE_CELLULAR)
+        {
+               char* pszProfileName ;
+               nReturnValue = connection_profile_get_name( profile_h , &pszProfileName);
+               if (nReturnValue != CONNECTION_ERROR_NONE)
+               {
+                        FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_name return error[%s]\\n",__LINE__, ConnectionGetError(nReturnValue));
+                        return 0;
+               }
+                
+               if(!pszProfileName)
+               {
+                        FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_name return profile name :: null [%s]\\n",__LINE__, ConnectionGetError(nReturnValue));
+                        return 0;
+               }
+                
+               if(strcmp(pszProfileName , profileName) == 0)
+               {
+                       nReturnValue = connection_profile_clone(profile, profile_h);
+                       if (nReturnValue != CONNECTION_ERROR_NONE)
+                       {
+                                connection_profile_destroy(&profile);
+                                FPRINTF("\\n[Line : %d][Connection_ITc]Fail to clone cellular profile handle [%s]\\n",__LINE__, ConnectionGetError(nReturnValue));
+                                free(pszProfileName);
+                                pszProfileName = NULL;
+                                return 0;
+                       }                       
+                       free(pszProfileName);
+                       pszProfileName = NULL;
+                       return 1;
+               }
+        }
+ }
+ FPRINTF("\\n[Line : %d][Connection_ITc]ConnectionManager_get_celluar_profile fail to get cellular profile handle",__LINE__);
+ return 0;
+}
+
+
+/**
+ * @function           ConnectionManager_get_wifi_profile
+ * @description                Get registered wifi profile
+ * @parameter          [in] connection_h [out] connection_profile_h
+ * @return                     int
+ *
+ */
+int ConnectionManager_get_wifi_profile(connection_h connection ,connection_profile_h *profile)
+{
+ int nReturnValue = 0;
+ connection_profile_h profile_h;
+ connection_profile_iterator_h profile_iter;
+ connection_profile_type_e eConnectionProfileType;
+
+ nReturnValue = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_REGISTERED, &profile_iter);
+ if (nReturnValue != CONNECTION_ERROR_NONE)
+ {
+         FPRINTF("\\n[Line : %d][Connection_ITc]Fail to get profile iterator [%d]\\n",__LINE__, nReturnValue);
+         return 0;
+ }
+
+ while (connection_profile_iterator_has_next(profile_iter))
+ {
+        nReturnValue = connection_profile_iterator_next(profile_iter, &profile_h);
+        if (nReturnValue != CONNECTION_ERROR_NONE)
+        {
+                 FPRINTF("\\n[Line : %d][Connection_ITc]Fail to get profile handle [%s]\\n",__LINE__, ConnectionGetError(nReturnValue));
+                 return 0;
+        }
+
+        nReturnValue = connection_profile_get_type(profile_h, &eConnectionProfileType );
+        if (nReturnValue != CONNECTION_ERROR_NONE)
+        {
+                 FPRINTF("\\n[Line : %d][Connection_ITc]Fail to get profile type [%s]\\n",__LINE__, ConnectionGetError(nReturnValue));
+                 return 0;
+        }
+
+        if(eConnectionProfileType == CONNECTION_PROFILE_TYPE_WIFI)
+        {
+                nReturnValue = connection_profile_clone(profile, profile_h);
+                if (nReturnValue != CONNECTION_ERROR_NONE)
+                {
+                        connection_profile_destroy(&profile);
+                        FPRINTF("\\n[Line : %d][Connection_ITc]Fail to clone wifi profile handle [%s]\\n",__LINE__, ConnectionGetError(nReturnValue));
+                        return 0;
+                }
+                return 1;
+        }
+ }
+
+ FPRINTF("\\n[Line : %d][Connection_ITc]ConnectionManager_get_wifi_profile fail to get wifi profile handle",__LINE__);
+ return 0;
+}
+
+/**
+ * @function           Connection_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Connection_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if(NULL == pszKey)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] Null key value passed to function : Connection_Check_System_Info_Feature_Supported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] system_info_get_platform_bool returned (error = %s) for (key = %s)",__LINE__, Connection_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if(false == bValue)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] system_info_get_platform_bool returned Supported status feature for (key = %s)",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           Connection_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Connection_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Cannot find key in model config file " ; break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR  : szErrorVal = "Error - An input/output error occurred when read value from model config file " ; break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY   : szErrorVal = "Error - Out of memory  " ; break;
+                       
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+/** @} */ 
diff --git a/src/itc/connection/ITs-connection-common.h b/src/itc/connection/ITs-connection-common.h
new file mode 100755 (executable)
index 0000000..57fb02a
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_CONNECTION_COMMON_H_
+#define _ITS_CONNECTION_COMMON_H_
+
+/************************** Headers **********************************************/
+#include "assert.h"
+#include <malloc.h>
+#include <stdlib.h>
+#include <glib-2.0/glib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <net_connection.h>
+#include <tone_player.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <system_settings.h> 
+#include <wifi.h>
+#include <system_info.h>
+
+/** @addtogroup itc-connection
+*  @ingroup itc
+*  @{
+*/
+
+FILE *fpLog;
+bool g_bFeatureSupported;
+bool g_bFeatureMismatch;
+bool g_bFeatureNotSupported;
+
+#define LOG                                                    100
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define WIFI_FEATURE                           "http://tizen.org/feature/network.wifi"
+#define BLUETOOTH_FEATURE                      "http://tizen.org/feature/network.tethering.bluetooth"
+#define TELEPHONY_FEATURE                      "http://tizen.org/feature/network.telephony"
+
+//helper function declarations here
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][Connection_ITc]Starting test : %s\\n",__LINE__,__FUNCTION__);\
+       if (g_bFeatureMismatch)\
+       {\
+               return 1;\
+       }\
+       if (g_bFeatureNotSupported)\
+       {\
+               return 0;\
+       }\
+}
+
+#define FPRINTF(...) {\
+       fpLog = fopen(ERR_LOG,"a");\
+       fprintf (fpLog, __VA_ARGS__);\
+       fclose(fpLog);\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog){\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d][Connection_ITc] %s_MemoryLeakStatus - %s\\n",__LINE__, #api, memLog);\
+       }\
+       free(memLog);\
+       memLog = NULL;\
+}
+
+#define PRINT_SPEED_LOG(api, speedLog) {\
+       if(strlen(speedLog) > 0)\
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s_TimeInMicrosec- %s\\n",__LINE__, #api, speedLog);\
+       }\
+       free(speedLog);\
+       speedLog = NULL;\
+}
+
+#define PRINT_POST_RESULT(nRetVal, API) {\
+       if (nRetVal != CONNECTION_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed in post-condition, error returned = %s \\n",__LINE__, API, ConnectionGetError(nRetVal));\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == CONNECTION_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s passed\\n",__LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed in pre-condition, error returned = %s \\n",__LINE__, API, ConnectionGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+void ConnectionGetTimeOfDay();
+void ConnectionGetMemAllocation();
+void ConnectionExecutionDelay(char* pszAPITime);
+void ConnectionGetMemStatus(char *pszAPIMemory);
+
+char* ConnectionGetAddressFamily(int nRet);
+char* ConnectionGetStatisticTypeData(int nRet);
+char* ConnectionGetProxyType(int nRet);
+char* ConnectionGetIteratorType(int nRet);
+char* ConnectionGetIpConfigType(int nRet);
+char* ConnectionGetCellularAuthType(int nRet);
+char* ConnectionGetCellularServiceType(int nRet);
+char* ConnectionGetError(int nRet);
+char* ConnectionGetCellularStateType(int nRet);
+char* ConnectionGetType(int nRet);
+int ConnectionManager_get_celluar_profile(connection_h connection ,connection_profile_h *profile);
+int ConnectionManager_get_wifi_profile(connection_h connection ,connection_profile_h *profile);
+int ConnectionManager_get_celluar_profile_by_name(connection_h connection , char* profileName , connection_profile_h *profile);
+
+bool Connection_Check_System_Info_Feature_Supported(char* pszKey);
+char* Connection_System_Info_GetError(int nRet);
+
+/** @} */ 
+#endif  //_ITS_CONNECTION_COMMON_H_
diff --git a/src/itc/connection/ITs-connection-profile.c b/src/itc/connection/ITs-connection-profile.c
new file mode 100755 (executable)
index 0000000..62ca958
--- /dev/null
@@ -0,0 +1,3289 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-connection-common.h"
+
+/** @addtogroup itc-connection
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Connection
+struct timeval g_stConnectionStartTime;
+struct mallinfo g_stConnectionMemInfo;
+
+int g_nConnectionErrorCount1 , g_nConnectionErrorCount2 ;
+int g_nConnectionPreconditionError = 0;
+connection_h g_hConenctionHandle = NULL;
+connection_profile_h g_hConnectionProfileHandleCellular = NULL;
+char* g_pszConnectionCellularProfileName = "CellularConnectionProfile" ;
+
+char *g_pszSpeedLogAPI1 = NULL;
+char *g_pszSpeedLogAPI2 = NULL;
+char *g_pszMemLogAPI1 = NULL;
+char *g_pszMemLogAPI2 = NULL;
+
+static GMainLoop *g_pMainLoop;
+static bool g_bCallbackResult = false;
+static bool g_bCloseCallbackResult = false;
+static bool g_bOpenCallbackResult = false;
+gboolean Timeout_Function(gpointer data);
+
+gboolean Timeout_Function(gpointer data)
+{
+       g_main_loop_quit((GMainLoop *)data);
+       return false;
+}
+
+void test_connection_opened_callback(connection_error_e result, void* user_data)
+{
+       FPRINTF("\\n[Line : %d][Connection_ITc]Inside callback \"test_connection_opened_callback\"", __LINE__);
+       g_bOpenCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+
+void test_connection_closed_callback(connection_error_e result, void* user_data)
+{
+       FPRINTF("\\n[Line : %d][Connection_ITc]Inside callback \"test_connection_closed_callback\"", __LINE__);
+       g_bCloseCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+
+static void test_profile_state_changed_cb(connection_profile_state_e state, void* user_data)
+{
+       FPRINTF("\\n[Line : %d][Connection_ITc]Inside callback \"test_profile_state_changed_cb\"", __LINE__);
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+
+static void test_connection_set_default_callback(connection_error_e result, void* user_data)
+{
+       FPRINTF("\\n[Line : %d][Connection_ITc]Inside test_connection_set_default_callback", __LINE__);
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+
+void test_connection_reset_profile_callback_cb(connection_error_e result, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Connection_ITc]Inside callback \"test_connection_reset_profile_callback_cb\"", __LINE__);
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+}
+
+void ITs_connection_profile_startup(void)
+{
+       struct stat buf;   
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       
+       g_bFeatureSupported = true;
+       g_bFeatureMismatch = false;
+       g_bFeatureNotSupported = false;
+       
+       bool bTelFeatureSupported = Connection_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE);
+       bool bWifiFeatureSupported = Connection_Check_System_Info_Feature_Supported(WIFI_FEATURE);
+       bool bBtFeatureSupported = Connection_Check_System_Info_Feature_Supported(BLUETOOTH_FEATURE);
+       
+       g_nConnectionErrorCount1 = 0;
+       g_nConnectionErrorCount2 = 0;
+       g_nConnectionPreconditionError = 0;
+       g_bCallbackResult = false;
+       g_hConnectionProfileHandleCellular = NULL;
+       g_hConenctionHandle = NULL;
+
+       int nRetVal = connection_create(&g_hConenctionHandle);
+       
+       if(false == bTelFeatureSupported && false == bWifiFeatureSupported && false == bBtFeatureSupported) 
+       {
+               g_bFeatureSupported = false;
+               if (nRetVal != TIZEN_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_create API call returned mismatch %s error for unsupported telephony feature", __LINE__, ConnectionGetError(nRetVal));
+                       g_bFeatureMismatch = true;
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_create API call correctly returned %s error for unsupported telephony feature", __LINE__, ConnectionGetError(nRetVal));
+                       g_bFeatureNotSupported = true;
+               }
+               return;
+       }
+       
+       if((nRetVal != CONNECTION_ERROR_NONE)||(g_hConenctionHandle == NULL))
+       {
+               g_nConnectionPreconditionError = 1;
+               g_hConenctionHandle = NULL;
+               return ;
+       }
+
+       if(ConnectionManager_get_celluar_profile(g_hConenctionHandle , &g_hConnectionProfileHandleCellular) == 0)
+       {
+               if(false == bTelFeatureSupported) 
+               {
+                       if (g_hConnectionProfileHandleCellular == NULL)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] Cellular profile handle is NULL, unsupported telephony feature", __LINE__);
+                               g_bFeatureNotSupported = true;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] Cellular profile handle is not NULL, mismatch for unsupported telephony feature ", __LINE__);
+                               g_bFeatureMismatch = true;
+                       }
+                       return;
+               }
+               else
+               {
+                       g_nConnectionPreconditionError = 1;
+                       FPRINTF("\\n[Line : %d][Connection_ITc]startup failed on getting cellular profile\\n", __LINE__);
+                       return ;
+               }
+       }
+
+       if(g_hConnectionProfileHandleCellular == NULL)
+       {
+               g_nConnectionPreconditionError = 1;
+               FPRINTF("\\n[Line : %d][Connection_ITc]startup failed on create cellular profile :: NULL \\n", __LINE__);
+               return ;
+       }
+}
+
+void ITs_connection_profile_cleanup(void)
+{
+       // Null initialization of pointer
+       if(g_pszSpeedLogAPI1 != NULL)
+       {
+               free(g_pszSpeedLogAPI1);
+               g_pszSpeedLogAPI1 = NULL;
+       }
+
+       if(g_pszSpeedLogAPI2 != NULL)
+       {
+               free(g_pszSpeedLogAPI2);
+               g_pszSpeedLogAPI2 = NULL;
+       }
+
+       if(g_pszMemLogAPI1 != NULL)
+       {
+               free(g_pszMemLogAPI1);
+               g_pszMemLogAPI1 = NULL;
+       }
+
+       if(g_pszMemLogAPI2 != NULL)
+       {
+               free(g_pszMemLogAPI2);
+               g_pszMemLogAPI2 = NULL;
+       }
+
+       int nRetVal = 0;
+
+       if(g_nConnectionPreconditionError == 0 && g_bFeatureSupported == true)
+       {
+               if(g_hConnectionProfileHandleCellular != NULL)
+               {
+                       nRetVal = connection_profile_destroy(g_hConnectionProfileHandleCellular);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_destroy failed on post condition error returned = %s ", __LINE__, ConnectionGetError(nRetVal));
+                       }
+               }
+
+               nRetVal = connection_destroy(g_hConenctionHandle);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_destroy failed on post condition error returned = %s ", __LINE__, ConnectionGetError(nRetVal));
+               }
+       }
+
+       g_nConnectionPreconditionError = 0;
+}
+
+/** @addtogroup itc-connection-profile-testcases
+*  @brief              Integration testcases for module connection-profile
+*  @ingroup    itc-connection-profile
+*  @{
+*/
+
+//& purpose: To check create and destroy connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_create_destroy_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check create and destroy connection profile
+* @scenario                            Call API to create connection profile\n
+*                                              Call API to destroy the created connection profile
+* @apicovered                  connection_profile_create, connection_profile_destroy
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_profile_create_destroy_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+
+       // Initializing test variable
+       connection_h hConenction = NULL;
+       connection_profile_h hConnectionProfile = NULL;
+       connection_profile_type_e eConnectionProfileType = CONNECTION_PROFILE_TYPE_CELLULAR ;
+
+       char *pszCreateSpeedLog = NULL;
+       char *pszDestroySpeedLog = NULL;
+       char *pszCreateMemLog = NULL;
+
+
+       //creating conenction handler
+       nRetVal = connection_create(&hConenction);
+       PRINT_RESULT(nRetVal , "connection_create");
+
+#if SPEED_CHECK
+       pszCreateSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszCreateMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       //creating a testing profile
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_create( eConnectionProfileType, "TestingCelluarProfile", &hConnectionProfile);
+               ConnectionExecutionDelay(pszCreateSpeedLog);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_create failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               if(hConnectionProfile == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_create failed on iteration %d, returned connection profile :: NULL" , __LINE__, nLoopCount);
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_destroy(hConnectionProfile);
+               ConnectionExecutionDelay(pszDestroySpeedLog);
+               ConnectionGetMemStatus(pszCreateMemLog);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_destroy failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount2++;
+               }
+
+       }
+
+       nRetVal = connection_destroy(hConenction);
+       PRINT_POST_RESULT(nRetVal , "connection_destroy");
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_create", g_nConnectionErrorCount1, "connection_profile_destroy", g_nConnectionErrorCount2, MAX_COUNT);
+
+#if SPEED_CHECK
+               free(pszCreateSpeedLog);
+               free(pszDestroySpeedLog);
+               pszCreateSpeedLog = NULL;
+               pszDestroySpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszCreateMemLog);
+               pszCreateMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_create, pszCreateSpeedLog);
+       PRINT_SPEED_LOG(connection_profile_destroy, pszDestroySpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_create, pszCreateMemLog);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check name of connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_name_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check name of connection profile
+* @scenario                            Call API to get name
+* @apicovered                  connection_profile_get_name
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_name_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0)
+       {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_name_p failed on precondition", __LINE__);
+                       return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       char *pszFindConnectionProfileName;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_name(g_hConnectionProfileHandleCellular, &pszFindConnectionProfileName);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+               ConnectionGetMemStatus(g_pszMemLogAPI2);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_name failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount2++;
+                       continue;
+               }
+
+               if(pszFindConnectionProfileName == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_name failed on iteration %d, mismatch in connection profile names is NULL ", __LINE__ ,  nLoopCount);
+                       g_nConnectionErrorCount2++;
+                       continue;
+               }
+
+               if(pszFindConnectionProfileName != NULL)
+               {
+                       free(pszFindConnectionProfileName);
+                       pszFindConnectionProfileName = NULL;
+               }
+       }
+
+       if(g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, out of %d times\\n", __LINE__, "connection_profile_get_name", g_nConnectionErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_name, g_pszSpeedLogAPI2);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_name, g_pszMemLogAPI2);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check id of connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_id_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check id of connection profile
+* @scenario                            Call API to get id
+* @apicovered                  connection_profile_get_id
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_id_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_id_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       char* pszProfileId = NULL;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_id(g_hConnectionProfileHandleCellular , &pszProfileId);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_id failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               if(pszProfileId == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_id iteration %d, returned profile id null \\n", __LINE__, nLoopCount);
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_id iteration %d, returned profile id = %s \\n", __LINE__, nLoopCount, pszProfileId);
+
+               if(pszProfileId != NULL)
+               {
+                       free(pszProfileId);
+                       pszProfileId = NULL;
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, out of %d times\\n", __LINE__, "connection_profile_get_id", g_nConnectionErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_id, g_pszSpeedLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_id, g_pszMemLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check type of connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_type_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check type of connection profile
+* @scenario                            Call API to get type
+* @apicovered                  connection_profile_get_type
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_type_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_type_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+
+       // Initializing test variable
+       connection_profile_type_e eConnectionProfileType = CONNECTION_PROFILE_TYPE_CELLULAR ;
+       connection_profile_type_e eFindConnectionProfileType ;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_type(g_hConnectionProfileHandleCellular , &eFindConnectionProfileType);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_type failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               if(eConnectionProfileType != eFindConnectionProfileType)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_type failed on iteration %d, mismatch in connection type value" , __LINE__,  nLoopCount);
+                       g_nConnectionErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, out of %d times\\n", __LINE__, "connection_profile_get_type", g_nConnectionErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_type, g_pszSpeedLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_type, g_pszMemLogAPI1);
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check name of network interface
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_network_interface_name_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check name of network interface
+* @scenario                            Call API to get name of network interface
+* @apicovered                  connection_profile_get_network_interface_name
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_network_interface_name_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_network_interface_name_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+
+       // Initializing test variable
+       char* pszGetInterfaceName = NULL;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_network_interface_name(g_hConnectionProfileHandleCellular , &pszGetInterfaceName);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_network_interface_name failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               if(pszGetInterfaceName == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_network_interface_name iteration %d, returned network interfaces = null ", __LINE__, nLoopCount);
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               if(pszGetInterfaceName != NULL)
+               {
+                       free(pszGetInterfaceName);
+                       pszGetInterfaceName = NULL;
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, out of %d times\\n", __LINE__, "connection_profile_get_network_interface_name", g_nConnectionErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_network_interface_name, g_pszSpeedLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_network_interface_name, g_pszMemLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check clone of profile handler
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_clone_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check create and destroy connection profile
+* @scenario                            Call API to create clone of connection profile handle\n
+*                                              Call API to destroy cloned connection profile
+* @apicovered                  connection_profile_clone, connection_profile_destroy
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_clone_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_clone_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1;
+
+       // Initializing test variable
+       connection_profile_h hConnectionProfileTemp = NULL;
+       char *pszCreateSpeedLog = NULL;
+       char *pszDestroySpeedLog = NULL;
+       char *pszCreateMemLog = NULL;
+
+#if SPEED_CHECK
+       pszCreateSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszCreateMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_clone(&hConnectionProfileTemp ,g_hConnectionProfileHandleCellular );
+               ConnectionExecutionDelay(pszCreateSpeedLog);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_clone failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               if(hConnectionProfileTemp == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_clone failed on iteration %d, profile cloned returned null", __LINE__, nLoopCount);
+                       g_nConnectionErrorCount1++;
+                       continue;
+
+               }
+
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_destroy(hConnectionProfileTemp);
+               ConnectionExecutionDelay(pszDestroySpeedLog);
+               ConnectionGetMemStatus(pszCreateMemLog);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_destroy failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount2++;
+               }
+
+       }
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_clone", g_nConnectionErrorCount1, "connection_profile_destroy", g_nConnectionErrorCount2, MAX_COUNT);
+
+#if SPEED_CHECK
+               free(pszCreateSpeedLog);
+               free(pszDestroySpeedLog);
+               pszCreateSpeedLog = NULL;
+               pszDestroySpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszCreateMemLog);
+               pszCreateMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_clone, pszCreateSpeedLog);
+       PRINT_SPEED_LOG(connection_profile_destroy, pszDestroySpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_clone, pszCreateMemLog);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check cellular profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_get_cellular_apn_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check create and destroy connection profile
+* @scenario                            Call API to set the APN(Access Point Name)\n
+*                                              Call API to get the APN
+* @apicovered                  connection_profile_set_cellular_apn, connection_profile_get_cellular_apn
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_get_cellular_apn_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_get_cellular_apn_p  precondition failed.", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1;
+
+       // Initializing test variable
+       char *pszSetApnName = "profile.net";
+       char *pszGetApnName = NULL;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_set_cellular_apn(g_hConnectionProfileHandleCellular , pszSetApnName);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_cellular_apn failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_cellular_apn(g_hConnectionProfileHandleCellular , &pszGetApnName);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+               ConnectionGetMemStatus(g_pszMemLogAPI2);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_apn failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount2++;
+               }
+               if ( pszGetApnName == NULL )
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] pszGetApnName is NULL at iteration %d\n", __LINE__, nLoopCount);
+                       continue;
+               }
+               if((strcmp(pszSetApnName , pszGetApnName ) != 0))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_apn failed on iteration %d, mismatch in value" , __LINE__,  nLoopCount);
+                       g_nConnectionErrorCount2++;
+               }
+
+               if(pszGetApnName != NULL)
+               {
+                       free(pszGetApnName);
+                       pszGetApnName = NULL;
+               }
+       }
+
+       pszSetApnName = NULL;
+       pszGetApnName = NULL;
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_cellular_apn", g_nConnectionErrorCount1, "connection_profile_get_cellular_apn", g_nConnectionErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_cellular_apn, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_get_cellular_apn, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_cellular_apn, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_get_cellular_apn, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check set/get the authentication information
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_get_cellular_auth_info_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get the authentication information
+* @scenario                            Call API to set authentication information\n
+*                                              Call API to get authentication information
+* @apicovered                  connection_profile_set_cellular_auth_info, connection_profile_get_cellular_auth_info
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_get_cellular_auth_info_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_get_cellular_auth_info_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1,nEnumLoopCount;
+
+       // Initializing test variable
+       char *pszUserName = "tizen";
+       char *pszPassword= "flower";
+       char *pszFindUserName = NULL;
+       char *pszFindPassword= NULL;
+       connection_cellular_auth_type_e eConnectionCellularAuthType;
+       int arrConnectionCellularAuthTypeSet[] = {
+                       CONNECTION_CELLULAR_AUTH_TYPE_NONE,  /**< No authentication */
+                       CONNECTION_CELLULAR_AUTH_TYPE_PAP,   /**< PAP authentication */
+                       CONNECTION_CELLULAR_AUTH_TYPE_CHAP,  /**< CHAP authentication */
+       };
+       int nConenctionCellularAuthTypeCount = sizeof(arrConnectionCellularAuthTypeSet) / sizeof(arrConnectionCellularAuthTypeSet[0]);
+       connection_cellular_auth_type_e eFindCellularAuthType  = -1;
+
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nConenctionCellularAuthTypeCount, sizeof(char));
+       g_pszSpeedLogAPI2 =  calloc(TIMELOG * MAX_COUNT * nConenctionCellularAuthTypeCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT * nConenctionCellularAuthTypeCount, sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT * nConenctionCellularAuthTypeCount, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0; nEnumLoopCount < nConenctionCellularAuthTypeCount; nEnumLoopCount++)
+       {
+               eConnectionCellularAuthType = arrConnectionCellularAuthTypeSet[nEnumLoopCount];
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_set_cellular_auth_info(g_hConnectionProfileHandleCellular, eConnectionCellularAuthType , pszUserName, pszPassword);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogAPI1);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_cellular_auth_info failed on iteration %d, error returned = %s , cellular auth type = %s \\n ", __LINE__, nLoopCount, ConnectionGetError(nRetVal) , ConnectionGetAddressFamily(eConnectionCellularAuthType));
+                               g_nConnectionErrorCount1++;
+                               continue;
+                       }
+
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_get_cellular_auth_info(g_hConnectionProfileHandleCellular , &eFindCellularAuthType , &pszFindUserName ,&pszFindPassword);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+                       ConnectionGetMemStatus(g_pszMemLogAPI2);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_auth_info failed on iteration %d, error returned = %s ,cellular auth type = %s \\n", __LINE__, nLoopCount, ConnectionGetError(nRetVal), ConnectionGetCellularAuthType(eFindCellularAuthType));
+                               g_nConnectionErrorCount2++;
+                               continue;
+                       }
+
+                       if((eFindCellularAuthType != eConnectionCellularAuthType))
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_auth_info failed on iteration %d, mismatch in cellular auth type {set type :get type}::{%s : %s} \\n " , __LINE__,  nLoopCount, ConnectionGetCellularAuthType(eConnectionCellularAuthType) , ConnectionGetCellularAuthType(eFindCellularAuthType));
+                               g_nConnectionErrorCount2++;
+                       }
+                       
+                       if(pszFindUserName == NULL || pszFindPassword == NULL )
+                               return 1;
+
+                       if((strcmp(pszFindUserName , pszUserName) != 0))
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_auth_info failed on iteration %d, mismatch in user name  {set user name : get user name} ::{ %s:%s }" , __LINE__,  nLoopCount , pszUserName , pszFindUserName);
+                               g_nConnectionErrorCount2++;
+                       }
+
+                       if((strcmp(pszFindPassword , pszPassword ) != 0))
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_auth_info failed on iteration %d, mismatch in password {set pswd : get pswd} ::{ %s:%s }", __LINE__ ,  nLoopCount , pszPassword , pszFindPassword);
+                               g_nConnectionErrorCount2++;
+                       }
+
+                       if(pszFindPassword != NULL)
+                       {
+                               free(pszFindPassword);
+                               pszFindPassword = NULL;
+                       }
+
+                       if(pszFindUserName != NULL)
+                       {
+                               free(pszFindUserName);
+                               pszFindUserName = NULL;
+                       }
+               }
+       }
+
+       pszUserName = NULL;
+       pszPassword= NULL;
+       pszFindUserName = NULL;
+       pszFindPassword= NULL;
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_cellular_auth_info", g_nConnectionErrorCount1, "connection_profile_get_cellular_auth_info", g_nConnectionErrorCount2, MAX_COUNT * nConenctionCellularAuthTypeCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_cellular_auth_info, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_get_cellular_auth_info, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_cellular_auth_info, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_get_cellular_auth_info, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check set/get home url
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_get_cellular_home_url_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get the authentication information
+* @scenario                            Call API to set home url\n
+*                                              Call API to get home url
+* @apicovered                  connection_profile_set_cellular_home_url, connection_profile_get_cellular_home_url
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_get_cellular_home_url_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_get_cellular_home_url_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1;
+       // Initializing test variable
+       char *pszURL = "tizen.org";
+       char *pszFindURL= NULL;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_set_cellular_home_url(g_hConnectionProfileHandleCellular, pszURL);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_cellular_home_url failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_cellular_home_url(g_hConnectionProfileHandleCellular , &pszFindURL);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+               ConnectionGetMemStatus(g_pszMemLogAPI2);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_home_url failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount2++;
+                       continue;
+               }
+
+               if ( pszFindURL == NULL )
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] pszFindURL is NULL at iteration %d\n", __LINE__, nLoopCount);
+                       continue;
+               }
+               if(strcmp(pszFindURL  ,pszURL) != 0)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_home_url failed on iteration %d, mismatch in value" , __LINE__,  nLoopCount);
+                       g_nConnectionErrorCount2++;
+               }
+
+               if(pszFindURL != NULL)
+               {
+                       free(pszFindURL);
+                       pszFindURL = NULL;
+               }
+       }
+
+       pszFindURL = NULL;
+       pszURL = NULL;
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_cellular_home_url", g_nConnectionErrorCount1, "connection_profile_get_cellular_home_url", g_nConnectionErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_cellular_home_url, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_get_cellular_home_url, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_cellular_home_url, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_get_cellular_home_url, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check set/get service type
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_get_cellular_service_type_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get service type
+* @scenario                            Call API to set service type\n
+*                                              Call API to get service type
+* @apicovered                  connection_profile_set_cellular_service_type, connection_profile_get_cellular_service_type
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_get_cellular_service_type_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_get_cellular_service_type_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1, nEnumLoopCount;
+       // Initializing test variable
+       connection_cellular_service_type_e eSetServiceType ;
+       int arrConnectionCellularServiceTypeSet[] = {
+                   /*CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN,*/               /**< Unknown */                 //Invalid Type for API
+                       CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET,              /**< Internet */
+                       CONNECTION_CELLULAR_SERVICE_TYPE_MMS,                           /**< MMS */
+                       CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET,  /**< Prepaid internet */
+                       CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_MMS,           /**< Prepaid MMS */
+                       CONNECTION_CELLULAR_SERVICE_TYPE_TETHERING,             /**< Tethering */
+                       CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION,           /**< Specific application */
+       };
+       int nConnectionCellularServiceTypeCount = sizeof(arrConnectionCellularServiceTypeSet) / sizeof(arrConnectionCellularServiceTypeSet[0]) ;
+       connection_cellular_service_type_e eGetServiceType  = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 = calloc(TIMELOG * MAX_COUNT * nConnectionCellularServiceTypeCount, sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT * nConnectionCellularServiceTypeCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT * nConnectionCellularServiceTypeCount, sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT * nConnectionCellularServiceTypeCount, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0; nEnumLoopCount < nConnectionCellularServiceTypeCount; nEnumLoopCount++)
+       {
+               eSetServiceType = arrConnectionCellularServiceTypeSet[nEnumLoopCount];
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_set_cellular_service_type(g_hConnectionProfileHandleCellular, eSetServiceType);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogAPI1);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_cellular_service_type failed on iteration %d, error returned = %s , cellular service type = %s \\n ", __LINE__, nLoopCount, ConnectionGetError(nRetVal) ,ConnectionGetCellularServiceType(eSetServiceType));
+                               g_nConnectionErrorCount1++;
+                               continue;
+                       }
+
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_get_cellular_service_type(g_hConnectionProfileHandleCellular , &eGetServiceType);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+                       ConnectionGetMemStatus(g_pszMemLogAPI2);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_service_type failed on iteration %d, error returned = %s , cellular service type = %s \\n ", __LINE__, nLoopCount, ConnectionGetError(nRetVal), ConnectionGetCellularServiceType(eGetServiceType));
+                               g_nConnectionErrorCount2++;
+                               continue;
+                       }
+
+                       if(eSetServiceType != eGetServiceType)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_service_type failed on iteration %d, mismatch in service type {set:get}::{%s:%s}\\n ", __LINE__ ,  nLoopCount , ConnectionGetCellularServiceType(eSetServiceType), ConnectionGetCellularServiceType(eGetServiceType));
+                               g_nConnectionErrorCount2++;
+                       }
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_cellular_service_type", g_nConnectionErrorCount1, "connection_profile_get_cellular_service_type", g_nConnectionErrorCount2, MAX_COUNT * nConnectionCellularServiceTypeCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_cellular_service_type, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_get_cellular_service_type, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_cellular_service_type, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_get_cellular_service_type, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check state of roaming
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_is_cellular_roaming_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check state of roaming
+* @scenario                            Call API to get state of roaming
+* @apicovered                  connection_profile_is_cellular_roaming
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_is_cellular_roaming_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_is_cellular_roaming_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1;
+
+       // Initializing test variable
+       bool bOutput;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_is_cellular_roaming(g_hConnectionProfileHandleCellular, &bOutput);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_cellular_roaming failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               if((bOutput != true) && (bOutput != false) )
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_cellular_roaming failed on iteration %d, mismatch in value", __LINE__ ,  nLoopCount);
+                       g_nConnectionErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n", __LINE__, "connection_profile_is_cellular_roaming", g_nConnectionErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_is_cellular_roaming, g_pszSpeedLogAPI1);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_is_cellular_roaming, g_pszMemLogAPI1);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check state of profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_state_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check state of profile
+* @scenario                            Call API to get state of profile
+* @apicovered                  connection_profile_get_state
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_state_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_state_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1;
+
+       // Initializing test variable
+       connection_profile_state_e eConnectionProfileState = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_state(g_hConnectionProfileHandleCellular, &eConnectionProfileState);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_state failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               if(eConnectionProfileState == -1)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_state failed on iteration %d, invalid value", __LINE__ ,  nLoopCount);
+                       g_nConnectionErrorCount1++;
+               }
+
+       }
+
+       if(g_nConnectionErrorCount1 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n", __LINE__, "connection_profile_get_state", g_nConnectionErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_state, g_pszSpeedLogAPI1);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_state, g_pszMemLogAPI1);
+
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check set/get dns address
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_get_dns_address_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get dns address
+* @scenario                            Call API to set dns address\n
+*                                              Call API to get dns address
+* @apicovered                  connection_profile_set_dns_address, connection_profile_get_dns_address
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_get_dns_address_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_get_dns_address_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 , nEnumLoopCount;
+
+       // Initializing test variable
+       char* pszTestDns = NULL;
+       char* pszFindDns = NULL;
+       int arrConnectionAddressFamilyValues[] = {
+                                CONNECTION_ADDRESS_FAMILY_IPV4,  /**< IPV4 Address type */
+                                //CONNECTION_ADDRESS_FAMILY_IPV6  /**< IPV6 Address type */
+       };
+       int nConnectionFamilyCount = sizeof(arrConnectionAddressFamilyValues) / sizeof(arrConnectionAddressFamilyValues[0]);
+       connection_address_family_e e_address_family ;
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0; nEnumLoopCount < nConnectionFamilyCount; nEnumLoopCount++)
+       {
+               e_address_family = arrConnectionAddressFamilyValues[nEnumLoopCount];
+               if(nEnumLoopCount == 0){
+                       pszTestDns = "192.168.127.11";
+               }else{
+                       pszTestDns = "2001:0db8:0000:0000:0000:ff00:0042:8329";
+               }
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_set_dns_address(g_hConnectionProfileHandleCellular, 1, e_address_family, pszTestDns);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogAPI1);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_dns_address failed on iteration %d, address family = %s , error returned = %s ", __LINE__, nLoopCount, ConnectionGetAddressFamily(e_address_family) , ConnectionGetError(nRetVal));
+                               g_nConnectionErrorCount1++;
+                               continue;
+                       }
+
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_get_dns_address(g_hConnectionProfileHandleCellular, 1, e_address_family, &pszFindDns);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+                       ConnectionGetMemStatus(g_pszMemLogAPI2);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_dns_address failed on iteration %d, address family = %s , error returned = %s ", __LINE__, nLoopCount, ConnectionGetAddressFamily(e_address_family) ,ConnectionGetError(nRetVal));
+                               g_nConnectionErrorCount2++;
+                               continue;
+                       }
+                       if ( pszFindDns == NULL)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] pszFindDns is NULL at iteration %d\n", __LINE__, nLoopCount);
+                               continue;
+                       }
+
+                       if(strcmp(pszTestDns , pszFindDns) != 0)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_dns_address failed on iteration %d, mismatch in dns address {(set : get)::(%s : %s)}", __LINE__ ,  nLoopCount , pszTestDns, pszFindDns);
+                               g_nConnectionErrorCount2++;
+                       }
+
+                       if(pszFindDns != NULL)
+                       {
+                               free(pszFindDns);
+                               pszFindDns = NULL;
+                       }
+               }
+       }
+
+       pszTestDns = NULL;
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_dns_address", g_nConnectionErrorCount1, "connection_profile_get_dns_address", g_nConnectionErrorCount2, MAX_COUNT * nConnectionFamilyCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_dns_address, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_get_dns_address, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_dns_address, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_get_dns_address, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check set/get gatway
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_get_gateway_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get gatway
+* @scenario                            Call API to set gateway\n
+*                                              Call API to get gateway
+* @apicovered                  connection_profile_set_gateway_address, connection_profile_get_gateway_address
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_get_gateway_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_get_gateway_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 , nEnumLoopCount;
+
+       // Initializing test variable
+       char* pszTestGateway = NULL;
+       char* pszFindFGateway = NULL;
+
+       int arrConnectionAddressFamilyValues[] = {
+                                CONNECTION_ADDRESS_FAMILY_IPV4,  /**< IPV4 Address type */
+                                //CONNECTION_ADDRESS_FAMILY_IPV6  /**< IPV6 Address type */
+       };
+       int nConnectionFamilyCount = sizeof(arrConnectionAddressFamilyValues) / sizeof(arrConnectionAddressFamilyValues[0]);
+       connection_address_family_e e_address_family ;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0; nEnumLoopCount < nConnectionFamilyCount; nEnumLoopCount++)
+       {
+               e_address_family = arrConnectionAddressFamilyValues[nEnumLoopCount];
+               if(nEnumLoopCount == 0){
+                       pszTestGateway = "192.168.127.1";
+               }else{
+                       pszTestGateway = "2002:c0a8:7f01:0:0:0:0:0";
+               }
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_set_gateway_address(g_hConnectionProfileHandleCellular, e_address_family, pszTestGateway);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogAPI1);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_gateway_address failed on iteration %d, error returned = %s , address family = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal) , ConnectionGetAddressFamily(e_address_family));
+                               g_nConnectionErrorCount1++;
+                               continue;
+                       }
+
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_get_gateway_address(g_hConnectionProfileHandleCellular, e_address_family, &pszFindFGateway);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+                       ConnectionGetMemStatus(g_pszMemLogAPI2);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_gateway_address failed on iteration %d, error returned = %s , address family = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal) ,ConnectionGetAddressFamily(e_address_family));
+                               g_nConnectionErrorCount2++;
+                               continue;
+                       }
+                       if ( pszFindFGateway == NULL )
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] pszFindFGateway is NULL at iteration %d\n", __LINE__, nLoopCount);
+                               continue;
+                       }
+
+                       if(strcmp(pszTestGateway , pszFindFGateway) != 0)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_gateway_address failed on iteration %d, mismatch in gateway {(set:get)::(%s:%s)}", __LINE__ ,  nLoopCount , pszTestGateway , pszFindFGateway);
+                               g_nConnectionErrorCount2++;
+                       }
+
+                       if(pszFindFGateway != NULL)
+                       {
+                               free(pszFindFGateway);
+                               pszFindFGateway = NULL;
+                       }
+               }
+       }
+
+       pszTestGateway = NULL;
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_gateway_address", g_nConnectionErrorCount1, "connection_profile_get_gateway_address", g_nConnectionErrorCount2, MAX_COUNT * nConnectionFamilyCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_gateway_address, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_get_gateway_address, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_gateway_address, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_get_gateway_address, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+//& purpose:  To check set/get IP address
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_get_ip_address_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get IP address 
+* @scenario                            Call API to set ip address\n
+*                                              Call API to get ip address
+* @apicovered                  connection_profile_set_ip_address, connection_profile_get_ip_address
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_get_ip_address_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_ip_address failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 , nEnumLoopCount;
+
+       // Initializing test variable
+       char* pszTestIPAddress = NULL;
+       char* pszFindIPAddress = NULL;
+       int arrConnectionAddressFamilyValues[] = {
+                                CONNECTION_ADDRESS_FAMILY_IPV4,  /**< IPV4 Address type */
+                                //CONNECTION_ADDRESS_FAMILY_IPV6  /**< IPV6 Address type */
+       };
+       int nConnectionFamilyCount = sizeof(arrConnectionAddressFamilyValues) / sizeof(arrConnectionAddressFamilyValues[0]);
+       connection_address_family_e e_address_family ;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0; nEnumLoopCount < nConnectionFamilyCount; nEnumLoopCount++)
+       {
+               e_address_family = arrConnectionAddressFamilyValues[nEnumLoopCount];
+               if(nEnumLoopCount == 0){
+                       pszTestIPAddress = "192.168.127.11";
+               }else{
+                       pszTestIPAddress = "2002:c0a8:7f0b:0:0:0:0:0";
+               }
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_set_ip_address(g_hConnectionProfileHandleCellular, e_address_family, pszTestIPAddress);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogAPI1);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_ip_address failed on iteration %d, error returned = %s , address family = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal) , ConnectionGetAddressFamily(e_address_family));
+                               g_nConnectionErrorCount1++;
+                               continue;
+                       }
+
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_get_ip_address(g_hConnectionProfileHandleCellular, e_address_family, &pszFindIPAddress);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+                       ConnectionGetMemStatus(g_pszMemLogAPI2);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_ip_address failed on iteration %d, error returned = %s , address family = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal) , ConnectionGetAddressFamily(e_address_family));
+                               g_nConnectionErrorCount2++;
+                               continue;
+                       }
+                       if ( pszFindIPAddress == NULL )
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] pszFindIPAddress is NULL at iteration %d\n", __LINE__, nLoopCount);
+                               continue;
+                       }
+                       if(strcmp(pszTestIPAddress , pszFindIPAddress) != 0)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_ip_address failed on iteration %d,mismatch in ip address {(set:get)::(%s:%s)}", __LINE__,  nLoopCount , pszTestIPAddress , pszFindIPAddress);
+                               g_nConnectionErrorCount2++;
+                       }
+
+                       if(pszFindIPAddress != NULL)
+                       {
+                               free(pszFindIPAddress);
+                               pszFindIPAddress = NULL;
+                       }
+               }
+       }
+       pszTestIPAddress = NULL;
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_ip_address", g_nConnectionErrorCount1, "connection_profile_get_ip_address", g_nConnectionErrorCount2, MAX_COUNT * nConnectionFamilyCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_ip_address, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_get_ip_address, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_ip_address, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_get_ip_address, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+
+//& purpose:  To check set/get IP config type
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_get_ip_config_type_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get ip config type
+* @scenario                            Call API to set ip config type\n
+*                                              Call API to get ip config type
+* @apicovered                  connection_profile_set_ip_config_type, connection_profile_get_ip_config_type
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_get_ip_config_type_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_get_ip_config_type_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1, nEnumConfigLoopCount ,nEnumLoopCount;
+
+       // Initializing test variable
+       connection_ip_config_type_e eConnectionIPConfigType = CONNECTION_IP_CONFIG_TYPE_STATIC;
+       connection_address_family_e e_address_family ;
+       int arrConnectionAddressFamilyValues[] = {
+                        CONNECTION_ADDRESS_FAMILY_IPV4,  /**< IPV4 Address type */
+                        //CONNECTION_ADDRESS_FAMILY_IPV6  /**< IPV6 Address type */
+       };
+       int nConnectionFamilyCount = sizeof(arrConnectionAddressFamilyValues) / sizeof(arrConnectionAddressFamilyValues[0]);
+
+       int arrConnectionIpConfigTypeValues[] = {
+                       CONNECTION_IP_CONFIG_TYPE_NONE ,  /**< Not defined */
+                       CONNECTION_IP_CONFIG_TYPE_STATIC  ,  /**< Manual IP configuration */
+                       CONNECTION_IP_CONFIG_TYPE_DYNAMIC ,  /**< Config IP using DHCP client*/
+                       CONNECTION_IP_CONFIG_TYPE_AUTO ,  /**< Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available */
+                       CONNECTION_IP_CONFIG_TYPE_FIXED ,  /**< Indicates an IP address that can not be modified */
+       };
+       int nConnectionIPConfigCount = sizeof(arrConnectionIpConfigTypeValues) / sizeof(arrConnectionIpConfigTypeValues[0]);
+
+       connection_ip_config_type_e eFindConnectionIPConfigType ;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount * nConnectionIPConfigCount, sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount * nConnectionIPConfigCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount * nConnectionIPConfigCount, sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount * nConnectionIPConfigCount, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0; nLoopCount < nConnectionFamilyCount; nLoopCount++)
+       {
+               e_address_family = arrConnectionAddressFamilyValues[nEnumLoopCount];
+               for (nEnumConfigLoopCount = 0; nEnumConfigLoopCount < nConnectionIPConfigCount; nEnumConfigLoopCount++)
+               {
+                       eConnectionIPConfigType = arrConnectionIpConfigTypeValues[nEnumConfigLoopCount];
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               ConnectionGetMemAllocation();
+                               ConnectionGetTimeOfDay();
+                               nRetVal = connection_profile_set_ip_config_type(g_hConnectionProfileHandleCellular, e_address_family, eConnectionIPConfigType);
+                               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+                               ConnectionGetMemStatus(g_pszMemLogAPI1);
+                               if(nRetVal != CONNECTION_ERROR_NONE)
+                               {
+                                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_ip_config_type failed on iteration %d, error returned = %s , address family = %s , config type = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal) , ConnectionGetAddressFamily(e_address_family), ConnectionGetIpConfigType(eConnectionIPConfigType));
+                                       g_nConnectionErrorCount1++;
+                                       continue;
+                               }
+
+                               ConnectionGetMemAllocation();
+                               ConnectionGetTimeOfDay();
+                               nRetVal = connection_profile_get_ip_config_type(g_hConnectionProfileHandleCellular, e_address_family, &eFindConnectionIPConfigType);
+                               ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+                               ConnectionGetMemStatus(g_pszMemLogAPI2);
+                               if(nRetVal != CONNECTION_ERROR_NONE)
+                               {
+                                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_ip_config_type failed on iteration %d, error returned = %s , address family = %s , config type = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal) , ConnectionGetAddressFamily(e_address_family),ConnectionGetIpConfigType(eFindConnectionIPConfigType));
+                                       g_nConnectionErrorCount2++;
+                                       continue;
+                               }
+
+                               if(eConnectionIPConfigType != eFindConnectionIPConfigType)
+                               {
+                                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_ip_config_type failed on iteration %d, mismatch in config type {(set:get)::(%s:%s)}" , __LINE__,  nLoopCount , ConnectionGetIpConfigType(eConnectionIPConfigType), ConnectionGetIpConfigType(eFindConnectionIPConfigType));
+                                       g_nConnectionErrorCount2++;
+                               }
+
+                       }
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_ip_config_type", g_nConnectionErrorCount1, "connection_profile_get_ip_config_type", g_nConnectionErrorCount2, (MAX_COUNT * nConnectionFamilyCount) * nConnectionIPConfigCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_ip_config_type, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_get_ip_config_type, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_ip_config_type, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_get_ip_config_type, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+//& purpose:  To check set/get proxy type
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_get_proxy_type_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get proxy type
+* @scenario                            Call API to set proxy type\n
+*                                              Call API to get proxy type
+* @apicovered                  connection_profile_set_proxy_type, connection_profile_get_proxy_type
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_get_proxy_type_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_get_proxy_type_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1,nEnumLoopCount;
+       // Initializing test variable
+       connection_proxy_type_e eConnectionProxyType ;
+       int arrConnectionProxyTypeValues [] = {
+                       CONNECTION_PROXY_TYPE_DIRECT ,  /**< Direct connection */
+                       CONNECTION_PROXY_TYPE_AUTO ,  /**< Auto configuration(Use PAC file). If URL property is not set, DHCP/WPAD auto-discover will be tried */
+                       CONNECTION_PROXY_TYPE_MANUAL  ,  /**< Manual configuration */
+       };
+       int nConnectionProxyCount = sizeof(arrConnectionProxyTypeValues) / sizeof(arrConnectionProxyTypeValues[0]);
+       connection_proxy_type_e eFindConnectionProxyType  = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nConnectionProxyCount, sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT * nConnectionProxyCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT * nConnectionProxyCount, sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT * nConnectionProxyCount, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0; nEnumLoopCount < nConnectionProxyCount; nEnumLoopCount++)
+       {
+               eConnectionProxyType = arrConnectionProxyTypeValues[nEnumLoopCount];
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_set_proxy_type(g_hConnectionProfileHandleCellular , eConnectionProxyType);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogAPI1);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_proxy_type failed on iteration %d, error returned = %s , proxy type = %s ", __LINE__, nLoopCount , ConnectionGetError(nRetVal) , ConnectionGetProxyType(eConnectionProxyType));
+                               g_nConnectionErrorCount1++;
+                               continue;
+                       }
+
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_get_proxy_type(g_hConnectionProfileHandleCellular, &eFindConnectionProxyType);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+                       ConnectionGetMemStatus(g_pszMemLogAPI2);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_proxy_type failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                               g_nConnectionErrorCount2++;
+                               continue;
+                       }
+
+                       if(eConnectionProxyType != eFindConnectionProxyType)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_proxy_type failed on iteration %d, mismatch in proxy type {(set:get)::(%s : %s)}" , __LINE__,  nLoopCount, ConnectionGetProxyType(eConnectionProxyType), ConnectionGetProxyType(eFindConnectionProxyType));
+                               g_nConnectionErrorCount2++;
+                       }
+                       eFindConnectionProxyType  = -1;
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_proxy_type", g_nConnectionErrorCount1, "connection_profile_get_proxy_type", g_nConnectionErrorCount2, MAX_COUNT * nConnectionProxyCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_proxy_type, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_get_proxy_type, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_proxy_type, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_get_proxy_type, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+//& purpose:  To check set/get proxy address
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_get_proxy_address_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get proxy address
+* @scenario                            Call API to set proxy address\n
+*                                              Call API to get proxy address
+* @apicovered                  connection_profile_set_proxy_address, connection_profile_get_proxy_address
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_get_proxy_address_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_get_proxy_address_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1,nEnumLoopCount;
+
+       // Initializing test variable
+        connection_address_family_e e_address_family;
+       char* pszTestProxyAddress = NULL;
+       char* pszFindProxyAddress = NULL;
+       int arrConnectionAddressFamilyValues[] = {
+                        CONNECTION_ADDRESS_FAMILY_IPV4,  /**< IPV4 Address type */
+                        //CONNECTION_ADDRESS_FAMILY_IPV6  /**< IPV6 Address type */
+       };
+       int nConnectionFamilyCount = sizeof(arrConnectionAddressFamilyValues) / sizeof(arrConnectionAddressFamilyValues[0]);
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0; nEnumLoopCount < nConnectionFamilyCount; nEnumLoopCount++)
+       {
+               e_address_family = arrConnectionAddressFamilyValues[nEnumLoopCount];
+               if(nEnumLoopCount == 0)
+               {
+                       pszTestProxyAddress = "192.128.1.1:8000";
+               }else
+               {
+                       pszTestProxyAddress = "2002:c080:0101:0:0:0:0:0:8000";
+               }
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_set_proxy_address(g_hConnectionProfileHandleCellular,e_address_family, pszTestProxyAddress);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogAPI1);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_proxy_address failed on iteration %d, error returned = %s , address family = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal), ConnectionGetAddressFamily(e_address_family));
+                               g_nConnectionErrorCount1++;
+                               continue;
+                       }
+
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_get_proxy_address(g_hConnectionProfileHandleCellular, e_address_family, &pszFindProxyAddress);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+                       ConnectionGetMemStatus(g_pszMemLogAPI2);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_proxy_address failed on iteration %d, error returned = %s , address family = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal) , ConnectionGetAddressFamily(e_address_family));
+                               g_nConnectionErrorCount2++;
+                               continue;
+                       }
+                       if ( pszFindProxyAddress == NULL )
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] pszFindProxyAddress is NULL at iteration %d \n", __LINE__, nLoopCount);
+                               continue;
+                       }
+
+                       if((strcmp(pszFindProxyAddress , pszTestProxyAddress) != 0))
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_proxy_address failed on iteration %d, mismatch in proxy address {(set:get)::(%s:%s)}", __LINE__ ,  nLoopCount , pszTestProxyAddress , pszFindProxyAddress);
+                               g_nConnectionErrorCount2++;
+                       }
+
+                       if(pszFindProxyAddress != NULL)
+                       {
+                               free(pszFindProxyAddress);
+                               pszFindProxyAddress = NULL;
+                       }
+               }
+       }
+
+       pszTestProxyAddress = NULL;
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_proxy_address", g_nConnectionErrorCount1, "connection_profile_get_proxy_address", g_nConnectionErrorCount2, MAX_COUNT * nConnectionFamilyCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_proxy_address, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_get_proxy_address, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_proxy_address, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_get_proxy_address, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+
+//& purpose:  To check set/get subnet mask
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_get_subnet_mask_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get subnet mask
+* @scenario                            Call API to set subnet mask\n
+*                                              Call API to get subnet mask
+* @apicovered                  connection_profile_set_subnet_mask, connection_profile_get_subnet_mask
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_get_subnet_mask_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_get_subnet_mask_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1, nEnumLoopCount;
+
+       // Initializing test variable
+        connection_address_family_e e_address_family;
+       char* pszTestSubnetMask = NULL;
+       char* pszFindSubnetMask = NULL;
+       int arrConnectionAddressFamilyValues[] = {
+                        CONNECTION_ADDRESS_FAMILY_IPV4,  /**< IPV4 Address type */
+                        //CONNECTION_ADDRESS_FAMILY_IPV6  /**< IPV6 Address type */
+       };
+       int nConnectionFamilyCount = sizeof(arrConnectionAddressFamilyValues) / sizeof(arrConnectionAddressFamilyValues[0]);
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT * nConnectionFamilyCount, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0; nEnumLoopCount < nConnectionFamilyCount; nEnumLoopCount++)
+       {
+               e_address_family = arrConnectionAddressFamilyValues[nEnumLoopCount];
+               if(nEnumLoopCount == 0)
+               {
+                       pszTestSubnetMask = "255.255.255.0";
+               }else
+               {
+                       pszTestSubnetMask = "2002:ffff:ff00:0:0:0:0:0";
+               }
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_set_subnet_mask(g_hConnectionProfileHandleCellular,e_address_family, pszTestSubnetMask);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogAPI1);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_subnet_mask failed on iteration %d, error returned = %s , address family = %s  ", __LINE__, nLoopCount, ConnectionGetError(nRetVal), ConnectionGetAddressFamily(e_address_family));
+                               g_nConnectionErrorCount1++;
+                               continue;
+                       }
+
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_get_subnet_mask(g_hConnectionProfileHandleCellular, e_address_family, &pszFindSubnetMask);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+                       ConnectionGetMemStatus(g_pszMemLogAPI2);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_subnet_mask failed on iteration %d, error returned = %s , address family - %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal), ConnectionGetAddressFamily(e_address_family));
+                               g_nConnectionErrorCount2++;
+                               continue;
+                       }
+
+                       if ( pszFindSubnetMask == NULL)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] pszFindSubnetMask is NULL at iteration %d\n", __LINE__, nLoopCount);
+                               continue;
+                       }
+                       if((strcmp(pszFindSubnetMask , pszTestSubnetMask) != 0))
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_subnet_mask failed on iteration %d, mismatch in subnet mask{(set:get)::(%s:%s)}" , __LINE__,  nLoopCount , pszTestSubnetMask , pszFindSubnetMask );
+                               g_nConnectionErrorCount2++;
+                       }
+
+                       if(pszFindSubnetMask != NULL)
+                       {
+                               free(pszFindSubnetMask);
+                               pszFindSubnetMask = NULL;
+                       }
+
+               }
+       }
+
+       pszTestSubnetMask = NULL;
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_subnet_mask", g_nConnectionErrorCount1, "connection_profile_get_subnet_mask", g_nConnectionErrorCount2, MAX_COUNT * nConnectionFamilyCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_subnet_mask, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_get_subnet_mask, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_subnet_mask, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_get_subnet_mask, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+//& purpose:  To check set/unset state change callback
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_unset_state_changed_cb_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get subnet mask
+* @scenario                            Call API to set state change callback for profile\n
+*                                              generate event that trigger callback\n
+*                                              Call API to unset state change callback for profile\n
+*                                              generate event that trigger callback
+* @apicovered                  connection_profile_set_state_changed_cb, connection_profile_get_subnet_mask
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_unset_state_changed_cb_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_get_subnet_mask_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 , nTtimeoutId = 0;
+       g_pMainLoop = g_main_loop_new(NULL, false);
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_set_state_changed_cb(g_hConnectionProfileHandleCellular, test_profile_state_changed_cb, NULL);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_state_changed_cb failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               nRetVal = connection_open_profile(g_hConenctionHandle , g_hConnectionProfileHandleCellular, test_connection_opened_callback, NULL);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_open_profile failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       connection_profile_unset_state_changed_cb(g_hConnectionProfileHandleCellular);
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+
+               nTtimeoutId = g_timeout_add(5000, Timeout_Function, g_pMainLoop);
+               g_main_loop_run(g_pMainLoop);
+               g_source_remove(nTtimeoutId);
+               if(g_bCallbackResult == false)
+               {
+                       FPRINTF("[Line : %d][Connection_ITc]After connection_profile_set_state_changed_cb , no response from register call back on iteration %d", __LINE__, nLoopCount);
+                       g_nConnectionErrorCount1++;
+                       connection_profile_unset_state_changed_cb(g_hConnectionProfileHandleCellular);
+                       continue;
+               }
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_unset_state_changed_cb(g_hConnectionProfileHandleCellular);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+               ConnectionGetMemStatus(g_pszMemLogAPI2);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_unset_state_changed_cb failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount2++;
+                       continue;
+               }
+
+               g_bCallbackResult = false;
+
+               nRetVal = connection_close_profile(g_hConenctionHandle , g_hConnectionProfileHandleCellular, test_connection_opened_callback, NULL);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_remove_profile failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount2++;
+                       continue;
+               }
+
+               nTtimeoutId = g_timeout_add(5000, Timeout_Function, g_pMainLoop);
+               g_main_loop_run(g_pMainLoop);
+               g_source_remove(nTtimeoutId);
+               if(g_bCallbackResult == true)
+               {
+                       FPRINTF("[Line : %d][Connection_ITc]After connection_profile_unset_state_changed_cb , getting response from register call back on iteration %d", __LINE__, nLoopCount);
+                       g_nConnectionErrorCount2++;
+               }
+
+       }
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_set_state_changed_cb", g_nConnectionErrorCount1, "connection_profile_unset_state_changed_cb", g_nConnectionErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_state_changed_cb, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_profile_unset_state_changed_cb, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_state_changed_cb, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_profile_unset_state_changed_cb, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+
+//& purpose:  To check open/close connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_open_close_profile_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check open/close connection profile
+* @scenario                            Call API to open connection profile\n
+*                                              check response from callback\n
+*                                              Call API to close connection profile\n
+*                                              check response from callback
+* @apicovered                  connection_open_profile, connection_close_profile
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_open_close_profile_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_open_close_profile_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 , nTtimeoutId = 0;
+       g_pMainLoop = g_main_loop_new(NULL, false);
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_open_profile(g_hConenctionHandle , g_hConnectionProfileHandleCellular, test_connection_opened_callback, NULL);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_open_profile failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               nTtimeoutId = g_timeout_add(5000, Timeout_Function, g_pMainLoop);
+               g_main_loop_run(g_pMainLoop);
+               g_source_remove(nTtimeoutId);
+               if(g_bOpenCallbackResult == false)
+               {
+                       FPRINTF("[Line : %d][Connection_ITc]After connection_open_profile , not getting response from register call back on iteration %d", __LINE__, nLoopCount);
+                       g_nConnectionErrorCount1++;
+                       connection_close_profile(g_hConenctionHandle , g_hConnectionProfileHandleCellular, test_connection_closed_callback, NULL);
+                       continue;
+               }
+
+               //if testcase getting fail in callback response
+               g_bCloseCallbackResult = false;
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_close_profile(g_hConenctionHandle , g_hConnectionProfileHandleCellular, test_connection_closed_callback, NULL);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+               ConnectionGetMemStatus(g_pszMemLogAPI2);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_close_profile failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount2++;
+                       continue;
+               }
+
+               nTtimeoutId = g_timeout_add(5000, Timeout_Function, g_pMainLoop);
+               g_main_loop_run(g_pMainLoop);
+               g_source_remove(nTtimeoutId);
+               if(g_bCloseCallbackResult == false)
+               {
+                       FPRINTF("[Line : %d][Connection_ITc]After connection_close_profile , getting response from register call back on iteration %d", __LINE__, nLoopCount);
+                       g_nConnectionErrorCount2++;
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_open_profile", g_nConnectionErrorCount1, "connection_close_profile", g_nConnectionErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_open_profile, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_close_profile, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_open_profile, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_close_profile, g_pszMemLogAPI2);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check refresh the profile information
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_refresh_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check refresh the profile information
+* @scenario                            Call API to refresh connection profile
+* @apicovered                  connection_profile_refresh
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_refresh_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_refresh_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       char* pszTestIPAddress = "192.168.128.11";
+
+
+       nRetVal = connection_profile_set_ip_address(g_hConnectionProfileHandleCellular, CONNECTION_ADDRESS_FAMILY_IPV4, pszTestIPAddress);
+       PRINT_RESULT(nRetVal , "connection_profile_set_ip_address");
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_refresh(g_hConnectionProfileHandleCellular);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_refresh failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n", __LINE__, "connection_profile_refresh", g_nConnectionErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_refresh, g_pszSpeedLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_refresh, g_pszMemLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check the profile is editable
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_is_cellular_editable_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check the profile is editable
+* @scenario                            check given profile is editable
+* @apicovered                  connection_profile_is_cellular_editable
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_is_cellular_editable_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_is_cellular_editable_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       bool bFindResults = false;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_is_cellular_editable(g_hConnectionProfileHandleCellular , &bFindResults );
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_cellular_editable failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               if(bFindResults != false && bFindResults != true )
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_cellular_editable failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n", __LINE__, "connection_profile_is_cellular_editable", g_nConnectionErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_is_cellular_editable, g_pszSpeedLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_is_cellular_editable, g_pszMemLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check the profile is hidden
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_is_cellular_hidden_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check the profile is hidden
+* @scenario                            check given profile is hidden
+* @apicovered                  connection_profile_is_cellular_hidden
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_is_cellular_hidden_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_is_cellular_hidden_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       bool bFindResults = false;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_is_cellular_hidden(g_hConnectionProfileHandleCellular , &bFindResults );
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_cellular_hidden failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               if(bFindResults != false && bFindResults != true )
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_cellular_hidden failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n", __LINE__, "connection_profile_is_cellular_hidden", g_nConnectionErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_is_cellular_hidden, g_pszSpeedLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_is_cellular_hidden, g_pszMemLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check state of celluar connection
+//& type : auto
+/**
+* @testcase                    ITc_connection_get_cellular_state_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check state of celluar connection
+* @scenario                            Call API to get state of celluar connection
+* @apicovered                  connection_get_cellular_state
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_get_cellular_state_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_get_cellular_state_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+        connection_cellular_state_e eFindCellularState = -1 ;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               eFindCellularState = -1;
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_get_cellular_state(g_hConenctionHandle , &eFindCellularState);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_get_cellular_state failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               if(eFindCellularState == -1)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_get_cellular_state failed on iteration %d, returned cellular state :: %s \\n ", __LINE__, nLoopCount , ConnectionGetCellularStateType(eFindCellularState));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n", __LINE__, "connection_get_cellular_state \\n", g_nConnectionErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_get_cellular_state, g_pszSpeedLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_get_cellular_state, g_pszMemLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check set/get default profile which provides the given cellular service
+//& type : auto
+/**
+* @testcase                    ITc_connection_set_get_default_cellular_service_profile_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get default profile which provides the given cellular service
+* @scenario                            Call API to set default profile\n
+*                                              Call API to get default profile\n
+*                                              verify the profile
+* @apicovered                  connection_set_default_cellular_service_profile, connection_get_default_cellular_service_profile
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_set_get_default_cellular_service_profile_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_set_get_default_cellular_service_profile_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       // Initializing test variable
+       connection_cellular_service_type_e eTestCellularType = -1;
+       connection_profile_h hFindConnectionProfile = NULL ;
+       connection_profile_h hTestConnectionProfile = NULL ;
+
+       if(ConnectionManager_get_celluar_profile(g_hConenctionHandle , &hTestConnectionProfile) == 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]failed on preconditition to clone cellular profile\\n", __LINE__);
+               return 1;
+       }
+
+       if(hTestConnectionProfile == NULL)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]failed on preconditition cellular profile :: NULL \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = connection_profile_get_cellular_service_type(hTestConnectionProfile , &eTestCellularType);
+       if(nRetVal != CONNECTION_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_service_type failed error returned = %s ", __LINE__, ConnectionGetError(nRetVal));
+               return 1;
+       }
+       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_service_type return connection type :: %s", __LINE__,  ConnectionGetCellularServiceType(eTestCellularType));
+
+
+       if((eTestCellularType != CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET )&&(eTestCellularType != CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET ))
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_service_type returned invalid type ::%s", __LINE__ ,  ConnectionGetCellularServiceType(eTestCellularType));
+               return 1;
+       }
+
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_set_default_cellular_service_profile(g_hConenctionHandle , eTestCellularType , hTestConnectionProfile);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_set_default_cellular_service_profile failed on iteration %d, error returned = %s , service type = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal) , ConnectionGetCellularServiceType(eTestCellularType));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_get_default_cellular_service_profile(g_hConenctionHandle , eTestCellularType , &hFindConnectionProfile);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+               ConnectionGetMemStatus(g_pszMemLogAPI2);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_get_default_cellular_service_profile failed on iteration %d, error returned = %s , service type = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal), ConnectionGetCellularServiceType(eTestCellularType));
+                       g_nConnectionErrorCount2++;
+                       continue;
+               }
+
+               if(hFindConnectionProfile == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_get_default_cellular_service_profile iteration %d, returned default connection profile :: NULL" , __LINE__, nLoopCount);
+                       g_nConnectionErrorCount2++;
+               }
+
+               nRetVal = connection_profile_destroy(hFindConnectionProfile);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_destroy error returned = %s ", __LINE__, ConnectionGetError(nRetVal));
+               }
+       }
+
+       nRetVal = connection_profile_destroy(hTestConnectionProfile);
+       if(nRetVal != CONNECTION_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]connection_destroy failed on post condition error returned = %s ", __LINE__, ConnectionGetError(nRetVal));
+       }
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_set_default_cellular_service_profile", g_nConnectionErrorCount1, "connection_get_default_cellular_service_profile", g_nConnectionErrorCount2, MAX_COUNT );
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_set_default_cellular_service_profile, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_get_default_cellular_service_profile, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_set_default_cellular_service_profile, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_get_default_cellular_service_profile, g_pszMemLogAPI2);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check set default profile(async)
+//& type : auto
+/**
+* @testcase                    ITc_connection_set_get_default_cellular_service_profile_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check set/get default profile which provides the given cellular service
+* @scenario                            Call API to set default profile async\n
+*                                              Call API to get default profile\n
+*                                              verify the profile
+* @apicovered                  onnection_set_default_cellular_service_profile_async
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_set_default_cellular_service_profile_async_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError > 0)
+       {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_set_get_default_cellular_service_profile_p failed on precondition", __LINE__);
+                       return 1;
+       }
+
+       // Initializing test variable
+       int nLoopCount = 0 , nRetVal = -1 , nTtimeoutId = 0 ;
+       g_pMainLoop = g_main_loop_new(NULL, false);
+       connection_cellular_service_type_e eCellularServiceType = -1;
+       connection_profile_h hTestConnectionProfile = NULL ;
+
+       if(ConnectionManager_get_celluar_profile(g_hConenctionHandle , &hTestConnectionProfile) == 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]failed on preconditition to clone cellular profile\\n", __LINE__);
+               return 1;
+       }
+
+       if(hTestConnectionProfile == NULL)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]failed on preconditition cellular profile :: NULL \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = connection_profile_get_cellular_service_type(hTestConnectionProfile , &eCellularServiceType);
+       if(nRetVal != CONNECTION_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_service_type failed error returned = %s ", __LINE__, ConnectionGetError(nRetVal));
+               return 1;
+       }
+       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_service_type return connection type :: %s", __LINE__,  ConnectionGetCellularServiceType(eCellularServiceType));
+
+       if((eCellularServiceType != CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET )&&(eCellularServiceType != CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET ))
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_cellular_service_type returned invalid type ::%s", __LINE__ ,  ConnectionGetCellularServiceType(eCellularServiceType));
+               return 1;
+       }
+
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_set_default_cellular_service_profile_async(g_hConenctionHandle , eCellularServiceType , hTestConnectionProfile , test_connection_set_default_callback , NULL);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_set_default_cellular_service_profile_async failed on iteration %d, error returned = %s , cellular service type = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal), ConnectionGetCellularServiceType(eCellularServiceType));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+
+               nTtimeoutId = g_timeout_add(10000, Timeout_Function, g_pMainLoop);
+               g_main_loop_run(g_pMainLoop);
+               g_source_remove(nTtimeoutId);
+               if(g_bCallbackResult == false)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]After connection_set_default_cellular_service_profile_async , getting no response from registered call back on iteration %d", __LINE__, nLoopCount);
+                       g_nConnectionErrorCount1++;
+               }
+       }
+
+       nRetVal = connection_profile_destroy(hTestConnectionProfile);
+       if(nRetVal != CONNECTION_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]connection_destroy failed on post condition error returned = %s ", __LINE__, ConnectionGetError(nRetVal));
+       }
+
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_set_default_cellular_service_profile_async", g_nConnectionErrorCount1, "connection_get_default_cellular_service_profile", g_nConnectionErrorCount2, MAX_COUNT );
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_set_default_cellular_service_profile_async, g_pszSpeedLogAPI1);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_set_default_cellular_service_profile_async, g_pszMemLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check reset connection cellular profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_reset_profile_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check connection type
+* @scenario                            reset cellular profile
+* @apicovered                  connection_reset_profile
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_reset_profile_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_reset_profile_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nEnumLoopCount = 0, nRetVal = -1, nTtimeoutId = 0 ;
+       connection_reset_option_e eConnectionResetOption = -1;
+       int nSimIndex = 0;              // Sim Index starts from 0 //
+       
+       int arrConnectionResetOptionSet [] = {
+                       CONNECTION_RESET_DEFAULT_PROFILE,
+                       CONNECTION_RESET_CLEAR_PROFILE
+       };
+       int nNumberOfResetOption = sizeof(arrConnectionResetOptionSet) / sizeof(arrConnectionResetOptionSet[0]);
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+
+       for (nEnumLoopCount = 0; nEnumLoopCount < nNumberOfResetOption; nEnumLoopCount++)
+       {
+               eConnectionResetOption = arrConnectionResetOptionSet[nEnumLoopCount];
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       g_pMainLoop = g_main_loop_new(NULL, false);
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_reset_profile(g_hConenctionHandle , eConnectionResetOption, nSimIndex, test_connection_reset_profile_callback_cb, NULL);
+                       ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogAPI1);
+                       if((nRetVal != CONNECTION_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_reset_profile failed on iteration %d, error returned = %s , reset option = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal) , ((nEnumLoopCount) == 0 ? "CONNECTION_RESET_DEFAULT_PROFILE" : "CONNECTION_RESET_CLEAR_PROFILE"));
+                               g_nConnectionErrorCount1++;
+                               continue;
+                       }
+                       
+                       nTtimeoutId = g_timeout_add(30000, Timeout_Function, g_pMainLoop);
+                       g_main_loop_run(g_pMainLoop);
+                       g_source_remove(nTtimeoutId);
+                       if(g_bCallbackResult == false)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]After connection_reset_profile , getting no response from registered call back on iteration %d", __LINE__, nLoopCount);
+                               g_nConnectionErrorCount1++;
+                       }
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n", __LINE__, "connection_reset_profile", g_nConnectionErrorCount1, MAX_COUNT * nNumberOfResetOption);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_reset_profile, g_pszSpeedLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_reset_profile, g_pszMemLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check if profile is default
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_is_cellular_default_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check if profile is default
+* @scenario                            check if profile is default
+* @apicovered                  connection_profile_is_cellular_default
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_profile_is_cellular_default_p(void)
+{
+       START_TEST;
+       
+       if(g_nConnectionPreconditionError  > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_is_cellular_default_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1;
+       bool bIsDefault = true;
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_is_cellular_default(g_hConnectionProfileHandleCellular, &bIsDefault);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_cellular_default failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+               if(bIsDefault != true && bIsDefault != false)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_cellular_default failed on iteration %d, bool value returned is invalid  ", __LINE__, nLoopCount);
+                       g_nConnectionErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n", __LINE__, "connection_profile_is_cellular_default", g_nConnectionErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_is_cellular_default, g_pszSpeedLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_is_cellular_default, g_pszMemLogAPI1);
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check add /remove connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_add_remove_profile_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check add /remove connection profile
+* @scenario                            Call API to add connection profile\n
+*                                              Call API to remove connection profile
+* @apicovered                  connection_remove_profile, connection_add_profile
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_add_remove_profile_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionPreconditionError  > 0)
+       {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_add_remove_profile_p failed on precondition", __LINE__);
+                       return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1;
+       connection_profile_h hConnectionProfile = NULL;
+       connection_profile_h hCloneConnectionProfile = NULL;
+       char* pszProfileName = "testprofile" ;
+       connection_profile_type_e eConnectionProfileType = CONNECTION_PROFILE_TYPE_CELLULAR ;
+       
+       nRetVal = connection_profile_create( eConnectionProfileType, pszProfileName, &hConnectionProfile);
+       PRINT_RESULT(nRetVal , "connection_profile_create");
+       
+       nRetVal = connection_profile_set_cellular_service_type(hConnectionProfile , CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET );
+       PRINT_RESULT(nRetVal , "connection_profile_set_cellular_service_type");
+
+#if SPEED_CHECK
+       g_pszSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       g_pszSpeedLogAPI2 = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       g_pszMemLogAPI2 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_add_profile(g_hConenctionHandle , hConnectionProfile);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI1);
+               ConnectionGetMemStatus(g_pszMemLogAPI1);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_add_profile failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+               
+               if(ConnectionManager_get_celluar_profile_by_name(g_hConenctionHandle , pszProfileName , &hCloneConnectionProfile) == 0)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_add_profile failed to set profile on profile iterator in iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+               
+               if(hCloneConnectionProfile == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_add_profile failed to set profile on profile iterator in iteration %d", __LINE__, nLoopCount);
+                       g_nConnectionErrorCount1++;
+                       continue;
+               }
+               
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_remove_profile(g_hConenctionHandle , hCloneConnectionProfile);
+               ConnectionExecutionDelay(g_pszSpeedLogAPI2);
+               ConnectionGetMemStatus(g_pszMemLogAPI2);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_remove_profile failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionErrorCount2++;
+               }
+               
+               nRetVal = connection_profile_destroy(hCloneConnectionProfile);
+               PRINT_POST_RESULT(nRetVal , "connection_profile_destroy" );
+
+       }
+       
+       nRetVal = connection_profile_destroy(hConnectionProfile);
+       PRINT_POST_RESULT(nRetVal , "connection_profile_destroy" );
+       
+       if(g_nConnectionErrorCount1 > 0 || g_nConnectionErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_add_profile", g_nConnectionErrorCount1, "connection_remove_profile", g_nConnectionErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_add_profile, g_pszSpeedLogAPI1);
+       PRINT_SPEED_LOG(connection_remove_profile, g_pszSpeedLogAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_add_profile, g_pszMemLogAPI1);
+       PRINT_MEMORY_LOG(connection_remove_profile, g_pszMemLogAPI2);
+#endif
+
+       return 0;
+}
+/** @} */ 
+/** @} */
diff --git a/src/itc/connection/ITs-connection-wifi-profile.c b/src/itc/connection/ITs-connection-wifi-profile.c
new file mode 100755 (executable)
index 0000000..63d18d7
--- /dev/null
@@ -0,0 +1,1055 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-connection-common.h"
+
+/** @addtogroup itc-connection
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Connection
+struct timeval g_stConnectionStartTime;
+struct mallinfo g_stConnectionMemInfo;
+
+int g_nConnectionWifiErrorCount1 , g_nConnectionWifiErrorCount2;
+int g_nConnectionWifiPreconditionError = 0;
+connection_h g_hConenctionHandleWifi;
+connection_profile_h g_hConnectionProfileHandleWifi;
+char* g_pszConnectionWifiProfileName = "WifiConnectionProfile" ;
+
+char *g_pszSpeedWifiLogAPI1 = NULL;
+char *g_pszSpeedWifiLogAPI2 = NULL;
+char *g_pszMemWifiLogAPI1 = NULL;
+char *g_pszMemWifiLogAPI2 = NULL;
+
+void ITs_connection_wifi_profile_startup(void)
+{
+       struct stat buf;   
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       
+       g_bFeatureSupported = true;
+       g_bFeatureMismatch = false;
+       g_bFeatureNotSupported = false;
+       
+       bool bTelFeatureSupported = Connection_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE);
+       bool bWifiFeatureSupported = Connection_Check_System_Info_Feature_Supported(WIFI_FEATURE);
+       bool bBtFeatureSupported = Connection_Check_System_Info_Feature_Supported(BLUETOOTH_FEATURE);
+       
+       g_nConnectionWifiErrorCount1 = 0;
+       g_nConnectionWifiErrorCount2 = 0;
+       g_nConnectionWifiPreconditionError = 0;
+       g_hConenctionHandleWifi = NULL;
+       g_hConnectionProfileHandleWifi = NULL;
+
+       int nRetVal = connection_create(&g_hConenctionHandleWifi);
+       
+       if(false == bTelFeatureSupported && false == bWifiFeatureSupported && false == bBtFeatureSupported) 
+       {
+               g_bFeatureSupported = false;
+               if (nRetVal != TIZEN_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_create API call returned mismatch %s error for unsupported telephony feature", __LINE__, ConnectionGetError(nRetVal));
+                       g_bFeatureMismatch = true;
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_create API call correctly returned %s error for unsupported telephony feature", __LINE__, ConnectionGetError(nRetVal));
+                       g_bFeatureNotSupported = true;
+               }
+               return;
+       }
+       
+       if((nRetVal != CONNECTION_ERROR_NONE)||(g_hConenctionHandleWifi == NULL))
+       {
+               g_nConnectionWifiPreconditionError = 1;
+               g_hConenctionHandleWifi = NULL;
+               return ;
+       }
+
+
+       if(ConnectionManager_get_wifi_profile(g_hConenctionHandleWifi , &g_hConnectionProfileHandleWifi) == 0)
+       {
+               if(false == bWifiFeatureSupported) 
+               {
+                       if(g_hConnectionProfileHandleWifi == NULL)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] Wifi profile handle is NULL, unsupported wifi feature", __LINE__);
+                               g_bFeatureNotSupported = true;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] Wifi profile handle is not NULL, mismatch for unsupported wifi feature ", __LINE__);
+                               g_bFeatureMismatch = true;
+                       }
+                       return;
+               }
+               else
+               {
+                       g_nConnectionWifiPreconditionError = 1;
+                       FPRINTF("\\n[Line : %d][Connection_ITc]startup failed on getting wifi profile\\n",__LINE__);
+                       return ;
+               }
+       }
+
+       if(g_hConnectionProfileHandleWifi == NULL)
+       {
+               g_nConnectionWifiPreconditionError = 1;
+               FPRINTF("\\n[Line : %d][Connection_ITc]startup failed on create wifi profile :: NULL\\n",__LINE__);
+               return ;
+       }
+}
+
+void ITs_connection_wifi_profile_cleanup(void)
+{
+       // Null initialization of pointer
+       if(g_pszSpeedWifiLogAPI1 != NULL)
+       {
+               free(g_pszSpeedWifiLogAPI1);
+               g_pszSpeedWifiLogAPI1 = NULL;
+       }
+
+       if(g_pszSpeedWifiLogAPI2 != NULL)
+       {
+               free(g_pszSpeedWifiLogAPI2);
+               g_pszSpeedWifiLogAPI2 = NULL;
+       }
+
+       if(g_pszMemWifiLogAPI1 != NULL)
+       {
+               free(g_pszMemWifiLogAPI1);
+               g_pszMemWifiLogAPI1 = NULL;
+       }
+
+       if(g_pszMemWifiLogAPI2 != NULL)
+       {
+               free(g_pszMemWifiLogAPI2);
+               g_pszMemWifiLogAPI2 = NULL;
+       }
+
+       int nRetVal = 0;
+
+       if(g_nConnectionWifiPreconditionError == 0 && g_bFeatureSupported == true)
+       {
+               if(g_hConnectionProfileHandleWifi != NULL)
+               {
+                       nRetVal = connection_profile_destroy(g_hConnectionProfileHandleWifi);
+                       if(nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_destroy failed on post condition error returned = %s ",__LINE__, ConnectionGetError(nRetVal));
+                       }
+               }
+
+               nRetVal = connection_destroy(g_hConenctionHandleWifi);
+               if(nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_destroy failed on post condition error returned = %s ",__LINE__, ConnectionGetError(nRetVal));
+               }
+       }
+
+       g_nConnectionWifiPreconditionError = 0;
+       g_hConenctionHandleWifi = NULL;
+       g_hConnectionProfileHandleWifi = NULL;
+}
+
+/** @addtogroup itc-connection-wifi-profile-testcases
+*  @brief              Integration testcases for module connection-wifi-profile
+*  @ingroup    itc-connection-wifi-profile
+*  @{
+*/
+
+//& purpose: To check BSSID on wifi connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_wifi_bssid_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check BSSID
+* @scenario                            Call API to get BSSID
+* @apicovered                  connection_profile_get_wifi_bssid
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Wifi data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_wifi_bssid_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionWifiPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_wifi_bssid_p failed on precondition",__LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       char *pszFindBSSID = NULL;
+
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_wifi_bssid(g_hConnectionProfileHandleWifi , &pszFindBSSID );
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_bssid failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+
+               if(pszFindBSSID == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_bssid failed on iteration %d, returned BSSID is null. ",__LINE__, nLoopCount);
+                       g_nConnectionWifiErrorCount1++;
+               }
+
+               FPRINTF("find BSSID :%s ", pszFindBSSID);
+               if(pszFindBSSID != NULL)
+               {
+                       free(pszFindBSSID);
+                       pszFindBSSID = NULL;
+               }
+
+       }
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n",__LINE__, "connection_profile_get_wifi_bssid", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_wifi_bssid, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_wifi_bssid, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check ESSID on wifi connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_wifi_essid_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check ESSID
+* @scenario                            Call API to get ESSID
+* @apicovered                  connection_profile_get_wifi_essid
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Wifi data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_wifi_essid_p(void)
+{
+       START_TEST;
+       
+       if(g_nConnectionWifiPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_wifi_essid_p failed on precondition",__LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       char *pszFindESSID = NULL;
+
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_wifi_essid(g_hConnectionProfileHandleWifi , &pszFindESSID );
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_essid failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+
+               if(pszFindESSID == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_essid failed on iteration %d, returned ESSID is null. " ,__LINE__, nLoopCount);
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+
+               if(pszFindESSID != NULL)
+               {
+                       free(pszFindESSID);
+                       pszFindESSID = NULL;
+               }
+
+       }
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n",__LINE__, "connection_profile_get_wifi_essid", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_wifi_essid, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_wifi_essid, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check frequency of wifi connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_wifi_frequency_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check frequency of wifi connection profile
+* @scenario                            Call API to get frequency of wifi profile
+* @apicovered                  connection_profile_get_wifi_frequency
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Wifi data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_wifi_frequency_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionWifiPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_wifi_frequency_p failed on precondition",__LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       int nfindFrequency = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_wifi_frequency(g_hConnectionProfileHandleWifi , &nfindFrequency );
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_frequency failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+
+               if(nfindFrequency == -1)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_frequency failed on iteration %d, returned Frequency:: -1. " ,__LINE__, nLoopCount);
+                       g_nConnectionWifiErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n",__LINE__, "connection_profile_get_wifi_frequency", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_wifi_frequency, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_wifi_frequency, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check max speed of wifi connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_wifi_max_speed_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check max speed of wifi connection profile
+* @scenario                            Call API to get max speed of wifi profile
+* @apicovered                  connection_profile_get_wifi_max_speed
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Wifi data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_wifi_max_speed_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionWifiPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_wifi_max_speed_p failed on precondition",__LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       int nfindSpeed = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_wifi_max_speed(g_hConnectionProfileHandleWifi , &nfindSpeed );
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_max_speed failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+
+               if(nfindSpeed == -1)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_max_speed failed on iteration %d, returned Max Speed:: -1. " ,__LINE__, nLoopCount);
+                       g_nConnectionWifiErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n",__LINE__, "connection_profile_get_wifi_max_speed", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_wifi_max_speed, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_wifi_max_speed, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check RSSI of wifi connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_wifi_rssi_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check RSSI of wifi connection profile
+* @scenario                            Call API to get RSSI of wifi profile
+* @apicovered                  connection_profile_get_wifi_rssi
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Wifi data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_wifi_rssi_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionWifiPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_wifi_rssi_p failed on precondition",__LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       int nfindRSSI = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_wifi_rssi(g_hConnectionProfileHandleWifi , &nfindRSSI );
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_rssi failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+
+               if(nfindRSSI == -1)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_rssi failed on iteration %d, returned RSSI:: -1. " ,__LINE__, nLoopCount);
+                       g_nConnectionWifiErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n",__LINE__, "connection_profile_get_wifi_rssi", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_wifi_rssi, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_wifi_rssi, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check security type of wifi connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_wifi_security_type_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check security type of wifi connection profile
+* @scenario                            Call API to get security type of wifi profile
+* @apicovered                  connection_profile_get_wifi_security_type
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Wifi data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_wifi_security_type_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionWifiPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_wifi_security_type_p failed on precondition",__LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       connection_wifi_security_type_e eFindWifiSecurityType ;
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_wifi_security_type(g_hConnectionProfileHandleWifi , &eFindWifiSecurityType );
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_security_type failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+
+               if((eFindWifiSecurityType < 0) || (eFindWifiSecurityType > 4))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_security_type failed on iteration %d, returned Security Type :: Unknown ",__LINE__ , nLoopCount);
+                       g_nConnectionWifiErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n",__LINE__, "connection_profile_get_wifi_security_type", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_wifi_security_type, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_wifi_security_type, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check encryption type of wifi connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_get_wifi_encryption_type_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check encryption type of wifi connection profile
+* @scenario                            Call API to get security type of wifi profile
+* @apicovered                  connection_profile_get_wifi_encryption_type
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Wifi data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_get_wifi_encryption_type_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionWifiPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_get_wifi_encryption_type_p failed on precondition",__LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       connection_wifi_encryption_type_e eFindWifiEncryptionType = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_get_wifi_encryption_type(g_hConnectionProfileHandleWifi , &eFindWifiEncryptionType );
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_encryption_type failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+
+               if(eFindWifiEncryptionType < 0)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_get_wifi_encryption_type failed on iteration %d, returned Encryption Type :: Unknown " ,__LINE__, nLoopCount);
+                       g_nConnectionWifiErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n",__LINE__, "connection_profile_get_wifi_encryption_type", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_get_wifi_encryption_type, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_get_wifi_encryption_type, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check passphrase is required
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_is_wifi_passphrase_required_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Check passphrase is required
+* @scenario                            Call API to passphrase require
+* @apicovered                  connection_profile_is_wifi_passphrase_required
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Wifi data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_is_wifi_passphrase_required_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionWifiPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_is_wifi_passphrase_required_p failed on precondition",__LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       bool bIsPassPhraseRequired ;
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_is_wifi_passphrase_required (g_hConnectionProfileHandleWifi , &bIsPassPhraseRequired );
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_wifi_passphrase_required failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+
+               if((bIsPassPhraseRequired != true) && (bIsPassPhraseRequired != false))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_wifi_passphrase_required failed on iteration %d, returned Status :: Unknown ",__LINE__ , nLoopCount);
+                       g_nConnectionWifiErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n",__LINE__, "connection_profile_is_wifi_passphrase_required", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_is_wifi_passphrase_required, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_is_wifi_passphrase_required, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check WPS supported on wifi connection profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_is_wifi_wps_supported_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Check WPS supported on wifi connection profile
+* @scenario                            Call API to check wps supported on wifi connection profile
+* @apicovered                  connection_profile_is_wifi_wps_supported
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Wifi data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_is_wifi_wps_supported_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionWifiPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_is_wifi_wps_supported_p failed on precondition",__LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       bool bWPSSupported ;
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_is_wifi_wps_supported (g_hConnectionProfileHandleWifi , &bWPSSupported );
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_wifi_wps_supported failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+
+               if((bWPSSupported != true) && (bWPSSupported != false))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_is_wifi_wps_supported failed on iteration %d, returned Supported Status:: Unknown " ,__LINE__, nLoopCount);
+                       g_nConnectionWifiErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n",__LINE__, "connection_profile_is_wifi_wps_supported", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_is_wifi_wps_supported, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_is_wifi_wps_supported, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check set the passphrase of Wi-Fi WPA
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_set_wifi_passphrase_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check sTo check set the passphrase of Wi-Fi WPA
+* @scenario                            Call API to set the passphrase of Wi-Fi WPA
+* @apicovered                  connection_profile_set_wifi_passphrase
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Wifi data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_set_wifi_passphrase_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionWifiPreconditionError  > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_profile_set_wifi_passphrase_p failed on precondition",__LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       char *pszSetPassPhrase = "1234";
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_profile_set_wifi_passphrase (g_hConnectionProfileHandleWifi , pszSetPassPhrase );
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_profile_set_wifi_passphrase failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+               }
+       }
+
+       pszSetPassPhrase = NULL;
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n",__LINE__, "connection_profile_set_wifi_passphrase", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_set_wifi_passphrase, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_set_wifi_passphrase, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check update existing profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_update_profile_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check update existing profile
+* @scenario                            Call API to update existing profile
+* @apicovered                  connection_update_profile
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Wifi data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_update_profile_p(void)
+{
+       START_TEST;
+
+       if(g_nConnectionWifiPreconditionError > 0){
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_update_profile_p failed on precondition",__LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_update_profile(g_hConenctionHandleWifi  , g_hConnectionProfileHandleWifi);
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_update_profile failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+               sleep(1);
+       }
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n",__LINE__, "connection_update_profile", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_update_profile, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_update_profile, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check state of wifi
+//& type : auto
+/**
+* @testcase                    ITc_connection_get_wifi_state_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check state of wifi
+* @scenario                            Call API to get state of wifi
+* @apicovered                  connection_get_wifi_state
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        wifi must be turn-off/disabled.
+* @postcondition               None
+*/
+int ITc_connection_get_wifi_state_p(void)
+{
+       START_TEST;
+       
+       if(g_nConnectionWifiPreconditionError  == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]ITc_connection_get_wifi_state_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0 , nRetVal = -1 ;
+       connection_wifi_state_e eFindWifiState = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedWifiLogAPI1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemWifiLogAPI1 =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               eFindWifiState = -1;
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_get_wifi_state(g_hConenctionHandleWifi , &eFindWifiState);
+               ConnectionExecutionDelay(g_pszSpeedWifiLogAPI1);
+               ConnectionGetMemStatus(g_pszMemWifiLogAPI1);
+               
+               if((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_get_wifi_state failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nConnectionWifiErrorCount1++;
+                       continue;
+               }
+
+               if(eFindWifiState == -1)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc]connection_get_wifi_state failed on iteration %d, returned invalid wifi state ", __LINE__, nLoopCount);
+                       g_nConnectionWifiErrorCount1++;
+               }
+       }
+
+       if(g_nConnectionWifiErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc]%s failed %d times out of %d times\\n", __LINE__, "connection_get_wifi_state", g_nConnectionWifiErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_get_wifi_state, g_pszSpeedWifiLogAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_get_wifi_state, g_pszMemWifiLogAPI1);
+#endif
+
+       return 0;
+}
+/** @} */ 
+/** @} */
diff --git a/src/itc/connection/ITs-connection.c b/src/itc/connection/ITs-connection.c
new file mode 100755 (executable)
index 0000000..dd12ae9
--- /dev/null
@@ -0,0 +1,1642 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-connection-common.h"
+
+/** @addtogroup itc-connection
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Connection
+struct timeval g_stConnectionStartTime;
+struct mallinfo g_stConnectionMemInfo;
+
+static GMainLoop *g_pCallbackLoop;
+int g_nErrorCount1, g_nErrorCount2;
+int g_nPreconditionError = 0;
+connection_h g_hConnection;
+connection_profile_h g_hConnectionProfileCellular;
+char* g_pszCellularProfileName = "CellularConnectionProfile";
+bool g_bConnectionCallbackResult = false;
+bool g_bConnectionOpenCallbackResult = false;
+bool g_bConnectionCloseCallbackResult = false;
+
+bool g_bTelFeatureSupported = true;
+bool g_bWifiFeatureSupported = true;
+bool g_bBtFeatureSupported = true;
+
+char *g_pszSpeedLogConAPI1 = NULL;
+char *g_pszSpeedLogConAPI2 = NULL;
+char *g_pszMemLogConAPI1 = NULL;
+char *g_pszMemLogConAPI2 = NULL;
+
+
+gboolean fn_WaitingCallbackResponse(gpointer data)
+{
+       g_main_loop_quit((GMainLoop *)data);
+       return false;
+}
+
+void test_network_state_changed_cb(connection_type_e state, void* user_data)
+{
+       FPRINTF("\\n[Line : %d][Connection_ITc] Inside test_network_state_changed_cb", __LINE__);
+       g_bConnectionCallbackResult = true;
+       if (g_pCallbackLoop)
+       {
+               g_main_loop_quit(g_pCallbackLoop);
+       }
+}
+
+void test_connection_opened_callback_cb(connection_error_e result, void* user_data)
+{
+       FPRINTF("\\n[Line : %d][Connection_ITc] Inside callback \"test_connection_opened_callback_cb\"", __LINE__);
+       g_bConnectionOpenCallbackResult = true;
+       if (g_pCallbackLoop)
+       {
+               g_main_loop_quit(g_pCallbackLoop);
+       }
+}
+
+void test_connection_closed_callback_cb(connection_error_e result, void* user_data)
+{
+       FPRINTF("\\n[Line : %d][Connection_ITc] Inside callback \"test_connection_closed_callback_cb\"", __LINE__);
+       g_bConnectionCloseCallbackResult = true;
+       if (g_pCallbackLoop)
+       {
+               g_main_loop_quit(g_pCallbackLoop);
+       }
+}
+
+void test_ip_address_changed_cb(const char* ipv4_address, const char* ipv6_address, void* user_data)
+{
+       FPRINTF("\\n[Line : %d][Connection_ITc] Inside callback \"test_ip_address_changed_cb\"", __LINE__);
+}
+
+void test_proxy_address_changed_cb(const char* ipv4_address, const char* ipv6_address, void* user_data)
+{
+       FPRINTF("\\n[Line : %d][Connection_ITc] Inside callback \"test_proxy_address_changed_cb\"", __LINE__);
+}
+
+void ITs_connection_startup(void)
+{
+       struct stat buf;
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       
+       g_bFeatureSupported = true;
+       g_bFeatureMismatch = false;
+       g_bFeatureNotSupported = false;
+       
+       g_bTelFeatureSupported = Connection_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE);
+       g_bWifiFeatureSupported = Connection_Check_System_Info_Feature_Supported(WIFI_FEATURE);
+       g_bBtFeatureSupported = Connection_Check_System_Info_Feature_Supported(BLUETOOTH_FEATURE);
+       
+       g_nErrorCount1 = 0;
+       g_nErrorCount2 = 0;
+       g_bConnectionCallbackResult = false;
+       g_hConnectionProfileCellular = NULL;
+       g_bConnectionOpenCallbackResult = false;
+       g_bConnectionCloseCallbackResult = false;
+       g_hConnection = NULL;
+
+       int nRetVal = connection_create(&g_hConnection);
+       
+       if (false == g_bTelFeatureSupported && false == g_bWifiFeatureSupported && false == g_bBtFeatureSupported) 
+       {
+               g_bFeatureSupported = false;
+               if (nRetVal != TIZEN_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_create API call returned mismatch %s error for unsupported telephony feature", __LINE__, ConnectionGetError(nRetVal));
+                       g_bFeatureMismatch = true;
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_create API call correctly returned %s error for unsupported telephony feature", __LINE__, ConnectionGetError(nRetVal));
+                       g_bFeatureNotSupported = true;
+               }
+               return;
+       }
+       
+       if ((nRetVal != CONNECTION_ERROR_NONE) ||(g_hConnection == NULL))
+       {
+               g_nPreconditionError = 1;
+               g_hConnection = NULL;
+               return;
+       }
+
+       nRetVal = connection_get_current_profile(g_hConnection, &g_hConnectionProfileCellular);
+       if ((nRetVal != CONNECTION_ERROR_NONE) || (g_hConnectionProfileCellular == NULL))
+       {
+               g_nPreconditionError = 2;
+               g_hConnectionProfileCellular = NULL;
+               return;
+       }
+}
+
+void ITs_connection_cleanup(void)
+{
+       // Null initialization of pointer
+       if (g_pszSpeedLogConAPI1 != NULL)
+       {
+               free(g_pszSpeedLogConAPI1);
+               g_pszSpeedLogConAPI1 = NULL;
+       }
+
+       if (g_pszSpeedLogConAPI2 != NULL)
+       {
+               free(g_pszSpeedLogConAPI2);
+               g_pszSpeedLogConAPI2 = NULL;
+       }
+
+       if (g_pszMemLogConAPI1 != NULL)
+       {
+               free(g_pszMemLogConAPI1);
+               g_pszMemLogConAPI1 = NULL;
+       }
+
+       if (g_pszMemLogConAPI2 != NULL)
+       {
+               free(g_pszMemLogConAPI2);
+               g_pszMemLogConAPI2 = NULL;
+       }
+
+       int nRetVal = 0;
+
+       if (g_nPreconditionError)
+       {
+               g_nPreconditionError = 0;
+               return;
+       }
+
+       if (g_nPreconditionError == 2 && g_bFeatureSupported == true)
+       {
+               if (g_hConnectionProfileCellular != NULL)
+               {
+                       nRetVal = connection_profile_destroy(g_hConnectionProfileCellular);
+                       if (nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_destroy failed on post condition error returned = %s", __LINE__, ConnectionGetError(nRetVal));
+                       }
+               }
+               
+               nRetVal = connection_destroy(g_hConnection);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_destroy failed on post condition error returned = %s", __LINE__, ConnectionGetError(nRetVal));
+               }
+               g_nPreconditionError = 0;
+               return;
+       }
+}
+
+/** @addtogroup itc-connection-testcases
+*  @brief              Integration testcases for module connection
+*  @ingroup    itc-connection
+*  @{
+*/
+
+//& purpose: To check creates/destroy a handle for managing data connections
+//& type : auto
+/**
+* @testcase                    ITc_connection_create_destroy_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check creates/destroy a handle for managing data connections
+* @scenario                            Call API to create a handle for managing data connections\n
+*                                              Call API to destroy the handle
+* @apicovered                  connection_create, connection_destroy
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_create_destroy_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0, nRetVal = -1;
+       // Initializing test variable
+       connection_h hConenction = NULL;
+
+       char *pszCreateSpeedLog = NULL;
+       char *pszDestroySpeedLog = NULL;
+       char *pszCreateMemLog = NULL;
+
+#if SPEED_CHECK
+       pszCreateSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszDestroySpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszCreateMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_create(&hConenction);
+               ConnectionExecutionDelay(pszCreateSpeedLog);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_create failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount1++;
+                       continue;
+               }
+
+               if (hConenction == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_create failed on iteration %d, returned connection handle :: NULL", __LINE__, nLoopCount);
+                       g_nErrorCount1++;
+                       continue;
+               }
+
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_destroy(hConenction);
+               ConnectionExecutionDelay(pszDestroySpeedLog);
+               ConnectionGetMemStatus(pszCreateMemLog);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_destroy failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount2++;
+               }
+       }
+
+       if (g_nErrorCount1 > 0 || g_nErrorCount2 > 0)
+       {
+               FPRINTF("[Line : %d][Connection_ITc] %s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_create", g_nErrorCount1, "connection_destroy", g_nErrorCount2, MAX_COUNT);
+
+#if SPEED_CHECK
+               free(pszCreateSpeedLog);
+               free(pszDestroySpeedLog);
+               pszCreateSpeedLog = NULL;
+               pszDestroySpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszCreateMemLog);
+               pszCreateMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_create, pszCreateSpeedLog);
+       PRINT_SPEED_LOG(connection_destroy, pszDestroySpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_create, pszCreateMemLog);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check add/remove a route in routing table
+//& type : auto
+/**
+* @testcase                    ITc_connection_add_remove_route_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check add/remove a route in routing table
+* @scenario                            get current profile and get interface name
+*                                              Call API to add a route in route table
+*                                              Call API to remove a route from route table
+* @apicovered                  connection_add_route, connection_remove_route
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_add_remove_route_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_add_remove_route_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1;
+       connection_profile_h eCurrentConnectionProfile;
+
+       char *psz_Interface_name = NULL;
+       char *psz_Host_address = "198.126.98.128";// testing host address
+
+
+       nRetVal = connection_get_current_profile(g_hConnection, &eCurrentConnectionProfile);
+       PRINT_RESULT(nRetVal, "connection_get_current_profile");
+       if (eCurrentConnectionProfile == NULL)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_current_profile failed in pre-condition, returned profile : null", __LINE__);
+               return 1;
+       }
+
+       nRetVal = connection_profile_get_network_interface_name(eCurrentConnectionProfile, &psz_Interface_name);
+       PRINT_RESULT(nRetVal, "connection_profile_get_network_interface_name");
+       if (psz_Interface_name == NULL)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] connection_profile_get_network_interface_name failed in pre-condition, returned interface : null", __LINE__);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       g_pszSpeedLogConAPI2 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+       g_pszMemLogConAPI2 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_add_route(g_hConnection, psz_Interface_name, psz_Host_address);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+               ConnectionGetMemStatus(g_pszMemLogConAPI1);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_add_route failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount1++;
+                       continue;
+               }
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_remove_route(g_hConnection,psz_Interface_name, psz_Host_address);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI2);
+               ConnectionGetMemStatus(g_pszMemLogConAPI2);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_remove_route failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount2++;
+               }
+       }
+
+       if (psz_Interface_name != NULL)
+       {
+               free(psz_Interface_name);
+               psz_Interface_name = NULL;
+       }
+       psz_Host_address = NULL;
+
+       if (g_nErrorCount1 > 0 || g_nErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_add_route", g_nErrorCount1, "connection_remove_route", g_nErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_add_route, g_pszSpeedLogConAPI1);
+       PRINT_SPEED_LOG(connection_remove_route, g_pszSpeedLogConAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_add_route, g_pszMemLogConAPI1);
+       PRINT_MEMORY_LOG(connection_remove_route, g_pszMemLogConAPI2);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check add/remove a IPv6 route in routing table
+//& type : auto
+/**
+* @testcase                    ITc_connection_add_remove_IPv6_route_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check add/remove a IPv6 route in routing table
+* @scenario                            Get current profile and get interface name
+*                                              Call api to add a route in route table
+*                                              Call api to remove a route from route table
+* @apicovered                  connection_add_route_ipv6, connection_remove_route_ipv6
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+
+int ITc_connection_add_remove_IPv6_route_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_add_remove_IPv6_route_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1;
+       connection_profile_h eCurrentConnectionProfile;
+
+       char *psz_Interface_name = NULL;
+       char *psz_Host_address = "2002:0:0:0:0:0:c67e:6280"; // testing host address
+       char *psz_gateway = "fe90::1";                                           // default gateway
+       
+       nRetVal = connection_get_current_profile(g_hConnection, &eCurrentConnectionProfile);
+       PRINT_RESULT(nRetVal, "connection_get_current_profile");
+       if (eCurrentConnectionProfile == NULL)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_current_profile failed in pre-condition, returned profile : null", __LINE__);
+               return 1;
+       }
+
+       nRetVal = connection_profile_get_network_interface_name(eCurrentConnectionProfile, &psz_Interface_name);
+       PRINT_RESULT(nRetVal, "connection_profile_get_network_interface_name");
+       if (psz_Interface_name == NULL)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] connection_profile_get_network_interface_name failed in pre-condition, returned interface : null", __LINE__);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       g_pszSpeedLogConAPI2 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+       g_pszMemLogConAPI2 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_add_route_ipv6(g_hConnection, psz_Interface_name, psz_Host_address, psz_gateway);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+               ConnectionGetMemStatus(g_pszMemLogConAPI1);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_add_route_ipv6 failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount1++;
+                       continue;
+               }
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_remove_route_ipv6(g_hConnection,psz_Interface_name, psz_Host_address, psz_gateway);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI2);
+               ConnectionGetMemStatus(g_pszMemLogConAPI2);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_remove_route_ipv6 failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount2++;
+               }
+       }
+
+       if (psz_Interface_name != NULL)
+       {
+               free(psz_Interface_name);
+               psz_Interface_name = NULL;
+       }
+       psz_Host_address = NULL;// assigning NULL 
+       psz_gateway = NULL;// assigning NULL 
+
+       if (g_nErrorCount1 > 0 || g_nErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_add_route_ipv6", g_nErrorCount1, "connection_remove_route_ipv6", g_nErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_add_route_ipv6, g_pszSpeedLogConAPI1);
+       PRINT_SPEED_LOG(connection_remove_route_ipv6, g_pszSpeedLogConAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_add_route_ipv6, g_pszMemLogConAPI1);
+       PRINT_MEMORY_LOG(connection_remove_route_ipv6, g_pszMemLogConAPI2);
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check state of Bluetooth
+//& type : auto
+/**
+* @testcase                    ITc_connection_get_bt_state_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check state of Bluetooth
+* @scenario                            Call API to get state of bluetooth
+* @apicovered                  connection_get_bt_state
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Bluetooth must be disabled
+* @postcondition               None
+*/
+int ITc_connection_get_bt_state_p(void)
+{
+       FPRINTF("\\n[Line : %d][Connection_ITc] Starting test : %s\\n",__LINE__,__FUNCTION__);
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_get_bt_state_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1;
+       connection_bt_state_e eFindBluetoothState = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+       {
+               eFindBluetoothState = -1;
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_get_bt_state(g_hConnection, &eFindBluetoothState);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+               ConnectionGetMemStatus(g_pszMemLogConAPI1);
+               if ( !g_bBtFeatureSupported)
+               {
+                       if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_bt_state API call returned mismatch %s error for unsupported bluetooth feature", __LINE__, ConnectionGetError(nRetVal));
+                               g_nErrorCount1++;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_bt_state API call correctly returned %s error for unsupported bluetooth feature", __LINE__, ConnectionGetError(nRetVal));
+                       }
+                       continue;
+               }
+               
+               if ((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_bt_state failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount1++;
+                       continue;
+               }
+
+               if (eFindBluetoothState == -1)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_bt_state failed on iteration %d, returned invalid bluetooth state : %d", __LINE__, nLoopCount, eFindBluetoothState);
+                       g_nErrorCount1++;
+               }
+       }
+
+       if (g_nErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times out of %d times\\n", __LINE__, "connection_get_bt_state", g_nErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_get_bt_state, g_pszSpeedLogConAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_get_bt_state, g_pszMemLogConAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check connection type
+//& type : auto
+/**
+* @testcase                    ITc_connection_get_type_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check connection type
+* @scenario                            Call API to get connection type
+* @apicovered                  connection_get_type
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_get_type_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_get_type_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1;
+       connection_type_e eFindConnectionType = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+
+       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+       {
+               eFindConnectionType = -1;
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_get_type(g_hConnection, &eFindConnectionType);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+               ConnectionGetMemStatus(g_pszMemLogConAPI1);
+               if ((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_type failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount1++;
+                       continue;
+               }
+
+               if (eFindConnectionType == -1)
+               {
+                       g_nErrorCount1++;
+               }
+               FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_type iteration %d, returned Connection Type :: %s \\n", __LINE__, nLoopCount, ConnectionGetType(eFindConnectionType));
+       }
+
+       if (g_nErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times out of %d times\\n", __LINE__, "connection_get_type", g_nErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_get_type, g_pszSpeedLogConAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_get_type, g_pszMemLogConAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check proxy address of the current connection
+//& type : auto
+/**
+* @testcase                    ITc_connection_get_proxy_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check proxy address of the current connection
+* @scenario                            Call API to get proxy address
+* @apicovered                  connection_get_proxy
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_get_proxy_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_get_proxy_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1, nEnumLoopCount = 0;
+       connection_address_family_e eConnectionAddressFamily = -1;
+       int arrConnectionAddressFamilyValues[] = {
+                        CONNECTION_ADDRESS_FAMILY_IPV4,        /**< IPV4 Address type */
+                        //CONNECTION_ADDRESS_FAMILY_IPV6       /**< IPV6 Address type */
+       };
+       int nConnectionFamilyCount = sizeof(arrConnectionAddressFamilyValues) / sizeof(arrConnectionAddressFamilyValues[0]);
+       char* pszReceivedProxy = NULL;
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+
+       for (nEnumLoopCount = 0;nEnumLoopCount < nConnectionFamilyCount;nEnumLoopCount++)
+       {
+               eConnectionAddressFamily = arrConnectionAddressFamilyValues[nEnumLoopCount];
+               for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_get_proxy(g_hConnection, eConnectionAddressFamily, &pszReceivedProxy);
+                       ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogConAPI1);
+                       if ((nRetVal != CONNECTION_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_proxy failed on iteration %d, error returned = %s, address family = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal), ConnectionGetAddressFamily(eConnectionAddressFamily));
+                               g_nErrorCount1++;
+                               continue;
+                       }
+
+                       if (pszReceivedProxy == NULL){
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_proxy iteration %d, returned proxy :: NULL", __LINE__, nLoopCount);
+                               g_nErrorCount1++;
+                       }
+
+                       if (pszReceivedProxy != NULL)
+                       {
+                               free(pszReceivedProxy);
+                               pszReceivedProxy = NULL;
+                       }
+               }
+       }
+
+       if (g_nErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times out of %d times\\n", __LINE__, "connection_get_proxy", g_nErrorCount1, (MAX_COUNT * nConnectionFamilyCount));
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_get_proxy, g_pszSpeedLogConAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_get_proxy, g_pszMemLogConAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check IP address of the current connection.
+//& type : auto
+/**
+* @testcase                    ITc_connection_get_ip_address_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 IP address of the current connection.
+* @scenario                            - call API to get IP address
+* @apicovered                  -connection_get_ip_address
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_get_ip_address_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_get_ip_address_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1, nEnumLoopCount;
+       connection_address_family_e eConnectionAddressFamily;
+
+       int arrConnectionAddressFamilyValues[] = {
+                               CONNECTION_ADDRESS_FAMILY_IPV4,         /**< IPV4 Address type */
+                               //CONNECTION_ADDRESS_FAMILY_IPV6        /**< IPV6 Address type */
+       };
+       int nConnectionFamilyCount = sizeof(arrConnectionAddressFamilyValues) / sizeof(arrConnectionAddressFamilyValues[0]);
+       char* pszReceivedIPAddress = NULL;
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0;nEnumLoopCount < nConnectionFamilyCount;nEnumLoopCount++)
+       {
+               eConnectionAddressFamily = arrConnectionAddressFamilyValues[nEnumLoopCount];
+               for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_get_ip_address(g_hConnection, eConnectionAddressFamily, &pszReceivedIPAddress);
+                       ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogConAPI1);
+                       if ((nRetVal != CONNECTION_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_ip_address failed on iteration %d, error returned = %s, address family = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal), ConnectionGetAddressFamily(eConnectionAddressFamily));
+                               g_nErrorCount1++;
+                               continue;
+                       }
+
+                       if (pszReceivedIPAddress == NULL){
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_ip_address iteration %d, returned ip address :: NULL", __LINE__, nLoopCount);
+                               g_nErrorCount1++;
+                       }
+
+                       if (pszReceivedIPAddress != NULL)
+                       {
+                               free(pszReceivedIPAddress);
+                               pszReceivedIPAddress = NULL;
+                       }
+               }
+       }
+
+       if (g_nErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times out of %d times\\n", __LINE__, "connection_get_ip_address", g_nErrorCount1, (MAX_COUNT * nConnectionFamilyCount));
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_get_ip_address, g_pszSpeedLogConAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_get_ip_address, g_pszMemLogConAPI1);
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check statistics information
+//& type : auto
+/**
+* @testcase                    ITc_connection_get_statistics_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check statistics information
+* @scenario                            Call API to get statistics information
+* @apicovered                  connection_get_statistics
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_get_statistics_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_get_statistics_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1, nEnumConnectionTypeLoop, nEnumConnectionStatisticsTypeLoop;
+       connection_type_e eSetConnectionType;
+       int arrConnectionType[] = {
+                       CONNECTION_TYPE_WIFI,                   /**< Wi-Fi type */
+                       CONNECTION_TYPE_CELLULAR,               /**< Cellular type */
+       };
+       int nConnectionTypeCount = sizeof(arrConnectionType) / sizeof(arrConnectionType[0]);
+
+       connection_statistics_type_e eSetStatisticsType;
+       int arrConnectionStatisticsType[] = {
+               CONNECTION_STATISTICS_TYPE_LAST_RECEIVED_DATA,          /**< Last received data */
+               CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA,                      /**< Last sent data */
+               CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA,         /**< Total received data */
+               CONNECTION_STATISTICS_TYPE_TOTAL_SENT_DATA,                     /**< Total sent data */
+       };
+       int nConnectionStatisticsTypeCount = sizeof(arrConnectionStatisticsType) / sizeof(arrConnectionStatisticsType[0]);
+
+       long long lReceivedData = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT * nConnectionStatisticsTypeCount * nConnectionTypeCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT * nConnectionStatisticsTypeCount * nConnectionTypeCount, sizeof(char));
+#endif
+
+       for (nEnumConnectionTypeLoop = 0;nEnumConnectionTypeLoop < nConnectionTypeCount;nEnumConnectionTypeLoop++)
+       {
+               eSetConnectionType = arrConnectionType[nEnumConnectionTypeLoop];
+               if (eSetConnectionType == CONNECTION_TYPE_WIFI && g_bWifiFeatureSupported == false)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] Network wifi feature is not supported in target device",__LINE__);
+                       continue;
+               }
+               if (eSetConnectionType == CONNECTION_TYPE_CELLULAR && g_bTelFeatureSupported == false)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] Network telephony feature is not supported in target device",__LINE__);
+                       continue;
+               }
+               
+               for (nEnumConnectionStatisticsTypeLoop = 0;nEnumConnectionStatisticsTypeLoop < nConnectionStatisticsTypeCount;nEnumConnectionStatisticsTypeLoop++)
+               {
+                       eSetStatisticsType = arrConnectionStatisticsType[nEnumConnectionStatisticsTypeLoop];
+
+                       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+                       {
+                               ConnectionGetMemAllocation();
+                               ConnectionGetTimeOfDay();
+                               nRetVal = connection_get_statistics(g_hConnection, eSetConnectionType, eSetStatisticsType, &lReceivedData);
+                               ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+                               ConnectionGetMemStatus(g_pszMemLogConAPI1);
+                               if ((nRetVal != CONNECTION_ERROR_NONE))
+                               {
+                                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_statistics failed on iteration %d, error returned = %s, connection type = %s, statistics type = %s \\n", __LINE__, nLoopCount, ConnectionGetError(nRetVal), ConnectionGetType(eSetConnectionType),ConnectionGetStatisticTypeData(eSetStatisticsType));
+                                       g_nErrorCount1++;
+                                       continue;
+                               }
+
+                               if (lReceivedData == -1){
+                                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_statistics iteration %d, returned received data :: -1, connection type = %s, statistics type = %s \\n", __LINE__, nLoopCount, ConnectionGetType(eSetConnectionType),ConnectionGetStatisticTypeData(eSetStatisticsType));
+                                       g_nErrorCount1++;
+                               }
+
+                               lReceivedData = -1;
+                       }
+               }
+       }
+
+       if (g_nErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times out of %d times\\n", __LINE__, "connection_get_statistics", g_nErrorCount1, (MAX_COUNT * nConnectionTypeCount ) * nConnectionStatisticsTypeCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_get_statistics, g_pszSpeedLogConAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_get_statistics, g_pszMemLogConAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check name of default profile
+//& type : auto
+/**
+* @testcase                    ITc_connection_get_current_profile_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check name of default profile
+* @scenario                            Call API to get name of default profile
+* @apicovered                  connection_get_current_profile
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_get_current_profile_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1){
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_get_current_profile_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1;
+       connection_profile_h eFindConnectionProfile = NULL;
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_get_current_profile(g_hConnection, &eFindConnectionProfile);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+               ConnectionGetMemStatus(g_pszMemLogConAPI1);
+               if ((nRetVal != CONNECTION_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_current_profile failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount1++;
+                       continue;
+               }
+
+               if (eFindConnectionProfile == NULL){
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_current_profile iteration %d, returned current connection profile :: NULL", __LINE__, nLoopCount);
+                       g_nErrorCount1++;
+               }
+       }
+
+       if (g_nErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times out of %d times\\n", __LINE__, "connection_get_current_profile", g_nErrorCount1, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_get_current_profile, g_pszSpeedLogConAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_get_current_profile, g_pszMemLogConAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check reset the statistics information
+//& type : auto
+/**
+* @testcase                    ITc_connection_reset_statistics_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check reset the statistics information
+* @scenario                            Call API to reset the statistics information
+* @apicovered                  connection_reset_statistics
+* @passcase                            When API return CONNECTION_ERROR_NONE
+* @failcase                            When API not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_reset_statistics_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_reset_statistics_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1, nEnumConnectionTypeLoop, nEnumConnectionStatisticsTypeLoop;
+       connection_type_e eConnectionType;
+       int arrConnectionType[] = {
+                       CONNECTION_TYPE_WIFI,                   /**< Wi-Fi type */
+                       CONNECTION_TYPE_CELLULAR,               /**< Cellular type */
+       };
+       int nConnectionTypeCount = sizeof(arrConnectionType) / sizeof(arrConnectionType[0]);
+
+       connection_statistics_type_e eStatisticsType;
+       int arrConnectionStatisticsType[] = {
+                       CONNECTION_STATISTICS_TYPE_LAST_RECEIVED_DATA,          /**< Last received data */
+                       CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA,                      /**< Last sent data */
+                       CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA,         /**< Total received data */
+                       CONNECTION_STATISTICS_TYPE_TOTAL_SENT_DATA,                     /**< Total sent data */
+       };
+       int nConnectionStatisticsTypeCount = sizeof(arrConnectionStatisticsType) / sizeof(arrConnectionStatisticsType[0]);
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT * nConnectionStatisticsTypeCount * nConnectionTypeCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT * nConnectionStatisticsTypeCount * nConnectionTypeCount, sizeof(char));
+#endif
+
+
+       for (nEnumConnectionTypeLoop = 0;nEnumConnectionTypeLoop < nConnectionTypeCount;nEnumConnectionTypeLoop++)
+       {
+               eConnectionType = arrConnectionType[nEnumConnectionTypeLoop];
+               if (eConnectionType == CONNECTION_TYPE_WIFI && g_bWifiFeatureSupported == false)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] Network wifi feature is not supported in target device",__LINE__);
+                       continue;
+               }
+               if (eConnectionType == CONNECTION_TYPE_CELLULAR && g_bTelFeatureSupported == false)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] Network telephony feature is not supported in target device",__LINE__);
+                       continue;
+               }
+               
+               for (nEnumConnectionStatisticsTypeLoop = 0;nEnumConnectionStatisticsTypeLoop < nConnectionStatisticsTypeCount;nEnumConnectionStatisticsTypeLoop++)
+               {
+                       eStatisticsType = arrConnectionStatisticsType[nEnumConnectionStatisticsTypeLoop];
+                       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+                       {
+                               ConnectionGetMemAllocation();
+                               ConnectionGetTimeOfDay();
+                               nRetVal = connection_reset_statistics(g_hConnection ,eConnectionType, eStatisticsType);
+                               ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+                               ConnectionGetMemStatus(g_pszMemLogConAPI1);
+                               if ((nRetVal != CONNECTION_ERROR_NONE))
+                               {
+                                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_reset_statistics failed on iteration %d, error returned = %s, connection type = %s, statistic data type = %s \\n", __LINE__, nLoopCount, ConnectionGetError(nRetVal), ConnectionGetType(eConnectionType), ConnectionGetStatisticTypeData(eStatisticsType));
+                                       g_nErrorCount1++;
+                                       continue;
+                               }
+                       }
+               }
+       }
+
+       if (g_nErrorCount1 > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times out of %d times\\n", __LINE__, "connection_reset_statistics", g_nErrorCount1, (MAX_COUNT * nConnectionTypeCount ) * nConnectionStatisticsTypeCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_reset_statistics, g_pszSpeedLogConAPI1);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_reset_statistics, g_pszMemLogConAPI1);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check iterator of the profiles
+//& type : auto
+/**
+* @testcase                    ITc_connection_get_destroy_profile_iterator_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check iterator of the profiles
+* @scenario                            Call API to get iterator of the profile\n
+*                                              verify return value of API\n
+*                                              Call API to destroy iterator of the profile\n
+*                                              verify return value of api
+* @apicovered                  connection_get_profile_iterator, connection_destroy_profile_iterator
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_get_destroy_profile_iterator_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_get_destroy_profile_iterator_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1, nEnumLoopCount;
+       connection_profile_iterator_h hConnectionProfileHandleIterator;
+       connection_iterator_type_e eConnectionIteratortype;
+       int arrConnectionIteratorTypeValues[] = {
+               CONNECTION_ITERATOR_TYPE_REGISTERED,    /**< The iterator of registered profile */
+               CONNECTION_ITERATOR_TYPE_CONNECTED,             /**< The iterator of connected profile */
+       };
+       int nConnectionIteratorTypeCount = sizeof(arrConnectionIteratorTypeValues) / sizeof(arrConnectionIteratorTypeValues[0]);
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT * nConnectionIteratorTypeCount, sizeof(char));
+       g_pszSpeedLogConAPI2 =  calloc(TIMELOG * MAX_COUNT * nConnectionIteratorTypeCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT * nConnectionIteratorTypeCount, sizeof(char));
+       g_pszMemLogConAPI2 = calloc(MEMLOG * MAX_COUNT * nConnectionIteratorTypeCount, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0;nEnumLoopCount < nConnectionIteratorTypeCount;nEnumLoopCount++)
+       {
+               eConnectionIteratortype = arrConnectionIteratorTypeValues[nEnumLoopCount];
+               for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_get_profile_iterator(g_hConnection, eConnectionIteratortype, &hConnectionProfileHandleIterator);
+                       ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+                       ConnectionGetMemStatus(g_pszMemLogConAPI1);
+                       if (nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_profile_iterator failed on iteration %d, error returned = %s, iterator type = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal),ConnectionGetIteratorType(eConnectionIteratortype));
+                               g_nErrorCount1++;
+                               continue;
+                       }
+
+                       if (hConnectionProfileHandleIterator == NULL)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_get_profile_iterator failed on iteration %d, returned connection profile iterator :: NULL, iterator type = %s", __LINE__, nLoopCount, ConnectionGetIteratorType(eConnectionIteratortype));
+                               g_nErrorCount1++;
+                               connection_destroy_profile_iterator(hConnectionProfileHandleIterator);
+                               continue;
+                       }
+
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_destroy_profile_iterator(hConnectionProfileHandleIterator);
+                       ConnectionExecutionDelay(g_pszSpeedLogConAPI2);
+                       ConnectionGetMemStatus(g_pszMemLogConAPI2);
+                       if (nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_destroy_profile_iterator failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                               g_nErrorCount2++;
+                       }
+               }
+       }
+
+       if (g_nErrorCount1 > 0 || g_nErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_get_profile_iterator", g_nErrorCount1, "connection_destroy_profile_iterator", g_nErrorCount2, MAX_COUNT * nConnectionIteratorTypeCount);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_get_profile_iterator, g_pszSpeedLogConAPI1);
+       PRINT_SPEED_LOG(connection_destroy_profile_iterator, g_pszSpeedLogConAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_get_profile_iterator, g_pszMemLogConAPI1);
+       PRINT_MEMORY_LOG(connection_destroy_profile_iterator, g_pszMemLogConAPI2);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check next element of profile iterator exists or not
+//& type : auto
+/**
+* @testcase                    ITc_connection_profile_iterator_has_next_next_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check next element of profile iterator exists or not
+* @scenario                            Call API to get next element of profile iterator exists or not\n
+*                                              Call API to get next profile\n
+*                                              verify return value of apis
+* @apicovered                  connection_profile_iterator_has_next, connection_profile_iterator_next
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        Cellular data connection must be exist in the testing device
+* @postcondition               None
+*/
+int ITc_connection_profile_iterator_has_next_next_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_get_destroy_profile_iterator_p failed on precondition", __LINE__);
+                       return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1;
+       bool bRetVal = false;
+       connection_profile_iterator_h hConnectionProfileHandleIterator;
+       connection_iterator_type_e eConnectionIteratortype = CONNECTION_ITERATOR_TYPE_REGISTERED;
+       connection_profile_h hTempProfile;
+
+       nRetVal = connection_get_profile_iterator(g_hConnection, eConnectionIteratortype, &hConnectionProfileHandleIterator);
+       PRINT_RESULT(nRetVal, "connection_get_profile_iterator");
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       g_pszSpeedLogConAPI2 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+       g_pszMemLogConAPI2 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               bRetVal = connection_profile_iterator_has_next(hConnectionProfileHandleIterator);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+               ConnectionGetMemStatus(g_pszMemLogConAPI1);
+               if ((bRetVal != true) && (bRetVal != false))
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_profile_iterator_has_next iteration %d, returned invalid output", __LINE__, nLoopCount);
+                       g_nErrorCount1++;
+                       continue;
+               }
+
+               if (bRetVal)
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_iterator_next(hConnectionProfileHandleIterator, &hTempProfile);
+                       ConnectionExecutionDelay(g_pszSpeedLogConAPI2);
+                       ConnectionGetMemStatus(g_pszMemLogConAPI2);
+                       if (nRetVal != CONNECTION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_profile_iterator_next failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                               g_nErrorCount2++;
+                               continue;
+                       }
+
+                       if (hTempProfile == NULL)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_profile_iterator_has_next failed on iteration %d, returned next connection profile :: NULL", __LINE__, nLoopCount);
+                               g_nErrorCount2++;
+                       }
+               }
+               else
+               {
+                       ConnectionGetMemAllocation();
+                       ConnectionGetTimeOfDay();
+                       nRetVal = connection_profile_iterator_next(hConnectionProfileHandleIterator, &hTempProfile);
+                       ConnectionExecutionDelay(g_pszSpeedLogConAPI2);
+                       ConnectionGetMemStatus(g_pszMemLogConAPI2);
+                       if (nRetVal != CONNECTION_ERROR_ITERATOR_END)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_profile_iterator_next failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                               g_nErrorCount2++;
+                               continue;
+                       }
+
+                       if (hTempProfile != NULL)
+                       {
+                               FPRINTF("\\n[Line : %d][Connection_ITc] connection_profile_iterator_has_next failed on iteration %d, returned next connection profile :: not NULL", __LINE__, nLoopCount);
+                               g_nErrorCount2++;
+                       }
+               }
+       }
+
+       nRetVal = connection_destroy_profile_iterator(hConnectionProfileHandleIterator);
+       PRINT_POST_RESULT(nRetVal, "connection_destroy_profile_iterator");
+
+       if (g_nErrorCount1 > 0 || g_nErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_profile_iterator_has_next", g_nErrorCount1, "connection_profile_iterator_next", g_nErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_profile_iterator_has_next, g_pszSpeedLogConAPI1);
+       PRINT_SPEED_LOG(connection_profile_iterator_next, g_pszSpeedLogConAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_profile_iterator_has_next, g_pszMemLogConAPI1);
+       PRINT_MEMORY_LOG(connection_profile_iterator_next, g_pszMemLogConAPI2);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check register/ unregister network type change callback
+//& type : auto
+/**
+* @testcase                    ITc_connection_set_unset_type_changed_cb_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check next element of profile iterator exists or not
+* @scenario                            Call API to register network type changes callback and verify\n
+*                                              Call API to unregister network type changes callback and verify
+* @apicovered                  connection_set_type_changed_cb, connection_unset_type_changed_cb
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_set_unset_type_changed_cb_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_set_unset_type_changed_cb_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       g_pszSpeedLogConAPI2 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+       g_pszMemLogConAPI2 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_set_type_changed_cb(g_hConnection, test_network_state_changed_cb, NULL);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+               ConnectionGetMemStatus(g_pszMemLogConAPI1);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_set_type_changed_cb failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount1++;
+                       continue;
+               }
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_unset_type_changed_cb(g_hConnection);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI2);
+               ConnectionGetMemStatus(g_pszMemLogConAPI2);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_unset_type_changed_cb failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount2++;
+               }
+       }
+
+       if (g_nErrorCount1 > 0 || g_nErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_set_type_changed_cb", g_nErrorCount1, "connection_unset_type_changed_cb", g_nErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_set_type_changed_cb, g_pszSpeedLogConAPI1);
+       PRINT_SPEED_LOG(connection_unset_type_changed_cb, g_pszSpeedLogConAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_set_type_changed_cb, g_pszMemLogConAPI1);
+       PRINT_MEMORY_LOG(connection_unset_type_changed_cb, g_pszMemLogConAPI2);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check register/ unregister callback on IP address change
+//& type : auto
+/**
+* @testcase                    ITc_connection_set_unset_ip_address_changed_cb_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check register/ unregister callback on IP address change
+* @scenario                            Call API to register callback on IP address change\n
+*                                              Call API to unregister callback on IP address change
+* @apicovered                  connection_set_ip_address_changed_cb, connection_unset_ip_address_changed_cb
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_set_unset_ip_address_changed_cb_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_set_unset_ip_address_changed_cb_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1;
+       
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       g_pszSpeedLogConAPI2 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+       g_pszMemLogConAPI2 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_set_ip_address_changed_cb(g_hConnection, test_ip_address_changed_cb, NULL);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+               ConnectionGetMemStatus(g_pszMemLogConAPI1);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_set_ip_address_changed_cb failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount1++;
+                       continue;
+               }
+               
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_unset_ip_address_changed_cb(g_hConnection);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI2);
+               ConnectionGetMemStatus(g_pszMemLogConAPI2);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_unset_ip_address_changed_cb failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount2++;
+               }
+       }
+
+       if (g_nErrorCount1 > 0 || g_nErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_set_ip_address_changed_cb", g_nErrorCount1, "connection_unset_ip_address_changed_cb", g_nErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_set_ip_address_changed_cb, g_pszSpeedLogConAPI1);
+       PRINT_SPEED_LOG(connection_unset_ip_address_changed_cb, g_pszSpeedLogConAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_set_ip_address_changed_cb, g_pszMemLogConAPI1);
+       PRINT_MEMORY_LOG(connection_unset_ip_address_changed_cb, g_pszMemLogConAPI2);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check register/ unregister callback on Proxy address change
+//& type : auto
+/**
+* @testcase                    ITc_connection_set_unset_proxy_address_changed_cb_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 To check register/ unregister callback on Proxy address change
+* @scenario                            Call API to register callback on Proxy address change\n
+*                                              Call API to unregister callback on Proxy address change
+* @apicovered                  connection_set_proxy_address_changed_cb, connection_unset_proxy_address_changed_cb
+* @passcase                            When APIs return CONNECTION_ERROR_NONE
+* @failcase                            When APIs not return CONNECTION_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_connection_set_unset_proxy_address_changed_cb_p(void)
+{
+       START_TEST;
+
+       if (g_nPreconditionError == 1)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] ITc_connection_set_unset_proxy_address_changed_cb_p failed on precondition", __LINE__);
+               return 1;
+       }
+
+       int nLoopCount = 0, nRetVal = -1;
+
+#if SPEED_CHECK
+       g_pszSpeedLogConAPI1 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       g_pszSpeedLogConAPI2 = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       g_pszMemLogConAPI1 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+       g_pszMemLogConAPI2 = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+       {
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_set_proxy_address_changed_cb(g_hConnection, test_proxy_address_changed_cb, NULL);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI1);
+               ConnectionGetMemStatus(g_pszMemLogConAPI1);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_set_proxy_address_changed_cb failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount1++;
+                       continue;
+               }
+
+               ConnectionGetMemAllocation();
+               ConnectionGetTimeOfDay();
+               nRetVal = connection_unset_proxy_address_changed_cb(g_hConnection);
+               ConnectionExecutionDelay(g_pszSpeedLogConAPI2);
+               ConnectionGetMemStatus(g_pszMemLogConAPI2);
+               if (nRetVal != CONNECTION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Connection_ITc] connection_unset_proxy_address_changed_cb failed on iteration %d, error returned = %s", __LINE__, nLoopCount, ConnectionGetError(nRetVal));
+                       g_nErrorCount2++;
+               }
+       }
+
+       if (g_nErrorCount1 > 0 || g_nErrorCount2 > 0)
+       {
+               FPRINTF("\\n[Line : %d][Connection_ITc] %s failed %d times, %s failed %d times out of %d times\\n", __LINE__, "connection_set_proxy_address_changed_cb", g_nErrorCount1, "connection_unset_proxy_address_changed_cb", g_nErrorCount2, MAX_COUNT);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(connection_set_proxy_address_changed_cb, g_pszSpeedLogConAPI1);
+       PRINT_SPEED_LOG(connection_unset_proxy_address_changed_cb, g_pszSpeedLogConAPI2);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(connection_set_proxy_address_changed_cb, g_pszMemLogConAPI1);
+       PRINT_MEMORY_LOG(connection_unset_proxy_address_changed_cb, g_pszMemLogConAPI2);
+#endif
+
+       return 0;
+}
+/** @} */ 
+/** @} */
diff --git a/src/itc/connection/tct-connection-native.c b/src/itc/connection/tct-connection-native.c
new file mode 100755 (executable)
index 0000000..ec0b3b5
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-connection-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/connection/tct-connection-native.h b/src/itc/connection/tct-connection-native.h
new file mode 100755 (executable)
index 0000000..3762d00
--- /dev/null
@@ -0,0 +1,147 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CONNECTION_NATIVE_H__
+#define __TCT_CONNECTION_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_connection_profile_startup(void);
+extern void ITs_connection_profile_cleanup(void);
+extern void ITs_connection_startup(void);
+extern void ITs_connection_cleanup(void);
+extern void ITs_connection_wifi_profile_startup(void);
+extern void ITs_connection_wifi_profile_cleanup(void);
+
+extern int ITc_connection_profile_create_destroy_p(void);
+extern int ITc_connection_profile_get_name_p(void);
+extern int ITc_connection_profile_get_id_p(void);
+extern int ITc_connection_profile_get_type_p(void);
+extern int ITc_connection_profile_get_network_interface_name_p(void);
+extern int ITc_connection_profile_clone_p(void);
+extern int ITc_connection_profile_set_get_cellular_apn_p(void);
+extern int ITc_connection_profile_set_get_cellular_auth_info_p(void);
+extern int ITc_connection_profile_set_get_cellular_home_url_p(void);
+extern int ITc_connection_profile_set_get_cellular_service_type_p(void);
+extern int ITc_connection_profile_is_cellular_roaming_p(void);
+extern int ITc_connection_profile_get_state_p(void);
+extern int ITc_connection_profile_set_get_dns_address_p(void);
+extern int ITc_connection_profile_set_get_gateway_p(void);
+extern int ITc_connection_profile_set_get_ip_address_p(void);
+extern int ITc_connection_profile_set_get_ip_config_type_p(void);
+extern int ITc_connection_profile_set_get_proxy_type_p(void);
+extern int ITc_connection_profile_set_get_proxy_address_p(void);
+extern int ITc_connection_profile_set_get_subnet_mask_p(void);
+extern int ITc_connection_profile_set_unset_state_changed_cb_p(void);
+extern int ITc_connection_open_close_profile_p(void);
+extern int ITc_connection_profile_refresh_p(void);
+extern int ITc_connection_profile_is_cellular_editable_p(void);
+extern int ITc_connection_profile_is_cellular_hidden_p(void);
+extern int ITc_connection_get_cellular_state_p(void);
+extern int ITc_connection_set_get_default_cellular_service_profile_p(void);
+extern int ITc_connection_set_default_cellular_service_profile_async_p(void);
+extern int ITc_connection_reset_profile_p(void);
+extern int ITc_connection_profile_is_cellular_default_p(void);
+extern int ITc_connection_add_remove_profile_p(void);
+extern int ITc_connection_create_destroy_p(void);
+extern int ITc_connection_add_remove_route_p(void);
+extern int ITc_connection_add_remove_IPv6_route_p(void);
+extern int ITc_connection_get_bt_state_p(void);
+extern int ITc_connection_get_type_p(void);
+extern int ITc_connection_get_proxy_p(void);
+extern int ITc_connection_get_ip_address_p(void);
+extern int ITc_connection_get_statistics_p(void);
+extern int ITc_connection_get_current_profile_p(void);
+extern int ITc_connection_reset_statistics_p(void);
+extern int ITc_connection_get_destroy_profile_iterator_p(void);
+extern int ITc_connection_profile_iterator_has_next_next_p(void);
+extern int ITc_connection_set_unset_type_changed_cb_p(void);
+extern int ITc_connection_set_unset_ip_address_changed_cb_p(void);
+extern int ITc_connection_set_unset_proxy_address_changed_cb_p(void);
+extern int ITc_connection_profile_get_wifi_bssid_p(void);
+extern int ITc_connection_profile_get_wifi_essid_p(void);
+extern int ITc_connection_profile_get_wifi_frequency_p(void);
+extern int ITc_connection_profile_get_wifi_max_speed_p(void);
+extern int ITc_connection_profile_get_wifi_rssi_p(void);
+extern int ITc_connection_profile_get_wifi_security_type_p(void);
+extern int ITc_connection_profile_get_wifi_encryption_type_p(void);
+extern int ITc_connection_profile_is_wifi_passphrase_required_p(void);
+extern int ITc_connection_profile_is_wifi_wps_supported_p(void);
+extern int ITc_connection_profile_set_wifi_passphrase_p(void);
+extern int ITc_connection_update_profile_p(void);
+extern int ITc_connection_get_wifi_state_p(void);
+
+testcase tc_array[] = {
+    {"ITc_connection_profile_create_destroy_p", ITc_connection_profile_create_destroy_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_get_name_p", ITc_connection_profile_get_name_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_get_id_p", ITc_connection_profile_get_id_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_get_type_p", ITc_connection_profile_get_type_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_get_network_interface_name_p", ITc_connection_profile_get_network_interface_name_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_clone_p", ITc_connection_profile_clone_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_get_cellular_apn_p", ITc_connection_profile_set_get_cellular_apn_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_get_cellular_auth_info_p", ITc_connection_profile_set_get_cellular_auth_info_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_get_cellular_home_url_p", ITc_connection_profile_set_get_cellular_home_url_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_get_cellular_service_type_p", ITc_connection_profile_set_get_cellular_service_type_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_is_cellular_roaming_p", ITc_connection_profile_is_cellular_roaming_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_get_state_p", ITc_connection_profile_get_state_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_get_dns_address_p", ITc_connection_profile_set_get_dns_address_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_get_gateway_p", ITc_connection_profile_set_get_gateway_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_get_ip_address_p", ITc_connection_profile_set_get_ip_address_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_get_ip_config_type_p", ITc_connection_profile_set_get_ip_config_type_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_get_proxy_type_p", ITc_connection_profile_set_get_proxy_type_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_get_proxy_address_p", ITc_connection_profile_set_get_proxy_address_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_get_subnet_mask_p", ITc_connection_profile_set_get_subnet_mask_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_set_unset_state_changed_cb_p", ITc_connection_profile_set_unset_state_changed_cb_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_open_close_profile_p", ITc_connection_open_close_profile_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_refresh_p", ITc_connection_profile_refresh_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_is_cellular_editable_p", ITc_connection_profile_is_cellular_editable_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_is_cellular_hidden_p", ITc_connection_profile_is_cellular_hidden_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_get_cellular_state_p", ITc_connection_get_cellular_state_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_set_get_default_cellular_service_profile_p", ITc_connection_set_get_default_cellular_service_profile_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_set_default_cellular_service_profile_async_p", ITc_connection_set_default_cellular_service_profile_async_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_reset_profile_p", ITc_connection_reset_profile_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_profile_is_cellular_default_p", ITc_connection_profile_is_cellular_default_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_add_remove_profile_p", ITc_connection_add_remove_profile_p, ITs_connection_profile_startup, ITs_connection_profile_cleanup},
+    {"ITc_connection_create_destroy_p", ITc_connection_create_destroy_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_add_remove_route_p", ITc_connection_add_remove_route_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_add_remove_IPv6_route_p", ITc_connection_add_remove_IPv6_route_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_get_bt_state_p", ITc_connection_get_bt_state_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_get_type_p", ITc_connection_get_type_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_get_proxy_p", ITc_connection_get_proxy_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_get_ip_address_p", ITc_connection_get_ip_address_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_get_statistics_p", ITc_connection_get_statistics_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_get_current_profile_p", ITc_connection_get_current_profile_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_reset_statistics_p", ITc_connection_reset_statistics_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_get_destroy_profile_iterator_p", ITc_connection_get_destroy_profile_iterator_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_profile_iterator_has_next_next_p", ITc_connection_profile_iterator_has_next_next_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_set_unset_type_changed_cb_p", ITc_connection_set_unset_type_changed_cb_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_set_unset_ip_address_changed_cb_p", ITc_connection_set_unset_ip_address_changed_cb_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_set_unset_proxy_address_changed_cb_p", ITc_connection_set_unset_proxy_address_changed_cb_p, ITs_connection_startup, ITs_connection_cleanup},
+    {"ITc_connection_profile_get_wifi_bssid_p", ITc_connection_profile_get_wifi_bssid_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {"ITc_connection_profile_get_wifi_essid_p", ITc_connection_profile_get_wifi_essid_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {"ITc_connection_profile_get_wifi_frequency_p", ITc_connection_profile_get_wifi_frequency_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {"ITc_connection_profile_get_wifi_max_speed_p", ITc_connection_profile_get_wifi_max_speed_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {"ITc_connection_profile_get_wifi_rssi_p", ITc_connection_profile_get_wifi_rssi_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {"ITc_connection_profile_get_wifi_security_type_p", ITc_connection_profile_get_wifi_security_type_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {"ITc_connection_profile_get_wifi_encryption_type_p", ITc_connection_profile_get_wifi_encryption_type_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {"ITc_connection_profile_is_wifi_passphrase_required_p", ITc_connection_profile_is_wifi_passphrase_required_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {"ITc_connection_profile_is_wifi_wps_supported_p", ITc_connection_profile_is_wifi_wps_supported_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {"ITc_connection_profile_set_wifi_passphrase_p", ITc_connection_profile_set_wifi_passphrase_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {"ITc_connection_update_profile_p", ITc_connection_update_profile_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {"ITc_connection_get_wifi_state_p", ITc_connection_get_wifi_state_p, ITs_connection_wifi_profile_startup, ITs_connection_wifi_profile_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CONNECTION_NATIVE_H__
diff --git a/src/itc/context-manager/CMakeLists.txt b/src/itc/context-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..5c6f525
--- /dev/null
@@ -0,0 +1,41 @@
+SET(PKG_NAME "context-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "libcore-context-manager")
+SET(TC_SOURCES
+    ITs-context-manager-common.c
+       ITs-context-manager_activity.c
+       ITs-context-manager_gesture.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+    ${CAPI_LIB}
+    dlog
+       glib-2.0
+       dbus-glib-1
+       json-glib-1.0
+       capi-base-common
+       capi-system-info
+       sensor
+    bundle
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+    ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+    ${${CAPI_LIB}_LIBRARIES}
+    bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+    DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/context-manager/ITs-context-manager-common.c b/src/itc/context-manager/ITs-context-manager-common.c
new file mode 100755 (executable)
index 0000000..c95da3a
--- /dev/null
@@ -0,0 +1,400 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-context-manager-common.h"
+
+/** @addtogroup itc-capi-context-manager
+* @ingroup             itc
+* @{
+*/
+
+//Add helper function definitions here
+
+char* ContextManagerGetActivityError(activity_error_e nActivityError)
+{
+       char* szActivityError = NULL;
+       
+       switch ( nActivityError )
+       {
+               case ACTIVITY_ERROR_NONE:                               szActivityError = "ACTIVITY_ERROR_NONE";                                break;          /**< Successful */
+               case ACTIVITY_ERROR_INVALID_PARAMETER:  szActivityError = "ACTIVITY_ERROR_INVALID_PARAMETER";   break;          /**< Invalid function parameter */
+               case ACTIVITY_ERROR_INVALID_OPERATION:  szActivityError = "ACTIVITY_ERROR_INVALID_OPERATION";   break;          /**< Function not implemented */
+               case ACTIVITY_ERROR_OUT_OF_MEMORY:              szActivityError = "ACTIVITY_ERROR_OUT_OF_MEMORY";               break;          /**< Out of memory */
+               case ACTIVITY_ERROR_PERMISSION_DENIED:  szActivityError = "ACTIVITY_ERROR_PERMISSION_DENIED";   break;          /**< Permission denied */
+               case ACTIVITY_ERROR_ALREADY_STARTED:    szActivityError = "ACTIVITY_ERROR_ALREADY_STARTED";             break;          /**< Recognition is already started */
+               case ACTIVITY_ERROR_NOT_STARTED:                szActivityError = "ACTIVITY_ERROR_NOT_STARTED";                 break;          /**< Recognition is not started */
+               case ACTIVITY_ERROR_NOT_SUPPORTED:              szActivityError = "ACTIVITY_ERROR_NOT_SUPPORTED";               break;          /**< Not supported */
+               case ACTIVITY_ERROR_OPERATION_FAILED:   szActivityError = "ACTIVITY_ERROR_OPERATION_FAILED";    break;          /**< Operation failed because of a system error */
+               default:                                                                szActivityError = "Undefined Activity Error";                   break;
+       }
+       
+       return szActivityError;
+}
+
+/**
+ * @brief      Activity recognizer can detect the following activities.
+ * @since_tizen        2.3
+ */
+char* ContextManagerGetActivityType(activity_type_e nActivityType)
+{
+       char* szActivityType = NULL;
+       
+       switch ( nActivityType )
+       {
+               case ACTIVITY_STATIONARY:               szActivityType = "ACTIVITY_STATIONARY";                 break;          /**< Stationary */
+               case ACTIVITY_WALK:                             szActivityType = "ACTIVITY_WALK";                               break;          /**< Walking */
+               case ACTIVITY_RUN:                              szActivityType = "ACTIVITY_RUN";                                break;          /**< Running */
+               case ACTIVITY_IN_VEHICLE:               szActivityType = "ACTIVITY_IN_VEHICLE";                 break;          /**< In a moving vehicle */
+               default:                                                szActivityType = "Undefined Activity Type";             break;
+       }
+       
+       return szActivityType;
+}
+
+/**
+ * @brief      For each activity detected, its accuracy will be one of the followings.
+ * @since_tizen        2.3
+ */
+char* ContextManagerGetActivityAccuracy(activity_accuracy_e nAccuracy)
+{
+       char* szActivityAccuracy = NULL;
+       
+       switch ( nAccuracy )
+       {
+               case ACTIVITY_ACCURACY_LOW:             szActivityAccuracy = "ACTIVITY_ACCURACY_LOW";           break;  /**< Not accurate */
+               case ACTIVITY_ACCURACY_MID:             szActivityAccuracy = "ACTIVITY_ACCURACY_MID";           break;  /**< Moderate */
+               case ACTIVITY_ACCURACY_HIGH:    szActivityAccuracy = "ACTIVITY_ACCURACY_HIGH";          break;  /**< Highly accurate */
+               default:                                                szActivityAccuracy = "Undefined Activity Accuracy";     break;
+       }
+       
+       return szActivityAccuracy;
+}
+
+char* ContextManagerGetGestureError(gesture_error_e nGestureError)
+{
+       char* szGestureError = NULL;
+       
+       switch ( nGestureError )
+       {
+               case GESTURE_ERROR_NONE:                                szGestureError = "GESTURE_ERROR_NONE";                                  break;          /**< Successful */
+               case GESTURE_ERROR_INVALID_PARAMETER:   szGestureError = "GESTURE_ERROR_INVALID_PARAMETER";             break;          /**< Invalid function parameter */
+               case GESTURE_ERROR_INVALID_OPERATION:   szGestureError = "GESTURE_ERROR_INVALID_OPERATION";             break;          /**< Function not implemented */
+               case GESTURE_ERROR_OUT_OF_MEMORY:               szGestureError = "GESTURE_ERROR_OUT_OF_MEMORY";                 break;          /**< Out of memory */
+               case GESTURE_ERROR_PERMISSION_DENIED:   szGestureError = "GESTURE_ERROR_PERMISSION_DENIED";             break;          /**< Permission denied */
+               case GESTURE_ERROR_ALREADY_STARTED:             szGestureError = "GESTURE_ERROR_ALREADY_STARTED";               break;          /**< Recognition is already started */
+               case GESTURE_ERROR_NOT_STARTED:                 szGestureError = "GESTURE_ERROR_NOT_STARTED";                   break;          /**< Recognition is not started */
+               case GESTURE_ERROR_NOT_SUPPORTED:               szGestureError = "GESTURE_ERROR_NOT_SUPPORTED";                 break;          /**< Not supported */
+               case GESTURE_ERROR_OPERATION_FAILED:    szGestureError = "GESTURE_ERROR_OPERATION_FAILED";              break;          /**< Operation failed because of a system error */
+               default:                                                                szGestureError = "Undefined Gesture Error";                             break;
+       }
+       
+       return szGestureError;
+}
+
+ /**
+ * @brief      Gesture types
+ * @since_tizen        2.3
+ */
+char* ContextManagerGetGestureType(gesture_type_e nGestureType)
+{
+       char* szGestureType = NULL;
+       
+       switch ( nGestureType )
+       {
+               case GESTURE_DOUBLE_TAP:                szGestureType = "GESTURE_DOUBLE_TAP";                   break;  /**< The device is tapped twice */
+               case GESTURE_MOVE_TO_EAR:               szGestureType = "GESTURE_MOVE_TO_EAR";                  break;  /**< The device is moved near to an ear */
+               case GESTURE_NO_MOVE:                   szGestureType = "GESTURE_NO_MOVE";                              break;  /**< The device is being stopped for a while */
+               case GESTURE_PICK_UP:                   szGestureType = "GESTURE_PICK_UP";                              break;  /**< The device is picked up */
+               case GESTURE_SHAKE:                             szGestureType = "GESTURE_SHAKE";                                break;  /**< The device is quickly moved back and forth */
+               case GESTURE_SNAP:                              szGestureType = "GESTURE_SNAP";                                 break;  /**< The device is moved along an axis and back */
+               case GESTURE_TILT:                              szGestureType = "GESTURE_TILT";                                 break;  /**< The device is tilted */
+               case GESTURE_TURN_FACE_DOWN:    szGestureType = "GESTURE_TURN_FACE_DOWN";               break;  /**< The device is flipped from face to back */
+               default:                                                szGestureType = "Undefined Gesture Type";               break;
+       }
+       
+       return szGestureType;
+}
+
+/**
+ * @brief      Regarding the type of the gesture, gesture_get_event() returns one of the followings.
+ * @since_tizen        2.3
+ */
+char* ContextManagerGetGestureEvent(gesture_event_e nGestureEvent)
+{
+       char* szGestureEvent = NULL;
+       
+       switch ( nGestureEvent )
+       {
+               case GESTURE_EVENT_NONE:                szGestureEvent = "GESTURE_EVENT_NONE";                  break;  /**< The gesture is not detected */
+               
+               //case GESTURE_EVENT_DETECTED:  szGestureEvent = "GESTURE_EVENT_DETECTED";              break;  /**< The gesture is detected */
+               //case GESTURE_SHAKE_DETECTED:  szGestureEvent = "GESTURE_SHAKE_DETECTED";              break;  /**< Shake gesture is detected */
+               //case GESTURE_SNAP_X_NEGATIVE: szGestureEvent = "GESTURE_SNAP_X_NEGATIVE";             break;  /**< -X snap is detected */
+               case GESTURE_EVENT_DETECTED:    szGestureEvent = "GESTURE_EVENT_DETECTED or GESTURE_SHAKE_DETECTED or GESTURE_SNAP_X_NEGATIVE";
+               
+               //case GESTURE_SHAKE_FINISHED:  szGestureEvent = "GESTURE_SHAKE_FINISHED";              break;  /**< Shake gesture finished */
+               //case GESTURE_SNAP_X_POSITIVE: szGestureEvent = "GESTURE_SNAP_X_POSITIVE";             break;  /**< +X snap is detected */
+               case GESTURE_SHAKE_FINISHED:    szGestureEvent = "GESTURE_SHAKE_FINISHED or GESTURE_SNAP_X_POSITIVE";           break;
+               
+               case GESTURE_SNAP_Y_NEGATIVE:   szGestureEvent = "GESTURE_SNAP_Y_NEGATIVE";             break;  /**< -Y snap is detected */
+               case GESTURE_SNAP_Y_POSITIVE:   szGestureEvent = "GESTURE_SNAP_Y_POSITIVE";             break;  /**< +Y snap is detected */
+               case GESTURE_SNAP_Z_NEGATIVE:   szGestureEvent = "GESTURE_SNAP_Z_NEGATIVE";             break;  /**< -Z snap is detected */
+               case GESTURE_SNAP_Z_POSITIVE:   szGestureEvent = "GESTURE_SNAP_Z_POSITIVE";             break;  /**< +Z snap is detected */
+               default:                                                szGestureEvent = "Undefined Gesture Event";             break;
+       }
+       
+       return szGestureEvent;
+}
+
+/**
+ * @brief      Regarding the type of the gesture, gesture_get_event() returns one of the followings.
+ * @since_tizen        2.3
+ */
+char* ContextManagerGetGestureEvent2(gesture_type_e nGestureType, gesture_event_e nGestureEvent)
+{
+       char* szGestureEvent = NULL;
+       
+       if ( nGestureEvent == GESTURE_EVENT_NONE )
+       {
+               szGestureEvent = "GESTURE_EVENT_NONE";          /**< The gesture is not detected */
+       }
+//     else if ( nGestureEvent == GESTURE_EVENT_DETECTED )
+//     {
+//             szGestureEvent = "GESTURE_EVENT_DETECTED";      /**< The gesture is detected */
+//     }
+       else
+       {
+               switch ( nGestureType )
+               {
+                       case GESTURE_DOUBLE_TAP:                szGestureEvent = "GESTURE_DOUBLE_TAP";          break;
+                       case GESTURE_MOVE_TO_EAR:               szGestureEvent = "GESTURE_MOVE_TO_EAR";         break;
+                       case GESTURE_NO_MOVE:                   szGestureEvent = "GESTURE_NO_MOVE";                     break;
+                       case GESTURE_PICK_UP:                   szGestureEvent = "GESTURE_PICK_UP";                     break;
+                       case GESTURE_SHAKE:
+                               switch ( nGestureEvent )
+                               {
+//                                     case GESTURE_SHAKE_DETECTED:    szGestureEvent = "GESTURE_SHAKE_DETECTED";              break;  /**< Shake gesture is detected */
+                                       case GESTURE_SHAKE_FINISHED:    szGestureEvent = "GESTURE_SHAKE_FINISHED";              break;  /**< Shake gesture finished */
+                                       default:                                                szGestureEvent = "Undefined Shake Event";               break;
+                               }
+                               break;
+                       case GESTURE_SNAP:
+                               switch ( nGestureEvent )
+                               {
+//                                     case GESTURE_SNAP_X_NEGATIVE:   szGestureEvent = "GESTURE_SNAP_X_NEGATIVE";             break;  /**< -X snap is detected */
+//                                     case GESTURE_SNAP_X_POSITIVE:   szGestureEvent = "GESTURE_SNAP_X_POSITIVE";             break;  /**< +X snap is detected */
+                                       case GESTURE_SNAP_Y_NEGATIVE:   szGestureEvent = "GESTURE_SNAP_Y_NEGATIVE";             break;  /**< -Y snap is detected */
+                                       case GESTURE_SNAP_Y_POSITIVE:   szGestureEvent = "GESTURE_SNAP_Y_POSITIVE";             break;  /**< +Y snap is detected */
+                                       case GESTURE_SNAP_Z_NEGATIVE:   szGestureEvent = "GESTURE_SNAP_Z_NEGATIVE";             break;  /**< -Z snap is detected */
+                                       case GESTURE_SNAP_Z_POSITIVE:   szGestureEvent = "GESTURE_SNAP_Z_POSITIVE";             break;  /**< +Z snap is detected */
+                                       default:                                                szGestureEvent = "Undefined Snap Event";                break;
+                               }
+                               break;
+                       case GESTURE_TILT:                              szGestureEvent = "GESTURE_TILT";                        break;
+                       case GESTURE_TURN_FACE_DOWN:    szGestureEvent = "GESTURE_TURN_FACE_DOWN";      break;
+                       default:                                                szGestureEvent = "Undefined Gesture Event";     break;
+               }
+       }
+       
+       return szGestureEvent;
+}
+
+/**
+ * @brief      Gesture recognition option.
+ *                     If the default option is used, the system tries to reduce power consumption.
+ *                     For example, the recognition engine may stop detecting gestures if the display is turned off.
+ *                     Using GESTURE_OPTION_ALWAYS_ON disables such power-saving functionalities.
+ * @since_tizen        2.3
+ */
+char* ContextManagerGetGestureOption(gesture_option_e nGestureOption)
+{
+       char* szGestureOption = NULL;
+       
+       switch ( nGestureOption )
+       {
+               case GESTURE_OPTION_DEFAULT:    szGestureOption = "GESTURE_OPTION_DEFAULT";             break;  /**< Running in the default setting */
+               case GESTURE_OPTION_ALWAYS_ON:  szGestureOption = "GESTURE_OPTION_ALWAYS_ON";   break;  /**< Trying to detect gestures always */
+               default:                                                szGestureOption = "Undefined Gesture Option";   break;
+       }
+       
+       return szGestureOption;
+}
+
+/**
+ * @function           ContextManagerGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stContextManagerStartTime
+ * @parameter          NA
+ * @return                     NA
+ *
+ */
+void ContextManagerGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stContextManagerStartTime, NULL);
+#endif
+}
+
+/**
+ * @function           ContextManagerGetExecutionDelay
+ * @description        Calculates a log for a code-block of statements execution delay
+ * 
+ * @return                     NA
+ *
+ */
+void ContextManagerGetExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+               
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec - g_stContextManagerStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stContextManagerStartTime.tv_usec;
+               
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+#endif
+}
+
+/**
+* @function                    ContextManagerGetMemoryAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void ContextManagerGetMemoryAllocation()
+{
+#if MEMORY_CHECK
+       g_stContextManagerMemInfo = mallinfo();
+#endif
+}
+
+/**
+* @function                    ContextManagerGetMemStatus
+* @description         Calculates the Memory Allocation Leak state 
+* 
+* @return                      NA
+*/
+void ContextManagerGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int     nMemDifference;
+               char *pszLog;
+               
+               stMemInfo = mallinfo();
+               pszLog = calloc(MEMLOG , sizeof(char));
+               
+               if(stMemInfo.uordblks > g_stContextManagerMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stContextManagerMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stContextManagerMemInfo.uordblks - stMemInfo.uordblks);
+               }
+       
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+#endif
+}
+
+/**
+ * @function           ContextManagerTimeout
+ * @description                Called if some callback is not invoked for a particular ContextManagerTimeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */
+gboolean ContextManagerTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(g_pContextManagerMainLoop);
+               g_main_loop_unref(g_pContextManagerMainLoop);
+               g_pContextManagerMainLoop = NULL;
+       }
+       FPRINTF("[Line : %d][Context_Manager_ITC] Callback Time-out \\n", __LINE__);
+       return false;
+}
+
+
+/**
+ * @function           Context_Manager_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Context_Manager_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Null key value passed to function : Context_Manager_Check_System_Info_Feature_Supported\\n",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool(pszKey, &bValue);
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n",__LINE__, Context_Manager_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] system_info_get_platform_bool returned unsupported feature capability for (key = %s)\\n",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] system_info_get_platform_bool returned supported status feature for (key = %s)\\n",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           Context_Manager_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Context_Manager_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            szErrorVal = "SYSTEM_INFO_ERROR_NONE";                          break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER";     break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR";                      break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY";         break;
+               default:                                                                        szErrorVal = "Unknown error";                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/** @} */ //end of itc-capi-context-manager
\ No newline at end of file
diff --git a/src/itc/context-manager/ITs-context-manager-common.h b/src/itc/context-manager/ITs-context-manager-common.h
new file mode 100755 (executable)
index 0000000..57a8352
--- /dev/null
@@ -0,0 +1,180 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_CONTEXT_MANAGER_COMMON_H_
+#define _ITS_CONTEXT_MANAGER_COMMON_H_
+
+//Add test package related includes here
+
+#include "assert.h"
+
+#include <activity_recognition.h>
+#include <gesture_recognition.h>
+#include <system_info.h>
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <malloc.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+/** @addtogroup itc-capi-context-manager
+* @ingroup             itc
+* @{
+*/
+
+//Add test package related definitions here
+
+#define MEMLOG                                                 20
+#define TIMELOG                                                100
+#define TIMEOUT_CB                                     10000
+#define MICROSECONDS_PER_SECOND                1000000
+
+#define ACTIVITY_FEATURE                       "http://tizen.org/feature/sensor.activity_recognition"
+#define GESTURE_FEATURE                                "http://tizen.org/feature/sensor.gesture_recognition"
+
+bool g_bIsActivityFeatureSupported;
+bool g_bIsGestureFeatureSupported;
+
+FILE *g_fpLog;
+
+GMainLoop *g_pContextManagerMainLoop;
+struct timeval g_stContextManagerStartTime;
+struct mallinfo g_stContextManagerMemInfo;
+
+bool g_bCallbackOccured;
+bool g_bCallbackResult;
+
+activity_type_e g_nActivityType;
+gesture_type_e g_nGestureType;
+
+typedef struct speedmemory
+{
+       char *pszMemLog;
+       char *pszAPI1SpeedLog;
+       char *pszAPI2SpeedLog;
+       char *pszAPI3SpeedLog;
+} ContextManagerSpeedMemoryLog;
+
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][Context_Manager_ITC] Starting test : %s\\n", __LINE__,__FUNCTION__);\
+}
+
+#define PRINT_STABILITY_LOG(api, nFailCount, nTotalCount) \
+       FPRINTF("[Line : %d][Context_Manager_ITC] [%s] FAIL-COUNT: %d, NO.OF.ITERATION: %d\\n", __LINE__, #api, nFailCount, nTotalCount);
+
+
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if ( strlen(memLog) > 0 ) \
+       {\
+               memLog[strlen(memLog)-1] = '\0';\
+               FPRINTF("[Line : %d][Context_Manager_ITC] %s_MemoryLeakStatus - %s\\n", __LINE__, #api, memLog);\
+       }
+
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if ( strlen(speedLog) > 0 ) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d][Context_Manager_ITC] %s_TimeInMicrosec- %s\\n", __LINE__, #api, speedLog);\
+       }
+
+#define CONTEXT_MANAGER_INITIALISE_MEM_LOG(nEnumSize) \
+       stSpeedMemoryLog.pszMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+
+#define CONTEXT_MANAGER_INITIALISE_SPEED_LOGS(nEnumSize) {\
+       stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));\
+       stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));\
+       stSpeedMemoryLog.pszAPI3SpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));\
+}
+
+#define CONTEXT_MANAGER_DEINITIALISE_LOGS {\
+       if ( stSpeedMemoryLog.pszMemLog != NULL )\
+       {\
+               free(stSpeedMemoryLog.pszMemLog);\
+               stSpeedMemoryLog.pszMemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI1SpeedLog != NULL )\
+       {\
+               free (stSpeedMemoryLog.pszAPI1SpeedLog);\
+               stSpeedMemoryLog.pszAPI1SpeedLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2SpeedLog != NULL )\
+       {\
+               free (stSpeedMemoryLog.pszAPI2SpeedLog);\
+               stSpeedMemoryLog.pszAPI2SpeedLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI3SpeedLog != NULL )\
+       {\
+               free (stSpeedMemoryLog.pszAPI3SpeedLog);\
+               stSpeedMemoryLog.pszAPI3SpeedLog = NULL;\
+       }\
+}
+
+#define RUN_POLLING_LOOP {\
+       g_pContextManagerMainLoop = g_main_loop_new(NULL, false);\
+       nContextManagerTimeoutId = g_timeout_add(TIMEOUT_CB, ContextManagerTimeout, g_pContextManagerMainLoop);\
+       g_main_loop_run(g_pContextManagerMainLoop);\
+       g_source_remove(nContextManagerTimeoutId);\
+       g_pContextManagerMainLoop = NULL;\
+}
+
+//Add helper function declarations here
+
+char* ContextManagerGetActivityError(activity_error_e nActivityError);
+char* ContextManagerGetActivityType(activity_type_e nActivityType);
+char* ContextManagerGetActivityAccuracy(activity_accuracy_e nAccuracy);
+char* ContextManagerGetGestureError(gesture_error_e nGestureError);
+char* ContextManagerGetGestureType(gesture_type_e nGestureType);
+char* ContextManagerGetGestureEvent(gesture_event_e nGestureEvent);
+char* ContextManagerGetGestureEvent2(gesture_type_e nGestureType, gesture_event_e nGestureEvent);
+char* ContextManagerGetGestureOption(gesture_option_e nGestureOption);
+
+// Get time before api call
+void ContextManagerGetTimeOfDay();
+
+// Get speed after api call
+void ContextManagerGetExecutionDelay(char* pszAPITime);
+
+// Gets the Memory state before API execution
+void ContextManagerGetMemoryAllocation();
+
+// Get the memory leak after api call
+void ContextManagerGetMemStatus(char *pszAPIMemory);
+
+gboolean ContextManagerTimeout(gpointer data);
+
+// Check the supported feature for the given key value
+bool Context_Manager_Check_System_Info_Feature_Supported(char* pszKey);
+
+// Maps error enums to string values
+char* Context_Manager_System_Info_GetError(int nRet);
+
+/** @} */ //end of itc-capi-context-manager
+#endif  //_ITS_CONTEXT_MANAGER_COMMON_H_
diff --git a/src/itc/context-manager/ITs-context-manager_activity.c b/src/itc/context-manager/ITs-context-manager_activity.c
new file mode 100755 (executable)
index 0000000..6091a84
--- /dev/null
@@ -0,0 +1,793 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-context-manager-common.h"
+
+/** @addtogroup itc-capi-context-manager
+* @ingroup             itc
+* @{
+*/
+
+//& set: ContextManager
+
+/**
+ * @function           ITs_context_manager_activity_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_context_manager_activity_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][Context_Manager_ITC] TEST SUIT start-up: ITs_Context_Manager\\n", __LINE__);
+#endif
+
+       g_bIsActivityFeatureSupported = Context_Manager_Check_System_Info_Feature_Supported(ACTIVITY_FEATURE);
+       return;
+}
+
+
+/**
+ * @function           ITs_context_manager_activity_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_context_manager_activity_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][Context_Manager_ITC] TEST SUIT clean-up: ITs_Context_Manager\\n", __LINE__);
+#endif
+       return;
+}
+
+/**
+ * @function                           activity_recognition_callback_check_type
+ * @description                                Called when a activity is recognized
+ * @param[in]  activity        Activity recognized.
+ * @param[in]  data            Detailed information of the recognized activity.
+ * @param[in]  timestamp       The time when the activity is recognized. Epoch time in seconds.
+ * @param[in]  error           An error value. It can be one of the following error values:
+ *                                                     ACTIVITY_ERROR_NONE, if the operation succeeded.
+ *                                             ACTIVITY_ERROR_NOT_SUPPORTED, if the activity is not supported in the current profile.
+ *                                             ACTIVITY_ERROR_OPERATION_FAILED, if the operation failed because of a system error.
+ *                                             ACTIVITY_ERROR_PERMISSION_DENIED, if the application has no permission to use this.
+ * @param[in]  user_data       The user data had passed to activity_start_recognition().
+ */
+void activity_recognition_callback_check_type(activity_type_e activity, const activity_data_h data, double timestamp, activity_error_e error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][Context_Manager_ITC] Reached context activity callback\\n", __LINE__);
+#endif
+
+       g_bCallbackOccured = true;
+
+       if ( g_pContextManagerMainLoop )
+       {
+               g_main_loop_quit(g_pContextManagerMainLoop);
+               g_main_loop_unref(g_pContextManagerMainLoop);
+               g_pContextManagerMainLoop = NULL;
+       }
+       
+       g_nActivityType = activity;
+       g_bCallbackResult = ( error == ACTIVITY_ERROR_NONE );
+}
+
+/**
+ * @function                           activity_recognition_callback_check_accuracy
+ * @description                                Called when a activity is recognized
+ * @param[in]  activity        Activity recognized.
+ * @param[in]  data            Detailed information of the recognized activity.
+ * @param[in]  timestamp       The time when the activity is recognized. Epoch time in seconds.
+ * @param[in]  error           An error value. It can be one of the following error values:
+ *                                                     ACTIVITY_ERROR_NONE, if the operation succeeded.
+ *                                             ACTIVITY_ERROR_NOT_SUPPORTED, if the activity is not supported in the current profile.
+ *                                             ACTIVITY_ERROR_OPERATION_FAILED, if the operation failed because of a system error.
+ *                                             ACTIVITY_ERROR_PERMISSION_DENIED, if the application has no permission to use this.
+ * @param[in]  user_data       The user data had passed to activity_start_recognition().
+ */
+void activity_recognition_callback_check_accuracy(activity_type_e activity, const activity_data_h data, double timestamp, activity_error_e error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][Context_Manager_ITC] Reached context activity callback\\n", __LINE__);
+#endif
+
+       g_bCallbackOccured = true;
+
+       if ( g_pContextManagerMainLoop )
+       {
+               g_main_loop_quit(g_pContextManagerMainLoop);
+               g_main_loop_unref(g_pContextManagerMainLoop);
+               g_pContextManagerMainLoop = NULL;
+       }
+
+       g_nActivityType = activity;
+       if ( error == ACTIVITY_ERROR_NONE )
+       {
+               ContextManagerSpeedMemoryLog stSpeedMemoryLog;
+               memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+               
+               int nLoopCounter = 0;
+               int nGetFailCount = 0;
+               activity_accuracy_e accuracy;
+               int nRet;
+               
+#if SPEED_CHECK
+               CONTEXT_MANAGER_INITIALISE_SPEED_LOGS(1);
+#endif
+
+#if MEMORY_CHECK
+               CONTEXT_MANAGER_INITIALISE_MEM_LOG(1);
+#endif
+
+               for ( nLoopCounter=0; nLoopCounter<MAX_COUNT; nLoopCounter++ )
+               {
+                       ContextManagerGetMemoryAllocation();
+                       ContextManagerGetTimeOfDay();
+                       
+                       //Target API
+                       /**** Get the accuracy of the activity recognized ****/
+                       nRet = activity_get_accuracy(data, &accuracy);
+                       
+                       ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       ContextManagerGetMemStatus(stSpeedMemoryLog.pszMemLog);
+                       
+                       if ( !g_bIsActivityFeatureSupported )
+                       {
+                               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                               {
+                                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_get_accuracy() returned %s error for unsupported feature on iteration %d\\n",
+                                               __LINE__, ContextManagerGetActivityError(nRet), nLoopCounter);
+                                       nGetFailCount++;
+                               }
+                       }
+                       if ( nRet != ACTIVITY_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] activity_get_accuracy failed on iteration %d for activity type = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCounter, ContextManagerGetActivityType(activity), ContextManagerGetActivityError(nRet));
+                               nGetFailCount++;
+                       }
+               }
+
+               int nTotalCount = MAX_COUNT;
+               PRINT_STABILITY_LOG(activity_get_accuracy, nGetFailCount, nTotalCount);
+
+               if ( nGetFailCount > 0 )
+               {
+                       g_bCallbackResult = false;
+               }
+               else
+               {
+                       g_bCallbackResult = true;
+               }
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(activity_get_accuracy, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(activity_get_accuracy, stSpeedMemoryLog.pszMemLog);
+#endif
+
+               CONTEXT_MANAGER_DEINITIALISE_LOGS;
+       }
+       else
+       {
+               g_bCallbackResult = false;
+       }
+}
+
+/** @addtogroup        itc-capi-context-manager-testcases
+* @brief               Integration testcases for module capi-context-manager
+* @ingroup             itc-capi-context-manager
+* @{
+*/
+
+//& type: auto
+//& purpose: check if the activity recognizer is supported in the current device
+/**
+ * @testcase                           ITc_activity_is_supported_p
+ * @since_tizen                                2.3.1
+ * @type                                       auto
+ * @description                                check if the activity recognizer is supported in the current device
+ * @scenario                           check if the activity recognizer is supported in the current device
+ * @apicovered                         activity_is_supported
+ * @passcase                           if activity_is_supported is successful
+ * @failcase                           if activity_is_supported or any supporting API fails
+ * @precondition                       None
+ * @postcondition                      None
+ */
+int ITc_activity_is_supported_p(void)
+{
+       START_TEST;
+       
+       ContextManagerSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+       int nLoopCounter = 0;
+       int nFailCount = 0;
+       int nRet;
+       
+       activity_type_e activity_types[] = { ACTIVITY_STATIONARY, ACTIVITY_WALK, ACTIVITY_RUN, ACTIVITY_IN_VEHICLE };
+       int enum_size = sizeof(activity_types) / sizeof(activity_types[0]);
+       int enum_counter;
+       
+#if SPEED_CHECK
+       CONTEXT_MANAGER_INITIALISE_SPEED_LOGS(enum_size);
+#endif
+
+#if MEMORY_CHECK
+       CONTEXT_MANAGER_INITIALISE_MEM_LOG(enum_size);
+#endif
+
+       for ( nLoopCounter=0; nLoopCounter < MAX_COUNT; nLoopCounter++ )
+       {
+               for ( enum_counter=0; enum_counter<enum_size; enum_counter++ )
+               {
+                       bool bSupported;
+                       
+                       ContextManagerGetMemoryAllocation();
+                       ContextManagerGetTimeOfDay();
+
+                       //Target API
+                       /**** Check if the activity recognizer is supported in the current device ****/
+                       nRet = activity_is_supported(activity_types[enum_counter], &bSupported);
+                       
+                       ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       ContextManagerGetMemStatus(stSpeedMemoryLog.pszMemLog);
+                       
+                       if ( !g_bIsActivityFeatureSupported )
+                       {
+                               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                               {
+                                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_is_supported() returned %s error for unsupported feature on iteration %d for activity type = %s\\n",
+                                               __LINE__, ContextManagerGetActivityError(nRet), nLoopCounter, ContextManagerGetActivityType(activity_types[enum_counter]));
+                                       nFailCount++;
+                               }
+                               continue;
+                       }
+                       if( nRet != ACTIVITY_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] activity_is_supported failed on iteration %d for activity type = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCounter, ContextManagerGetActivityType(activity_types[enum_counter]), ContextManagerGetActivityError(nRet));
+                               nFailCount++;
+                       }
+               }
+       }
+       
+       int nTotalCount = enum_size * MAX_COUNT;
+       PRINT_STABILITY_LOG(activity_is_supported, nFailCount, nTotalCount);
+
+       if ( nFailCount > 0 )
+       {
+               CONTEXT_MANAGER_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(activity_is_supported, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(activity_is_supported, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       CONTEXT_MANAGER_DEINITIALISE_LOGS;
+       return 0;
+}
+
+
+//& type: auto
+//& purpose: initialize and release an activity handle
+/**
+ * @testcase                           ITc_activity_create_release_p
+ * @since_tizen                                2.3.1
+ * @type                                       auto
+ * @description                                initialize and release an activity handle
+ * @scenario                           initialize an activity handle \n
+ *                                                     release the resources occupied by the activity handle
+ * @apicovered                         activity_create, activity_release
+ * @passcase                           if activity_create and activity_release are successful
+ * @failcase                           if activity_create, activity_release or any supporting API fails
+ * @precondition                       None
+ * @postcondition                      None
+ */
+int ITc_activity_create_release_p(void)
+{
+       START_TEST;
+       
+       ContextManagerSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+       int nLoopCounter = 0;
+       int nCreateCount = 0;
+       int nReleaseFailCount = 0;
+       int nRet;
+       
+#if SPEED_CHECK
+       CONTEXT_MANAGER_INITIALISE_SPEED_LOGS(1);
+#endif
+
+#if MEMORY_CHECK
+       CONTEXT_MANAGER_INITIALISE_MEM_LOG(1);
+#endif
+
+       for ( nLoopCounter=0; nLoopCounter < MAX_COUNT; nLoopCounter++ )
+       {
+               activity_h handle;
+               
+               ContextManagerGetMemoryAllocation();
+               ContextManagerGetTimeOfDay();
+               
+               //Target API
+               /**** Initialize an activity handle ****/
+               nRet = activity_create(&handle);
+               
+               ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+
+               if ( !g_bIsActivityFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] activity_create() returned %s error for unsupported feature on iteration %d\\n",
+                                       __LINE__, ContextManagerGetActivityError(nRet), nLoopCounter);
+                               nCreateCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != ACTIVITY_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_create failed on iteration %d, error returned = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetActivityError(nRet));
+                       nCreateCount++;
+                       continue;
+               }
+
+               ContextManagerGetTimeOfDay();
+
+               //Target API
+               /**** Release the activity handle ****/
+               nRet = activity_release(handle);
+               
+               ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               ContextManagerGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               
+               if ( !g_bIsActivityFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] activity_release() returned %s error for unsupported feature on iteration %d\\n",
+                                       __LINE__, ContextManagerGetActivityError(nRet), nLoopCounter);
+                               nReleaseFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != ACTIVITY_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_release failed on iteration %d, error returned = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetActivityError(nRet));
+                       nReleaseFailCount++;
+                       continue;
+               }
+       }
+       
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(activity_create, nCreateCount, nTotalCount);
+       PRINT_STABILITY_LOG(activity_release, nReleaseFailCount, nTotalCount);
+
+       if ( nCreateCount > 0 || nReleaseFailCount > 0 )
+       {
+               CONTEXT_MANAGER_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(activity_create, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(activity_release, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_activity_create_release, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       CONTEXT_MANAGER_DEINITIALISE_LOGS;
+       return 0;
+}
+
+
+//& type: auto
+//& purpose: Start to recognize user activities and then stop receiving activity data
+/**
+ * @testcase                           ITc_activity_start_stop_recognition_p
+ * @since_tizen                                2.3.1
+ * @type                                       auto
+ * @description                                Start to recognize user activities and then stop receiving activity data
+ * @scenario                           initialize an activity handle \n
+ *                                                     Start to recognize user activities \n
+ *                                                     stop receiving activity data \n
+ *                                                     release the resources occupied by the activity handle
+ * @apicovered                         activity_create, activity_start_recognition, activity_stop_recognition, activity_release
+ * @passcase                           if activity_start_recognition and activity_stop_recognition are successful
+ * @failcase                           if activity_start_recognition, activity_stop_recognition or any supporting API fails
+ * @precondition                       None
+ * @postcondition                      None
+ */
+int ITc_activity_start_stop_recognition_p(void)
+{
+       START_TEST;
+       
+       activity_type_e activity_type = ACTIVITY_STATIONARY;
+       
+       //Precondition
+       bool bSupported;
+       int nRet = activity_is_supported(activity_type, &bSupported);
+       if ( !g_bIsActivityFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_is_supported() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetActivityError(nRet));
+                       return 1;
+               }
+               return 0;
+       }
+       if ( nRet != ACTIVITY_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Precondition API activity_is_supported failed for activity type = %s, error returned = %s\\n",
+                       __LINE__, ContextManagerGetActivityType(activity_type), ContextManagerGetActivityError(nRet));
+               return 1;
+       }
+       if ( !bSupported )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] activity type = %s is not supported in the current device. Skipping test\\n",
+                       __LINE__, ContextManagerGetActivityType(activity_type));
+               return 0;
+       }
+       
+       ContextManagerSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+       int nLoopCounter = 0;
+       int nStartFailCount = 0;
+       int nStopFailCount = 0;
+       int nSupportApiFailCount = 0;
+       int nContextManagerTimeoutId = 0;
+       
+#if SPEED_CHECK
+       CONTEXT_MANAGER_INITIALISE_SPEED_LOGS(1);
+#endif
+
+#if MEMORY_CHECK
+       CONTEXT_MANAGER_INITIALISE_MEM_LOG(1);
+#endif
+
+       for ( nLoopCounter=0; nLoopCounter<MAX_COUNT; nLoopCounter++ )
+       {
+               //Create activity handle
+               activity_h handle;
+               nRet = activity_create(&handle);
+               if ( !g_bIsActivityFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] activity_create() returned %s error for unsupported feature on iteration %d\\n",
+                                       __LINE__, ContextManagerGetActivityError(nRet), nLoopCounter);
+                               nSupportApiFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != ACTIVITY_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] Support API activity_create failed on iteration %d, error returned = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetActivityError(nRet));
+                       nSupportApiFailCount++;
+                       continue;
+               }
+
+               g_bCallbackOccured = false;
+               g_bCallbackResult = false;
+
+               ContextManagerGetMemoryAllocation();
+               ContextManagerGetTimeOfDay();
+               
+               //Target API
+               /**** Start to recognize user activities ****/
+               nRet = activity_start_recognition(handle, activity_type, activity_recognition_callback_check_type, NULL);
+               
+               ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+
+               if ( !g_bIsActivityFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] activity_start_recognition() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetActivityError(nRet));
+                               nStartFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != ACTIVITY_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_start_recognition failed on iteration %d for activity type = %s, error returned = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetActivityType(activity_type), ContextManagerGetActivityError(nRet));
+                       nStartFailCount++;
+                       continue;
+               }
+
+               RUN_POLLING_LOOP;
+       
+               if ( !g_bCallbackOccured )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_start_recognition failed to invoke callback on iteration %d for activity type = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetActivityType(activity_type));
+                       nStartFailCount++;
+               }
+               else if ( !g_bCallbackResult )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_start_recognition invoked callback with invalid result on iteration %d for activity type = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetActivityType(activity_type));
+                       nStartFailCount++;
+               }
+               else if ( g_nActivityType != activity_type )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_start_recognition invoked callback with mismatched activity type on iteration %d for activity type = %s, activity type returned is = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetActivityType(activity_type), ContextManagerGetActivityType(g_nActivityType));
+                       nStartFailCount++;
+               }
+               
+               
+               g_bCallbackOccured = false;
+       
+               ContextManagerGetTimeOfDay();
+
+               //Target API
+               /**** Stop receiving activity data ****/
+               nRet = activity_stop_recognition(handle);
+               
+               ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               ContextManagerGetMemStatus(stSpeedMemoryLog.pszMemLog);
+
+               if ( !g_bIsActivityFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] activity_stop_recognition() returned %s error for unsupported feature on iteration %d\\n",
+                                       __LINE__, ContextManagerGetActivityError(nRet), nLoopCounter);
+                               nStopFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != ACTIVITY_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_stop_recognition failed on iteration %d for activity type = %s, error returned = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetActivityType(activity_type), ContextManagerGetActivityError(nRet));
+                       nStopFailCount++;
+                       continue;
+               }
+               
+               RUN_POLLING_LOOP;
+       
+               if ( g_bCallbackOccured )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_stop_recognition failed to stop callback on iteration %d for activity type = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetActivityType(activity_type));
+                       nStopFailCount++;
+               }
+               
+               //Release activity handle
+               nRet = activity_release(handle);
+               if ( !g_bIsActivityFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] activity_release() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetActivityError(nRet));
+                               nSupportApiFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != ACTIVITY_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] Support API activity_release failed, error returned = %s\\n",
+                               __LINE__, ContextManagerGetActivityError(nRet));
+                       nSupportApiFailCount++;
+               }
+       }
+       
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(activity_start_recognition, nStartFailCount, nTotalCount);
+       PRINT_STABILITY_LOG(activity_stop_recognition, nStopFailCount, nTotalCount);
+
+       if ( nStartFailCount > 0 || nStopFailCount > 0 || nSupportApiFailCount > 0 )
+       {
+               CONTEXT_MANAGER_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(activity_start_recognition, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(activity_stop_recognition, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_activity_start_stop_recognition, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       CONTEXT_MANAGER_DEINITIALISE_LOGS;
+       return 0;
+}
+
+
+//& type: auto
+//& purpose: get the accuracy of the activity recognized
+/**
+ * @testcase                           ITc_activity_get_activity_p
+ * @since_tizen                                2.3.1
+ * @type                                       auto
+ * @description                                get the accuracy of the activity recognized
+ * @scenario                           initialize an activity handle \n
+ *                                                     Start to recognize user activities \n
+ *                                                     get the accuracy of the activity recognized \n
+ *                                                     stop receiving activity data \n
+ *                                                     release the resources occupied by the activity handle
+ * @apicovered                         activity_create, activity_start_recognition, activity_get_accuracy, activity_stop_recognition, activity_release
+ * @passcase                           if activity_get_accuracy is successful
+ * @failcase                           if activity_get_accuracy or any supporting API fails
+ * @precondition                       None
+ * @postcondition                      None
+ */
+int ITc_activity_get_accuracy_p(void)
+{
+       START_TEST;
+       
+       activity_type_e activity_type = ACTIVITY_STATIONARY;
+       
+       //Precondition
+       bool bSupported;
+       int nRet = activity_is_supported(activity_type, &bSupported);
+       if ( !g_bIsActivityFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_is_supported() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetActivityError(nRet));
+                       return 1;
+               }
+               return 0;
+       }
+       if ( nRet != ACTIVITY_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Precondition API activity_is_supported failed for activity type = %s, error returned = %s\\n",
+                       __LINE__, ContextManagerGetActivityType(activity_type), ContextManagerGetActivityError(nRet));
+               return 1;
+       }
+       if ( !bSupported )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] activity type = %s is not supported in the current device. Skipping test\\n",
+                       __LINE__, ContextManagerGetActivityType(activity_type));
+               return 0;
+       }
+       
+       //Create activity handle
+       activity_h handle;
+       nRet = activity_create(&handle);
+       if ( !g_bIsActivityFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_create() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetActivityError(nRet));
+                       return 1;
+               }
+               return 0;
+       }
+       if ( nRet != ACTIVITY_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Support API activity_create failed, error returned = %s\\n",
+                       __LINE__, ContextManagerGetActivityError(nRet));
+               return 1;
+       }
+       
+       int nSupportApiFailCount = 0;
+       int nContextManagerTimeoutId = 0;
+       
+       g_bCallbackOccured = false;
+       g_bCallbackResult = false;
+       
+       //Start to recognize user activities
+       nRet = activity_start_recognition(handle, activity_type, activity_recognition_callback_check_accuracy, NULL);
+       if ( !g_bIsActivityFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_start_recognition() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetActivityError(nRet));
+                       return 1;
+               }
+               return 0;
+       }
+       if ( nRet != ACTIVITY_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Support API activity_start_recognition failed for activity type = %s, error returned = %s\\n",
+                       __LINE__, ContextManagerGetActivityType(activity_type), ContextManagerGetActivityError(nRet));
+               return 1;
+       }
+       
+       RUN_POLLING_LOOP;
+
+       if ( !g_bCallbackOccured )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Support API activity_start_recognition failed to invoke callback for activity type = %s\\n",
+                       __LINE__, ContextManagerGetActivityType(activity_type));
+               nSupportApiFailCount++;
+       }
+       else if ( !g_bCallbackResult )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Support API activity_start_recognition invoked callback with invalid result for activity type = %s\\n",
+                       __LINE__, ContextManagerGetActivityType(activity_type));
+               nSupportApiFailCount++;
+       }
+       else if ( g_nActivityType != activity_type )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] activity_start_recognition invoked callback with mismatched activity type for activity type = %s, activity type returned is = %s\\n",
+                       __LINE__, ContextManagerGetActivityType(activity_type), ContextManagerGetActivityType(g_nActivityType));
+               nSupportApiFailCount++;
+       }
+
+       //Stop receiving activity data
+       nRet = activity_stop_recognition(handle);
+       if ( !g_bIsActivityFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_stop_recognition() returned %s error for unsupported feature\\n",
+                               __LINE__, ContextManagerGetActivityError(nRet));
+                       nSupportApiFailCount++;
+               }
+       }
+       if ( nRet != ACTIVITY_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Support API activity_stop_recognition failed for activity type = %s, error returned = %s\\n",
+                       __LINE__, ContextManagerGetActivityType(activity_type), ContextManagerGetActivityError(nRet));
+               nSupportApiFailCount++;
+       }
+       
+       //Release activity handle
+       nRet = activity_release(handle);
+       if ( !g_bIsActivityFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] activity_release() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetActivityError(nRet));
+                       nSupportApiFailCount++;
+               }
+       }
+       if ( nRet != ACTIVITY_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Support API activity_release failed, error returned = %s\\n",
+                       __LINE__, ContextManagerGetActivityError(nRet));
+               nSupportApiFailCount++;
+       }
+
+       if ( nSupportApiFailCount > 0 )
+       {
+               return 1;
+       }
+
+       return 0;
+}
+
+/** @} */ //end of itc-capi-context-manager
+/** @} */ //end of itc-capi-context-manager-testcases
\ No newline at end of file
diff --git a/src/itc/context-manager/ITs-context-manager_gesture.c b/src/itc/context-manager/ITs-context-manager_gesture.c
new file mode 100755 (executable)
index 0000000..4599f77
--- /dev/null
@@ -0,0 +1,803 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-context-manager-common.h"
+
+/** @addtogroup itc-capi-context-manager
+* @ingroup             itc
+* @{
+*/
+
+//& set: ContextManager
+
+/**
+ * @function           ITs_context_manager_gesture_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_context_manager_gesture_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][Context_Manager_ITC] TEST SUIT start-up: ITs_Context_Manager\\n", __LINE__);
+#endif
+
+       g_bIsGestureFeatureSupported = Context_Manager_Check_System_Info_Feature_Supported(GESTURE_FEATURE);
+       return;
+}
+
+
+/**
+ * @function           ITs_context_manager_gesture_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_context_manager_gesture_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][Context_Manager_ITC] TEST SUIT clean-up: ITs_Context_Manager\\n", __LINE__);
+#endif
+       return;
+}
+
+
+/**
+ * @function                           gesture_recognition_callback_check_type
+ * @description                                Called when a gesture is detected.
+ * @param[in]  gesture         Gesture type detected.
+ * @param[in]  data            Detailed information of the detected gesture.
+ *                                                     gesture_get_event() or gesture_get_tilt() can be used to extract the information from data.
+ * @param[in]  timestamp       The time when the gesture is detected. Epoch time in seconds.
+ * @param[in]  error           An error value. It can be one of the following error values:
+ *                                                     GESTURE_ERROR_NONE, if the operation succeeded.
+ *                                                     GESTURE_ERROR_NOT_SUPPORTED, if the gesture is not supported in the current profile.
+ *                                                     GESTURE_ERROR_OPERATION_FAILED, if the operation failed because of a system error.
+ *                                                     GESTURE_ERROR_PERMISSION_DENIED, if the application has no permission to use this.
+ * @param[in]  user_data       The user data had passed to gesture_start_recognition().
+ * @pre                        gesture_start_recognition()
+ */
+ void gesture_recognition_callback_check_type(gesture_type_e gesture, const gesture_data_h data, double timestamp, gesture_error_e error, void *user_data)
+ {
+#if DEBUG
+       FPRINTF("[Line : %d][Context_Manager_ITC] Reached context gesture callback\\n", __LINE__);
+#endif
+
+       g_bCallbackOccured = true;
+
+       if ( g_pContextManagerMainLoop )
+       {
+               g_main_loop_quit(g_pContextManagerMainLoop);
+               g_main_loop_unref(g_pContextManagerMainLoop);
+               g_pContextManagerMainLoop = NULL;
+       }
+       
+       g_nGestureType = gesture;
+       g_bCallbackResult = ( error == GESTURE_ERROR_NONE );
+}
+
+
+/**
+ * @function                           gesture_recognition_callback_check_event
+ * @description                                Called when a gesture is detected.
+ * @param[in]  gesture         Gesture type detected.
+ * @param[in]  data            Detailed information of the detected gesture.
+ *                                                     gesture_get_event() or gesture_get_tilt() can be used to extract the information from data.
+ * @param[in]  timestamp       The time when the gesture is detected. Epoch time in seconds.
+ * @param[in]  error           An error value. It can be one of the following error values:
+ *                                                     GESTURE_ERROR_NONE, if the operation succeeded.
+ *                                                     GESTURE_ERROR_NOT_SUPPORTED, if the gesture is not supported in the current profile.
+ *                                                     GESTURE_ERROR_OPERATION_FAILED, if the operation failed because of a system error.
+ *                                                     GESTURE_ERROR_PERMISSION_DENIED, if the application has no permission to use this.
+ * @param[in]  user_data       The user data had passed to gesture_start_recognition().
+ * @pre                        gesture_start_recognition()
+ */
+ void gesture_recognition_callback_check_event(gesture_type_e gesture, const gesture_data_h data, double timestamp, gesture_error_e error, void *user_data)
+ {
+#if DEBUG
+       FPRINTF("[Line : %d][Context_Manager_ITC] Reached context gesture callback\\n", __LINE__);
+#endif
+
+       g_bCallbackOccured = true;
+
+       if ( g_pContextManagerMainLoop )
+       {
+               g_main_loop_quit(g_pContextManagerMainLoop);
+               g_main_loop_unref(g_pContextManagerMainLoop);
+               g_pContextManagerMainLoop = NULL;
+       }
+
+       g_nGestureType = gesture;
+       if ( error == GESTURE_ERROR_NONE )
+       {
+               ContextManagerSpeedMemoryLog stSpeedMemoryLog;
+               memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+               
+               int nLoopCounter = 0;
+               int nGetFailCount = 0;
+               gesture_event_e event;
+               int nRet;
+               
+#if SPEED_CHECK
+               CONTEXT_MANAGER_INITIALISE_SPEED_LOGS(1);
+#endif
+
+#if MEMORY_CHECK
+               CONTEXT_MANAGER_INITIALISE_MEM_LOG(1);
+#endif
+
+               for ( nLoopCounter=0; nLoopCounter<MAX_COUNT; nLoopCounter++ )
+               {
+                       ContextManagerGetMemoryAllocation();
+                       ContextManagerGetTimeOfDay();
+                       
+                       //Target API
+                       /**** Get the gesture event from gesture data received ****/
+                       nRet = gesture_get_event(data, &event);
+                       
+                       ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       ContextManagerGetMemStatus(stSpeedMemoryLog.pszMemLog);
+                       
+                       if ( !g_bIsGestureFeatureSupported )
+                       {
+                               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                               {
+                                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_get_event() returned %s error for unsupported feature on iteration %d\\n",
+                                               __LINE__, ContextManagerGetGestureError(nRet), nLoopCounter);
+                                       nGetFailCount++;
+                               }
+                       }
+                       if ( nRet != GESTURE_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] gesture_get_event failed on iteration %d for gesture type = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCounter, ContextManagerGetGestureType(gesture), ContextManagerGetGestureError(nRet));
+                               nGetFailCount++;
+                       }
+               }
+               
+               int nTotalCount = MAX_COUNT;
+               PRINT_STABILITY_LOG(gesture_get_event, nGetFailCount, nTotalCount);
+
+               if ( nGetFailCount > 0 )
+               {
+                       g_bCallbackResult = false;
+               }
+               else
+               {
+                       g_bCallbackResult = true;
+               }
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(gesture_get_event, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(gesture_get_event, stSpeedMemoryLog.pszMemLog);
+#endif
+               
+               CONTEXT_MANAGER_DEINITIALISE_LOGS;
+       }
+       else
+       {
+               g_bCallbackResult = false;
+       }
+}
+
+/** @addtogroup        itc-capi-context-manager-testcases
+* @brief               Integration testcases for module capi-context-manager
+* @ingroup             itc-capi-context-manager
+* @{
+*/
+
+//& type: auto
+//& purpose: check if the given gesture type is supported in the current profile
+/**
+ * @testcase                           ITc_gesture_is_supported_p
+ * @since_tizen                                2.3.1 
+ * @type                                       auto
+ * @description                                check if the given gesture type is supported in the current profile
+ * @scenario                           check whether the gesture is supported or not
+ * @apicovered                         gesture_is_supported
+ * @passcase                           if gesture_is_supported is successful
+ * @failcase                           if gesture_is_supported or any supporting API fails
+ * @precondition                       None
+ * @postcondition                      None
+ */
+int ITc_gesture_is_supported_p(void)
+{
+       START_TEST;
+       
+       ContextManagerSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+       int nLoopCounter = 0;
+       int nFailCount = 0;
+       int nRet;
+       
+       gesture_type_e gesture_types[] = { GESTURE_DOUBLE_TAP,
+               GESTURE_MOVE_TO_EAR, GESTURE_NO_MOVE, GESTURE_PICK_UP,
+               GESTURE_SHAKE, GESTURE_SNAP, GESTURE_TILT, GESTURE_TURN_FACE_DOWN };
+       int enum_size = sizeof(gesture_types) / sizeof(gesture_types[0]);
+       int enum_counter;
+       
+#if SPEED_CHECK
+       CONTEXT_MANAGER_INITIALISE_SPEED_LOGS(enum_size);
+#endif
+
+#if MEMORY_CHECK
+       CONTEXT_MANAGER_INITIALISE_MEM_LOG(enum_size);
+#endif
+
+       for ( nLoopCounter=0; nLoopCounter < MAX_COUNT; nLoopCounter++ )
+       {
+               for ( enum_counter=0; enum_counter < enum_size; enum_counter++ )
+               {
+                       bool bSupported;
+                       
+                       ContextManagerGetMemoryAllocation();
+                       ContextManagerGetTimeOfDay();
+
+                       //Target API
+                       /**** Check whether the gesture is supported or not ****/
+                       nRet = gesture_is_supported(gesture_types[enum_counter], &bSupported);
+                       
+                       ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       ContextManagerGetMemStatus(stSpeedMemoryLog.pszMemLog);
+                       
+                       if ( !g_bIsGestureFeatureSupported )
+                       {
+                               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                               {
+                                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_is_supported() returned %s error for unsupported feature on iteration %d for gesture type = %s\\n",
+                                               __LINE__, ContextManagerGetGestureError(nRet), nLoopCounter, ContextManagerGetGestureType(gesture_types[enum_counter]));
+                                       nFailCount++;
+                               }
+                               continue;
+                       }
+                       if ( nRet != GESTURE_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] gesture_is_supported failed on iteration %d for gesture type = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCounter, ContextManagerGetGestureType(gesture_types[enum_counter]), ContextManagerGetGestureError(nRet));
+                               nFailCount++;
+                       }
+               }
+       }
+       
+       int nTotalCount = enum_size * MAX_COUNT;
+       PRINT_STABILITY_LOG(gesture_is_supported, nFailCount, nTotalCount);
+
+       if ( nFailCount > 0 )
+       {
+               CONTEXT_MANAGER_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(gesture_is_supported, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(gesture_is_supported, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       CONTEXT_MANAGER_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& type: auto
+//& purpose: initialize and release a gesture handle
+/**
+ * @testcase                           ITc_gesture_create_release_p
+ * @since_tizen                                2.3.1
+ * @type                                       auto
+ * @description                                initialize and release a gesture handle
+ * @scenario                           initialize a gesture handle \n
+ *                                                     release the resources occupied by the gesture handle
+ * @apicovered                         gesture_create, gesture_release
+ * @passcase                           if gesture_create and gesture_release are successful
+ * @failcase                           if gesture_create, gesture_release or any supporting API fails
+ * @precondition                       None
+ * @postcondition                      None
+ */
+int ITc_gesture_create_release_p(void)
+{
+       START_TEST;
+       
+       ContextManagerSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+       int nLoopCounter = 0;
+       int nCreateCount = 0;
+       int nReleaseFailCount = 0;
+       int nRet;
+       
+#if SPEED_CHECK
+       CONTEXT_MANAGER_INITIALISE_SPEED_LOGS(1);
+#endif
+
+#if MEMORY_CHECK
+       CONTEXT_MANAGER_INITIALISE_MEM_LOG(1);
+#endif
+
+       for ( nLoopCounter=0; nLoopCounter < MAX_COUNT; nLoopCounter++ )
+       {
+               gesture_h handle;
+               
+               ContextManagerGetMemoryAllocation();
+               ContextManagerGetTimeOfDay();
+               
+               //Target API
+               /**** Initialize a gesture handle ****/
+               nRet = gesture_create(&handle);
+               
+               ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+
+               if ( !g_bIsGestureFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] gesture_create() returned %s error for unsupported feature on iteration %d\\n",
+                                       __LINE__, ContextManagerGetGestureError(nRet), nLoopCounter);
+                               nCreateCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != GESTURE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_create failed on iteration %d, error returned = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetGestureError(nRet));
+                       nCreateCount++;
+                       continue;
+               }
+
+               ContextManagerGetTimeOfDay();
+
+               //Target API
+               /**** Release the gesture handle ****/
+               nRet = gesture_release(handle);
+               
+               ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               ContextManagerGetMemStatus(stSpeedMemoryLog.pszMemLog);
+
+               if ( !g_bIsGestureFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] gesture_release() returned %s error for unsupported feature on iteration %d\\n",
+                                       __LINE__, ContextManagerGetGestureError(nRet), nLoopCounter);
+                               nReleaseFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != GESTURE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_release failed on iteration %d, error returned = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetGestureError(nRet));
+                       nReleaseFailCount++;
+                       continue;
+               }
+       }
+       
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(gesture_create, nCreateCount, nTotalCount);
+       PRINT_STABILITY_LOG(gesture_release, nReleaseFailCount, nTotalCount);
+
+       if ( nCreateCount > 0 || nReleaseFailCount > 0 )
+       {
+               CONTEXT_MANAGER_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(gesture_create, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(gesture_release, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_gesture_create_release, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       CONTEXT_MANAGER_DEINITIALISE_LOGS;
+       return 0;
+}
+
+
+//& type: auto
+//& purpose: start to detect a gesture and then stop detecting the gesture registered to the gesture handle
+/**
+ * @testcase                           ITc_gesture_start_stop_recognition_p
+ * @since_tizen                                2.3.1
+ * @type                                       auto
+ * @description                                Start to detect a gesture and then stop detecting the gesture registered to the gesture handle
+ * @scenario                           initialize a gesture handle \n
+ *                                                     start to detect a gesture \n
+ *                                                     stop detecting the gesture registered to the gesture handle \n
+ *                                                     release the resources occupied by the gesture handle
+ * @apicovered                         gesture_create, gesture_start_recognition, gesture_stop_recognition, gesture_release
+ * @passcase                           if gesture_start_recognition and gesture_stop_recognition are successful
+ * @failcase                           if gesture_start_recognition, gesture_stop_recognition or any supporting API fails
+ * @precondition                       None
+ * @postcondition                      None
+ */
+int ITc_gesture_start_stop_recognition_p(void)
+{
+       START_TEST;
+       
+       gesture_type_e gesture_type = GESTURE_NO_MOVE;
+       gesture_option_e gesture_option = GESTURE_OPTION_ALWAYS_ON;
+       
+       //Precondition
+       bool bSupported;
+       int nRet = gesture_is_supported(gesture_type, &bSupported);
+       if ( !g_bIsGestureFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_is_supported() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetGestureError(nRet));
+                       return 1;
+               }
+               return 0;
+       }
+       if ( nRet != GESTURE_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Precondition API gesture_is_supported failed for gesture type = %s, error returned = %s\\n",
+                       __LINE__, ContextManagerGetGestureType(gesture_type), ContextManagerGetGestureError(nRet));
+               return 1;
+       }
+       if ( !bSupported )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] gesture type = %s is not supported in the current device. Skipping test\\n",
+                       __LINE__, ContextManagerGetGestureType(gesture_type));
+               return 0;
+       }
+       
+       ContextManagerSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+       int nLoopCounter = 0;
+       int nStartFailCount = 0;
+       int nStopFailCount = 0;
+       int nSupportApiFailCount = 0;
+       int nContextManagerTimeoutId = 0;
+       
+#if SPEED_CHECK
+       CONTEXT_MANAGER_INITIALISE_SPEED_LOGS(1);
+#endif
+
+#if MEMORY_CHECK
+       CONTEXT_MANAGER_INITIALISE_MEM_LOG(1);
+#endif
+
+       for ( nLoopCounter=0; nLoopCounter<MAX_COUNT; nLoopCounter++ )
+       {
+               //Create gesture handle
+               gesture_h handle;
+               nRet = gesture_create(&handle);
+               if ( !g_bIsGestureFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] gesture_create() returned %s error for unsupported feature on iteration %d\\n",
+                                       __LINE__, ContextManagerGetGestureError(nRet), nLoopCounter);
+                               nSupportApiFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != GESTURE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] Precondition API gesture_create failed on iteration %d, error returned = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetGestureError(nRet));
+                       nSupportApiFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackOccured = false;
+               g_bCallbackResult = false;
+
+               ContextManagerGetMemoryAllocation();
+               ContextManagerGetTimeOfDay();
+               
+               //Target API
+               /**** Start to detect a gesture ****/
+               nRet = gesture_start_recognition(handle, gesture_type, gesture_option, gesture_recognition_callback_check_type, NULL);
+               
+               ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+
+               if ( !g_bIsGestureFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] gesture_start_recognition() returned %s error for unsupported feature", __LINE__, ContextManagerGetGestureError(nRet));
+                               nStartFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != GESTURE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_start_recognition failed on iteration %d for gesture type = %s and gesture option = %s, error returned = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetGestureType(gesture_type),
+                               ContextManagerGetGestureOption(gesture_option), ContextManagerGetGestureError(nRet));
+                       nStartFailCount++;
+                       continue;
+               }
+               
+               RUN_POLLING_LOOP;
+       
+               if ( !g_bCallbackOccured )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_start_recognition failed to invoke callback on iteration %d for gesture type = %s and gesture option = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetGestureType(gesture_type), ContextManagerGetGestureOption(gesture_option));
+                       nStartFailCount++;
+               }
+               else if ( !g_bCallbackResult )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_start_recognition invoked callback with invalid result on iteration %d for gesture type = %s and gesture option = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetGestureType(gesture_type), ContextManagerGetGestureOption(gesture_option));
+                       nStartFailCount++;
+               }
+               else if ( g_nGestureType != gesture_type )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_start_recognition invoked callback with mismatched gesture type on iteration %d for gesture type = %s and gesture option = %s, gesture type returned is = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetGestureType(gesture_type), ContextManagerGetGestureOption(gesture_option), ContextManagerGetGestureType(g_nGestureType));
+                       nStartFailCount++;
+               }
+               
+               
+               g_bCallbackOccured = false;
+       
+               ContextManagerGetTimeOfDay();
+
+               //Target API
+               /**** Stop detecting the gesture registered to the gesture handle ****/
+               nRet = gesture_stop_recognition(handle);
+               
+               ContextManagerGetExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               ContextManagerGetMemStatus(stSpeedMemoryLog.pszMemLog);
+
+               if ( !g_bIsGestureFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] gesture_stop_recognition() returned %s error for unsupported feature", __LINE__, ContextManagerGetGestureError(nRet));
+                               nStopFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != GESTURE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_stop_recognition failed on iteration %d for gesture type = %s and gesture option = %s, error returned = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetGestureType(gesture_type),
+                               ContextManagerGetGestureOption(gesture_option), ContextManagerGetGestureError(nRet));
+                       nStopFailCount++;
+                       continue;
+               }
+
+               RUN_POLLING_LOOP;
+               
+               if ( g_bCallbackOccured )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_stop_recognition failed to stop callback on iteration %d for gesture type = %s and gesture option = %s\\n",
+                               __LINE__, nLoopCounter, ContextManagerGetGestureType(gesture_type), ContextManagerGetGestureOption(gesture_option));
+                       nStopFailCount++;
+               }
+               
+               //Release gesture handle
+               nRet = gesture_release(handle);
+               if ( !g_bIsGestureFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][Context_Manager_ITC] gesture_release() returned %s error for unsupported feature on iteration %d\\n",
+                                       __LINE__, ContextManagerGetGestureError(nRet), nLoopCounter);
+                               nSupportApiFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != GESTURE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] Support API gesture_release failed, error returned = %s\\n",
+                               __LINE__, ContextManagerGetGestureError(nRet));
+                       nSupportApiFailCount++;
+               }
+       }
+       
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(gesture_start_recognition, nStartFailCount, nTotalCount);
+       PRINT_STABILITY_LOG(gesture_stop_recognition, nStopFailCount, nTotalCount);
+
+       if ( nStartFailCount > 0 || nStopFailCount > 0 )
+       {
+               CONTEXT_MANAGER_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(gesture_start_recognition, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(gesture_stop_recognition, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_gesture_start_stop_recognition, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       CONTEXT_MANAGER_DEINITIALISE_LOGS;
+       return 0;
+}
+
+
+//& type: auto
+//& purpose: get the gesture event from gesture data received
+/**
+ * @testcase                           ITc_gesture_get_event_p
+ * @since_tizen                                2.3.1
+ * @type                                       auto
+ * @description                                Get the gesture event from gesture data received
+ * @scenario                           initialize a gesture handle \n
+ *                                                     start to detect a gesture \n
+ *                                                     get the gesture event from gesture data received \n
+ *                                                     stop detecting the gesture registered to the gesture handle \n
+ *                                                     release the resources occupied by the gesture handle
+ * @apicovered                         gesture_create, gesture_start_recognition, gesture_get_event, gesture_stop_recognition, gesture_release
+ * @passcase                           if gesture_get_event is successful
+ * @failcase                           if gesture_get_event or any supporting API fails
+ * @precondition                       None
+ * @postcondition                      None
+ */
+int ITc_gesture_get_event_p(void)
+{
+       START_TEST;
+       
+       gesture_type_e gesture_type = GESTURE_NO_MOVE;
+       gesture_option_e gesture_option = GESTURE_OPTION_ALWAYS_ON;
+       
+       //Precondition
+       bool bSupported;
+       int nRet = gesture_is_supported(gesture_type, &bSupported);
+       if ( !g_bIsGestureFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_is_supported() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetGestureError(nRet));
+                       return 1;
+               }
+               return 0;
+       }
+       if ( nRet != GESTURE_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Precondition API gesture_is_supported failed for gesture type = %s, error returned = %s\\n",
+                       __LINE__, ContextManagerGetGestureType(gesture_type), ContextManagerGetGestureError(nRet));
+               return 1;
+       }
+       if ( !bSupported )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] gesture type = %s is not supported in the current device. Skipping test\\n",
+                       __LINE__, ContextManagerGetGestureType(gesture_type));
+               return 0;
+       }
+
+       //Create gesture handle
+       gesture_h handle;
+       nRet = gesture_create(&handle);
+       if ( !g_bIsGestureFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_create() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetGestureError(nRet));
+                       return 1;
+               }
+               return 0;
+       }
+       if ( nRet != GESTURE_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Precondition API gesture_create failed, error returned = %s\\n", __LINE__, ContextManagerGetGestureError(nRet));
+               return 1;
+       }
+       
+       int nSupportApiFailCount = 0;
+       int nContextManagerTimeoutId = 0;
+       
+       g_bCallbackOccured = false;
+       g_bCallbackResult = false;
+
+       //Start to detect a gesture
+       nRet = gesture_start_recognition(handle, gesture_type, gesture_option, gesture_recognition_callback_check_event, NULL);
+       if ( !g_bIsGestureFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_start_recognition() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetGestureError(nRet));
+                       return 1;
+               }
+               return 0;
+       }
+       if ( nRet != GESTURE_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Support API gesture_start_recognition failed for gesture type = %s and gesture option = %s, error returned = %s\\n",
+                       __LINE__, ContextManagerGetGestureType(gesture_type), ContextManagerGetGestureOption(gesture_option), ContextManagerGetGestureError(nRet));
+               return 1;
+       }
+       
+       RUN_POLLING_LOOP;
+
+       if ( !g_bCallbackOccured )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Support API gesture_start_recognition failed to invoke callback for gesture type = %s and gesture option = %s\\n",
+                       __LINE__, ContextManagerGetGestureType(gesture_type), ContextManagerGetGestureOption(gesture_option));
+               nSupportApiFailCount++;
+       }
+       else if ( !g_bCallbackResult )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Support API gesture_start_recognition invoked callback with invalid result for gesture type = %s and gesture option = %s\\n",
+                       __LINE__, ContextManagerGetGestureType(gesture_type), ContextManagerGetGestureOption(gesture_option));
+               nSupportApiFailCount++;
+       }
+       else if ( g_nGestureType != gesture_type )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] gesture_start_recognition invoked callback with mismatched gesture type for gesture type = %s and gesture option = %s, gesture type returned is = %s\\n",
+                       __LINE__, ContextManagerGetGestureType(gesture_type), ContextManagerGetGestureOption(gesture_option), ContextManagerGetGestureType(g_nGestureType));
+               nSupportApiFailCount++;
+       }
+       
+       //Stop detecting the gesture registered to the gesture handle
+       nRet = gesture_stop_recognition(handle);
+       if ( !g_bIsGestureFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_stop_recognition() returned %s error for unsupported feature\\n",
+                               __LINE__, ContextManagerGetGestureError(nRet));
+                       nSupportApiFailCount++;
+               }
+       }
+       if ( nRet != GESTURE_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Support API gesture_stop_recognition failed for gesture type = %s and gesture option = %s, error returned = %s\\n",
+                       __LINE__, ContextManagerGetGestureType(gesture_type), ContextManagerGetGestureOption(gesture_option), ContextManagerGetGestureError(nRet));
+               nSupportApiFailCount++;
+       }
+       
+       //Release gesture handle
+       nRet = gesture_release(handle);
+       if ( !g_bIsGestureFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][Context_Manager_ITC] gesture_release() returned %s error for unsupported feature\\n", __LINE__, ContextManagerGetGestureError(nRet));
+                       nSupportApiFailCount++;
+               }
+       }
+       if ( nRet != GESTURE_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][Context_Manager_ITC] Support API gesture_release failed, error returned = %s\\n",
+                       __LINE__, ContextManagerGetGestureError(nRet));
+               nSupportApiFailCount++;
+       }
+       
+       if ( nSupportApiFailCount > 0 )
+       {
+               return 1;
+       }
+
+       return 0;
+}
+
+/** @} */ //end of itc-capi-context-manager
+/** @} */ //end of itc-capi-context-manager-testcases
\ No newline at end of file
diff --git a/src/itc/context-manager/tct-context-manager-native.c b/src/itc/context-manager/tct-context-manager-native.c
new file mode 100755 (executable)
index 0000000..e87eb51
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-context-manager-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/context-manager/tct-context-manager-native.h b/src/itc/context-manager/tct-context-manager-native.h
new file mode 100755 (executable)
index 0000000..3fb313c
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CONTEXT_MANAGER_NATIVE_H__
+#define __TCT_CONTEXT_MANAGER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_context_manager_activity_startup(void);
+extern void ITs_context_manager_activity_cleanup(void);
+extern void ITs_context_manager_gesture_startup(void);
+extern void ITs_context_manager_gesture_cleanup(void);
+
+extern int ITc_activity_is_supported_p(void);
+extern int ITc_activity_create_release_p(void);
+extern int ITc_activity_start_stop_recognition_p(void);
+extern int ITc_activity_get_accuracy_p(void);
+extern int ITc_gesture_is_supported_p(void);
+extern int ITc_gesture_create_release_p(void);
+extern int ITc_gesture_start_stop_recognition_p(void);
+extern int ITc_gesture_get_event_p(void);
+
+testcase tc_array[] = {
+    {"ITc_activity_is_supported_p", ITc_activity_is_supported_p, ITs_context_manager_activity_startup, ITs_context_manager_activity_cleanup},
+    {"ITc_activity_create_release_p", ITc_activity_create_release_p, ITs_context_manager_activity_startup, ITs_context_manager_activity_cleanup},
+    {"ITc_activity_start_stop_recognition_p", ITc_activity_start_stop_recognition_p, ITs_context_manager_activity_startup, ITs_context_manager_activity_cleanup},
+    {"ITc_activity_get_accuracy_p", ITc_activity_get_accuracy_p, ITs_context_manager_activity_startup, ITs_context_manager_activity_cleanup},
+    {"ITc_gesture_is_supported_p", ITc_gesture_is_supported_p, ITs_context_manager_gesture_startup, ITs_context_manager_gesture_cleanup},
+    {"ITc_gesture_create_release_p", ITc_gesture_create_release_p, ITs_context_manager_gesture_startup, ITs_context_manager_gesture_cleanup},
+    {"ITc_gesture_start_stop_recognition_p", ITc_gesture_start_stop_recognition_p, ITs_context_manager_gesture_startup, ITs_context_manager_gesture_cleanup},
+    {"ITc_gesture_get_event_p", ITc_gesture_get_event_p, ITs_context_manager_gesture_startup, ITs_context_manager_gesture_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CONTEXT_MANAGER_NATIVE_H__
diff --git a/src/itc/data-control/CMakeLists.txt b/src/itc/data-control/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..1135555
--- /dev/null
@@ -0,0 +1,39 @@
+SET(PKG_NAME "data-control")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-data-control")
+SET(TC_SOURCES
+       ITs-data-control-common.c
+       ITs-data-control-sql.c
+       ITs-data-control-map.c
+       ITs-data-control-provider.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       data-control
+       dlog
+       glib-2.0
+       capi-base-common
+       aul
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/data-control/ITs-data-control-common.c b/src/itc/data-control/ITs-data-control-common.c
new file mode 100755 (executable)
index 0000000..3484bf5
--- /dev/null
@@ -0,0 +1,322 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-data-control-common.h"
+
+/** @addtogroup itc-data-control
+*  @ingroup itc
+*  @{
+*/
+//Add helper function definitions here
+
+/**
+* @function            DataControlGetError
+* @description         Maps error enumerators to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* DataControlGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case DATA_CONTROL_ERROR_OUT_OF_MEMORY:                  szErrorVal = "DATA_CONTROL_ERROR_OUT_OF_MEMORY";                        break;
+       case DATA_CONTROL_ERROR_IO_ERROR:                               szErrorVal = "DATA_CONTROL_ERROR_IO_ERROR";                                     break;
+       case DATA_CONTROL_ERROR_INVALID_PARAMETER:              szErrorVal = "DATA_CONTROL_ERROR_INVALID_PARAMETER";            break;
+       case DATA_CONTROL_ERROR_PERMISSION_DENIED:              szErrorVal = "DATA_CONTROL_ERROR_PERMISSION_DENIED";            break;
+       case DATA_CONTROL_ERROR_MAX_EXCEEDED:                   szErrorVal = "DATA_CONTROL_ERROR_MAX_EXCEEDED";                         break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                           break;
+       }
+       return szErrorVal;
+}
+
+
+/**
+* @function                    DataControlGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter           pszAPIMemory: String pointer containing the difference of total number of bytes for Current and Previous Memory Allocation.
+* @return                      NA
+*/
+void DataControlGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char * pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stDataControlMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stDataControlMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stDataControlMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               snprintf(pszLog, MEMLOG, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    DataControlGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @parameter           NA
+* @return                      NA
+*/
+inline void DataControlGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stDataControlMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           DataControlExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter          pszAPITime: String pointer containing the time difference
+ * @return                     NA
+ *
+ */
+void DataControlExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime=calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stDataControlStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stDataControlStartTime.tv_usec;
+                       
+               snprintf(pszLogTime, MEMLOG, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+
+#endif
+}
+
+/**
+ * @function           DataControlGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stDataControlStartTime
+ * @parameter          NA
+ * @return                     NA
+ *
+ */ 
+void DataControlGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stDataControlStartTime, NULL);
+#endif
+}
+
+/**
+* @function            DataControlTimeout
+* @description         Called if some callback is not invoked for a particular timeout
+* @parameter           gpointer data
+* @return                      gboolean
+*/
+gboolean DataControlTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+       }
+       FPRINTF("[Line : %d] [DataControl_ITC] Callback Timeout\\n", __LINE__);
+       return false;
+}
+
+/**
+* @function            DataControlInitiateSqlHandle
+* @description         Initiate sql handle
+* @parameter           [stSqlProvider] Handle Pointer
+* @return                      NA
+*/
+bool DataControlInitiateSqlHandle(data_control_h *stSqlProvider)
+{
+       int nRetVal = data_control_sql_create(stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_create");
+       if(nRetVal != DATA_CONTROL_ERROR_NONE)
+       {
+               return false;
+       }
+       else
+       {
+               nRetVal = data_control_sql_set_provider_id(*stSqlProvider, SQLPROVIDERID);
+               PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_set_provider_id");
+               if(nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       data_control_sql_destroy(*stSqlProvider);
+                       return false;
+               }
+               nRetVal = data_control_sql_set_data_id(*stSqlProvider, SQLDATAID);
+               PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_set_data_id");
+               if(nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       data_control_sql_destroy(*stSqlProvider);
+                       return false;
+               }
+       }
+       return true;
+}
+
+/**
+* @function            DataControlInitiateMapHandle
+* @description         Initiate map handle
+* @parameter           [stMapProvider] Handle Pointer
+* @return                      NA
+*/ 
+bool DataControlInitiateMapHandle(data_control_h *stMapProvider)
+{
+       int nRetVal = data_control_map_create(stMapProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_map_create");
+       if(nRetVal != DATA_CONTROL_ERROR_NONE)
+       {
+               return false;
+       }
+       else
+       {
+               nRetVal = data_control_map_set_provider_id(*stMapProvider, MAPPROVIDERID);
+               PRINT_RESULT_NORETURN(nRetVal, "data_control_map_set_provider_id");
+               if(nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       data_control_map_destroy(*stMapProvider);
+                       return false;
+               }
+               nRetVal = data_control_map_set_data_id(*stMapProvider, MAPDATAID);
+               PRINT_RESULT_NORETURN(nRetVal, "data_control_map_set_data_id");
+               if(nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       data_control_map_destroy(*stMapProvider);
+                       return false;
+               }
+       }
+       return true;
+}
+
+/**
+* @function            DataControlInsertSelectSqlData
+* @description         Insert SQL Entry
+* @parameter           NA
+* @return                      Pass Fail Status
+*/
+bool DataControlInsertSelectSqlData(void)
+{
+       int nRetVal = 0;
+       int nTimeoutId = 0;
+       int nRequestId = 0;
+       
+       char* pszValue[5] = {0};
+       pszValue[0] = "WORD";
+       pszValue[1] = "WORD_DESC";
+       pszValue[2] = "WORD_LEN";
+       pszValue[3] = "WORD_DESC_LEN";
+       pszValue[4] = "WORD_STATUS";
+       
+       char word_len[16] = {0};
+       char word_desc_len[16] = {0};
+       snprintf(word_len, 16, "%d", strlen("'1234'"));
+       snprintf(word_desc_len, 16, "%d", strlen("'word_0 initially'") - 2);
+       memset(g_szWhere,0,QUERYSIZE);
+       sprintf(g_szWhere, "rowid<3");
+       
+       g_pstData = bundle_create();
+       if(g_pstData == NULL)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] bundle_create failed\\n", __LINE__);
+               return false;
+       }
+       bundle_add_str(g_pstData, "WORD", "X'1234'");
+       bundle_add_str(g_pstData, "WORD_DESC", "'word_0 initially'");
+       bundle_add_str(g_pstData, "WORD_LEN", word_len);
+       bundle_add_str(g_pstData, "WORD_DESC_LEN", word_desc_len);
+       bundle_add_str(g_pstData, "WORD_STATUS", "0.2");
+       
+       g_bCallbackHit = false;
+       nRetVal = data_control_sql_insert(g_stSqlProvider, g_pstData, &nRequestId);
+       bundle_free(g_pstData);
+       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_insert failed, error returned = %s \\n", __LINE__, DataControlGetError(nRetVal));
+               return false;
+       }
+       RUN_POLLING_LOOP;
+       if(g_bCallbackHit == false)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Failed to insert into DB, callback issue\\n", __LINE__);
+               return false;
+       }
+       
+       g_bCallbackHit = false;
+       nRetVal = data_control_sql_select(g_stSqlProvider, pszValue, 5, g_szWhere, "WORD ASC", &nRequestId);
+       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_select failed, error returned = %s \\n", __LINE__, DataControlGetError(nRetVal));
+               return false;
+       }
+       else
+       {
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to complete select operation, callback issue\\n", __LINE__);
+                       return false;
+               }
+       }
+       return true;
+}
+
+/**
+* @function            DataControlRemoveSqlData
+* @description         Delete SQL Entry
+* @parameter           NA
+* @return                      Pass Fail Status
+*/
+void DataControlRemoveSqlData(void)
+{
+       int nRetVal = 0;
+       int nTimeoutId = 0;
+       int nRequestId = 0;
+
+       g_bCallbackHit = false;
+       nRetVal = data_control_sql_delete(g_stSqlProvider, g_szWhere, &nRequestId);
+       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_delete failed, error returned = %s \\n", __LINE__, DataControlGetError(nRetVal));
+       }
+       RUN_POLLING_LOOP;
+       if(g_bCallbackHit == false)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Failed to delete from DB, callback issue\\n", __LINE__);
+       }
+}
+/** @} */
diff --git a/src/itc/data-control/ITs-data-control-common.h b/src/itc/data-control/ITs-data-control-common.h
new file mode 100755 (executable)
index 0000000..83091fa
--- /dev/null
@@ -0,0 +1,254 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_DATA_CONTROL_COMMON_H_
+#define _ITS_DATA_CONTROL_COMMON_H_
+
+#include "assert.h"
+//Add test package related includes here
+#include <tizen.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <fcntl.h>
+#include <data_control.h>
+#include <data_control_sql.h>
+#include <data_control_map.h>
+#include <data_control_provider.h>
+#include <glib.h>
+
+/** @addtogroup itc-data-control
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function declarations here
+#define TIMELOG                                        30
+#define MEMLOG                                 30
+#define MICROSECONDS_PER_SECOND        1000000
+#define MINCOUNT                               1
+#define TESTSTRINGSIZE                 120*sizeof(char)
+#define TESTVALUE                              50
+#define TESTSTRING                             "TestString"
+#define INTERNETWAITTIME               30
+#define TIMEOUT_CB                             10000
+#define SQLPROVIDERID                  "http://tizen.org/datacontrol/provider/datacontrolprovider"
+#define SQLDATAID                              "SqlRepository"
+#define MAPPROVIDERID                  "http://tizen.org/datacontrol/provider/datacontrolprovider"
+#define MAPDATAID                              "MapRepository"
+#define DUMMYKEY                               "WORD"
+#define DUMMYVALUE                             "'TestValue'"
+#define DUMMYVALUENEW                  "'TestValueNew'"
+#define ERRORSTRING                            "Error Sent"
+#define QUERYSIZE                              40
+#define BLOBCOLOUMN                            0
+#define STRINGCOLOUMN                  1
+#define INTEGERCOLOUMN                 3
+#define DOUBLECOLOUMN                  4
+
+struct timeval g_stDataControlStartTime;
+struct mallinfo g_stDataControlMemInfo;
+bool g_bDataControlCreation;
+bool g_bCallbackHit;
+GMainLoop *g_pDataControlMainLoop;
+data_control_h g_stSqlProvider;
+data_control_h g_stMapProvider;
+int g_nRequestId;
+long long g_nRowId;
+void *g_pDbHandle;
+char **g_pResultList;
+int g_nResultCount;
+bundle *g_pstData;
+char g_szWhere[QUERYSIZE];
+FILE *g_fpLog;
+data_control_sql_response_cb g_stSqlCallBack;
+
+typedef struct SpeedMemory
+{
+       char *pszAPI1MemLog;
+       char *pszAPI2MemLog;
+       char *pszAPI1SpeedLog;
+       char *pszAPI2SpeedLog;
+}SpeedMemoryLog;
+
+#define FPRINTF(...) {\
+               g_fpLog = fopen(ERR_LOG,"a");\
+               fprintf(g_fpLog, __VA_ARGS__);\
+               fclose(g_fpLog);\
+               }
+
+#define DATACONTROL_INITIALIZE_LOGS_SINGLE {\
+       if(MEMORY_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if(SPEED_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+}
+
+#define DATACONTROL_INITIALIZE_LOGS_DOUBLEMEM {\
+       if(MEMORY_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if(SPEED_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+}
+
+#define DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED {\
+       if(MEMORY_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if(SPEED_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+}
+
+#define DATACONTROL_DEINITIALIZE_LOGS {\
+       if ( stSpeedMemoryLog.pszAPI1MemLog != NULL)\
+       {\
+               free(stSpeedMemoryLog.pszAPI1MemLog);\
+               stSpeedMemoryLog.pszAPI1MemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2MemLog != NULL)\
+       {\
+               free(stSpeedMemoryLog.pszAPI2MemLog);\
+               stSpeedMemoryLog.pszAPI2MemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI1SpeedLog != NULL)\
+       {\
+               free (stSpeedMemoryLog.pszAPI1SpeedLog);\
+               stSpeedMemoryLog.pszAPI1SpeedLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2SpeedLog != NULL)\
+       {\
+               free (stSpeedMemoryLog.pszAPI2SpeedLog);\
+               stSpeedMemoryLog.pszAPI2SpeedLog = NULL;\
+       }\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d] [DataControl_ITC] Starting test : %s\\n", __LINE__, __FUNCTION__);\
+       if ( !g_bDataControlCreation )\
+       {\
+               FPRINTF("[Line : %d] [DataControl_ITC] Precondition of data_control failed so leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == DATA_CONTROL_ERROR_NONE)\
+       {\
+               if(DEBUG)\
+               {\
+                       FPRINTF("[Line : %d] [DataControl_ITC] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d] [DataControl_ITC] %s failed, error returned = %s \\n", __LINE__, API, DataControlGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_COMMON_RESULT(nRetVal, API) {\
+       if (nRetVal == DATA_CONTROL_ERROR_NONE)\
+       {\
+               if(DEBUG)\
+               {\
+                       FPRINTF("[Line : %d] [DataControl_ITC] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d] [DataControl_ITC] %s failed, error returned = %s \\n", __LINE__, API, DataControlGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_NORETURN(nRetVal, API) {\
+       if (nRetVal == DATA_CONTROL_ERROR_NONE)\
+       {\
+               if(DEBUG)\
+               {\
+                       FPRINTF("[Line : %d] [DataControl_ITC] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d] [DataControl_ITC] %s failed, error returned = %s \\n", __LINE__, API, DataControlGetError(nRetVal));\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if(MEMORY_CHECK)\
+       {\
+               if(strlen(memLog) > 0) \
+               {  \
+                       memLog[(strlen(memLog))-1] = '\0';\
+                       FPRINTF("[Line : %d] [DataControl_ITC] %s_MemoryLeakStatus - %s\\n", __LINE__, #api, memLog);\
+               }\
+       }\
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(SPEED_CHECK)\
+       {\
+               if(strlen(speedLog) > 0) \
+               {\
+                       speedLog[strlen(speedLog)-1] = '\0';\
+                       FPRINTF("[Line : %d] [DataControl_ITC] %s_TimeInMicrosec- %s\\n", __LINE__, #api, speedLog);\
+               }\
+       }\
+       
+#define RUN_POLLING_LOOP {\
+       if(g_bCallbackHit == false)\
+       {\
+               g_pDataControlMainLoop = g_main_loop_new(NULL, false);\
+               nTimeoutId = g_timeout_add(TIMEOUT_CB, DataControlTimeout, g_pDataControlMainLoop);\
+               g_main_loop_run(g_pDataControlMainLoop);\
+               g_source_remove(nTimeoutId);\
+               g_pDataControlMainLoop = NULL;\
+       }\
+}
+
+char* DataControlGetError(int nRet);
+void DataControlGetMemAllocation();
+void DataControlExecutionDelay(char* pszAPITime);
+void DataControlGetTimeOfDay();
+void DataControlGetMemStatus(char *pszAPIMemory);
+gboolean DataControlTimeout(gpointer data);
+bool DataControlInitiateSqlHandle(data_control_h *stSqlProvider);
+bool DataControlInitiateMapHandle(data_control_h *stMapProvider);
+bool DataControlInsertSelectSqlData(void);
+void DataControlRemoveSqlData(void);
+/** @} */
+#endif  //_ITS_DATA_CONTROL_COMMON_H_
diff --git a/src/itc/data-control/ITs-data-control-map.c b/src/itc/data-control/ITs-data-control-map.c
new file mode 100755 (executable)
index 0000000..8ff9d92
--- /dev/null
@@ -0,0 +1,912 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-data-control-common.h"
+
+/** @addtogroup itc-data-control
+*  @ingroup itc
+*  @{
+*/
+
+//& set: DataControl
+/*******************************************************************************CallBack Functions********************************************************/
+
+/**
+* @function            DataControlMapAddResponseCb
+* @description         Called when record is inserted
+* @parameter           int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data
+* @return                      NA
+*/
+static void DataControlMapAddResponseCb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlMapAddResponseCb callback called\\n", __LINE__);
+#endif
+
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Insert operation successful\\n", __LINE__);
+               g_bCallbackHit = true;
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Insert operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+       }
+
+       if ( g_pDataControlMainLoop )
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            DataControlMapRemoveResponseCb
+* @description         Called when record is removed
+* @parameter           int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data
+* @return                      NA
+*/
+static void DataControlMapRemoveResponseCb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlMapRemoveResponseCb callback called\\n", __LINE__);
+#endif
+
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Delete operation successful\\n", __LINE__);
+               g_bCallbackHit = true;
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Delete operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            DataControlMapSetResponseCb
+* @description         Called when record is changed
+* @parameter           int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data
+* @return                      NA
+*/
+static void DataControlMapSetResponseCb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlMapSetResponseCb callback called\\n", __LINE__);
+#endif
+
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Set operation successful\\n", __LINE__);
+               g_bCallbackHit = true;
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Set operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+       }
+
+       if ( g_pDataControlMainLoop )
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            DataControlMapGetResponseCb
+* @description         Called when record is retrieved
+* @parameter           int request_id, data_control_h provider, char ** result_value_list, int result_value_count, bool provider_result, const char *error, void *user_data
+* @return                      NA
+*/
+static void DataControlMapGetResponseCb(int request_id, data_control_h provider, char ** result_value_list, int result_value_count, bool provider_result, const char *error, void *user_data)
+{
+       int nCount = 0;
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlMapGetResponseCb callback called\\n", __LINE__);
+#endif
+
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Get operation successful\\n", __LINE__);
+               while((result_value_count > 0) && (nCount < result_value_count) && (g_bCallbackHit == false))
+               {
+                       if(strncmp(result_value_list[nCount], DUMMYVALUENEW, strlen(result_value_list[nCount])+ 1) == 0)
+                       {
+                               g_bCallbackHit = true;
+                       }
+                       nCount++;
+               }
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Set operation failed, no value found which was previously set : %s\\n", __LINE__, DUMMYVALUENEW);
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Get operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            DataControlMapGetWithPageResponseCb
+* @description         Called when record is retrieved
+* @parameter           int request_id, data_control_h provider, char ** result_value_list, int result_value_count, bool provider_result, const char *error, void *user_data
+* @return                      NA
+*/
+static void DataControlMapGetWithPageResponseCb(int request_id, data_control_h provider, char ** result_value_list, int result_value_count, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlMapGetWithPageResponseCb callback called\\n", __LINE__);
+#endif
+
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Get operation successful\\n", __LINE__);
+               g_bCallbackHit = true;
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Get operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/***************************************************************************End CallBack Functions********************************************************/
+
+/**
+* @function            ITs_data_control_map_startup
+* @description         Called before each test, set the service boolean true
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_data_control_map_startup(void)
+{
+       struct stat buf;
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bDataControlCreation = false;
+       if ( DataControlInitiateMapHandle(&g_stMapProvider) == true )
+       {
+               g_bDataControlCreation = true;
+       }
+}
+
+/**
+* @function            ITs_data_control_map_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_data_control_map_cleanup(void)
+{
+       if(g_bDataControlCreation == true)
+       {
+               data_control_map_destroy(g_stMapProvider);
+       }
+}
+
+/** @addtogroup itc-data-control-map-testcases
+*  @brief              Integration testcases for module data-control-map
+*  @ingroup    itc-data-control-map
+*  @{
+*/
+
+/**
+ * @testcase                           ITc_data_control_map_data_control_map_destroy_create_p
+ * @type                                       auto
+ * @description                                Test data_control_map_destroy and data_control_map_create
+ * @scenario                           Call data_control_map_destroy\n
+ *                                                     Call data_control_map_create
+ * @apicovered                         data_control_map_destroy, data_control_map_create
+ * @passcase                           When data_control_map_destroy and data_control_map_create are successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_map_destroy and data_control_map_create
+//& type: auto
+int ITc_data_control_map_data_control_map_destroy_create_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_destroy(g_stMapProvider);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_destroy failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_create(&g_stMapProvider);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_create failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+       
+       if (nSetFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_destroy failed %d times, data_control_map_create failed %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_map_destroy, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_map_create, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_map_destroy_create, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_map_data_control_map_set_get_data_id_p
+ * @type                                       auto
+ * @description                                Test data_control_map_set_data_id and data_control_map_get_data_id
+ * @scenario                           Call data_control_map_set_data_id\n
+ *                                                     Call data_control_map_get_data_id
+ * @apicovered                         data_control_map_set_data_id, data_control_map_get_data_id
+ * @passcase                           When data_control_map_set_data_id and data_control_map_get_data_id are successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_map_set_data_id and data_control_map_get_data_id
+//& type: auto
+int ITc_data_control_map_data_control_map_set_get_data_id_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       char *pszDataId = NULL;
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_set_data_id(g_stMapProvider, MAPDATAID);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_set_data_id failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_get_data_id(g_stMapProvider, &pszDataId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_get_data_id failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if(strstr(pszDataId, MAPDATAID) == NULL)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_get_data_id failed on iteration %d, as Data Id not found \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+       
+       if (nSetFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_set_data_id failed %d times, data_control_map_get_data_id failed %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_map_set_data_id, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_map_get_data_id, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_map_set_get_data_id, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_map_data_control_map_set_get_provider_id_p
+ * @type                                       auto
+ * @description                                Test data_control_map_set_provider_id and data_control_map_get_provider_id
+ * @scenario                           Call data_control_map_set_provider_id\n
+ *                                                     Call data_control_map_get_provider_id
+ * @apicovered                         data_control_map_set_provider_id, data_control_map_get_provider_id
+ * @passcase                           When data_control_map_set_provider_id and data_control_map_get_provider_id are successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_map_set_provider_id and data_control_map_get_provider_id
+//& type: auto
+int ITc_data_control_map_data_control_map_set_get_provider_id_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       char *pszDataId = NULL;
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_set_provider_id(g_stMapProvider, MAPPROVIDERID);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_set_provider_id failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_get_provider_id(g_stMapProvider, &pszDataId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_get_provider_id failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if(strstr(pszDataId, MAPPROVIDERID) == NULL)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_get_provider_id failed on iteration %d, as Data Id not found \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+       
+       if (nSetFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_set_provider_id failed %d times, data_control_map_get_provider_id failed %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_map_set_provider_id, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_map_get_provider_id, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_map_set_get_provider_id, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_map_data_control_map_register_unregister_response_cb_p
+ * @type                                       auto
+ * @description                                Test data_control_map_register_response_cb and data_control_map_unregister_response_cb
+ * @scenario                           Call data_control_map_register_response_cb\n
+ *                                                     Call data_control_map_unregister_response_cb
+ * @apicovered                         data_control_map_register_response_cb, data_control_map_unregister_response_cb
+ * @passcase                           When data_control_map_register_response_cb and data_control_map_unregister_response_cb are successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_map_register_response_cb and data_control_map_unregister_response_cb
+//& type: auto
+int ITc_data_control_map_data_control_map_register_unregister_response_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nRegisterFailCount = 0;
+       int nPreConditionFailCount = 0;
+       int nUnRegisterFailCount = 0;
+       int nCallbackFailCount = 0;
+       int nRequestId = 0;
+       int nTimeoutId = 0;
+       const char *pszKey = DUMMYKEY; 
+       const char *pszValue = DUMMYVALUE;
+       data_control_map_response_cb stMapCallBack = {0};
+       stMapCallBack.add_cb = DataControlMapAddResponseCb;
+       stMapCallBack.remove_cb = DataControlMapRemoveResponseCb;
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_register_response_cb(g_stMapProvider, &stMapCallBack, TESTSTRING);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_register_response_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nRegisterFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               nRetVal = data_control_map_add(g_stMapProvider, pszKey, pszValue, &nRequestId);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_add failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nPreConditionFailCount++;
+               }
+               else
+               {
+                       RUN_POLLING_LOOP;
+                       if(g_bCallbackHit == false)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] Failed to insert into DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                               nCallbackFailCount++;
+                       }
+                       else
+                       {
+                               g_bCallbackHit = false;
+                               nRetVal = data_control_map_remove(g_stMapProvider, pszKey, pszValue, &nRequestId);
+                               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                               {
+                                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_remove failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                                       nPreConditionFailCount++;
+                               }
+                               else
+                               {
+                                       RUN_POLLING_LOOP;
+                                       if(g_bCallbackHit == false)
+                                       {
+                                               FPRINTF("[Line : %d] [DataControl_ITC] Failed to remove form DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                                               nCallbackFailCount++;
+                                       }
+                               }
+                       }
+               }
+               
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_unregister_response_cb (g_stMapProvider);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_unregister_response_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nUnRegisterFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+       
+       if (nPreConditionFailCount > 0 || nCallbackFailCount > 0 || nRegisterFailCount > 0 || nUnRegisterFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_register_response_cb failed %d times, data_control_map_unregister_response_cb failed %d times, callback not hit %d times out of %d times\\n", __LINE__, nRegisterFailCount, nUnRegisterFailCount, nCallbackFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_map_register_response_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_map_unregister_response_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(map_register_unregister_response_cb, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_map_data_control_map_add_remove_p
+ * @type                                       auto
+ * @description                                Insert and delete a DB entry
+ * @scenario                           Insert Entry\n
+ *                                                     Delete Entry
+ * @apicovered                         data_control_map_add, data_control_map_remove
+ * @passcase                           When data_control_map_add and data_control_map_remove are successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_map_add and data_control_map_remove
+//& type: auto
+int ITc_data_control_map_data_control_map_add_remove_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nInsertFailCount = 0;
+       int nDeleteFailCount = 0;
+       int nRequestId = 0;
+       int nTimeoutId = 0;
+       const char *pszKey = DUMMYKEY; 
+       const char *pszValue = DUMMYVALUE;
+       
+       data_control_map_response_cb stMapCallBack = {0};
+       stMapCallBack.add_cb = DataControlMapAddResponseCb;
+       stMapCallBack.remove_cb = DataControlMapRemoveResponseCb;
+       nRetVal = data_control_map_register_response_cb(g_stMapProvider, &stMapCallBack, TESTSTRING);
+       PRINT_RESULT(nRetVal, "data_control_map_register_response_cb");
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_add(g_stMapProvider, pszKey, pszValue, &nRequestId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_add failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nInsertFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to insert into DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nInsertFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_remove(g_stMapProvider, pszKey, pszValue, &nRequestId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_remove failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nDeleteFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to remove form DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nDeleteFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+
+       nRetVal = data_control_map_unregister_response_cb (g_stMapProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_map_unregister_response_cb");
+       
+       if (nInsertFailCount > 0 || nDeleteFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_add failed %d times, data_control_map_remove failed %d times out of %d times\\n", __LINE__, nInsertFailCount, nDeleteFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_map_add, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_map_remove, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_map_add_remove, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_map_data_control_map_set_get_p
+ * @type                                       auto
+ * @description                                Set and get a DB entry
+ * @scenario                           Set Entry\n
+ *                                                     Get Entry
+ * @apicovered                         data_control_map_set, data_control_map_get 
+ * @passcase                           When data_control_map_set and data_control_map_get are successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_map_set and data_control_map_get 
+//& type: auto
+int ITc_data_control_map_data_control_map_set_get_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nInsertFailCount = 0;
+       int nDeleteFailCount = 0;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nRequestId = 0;
+       int nTimeoutId = 0;
+       const char *pszKey = DUMMYKEY; 
+       const char *pszValue = DUMMYVALUE;
+       const char *pszNewValue = DUMMYVALUENEW;
+       
+       data_control_map_response_cb stMapCallBack = {0};
+       stMapCallBack.add_cb = DataControlMapAddResponseCb;
+       stMapCallBack.remove_cb = DataControlMapRemoveResponseCb;
+       stMapCallBack.set_cb = DataControlMapSetResponseCb;
+       stMapCallBack.get_cb = DataControlMapGetResponseCb;
+       nRetVal = data_control_map_register_response_cb(g_stMapProvider, &stMapCallBack, TESTSTRING);
+       PRINT_RESULT(nRetVal, "data_control_map_register_response_cb");
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLEMEM;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               nRetVal = data_control_map_add(g_stMapProvider, pszKey, pszValue, &nRequestId);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_add failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nInsertFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to insert into DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nInsertFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_set(g_stMapProvider, pszKey, pszValue, pszNewValue, &nRequestId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_set failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nSetFailCount++;
+               }
+               else
+               {
+                       RUN_POLLING_LOOP;
+                       if(g_bCallbackHit == false)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] Failed to set data, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                               nSetFailCount++;
+                       }
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_get(g_stMapProvider, pszKey, &nRequestId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI2MemLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_get failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else
+               {
+                       RUN_POLLING_LOOP;
+                       if(g_bCallbackHit == false)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] Failed to get data, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                               nGetFailCount++;
+                       }
+               }
+               
+               g_bCallbackHit = false;
+               nRetVal = data_control_map_remove(g_stMapProvider, pszKey, pszValue, &nRequestId);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_remove failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nDeleteFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to remove form DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nDeleteFailCount++;
+                       continue;
+               }
+       }
+
+       nRetVal = data_control_map_unregister_response_cb (g_stMapProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_map_unregister_response_cb");
+       
+       if (nInsertFailCount > 0 || nDeleteFailCount > 0 || nSetFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_set failed %d times, data_control_map_get failed %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_map_set, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_map_get, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_map_set, stSpeedMemoryLog.pszAPI1MemLog);
+               PRINT_MEMORY_LOG(data_control_map_get, stSpeedMemoryLog.pszAPI2MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_map_data_control_map_get_with_page_p
+ * @type                                       auto
+ * @description                                Get a DB entry
+ * @scenario                           Get Entry
+ * @apicovered                         data_control_map_get_with_page
+ * @passcase                           When data_control_map_get_with_page is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_map_get_with_page
+//& type: auto
+int ITc_data_control_map_data_control_map_get_with_page_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nInsertFailCount = 0;
+       int nDeleteFailCount = 0;
+       int nGetFailCount = 0;
+       int nRequestId = 0;
+       int nTimeoutId = 0;
+       const char *pszKey = DUMMYKEY; 
+       const char *pszValue = DUMMYVALUE;
+       
+       data_control_map_response_cb stMapCallBack = {0};
+       stMapCallBack.add_cb = DataControlMapAddResponseCb;
+       stMapCallBack.remove_cb = DataControlMapRemoveResponseCb;
+       stMapCallBack.get_cb = DataControlMapGetWithPageResponseCb;
+       nRetVal = data_control_map_register_response_cb(g_stMapProvider, &stMapCallBack, TESTSTRING);
+       PRINT_RESULT(nRetVal, "data_control_map_register_response_cb");
+       
+       DATACONTROL_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               nRetVal = data_control_map_add(g_stMapProvider, pszKey, pszValue, &nRequestId);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_add failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nInsertFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to insert into DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nInsertFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_map_get_with_page(g_stMapProvider, pszKey, &nRequestId, 1, 1);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_get_with_page failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else
+               {
+                       RUN_POLLING_LOOP;
+                       if(g_bCallbackHit == false)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] Failed to get data, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                               nGetFailCount++;
+                       }
+               }
+               
+               g_bCallbackHit = false;
+               nRetVal = data_control_map_remove(g_stMapProvider, pszKey, pszValue, &nRequestId);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_remove failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nDeleteFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to remove form DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nDeleteFailCount++;
+                       continue;
+               }
+       }
+
+       nRetVal = data_control_map_unregister_response_cb(g_stMapProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_map_unregister_response_cb");
+       
+       if (nInsertFailCount > 0 || nDeleteFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_map_get_with_page failed %d times out of %d times\\n", __LINE__, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_map_get_with_page, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_map_get_with_page, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/data-control/ITs-data-control-provider.c b/src/itc/data-control/ITs-data-control-provider.c
new file mode 100755 (executable)
index 0000000..0e86951
--- /dev/null
@@ -0,0 +1,648 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-data-control-common.h"
+
+/** @addtogroup itc-data-control
+*  @ingroup itc
+*  @{
+*/
+
+//& set: DataControl
+/*******************************************************************************CallBack Functions********************************************************/
+
+/**
+* @function            DataControlProviderSqlInsertCb
+* @description         Called when record is inserted
+* @parameter           int request_id, data_control_h provider, bundle *insert_data, void *user_data
+* @return                      NA
+*/
+static void DataControlProviderSqlInsertCb(int request_id, data_control_h provider, bundle *insert_data, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlProviderSqlInsertCb callback called\\n", __LINE__);
+#endif
+
+       g_nRequestId = request_id;
+       g_bCallbackHit = true;
+
+       if ( g_pDataControlMainLoop )
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            DataControlProviderSqlRemoveCb
+* @description         Called when record is removed
+* @parameter           int request_id, data_control_h provider, const char *where, void *user_data
+* @return                      NA
+*/
+static void DataControlProviderSqlRemoveCb(int request_id, data_control_h provider, const char *where, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlProviderSqlRemoveCb callback called\\n", __LINE__);
+#endif
+
+       g_nRequestId = request_id;
+       g_bCallbackHit = true;
+
+       if ( g_pDataControlMainLoop )
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            DataControlProviderMapInsertCb
+* @description         Called when record is inserted
+* @parameter           int request_id, data_control_h provider, const char *key, const char *value, void *user_data
+* @return                      NA
+*/
+static void DataControlProviderMapInsertCb(int request_id, data_control_h provider, const char *key, const char *value, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlProviderMapInsertCb callback called\\n", __LINE__);
+#endif
+
+       g_nRequestId = request_id;
+       g_bCallbackHit = true;
+
+       if ( g_pDataControlMainLoop )
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            DataControlProviderMapRemoveCb
+* @description         Called when record is removed
+* @parameter           int request_id, data_control_h provider, const char *key, const char *value, void *user_data
+* @return                      NA
+*/
+static void DataControlProviderMapRemoveCb(int request_id, data_control_h provider, const char *key, const char *value, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlProviderMapRemoveCb callback called\\n", __LINE__);
+#endif
+
+       g_nRequestId = request_id;
+       g_bCallbackHit = true;
+
+       if ( g_pDataControlMainLoop )
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/***************************************************************************End CallBack Functions********************************************************/
+
+/**
+* @function            ITs_data_control_provider_startup
+* @description         Called before each test, set the service boolean true
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_data_control_provider_startup(void)
+{
+       struct stat buf;
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bDataControlCreation = false;
+       if ( DataControlInitiateSqlHandle(&g_stSqlProvider) == true )
+       {
+               if ( DataControlInitiateMapHandle(&g_stMapProvider) == true )
+               {
+                       g_bDataControlCreation = true;
+               }
+       }
+}
+
+/**
+* @function            ITs_data_control_provider_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_data_control_provider_cleanup(void)
+{
+       if ( g_bDataControlCreation == true )
+       {
+               data_control_sql_destroy(g_stSqlProvider);
+               data_control_map_destroy(g_stMapProvider);
+       }
+}
+
+/** @addtogroup itc-data-control-provider-testcases
+*  @brief              Integration testcases for module data-control-provider
+*  @ingroup    itc-data-control-provider
+*  @{
+*/
+
+/**
+ * @testcase                           ITc_data_control_provider_data_control_provider_create_delete_statement_p
+ * @type                                       auto
+ * @description                                Test data_control_provider_create_delete_statement
+ * @scenario                           Call data_control_provider_create_delete_statement
+ * @apicovered                         data_control_provider_create_delete_statement
+ * @passcase                           When data_control_provider_create_delete_statement is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_provider_create_delete_statement
+//& type: auto
+int ITc_data_control_provider_data_control_provider_create_delete_statement_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nGetFailCount = 0;
+       memset(g_szWhere,0,QUERYSIZE);
+       sprintf(g_szWhere, "rowid=1");
+       char *pszQuery = NULL;
+       
+       DATACONTROL_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {                       
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               pszQuery = data_control_provider_create_delete_statement(g_stSqlProvider, g_szWhere);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (pszQuery == NULL)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_create_delete_statement failed on iteration %d\\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_create_delete_statement failed %d times out of %d times\\n", __LINE__, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_provider_create_delete_statement, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_provider_create_delete_statement, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_provider_data_control_provider_create_insert_statement_p
+ * @type                                       auto
+ * @description                                Test data_control_provider_create_insert_statement
+ * @scenario                           Call data_control_provider_create_insert_statement
+ * @apicovered                         data_control_provider_create_insert_statement
+ * @passcase                           When data_control_provider_create_insert_statement is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_provider_create_insert_statement
+//& type: auto
+int ITc_data_control_provider_data_control_provider_create_insert_statement_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nGetFailCount = 0;
+       char *pszQuery = NULL;
+       
+       bundle *pstData = bundle_create();
+       if(pstData == NULL)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] bundle_create failed\\n", __LINE__);
+               return 1;
+       }
+       bundle_add_str(pstData, DUMMYKEY, DUMMYVALUE);
+       
+       DATACONTROL_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {                       
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               pszQuery = data_control_provider_create_insert_statement(g_stSqlProvider, pstData);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (pszQuery == NULL)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_create_insert_statement failed on iteration %d\\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_create_insert_statement failed %d times out of %d times\\n", __LINE__, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_provider_create_insert_statement, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_provider_create_insert_statement, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_provider_data_control_provider_create_update_statement_p
+ * @type                                       auto
+ * @description                                Test data_control_provider_create_update_statement
+ * @scenario                           Call data_control_provider_create_update_statement
+ * @apicovered                         data_control_provider_create_update_statement
+ * @passcase                           When data_control_provider_create_update_statement is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_provider_create_update_statement
+//& type: auto
+int ITc_data_control_provider_data_control_provider_create_update_statement_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nGetFailCount = 0;
+       char *pszQuery = NULL;
+       memset(g_szWhere,0,QUERYSIZE);
+       sprintf(g_szWhere, "rowid=1");
+       
+       bundle *pstData = bundle_create();
+       if(pstData == NULL)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] bundle_create failed\\n", __LINE__);
+               return 1;
+       }
+       bundle_add_str(pstData, DUMMYKEY, DUMMYVALUE);
+       
+       DATACONTROL_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {                       
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               pszQuery = data_control_provider_create_update_statement(g_stSqlProvider, pstData, g_szWhere);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (pszQuery == NULL)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_create_update_statement failed on iteration %d\\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_create_update_statement failed %d times out of %d times\\n", __LINE__, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_provider_create_update_statement, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_provider_create_update_statement, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_provider_data_control_provider_create_select_statement_p
+ * @type                                       auto
+ * @description                                Test data_control_provider_create_select_statement
+ * @scenario                           Call data_control_provider_create_select_statement
+ * @apicovered                         data_control_provider_create_select_statement
+ * @passcase                           When data_control_provider_create_select_statement is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_provider_create_select_statement
+//& type: auto
+int ITc_data_control_provider_data_control_provider_create_select_statement_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nGetFailCount = 0;
+       char *pszQuery = NULL;
+       memset(g_szWhere,0,QUERYSIZE);
+       sprintf(g_szWhere, "rowid=1");
+       const char *pszColoumn = DUMMYKEY;
+       const char *pszOrder = "WORD ASC";
+       
+       DATACONTROL_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {                       
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               pszQuery = data_control_provider_create_select_statement(g_stSqlProvider, &pszColoumn, 1, g_szWhere, pszOrder);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (pszQuery == NULL)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_create_select_statement failed on iteration %d\\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_create_select_statement failed %d times out of %d times\\n", __LINE__, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_provider_create_select_statement, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_provider_create_select_statement, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_provider_data_control_provider_sql_register_unregister_cb_p
+ * @type                                       auto
+ * @description                                Test data_control_provider_sql_register_cb and data_control_provider_sql_unregister_cb
+ * @scenario                           Call data_control_provider_sql_register_cb\n
+ *                                                     Call data_control_provider_sql_unregister_cb
+ * @apicovered                         data_control_provider_sql_register_cb, data_control_provider_sql_unregister_cb
+ * @passcase                           When data_control_provider_sql_register_cb and data_control_provider_sql_unregister_cb are successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_provider_sql_register_cb and data_control_provider_sql_unregister_cb
+//& type: auto
+int ITc_data_control_provider_data_control_provider_sql_register_unregister_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nRegisterFailCount = 0;
+       int nUnRegisterFailCount = 0;
+       
+       data_control_provider_sql_cb stSqlCallBack = {0};
+       stSqlCallBack.insert_cb = DataControlProviderSqlInsertCb;
+       stSqlCallBack.delete_cb = DataControlProviderSqlRemoveCb;
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_provider_sql_register_cb(&stSqlCallBack, TESTSTRING);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_sql_register_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nRegisterFailCount++;
+                       continue;
+               }
+               
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_provider_sql_unregister_cb();
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_sql_unregister_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nUnRegisterFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+       
+       if (nRegisterFailCount || nUnRegisterFailCount)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_sql_register_cb failed %d times, data_control_provider_sql_unregister_cb failed %d times out of %d times\\n", __LINE__, nRegisterFailCount, nUnRegisterFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_provider_sql_register_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_provider_sql_unregister_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_provider_sql_register_unregister_cb, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_provider_data_control_provider_map_register_unregister_cb_p
+ * @type                                       auto
+ * @description                                Test data_control_provider_map_register_cb and data_control_provider_map_unregister_cb
+ * @scenario                           Call data_control_provider_map_register_cb\n
+ *                                                     Call data_control_provider_map_unregister_cb
+ * @apicovered                         data_control_provider_map_register_cb, data_control_provider_map_unregister_cb
+ * @passcase                           When data_control_provider_map_register_cb and data_control_provider_map_unregister_cb are successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_provider_map_register_cb and data_control_provider_map_unregister_cb
+//& type: auto
+int ITc_data_control_provider_data_control_provider_map_register_unregister_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nRegisterFailCount = 0;
+       int nUnRegisterFailCount = 0;
+       
+       data_control_provider_map_cb stMapCallBack = {0};
+       stMapCallBack.add_cb = DataControlProviderMapInsertCb;
+       stMapCallBack.remove_cb = DataControlProviderMapRemoveCb;
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_provider_map_register_cb(&stMapCallBack, TESTSTRING);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_map_register_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nRegisterFailCount++;
+                       continue;
+               }
+               
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_provider_map_unregister_cb();
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_map_unregister_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nUnRegisterFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+       
+       if (nRegisterFailCount || nUnRegisterFailCount)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_map_register_cb failed %d times, data_control_provider_map_unregister_cb failed %d times out of %d times\\n", __LINE__, nRegisterFailCount, nUnRegisterFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_provider_map_register_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_provider_map_unregister_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_provider_map_register_unregister_cb, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_provider_data_control_provider_match_data_id_p
+ * @type                                       auto
+ * @description                                Test data_control_provider_match_data_id
+ * @scenario                           Call data_control_provider_match_data_id
+ * @apicovered                         data_control_provider_match_data_id
+ * @passcase                           When data_control_provider_match_data_id is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_provider_match_data_id
+//& type: auto
+int ITc_data_control_provider_data_control_provider_match_data_id_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nGetFailCount = 0;
+       bool bResult = false;
+       
+       DATACONTROL_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {                       
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               bResult = data_control_provider_match_data_id(g_stSqlProvider, SQLDATAID);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (bResult == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_match_data_id failed on iteration %d\\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_match_data_id failed %d times out of %d times\\n", __LINE__, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_provider_match_data_id, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_provider_match_data_id, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_provider_data_control_provider_match_provider_id_p
+ * @type                                       auto
+ * @description                                Test data_control_provider_match_provider_id
+ * @scenario                           Call data_control_provider_match_provider_id
+ * @apicovered                         data_control_provider_match_provider_id
+ * @passcase                           When data_control_provider_match_provider_id is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_provider_match_provider_id
+//& type: auto
+int ITc_data_control_provider_data_control_provider_match_provider_id_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nGetFailCount = 0;
+       bool bResult = false;
+       
+       DATACONTROL_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {                       
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               bResult = data_control_provider_match_provider_id(g_stSqlProvider, SQLPROVIDERID);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (bResult == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_match_provider_id failed on iteration %d\\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_provider_match_provider_id failed %d times out of %d times\\n", __LINE__, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_provider_match_provider_id, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_provider_match_provider_id, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/data-control/ITs-data-control-sql.c b/src/itc/data-control/ITs-data-control-sql.c
new file mode 100755 (executable)
index 0000000..13ffedd
--- /dev/null
@@ -0,0 +1,2128 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-data-control-common.h"
+
+/** @addtogroup itc-data-control
+*  @ingroup itc
+*  @{
+*/
+//& set: DataControl
+/*******************************************************************************CallBack Functions********************************************************/
+/**
+* @function            DataControlSqlInsertResponseCb
+* @description         Called when record is inserted
+* @parameter           int request_id, data_control_h provider, long long inserted_row_id, bool provider_result, const char *error, void *user_data
+* @return                      NA
+*/
+static void DataControlSqlInsertResponseCb(int request_id, data_control_h provider, long long inserted_row_id, bool provider_result, const char *error, void *user_data) 
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlInsertResponseCb callback called\\n", __LINE__);
+#endif
+
+       if ( provider_result )
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Insert operation successful at row %lld\\n", __LINE__, inserted_row_id);
+               g_nRowId = inserted_row_id;
+               g_bCallbackHit = true;
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Insert operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+       }
+
+       if ( g_pDataControlMainLoop )
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            DataControlSqlRemoveResponseCb
+* @description         Called when record is removed
+* @parameter           int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data
+* @return                      NA
+*/
+static void DataControlSqlRemoveResponseCb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlRemoveResponseCb callback called\\n", __LINE__);
+#endif
+
+       if ( provider_result )
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Delete operation successful\\n", __LINE__);
+               g_nRowId--;
+               g_bCallbackHit = true;
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Delete operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+       }
+
+       if ( g_pDataControlMainLoop )
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            DataControlSqlUpdateResponseCb
+* @description         Called when record is removed
+* @parameter           int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data
+* @return                      NA
+*/
+static void DataControlSqlUpdateResponseCb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlUpdateResponseCb callback called\\n", __LINE__);
+#endif
+
+       if ( provider_result )
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Update operation successful\\n", __LINE__);
+               g_bCallbackHit = true;
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Update operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+       }
+
+       if ( g_pDataControlMainLoop )
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           DataControlSqlSelectResponseCb
+ * @description                Called when record is selected
+ * @parameter          int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+ * @return                     NA
+ */
+static void DataControlSqlSelectResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectResponseCb callback called\\n", __LINE__);
+#endif
+
+       if ( provider_result )
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               g_bCallbackHit = true;
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+       }
+
+       if ( g_pDataControlMainLoop )
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            DataControlSqlSelectBlobResponseCb
+* @description         Called when record is selected
+* @parameter           int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+* @return                      NA
+*/
+static void DataControlSqlSelectBlobResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectBlobResponseCb callback called\\n", __LINE__);
+#endif
+       
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSelectFailCount = 0;
+       void *pData = (void *)malloc(TESTSTRINGSIZE);
+       
+       if ( provider_result )
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               DATACONTROL_INITIALIZE_LOGS_SINGLE;
+               data_control_sql_step_first(enumerator);
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {               
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_get_blob_data(enumerator, BLOBCOLOUMN, pData, TESTSTRINGSIZE);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_blob_data failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                               nSelectFailCount++;
+                       }
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+               g_bCallbackHit = false;
+       }
+       
+       free(pData);
+       if ( nSelectFailCount > 0 )
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_blob_data failed %d times out of %d times\\n", __LINE__, nSelectFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = false;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_get_blob_data, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_get_blob_data, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = true;
+       }
+       
+       if ( g_pDataControlMainLoop )
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            DataControlSqlSelectIntResponseCb
+* @description         Called when record is selected
+* @parameter           int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+* @return                      NA
+*/
+static void DataControlSqlSelectIntResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectIntResponseCb callback called\\n", __LINE__);
+#endif
+       
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSelectFailCount = 0;
+       int nData = 0;
+       
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               DATACONTROL_INITIALIZE_LOGS_SINGLE;
+               data_control_sql_step_first(enumerator);
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {               
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_get_int_data(enumerator, INTEGERCOLOUMN, &nData);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_int_data failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                               nSelectFailCount++;
+                       }
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+               g_bCallbackHit = false;
+       }
+       
+       if (nSelectFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_int_data failed %d times out of %d times\\n", __LINE__, nSelectFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = false;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_get_int_data, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_get_int_data, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = true;
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           DataControlSqlSelectInt64ResponseCb
+ * @description                Called when record is selected
+ * @parameter          int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+ * @return                     NA
+ */
+static void DataControlSqlSelectInt64ResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectInt64ResponseCb callback called\\n", __LINE__);
+#endif
+       
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSelectFailCount = 0;
+       long long int nData = 0;
+       
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               DATACONTROL_INITIALIZE_LOGS_SINGLE;
+               data_control_sql_step_first(enumerator);
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {               
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_get_int64_data(enumerator, INTEGERCOLOUMN, &nData);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_int64_data failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                               nSelectFailCount++;
+                       }
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+               g_bCallbackHit = false;
+       }
+       
+       if (nSelectFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_int64_data failed %d times out of %d times\\n", __LINE__, nSelectFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = false;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_get_int64_data, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_get_int64_data, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = true;
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           DataControlSqlSelectTextResponseCb
+ * @description                Called when record is selected
+ * @parameter          int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+ * @return                     NA
+ */
+static void DataControlSqlSelectTextResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectTextResponseCb callback called\\n", __LINE__);
+#endif
+       
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSelectFailCount = 0;
+       char szData[TESTVALUE] = {0};
+       
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               DATACONTROL_INITIALIZE_LOGS_SINGLE;
+               data_control_sql_step_first(enumerator);
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {               
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_get_text_data(enumerator, STRINGCOLOUMN, szData);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_text_data failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                               nSelectFailCount++;
+                       }
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+               g_bCallbackHit = false;
+       }
+       
+       if (nSelectFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_text_data failed %d times out of %d times\\n", __LINE__, nSelectFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = false;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_get_text_data, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_get_text_data, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = true;
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           DataControlSqlSelectDoubleResponseCb
+ * @description                Called when record is selected
+ * @parameter          int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+ * @return                     NA
+ */
+static void DataControlSqlSelectDoubleResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectDoubleResponseCb callback called\\n", __LINE__);
+#endif
+       
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSelectFailCount = 0;
+       double nData = 0;
+       
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               DATACONTROL_INITIALIZE_LOGS_SINGLE;
+               data_control_sql_step_first(enumerator);
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {               
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_get_double_data(enumerator, DOUBLECOLOUMN, &nData);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_double_data failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                               nSelectFailCount++;
+                       }
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+               g_bCallbackHit = false;
+       }
+       
+       if (nSelectFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_double_data failed %d times out of %d times\\n", __LINE__, nSelectFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = false;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_get_double_data, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_get_double_data, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = true;
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           DataControlSqlSelectColoumnCountResponseCb
+ * @description                Called when record is selected
+ * @parameter          int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+ * @return                     NA
+ */
+static void DataControlSqlSelectColoumnCountResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectColoumnCountResponseCb callback called\\n", __LINE__);
+#endif
+       
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSelectFailCount = 0;
+       
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               DATACONTROL_INITIALIZE_LOGS_SINGLE;
+               data_control_sql_step_first(enumerator);
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {               
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_get_column_count(enumerator);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if (nRetVal < 0)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_column_count failed on iteration %d\\n", __LINE__, nLoopCount);
+                               nSelectFailCount++;
+                       }
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+               g_bCallbackHit = false;
+       }
+       
+       if (nSelectFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_column_count failed %d times out of %d times\\n", __LINE__, nSelectFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = false;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_get_column_count, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_get_column_count, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = true;
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           DataControlSqlSelectColoumnSizeResponseCb
+ * @description                Called when record is selected
+ * @parameter          int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+ * @return                     NA
+ */
+static void DataControlSqlSelectColoumnSizeResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectColoumnSizeResponseCb callback called\\n", __LINE__);
+#endif
+       
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSelectFailCount = 0;
+       
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               DATACONTROL_INITIALIZE_LOGS_SINGLE;
+               data_control_sql_step_first(enumerator);
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {               
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_get_column_item_size(enumerator, INTEGERCOLOUMN);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if (nRetVal < 0)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_column_item_size failed on iteration %d\\n", __LINE__, nLoopCount);
+                               nSelectFailCount++;
+                       }
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+               g_bCallbackHit = false;
+       }
+       
+       if (nSelectFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_column_item_size failed %d times out of %d times\\n", __LINE__, nSelectFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = false;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_get_column_item_size, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_get_column_item_size, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = true;
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           DataControlSqlSelectColoumnTypeResponseCb
+ * @description                Called when record is selected
+ * @parameter          int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+ * @return                     NA
+ */
+static void DataControlSqlSelectColoumnTypeResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectColoumnTypeResponseCb callback called\\n", __LINE__);
+#endif
+       
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSelectFailCount = 0;
+       data_control_sql_column_type_e eType = DATA_CONTROL_SQL_COLUMN_TYPE_UNDEFINED;
+       
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               DATACONTROL_INITIALIZE_LOGS_SINGLE;
+               data_control_sql_step_first(enumerator);
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {               
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_get_column_item_type(enumerator, INTEGERCOLOUMN, &eType);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if ((nRetVal != DATA_CONTROL_ERROR_NONE) || (eType == DATA_CONTROL_SQL_COLUMN_TYPE_UNDEFINED))
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_column_item_type failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                               nSelectFailCount++;
+                       }
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+               g_bCallbackHit = false;
+       }
+       
+       if (nSelectFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_column_item_type failed %d times out of %d times\\n", __LINE__, nSelectFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = false;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_get_column_item_type, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_get_column_item_type, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = true;
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           DataControlSqlSelectColoumnNameResponseCb
+ * @description                Called when record is selected
+ * @parameter          int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+ * @return                     NA
+ */
+static void DataControlSqlSelectColoumnNameResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectColoumnNameResponseCb callback called\\n", __LINE__);
+#endif
+       
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSelectFailCount = 0;
+       char szData[TESTVALUE] = {0};
+       
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               DATACONTROL_INITIALIZE_LOGS_SINGLE;
+               data_control_sql_step_first(enumerator);
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {               
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_get_column_name(enumerator, STRINGCOLOUMN, szData);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_column_name failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                               nSelectFailCount++;
+                       }
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+               g_bCallbackHit = false;
+       }
+       
+       if (nSelectFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_column_name failed %d times out of %d times\\n", __LINE__, nSelectFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = false;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_get_column_name, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_get_column_name, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = true;
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           DataControlSqlSelectColoumnStepFirstLastResponseCb
+ * @description                Called when record is selected
+ * @parameter          int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+ * @return                     NA
+ */
+static void DataControlSqlSelectColoumnStepFirstLastResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectColoumnStepFirstLastResponseCb callback called\\n", __LINE__);
+#endif
+       
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nStartFailCount = 0;
+       int nEndFailCount = 0;
+       
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               DATACONTROL_INITIALIZE_LOGS_DOUBLEMEM;
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {               
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_step_first(enumerator);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_step_first failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                               nStartFailCount++;
+                       }
+                       
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_step_last(enumerator);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI2MemLog);
+                       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_step_last failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                               nEndFailCount++;
+                       }
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+               g_bCallbackHit = false;
+       }
+       
+       if (nStartFailCount > 0 || nEndFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_step_first failed %d times, data_control_sql_step_last failed %d times out of %d times\\n", __LINE__, nStartFailCount, nEndFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = false;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_step_first, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_step_first, stSpeedMemoryLog.pszAPI1MemLog);
+               PRINT_SPEED_LOG(data_control_sql_step_last, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_step_last, stSpeedMemoryLog.pszAPI2MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = true;
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           DataControlSqlSelectColoumnStepNextPreviousResponseCb
+ * @description                Called when record is selected
+ * @parameter          int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data
+ * @return                     NA
+ */
+static void DataControlSqlSelectColoumnStepNextPreviousResponseCb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [DataControl_ITC] DataControlSqlSelectColoumnStepNextPreviousResponseCb callback called\\n", __LINE__);
+#endif
+       
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nStartFailCount = 0;
+       int nEndFailCount = 0;
+       
+       if (provider_result) 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation successful\\n", __LINE__);
+               DATACONTROL_INITIALIZE_LOGS_DOUBLEMEM;
+               data_control_sql_step_first(enumerator);
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {               
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_step_next(enumerator);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_step_next failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                               nStartFailCount++;
+                       }
+                       
+                       DataControlGetMemAllocation();
+                       DataControlGetTimeOfDay();
+                       // Target API
+                       nRetVal = data_control_sql_step_previous(enumerator);
+                       DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+                       DataControlGetMemStatus(stSpeedMemoryLog.pszAPI2MemLog);
+                       if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_step_previous failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                               nEndFailCount++;
+                       }
+               }
+       }
+       else 
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] Select operation for request %d failed, error returned = %s\\n", __LINE__, request_id, error);
+               g_bCallbackHit = false;
+       }
+       
+       if (nStartFailCount > 0 || nEndFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_step_next failed %d times, data_control_sql_step_previous failed %d times out of %d times\\n", __LINE__, nStartFailCount, nEndFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = false;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_step_next, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_step_next, stSpeedMemoryLog.pszAPI1MemLog);
+               PRINT_SPEED_LOG(data_control_sql_step_previous, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_step_previous, stSpeedMemoryLog.pszAPI2MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               g_bCallbackHit = true;
+       }
+       
+       if (g_pDataControlMainLoop)
+       {
+               g_main_loop_quit(g_pDataControlMainLoop);
+       }
+       return;
+}
+
+/***************************************************************************End CallBack Functions********************************************************/
+
+/**
+ * @function           ITs_data_control_sql_startup
+ * @description                Called before each test, set the service boolean true
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_data_control_sql_startup(void)
+{
+       struct stat buf;   
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bDataControlCreation = false;
+       if(DataControlInitiateSqlHandle(&g_stSqlProvider) == true)
+       {
+               g_bDataControlCreation = true;
+       }
+}
+
+/**
+ * @function           ITs_data_control_sql_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_data_control_sql_cleanup(void)
+{
+       if(g_bDataControlCreation == true)
+       {
+               data_control_sql_destroy(g_stSqlProvider);
+       }
+}
+
+/** @addtogroup itc-data-control-sql-testcases
+*  @brief              Integration testcases for module data-control-sql
+*  @ingroup    itc-data-control-sql
+*  @{
+*/
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_destroy_create_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_destroy and data_control_sql_create
+ * @scenario                           Call data_control_sql_destroy\n
+ *                                                     Call data_control_sql_create
+ * @apicovered                         data_control_sql_destroy, data_control_sql_create
+ * @passcase                           When data_control_sql_destroy and data_control_sql_create are successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_destroy and data_control_sql_create
+//& type: auto
+int ITc_data_control_sql_data_control_sql_destroy_create_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_destroy(g_stSqlProvider);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_destroy failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_create(&g_stSqlProvider);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_create failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+       
+       if (nSetFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_destroy failed %d times, data_control_sql_create failed %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_destroy, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_sql_create, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_destroy_create, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_set_get_data_id_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_set_data_id and data_control_sql_get_data_id
+ * @scenario                           Call data_control_sql_set_data_id\n
+ *                                                     Call data_control_sql_get_data_id
+ * @apicovered                         data_control_sql_set_data_id, data_control_sql_get_data_id
+ * @passcase                           When data_control_sql_set_data_id and data_control_sql_get_data_id are successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_set_data_id and data_control_sql_get_data_id
+//& type: auto
+int ITc_data_control_sql_data_control_sql_set_get_data_id_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       char *pszDataId = NULL;
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_set_data_id(g_stSqlProvider, SQLDATAID);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_set_data_id failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_get_data_id(g_stSqlProvider, &pszDataId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_data_id failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if(strstr(pszDataId, SQLDATAID) == NULL)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_data_id failed on iteration %d, as Data Id not found \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+       
+       if (nSetFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_set_data_id failed %d times, data_control_sql_get_data_id failed %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_set_data_id, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_sql_get_data_id, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_set_get_data_id, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_set_get_provider_id_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_set_provider_id and data_control_sql_get_provider_id
+ * @scenario                           Call data_control_sql_set_provider_id\n
+ *                                                     Call data_control_sql_get_provider_id
+ * @apicovered                         data_control_sql_set_provider_id, data_control_sql_get_provider_id
+ * @passcase                           When data_control_sql_set_provider_id and data_control_sql_get_provider_id are successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_set_provider_id and data_control_sql_get_provider_id
+//& type: auto
+int ITc_data_control_sql_data_control_sql_set_get_provider_id_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       char *pszDataId = NULL;
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_set_provider_id(g_stSqlProvider, SQLPROVIDERID);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_set_provider_id failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_get_provider_id(g_stSqlProvider, &pszDataId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_provider_id failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if(strstr(pszDataId, SQLPROVIDERID) == NULL)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_get_provider_id failed on iteration %d, as Data Id not found \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+       
+       if (nSetFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_set_provider_id failed %d times, data_control_sql_get_provider_id failed %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_set_provider_id, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_sql_get_provider_id, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_set_get_provider_id, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_register_unregister_response_cb_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_register_response_cb and data_control_sql_unregister_response_cb
+ * @scenario                           Call data_control_sql_register_response_cb\n
+ *                                                     Call data_control_sql_unregister_response_cb
+ * @apicovered                         data_control_sql_register_response_cb, data_control_sql_unregister_response_cb
+ * @passcase                           When data_control_sql_register_response_cb and data_control_sql_unregister_response_cb are successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_register_response_cb and data_control_sql_unregister_response_cb
+//& type: auto
+int ITc_data_control_sql_data_control_sql_register_unregister_response_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nInsertFailCount = 0;
+       int nDeleteFailCount = 0;
+       int nRegisterFailCount = 0;
+       int nUnRegisterFailCount = 0;
+       int nRequestId = 0;
+       int nTimeoutId = 0;
+       
+       bundle *pstData = bundle_create();
+       if(pstData == NULL)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] bundle_create failed\\n", __LINE__);
+               return 1;
+       }
+       bundle_add_str(pstData, DUMMYKEY, DUMMYVALUE);
+       memset(g_szWhere,0,QUERYSIZE);
+       sprintf(g_szWhere, "rowid=1"); 
+       
+       data_control_sql_response_cb stSqlCallBack = {0};
+       stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &stSqlCallBack, TESTSTRING);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_register_response_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nRegisterFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               nRetVal = data_control_sql_insert(g_stSqlProvider, pstData, &nRequestId);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_insert failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nInsertFailCount++;
+               }
+               else
+               {
+                       RUN_POLLING_LOOP;
+                       if(g_bCallbackHit == false)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] Failed to insert into DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                               nInsertFailCount++;
+                       }
+                       else
+                       {
+                               g_bCallbackHit = false;
+                               nRetVal = data_control_sql_delete(g_stSqlProvider, g_szWhere, &nRequestId);
+                               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+                               {
+                                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_delete failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                                       nDeleteFailCount++;
+                               }
+                               else
+                               {
+                                       RUN_POLLING_LOOP;
+                                       if(g_bCallbackHit == false)
+                                       {
+                                               FPRINTF("[Line : %d] [DataControl_ITC] Failed to delete from DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                                               nDeleteFailCount++;
+                                       }
+                               }
+                       }
+               }
+               
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_unregister_response_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nUnRegisterFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+       
+       bundle_free(pstData);
+       
+       if (nInsertFailCount > 0 || nDeleteFailCount > 0 || nRegisterFailCount || nUnRegisterFailCount)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_register_response_cb failed %d times, data_control_sql_unregister_response_cb failed %d times out of %d times\\n", __LINE__, nRegisterFailCount, nUnRegisterFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_register_response_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_sql_unregister_response_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_register_unregister_response_cb, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_insert_delete_p
+ * @type                                       auto
+ * @description                                Insert and delete a sql entry
+ * @scenario                           Insert Entry\n
+ *                                                     Delete Entry
+ * @apicovered                         data_control_sql_insert, data_control_sql_delete
+ * @passcase                           When data_control_sql_insert and data_control_sql_delete are successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_insert and data_control_sql_delete
+//& type: auto
+int ITc_data_control_sql_data_control_sql_insert_delete_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nInsertFailCount = 0;
+       int nDeleteFailCount = 0;
+       int nRequestId = 0;
+       int nTimeoutId = 0;
+       
+       data_control_sql_response_cb stSqlCallBack = {0};
+       stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &stSqlCallBack, TESTSTRING);
+       PRINT_RESULT(nRetVal, "data_control_sql_register_response_cb");
+
+       bundle *pstData = bundle_create();
+       if(pstData == NULL)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] bundle_create failed\\n", __LINE__);
+               return 1;
+       }
+       bundle_add_str(pstData, DUMMYKEY, DUMMYVALUE);
+       memset(g_szWhere,0,QUERYSIZE);
+       sprintf(g_szWhere, "rowid=1"); 
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               DataControlGetMemAllocation();
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_insert(g_stSqlProvider, pstData, &nRequestId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_insert failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nInsertFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to insert into DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nInsertFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_delete(g_stSqlProvider, g_szWhere, &nRequestId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_delete failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nDeleteFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to delete from DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nDeleteFailCount++;
+                       continue;
+               }
+               
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+       
+       bundle_free(pstData);
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if (nInsertFailCount > 0 || nDeleteFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_insert failed %d times, data_control_sql_delete failed %d times out of %d times\\n", __LINE__, nInsertFailCount, nDeleteFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_insert, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_sql_delete, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_insert_delete, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_update_select_p
+ * @type                                       auto
+ * @description                                Update and select a sql entry
+ * @scenario                           Update Entry\n
+ *                                                     Select Entry
+ * @apicovered                         data_control_sql_update, data_control_sql_select
+ * @passcase                           When data_control_sql_update and data_control_sql_select are successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_update and data_control_sql_select
+//& type: auto
+int ITc_data_control_sql_data_control_sql_update_select_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nInsertFailCount = 0;
+       int nDeleteFailCount = 0;
+       int nUpdateFailCount = 0;
+       int nSelectFailCount = 0;
+       int nRequestId = 0;
+       int nTimeoutId = 0;
+       
+       data_control_sql_response_cb stSqlCallBack = {0};
+       stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       stSqlCallBack.update_cb = DataControlSqlUpdateResponseCb;
+       stSqlCallBack.select_cb = DataControlSqlSelectResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &stSqlCallBack, TESTSTRING);
+       PRINT_RESULT(nRetVal, "data_control_sql_register_response_cb");
+
+       bundle *pstData = bundle_create();
+       if(pstData == NULL)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] bundle_create failed\\n", __LINE__);
+               return 1;
+       }
+       bundle_add_str(pstData, DUMMYKEY, DUMMYVALUE);
+       memset(g_szWhere,0,QUERYSIZE);
+       sprintf(g_szWhere, "rowid=1");  
+       char *pszValue = DUMMYKEY; 
+       const char *pszOrder = "WORD ASC"; 
+       
+       bundle *pstNewData = bundle_create();
+       if(pstNewData == NULL)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] bundle_create failed\\n", __LINE__);
+               bundle_free(pstData);
+               return 1;
+       }
+       bundle_add_str(pstNewData, DUMMYKEY, DUMMYVALUENEW);
+       
+       DATACONTROL_INITIALIZE_LOGS_DOUBLEMEM;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               nRetVal = data_control_sql_insert(g_stSqlProvider, pstData, &nRequestId);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_insert failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nInsertFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to insert into DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nInsertFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_update(g_stSqlProvider, pstNewData, g_szWhere, &nRequestId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_update failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nUpdateFailCount++;
+               }
+               else
+               {
+                       RUN_POLLING_LOOP;
+                       if(g_bCallbackHit == false)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] Failed to insert into DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                               nUpdateFailCount++;
+                       }
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_select(g_stSqlProvider, &pszValue, 1, g_szWhere, pszOrder, &nRequestId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI2MemLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_select failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nSelectFailCount++;
+               }
+               else
+               {
+                       RUN_POLLING_LOOP;
+                       if(g_bCallbackHit == false)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] Failed to delete from DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                               nSelectFailCount++;
+                       }
+               }
+               
+               g_bCallbackHit = false;
+               nRetVal = data_control_sql_delete(g_stSqlProvider, g_szWhere, &nRequestId);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_delete failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nDeleteFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to delete from DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nDeleteFailCount++;
+                       continue;
+               }
+       }
+       
+       bundle_free(pstData);
+       bundle_free(pstNewData);
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if (nInsertFailCount > 0 || nDeleteFailCount > 0 || nUpdateFailCount > 0 || nSelectFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_update failed %d times, data_control_sql_select failed %d times out of %d times\\n", __LINE__, nUpdateFailCount, nSelectFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_update, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(data_control_sql_select, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_update, stSpeedMemoryLog.pszAPI1MemLog);
+               PRINT_MEMORY_LOG(data_control_sql_select, stSpeedMemoryLog.pszAPI2MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_select_with_page_p
+ * @type                                       auto
+ * @description                                Select a sql entry
+ * @scenario                           Select Entry
+ * @apicovered                         data_control_sql_select_with_page
+ * @passcase                           When data_control_sql_select_with_page is successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_select_with_page
+//& type: auto
+int ITc_data_control_sql_data_control_sql_select_with_page_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nInsertFailCount = 0;
+       int nDeleteFailCount = 0;
+       int nSelectFailCount = 0;
+       int nRequestId = 0;
+       int nTimeoutId = 0;
+       
+       data_control_sql_response_cb stSqlCallBack = {0};
+       stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       stSqlCallBack.select_cb = DataControlSqlSelectResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &stSqlCallBack, TESTSTRING);
+       PRINT_RESULT(nRetVal, "data_control_sql_register_response_cb");
+
+       bundle *pstData = bundle_create();
+       if(pstData == NULL)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] bundle_create failed\\n", __LINE__);
+               return 1;
+       }
+       bundle_add_str(pstData, DUMMYKEY, DUMMYVALUE);
+       memset(g_szWhere,0,QUERYSIZE);
+       sprintf(g_szWhere, "rowid=1"); 
+       const char *pszOrder = "WORD ASC"; 
+       char *pszKey = DUMMYKEY; 
+       
+       DATACONTROL_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               nRetVal = data_control_sql_insert(g_stSqlProvider, pstData, &nRequestId);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_insert failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nInsertFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to insert into DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nInsertFailCount++;
+                       continue;
+               }
+               
+               g_bCallbackHit = false;
+               DataControlGetMemAllocation();
+               DataControlGetTimeOfDay();
+               // Target API
+               nRetVal = data_control_sql_select_with_page(g_stSqlProvider, &pszKey, 1, g_szWhere, pszOrder, 1, 1, &nRequestId);
+               DataControlExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DataControlGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_select_with_page failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nSelectFailCount++;
+               }
+               else
+               {
+                       RUN_POLLING_LOOP;
+                       if(g_bCallbackHit == false)
+                       {
+                               FPRINTF("[Line : %d] [DataControl_ITC] Failed to delete from DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                               nSelectFailCount++;
+                       }
+               }
+               
+               g_bCallbackHit = false;
+               nRetVal = data_control_sql_delete(g_stSqlProvider, g_szWhere, &nRequestId);
+               if (nRetVal != DATA_CONTROL_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_delete failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, DataControlGetError(nRetVal));
+                       nDeleteFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit == false)
+               {
+                       FPRINTF("[Line : %d] [DataControl_ITC] Failed to delete from DB, callback issue on iteration %d\\n", __LINE__, nLoopCount);
+                       nDeleteFailCount++;
+                       continue;
+               }
+       }
+       
+       bundle_free(pstData);
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if (nInsertFailCount > 0 || nDeleteFailCount > 0 || nSelectFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] data_control_sql_select_with_page failed %d times out of %d times\\n", __LINE__, nSelectFailCount, MAX_COUNT);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(data_control_sql_select_with_page, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(data_control_sql_select_with_page, stSpeedMemoryLog.pszAPI1MemLog);
+               DATACONTROL_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_get_blob_data_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_get_blob_data
+ * @scenario                           Call data_control_sql_get_blob_data
+ * @apicovered                         data_control_sql_get_blob_data
+ * @passcase                           When data_control_sql_get_blob_data is successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_get_blob_data
+//& type: auto
+int ITc_data_control_sql_data_control_sql_get_blob_data_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool bResult = false;
+       
+       g_stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       g_stSqlCallBack.select_cb = DataControlSqlSelectBlobResponseCb;
+       g_stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &g_stSqlCallBack, TESTSTRING);
+       PRINT_COMMON_RESULT(nRetVal, "data_control_sql_register_response_cb");
+       
+       bResult = DataControlInsertSelectSqlData();     
+       DataControlRemoveSqlData();
+       
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if(bResult == false)
+       {
+               return 1;
+       }
+       else
+       {
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_get_int_data_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_get_int_data
+ * @scenario                           Call data_control_sql_get_int_data
+ * @apicovered                         data_control_sql_get_int_data
+ * @passcase                           When data_control_sql_get_int_data is successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_get_int_data
+//& type: auto
+int ITc_data_control_sql_data_control_sql_get_int_data_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool bResult = false;
+       
+       g_stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       g_stSqlCallBack.select_cb = DataControlSqlSelectIntResponseCb;
+       g_stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &g_stSqlCallBack, TESTSTRING);
+       PRINT_COMMON_RESULT(nRetVal, "data_control_sql_register_response_cb");
+       
+       bResult = DataControlInsertSelectSqlData();     
+       DataControlRemoveSqlData();
+       
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if(bResult == false)
+       {
+               return 1;
+       }
+       else
+       {
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_get_int64_data_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_get_int64_data
+ * @scenario                           Call data_control_sql_get_int64_data
+ * @apicovered                         data_control_sql_get_int64_data
+ * @passcase                           When data_control_sql_get_int64_data is successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_get_int64_data
+//& type: auto
+int ITc_data_control_sql_data_control_sql_get_int64_data_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool bResult = false;
+       
+       g_stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       g_stSqlCallBack.select_cb = DataControlSqlSelectInt64ResponseCb;
+       g_stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &g_stSqlCallBack, TESTSTRING);
+       PRINT_COMMON_RESULT(nRetVal, "data_control_sql_register_response_cb");
+       
+       bResult = DataControlInsertSelectSqlData();     
+       DataControlRemoveSqlData();
+       
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if(bResult == false)
+       {
+               return 1;
+       }
+       else
+       {
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_get_text_data_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_get_text_data
+ * @scenario                           Call data_control_sql_get_text_data
+ * @apicovered                         data_control_sql_get_text_data
+ * @passcase                           When data_control_sql_get_text_data is successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_get_text_data
+//& type: auto
+int ITc_data_control_sql_data_control_sql_get_text_data_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool bResult = false;
+       
+       g_stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       g_stSqlCallBack.select_cb = DataControlSqlSelectTextResponseCb;
+       g_stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &g_stSqlCallBack, TESTSTRING);
+       PRINT_COMMON_RESULT(nRetVal, "data_control_sql_register_response_cb");
+       
+       bResult = DataControlInsertSelectSqlData();     
+       DataControlRemoveSqlData();
+       
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if(bResult == false)
+       {
+               return 1;
+       }
+       else
+       {
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_get_double_data_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_get_double_data
+ * @scenario                           Call data_control_sql_get_double_data
+ * @apicovered                         data_control_sql_get_double_data
+ * @passcase                           When data_control_sql_get_double_data is successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_get_double_data
+//& type: auto
+int ITc_data_control_sql_data_control_sql_get_double_data_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool bResult = false;
+       
+       g_stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       g_stSqlCallBack.select_cb = DataControlSqlSelectDoubleResponseCb;
+       g_stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &g_stSqlCallBack, TESTSTRING);
+       PRINT_COMMON_RESULT(nRetVal, "data_control_sql_register_response_cb");
+       
+       bResult = DataControlInsertSelectSqlData();     
+       DataControlRemoveSqlData();
+       
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if(bResult == false)
+       {
+               return 1;
+       }
+       else
+       {
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_get_column_count_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_get_column_count
+ * @scenario                           Call data_control_sql_get_column_count
+ * @apicovered                         data_control_sql_get_column_count
+ * @passcase                           When data_control_sql_get_column_count is successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_get_column_count
+//& type: auto
+int ITc_data_control_sql_data_control_sql_get_column_count_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool bResult = false;
+       
+       g_stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       g_stSqlCallBack.select_cb = DataControlSqlSelectColoumnCountResponseCb;
+       g_stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &g_stSqlCallBack, TESTSTRING);
+       PRINT_COMMON_RESULT(nRetVal, "data_control_sql_register_response_cb");
+       
+       bResult = DataControlInsertSelectSqlData();     
+       DataControlRemoveSqlData();
+       
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if(bResult == false)
+       {
+               return 1;
+       }
+       else
+       {
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_get_column_item_size_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_get_column_item_size
+ * @scenario                           Call data_control_sql_get_column_item_size
+ * @apicovered                         data_control_sql_get_column_item_size
+ * @passcase                           When data_control_sql_get_column_item_size is successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_get_column_item_size
+//& type: auto
+int ITc_data_control_sql_data_control_sql_get_column_item_size_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool bResult = false;
+       
+       g_stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       g_stSqlCallBack.select_cb = DataControlSqlSelectColoumnSizeResponseCb;
+       g_stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &g_stSqlCallBack, TESTSTRING);
+       PRINT_COMMON_RESULT(nRetVal, "data_control_sql_register_response_cb");
+       
+       bResult = DataControlInsertSelectSqlData();     
+       DataControlRemoveSqlData();
+       
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if(bResult == false)
+       {
+               return 1;
+       }
+       else
+       {
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_get_column_item_type_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_get_column_item_type
+ * @scenario                           Call data_control_sql_get_column_item_type
+ * @apicovered                         data_control_sql_get_column_item_type
+ * @passcase                           When data_control_sql_get_column_item_type is successful.
+ * @failcase                           If target API fails or any precondition API fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: API to test data_control_sql_get_column_item_type
+//& type: auto
+int ITc_data_control_sql_data_control_sql_get_column_item_type_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool bResult = false;
+       
+       g_stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       g_stSqlCallBack.select_cb = DataControlSqlSelectColoumnTypeResponseCb;
+       g_stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &g_stSqlCallBack, TESTSTRING);
+       PRINT_COMMON_RESULT(nRetVal, "data_control_sql_register_response_cb");
+       
+       bResult = DataControlInsertSelectSqlData();     
+       DataControlRemoveSqlData();
+       
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if(bResult == false)
+       {
+               return 1;
+       }
+       else
+       {
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_get_column_name_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_get_column_name
+ * @scenario                           Call data_control_sql_get_column_name
+ * @apicovered                         data_control_sql_get_column_name
+ * @passcase                           When data_control_sql_get_column_name is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_sql_get_column_name
+//& type: auto
+int ITc_data_control_sql_data_control_sql_get_column_name_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool bResult = false;
+       
+       g_stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       g_stSqlCallBack.select_cb = DataControlSqlSelectColoumnNameResponseCb;
+       g_stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &g_stSqlCallBack, TESTSTRING);
+       PRINT_COMMON_RESULT(nRetVal, "data_control_sql_register_response_cb");
+       
+       bResult = DataControlInsertSelectSqlData();     
+       DataControlRemoveSqlData();
+       
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if(bResult == false)
+       {
+               return 1;
+       }
+       else
+       {
+               return 0;
+       }
+}
+
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_step_first_last_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_step_first and data_control_sql_step_last
+ * @scenario                           Call data_control_sql_step_first\n
+ *                                                     Call data_control_sql_step_last
+ * @apicovered                         data_control_sql_step_first, data_control_sql_step_last
+ * @passcase                           When data_control_sql_step_first and data_control_sql_step_last is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_sql_step_first and data_control_sql_step_last
+//& type: auto
+int ITc_data_control_sql_data_control_sql_step_first_last_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool bResult = false;
+       
+       g_stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       g_stSqlCallBack.select_cb = DataControlSqlSelectColoumnStepFirstLastResponseCb;
+       g_stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &g_stSqlCallBack, TESTSTRING);
+       PRINT_COMMON_RESULT(nRetVal, "data_control_sql_register_response_cb");
+       
+       bResult = DataControlInsertSelectSqlData();     
+       DataControlRemoveSqlData();
+       
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if(bResult == false)
+       {
+               return 1;
+       }
+       else
+       {
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_data_control_sql_data_control_sql_step_next_previous_p
+ * @type                                       auto
+ * @description                                Test data_control_sql_step_next and data_control_sql_step_previous
+ * @scenario                           Call data_control_sql_step_next\n
+ *                                                     Call data_control_sql_step_previous
+ * @apicovered                         data_control_sql_step_next, data_control_sql_step_previous
+ * @passcase                           When data_control_sql_step_next and data_control_sql_step_previous is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test data_control_sql_step_next and data_control_sql_step_previous
+//& type: auto
+int ITc_data_control_sql_data_control_sql_step_next_previous_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool bResult = false;
+       int nRequestId = 0;
+       
+       g_stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
+       g_stSqlCallBack.select_cb = DataControlSqlSelectColoumnStepNextPreviousResponseCb;
+       g_stSqlCallBack.delete_cb = DataControlSqlRemoveResponseCb;
+       nRetVal = data_control_sql_register_response_cb(g_stSqlProvider, &g_stSqlCallBack, TESTSTRING);
+       PRINT_COMMON_RESULT(nRetVal, "data_control_sql_register_response_cb");
+       
+       bundle *pstData = bundle_create();
+       if(pstData == NULL)
+       {
+               FPRINTF("[Line : %d] [DataControl_ITC] bundle_create failed\\n", __LINE__);
+               return 1;
+       }
+       bundle_add_str(pstData, DUMMYKEY, DUMMYVALUE);
+       
+       data_control_sql_insert(g_stSqlProvider, pstData, &nRequestId);
+       bundle_free(pstData);
+       bResult = DataControlInsertSelectSqlData();     
+       DataControlRemoveSqlData();
+       
+       nRetVal = data_control_sql_unregister_response_cb(g_stSqlProvider);
+       PRINT_RESULT_NORETURN(nRetVal, "data_control_sql_unregister_response_cb");
+       
+       if(bResult == false)
+       {
+               return 1;
+       }
+       else
+       {
+               return 0;
+       }
+}
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/data-control/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm b/src/itc/data-control/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm
new file mode 100755 (executable)
index 0000000..7f7c1ea
Binary files /dev/null and b/src/itc/data-control/org.tizen.datacontrolprovider-0.0.1-1.armv7l.rpm differ
diff --git a/src/itc/data-control/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm b/src/itc/data-control/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm
new file mode 100755 (executable)
index 0000000..f25e8fd
Binary files /dev/null and b/src/itc/data-control/org.tizen.datacontrolprovider-0.0.1-1.i586.rpm differ
diff --git a/src/itc/data-control/tct-data-control-native.c b/src/itc/data-control/tct-data-control-native.c
new file mode 100755 (executable)
index 0000000..d67cd62
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-data-control-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/data-control/tct-data-control-native.h b/src/itc/data-control/tct-data-control-native.h
new file mode 100755 (executable)
index 0000000..285b3eb
--- /dev/null
@@ -0,0 +1,99 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_DATA_CONTROL_NATIVE_H__
+#define __TCT_DATA_CONTROL_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_data_control_map_startup(void);
+extern void ITs_data_control_map_cleanup(void);
+extern void ITs_data_control_provider_startup(void);
+extern void ITs_data_control_provider_cleanup(void);
+extern void ITs_data_control_sql_startup(void);
+extern void ITs_data_control_sql_cleanup(void);
+
+extern int ITc_data_control_map_data_control_map_destroy_create_p(void);
+extern int ITc_data_control_map_data_control_map_set_get_data_id_p(void);
+extern int ITc_data_control_map_data_control_map_set_get_provider_id_p(void);
+extern int ITc_data_control_map_data_control_map_register_unregister_response_cb_p(void);
+extern int ITc_data_control_map_data_control_map_add_remove_p(void);
+extern int ITc_data_control_map_data_control_map_set_get_p(void);
+extern int ITc_data_control_map_data_control_map_get_with_page_p(void);
+extern int ITc_data_control_provider_data_control_provider_create_delete_statement_p(void);
+extern int ITc_data_control_provider_data_control_provider_create_insert_statement_p(void);
+extern int ITc_data_control_provider_data_control_provider_create_update_statement_p(void);
+extern int ITc_data_control_provider_data_control_provider_create_select_statement_p(void);
+extern int ITc_data_control_provider_data_control_provider_sql_register_unregister_cb_p(void);
+extern int ITc_data_control_provider_data_control_provider_map_register_unregister_cb_p(void);
+extern int ITc_data_control_provider_data_control_provider_match_data_id_p(void);
+extern int ITc_data_control_provider_data_control_provider_match_provider_id_p(void);
+extern int ITc_data_control_sql_data_control_sql_destroy_create_p(void);
+extern int ITc_data_control_sql_data_control_sql_set_get_data_id_p(void);
+extern int ITc_data_control_sql_data_control_sql_set_get_provider_id_p(void);
+extern int ITc_data_control_sql_data_control_sql_register_unregister_response_cb_p(void);
+extern int ITc_data_control_sql_data_control_sql_insert_delete_p(void);
+extern int ITc_data_control_sql_data_control_sql_update_select_p(void);
+extern int ITc_data_control_sql_data_control_sql_select_with_page_p(void);
+extern int ITc_data_control_sql_data_control_sql_get_blob_data_p(void);
+extern int ITc_data_control_sql_data_control_sql_get_int_data_p(void);
+extern int ITc_data_control_sql_data_control_sql_get_int64_data_p(void);
+extern int ITc_data_control_sql_data_control_sql_get_text_data_p(void);
+extern int ITc_data_control_sql_data_control_sql_get_double_data_p(void);
+extern int ITc_data_control_sql_data_control_sql_get_column_count_p(void);
+extern int ITc_data_control_sql_data_control_sql_get_column_item_size_p(void);
+extern int ITc_data_control_sql_data_control_sql_get_column_item_type_p(void);
+extern int ITc_data_control_sql_data_control_sql_get_column_name_p(void);
+extern int ITc_data_control_sql_data_control_sql_step_first_last_p(void);
+extern int ITc_data_control_sql_data_control_sql_step_next_previous_p(void);
+
+testcase tc_array[] = {
+    {"ITc_data_control_map_data_control_map_destroy_create_p", ITc_data_control_map_data_control_map_destroy_create_p, ITs_data_control_map_startup, ITs_data_control_map_cleanup},
+    {"ITc_data_control_map_data_control_map_set_get_data_id_p", ITc_data_control_map_data_control_map_set_get_data_id_p, ITs_data_control_map_startup, ITs_data_control_map_cleanup},
+    {"ITc_data_control_map_data_control_map_set_get_provider_id_p", ITc_data_control_map_data_control_map_set_get_provider_id_p, ITs_data_control_map_startup, ITs_data_control_map_cleanup},
+    {"ITc_data_control_map_data_control_map_register_unregister_response_cb_p", ITc_data_control_map_data_control_map_register_unregister_response_cb_p, ITs_data_control_map_startup, ITs_data_control_map_cleanup},
+    {"ITc_data_control_map_data_control_map_add_remove_p", ITc_data_control_map_data_control_map_add_remove_p, ITs_data_control_map_startup, ITs_data_control_map_cleanup},
+    {"ITc_data_control_map_data_control_map_set_get_p", ITc_data_control_map_data_control_map_set_get_p, ITs_data_control_map_startup, ITs_data_control_map_cleanup},
+    {"ITc_data_control_map_data_control_map_get_with_page_p", ITc_data_control_map_data_control_map_get_with_page_p, ITs_data_control_map_startup, ITs_data_control_map_cleanup},
+    {"ITc_data_control_provider_data_control_provider_create_delete_statement_p", ITc_data_control_provider_data_control_provider_create_delete_statement_p, ITs_data_control_provider_startup, ITs_data_control_provider_cleanup},
+    {"ITc_data_control_provider_data_control_provider_create_insert_statement_p", ITc_data_control_provider_data_control_provider_create_insert_statement_p, ITs_data_control_provider_startup, ITs_data_control_provider_cleanup},
+    {"ITc_data_control_provider_data_control_provider_create_update_statement_p", ITc_data_control_provider_data_control_provider_create_update_statement_p, ITs_data_control_provider_startup, ITs_data_control_provider_cleanup},
+    {"ITc_data_control_provider_data_control_provider_create_select_statement_p", ITc_data_control_provider_data_control_provider_create_select_statement_p, ITs_data_control_provider_startup, ITs_data_control_provider_cleanup},
+    {"ITc_data_control_provider_data_control_provider_sql_register_unregister_cb_p", ITc_data_control_provider_data_control_provider_sql_register_unregister_cb_p, ITs_data_control_provider_startup, ITs_data_control_provider_cleanup},
+    {"ITc_data_control_provider_data_control_provider_map_register_unregister_cb_p", ITc_data_control_provider_data_control_provider_map_register_unregister_cb_p, ITs_data_control_provider_startup, ITs_data_control_provider_cleanup},
+    {"ITc_data_control_provider_data_control_provider_match_data_id_p", ITc_data_control_provider_data_control_provider_match_data_id_p, ITs_data_control_provider_startup, ITs_data_control_provider_cleanup},
+    {"ITc_data_control_provider_data_control_provider_match_provider_id_p", ITc_data_control_provider_data_control_provider_match_provider_id_p, ITs_data_control_provider_startup, ITs_data_control_provider_cleanup},
+    {"ITc_data_control_sql_data_control_sql_destroy_create_p", ITc_data_control_sql_data_control_sql_destroy_create_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_set_get_data_id_p", ITc_data_control_sql_data_control_sql_set_get_data_id_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_set_get_provider_id_p", ITc_data_control_sql_data_control_sql_set_get_provider_id_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_register_unregister_response_cb_p", ITc_data_control_sql_data_control_sql_register_unregister_response_cb_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_insert_delete_p", ITc_data_control_sql_data_control_sql_insert_delete_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_update_select_p", ITc_data_control_sql_data_control_sql_update_select_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_select_with_page_p", ITc_data_control_sql_data_control_sql_select_with_page_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_get_blob_data_p", ITc_data_control_sql_data_control_sql_get_blob_data_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_get_int_data_p", ITc_data_control_sql_data_control_sql_get_int_data_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_get_int64_data_p", ITc_data_control_sql_data_control_sql_get_int64_data_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_get_text_data_p", ITc_data_control_sql_data_control_sql_get_text_data_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_get_double_data_p", ITc_data_control_sql_data_control_sql_get_double_data_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_get_column_count_p", ITc_data_control_sql_data_control_sql_get_column_count_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_get_column_item_size_p", ITc_data_control_sql_data_control_sql_get_column_item_size_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_get_column_item_type_p", ITc_data_control_sql_data_control_sql_get_column_item_type_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_get_column_name_p", ITc_data_control_sql_data_control_sql_get_column_name_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_step_first_last_p", ITc_data_control_sql_data_control_sql_step_first_last_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {"ITc_data_control_sql_data_control_sql_step_next_previous_p", ITc_data_control_sql_data_control_sql_step_next_previous_p, ITs_data_control_sql_startup, ITs_data_control_sql_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_DATA_CONTROL_NATIVE_H__
diff --git a/src/itc/device/CMakeLists.txt b/src/itc/device/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..0c87124
--- /dev/null
@@ -0,0 +1,41 @@
+SET(PKG_NAME "device")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-system-device")
+SET(TC_SOURCES
+       ITs-device.c
+       ITs-device-common.c
+       ITs-device_haptic.c
+       ITs-device_battery.c
+       ITs-device_display.c
+       ITs-device_led.c
+       ITs-device_power.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       bundle
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/device/ITs-device-common.c b/src/itc/device/ITs-device-common.c
new file mode 100755 (executable)
index 0000000..d727b06
--- /dev/null
@@ -0,0 +1,370 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-device-common.h"
+
+/** @addtogroup itc-device
+*  @ingroup itc
+*  @{
+*/
+
+/**
+* @function            DeviceGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* DeviceGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch (nRet)
+       {
+               case DEVICE_ERROR_NONE:
+                       szErrorVal = "DEVICE_ERROR_NONE";
+                       break;
+               case DEVICE_ERROR_OPERATION_FAILED:
+                       szErrorVal = "DEVICE_ERROR_OPERATION_FAILED";
+                       break;
+               case DEVICE_ERROR_PERMISSION_DENIED:
+                       szErrorVal = "DEVICE_ERROR_PERMISSION_DENIED";
+                       break;
+               case DEVICE_ERROR_INVALID_PARAMETER:
+                       szErrorVal = "DEVICE_ERROR_INVALID_PARAMETER";
+                       break;
+               case DEVICE_ERROR_ALREADY_IN_PROGRESS:
+                       szErrorVal = "DEVICE_ERROR_ALREADY_IN_PROGRESS";
+                       break;
+               case DEVICE_ERROR_NOT_SUPPORTED:
+                       szErrorVal = "DEVICE_ERROR_NOT_SUPPORTED";
+                       break;
+               case DEVICE_ERROR_NOT_INITIALIZED:
+                       szErrorVal = "DEVICE_ERROR_NOT_INITIALIZED";
+                       break;
+               default:
+                       szErrorVal = "Unknown Error";
+                       break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            DeviceGetCallbackType
+* @description         Maps callback type to string values
+* @parameter           type : callback type
+* @return                      string value of callback type
+*/
+char* DeviceGetCallbackType(int type)
+{
+       char* szType = NULL;
+       
+       switch (type)
+       {
+               case DEVICE_CALLBACK_BATTERY_CAPACITY:
+                       szType = "DEVICE_CALLBACK_BATTERY_CAPACITY";
+                       break;
+               case DEVICE_CALLBACK_BATTERY_LEVEL:
+                       szType = "DEVICE_CALLBACK_BATTERY_LEVEL";
+                       break;
+               case DEVICE_CALLBACK_BATTERY_CHARGING:
+                       szType = "DEVICE_CALLBACK_BATTERY_CHARGING";
+                       break;
+               case DEVICE_CALLBACK_DISPLAY_STATE:
+                       szType = "DEVICE_CALLBACK_DISPLAY_STATE";
+                       break;
+               case DEVICE_CALLBACK_MAX:
+                       szType = "DEVICE_CALLBACK_MAX";
+                       break;
+               default:
+                       szType = "Unknown Type";
+                       break;
+       }
+       
+       return szType;
+}
+
+/**
+* @function            DeviceGetDisplayState
+* @description         Maps display state to string values
+* @parameter           state : display state
+* @return                      string value of display state
+*/
+char* DeviceGetDisplayState(int state)
+{
+       char* szDisplayState = NULL;
+       
+       switch (state)
+       {
+               case DISPLAY_STATE_NORMAL:
+                       szDisplayState = "DISPLAY_STATE_NORMAL";
+                       break;
+               case DISPLAY_STATE_SCREEN_DIM:
+                       szDisplayState = "DISPLAY_STATE_SCREEN_DIM";
+                       break;
+               case DISPLAY_STATE_SCREEN_OFF:
+                       szDisplayState = "DISPLAY_STATE_SCREEN_OFF";
+                       break;
+               default:
+                       szDisplayState = "Unknown State";
+                       break;
+       }
+       
+       return szDisplayState;
+}
+                       
+/**
+* @function            DeviceGetLedFlag
+* @description         Maps led flag value to string values
+* @parameter           flag : led flag value
+* @return                      string value of led flag value
+*/
+char* DeviceGetLedFlag(int flag)
+{
+       char* szFlag = NULL;
+       
+       if ( flag == LED_CUSTOM_DUTY_ON )
+       {
+                       szFlag = "LED_CUSTOM_DUTY_ON";
+       }
+       else if ( flag == LED_CUSTOM_DEFAULT )
+       {
+               szFlag = "LED_CUSTOM_DEFAULT";
+       }
+       else
+       {
+               szFlag = "Unknown Flag";
+       }
+       
+       return szFlag;
+}
+
+/**
+* @function            DeviceGetPowerLock
+* @description         Maps power lock value to string values
+* @parameter           flag : power lock value
+* @return                      string value of power lock value
+*/
+char* DeviceGetPowerLock(int lock)
+{
+       char* szLock = NULL;
+       
+       switch (lock)
+       {
+               case POWER_LOCK_CPU:
+                       szLock = "POWER_LOCK_CPU";
+                       break;
+               case POWER_LOCK_DISPLAY:
+                       szLock = "POWER_LOCK_DISPLAY";
+                       break;
+               default:
+                       szLock = "Unknown Lock";
+                       break;
+       }
+       
+       return szLock;
+}
+
+/**
+* @function                    DeviceGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter           pszAPIMemory: String pointer containing the difference of total number of bytes for Current and Previous Memory Allocation.
+* @return                      NA
+*/
+void DeviceGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stDeviceMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stDeviceMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stDeviceMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    DeviceGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @parameter           NA
+* @return                      NA
+*/
+inline void DeviceGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stDeviceMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           DeviceExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter          pszAPITime: String pointer containing the time difference
+ * @return                     NA
+ *
+ */
+void DeviceExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stDeviceStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stDeviceStartTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+/**
+ * @function           DeviceFreeMemory
+ * @description                Function to free the memory allocated
+ * @parameter          pszMem1, pszMem2, pszMem3 [ pointers to allocated memory]
+ * @return                     NA
+ *
+ */ 
+void DeviceFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+}
+
+/**
+ * @function           DeviceGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stDeviceStartTime
+ * @parameter          NA
+ * @return                     NA
+ *
+ */ 
+void DeviceGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stDeviceStartTime, NULL);
+#endif
+}
+
+/**
+ * @function           DeviceTimeout
+ * @description                Called if some callback is not invoked for a particular DeviceTimeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */ 
+gboolean DeviceTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               g_main_loop_unref(pMainLoop);
+               pMainLoop = NULL;
+       }
+       FPRINTF("[Line : %d][device_ITC] Callback DeviceTimeout\\n", __LINE__);
+       return false;
+}
+
+/**
+ * @function           Device_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Device_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("[Line : %d][device_ITC] Null key value passed to function : Device_Check_System_Info_Feature_Supported\\n",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool(pszKey, &bValue);
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][device_ITC] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n",__LINE__, Device_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("[Line : %d][device_ITC] system_info_get_platform_bool returned unsupported feature capability for (key = %s)\\n", __LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][device_ITC] system_info_get_platform_bool returned supported status feature for (key = %s)\\n", __LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           Device_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Device_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            szErrorVal = "SYSTEM_INFO_ERROR_NONE";                          break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER";     break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR";                      break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY";         break;
+               default:                                                                        szErrorVal = "Unknown error";                                           break;
+       }
+
+       return szErrorVal;
+}
+/** @} */
\ No newline at end of file
diff --git a/src/itc/device/ITs-device-common.h b/src/itc/device/ITs-device-common.h
new file mode 100755 (executable)
index 0000000..41af71d
--- /dev/null
@@ -0,0 +1,164 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_DEVICE_COMMON_H_
+#define _ITS_DEVICE_COMMON_H_
+
+//Add test package related includes here
+
+#include "assert.h"
+
+#include <device/battery.h>
+#include <device/callback.h>
+#include <device/display.h>
+#include <device/haptic.h>
+#include <device/led.h>
+#include <device/power.h>
+#include <system_info.h>
+
+#include <glib.h>
+#include <malloc.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+/** @addtogroup itc-device
+*  @ingroup itc
+*  @{
+*/
+
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define TIMEOUT_CB                                     5000
+#define LED_FEATURE                                    "http://tizen.org/feature/led"
+#define DISPLAY_FEATURE             "http://tizen.org/feature/camera.back.flash"
+
+
+FILE *g_fpLog;
+
+GMainLoop *g_pDeviceMainLoop;
+struct timeval g_stDeviceStartTime;
+struct mallinfo g_stDeviceMemInfo;
+
+typedef struct speedmemory
+{
+       char *pszMemLog;
+       char *pszAPI1SpeedLog;
+       char *pszAPI2SpeedLog;
+} DeviceSpeedMemoryLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][device_ITC] Starting test : %s\\n", __LINE__, __FUNCTION__);\
+}
+
+#define PRINT_STABILITY_LOG(api, nFailCount, nTotalCount) \
+       FPRINTF("[Line : %d][device_ITC] [%s] FAIL-COUNT: %d, NO.OF.ITERATION: %d\\n", __LINE__, #api, nFailCount, nTotalCount);
+       
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF("[Line : %d][device_ITC] %s passed\\n", __LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][device_ITC] %s failed, error returned = %s\\n", __LINE__, API, DeviceGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define DEVICE_INITIALISE_MEM_LOG(nEnumSize) \
+       stSpeedMemoryLog.pszMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+
+#define DEVICE_INITIALISE_SPEED_LOGS(nEnumSize) {\
+       stSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));\
+       stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));\
+}
+
+#define DEVICE_DEINITIALISE_LOGS {\
+       if ( stSpeedMemoryLog.pszMemLog != NULL )\
+       {\
+               free(stSpeedMemoryLog.pszMemLog);\
+               stSpeedMemoryLog.pszMemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI1SpeedLog != NULL )\
+       {\
+               free (stSpeedMemoryLog.pszAPI1SpeedLog);\
+               stSpeedMemoryLog.pszAPI1SpeedLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2SpeedLog != NULL )\
+       {\
+               free (stSpeedMemoryLog.pszAPI2SpeedLog);\
+               stSpeedMemoryLog.pszAPI2SpeedLog = NULL;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d][device_ITC] %s_MemoryLeakStatus - %s\\n", __LINE__, #api, memLog);\
+       }
+
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d][device_ITC] %s_TimeInMicrosec- %s\\n", __LINE__, #api, speedLog);\
+       }
+
+#define RUN_POLLING_LOOP {\
+       g_pDeviceMainLoop = g_main_loop_new(NULL, false);\
+       nDeviceTimeoutId = g_timeout_add(TIMEOUT_CB, DeviceTimeout, g_pDeviceMainLoop);\
+       g_main_loop_run(g_pDeviceMainLoop);\
+       g_source_remove(nDeviceTimeoutId);\
+       g_pDeviceMainLoop = NULL;\
+}
+
+//Add helper function declarations here
+
+char* DeviceGetError(int nRet);
+char* DeviceGetCallbackType(int type);
+char* DeviceGetDisplayState(int state);
+char* DeviceGetLedFlag(int flag);
+char* DeviceGetPowerLock(int lock);
+
+void DeviceGetMemAllocation();
+void DeviceExecutionDelay(char* pszAPITime);
+void DeviceGetTimeOfDay();
+void DeviceGetMemStatus(char *pszAPIMemory);
+void DeviceFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3);
+gboolean DeviceTimeout(gpointer data);
+
+bool Device_Check_System_Info_Feature_Supported(char* pszKey);
+char* Device_System_Info_GetError(int nRet);
+
+/** @} */
+#endif  //_ITS_DEVICE_COMMON_H_
diff --git a/src/itc/device/ITs-device.c b/src/itc/device/ITs-device.c
new file mode 100755 (executable)
index 0000000..25b76ed
--- /dev/null
@@ -0,0 +1,314 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-device-common.h"
+
+/** @addtogroup itc-device
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Device
+
+bool g_ReturnValueState;
+bool g_bDeviceChangedCallback;
+
+/**
+* @function            ITs_device_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_device_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT start-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+       return;
+}
+
+/**
+* @function            ITs_device_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_device_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT clean-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+       return;
+}
+
+/**
+* @function                    DeviceChangedCallback
+* @description         Called when the battery state changes.
+* @parameter           type: The device type to monitor; value: The changed value; user_data: The user data passed from the callback registration
+* @return                      NA
+*/
+void DeviceChangedCallback(device_callback_e type, void *value, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] DeviceChangedCallback is called \\n", __LINE__);
+#endif
+       g_bDeviceChangedCallback = true;
+       if (g_pDeviceMainLoop)
+       {
+               g_main_loop_quit(g_pDeviceMainLoop);
+               g_main_loop_unref(g_pDeviceMainLoop);
+               g_pDeviceMainLoop = NULL;
+       }
+
+       g_ReturnValueState = false;
+       int val = (int) value;
+       switch ( type ) {
+               case DEVICE_CALLBACK_BATTERY_CAPACITY:
+                       if ( val >= 0 ) {
+                               g_ReturnValueState = true;
+                       }
+                       break;
+               case DEVICE_CALLBACK_BATTERY_LEVEL:
+                       switch ( val ) {
+               case DEVICE_BATTERY_LEVEL_EMPTY:
+               case DEVICE_BATTERY_LEVEL_CRITICAL:
+               case DEVICE_BATTERY_LEVEL_LOW:
+               case DEVICE_BATTERY_LEVEL_HIGH:
+               case DEVICE_BATTERY_LEVEL_FULL:
+                       g_ReturnValueState = true;
+                       break;
+               default:
+                       g_ReturnValueState = false;
+                       break;
+                       }
+                       break;
+               case DEVICE_CALLBACK_BATTERY_CHARGING:
+                       if ( val == 0 || val == 1 ) {
+                               g_ReturnValueState = true;
+                       }
+                       break;
+               case DEVICE_CALLBACK_DISPLAY_STATE:
+                       if ( val >= 0 ) {
+                               g_ReturnValueState = true;
+                       }
+                       break;
+               case DEVICE_CALLBACK_MAX:
+                       break;
+       }
+
+       return;
+}
+
+/** @addtogroup itc-device-testcases
+*  @brief              Integration testcases for module device
+*  @ingroup    itc-device
+*  @{
+*/
+
+//& purpose: To add and remove the callback to observe device change status.
+//& type: auto
+/**
+ * @testcase                           ITc_device_add_remove_callback_p
+ * @type                                       auto
+ * @description                                To add and remove the callback to observe device change status.
+ * @scenario                           Add the callback to observe device\n
+ *                                     Remove the callback
+ * @apicovered                         device_add_callback, device_remove_callback
+ * @passcase                           When device_add_callback and device_remove_callback is successful.
+ * @failcase                           If target api device_add_callback or device_remove_callback or any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_device_add_remove_callback_p(void)
+{
+       START_TEST;
+       
+       int nRet = 0, nLoopCount = 0, nDeviceTimeoutId = 0;
+       int nAddFailCount = 0, nRemoveFailCount = 0;
+       device_callback_e callback_type[] = { DEVICE_CALLBACK_BATTERY_CAPACITY,
+                                       DEVICE_CALLBACK_BATTERY_LEVEL,
+                                       DEVICE_CALLBACK_BATTERY_CHARGING,
+                                       DEVICE_CALLBACK_DISPLAY_STATE,
+                                       /*DEVICE_CALLBACK_MAX*/ };
+                                       
+       int enum_size = sizeof(callback_type) / sizeof(callback_type[0]);
+       int enum_counter = 0;
+
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK       
+       DEVICE_INITIALISE_MEM_LOG(enum_size);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(enum_size);
+#endif
+
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       DeviceGetMemAllocation();
+                       DeviceGetTimeOfDay();
+
+                       // Target API
+                       nRet = device_add_callback(callback_type[enum_counter], DeviceChangedCallback, NULL);
+
+                       DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+
+                       if ( nRet != DEVICE_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_add_callback failed on iteration %d for enum = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, DeviceGetCallbackType(callback_type[enum_counter]), DeviceGetError(nRet));
+                               nAddFailCount++;
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_add_callback succeeded on iteration %d for enum = %s\\n",
+                                       __LINE__, nLoopCount, DeviceGetCallbackType(callback_type[enum_counter]));
+                       }
+                       
+                       //Change display state when checking callback for DEVICE_CALLBACK_DISPLAY_STATE
+                       display_state_e display_state;
+                       if ( callback_type[enum_counter] == DEVICE_CALLBACK_DISPLAY_STATE )
+                       {
+                               g_bDeviceChangedCallback = false;
+                               g_ReturnValueState = false;
+                       
+                               //Get current display state
+                               device_display_get_state(&display_state);
+                               
+                               display_state_e display_states[] = { DISPLAY_STATE_NORMAL, DISPLAY_STATE_SCREEN_DIM, DISPLAY_STATE_SCREEN_OFF };
+                               int states_size = sizeof(display_states) / sizeof(display_states[0]);
+                               int states_counter = 0;
+                               for ( states_counter = 0; states_counter < states_size; states_counter++ )
+                               {
+                                       // Make change to the current display state
+                                       //if ( display_state != display_states[states_counter] && device_display_change_state(display_states[states_counter]) == 0 )
+                                       //{
+                                       //      break;
+                                       //}
+                                       
+                                       if ( display_state != display_states[states_counter] )
+                                       {
+                                               nRet = device_display_change_state(display_states[states_counter]);
+                                               if ( nRet != DEVICE_ERROR_NONE )
+                                               {
+                                                       FPRINTF("[Line : %d][device_ITC] device_display_change_state failed on iteration %d , error returned = %s\\n",
+                                                               __LINE__, nLoopCount,  DeviceGetError(nRet));
+                                                       nAddFailCount++;
+                                               }
+                                               else
+                                               {
+                                                       break;
+                                               }
+                                       }
+                               }
+                               
+                               RUN_POLLING_LOOP;
+                       
+                               if ( g_bDeviceChangedCallback == false )
+                               {
+                                       FPRINTF("[Line : %d][device_ITC] device_add_callback failed. Callback not invoked on iteration = %d for enum = %s\\n",
+                                               __LINE__, nLoopCount, DeviceGetCallbackType(callback_type[enum_counter]));
+                                       nAddFailCount++;
+                               }
+                               else if (g_ReturnValueState == false)
+                               {
+                                       FPRINTF("[Line : %d][device_ITC] device_add_callback failed. Callback returned invalid value on iteration = %d for enum = %s\\n",
+                                               __LINE__, nLoopCount, DeviceGetCallbackType(callback_type[enum_counter]));
+                                       nAddFailCount++;
+                               }
+                       }
+                       
+                       
+                       DeviceGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = device_remove_callback(callback_type[enum_counter], DeviceChangedCallback);
+
+                       DeviceExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+                       DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+
+                       if ( nRet != DEVICE_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_remove_callback failed on iteration %d for enum = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, DeviceGetCallbackType(callback_type[enum_counter]), DeviceGetError(nRet));
+                               nRemoveFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_remove_callback succeeded on iteration %d for enum = %s\\n",
+                                       __LINE__, nLoopCount, DeviceGetCallbackType(callback_type[enum_counter]));
+                       }
+                       
+                       //Change display state when checking callback for DEVICE_CALLBACK_DISPLAY_STATE
+                       if ( callback_type[enum_counter] == DEVICE_CALLBACK_DISPLAY_STATE )
+                       {
+                               g_bDeviceChangedCallback = false;
+                               
+                               // Make change to the current display state
+                               nRet = device_display_change_state(display_state);
+                               if ( nRet != DEVICE_ERROR_NONE )
+                               {
+                                       FPRINTF("[Line : %d][device_ITC] device_display_change_state failed on iteration %d for enum = %s, error returned = %s\\n",
+                                               __LINE__, nLoopCount, DeviceGetCallbackType(callback_type[enum_counter]), DeviceGetError(nRet));
+                                       nRemoveFailCount++;
+                               }
+                               RUN_POLLING_LOOP;
+                               
+                               if ( g_bDeviceChangedCallback == true )
+                               {
+                                       FPRINTF("[Line : %d][device_ITC] device_remove_callback. Callback invoked on iteration = %d for enum = %s\\n",
+                                               __LINE__, nLoopCount, DeviceGetCallbackType(callback_type[enum_counter]));
+                                       nRemoveFailCount++;
+                               }
+                       }
+               }
+       }
+       
+       int nTotalCount = enum_size * MAX_COUNT;
+       PRINT_STABILITY_LOG(device_add_callback, nAddFailCount, nTotalCount);
+       PRINT_STABILITY_LOG(device_remove_callback, nRemoveFailCount, nTotalCount);
+
+       if ( nAddFailCount > 0 || nRemoveFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_add_callback, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(device_remove_callback , stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_add_remove_callback, stSpeedMemoryLog.pszMemLog);
+#endif
+
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+/** @} */
+/** @} */
diff --git a/src/itc/device/ITs-device_battery.c b/src/itc/device/ITs-device_battery.c
new file mode 100755 (executable)
index 0000000..9360bbb
--- /dev/null
@@ -0,0 +1,316 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-device-common.h"
+
+/** @addtogroup itc-device
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Device
+
+bool g_bDeviceBatteryLevelCallback;
+bool g_bDeviceBatteryWarnCallback;
+bool g_bDeviceBatteryCallback;
+bool g_bDeviceBatteryRemainingTimeChangedCallback;
+
+/**
+* @function            ITs_device_battery_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_device_battery_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT start-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+       return;
+}
+
+/**
+ * @function           ITs_device_battery_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_device_battery_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT clean-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+       return;
+}
+
+/** @addtogroup itc-device-battery-testcases
+*  @brief              Integration testcases for module device-battery
+*  @ingroup    itc-device-battery
+*  @{
+*/
+
+//& purpose: To get the battery charge percentage. 
+//& type: auto
+/**
+ * @testcase                           ITc_device_battery_get_percent_p
+ * @type                                       auto
+ * @description                                To get the battery charge percentage. 
+ * @scenario                           get the percentage of battery
+ * @apicovered                         device_battery_get_percent                              
+ * @passcase                           When device_battery_get_percent  is successful.
+ * @failcase                           If target api device_battery_get_percent any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_device_battery_get_percent_p(void)
+{
+       START_TEST;
+    int nRet = 0, nLoopCount = 0;
+       int nPercent = 0;
+       int nFailCount = 0;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               nRet = device_battery_get_percent(&nPercent);
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_battery_get_percent is unsuccessful on iteration = %d, error returned = %s\\n",
+                               __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nFailCount ++;
+               }
+               else if ((0 > nPercent) || (nPercent > 100))
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_battery_get_percent returned invalid value on iteration %d, returned value = %d\\n",
+                               __LINE__, nLoopCount, nPercent);
+                       nFailCount ++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][device_ITC] device_battery_get_percent is successful\\n", __LINE__);
+#endif
+               }
+       }
+       
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_battery_get_percent, nFailCount, nTotalCount);
+
+       if ( nFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_battery_get_percent, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_battery_get_percent, stSpeedMemoryLog.pszMemLog);
+#endif
+
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& purpose: To check whether the battery is fully charged.
+//& type: auto
+/**
+ * @testcase                           ITc_device_battery_is_charging_p
+ * @type                                       auto
+ * @description                                To check whether the battery is fully charged. 
+ * @scenario                           checks for battery of device whether fully charged or not
+ * @apicovered                         device_battery_is_charging                              
+ * @passcase                           When device_battery_is_charging  is successful.
+ * @failcase                           If target api device_battery_is_charging any precondition api fails.
+ * @precondition                       USB should be connected to target device.
+ * @postcondition                      NA
+ * 
+ */
+int ITc_device_battery_is_charging_p(void)
+{
+       START_TEST;
+    int nRet = 0, nLoopCount = 0;
+       int nFailCount = 0;
+       bool bCharging;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               nRet = device_battery_is_charging(&bCharging);
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_battery_is_charging is unsuccessful on iteration = %d, error returned = %s\\n",
+                               __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nFailCount ++;
+               }
+               /*else if ( bCharging == false )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_battery_is_charging returns incorrect value on iteration = %d, charging status returned = Not Charging\\n",
+                               __LINE__, nLoopCount);
+                       nFailCount ++;
+               }*/
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][device_ITC] device_battery_is_charging is successful\\n", __LINE__);
+#endif
+               }
+       }
+
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_battery_is_charging, nFailCount, nTotalCount);
+
+       if ( nFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_battery_is_charging, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_battery_is_charging, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& purpose: To get the battery level status. 
+//& type: auto
+/**
+ * @testcase                           ITc_device_battery_get_level_status_p
+ * @type                                       auto
+ * @description                                To get the battery level status. 
+ * @scenario                           Plug the device for getting charged
+ * @apicovered                         device_battery_get_level_status                         
+ * @passcase                           When device_battery_get_level_status  is successful.
+ * @failcase                           If target api device_battery_get_level_status any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_device_battery_get_level_status_p(void)
+{
+       START_TEST;
+    int nRet = 0, nLoopCount = 0;
+       int nFailCount = 0;
+       device_battery_level_e eDeviceBatteryLevel;
+
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               nRet = device_battery_get_level_status(&eDeviceBatteryLevel);
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_battery_get_level_status is unsuccessful on iteration = %d, error returned = %s\\n",
+                               __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nFailCount ++;
+               }
+               else if (eDeviceBatteryLevel == DEVICE_BATTERY_LEVEL_EMPTY)
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_battery_get_level_status is unsuccessful on iteration  = %d with battery level empty\\n",
+                               __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][device_ITC] device_battery_get_level_status is successful\\n", __LINE__);
+#endif
+               }
+       }
+
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_battery_get_level_status, nFailCount, nTotalCount);
+       
+       if ( nFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_battery_get_level_status, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_battery_get_level_status, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/device/ITs-device_display.c b/src/itc/device/ITs-device_display.c
new file mode 100755 (executable)
index 0000000..5512cad
--- /dev/null
@@ -0,0 +1,495 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-device-common.h"
+
+/** @addtogroup itc-device
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Device
+
+/**
+* @function            ITs_device_display_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_device_display_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT start-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+       return;
+}
+
+/**
+* @function            ITs_device_display_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_device_display_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT clean-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+       return;
+}
+
+/** @addtogroup itc-device-display-testcases
+*  @brief              Integration testcases for module device-display
+*  @ingroup itc-device-display
+*  @{
+*/
+
+//& purpose: To get the number of display devices
+//& type: auto
+/**
+ * @testcase                           ITc_device_display_get_numbers_p
+ * @type                                       auto
+ * @description                                To get the number of display devices 
+ * @scenario                           returns the number of display devices that display provides
+ * @apicovered                         device_display_get_numbers                              
+ * @passcase                           When device_display_get_numbers is successful.
+ * @failcase                           If target api device_display_get_numbers any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_device_display_get_numbers_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount = 0;
+       int nFailCount = 0;
+       int nDeviceNumber;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_display_get_numbers(&nDeviceNumber);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_display_get_numbers is unsuccessful on iteration = %d, error returned = %s\\n",
+                               __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][device_ITC] device_display_get_numbers is successful with total no of devices connected = %d\\n",
+                               __LINE__, nDeviceNumber);
+#endif
+               }
+       }
+
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_display_get_numbers, nFailCount, nTotalCount);
+
+       if ( nFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_display_get_numbers, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_display_get_numbers, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& purpose: To get the maximum brightness value that can be set
+//& type: auto
+/**
+ * @testcase                           ITc_device_display_get_max_brightness_p
+ * @type                                       auto
+ * @description                                To get the maximum brightness value that can be set. 
+ * @scenario                           Get the maximum brightness value
+ * @apicovered                         device_display_get_max_brightness                               
+ * @passcase                           When device_display_get_max_brightness is successful.
+ * @failcase                           If target api device_display_get_max_brightness any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_device_display_get_max_brightness_p(void)
+{
+       START_TEST;
+       
+       int nRet = 0, nLoopCount = 0;
+       int nFailCount = 0;
+    int nDisplayIndex = 0;
+       int nMaximumBrightness = 0;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_display_get_max_brightness(nDisplayIndex, &nMaximumBrightness);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_display_get_max_brightness is unsuccessful on iteration = %d, error returned = %s\\n",
+                               __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nFailCount++;
+               }
+               else if ( nMaximumBrightness < 0 )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_display_get_brightness is unsuccessful on iteration = %d,and brightness value = %d\\n",
+                               __LINE__, nLoopCount, nMaximumBrightness);
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][device_ITC] device_display_get_brightness is successful with brightness value = %d\\n",
+                               __LINE__, nMaximumBrightness);
+#endif
+               }
+       }
+
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_display_get_max_brightness, nFailCount, nTotalCount);
+
+       if ( nFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_display_get_max_brightness, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_display_get_max_brightness, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& purpose: To set and get the display brightness value
+//& type: auto
+/**
+ * @testcase                           ITc_device_display_set_get_brightness_p
+ * @type                                       auto
+ * @description                                To set and get the display brightness value
+ * @scenario                           Set the display index\n
+                            Get value of display brightness
+ * @apicovered                         device_display_set_brightness, device_display_get_brightness
+ * @passcase                           When device_display_set_brightness and device_display_get_brightness are successful.
+ * @failcase                           If target api device_display_set_brightness or device_display_get_brightness or any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_device_display_set_get_brightness_p(void)
+{
+       START_TEST;
+    int nRet = 0, nLoopCount = 0;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+    int nDisplayIndex = 0;
+       
+       //Precondition
+       int nMaximumBrightness = 0;
+       nRet = device_display_get_max_brightness(nDisplayIndex, &nMaximumBrightness);
+       if ( nRet != DEVICE_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][device_ITC] precondition failed to get the maximum brightness value that can be set, error returned = %s\\n",
+                       __LINE__, DeviceGetError(nRet));
+               return 1;
+       }
+       
+       int nSetBrightness = nMaximumBrightness;
+       int nGetBrigntness = 0;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_display_set_brightness(nDisplayIndex, nSetBrightness);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_display_set_brightness is unsuccessful on iteration = %d, error returned = %s\\n",
+                               __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][device_ITC] device_display_set_brightness is successful with brightness value = %d\\n",
+                               __LINE__, nSetBrightness);
+#endif
+               }
+               
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_display_get_brightness(nDisplayIndex, &nGetBrigntness);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_display_get_brightness is unsuccessful on iteration = %d, error returned = %s\\n",
+                               __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nGetFailCount++;
+               }
+               else if ( nGetBrigntness != nSetBrightness )
+               {
+                       FPRINTF("[Line : %d][device_ITC] Set/Get brightness values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount ++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][device_ITC] device_display_get_brightness is successful with brightness value = %d\\n", __LINE__, nGetBrigntness);
+#endif
+               }
+               
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               
+               //Reset the brightness value
+               device_display_set_brightness(nDisplayIndex, 0);
+       }
+       
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_display_set_brightness, nSetFailCount, nTotalCount);
+       PRINT_STABILITY_LOG(device_display_get_brightness, nGetFailCount, nTotalCount);
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_display_set_brightness, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(device_display_get_brightness, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_display_set_get_brightness, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& purpose: To change and get the display state
+//& type: auto
+/**
+ * @testcase                           ITc_device_display_change_get_state_p
+ * @type                                       auto
+ * @description                                To change and get the display state
+ * @scenario                           Change the display state\n
+                            Get the display state
+ * @apicovered                         device_display_change_state, device_display_get_state
+ * @passcase                           When device_display_change_state and device_display_get_state are successful.
+ * @failcase                           If target api device_display_change_state or device_display_get_state or any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_device_display_change_get_state_p(void)
+{
+       START_TEST;
+    int nRet = 0, nLoopCount = 0;
+       int nChangeFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+       display_state_e getDisplayState;
+       display_state_e display_states[] = { DISPLAY_STATE_NORMAL,
+                                       DISPLAY_STATE_SCREEN_DIM,
+                                       DISPLAY_STATE_SCREEN_OFF };
+                                       
+       int enum_size = sizeof(display_states) / sizeof(display_states[0]);
+       int enum_counter = 0;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(enum_size);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(enum_size);
+#endif
+
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       DeviceGetMemAllocation();
+                       DeviceGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = device_display_change_state(display_states[enum_counter]);
+                       
+                       DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       
+                       if ( nRet != DEVICE_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_display_change_state is unsuccessful on iteration = %d for enum = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, DeviceGetDisplayState(display_states[enum_counter]), DeviceGetError(nRet));
+                               nChangeFailCount++;
+                               continue;
+                       }
+                       else
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d][device_ITC] device_display_change_state is successful on iteration = %d for enum = %s\\n",
+                                       __LINE__, nLoopCount, DeviceGetDisplayState(display_states[enum_counter]));
+#endif
+                       }
+                       
+                       DeviceGetTimeOfDay();
+                       
+                       sleep(2);
+                       // Target API
+                       nRet = device_display_get_state(&getDisplayState);
+                       
+                       DeviceExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+                       
+                       if ( nRet != DEVICE_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_display_get_state is unsuccessful on iteration = %d for enum = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, DeviceGetDisplayState(display_states[enum_counter]), DeviceGetError(nRet));
+                               nGetFailCount++;
+                       }
+
+                       switch ( display_states[enum_counter] )
+                       {
+                               case DISPLAY_STATE_NORMAL:
+                                       if ( getDisplayState != DISPLAY_STATE_NORMAL && getDisplayState != DISPLAY_STATE_SCREEN_DIM && getDisplayState != DISPLAY_STATE_SCREEN_OFF )
+                                       {
+                                               FPRINTF("[Line : %d][device_ITC] Set/Get brightness values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                                               nMismatchCount ++;
+                                       }
+                                       break;
+                               case DISPLAY_STATE_SCREEN_DIM:
+                                       if ( getDisplayState != DISPLAY_STATE_SCREEN_DIM && getDisplayState != DISPLAY_STATE_SCREEN_OFF )
+                                       {
+                                               FPRINTF("[Line : %d][device_ITC] Set/Get brightness values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                                               nMismatchCount ++;
+                                       }
+                                       break;
+                               case DISPLAY_STATE_SCREEN_OFF:
+                                       if ( getDisplayState != DISPLAY_STATE_SCREEN_OFF )
+                                       {
+                                               FPRINTF("[Line : %d][device_ITC] Set/Get brightness values mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                                               nMismatchCount ++;
+                                       }
+                                       break;
+                               default:
+                                       break;
+                       }
+#if DEBUG
+                       FPRINTF("[Line : %d][device_ITC] device_display_get_state is successful with brightness value = %s\\n",
+                               __LINE__, DeviceGetDisplayState(display_states[enum_counter]));
+#endif
+
+                       DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               }
+       }
+       
+       int nTotalCount = enum_size * MAX_COUNT;
+       PRINT_STABILITY_LOG(device_display_change_state, nChangeFailCount, nTotalCount);
+       PRINT_STABILITY_LOG(device_display_get_state, nGetFailCount, nTotalCount);
+
+       if ( nChangeFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_display_change_state, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(device_display_get_state, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_display_change_get_state, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+/** @} */
+/** @} */
diff --git a/src/itc/device/ITs-device_haptic.c b/src/itc/device/ITs-device_haptic.c
new file mode 100755 (executable)
index 0000000..a3450fd
--- /dev/null
@@ -0,0 +1,363 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-device-common.h"
+
+/** @addtogroup itc-device
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Device
+
+/**
+* @function            ITs_device_haptic_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_device_haptic_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT start-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+       return;
+}
+
+/**
+* @function            ITs_device_haptic_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_device_haptic_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT clean-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+       return;
+}
+
+
+/** @addtogroup itc-device-haptic-testcases
+*  @brief              Integration testcases for module device-haptic
+*  @ingroup itc-device-haptic
+*  @{
+*/
+
+//& purpose: Vibrate for a specified time and stop
+//& type: auto
+/**
+ * @testcase                           ITc_device_haptic_vibrate_stop_p
+ * @type                                       auto
+ * @description                                Vibrate for a specified time and stop
+ * @scenario                           Open haptic handle\n
+ *                                                     Start haptic monotone\n
+ *                                                     Stop haptic monotone\n
+ *                                                     Close haptic handle
+ * @apicovered                         device_haptic_open, device_haptic_vibrate, device_haptic_stop, device_haptic_close
+ * @passcase                           When device_haptic_vibrate and haptic_stop_all_effects is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+int ITc_device_haptic_vibrate_stop_p(void)
+{
+       START_TEST;
+       
+       int nRet = -1, nLoopCount = 0;
+       int nVibrateFailCount = 0;
+       int nStopFailCount = 0;
+       
+       haptic_device_h pHapticDevice;
+       int duration = TIMELOG;
+       int feedback = 50;      // 0~100
+       haptic_effect_h pHapticEffect;
+       
+       //Precondition
+       /*int device_number;
+       nRet = device_haptic_get_count(&device_number);
+       if ( nRet != DEVICE_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][device_ITC] Precondition to get the number of vibrators failed, error returned = %s\\n", __LINE__, DeviceGetError(nRet));
+               return 1;
+       }*/
+       int device_index = 0 /*device_number - 1*/ /*HAPTIC_DEVICE_ALL*/;
+       
+       nRet = device_haptic_open(device_index, &pHapticDevice);
+       if ( nRet != DEVICE_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][device_ITC] Precondition to open the haptic vibrator device failed, error returned = %s\\n", __LINE__, DeviceGetError(nRet));
+               return 1;
+       }
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {               
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_haptic_vibrate(pHapticDevice, duration, feedback, &pHapticEffect);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_haptic_vibrate failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nVibrateFailCount++;
+                       continue;
+               }
+
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_haptic_stop(pHapticDevice, pHapticEffect);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_haptic_stop failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nStopFailCount++;
+                       continue;
+               }
+               
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+       }
+       
+       //Postcondition
+       nRet = device_haptic_close(pHapticDevice);
+       if ( nRet != DEVICE_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][device_ITC] Postcondition to close the haptic vibrator device failed, error returned = %s\\n", __LINE__, DeviceGetError(nRet));
+       }
+       
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_haptic_vibrate, nVibrateFailCount, nTotalCount);
+       PRINT_STABILITY_LOG(device_haptic_stop, nStopFailCount, nTotalCount);
+
+       if ( nVibrateFailCount > 0 || nStopFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_haptic_vibrate, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(device_haptic_stop, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_haptic_vibrate_stop, stSpeedMemoryLog.pszMemLog);
+#endif
+
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& purpose: Get the number of vibrators
+//& type: auto
+/**
+ * @testcase                           ITc_device_haptic_get_count_p
+ * @type                                       auto
+ * @description                                Get the number of vibrators
+ * @scenario                           get the number of vibrators
+ * @apicovered                         device_haptic_get_count
+ * @passcase                           When device_haptic_get_count is successful.
+ * @failcase                           If device_haptic_get_count or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+int ITc_device_haptic_get_count_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       int device_number;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {               
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_haptic_get_count(&device_number);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_haptic_get_count failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+       }
+       
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_haptic_get_count, nFailCount, nTotalCount);
+
+       if ( nFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_haptic_get_count, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_haptic_get_count, stSpeedMemoryLog.pszMemLog);
+#endif
+
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& purpose: Open and close a haptic-vibration device
+//& type: auto
+/**
+ * @testcase                           ITc_device_haptic_open_close_p
+ * @type                                       auto
+ * @description                                Open and close a haptic-vibration device
+ * @scenario                           Open haptic handle\n
+ *                                                     Close haptic handle
+ * @apicovered                         device_haptic_open, device_haptic_close                         
+ * @passcase                           When device_haptic_open and device_haptic_close is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+int ITc_device_haptic_open_close_p(void)
+{
+       START_TEST;
+       
+       int nRet = -1, nLoopCount = 0;
+       int nOpenFailCount = 0;
+       int nCloseFailCount = 0;
+       haptic_device_h pHapticDevice = NULL;
+       
+       //Precondition
+       int device_number;
+       nRet = device_haptic_get_count(&device_number);
+       if ( nRet != DEVICE_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][device_ITC] Precondition to get the number of vibrators failed, error returned = %s\\n", __LINE__, DeviceGetError(nRet));
+               return 1;
+       }
+       int device_index = device_number - 1 /*HAPTIC_DEVICE_ALL*/;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {               
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_haptic_open(device_index, &pHapticDevice);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_haptic_open failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nOpenFailCount++;
+                       continue;
+               }
+
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_haptic_close(pHapticDevice);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_haptic_close failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nCloseFailCount++;
+                       continue;
+               }
+               
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+       }
+       
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_haptic_open, nOpenFailCount, nTotalCount);
+       PRINT_STABILITY_LOG(device_haptic_close, nCloseFailCount, nTotalCount);
+       
+       if (nOpenFailCount > 0 || nCloseFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_display_change_state, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(device_display_get_state, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_display_change_get_state, stSpeedMemoryLog.pszMemLog);
+#endif
+
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/device/ITs-device_led.c b/src/itc/device/ITs-device_led.c
new file mode 100755 (executable)
index 0000000..137b9cb
--- /dev/null
@@ -0,0 +1,391 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-device-common.h"
+
+/** @addtogroup itc-device
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Device
+
+/**
+* @function            ITs_device_led_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_device_led_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT start-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+
+       return;
+}
+
+/**
+ * @function           ITs_device_led_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_device_led_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT clean-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+       return;
+}
+
+
+/** @addtogroup itc-device-flash-led
+*  @brief              Integration testcases for module device-led
+*  @ingroup    itc-device-led
+*  @{
+*/
+
+//& purpose: To get maximum brightness value of camera flash LED. 
+//& type: auto
+/**
+ * @testcase                           ITc_device_flash_get_max_brightness_p
+ * @type                                       auto
+ * @description                                To get maximum brightness value of camera flash LED 
+ * @scenario                           get the maximum brightness value 
+ * @apicovered                         device_flash_get_max_brightness                         
+ * @passcase                           When device_flash_get_max_brightness  is successful.
+ * @failcase                           If target api device_flash_get_max_brightness any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_device_flash_get_max_brightness_p(void)
+{
+       START_TEST;
+
+       bool bIsDisplayFeatureSupported = Device_Check_System_Info_Feature_Supported(DISPLAY_FEATURE);
+       
+    int nRet = 0, nLoopCount = 0;
+       int nFailCount = 0;
+       int nMaximumBrightness = -1;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_flash_get_max_brightness(&nMaximumBrightness);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               
+               if ( !bIsDisplayFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_display_set_brightness() returned %s error  \\n",__LINE__, DeviceGetError(nRet));
+                               nFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_flash_get_max_brightness is unsuccessful on iteration = %d, error returned = %s\\n",
+                               __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nFailCount++;
+               }
+               else if ( 0 > nMaximumBrightness )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_flash_get_max_brightness is unsuccessful on iteration = %d,and brightness value = %d\\n",
+                               __LINE__, nLoopCount, nMaximumBrightness);
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][device_ITC] device_flash_get_max_brightness is successful with brightness value = %d\\n", __LINE__, nMaximumBrightness);
+#endif
+               }
+       }
+
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_flash_get_max_brightness, nFailCount, nTotalCount);
+       
+       if ( nFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_flash_get_max_brightness, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_flash_get_max_brightness, stSpeedMemoryLog.pszMemLog);
+#endif
+
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& purpose: To set and get the brightness value of the camera flash LED
+//& type: auto
+/**
+ * @testcase                           ITc_device_flash_set_get_brightness_p
+ * @type                                       auto
+ * @description                                To set and get the brightness value of the camera flash LED
+ * @scenario                           Set the brightness value\n
+                                                       Invoke the callback\n
+                            Get the brightness value\n
+                                                       Compare set and get
+ * @apicovered                         device_flash_set_brightness, device_flash_get_brightness
+ * @passcase                           When device_flash_set_brightness and device_flash_get_brightness are successful.
+ * @failcase                           If target api device_flash_set_brightness and device_flash_get_brightness or any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_device_flash_set_get_brightness_p(void)
+{
+       START_TEST;
+       
+       bool bIsDisplayFeatureSupported = Device_Check_System_Info_Feature_Supported(DISPLAY_FEATURE);  
+
+    int nRet = 0, nLoopCount = 0;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+       
+       int nSetBrightness = 0;
+       int nGetBrightness;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_flash_set_brightness(nSetBrightness);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               if ( !bIsDisplayFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_display_set_brightness() returned %s error  \\n",__LINE__, DeviceGetError(nRet));
+                               nSetFailCount++;
+                       }
+                       continue;
+               }
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_flash_set_brightness failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_flash_get_brightness(&nGetBrightness);
+               
+        DeviceExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][device_ITC] device_flash_get_brightness failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCount, DeviceGetError(nRet));
+                       nGetFailCount++;
+               }
+               else if (nSetBrightness != nGetBrightness)
+               {
+                       FPRINTF("[Line : %d][device_ITC] Set/Get brightness values of flash LED mismatch on iteration %d \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+               
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+       }
+       
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_flash_set_brightness, nSetFailCount, nTotalCount);
+       PRINT_STABILITY_LOG(device_flash_get_brightness, nGetFailCount, nTotalCount);
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_flash_set_brightness, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(device_flash_get_brightness, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_flash_set_get_brightness, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& purpose: To play and stop the custom effect of front LED
+//& type: auto
+/**
+ * @testcase                           ITc_device_led_play_stop_custom_p
+ * @type                                       auto
+ * @description                                To play and stop the custom effect on front LED
+ * @scenario                           Play the custom effect of front led\n
+                                                       Stop the custom effect of front led
+ * @apicovered                         device_led_play_custom, device_led_stop_custom
+ * @passcase                           When device_led_play_custom and device_led_stop_custom are successful.
+ * @failcase                           If target api device_led_play_custom and device_led_stop_custom or any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_device_led_play_stop_custom_p(void)
+{
+       START_TEST;
+       
+       bool bIsLedFeatureSupported = Device_Check_System_Info_Feature_Supported(LED_FEATURE);
+       
+    int nRet = 0, nLoopCount = 0;
+       int nPlayFailCount = 0, nStopFailCount = 0;
+       int on = 1000;                                          //Turn on time in milliseconds
+       int off = 1000;                                         //Turn off time in milliseconds
+       unsigned int color = 0xFF101010;        //Color value
+       unsigned int flags[] = { LED_CUSTOM_DUTY_ON, LED_CUSTOM_DEFAULT };      //LED_CUSTOM_FLAGS
+       
+       int enum_size = sizeof(flags) / sizeof(flags[0]);
+       int enum_counter = 0;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(enum_size);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(enum_size);
+#endif
+
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++ )
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       DeviceGetMemAllocation();
+                       DeviceGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = device_led_play_custom(on, off, color, flags[enum_counter]);
+                       
+                       DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               
+                       if ( !bIsLedFeatureSupported )
+                       {
+                               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                               {
+                                       FPRINTF("[Line : %d][device_ITC] device_led_play_custom() returned %s error for unsupported feature on iteration %d for flag = %s\\n",
+                                               __LINE__, DeviceGetError(nRet), nLoopCount, DeviceGetLedFlag(flags[enum_counter]));
+                                       nPlayFailCount++;
+                               }
+                               continue;
+                       }
+                       
+                       if ( nRet != DEVICE_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_led_play_custom failed on iteration %d for flag = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, DeviceGetLedFlag(flags[enum_counter]), DeviceGetError(nRet));
+                               nPlayFailCount++;
+                               continue;
+                       }
+
+                       usleep(5000);
+               
+                       DeviceGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = device_led_stop_custom();
+                       
+                       DeviceExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+                       
+                       if ( nRet != DEVICE_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_led_stop_custom failed on iteration %d for flag = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, DeviceGetLedFlag(flags[enum_counter]), DeviceGetError(nRet));
+                               nStopFailCount++;
+                       }
+                       
+                       DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               }
+       }
+       
+       int nTotalCount = enum_size * MAX_COUNT;
+       PRINT_STABILITY_LOG(device_led_play_custom, nPlayFailCount, nTotalCount);
+       PRINT_STABILITY_LOG(device_led_stop_custom, nStopFailCount, nTotalCount);
+       
+       if ( nPlayFailCount > 0 || nStopFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(device_led_play_custom, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(device_led_stop_custom, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(device_led_play_stop_custom, stSpeedMemoryLog.pszMemLog);
+#endif
+       
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+/** @} */
+/** @} */
diff --git a/src/itc/device/ITs-device_power.c b/src/itc/device/ITs-device_power.c
new file mode 100755 (executable)
index 0000000..b39e04a
--- /dev/null
@@ -0,0 +1,235 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-device-common.h"
+
+/** @addtogroup itc-device
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Device
+
+/**
+* @function            ITs_device_power_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_device_power_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT start-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+       return;
+}
+
+/**
+* @function            ITs_device_power_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_device_power_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][device_ITC] TEST SUIT clean-up: ITs_System_Device_p\\n", __LINE__);
+#endif
+       return;
+}
+
+/** @addtogroup itc-device-power-testcases
+*  @brief              Integration testcases for module device-power
+*  @ingroup    itc-device-power
+*  @{
+*/
+
+//& purpose Locks a given power state for a specified time then gets the power state and unlocks it
+//& type: auto
+/**
+ * @testcase                                   ITc_device_power_request_release_lock_p
+ * @type                                       Positive
+ * @description                                Locks & Gets the current power state and then unlocks it.
+ * @scenario                           Locks a given power state for a specified time and then unlocks it.\n
+ *                                                     Get the current power state
+ * @apicovered                         device_power_request_lock, device_power_release_lock
+ * @passcase                           if Locks and Unlocks the valid power state successfully
+ * @failcase                           if Failed to Lock or Unlock and Get the valid power state
+ * @precondition                       NA
+ * @postcondition                      NA 
+ */
+int ITc_device_power_request_release_lock_p(void)
+{
+       START_TEST
+       
+       int nLoopCounter = 0;
+       int nLockFailCount = 0;
+       int nUnlockFailCount = 0;
+       int nRet = -1;
+       
+       power_lock_e power_locks[] = { POWER_LOCK_CPU, POWER_LOCK_DISPLAY };
+       int enum_size = sizeof(power_locks) / sizeof(power_locks[0]);
+       int enum_counter = 0;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(enum_size);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(enum_size);
+#endif
+
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for ( nLoopCounter=0; nLoopCounter < MAX_COUNT; nLoopCounter++ )
+               {
+                       DeviceGetMemAllocation();
+                       DeviceGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = device_power_request_lock(power_locks[enum_counter], 10);
+                       
+                       DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+
+                       if ( nRet != DEVICE_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_power_request_lock failed on iteration %d for enum = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCounter, DeviceGetPowerLock(power_locks[enum_counter]), DeviceGetError(nRet));
+                               nLockFailCount++;
+                               continue;
+                       }
+
+                       DeviceGetTimeOfDay();
+                       
+                       // Target API
+                       nRet  = device_power_release_lock(power_locks[enum_counter]);
+                       
+                       DeviceExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+                       
+                       if ( nRet != DEVICE_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][device_ITC] device_power_release_lock failed on iteration %d for enum = %s, error returned = %s\\n",
+                                       __LINE__, nLoopCounter, DeviceGetPowerLock(power_locks[enum_counter]), DeviceGetError(nRet));
+                               nUnlockFailCount++;
+                               continue;
+                       }
+                       
+                       DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               }
+       }
+
+       int nTotalCount = enum_size * MAX_COUNT;
+       PRINT_STABILITY_LOG(device_power_request_lock, nLockFailCount, nTotalCount);
+       PRINT_STABILITY_LOG(device_power_release_lock, nUnlockFailCount, nTotalCount);
+       
+       if ( nLockFailCount > 0 || nUnlockFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(device_power_request_lock, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(device_power_release_lock, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(device_power_lock_unlock_state, stSpeedMemoryLog.pszMemLog);
+#endif
+
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& purpose Changes the current power state to normal/dim state
+//& type: auto
+/**
+ * @testcase                                   ITc_power_wakeup_p
+ * @type                                       Positive
+ * @description                                Changes the current power state to normal/dim state
+ * @scenario                           Changes the current power state
+ * @apicovered                         device_power_wakeup
+ * @passcase                           if device_power_wakeup is successfully
+ * @failcase                           if device_power_wakeup Failed 
+ * @precondition                       NA
+ * @postcondition                      The device will be in POWER_STATE_NORMAL state. 
+ */
+int ITc_power_wakeup_p(void)
+{
+       START_TEST;
+       
+       int nLoopCounter = 0;
+       int nWakeupFailCount = 0;
+       int nRet  = -1;
+       
+       DeviceSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK
+       DEVICE_INITIALISE_MEM_LOG(1);
+#endif
+
+#if SPEED_CHECK
+       DEVICE_INITIALISE_SPEED_LOGS(1);
+#endif
+
+       for ( nLoopCounter=0; nLoopCounter < MAX_COUNT; nLoopCounter++ )
+       {
+               DeviceGetMemAllocation();
+               DeviceGetTimeOfDay();
+               
+               // Target API
+               nRet = device_power_wakeup(false);
+               
+               DeviceExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               DeviceGetMemStatus(stSpeedMemoryLog.pszMemLog);
+               
+               if ( nRet != DEVICE_ERROR_NONE )
+               {       
+                       FPRINTF("[Line : %d][device_ITC] device_power_wakeup failed on iteration %d, error returned = %s\\n", __LINE__, nLoopCounter, DeviceGetError(nRet));
+                       nWakeupFailCount++;
+               }
+       }
+
+       int nTotalCount = MAX_COUNT;
+       PRINT_STABILITY_LOG(device_power_wakeup, nWakeupFailCount, nTotalCount);        
+       
+       if ( nWakeupFailCount > 0 )
+       {
+               DEVICE_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(device_power_wakeup, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(device_power_wakeup, stSpeedMemoryLog.pszMemLog);
+#endif
+
+       DEVICE_DEINITIALISE_LOGS;
+       return 0;
+}
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/device/tct-device-native.c b/src/itc/device/tct-device-native.c
new file mode 100755 (executable)
index 0000000..d788fe9
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-device-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/device/tct-device-native.h b/src/itc/device/tct-device-native.h
new file mode 100755 (executable)
index 0000000..8ada4a2
--- /dev/null
@@ -0,0 +1,71 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_DEVICE_NATIVE_H__
+#define __TCT_DEVICE_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_device_battery_startup(void);
+extern void ITs_device_battery_cleanup(void);
+extern void ITs_device_display_startup(void);
+extern void ITs_device_display_cleanup(void);
+extern void ITs_device_haptic_startup(void);
+extern void ITs_device_haptic_cleanup(void);
+extern void ITs_device_led_startup(void);
+extern void ITs_device_led_cleanup(void);
+extern void ITs_device_power_startup(void);
+extern void ITs_device_power_cleanup(void);
+extern void ITs_device_startup(void);
+extern void ITs_device_cleanup(void);
+
+extern int ITc_device_battery_get_percent_p(void);
+extern int ITc_device_battery_is_charging_p(void);
+extern int ITc_device_battery_get_level_status_p(void);
+extern int ITc_device_display_get_numbers_p(void);
+extern int ITc_device_display_get_max_brightness_p(void);
+extern int ITc_device_display_set_get_brightness_p(void);
+extern int ITc_device_display_change_get_state_p(void);
+extern int ITc_device_haptic_vibrate_stop_p(void);
+extern int ITc_device_haptic_get_count_p(void);
+extern int ITc_device_haptic_open_close_p(void);
+extern int ITc_device_flash_get_max_brightness_p(void);
+extern int ITc_device_flash_set_get_brightness_p(void);
+extern int ITc_device_led_play_stop_custom_p(void);
+extern int ITc_device_power_request_release_lock_p(void);
+extern int ITc_power_wakeup_p(void);
+extern int ITc_device_add_remove_callback_p(void);
+
+testcase tc_array[] = {
+    {"ITc_device_battery_get_percent_p", ITc_device_battery_get_percent_p, ITs_device_battery_startup, ITs_device_battery_cleanup},
+    {"ITc_device_battery_is_charging_p", ITc_device_battery_is_charging_p, ITs_device_battery_startup, ITs_device_battery_cleanup},
+    {"ITc_device_battery_get_level_status_p", ITc_device_battery_get_level_status_p, ITs_device_battery_startup, ITs_device_battery_cleanup},
+    {"ITc_device_display_get_numbers_p", ITc_device_display_get_numbers_p, ITs_device_display_startup, ITs_device_display_cleanup},
+    {"ITc_device_display_get_max_brightness_p", ITc_device_display_get_max_brightness_p, ITs_device_display_startup, ITs_device_display_cleanup},
+    {"ITc_device_display_set_get_brightness_p", ITc_device_display_set_get_brightness_p, ITs_device_display_startup, ITs_device_display_cleanup},
+    {"ITc_device_display_change_get_state_p", ITc_device_display_change_get_state_p, ITs_device_display_startup, ITs_device_display_cleanup},
+    {"ITc_device_haptic_vibrate_stop_p", ITc_device_haptic_vibrate_stop_p, ITs_device_haptic_startup, ITs_device_haptic_cleanup},
+    {"ITc_device_haptic_get_count_p", ITc_device_haptic_get_count_p, ITs_device_haptic_startup, ITs_device_haptic_cleanup},
+    {"ITc_device_haptic_open_close_p", ITc_device_haptic_open_close_p, ITs_device_haptic_startup, ITs_device_haptic_cleanup},
+    {"ITc_device_flash_get_max_brightness_p", ITc_device_flash_get_max_brightness_p, ITs_device_led_startup, ITs_device_led_cleanup},
+    {"ITc_device_flash_set_get_brightness_p", ITc_device_flash_set_get_brightness_p, ITs_device_led_startup, ITs_device_led_cleanup},
+    {"ITc_device_led_play_stop_custom_p", ITc_device_led_play_stop_custom_p, ITs_device_led_startup, ITs_device_led_cleanup},
+    {"ITc_device_power_request_release_lock_p", ITc_device_power_request_release_lock_p, ITs_device_power_startup, ITs_device_power_cleanup},
+    {"ITc_power_wakeup_p", ITc_power_wakeup_p, ITs_device_power_startup, ITs_device_power_cleanup},
+    {"ITc_device_add_remove_callback_p", ITc_device_add_remove_callback_p, ITs_device_startup, ITs_device_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_DEVICE_NATIVE_H__
diff --git a/src/itc/dlog/CMakeLists.txt b/src/itc/dlog/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..1946954
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "dlog")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "dlog")
+SET(TC_SOURCES
+       ITs-dlog-common.c
+       ITs-dlog.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       libsystemd-journal
+       bundle
+       glib-2.0
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
\ No newline at end of file
diff --git a/src/itc/dlog/ITs-dlog-common.c b/src/itc/dlog/ITs-dlog-common.c
new file mode 100755 (executable)
index 0000000..727d416
--- /dev/null
@@ -0,0 +1,204 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-dlog-common.h"
+
+/** @addtogroup itc-dlog
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function definitions here
+/**
+* @function                    DlogGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter           pszAPIMemory: String pointer containing the difference of total number of bytes for Current and Previous Memory Allocation.
+* @return                      NA
+*/
+void DlogGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+
+       if ( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char * pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if ( stMemInfo.uordblks > g_stDlogMemInfo.uordblks )
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stDlogMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stDlogMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               snprintf(pszLog, MEMLOG, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    DlogGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @parameter           NA
+* @return                      NA
+*/
+inline void DlogGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stDlogMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           DlogExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter          pszAPITime: String pointer containing the time difference
+ * @return                     NA
+ *
+ */
+void DlogExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+
+       if ( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime=calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stDlogStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stDlogStartTime.tv_usec;
+                       
+               snprintf(pszLogTime, MEMLOG, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+
+#endif
+}
+
+/**
+ * @function           DlogGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stDlogStartTime
+ * @parameter          NA
+ * @return                     NA
+ *
+ */ 
+void DlogGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stDlogStartTime, NULL);
+#endif
+}
+
+/**
+ * @function           DlogGetPriorityListValue
+ * @description                Initialize Macro or return value if already initialized
+ * @parameter          earrPriority: Enum container array; nTotalEnums: Enum Count; nType: Request Type
+ * @return                     If requested, Enum Value
+ *
+ */  
+char *DlogGetPriorityListValue(log_priority earrPriority[], int *nTotalEnums, int nType)
+{
+       if ( nType == SETENUM )
+       {
+               int nIterator = 0;
+               log_priority nEnumList[] = {DLOG_DEBUG, DLOG_INFO, DLOG_WARN, DLOG_ERROR};
+               *nTotalEnums = sizeof(nEnumList) / sizeof(nEnumList[0]);
+               for ( nIterator = 0; nIterator<(*nTotalEnums); nIterator++ )
+               {
+                       earrPriority[nIterator] = nEnumList[nIterator];
+               }
+               return NULL;
+       }
+       else if ( nType == GETENUM )
+       {
+               char *szReturnVal = NULL;
+               switch ( earrPriority[*nTotalEnums] )
+               {
+                       case DLOG_DEBUG:        szReturnVal = " DLOG_DEBUG ";   break; 
+                       case DLOG_INFO:         szReturnVal = " DLOG_INFO ";    break; 
+                       case DLOG_WARN:         szReturnVal = " DLOG_WARN ";    break; 
+                       case DLOG_ERROR:        szReturnVal = " DLOG_ERROR";    break; 
+                       default:                        szReturnVal = "DLOG_ENUM_UNKNOWN";      break;
+               }
+               return szReturnVal;
+       }
+       else
+       {
+               FPRINTF("[Line : %d][dlog_ITC] Wrong Argument Passed to DlogGetPriorityListValue\\n", __LINE__);
+               return NULL;
+       }
+}
+
+/**
+ * @function           DlogGetPriority
+ * @description                Maps log_priority enums 
+ * @parameter          priority : priority level
+ * @return                     priority level string
+ */
+char* DlogGetPriority(log_priority priority)
+{
+       char *szPriorityVal = NULL;
+       switch ( priority )
+       {
+               case DLOG_UNKNOWN:              szPriorityVal = "DLOG_UNKNOWN";         break;
+               case DLOG_DEFAULT:              szPriorityVal = "DLOG_DEFAULT";         break;
+               case DLOG_VERBOSE:              szPriorityVal = "DLOG_VERBOSE";         break;
+               case DLOG_DEBUG:                szPriorityVal = "DLOG_DEBUG";           break;
+               case DLOG_INFO:                 szPriorityVal = "DLOG_INFO";            break;
+               case DLOG_WARN:                 szPriorityVal = "DLOG_WARN";            break;
+               case DLOG_ERROR:                szPriorityVal = "DLOG_ERROR";           break;
+               case DLOG_FATAL:                szPriorityVal = "DLOG_FATAL";           break;
+               case DLOG_SILENT:               szPriorityVal = "DLOG_SILENT";          break;
+               case DLOG_PRIO_MAX:             szPriorityVal = "DLOG_PRIO_MAX";        break;
+               default:                                szPriorityVal = "Unknown Priority Level";       break;
+       }
+
+       return szPriorityVal;
+}
+
+
+
+/**
+ * @function           DlogGetError
+ * @description                Maps dlog_error_e enums 
+ * @parameter          error : error level
+ * @return                     error string
+ */
+char* DlogGetError(dlog_error_e error)
+{
+       char *szErrorVal = NULL;
+       switch ( error )
+       {
+               case DLOG_ERROR_NONE:                           szErrorVal = "DLOG_ERROR_NONE";                                 break;
+               case DLOG_ERROR_INVALID_PARAMETER:      szErrorVal = "DLOG_ERROR_INVALID_PARAMETER";    break;
+               case DLOG_ERROR_NOT_PERMITTED:          szErrorVal = "DLOG_ERROR_NOT_PERMITTED";                break;
+               default:                                                        szErrorVal = "Unknown Error";                                   break;
+       }
+
+       return szErrorVal;
+}
+/** @} */
diff --git a/src/itc/dlog/ITs-dlog-common.h b/src/itc/dlog/ITs-dlog-common.h
new file mode 100755 (executable)
index 0000000..1f0be3c
--- /dev/null
@@ -0,0 +1,214 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_DLOG_COMMON_H_
+#define _ITS_DLOG_COMMON_H_
+
+#include "assert.h"
+//Add test package related includes here
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <dlog.h>
+#include <stdbool.h>
+#include <sys/time.h>
+
+/** @addtogroup itc-dlog
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function declarations here
+struct timeval g_stDlogStartTime;
+struct mallinfo g_stDlogMemInfo;
+bool g_bDlogCreation;
+FILE *g_fpLog;
+
+#define TIMELOG                                        30
+#define MEMLOG                                 30
+#define MICROSECONDS_PER_SECOND        1000000
+#define MINCOUNT                               1
+#define TESTSTRINGSIZE                 120*sizeof(char)
+#define MAXENUMSIZE                            50
+#define SETENUM                                        1
+#define GETENUM                                        0
+
+typedef struct SpeedMemory
+{
+       char *pszAPI1MemLog;
+       char *pszAPI2MemLog;
+       char *pszAPI1SpeedLog;
+       char *pszAPI2SpeedLog;
+} SpeedMemoryLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define DLOG_INITIALIZE_LOGS_SINGLE_ENUM_FN(Function, Argument, nTotalEnums) {\
+       Function(Argument, &nTotalEnums, SETENUM);\
+       if ( MEMORY_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT * nTotalEnums, sizeof(char));\
+       }\
+       if ( SPEED_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * nTotalEnums, sizeof(char));\
+       }\
+}
+
+#define DLOG_INITIALIZE_LOGS_SINGLE_ENUM(nTotalEnums) {\
+       if ( MEMORY_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT * nTotalEnums, sizeof(char));\
+       }\
+       if ( SPEED_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * nTotalEnums, sizeof(char));\
+       }\
+}
+
+#define DLOG_INITIALIZE_LOGS_SINGLE {\
+       if ( MEMORY_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if ( SPEED_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+}
+
+#define DLOG_INITIALIZE_LOGS_DOUBLEMEM {\
+       if ( MEMORY_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if ( SPEED_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+}
+
+#define DLOG_INITIALIZE_LOGS_DOUBLESPEED {\
+       if ( MEMORY_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if ( SPEED_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+}
+
+#define DLOG_DEINITIALIZE_LOGS {\
+       if ( stSpeedMemoryLog.pszAPI1MemLog != NULL)\
+       {\
+               free(stSpeedMemoryLog.pszAPI1MemLog);\
+               stSpeedMemoryLog.pszAPI1MemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2MemLog != NULL)\
+       {\
+               free(stSpeedMemoryLog.pszAPI2MemLog);\
+               stSpeedMemoryLog.pszAPI2MemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI1SpeedLog != NULL)\
+       {\
+               free (stSpeedMemoryLog.pszAPI1SpeedLog);\
+               stSpeedMemoryLog.pszAPI1SpeedLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2SpeedLog != NULL)\
+       {\
+               free (stSpeedMemoryLog.pszAPI2SpeedLog);\
+               stSpeedMemoryLog.pszAPI2SpeedLog = NULL;\
+       }\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][dlog_ITC] Starting test : %s\\n", __LINE__, __FUNCTION__);\
+       if ( !g_bDlogCreation )\
+       {\
+               FPRINTF("[Line : %d][dlog_ITC] Precondition of dlog failed so leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if ( nRetVal >= 0 )\
+       {\
+               if ( DEBUG )\
+               {\
+                       FPRINTF("[Line : %d][dlog_ITC] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][dlog_ITC] %s failed\\n", __LINE__, API);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_NORETURN(nRetVal, API) {\
+       if ( nRetVal >= 0 )\
+       {\
+               if ( DEBUG )\
+               {\
+                       FPRINTF("[Line : %d][dlog_ITC] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][dlog_ITC] %s failed\\n", __LINE__, API);\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if ( MEMORY_CHECK )\
+       {\
+               if ( strlen(memLog) > 0 )\
+               {\
+                       memLog[(strlen(memLog))-1] = '\0';\
+                       FPRINTF("[Line : %d][dlog_ITC] %s_MemoryLeakStatus - %s\\n", __LINE__, #api, memLog);\
+               }\
+       }\
+
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if ( SPEED_CHECK )\
+       {\
+               if ( strlen(speedLog) > 0 )\
+               {\
+                       speedLog[strlen(speedLog)-1] = '\0';\
+                       FPRINTF("[Line : %d][dlog_ITC] %s_TimeInMicrosec- %s\\n", __LINE__, #api, speedLog);\
+               }\
+       }\
+
+void DlogGetMemAllocation();
+void DlogExecutionDelay(char* pszAPITime);
+void DlogGetTimeOfDay();
+void DlogGetMemStatus(char *pszAPIMemory);
+char *DlogGetPriorityListValue(log_priority earrPriority[], int *nTotalEnums, int nType);
+char* DlogGetPriority(log_priority priority);
+char* DlogGetError(dlog_error_e error);
+/** @} */
+#endif  //_ITS_DLOG_COMMON_H_
diff --git a/src/itc/dlog/ITs-dlog.c b/src/itc/dlog/ITs-dlog.c
new file mode 100755 (executable)
index 0000000..97d200e
--- /dev/null
@@ -0,0 +1,178 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-dlog-common.h"
+
+/** @addtogroup itc-dlog
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Dlog
+
+/**
+* @function            ITs_dlog_startup
+* @description         Called before each test, set the service boolean true
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_dlog_startup(void)
+{
+       struct stat buf;
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bDlogCreation = true;
+}
+
+/**
+* @function            ITs_dlog_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_dlog_cleanup(void)
+{
+}
+
+
+/** @addtogroup itc-dlog-testcases
+*  @brief              Integration testcases for module dlog
+*  @ingroup    itc-dlog
+*  @{
+*/
+
+/**
+ * @testcase                           ITc_dlog_dlog_print_p
+ * @type                                       auto
+ * @description                                Send a log
+ * @scenario                           Send a dlog
+ * @apicovered                         dlog_print                              
+ * @passcase                           When dlog_print is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test dlog_print
+//& type: auto
+int ITc_dlog_dlog_print_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nPrintFailCount = 0;
+       log_priority earrPriority[MAXENUMSIZE] = {0};
+       int nTotalEnums = 0;
+       int nEnumCount = 0;
+       
+       DLOG_INITIALIZE_LOGS_SINGLE_ENUM_FN(DlogGetPriorityListValue, earrPriority, nTotalEnums);
+       for ( nEnumCount = 0; nEnumCount < nTotalEnums; nEnumCount++ )
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       DlogGetMemAllocation();
+                       DlogGetTimeOfDay();
+                       // Target API
+                       nRetVal = dlog_print(earrPriority[nEnumCount], "DLOG_TEST", "[Dlog_ITC] Dlog Test Message\n");
+                       DlogExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DlogGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if ( nRetVal < 0 )
+                       {
+                               FPRINTF("[Line : %d] [Dlog_ITC] dlog_print failed on iteration %d for Enumerator %s\\n", __LINE__, nLoopCount, DlogGetPriorityListValue(earrPriority, &nEnumCount, GETENUM));
+                               nPrintFailCount++;
+                               continue;
+                       }
+               }
+       }
+       
+       if ( nPrintFailCount > 0 )
+       {
+               FPRINTF("[Line : %d] [Dlog_ITC] dlog_print failed %d times out of %d times\\n", __LINE__, nPrintFailCount, MAX_COUNT*nTotalEnums);
+               DLOG_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(dlog_print, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(dlog_print, stSpeedMemoryLog.pszAPI1MemLog);
+               DLOG_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/**
+ * @testcase                           ITc_dlog_dlog_vprint_p
+ * @type                                       auto
+ * @description                                Send a log using va_list
+ * @scenario                           Send a dlog
+ * @apicovered                         dlog_vprint                             
+ * @passcase                           When dlog_vprint is successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test dlog_vprint
+//& type: auto
+int ITc_dlog_dlog_vprint_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nPrintFailCount = 0;
+       va_list vList = {0};
+       log_priority earrPriority[MAXENUMSIZE] = {0};
+       int nTotalEnums = 0;
+       int nEnumCount = 0;
+       
+       DLOG_INITIALIZE_LOGS_SINGLE_ENUM_FN(DlogGetPriorityListValue, earrPriority, nTotalEnums);
+       for ( nEnumCount = 0; nEnumCount < nTotalEnums; nEnumCount++ )
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       DlogGetMemAllocation();
+                       DlogGetTimeOfDay();
+                       // Target API
+                       nRetVal = dlog_vprint(earrPriority[nEnumCount], "DLOG_TEST", "[Dlog_ITC] Dlog Test Message\n", vList);
+                       DlogExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       DlogGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if ( nRetVal < 0 )
+                       {
+                               FPRINTF("[Line : %d] [Dlog_ITC] dlog_vprint failed on iteration %d for Enumerator %s\\n", __LINE__, nLoopCount, DlogGetPriorityListValue(earrPriority, &nEnumCount, GETENUM));
+                               nPrintFailCount++;
+                               continue;
+                       }
+               }
+       }
+       
+       if ( nPrintFailCount > 0 )
+       {
+               FPRINTF("[Line : %d] [Dlog_ITC] dlog_vprint failed %d times out of %d times\\n", __LINE__, nPrintFailCount, MAX_COUNT*nTotalEnums);
+               DLOG_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(dlog_vprint, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(dlog_vprint, stSpeedMemoryLog.pszAPI1MemLog);
+               DLOG_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/dlog/tct-dlog-native.c b/src/itc/dlog/tct-dlog-native.c
new file mode 100755 (executable)
index 0000000..53219a6
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-dlog-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/dlog/tct-dlog-native.h b/src/itc/dlog/tct-dlog-native.h
new file mode 100755 (executable)
index 0000000..31ffbb1
--- /dev/null
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_DLOG_NATIVE_H__
+#define __TCT_DLOG_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_dlog_startup(void);
+extern void ITs_dlog_cleanup(void);
+
+extern int ITc_dlog_dlog_print_p(void);
+extern int ITc_dlog_dlog_vprint_p(void);
+
+testcase tc_array[] = {
+    {"ITc_dlog_dlog_print_p", ITc_dlog_dlog_print_p, ITs_dlog_startup, ITs_dlog_cleanup},
+    {"ITc_dlog_dlog_vprint_p", ITc_dlog_dlog_vprint_p, ITs_dlog_startup, ITs_dlog_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_DLOG_NATIVE_H__
diff --git a/src/itc/efl-ext/CMakeLists.txt b/src/itc/efl-ext/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..f0d4377
--- /dev/null
@@ -0,0 +1,46 @@
+SET(PKG_NAME "efl-ext")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "efl-extension")
+SET(TC_SOURCES
+       ITs-efl-ext-common.c
+       ITs-efl-ext.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       libsystemd-journal
+       glib-2.0
+       bundle
+       ecore
+       ecore-x
+       elementary
+       dlog
+       x11
+       xext
+       xi
+       inputproto
+       fontconfig
+       cairo
+       capi-system-info
+       appcore-efl
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
\ No newline at end of file
diff --git a/src/itc/efl-ext/ITs-efl-ext-common.c b/src/itc/efl-ext/ITs-efl-ext-common.c
new file mode 100755 (executable)
index 0000000..1274519
--- /dev/null
@@ -0,0 +1,450 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-efl-ext-common.h"
+
+/** @addtogroup itc-efl-ext
+*  @ingroup itc
+*  @{
+*/
+
+/**
+* @function            WinDel
+* @description                 Callback function registered by evas_object_smart_callback_add API
+* @parameter           void*, Evas_Object*, void*
+* @return                      NA.
+*/
+void WinDel(void *data, Evas_Object *obj, void *event)
+{
+       elm_exit();
+}
+
+/**
+* @function            CreateEvasWindow
+* @description                 Creates an Evas window object
+* @parameter           NA
+* @return                      Evas_Object if successful, otherwise NULL.
+*/
+bool CreateEvasWindow(void)
+{
+       elm_config_preferred_engine_set("opengl_x11");
+
+       g_pEvasWindow = elm_win_util_standard_add(PACKAGE, PACKAGE);
+       CHECK_HANDLE(g_pEvasWindow, "elm_win_util_standard_add");
+       elm_win_borderless_set(g_pEvasWindow, EINA_TRUE);
+       evas_object_smart_callback_add(g_pEvasWindow, "delete,request",WinDel, NULL);
+       elm_win_autodel_set(g_pEvasWindow, EINA_TRUE);
+       elm_win_activate(g_pEvasWindow);
+       evas_object_show(g_pEvasWindow);
+
+       g_pEvasConformant = elm_conformant_add(g_pEvasWindow);
+       CHECK_HANDLE_CLEANUP(g_pEvasConformant, "elm_conformant_add", DeleteEvasWindow());
+       evas_object_show(g_pEvasConformant);
+
+       g_pEvasLayout = elm_layout_add(g_pEvasWindow);
+       CHECK_HANDLE_CLEANUP(g_pEvasLayout, "elm_layout_add", DeleteEvasWindow());
+       evas_object_size_hint_weight_set(g_pEvasLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(g_pEvasLayout);
+
+       g_pEvasNaviframe = elm_naviframe_add(g_pEvasWindow);
+       CHECK_HANDLE_CLEANUP(g_pEvasNaviframe, "elm_naviframe_add", DeleteEvasWindow());
+       evas_object_show(g_pEvasNaviframe);
+
+       g_pEvasCore = evas_object_evas_get(g_pEvasWindow);
+       CHECK_HANDLE_CLEANUP(g_pEvasCore, "evas_object_evas_get", DeleteEvasWindow());
+
+       g_pImageObject = evas_object_image_add(g_pEvasCore);
+       CHECK_HANDLE_CLEANUP(g_pImageObject, "evas_object_image_add", DeleteEvasWindow());
+       evas_object_image_size_set(g_pImageObject, 500, 500);
+       evas_object_image_fill_set(g_pImageObject, 0, 0, 500, 500);
+       evas_object_resize(g_pImageObject, 500, 500);
+       evas_object_show(g_pImageObject);
+
+       return 0;
+}
+
+/**
+* @function            DeleteEvasWindow
+* @description                 Delete Evas window object
+* @parameter           NA
+* @return                      NA
+*/
+void DeleteEvasWindow(void)
+{
+       if ( g_pImageObject )
+       {
+               evas_object_del(g_pImageObject);
+               g_pImageObject = NULL;
+       }
+       if ( g_pEvasNaviframe )
+       {
+               evas_object_del(g_pEvasNaviframe);
+               g_pEvasNaviframe = NULL;
+       }
+       if ( g_pEvasLayout )
+       {
+               evas_object_del(g_pEvasLayout);
+               g_pEvasLayout = NULL;
+       }
+       if ( g_pEvasConformant )
+       {
+               evas_object_del(g_pEvasConformant);
+               g_pEvasConformant = NULL;
+       }
+       if ( g_pEvasWindow )
+       {
+               evas_object_del(g_pEvasWindow);
+               g_pEvasWindow = NULL;
+       }
+}
+
+/**
+* @function            CreateCircleSurfaceLayout
+* @description                 Creates a circle surface
+* @parameter           NA
+* @return                      Evas_Object if successful, otherwise NULL.
+*/
+bool CreateCircleSurfaceLayout(void)
+{
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+
+       g_pCircleSurfaceLayout = eext_circle_surface_layout_add(g_pEvasLayout);
+       CHECK_HANDLE_CLEANUP(g_pCircleSurfaceLayout, "eext_circle_surface_layout_add", DeleteEvasWindow());
+
+       return 0;
+}
+
+/**
+* @function            DeleteCircleSurfaceLayout
+* @description                 Delete a circle surface
+* @parameter           NA
+* @return                      NA
+*/
+void DeleteCircleSurfaceLayout(void)
+{
+       if ( g_pCircleSurfaceLayout )
+       {
+               eext_circle_surface_del(g_pCircleSurfaceLayout);
+               g_pCircleSurfaceLayout = NULL;
+       }
+       DeleteEvasWindow();
+}
+
+/**
+* @function            CreateCircle
+* @description                 Creates a circle
+* @parameter           NA
+* @return                      Evas_Object if successful, otherwise NULL.
+*/
+bool CreateCircle(void)
+{
+       int nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       g_pCircleObject = eext_circle_object_add(g_pEvasLayout, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(g_pCircleObject, "eext_circle_object_add", DeleteCircleSurfaceLayout());
+
+       return 0;
+}
+
+/**
+* @function            DeleteCircle
+* @description                 Delete a circle
+* @parameter           NA
+* @return                      NA
+*/
+void DeleteCircle(void)
+{
+       if ( g_pCircleObject )
+       {
+               evas_object_del(g_pCircleObject);
+               g_pCircleObject = NULL;
+       }
+       DeleteCircleSurfaceLayout();
+}
+
+/**
+* @function            CreateCircleGenlist
+* @description                 Creates a genlist
+* @parameter           NA
+* @return                      Evas_Object if successful, otherwise NULL.
+*/
+bool CreateCircleGenlist(void)
+{
+       int nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       Elm_Genlist_Item_Class *pListClass = NULL;
+       pListClass = elm_genlist_item_class_new();
+       pListClass->item_style = "default";
+       pListClass->func.text_get = NULL;
+       pListClass->func.content_get = NULL;
+       pListClass->func.state_get = NULL;
+       pListClass->func.del = NULL;
+
+       g_pGenlist = elm_genlist_add(g_pEvasLayout);
+       g_pCircleGenlist = eext_circle_object_genlist_add(g_pGenlist, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(g_pCircleGenlist, "eext_circle_object_genlist_add", DeleteCircleSurfaceLayout());
+
+       g_pEvasItem = elm_genlist_item_append(g_pGenlist, pListClass, NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
+       CHECK_HANDLE_CLEANUP(g_pEvasItem, "elm_genlist_item_append", DeleteEvasWindow());
+
+       return 0;
+}
+
+/**
+* @function            DeleteCircleGenlist
+* @description                 Delete a circle genlist
+* @parameter           NA
+* @return                      NA
+*/
+void DeleteCircleGenlist(void)
+{
+       if ( g_pEvasItem )
+       {
+               elm_object_item_del(g_pEvasItem);
+               g_pEvasItem = NULL;
+       }
+       if ( g_pCircleGenlist )
+       {
+               evas_object_del(g_pCircleGenlist);
+               g_pCircleGenlist = NULL;
+       }
+       if ( g_pGenlist )
+       {
+               evas_object_del(g_pGenlist);
+               g_pGenlist = NULL;
+       }
+       DeleteCircleSurfaceLayout();
+}
+
+/**
+* @function            CreateCircleScroller
+* @description                 Creates a scroller
+* @parameter           NA
+* @return                      Evas_Object if successful, otherwise NULL.
+*/
+bool CreateCircleScroller(void)
+{
+       int nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       g_pScroller = elm_scroller_add(g_pEvasLayout);
+       g_pCircleScroller = eext_circle_object_scroller_add(g_pScroller, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(g_pCircleScroller, "eext_circle_object_scroller_add", DeleteCircleSurfaceLayout());
+
+       return 0;
+}
+
+/**
+* @function            DeleteCircleScroller
+* @description                 Delete a circle scroller
+* @parameter           NA
+* @return                      NA
+*/
+void DeleteCircleScroller(void)
+{
+       if ( g_pCircleScroller )
+       {
+               evas_object_del(g_pCircleScroller);
+               g_pCircleScroller = NULL;
+       }
+       if ( g_pScroller )
+       {
+               evas_object_del(g_pScroller);
+               g_pScroller = NULL;
+       }
+       DeleteCircleSurfaceLayout();
+}
+
+/**
+* @function            CreateCircleSlider
+* @description                 Creates a slider
+* @parameter           NA
+* @return                      Evas_Object if successful, otherwise NULL.
+*/
+bool CreateCircleSlider(void)
+{
+       int nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       g_pCircleSlider = eext_circle_object_slider_add(g_pEvasLayout, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(g_pCircleSlider, "eext_circle_object_slider_add", DeleteCircleSurfaceLayout());
+
+       return 0;
+}
+
+/**
+* @function            DeleteCircleSlider
+* @description                 Delete a circle slider
+* @parameter           NA
+* @return                      NA
+*/
+void DeleteCircleSlider(void)
+{
+       if ( g_pCircleSlider )
+       {
+               evas_object_del(g_pCircleSlider);
+               g_pCircleSlider = NULL;
+       }
+       DeleteCircleSurfaceLayout();
+}
+
+/**
+* @function            CreateMoreOption
+* @description                 Creates an more option
+* @parameter           NA
+* @return                      Evas_Object if successful, otherwise NULL.
+*/
+bool CreateMoreOption(void)
+{
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+
+       g_pMoreOption = eext_more_option_add(g_pEvasLayout);
+       CHECK_HANDLE_CLEANUP(g_pMoreOption, "eext_more_option_add", DeleteEvasWindow());
+
+       return 0;
+}
+
+/**
+* @function            DeleteMoreOption
+* @description                 Delete more option
+* @parameter           NA
+* @return                      NA
+*/
+void DeleteMoreOption(void)
+{
+       if ( g_pMoreOption )
+       {
+               evas_object_del(g_pMoreOption);
+               g_pMoreOption = NULL;
+       }
+       DeleteEvasWindow();
+}
+
+/**
+* @function            CreateCircleSelector
+* @description                 Creates a selector
+* @parameter           NA
+* @return                      Evas_Object if successful, otherwise NULL.
+*/
+bool CreateCircleSelector(void)
+{
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+
+       g_pCircleSelector = eext_rotary_selector_add(g_pEvasLayout);
+       CHECK_HANDLE_CLEANUP(g_pCircleSelector, "eext_rotary_selector_add", DeleteCircleSelector());
+
+       g_pEextItem = eext_rotary_selector_item_append(g_pCircleSelector);
+       CHECK_HANDLE_CLEANUP(g_pEextItem, "elm_list_item_append", DeleteCircleSelector());
+
+       return 0;
+}
+
+/**
+* @function            DeleteCircleSelector
+* @description                 Delete a circle selector
+* @parameter           NA
+* @return                      NA
+*/
+void DeleteCircleSelector(void)
+{
+       if ( g_pCircleSelector )
+       {
+               eext_rotary_selector_items_clear(g_pCircleSelector);
+               evas_object_del(g_pCircleSelector);
+               g_pCircleSelector = NULL;
+       }
+       DeleteEvasWindow();
+}
+
+/**
+* @function            CreateCircleSpinner
+* @description                 Creates a spinner
+* @parameter           NA
+* @return                      Evas_Object if successful, otherwise NULL.
+*/
+bool CreateCircleSpinner(void)
+{
+       int nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       g_pSpinner = elm_spinner_add(g_pEvasLayout);
+       g_pCircleSpinner = eext_circle_object_spinner_add(g_pSpinner, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(g_pCircleSpinner, "eext_circle_object_spinner_add", DeleteCircleSurfaceLayout());
+
+       return 0;
+}
+
+/**
+* @function            DeleteCircleSpinner
+* @description                 Delete a circle spinner
+* @parameter           NA
+* @return                      NA
+*/
+void DeleteCircleSpinner(void)
+{
+       if ( g_pCircleSpinner )
+       {
+               evas_object_del(g_pCircleSpinner);
+               g_pCircleSpinner = NULL;
+       }
+       if ( g_pSpinner )
+       {
+               evas_object_del(g_pSpinner);
+               g_pSpinner = NULL;
+       }
+       DeleteCircleSurfaceLayout();
+}
+
+/*****************************************Commented Code Start*****************************************/
+///**
+//* @function          CreateMoreOptionLayout
+//* @description               Creates an more option layout
+//* @parameter         NA
+//* @return                    Evas_Object if successful, otherwise NULL.
+//*/
+//bool CreateMoreOptionLayout(void)
+//{
+//     int nRet = CreateEvasWindow();
+//     PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+//
+//     g_pMoreOptionLayout = eext_more_option_layout_add(g_pEvasLayout);
+//     CHECK_HANDLE_CLEANUP(g_pMoreOptionLayout, "eext_more_option_layout_add", DeleteEvasWindow());
+//
+//     return 0;
+//}
+//
+///**
+//* @function          DeleteMoreOptionLayout
+//* @description               Delete more option layout
+//* @parameter         NA
+//* @return                    NA
+//*/
+//void DeleteMoreOptionLayout(void)
+//{
+//     if ( g_pMoreOptionLayout )
+//     {
+//             evas_object_del(g_pMoreOptionLayout);
+//             g_pMoreOptionLayout = NULL;
+//     }
+//     DeleteEvasWindow();
+//}
+/******************************************Commented Code End******************************************/
+
+/** @} */
diff --git a/src/itc/efl-ext/ITs-efl-ext-common.h b/src/itc/efl-ext/ITs-efl-ext-common.h
new file mode 100755 (executable)
index 0000000..4defec0
--- /dev/null
@@ -0,0 +1,158 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_EFL_EXT_COMMON_H_
+#define _ITS_EFL_EXT_COMMON_H_
+
+//Add test package related includes here
+#include <fcntl.h>
+#include <Ecore.h>
+#include <efl_extension.h>
+#include <appcore-efl.h>
+#include "assert.h"
+#include <malloc.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <system_info.h>
+#include <app.h>
+
+/** @addtogroup itc-efl-ext
+*  @ingroup itc
+*  @{
+*/
+
+//Common Macros
+#define API_NAMESPACE                          "EFL_EXT_ITC"
+#define PACKAGE                                        "EFL_EXT_ITC"
+#define TESTSTRING                                     "TestTizen"
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG, "a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
+       if ( !g_bEflExtCreation )\
+       {\
+               FPRINTF("[Line : %d][%s] Precondition of efl-ext failed so leaving test\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(eCompare, eRetVal, API, Error) {\
+       if ( eRetVal == eCompare )\
+       {\
+               if ( DEBUG )\
+               {\
+                       FPRINTF("[Line : %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, (int)eRetVal);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_CLEANUP(eCompare, eRetVal, API, Error, FreeResource) {\
+       if ( eRetVal == eCompare )\
+       {\
+               if ( DEBUG )\
+               {\
+                       FPRINTF("[Line : %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, (int)eRetVal);\
+               FreeResource;\
+               return 1;\
+       }\
+}
+
+#define CHECK_HANDLE(Handle, API) {\
+       if ( Handle == NULL )\
+       {\
+               FPRINTF("[Line : %d][%s] %s failed, error returned = Handle returned is NULL\\n", __LINE__, API_NAMESPACE, API);\
+               return 1;\
+       }\
+}
+
+#define CHECK_HANDLE_CLEANUP(Handle, API, FreeResource) {\
+       if ( Handle == NULL )\
+       {\
+               FPRINTF("[Line : %d][%s] %s failed, error returned = Handle returned is NULL\\n", __LINE__, API_NAMESPACE, API);\
+               FreeResource;\
+               return 1;\
+       }\
+}
+
+//Global Variables
+FILE *g_fpLog;
+bool g_bEflExtCreation;
+Evas_Object *g_pEvasWindow;
+Evas *g_pEvasCore;
+Evas_Object *g_pEvasConformant;
+Evas_Object *g_pEvasLayout;
+Evas_Object *g_pEvasNaviframe;
+Eext_Circle_Surface *g_pCircleSurfaceLayout;
+Evas_Object *g_pSpinner;
+Evas_Object *g_pScroller;
+Evas_Object *g_pGenlist;
+Evas_Object *g_pCircleObject;
+Evas_Object *g_pCircleGenlist;
+Evas_Object *g_pCircleScroller;
+Evas_Object *g_pCircleSlider;
+Evas_Object *g_pMoreOption;
+Evas_Object *g_pCircleSelector;
+Evas_Object *g_pImageObject;
+Evas_Object *g_pCircleSpinner;
+Elm_Object_Item *g_pEvasItem;
+Eext_Object_Item *g_pEextItem;
+
+//Common Functions to module
+bool CreateEvasWindow(void);
+void DeleteEvasWindow(void);
+bool CreateCircleSurfaceLayout(void);
+void DeleteCircleSurfaceLayout(void);
+bool CreateCircle(void);
+void DeleteCircle(void);
+bool CreateCircleGenlist(void);
+void DeleteCircleGenlist(void);
+bool CreateCircleScroller(void);
+void DeleteCircleScroller(void);
+bool CreateCircleSlider(void);
+void DeleteCircleSlider(void);
+bool CreateMoreOption(void);
+void DeleteMoreOption(void);
+bool CreateCircleSelector(void);
+void DeleteCircleSelector(void);
+bool CreateCircleSpinner(void);
+void DeleteCircleSpinner(void);
+
+/*****************************************Commented Code Start*****************************************/
+//Evas_Object *g_pMoreOptionLayout;
+//bool CreateMoreOptionLayout(void);
+//void DeleteMoreOptionLayout(void);
+/******************************************Commented Code End******************************************/
+
+/** @} */
+#endif  //_ITS_EFL_EXT_COMMON_H_
diff --git a/src/itc/efl-ext/ITs-efl-ext.c b/src/itc/efl-ext/ITs-efl-ext.c
new file mode 100755 (executable)
index 0000000..e399f80
--- /dev/null
@@ -0,0 +1,2713 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-efl-ext-common.h"
+
+//& set: EflExt
+
+/** @addtogroup itc-efl-ext
+*  @ingroup itc
+*  @{
+*/
+
+/*********************************************************************CallBack Functions Start*********************************************************************/
+
+/**
+ * @function           RotaryEventCallBack
+ * @description                Called when rotary event has occurred
+ * @parameter          void *data, Evas_Object *obj, Eext_Rotary_Event_Info *info
+ * @return                     NA
+ */
+Eina_Bool RotaryEventCallBack(void *data, Evas_Object *obj, Eext_Rotary_Event_Info *info)
+{
+       FPRINTF("[Line : %d][%s] %s Callback Invoked\\n", __LINE__, API_NAMESPACE, "RotaryEventCallBack");
+       return EINA_TRUE;
+}
+
+/**
+ * @function           RotaryHandlerCallBack
+ * @description                Called when rotary handler is used
+ * @parameter          void *data, Eext_Rotary_Event_Info *info
+ * @return                     NA
+ */
+Eina_Bool RotaryHandlerCallBack(void *data, Eext_Rotary_Event_Info *info)
+{
+       FPRINTF("[Line : %d][%s] %s Callback Invoked\\n", __LINE__, API_NAMESPACE, "RotaryHandlerCallBack");
+       return EINA_TRUE;
+}
+
+/**
+ * @function           EextEventCallBack
+ * @description                Called when eext event has occurred
+ * @parameter          void *data, Evas_Object *obj, void *event_info
+ * @return                     NA
+ */
+void EextEventCallBack(void *data, Evas_Object *obj, void *event_info)
+{
+       FPRINTF("[Line : %d][%s] %s Callback Invoked\\n", __LINE__, API_NAMESPACE, "EextEventCallBack");
+}
+
+static Eina_Bool g_CallbackHit = EINA_FALSE;
+
+/**
+ * @function           CtxpopupDismissedCallback
+ * @description                Called when eext_ctxpopup_back_cb api is called
+ * @parameter          void *data, Evas_Object *obj, void *event
+ * @return                     NA
+ */
+static void CtxpopupDismissedCallback(void *data, Evas_Object *obj, void *event)
+{
+   g_CallbackHit = EINA_TRUE;
+   elm_exit();
+}
+
+/**
+ * @function           NaviframeCallback
+ * @description                Called when eext_object_event_callback_add or eext_object_event_callback_del api is called
+ * @parameter          void *data, Evas_Object *obj, void *event_info
+ * @return                     NA
+ */
+static void NaviframeCallback(void *data, Evas_Object *obj, void *event_info)
+{
+   elm_exit();
+}
+/**********************************************************************CallBack Functions End**********************************************************************/
+
+/**
+ * @function           ITs_efl_ext_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_efl_ext_startup(void)
+{
+       struct stat buf;
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_EflExt_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bEflExtCreation = true;
+}
+
+
+/**
+ * @function           ITs_efl_ext_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_efl_ext_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_EflExt_p\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+/** @addtogroup itc-efl-ext-testcases
+*  @brief              Integration testcases for module efl-ext
+*  @ingroup    itc-efl-ext
+*  @{
+*/
+
+/**
+* @testcase                    ITc_eext_circle_surface_conformant_add_delete_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_surface_conformant_add, eext_circle_surface_del
+* @scenario                            Call eext_circle_surface_conformant_add, eext_circle_surface_del
+* @apicovered                  eext_circle_surface_conformant_add, eext_circle_surface_del
+* @passcase                            When eext_circle_surface_conformant_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_surface_conformant_add, eext_circle_surface_del
+//& type: auto
+int ITc_eext_circle_surface_conformant_add_delete_p(void)
+{
+       START_TEST;
+
+       Eext_Circle_Surface *pSurface = NULL;
+
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+
+       pSurface = eext_circle_surface_conformant_add(g_pEvasConformant);
+       CHECK_HANDLE_CLEANUP(pSurface, "eext_circle_surface_conformant_add", DeleteEvasWindow());
+
+       eext_circle_surface_del(pSurface);
+       DeleteEvasWindow();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_surface_layout_add_delete_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_surface_layout_add, eext_circle_surface_del
+* @scenario                            Call eext_circle_surface_layout_add, eext_circle_surface_del
+* @apicovered                  eext_circle_surface_layout_add, eext_circle_surface_del
+* @passcase                            When eext_circle_surface_layout_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_surface_layout_add, eext_circle_surface_del
+//& type: auto
+int ITc_eext_circle_surface_layout_add_delete_p(void)
+{
+       START_TEST;
+
+       Eext_Circle_Surface *pSurface = NULL;
+
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+
+       pSurface = eext_circle_surface_layout_add(g_pEvasLayout);
+       CHECK_HANDLE_CLEANUP(pSurface, "eext_circle_surface_layout_add", DeleteEvasWindow());
+
+       eext_circle_surface_del(pSurface);
+       DeleteEvasWindow();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_add_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_add
+* @scenario                            Call eext_circle_object_add
+* @apicovered                  eext_circle_object_add
+* @passcase                            When eext_circle_object_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_add
+//& type: auto
+int ITc_eext_circle_object_add_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Evas_Object *pCircle = NULL;
+
+       nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       pCircle = eext_circle_object_add(g_pEvasLayout, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(pCircle, "eext_circle_object_add", DeleteCircleSurfaceLayout());
+
+       evas_object_del(pCircle);
+       DeleteCircleSurfaceLayout();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_radius_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_radius_set, eext_circle_object_radius_get
+* @scenario                            Call eext_circle_object_radius_set, eext_circle_object_radius_get
+* @apicovered                  eext_circle_object_radius_set, eext_circle_object_radius_get
+* @passcase                            When eext_circle_object_radius_set and eext_circle_object_radius_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_radius_set, eext_circle_object_radius_get
+//& type: auto
+int ITc_eext_circle_object_radius_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       int nRadius = 0;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       eext_circle_object_radius_set(g_pCircleObject, 10);
+
+       nRadius = eext_circle_object_radius_get(g_pCircleObject);
+       PRINT_RESULT_CLEANUP(10, nRadius, "eext_circle_object_radius_get", "Returned radius not same as the radius set previously", DeleteCircle());
+
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_color_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_color_set, eext_circle_object_color_get
+* @scenario                            Call eext_circle_object_color_set, eext_circle_object_color_get
+* @apicovered                  eext_circle_object_color_set, eext_circle_object_color_get
+* @passcase                            When eext_circle_object_color_set and eext_circle_object_color_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_color_set, eext_circle_object_color_get
+//& type: auto
+int ITc_eext_circle_object_color_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = -1;
+       int nColourR = 1;
+       int nColourG = 1;
+       int nColourB = 1;
+       int nColourA = 1;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       eext_circle_object_color_set(g_pCircleObject, 0, 0, 0, 0);
+
+       eext_circle_object_color_get(g_pCircleObject, &nColourR, &nColourG, &nColourB, &nColourA);
+       PRINT_RESULT_CLEANUP(0, nColourR+nColourG+nColourB+nColourA, "eext_circle_object_color_get", "Returned colour not same as the colour set previously", DeleteCircle());
+
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_disabled_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_disabled_set, eext_circle_object_disabled_get
+* @scenario                            Call eext_circle_object_disabled_set, eext_circle_object_disabled_get
+* @apicovered                  eext_circle_object_disabled_set, eext_circle_object_disabled_get
+* @passcase                            When eext_circle_object_disabled_set and eext_circle_object_disabled_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_disabled_set, eext_circle_object_disabled_get
+//& type: auto
+int ITc_eext_circle_object_disabled_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eina_Bool bDisabled = EINA_FALSE;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       eext_circle_object_disabled_set(g_pCircleObject, EINA_TRUE);
+
+       bDisabled = eext_circle_object_disabled_get(g_pCircleObject);
+       PRINT_RESULT_CLEANUP(EINA_TRUE, bDisabled, "eext_circle_object_disabled_get", "Returned value not same as the value set previously", DeleteCircle());
+
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_value_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_value_set, eext_circle_object_value_get
+* @scenario                            Call eext_circle_object_value_set, eext_circle_object_value_get
+* @apicovered                  eext_circle_object_value_set, eext_circle_object_value_get
+* @passcase                            When eext_circle_object_value_set and eext_circle_object_value_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_value_set, eext_circle_object_value_get
+//& type: auto
+int ITc_eext_circle_object_value_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       int nValue = 0;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       eext_circle_object_value_set(g_pCircleObject, 10);
+
+       nValue = eext_circle_object_value_get(g_pCircleObject);
+       PRINT_RESULT_CLEANUP(10, nValue, "eext_circle_object_value_get", "Returned value not same as the value set previously", DeleteCircle());
+
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_value_min_max_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_value_min_max_set, eext_circle_object_value_min_max_get
+* @scenario                            Call eext_circle_object_value_min_max_set, eext_circle_object_value_min_max_get
+* @apicovered                  eext_circle_object_value_min_max_set, eext_circle_object_value_min_max_get
+* @passcase                            When eext_circle_object_value_min_max_set and eext_circle_object_value_min_max_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_value_min_max_set, eext_circle_object_value_min_max_get
+//& type: auto
+int ITc_eext_circle_object_value_min_max_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       double dMinValue = 0;
+       double dMaxValue = 0;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       eext_circle_object_value_min_max_set(g_pCircleObject, 10, 100);
+
+       eext_circle_object_value_min_max_get(g_pCircleObject, &dMinValue, &dMaxValue);
+       PRINT_RESULT_CLEANUP(10, (int)dMinValue, "eext_circle_object_value_min_max_get", "Returned value not same as the value set previously", DeleteCircle());
+       PRINT_RESULT_CLEANUP(100, (int)dMaxValue, "eext_circle_object_value_min_max_get", "Returned value not same as the value set previously", DeleteCircle());
+
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_angle_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_angle_set, eext_circle_object_angle_get
+* @scenario                            Call eext_circle_object_angle_set, eext_circle_object_angle_get
+* @apicovered                  eext_circle_object_angle_set, eext_circle_object_angle_get
+* @passcase                            When eext_circle_object_angle_set and eext_circle_object_angle_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_angle_set, eext_circle_object_angle_get
+//& type: auto
+int ITc_eext_circle_object_angle_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       int nValue = 0;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       eext_circle_object_angle_set(g_pCircleObject, 10);
+
+       nValue = eext_circle_object_angle_get(g_pCircleObject);
+       PRINT_RESULT_CLEANUP(10, nValue, "eext_circle_object_angle_get", "Returned value not same as the value set previously", DeleteCircle());
+
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_angle_offset_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_angle_offset_set, eext_circle_object_angle_offset_get
+* @scenario                            Call eext_circle_object_angle_offset_set, eext_circle_object_angle_offset_get
+* @apicovered                  eext_circle_object_angle_offset_set, eext_circle_object_angle_offset_get
+* @passcase                            When eext_circle_object_angle_offset_set and eext_circle_object_angle_offset_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_angle_offset_set, eext_circle_object_angle_offset_get
+//& type: auto
+int ITc_eext_circle_object_angle_offset_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       int nValue = 0;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       eext_circle_object_angle_offset_set(g_pCircleObject, 10);
+
+       nValue = eext_circle_object_angle_offset_get(g_pCircleObject);
+       PRINT_RESULT_CLEANUP(10, nValue, "eext_circle_object_angle_offset_get", "Returned value not same as the value set previously", DeleteCircle());
+
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_angle_min_max_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_angle_min_max_set, eext_circle_object_angle_min_max_get
+* @scenario                            Call eext_circle_object_angle_min_max_set, eext_circle_object_angle_min_max_get
+* @apicovered                  eext_circle_object_angle_min_max_set, eext_circle_object_angle_min_max_get
+* @passcase                            When eext_circle_object_angle_min_max_set and eext_circle_object_angle_min_max_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_angle_min_max_set, eext_circle_object_angle_min_max_get
+//& type: auto
+int ITc_eext_circle_object_angle_min_max_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       double dMinValue = 0;
+       double dMaxValue = 0;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       eext_circle_object_angle_min_max_set(g_pCircleObject, 10, 100);
+
+       eext_circle_object_angle_min_max_get(g_pCircleObject, &dMinValue, &dMaxValue);
+       PRINT_RESULT_CLEANUP(10, (int)dMinValue, "eext_circle_object_angle_min_max_get", "Returned value not same as the value set previously", DeleteCircle());
+       PRINT_RESULT_CLEANUP(100, (int)dMaxValue, "eext_circle_object_angle_min_max_get", "Returned value not same as the value set previously", DeleteCircle());
+
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_line_width_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_line_width_set, eext_circle_object_line_width_get
+* @scenario                            Call eext_circle_object_line_width_set, eext_circle_object_line_width_get
+* @apicovered                  eext_circle_object_line_width_set, eext_circle_object_line_width_get
+* @passcase                            When eext_circle_object_line_width_set and eext_circle_object_line_width_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_line_width_set, eext_circle_object_line_width_get
+//& type: auto
+int ITc_eext_circle_object_line_width_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       int nValue = 0;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       eext_circle_object_line_width_set(g_pCircleObject, 10);
+
+       nValue = eext_circle_object_line_width_get(g_pCircleObject);
+       PRINT_RESULT_CLEANUP(10, nValue, "eext_circle_object_line_width_get", "Returned value not same as the value set previously", DeleteCircle());
+
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_genlist_add_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_genlist_add
+* @scenario                            Call eext_circle_object_genlist_add
+* @apicovered                  eext_circle_object_genlist_add
+* @passcase                            When eext_circle_object_genlist_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_genlist_add
+//& type: auto
+int ITc_eext_circle_object_genlist_add_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Evas_Object *pGenlist = NULL;
+       Evas_Object *pCircle = NULL;
+
+       nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       pGenlist = elm_genlist_add(g_pEvasLayout);
+       pCircle = eext_circle_object_genlist_add(pGenlist, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(pCircle, "eext_circle_object_genlist_add", DeleteCircleSurfaceLayout());
+
+       evas_object_del(pCircle);
+       evas_object_del(pGenlist);
+       DeleteCircleSurfaceLayout();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_genlist_scroller_policy_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_genlist_scroller_policy_set, eext_circle_object_genlist_scroller_policy_get
+* @scenario                            Call eext_circle_object_genlist_scroller_policy_set, eext_circle_object_genlist_scroller_policy_get
+* @apicovered                  eext_circle_object_genlist_scroller_policy_set, eext_circle_object_genlist_scroller_policy_get
+* @passcase                            When eext_circle_object_genlist_scroller_policy_set and eext_circle_object_genlist_scroller_policy_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_genlist_scroller_policy_set, eext_circle_object_genlist_scroller_policy_get
+//& type: auto
+int ITc_eext_circle_object_genlist_scroller_policy_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Elm_Scroller_Policy eVerticalPolicy = ELM_SCROLLER_POLICY_OFF, eHorizontalPolicy = ELM_SCROLLER_POLICY_OFF;
+
+       nRet = CreateCircleGenlist();
+       PRINT_RESULT(0, nRet, "CreateCircleGenlist", "Returned Value not correct");
+
+       eext_circle_object_genlist_scroller_policy_set(g_pCircleGenlist, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_ON);
+
+       eext_circle_object_genlist_scroller_policy_get(g_pCircleGenlist, &eHorizontalPolicy, &eVerticalPolicy);
+       PRINT_RESULT_CLEANUP(ELM_SCROLLER_POLICY_ON, eHorizontalPolicy, "eext_circle_object_genlist_scroller_policy_get", "Returned value not same as the value set previously", DeleteCircleGenlist());
+       PRINT_RESULT_CLEANUP(ELM_SCROLLER_POLICY_ON, eVerticalPolicy, "eext_circle_object_genlist_scroller_policy_get", "Returned value not same as the value set previously", DeleteCircleGenlist());
+
+       DeleteCircleGenlist();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_scroller_add_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_scroller_add
+* @scenario                            Call eext_circle_object_scroller_add
+* @apicovered                  eext_circle_object_scroller_add
+* @passcase                            When eext_circle_object_scroller_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_scroller_add
+//& type: auto
+int ITc_eext_circle_object_scroller_add_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Evas_Object *pScroller = NULL;
+       Evas_Object *pCircle = NULL;
+
+       nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       pScroller = elm_scroller_add(g_pEvasLayout);
+       pCircle = eext_circle_object_scroller_add(pScroller, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(pCircle, "eext_circle_object_scroller_add", DeleteCircleSurfaceLayout());
+
+       evas_object_del(pCircle);
+       evas_object_del(pScroller);
+       DeleteCircleSurfaceLayout();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_scroller_policy_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_scroller_policy_set, eext_circle_object_scroller_policy_get
+* @scenario                            Call eext_circle_object_scroller_policy_set, eext_circle_object_scroller_policy_get
+* @apicovered                  eext_circle_object_scroller_policy_set, eext_circle_object_scroller_policy_get
+* @passcase                            When eext_circle_object_scroller_policy_set and eext_circle_object_scroller_policy_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_scroller_policy_set, eext_circle_object_scroller_policy_get
+//& type: auto
+int ITc_eext_circle_object_scroller_policy_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Elm_Scroller_Policy eVerticalPolicy = ELM_SCROLLER_POLICY_OFF, eHorizontalPolicy = ELM_SCROLLER_POLICY_OFF;
+
+       nRet = CreateCircleScroller();
+       PRINT_RESULT(0, nRet, "CreateCircleScroller", "Returned Value not correct");
+
+       eext_circle_object_scroller_policy_set(g_pCircleScroller, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_ON);
+
+       eext_circle_object_scroller_policy_get(g_pCircleScroller, &eHorizontalPolicy, &eVerticalPolicy);
+       PRINT_RESULT_CLEANUP(ELM_SCROLLER_POLICY_ON, eHorizontalPolicy, "eext_circle_object_scroller_policy_get", "Returned value not same as the value set previously", DeleteCircleScroller());
+       PRINT_RESULT_CLEANUP(ELM_SCROLLER_POLICY_ON, eVerticalPolicy, "eext_circle_object_scroller_policy_get", "Returned value not same as the value set previously", DeleteCircleScroller());
+
+       DeleteCircleScroller();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_datetime_add_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_datetime_add
+* @scenario                            Call eext_circle_object_datetime_add
+* @apicovered                  eext_circle_object_datetime_add
+* @passcase                            When eext_circle_object_datetime_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_datetime_add
+//& type: auto
+int ITc_eext_circle_object_datetime_add_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Evas_Object *pDatetime = NULL;
+       Evas_Object *pCircle = NULL;
+
+       nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       pDatetime = elm_datetime_add(g_pEvasLayout);
+       pCircle = eext_circle_object_datetime_add(pDatetime, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(pCircle, "eext_circle_object_datetime_add", DeleteCircleSurfaceLayout());
+
+       evas_object_del(pCircle);
+       evas_object_del(pDatetime);
+       DeleteCircleSurfaceLayout();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_progressbar_add_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_progressbar_add
+* @scenario                            Call eext_circle_object_progressbar_add
+* @apicovered                  eext_circle_object_progressbar_add
+* @passcase                            When eext_circle_object_progressbar_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_progressbar_add
+//& type: auto
+int ITc_eext_circle_object_progressbar_add_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Evas_Object *pCircle = NULL;
+
+       nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       pCircle = eext_circle_object_progressbar_add(g_pEvasLayout, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(pCircle, "eext_circle_object_progressbar_add", DeleteCircleSurfaceLayout());
+
+       evas_object_del(pCircle);
+       DeleteCircleSurfaceLayout();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_slider_add_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_slider_add
+* @scenario                            Call eext_circle_object_slider_add
+* @apicovered                  eext_circle_object_slider_add
+* @passcase                            When eext_circle_object_slider_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_slider_add
+//& type: auto
+int ITc_eext_circle_object_slider_add_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Evas_Object *pCircle = NULL;
+
+       nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       pCircle = eext_circle_object_slider_add(g_pEvasLayout, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(pCircle, "eext_circle_object_slider_add", DeleteCircleSurfaceLayout());
+
+       evas_object_del(pCircle);
+       DeleteCircleSurfaceLayout();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_slider_step_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_slider_step_set, eext_circle_object_slider_step_get
+* @scenario                            Call eext_circle_object_slider_step_set, eext_circle_object_slider_step_get
+* @apicovered                  eext_circle_object_slider_step_set, eext_circle_object_slider_step_get
+* @passcase                            When eext_circle_object_slider_step_set and eext_circle_object_slider_step_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_slider_step_set, eext_circle_object_slider_step_get
+//& type: auto
+int ITc_eext_circle_object_slider_step_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       double dValue = 0;
+
+       nRet = CreateCircleSlider();
+       PRINT_RESULT(0, nRet, "CreateCircleSlider", "Returned Value not correct");
+
+       eext_circle_object_slider_step_set(g_pCircleSlider, 10);
+
+       dValue = eext_circle_object_slider_step_get(g_pCircleSlider);
+       PRINT_RESULT_CLEANUP(10, (int)dValue, "eext_circle_object_slider_step_get", "Returned value not same as the value set previously", DeleteCircleSlider());
+
+       DeleteCircleSlider();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_object_event_callback_add_del_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_object_event_callback_add, eext_rotary_object_event_callback_del
+* @scenario                            Call eext_rotary_object_event_callback_add, eext_rotary_object_event_callback_del
+* @apicovered                  eext_rotary_object_event_callback_add, eext_rotary_object_event_callback_del
+* @passcase                            When eext_rotary_object_event_callback_add and eext_rotary_object_event_callback_del is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_object_event_callback_add, eext_rotary_object_event_callback_del
+//& type: auto
+int ITc_eext_rotary_object_event_callback_add_del_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eina_Bool bValue = EINA_FALSE;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       bValue = eext_rotary_object_event_callback_add(g_pCircleObject, RotaryEventCallBack, NULL);
+       PRINT_RESULT_CLEANUP(EINA_TRUE, bValue, "eext_rotary_object_event_callback_add", "Returned value not correct", DeleteCircle());
+
+       eext_rotary_object_event_callback_del(g_pCircleObject, RotaryEventCallBack);
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_object_event_callback_priority_add_del_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_object_event_callback_priority_add, eext_rotary_object_event_callback_del
+* @scenario                            Call eext_rotary_object_event_callback_priority_add, eext_rotary_object_event_callback_del
+* @apicovered                  eext_rotary_object_event_callback_priority_add, eext_rotary_object_event_callback_del
+* @passcase                            When eext_rotary_object_event_callback_priority_add and eext_rotary_object_event_callback_del is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_object_event_callback_priority_add, eext_rotary_object_event_callback_del
+//& type: auto
+int ITc_eext_rotary_object_event_callback_priority_add_del_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eina_Bool bValue = EINA_FALSE;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       bValue = eext_rotary_object_event_callback_priority_add(g_pCircleObject, EEXT_CALLBACK_PRIORITY_BEFORE, RotaryEventCallBack, NULL);
+       PRINT_RESULT_CLEANUP(EINA_TRUE, bValue, "eext_rotary_object_event_callback_priority_add", "Returned value not correct", DeleteCircle());
+
+       eext_rotary_object_event_callback_del(g_pCircleObject, RotaryEventCallBack);
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_event_handler_add_del_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_event_handler_add, eext_rotary_event_handler_del
+* @scenario                            Call eext_rotary_event_handler_add, eext_rotary_event_handler_del
+* @apicovered                  eext_rotary_event_handler_add, eext_rotary_event_handler_del
+* @passcase                            When eext_rotary_event_handler_add and eext_rotary_event_handler_del is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_event_handler_add, eext_rotary_event_handler_del
+//& type: auto
+int ITc_eext_rotary_event_handler_add_del_p(void)
+{
+       START_TEST;
+       Eina_Bool bValue = EINA_FALSE;
+
+       bValue = eext_rotary_event_handler_add(RotaryHandlerCallBack, NULL);
+       PRINT_RESULT(EINA_TRUE, bValue, "eext_rotary_event_handler_add", "Returned value not correct");
+
+       eext_rotary_event_handler_del(RotaryHandlerCallBack);
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_object_event_activated_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_object_event_activated_set
+* @scenario                            Call eext_rotary_object_event_activated_set
+* @apicovered                  eext_rotary_object_event_activated_set
+* @passcase                            When eext_rotary_object_event_activated_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_object_event_activated_set
+//& type: auto
+int ITc_eext_rotary_object_event_activated_set_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eina_Bool bValue = EINA_FALSE;
+
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       bValue = eext_rotary_object_event_callback_priority_add(g_pCircleObject, EEXT_CALLBACK_PRIORITY_BEFORE, RotaryEventCallBack, NULL);
+       PRINT_RESULT_CLEANUP(EINA_TRUE, bValue, "eext_rotary_object_event_callback_priority_add", "Returned value not correct", DeleteCircle());
+
+       eext_rotary_object_event_activated_set(g_pCircleObject, EINA_TRUE);
+
+       eext_rotary_object_event_callback_del(g_pCircleObject, RotaryEventCallBack);
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_object_event_callback_add_del_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_object_event_callback_add, eext_object_event_callback_del
+* @scenario                            Call eext_object_event_callback_add, eext_object_event_callback_del
+* @apicovered                  eext_object_event_callback_add, eext_object_event_callback_del
+* @passcase                            When eext_object_event_callback_add and eext_object_event_callback_del is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_object_event_callback_add, eext_object_event_callback_del
+//& type: auto
+int ITc_eext_object_event_callback_add_del_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       nRet = CreateCircle();
+       PRINT_RESULT(0, nRet, "CreateCircle", "Returned Value not correct");
+
+       eext_object_event_callback_add(g_pCircleObject, EEXT_CALLBACK_MORE, EextEventCallBack, NULL);
+       eext_object_event_callback_del(g_pCircleObject, EEXT_CALLBACK_MORE, EextEventCallBack);
+
+       DeleteCircle();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_surface_naviframe_add_delete_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_surface_naviframe_add, eext_circle_surface_del
+* @scenario                            Call eext_circle_surface_naviframe_add, eext_circle_surface_del
+* @apicovered                  eext_circle_surface_naviframe_add, eext_circle_surface_del
+* @passcase                            When eext_circle_surface_naviframe_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_surface_naviframe_add, eext_circle_surface_del
+//& type: auto
+int ITc_eext_circle_surface_naviframe_add_delete_p(void)
+{
+       START_TEST;
+
+       Eext_Circle_Surface *pSurface = NULL;
+
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+
+       pSurface = eext_circle_surface_naviframe_add(g_pEvasNaviframe);
+       CHECK_HANDLE_CLEANUP(pSurface, "eext_circle_surface_naviframe_add", DeleteEvasWindow());
+
+       eext_circle_surface_del(pSurface);
+       DeleteEvasWindow();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_more_option_add_delete_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_more_option_add, eext_circle_surface_del
+* @scenario                            Call eext_more_option_add, eext_circle_surface_del
+* @apicovered                  eext_more_option_add, eext_circle_surface_del
+* @passcase                            When eext_more_option_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_more_option_add, eext_circle_surface_del
+//& type: auto
+int ITc_eext_more_option_add_delete_p(void)
+{
+       START_TEST;
+
+       Evas_Object *pLayout = NULL;
+
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+
+       pLayout = eext_more_option_add(g_pEvasLayout);
+       CHECK_HANDLE_CLEANUP(pLayout, "eext_more_option_add", DeleteEvasWindow());
+
+       evas_object_del(pLayout);
+       DeleteEvasWindow();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_more_option_direction_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_more_option_direction_set, eext_more_option_direction_get
+* @scenario                            Call eext_more_option_direction_set, eext_more_option_direction_get
+* @apicovered                  eext_more_option_direction_set, eext_more_option_direction_get
+* @passcase                            When eext_more_option_direction_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_more_option_direction_set, eext_more_option_direction_get
+//& type: auto
+int ITc_eext_more_option_direction_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_More_Option_Direction eDirection = EEXT_MORE_OPTION_DIRECTION_BOTTOM;
+
+       nRet = CreateMoreOption();
+       PRINT_RESULT(0, nRet, "CreateMoreOption", "Returned Value not correct");
+
+       eext_more_option_direction_set(g_pMoreOption, EEXT_MORE_OPTION_DIRECTION_RIGHT);
+
+       eDirection = eext_more_option_direction_get(g_pMoreOption);
+       PRINT_RESULT_CLEANUP(EEXT_MORE_OPTION_DIRECTION_RIGHT, eDirection, "eext_more_option_direction_get", "Returned Value not correct", DeleteMoreOption());
+
+       DeleteMoreOption();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_more_option_opened_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_more_option_opened_set, eext_more_option_opened_get
+* @scenario                            Call eext_more_option_opened_set, eext_more_option_opened_get
+* @apicovered                  eext_more_option_opened_set, eext_more_option_opened_get
+* @passcase                            When eext_more_option_opened_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_more_option_opened_set, eext_more_option_opened_get
+//& type: auto
+int ITc_eext_more_option_opened_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eina_Bool bOpened = EINA_FALSE;
+
+       nRet = CreateMoreOption();
+       PRINT_RESULT(0, nRet, "CreateMoreOption", "Returned Value not correct");
+
+       eext_more_option_opened_set(g_pMoreOption, EINA_TRUE);
+
+       bOpened = eext_more_option_opened_get(g_pMoreOption);
+       PRINT_RESULT_CLEANUP(EINA_TRUE, bOpened, "eext_more_option_opened_get", "Returned Value not correct", DeleteMoreOption());
+
+       DeleteMoreOption();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_more_option_item_append_del_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_more_option_item_append, eext_more_option_item_del
+* @scenario                            Call eext_more_option_item_append, eext_more_option_item_del
+* @apicovered                  eext_more_option_item_append, eext_more_option_item_del
+* @passcase                            When eext_more_option_item_append is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_more_option_item_append, eext_more_option_item_del
+//& type: auto
+int ITc_eext_more_option_item_append_del_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pObject = NULL;
+
+       nRet = CreateMoreOption();
+       PRINT_RESULT(0, nRet, "CreateMoreOption", "Returned Value not correct");
+
+       pObject = eext_more_option_item_append(g_pMoreOption);
+       CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_item_append", DeleteMoreOption());
+
+       eext_more_option_item_del(pObject);
+       DeleteMoreOption();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_more_option_item_prepend_del_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_more_option_item_prepend, eext_more_option_item_del
+* @scenario                            Call eext_more_option_item_prepend, eext_more_option_item_del
+* @apicovered                  eext_more_option_item_prepend, eext_more_option_item_del
+* @passcase                            When eext_more_option_item_prepend is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_more_option_item_prepend, eext_more_option_item_del
+//& type: auto
+int ITc_eext_more_option_item_prepend_del_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pObject = NULL;
+
+       nRet = CreateMoreOption();
+       PRINT_RESULT(0, nRet, "CreateMoreOption", "Returned Value not correct");
+
+       pObject = eext_more_option_item_prepend(g_pMoreOption);
+       CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_item_prepend", DeleteMoreOption());
+
+       eext_more_option_item_del(pObject);
+       DeleteMoreOption();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_more_option_item_insert_after_clear_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_more_option_item_insert_after, eext_more_option_items_clear
+* @scenario                            Call eext_more_option_item_insert_after, eext_more_option_items_clear
+* @apicovered                  eext_more_option_item_insert_after, eext_more_option_items_clear
+* @passcase                            When eext_more_option_item_insert_after is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_more_option_item_insert_after, eext_more_option_items_clear
+//& type: auto
+int ITc_eext_more_option_item_insert_after_clear_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pObject = NULL, *pNewObject = NULL;
+
+       nRet = CreateMoreOption();
+       PRINT_RESULT(0, nRet, "CreateMoreOption", "Returned Value not correct");
+
+       pObject = eext_more_option_item_append(g_pMoreOption);
+       CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_item_append", DeleteMoreOption());
+
+       pNewObject = eext_more_option_item_insert_after(g_pMoreOption, pObject);
+       CHECK_HANDLE_CLEANUP(pNewObject, "eext_more_option_item_insert_after", eext_more_option_items_clear(g_pMoreOption); DeleteMoreOption());
+
+       eext_more_option_items_clear(g_pMoreOption);
+       DeleteMoreOption();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_more_option_item_insert_before_clear_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_more_option_item_insert_before, eext_more_option_items_clear
+* @scenario                            Call eext_more_option_item_insert_before, eext_more_option_items_clear
+* @apicovered                  eext_more_option_item_insert_before, eext_more_option_items_clear
+* @passcase                            When eext_more_option_item_insert_before is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_more_option_item_insert_before, eext_more_option_items_clear
+//& type: auto
+int ITc_eext_more_option_item_insert_before_clear_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pObject = NULL, *pNewObject = NULL;
+
+       nRet = CreateMoreOption();
+       PRINT_RESULT(0, nRet, "CreateMoreOption", "Returned Value not correct");
+
+       pObject = eext_more_option_item_append(g_pMoreOption);
+       CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_item_append", DeleteMoreOption());
+
+       pNewObject = eext_more_option_item_insert_before(g_pMoreOption, pObject);
+       CHECK_HANDLE_CLEANUP(pNewObject, "eext_more_option_item_insert_before", eext_more_option_items_clear(g_pMoreOption); DeleteMoreOption());
+
+       eext_more_option_items_clear(g_pMoreOption);
+       DeleteMoreOption();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_more_option_item_part_content_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_more_option_item_part_content_set, eext_more_option_item_part_content_get
+* @scenario                            Call eext_more_option_item_part_content_set, eext_more_option_item_part_content_get
+* @apicovered                  eext_more_option_item_part_content_set, eext_more_option_item_part_content_get
+* @passcase                            When eext_more_option_item_part_content_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_more_option_item_part_content_set, eext_more_option_item_part_content_get
+//& type: auto
+int ITc_eext_more_option_item_part_content_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pObject = NULL;
+       Evas_Object *pReturnedContent = NULL;
+       Evas_Object *pContent = NULL;
+
+       nRet = CreateMoreOption();
+       PRINT_RESULT(0, nRet, "CreateMoreOption", "Returned Value not correct");
+
+       pObject = eext_more_option_item_append(g_pMoreOption);
+       CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_item_append", DeleteMoreOption());
+
+       pContent = elm_button_add(g_pMoreOption);
+       CHECK_HANDLE_CLEANUP(pObject, "elm_button_add", eext_more_option_items_clear(g_pMoreOption); DeleteMoreOption());
+       evas_object_show(pContent);
+
+       eext_more_option_item_part_content_set(pObject, "selector,content", pContent);
+
+       pReturnedContent = eext_more_option_item_part_content_get(pObject, "selector,content");
+       CHECK_HANDLE_CLEANUP(pReturnedContent, "eext_more_option_item_part_content_get", evas_object_del(pContent); eext_more_option_items_clear(g_pMoreOption); DeleteMoreOption());
+       if(pContent != pReturnedContent)
+       {
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s\\n", __LINE__, API_NAMESPACE, "eext_more_option_item_part_content_get", "Content Mismatch");
+               evas_object_del(pContent);
+               eext_more_option_items_clear(g_pMoreOption);
+               DeleteMoreOption();
+               return 1;
+       }
+
+       evas_object_del(pContent);
+       eext_more_option_items_clear(g_pMoreOption);
+       DeleteMoreOption();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_more_option_item_part_text_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_more_option_item_part_text_set, eext_more_option_item_part_text_get
+* @scenario                            Call eext_more_option_item_part_text_set, eext_more_option_item_part_text_get
+* @apicovered                  eext_more_option_item_part_text_set, eext_more_option_item_part_text_get
+* @passcase                            When eext_more_option_item_part_text_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_more_option_item_part_text_set, eext_more_option_item_part_text_get
+//& type: auto
+int ITc_eext_more_option_item_part_text_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pObject = NULL;
+
+       nRet = CreateMoreOption();
+       PRINT_RESULT(0, nRet, "CreateMoreOption", "Returned Value not correct");
+
+       pObject = eext_more_option_item_append(g_pMoreOption);
+       CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_item_append", DeleteMoreOption());
+
+       eext_more_option_item_part_text_set(pObject, "selector,main_text", TESTSTRING);
+
+       const char *pReturnedContent = eext_more_option_item_part_text_get(pObject, "selector,main_text");
+       PRINT_RESULT_CLEANUP(0, strcmp(pReturnedContent, TESTSTRING), "eext_more_option_item_part_text_get", "Returned string not same as the string set previously", eext_more_option_items_clear(g_pMoreOption); DeleteMoreOption());
+
+       eext_more_option_items_clear(g_pMoreOption);
+       DeleteMoreOption();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_more_option_item_domain_translatable_part_text_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_more_option_item_domain_translatable_part_text_set, eext_more_option_item_part_text_get
+* @scenario                            Call eext_more_option_item_domain_translatable_part_text_set, eext_more_option_item_part_text_get
+* @apicovered                  eext_more_option_item_domain_translatable_part_text_set, eext_more_option_item_part_text_get
+* @passcase                            When eext_more_option_item_domain_translatable_part_text_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_more_option_item_domain_translatable_part_text_set, eext_more_option_item_part_text_get
+//& type: auto
+int ITc_eext_more_option_item_domain_translatable_part_text_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pObject = NULL;
+
+       nRet = CreateMoreOption();
+       PRINT_RESULT(0, nRet, "CreateMoreOption", "Returned Value not correct");
+
+       pObject = eext_more_option_item_append(g_pMoreOption);
+       CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_item_append", DeleteMoreOption());
+
+       eext_more_option_item_domain_translatable_part_text_set(pObject, "selector,main_text", "selector,main_text", TESTSTRING);
+
+       const char *pReturnedContent = eext_more_option_item_part_text_get(pObject, "selector,main_text");
+       PRINT_RESULT_CLEANUP(0, strcmp(pReturnedContent, TESTSTRING), "eext_more_option_item_part_text_get", "Returned string not same as the string set previously", eext_more_option_items_clear(g_pMoreOption); DeleteMoreOption());
+
+       eext_more_option_items_clear(g_pMoreOption);
+       DeleteMoreOption();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_more_option_items_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_more_option_items_get
+* @scenario                            Call eext_more_option_items_get
+* @apicovered                  eext_more_option_items_get
+* @passcase                            When eext_more_option_items_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_more_option_items_get
+//& type: auto
+int ITc_eext_more_option_items_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pObject = NULL;
+
+       nRet = CreateMoreOption();
+       PRINT_RESULT(0, nRet, "CreateMoreOption", "Returned Value not correct");
+
+       pObject = eext_more_option_item_append(g_pMoreOption);
+       CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_item_append", DeleteMoreOption());
+
+       const Eina_List *pList = eext_more_option_items_get(g_pMoreOption);
+       CHECK_HANDLE_CLEANUP(pList, "eext_more_option_items_get", DeleteMoreOption());
+
+       eext_more_option_items_clear(g_pMoreOption);
+       DeleteMoreOption();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_add_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_add
+* @scenario                            Call eext_rotary_selector_add
+* @apicovered                  eext_rotary_selector_add
+* @passcase                            When eext_rotary_selector_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_add
+//& type: auto
+int ITc_eext_rotary_selector_add_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Evas_Object *pCircle = NULL;
+
+       nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+
+       pCircle = eext_rotary_selector_add(g_pEvasLayout);
+       CHECK_HANDLE_CLEANUP(pCircle, "eext_rotary_selector_add", DeleteEvasWindow());
+
+       evas_object_del(pCircle);
+       DeleteEvasWindow();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_item_append_del_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_item_append, eext_rotary_selector_item_del
+* @scenario                            Call eext_rotary_selector_item_append and eext_rotary_selector_item_del
+* @apicovered                  eext_rotary_selector_item_append, eext_rotary_selector_item_del
+* @passcase                            When eext_rotary_selector_item_append and eext_rotary_selector_item_del is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_item_append and eext_rotary_selector_item_del
+//& type: auto
+int ITc_eext_rotary_selector_item_append_del_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pItem = NULL;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       pItem = eext_rotary_selector_item_append(g_pCircleSelector);
+       CHECK_HANDLE_CLEANUP(pItem, "eext_rotary_selector_item_append", DeleteCircleSelector());
+       if ( pItem != NULL )
+       {
+               eext_rotary_selector_item_del(pItem);
+               pItem = NULL;
+       }
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_item_prepend_clear_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_item_prepend, eext_rotary_selector_items_clear
+* @scenario                            Call eext_rotary_selector_item_prepend and eext_rotary_selector_items_clear
+* @apicovered                  eext_rotary_selector_item_prepend, eext_rotary_selector_items_clear
+* @passcase                            When eext_rotary_selector_item_prepend and eext_rotary_selector_items_clear is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_item_prepend and eext_rotary_selector_items_clear
+//& type: auto
+int ITc_eext_rotary_selector_item_prepend_clear_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pItem = NULL;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       pItem = eext_rotary_selector_item_prepend(g_pCircleSelector);
+       CHECK_HANDLE_CLEANUP(pItem, "eext_rotary_selector_item_prepend", DeleteCircleSelector());
+
+       eext_rotary_selector_items_clear(g_pCircleSelector);
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_item_insert_after_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_item_insert_after
+* @scenario                            Call eext_rotary_selector_item_insert_after
+* @apicovered                  eext_rotary_selector_item_insert_after
+* @passcase                            When eext_rotary_selector_item_insert_after is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_item_insert_after
+//& type: auto
+int ITc_eext_rotary_selector_item_insert_after_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pItem = NULL;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       pItem = eext_rotary_selector_item_insert_after(g_pCircleSelector, g_pEextItem);
+       CHECK_HANDLE_CLEANUP(pItem, "eext_rotary_selector_item_insert_after", DeleteCircleSelector());
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_item_insert_before_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_item_insert_before
+* @scenario                            Call eext_rotary_selector_item_insert_before
+* @apicovered                  eext_rotary_selector_item_insert_before
+* @passcase                            When eext_rotary_selector_item_insert_before is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_item_insert_before
+//& type: auto
+int ITc_eext_rotary_selector_item_insert_before_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pItem = NULL;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       pItem = eext_rotary_selector_item_insert_before(g_pCircleSelector, g_pEextItem);
+       CHECK_HANDLE_CLEANUP(pItem, "eext_rotary_selector_item_insert_before", DeleteCircleSelector());
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_item_part_text_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_item_part_text_set, eext_rotary_selector_item_part_text_get
+* @scenario                            Call eext_rotary_selector_item_part_text_set, eext_rotary_selector_item_part_text_get
+* @apicovered                  eext_rotary_selector_item_part_text_set, eext_rotary_selector_item_part_text_get
+* @passcase                            When eext_rotary_selector_item_part_text_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_item_part_text_set, eext_rotary_selector_item_part_text_get
+//& type: auto
+int ITc_eext_rotary_selector_item_part_text_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       eext_rotary_selector_item_part_text_set(g_pEextItem, "selector,main_text", TESTSTRING);
+
+       const char *pReturnedContent = eext_rotary_selector_item_part_text_get(g_pEextItem, "selector,main_text");
+       PRINT_RESULT_CLEANUP(0, strcmp(pReturnedContent, TESTSTRING), "eext_rotary_selector_item_part_text_get", "Returned string not same as the string set previously", DeleteCircleSelector());
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_item_domain_translatable_part_text_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_item_domain_translatable_part_text_set, eext_rotary_selector_item_part_text_get
+* @scenario                            Call eext_rotary_selector_item_domain_translatable_part_text_set, eext_rotary_selector_item_part_text_get
+* @apicovered                  eext_rotary_selector_item_domain_translatable_part_text_set, eext_rotary_selector_item_part_text_get
+* @passcase                            When eext_rotary_selector_item_domain_translatable_part_text_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_item_domain_translatable_part_text_set, eext_rotary_selector_item_part_text_get
+//& type: auto
+int ITc_eext_rotary_selector_item_domain_translatable_part_text_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       eext_rotary_selector_item_domain_translatable_part_text_set(g_pEextItem, "selector,main_text", "selector,main_text", TESTSTRING);
+
+       const char *pReturnedContent = eext_rotary_selector_item_part_text_get(g_pEextItem, "selector,main_text");
+       PRINT_RESULT_CLEANUP(0, strcmp(pReturnedContent, TESTSTRING), "eext_rotary_selector_item_part_text_get", "Returned string not same as the string set previously", DeleteCircleSelector());
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_item_part_color_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_item_part_color_set, eext_rotary_selector_item_part_color_get
+* @scenario                            Call eext_rotary_selector_item_part_color_set, eext_rotary_selector_item_part_color_get
+* @apicovered                  eext_rotary_selector_item_part_color_set, eext_rotary_selector_item_part_color_get
+* @passcase                            When eext_rotary_selector_item_part_color_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_item_part_color_set, eext_rotary_selector_item_part_color_get
+//& type: auto
+int ITc_eext_rotary_selector_item_part_color_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       int nColourR = 1;
+       int nColourG = 1;
+       int nColourB = 1;
+       int nColourA = 1;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       eext_rotary_selector_item_part_content_set(g_pEextItem, "item,bg_image", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, g_pImageObject);
+
+       eext_rotary_selector_item_part_color_set(g_pEextItem, "item,bg_image", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, 0, 0, 0, 0);
+
+       eext_rotary_selector_item_part_color_get(g_pEextItem, "item,bg_image", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, &nColourR, &nColourG, &nColourB, &nColourA);
+       PRINT_RESULT_CLEANUP(0, nColourR+nColourG+nColourB+nColourA, "eext_rotary_selector_item_part_color_get", "Returned colour not same as the colour set previously", DeleteCircleSelector());
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_part_color_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_part_color_set, eext_rotary_selector_part_color_get
+* @scenario                            Call eext_rotary_selector_part_color_set, eext_rotary_selector_part_color_get
+* @apicovered                  eext_rotary_selector_part_color_set, eext_rotary_selector_part_color_get
+* @passcase                            When eext_rotary_selector_part_color_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_part_color_set, eext_rotary_selector_part_color_get
+//& type: auto
+int ITc_eext_rotary_selector_part_color_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       int nColourR = 1;
+       int nColourG = 1;
+       int nColourB = 1;
+       int nColourA = 1;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       eext_rotary_selector_part_content_set(g_pCircleSelector, "selector,bg_image", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, g_pImageObject);
+
+       eext_rotary_selector_part_color_set(g_pCircleSelector, "selector,bg_image", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, 0, 0, 0, 0);
+
+       eext_rotary_selector_part_color_get(g_pCircleSelector, "selector,bg_image", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, &nColourR, &nColourG, &nColourB, &nColourA);
+       PRINT_RESULT_CLEANUP(0, nColourR+nColourG+nColourB+nColourA, "eext_rotary_selector_part_color_get", "Returned colour not same as the colour set previously", DeleteCircleSelector());
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_item_part_content_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_item_part_content_set, eext_rotary_selector_item_part_content_get
+* @scenario                            Call eext_rotary_selector_item_part_content_set, eext_rotary_selector_item_part_content_get
+* @apicovered                  eext_rotary_selector_item_part_content_set, eext_rotary_selector_item_part_content_get
+* @passcase                            When eext_rotary_selector_item_part_content_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_item_part_content_set, eext_rotary_selector_item_part_content_get
+//& type: auto
+int ITc_eext_rotary_selector_item_part_content_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Evas_Object *pObject = NULL;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       eext_rotary_selector_item_part_content_set(g_pEextItem, "item,bg_image", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, g_pImageObject);
+
+       pObject = eext_rotary_selector_item_part_content_get(g_pEextItem, "item,bg_image", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL);
+       CHECK_HANDLE_CLEANUP(pObject, "eext_rotary_selector_item_part_content_get", DeleteCircleSelector());
+       if(pObject != g_pImageObject)
+       {
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s\\n", __LINE__, API_NAMESPACE, "eext_rotary_selector_item_part_content_get", "Content Mismatch");
+               DeleteCircleSelector();
+               return 1;
+       }
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_part_content_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_part_content_set, eext_rotary_selector_part_content_get
+* @scenario                            Call eext_rotary_selector_part_content_set, eext_rotary_selector_part_content_get
+* @apicovered                  eext_rotary_selector_part_content_set, eext_rotary_selector_part_content_get
+* @passcase                            When eext_rotary_selector_part_content_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_part_content_set, eext_rotary_selector_part_content_get
+//& type: auto
+int ITc_eext_rotary_selector_part_content_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Evas_Object *pObject = NULL;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       eext_rotary_selector_part_content_set(g_pCircleSelector, "selector,bg_image", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, g_pImageObject);
+
+       pObject = eext_rotary_selector_part_content_get(g_pCircleSelector, "selector,bg_image", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL);
+       CHECK_HANDLE_CLEANUP(pObject, "eext_rotary_selector_part_content_get", DeleteCircleSelector());
+       if(pObject != g_pImageObject)
+       {
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s\\n", __LINE__, API_NAMESPACE, "eext_rotary_selector_part_content_get", "Content Mismatch");
+               DeleteCircleSelector();
+               return 1;
+       }
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_selected_item_set_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_selected_item_set, eext_rotary_selector_selected_item_get
+* @scenario                            Call eext_rotary_selector_selected_item_set, eext_rotary_selector_selected_item_get
+* @apicovered                  eext_rotary_selector_selected_item_set, eext_rotary_selector_selected_item_get
+* @passcase                            When eext_rotary_selector_selected_item_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_selected_item_set, eext_rotary_selector_selected_item_get
+//& type: auto
+int ITc_eext_rotary_selector_selected_item_set_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Eext_Object_Item *pObject = NULL;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       eext_rotary_selector_selected_item_set(g_pCircleSelector, g_pEextItem);
+
+       pObject = eext_rotary_selector_selected_item_get(g_pCircleSelector);
+       CHECK_HANDLE_CLEANUP(pObject, "eext_rotary_selector_selected_item_get", DeleteCircleSelector());
+       if(pObject != g_pEextItem)
+       {
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s\\n", __LINE__, API_NAMESPACE, "eext_rotary_selector_selected_item_get", "Content Mismatch");
+               DeleteCircleSelector();
+               return 1;
+       }
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_rotary_selector_items_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_rotary_selector_items_get
+* @scenario                            Call eext_rotary_selector_items_get
+* @apicovered                  eext_rotary_selector_items_get
+* @passcase                            When eext_rotary_selector_items_get is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_rotary_selector_items_get
+//& type: auto
+int ITc_eext_rotary_selector_items_get_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+
+       nRet = CreateCircleSelector();
+       PRINT_RESULT(0, nRet, "CreateCircleSelector", "Returned Value not correct");
+
+       const Eina_List *pList = eext_rotary_selector_items_get(g_pCircleSelector);
+       CHECK_HANDLE_CLEANUP(pList, "eext_rotary_selector_items_get", DeleteCircleSelector());
+
+       DeleteCircleSelector();
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_spinner_add_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_spinner_add
+* @scenario                            Call eext_circle_object_spinner_add
+* @apicovered                  eext_circle_object_spinner_add
+* @passcase                            When eext_circle_object_spinner_add is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_spinner_add
+//& type: auto
+int ITc_eext_circle_object_spinner_add_p(void)
+{
+       START_TEST;
+
+       int nRet = 0;
+       Evas_Object *pSpinner = NULL;
+       Evas_Object *pCircle = NULL;
+
+       nRet = CreateCircleSurfaceLayout();
+       PRINT_RESULT(0, nRet, "CreateCircleSurfaceLayout", "Returned Value not correct");
+
+       pSpinner = elm_spinner_add(g_pEvasLayout);
+       pCircle = eext_circle_object_spinner_add(pSpinner, g_pCircleSurfaceLayout);
+       CHECK_HANDLE_CLEANUP(pCircle, "eext_circle_object_spinner_add", DeleteCircleSurfaceLayout());
+
+       evas_object_del(pCircle);
+       evas_object_del(pSpinner);
+       DeleteCircleSurfaceLayout();
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_eext_circle_object_spinner_angle_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Test eext_circle_object_spinner_angle_set
+* @scenario                            Call eext_circle_object_spinner_angle_set
+* @apicovered                  eext_circle_object_spinner_angle_set
+* @passcase                            When eext_circle_object_spinner_angle_set is successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_circle_object_spinner_angle_set
+//& type: auto
+int ITc_eext_circle_object_spinner_angle_set_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+
+       nRet = CreateCircleSpinner();
+       PRINT_RESULT(0, nRet, "CreateCircleSpinner", "Returned Value not correct");
+
+       eext_circle_object_spinner_angle_set(g_pCircleSpinner, 10);
+
+       DeleteCircleSpinner();
+       return 0;
+}
+
+
+
+/**
+* @testcase                    ITc_eext_popup_back_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Test eext_popup_back_cb api
+* @scenario                            Call eext_popup_back_cb
+* @apicovered                  elm_popup_add, evas_object_ref_get and eext_popup_back_cb
+* @passcase                            After eext_popup_back_cb api, evas_object_ref_get api returns 0.
+* @failcase                            After eext_popup_back_cb api, evas_object_ref_get api returns greater than 0 value.
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_popup_back_cb
+//& type: auto
+int ITc_eext_popup_back_cb_p(void)
+{
+       START_TEST;
+
+       Evas_Object *pPopupWindow = NULL;
+       
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+       
+       pPopupWindow = elm_popup_add(g_pEvasWindow);
+       CHECK_HANDLE_CLEANUP(pPopupWindow, "elm_popup_add", DeleteEvasWindow());
+       
+       elm_win_resize_object_add(g_pEvasWindow, pPopupWindow);
+    evas_object_show(pPopupWindow);
+    evas_object_show(g_pEvasWindow);
+       
+       eext_popup_back_cb(NULL, pPopupWindow, NULL); //target api
+       int refno = evas_object_ref_get(pPopupWindow);
+       if (refno != 0)
+       {
+               FPRINTF("[Line : %d][%s] PopupWindow ref count is %d.\\n", __LINE__, API_NAMESPACE, refno);
+               DeleteEvasWindow();
+               return 1;
+       }
+       
+       DeleteEvasWindow();
+       return 0;
+}
+
+
+/**
+* @testcase                    ITc_eext_ctxpopup_back_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Test eext_ctxpopup_back_cb api
+* @scenario                            Call eext_ctxpopup_back_cb
+* @apicovered                  elm_ctxpopup_add, evas_object_smart_callback_add and eext_ctxpopup_back_cb
+* @passcase                            After eext_ctxpopup_back_cb api, callback invoked.
+* @failcase                            After eext_ctxpopup_back_cb api, callback does not invoked.
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_ctxpopup_back_cb
+//& type: auto
+int ITc_eext_ctxpopup_back_cb_p(void)
+{
+       START_TEST;
+    Evas_Object *pCtxPopup = NULL;
+
+    g_CallbackHit = EINA_FALSE;
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+    
+       pCtxPopup = elm_ctxpopup_add(g_pEvasWindow);
+    CHECK_HANDLE_CLEANUP(pCtxPopup, "elm_ctxpopup_add", DeleteEvasWindow());
+       
+    elm_ctxpopup_item_append(pCtxPopup, "test", NULL, NULL, NULL);
+    elm_win_resize_object_add(g_pEvasWindow, pCtxPopup);
+    evas_object_show(pCtxPopup);
+    evas_object_show(g_pEvasWindow);
+
+    evas_object_smart_callback_add(pCtxPopup, "dismissed", CtxpopupDismissedCallback, NULL);
+    
+       eext_ctxpopup_back_cb(NULL, pCtxPopup, NULL);  //target api
+    elm_run();
+    
+       if (g_CallbackHit != EINA_TRUE)
+       {
+               FPRINTF("[Line : %d][%s] eext_ctxpopup_back_cb failed.\\n", __LINE__, API_NAMESPACE);
+               DeleteEvasWindow();
+               return 1;
+       }
+       
+       DeleteEvasWindow();
+    return 0;
+}
+
+
+/**
+* @testcase                    ITc_eext_entry_back_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Test eext_entry_back_cb api
+* @scenario                            Call eext_entry_back_cb
+* @apicovered                  elm_entry_add, evas_object_size_hint_weight_set, elm_object_text_set, elm_entry_selection_get and eext_entry_back_cb
+* @passcase                            After eext_entry_back_cb api, elm_entry_selection_get returns null.
+* @failcase                            After eext_entry_back_cb api, elm_entry_selection_get does not return null.
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_entry_back_cb
+//& type: auto
+int ITc_eext_entry_back_cb_p(void)
+{
+       START_TEST;
+    Evas_Object *pObject = NULL;
+    const char *pSelextText = NULL;
+
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+    
+       pObject = elm_entry_add(g_pEvasWindow);
+    CHECK_HANDLE_CLEANUP(pObject, "elm_entry_add", DeleteEvasWindow());
+   
+    evas_object_size_hint_weight_set(pObject, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    elm_object_text_set(pObject, "text");
+    elm_win_resize_object_add(g_pEvasWindow, pObject);
+    evas_object_show(pObject);
+    evas_object_show(g_pEvasWindow);
+
+    elm_entry_select_all(pObject);
+    pSelextText = elm_entry_selection_get(pObject);
+    if (strcmp(pSelextText, "text"))
+       {
+               FPRINTF("[Line : %d][%s] elm_entry_selection_get failed, selected string: %s.\\n", __LINE__, API_NAMESPACE, pSelextText);
+               DeleteEvasWindow();
+               return 1;
+       }
+       
+       eext_entry_back_cb(NULL, pObject, NULL);        // Target api
+    pSelextText = elm_entry_selection_get(pObject);
+       if (pSelextText != NULL)
+       {
+               FPRINTF("[Line : %d][%s] After eext_entry_back_cb, elm_entry_selection_get returned: %s.\\n", __LINE__, API_NAMESPACE, pSelextText);
+               DeleteEvasWindow();
+               return 1;
+       }
+
+       DeleteEvasWindow();
+    return 0;
+}
+
+
+/**
+* @testcase                    ITc_eext_entry_selection_start_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Test eext_entry_selection_start_cb api
+* @scenario                            Call eext_entry_selection_start_cb
+* @apicovered                  elm_entry_add, elm_entry_entry_set, eext_entry_selection_start_cb
+* @passcase                            There is no any unexpected behaviour after calling eext_entry_selection_start_cb
+* @failcase                            There is unexpected behaviour after calling eext_entry_selection_start_cb
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_entry_selection_start_cb
+//& type: auto
+int ITc_eext_entry_selection_start_cb_p(void)
+{
+       START_TEST;
+
+       Evas_Object *pObject = NULL;
+       
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+       
+       pObject = elm_entry_add(g_pEvasWindow);
+       CHECK_HANDLE_CLEANUP(pObject, "elm_entry_add", DeleteEvasWindow());
+       
+       elm_entry_entry_set(pObject, "text");
+    elm_win_resize_object_add(g_pEvasWindow, pObject);
+    evas_object_show(pObject);
+    evas_object_show(g_pEvasWindow);
+
+    eext_entry_selection_start_cb(NULL, pObject, NULL);
+       
+       DeleteEvasWindow();
+       
+       return 0;
+}
+
+
+/**
+* @testcase                    ITc_eext_entry_selection_cleared_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Test eext_entry_selection_cleared_cb api
+* @scenario                            Call eext_entry_selection_cleared_cb
+* @apicovered                  elm_entry_add, elm_entry_entry_set, eext_entry_selection_cleared_cb
+* @passcase                            There is no any unexpected behaviour after calling eext_entry_selection_cleared_cb
+* @failcase                            There is unexpected behaviour after calling eext_entry_selection_cleared_cb
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_entry_selection_cleared_cb
+//& type: auto
+int ITc_eext_entry_selection_cleared_cb_p(void)
+{
+       START_TEST;
+
+       Evas_Object *pObject = NULL;
+       
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+       
+       pObject = elm_entry_add(g_pEvasWindow);
+       CHECK_HANDLE_CLEANUP(pObject, "elm_entry_add", DeleteEvasWindow());
+       
+       elm_entry_entry_set(pObject, "text");
+    evas_object_show(pObject);
+    evas_object_show(g_pEvasWindow);
+
+    eext_entry_selection_cleared_cb(NULL, pObject, NULL);
+       
+       DeleteEvasWindow();
+       
+       return 0;
+}
+
+
+/**
+* @testcase                    ITc_eext_entry_selection_back_event_allow_set_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Test eext_entry_selection_back_event_allow_set api
+* @scenario                            Call eext_entry_selection_back_event_allow_set
+* @apicovered                  elm_entry_add, elm_entry_entry_set, eext_entry_selection_back_event_allow_set
+* @passcase                            There is no any unexpected behaviour after calling eext_entry_selection_back_event_allow_set
+* @failcase                            There is unexpected behaviour after calling eext_entry_selection_back_event_allow_set
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_entry_selection_back_event_allow_set
+//& type: auto
+int ITc_eext_entry_selection_back_event_allow_set_p(void)
+{
+       START_TEST;
+
+       Evas_Object *pObject = NULL;
+       
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+       
+       pObject = elm_entry_add(g_pEvasWindow);
+       CHECK_HANDLE_CLEANUP(pObject, "elm_entry_add", DeleteEvasWindow());
+       
+       elm_entry_entry_set(pObject, "text");
+    elm_win_resize_object_add(g_pEvasWindow, pObject);
+    evas_object_show(pObject);
+    evas_object_show(g_pEvasWindow);
+
+    eext_entry_selection_back_event_allow_set(pObject, EINA_TRUE);
+       
+       DeleteEvasWindow();
+       
+       return 0;
+}
+
+
+/**
+* @testcase                    ITc_eext_naviframe_more_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Test eext_naviframe_more_cb api
+* @scenario                            Call eext_naviframe_more_cb
+* @apicovered                  elm_entry_add, elm_entry_entry_set, eext_naviframe_more_cb
+* @passcase                            There is no any unexpected behaviour after calling eext_naviframe_more_cb
+* @failcase                            There is unexpected behaviour after calling eext_naviframe_more_cb
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_naviframe_more_cb
+//& type: auto
+int ITc_eext_naviframe_more_cb_p(void)
+{
+       START_TEST;
+
+       Evas_Object *pNaviframe = NULL, *pContent = NULL;
+       
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+       
+       pNaviframe = elm_naviframe_add(g_pEvasWindow);
+       CHECK_HANDLE_CLEANUP(pNaviframe, "elm_naviframe_add", DeleteEvasWindow());
+    
+    pContent = elm_box_add(g_pEvasWindow);
+    CHECK_HANDLE_CLEANUP(pContent, "elm_box_add", DeleteEvasWindow());
+       
+    elm_naviframe_item_push(pNaviframe, "title", NULL, NULL, pContent, NULL);
+    elm_win_resize_object_add(g_pEvasWindow, pNaviframe);
+    evas_object_show(pNaviframe);
+    evas_object_show(g_pEvasWindow);
+
+    eext_naviframe_more_cb(NULL, pNaviframe, NULL);
+       
+       DeleteEvasWindow();
+       
+       return 0;
+}
+
+
+/**
+* @testcase                    ITc_eext_naviframe_back_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Test eext_naviframe_back_cb api
+* @scenario                            Call eext_naviframe_back_cb
+* @apicovered                  elm_entry_add, elm_entry_entry_set, eext_naviframe_back_cb
+* @passcase                            There is no any unexpected behaviour after calling eext_naviframe_back_cb
+* @failcase                            There is unexpected behaviour after calling eext_naviframe_back_cb
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_naviframe_back_cb
+//& type: auto
+int ITc_eext_naviframe_back_cb_p(void)
+{
+       START_TEST;
+
+       Evas_Object *pNaviframe = NULL, *pContent = NULL;
+       
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+       
+       pNaviframe = elm_naviframe_add(g_pEvasWindow);
+       CHECK_HANDLE_CLEANUP(pNaviframe, "elm_naviframe_add", DeleteEvasWindow());
+    
+    pContent = elm_box_add(g_pEvasWindow);
+    CHECK_HANDLE_CLEANUP(pContent, "elm_box_add", DeleteEvasWindow());
+       
+    elm_naviframe_item_push(pNaviframe, "title", NULL, NULL, pContent, NULL);
+    elm_win_resize_object_add(g_pEvasWindow, pNaviframe);
+    evas_object_show(pNaviframe);
+    evas_object_show(g_pEvasWindow);
+
+    eext_naviframe_back_cb(NULL, pNaviframe, NULL);
+       
+       DeleteEvasWindow();
+       
+       return 0;
+}
+
+
+
+/**
+* @testcase                    ITc_eext_object_event_callback_add_delete_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Test eext_object_event_callback_add and eext_object_event_callback_del api
+* @scenario                            Call eext_object_event_callback_add and eext_object_event_callback_del
+* @apicovered                  elm_entry_add, elm_entry_entry_set, eext_object_event_callback_add and eext_object_event_callback_del
+* @passcase                            There is no any unexpected behaviour after calling eext_object_event_callback_add and eext_object_event_callback_del
+* @failcase                            There is unexpected behaviour after calling eext_object_event_callback_add or eext_object_event_callback_del
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: Test eext_object_event_callback_add and eext_object_event_callback_del
+//& type: auto
+int ITc_eext_object_event_callback_add_delete_p(void)
+{
+       START_TEST;
+
+       Evas_Object *pNaviframe = NULL, *pContent = NULL;
+       
+       int nRet = CreateEvasWindow();
+       PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+       
+       pNaviframe = elm_naviframe_add(g_pEvasWindow);
+       CHECK_HANDLE_CLEANUP(pNaviframe, "elm_naviframe_add", DeleteEvasWindow());
+    
+    pContent = elm_box_add(g_pEvasWindow);
+    CHECK_HANDLE_CLEANUP(pContent, "elm_box_add", DeleteEvasWindow());
+       
+    elm_naviframe_item_push(pNaviframe, "title", NULL, NULL, pContent, NULL);
+    elm_win_resize_object_add(g_pEvasWindow, pNaviframe);
+    evas_object_show(pNaviframe);
+    evas_object_show(g_pEvasWindow);
+
+    eext_object_event_callback_add(pNaviframe, EEXT_CALLBACK_BACK, NaviframeCallback, pNaviframe);
+       eext_object_event_callback_del(pNaviframe, EEXT_CALLBACK_BACK, NaviframeCallback);
+       
+       DeleteEvasWindow();
+       
+       return 0;
+}
+
+
+/*****************************************Commented Code Start*****************************************/
+///**
+//* @testcase                  ITc_eext_more_option_layout_add_delete_p
+//* @since_tizen                       2.3.1
+//* @type                              auto
+//* @description                       Test eext_more_option_layout_add, eext_circle_surface_del
+//* @scenario                          Call eext_more_option_layout_add, eext_circle_surface_del
+//* @apicovered                        eext_more_option_layout_add, eext_circle_surface_del
+//* @passcase                          When eext_more_option_layout_add is successful.
+//* @failcase                          If target API fails or any precondition API fails
+//* @precondition                      None
+//* @postcondition             None
+//*/
+////& purpose: Test eext_more_option_layout_add, eext_circle_surface_del
+////& type: auto
+//int ITc_eext_more_option_layout_add_delete_p(void)
+//{
+//     START_TEST;
+//
+//     Evas_Object *pLayout = NULL;
+//
+//     int nRet = CreateEvasWindow();
+//     PRINT_RESULT(0, nRet, "CreateEvasWindow", "Returned Value not correct");
+//
+//     pLayout = eext_more_option_layout_add(g_pEvasLayout);
+//     CHECK_HANDLE_CLEANUP(pLayout, "eext_more_option_layout_add", DeleteEvasWindow());
+//
+//     evas_object_del(pLayout);
+//     DeleteEvasWindow();
+//
+//     return 0;
+//}
+//
+///**
+//* @testcase                  ITc_eext_more_option_layout_direction_set_get_p
+//* @since_tizen                       2.3.1
+//* @type                              auto
+//* @description                       Test eext_more_option_layout_direction_set, eext_more_option_layout_direction_get
+//* @scenario                          Call eext_more_option_layout_direction_set, eext_more_option_layout_direction_get
+//* @apicovered                        eext_more_option_layout_direction_set, eext_more_option_layout_direction_get
+//* @passcase                          When eext_more_option_layout_direction_set is successful.
+//* @failcase                          If target API fails or any precondition API fails
+//* @precondition                      None
+//* @postcondition             None
+//*/
+////& purpose: Test eext_more_option_layout_direction_set, eext_more_option_layout_direction_get
+////& type: auto
+//int ITc_eext_more_option_layout_direction_set_get_p(void)
+//{
+//     START_TEST;
+//
+//     int nRet = 0;
+//     Eext_More_Option_Layout_Direction eDirection = EEXT_MORE_OPTION_LAYOUT_DIRECTION_BOTTOM;
+//
+//     nRet = CreateMoreOptionLayout();
+//     PRINT_RESULT(0, nRet, "CreateMoreOptionLayout", "Returned Value not correct");
+//
+//     eext_more_option_layout_direction_set(g_pMoreOptionLayout, EEXT_MORE_OPTION_LAYOUT_DIRECTION_RIGHT);
+//
+//     eDirection = eext_more_option_layout_direction_get(g_pMoreOptionLayout);
+//     PRINT_RESULT_CLEANUP(EEXT_MORE_OPTION_LAYOUT_DIRECTION_RIGHT, eDirection, "eext_more_option_layout_direction_get", "Returned Value not correct", DeleteMoreOptionLayout());
+//
+//     DeleteMoreOptionLayout();
+//
+//     return 0;
+//}
+//
+///**
+//* @testcase                  ITc_eext_more_option_layout_opened_set_get_p
+//* @since_tizen                       2.3.1
+//* @type                              auto
+//* @description                       Test eext_more_option_layout_opened_set, eext_more_option_layout_opened_get
+//* @scenario                          Call eext_more_option_layout_opened_set, eext_more_option_layout_opened_get
+//* @apicovered                        eext_more_option_layout_opened_set, eext_more_option_layout_opened_get
+//* @passcase                          When eext_more_option_layout_opened_set is successful.
+//* @failcase                          If target API fails or any precondition API fails
+//* @precondition                      None
+//* @postcondition             None
+//*/
+////& purpose: Test eext_more_option_layout_opened_set, eext_more_option_layout_opened_get
+////& type: auto
+//int ITc_eext_more_option_layout_opened_set_get_p(void)
+//{
+//     START_TEST;
+//
+//     int nRet = 0;
+//     Eina_Bool bOpened = EINA_FALSE;
+//
+//     nRet = CreateMoreOptionLayout();
+//     PRINT_RESULT(0, nRet, "CreateMoreOptionLayout", "Returned Value not correct");
+//
+//     eext_more_option_layout_opened_set(g_pMoreOptionLayout, EINA_TRUE);
+//
+//     bOpened = eext_more_option_layout_opened_get(g_pMoreOptionLayout);
+//     PRINT_RESULT_CLEANUP(EINA_TRUE, bOpened, "eext_more_option_layout_opened_get", "Returned Value not correct", DeleteMoreOptionLayout());
+//
+//     DeleteMoreOptionLayout();
+//
+//     return 0;
+//}
+//
+///**
+//* @testcase                  ITc_eext_more_option_layout_scrollable_set_get_p
+//* @since_tizen                       2.3.1
+//* @type                              auto
+//* @description                       Test eext_more_option_layout_scrollable_set, eext_more_option_layout_scrollable_get
+//* @scenario                          Call eext_more_option_layout_scrollable_set, eext_more_option_layout_scrollable_get
+//* @apicovered                        eext_more_option_layout_scrollable_set, eext_more_option_layout_scrollable_get
+//* @passcase                          When eext_more_option_layout_scrollable_set is successful.
+//* @failcase                          If target API fails or any precondition API fails
+//* @precondition                      None
+//* @postcondition             None
+//*/
+////& purpose: Test eext_more_option_layout_scrollable_set, eext_more_option_layout_scrollable_get
+////& type: auto
+//int ITc_eext_more_option_layout_scrollable_set_get_p(void)
+//{
+//     START_TEST;
+//
+//     int nRet = 0;
+//     Eina_Bool bScrollable = EINA_FALSE;
+//
+//     nRet = CreateMoreOptionLayout();
+//     PRINT_RESULT(0, nRet, "CreateMoreOptionLayout", "Returned Value not correct");
+//
+//     eext_more_option_layout_scrollable_set(g_pMoreOptionLayout, EINA_TRUE);
+//
+//     bScrollable = eext_more_option_layout_scrollable_get(g_pMoreOptionLayout);
+//     PRINT_RESULT_CLEANUP(EINA_TRUE, bScrollable, "eext_more_option_layout_scrollable_get", "Returned Value not correct", DeleteMoreOptionLayout());
+//
+//     DeleteMoreOptionLayout();
+//
+//     return 0;
+//}
+//
+///**
+//* @testcase                  ITc_eext_more_option_layout_item_append_del_p
+//* @since_tizen                       2.3.1
+//* @type                              auto
+//* @description                       Test eext_more_option_layout_item_append, eext_more_option_layout_item_del
+//* @scenario                          Call eext_more_option_layout_item_append, eext_more_option_layout_item_del
+//* @apicovered                        eext_more_option_layout_item_append, eext_more_option_layout_item_del
+//* @passcase                          When eext_more_option_layout_item_append is successful.
+//* @failcase                          If target API fails or any precondition API fails
+//* @precondition                      None
+//* @postcondition             None
+//*/
+////& purpose: Test eext_more_option_layout_item_append, eext_more_option_layout_item_del
+////& type: auto
+//int ITc_eext_more_option_layout_item_append_del_p(void)
+//{
+//     START_TEST;
+//
+//     int nRet = 0;
+//     Eext_Object_Item *pObject = NULL;
+//
+//     nRet = CreateMoreOptionLayout();
+//     PRINT_RESULT(0, nRet, "CreateMoreOptionLayout", "Returned Value not correct");
+//
+//     pObject = eext_more_option_layout_item_append(g_pMoreOptionLayout);
+//     CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_layout_item_append", DeleteMoreOptionLayout());
+//
+//     eext_more_option_layout_item_del(pObject);
+//     DeleteMoreOptionLayout();
+//
+//     return 0;
+//}
+//
+///**
+//* @testcase                  ITc_eext_more_option_layout_item_prepend_del_p
+//* @since_tizen                       2.3.1
+//* @type                              auto
+//* @description                       Test eext_more_option_layout_item_prepend, eext_more_option_layout_item_del
+//* @scenario                          Call eext_more_option_layout_item_prepend, eext_more_option_layout_item_del
+//* @apicovered                        eext_more_option_layout_item_prepend, eext_more_option_layout_item_del
+//* @passcase                          When eext_more_option_layout_item_prepend is successful.
+//* @failcase                          If target API fails or any precondition API fails
+//* @precondition                      None
+//* @postcondition             None
+//*/
+////& purpose: Test eext_more_option_layout_item_prepend, eext_more_option_layout_item_del
+////& type: auto
+//int ITc_eext_more_option_layout_item_prepend_del_p(void)
+//{
+//     START_TEST;
+//
+//     int nRet = 0;
+//     Eext_Object_Item *pObject = NULL;
+//
+//     nRet = CreateMoreOptionLayout();
+//     PRINT_RESULT(0, nRet, "CreateMoreOptionLayout", "Returned Value not correct");
+//
+//     pObject = eext_more_option_layout_item_prepend(g_pMoreOptionLayout);
+//     CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_layout_item_prepend", DeleteMoreOptionLayout());
+//
+//     eext_more_option_layout_item_del(pObject);
+//     DeleteMoreOptionLayout();
+//
+//     return 0;
+//}
+//
+///**
+//* @testcase                  ITc_eext_more_option_layout_item_insert_after_clear_p
+//* @since_tizen                       2.3.1
+//* @type                              auto
+//* @description                       Test eext_more_option_layout_item_insert_after, eext_more_option_layout_items_clear
+//* @scenario                          Call eext_more_option_layout_item_insert_after, eext_more_option_layout_items_clear
+//* @apicovered                        eext_more_option_layout_item_insert_after, eext_more_option_layout_items_clear
+//* @passcase                          When eext_more_option_layout_item_insert_after is successful.
+//* @failcase                          If target API fails or any precondition API fails
+//* @precondition                      None
+//* @postcondition             None
+//*/
+////& purpose: Test eext_more_option_layout_item_insert_after, eext_more_option_layout_items_clear
+////& type: auto
+//int ITc_eext_more_option_layout_item_insert_after_clear_p(void)
+//{
+//     START_TEST;
+//
+//     int nRet = 0;
+//     Eext_Object_Item *pObject = NULL, *pNewObject = NULL;
+//
+//     nRet = CreateMoreOptionLayout();
+//     PRINT_RESULT(0, nRet, "CreateMoreOptionLayout", "Returned Value not correct");
+//
+//     pObject = eext_more_option_layout_item_append(g_pMoreOptionLayout);
+//     CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_layout_item_append", DeleteMoreOptionLayout());
+//
+//     pNewObject = eext_more_option_layout_item_insert_after(g_pMoreOptionLayout, pObject);
+//     CHECK_HANDLE_CLEANUP(pNewObject, "eext_more_option_layout_item_insert_after", eext_more_option_layout_items_clear(g_pMoreOptionLayout); DeleteMoreOptionLayout());
+//
+//     eext_more_option_layout_items_clear(g_pMoreOptionLayout);
+//     DeleteMoreOptionLayout();
+//
+//     return 0;
+//}
+//
+///**
+//* @testcase                  ITc_eext_more_option_layout_item_insert_before_clear_p
+//* @since_tizen                       2.3.1
+//* @type                              auto
+//* @description                       Test eext_more_option_layout_item_insert_before, eext_more_option_layout_items_clear
+//* @scenario                          Call eext_more_option_layout_item_insert_before, eext_more_option_layout_items_clear
+//* @apicovered                        eext_more_option_layout_item_insert_before, eext_more_option_layout_items_clear
+//* @passcase                          When eext_more_option_layout_item_insert_before is successful.
+//* @failcase                          If target API fails or any precondition API fails
+//* @precondition                      None
+//* @postcondition             None
+//*/
+////& purpose: Test eext_more_option_layout_item_insert_before, eext_more_option_layout_items_clear
+////& type: auto
+//int ITc_eext_more_option_layout_item_insert_before_clear_p(void)
+//{
+//     START_TEST;
+//
+//     int nRet = 0;
+//     Eext_Object_Item *pObject = NULL, *pNewObject = NULL;
+//
+//     nRet = CreateMoreOptionLayout();
+//     PRINT_RESULT(0, nRet, "CreateMoreOptionLayout", "Returned Value not correct");
+//
+//     pObject = eext_more_option_layout_item_append(g_pMoreOptionLayout);
+//     CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_layout_item_append", DeleteMoreOptionLayout());
+//
+//     pNewObject = eext_more_option_layout_item_insert_before(g_pMoreOptionLayout, pObject);
+//     CHECK_HANDLE_CLEANUP(pNewObject, "eext_more_option_layout_item_insert_before", eext_more_option_layout_items_clear(g_pMoreOptionLayout); DeleteMoreOptionLayout());
+//
+//     eext_more_option_layout_items_clear(g_pMoreOptionLayout);
+//     DeleteMoreOptionLayout();
+//
+//     return 0;
+//}
+//
+///**
+//* @testcase                  ITc_eext_more_option_layout_item_part_content_set_get_p
+//* @since_tizen                       2.3.1
+//* @type                              auto
+//* @description                       Test eext_more_option_layout_item_part_content_set, eext_more_option_layout_item_part_content_get
+//* @scenario                          Call eext_more_option_layout_item_part_content_set, eext_more_option_layout_item_part_content_get
+//* @apicovered                        eext_more_option_layout_item_part_content_set, eext_more_option_layout_item_part_content_get
+//* @passcase                          When eext_more_option_layout_item_part_content_set is successful.
+//* @failcase                          If target API fails or any precondition API fails
+//* @precondition                      None
+//* @postcondition             None
+//*/
+////& purpose: Test eext_more_option_layout_item_part_content_set, eext_more_option_layout_item_part_content_get
+////& type: auto
+//int ITc_eext_more_option_layout_item_part_content_set_get_p(void)
+//{
+//     START_TEST;
+//
+//     int nRet = 0;
+//     Eext_Object_Item *pObject = NULL;
+//     Evas_Object *pReturnedContent = NULL;
+//     Evas_Object *pContent = NULL;
+//
+//     nRet = CreateMoreOptionLayout();
+//     PRINT_RESULT(0, nRet, "CreateMoreOptionLayout", "Returned Value not correct");
+//
+//     pObject = eext_more_option_layout_item_append(g_pMoreOptionLayout);
+//     CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_layout_item_append", DeleteMoreOptionLayout());
+//
+//     pContent = elm_button_add(g_pMoreOptionLayout);
+//     CHECK_HANDLE_CLEANUP(pObject, "elm_button_add", eext_more_option_layout_items_clear(g_pMoreOptionLayout); DeleteMoreOptionLayout());
+//     evas_object_show(pContent);
+//
+//     eext_more_option_layout_item_part_content_set(pObject, "action_btn", pContent);
+//
+//     pReturnedContent = eext_more_option_layout_item_part_content_get(pObject, "action_btn");
+//     CHECK_HANDLE_CLEANUP(pReturnedContent, "eext_more_option_layout_item_part_content_get", evas_object_del(pContent); eext_more_option_layout_items_clear(g_pMoreOptionLayout); DeleteMoreOptionLayout());
+//
+//     evas_object_del(pContent);
+//     eext_more_option_layout_items_clear(g_pMoreOptionLayout);
+//     DeleteMoreOptionLayout();
+//
+//     return 0;
+//}
+//
+///**
+//* @testcase                  ITc_eext_more_option_layout_item_part_text_set_get_p
+//* @since_tizen                       2.3.1
+//* @type                              auto
+//* @description                       Test eext_more_option_layout_item_part_text_set, eext_more_option_layout_item_part_text_get
+//* @scenario                          Call eext_more_option_layout_item_part_text_set, eext_more_option_layout_item_part_text_get
+//* @apicovered                        eext_more_option_layout_item_part_text_set, eext_more_option_layout_item_part_text_get
+//* @passcase                          When eext_more_option_layout_item_part_text_set is successful.
+//* @failcase                          If target API fails or any precondition API fails
+//* @precondition                      None
+//* @postcondition             None
+//*/
+////& purpose: Test eext_more_option_layout_item_part_text_set, eext_more_option_layout_item_part_text_get
+////& type: auto
+//int ITc_eext_more_option_layout_item_part_text_set_get_p(void)
+//{
+//     START_TEST;
+//
+//     int nRet = 0;
+//     Eext_Object_Item *pObject = NULL;
+//
+//     nRet = CreateMoreOptionLayout();
+//     PRINT_RESULT(0, nRet, "CreateMoreOptionLayout", "Returned Value not correct");
+//
+//     pObject = eext_more_option_layout_item_append(g_pMoreOptionLayout);
+//     CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_layout_item_append", DeleteMoreOptionLayout());
+//
+//     eext_more_option_layout_item_part_text_set(pObject, "elm.text", TESTSTRING);
+//
+//     const char *pReturnedContent = eext_more_option_layout_item_part_text_get(pObject, "elm.text");
+//     PRINT_RESULT_CLEANUP(0, strcmp(pReturnedContent, TESTSTRING), "eext_more_option_layout_item_part_text_get", "Returned string not same as the string set previously", eext_more_option_layout_items_clear(g_pMoreOptionLayout); DeleteMoreOptionLayout());
+//
+//     eext_more_option_layout_items_clear(g_pMoreOptionLayout);
+//     DeleteMoreOptionLayout();
+//
+//     return 0;
+//}
+//
+///**
+//* @testcase                  ITc_eext_more_option_layout_item_domain_translatable_part_text_set_get_p
+//* @since_tizen                       2.3.1
+//* @type                              auto
+//* @description                       Test eext_more_option_layout_item_domain_translatable_part_text_set, eext_more_option_layout_item_part_text_get
+//* @scenario                          Call eext_more_option_layout_item_domain_translatable_part_text_set, eext_more_option_layout_item_part_text_get
+//* @apicovered                        eext_more_option_layout_item_domain_translatable_part_text_set, eext_more_option_layout_item_part_text_get
+//* @passcase                          When eext_more_option_layout_item_domain_translatable_part_text_set is successful.
+//* @failcase                          If target API fails or any precondition API fails
+//* @precondition                      None
+//* @postcondition             None
+//*/
+////& purpose: Test eext_more_option_layout_item_domain_translatable_part_text_set, eext_more_option_layout_item_part_text_get
+////& type: auto
+//int ITc_eext_more_option_layout_item_domain_translatable_part_text_set_get_p(void)
+//{
+//     START_TEST;
+//
+//     int nRet = 0;
+//     Eext_Object_Item *pObject = NULL;
+//
+//     nRet = CreateMoreOptionLayout();
+//     PRINT_RESULT(0, nRet, "CreateMoreOptionLayout", "Returned Value not correct");
+//
+//     pObject = eext_more_option_layout_item_append(g_pMoreOptionLayout);
+//     CHECK_HANDLE_CLEANUP(pObject, "eext_more_option_layout_item_append", DeleteMoreOptionLayout());
+//
+//     eext_more_option_layout_item_domain_translatable_part_text_set(pObject, "elm.text", "elm.text", TESTSTRING);
+//
+//     const char *pReturnedContent = eext_more_option_layout_item_part_text_get(pObject, "elm.text");
+//     PRINT_RESULT_CLEANUP(0, strcmp(pReturnedContent, TESTSTRING), "eext_more_option_layout_item_part_text_get", "Returned string not same as the string set previously", eext_more_option_layout_items_clear(g_pMoreOptionLayout); DeleteMoreOptionLayout());
+//
+//     eext_more_option_layout_items_clear(g_pMoreOptionLayout);
+//     DeleteMoreOptionLayout();
+//
+//     return 0;
+//}
+/******************************************Commented Code End******************************************/
+
+/** @} */
+/** @} */
diff --git a/src/itc/efl-ext/tct-efl-ext-native.c b/src/itc/efl-ext/tct-efl-ext-native.c
new file mode 100755 (executable)
index 0000000..b29dc94
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-efl-ext-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/efl-ext/tct-efl-ext-native.h b/src/itc/efl-ext/tct-efl-ext-native.h
new file mode 100755 (executable)
index 0000000..d0e8674
--- /dev/null
@@ -0,0 +1,151 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_EFL_EXT_NATIVE_H__
+#define __TCT_EFL_EXT_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_efl_ext_startup(void);
+extern void ITs_efl_ext_cleanup(void);
+
+extern int ITc_eext_circle_surface_conformant_add_delete_p(void);
+extern int ITc_eext_circle_surface_layout_add_delete_p(void);
+extern int ITc_eext_circle_object_add_p(void);
+extern int ITc_eext_circle_object_radius_set_get_p(void);
+extern int ITc_eext_circle_object_color_set_get_p(void);
+extern int ITc_eext_circle_object_disabled_set_get_p(void);
+extern int ITc_eext_circle_object_value_set_get_p(void);
+extern int ITc_eext_circle_object_value_min_max_set_get_p(void);
+extern int ITc_eext_circle_object_angle_set_get_p(void);
+extern int ITc_eext_circle_object_angle_offset_set_get_p(void);
+extern int ITc_eext_circle_object_angle_min_max_set_get_p(void);
+extern int ITc_eext_circle_object_line_width_set_get_p(void);
+extern int ITc_eext_circle_object_genlist_add_p(void);
+extern int ITc_eext_circle_object_genlist_scroller_policy_set_get_p(void);
+extern int ITc_eext_circle_object_scroller_add_p(void);
+extern int ITc_eext_circle_object_scroller_policy_set_get_p(void);
+extern int ITc_eext_circle_object_datetime_add_p(void);
+extern int ITc_eext_circle_object_progressbar_add_p(void);
+extern int ITc_eext_circle_object_slider_add_p(void);
+extern int ITc_eext_circle_object_slider_step_set_get_p(void);
+extern int ITc_eext_rotary_object_event_callback_add_del_p(void);
+extern int ITc_eext_rotary_object_event_callback_priority_add_del_p(void);
+extern int ITc_eext_rotary_event_handler_add_del_p(void);
+extern int ITc_eext_rotary_object_event_activated_set_p(void);
+extern int ITc_eext_object_event_callback_add_del_p(void);
+extern int ITc_eext_circle_surface_naviframe_add_delete_p(void);
+extern int ITc_eext_more_option_add_delete_p(void);
+extern int ITc_eext_more_option_direction_set_get_p(void);
+extern int ITc_eext_more_option_opened_set_get_p(void);
+extern int ITc_eext_more_option_item_append_del_p(void);
+extern int ITc_eext_more_option_item_prepend_del_p(void);
+extern int ITc_eext_more_option_item_insert_after_clear_p(void);
+extern int ITc_eext_more_option_item_insert_before_clear_p(void);
+extern int ITc_eext_more_option_item_part_content_set_get_p(void);
+extern int ITc_eext_more_option_item_part_text_set_get_p(void);
+extern int ITc_eext_more_option_item_domain_translatable_part_text_set_get_p(void);
+extern int ITc_eext_more_option_items_get_p(void);
+extern int ITc_eext_rotary_selector_add_p(void);
+extern int ITc_eext_rotary_selector_item_append_del_p(void);
+extern int ITc_eext_rotary_selector_item_prepend_clear_p(void);
+extern int ITc_eext_rotary_selector_item_insert_after_p(void);
+extern int ITc_eext_rotary_selector_item_insert_before_p(void);
+extern int ITc_eext_rotary_selector_item_part_text_set_get_p(void);
+extern int ITc_eext_rotary_selector_item_domain_translatable_part_text_set_get_p(void);
+extern int ITc_eext_rotary_selector_item_part_color_set_get_p(void);
+extern int ITc_eext_rotary_selector_part_color_set_get_p(void);
+extern int ITc_eext_rotary_selector_item_part_content_set_get_p(void);
+extern int ITc_eext_rotary_selector_part_content_set_get_p(void);
+extern int ITc_eext_rotary_selector_selected_item_set_get_p(void);
+extern int ITc_eext_rotary_selector_items_get_p(void);
+extern int ITc_eext_circle_object_spinner_add_p(void);
+extern int ITc_eext_circle_object_spinner_angle_set_p(void);
+extern int ITc_eext_popup_back_cb_p(void);
+extern int ITc_eext_ctxpopup_back_cb_p(void);
+extern int ITc_eext_entry_back_cb_p(void);
+extern int ITc_eext_entry_selection_start_cb_p(void);
+extern int ITc_eext_entry_selection_cleared_cb_p(void);
+extern int ITc_eext_entry_selection_back_event_allow_set_p(void);
+extern int ITc_eext_naviframe_more_cb_p(void);
+extern int ITc_eext_naviframe_back_cb_p(void);
+extern int ITc_eext_object_event_callback_add_delete_p(void);
+
+testcase tc_array[] = {
+    {"ITc_eext_circle_surface_conformant_add_delete_p", ITc_eext_circle_surface_conformant_add_delete_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_surface_layout_add_delete_p", ITc_eext_circle_surface_layout_add_delete_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_add_p", ITc_eext_circle_object_add_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_radius_set_get_p", ITc_eext_circle_object_radius_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_color_set_get_p", ITc_eext_circle_object_color_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_disabled_set_get_p", ITc_eext_circle_object_disabled_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_value_set_get_p", ITc_eext_circle_object_value_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_value_min_max_set_get_p", ITc_eext_circle_object_value_min_max_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_angle_set_get_p", ITc_eext_circle_object_angle_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_angle_offset_set_get_p", ITc_eext_circle_object_angle_offset_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_angle_min_max_set_get_p", ITc_eext_circle_object_angle_min_max_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_line_width_set_get_p", ITc_eext_circle_object_line_width_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_genlist_add_p", ITc_eext_circle_object_genlist_add_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_genlist_scroller_policy_set_get_p", ITc_eext_circle_object_genlist_scroller_policy_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_scroller_add_p", ITc_eext_circle_object_scroller_add_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_scroller_policy_set_get_p", ITc_eext_circle_object_scroller_policy_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_datetime_add_p", ITc_eext_circle_object_datetime_add_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_progressbar_add_p", ITc_eext_circle_object_progressbar_add_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_slider_add_p", ITc_eext_circle_object_slider_add_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_slider_step_set_get_p", ITc_eext_circle_object_slider_step_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_object_event_callback_add_del_p", ITc_eext_rotary_object_event_callback_add_del_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_object_event_callback_priority_add_del_p", ITc_eext_rotary_object_event_callback_priority_add_del_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_event_handler_add_del_p", ITc_eext_rotary_event_handler_add_del_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_object_event_activated_set_p", ITc_eext_rotary_object_event_activated_set_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_object_event_callback_add_del_p", ITc_eext_object_event_callback_add_del_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_surface_naviframe_add_delete_p", ITc_eext_circle_surface_naviframe_add_delete_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_more_option_add_delete_p", ITc_eext_more_option_add_delete_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_more_option_direction_set_get_p", ITc_eext_more_option_direction_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_more_option_opened_set_get_p", ITc_eext_more_option_opened_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_more_option_item_append_del_p", ITc_eext_more_option_item_append_del_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_more_option_item_prepend_del_p", ITc_eext_more_option_item_prepend_del_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_more_option_item_insert_after_clear_p", ITc_eext_more_option_item_insert_after_clear_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_more_option_item_insert_before_clear_p", ITc_eext_more_option_item_insert_before_clear_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_more_option_item_part_content_set_get_p", ITc_eext_more_option_item_part_content_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_more_option_item_part_text_set_get_p", ITc_eext_more_option_item_part_text_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_more_option_item_domain_translatable_part_text_set_get_p", ITc_eext_more_option_item_domain_translatable_part_text_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_more_option_items_get_p", ITc_eext_more_option_items_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_add_p", ITc_eext_rotary_selector_add_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_item_append_del_p", ITc_eext_rotary_selector_item_append_del_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_item_prepend_clear_p", ITc_eext_rotary_selector_item_prepend_clear_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_item_insert_after_p", ITc_eext_rotary_selector_item_insert_after_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_item_insert_before_p", ITc_eext_rotary_selector_item_insert_before_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_item_part_text_set_get_p", ITc_eext_rotary_selector_item_part_text_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_item_domain_translatable_part_text_set_get_p", ITc_eext_rotary_selector_item_domain_translatable_part_text_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_item_part_color_set_get_p", ITc_eext_rotary_selector_item_part_color_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_part_color_set_get_p", ITc_eext_rotary_selector_part_color_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_item_part_content_set_get_p", ITc_eext_rotary_selector_item_part_content_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_part_content_set_get_p", ITc_eext_rotary_selector_part_content_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_selected_item_set_get_p", ITc_eext_rotary_selector_selected_item_set_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_rotary_selector_items_get_p", ITc_eext_rotary_selector_items_get_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_spinner_add_p", ITc_eext_circle_object_spinner_add_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_circle_object_spinner_angle_set_p", ITc_eext_circle_object_spinner_angle_set_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_popup_back_cb_p", ITc_eext_popup_back_cb_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_ctxpopup_back_cb_p", ITc_eext_ctxpopup_back_cb_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_entry_back_cb_p", ITc_eext_entry_back_cb_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_entry_selection_start_cb_p", ITc_eext_entry_selection_start_cb_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_entry_selection_cleared_cb_p", ITc_eext_entry_selection_cleared_cb_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_entry_selection_back_event_allow_set_p", ITc_eext_entry_selection_back_event_allow_set_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_naviframe_more_cb_p", ITc_eext_naviframe_more_cb_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_naviframe_back_cb_p", ITc_eext_naviframe_back_cb_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {"ITc_eext_object_event_callback_add_delete_p", ITc_eext_object_event_callback_add_delete_p, ITs_efl_ext_startup, ITs_efl_ext_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_EFL_EXT_NATIVE_H__
diff --git a/src/itc/efl-util/CMakeLists.txt b/src/itc/efl-util/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..aed4615
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "efl-util")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-ui-efl-util")
+SET(TC_SOURCES
+       ITs-efl-util-common.c
+       ITs-efl-util.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       dlog
+       x11
+       utilX
+       elementary
+       capi-base-common
+       bundle
+       glib-2.0
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/efl-util/ITs-efl-util-common.c b/src/itc/efl-util/ITs-efl-util-common.c
new file mode 100755 (executable)
index 0000000..e4d4963
--- /dev/null
@@ -0,0 +1,102 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-efl-util-common.h"
+
+/** @addtogroup itc-efl-util
+ *  @ingroup itc
+ *  @{
+ */
+
+//Add helper function definitions here
+/**
+* @function            EflUtilGetError
+* @description         Maps error enumerators to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* EflUtilGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               case EFL_UTIL_ERROR_INVALID_PARAMETER:                          szErrorVal = "EFL_UTIL_ERROR_INVALID_PARAMETER";                        break;
+               case EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE:          szErrorVal = "EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE";        break;
+               default:                                                                                        szErrorVal = "EFL_UTIL_ERROR_UNKNOWN";                                          break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+ * @function           EflUtilGetNotificationLevel
+ * @description                Maps efl_util_notification_level_e enumerators to string values
+ * @parameter          nLevel : efl_util_notification_level_e code returned
+ * @return                     efl_util_notification_level_e string
+ */
+char* EflUtilGetNotificationLevel(efl_util_notification_level_e nLevel)
+{
+       char *szNotificationLevel = NULL;
+
+       switch ( nLevel )
+       {
+               case EFL_UTIL_NOTIFICATION_LEVEL_1:                             szNotificationLevel = "EFL_UTIL_NOTIFICATION_LEVEL_1";                  break;  /**< Default notification level, this will be depreated */ 
+               case EFL_UTIL_NOTIFICATION_LEVEL_2:                             szNotificationLevel = "EFL_UTIL_NOTIFICATION_LEVEL_2";                  break;  /**< Higher notification level than default, this will be depreated */ 
+               case EFL_UTIL_NOTIFICATION_LEVEL_3:                             szNotificationLevel = "EFL_UTIL_NOTIFICATION_LEVEL_3";                  break;  /**< The highest notification level, this will be depreated */ 
+               // case EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT:    szNotificationLevel = "EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT";    break;  /**< Default notification level same as EFL_UTIL_NOTIFICATION_LEVEL_1 */ 
+               // case EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM:             szNotificationLevel = "EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM";             break;  /**< Higher notification level than default, same as EFL_UTIL_NOTIFICATION_LEVEL_2 */ 
+               // case EFL_UTIL_NOTIFICATION_LEVEL_HIGH:               szNotificationLevel = "EFL_UTIL_NOTIFICATION_LEVEL_HIGH";               break;  /**< Higher notification level than medium */ 
+               // case EFL_UTIL_NOTIFICATION_LEVEL_TOP:                szNotificationLevel = "EFL_UTIL_NOTIFICATION_LEVEL_TOP";                break;  /**< The highest notification level, same as EFL_UTIL_NOTIFICATION_LEVEL_3 */ 
+               default:                                                                                szNotificationLevel = "Unknown Level";                                                  break;
+       }
+
+       return szNotificationLevel;
+}
+
+/**
+* @function                    EflUtilDeleteWindow
+* @description         Callback function invoked while deleting ELM window
+* @parameter           pData :User data if any; pstWindow :Pointer to EFL window; pEvent :Type of Event
+* @return                      NA
+*/
+void EflUtilDeleteWindow(void *pData, Evas_Object *pstWindow, void *pEvent)
+{
+    elm_exit();
+}
+
+/**
+* @function                    EflUtilCreateNotificationWindow
+* @description         Creates a notification window
+* @parameter           pstWindow :Pointer to Evas_Object type to get a new window created
+* @return                      NA
+*/
+bool EflUtilCreateNotificationWindow(Evas_Object **pstWindow)
+{
+       *pstWindow = elm_win_add(NULL, "Notification Window", ELM_WIN_NOTIFICATION);
+       if ( *pstWindow )
+       {
+               elm_win_title_set(*pstWindow, "Notification Window");
+               elm_win_borderless_set(*pstWindow, EINA_TRUE);
+               evas_object_smart_callback_add(*pstWindow, "Delete Request", EflUtilDeleteWindow, NULL);
+               elm_win_indicator_mode_set(*pstWindow, ELM_WIN_INDICATOR_SHOW);
+               return true;
+       }
+       else
+       {
+               return false;
+       }
+}
+/** @} */
\ No newline at end of file
diff --git a/src/itc/efl-util/ITs-efl-util-common.h b/src/itc/efl-util/ITs-efl-util-common.h
new file mode 100755 (executable)
index 0000000..e03a8e2
--- /dev/null
@@ -0,0 +1,94 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_EFL_UTIL_COMMON_H_
+#define _ITS_EFL_UTIL_COMMON_H_
+
+#include "assert.h"
+//Add test package related includes here
+#include <tizen.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <efl_util.h>
+#include <Elementary.h>
+#include <Ecore_X.h>
+
+/** @addtogroup itc-efl-util
+ *  @ingroup itc
+ *  @{
+ */
+
+//Add helper function declarations here
+
+bool g_bEflUtilCreation;
+FILE *g_fpLog;
+
+#define API_NAMESPACE                  "EFL_UTIL_ITC"
+
+#define FPRINTF(...) {\
+               g_fpLog = fopen(ERR_LOG,"a");\
+               fprintf(g_fpLog, __VA_ARGS__);\
+               fclose(g_fpLog);\
+               }
+
+#define START_TEST {\
+       FPRINTF("[Line : %d] [EflUtil_ITC] Starting test : %s\\n", __LINE__, __FUNCTION__);\
+       if ( !g_bEflUtilCreation )\
+       {\
+               FPRINTF("[Line : %d] [EflUtil_ITC] Precondition of efl_util failed so leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(eCompare, eRetVal, API, Error) {\
+       if ( eRetVal == eCompare )\
+       {\
+               if(DEBUG)\
+               {\
+       FPRINTF("[Line : %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+               }\
+       }\
+       else \
+       {\
+       FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_NORETURN(nRetVal, API) {\
+       if (nRetVal == EFL_UTIL_ERROR_NONE)\
+       {\
+               if(DEBUG)\
+               {\
+                       FPRINTF("[Line : %d] [EflUtil_ITC] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d] [EflUtil_ITC] %s failed, error returned = %s \\n", __LINE__, API, EflUtilGetError(nRetVal));\
+       }\
+}
+
+char* EflUtilGetError(int nRet);
+bool EflUtilCreateNotificationWindow(Evas_Object **pstWindow);
+void EflUtilDeleteWindow(void *pData, Evas_Object *pstWindow, void *pEvent);
+char* EflUtilGetNotificationLevel(efl_util_notification_level_e nLevel);
+/** @} */
+#endif  //_ITS_EFL_UTIL_COMMON_H_
diff --git a/src/itc/efl-util/ITs-efl-util.c b/src/itc/efl-util/ITs-efl-util.c
new file mode 100755 (executable)
index 0000000..0a96a2f
--- /dev/null
@@ -0,0 +1,164 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-efl-util-common.h"
+
+//& set: EflUtil
+
+/** @addtogroup itc-efl-util
+ *  @ingroup itc
+ *  @{
+ */
+
+/**
+* @function            EflUtilErrorCallBack
+* @description         Callback function
+* @parameter           Evas_Object *window, int error_code, void *user_data
+* @return                      NA
+*/
+void EflUtilErrorCallBack(Evas_Object *window, int error_code, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][%s] EflUtilErrorCallBack CallBack Invoked \\n", __LINE__, API_NAMESPACE);
+       ecore_main_loop_quit();
+}
+
+/**
+* @function            ITs_efl_util_startup
+* @description         Called before each test, set the service boolean true
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_efl_util_startup(void)
+{
+       struct stat buf;
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       elm_init(0, NULL);
+       g_bEflUtilCreation = true;
+}
+
+/**
+* @function            ITs_efl_util_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_efl_util_cleanup(void)
+{
+       elm_shutdown();
+}
+
+/** @addtogroup itc-efl-util-testcases
+ *  @brief             Integration testcases for module efl-util
+ *  @ingroup   itc-efl-util
+ *  @{
+ */
+
+/**
+ * @testcase                           ITc_efl_util_efl_util_set_get_notification_window_level_p
+ * @type                                       Positive
+ * @description                                Sets and Gets Notification Level
+ * @scenario                           Set Notification Level\n
+ *                                                     Get Notification Level and Verify
+ * @apicovered                         efl_util_set_notification_window_level, efl_util_get_notification_window_level                                  
+ * @passcase                           When efl_util_set_notification_window_level and efl_util_get_notification_window_level are successful.
+ * @failcase                           If target api fails or any precondition api fails.
+ * @precondition                       None
+ * @postcondition                      None
+ * 
+ */
+//& purpose: Api to test efl_util_set_notification_window_level and efl_util_get_notification_window_level
+//& type: auto
+int ITc_efl_util_efl_util_set_get_notification_window_level_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       Evas_Object *pstWindow = NULL;
+       if(EflUtilCreateNotificationWindow(&pstWindow) == false)
+       {
+               return 1;
+       }
+       
+       efl_util_notification_level_e eLevelGet;
+       efl_util_notification_level_e eNotiLevel[] = {  EFL_UTIL_NOTIFICATION_LEVEL_1,
+                                                                                                       EFL_UTIL_NOTIFICATION_LEVEL_2,
+                                                                                                       EFL_UTIL_NOTIFICATION_LEVEL_3 };
+                                                                                                       // EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT,
+                                                                                                       // EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM,
+                                                                                                       // EFL_UTIL_NOTIFICATION_LEVEL_HIGH,    
+                                                                                                       // EFL_UTIL_NOTIFICATION_LEVEL_TOP};
+
+       int nEnumSize = sizeof(eNotiLevel) / sizeof(eNotiLevel[0]);
+       int nEnumCounter = 0;
+
+       for (nEnumCounter = 0; nEnumCounter < nEnumSize;  nEnumCounter++)
+               {
+               FPRINTF("\\n[Line : %d][%s] Executing for Notification Level (%s) \\n", __LINE__, API_NAMESPACE, EflUtilGetNotificationLevel(eNotiLevel[nEnumCounter]));
+
+               nRetVal = efl_util_set_notification_window_level(pstWindow, eNotiLevel[nEnumCounter]);
+               PRINT_RESULT(EFL_UTIL_ERROR_NONE, nRetVal, "efl_util_set_notification_window_level", EflUtilGetError(nRetVal));
+               
+               nRetVal = efl_util_get_notification_window_level(pstWindow, &eLevelGet);
+               PRINT_RESULT(EFL_UTIL_ERROR_NONE, nRetVal, "efl_util_get_notification_window_level", EflUtilGetError(nRetVal));
+
+               if(eLevelGet != eNotiLevel[nEnumCounter])
+               {
+                       FPRINTF("\\n[Line : %d] [EflUtil_ITC] efl_util_set_notification_window_level failed due to level mismatch, set value = %s and get value = %s\\n", __LINE__, EflUtilGetNotificationLevel(eNotiLevel[nEnumCounter]), EflUtilGetNotificationLevel(eLevelGet));
+                       return 1;
+               }
+       }
+       return 0;
+}
+
+//& purpose: API to test efl_util_set_notification_window_level_error_cb and efl_util_unset_notification_window_level_error_cb
+//& type: auto
+/**
+* @testcase                            ITc_efl_util_set_unset_notification_window_level_error_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets and Gets Notification Level
+* @scenario                            Set Notification Level Error CallBack\n
+*                                              Unset Notification Level Error CallBack
+* @apicovered                  efl_util_set_notification_window_level_error_cb, efl_util_unset_notification_window_level_error_cb                                      
+* @passcase                            When efl_util_set_notification_window_level_error_cb and efl_util_unset_notification_window_level_error_cb are successful.
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_efl_util_set_unset_notification_window_level_error_cb_p(void)
+{
+       START_TEST;
+
+       Evas_Object *pstWindow = NULL;
+       if ( EflUtilCreateNotificationWindow(&pstWindow) == false )
+       {
+               return 1;
+       }
+
+       // Target API
+       int nRetVal = efl_util_set_notification_window_level_error_cb(pstWindow, EflUtilErrorCallBack, NULL);
+       PRINT_RESULT(EFL_UTIL_ERROR_NONE, nRetVal, "efl_util_set_notification_window_level_error_cb", EflUtilGetError(nRetVal));
+
+       // Target API
+       nRetVal = efl_util_unset_notification_window_level_error_cb(pstWindow);
+       PRINT_RESULT(EFL_UTIL_ERROR_NONE, nRetVal, "efl_util_unset_notification_window_level_error_cb", EflUtilGetError(nRetVal));
+
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/efl-util/tct-efl-util-native.c b/src/itc/efl-util/tct-efl-util-native.c
new file mode 100755 (executable)
index 0000000..b9dbdb0
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-efl-util-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/efl-util/tct-efl-util-native.h b/src/itc/efl-util/tct-efl-util-native.h
new file mode 100755 (executable)
index 0000000..8bf6dd8
--- /dev/null
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_EFL_UTIL_NATIVE_H__
+#define __TCT_EFL_UTIL_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_efl_util_startup(void);
+extern void ITs_efl_util_cleanup(void);
+
+extern int ITc_efl_util_efl_util_set_get_notification_window_level_p(void);
+extern int ITc_efl_util_set_unset_notification_window_level_error_cb_p(void);
+
+testcase tc_array[] = {
+    {"ITc_efl_util_efl_util_set_get_notification_window_level_p", ITc_efl_util_efl_util_set_get_notification_window_level_p, ITs_efl_util_startup, ITs_efl_util_cleanup},
+    {"ITc_efl_util_set_unset_notification_window_level_error_cb_p", ITc_efl_util_set_unset_notification_window_level_error_cb_p, ITs_efl_util_startup, ITs_efl_util_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_EFL_UTIL_NATIVE_H__
diff --git a/src/itc/image-util/CMakeLists.txt b/src/itc/image-util/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..cdd1082
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "image-util")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-image-util")
+SET(TC_SOURCES
+       ITs-image-util-common.c
+       ITs-image-util.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall ")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/image-util/ITs-image-util-common.c b/src/itc/image-util/ITs-image-util-common.c
new file mode 100755 (executable)
index 0000000..3441d19
--- /dev/null
@@ -0,0 +1,321 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-image-util-common.h"
+
+/** @addtogroup itc-image-util
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stImageUtilStartTime;
+extern struct mallinfo g_stImageUtilMemInfo;
+/**
+* @function            ImageUtilGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* ImageUtilGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case IMAGE_UTIL_ERROR_INVALID_PARAMETER:        szErrorVal = "IMAGE_UTIL_ERROR_INVALID_PARAMETER";              break;
+       case IMAGE_UTIL_ERROR_OUT_OF_MEMORY:            szErrorVal = "IMAGE_UTIL_ERROR_OUT_OF_MEMORY";                  break;
+       case IMAGE_UTIL_ERROR_NO_SUCH_FILE:                     szErrorVal = "IMAGE_UTIL_ERROR_NO_SUCH_FILE";                   break;
+       case IMAGE_UTIL_ERROR_INVALID_OPERATION:        szErrorVal = "IMAGE_UTIL_ERROR_INVALID_OPERATION";              break;
+       case IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT:     szErrorVal = "IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT";   break;
+       case IMAGE_UTIL_ERROR_NONE:                                     szErrorVal = "IMAGE_UTIL_ERROR_NONE";                                   break;
+       default:                                                                        szErrorVal = "Unknown Error";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           ImageUtilGetDataPath
+ * @description                Returns the application data path
+ * @parameter          pAppDataPath: application data path
+ * @return                     true if succeed else false
+ */
+bool ImageUtilGetDataPath(char* pAppDataPath)
+{
+       if(NULL == pAppDataPath)
+       {
+               FPRINTF( "[Line : %d] [image-util_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if(NULL == pPath)
+       {
+               FPRINTF( "[Line : %d] [image-util_ITc] Unable to get application data path; app_get_data_path returned null value \\n", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF( "[Line : %d] [image-util_ITc] application data path returned = %s\\n", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+/**
+ * @function           ImageUtilAppendToAppDataPath
+ * @description                Appends the input string to application data path
+ * @parameter          pInputPath: path to append to data path; pFinalPath: final resultant path
+ * @return                     true if succeed else false
+ */
+bool ImageUtilAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if( (NULL == pInputPath) || (NULL == pFinalPath) )
+       {
+               FPRINTF( "[Line : %d] [image-util_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if(false == ImageUtilGetDataPath(pAppDataPath))
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+       
+       FPRINTF( "[Line : %d] [image-util_ITc] result path returned = %s\\n", __LINE__, pFinalPath);
+
+       return true;
+}
+
+/**
+* @function            ImageUtilColorspace
+* @description         Maps error enums 
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* ImageUtilColorspace(image_util_colorspace_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case IMAGE_UTIL_COLORSPACE_YV12:                        szErrorVal = "IMAGE_UTIL_COLORSPACE_YV12";                      break;
+               //case IMAGE_UTIL_COLORSPACE_YUV422:            szErrorVal = "IMAGE_UTIL_COLORSPACE_YUV422";            break;
+       case IMAGE_UTIL_COLORSPACE_I420:                        szErrorVal = "IMAGE_UTIL_COLORSPACE_I420";                      break;
+               //case IMAGE_UTIL_COLORSPACE_NV12:                      szErrorVal = "IMAGE_UTIL_COLORSPACE_NV12";                      break;
+               //case IMAGE_UTIL_COLORSPACE_UYVY:                      szErrorVal = "IMAGE_UTIL_COLORSPACE_UYVY";                      break;
+               //case IMAGE_UTIL_COLORSPACE_YUYV:                      szErrorVal = "IMAGE_UTIL_COLORSPACE_YUYV";                      break;
+               //case IMAGE_UTIL_COLORSPACE_RGB565:            szErrorVal = "IMAGE_UTIL_COLORSPACE_RGB565";            break;
+       case IMAGE_UTIL_COLORSPACE_RGB888:                      szErrorVal = "IMAGE_UTIL_COLORSPACE_RGB888";            break;
+       case IMAGE_UTIL_COLORSPACE_ARGB8888:            szErrorVal = "IMAGE_UTIL_COLORSPACE_ARGB8888";          break;
+       case IMAGE_UTIL_COLORSPACE_BGRA8888:            szErrorVal = "IMAGE_UTIL_COLORSPACE_BGRA8888";          break;
+       case IMAGE_UTIL_COLORSPACE_RGBA8888:            szErrorVal = "IMAGE_UTIL_COLORSPACE_RGBA8888";          break;
+               //case IMAGE_UTIL_COLORSPACE_BGRX8888:          szErrorVal = "IMAGE_UTIL_COLORSPACE_BGRX8888";          break;
+               //case IMAGE_UTIL_COLORSPACE_NV21:                      szErrorVal = "IMAGE_UTIL_COLORSPACE_NV21";                      break;
+               //case IMAGE_UTIL_COLORSPACE_NV16:                      szErrorVal = "IMAGE_UTIL_COLORSPACE_NV16";                      break;
+               //case IMAGE_UTIL_COLORSPACE_NV61:                      szErrorVal = "IMAGE_UTIL_COLORSPACE_NV61";                      break;
+       default:                                                                        szErrorVal = "Unknown Error";                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            ImageUtilColorspace
+* @description         Maps error enums 
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* ImageUtilRotaion(image_util_rotation_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case IMAGE_UTIL_ROTATION_NONE:                  szErrorVal = "IMAGE_UTIL_ROTATION_NONE";                break;
+       case IMAGE_UTIL_ROTATION_90:                    szErrorVal = "IMAGE_UTIL_ROTATION_90";                  break;
+       case IMAGE_UTIL_ROTATION_180:                   szErrorVal = "IMAGE_UTIL_ROTATION_180";                 break;
+       case IMAGE_UTIL_ROTATION_270:                   szErrorVal = "IMAGE_UTIL_ROTATION_270";                 break;
+       case IMAGE_UTIL_ROTATION_FLIP_HORZ:             szErrorVal = "IMAGE_UTIL_ROTATION_FLIP_HORZ";   break;
+       case IMAGE_UTIL_ROTATION_FLIP_VERT:             szErrorVal = "IMAGE_UTIL_ROTATION_FLIP_VERT";   break;
+       default:                                                                szErrorVal = "Unknown Error";                                   break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            MediaToolsGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* MediaToolsGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case MEDIA_PACKET_ERROR_NONE:                                           szErrorVal = "MEDIA_PACKET_ERROR_NONE";                                         break;
+       case MEDIA_PACKET_ERROR_OUT_OF_MEMORY:                          szErrorVal = "MEDIA_PACKET_ERROR_OUT_OF_MEMORY";                        break;
+       case MEDIA_PACKET_ERROR_INVALID_PARAMETER:                      szErrorVal = "MEDIA_PACKET_ERROR_INVALID_PARAMETER";            break;
+       case MEDIA_PACKET_ERROR_INVALID_OPERATION:                      szErrorVal = "MEDIA_PACKET_ERROR_INVALID_OPERATION";            break;
+       case MEDIA_PACKET_ERROR_FILE_NO_SPACE_ON_DEVICE:        szErrorVal = "MEDIA_PACKET_ERROR_FILE_NO_SPACE_ON_DEVICE";      break;
+       default:                                                                                        szErrorVal = "Unknown Error";                                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            MediaFormatGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* MediaFormatGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case MEDIA_FORMAT_ERROR_NONE:                                           szErrorVal = "MEDIA_FORMAT_ERROR_NONE";                                         break;
+       case MEDIA_FORMAT_ERROR_OUT_OF_MEMORY:                          szErrorVal = "MEDIA_FORMAT_ERROR_OUT_OF_MEMORY";                        break;
+       case MEDIA_FORMAT_ERROR_INVALID_PARAMETER:                      szErrorVal = "MEDIA_FORMAT_ERROR_INVALID_PARAMETER";            break;
+       case MEDIA_FORMAT_ERROR_INVALID_OPERATION:                      szErrorVal = "MEDIA_FORMAT_ERROR_INVALID_OPERATION";            break;
+       case MEDIA_FORMAT_ERROR_FILE_NO_SPACE_ON_DEVICE:        szErrorVal = "MEDIA_FORMAT_ERROR_FILE_NO_SPACE_ON_DEVICE";      break;
+       default:                                                                                        szErrorVal = "Unknown Error";                                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function                    ImageUtilGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter           pszAPIMemory: String pointer containing the difference of total number of bytes for Current and Previous Memory Allocation.
+* @return                      NA
+*/
+void ImageUtilGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stImageUtilMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stImageUtilMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stImageUtilMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    ImageUtilGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @parameter           NA
+* @return                      NA
+*/
+inline void ImageUtilGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stImageUtilMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           ImageUtilExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter          pszAPITime :String pointer containing the time difference
+ * @return                     NA
+ *
+ */
+void ImageUtilExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK        
+       if (pszAPITime != NULL)
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stImageUtilStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stImageUtilStartTime.tv_usec;
+                       
+               sprintf( pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }               
+#endif
+}
+/**
+ * @function           ImageUtilFreeMemory
+ * @description                Function to free the memory allocated
+ * @parameter          pszMem1, pszMem2, pszMem3: pointers to allocated memory
+ * @return                     NA
+ *
+ */ 
+void ImageUtilFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+
+}
+
+/**
+ * @function           ImageUtilGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stImageUtilStartTime
+ * @parameter          NA
+ * @return                 NA
+ *
+ */ 
+void ImageUtilGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stImageUtilStartTime, NULL);
+#endif
+}
+/** @} */
\ No newline at end of file
diff --git a/src/itc/image-util/ITs-image-util-common.h b/src/itc/image-util/ITs-image-util-common.h
new file mode 100755 (executable)
index 0000000..dc65f50
--- /dev/null
@@ -0,0 +1,146 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_IMAGE_UTIL_COMMON_H_
+#define _ITS_IMAGE_UTIL_COMMON_H_
+
+#include "assert.h"
+#include <image_util.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <app.h>
+
+/** @addtogroup itc-image-util
+*  @ingroup itc
+*  @{
+*/
+
+#define PATH_LEN                    1024
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define SAMPLE_FILE_PATH            "Image_01.jpg"
+#define OUTPUT_FILE_PATH            "output.jpg"
+#define QUALITY                     100
+#define X                           5
+#define Y                           5
+FILE *g_fpLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][image-util_ITC] Starting test : %s\\n",__LINE__,__FUNCTION__);\
+\
+}
+
+#define PRINT_RESULT(eCompare, eRetVal, API, Error) {\
+       if ( eRetVal == eCompare )\
+       {\
+       if ( DEBUG )\
+{\
+       FPRINTF("[Line : %d][image-util_ITC] %s passed\\n", __LINE__, API);\
+}\
+}\
+       else \
+{\
+       FPRINTF("[Line : %d][image-util_ITC] %s failed, error returned = %s [%d]\\n", __LINE__, API, Error, eRetVal);\
+       return 1;\
+}\
+}
+
+
+#define PRINT_RESULT_CLEANUP(eCompare, eRetVal, API, Error, FreeResource) {\
+       if ( eRetVal == eCompare )\
+{\
+       if ( DEBUG )\
+{\
+       FPRINTF("[Line : %d][image-util_ITC] %s passed\\n", __LINE__, API);\
+}\
+       }\
+       else \
+       {\
+       FPRINTF("[Line : %d][image-util_ITC] %s failed, error returned = %s [%d]\\n", __LINE__, API, Error, eRetVal);\
+       FreeResource;\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d][image-util_ITC]%s_MemoryLeakStatus - %s\\n",__LINE__, #api, memLog);\
+       }
+       
+#define PRINT_RESULT_NORETURN(eCompare, eRetVal, API, Error) {\
+       if ( eRetVal == eCompare )\
+{\
+       if ( DEBUG )\
+{\
+       FPRINTF("[Line : %d][image-util_ITC] %s passed\\n", __LINE__, API);\
+}\
+}\
+       else \
+{\
+       FPRINTF("[Line : %d][image-util_ITC] %s failed, error returned = %s [%d]\\n", __LINE__, API, Error, eRetVal);\
+}\
+}
+
+#define CHECK_HANDLE(Handle, API) {\
+       if ( Handle == NULL )\
+{\
+       FPRINTF("[Line : %d][image-util_ITC] %s failed, error returned = Handle returned is NULL\\n", __LINE__, API);\
+       return 1;\
+}\
+}
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d][image-util_ITC]%s_TimeInMicrosec- %s\\n",__LINE__, #api, speedLog);\
+       }
+       
+char *ImageUtilRotaion(image_util_rotation_e nRet);
+char *ImageUtilColorspace(image_util_colorspace_e nRet);
+char* ImageUtilGetError(int nRet);
+void ImageUtilGetMemAllocation();
+void ImageUtilExecutionDelay(char* pszAPITime);
+void ImageUtilGetTimeOfDay();
+void ImageUtilGetMemStatus(char *pszAPIMemory);
+void ImageUtilFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3);
+bool ImageUtilGetDataPath(char* pPath); 
+bool ImageUtilAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+char* MediaToolsGetError(int nRet);
+char* MediaFormatGetError(int nRet);
+/** @} */
+#endif  //_ITS_IMAGE_UTIL_COMMON_H_
diff --git a/src/itc/image-util/ITs-image-util.c b/src/itc/image-util/ITs-image-util.c
new file mode 100755 (executable)
index 0000000..f0b9eb8
--- /dev/null
@@ -0,0 +1,1012 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-image-util-common.h"
+
+/** @addtogroup itc-image-util
+*  @ingroup itc
+*  @{
+*/
+
+//& set: ImageUtil
+struct timeval g_stImageUtilStartTime;
+struct mallinfo g_stImageUtilMemInfo;
+bool g_bImageUtilSupportedJpegCallback;
+/**
+* @function            ITs_image_util_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_image_util_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+          remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][image-util_ITC] In startup \\n",__LINE__);
+#endif
+       return;
+}
+
+/**
+* @function            ITs_image_util_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_image_util_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][image-util_ITC] In Cleanup \\n",__LINE__);
+#endif
+return;
+}
+/**
+* @function                    ImageUtilSupportedJpegCallback
+* @description         Called once for each supported JPEG encode/decode colorspace.
+* @parameter           Colourspace: The interrupted error code; user_data: The user data passed from the for each function                     
+* @return                      NA
+*/
+bool ImageUtilSupportedJpegCallback(image_util_colorspace_e  Colourspace,  void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][image-util_ITC] ImageUtilSupportedJpegCallback is called \\n",__LINE__);
+#endif
+   g_bImageUtilSupportedJpegCallback = true;
+   return false;
+}  
+
+  
+/**
+* @function                    Image_util_transform_completed_CallBack
+* @description         Called when transform is finished just before returning the output.
+* @parameter           packet: Media packet handle ;error_code :The error code of image-util transfrom; user_data: The user data passed from the for each function
+* @return                      NA
+*/
+void Image_util_transform_completed_CallBack(media_packet_h *packet, int error_code, void *user_data)
+{
+       g_bImageUtilSupportedJpegCallback = true;
+#if DEBUG
+       FPRINTF("[Line : %d][image-util_ITC] Image_util_transform_completed_CallBack is called\\n", __LINE__);
+#endif
+}
+
+
+/** @addtogroup itc-image-util-testcases
+*  @brief              Integration testcases for module image-util
+*  @ingroup    itc-image-util
+*  @{
+*/
+
+//& purpose: To Decode and Encode image jpeg image to the buffer. 
+//& type: auto 
+/**
+ * @testcase                   ITc_image_util_decode_encode_jpeg_p
+ * @type                                       auto
+ * @description                                To Decode and Encode image jpeg image to the buffer.  
+ * @scenario                           Load a jpeg sample file\n
+                                                       Decodes the jpeg image\n
+                                                       Encodes the jpeg image
+ * @apicovered                         image_util_decode_jpeg,image_util_encode_jpeg                                           
+ * @passcase                           When image_util_decode_jpeg and  image_util_encode_jpeg are successful.
+ * @failcase                           If target api image_util_decode_jpeg or image_util_encode_jpeg or any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_image_util_decode_encode_jpeg_p(void)
+{
+       START_TEST;
+       int nRet = 0;
+       int nWidth = 0, nHeight = 0, nWidth1 = 0, nHeight1 = 0; 
+       unsigned int unDecodeSize = 0;
+       int nDecodeFailCount = 0, nEncodeFailCount = 0, nMismatchCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       unsigned char *puszImageEncodeBuffer = NULL;
+       unsigned char *puszImageSourceBuffer = NULL;
+       int nLoopCount = 0;
+       
+       image_util_colorspace_e  eImageUtilColorspace[] = {IMAGE_UTIL_COLORSPACE_RGB888,
+                                                                                                          IMAGE_UTIL_COLORSPACE_YV12, 
+                                                                                                          IMAGE_UTIL_COLORSPACE_I420, 
+                                                                                                          IMAGE_UTIL_COLORSPACE_ARGB8888, 
+                                                                                                          IMAGE_UTIL_COLORSPACE_BGRA8888,
+                                                                                                          IMAGE_UTIL_COLORSPACE_RGBA8888};
+       int enum_size = sizeof(eImageUtilColorspace) / sizeof(eImageUtilColorspace[0]);
+       int enum_counter = 0;
+       
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT * enum_size , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * enum_size , sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       char pPath[PATH_LEN] = {0,};
+       if(false == ImageUtilAppendToAppDataPath(SAMPLE_FILE_PATH, pPath))
+       {
+               FPRINTF( "[Line : %d] [wav-player_ITC] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+       char pPathOutput[PATH_LEN] = {0,};
+       if(false == ImageUtilAppendToAppDataPath(OUTPUT_FILE_PATH, pPathOutput))
+       {
+               FPRINTF( "[Line : %d] [wav-player_ITC] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       nRet = image_util_decode_jpeg(pPath, eImageUtilColorspace[enum_counter], &puszImageEncodeBuffer, &nWidth, &nHeight, &unDecodeSize);
+                       if (nRet != 0)
+                       {
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_decode_jpeg failed, error returned = %s error enum returned for eImageUtilColorspace = %s\\n",__LINE__, ImageUtilGetError(nRet), ImageUtilColorspace(eImageUtilColorspace[enum_counter]));
+                               puszImageEncodeBuffer = NULL;
+                               continue;
+                       }
+
+                       //Target API
+                       ImageUtilGetMemAllocation();            
+                       ImageUtilGetTimeOfDay();
+                       nRet = image_util_encode_jpeg(puszImageEncodeBuffer, nWidth, nHeight, eImageUtilColorspace[enum_counter], QUALITY, pPathOutput);
+                       ImageUtilExecutionDelay(pszAPI1SpeedLog);
+                       if(nRet != 0 )
+                       { 
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_encode_jpeg is unsuccessful on iteration = %d , error returned =  %s enum returned is = %s\\n",__LINE__, nLoopCount, ImageUtilGetError(nRet), ImageUtilColorspace(eImageUtilColorspace[enum_counter]));
+                               nEncodeFailCount++;
+                               free(puszImageEncodeBuffer);
+                               puszImageEncodeBuffer = NULL;
+                               continue;
+                       }
+                       else
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_encode_jpeg is successful\\n",__LINE__);
+#endif
+                       }
+                       
+                       //Target API
+                       ImageUtilGetTimeOfDay();
+                       nRet = image_util_decode_jpeg(pPathOutput, eImageUtilColorspace[enum_counter], &puszImageSourceBuffer, &nWidth1, &nHeight1, &unDecodeSize);
+                       ImageUtilExecutionDelay(pszAPI2SpeedLog);
+                       ImageUtilGetMemStatus(pszMemLog);
+                       if(nRet != 0 )
+                       {               
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_decode_jpeg is unsuccessful on iteration = %d , error returned =  %s enum returned is = %s\\n",__LINE__, nLoopCount, ImageUtilGetError(nRet), ImageUtilColorspace(eImageUtilColorspace[enum_counter]));
+                               nDecodeFailCount ++;
+                       }
+                       else if(nWidth != nWidth1 || nHeight != nHeight1)
+                       {
+                               FPRINTF("[Line : %d][image-util_ITC]height and width  values mismatch on iteration %d \\n",__LINE__, nLoopCount);
+                               nMismatchCount++;
+                       }
+                       else
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_decode_jpeg is successful\\n",__LINE__);
+#endif
+                               free(puszImageSourceBuffer);
+                       }
+                       
+                       free(puszImageEncodeBuffer);
+                       puszImageEncodeBuffer = NULL;
+                       puszImageSourceBuffer = NULL;
+               }
+       }
+       
+       if ( nDecodeFailCount > 0 || nEncodeFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][image-util_ITC] image_util_decode_jpeg failed %d times and image_util_encode_jpeg failed %d times and height and width values mismatch %d times out of %d times\\n",__LINE__, nDecodeFailCount,nEncodeFailCount, nMismatchCount, MAX_COUNT * enum_size);
+               ImageUtilFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_util_decode_jpeg , pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(image_util_encode_jpeg , pszAPI2SpeedLog);      
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(image_util_decode_encode_jpeg , pszMemLog);
+#endif
+       ImageUtilFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+       return 0;
+}
+
+//& purpose: To get the size of image buffer for the specified resolution and colorspace. 
+//& type: auto 
+/**
+ * @testcase                           ITc_image_util_calculate_buffer_size_p
+ * @type                                       auto
+ * @description                                To get the size of image buffer for the specified resolution and colorspace. 
+ * @scenario                           Get the size of buffer\n
+ *                                                     Allocate it to image-util buffer
+ * @apicovered                         audio_in_get_buffer_size                                                
+ * @passcase                           When audio_in_get_buffer_size is successful.
+ * @failcase                           If target api audio_in_get_buffer_size fails or any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_image_util_calculate_buffer_size_p(void)
+{
+       START_TEST;
+       int nRet;
+       int nWidth = 16, nHeight = 9;
+       unsigned int unBufferSize = 0;
+       int  nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       image_util_colorspace_e  eImageUtilColorspace[] = {IMAGE_UTIL_COLORSPACE_RGB888,
+                                                                                                          IMAGE_UTIL_COLORSPACE_YV12, 
+                                                                                                          IMAGE_UTIL_COLORSPACE_I420, 
+                                                                                                          IMAGE_UTIL_COLORSPACE_ARGB8888, 
+                                                                                                          IMAGE_UTIL_COLORSPACE_BGRA8888,
+                                                                                                          IMAGE_UTIL_COLORSPACE_RGBA8888};                                                                                                        
+       int enum_size = sizeof(eImageUtilColorspace) / sizeof(eImageUtilColorspace[0]);
+       int enum_counter = 0;
+       
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+#endif
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {       
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       // Target API
+                       ImageUtilGetMemAllocation();
+                       ImageUtilGetTimeOfDay();
+                       nRet = image_util_calculate_buffer_size( nWidth, nHeight, eImageUtilColorspace[enum_counter], &unBufferSize);
+                       ImageUtilExecutionDelay(pszAPI1SpeedLog);
+                       ImageUtilGetMemStatus(pszMemLog);
+                       
+                       if(nRet != 0 )
+                       { 
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_calculate_buffer_size is unsuccessful on iteration = %d , error returned =  %s and enum error returned is = %s",__LINE__, nLoopCount, ImageUtilGetError(nRet), ImageUtilColorspace(eImageUtilColorspace[enum_counter]));
+                               nFailCount ++;
+                       }
+                       else if (unBufferSize == -1)
+                       {
+                               nFailCount++;
+                       }
+                       else
+                       {
+       #if DEBUG
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_calculate_buffer_size is successful\\n",__LINE__);
+       #endif          
+                       }
+               
+               }
+       }
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][image-util_ITC] image_util_calculate_buffer_size failed %d time out of %d times\\n",__LINE__, nFailCount, MAX_COUNT * enum_size);
+               ImageUtilFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_util_calculate_buffer_size , pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(image_util_calculate_buffer_size , pszMemLog);
+#endif
+       ImageUtilFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+       return 0;
+}
+
+
+
+//& purpose: To encode image to the jpeg image. 
+//& type: auto 
+/**
+ * @testcase                           ITc_image_util_encode_jpeg_to_memory_p
+ * @type                                       auto
+ * @description                                To encode image to the jpeg image. 
+ * @scenario                           Get the size of buffer\n
+                                                       Decode the image and get buffer size\n
+                                                       Now encode the image to jpeg image
+ * @apicovered                         image_util_encode_jpeg_to_memory,image_util_decode_jpeg,image_util_calculate_buffer_size                                                
+ * @passcase                           When image_util_encode_jpeg_to_memory or image_util_decode_jpeg is successful.
+ * @failcase                           If target api image_util_encode_jpeg_to_memory fails or any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_image_util_encode_jpeg_to_memory_p(void)
+{
+       START_TEST;
+       int nRet;
+       int nWidth = 16, nHeight = 9;
+       int  nLoopCount = 0;
+       int nFailCount = 0;
+       unsigned int unDecodeSize = 0;
+       unsigned int unJpegSize = 0;
+       unsigned int unBufferSize = 0;
+       unsigned char *puszJpegBuffer = NULL;           
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;   
+       unsigned char * puszImageSourceBuffer = NULL;
+
+       
+       image_util_colorspace_e  eImageUtilColorspace[] = {IMAGE_UTIL_COLORSPACE_YV12 , IMAGE_UTIL_COLORSPACE_I420 ,
+                                                                                                       IMAGE_UTIL_COLORSPACE_RGB888, IMAGE_UTIL_COLORSPACE_ARGB8888, 
+                                                                                                         IMAGE_UTIL_COLORSPACE_BGRA8888, IMAGE_UTIL_COLORSPACE_RGBA8888
+                                                                                                         };
+       int enum_size = sizeof(eImageUtilColorspace) / sizeof(eImageUtilColorspace[0]);
+       int enum_counter = 0;   
+
+
+       
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       char pPath[PATH_LEN] = {0,};
+       if(false == ImageUtilAppendToAppDataPath(SAMPLE_FILE_PATH, pPath))
+       {
+               FPRINTF( "[Line : %d] [wav-player_ITC] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {       
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                       
+                       
+                               nRet = image_util_decode_jpeg(pPath, eImageUtilColorspace[enum_counter], &puszImageSourceBuffer, &nWidth, &nHeight, &unDecodeSize);
+                               if (nRet != 0)
+                               {
+                                       FPRINTF("[Line : %d][image-util_ITC] image_util_decode_jpeg failed, error returned = %s error enum returned for eImageUtilColorspace = %s\\n",__LINE__, ImageUtilGetError(nRet), ImageUtilColorspace(eImageUtilColorspace[enum_counter]));
+                                       continue;
+                               }
+                               
+                               nRet = image_util_calculate_buffer_size( nWidth, nHeight, eImageUtilColorspace[enum_counter], &unBufferSize);
+                               if (nRet != 0)
+                               {
+                                       FPRINTF("[Line : %d][image-util_ITC] image_util_calculate_buffer_size failed, error returned = %s error enum returned for eImageUtilColorspace = %s\\n",__LINE__, ImageUtilGetError(nRet), ImageUtilColorspace(eImageUtilColorspace[enum_counter]));
+                                       free(puszImageSourceBuffer);
+                                       puszImageSourceBuffer = NULL;
+                                       continue;
+                               }
+                               // Target API
+                               puszJpegBuffer = (unsigned char *)malloc(sizeof(unBufferSize));
+                               ImageUtilGetMemAllocation();
+                               ImageUtilGetTimeOfDay();
+                               nRet = image_util_encode_jpeg_to_memory(puszImageSourceBuffer,nWidth, nHeight, eImageUtilColorspace[enum_counter], QUALITY, &puszJpegBuffer, &unJpegSize);
+                               ImageUtilExecutionDelay(pszAPI1SpeedLog);
+                               ImageUtilGetMemStatus(pszMemLog);
+                               
+                               if(nRet != 0 )
+                               { 
+                                       FPRINTF("[Line : %d][image-util_ITC] image_util_encode_jpeg_to_memory is unsuccessful on iteration = %d , error returned =  %s and enum error returned is = %s\\n",__LINE__, nLoopCount, ImageUtilGetError(nRet), ImageUtilColorspace(eImageUtilColorspace[enum_counter]));
+                                       nFailCount ++;
+                               }
+                               
+                               else
+                               {
+               #if DEBUG
+                                       FPRINTF("[Line : %d][image-util_ITC] image_util_encode_jpeg_to_memory is successful \\n",__LINE__);
+               #endif          
+                               }               
+                       }
+       free(puszImageSourceBuffer);
+       puszImageSourceBuffer = NULL;
+       }
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][image-util_ITC] image_util_encode_jpeg_to_memory failed %d time out of %d times\\n",__LINE__, nFailCount, MAX_COUNT * enum_size);
+               ImageUtilFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_util_encode_jpeg_to_memory , pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(image_util_encode_jpeg_to_memory , pszMemLog);
+#endif
+       ImageUtilFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+       return 0;
+}
+
+//& purpose: To decode jpeg image to the buffer.
+//& type: auto 
+/**
+ * @testcase                           ITc_image_util_decode_jpeg_from_memory_p
+ * @type                                       auto
+ * @description                                To decode jpeg image to the buffer.
+ * @scenario                           Get the size of buffer\n
+                                                       Encode the jpej image\n
+                                                       Decode the jpej image to buffer
+ * @apicovered                         image_util_decode_jpeg_from_memory ,image_util_decode_jpeg, image_util_calculate_buffer_size ,image_util_encode_jpeg_to_memory                                  
+ * @passcase                           When image_util_decode_jpeg_from_memory or image_util_encode_jpeg_to_memory or  image_util_decode_jpeg  is successful.
+ * @failcase                           If target api image_util_decode_jpeg_from_memory fails or any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_image_util_decode_jpeg_from_memory_p(void)
+{
+       START_TEST;
+       int nRet;
+       int nWidth = 16, nHeight = 9;
+       int nDestWidth = 9;
+       int nDestHeight = 16;
+       int  nLoopCount = 0;
+       int nFailCount = 0;
+       unsigned int unJpegSize = 0;
+       unsigned int unBufferSize = 0;
+       unsigned int unDecodeSize = 0;
+       unsigned char *puszImageSourceBuffer2 = NULL;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       unsigned char * puszImageSourceBuffer = NULL;
+       unsigned char *puszJpegBuffer = NULL;
+       
+       image_util_colorspace_e  eImageUtilColorspace[] = {IMAGE_UTIL_COLORSPACE_RGB888,
+                                                                                                          IMAGE_UTIL_COLORSPACE_YV12, 
+                                                                                                          IMAGE_UTIL_COLORSPACE_I420, 
+                                                                                                          IMAGE_UTIL_COLORSPACE_ARGB8888, 
+                                                                                                          IMAGE_UTIL_COLORSPACE_BGRA8888,
+                                                                                                          IMAGE_UTIL_COLORSPACE_RGBA8888};                                                                                                        
+       int enum_size = sizeof(eImageUtilColorspace) / sizeof(eImageUtilColorspace[0]);
+       int enum_counter = 0;
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       char pPath[PATH_LEN] = {0,};
+       if(false == ImageUtilAppendToAppDataPath(SAMPLE_FILE_PATH, pPath))
+       {
+               FPRINTF( "[Line : %d] [wav-player_ITC] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {       
+                       nRet = image_util_decode_jpeg(pPath, eImageUtilColorspace[enum_counter], &puszImageSourceBuffer, &nWidth, &nHeight, &unDecodeSize);
+                       if (nRet != 0)
+                       {
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_decode_jpeg failed, error returned = %s error enum returned for eImageUtilColorspace = %s\\n",__LINE__, ImageUtilGetError(nRet), ImageUtilColorspace(eImageUtilColorspace[enum_counter]));
+                               continue;
+                       }
+                       
+                       nRet = image_util_calculate_buffer_size( nWidth, nHeight, eImageUtilColorspace[enum_counter], &unBufferSize);
+                       if (nRet != 0)
+                       {
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_calculate_buffer_size failed, error returned = %s error enum returned for eImageUtilColorspace = %s\\n",__LINE__, ImageUtilGetError(nRet), ImageUtilColorspace(eImageUtilColorspace[enum_counter]));
+                               free(puszImageSourceBuffer);
+                               puszImageSourceBuffer = NULL;
+                               continue;
+                       }
+                       nRet = image_util_encode_jpeg_to_memory(puszImageSourceBuffer,nWidth, nHeight, eImageUtilColorspace[enum_counter], QUALITY, &puszJpegBuffer, &unJpegSize);
+                       if (nRet != 0)
+                       {
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_encode_jpeg_to_memory failed, error returned = %s \\n",__LINE__, ImageUtilGetError(nRet));
+                               return 1;
+                       }
+                       
+                        if(puszJpegBuffer == NULL) 
+                       {
+                               FPRINTF("[Line : %d][image-util_ITC] Buffer Error : source buffer is NULL\\n ",__LINE__);
+                               continue;       
+                       }
+                               
+                       // Target API
+                       ImageUtilGetMemAllocation();
+                       ImageUtilGetTimeOfDay();
+                       nRet = image_util_decode_jpeg_from_memory((const unsigned char*)puszJpegBuffer, unJpegSize, eImageUtilColorspace[enum_counter], &puszImageSourceBuffer2, &nDestWidth, &nDestHeight, &unDecodeSize);
+                       ImageUtilExecutionDelay(pszAPI1SpeedLog);
+                       ImageUtilGetMemStatus(pszMemLog);
+                       if(puszImageSourceBuffer2 == NULL) 
+                       {
+                               FPRINTF("[Line : %d][image-util_ITC] Buffer Error : puszImageSourceBuffer2 is NULL\\n ",__LINE__);
+                       }
+                       if(nRet != 0 )
+                       { 
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_decode_jpeg_from_memory is unsuccessful on iteration = %d , error returned =  %s error enum returned is = %s\\n",__LINE__, nLoopCount, ImageUtilGetError(nRet), ImageUtilColorspace(eImageUtilColorspace[enum_counter]));
+                               nFailCount ++;
+                       }
+                       
+                       else
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d][image-util_ITC] image_util_decode_jpeg_from_memory is successful\\n",__LINE__);
+#endif
+                       }       
+                       free(puszImageSourceBuffer);
+                       puszImageSourceBuffer = NULL;                   
+                       free(puszImageSourceBuffer2);
+                       puszImageSourceBuffer2 = NULL;
+                       free(puszJpegBuffer);
+               }
+       }
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][image-util_ITC] image_util_decode_jpeg_from_memory failed %d time out of %d times\\n",__LINE__, nFailCount, MAX_COUNT * enum_size);
+               ImageUtilFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_util_decode_jpeg_from_memory , pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(image_util_decode_jpeg_from_memory , pszMemLog);
+#endif
+       ImageUtilFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+       return 0;
+}
+
+
+//& purpose: To retrieve all supported JPEG encoding/decoding colorspace by invoking a callback function once for each one. 
+//& type: auto 
+/**
+ * @testcase                           ITc_image_util_foreach_supported_jpeg_colorspace_p
+ * @type                                       auto
+ * @description                                To retrieve all supported JPEG encoding/decoding colorspace by invoking a callback function once for each one
+ * @scenario                           The callback function to register\n
+                                                       The user data is passed to callback function
+ * @apicovered                         image_util_foreach_supported_jpeg_colorspace                                            
+ * @passcase                           When image_util_foreach_supported_jpeg_colorspace is successful.
+ * @failcase                           If target api image_util_foreach_supported_jpeg_colorspace fails or any precondition api fails.
+ * @precondition                       NA
+ * @postcondition                      NA
+ * 
+ */
+int ITc_image_util_foreach_supported_jpeg_colorspace_p(void)
+{
+       START_TEST;
+       int nRet;
+       int  nLoopCount = 0;
+       int nFailCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       
+
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               // Target API
+               g_bImageUtilSupportedJpegCallback = false;
+               ImageUtilGetMemAllocation();
+               ImageUtilGetTimeOfDay();
+               nRet = image_util_foreach_supported_jpeg_colorspace(ImageUtilSupportedJpegCallback, NULL);
+               ImageUtilExecutionDelay(pszAPI1SpeedLog);
+               ImageUtilGetMemStatus(pszMemLog);
+               
+               if(nRet != 0 )
+               { 
+                       FPRINTF("[Line : %d][image-util_ITC] image_util_foreach_supported_jpeg_colorspace is unsuccessful on iteration = %d , error returned =  %s\\n",__LINE__, nLoopCount, ImageUtilGetError(nRet));
+                       nFailCount ++;
+                       continue;
+               }
+               usleep(2000);
+               if (!g_bImageUtilSupportedJpegCallback)
+               {
+                       FPRINTF("[Line : %d][image-util_ITC] audio_in_set_interrupted_cb failed on iteration = %d , error returned = callback not invoked\\n ",__LINE__, nLoopCount);
+                       nFailCount ++;
+               }
+               
+               else
+               {
+#if DEBUG              
+               FPRINTF("[Line : %d][image-util_ITC] image_util_foreach_supported_jpeg_colorspace is successful \\n",__LINE__);
+#endif
+                       
+               }               
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][image-util_ITC] image_util_foreach_supported_jpeg_colorspace failed %d time out of %d times\\n",__LINE__, nFailCount, MAX_COUNT);
+               ImageUtilFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_util_foreach_supported_jpeg_colorspace , pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(image_util_foreach_supported_jpeg_colorspace , pszMemLog);
+#endif
+       ImageUtilFreeMemory(pszAPI1SpeedLog,pszMemLog,NULL);
+       return 0;
+}
+
+
+
+//& purpose: Creates and destroy a handle to image-util transform. 
+//& type: auto 
+/**
+* @testcase                    ITc_image_util_transform_create_destroy_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Create and Destroy a  handle to image-util transform.  
+* @scenario                            Creates a handle to image-util transform\n
+*                                              Destroy handle to image-util transform.
+* @apicovered                  image_util_transform_create, image_util_transform_destroy                                               
+* @passcase                            When image_util_transform_create and  image_util_transform_destory are successful.
+* @failcase                            If target API image_util_transform_create or image_util_transform_destory or any precondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_image_util_transform_create_destroy_p(void)
+{
+       START_TEST;
+
+       transformation_h stHandle;
+       int nRet = image_util_transform_create(&stHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_create", ImageUtilGetError(nRet));
+
+       //Target API
+       nRet = image_util_transform_destroy(stHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: To set whether to use hardware acceleration or not. 
+//& type: auto 
+/**
+* @testcase                    ITc_image_util_transform_set_hardware_acceleration_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To set whether to use hardware acceleration or not. 
+* @scenario                            Sets the image util's accurate mode
+* @apicovered                  image_util_transform_set_hardware_acceleration                                          
+* @passcase                            When image_util_transform_set_hardware_acceleration is successful.
+* @failcase                            If target API image_util_transform_set_hardware_acceleration fails or any precondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_image_util_transform_set_hardware_acceleration_p(void)
+{
+       START_TEST;
+
+       transformation_h stHandle;
+       int nRet = image_util_transform_create(&stHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_create", ImageUtilGetError(nRet));
+
+       nRet = image_util_transform_set_hardware_acceleration(stHandle, false);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_set_hardware_acceleration", ImageUtilGetError(nRet), image_util_transform_destroy(stHandle));
+
+       nRet = image_util_transform_destroy(stHandle);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: To Set and get the information of the converting
+//& type: auto 
+/**
+* @testcase                    ITc_image_util_transform_set_get_colorspace_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To Set and get the information of the converting
+* @scenario                            Creates a handle to image-util transform\n
+*                                              To Set the information of the converting\n
+*                                              To get the information of the converting\n
+*                                              Destroy handle to image-util transform.
+* @apicovered                  image_util_transform_set_crop_area,image_util_transform_get_colorspace,image_util_transform_set_colorspace                                      
+* @passcase                            When image_util_transform_get_colorspace and  image_util_transform_set_colorspace are successful.
+* @failcase                            If target API image_util_transform_get_colorspace or image_util_transform_set_colorspace or any precondition API fails.
+* @precondition                        image_util_transform_create, image_util_transform_set_crop_area must be called
+* @postcondition               NA
+*/
+int ITc_image_util_transform_set_get_colorspace_p(void)
+{
+       START_TEST;
+
+       unsigned int unStartX = 9, unStartY = 9, unEndX = 16, unEndY = 16;
+       transformation_h stHandle;
+       image_util_colorspace_e stImageUtilColorspace;
+
+       int nRet = image_util_transform_create(&stHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_create", ImageUtilGetError(nRet));
+
+       nRet = image_util_transform_set_crop_area(stHandle, unStartX, unStartY, unEndX, unEndY );
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_set_crop_area", ImageUtilGetError(nRet), image_util_transform_destroy(stHandle));
+
+       nRet = image_util_transform_get_colorspace(stHandle, &stImageUtilColorspace);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_get_colorspace", ImageUtilGetError(nRet), image_util_transform_destroy(stHandle));
+
+       //Target API
+       nRet = image_util_transform_set_colorspace(stHandle, stImageUtilColorspace);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_set_colorspace", ImageUtilGetError(nRet), image_util_transform_destroy(stHandle));
+
+       nRet = image_util_transform_destroy(stHandle);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: To Set and Get the information of the cropping
+//& type: auto 
+/**
+* @testcase                    ITc_image_util_transform_set_get_crop_area_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To Set and Get the information of the cropping  
+* @scenario                            Create a handle to image-util transform\n
+*                                              Set the startX startY endX endY positions of cropped image buffer\n
+*                                              Get the startX startY endX endY positions of cropped image buffer\n
+*                                              Destroy handle to image-util transform.
+* @apicovered                  image_util_transform_set_crop_area, image_util_transform_set_crop_area                                          
+* @passcase                            When image_util_transform_set_crop_area and  image_util_transform_set_crop_area are successful.
+* @failcase                            If target API image_util_transform_set_crop_area or image_util_transform_set_crop_area or any precondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_image_util_transform_set_get_crop_area_p(void)
+{
+       START_TEST;
+
+       unsigned int unStartX = 9, unStartY = 9, unEndX = 16, unEndY = 16;
+       transformation_h stHandle;
+
+       int nRet = image_util_transform_create(&stHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_create", ImageUtilGetError(nRet));
+
+       //Target API
+       nRet = image_util_transform_set_crop_area(stHandle, unStartX, unStartY, unEndX, unEndY );
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_set_crop_area", ImageUtilGetError(nRet), image_util_transform_destroy(stHandle));
+
+       //Target API
+       nRet = image_util_transform_get_crop_area(stHandle, &unStartX, &unStartY, &unEndX, &unEndY );
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_get_crop_area", ImageUtilGetError(nRet), image_util_transform_destroy(stHandle));
+
+       nRet = image_util_transform_destroy(stHandle);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: To Set and Get the resolution of the image buffer
+//& type: auto 
+/**
+* @testcase                    ITc_image_util_transform_set_get_resolution_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To Set and Get the resolution of the image buffer 
+* @scenario                            Create a handle to image-util transform\n
+*                                              Set the width and height of source image buffer\n
+*                                              Get the width and height of source image buffer\n
+*                                              Destroy handle to image-util transform.
+* @apicovered                  image_util_transform_set_resolution, image_util_transform_get_resolution                                                
+* @passcase                            When image_util_transform_set_resolution and  image_util_transform_get_resolution are successful.
+* @failcase                            If target API image_util_transform_set_resolution or image_util_transform_get_resolution or any precondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_image_util_transform_set_get_resolution_p(void)
+{
+       START_TEST;
+
+       unsigned int unHeight = 16,unWidth = 9;
+       transformation_h stHandle;
+
+       int nRet = image_util_transform_create(&stHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_create", ImageUtilGetError(nRet));
+
+       //Target API
+       nRet = image_util_transform_set_resolution(stHandle, unWidth, unHeight );
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_set_resolution", ImageUtilGetError(nRet), image_util_transform_destroy(stHandle));
+
+       //Target API
+       nRet = image_util_transform_get_resolution(stHandle, &unWidth, &unHeight );
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_get_resolution", ImageUtilGetError(nRet), image_util_transform_destroy(stHandle));
+
+       nRet = image_util_transform_destroy(stHandle);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: To set and get the information of the rotating
+//& type: auto 
+/**
+* @testcase                    ITc_image_util_transform_set_get_rotation_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To set and get the information of the rotating 
+* @scenario                            Create a handle to image-util transform\n
+*                                              Set rotation value of image buffer\n
+*                                              Get rotation value of image buffer\n
+*                                              Destroy handle to image-util transform.
+* @apicovered                  image_util_transform_set_rotation, image_util_transform_get_rotation                                            
+* @passcase                            When image_util_transform_set_rotation and  image_util_transform_get_rotation are successful.
+* @failcase                            If target API image_util_transform_set_rotation or image_util_transform_get_rotation or any precondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_image_util_transform_set_get_rotation_p(void)
+{
+       START_TEST;
+
+       transformation_h stHandle;
+       image_util_rotation_e eImageUtilRotaion[] = {IMAGE_UTIL_ROTATION_90, 
+               IMAGE_UTIL_ROTATION_180,
+               IMAGE_UTIL_ROTATION_270, 
+               IMAGE_UTIL_ROTATION_NONE, 
+               IMAGE_UTIL_ROTATION_FLIP_HORZ, 
+               IMAGE_UTIL_ROTATION_FLIP_VERT};
+       int enum_size1 = sizeof(eImageUtilRotaion) / sizeof(eImageUtilRotaion[0]);
+       int enum_counter1 = 0;
+
+       int nRet = image_util_transform_create(&stHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_create", ImageUtilGetError(nRet));
+
+       for ( enum_counter1=0; enum_counter1<enum_size1; enum_counter1++)
+       {
+               //Target API
+               nRet = image_util_transform_set_rotation(stHandle, eImageUtilRotaion[enum_counter1] );
+               if ( nRet != IMAGE_UTIL_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][image-util_ITC] image_util_transform_set_rotation failed, error returned = %s for rotation %s\\n", __LINE__, ImageUtilGetError(nRet), ImageUtilRotaion(eImageUtilRotaion[enum_counter1]));
+                       image_util_transform_destroy(stHandle);
+                       return 1;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][image-util_ITC] image_util_transform_set_rotation failed is successful\\n", __LINE__);
+#endif
+               }
+
+               //Target API
+               nRet = image_util_transform_get_rotation(stHandle, &eImageUtilRotaion[enum_counter1] );
+               if ( nRet != IMAGE_UTIL_ERROR_NONE )
+               {               
+                       FPRINTF("[Line : %d][image-util_ITC] image_util_transform_get_rotation failed, error returned = %s for rotation %s\\n", __LINE__, ImageUtilGetError(nRet), ImageUtilRotaion(eImageUtilRotaion[enum_counter1]));
+                       image_util_transform_destroy(stHandle);
+                       return 1;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][image-util_ITC] image_util_transform_get_rotation is successful\\n", __LINE__);
+#endif
+               }
+       }
+
+       nRet = image_util_transform_destroy(stHandle);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: To Transform the image for given image-util handle. 
+//& type: auto 
+/**
+* @testcase                    ITc_image_util_transform_run_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To Transform the image for given image-util handle. 
+* @scenario                            Create a handle to image-util transform\n
+*                                              Media format is to be called\n
+*                                              image_util_transform_completed_cb callback is invoked\n
+*                                              Get rotation value of image buffer\n
+*                                              Destroy handle to image-util transform.
+* @apicovered                  image_util_transform_run                                                
+* @passcase                            When image_util_transform_run, media_format_create, media_format_set_video_mime, media_format_set_video_width\n
+*                                              media_format_set_video_height, media_format_set_video_avg_bps, media_format_set_video_max_bps,media_packet_create_alloc\n
+*                                              image_util_transform_set_resolution, media_packet_destroy,image_util_transform_destroy  is successful.
+* @failcase                            If target API image_util_transform_run fails or any precondition API fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_image_util_transform_run_p(void)
+{
+       START_TEST;
+
+       transformation_h pstHandle;
+       media_format_h hfmt;
+       media_packet_h hpacket ;
+       int nWidth = 320, nHeight = 240;
+       int nAvgBps = 10000000;
+       int nMaxBps = 20000000;
+       unsigned int unHeight = 16, unWidth = 9;
+
+       int nRet = image_util_transform_create(&pstHandle);
+       PRINT_RESULT(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_create", ImageUtilGetError(nRet));
+       CHECK_HANDLE(pstHandle, "image_util_transform_create");
+
+       nRet = media_format_create(&hfmt);
+       PRINT_RESULT_CLEANUP(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_create", MediaFormatGetError(nRet), image_util_transform_destroy(pstHandle));
+
+       nRet = media_format_set_video_mime(hfmt, MEDIA_FORMAT_I420);
+       PRINT_RESULT_CLEANUP(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_set_video_mime", MediaFormatGetError(nRet), image_util_transform_destroy(pstHandle));
+
+       nRet = media_format_set_video_width(hfmt, nWidth);
+       PRINT_RESULT_CLEANUP(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_set_video_width", MediaFormatGetError(nRet), image_util_transform_destroy(pstHandle));
+
+       nRet = media_format_set_video_height(hfmt, nHeight);
+       PRINT_RESULT_CLEANUP(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_set_video_height", MediaFormatGetError(nRet), image_util_transform_destroy(pstHandle));
+
+       nRet = media_format_set_video_avg_bps(hfmt, nAvgBps);
+       PRINT_RESULT_CLEANUP(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_set_video_avg_bps", MediaFormatGetError(nRet), image_util_transform_destroy(pstHandle));
+
+       nRet = media_format_set_video_max_bps(hfmt, nMaxBps);
+       PRINT_RESULT_CLEANUP(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_set_video_max_bps", MediaFormatGetError(nRet), image_util_transform_destroy(pstHandle));
+
+       nRet = media_packet_create_alloc(hfmt, (media_packet_finalize_cb)NULL, NULL, &hpacket);
+       PRINT_RESULT_CLEANUP(MEDIA_PACKET_ERROR_NONE, nRet, "media_packet_create_alloc", MediaToolsGetError(nRet), image_util_transform_destroy(pstHandle));
+
+       nRet = image_util_transform_set_resolution(pstHandle, unWidth, unHeight);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_set_resolution", ImageUtilGetError(nRet), media_format_unref(hfmt);image_util_transform_destroy(pstHandle));
+
+       g_bImageUtilSupportedJpegCallback = false;
+       nRet = image_util_transform_run(pstHandle, hpacket, (image_util_transform_completed_cb) Image_util_transform_completed_CallBack, NULL);
+       PRINT_RESULT_CLEANUP(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_run", ImageUtilGetError(nRet), media_format_unref(hfmt);image_util_transform_destroy(pstHandle));
+
+       usleep(5000);
+       if ( !g_bImageUtilSupportedJpegCallback )
+       {
+               FPRINTF("[Line : %d][image-util_ITC] Image_util_transform_completed_CallBack failed, error returned = callback not invoked\\n", __LINE__);
+               media_format_unref(hfmt);
+               image_util_transform_destroy(pstHandle);
+               return 1;
+       }
+       else
+       {
+#if DEBUG
+               FPRINTF("[Line : %d][image-util_ITC] image_util_transform_run is successful\\n", __LINE__);
+#endif
+       }
+
+       nRet = media_format_unref(hfmt);
+       PRINT_RESULT_CLEANUP(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_unref", MediaFormatGetError(nRet), image_util_transform_destroy(pstHandle));
+
+       nRet = media_packet_destroy(hpacket);
+       PRINT_RESULT_CLEANUP(MEDIA_PACKET_ERROR_NONE, nRet, "media_packet_destroy", MediaToolsGetError(nRet), image_util_transform_destroy(pstHandle));
+
+       nRet = image_util_transform_destroy(pstHandle);
+       PRINT_RESULT_NORETURN(IMAGE_UTIL_ERROR_NONE, nRet, "image_util_transform_destroy", ImageUtilGetError(nRet));
+
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/image-util/Image_01.jpg b/src/itc/image-util/Image_01.jpg
new file mode 100755 (executable)
index 0000000..d18b153
Binary files /dev/null and b/src/itc/image-util/Image_01.jpg differ
diff --git a/src/itc/image-util/tct-image-util-native.c b/src/itc/image-util/tct-image-util-native.c
new file mode 100755 (executable)
index 0000000..88561d9
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-image-util-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/image-util/tct-image-util-native.h b/src/itc/image-util/tct-image-util-native.h
new file mode 100755 (executable)
index 0000000..c2e4034
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_IMAGE_UTIL_NATIVE_H__
+#define __TCT_IMAGE_UTIL_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_image_util_startup(void);
+extern void ITs_image_util_cleanup(void);
+
+extern int ITc_image_util_decode_encode_jpeg_p(void);
+extern int ITc_image_util_calculate_buffer_size_p(void);
+extern int ITc_image_util_encode_jpeg_to_memory_p(void);
+extern int ITc_image_util_decode_jpeg_from_memory_p(void);
+extern int ITc_image_util_foreach_supported_jpeg_colorspace_p(void);
+extern int ITc_image_util_transform_create_destroy_p(void);
+extern int ITc_image_util_transform_set_hardware_acceleration_p(void);
+extern int ITc_image_util_transform_set_get_colorspace_p(void);
+extern int ITc_image_util_transform_set_get_crop_area_p(void);
+extern int ITc_image_util_transform_set_get_resolution_p(void);
+extern int ITc_image_util_transform_set_get_rotation_p(void);
+extern int ITc_image_util_transform_run_p(void);
+
+testcase tc_array[] = {
+    {"ITc_image_util_decode_encode_jpeg_p", ITc_image_util_decode_encode_jpeg_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {"ITc_image_util_calculate_buffer_size_p", ITc_image_util_calculate_buffer_size_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {"ITc_image_util_encode_jpeg_to_memory_p", ITc_image_util_encode_jpeg_to_memory_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {"ITc_image_util_decode_jpeg_from_memory_p", ITc_image_util_decode_jpeg_from_memory_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {"ITc_image_util_foreach_supported_jpeg_colorspace_p", ITc_image_util_foreach_supported_jpeg_colorspace_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {"ITc_image_util_transform_create_destroy_p", ITc_image_util_transform_create_destroy_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {"ITc_image_util_transform_set_hardware_acceleration_p", ITc_image_util_transform_set_hardware_acceleration_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {"ITc_image_util_transform_set_get_colorspace_p", ITc_image_util_transform_set_get_colorspace_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {"ITc_image_util_transform_set_get_crop_area_p", ITc_image_util_transform_set_get_crop_area_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {"ITc_image_util_transform_set_get_resolution_p", ITc_image_util_transform_set_get_resolution_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {"ITc_image_util_transform_set_get_rotation_p", ITc_image_util_transform_set_get_rotation_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {"ITc_image_util_transform_run_p", ITc_image_util_transform_run_p, ITs_image_util_startup, ITs_image_util_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_IMAGE_UTIL_NATIVE_H__
diff --git a/src/itc/key-manager/CMakeLists.txt b/src/itc/key-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..386b393
--- /dev/null
@@ -0,0 +1,37 @@
+SET(PKG_NAME "key-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "key-manager")
+SET(TC_SOURCES
+       ITs-key-manager-common.c
+       ITs-key-manager.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-appfw-application
+       glib-2.0
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+INSTALL(FILES dfb08fe4.0 DESTINATION /opt/etc/ssl/certs/)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/key-manager/ITs-key-manager-common.c b/src/itc/key-manager/ITs-key-manager-common.c
new file mode 100755 (executable)
index 0000000..c38f702
--- /dev/null
@@ -0,0 +1,475 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-key-manager-common.h"
+
+
+extern struct timeval g_stKeyMngrStartTime;
+extern struct mallinfo g_stKeyMngrMemInfo;
+
+//Add helper function definitions here
+
+/** @addtogroup itc-key-manager
+*  @ingroup itc
+*  @{
+*/
+
+/**
+ * @function           KeyManagerGetDataPath
+ * @description                Returnes the application data path
+ * @parameter          pAppDataPath: application data path
+ * @return                     true if succeed else false
+ */
+bool KeyManagerGetDataPath(char* pAppDataPath)
+{
+       if(NULL == pAppDataPath)
+       {
+               FPRINTF( "[Line : %d] [Key-Manager_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if(NULL == pPath)
+       {
+               FPRINTF( "[Line : %d] [Key-Manager_ITc] Unable to get application data path; app_get_data_path returned null value \\n", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF( "[Line : %d] [Key-Manager_ITc] application data path returned = %s\\n", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+/**
+ * @function           KeyManagerAppendToAppDataPath
+ * @description                Appends the input string to application data path
+ * @parameter          pInputPath: path to append to data path; pFinalPath: final resultant path
+ * @return                     true if succeed else false
+ */
+bool KeyManagerAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if( (NULL == pInputPath) || (NULL == pFinalPath) )
+       {
+               FPRINTF( "[Line : %d] [Key-Manager_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if(false == KeyManagerGetDataPath(pAppDataPath))
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+       
+       FPRINTF( "[Line : %d] [Key-Manager_ITc] result path returned = %s\\n", __LINE__, pFinalPath);
+
+       return true;
+}
+
+/**
+ * @function           KeyMngrGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* KeyMngrGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+       case CKMC_ERROR_NONE: szErrorVal = "CKMC_ERROR_NONE" ; break;
+       case CKMC_ERROR_INVALID_PARAMETER: szErrorVal = "CKMC_ERROR_INVALID_PARAMETER" ; break;
+       case CKMC_ERROR_OUT_OF_MEMORY: szErrorVal = "CKMC_ERROR_OUT_OF_MEMORY" ; break;
+       case CKMC_ERROR_PERMISSION_DENIED: szErrorVal = "CKMC_ERROR_PERMISSION_DENIED" ; break;
+       case CKMC_ERROR_SOCKET: szErrorVal = "CKMC_ERROR_SOCKET" ; break;
+       case CKMC_ERROR_BAD_REQUEST: szErrorVal = "CKMC_ERROR_BAD_REQUEST" ; break;
+       case CKMC_ERROR_BAD_RESPONSE: szErrorVal = "CKMC_ERROR_BAD_RESPONSE" ; break;
+       case CKMC_ERROR_SEND_FAILED: szErrorVal = "CKMC_ERROR_SEND_FAILED" ; break;
+       case CKMC_ERROR_RECV_FAILED: szErrorVal = "CKMC_ERROR_RECV_FAILED" ; break;
+       case CKMC_ERROR_AUTHENTICATION_FAILED: szErrorVal = "CKMC_ERROR_AUTHENTICATION_FAILED" ; break;
+       case CKMC_ERROR_BUFFER_TOO_SMALL: szErrorVal = "CKMC_ERROR_BUFFER_TOO_SMALL" ; break;
+       case CKMC_ERROR_SERVER_ERROR: szErrorVal = "CKMC_ERROR_SERVER_ERROR" ; break;
+       case CKMC_ERROR_DB_LOCKED: szErrorVal = "CKMC_ERROR_DB_LOCKED" ; break;
+       case CKMC_ERROR_DB_ERROR: szErrorVal = "CKMC_ERROR_DB_ERROR" ; break;
+       case CKMC_ERROR_DB_ALIAS_EXISTS: szErrorVal = "CKMC_ERROR_DB_ALIAS_EXISTS" ; break;
+       case CKMC_ERROR_DB_ALIAS_UNKNOWN: szErrorVal = "CKMC_ERROR_DB_ALIAS_UNKNOWN" ; break;
+       case CKMC_ERROR_VERIFICATION_FAILED: szErrorVal = "CKMC_ERROR_VERIFICATION_FAILED" ; break;
+       case CKMC_ERROR_INVALID_FORMAT: szErrorVal = "CKMC_ERROR_INVALID_FORMAT" ; break;
+       case CKMC_ERROR_FILE_ACCESS_DENIED: szErrorVal = "CKMC_ERROR_FILE_ACCESS_DENIED" ; break;
+       case CKMC_ERROR_UNKNOWN: szErrorVal = "CKMC_ERROR_UNKNOWN" ; break;
+       default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+
+
+/**
+* @function                    KeyMngrGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void KeyMngrGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stKeyMngrMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stKeyMngrMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stKeyMngrMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+
+/**
+* @function                    StorageGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void KeyMngrGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stKeyMngrMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           MetadataExtractorExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void KeyMngrExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stKeyMngrStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stKeyMngrStartTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           StorageGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stMetadataExtractorStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void KeyMngrGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stKeyMngrStartTime, NULL);
+#endif
+}
+
+
+/**
+ * @function           LoadPkcs12
+ * @description                Creates a new ckmc_key_s(private key), ckmc_cert_s(certificate), and ckmc_cert_list_s(CA certificates) handle from a given PKCS#12 file and returns them.
+ * @parameter          ckmc_key_s **pPrivate_key, ckmc_cert_s **pCert ,ckmc_cert_list_s **ca_cert_list, int *nRetVal
+ * @return             NA
+ *
+ */ 
+void LoadPkcs12(ckmc_key_s **pPrivate_key, ckmc_cert_s **pCert ,ckmc_cert_list_s **ca_cert_list, int *nRetVal)
+{
+       char pszFilePath[PATH_LEN] = {0,};
+       if(false == KeyManagerAppendToAppDataPath(PATHPFX, pszFilePath))
+       {
+               FPRINTF( "[Line : %d] [Key-Manager_ITc] unable to get the app data path\\n", __LINE__);
+               return;
+       }
+
+       *nRetVal = ckmc_load_from_pkcs12_file(pszFilePath, PASSPHRASEPFX, pPrivate_key, pCert, ca_cert_list);
+}
+
+/**
+ * @function           SaveKey
+ * @description                Stores a key inside key manager based on the provided policy.
+ * @parameter          char* alias, int *nRetVal
+ * @return             NA
+ *
+ */ 
+void SaveKey(char* alias, int *nRetVal)
+{
+       ckmc_key_s test_key;
+       char* key_password = NULL;
+       ckmc_policy_s test_policy;
+       char* policy_password = NULL;
+
+    test_key.raw_key =  (unsigned char *)RSA_PUB_KEY_PEM;
+    test_key.key_size = strlen(RSA_PUB_KEY_PEM);
+    test_key.key_type = CKMC_KEY_RSA_PUBLIC;
+    test_key.password = key_password;
+
+    test_policy.password = policy_password;
+    test_policy.extractable = true;
+
+    *nRetVal = ckmc_save_key(alias, test_key, test_policy);
+}
+
+/**
+ * @function           RemoveKey
+ * @description                Removes a key inside key manager based on the provided policy.
+ * @parameter          char* alias 
+ * @return             NA
+ *
+ */ 
+void RemoveKey(char* alias)
+{
+    ckmc_remove_key(alias);
+}
+
+/**
+ * @function           SaveCertificate
+ * @description                Stores a certificate inside key manager based on the provided policy.
+ * @parameter          char* alias, int *nRetVal
+ * @return             NA
+ *
+ */
+void SaveCertificate(char* alias, int *nRetVal)
+{
+       ckmc_cert_s cert;
+       ckmc_policy_s test_policy;
+
+       char* policy_password = NULL;
+
+       test_policy.password = policy_password;
+       test_policy.extractable = true;
+
+       cert.raw_cert =  (unsigned char *)CERT_PEM;
+       cert.cert_size = strlen(CERT_PEM);
+       cert.data_format = CKMC_FORM_PEM;
+
+        *nRetVal = ckmc_save_cert(alias, cert, test_policy);
+}
+
+/**
+ * @function           RemoveCertificate
+ * @description                Removes a certificate inside key manager based on the provided policy.
+ * @parameter          char* alias
+ * @return             NA
+ *
+ */
+void RemoveCertificate(char* alias)
+{
+       ckmc_remove_cert(alias);
+}
+
+/**
+ * @function           SaveData
+ * @description                Stores a data inside key manager based on the provided policy.
+ * @parameter          char* alias, int *nRetVal
+ * @return             NA
+ *
+ */
+void SaveData(const char* alias, int *nRetVal)
+{
+       char* pszPassword = NULL;
+       char* pData = "My bin data";
+
+       ckmc_raw_buffer_s DataBuffer;
+       ckmc_policy_s policy;
+
+       DataBuffer.data = (unsigned char *) pData;
+       DataBuffer.size = strlen(pData);
+
+       policy.password = pszPassword;
+       policy.extractable = true;
+
+       *nRetVal = ckmc_save_data(alias, DataBuffer, policy);
+
+}
+
+
+/**
+ * @function           RemoveData
+ * @description                Removes a data inside key manager based on the provided policy.
+ * @parameter          char* alias
+ * @return             NA
+ *
+ */
+void RemoveData(const char* alias)
+{
+       ckmc_remove_data(alias);
+}
+
+
+
+char* RSA_PUB_KEY_PEM = "-----BEGIN PUBLIC KEY-----\n"
+       "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2b1bXDa+S8/MGWnMkru4\n"
+       "T4tUddtZNi0NVjQn9RFH1NMa220GsRhRO56F77FlSVFKfSfVZKIiWg6C+DVCkcLf\n"
+       "zXJ/Z0pvwOQYBAqVMFjV6efQGN0JzJ1Unu7pPRiZl7RKGEI+cyzzrcDyrLLrQ2W7\n"
+       "0ZySkNEOv6Frx9JgC5NExuYY4lk2fQQa38JXiZkfyzif2em0px7mXbyf5LjccsKq\n"
+       "v1e+XLtMsL0ZefRcqsP++NzQAI8fKX7WBT+qK0HJDLiHrKOTWYzx6CwJ66LD/vvf\n"
+       "j55xtsKDLVDbsotvf8/m6VLMab+vqKk11TP4tq6yo0mwyTADvgl1zowQEO9I1W6o\n"
+       "zQIDAQAB\n"
+       "-----END PUBLIC KEY-----";
+
+char* CERT_PEM = "-----BEGIN CERTIFICATE-----\n"
+    "MIIEgDCCA2igAwIBAgIIcjtBYJGQtOAwDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE\n"
+    "BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl\n"
+    "cm5ldCBBdXRob3JpdHkgRzIwHhcNMTQwNTIyMTEyOTQyWhcNMTQwODIwMDAwMDAw\n"
+    "WjBtMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN\n"
+    "TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEcMBoGA1UEAwwTYWNj\n"
+    "b3VudHMuZ29vZ2xlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\n"
+    "ALtlLWVWPN3q3bSEQl1Z97gPdgl5vbgJOZSAr0ZY0tJCuFLBbUKetJWryyE+5KpG\n"
+    "gMMpLS4v8/bvXaZc6mAs+RfAqGM24C3vQg5hPnj4dflnhL0WiOCZBurm1tV4oexk\n"
+    "HLXs3jr/jpnb738AQpj8zZ9a4VEBuHJRZALnWZ/XhqU+dvYomAoRQNuL5OhkT7uu\n"
+    "d0NKJL9JjYLyQglGgE2sVsWv2kj7EO/P9Q6NEKt9BGmhMsFvtfeKUaymynaxpR1g\n"
+    "wEPlqYvB38goh1dIOgVLT0OVyLImeg5Mdwar/8c1U0OYhLOc6PJapOZAfUkE+3+w\n"
+    "xYt8AChLN1b5szOwInrCVpECAwEAAaOCAUYwggFCMB0GA1UdJQQWMBQGCCsGAQUF\n"
+    "BwMBBggrBgEFBQcDAjAeBgNVHREEFzAVghNhY2NvdW50cy5nb29nbGUuY29tMGgG\n"
+    "CCsGAQUFBwEBBFwwWjArBggrBgEFBQcwAoYfaHR0cDovL3BraS5nb29nbGUuY29t\n"
+    "L0dJQUcyLmNydDArBggrBgEFBQcwAYYfaHR0cDovL2NsaWVudHMxLmdvb2dsZS5j\n"
+    "b20vb2NzcDAdBgNVHQ4EFgQU0/UtToEtNIfwDwHuYGuVKcj0xK8wDAYDVR0TAQH/\n"
+    "BAIwADAfBgNVHSMEGDAWgBRK3QYWG7z2aLV29YG2u2IaulqBLzAXBgNVHSAEEDAO\n"
+    "MAwGCisGAQQB1nkCBQEwMAYDVR0fBCkwJzAloCOgIYYfaHR0cDovL3BraS5nb29n\n"
+    "bGUuY29tL0dJQUcyLmNybDANBgkqhkiG9w0BAQUFAAOCAQEAcGNI/X9f0g+7ij0o\n"
+    "ehLpk6vxSMQGrmOZ4+PG/MC9SLClCkt7zJkfU7erZnyVXyxCpwlljq+Wk9YTPUOq\n"
+    "xD/V2ikQVSAANoxGJFO9UoL5jzWusPhKKv8CcM7fuiERz8K+CfBcqfxbgI5rH0g5\n"
+    "dYclmLC81cJ/08i+9Nltvxv69Y3hGfEICT6K+EdSxwnQzOhpMZmvxZsIj+d6CVNa\n"
+    "9ICYgUthsNQVWzrIs5wknpjjZ9liDMwJX0vu8A0rce4X/Lna5hh2bW9igz2iP5WM\n"
+    "9fuwdbTw4y3jfPQgszU4YZxWxhMzccxe058Qx1tLndAknBQEBesQjXytVQpuM1SV\n"
+    "rHva8A==\n"
+    "-----END CERTIFICATE-----\n";
+
+char* CRY_RSA_PRI_KEY =
+       "-----BEGIN RSA PRIVATE KEY-----\n"
+       "MIICXQIBAAKBgQDCKb9BkTdOjCTXKPi/H5FSGuyrgzORBtR3nCTg7SRnL47zNGEj\n"
+       "l2wkgsY9ZO3UJHm0gy5KMjWeCuUVkSD3G46J9obg1bYJivCQBJKxfieA8sWOtNq1\n"
+       "M8emHGK8o3sjaRklrngmk2xSCs5vFJVlCluzAYUmrPDm64C3+n4yW4pBCQIDAQAB\n"
+       "AoGAd1IWgiHO3kuLvFome7XXpaB8P27SutZ6rcLcewnhLDRy4g0XgTrmL43abBJh\n"
+       "gdSkooVXZity/dvuKpHUs2dQ8W8zYiFFsHfu9qqLmLP6SuBPyUCvlUDH5BGfjjxI\n"
+       "5qGWIowj/qGHKpbQ7uB+Oe2BHwbHao0zFZIkfKqY0mX9U00CQQDwF/4zQcGS1RX/\n"
+       "229gowTsvSGVmm8cy1jGst6xkueEuOEZ/AVPO1fjavz+nTziUk4E5lZHAj18L6Hl\n"
+       "iO29LRujAkEAzwbEWVhfTJewCZIFf3sY3ifXhGZhVKDHVzPBNyoft8Z+09DMHTJb\n"
+       "EYg85MIbR73aUyIWsEci/CPk6LPRNv47YwJAHtQF2NEFqPPhakPjzjXAaSFz0YDN\n"
+       "6ZWWpZTMEWL6hUkz5iE9EUpeY54WNB8+dRT6XZix1VZNTMfU8uMdG6BSHwJBAKYM\n"
+       "gm47AGz5eVujwD8op6CACk+KomRzdI+P1lh9s+T+E3mnDiAY5IxiXp0Ix0K6lyN4\n"
+       "wwPuerQLwi2XFKZsMYsCQQDOiSQFP9PfXh9kFzN6e89LxOdnqC/r9i5GDB3ea8eL\n"
+       "SCRprpzqOXZvOP1HBAEjsJ6k4f8Dqj1fm+y8ZcgAZUPr\n"
+       "-----END RSA PRIVATE KEY-----\n";
+
+char* CRY_CERT =
+       "-----BEGIN CERTIFICATE-----\n"
+       "MIICijCCAfOgAwIBAgIJAMvaNHQ1ozT8MA0GCSqGSIb3DQEBBQUAMF4xCzAJBgNV\n"
+       "BAYTAlBMMQ0wCwYDVQQIDARMb2R6MQ0wCwYDVQQHDARMb2R6MRAwDgYDVQQKDAdT\n"
+       "YW1zdW5nMREwDwYDVQQLDAhTZWN1cml0eTEMMAoGA1UEAwwDQ0tNMB4XDTE0MDcw\n"
+       "MjEyNDE0N1oXDTE3MDcwMTEyNDE0N1owXjELMAkGA1UEBhMCUEwxDTALBgNVBAgM\n"
+       "BExvZHoxDTALBgNVBAcMBExvZHoxEDAOBgNVBAoMB1NhbXN1bmcxETAPBgNVBAsM\n"
+       "CFNlY3VyaXR5MQwwCgYDVQQDDANDS00wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ\n"
+       "AoGBAMIpv0GRN06MJNco+L8fkVIa7KuDM5EG1HecJODtJGcvjvM0YSOXbCSCxj1k\n"
+       "7dQkebSDLkoyNZ4K5RWRIPcbjon2huDVtgmK8JAEkrF+J4DyxY602rUzx6YcYryj\n"
+       "eyNpGSWueCaTbFIKzm8UlWUKW7MBhSas8ObrgLf6fjJbikEJAgMBAAGjUDBOMB0G\n"
+       "A1UdDgQWBBQuW9DuITahZJ6saVZZI0aBlis5vzAfBgNVHSMEGDAWgBQuW9DuITah\n"
+       "ZJ6saVZZI0aBlis5vzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAB2X\n"
+       "GNtJopBJR3dCpzDONknr/c6qcsPVa3nH4c7qzy6F+4bgqa5IObnoF8zUrvD2sMAO\n"
+       "km3C/N+Qzt8Rb7ORM6U4tlPp1kZ5t6PKjghhNaiYwVm9A/Zm+wyAmRIkQiYDr4MX\n"
+       "e+bRAkPmJeEWpaav1lvvBnFzGSGJrnSSeWUegGyn\n"
+       "-----END CERTIFICATE-----\n";
+
+// Test certificate signed with test intermediate ca
+char* CERT_CHAIN1 =
+    "-----BEGIN CERTIFICATE-----\n"
+    "MIIDOzCCAiMCAQEwDQYJKoZIhvcNAQEFBQAwZDELMAkGA1UEBhMCQVUxEzARBgNV\n"
+    "BAgMClNvbWUtU3RhdGUxDTALBgNVBAoMBEFDTUUxEDAOBgNVBAsMB1Rlc3Rpbmcx\n"
+    "HzAdBgNVBAMMFlRlc3QgSU0gQ0EgY2VydGlmaWNhdGUwHhcNMTUwMTE2MTY0ODE0\n"
+    "WhcNMzUwMTExMTY0ODE0WjBjMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1T\n"
+    "dGF0ZTENMAsGA1UECgwEQUNNRTEQMA4GA1UECwwHVGVzdGluZzEeMBwGA1UEAwwV\n"
+    "VGVzdCBsZWFmIGNlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\n"
+    "CgKCAQEAzTdDIa2tDmRxFnIgiG+mBz8GoSVODs0ImNQGbqj+pLhBOFRH8fsah4Jl\n"
+    "z5YF9KwhMVLknnHGFLE/Nb7Ac35kEzhMQMpTRxohW83oxw3eZ8zN/FBoKqg4qHRq\n"
+    "QR8kS10YXTgrBR0ex/Vp+OUKEw6h7yL2r4Tpvrn9/qHwsxtLxqWbDIVf1O9b1Lfc\n"
+    "bllYMdmV5E62yN5tcwrDP8gvHjFnVeLzrG8wTpc9FR90/0Jkfp5jAJcArOBLrT0E\n"
+    "4VRqs+4HuwT8jAwFAmNnc7IYX5qSjtSWkmmHe73K/lzB+OiI0JEc/3eWUTWqwTSk\n"
+    "4tNCiQGBKJ39LXPTBBJdzmxVH7CUDQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQAp\n"
+    "UdDOGu3hNiG+Vn10aQ6B1ZmOj3t+45gUV3sC+y8hB8EK1g4P5Ke9bVDts0T5eOnj\n"
+    "CSc+6VoND5O4adI0IFFRFljHNVnvjeosHfUZNnowsmA2ptQBtC1g5ZKRvKXlkC5/\n"
+    "i5BGgRqPFA7y9WB9Y05MrJHf3E+Oz/RBsLeeNiNN+rF5X1vYExvGHpo0M0zS0ze9\n"
+    "HtC0aOy8ocsTrQkf3ceHTAXx2i8ftoSSD4klojtWFpWMrNQa52F7wB9nU6FfKRuF\n"
+    "Zj/T1JkYXKkEwZU6nAR2jdZp3EP9xj3o15V/tyFcXHx6l8NTxn4cJb+Xe4VquQJz\n"
+    "6ON7PVe0ABN/AlwVQiFE\n"
+    "-----END CERTIFICATE-----\n";
+
+// Test root ca is installed in /etc/ssl/certs
+// Test intermediate ca signed with test root ca
+char* CERT_CHAIN2 =
+    "-----BEGIN CERTIFICATE-----\n"
+    "MIIDljCCAn6gAwIBAgICEAAwDQYJKoZIhvcNAQEFBQAwZjELMAkGA1UEBhMCQVUx\n"
+    "EzARBgNVBAgMClNvbWUtU3RhdGUxDTALBgNVBAoMBEFDTUUxEDAOBgNVBAsMB1Rl\n"
+    "c3RpbmcxITAfBgNVBAMMGFRlc3Qgcm9vdCBjYSBjZXJ0aWZpY2F0ZTAeFw0xNTAx\n"
+    "MTYxNjQ1MzRaFw0zNTAxMTExNjQ1MzRaMGQxCzAJBgNVBAYTAkFVMRMwEQYDVQQI\n"
+    "DApTb21lLVN0YXRlMQ0wCwYDVQQKDARBQ01FMRAwDgYDVQQLDAdUZXN0aW5nMR8w\n"
+    "HQYDVQQDDBZUZXN0IElNIENBIGNlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEF\n"
+    "AAOCAQ8AMIIBCgKCAQEAzmBF78qClgoKfnLAncMXZwZ14TW+5kags1+QCYeg3c7j\n"
+    "L9+RvDxIaX2tKf1sukJcwQfYqUlQkwt+58LMOb2ORtkpj8Or6WCWCZ0BzneT8ug7\n"
+    "nxJT4m9+bohMF0JoKjjB2H4KNMHamLIwUxRKt6nyfk81kVhJOi2vzzxd+UCPi6Pc\n"
+    "UAbJNH48eNgOIg55nyFovVzYj8GIo/9GvHJj83PPa/KlJZ+Z1qZASZZ/VYorplVT\n"
+    "thsHXKfejhFy5YJ9t7n/vyAQsyBsagZsvX19xnH41fbYXHKf8UbXG23rNaZlchs6\n"
+    "XJVLQdzOpj3WTj/lCocVHqLaZISLhNQ3aI7kUBUdiwIDAQABo1AwTjAdBgNVHQ4E\n"
+    "FgQUoCYNaCBP4jl/3SYQuK8Ka+6i3QEwHwYDVR0jBBgwFoAUt6pkzFt1PZlfYRL/\n"
+    "HGnufF4frdwwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAjRzWiD97\n"
+    "Htv4Kxpm3P+C+xP9AEteCJfO+7p8MWgtWEJOknJyt55zeKS2JwZIq57KcbqD8U7v\n"
+    "vAUx1ymtUhlFPFd7J1mJ3pou+3aFYmGShYhGHpbrmUwjp7HVP588jrW1NoZVHdMc\n"
+    "4OgJWFrViXeu9+maIcekjMB/+9Y0dUgQuK5ZuT5H/Jwet7Th/o9uufTUZjBzRvrB\n"
+    "pbXgQpqgME2av4Q/6LuldPCTHLtWXgFUU2R+yCGmuGilvhFJnKoQryAbYnIQNWE8\n"
+    "SLoHQ9s1i7Zyb7HU6UAaqMOz15LBkyAqtNyJcO2p7Q/p5YK0xfD4xisI5qXucqVm\n"
+    "F2obL5qJSTN/RQ==\n"
+    "-----END CERTIFICATE-----\n";
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/key-manager/ITs-key-manager-common.h b/src/itc/key-manager/ITs-key-manager-common.h
new file mode 100755 (executable)
index 0000000..ea8b800
--- /dev/null
@@ -0,0 +1,196 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_KEY_MANAGER_COMMON_H__
+#define _ITS_KEY_MANAGER_COMMON_H__
+
+#include "assert.h"
+#include <ckmc/ckmc-manager.h>
+#include <ckmc/ckmc-type.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <app.h>
+
+/** @addtogroup itc-key-manager
+*  @ingroup itc
+*  @{
+*/
+
+FILE *g_fpLog;
+
+#define PATH                    "certificate.crt"
+//#define PATHSSL                      "ssl.crt"
+//#define PATHSSLKEY           "ssl.private.key"
+
+#define PATHPFX                        "signer.p12"
+#define PASSPHRASEPFX "1234"
+
+//static const int   APPUSER_UID    = 5000;
+//static const char *APPUSER_PASSWD = "simple-password";
+
+#define ERR_LOG                                "/tmp/tclog"
+#define PATH_LEN                                                       1024
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+
+struct timeval g_stKeyMngrStartTime;
+struct mallinfo g_stKeyMngrMemInfo;
+
+bool g_bIskey_managerInitialized;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][Key-Manager_ITc] ***** Starting test : %s\n", __LINE__,__FUNCTION__);\
+       if ( !g_bIskey_managerInitialized )\
+       {\
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition of key-manager failed so leaving test\n",__LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog){\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [libstorage_ITc] %s_MemoryLeakStatus - %s\n", __LINE__, #api, memLog);\
+       }\
+}
+       
+               
+#define PRINT_SPEED_LOG(api, szSpeedLog)\
+       if(strlen(szSpeedLog) > 0) \
+       {\
+               szSpeedLog[strlen(szSpeedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [libstorage_ITc] %s_TimeInMicrosec- %s\n", __LINE__, #api, szSpeedLog);\
+       }\
+
+#define VALIDATE_RESULT_API(nFailCount, strTargetApiName, ptrMem1, ptrMem2) \
+       if ( nFailCount > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] %s failed %d times out of %d times\n", __LINE__, strTargetApiName, nFailCount, MAX_COUNT);\
+               if (ptrMem1 != NULL)\
+               {\
+                       free(ptrMem1);\
+                       ptrMem1 = NULL;\
+               }\
+               if (ptrMem2 != NULL)\
+               {\
+                       free(ptrMem2);\
+                       ptrMem2 = NULL;\
+               }\
+               return 1;\
+       }\
+
+#define VALIDATE_RESULT_PAIRAPI(nErrCount1, nErrCount2, strTargetApi1, strTargetApi2, szApi1, szApi2, szApi3) \
+       if ( nErrCount1 > 0 || nErrCount2 > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] %s failed %d times, %s failed %d times out of %d times\n", __LINE__, strTargetApi1, nErrCount1, strTargetApi2, nErrCount2, MAX_COUNT);\
+               if (szApi1 != NULL)\
+               {\
+                       free(szApi1);\
+                       szApi1 = NULL;\
+               }\
+               if (szApi2 != NULL)\
+               {\
+                       free(szApi2);\
+                       szApi2 = NULL;\
+               }\
+               if (szApi3 != NULL)\
+               {\
+                       free(szApi3);\
+                       szApi3 = NULL;\
+               }\
+               return 1;\
+       }\
+       
+
+#define FREE_MEMORY_2ARGS(szApi1, szApi2)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+
+
+#define FREE_MEMORY_3ARGS(szApi1, szApi2, szApi3)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+       if (szApi3 != NULL)\
+       {\
+               free(szApi3);\
+               szApi3 = NULL;\
+       }\
+
+char* RSA_PUB_KEY_PEM;
+
+char* CERT_PEM;
+
+char* CRY_RSA_PRI_KEY;
+
+char* CRY_CERT ;
+
+char* CERT_CHAIN1 ;
+
+char* CERT_CHAIN2 ;
+
+
+char* KeyMngrGetError(int nRet);
+void KeyMngrGetMemStatus(char *pszAPIMemory);
+inline void KeyMngrGetMemAllocation();
+void KeyMngrExecutionDelay(char* pszAPITime);
+void KeyMngrGetTimeOfDay();
+void LoadPkcs12(ckmc_key_s **pPrivate_key, ckmc_cert_s **pCert ,ckmc_cert_list_s **ca_cert_list, int *nRetVal);
+void SaveKey(char* alias, int *nRetVal);
+void RemoveKey(char* alias);
+void SaveCertificate(char* alias, int *nRetVal);
+void RemoveCertificate(char* alias);
+void SaveData(const char* alias, int *nRetVal);
+void RemoveData(const char* alias);
+bool KeyManagerGetDataPath(char* pAppDataPath);
+bool KeyManagerAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+
+/** @} */
+
+#endif  //_ITS_KEY_MANAGER_COMMON_H_
diff --git a/src/itc/key-manager/ITs-key-manager.c b/src/itc/key-manager/ITs-key-manager.c
new file mode 100755 (executable)
index 0000000..80f0f7a
--- /dev/null
@@ -0,0 +1,2256 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-key-manager-common.h"
+
+/** @addtogroup itc-key-manager
+*  @ingroup itc
+*  @{
+*/
+
+//& set: KeyManager
+
+/**
+ * @function           ITs_key_manager_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_key_manager_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       /*int nRetVal  = ckmc_remove_user_data(APPUSER_UID);
+       if(nRetVal != CKMC_ERROR_NONE)
+               printf("\n[Key-Manager_ITc] Fail to ckmc_remove_user_data %d, error returned = %s ", nRetVal, KeyMngrGetError(nRetVal));*/
+
+       g_bIskey_managerInitialized = true;
+
+       //int nRetVal = ckmc_remove_user_data(APPUSER_UID);
+       //if(nRetVal != CKMC_ERROR_NONE)
+       //{
+       //      g_bIskey_managerInitialized = false;
+       //      FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to ckmc_remove_user_data %d, error //returned = %s ", __LINE__, nRetVal, (char *)KeyMngrGetError(nRetVal));
+       //}
+
+       //nRetVal = ckmc_unlock_user_key(APPUSER_UID, APPUSER_PASSWD);
+       //if(nRetVal != CKMC_ERROR_NONE)
+       //{
+       //      g_bIskey_managerInitialized = false;
+       //      FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to ckmc_unlock_user_key %d, error //returned = %s ", __LINE__,nRetVal, (char *)KeyMngrGetError(nRetVal));
+       //}
+}
+
+/**
+ * @function           ITs_key_manager_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_key_manager_cleanup(void)
+{
+       //ckmc_lock_user_key(APPUSER_UID);
+       //ckmc_remove_user_data(APPUSER_UID);
+       return;
+}
+
+/** @addtogroup itc-key-manager-testcases
+*  @brief              Integration testcases for module key-manager
+*  @ingroup    itc-key-manager
+*  @{
+*/
+
+//& purpose: Stores a key inside key manager based on the provided policy.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_save_key_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Stores a key inside key manager based on the provided policy
+ * @scenario                           Store a key inside key manager
+ * @apicovered                         ckmc_save_key
+ * @passcase                           When ckmc_save_key API return 0
+ * @failcase                           If ckmc_save_key API returns non zero value
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_ckmc_save_key_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal = -1;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       ckmc_key_s test_key;
+       test_key.raw_key =  (unsigned char *)RSA_PUB_KEY_PEM;
+       test_key.key_size = strlen(RSA_PUB_KEY_PEM);
+       test_key.key_type = CKMC_KEY_RSA_PUBLIC;
+       test_key.password = NULL;
+
+       ckmc_policy_s test_policy;
+       test_policy.password = NULL;
+       test_policy.extractable = true;
+       
+       char *pszAlias = "AliasSaveKey";
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               nRetVal = ckmc_save_key(pszAlias, test_key, test_policy);//target api
+               KeyMngrExecutionDelay(pszSpeedLog);
+               KeyMngrGetMemStatus(pszMemLog);
+
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_save_key on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+
+               RemoveKey(pszAlias);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "ckmc_save_key", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_save_key", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_save_key", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+
+//& purpose: Removes a key from key manager.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_remove_key_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Removes a key from key manager
+ * @scenario                           Removes a key from key manager
+ * @apicovered                         ckmc_remove_key
+ * @passcase                           When ckmc_remove_key API return 0
+ * @failcase                           If ckmc_remove_key API returns non zero value
+ * @precondition                       NA
+ * @postcondition                      NA 
+ */
+int ITc_ckmc_remove_key_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal = -1;
+       char* pszAlias = "remove_key_p";
+
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       //precondition
+                       SaveKey(pszAlias, &nRetVal);
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition fail for  ITc_ckmc_remove_key_p, error returned = %s ", __LINE__, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       nRetVal = ckmc_remove_key(pszAlias);;//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_remove_key on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "ckmc_remove_key", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_remove_key", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_remove_key", pszMemLog);
+#endif
+               
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Gets a key from key manager.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_get_key_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Gets a key from key manager
+ * @scenario                           Gets a key from key manager
+ * @apicovered                         ckmc_get_key
+ * @passcase                           When ckmc_get_key API return 0
+ * @failcase                           If ckmc_get_key API returns non zero value
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_ckmc_get_key_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal = -1;
+
+       char* pszAlias = "get_key_p";
+       char *pszPassword = NULL;
+
+       //precondition
+       SaveKey(pszAlias, &nRetVal);
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition fail for  ITc_ckmc_get_key_p, error returned = %s ", __LINE__, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               ckmc_key_s *    ppkey = NULL;
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       nRetVal = ckmc_get_key  (pszAlias, pszPassword, &ppkey);;//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_get_key on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+                       ckmc_key_free(ppkey) ;
+
+               }
+
+               RemoveKey(pszAlias);
+               VALIDATE_RESULT_API(nFailCount, "ckmc_get_key", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_get_key", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_get_key", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Gets a all alias of keys to which the client can access.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_get_key_alias_list_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Gets a all alias of keys to which the client can access
+ * @scenario                           Gets a all alias of keys to which the client can access
+ * @apicovered                         ckmc_get_key_alias_list
+ * @passcase                           When ckmc_get_key_alias_list API return 0
+ * @failcase                           If ckmc_get_key_alias_list API returns non zero value
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_ckmc_get_key_alias_list_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal = -1;
+
+       char* pszAlias1 = "Alias1";
+       char* pszAlias2 = "Alias2";
+
+       //precondition start
+       SaveKey(pszAlias1, &nRetVal);
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition1 failed to get ITc_ckmc_get_key_alias_list_p on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+
+       }
+
+       SaveKey(pszAlias2, &nRetVal);
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition2 failed to get  ITc_ckmc_get_key_alias_list_p on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+       }
+       //precondition end
+
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               ckmc_alias_list_s *ppAlias_list = NULL; 
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       nRetVal = ckmc_get_key_alias_list       (&ppAlias_list);;//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_get_key_alias_list on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+                       ckmc_alias_list_all_free(ppAlias_list) ;
+               }
+
+               RemoveKey(pszAlias1);
+               RemoveKey(pszAlias2);
+
+               VALIDATE_RESULT_API(nFailCount, "ckmc_get_key_alias_list", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_get_key_alias_list", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_get_key_alias_list", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Stores a certificate inside key manager based on the provided policy.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_save_cert_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Stores a certificate inside key manager based on the provided policy
+ * @scenario                           Stores a certificate inside key manager
+ * @apicovered                         ckmc_save_cert
+ * @passcase                           When ckmc_save_cert API return 0
+ * @failcase                           If ckmc_save_cert API returns non zero value
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_ckmc_save_cert_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               ckmc_cert_s cert;
+               ckmc_policy_s cert_policy;
+
+               char *pszAlias = "save_cert_p";
+               char* policy_password = NULL;
+
+               cert_policy.password = policy_password;
+               cert_policy.extractable = true;
+
+               cert.raw_cert =  (unsigned char *)CERT_PEM;
+               cert.cert_size = strlen(CERT_PEM);
+               cert.data_format = CKMC_FORM_PEM;
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       int nRetVal = ckmc_save_cert(pszAlias, cert, cert_policy);//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_save_cert on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               //continue;
+                       }
+                        RemoveCertificate(pszAlias);
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "ckmc_save_cert", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_save_cert", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_save_cert", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+
+//& purpose: Removes a certificate from key manager
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_remove_cert_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Removes a certificate from key manager
+ * @scenario                           Removes a certificate from key manager
+ * @apicovered                         ckmc_remove_cert
+ * @passcase                           When ckmc_remove_cert API return 0
+ * @failcase                           If ckmc_remove_cert API returns non zero value
+ * @precondition                       NA
+ * @postcondition                      NA 
+ */
+int ITc_ckmc_remove_cert_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       char* pszAlias = "remove_cert_p";
+       int nRetVal = -1;
+       
+        for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+        {
+                //precondition
+                SaveCertificate(pszAlias, &nRetVal);
+
+                if(nRetVal != CKMC_ERROR_NONE)
+                {
+                        FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed to  for  ITc_ckmc_remove_cert_p on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                        nFailCount++;
+                        continue;
+                }
+
+                KeyMngrGetMemAllocation();
+
+                KeyMngrGetTimeOfDay();
+                nRetVal = ckmc_remove_cert(pszAlias);//target api
+                KeyMngrExecutionDelay(pszSpeedLog);
+                KeyMngrGetMemStatus(pszMemLog);
+
+                if(nRetVal != CKMC_ERROR_NONE)
+                {
+                        FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_remove_cert on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                        nFailCount++;
+                        continue;
+                }
+               
+        }
+
+        VALIDATE_RESULT_API(nFailCount, "ckmc_remove_cert", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_remove_cert", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_remove_cert", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Removes a certificate from key manager.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_get_cert_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Removes a certificate from key manager
+ * @scenario                           Removes a certificate from key manager
+ * @apicovered                         ckmc_get_cert
+ * @passcase                           When ckmc_get_cert API return 0
+ * @failcase                           If ckmc_get_cert API returns non zero value
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_ckmc_get_cert_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       char *policy_password = NULL;
+       int nRetVal = -1;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               char* pcAlias = "get_cert_p";
+               ckmc_cert_s *cert2;
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       //precondition
+                       SaveCertificate(pcAlias,&nRetVal);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed to  to execute ckmc_save_cert on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       int nRetVal = ckmc_get_cert(pcAlias,policy_password,&cert2);;//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_get_cert on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               //continue;
+                       }
+                       RemoveCertificate(pcAlias);
+
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "ckmc_get_cert", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_get_cert", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_get_cert", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Gets a all alias of certificates to which the client can access.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_get_cert_alias_list_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Gets a all alias of certificates to which the client can access
+ * @scenario                           Gets a all alias of certificates
+ * @apicovered                         ckmc_get_cert_alias_list
+ * @passcase                           When ckmc_get_cert_alias_list API return 0
+ * @failcase                           If ckmc_get_cert_alias_list API returns non zero value
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_ckmc_get_cert_alias_list_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal = -1;
+
+       char* pcAlias1 = "get_cert1_p";
+       char* pcAlias2 = "get_cert2_p";
+
+       //precondition start
+       SaveCertificate(pcAlias1, &nRetVal);
+
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition1 failed to  to execute ckmc_save_cert on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+       }
+
+       SaveCertificate(pcAlias2, &nRetVal);
+
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition2 failed to  to execute ckmc_save_cert on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+       }
+       //precondition end
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       ckmc_alias_list_s* palias_list = NULL;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       nRetVal = ckmc_get_cert_alias_list(&palias_list);;//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_get_cert_alias_list on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+               
+                       ckmc_alias_list_all_free(palias_list);
+               }
+
+       RemoveCertificate(pcAlias1);
+       RemoveCertificate(pcAlias2);
+
+               VALIDATE_RESULT_API(nFailCount, "ckmc_get_cert_alias_list", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_get_cert_alias_list", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_get_cert_alias_list", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Stores a data inside key manager based on the provided policy.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_save_data_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Stores a data inside key manager based on the provided policy
+ * @scenario                           Stores a data inside key manager based on the provided policy
+ * @apicovered                         ckmc_save_data
+ * @passcase                           When ckmc_save_data API return 0
+ * @failcase                           If ckmc_save_data API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_save_data_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       char* pszPassword = NULL;
+       char* pData = "My bin data";
+       char* pszAlias = "save_data";
+
+       ckmc_raw_buffer_s DataBuffer;
+       ckmc_policy_s policy;
+
+       DataBuffer.data = (unsigned char *) pData;
+       DataBuffer.size = strlen(pData);
+
+       policy.password = pszPassword;
+       policy.extractable = true;
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               int nRetVal = ckmc_save_data(pszAlias, DataBuffer, policy);//target api
+               KeyMngrExecutionDelay(pszSpeedLog);
+               KeyMngrGetMemStatus(pszMemLog);
+
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_save_data on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       //continue;
+               }
+               RemoveData(pszAlias);
+
+       }
+       VALIDATE_RESULT_API(nFailCount, "ckmc_save_data", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_save_data", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_save_data", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Removes a data from key manager
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_remove_data_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Removes a data from key manager
+ * @scenario                           Removes a data from key manager
+ * @apicovered                         ckmc_remove_data
+ * @passcase                           When ckmc_remove_data API return 0
+ * @failcase                           If ckmc_remove_data API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_remove_data_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal  = -1;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       const char *pszAlias = "AliasSaveData";
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       //precondition
+                       SaveData(pszAlias,&nRetVal);
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed to  to execute ITc_ckmc_remove_data_p on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       int nRetVal = ckmc_remove_data(pszAlias);//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_remove_data on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "ckmc_remove_data", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_remove_data", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_remove_data", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+
+//& purpose: Gets a data from key manager
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_get_data_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Gets a data from key manager
+ * @scenario                           Gets a data from key manager
+ * @apicovered                         ckmc_get_data
+ * @passcase                           When ckmc_get_data API return 0
+ * @failcase                           If ckmc_get_data API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_get_data_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal = -1;
+
+       const char *pszAlias = "AliasSaveData";
+       char *pszPassword = NULL;
+       //precondition
+       SaveData(pszAlias,&nRetVal);
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed to  to execute ITc_ckmc_get_data_p on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+       }
+
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       ckmc_raw_buffer_s *pData = NULL;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       nRetVal = ckmc_get_data(pszAlias, pszPassword, &pData);;//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_get_data on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+                       ckmc_buffer_free(pData);
+               }
+               RemoveData(pszAlias);
+
+               VALIDATE_RESULT_API(nFailCount, "ckmc_get_data", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_get_data", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_get_data", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Gets a all alias of data to which the client can access
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_get_data_alias_list_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Gets a all alias of data to which the client can access
+ * @scenario                           Gets a all alias of data to which the client can access
+ * @apicovered                         ckmc_get_data_alias_list
+ * @passcase                           When ckmc_get_data_alias_list API return 0
+ * @failcase                           If ckmc_get_data_alias_list API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_get_data_alias_list_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal = -1;
+
+       const char *pszAlias1 = "AliasSaveData1";
+       const char *pszAlias2 = "AliasSaveData2";
+
+       //precondition start
+       SaveData(pszAlias1,&nRetVal);
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition1 failed to  to execute ITc_ckmc_get_data_p on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+       }
+
+       SaveData(pszAlias2,&nRetVal);
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition1 failed to  to execute ITc_ckmc_get_data_p on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+       }
+       //precondition end
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       ckmc_alias_list_s* pAlias_list = NULL;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       nRetVal = ckmc_get_data_alias_list(&pAlias_list);;//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_get_data_alias_list on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+                       ckmc_alias_list_all_free(pAlias_list);
+               }
+
+       RemoveData(pszAlias1);
+       RemoveData(pszAlias2);
+
+               VALIDATE_RESULT_API(nFailCount, "ckmc_get_data_alias_list", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_get_data_alias_list", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_get_data_alias_list", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Creates RSA private/public key pair and stores them inside key manager based on each policy.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_create_key_pair_rsa_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Creates RSA private/public key pair and stores them inside key manager based on each policy
+ * @scenario                           Creates RSA private/public key pair and stores them inside key manager
+ * @apicovered                         ckmc_create_key_pair_rsa
+ * @passcase                           When ckmc_create_key_pair_rsa API return 0
+ * @failcase                           If ckmc_create_key_pair_rsa API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_create_key_pair_rsa_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       size_t size = 2048;
+       const char *pszPrivate_key_alias = "PRV_KEY1";
+       const char *pszPublic_key_alias = "PUB_KEY1";
+       ckmc_policy_s policy_private_key;
+       ckmc_policy_s policy_public_key;
+
+       policy_private_key.password = NULL;
+       policy_private_key.extractable = true;
+       
+       policy_public_key.password = NULL;
+       policy_public_key.extractable = true;
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       int nRetVal = ckmc_create_key_pair_rsa(size, pszPrivate_key_alias, pszPublic_key_alias, policy_private_key, policy_public_key);//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_create_key_pair_rsa on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "ckmc_create_key_pair_rsa", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_create_key_pair_rsa", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_create_key_pair_rsa", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Creates DSA private/public key pair and stores them inside key manager based on each policy.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_create_key_pair_dsa_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Creates DSA private/public key pair and stores them inside key manager based on each policy
+ * @scenario                           Creates DSA private/public key pair and stores them inside key manager based on each policy
+ * @apicovered                         ckmc_create_key_pair_dsa
+ * @passcase                           When ckmc_create_key_pair_dsa API return 0
+ * @failcase                           If ckmc_create_key_pair_dsa API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_create_key_pair_dsa_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       size_t size = 2048;
+       const char *pszPrivate_key_alias = "PRV_KEY2";
+       const char *pszPublic_key_alias = "PUB_KEY2";
+       ckmc_policy_s policy_private_key;
+       ckmc_policy_s policy_public_key;
+
+       policy_private_key.password = NULL;
+       policy_private_key.extractable = true;
+       
+       policy_public_key.password = NULL;
+       policy_public_key.extractable = true;
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       int nRetVal = ckmc_create_key_pair_dsa(size, pszPrivate_key_alias, pszPublic_key_alias, policy_private_key, policy_public_key);//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_create_key_pair_dsa on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "ckmc_create_key_pair_dsa", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_create_key_pair_dsa", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_create_key_pair_dsa", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Creates ECDSA private/public key pair and stores them inside key manager based on each policy.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_create_key_pair_ecdsa_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Creates ECDSA private/public key pair and stores them inside key manager based on each policy
+ * @scenario                           Creates ECDSA private/public key pair and stores them inside key manager based on each policy
+ * @apicovered                         ckmc_create_key_pair_ecdsa
+ * @passcase                           When ckmc_create_key_pair_ecdsa API return 0
+ * @failcase                           If ckmc_create_key_pair_ecdsa API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_create_key_pair_ecdsa_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       ckmc_ec_type_e ectype = CKMC_EC_PRIME192V1;
+       const char *pszPrivate_key_alias = "ecdsa-test-1";
+       const char *pszPublic_key_alias = "ecdsa-test-2";
+       ckmc_policy_s policy_private_key;
+       ckmc_policy_s policy_public_key;
+
+       policy_private_key.password = NULL;
+       policy_private_key.extractable = false;
+       
+       policy_public_key.password = NULL;
+       policy_public_key.extractable = true;
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       int nRetVal = ckmc_create_key_pair_ecdsa(ectype, pszPrivate_key_alias, pszPublic_key_alias, policy_private_key, policy_public_key);//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_create_key_pair_ecdsa on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "ckmc_create_key_pair_ecdsa", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_create_key_pair_ecdsa", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_create_key_pair_ecdsa", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Creates and verify ECDSA private/public key pair and stores them inside key manager based on each policy.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_create_verify_signature_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Creates ECDSA private/public key pair and stores them inside key manager based on each policy
+ * @scenario                           Creates ECDSA private/public key pair and stores them inside key manager based on each policy
+ * @apicovered                         ckmc_create_signature
+ * @passcase                           When ckmc_create_signature API return 0
+ * @failcase                           If ckmc_create_signature API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_create_verify_signature_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       char *pszSpeedLogVerify = NULL;
+       int nFailCount1 = 0;
+       int nFailCount2 = 0;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+               pszSpeedLogVerify =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       char* pszMessage = "message test";
+
+       ckmc_raw_buffer_s msg_buff;
+       msg_buff.data = (unsigned char*) pszMessage;
+       msg_buff.size = strlen(pszMessage);
+
+       const char *pszPri_alias = "create_signature_p_pri_alias";
+       const char *pszPub_alias = "create_signature_p_pub_alias";
+       char *pszKey_passwd = NULL;
+       char *pszPri_passwd = NULL;
+       char *pszPub_passwd = NULL;
+
+       ckmc_hash_algo_e hash_algo = CKMC_HASH_SHA256;
+       ckmc_rsa_padding_algo_e pad_algo = CKMC_PKCS1_PADDING;
+       ckmc_raw_buffer_s *signature;
+
+       ckmc_cert_s cert;
+       cert.raw_cert = (unsigned char *) CRY_CERT;
+       cert.cert_size = strlen(CRY_CERT);
+       cert.data_format = CKMC_FORM_PEM;
+
+       ckmc_policy_s certpolicy;
+       certpolicy.password = pszPub_passwd;
+       certpolicy.extractable = true;
+       
+       ckmc_key_s prikey;
+       prikey.raw_key = (unsigned char *) CRY_RSA_PRI_KEY;
+       prikey.key_size = strlen(CRY_RSA_PRI_KEY);
+       prikey.key_type = CKMC_KEY_NONE;
+       prikey.password = pszKey_passwd;
+
+       ckmc_policy_s pripolicy;
+       pripolicy.password = pszPri_passwd;
+       pripolicy.extractable = false;
+       
+       ckmc_save_cert(pszPub_alias, cert, certpolicy);
+       ckmc_save_key(pszPri_alias, prikey, pripolicy);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               int nRetVal = ckmc_create_signature(
+                                       pszPri_alias,
+                                       pszPri_passwd,
+                                       msg_buff,
+                                       hash_algo,
+                                       pad_algo,
+                                       &signature);//target api
+
+               KeyMngrExecutionDelay(pszSpeedLog);
+               
+
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_create_signature on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount1++;
+                       continue;
+               }
+
+               KeyMngrGetTimeOfDay();
+               nRetVal = ckmc_verify_signature(
+                                       pszPub_alias,
+                                       pszPub_passwd,
+                                       msg_buff,
+                                       *signature,
+                                       hash_algo,
+                                       pad_algo);
+               KeyMngrExecutionDelay(pszSpeedLogVerify);
+
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_verify_signature on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount2++;
+                       continue;
+               }
+
+               KeyMngrGetMemStatus(pszMemLog);
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nFailCount1,nFailCount2,  "ckmc_create_signature","ckmc_verify_signature", pszMemLog, pszSpeedLogVerify, pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_create_signature", pszSpeedLog);
+       PRINT_SPEED_LOG("ckmc_verify_signature", pszSpeedLogVerify);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_create_verify_signature", pszMemLog);
+#endif
+               
+               FREE_MEMORY_3ARGS(pszSpeedLog, pszSpeedLogVerify, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Verifies a certificate chain and return that chain.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_get_cert_chain_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Verifies a certificate chain and return that chain
+ * @scenario                           Verifies a certificate chain and return that chain
+ * @apicovered                         ckmc_get_cert_chain
+ * @passcase                           When ckmc_get_cert_chain API return 0
+ * @failcase                           If ckmc_get_cert_chain API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_get_cert_chain_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       ckmc_cert_s c_cert;
+       ckmc_cert_s c_cert1;
+       ckmc_cert_list_s untrustedcerts;
+       
+       c_cert.raw_cert = (unsigned char *) CERT_CHAIN1;
+       c_cert.cert_size = strlen(CERT_CHAIN1);
+       c_cert.data_format = CKMC_FORM_PEM;
+
+       c_cert1.raw_cert = (unsigned char *) CERT_CHAIN2;
+       c_cert1.cert_size = strlen(CERT_CHAIN2);
+       c_cert1.data_format = CKMC_FORM_PEM;
+
+       untrustedcerts.cert = &c_cert1;
+       untrustedcerts.next = NULL;
+
+       ckmc_cert_list_s *cert_chain_list;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               int nRetVal = ckmc_get_cert_chain(&c_cert, &untrustedcerts, &cert_chain_list);//target api
+               KeyMngrExecutionDelay(pszSpeedLog);
+               KeyMngrGetMemStatus(pszMemLog);
+
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_get_cert_chain on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "ckmc_get_cert_chain", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_get_cert_chain", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_get_cert_chain", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Verifies a certificate chain using a alias list of untrusted certificates and return that chain.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_get_cert_chain_with_alias_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Verifies a certificate chain using a alias list of untrusted certificates and return that chain
+ * @scenario                           Verifies a certificate chain using a alias list of untrusted certificates and return that chain
+ * @apicovered                         ckmc_get_cert_chain_with_alias
+ * @passcase                           When ckmc_get_cert_chain_with_alias API return 0
+ * @failcase                           If ckmc_get_cert_chain_with_alias API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_get_cert_chain_with_alias_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal  = -1;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       
+       //precondition
+       ckmc_cert_s c_cert, c_cert1;
+       ckmc_policy_s cert_policy;
+       char* policy_password = NULL;
+
+       c_cert.raw_cert = (unsigned char *) CERT_CHAIN1;
+       c_cert.cert_size = strlen(CERT_CHAIN1);
+       c_cert.data_format = CKMC_FORM_PEM;
+
+       cert_policy.password = policy_password;
+       cert_policy.extractable = true;
+       
+       c_cert1.raw_cert = (unsigned char *) CERT_CHAIN2;
+       c_cert1.cert_size = strlen(CERT_CHAIN2);
+       c_cert1.data_format = CKMC_FORM_PEM;
+
+       int nRetVal1 = ckmc_save_cert("cert_untrusted", c_cert1, cert_policy);
+
+       //int nRetVal1 = ckmc_save_cert("cert_test1", c_cert, cert_policy);
+       //int nRetVal2 = ckmc_save_cert("cert_test2", c_cert, cert_policy);
+       //int nRetVal3 = ckmc_save_cert("cert_test3", c_cert, cert_policy);
+
+
+       if(nRetVal1 != CKMC_ERROR_NONE/* || nRetVal2 != CKMC_ERROR_NONE || nRetVal3 != CKMC_ERROR_NONE*/)
+       {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed to  to execute ckmc_save_cert\n, error returned = %s ", __LINE__, (char *)KeyMngrGetError(nRetVal));
+                       return 1;
+       }
+       
+       //ckmc_cert_list_s *cert_chain_list;
+       ckmc_alias_list_s* cert_chain_list = NULL;
+       ckmc_cert_list_s *pcert_chain_list = NULL;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               nRetVal = ckmc_get_cert_alias_list(&cert_chain_list);
+
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed to get ckmc_get_cert_alias_list\n, error returned = %s ", __LINE__, (char *)KeyMngrGetError(nRetVal));
+                       continue;
+               }
+
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               nRetVal = ckmc_get_cert_chain_with_alias(&c_cert, cert_chain_list, &pcert_chain_list);//target api
+               KeyMngrExecutionDelay(pszSpeedLog);
+               KeyMngrGetMemStatus(pszMemLog);
+
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       //ckmc_cert_list_all_free(cert_chain_list);
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_get_cert_chain_with_alias on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+
+               ////free
+               //ckmc_cert_list_s *current;
+               //ckmc_cert_list_s *next = cert_chain_list;
+
+               //do{
+               //      current = next;
+               //      next = current->next;
+               //      ckmc_cert_list_all_free(current);
+               //} while(next != NULL);
+
+               ckmc_cert_list_all_free(pcert_chain_list);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "ckmc_get_cert_chain_with_alias", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_get_cert_chain_with_alias", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_get_cert_chain_with_alias", pszMemLog);
+#endif
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Destroys the ckmc_key_s handle and releases all its resources.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_key_free_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Destroys the ckmc_key_s handle and releases all its resources
+ * @scenario                           Destroys the ckmc_key_s handle and releases all its resources
+ * @apicovered                         ckmc_key_free
+ * @passcase                           When ckmc_key_free API return 0
+ * @failcase                           If ckmc_key_free returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_key_free_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal =  -1;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       ckmc_key_s *pPrivate_key = NULL;
+       ckmc_cert_s *pCert = NULL;
+       ckmc_cert_list_s *ca_cert_list = NULL;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               //precondition
+               LoadPkcs12(&pPrivate_key, &pCert, &ca_cert_list,&nRetVal);
+               if(pPrivate_key == NULL || pCert == NULL || ca_cert_list == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed for api ckmc_key_free  on iteration%d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               ckmc_key_free(pPrivate_key);;//target api
+               KeyMngrExecutionDelay(pszSpeedLog);
+               KeyMngrGetMemStatus(pszMemLog);
+
+
+               ckmc_cert_free(pCert);
+               ckmc_cert_list_all_free(ca_cert_list);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "ckmc_key_free", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_key_free", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_key_free", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Destroys the ckmc_raw_buffer_s handle and releases all its resources.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_buffer_free_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Destroys the ckmc_raw_buffer_s handle and releases all its resources
+ * @scenario                           Destroys the ckmc_raw_buffer_s handle and releases all its resources
+ * @apicovered                         ckmc_buffer_free
+ * @passcase                           When ckmc_buffer_free API return 0
+ * @failcase                           If ckmc_buffer_free API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_buffer_free_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal =  -1;
+
+       const char *pszAlias = "AliasSaveData1";
+       char *pszPassword = NULL;
+       
+       //precondition
+       SaveData(pszAlias,&nRetVal);
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed to  to execute ITc_ckmc_buffer_free_p on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       ckmc_raw_buffer_s *pData = NULL;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               //precondition
+               nRetVal = ckmc_get_data(pszAlias, pszPassword, &pData);
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed for api ckmc_get_data on iteration%d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               ckmc_buffer_free(pData);//target api
+               KeyMngrExecutionDelay(pszSpeedLog);
+               KeyMngrGetMemStatus(pszMemLog);
+       }
+       RemoveData(pszAlias);
+       VALIDATE_RESULT_API(nFailCount, "ckmc_buffer_free", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_buffer_free", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_buffer_free", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Destroys the ckmc_cert handle and releases all its resources.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_cert_free_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Destroys the ckmc_cert handle and releases all its resources
+ * @scenario                           Destroys the ckmc_cert handle and releases all its resources
+ * @apicovered                         ckmc_cert_free
+ * @passcase                           When ckmc_cert_free API return 0
+ * @failcase                           If ckmc_cert_free returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA 
+ */
+int ITc_ckmc_cert_free_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal =  -1;
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       ckmc_key_s *pPrivate_key = NULL;
+       ckmc_cert_s *pCert = NULL;
+       ckmc_cert_list_s *ca_cert_list = NULL;
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               //precondition
+               LoadPkcs12(&pPrivate_key, &pCert, &ca_cert_list,&nRetVal);
+               if(pPrivate_key == NULL || pCert == NULL || ca_cert_list == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed for api ckmc_cert_free  on iteration%d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               ckmc_cert_free(pCert);;//target api
+               KeyMngrExecutionDelay(pszSpeedLog);
+               KeyMngrGetMemStatus(pszMemLog);
+
+               ckmc_key_free(pPrivate_key);
+               ckmc_cert_list_all_free(ca_cert_list);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "ckmc_cert_free", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_cert_free", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_cert_free", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Creates a new ckmc_cert_s handle and returns it.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_load_cert_from_file_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Creates a new ckmc_cert_s handle and returns it
+ * @scenario                           Creates a new ckmc_cert_s handle and returns it
+ * @apicovered                         ckmc_load_cert_from_file
+ * @passcase                           When ckmc_load_cert_from_file API return 0
+ * @failcase                           If ckmc_load_cert_from_file API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_load_cert_from_file_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal =  -1;
+
+       //const char *pszFilePath = PATH; //only DER or PEM encoded certificate file is supported
+       char szPath[PATH_LEN] = {0,};
+       if(false == KeyManagerAppendToAppDataPath(PATH, szPath))
+       {
+               FPRINTF( "[Line : %d] [Key-Manager_ITc] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       ckmc_cert_s *pCert;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               nRetVal = ckmc_load_cert_from_file(szPath, &pCert);;//target api
+               KeyMngrExecutionDelay(pszSpeedLog);
+               KeyMngrGetMemStatus(pszMemLog);
+
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_load_cert_from_file on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+               ckmc_cert_free(pCert);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "ckmc_load_cert_from_file", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_load_cert_from_file", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_load_cert_from_file", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Creates a new ckmc_key_s(private key), ckmc_cert_s(certificate), and ckmc_cert_list_s(CA certificates) handle from a given PKCS#12 file and returns them.
+//& type: auto
+/**
+sr * @testcase                                 ITc_ckmc_load_from_pkcs12_file_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Creates a new ckmc_key_s(private key), ckmc_cert_s(certificate), and ckmc_cert_list_s(CA certificates) handle from a given PKCS#12 file and returns them
+ * @scenario                           Creates a new ckmc_key_s(private key), ckmc_cert_s(certificate), and ckmc_cert_list_s(CA certificates)
+ * @apicovered                         ckmc_load_from_pkcs12_file
+ * @passcase                           When ckmc_load_from_pkcs12_file API return 0
+ * @failcase                           If ckmc_load_from_pkcs12_file returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA 
+ */
+int ITc_ckmc_load_from_pkcs12_file_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal =  -1;
+
+       char pszFilePath[PATH_LEN] = {0,};
+       if(false == KeyManagerAppendToAppDataPath(PATHPFX, pszFilePath))
+       {
+               FPRINTF( "[Line : %d] [Key-Manager_ITc] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       ckmc_key_s *pPrivate_key = NULL;
+       ckmc_cert_s *pCert = NULL;
+       ckmc_cert_list_s *ca_cert_list = NULL;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               nRetVal = ckmc_load_from_pkcs12_file(pszFilePath, PASSPHRASEPFX, &pPrivate_key, &pCert, &ca_cert_list);;//target api
+               KeyMngrExecutionDelay(pszSpeedLog);
+               KeyMngrGetMemStatus(pszMemLog);
+
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_load_from_pkcs12_file on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+               ckmc_key_free(pPrivate_key);
+               ckmc_cert_free(pCert);
+               ckmc_cert_list_all_free(ca_cert_list);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "ckmc_load_from_pkcs12_file", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_load_from_pkcs12_file", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_load_from_pkcs12_file", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Destroys the ckmc_alias_list_s handle and releases all its resources from the provided first handle cascadingly.
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_alias_list_all_free_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Destroys the ckmc_alias_list_s handle and releases all its resources from the provided first handle cascadingly.
+ * @scenario                           Destroys the ckmc_alias_list_s handle and releases all its resources
+ * @apicovered                         ckmc_alias_list_all_free
+ * @passcase                           When ckmc_alias_list_all_free API return 0
+ * @failcase                           If ckmc_alias_list_all_free API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_alias_list_all_free_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal =  -1;
+
+       char* pszAlias1 = "Alias1";
+       char* pszAlias2 = "Alias2";
+
+       //precondition start
+       SaveKey(pszAlias1, &nRetVal);
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition1 failed to get ITc_ckmc_alias_list_all_free_p on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+
+       }
+
+       SaveKey(pszAlias2, &nRetVal);
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition2 failed to get  ITc_ckmc_alias_list_all_free_p on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+       }
+       //precondition end
+       
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               //precondition
+                ckmc_alias_list_s *ppAlias_list = NULL;
+                nRetVal = ckmc_get_key_alias_list      (&ppAlias_list);;//target api
+
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed for api ckmc_alias_list_all_free  on iteration%d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               ckmc_alias_list_all_free(ppAlias_list);;//target api
+               KeyMngrExecutionDelay(pszSpeedLog);
+               KeyMngrGetMemStatus(pszMemLog);
+
+       }
+
+       RemoveKey(pszAlias1);
+       RemoveKey(pszAlias2);
+
+       VALIDATE_RESULT_API(nFailCount, "ckmc_alias_list_all_free", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_alias_list_all_free", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_alias_list_all_free", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose:  Destroys the ckmc_cert_list_s handle and releases all its resources 
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_cert_list_all_free_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Destroys the ckmc_cert_list_s handle and releases all its resources
+ * @scenario                           Destroys the ckmc_cert_list_s handle and releases all its resources
+ * @apicovered                         ckmc_cert_list_all_free
+ * @passcase                           When ckmc_cert_list_all_free API return 0
+ * @failcase                           If ckmc_cert_list_all_free API returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA 
+ */
+int ITc_ckmc_cert_list_all_free_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal =  -1;
+
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       ckmc_key_s *pPrivate_key = NULL;
+       ckmc_cert_s *pCert = NULL;
+       ckmc_cert_list_s *ca_cert_list = NULL;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               //precondition
+               LoadPkcs12(&pPrivate_key, &pCert, &ca_cert_list,&nRetVal);
+               if(pPrivate_key == NULL || pCert == NULL || ca_cert_list == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed for api ckmc_load_from_pkcs12_file on iteration%d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+
+               KeyMngrGetMemAllocation();
+
+               KeyMngrGetTimeOfDay();
+               ckmc_cert_list_all_free(ca_cert_list);//target api
+               KeyMngrExecutionDelay(pszSpeedLog);
+               KeyMngrGetMemStatus(pszMemLog);
+
+               if(nRetVal != CKMC_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to execute ckmc_cert_list_all_free on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+               ckmc_key_free(pPrivate_key);
+               ckmc_cert_free(pCert);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "ckmc_cert_list_all_free", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_cert_list_all_free", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_cert_list_all_free", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Allows and Revokes another application to access client's application data
+//& type: auto
+/**
+ * @testcase                           ITc_ckmc_allow_deny_access_p
+ * @since_tizen                        2.3
+ * @type                                       auto
+ * @description                                Allows and Revokes another application to access client's application data
+ * @scenario                           Allows and Revokes another application to access client's application data
+ * @apicovered                         ckmc_allow_access, ckmc_deny_access
+ * @passcase                           When ckmc_allow_access and  ckmc_deny_access api return 0
+ * @failcase                           If ckmc_allow_access or  ckmc_deny_access returns non zero value
+ * @precondition                       User must be already logged in and his user key is already loaded into memory in plain text form
+ * @postcondition                      NA
+ */
+int ITc_ckmc_allow_deny_access_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       char *pszSpeedLogDeny = NULL;
+       int nFailCount1 = 0;
+       int nFailCount2 = 0;
+
+       //precondition
+       int nRetVal = 0;
+       const char *pszAlias = "AliasSaveData";
+       SaveData(pszAlias,&nRetVal);
+       if(nRetVal != CKMC_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Precondition failed to  to execute ITc_ckmc_allow_deny_access_p on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+               return 1;
+       }
+
+       int arEnums[] = {CKMC_AR_READ, CKMC_AR_READ_REMOVE};
+       int nEnumSize = sizeof(arEnums) / sizeof(int); 
+
+#if MEMORY_CHECK
+               pszMemLog = calloc(MEMLOG * MAX_COUNT  *nEnumSize , sizeof(char));
+#endif
+#if SPEED_CHECK
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT * nEnumSize , sizeof(char));
+               pszSpeedLogDeny =  calloc(TIMELOG * MAX_COUNT * nEnumSize , sizeof(char));
+#endif
+
+       ckmc_access_right_e granted;
+       const char *szAccessorPkgId = "0";
+       int nEnum = 0;
+       
+       for(nEnum = 0; nEnum < nEnumSize ; ++nEnum)
+       {
+               granted = arEnums[nEnum];
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+
+                       KeyMngrGetMemAllocation();
+
+                       KeyMngrGetTimeOfDay();
+                       int nRetVal = ckmc_allow_access(pszAlias,szAccessorPkgId,granted);//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_allow_access on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount1++;
+                               continue;
+                       }
+
+                       KeyMngrGetTimeOfDay();
+                       nRetVal = ckmc_deny_access(pszAlias,szAccessorPkgId);//target api
+                       KeyMngrExecutionDelay(pszSpeedLog);
+
+                       KeyMngrGetMemStatus(pszMemLog);
+
+                       if(nRetVal != CKMC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_deny_access on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)KeyMngrGetError(nRetVal));
+                               nFailCount2++;
+                               continue;
+                       }
+
+               }
+       }
+       ckmc_remove_data(pszAlias);
+       VALIDATE_RESULT_PAIRAPI(nFailCount1,nFailCount2,  "ckmc_allow_access","ckmc_deny_access", pszMemLog, pszSpeedLogDeny, pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("ckmc_allow_access", pszSpeedLog);
+       PRINT_SPEED_LOG("ckmc_deny_access", pszSpeedLogDeny);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("ckmc_allow_deny_access", pszMemLog);
+#endif
+               
+       FREE_MEMORY_3ARGS(pszSpeedLog, pszSpeedLogDeny, pszMemLog);
+
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/key-manager/certificate.crt b/src/itc/key-manager/certificate.crt
new file mode 100755 (executable)
index 0000000..6e51389
--- /dev/null
@@ -0,0 +1,4190 @@
+-----BEGIN CERTIFICATE-----
+MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
+MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
+IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
+MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
+FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
+bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
+dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
+H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
+uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
+mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
+a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
+E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
+WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
+VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
+Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
+cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
+IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
+AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
+YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
+6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
+Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
+c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
+mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEU
+MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
+b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMw
+MTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
+QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYD
+VQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUA
+A4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ul
+CDtbKRY654eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6n
+tGO0/7Gcrjyvd7ZWxbWroulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyl
+dI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1Zmne3yzxbrww2ywkEtvrNTVokMsAsJch
+PXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJuiGMx1I4S+6+JNM3GOGvDC
++Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8wHQYDVR0O
+BBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8E
+BTADAQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBl
+MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFk
+ZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENB
+IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxtZBsfzQ3duQH6lmM0MkhHma6X
+7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0PhiVYrqW9yTkkz
+43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY
+eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJl
+pz/+0WatC7xrmYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOA
+WiFeIc9TVPC6b4nbqKqVz4vjccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEU
+MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
+b3JrMSAwHgYDVQQDExdBZGRUcnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAx
+MDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtB
+ZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIDAeBgNV
+BAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEA6Rowj4OIFMEg2Dybjxt+A3S72mnTRqX4jsIMEZBRpS9mVEBV
+6tsfSlbunyNu9DnLoblv8n75XYcmYZ4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nX
+GCwwfQ56HmIexkvA/X1id9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnP
+dzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSGAa2Il+tmzV7R/9x98oTaunet3IAIx6eH
+1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAwHM+A+WD+eeSI8t0A65RF
+62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0GA1UdDgQW
+BBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUw
+AwEB/zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDEL
+MAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRU
+cnVzdCBUVFAgTmV0d29yazEgMB4GA1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJv
+b3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4JNojVhaTdt02KLmuG7jD8WS6
+IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL+YPoRNWyQSW/
+iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
+GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh
+4SINhwBk/ox9Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQm
+XiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEU
+MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
+b3JrMSMwIQYDVQQDExpBZGRUcnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1
+MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcxCzAJBgNVBAYTAlNFMRQwEgYDVQQK
+EwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIzAh
+BgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwq
+xBb/4Oxx64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G
+87B4pfYOQnrjfxvM0PC3KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i
+2O+tCBGaKZnhqkRFmhJePp1tUvznoD1oL/BLcHwTOK28FSXx1s6rosAx1i+f4P8U
+WfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GRwVY18BTcZTYJbqukB8c1
+0cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HUMIHRMB0G
+A1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0T
+AQH/BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6Fr
+pGkwZzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQL
+ExRBZGRUcnVzdCBUVFAgTmV0d29yazEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlm
+aWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBABmrder4i2VhlRO6aQTv
+hsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxGGuoYQ992zPlm
+hpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X
+dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3
+P6CxB9bpT9zeRXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9Y
+iQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5no
+xqE=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc
+MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP
+bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2
+MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft
+ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lk
+hsmj76CGv2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym
+1BW32J/X3HGrfpq/m44zDyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsW
+OqMFf6Dch9Wc/HKpoH145LcxVR5lu9RhsCFg7RAycsWSJR74kEoYeEfffjA3PlAb
+2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP8c9GsEsPPt2IYriMqQko
+O3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0TAQH/BAUw
+AwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAU
+AK3Zo/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
+BQUAA4IBAQB8itEfGDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkF
+Zu90821fnZmv9ov761KyBZiibyrFVL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAb
+LjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft3OJvx8Fi8eNy1gTIdGcL+oir
+oQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43gKd8hdIaC2y+C
+MMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds
+sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc
+MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP
+bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2
+MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft
+ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP
+ADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU3dxgz6sWYFas14tNwC
+206B89enfHG8dWOgXeMHDEjsJcQDIPT/DjsS/5uN4cbVG7RtIuOx238hZK+GvFci
+KtZHgVdEglZTvYYUAQv8f3SkWq7xuhG1m1hagLQ3eAkzfDJHA1zEpYNI9FdWboE2
+JxhP7JsowtS013wMPgwr38oE18aO6lhOqKSlGBxsRZijQdEt0sdtjRnxrXm3gT+9
+BoInLRBYBbV4Bbkv2wxrkJB+FFk4u5QkE+XRnRTf04JNRvCAOVIyD+OEsnpD8l7e
+Xz8d3eOyG6ChKiMDbi4BFYdcpnV1x5dhvt6G3NRI270qv0pV2uh9UPu0gBe4lL8B
+PeraunzgWGcXuVjgiIZGZ2ydEEdYMtA1fHkqkKJaEBEjNa0vzORKW6fIJ/KD3l67
+Xnfn6KVuY8INXWHQjNJsWiEOyiijzirplcdIz5ZvHZIlyMbGwcEMBawmxNJ10uEq
+Z8A9W6Wa6897GqidFEXlD6CaZd4vKL3Ob5Rmg0gp2OpljK+T2WSfVVcmv2/LNzGZ
+o2C7HK2JNDJiuEMhBnIMoVxtRsX6Kc8w3onccVvdtjc+31D1uAclJuW8tf48ArO3
++L5DwYcRlJ4jbBeKuIonDFRH8KmzwICMoCfrHRnjB453cMor9H124HhnAgMBAAGj
+YzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFE1FwWg4u3OpaaEg5+31IqEj
+FNeeMB8GA1UdIwQYMBaAFE1FwWg4u3OpaaEg5+31IqEjFNeeMA4GA1UdDwEB/wQE
+AwIBhjANBgkqhkiG9w0BAQUFAAOCAgEAZ2sGuV9FOypLM7PmG2tZTiLMubekJcmn
+xPBUlgtk87FYT15R/LKXeydlwuXK5w0MJXti4/qftIe3RUavg6WXSIylvfEWK5t2
+LHo1YGwRgJfMqZJS5ivmae2p+DYtLHe/YUjRYwu5W1LtGLBDQiKmsXeu3mnFzccc
+obGlHBD7GL4acN3Bkku+KVqdPzW+5X1R+FXgJXUjhx5c3LqdsKyzadsXg8n33gy8
+CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//ZoyzH1kUQ7rVyZ2OuMe
+IjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgOZtMA
+DjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2F
+AjgQ5ANh1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUX
+Om/9riW99XJZZLF0KjhfGEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPb
+AZO1XB4Y3WRayhgoPmMEEf0cjQAPuDffZ4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQl
+Zvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuPcX/9XhmgD0uRuMRUvAaw
+RY8mkaKO/qk=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
+RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD
+VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX
+DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y
+ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy
+VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr
+mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr
+IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK
+mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu
+XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy
+dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye
+jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1
+BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3
+DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92
+9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx
+jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0
+Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz
+ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS
+R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCB
+gTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
+A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNV
+BAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEyMDEwMDAw
+MDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3Jl
+YXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01P
+RE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3
+UcEbVASY06m/weaKXTuH+7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI
+2GqGd0S7WWaXUF601CxwRM/aN5VCaTwwxHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8
+Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV4EajcNxo2f8ESIl33rXp
++2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA1KGzqSX+
+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5O
+nKVIrLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW
+/zAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6g
+PKA6hjhodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9u
+QXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOCAQEAPpiem/Yb6dc5t3iuHXIY
+SdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CPOGEIqB6BCsAv
+IC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
+RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4
+zJVSk/BwJVmcIGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5dd
+BA6+C4OmF4O5MBKgxTMVBbkN+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IB
+ZQ==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTEL
+MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
+BxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMT
+IkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwMzA2MDAw
+MDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdy
+ZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09N
+T0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSR
+FtSrYpn1PlILBs5BAH+X4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0J
+cfRK9ChQtP6IHG4/bC8vCVlbpVsLM5niwz2J+Wos77LTBumjQjBAMB0GA1UdDgQW
+BBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
+BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VGFAkK+qDm
+fQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdv
+GDeAU/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEn
+MCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQL
+ExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMg
+b2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAxNjEzNDNaFw0zNzA5MzAxNjEzNDRa
+MH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZpcm1hIFNBIENJRiBB
+ODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3JnMSIw
+IAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0B
+AQEFAAOCAQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtb
+unXF/KGIJPov7coISjlUxFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0d
+BmpAPrMMhe5cG3nCYsS4No41XQEMIwRHNaqbYE6gZj3LJgqcQKH0XZi/caulAGgq
+7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jWDA+wWFjbw2Y3npuRVDM3
+0pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFVd9oKDMyX
+roDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIG
+A1UdEwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5j
+aGFtYmVyc2lnbi5vcmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p
+26EpW1eLTXYGduHRooowDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIA
+BzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hhbWJlcnNpZ24ub3JnMCcGA1Ud
+EgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYDVR0gBFEwTzBN
+BgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz
+aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEB
+AAxBl8IahsAifJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZd
+p0AJPaxJRUXcLo0waLIJuvvDL8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi
+1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wNUPf6s+xCX6ndbcj0dc97wXImsQEc
+XCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/nADydb47kMgkdTXg0
+eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1erfu
+tGWaIZDgqtCYvDi1czyL+Nw=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEn
+MCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQL
+ExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENo
+YW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYxNDE4WhcNMzcwOTMwMTYxNDE4WjB9
+MQswCQYDVQQGEwJFVTEnMCUGA1UEChMeQUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgy
+NzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEgMB4G
+A1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwggEgMA0GCSqGSIb3DQEBAQUA
+A4IBDQAwggEIAoIBAQCicKLQn0KuWxfH2H3PFIP8T8mhtxOviteePgQKkotgVvq0
+Mi+ITaFgCPS3CU6gSS9J1tPfnZdan5QEcOw/Wdm3zGaLmFIoCQLfxS+EjXqXd7/s
+QJ0lcqu1PzKY+7e3/HKE5TWH+VX6ox8Oby4o3Wmg2UIQxvi1RMLQQ3/bvOSiPGpV
+eAp3qdjqGTK3L/5cPxvusZjsyq16aUXjlg9V9ubtdepl6DJWk0aJqCWKZQbua795
+B9Dxt6/tLE2Su8CoX6dnfQTyFQhwrJLWfQTSM/tMtgsL+xrJxI0DqX5c8lCrEqWh
+z0hQpe/SyBoT+rB/sYIcd2oPX9wLlY/vQ37mRQklAgEDo4IBUDCCAUwwEgYDVR0T
+AQH/BAgwBgEB/wIBDDA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3JsLmNoYW1i
+ZXJzaWduLm9yZy9jaGFtYmVyc2lnbnJvb3QuY3JsMB0GA1UdDgQWBBRDnDafsJ4w
+TcbOX60Qq+UDpfqpFDAOBgNVHQ8BAf8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgAH
+MCoGA1UdEQQjMCGBH2NoYW1iZXJzaWducm9vdEBjaGFtYmVyc2lnbi5vcmcwKgYD
+VR0SBCMwIYEfY2hhbWJlcnNpZ25yb290QGNoYW1iZXJzaWduLm9yZzBbBgNVHSAE
+VDBSMFAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh
+bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0B
+AQUFAAOCAQEAPDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUM
+bKGKfKX0j//U2K0X1S0E0T9YgOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXi
+ryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJPJ7oKXqJ1/6v/2j1pReQvayZzKWG
+VwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4IBHNfTIzSJRUTN3c
+ecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREest2d/
+AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAw
+PTELMAkGA1UEBhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFz
+cyAyIFByaW1hcnkgQ0EwHhcNOTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9
+MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2VydHBsdXMxGzAZBgNVBAMTEkNsYXNz
+IDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANxQ
+ltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR5aiR
+VhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyL
+kcAbmXuZVg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCd
+EgETjdyAYveVqUSISnFOYFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yas
+H7WLO7dDWWuwJKZtkIvEcupdM5i3y95ee++U8Rs+yskhwcWYAqqi9lt3m/V+llU0
+HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRMECDAGAQH/AgEKMAsGA1Ud
+DwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJYIZIAYb4
+QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMu
+Y29tL0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/
+AN9WM2K191EBkOvDP9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8
+yfFC82x/xXp8HVGIutIKPidd3i1RTtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMR
+FcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+7UCmnYR0ObncHoUW2ikbhiMA
+ybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW//1IMwrh3KWB
+kJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7
+l7+ijrRU
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBM
+MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD
+QTAeFw0wMjA2MTExMDQ2MzlaFw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBM
+MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD
+QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6xwS7TT3zNJc4YPk/E
+jG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdLkKWo
+ePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GI
+ULdtlkIJ89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapu
+Ob7kky/ZR6By6/qmW6/KUz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUg
+AKpoC6EahQGcxEZjgoi2IrHu/qpGWX7PNSzVttpd90gzFFS269lvzs2I1qsb2pY7
+HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEA
+uI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+GXYkHAQa
+TOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTg
+xSvgGrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1q
+CjqTE5s7FCMTY5w/0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5x
+O/fIR/RpbxXyEV6DHpx8Uq79AtoSqFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs
+6GAqm4VKQPNriiTsBhYscw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb
+MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
+GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmlj
+YXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezEL
+MAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
+BwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNVBAMM
+GEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQua
+BtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe
+3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4
+YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZR
+rOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cm
+ez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQU
+oBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
+MAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20v
+QUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29t
+b2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG9w0BAQUF
+AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q
+GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
+Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2
+G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi
+l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3
+smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEb
+MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
+GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRp
+ZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVow
+fjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
+A1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAiBgNV
+BAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEB
+BQADggEPADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPM
+cm3ye5drswfxdySRXyWP9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3S
+HpR7LZQdqnXXs5jLrLxkU0C8j6ysNstcrbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996
+CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rCoznl2yY4rYsK7hljxxwk
+3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3Vp6ea5EQz
+6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNV
+HQ4EFgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1Ud
+EwEB/wQFMAMBAf8wgYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2Rv
+Y2EuY29tL1NlY3VyZUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRw
+Oi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmww
+DQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm4J4oqF7Tt/Q0
+5qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj
+Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtI
+gKvcnDe4IRRLDXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJ
+aD61JlfutuC23bkpgHl9j6PwpCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDl
+izeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1HRR3B7Hzs/Sk=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEb
+MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
+GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0
+aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEwMDAwMDBaFw0yODEyMzEyMzU5NTla
+MH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
+BgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUwIwYD
+VQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWW
+fnJSoBVC21ndZHoa0Lh73TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMt
+TGo87IvDktJTdyR0nAducPy9C1t2ul/y/9c3S0pgePfw+spwtOpZqqPOSC+pw7IL
+fhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6juljatEPmsbS9Is6FARW
+1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsSivnkBbA7
+kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0G
+A1UdDgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYD
+VR0TAQH/BAUwAwEB/zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21v
+ZG9jYS5jb20vVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRo
+dHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENlcnRpZmljYXRlU2VydmljZXMu
+Y3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8NtwuleGFTQQuS9/
+HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32
+pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxIS
+jBc/lDb+XbDABHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+
+xqFx7D+gIIxmOom0jtTYsU0lR+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/Atyjcn
+dBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O9y5Xt5hwXsjEeLBi
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIECTCCAvGgAwIBAgIQDV6ZCtadt3js2AdWO4YV2TANBgkqhkiG9w0BAQUFADBb
+MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3Qx
+ETAPBgNVBAsTCERTVCBBQ0VTMRcwFQYDVQQDEw5EU1QgQUNFUyBDQSBYNjAeFw0w
+MzExMjAyMTE5NThaFw0xNzExMjAyMTE5NThaMFsxCzAJBgNVBAYTAlVTMSAwHgYD
+VQQKExdEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdDERMA8GA1UECxMIRFNUIEFDRVMx
+FzAVBgNVBAMTDkRTVCBBQ0VTIENBIFg2MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAuT31LMmU3HWKlV1j6IR3dma5WZFcRt2SPp/5DgO0PWGSvSMmtWPu
+ktKe1jzIDZBfZIGxqAgNTNj50wUoUrQBJcWVHAx+PhCEdc/BGZFjz+iokYi5Q1K7
+gLFViYsx+tC3dr5BPTCapCIlF3PoHuLTrCq9Wzgh1SpL11V94zpVvddtawJXa+ZH
+fAjIgrrep4c9oW24MFbCswKBXy314powGCi4ZtPLAZZv6opFVdbgnf9nKxcCpk4a
+ahELfrd755jWjHZvwTvbUJN+5dCOHze4vbrGn2zpfDPyMjwmR/onJALJfh1biEIT
+ajV8fTXpLmaRcpPVMibEdPVTo7NdmvYJywIDAQABo4HIMIHFMA8GA1UdEwEB/wQF
+MAMBAf8wDgYDVR0PAQH/BAQDAgHGMB8GA1UdEQQYMBaBFHBraS1vcHNAdHJ1c3Rk
+c3QuY29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjto
+dHRwOi8vd3d3LnRydXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMt
+aW5kZXguaHRtbDAdBgNVHQ4EFgQUCXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZI
+hvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V25FYrnJmQ6AgwbN99Pe7lv7Uk
+QIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6tFr8hlxCBPeP/
+h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq
+nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpR
+rscL9yuwNwXsvFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf2
+9w4LTJxoeHtxMcfrHuBnQfO3oKfN5XozNmr6mis=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
+MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
+DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
+PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
+Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
+rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
+OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
+xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
+7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
+aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
+HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
+SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
+ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
+AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
+R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
+JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
+Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl
+MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
+d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv
+b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl
+cnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwggEi
+MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7c
+JpSIqvTO9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYP
+mDI2dsze3Tyoou9q+yHyUmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+
+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4
+VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpyoeb6pNnVFzF1roV9Iq4/
+AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whfGHdPAgMB
+AAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW
+BBRF66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
+pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRC
+dWKuh+vy1dneVrOfzM4UKLkNl2BcEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTf
+fwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38FnSbNd67IJKusm7Xi+fT8r87cm
+NW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i8b5QZ7dsvfPx
+H2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
++o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh
+MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
+d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD
+QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT
+MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
+b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG
+9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB
+CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97
+nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt
+43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P
+T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4
+gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO
+BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR
+TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw
+DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr
+hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg
+06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF
+PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls
+YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
+CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs
+MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
+d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j
+ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL
+MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3
+LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug
+RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm
++9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW
+PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM
+xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB
+Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3
+hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg
+EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF
+MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA
+FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec
+nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z
+eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF
+hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2
+Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
+vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep
++OkuE6N36B9K
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
+EwhEU1RDQSBFMTAeFw05ODEyMTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJ
+BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
+ETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQCg
+bIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJENySZ
+j9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlV
+Sn5JTe2io74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCG
+SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx
+JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI
+RFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMTAxODEw
+MjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFGp5
+fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i
++DAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG
+SIb3DQEBBQUAA4GBACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lN
+QseSJqBcNJo4cvj9axY+IO6CizEqkzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+
+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4RbyhkwS7hp86W0N6w4pl
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJV
+UzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQL
+EwhEU1RDQSBFMjAeFw05ODEyMDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJ
+BgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4x
+ETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQC/
+k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGODVvso
+LeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3o
+TQPMx7JSxhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCG
+SAGG+EIBAQQEAwIABzBoBgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMx
+JDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0dXJlIFRydXN0IENvLjERMA8GA1UECxMI
+RFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQwIoAPMTk5ODEyMDkxOTE3
+MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQYMBaAFB6C
+TShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5
+WzAMBgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqG
+SIb3DQEBBQUAA4GBAEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHR
+xdf0CiUPPXiBng+xZ8SQTGPdXqfiup/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVL
+B3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1mPnHfxsb1gYgAlihw6ID
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
+RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp
+bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5
+IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0yOTA3
+MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3
+LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp
+YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG
+A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQq
+K0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQe
+sYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuX
+MlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVT
+XTzWnLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/
+HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH
+4QIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNV
+HQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJKoZIhvcNAQEFBQADggEBADub
+j1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPyT/4xmf3IDExo
+U8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf
+zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5b
+u/8j72gZyxKTJ1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+
+bYQLCIt+jerXmCHG8+c8eS9enNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/Er
+fF6adulZkMV8gzURZVE=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
+VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
+ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc
+KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u
+ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1
+MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE
+ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j
+b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF
+bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg
+U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA
+A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/
+I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3
+wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC
+AdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb
+oIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5
+BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p
+dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk
+MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp
+b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
+dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0
+MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi
+E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa
+MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI
+hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN
+95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd
+2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMC
+VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0
+Lm5ldC9DUFMgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW
+KGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsGA1UEAxMkRW50cnVzdCBSb290IENl
+cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0MloXDTI2MTEyNzIw
+NTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMTkw
+NwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSBy
+ZWZlcmVuY2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNV
+BAMTJEVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJ
+KoZIhvcNAQEBBQADggEPADCCAQoCggEBALaVtkNC+sZtKm9I35RMOVcF7sN5EUFo
+Nu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYszA9u3g3s+IIRe7bJWKKf4
+4LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOwwCj0Yzfv9
+KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGI
+rb68j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi
+94DkZfs0Nw4pgHBNrziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOB
+sDCBrTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAi
+gA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1MzQyWjAfBgNVHSMEGDAWgBRo
+kORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DHhmak8fdLQ/uE
+vW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA
+A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9t
+O1KzKtvn1ISMY/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6Zua
+AGAT/3B+XxFNSRuzFVJ7yVTav52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP
+9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTSW3iDVuycNsMm4hH2Z0kdkquM++v/
+eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0tHuu2guQOHXvgR1m
+0vdXcDazv/wor3ElhVsT/h5/WrQ8
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
+UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
+MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
+dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
+BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
+cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
+AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
+MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
+ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
+IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
+MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
+A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
+7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
+1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEc
+MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBT
+ZWN1cmUgR2xvYmFsIGVCdXNpbmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIw
+MDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0VxdWlmYXggU2Vj
+dXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEdsb2JhbCBlQnVzaW5l
+c3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRVPEnC
+UdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc
+58O/gGzNqfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/
+o5brhTMhHD4ePmBudpxnhcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAH
+MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUvqigdHJQa0S3ySPY+6j/s1dr
+aGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hsMA0GCSqGSIb3DQEBBAUA
+A4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okENI7SS+RkA
+Z70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv
+8qIYNMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEc
+MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBT
+ZWN1cmUgZUJ1c2luZXNzIENBLTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQw
+MDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5j
+LjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENBLTEwgZ8wDQYJ
+KoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ1MRo
+RvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBu
+WqDZQu4aIZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKw
+Env+j6YDAgMBAAGjZjBkMBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTAD
+AQH/MB8GA1UdIwQYMBaAFEp4MlIR21kWNl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRK
+eDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQFAAOBgQB1W6ibAxHm6VZM
+zfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5lSE/9dR+
+WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN
+/Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEVzCCAz+gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBnTELMAkGA1UEBhMCRVMx
+IjAgBgNVBAcTGUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1
+dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
+MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FAZmlybWFwcm9mZXNpb25hbC5jb20w
+HhcNMDExMDI0MjIwMDAwWhcNMTMxMDI0MjIwMDAwWjCBnTELMAkGA1UEBhMCRVMx
+IjAgBgNVBAcTGUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1
+dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
+MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FAZmlybWFwcm9mZXNpb25hbC5jb20w
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDnIwNvbyOlXnjOlSztlB5u
+Cp4Bx+ow0Syd3Tfom5h5VtP8c9/Qit5Vj1H5WuretXDE7aTt/6MNbg9kUDGvASdY
+rv5sp0ovFy3Tc9UTHI9ZpTQsHVQERc1ouKDAA6XPhUJHlShbz++AbOCQl4oBPB3z
+hxAwJkh91/zpnZFx/0GaqUC1N5wpIE8fUuOgfRNtVLcK3ulqTgesrBlf3H5idPay
+BQC6haD9HThuy1q7hryUZzM1gywfI834yJFxzJeL764P3CkDG8A563DtwW4O2GcL
+iam8NeTvtjS0pbbELaW+0MOUJEjb35bTALVmGotmBQ/dPz/LP6pemkr4tErvlTcb
+AgMBAAGjgZ8wgZwwKgYDVR0RBCMwIYYfaHR0cDovL3d3dy5maXJtYXByb2Zlc2lv
+bmFsLmNvbTASBgNVHRMBAf8ECDAGAQH/AgEBMCsGA1UdEAQkMCKADzIwMDExMDI0
+MjIwMDAwWoEPMjAxMzEwMjQyMjAwMDBaMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4E
+FgQUMwugZtHq2s7eYpMEKFK1FH84aLcwDQYJKoZIhvcNAQEFBQADggEBAEdz/o0n
+VPD11HecJ3lXV7cVVuzH2Fi3AQL0M+2TUIiefEaxvT8Ub/GzR0iLjJcG1+p+o1wq
+u00vR+L4OQbJnC4xGgN49Lw4xiKLMzHwFgQEffl25EvXwOaD7FnMP97/T2u3Z36m
+hoEyIwOdyPdfwUpgpZKpsaSgYMN4h7Mi8yrrW6ntBas3D7Hi05V2Y1Z0jFhyGzfl
+ZKG+TQyTmAyX9odtsz/ny4Cm7YjHX1BiAuiZdBbQ5rQ58SfLyEDW44YQqSMSkuBp
+QWOnryULwMWSyx6Yo1q6xTMPoJcB3X/ge9YGVM+h4k0460tQtcsm9MracEpqoeJ5
+quGnM/b9Sh/22WA=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD
+VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
+bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv
+b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
+UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
+cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
+b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
+iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
+r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
+04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
+GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
+3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
+lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
+MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
+YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
+EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
+R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
+9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
+fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
+iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
+1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
+bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
+MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
+ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
+uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
+Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
+tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
+PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
+hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
+5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEW
+MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFs
+IENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMTkwMzA0MDUwMDAwWjBEMQswCQYDVQQG
+EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3Qg
+R2xvYmFsIENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDvPE1A
+PRDfO1MA4Wf+lGAVPoWI8YkNkMgoI5kF6CsgncbzYEbYwbLVjDHZ3CB5JIG/NTL8
+Y2nbsSpr7iFY8gjpeMtvy/wWUsiRxP89c96xPqfCfWbB9X5SJBri1WeR0IIQ13hL
+TytCOb1kLUCgsBDTOEhGiKEMuzozKmKY+wCdE1l/bztyqu6mD4b5BWHqZ38MN5aL
+5mkWRxHCJ1kDs6ZgwiFAVvqgx306E+PsV8ez1q6diYD3Aecs9pYrEw15LNnA5IZ7
+S4wMcoKK+xfNAGw6EzywhIdLFnopsk/bHdQL82Y3vdj2V7teJHq4PIu5+pIaGoSe
+2HSPqht/XvT+RSIhAgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
+FHE4NvICMVNHK266ZUapEBVYIAUJMB8GA1UdIwQYMBaAFHE4NvICMVNHK266ZUap
+EBVYIAUJMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQUFAAOCAQEAA/e1K6td
+EPx7srJerJsOflN4WT5CBP51o62sgU7XAotexC3IUnbHLB/8gTKY0UvGkpMzNTEv
+/NgdRN3ggX+d6YvhZJFiCzkIjKx0nVnZellSlxG5FntvRdOW2TF9AjYPnDtuzywN
+A0ZF66D0f0hExghAzN4bcLUprbqLOzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0
+abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkCx1YAzUm5s2x7UwQa4qjJqhIF
+I8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqFH4z1Ir+rzoPz
+4iIprn2DQKi6bA==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBY
+MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMo
+R2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEx
+MjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
+Ew1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQcmltYXJ5IENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9
+AWbK7hWNb6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjA
+ZIVcFU2Ix7e64HXprQU9nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE0
+7e9GceBrAqg1cmuXm2bgyxx5X9gaBGgeRwLmnWDiNpcB3841kt++Z8dtd1k7j53W
+kBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGttm/81w7a4DSwDRp35+MI
+mO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G
+A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJ
+KoZIhvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ1
+6CePbJC/kRYkRj5KTs4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl
+4b7UVXGYNTq+k+qurUKykG/g/CFNNWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6K
+oKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHaFloxt/m0cYASSJlyc1pZU8Fj
+UjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG1riR/aYNKxoU
+AT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEW
+MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVy
+c2FsIENBMB4XDTA0MDMwNDA1MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UE
+BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xHjAcBgNVBAMTFUdlb1RydXN0
+IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKYV
+VaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9tJPi8
+cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTT
+QjOgNB0eRXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFh
+F7em6fgemdtzbvQKoiFs7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2v
+c7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d8Lsrlh/eezJS/R27tQahsiFepdaVaH/w
+mZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7VqnJNk22CDtucvc+081xd
+VHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3CgaRr0BHdCX
+teGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZ
+f9hBZ3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfRe
+Bi9Fi1jUIxaS5BZuKGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+
+nhutxx9z3SxPGWX9f5NAEC7S8O08ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB
+/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0XG0D08DYj3rWMB8GA1UdIwQY
+MBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG
+9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc
+aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fX
+IwjhmF7DWgh2qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzyn
+ANXH/KttgCJwpQzgXQQpAvvLoJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0z
+uzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsKxr2EoyNB3tZ3b4XUhRxQ4K5RirqN
+Pnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxFKyDuSN/n3QmOGKja
+QI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2DFKW
+koRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9
+ER/frslKxfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQt
+DF4JbAiXfKM9fJP/P6EUp8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/Sfuvm
+bJxPgWp6ZKy7PtXny3YuxadIwVyQD8vIP/rmMuGNG2+k5o7Y+SlIis5z/iw=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEW
+MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVy
+c2FsIENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYD
+VQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1
+c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
+AQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0DE81
+WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUG
+FF+3Qs17j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdq
+XbboW0W63MOhBW9Wjo8QJqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxL
+se4YuU6W3Nx2/zu+z18DwPw76L5GG//aQMJS9/7jOvdqdzXQ2o3rXhhqMcceujwb
+KNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2WP0+GfPtDCapkzj4T8Fd
+IgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP20gaXT73
+y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRt
+hAAnZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgoc
+QIgfksILAAX/8sgCSqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4
+Lt1ZrtmhN79UNdxzMk+MBB4zsslG8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNV
+HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAfBgNV
+HSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8EBAMCAYYwDQYJ
+KoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z
+dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQ
+L1EuxBRa3ugZ4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgr
+Fg5fNuH8KrUwJM/gYwx7WBr+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSo
+ag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpqA1Ihn0CoZ1Dy81of398j9tx4TuaY
+T1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpgY+RdM4kX2TGq2tbz
+GDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiPpm8m
+1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJV
+OCiNUW7dFGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH
+6aLcr34YEoP9VhdBLtUpgn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwX
+QMAJKOSLakhT2+zNVVXxxvjpoixMptEmX36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
+MDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxT
+aWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZ
+jc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavp
+xy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp
+1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG
+snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJ
+U26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N8
+9iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8E
+BTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0B
+AQUFAAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOz
+yj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE
+38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymP
+AbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr+WymXUad
+DKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME
+HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
+A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp
+Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1
+MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG
+A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL
+v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8
+eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq
+tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd
+C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa
+zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB
+mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH
+V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n
+bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG
+3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs
+J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO
+291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS
+ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd
+AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
+TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh
+MB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE
+YWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3
+MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo
+ZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3Mg
+MiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQADggEN
+ADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCA
+PVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6w
+wdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi
+EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY
+avx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+
+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE
+sNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h
+/t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5
+IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj
+YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
+ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy
+OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P
+TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
+HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER
+dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf
+ReYNnyicsbkqWletNw+vHX/bvZ8=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUx
+ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
+b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQD
+EylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikgVGFudXNpdHZhbnlraWFkbzAeFw05
+OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYDVQQGEwJIVTERMA8G
+A1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRvbnNh
+Z2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxMjAwBgNVBAMTKU5l
+dExvY2sgVXpsZXRpIChDbGFzcyBCKSBUYW51c2l0dmFueWtpYWRvMIGfMA0GCSqG
+SIb3DQEBAQUAA4GNADCBiQKBgQCx6gTsIKAjwo84YM/HRrPVG/77uZmeBNwcf4xK
+gZjupNTKihe5In+DCnVMm8Bp2GQ5o+2So/1bXHQawEfKOml2mrriRBf8TKPV/riX
+iK+IA4kfpPIEPsgHC+b5sy96YhQJRhTKZPWLgLViqNhr1nGTLbO/CVRY7QbrqHvc
+Q7GhaQIDAQABo4ICnzCCApswEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNVHQ8BAf8E
+BAMCAAYwEQYJYIZIAYb4QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1G
+SUdZRUxFTSEgRXplbiB0YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFu
+b3MgU3pvbGdhbHRhdGFzaSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBh
+bGFwamFuIGtlc3p1bHQuIEEgaGl0ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExv
+Y2sgS2Z0LiB0ZXJtZWtmZWxlbG9zc2VnLWJpenRvc2l0YXNhIHZlZGkuIEEgZGln
+aXRhbGlzIGFsYWlyYXMgZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUgYXogZWxvaXJ0
+IGVsbGVub3J6ZXNpIGVsamFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJh
+c2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGph
+biBhIGh0dHBzOi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJo
+ZXRvIGF6IGVsbGVub3J6ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBP
+UlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmlj
+YXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2YWlsYWJsZSBhdCBo
+dHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBjcHNA
+bmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06
+sPgzTEdM43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXa
+n3BukxowOR0w2y7jfLKRstE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKS
+NitjrFgBazMpUIaD8QFI
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUx
+ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
+b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQD
+EytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBDKSBUYW51c2l0dmFueWtpYWRvMB4X
+DTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJBgNVBAYTAkhVMREw
+DwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9u
+c2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE0MDIGA1UEAxMr
+TmV0TG9jayBFeHByZXNzeiAoQ2xhc3MgQykgVGFudXNpdHZhbnlraWFkbzCBnzAN
+BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA6+ywbGGKIyWvYCDj2Z/8kwvbXY2wobNA
+OoLO/XXgeDIDhlqGlZHtU/qdQPzm6N3ZW3oDvV3zOwzDUXmbrVWg6dADEK8KuhRC
+2VImESLH0iDMgqSaqf64gXadarfSNnU+sYYJ9m5tfk63euyucYT2BDMIJTLrdKwW
+RMbkQJMdf60CAwEAAaOCAp8wggKbMBIGA1UdEwEB/wQIMAYBAf8CAQQwDgYDVR0P
+AQH/BAQDAgAGMBEGCWCGSAGG+EIBAQQEAwIABzCCAmAGCWCGSAGG+EIBDQSCAlEW
+ggJNRklHWUVMRU0hIEV6ZW4gdGFudXNpdHZhbnkgYSBOZXRMb2NrIEtmdC4gQWx0
+YWxhbm9zIFN6b2xnYWx0YXRhc2kgRmVsdGV0ZWxlaWJlbiBsZWlydCBlbGphcmFz
+b2sgYWxhcGphbiBrZXN6dWx0LiBBIGhpdGVsZXNpdGVzIGZvbHlhbWF0YXQgYSBO
+ZXRMb2NrIEtmdC4gdGVybWVrZmVsZWxvc3NlZy1iaXp0b3NpdGFzYSB2ZWRpLiBB
+IGRpZ2l0YWxpcyBhbGFpcmFzIGVsZm9nYWRhc2FuYWsgZmVsdGV0ZWxlIGF6IGVs
+b2lydCBlbGxlbm9yemVzaSBlbGphcmFzIG1lZ3RldGVsZS4gQXogZWxqYXJhcyBs
+ZWlyYXNhIG1lZ3RhbGFsaGF0byBhIE5ldExvY2sgS2Z0LiBJbnRlcm5ldCBob25s
+YXBqYW4gYSBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIGNpbWVuIHZhZ3kg
+a2VyaGV0byBheiBlbGxlbm9yemVzQG5ldGxvY2submV0IGUtbWFpbCBjaW1lbi4g
+SU1QT1JUQU5UISBUaGUgaXNzdWFuY2UgYW5kIHRoZSB1c2Ugb2YgdGhpcyBjZXJ0
+aWZpY2F0ZSBpcyBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIENQUyBhdmFpbGFibGUg
+YXQgaHR0cHM6Ly93d3cubmV0bG9jay5uZXQvZG9jcyBvciBieSBlLW1haWwgYXQg
+Y3BzQG5ldGxvY2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmY
+ta3UzbM2xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2g
+pO0u9f38vf5NNwgMvOOWgyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4
+Fp1hBWeAyNDYpQcCNJgEjTME1A==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhV
+MRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMe
+TmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0
+dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFzcyBB
+KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oXDTE5MDIxOTIzMTQ0
+N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQHEwhC
+dWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQu
+MRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBL
+b3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMIIBIjANBgkqhkiG
+9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvHSMD7tM9DceqQWC2ObhbHDqeLVu0ThEDaiD
+zl3S1tWBxdRL51uUcCbbO51qTGL3cfNk1mE7PetzozfZz+qMkjvN9wfcZnSX9EUi
+3fRc4L9t875lM+QVOr/bmJBVOMTtplVjC7B4BPTjbsE/jvxReB+SnoPC/tmwqcm8
+WgD/qaiYdPv2LD4VOQ22BFWoDpggQrOxJa1+mm9dU7GrDPzr4PN6s6iz/0b2Y6LY
+Oph7tqyF/7AlT3Rj5xMHpQqPBffAZG9+pyeAlt7ULoZgx2srXnN7F+eRP2QM2Esi
+NCubMvJIH5+hCoR64sKtlz2O1cH5VqNQ6ca0+pii7pXmKgOM3wIDAQABo4ICnzCC
+ApswDgYDVR0PAQH/BAQDAgAGMBIGA1UdEwEB/wQIMAYBAf8CAQQwEQYJYIZIAYb4
+QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1GSUdZRUxFTSEgRXplbiB0
+YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFub3MgU3pvbGdhbHRhdGFz
+aSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBhbGFwamFuIGtlc3p1bHQu
+IEEgaGl0ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExvY2sgS2Z0LiB0ZXJtZWtm
+ZWxlbG9zc2VnLWJpenRvc2l0YXNhIHZlZGkuIEEgZGlnaXRhbGlzIGFsYWlyYXMg
+ZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUgYXogZWxvaXJ0IGVsbGVub3J6ZXNpIGVs
+amFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJhc2EgbWVndGFsYWxoYXRv
+IGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGphbiBhIGh0dHBzOi8vd3d3
+Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVub3J6
+ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1
+YW5jZSBhbmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3Qg
+dG8gdGhlIE5ldExvY2sgQ1BTIGF2YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRs
+b2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBjcHNAbmV0bG9jay5uZXQuMA0G
+CSqGSIb3DQEBBAUAA4IBAQBIJEb3ulZv+sgoA0BO5TE5ayZrU3/b39/zcT0mwBQO
+xmd7I6gMc90Bu8bKbjc5VdXHjFYgDigKDtIqpLBJUsY4B/6+CgmM0ZjPytoUMaFP
+0jn8DxEsQ8Pdq5PHVT5HfBgaANzze9jyf1JsIPQLX2lS9O74silg6+NJMSEN1rUQ
+QeJBCWziGppWS3cC9qCbmieH6FUpccKQn0V4GuEVZD3QDtigdp+uxdAu6tYPVuxk
+f1qbFFgBJ34TUMdrKuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK
+8CtmdWOMovsEPoMOmzbwGOQmIMOM8CgHrTwXZoi1/baI
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIG0TCCBbmgAwIBAgIBezANBgkqhkiG9w0BAQUFADCByTELMAkGA1UEBhMCSFUx
+ETAPBgNVBAcTCEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0
+b25zYWdpIEtmdC4xGjAYBgNVBAsTEVRhbnVzaXR2YW55a2lhZG9rMUIwQAYDVQQD
+EzlOZXRMb2NrIE1pbm9zaXRldHQgS296amVneXpvaSAoQ2xhc3MgUUEpIFRhbnVz
+aXR2YW55a2lhZG8xHjAcBgkqhkiG9w0BCQEWD2luZm9AbmV0bG9jay5odTAeFw0w
+MzAzMzAwMTQ3MTFaFw0yMjEyMTUwMTQ3MTFaMIHJMQswCQYDVQQGEwJIVTERMA8G
+A1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRvbnNh
+Z2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxQjBABgNVBAMTOU5l
+dExvY2sgTWlub3NpdGV0dCBLb3pqZWd5em9pIChDbGFzcyBRQSkgVGFudXNpdHZh
+bnlraWFkbzEeMBwGCSqGSIb3DQEJARYPaW5mb0BuZXRsb2NrLmh1MIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx1Ilstg91IRVCacbvWy5FPSKAtt2/Goq
+eKvld/Bu4IwjZ9ulZJm53QE+b+8tmjwi8F3JV6BVQX/yQ15YglMxZc4e8ia6AFQe
+r7C8HORSjKAyr7c3sVNnaHRnUPYtLmTeriZ539+Zhqurf4XsoPuAzPS4DB6TRWO5
+3Lhbm+1bOdRfYrCnjnxmOCyqsQhjF2d9zL2z8cM/z1A57dEZgxXbhxInlrfa6uWd
+vLrqOU+L73Sa58XQ0uqGURzk/mQIKAR5BevKxXEOC++r6uwSEaEYBTJp0QwsGj0l
+mT+1fMptsK6ZmfoIYOcZwvK9UdPM0wKswREMgM6r3JSda6M5UzrWhQIDAMV9o4IC
+wDCCArwwEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNVHQ8BAf8EBAMCAQYwggJ1Bglg
+hkgBhvhCAQ0EggJmFoICYkZJR1lFTEVNISBFemVuIHRhbnVzaXR2YW55IGEgTmV0
+TG9jayBLZnQuIE1pbm9zaXRldHQgU3pvbGdhbHRhdGFzaSBTemFiYWx5emF0YWJh
+biBsZWlydCBlbGphcmFzb2sgYWxhcGphbiBrZXN6dWx0LiBBIG1pbm9zaXRldHQg
+ZWxla3Ryb25pa3VzIGFsYWlyYXMgam9naGF0YXMgZXJ2ZW55ZXN1bGVzZW5laywg
+dmFsYW1pbnQgZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUgYSBNaW5vc2l0ZXR0IFN6
+b2xnYWx0YXRhc2kgU3phYmFseXphdGJhbiwgYXogQWx0YWxhbm9zIFN6ZXJ6b2Rl
+c2kgRmVsdGV0ZWxla2JlbiBlbG9pcnQgZWxsZW5vcnplc2kgZWxqYXJhcyBtZWd0
+ZXRlbGUuIEEgZG9rdW1lbnR1bW9rIG1lZ3RhbGFsaGF0b2sgYSBodHRwczovL3d3
+dy5uZXRsb2NrLmh1L2RvY3MvIGNpbWVuIHZhZ3kga2VyaGV0b2sgYXogaW5mb0Bu
+ZXRsb2NrLm5ldCBlLW1haWwgY2ltZW4uIFdBUk5JTkchIFRoZSBpc3N1YW5jZSBh
+bmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGFyZSBzdWJqZWN0IHRvIHRo
+ZSBOZXRMb2NrIFF1YWxpZmllZCBDUFMgYXZhaWxhYmxlIGF0IGh0dHBzOi8vd3d3
+Lm5ldGxvY2suaHUvZG9jcy8gb3IgYnkgZS1tYWlsIGF0IGluZm9AbmV0bG9jay5u
+ZXQwHQYDVR0OBBYEFAlqYhaSsFq7VQ7LdTI6MuWyIckoMA0GCSqGSIb3DQEBBQUA
+A4IBAQCRalCc23iBmz+LQuM7/KbD7kPgz/PigDVJRXYC4uMvBcXxKufAQTPGtpvQ
+MznNwNuhrWw3AkxYQTvyl5LGSKjN5Yo5iWH5Upfpvfb5lHTocQ68d4bDBsxafEp+
+NFAwLvt/MpqNPfMgW/hqyobzMUwsWYACff44yTB1HLdV47yfuqhthCgFdbOLDcCR
+VCHnpgu0mfVRQdzNo0ci2ccBgcTcR08m6h/t280NmPSjnLRzMkqWmf68f8glWPhY
+83ZmiVSkpj7EUFy6iRiCdUgh0k8T6GB+B3bbELVR5qq5aKrN9p2QdRLqOBrKROi3
+macqaJVmlaut74nLYKkGEsaUR+ko
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBi
+MQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
+MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3Jp
+dHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMxMjM1OTU5WjBiMQswCQYDVQQGEwJV
+UzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydO
+ZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwz
+c7MEL7xxjOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPP
+OCwGJgl6cvf6UDL4wpPTaaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rl
+mGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXTcrA/vGp97Eh/jcOrqnErU2lBUzS1sLnF
+BgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc/Qzpf14Dl847ABSHJ3A4
+qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMBAAGjgZcw
+gZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIB
+BjAPBgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwu
+bmV0c29sc3NsLmNvbS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3Jp
+dHkuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc8
+6fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q4LqILPxFzBiwmZVRDuwduIj/
+h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/GGUsyfJj4akH
+/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
+wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHN
+pGxlaKFJdlxDydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJC
+TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0
+aWZpY2F0aW9uIEF1dGhvcml0eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0
+aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAzMTkxODMzMzNaFw0yMTAzMTcxODMz
+MzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUw
+IwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQDEyVR
+dW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG
+9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Yp
+li4kVEAkOPcahdxYTMukJ0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2D
+rOpm2RgbaIr1VxqYuvXtdj182d6UajtLF8HVj71lODqV0D1VNk7feVcxKh7YWWVJ
+WCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeLYzcS19Dsw3sgQUSj7cug
+F+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWenAScOospU
+xbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCC
+Ak4wPQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVv
+dmFkaXNvZmZzaG9yZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREw
+ggENMIIBCQYJKwYBBAG+WAABMIH7MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNl
+IG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBh
+c3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFy
+ZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
+Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYI
+KwYBBQUHAgEWFmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3T
+KbkGGew5Oanwl4Rqy+/fMIGuBgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rq
+y+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1p
+dGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYD
+VQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6tlCL
+MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSk
+fnIYj9lofFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf8
+7C9TqnN7Az10buYWnuulLsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1R
+cHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2xgI4JVrmcGmD+XcHXetwReNDWXcG31a0y
+mQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi5upZIof4l/UO/erMkqQW
+xFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi5nrQNiOK
+SnQ2+Q==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x
+GTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJv
+b3QgQ0EgMjAeFw0wNjExMjQxODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNV
+BAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYDVQQDExJRdW9W
+YWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCa
+GMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6XJxg
+Fyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55J
+WpzmM+Yklvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bB
+rrcCaoF6qUWD4gXmuVbBlDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp
++ARz8un+XJiM9XOva7R+zdRcAitMOeGylZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1
+ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt66/3FsvbzSUr5R/7mp/i
+Ucw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1JdxnwQ5hYIiz
+PtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og
+/zOhD7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UH
+oycR7hYQe7xFSkyyBNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuI
+yV77zGHcizN300QyNQliBJIWENieJ0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1Ud
+EwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBQahGK8SEwzJQTU7tD2
+A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGUa6FJpEcwRTEL
+MAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT
+ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2f
+BluornFdLwUvZ+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzn
+g/iN/Ae42l9NLmeyhP3ZRPx3UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2Bl
+fF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodmVjB3pjd4M1IQWK4/YY7yarHvGH5K
+WWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK+JDSV6IZUaUtl0Ha
+B0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrWIozc
+hLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPR
+TUIZ3Ph1WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWD
+mbA4CD/pXvk1B+TJYm5Xf6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0Z
+ohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y
+4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8VCLAAVBpQ570su9t+Oza
+8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0x
+GTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJv
+b3QgQ0EgMzAeFw0wNjExMjQxOTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNV
+BAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYDVQQDExJRdW9W
+YWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDM
+V0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNggDhoB
+4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUr
+H556VOijKTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd
+8lyyBTNvijbO0BNO/79KDDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9Cabwv
+vWhDFlaJKjdhkf2mrk7AyxRllDdLkgbvBNDInIjbC3uBr7E9KsRlOni27tyAsdLT
+mZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwpp5ijJUMv7/FfJuGITfhe
+btfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8nT8KKdjc
+T5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDt
+WAEXMJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZ
+c6tsgLjoC2SToJyMGf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A
+4iLItLRkT9a6fUg+qGkM17uGcclzuD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYD
+VR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHTBgkrBgEEAb5YAAMwgcUwgZMG
+CCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmljYXRlIGNvbnN0
+aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0
+aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVu
+dC4wLQYIKwYBBQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2Nw
+czALBgNVHQ8EBAMCAQYwHQYDVR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4G
+A1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4ywLQoUmkRzBFMQswCQYDVQQGEwJC
+TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UEAxMSUXVvVmFkaXMg
+Um9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZVqyM0
+7ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSem
+d1o417+shvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd
++LJ2w/w4E6oM3kJpK27zPOuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B
+4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadN
+t54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp8kokUvd0/bpO5qgdAm6x
+DYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBCbjPsMZ57
+k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6s
+zHXug/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0j
+Wy10QJLZYxkNc91pvGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeT
+mJlglFwjz1onl14LBQaTNx47aTbrqZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK
+4SVhM7JZG+Ju1zdXtg2pEto=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMjIzM1oXDTE5MDYy
+NjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjmFGWHOjVsQaBalfD
+cnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td3zZxFJmP3MKS8edgkpfs
+2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89HBFx1cQqY
+JJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliE
+Zwgs3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJ
+n0WuPIqpsHEzXcjFV9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/A
+PhmcGcwTTYJBtYze4D1gCCAPRX5ron+jjBXu
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDYTCCAkmgAwIBAgIQCgEBAQAAAnwAAAAKAAAAAjANBgkqhkiG9w0BAQUFADA6
+MRkwFwYDVQQKExBSU0EgU2VjdXJpdHkgSW5jMR0wGwYDVQQLExRSU0EgU2VjdXJp
+dHkgMjA0OCBWMzAeFw0wMTAyMjIyMDM5MjNaFw0yNjAyMjIyMDM5MjNaMDoxGTAX
+BgNVBAoTEFJTQSBTZWN1cml0eSBJbmMxHTAbBgNVBAsTFFJTQSBTZWN1cml0eSAy
+MDQ4IFYzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt49VcdKA3Xtp
+eafwGFAyPGJn9gqVB93mG/Oe2dJBVGutn3y+Gc37RqtBaB4Y6lXIL5F4iSj7Jylg
+/9+PjDvJSZu1pJTOAeo+tWN7fyb9Gd3AIb2E0S1PRsNO3Ng3OTsor8udGuorryGl
+wSMiuLgbWhOHV4PR8CDn6E8jQrAApX2J6elhc5SYcSa8LWrg903w8bYqODGBDSnh
+AMFRD0xS+ARaqn1y07iHKrtjEAMqs6FPDVpeRrc9DvV07Jmf+T0kgYim3WBU6JU2
+PcYJk5qjEoAAVZkZR73QpXzDuvsf9/UP+Ky5tfQ3mBMY3oVbtwyCO4dvlTlYMNpu
+AWgXIszACwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB
+BjAfBgNVHSMEGDAWgBQHw1EwpKrpRa41JPr/JCwz0LGdjDAdBgNVHQ4EFgQUB8NR
+MKSq6UWuNST6/yQsM9CxnYwwDQYJKoZIhvcNAQEFBQADggEBAF8+hnZuuDU8TjYc
+HnmYv/3VEhF5Ug7uMYm83X/50cYVIeiKAVQNOvtUudZj1LGqlk2iQk3UUx+LEN5/
+Zb5gEydxiKRz44Rj0aRV4VCT5hsOedBnvEbIvz8XDZXmxpBp3ue0L96VfdASPz0+
+f00/FGj1EVDVwfSQpQgdMWD/YIwjVAqv/qFuxdF6Kmh4zx6CCiC0H63lhbJqaHVO
+rSU3lIW+vaHU6rcMSzyd6BIA8F+sDeGscGNz9395nzIlQnQFgCi/vcEkllgVsRch
+6YlL2weIZ/QVrXA+L02FO8K32/6YaCOJ4XQP3vTFhGMpG8zLB8kApKnXwiJPZ9d3
+7CAFYd4=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBI
+MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24x
+FzAVBgNVBAMTDlNlY3VyZVRydXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIz
+MTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAeBgNVBAoTF1NlY3VyZVRydXN0IENv
+cnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQXOZEz
+Zum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO
+0gMdA+9tDWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIao
+wW8xQmxSPmjL8xk037uHGFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj
+7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b01k/unK8RCSc43Oz969XL0Imnal0ugBS
+8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmHursCAwEAAaOBnTCBmjAT
+BgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB
+/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCeg
+JYYjaHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGC
+NxUBBAMCAQAwDQYJKoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt3
+6Z3q059c4EVlew3KW+JwULKUBRSuSceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/
+3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHfmbx8IVQr5Fiiu1cprp6poxkm
+D5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZnMUFdAvnZyPS
+CPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR
+3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBK
+MQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24x
+GTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkx
+MjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3Qg
+Q29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwgQ0EwggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jxYDiJ
+iQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa
+/FHtaMbQbqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJ
+jnIFHovdRIWCQtBJwB1g8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnI
+HmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYVHDGA76oYa8J719rO+TMg1fW9ajMtgQT7
+sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi0XPnj3pDAgMBAAGjgZ0w
+gZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQF
+MAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCsw
+KaAnoCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsG
+AQQBgjcVAQQDAgEAMA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0L
+URYD7xh8yOOvaliTFGCRsoTciE6+OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXO
+H0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cnCDpOGR86p1hcF895P4vkp9Mm
+I50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/53CYNv6ZHdAbY
+iNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
+f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEY
+MBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21t
+dW5pY2F0aW9uIFJvb3RDQTEwHhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5
+WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMPU0VDT00gVHJ1c3QubmV0MScwJQYD
+VQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEwggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw8yl8
+9f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJ
+DKaVv0uMDPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9
+Ms+k2Y7CI9eNqPPYJayX5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/N
+QV3Is00qVUarH9oe4kA92819uZKAnDfdDJZkndwi92SL32HeFZRSFaB9UslLqCHJ
+xrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2JChzAgMBAAGjPzA9MB0G
+A1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYwDwYDVR0T
+AQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vG
+kl3g0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfr
+Uj94nK9NrvjVT8+amCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5
+Bw+SUEmK3TGXX8npN6o7WWWXlDLJs58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJU
+JRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ6rBK+1YWc26sTfcioU+tHXot
+RSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAiFL39vmwLAw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAgigAwIBAgIBJDANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP
+MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MxIENBMB4XDTAx
+MDQwNjEwNDkxM1oXDTIxMDQwNjEwNDkxM1owOTELMAkGA1UEBhMCRkkxDzANBgNV
+BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMSBDQTCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBALWJHytPZwp5/8Ue+H887dF+2rDNbS82rDTG
+29lkFwhjMDMiikzujrsPDUJVyZ0upe/3p4zDq7mXy47vPxVnqIJyY1MPQYx9EJUk
+oVqlBvqSV536pQHydekfvFYmUk54GWVYVQNYwBSujHxVX3BbdyMGNpfzJLWaRpXk
+3w0LBUXl0fIdgrvGE+D+qnr9aTCU89JFhfzyMlsy3uhsXR/LpCJ0sICOXZT3BgBL
+qdReLjVQCfOAl/QMF6452F/NM8EcyonCIvdFEu1eEpOdY6uCLrnrQkFEy0oaAIIN
+nvmLVz5MxxftLItyM19yejhW1ebZrgUaHXVFsculJRwSVzb9IjcCAwEAAaMzMDEw
+DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQIR+IMi/ZTiFIwCwYDVR0PBAQDAgEG
+MA0GCSqGSIb3DQEBBQUAA4IBAQCLGrLJXWG04bkruVPRsoWdd44W7hE928Jj2VuX
+ZfsSZ9gqXLar5V7DtxYvyOirHYr9qxp81V9jz9yw3Xe5qObSIjiHBxTZ/75Wtf0H
+DjxVyhbMp6Z3N/vbXB9OWQaHowND9Rart4S9Tu+fMTfwRvFAttEMpWT4Y14h21VO
+TzF2nBBhjrZTOqMRvq9tfB69ri3iDGnHhVNoomG6xT60eVR4ngrHAr5i0RGCS2Uv
+kVrCqIexVmiUefkl98HVrhq4uz2PqYo4Ffdz0Fpg0YCw8NzVUM1O7pJIae2yIx4w
+zMiUyLb1O4Z/P6Yun/Y+LLWSlj7fLJOK/4GMDw9ZIRlXvVWa
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEP
+MA0GA1UEChMGU29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAx
+MDQwNjA3Mjk0MFoXDTIxMDQwNjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNV
+BAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJhIENsYXNzMiBDQTCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3/Ei9vX+ALTU74W+o
+Z6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybTdXnt
+5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s
+3TmVToMGf+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2Ej
+vOr7nQKV0ba5cTppCD8PtOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu
+8nYybieDwnPz3BjotJPqdURrBGAgcVeHnfO+oJAjPYok4doh28MCAwEAAaMzMDEw
+DwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITTXjwwCwYDVR0PBAQDAgEG
+MA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt0jSv9zil
+zqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/
+3DEIcbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvD
+FNr450kkkdAdavphOe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6
+Tk6ezAyNlNzZRZxe7EJQY670XcSxEtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2
+ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLHllpwrN9M
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJO
+TDEeMBwGA1UEChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFh
+dCBkZXIgTmVkZXJsYW5kZW4gUm9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEy
+MTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4wHAYDVQQKExVTdGFhdCBkZXIgTmVk
+ZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxhbmRlbiBSb290IENB
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmNK1URF6gaYUmHFtvszn
+ExvWJw56s2oYHLZhWtVhCb/ekBPHZ+7d89rFDBKeNVU+LCeIQGv33N0iYfXCxw71
+9tV2U02PjLwYdjeFnejKScfST5gTCaI+Ioicf9byEGW07l8Y1Rfj+MX94p2i71MO
+hXeiD+EwR+4A5zN9RGcaC1Hoi6CeUJhoNFIfLm0B8mBF8jHrqTFoKbt6QZ7GGX+U
+tFE5A3+y3qcym7RHjm+0Sq7lr7HcsBthvJly3uSJt3omXdozSVtSnA71iq3DuD3o
+BmrC1SoLbHuEvVYFy4ZlkuxEK7COudxwC0barbxjiDn622r+I/q85Ej0ZytqERAh
+SQIDAQABo4GRMIGOMAwGA1UdEwQFMAMBAf8wTwYDVR0gBEgwRjBEBgRVHSAAMDww
+OgYIKwYBBQUHAgEWLmh0dHA6Ly93d3cucGtpb3ZlcmhlaWQubmwvcG9saWNpZXMv
+cm9vdC1wb2xpY3kwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSofeu8Y6R0E3QA
+7Jbg0zTBLL9s+DANBgkqhkiG9w0BAQUFAAOCAQEABYSHVXQ2YcG70dTGFagTtJ+k
+/rvuFbQvBgwp8qiSpGEN/KtcCFtREytNwiphyPgJWPwtArI5fZlmgb9uXJVFIGzm
+eafR2Bwp/MIgJ1HI8XxdNGdphREwxgDS1/PTfLbwMVcoEoJz6TMvplW0C5GUR5z6
+u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3ynGQI0DvDKcWy
+7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR
+iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl
+MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp
+U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw
+NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE
+ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp
+ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3
+DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf
+8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN
++lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0
+X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa
+K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA
+1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G
+A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR
+zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0
+YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD
+bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w
+DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3
+L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D
+eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
+xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp
+VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY
+WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEW
+MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
+Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM2WhcNMzYwOTE3MTk0NjM2WjB9
+MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi
+U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
+cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
+A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
+pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
+OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C
+Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT
+Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi
+HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM
+Av+Z6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w
++2OqqGwaVLRcJXrJosmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+
+Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3
+Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVcUjyJthkqcwEKDwOzEmDyei+B
+26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT37uMdBNSSwID
+AQABo4ICUjCCAk4wDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAa4wHQYDVR0OBBYE
+FE4L7xqkQFulF2mHMMo0aEPQQa7yMGQGA1UdHwRdMFswLKAqoCiGJmh0dHA6Ly9j
+ZXJ0LnN0YXJ0Y29tLm9yZy9zZnNjYS1jcmwuY3JsMCugKaAnhiVodHRwOi8vY3Js
+LnN0YXJ0Y29tLm9yZy9zZnNjYS1jcmwuY3JsMIIBXQYDVR0gBIIBVDCCAVAwggFM
+BgsrBgEEAYG1NwEBATCCATswLwYIKwYBBQUHAgEWI2h0dHA6Ly9jZXJ0LnN0YXJ0
+Y29tLm9yZy9wb2xpY3kucGRmMDUGCCsGAQUFBwIBFilodHRwOi8vY2VydC5zdGFy
+dGNvbS5vcmcvaW50ZXJtZWRpYXRlLnBkZjCB0AYIKwYBBQUHAgIwgcMwJxYgU3Rh
+cnQgQ29tbWVyY2lhbCAoU3RhcnRDb20pIEx0ZC4wAwIBARqBl0xpbWl0ZWQgTGlh
+YmlsaXR5LCByZWFkIHRoZSBzZWN0aW9uICpMZWdhbCBMaW1pdGF0aW9ucyogb2Yg
+dGhlIFN0YXJ0Q29tIENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFBvbGljeSBhdmFp
+bGFibGUgYXQgaHR0cDovL2NlcnQuc3RhcnRjb20ub3JnL3BvbGljeS5wZGYwEQYJ
+YIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilTdGFydENvbSBGcmVlIFNT
+TCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOCAgEAFmyZ
+9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8
+jhvh3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUW
+FjgKXlf2Ysd6AgXmvB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJz
+ewT4F+irsfMuXGRuczE6Eri8sxHkfY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1
+ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3fsNrarnDy0RLrHiQi+fHLB5L
+EUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZEoalHmdkrQYu
+L6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq
+yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuC
+O3NJo2pXh5Tl1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6V
+um0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkySh
+NOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
+BAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2ln
+biBHb2xkIENBIC0gRzIwHhcNMDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBF
+MQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMR8wHQYDVQQDExZT
+d2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
+CgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUqt2/8
+76LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+
+bbqBHH5CjCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c
+6bM8K8vzARO/Ws/BtQpgvd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqE
+emA8atufK+ze3gE/bk3lUIbLtK/tREDFylqM2tIrfKjuvqblCqoOpd8FUrdVxyJd
+MmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvRAiTysybUa9oEVeXBCsdt
+MDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuendjIj3o02y
+MszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69y
+FGkOpeUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPi
+aG59je883WX0XaxR7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxM
+gI93e2CaHt+28kgeDrpOVG2Y4OGiGqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCB
+qTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUWyV7
+lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64OfPAeGZe6Drn
+8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
+L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe6
+45R88a7A3hfm5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczO
+UYrHUDFu4Up+GC9pWbY9ZIEr44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5
+O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOfMke6UiI0HTJ6CVanfCU2qT1L2sCC
+bwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6mGu6uLftIdxf+u+yv
+GPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxpmo/a
+77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCC
+hdiDyyJkvC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid3
+92qgQmwLOM7XdVAyksLfKzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEpp
+Ld6leNcG2mqeSz53OiATIgHQv2ieY2BrNU0LbbqhPcCT4H8js1WtciVORvnSFu+w
+ZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6LqjviOvrv1vA+ACOzB2+htt
+Qc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFwTCCA6mgAwIBAgIITrIAZwwDXU8wDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE
+BhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEjMCEGA1UEAxMaU3dpc3NTaWdu
+IFBsYXRpbnVtIENBIC0gRzIwHhcNMDYxMDI1MDgzNjAwWhcNMzYxMDI1MDgzNjAw
+WjBJMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dpc3NTaWduIEFHMSMwIQYDVQQD
+ExpTd2lzc1NpZ24gUGxhdGludW0gQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQAD
+ggIPADCCAgoCggIBAMrfogLi2vj8Bxax3mCq3pZcZB/HL37PZ/pEQtZ2Y5Wu669y
+IIpFR4ZieIbWIDkm9K6j/SPnpZy1IiEZtzeTIsBQnIJ71NUERFzLtMKfkr4k2Htn
+IuJpX+UFeNSH2XFwMyVTtIc7KZAoNppVRDBopIOXfw0enHb/FZ1glwCNioUD7IC+
+6ixuEFGSzH7VozPY1kneWCqv9hbrS3uQMpe5up1Y8fhXSQQeol0GcN1x2/ndi5ob
+jM89o03Oy3z2u5yg+gnOI2Ky6Q0f4nIoj5+saCB9bzuohTEJfwvH6GXp43gOCWcw
+izSC+13gzJ2BbWLuCB4ELE6b7P6pT1/9aXjvCR+htL/68++QHkwFix7qepF6w9fl
++zC8bBsQWJj3Gl/QKTIDE0ZNYWqFTFJ0LwYfexHihJfGmfNtf9dng34TaNhxKFrY
+zt3oEBSa/m0jh26OWnA81Y0JAKeqvLAxN23IhBQeW71FYyBrS3SMvds6DsHPWhaP
+pZjydomyExI7C3d3rLvlPClKknLKYRorXkzig3R3+jVIeoVNjZpTxN94ypeRSCtF
+KwH3HBqi7Ri6Cr2D+m+8jVeTO9TUps4e8aCxzqv9KyiaTxvXw3LbpMS/XUz13XuW
+ae5ogObnmLo2t/5u7Su9IPhlGdpVCX4l3P5hYnL5fhgC72O00Puv5TtjjGePAgMB
+AAGjgawwgakwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O
+BBYEFFCvzAeHFUdvOMW0ZdHelarp35zMMB8GA1UdIwQYMBaAFFCvzAeHFUdvOMW0
+ZdHelarp35zMMEYGA1UdIAQ/MD0wOwYJYIV0AVkBAQEBMC4wLAYIKwYBBQUHAgEW
+IGh0dHA6Ly9yZXBvc2l0b3J5LnN3aXNzc2lnbi5jb20vMA0GCSqGSIb3DQEBBQUA
+A4ICAQAIhab1Fgz8RBrBY+D5VUYI/HAcQiiWjrfFwUF1TglxeeVtlspLpYhg0DB0
+uMoI3LQwnkAHFmtllXcBrqS3NQuB2nEVqXQXOHtYyvkv+8Bldo1bAbl93oI9ZLi+
+FHSjClTTLJUYFzX1UWs/j6KWYTl4a0vlpqD4U99REJNi54Av4tHgvI42Rncz7Lj7
+jposiU0xEQ8mngS7twSNC/K5/FqdOxa3L8iYq/6KUFkuozv8KV2LwUvJ4ooTHbG/
+u0IdUt1O2BReEMYxB+9xJ/cbOQncguqLs5WGXv312l0xpuAxtpTmREl0xRbl9x8D
+YSjFyMsSoEJL+WuICI20MhjzdZ/EfwBPBZWcoxcCw7NTm6ogOSkrZvqdr16zktK1
+puEa+S1BaYEUtLS17Yk9zvupnTVCRLEcFHOBzyoBNZox1S2PbYTfgE1X4z/FhHXa
+icYwu+uPyyIIoK6q8QNsOktNCaUOcsZWayFCTiMlFGiudgp8DAdwZPmaL/YFOSbG
+DI8Zf0NebvRbFS/bYV3mZy8/CJT5YLSYMdp08YSTcU1f+2BY0fvEwW2JorsgH51x
+kcsymxM9Pn2SUjWskpSi0xjCfMfqr3YFFt1nJ8J+HAciIfNAChs0B0QTwoRqjt8Z
+Wr9/6x3iGjjRXK9HkmuAtTClyY3YqzGBH9/CZjfTk6mFhnll0g==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UE
+BhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWdu
+IFNpbHZlciBDQSAtIEcyMB4XDTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0Nlow
+RzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMY
+U3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
+MIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644N0Mv
+Fz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7br
+YT7QbNHm+/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieF
+nbAVlDLaYQ1HTWBCrpJH6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH
+6ATK72oxh9TAtvmUcXtnZLi2kUpCe2UuMGoM9ZDulebyzYLs2aFK7PayS+VFheZt
+eJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5hqAaEuSh6XzjZG6k4sIN/
+c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5FZGkECwJ
+MoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRH
+HTBsROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTf
+jNFusB3hB48IHpmccelM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb6
+5i/4z3GcRm25xBWNOHkDRUjvxF3XCO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOB
+rDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU
+F6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRBtjpbO8tFnb0c
+wpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0
+cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIB
+AHPGgeAn0i0P4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShp
+WJHckRE1qTodvBqlYJ7YH39FkWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9
+xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L3XWgwF15kIwb4FDm3jH+mHtwX6WQ
+2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx/uNncqCxv1yL5PqZ
+IseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFaDGi8
+aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2X
+em1ZqSqPe97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQR
+dAtq/gsD/KNVV4n+SsuuWxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/
+OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJDIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+
+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ubDgEj8Z+7fNzcbBGXJbLy
+tGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIF2TCCA8GgAwIBAgIQXAuFXAvnWUHfV8w/f52oNjANBgkqhkiG9w0BAQUFADBk
+MQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0
+YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3Qg
+Q0EgMTAeFw0wNTA4MTgxMjA2MjBaFw0yNTA4MTgyMjA2MjBaMGQxCzAJBgNVBAYT
+AmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGlnaXRhbCBDZXJ0aWZp
+Y2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAxMIICIjAN
+BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0LmwqAzZuz8h+BvVM5OAFmUgdbI9
+m2BtRsiMMW8Xw/qabFbtPMWRV8PNq5ZJkCoZSx6jbVfd8StiKHVFXqrWW/oLJdih
+FvkcxC7mlSpnzNApbjyFNDhhSbEAn9Y6cV9Nbc5fuankiX9qUvrKm/LcqfmdmUc/
+TilftKaNXXsLmREDA/7n29uj/x2lzZAeAR81sH8A25Bvxn570e56eqeqDFdvpG3F
+EzuwpdntMhy0XmeLVNxzh+XTF3xmUHJd1BpYwdnP2IkCb6dJtDZd0KTeByy2dbco
+kdaXvij1mB7qWybJvbCXc9qukSbraMH5ORXWZ0sKbU/Lz7DkQnGMU3nn7uHbHaBu
+HYwadzVcFh4rUx80i9Fs/PJnB3r1re3WmquhsUvhzDdf/X/NTa64H5xD+SpYVUNF
+vJbNcA78yeNmuk6NO4HLFWR7uZToXTNShXEuT46iBhFRyePLoW4xCGQMwtI89Tbo
+19AOeCMgkckkKmUpWyL3Ic6DXqTz3kvTaI9GdVyDCW4pa8RwjPWd1yAv/0bSKzjC
+L3UcPX7ape8eYIVpQtPM+GP+HkM5haa2Y0EQs3MevNP6yn0WR+Kn1dCjigoIlmJW
+bjTb2QK5MHXjBNLnj8KwEUAKrNVxAmKLMb7dxiNYMUJDLXT5xp6mig/p/r+D5kNX
+JLrvRjSq1xIBOO0CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0hBBYw
+FDASBgdghXQBUwABBgdghXQBUwABMBIGA1UdEwEB/wQIMAYBAf8CAQcwHwYDVR0j
+BBgwFoAUAyUv3m+CATpcLNwroWm1Z9SM0/0wHQYDVR0OBBYEFAMlL95vggE6XCzc
+K6FptWfUjNP9MA0GCSqGSIb3DQEBBQUAA4ICAQA1EMvspgQNDQ/NwNurqPKIlwzf
+ky9NfEBWMXrrpA9gzXrzvsMnjgM+pN0S734edAY8PzHyHHuRMSG08NBsl9Tpl7Ik
+Vh5WwzW9iAUPWxAaZOHHgjD5Mq2eUCzneAXQMbFamIp1TpBcahQq4FJHgmDmHtqB
+sfsUC1rxn9KVuj7QG9YVHaO+htXbD8BJZLsuUBlL0iT43R4HVtA4oJVwIHaM190e
+3p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtlvrsR
+ls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ip
+mXeascClOS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HH
+b6D0jqTsNFFbjCYDcKF31QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksf
+rK/7DZBaZmBwXarNeNQk7shBoJMBkpxqnvy5JMWzFYJ+vq6VK+uxwNrjAWALXmms
+hFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCyx/yP2FS1k2Kdzs9Z+z0Y
+zirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMWNY6E0F/6
+MBr1mmz0DlP5OlvRHA==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEKzCCAxOgAwIBAgIEOsylTDANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJE
+SzEVMBMGA1UEChMMVERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQg
+Um9vdCBDQTAeFw0wMTA0MDUxNjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNV
+BAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJuZXQxHTAbBgNVBAsTFFREQyBJbnRl
+cm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxLhA
+vJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20jxsNu
+Zp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a
+0vnRrEvLznWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2PeAG3WiAfAzc1
+4izbSysseLlJ28TQx5yc5IogCSEWVmb/Bexb4/DPqyQkXsN/cHoSxNK1EKC2IeGN
+eGlVRGn1ypYcNIUXJXfi9i8nmHj9eQY6otZaQ8H/7AQ77hPv01ha/5Lr7K7a8jcD
+R0G2l8ktCkEiu7vmpwIDAQABo4IBJTCCASEwEQYJYIZIAYb4QgEBBAQDAgAHMGUG
+A1UdHwReMFwwWqBYoFakVDBSMQswCQYDVQQGEwJESzEVMBMGA1UEChMMVERDIElu
+dGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTENMAsGA1UEAxME
+Q1JMMTArBgNVHRAEJDAigA8yMDAxMDQwNTE2MzMxN1qBDzIwMjEwNDA1MTcwMzE3
+WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUbGQBx/2FbazI2p5QCIUItTxWqFAw
+HQYDVR0OBBYEFGxkAcf9hW2syNqeUAiFCLU8VqhQMAwGA1UdEwQFMAMBAf8wHQYJ
+KoZIhvZ9B0EABBAwDhsIVjUuMDo0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4IBAQBO
+Q8zR3R0QGwZ/t6T609lN+yOfI1Rb5osvBCiLtSdtiaHsmGnc540mgwV5dOy0uaOX
+wTUA/RXaOYE6lTGQ3pfphqiZdwzlWqCE/xIWrG64jcN7ksKsLtB9KOy282A4aW8+
+2ARVPp7MVdK6/rtHBNcK2RYKNCn1WBPVT8+PVkuzHu7TmHnaCB4Mb7j4Fifvwm89
+9qNLPg7kbWzbO0ESm70NRyN/PErQr8Cv9u8btRXE64PECV90i9kR+8JWsTz4cMo0
+jUNAE4z9mQNUecYu6oah9jrUCbz0vGbMPVjQV0kK7iXiQe4T+Zs4NNEA9X7nlB38
+aQNiuJkFBT1reBK9sG9l
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFGTCCBAGgAwIBAgIEPki9xDANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJE
+SzEMMAoGA1UEChMDVERDMRQwEgYDVQQDEwtUREMgT0NFUyBDQTAeFw0wMzAyMTEw
+ODM5MzBaFw0zNzAyMTEwOTA5MzBaMDExCzAJBgNVBAYTAkRLMQwwCgYDVQQKEwNU
+REMxFDASBgNVBAMTC1REQyBPQ0VTIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEArGL2YSCyz8DGhdfjeebM7fI5kqSXLmSjhFuHnEz9pPPEXyG9VhDr
+2y5h7JNp46PMvZnDBfwGuMo2HP6QjklMxFaaL1a8z3sM8W9Hpg1DTeLpHTk0zY0s
+2RKY+ePhwUp8hjjEqcRhiNJerxomTdXkoCJHhNlktxmW/OwZ5LKXJk5KTMuPJItU
+GBxIYXvViGjaXbXqzRowwYCDdlCqT9HU3Tjw7xb04QxQBr/q+3pJoSgrHPb8FTKj
+dGqPqcNiKXEx5TukYBdedObaE+3pHx8b0bJoc8YQNHVGEBDjkAB2QMuLt0MJIf+r
+TpPGWOmlgtt3xDqZsXKVSQTwtyv6e1mO3QIDAQABo4ICNzCCAjMwDwYDVR0TAQH/
+BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwgewGA1UdIASB5DCB4TCB3gYIKoFQgSkB
+AQEwgdEwLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuY2VydGlmaWthdC5kay9yZXBv
+c2l0b3J5MIGdBggrBgEFBQcCAjCBkDAKFgNUREMwAwIBARqBgUNlcnRpZmlrYXRl
+ciBmcmEgZGVubmUgQ0EgdWRzdGVkZXMgdW5kZXIgT0lEIDEuMi4yMDguMTY5LjEu
+MS4xLiBDZXJ0aWZpY2F0ZXMgZnJvbSB0aGlzIENBIGFyZSBpc3N1ZWQgdW5kZXIg
+T0lEIDEuMi4yMDguMTY5LjEuMS4xLjARBglghkgBhvhCAQEEBAMCAAcwgYEGA1Ud
+HwR6MHgwSKBGoESkQjBAMQswCQYDVQQGEwJESzEMMAoGA1UEChMDVERDMRQwEgYD
+VQQDEwtUREMgT0NFUyBDQTENMAsGA1UEAxMEQ1JMMTAsoCqgKIYmaHR0cDovL2Ny
+bC5vY2VzLmNlcnRpZmlrYXQuZGsvb2Nlcy5jcmwwKwYDVR0QBCQwIoAPMjAwMzAy
+MTEwODM5MzBagQ8yMDM3MDIxMTA5MDkzMFowHwYDVR0jBBgwFoAUYLWF7FZkfhIZ
+J2cdUBVLc647+RIwHQYDVR0OBBYEFGC1hexWZH4SGSdnHVAVS3OuO/kSMB0GCSqG
+SIb2fQdBAAQQMA4bCFY2LjA6NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEACrom
+JkbTc6gJ82sLMJn9iuFXehHTuJTXCRBuo7E4A9G28kNBKWKnctj7fAXmMXAnVBhO
+inxO5dHKjHiIzxvTkIvmI/gLDjNDfZziChmPyQE+dF10yYscA+UYyAFMP8uXBV2Y
+caaYb7Z8vTd/vuGTJW1v8AqtFxjhA7wHKcitJuj4YfD9IQl+mo6paH1IYnK9AOoB
+mbgGglGBTvH1tJFUuSN6AJqfXY3gPGS5GhKSKseCRHI53OI8xthV9RVOyAUO28bQ
+YqbsFbS1AoLbrIyigfCbmTH1ICCoiGEKB5+U/NDXG8wuF/MEJ3Zn61SD/aSQfgY9
+BKNDLdr8C2LqL19iUw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIID+zCCAuOgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBtzE/MD0GA1UEAww2VMOc
+UktUUlVTVCBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
+c8SxMQswCQYDVQQGDAJUUjEPMA0GA1UEBwwGQU5LQVJBMVYwVAYDVQQKDE0oYykg
+MjAwNSBUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8
+dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjAeFw0wNTA1MTMxMDI3MTdaFw0xNTAz
+MjIxMDI3MTdaMIG3MT8wPQYDVQQDDDZUw5xSS1RSVVNUIEVsZWt0cm9uaWsgU2Vy
+dGlmaWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLExCzAJBgNVBAYMAlRSMQ8wDQYD
+VQQHDAZBTktBUkExVjBUBgNVBAoMTShjKSAyMDA1IFTDnFJLVFJVU1QgQmlsZ2kg
+xLBsZXRpxZ9pbSB2ZSBCaWxpxZ9pbSBHw7x2ZW5sacSfaSBIaXptZXRsZXJpIEEu
+xZ4uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAylIF1mMD2Bxf3dJ7
+XfIMYGFbazt0K3gNfUW9InTojAPBxhEqPZW8qZSwu5GXyGl8hMW0kWxsE2qkVa2k
+heiVfrMArwDCBRj1cJ02i67L5BuBf5OI+2pVu32Fks66WJ/bMsW9Xe8iSi9BB35J
+YbOG7E6mQW6EvAPs9TscyB/C7qju6hJKjRTP8wrgUDn5CDX4EVmt5yLqS8oUBt5C
+urKZ8y1UiBAG6uEaPj1nH/vO+3yC6BFdSsG5FOpU2WabfIl9BJpiyelSPJ6c79L1
+JuTm5Rh8i27fbMx4W09ysstcP4wFjdFMjK2Sx+F4f2VsSQZQLJ4ywtdKxnWKWU51
+b0dewQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAV
+9VX/N5aAWSGk/KEVTCD21F/aAyT8z5Aa9CEKmu46sWrv7/hg0Uw2ZkUd82YCdAR7
+kjCo3gp2D++Vbr3JN+YaDayJSFvMgzbC9UZcWYJWtNX+I7TYVBxEq8Sn5RTOPEFh
+fEPmzcSBCYsk+1Ql1haolgxnB2+zUEfjHCQo3SqYpGH+2+oSN7wBGjSFvW5P55Fy
+B0SFHljKVETd96y5y4khctuPwGkplyqjrhgjlxxBKot8KsF8kOipKMDTkcatKIdA
+aLX/7KfS0zgYnNN9aV3wxqUeJBujR/xpB2jn5Jq07Q+hh4cCzofSSE7hvP/L8XKS
+RGQDJereW26fyfJOrN3H
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEPDCCAySgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvjE/MD0GA1UEAww2VMOc
+UktUUlVTVCBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
+c8SxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xS
+S1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kg
+SGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwHhcNMDUxMTA3MTAwNzU3
+WhcNMTUwOTE2MTAwNzU3WjCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBFbGVrdHJv
+bmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJU
+UjEPMA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSw
+bGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWe
+LiAoYykgS2FzxLFtIDIwMDUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQCpNn7DkUNMwxmYCMjHWHtPFoylzkkBH3MOrHUTpvqeLCDe2JAOCtFp0if7qnef
+J1Il4std2NiDUBd9irWCPwSOtNXwSadktx4uXyCcUHVPr+G1QRT0mJKIx+XlZEdh
+R3n9wFHxwZnn3M5q+6+1ATDcRhzviuyV79z/rxAc653YsKpqhRgNF8k+v/Gb0AmJ
+Qv2gQrSdiVFVKc8bcLyEVK3BEx+Y9C52YItdP5qtygy/p1Zbj3e41Z55SZI/4PGX
+JHpsmxcPbe9TmJEr5A++WXkHeLuXlfSfadRYhwqp48y2WBmfJiGxxFmNskF1wK1p
+zpwACPI2/z7woQ8arBT9pmAPAgMBAAGjQzBBMB0GA1UdDgQWBBTZN7NOBf3Zz58S
+Fq62iS/rJTqIHDAPBgNVHQ8BAf8EBQMDBwYAMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQEFBQADggEBAHJglrfJ3NgpXiOFX7KzLXb7iNcX/nttRbj2hWyfIvwq
+ECLsqrkw9qtY1jkQMZkpAL2JZkH7dN6RwRgLn7Vhy506vvWolKMiVW4XSf/SKfE4
+Jl3vpao6+XF75tpYHdN0wgH6PmlYX63LaL4ULptswLbcoCb6dxriJNoaN+BnrdFz
+gw2lGh1uEpJ+hGIAF728JRhX8tepb1mIvDS3LoV4nZbcFMMsilKbloxSZj2GFotH
+uFEJjOp9zYhys2AzsfAKRO8P9Qk3iCQOLGsgOqL6EfJANZxEaGM7rDNvY7wsu/LS
+y3Z9fYjYHcgFHW68lKlmjHdxx/qR+i9Rnuk5UrbnBEI=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/
+MQswCQYDVQQGEwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmlj
+YXRpb24gQXV0aG9yaXR5MB4XDTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1ow
+PzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dvdmVybm1lbnQgUm9vdCBDZXJ0aWZp
+Y2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB
+AJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qNw8XR
+IePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1q
+gQdW8or5BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKy
+yhwOeYHWtXBiCAEuTk8O1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAts
+F/tnyMKtsc2AtJfcdgEWFelq16TheEfOhtX7MfP6Mb40qij7cEwdScevLJ1tZqa2
+jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wovJ5pGfaENda1UhhXcSTvx
+ls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7Q3hub/FC
+VGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHK
+YS1tB6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoH
+EgKXTiCQ8P8NHuJBO9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThN
+Xo+EHWbNxWCWtFJaBYmOlXqYwZE8lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1Ud
+DgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNVHRMEBTADAQH/MDkGBGcqBwAE
+MTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg209yewDL7MTqK
+UWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ
+TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyf
+qzvS/3WXy6TjZwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaK
+ZEk9GhiHkASfQlK3T8v+R0F2Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFE
+JPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlUD7gsL0u8qV1bYH+Mh6XgUmMqvtg7
+hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6QzDxARvBMB1uUO07+1
+EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+HbkZ6Mm
+nD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WX
+udpVBrkk7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44Vbnz
+ssQwmSNOXfJIoRIM3BKQCZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDe
+LMDDav7v3Aun+kbfYNucpllQdSNpc5Oy+fwC00fmcc4QAu4njIT/rEUNE1yDMuAl
+pYYsfPQS
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
+VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
+dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
+MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
+MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
+A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
+b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
+cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
+bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
+VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
+ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
+uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
+9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
+hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
+pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
+FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
+VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
+MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx
+MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
+DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3
+dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl
+cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3
+DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
+gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91
+yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX
+L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj
+EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG
+7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e
+QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ
+qdq5snUb9kLy78fyGPmJvKP/iiMucEc=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCB
+kzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
+Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
+dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3Jw
+IFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBaMIGTMQswCQYDVQQG
+EwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYD
+VQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cu
+dXNlcnRydXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNvcnAgU0dDMIIBIjAN
+BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3+5YEKIrblXEjr8uRgnn4AgPLit6
+E5Qbvfa2gI5lBZMAHryv4g+OGQ0SR+ysraP6LnD43m77VkIVni5c7yPeIbkFdicZ
+D0/Ww5y0vpQZY/KmEQrrU0icvvIpOxboGqBMpsn0GFlowHDyUwDAXlCCpVZvNvlK
+4ESGoE1O1kduSUrLZ9emxAW5jh70/P/N5zbgnAVssjMiFdC04MwXwLLA9P4yPykq
+lXvY8qdOD1R8oQ2AswkDwf9c3V6aPryuvEeKaq5xyh+xKrhfQgUL7EYw0XILyulW
+bfXv33i+Ybqypa4ETLyorGkVl73v67SMvzX41MPRKA5cOp9wGDMgd8SirwIDAQAB
+o4GrMIGoMAsGA1UdDwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRT
+MtGzz3/64PGgXYVOktKeRR20TzA9BgNVHR8ENjA0MDKgMKAuhixodHRwOi8vY3Js
+LnVzZXJ0cnVzdC5jb20vVVROLURBVEFDb3JwU0dDLmNybDAqBgNVHSUEIzAhBggr
+BgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3DQEBBQUAA4IB
+AQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft
+Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyj
+j98C5OBxOvG0I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVH
+KWss5nbZqSl9Mt3JNjy9rjXxEZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv
+2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwPDPafepE39peC4N1xaf92P2BNPM/3
+mfnGV/TJVTl4uix5yaaIK/QI
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEojCCA4qgAwIBAgIQRL4Mi1AAJLQR0zYlJWfJiTANBgkqhkiG9w0BAQUFADCB
+rjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
+Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
+dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xNjA0BgNVBAMTLVVUTi1VU0VSRmlyc3Qt
+Q2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBFbWFpbDAeFw05OTA3MDkxNzI4NTBa
+Fw0xOTA3MDkxNzM2NThaMIGuMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAV
+BgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5l
+dHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cudXNlcnRydXN0LmNvbTE2MDQGA1UE
+AxMtVVROLVVTRVJGaXJzdC1DbGllbnQgQXV0aGVudGljYXRpb24gYW5kIEVtYWls
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsjmFpPJ9q0E7YkY3rs3B
+YHW8OWX5ShpHornMSMxqmNVNNRm5pELlzkniii8efNIxB8dOtINknS4p1aJkxIW9
+hVE1eaROaJB7HHqkkqgX8pgV8pPMyaQylbsMTzC9mKALi+VuG6JG+ni8om+rWV6l
+L8/K2m2qL+usobNqqrcuZzWLeeEeaYji5kbNoKXqvgvOdjp6Dpvq/NonWz1zHyLm
+SGHGTPNpsaguG7bUMSAsvIKKjqQOpdeJQ/wWWq8dcdcRWdq6hw2v+vPhwvCkxWeM
+1tZUOt4KpLoDd7NlyP0e03RiqhjKaJMeoYV+9Udly/hNVyh00jT/MLbu9mIwFIws
+6wIDAQABo4G5MIG2MAsGA1UdDwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1Ud
+DgQWBBSJgmd9xJ0mcABLtFBIfN49rgRufTBYBgNVHR8EUTBPME2gS6BJhkdodHRw
+Oi8vY3JsLnVzZXJ0cnVzdC5jb20vVVROLVVTRVJGaXJzdC1DbGllbnRBdXRoZW50
+aWNhdGlvbmFuZEVtYWlsLmNybDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUH
+AwQwDQYJKoZIhvcNAQEFBQADggEBALFtYV2mGn98q0rkMPxTbyUkxsrt4jFcKw7u
+7mFVbwQ+zznexRtJlOTrIEy05p5QLnLZjfWqo7NK2lYcYJeA3IKirUq9iiv/Cwm0
+xtcgBEXkzYABurorbs6q15L+5K/r9CYdFip/bDCVNy8zEqx/3cfREYxRmLLQo5HQ
+rfafnoOTHh1CuEava2bwm3/q4wMC5QJRwarVNZ1yQAOJujEdxRBoUp7fooXFXAim
+eOZTT7Hot9MUnpOmw2TjrH5xzbyf6QMbzPvprDHBr3wVdAKZw7JHpsIyYdfHb0gk
+USeh1YdV8nuPmD0Wnu51tvjQjvLzxq4oW6fw8zYX/MMF08oDSlQ=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB
+lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
+Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
+dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt
+SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG
+A1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEe
+MBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8v
+d3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdh
+cmUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn
+0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlIwrthdBKWHTxqctU8EGc6Oe0rE81m65UJ
+M6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFdtqdt++BxF2uiiPsA3/4a
+MXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8i4fDidNd
+oI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqI
+DsjfPe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9Ksy
+oUhbAgMBAAGjgbkwgbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYD
+VR0OBBYEFKFyXyYbKJhDlV0HN9WFlp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0
+dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy
+bDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUFBwMGBggrBgEF
+BQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM
+//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28Gpgoiskli
+CE7/yMgUsogWXecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gE
+CJChicsZUN/KHAG8HQQZexB2lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t
+3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kniCrVWFCVH/A7HFe7fRQ5YiuayZSS
+KqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67nfhmqA==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIyMjM0OFoXDTE5MDYy
+NTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9Y
+LqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIiGQj4/xEjm84H9b9pGib+
+TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCmDuJWBQ8Y
+TfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0
+LBwGlN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLW
+I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw
+nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
+IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
+BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
+aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
+9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
+NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
+azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
+YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
+Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
+cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY
+dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9
+WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
+v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v
+UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu
+IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
+W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB
+yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
+ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp
+U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW
+ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL
+MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
+ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2ln
+biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
+U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y
+aXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvJAgIKXo1
+nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKzj/i5Vbex
+t0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIz
+SdhDY2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQG
+BO+QueQA5N06tRn/Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+
+rCpSx4/VBEnkjWNHiDxpg8v+R70rfk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/
+NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E
+BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH
+BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
+aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv
+MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE
+p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y
+5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK
+WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ
+4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N
+hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCED9pHoGc8JpK83P/uUii5N0wDQYJKoZIhvcNAQEFBQAwXzELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
+cyAxIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
+MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
+BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAxIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
+ADCBiQKBgQDlGb9to1ZhLZlIcfZn3rmN67eehoAKkQ76OCWvRoiC5XOooJskXQ0f
+zGVuDLDQVoQYh5oGmxChc9+0WDlrbsH2FdWoqD+qEgaNMax/sDTXjzRniAnNFBHi
+TkVWaR94AoDa3EeRKbs2yWNcxeDXLYd7obcysHswuiovMaruo2fa2wIDAQABMA0G
+CSqGSIb3DQEBBQUAA4GBAFgVKTk8d6PaXCUDfGD67gmZPCcQcMgMCeazh88K4hiW
+NWLMv5sneYlfycQJ9M61Hd8qveXbhpxoJeUwfLaJFf5n0a3hUKw8fGJLj7qE1xIV
+Gx/KXQ/BUpQqEZnae88MNhPVNdwQGVnqlMEAv3WP2fr9dgTbYruQagPZRjXZ+Hxb
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEEzH6qqYPnHTkxD4PTqJkZIwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgMSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgdk4xWArzZbxpvUjZudVYK
+VdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIqWpDBucSm
+Fc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAKlPww3HZ74sy9mozS11534Vnjty637rXC0J
+h9ZrbWB85a7FkCMMXErQr7Fd88e2CtvgFZMN3QO8x3aKtd1Pw5sTdbgBwObJW2ul
+uIncrKTdcu1OofdPvAbT6shkdHvClUGcZXNY8ZCaPGqxmMnEh7zPRW1F4m4iP/68
+DzFc6PLZ
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN2E1Lm0+afY8wR4
+nN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/EbRrsC+MO
+8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjV
+ojYJrKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjb
+PG7PoBMAGrgnoeS+Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP2
+6KbqxzcSXKMpHgLZ2x87tNcPVkeBFQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vr
+n5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAq2aN17O6x5q25lXQBfGfMY1a
+qtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/Ny9Sn2WCVhDr4
+wTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3
+ns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrs
+pSCAaWihT37ha88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4
+E1Z5T21Q6huwtVexN2ZYI/PcD98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0Ns
+YXNzIDIgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH
+MjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9y
+aXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazAe
+Fw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJVUzEX
+MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGlj
+IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMx
+KGMpIDE5OTggVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
+eTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjxnNuX6Zr8wgQGE75fUsjM
+HiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRCwiNPStjw
+DqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cC
+AwEAATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9ji
+nb3/7aHmZuovCfTK1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAX
+rXfMSTWqz9iP0b63GJZHc2pUIjRkLbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnIn
+jBJ7xUS0rg==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVy
+aVNpZ24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24s
+IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNp
+Z24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
+eSAtIEczMB4XDTk5MTAwMTAwMDAwMFoXDTM2MDcxNjIzNTk1OVowgcoxCzAJBgNV
+BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNp
+Z24gVHJ1c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIElu
+Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24g
+Q2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt
+IEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArwoNwtUs22e5LeWU
+J92lvuCwTY+zYVY81nzD9M0+hsuiiOLh2KRpxbXiv8GmR1BeRjmL1Za6tW8UvxDO
+JxOeBUebMXoT2B/Z0wI3i60sR/COgQanDTAM6/c8DyAd3HJG7qUCyFvDyVZpTMUY
+wZF7C9UTAJu878NIPkZgIIUq1ZC2zYugzDLdt/1AVbJQHFauzI13TccgTacxdu9o
+koqQHgiBVrKtaaNS0MscxCM9H5n+TOgWY47GCI72MfbS+uV23bUckqNJzc0BzWjN
+qWm6o+sdDZykIKbBoMXRRkwXbdKsZj+WjOCE1Db/IlnF+RFgqF8EffIa9iVCYQ/E
+Srg+iQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA0JhU8wI1NQ0kdvekhktdmnLfe
+xbjQ5F1fdiLAJvmEOjr5jLX77GDx6M4EsMjdpwOPMPOY36TmpDHf0xwLRtxyID+u
+7gU8pDM/CzmscHhzS5kr3zDCVLCoO1Wh/hYozUK9dG6A2ydEp85EXdQbkJgNHkKU
+sQAsBNB0owIFImNjzYO1+8FtYmtpdf1dcEG59b98377BMnMiIYtYgXsVkXq642RI
+sH/7NiXaldDxJBQX3RiAa0YjOVT1jmIJBB2UkKab5iXiQkWquJCtvgiPqQtCGJTP
+cjnhsUPgKM+351psE2tJs//jGHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
+cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
+MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
+BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
+ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
+BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
+I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
+CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
+lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
+AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
+BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
+c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
+MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
+emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
+DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
+FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg
+UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
+YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
+MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4
+pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0
+13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID
+AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk
+U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i
+F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY
+oJ2daZH9
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b
+N3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t
+KmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu
+kxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm
+CC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ
+Xwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu
+imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te
+2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe
+DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
+/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p
+F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt
+TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
+cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
+LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
+aWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
+VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
+aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
+bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
+IENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1
+GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ
++mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0Gbd
+U6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLm
+NxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XY
+ufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/
+ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1
+CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq
+g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
+fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c
+2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/
+bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBr
+MQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRl
+cm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv
+bW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2WhcNMjIwNjI0MDAxNjEyWjBrMQsw
+CQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5h
+dGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1l
+cmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h
+2mCxlCfLF9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4E
+lpF7sDPwsRROEW+1QK8bRaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdV
+ZqW1LS7YgFmypw23RuwhY/81q6UCzyr0TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq
+299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI/k4+oKsGGelT84ATB+0t
+vz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzsGHxBvfaL
+dXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD
+AgEGMB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUF
+AAOCAQEAX/FBfXxcCLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcR
+zCSs00Rsca4BIGsDoo8Ytyk6feUWYFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3
+LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pzzkWKsKZJ/0x9nXGIxHYdkFsd
+7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBuYQa7FkKMcPcw
+++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt
+398znM/jra6O1I7mT1GvFpLgXPYHDw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMx
+IDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxs
+cyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9v
+dCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDcxMjEzMTcwNzU0WhcNMjIxMjE0
+MDAwNzU0WjCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdl
+bGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQD
+DC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDub7S9eeKPCCGeOARBJe+r
+WxxTkqxtnt3CxC5FlAM1iGd0V+PfjLindo8796jE2yljDpFoNoqXjopxaAkH5OjU
+Dk/41itMpBb570OYj7OeUt9tkTmPOL13i0Nj67eT/DBMHAGTthP796EfvyXhdDcs
+HqRePGj4S78NuR4uNuip5Kf4D8uCdXw1LSLWwr8L87T8bJVhHlfXBIEyg1J55oNj
+z7fLY4sR4r1e6/aN7ZVyKLSsEmLpSjPmgzKuBXWVvYSV2ypcm44uDLiBK0HmOFaf
+SZtsdvqKXfcBeYF8wYNABf5x/Qw/zE5gCQ5lRxAvAcAFP4/4s0HvWkJ+We/Slwxl
+AgMBAAGjggE0MIIBMDAPBgNVHRMBAf8EBTADAQH/MDkGA1UdHwQyMDAwLqAsoCqG
+KGh0dHA6Ly9jcmwucGtpLndlbGxzZmFyZ28uY29tL3dzcHJjYS5jcmwwDgYDVR0P
+AQH/BAQDAgHGMB0GA1UdDgQWBBQmlRkQ2eihl5H/3BnZtQQ+0nMKajCBsgYDVR0j
+BIGqMIGngBQmlRkQ2eihl5H/3BnZtQQ+0nMKaqGBi6SBiDCBhTELMAkGA1UEBhMC
+VVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNX
+ZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMg
+Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEB
+ALkVsUSRzCPIK0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd
+/ZDJPHV3V3p9+N701NX3leZ0bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pB
+A4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSljqHyita04pO2t/caaH/+Xc/77szWn
+k4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+esE2fDbbFwRnzVlhE9
+iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJtylv
+2G0xffX8oRAHh84vWdw+WNs=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIID5TCCAs2gAwIBAgIEOeSXnjANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UEBhMC
+VVMxFDASBgNVBAoTC1dlbGxzIEZhcmdvMSwwKgYDVQQLEyNXZWxscyBGYXJnbyBD
+ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEvMC0GA1UEAxMmV2VsbHMgRmFyZ28gUm9v
+dCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDAxMDExMTY0MTI4WhcNMjEwMTE0
+MTY0MTI4WjCBgjELMAkGA1UEBhMCVVMxFDASBgNVBAoTC1dlbGxzIEZhcmdvMSww
+KgYDVQQLEyNXZWxscyBGYXJnbyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEvMC0G
+A1UEAxMmV2VsbHMgRmFyZ28gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEi
+MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVqDM7Jvk0/82bfuUER84A4n13
+5zHCLielTWi5MbqNQ1mXx3Oqfz1cQJ4F5aHiidlMuD+b+Qy0yGIZLEWukR5zcUHE
+SxP9cMIlrCL1dQu3U+SlK93OvRw6esP3E48mVJwWa2uv+9iWsWCaSOAlIiR5NM4O
+JgALTqv9i86C1y8IcGjBqAr5dE8Hq6T54oN+J3N0Prj5OEL8pahbSCOz6+MlsoCu
+ltQKnMJ4msZoGK43YjdeUXWoWGPAUe5AeH6orxqg4bB4nVCMe+ez/I4jsNtlAHCE
+AQgAFG5Uhpq6zPk3EPbg3oQtnaSFN9OH4xXQwReQfhkhahKpdv0SAulPIV4XAgMB
+AAGjYTBfMA8GA1UdEwEB/wQFMAMBAf8wTAYDVR0gBEUwQzBBBgtghkgBhvt7hwcB
+CzAyMDAGCCsGAQUFBwIBFiRodHRwOi8vd3d3LndlbGxzZmFyZ28uY29tL2NlcnRw
+b2xpY3kwDQYJKoZIhvcNAQEFBQADggEBANIn3ZwKdyu7IvICtUpKkfnRLb7kuxpo
+7w6kAOnu5+/u9vnldKTC2FJYxHT7zmu1Oyl5GFrvm+0fazbuSCUlFLZWohDo7qd/
+0D+j0MNdJu4HzMPBJCGHHt8qElNvQRbn7a6U+oxy+hNH8Dx+rn0ROhPs7fpvcmR7
+nX1/Jv16+yWt6j4pf0zjAFcysLPp7VMX2YuyFA4w6OXVE8Zkr8QA1dhYJPz1j+zx
+x32l2w8n0cbyQIjmH/ZhqPRCyLk306m+LFZ4wnKbWV01QIroTmMatukgalHizqSQ
+33ZwmVxwQ023tqcZZE6St8WRPH9IFmV7Fv3L/PvZ1dZPIWU7Sn9Ho/s=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCB
+gjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEk
+MCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRY
+UmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcx
+NDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3
+dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2Vy
+dmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS6
+38eMpSe2OAtp87ZOqCwuIR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCP
+KZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMxfoArtYzAQDsRhtDLooY2YKTVMIJt2W7Q
+DxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FEzG+gSqmUsE3a56k0enI4
+qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqsAxcZZPRa
+JSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNVi
+PvryxS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0P
+BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASs
+jVy16bYbMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0
+eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQEwDQYJKoZIhvcNAQEFBQAD
+ggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc/Kh4ZzXxHfAR
+vbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt
+qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLa
+IR9NmXmd4c8nnxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSy
+i6mx5O+aGtA9aZnuqCij4Tyz8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQ
+O+7ETPTsJ3xCwnR8gooJybQDJbw=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCB
+qTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf
+Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw
+MDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNV
+BAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3MDAwMDAwWhcNMzYw
+NzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5j
+LjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYG
+A1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsoPD7gFnUnMekz52hWXMJEEUMDSxuaPFs
+W0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ1CRfBsDMRJSUjQJib+ta
+3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGcq/gcfomk
+6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6
+Sk/KaAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94J
+NqR32HuHUETVPm4pafs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBA
+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP
+r87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU
+DW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz
+YJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
+xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2
+/qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/
+LHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7
+jVaMaA==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIIDjCCBfagAwIBAgIJAOiOtsn4KhQoMA0GCSqGSIb3DQEBBQUAMIG8MQswCQYD
+VQQGEwJVUzEQMA4GA1UECBMHSW5kaWFuYTEVMBMGA1UEBxMMSW5kaWFuYXBvbGlz
+MSgwJgYDVQQKEx9Tb2Z0d2FyZSBpbiB0aGUgUHVibGljIEludGVyZXN0MRMwEQYD
+VQQLEwpob3N0bWFzdGVyMR4wHAYDVQQDExVDZXJ0aWZpY2F0ZSBBdXRob3JpdHkx
+JTAjBgkqhkiG9w0BCQEWFmhvc3RtYXN0ZXJAc3BpLWluYy5vcmcwHhcNMDgwNTEz
+MDgwNzU2WhcNMTgwNTExMDgwNzU2WjCBvDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0luZGlhbmExFTATBgNVBAcTDEluZGlhbmFwb2xpczEoMCYGA1UEChMfU29mdHdh
+cmUgaW4gdGhlIFB1YmxpYyBJbnRlcmVzdDETMBEGA1UECxMKaG9zdG1hc3RlcjEe
+MBwGA1UEAxMVQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSUwIwYJKoZIhvcNAQkBFhZo
+b3N0bWFzdGVyQHNwaS1pbmMub3JnMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC
+CgKCAgEA3DbmR0LCxFF1KYdAw9iOIQbSGE7r7yC9kDyFEBOMKVuUY/b0LfEGQpG5
+GcRCaQi/izZF6igFM0lIoCdDkzWKQdh4s/Dvs24t3dHLfer0dSbTPpA67tfnLAS1
+fOH1fMVO73e9XKKTM5LOfYFIz2u1IiwIg/3T1c87Lf21SZBb9q1NE8re06adU1Fx
+Y0b4ShZcmO4tbZoWoXaQ4mBDmdaJ1mwuepiyCwMs43pPx93jzONKao15Uvr0wa8u
+jyoIyxspgpJyQ7zOiKmqp4pRQ1WFmjcDeJPI8L20QcgHQprLNZd6ioFl3h1UCAHx
+ZFy3FxpRvB7DWYd2GBaY7r/2Z4GLBjXFS21ZGcfSxki+bhQog0oQnBv1b7ypjvVp
+/rLBVcznFMn5WxRTUQfqzj3kTygfPGEJ1zPSbqdu1McTCW9rXRTunYkbpWry9vjQ
+co7qch8vNGopCsUK7BxAhRL3pqXTT63AhYxMfHMgzFMY8bJYTAH1v+pk1Vw5xc5s
+zFNaVrpBDyXfa1C2x4qgvQLCxTtVpbJkIoRRKFauMe5e+wsWTUYFkYBE7axt8Feo
++uthSKDLG7Mfjs3FIXcDhB78rKNDCGOM7fkn77SwXWfWT+3Qiz5dW8mRvZYChD3F
+TbxCP3T9PF2sXEg2XocxLxhsxGjuoYvJWdAY4wCAs1QnLpnwFVMCAwEAAaOCAg8w
+ggILMB0GA1UdDgQWBBQ0cdE41xU2g0dr1zdkQjuOjVKdqzCB8QYDVR0jBIHpMIHm
+gBQ0cdE41xU2g0dr1zdkQjuOjVKdq6GBwqSBvzCBvDELMAkGA1UEBhMCVVMxEDAO
+BgNVBAgTB0luZGlhbmExFTATBgNVBAcTDEluZGlhbmFwb2xpczEoMCYGA1UEChMf
+U29mdHdhcmUgaW4gdGhlIFB1YmxpYyBJbnRlcmVzdDETMBEGA1UECxMKaG9zdG1h
+c3RlcjEeMBwGA1UEAxMVQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSUwIwYJKoZIhvcN
+AQkBFhZob3N0bWFzdGVyQHNwaS1pbmMub3JnggkA6I62yfgqFCgwDwYDVR0TAQH/
+BAUwAwEB/zARBglghkgBhvhCAQEEBAMCAAcwCQYDVR0SBAIwADAuBglghkgBhvhC
+AQ0EIRYfU29mdHdhcmUgaW4gdGhlIFB1YmxpYyBJbnRlcmVzdDAwBglghkgBhvhC
+AQQEIxYhaHR0cHM6Ly9jYS5zcGktaW5jLm9yZy9jYS1jcmwucGVtMDIGCWCGSAGG
++EIBAwQlFiNodHRwczovL2NhLnNwaS1pbmMub3JnL2NlcnQtY3JsLnBlbTAhBgNV
+HREEGjAYgRZob3N0bWFzdGVyQHNwaS1pbmMub3JnMA4GA1UdDwEB/wQEAwIBBjAN
+BgkqhkiG9w0BAQUFAAOCAgEAtM294LnqsgMrfjLp3nI/yUuCXp3ir1UJogxU6M8Y
+PCggHam7AwIvUjki+RfPrWeQswN/2BXja367m1YBrzXU2rnHZxeb1NUON7MgQS4M
+AcRb+WU+wmHo0vBqlXDDxm/VNaSsWXLhid+hoJ0kvSl56WEq2dMeyUakCHhBknIP
+qxR17QnwovBc78MKYiC3wihmrkwvLo9FYyaW8O4x5otVm6o6+YI5HYg84gd1GuEP
+sTC8cTLSOv76oYnzQyzWcsR5pxVIBcDYLXIC48s9Fmq6ybgREOJJhcyWR2AFJS7v
+dVkz9UcZFu/abF8HyKZQth3LZjQl/GaD68W2MEH4RkRiqMEMVObqTFoo5q7Gt/5/
+O5aoLu7HaD7dAD0prypjq1/uSSotxdz70cbT0ZdWUoa2lOvUYFG3/B6bzAKb1B+P
++UqPti4oOxfMxaYF49LTtcYDyeFIQpvLP+QX4P4NAZUJurgNceQJcHdC2E3hQqlg
+g9cXiUPS1N2nGLar1CQlh7XU4vwuImm9rWgs/3K1mKoGnOcqarihk3bOsPN/nOHg
+T7jYhkalMwIsJWE3KpLIrIF0aGOHM3a9BX9e1dUCbb2v/ypaqknsmHlHU5H2DjRa
+yaXG67Ljxay2oHA1u8hRadDytaIybrw/oDc5fHE2pgXfDBLkFqfF1stjo5VwP+YE
+o2A=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UE
+AwwNQUNFRElDT00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00x
+CzAJBgNVBAYTAkVTMB4XDTA4MDQxODE2MjQyMloXDTI4MDQxMzE2MjQyMlowRDEW
+MBQGA1UEAwwNQUNFRElDT00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZF
+RElDT00xCzAJBgNVBAYTAkVTMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC
+AgEA/5KV4WgGdrQsyFhIyv2AVClVYyT/kGWbEHV7w2rbYgIB8hiGtXxaOLHkWLn7
+09gtn70yN78sFW2+tfQh0hOR2QetAQXW8713zl9CgQr5auODAKgrLlUTY4HKRxx7
+XBZXehuDYAQ6PmXDzQHe3qTWDLqO3tkE7hdWIpuPY/1NFgu3e3eM+SW10W2ZEi5P
+Grjm6gSSrj0RuVFCPYewMYWveVqc/udOXpJPQ/yrOq2lEiZmueIM15jO1FillUAK
+t0SdE3QrwqXrIhWYENiLxQSfHY9g5QYbm8+5eaA9oiM/Qj9r+hwDezCNzmzAv+Yb
+X79nuIQZ1RXve8uQNjFiybwCq0Zfm/4aaJQ0PZCOrfbkHQl/Sog4P75n/TSW9R28
+MHTLOO7VbKvU/PQAtwBbhTIWdjPp2KOZnQUAqhbm84F9b32qhm2tFXTTxKJxqvQU
+fecyuB+81fFOvW8XAjnXDpVCOscAPukmYxHqC9FK/xidstd7LzrZlvvoHpKuE1XI
+2Sf23EgbsCTBheN3nZqk8wwRHQ3ItBTutYJXCb8gWH8vIiPYcMt5bMlL8qkqyPyH
+K9caUPgn6C9D4zq92Fdx/c6mUlv53U3t5fZvie27k5x2IXXwkkwp9y+cAS7+UEae
+ZAwUswdbxcJzbPEHXEUkFDWug/FqTYl6+rPYLWbwNof1K1MCAwEAAaOBqjCBpzAP
+BgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKaz4SsrSbbXc6GqlPUB53NlTKxQ
+MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUprPhKytJttdzoaqU9QHnc2VMrFAw
+RAYDVR0gBD0wOzA5BgRVHSAAMDEwLwYIKwYBBQUHAgEWI2h0dHA6Ly9hY2VkaWNv
+bS5lZGljb21ncm91cC5jb20vZG9jMA0GCSqGSIb3DQEBBQUAA4ICAQDOLAtSUWIm
+fQwng4/F9tqgaHtPkl7qpHMyEVNEskTLnewPeUKzEKbHDZ3Ltvo/Onzqv4hTGzz3
+gvoFNTPhNahXwOf9jU8/kzJPeGYDdwdY6ZXIfj7QeQCM8htRM5u8lOk6e25SLTKe
+I6RF+7YuE7CLGLHdztUdp0J/Vb77W7tH1PwkzQSulgUV1qzOMPPKC8W64iLgpq0i
+5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1ThCojz2GuHURwCRi
+ipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oIKiMn
+MCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZ
+o5NjEFIqnxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6
+zqylfDJKZ0DcMDQj3dcEI2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacN
+GHk0vFQYXlPKNFHtRQrmjseCNj6nOGOpMCwXEGCSn1WHElkQwg9naRHMTh5+Spqt
+r0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3otkYNbn5XOmeUwssfnHdK
+Z05phkOTOPu220+DkdRgfks+KzgHVZhepA==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIGZjCCBE6gAwIBAgIPB35Sk3vgFeNX8GmMy+wMMA0GCSqGSIb3DQEBBQUAMHsx
+CzAJBgNVBAYTAkNPMUcwRQYDVQQKDD5Tb2NpZWRhZCBDYW1lcmFsIGRlIENlcnRp
+ZmljYWNpw7NuIERpZ2l0YWwgLSBDZXJ0aWPDoW1hcmEgUy5BLjEjMCEGA1UEAwwa
+QUMgUmHDrXogQ2VydGljw6FtYXJhIFMuQS4wHhcNMDYxMTI3MjA0NjI5WhcNMzAw
+NDAyMjE0MjAyWjB7MQswCQYDVQQGEwJDTzFHMEUGA1UECgw+U29jaWVkYWQgQ2Ft
+ZXJhbCBkZSBDZXJ0aWZpY2FjacOzbiBEaWdpdGFsIC0gQ2VydGljw6FtYXJhIFMu
+QS4xIzAhBgNVBAMMGkFDIFJhw616IENlcnRpY8OhbWFyYSBTLkEuMIICIjANBgkq
+hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAq2uJo1PMSCMI+8PPUZYILrgIem08kBeG
+qentLhM0R7LQcNzJPNCNyu5LF6vQhbCnIwTLqKL85XXbQMpiiY9QngE9JlsYhBzL
+fDe3fezTf3MZsGqy2IiKLUV0qPezuMDU2s0iiXRNWhU5cxh0T7XrmafBHoi0wpOQ
+Y5fzp6cSsgkiBzPZkc0OnB8OIMfuuzONj8LSWKdf/WU34ojC2I+GdV75LaeHM/J4
+Ny+LvB2GNzmxlPLYvEqcgxhaBvzz1NS6jBUJJfD5to0EfhcSM2tXSExP2yYe68yQ
+54v5aHxwD6Mq0Do43zeX4lvegGHTgNiRg0JaTASJaBE8rF9ogEHMYELODVoqDA+b
+MMCm8Ibbq0nXl21Ii/kDwFJnmxL3wvIumGVC2daa49AZMQyth9VXAnow6IYm+48j
+ilSH5L887uvDdUhfHjlvgWJsxS3EF1QZtzeNnDeRyPYL1epjb4OsOMLzP96a++Ej
+YfDIJss2yKHzMI+ko6Kh3VOz3vCaMh+DkXkwwakfU5tTohVTP92dsxA7SH2JD/zt
+A/X7JWR1DhcZDY8AFmd5ekD8LVkH2ZD6mq093ICK5lw1omdMEWux+IBkAC1vImHF
+rEsm5VoQgpukg3s0956JkSCXjrdCx2bD0Omk1vUgjcTDlaxECp1bczwmPS9KvqfJ
+pxAe+59QafMCAwEAAaOB5jCB4zAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE
+AwIBBjAdBgNVHQ4EFgQU0QnQ6dfOeXRU+Tows/RtLAMDG2gwgaAGA1UdIASBmDCB
+lTCBkgYEVR0gADCBiTArBggrBgEFBQcCARYfaHR0cDovL3d3dy5jZXJ0aWNhbWFy
+YS5jb20vZHBjLzBaBggrBgEFBQcCAjBOGkxMaW1pdGFjaW9uZXMgZGUgZ2FyYW50
+7WFzIGRlIGVzdGUgY2VydGlmaWNhZG8gc2UgcHVlZGVuIGVuY29udHJhciBlbiBs
+YSBEUEMuMA0GCSqGSIb3DQEBBQUAA4ICAQBclLW4RZFNjmEfAygPU3zmpFmps4p6
+xbD/CHwso3EcIRNnoZUSQDWDg4902zNc8El2CoFS3UnUmjIz75uny3XlesuXEpBc
+unvFm9+7OSPI/5jOCk0iAUgHforA1SBClETvv3eiiWdIG0ADBaGJ7M9i4z0ldma/
+Jre7Ir5v/zlXdLp6yQGVwZVR6Kss+LGGIOk/yzVb0hfpKv6DExdA7ohiZVvVO2Dp
+ezy4ydV/NgIlqmjCMRW3MGXrfx1IebHPOeJCgBbT9ZMj/EyXyVo3bHwi2ErN0o42
+gzmRkBDI8ck1fj+404HGIGQatlDCIaR43NAvO2STdPCWkPHv+wlaNECW8DYSwaN0
+jJN+Qd53i+yG2dIPPy3RzECiiWZIHiCznCNZc6lEc7wkeZBWN7PGKX6jD/EpOe9+
+XCgycDWs2rjIdWb8m0w5R44bb5tNAlQiM+9hup4phO9OSzNHdpdqy35f/RWmnkJD
+W2ZaiogN9xa5P1FlK2Zqi9E4UqLWRhH6/JocdJ6PlwsCT2TG9WjTSy3/pDceiz+/
+RL5hRqGEPQgnTIEgd4kI6mdAXmwIUV80WoyWaM3X94nCHNMyAK9Sy9NgWyo6R35r
+MDOhYil/SrnhLecUIw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxk
+BYn8eNZcLCZDqQ==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UE
+BhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8w
+MzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290
+IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDkyMjExMjIwMlowazELMAkGA1UEBhMC
+SVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1
+ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENB
+MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNv
+UTufClrJwkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX
+4ay8IMKx4INRimlNAJZaby/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9
+KK3giq0itFZljoZUj5NDKd45RnijMCO6zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/
+gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1fYVEiVRvjRuPjPdA1Yprb
+rxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2oxgkg4YQ
+51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2F
+be8lEfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxe
+KF+w6D9Fz8+vm2/7hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4F
+v6MGn8i1zeQf1xcGDXqVdFUNaBr8EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbn
+fpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5jF66CyCU3nuDuP/jVo23Eek7
+jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLYiDrIn3hm7Ynz
+ezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt
+ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQAL
+e3KHwGCmSUyIWOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70
+jsNjLiNmsGe+b7bAEzlgqqI0JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDz
+WochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKxK3JCaKygvU5a2hi/a5iB0P2avl4V
+SM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+Xlff1ANATIGk0k9j
+pwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC4yyX
+X04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+Ok
+fcvHlXHo2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7R
+K4X9p2jIugErsWx0Hbhzlefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btU
+ZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXemOR/qnuOf0GZvBeyqdn6/axag67XH/JJU
+LysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9vwGYT7JZVEc+NHt4bVaT
+LnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UE
+BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
+dCBDb21tZXJjaWFsMB4XDTEwMDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDEL
+MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp
+cm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6EqdbDuKP
+Hx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yr
+ba0F8PrVC8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPAL
+MeIrJmqbTFeurCA+ukV6BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1
+yHp52UKqK39c/s4mT6NmgTWvRLpUHhwwMmWd5jyTXlBOeuM61G7MGvv50jeuJCqr
+VwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNVHQ4EFgQUnZPGU4teyq8/
+nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ
+KoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYG
+XUPGhi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNj
+vbz4YYCanrHOQnDiqX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivt
+Z8SOyUOyXGsViQK8YvxO8rUzqrJv0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9g
+N53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0khsUlHRUe072o0EclNmsxZt9YC
+nlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UE
+BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
+dCBOZXR3b3JraW5nMB4XDTEwMDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDEL
+MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp
+cm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SEHi3y
+YJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbua
+kCNrmreIdIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRL
+QESxG9fhwoXA3hA/Pe24/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp
+6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gbh+0t+nvujArjqWaJGctB+d1ENmHP4ndG
+yH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNVHQ4EFgQUBx/S55zawm6i
+QLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ
+KoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfO
+tDIuUFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzu
+QY0x2+c06lkh1QF612S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZ
+Lgo/bNjR9eUJtGxUAArgFU2HdW23WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4u
+olu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9/ZFvgrG+CJPbFEfxojfHRZ48
+x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UE
+BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVz
+dCBQcmVtaXVtMB4XDTEwMDEyOTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkG
+A1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1U
+cnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxBLf
+qV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtnBKAQ
+JG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ
++jjeRFcV5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrS
+s8PhaJyJ+HoAVt70VZVs+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5
+HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmdGPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d7
+70O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5Rp9EixAqnOEhss/n/fauG
+V+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NIS+LI+H+S
+qHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S
+5u046uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4Ia
+C1nEWTJ3s7xgaVY5/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TX
+OwF0lkLgAOIua+rF7nKsu7/+6qqo+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYE
+FJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/
+BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByvMiPIs0laUZx2
+KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg
+Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B
+8OWycvpEgjNC6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQ
+MKSOyARiqcTtNd56l+0OOF6SL5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc
+0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK+4w1IX2COPKpVJEZNZOUbWo6xbLQ
+u4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmVBtWVyuEklut89pMF
+u+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFgIxpH
+YoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8
+GKa1qF60g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaO
+RtGdFNrHF+QFlozEJLUbzxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6e
+KeC2uAloGRwYQw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMC
+VVMxFDASBgNVBAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQ
+cmVtaXVtIEVDQzAeFw0xMDAxMjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJ
+BgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEgMB4GA1UEAwwXQWZmaXJt
+VHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQNMF4bFZ0D
+0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQN8O9
+ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0G
+A1UdDgQWBBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4G
+A1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/Vs
+aobgxCd05DhT1wV/GzTjxi+zygk8N53X57hG8f2h4nECMEJZh0PUUd+60wkyWs6I
+flc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKMeQ==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEc
+MBoGA1UEChMTSmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRp
+b25DQTAeFw0wNzEyMTIxNTAwMDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYT
+AkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zlcm5tZW50MRYwFAYDVQQLEw1BcHBs
+aWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp23gdE6H
+j6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4fl+K
+f5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55
+IrmTwcrNwVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cw
+FO5cjFW6WY2H/CPek9AEjP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDiht
+QWEjdnjDuGWk81quzMKq2edY3rZ+nYVunyoKb58DKTCXKB28t89UKU5RMfkntigm
+/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRUWssmP3HMlEYNllPqa0jQ
+k/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNVBAYTAkpQ
+MRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOC
+seODvOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
+ggEBADlqRHZ3ODrso2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJ
+hyzjVOGjprIIC8CFqMjSnHH2HZ9g/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+
+eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYDio+nEhEMy/0/ecGc/WLuo89U
+DNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmWdupwX3kSa+Sj
+B1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL
+rosot4LKGAfmt1t06SAZf7IbiVQ=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDzzCCAregAwIBAgIDAWweMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYDVQQGEwJB
+VDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBp
+bSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRkwFwYDVQQLDBBBLVRydXN0LW5R
+dWFsLTAzMRkwFwYDVQQDDBBBLVRydXN0LW5RdWFsLTAzMB4XDTA1MDgxNzIyMDAw
+MFoXDTE1MDgxNzIyMDAwMFowgY0xCzAJBgNVBAYTAkFUMUgwRgYDVQQKDD9BLVRy
+dXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGltIGVsZWt0ci4gRGF0ZW52
+ZXJrZWhyIEdtYkgxGTAXBgNVBAsMEEEtVHJ1c3QtblF1YWwtMDMxGTAXBgNVBAMM
+EEEtVHJ1c3QtblF1YWwtMDMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQCtPWFuA/OQO8BBC4SAzewqo51ru27CQoT3URThoKgtUaNR8t4j8DRE/5TrzAUj
+lUC5B3ilJfYKvUWG6Nm9wASOhURh73+nyfrBJcyFLGM/BWBzSQXgYHiVEEvc+RFZ
+znF/QJuKqiTfC0Li21a8StKlDJu3Qz7dg9MmEALP6iPESU7l0+m0iKsMrmKS1GWH
+2WrX9IWf5DMiJaXlyDO6w8dB3F/GaswADm0yqLaHNgBid5seHzTLkDx4iHQF63n1
+k3Flyp3HaxgtPVxO59X4PzF9j4fsCiIvI+n+u33J4PTs63zEsMMtYrWacdaxaujs
+2e3Vcuy+VwHOBVWf3tFgiBCzAgMBAAGjNjA0MA8GA1UdEwEB/wQFMAMBAf8wEQYD
+VR0OBAoECERqlWdVeRFPMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOC
+AQEAVdRU0VlIXLOThaq/Yy/kgM40ozRiPvbY7meIMQQDbwvUB/tOdQ/TLtPAF8fG
+KOwGDREkDg6lXb+MshOWcdzUzg4NCmgybLlBMRmrsQd7TZjTXLDR8KdCoLXEjq/+
+8T/0709GAHbrAvv5ndJAlseIOrifEXnzgGWovR/TeIGgUUw3tKZdJXDRZslo+S4R
+FGjxVJgIrCaSD96JntT6s3kr0qN51OyLrIdTaEJMUVF0HhsnLuP1Hyl0Te2v9+GS
+mYHovjrHF1D2t8b8m7CKa9aIA5GPBnc6hQLdmNVDeD/GMBWsm2vLV7eJUYs66MmE
+DNuxUCAKGkq6ahq97BvIxYSazQ==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UE
+BhMCRVMxQjBABgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1h
+cHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEy
+MzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIwQAYDVQQDDDlBdXRvcmlkYWQgZGUg
+Q2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBBNjI2MzQwNjgwggIi
+MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDDUtd9
+thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQM
+cas9UX4PB99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefG
+L9ItWY16Ck6WaVICqjaY7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15i
+NA9wBj4gGFrO93IbJWyTdBSTo3OxDqqHECNZXyAFGUftaI6SEspd/NYrspI8IM/h
+X68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyIplD9amML9ZMWGxmPsu2b
+m8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctXMbScyJCy
+Z/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirja
+EbsXLZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/T
+KI8xWVvTyQKmtFLKbpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF
+6NkBiDkal4ZkQdU7hwxu+g/GvUgUvzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVh
+OSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYD
+VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNHDhpkLzCBpgYD
+VR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp
+cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBv
+ACAAZABlACAAbABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBl
+AGwAbwBuAGEAIAAwADgAMAAxADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF
+661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx51tkljYyGOylMnfX40S2wBEqgLk9
+am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qkR71kMrv2JYSiJ0L1
+ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaPT481
+PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS
+3a/DTg4fJl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5k
+SeTy36LssUzAKh3ntLFlosS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF
+3dvd6qJ2gHN99ZwExEWN57kci57q13XRcrHedUTnQn3iV2t93Jm8PYMo6oCTjcVM
+ZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoRsaS8I8nkvof/uZS2+F0g
+StRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTDKCOM/icz
+Q0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQB
+jLMi6Et8Vcad+qMUu2WFbm5PEn4KPJ2V
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDUzCCAjugAwIBAgIBATANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEd
+MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3Mg
+Q2xhc3MgMiBDQSAxMB4XDTA2MTAxMzEwMjUwOVoXDTE2MTAxMzEwMjUwOVowSzEL
+MAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MR0wGwYD
+VQQDDBRCdXlwYXNzIENsYXNzIDIgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAIs8B0XY9t/mx8q6jUPFR42wWsE425KEHK8T1A9vNkYgxC7McXA0
+ojTTNy7Y3Tp3L8DrKehc0rWpkTSHIln+zNvnma+WwajHQN2lFYxuyHyXA8vmIPLX
+l18xoS830r7uvqmtqEyeIWZDO6i88wmjONVZJMHCR3axiFyCO7srpgTXjAePzdVB
+HfCuuCkslFJgNJQ72uA40Z0zPhX0kzLFANq1KWYOOngPIVJfAuWSeyXTkh4vFZ2B
+5J2O6O+JzhRMVB0cgRJNcKi+EAUXfh/RuFdV7c27UsKwHnjCTTZoy1YmwVLBvXb3
+WNVyfh9EdrsAiR0WnVE1703CVu9r4Iw7DekCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
+AwEB/zAdBgNVHQ4EFgQUP42aWYv8e3uco684sDntkHGA1sgwDgYDVR0PAQH/BAQD
+AgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAVGn4TirnoB6NLJzKyQJHyIdFkhb5jatLP
+gcIV1Xp+DCmsNx4cfHZSldq1fyOhKXdlyTKdqC5Wq2B2zha0jX94wNWZUYN/Xtm+
+DKhQ7SLHrQVMdvvt7h5HZPb3J31cKA9FxVxiXqaakZG3Uxcu3K1gnZZkOb1naLKu
+BctN518fV4bVIJwo+28TOPX2EZL2fZleHwzoq0QkKXJAPTZSr4xYkHPB7GEseaHs
+h7U/2k3ZIQAw3pDaDtMaSKk+hQsUi4y8QZ5q9w5wwDX3OaJdZtB7WZ+oRxKaJyOk
+LY4ng5IgodcVf/EuGO70SH8vf/GhGLWhC5SgYiAynB321O+/TIho
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEd
+MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3Mg
+Q2xhc3MgMiBSb290IENBMB4XDTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1ow
+TjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MSAw
+HgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEB
+BQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1g1Lr
+6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPV
+L4O2fuPn9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC91
+1K2GScuVr1QGbNgGE41b/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHx
+MlAQTn/0hpPshNOOvEu/XAFOBz3cFIqUCqTqc/sLUegTBxj6DvEr0VQVfTzh97QZ
+QmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeffawrbD02TTqigzXsu8lkB
+arcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgIzRFo1clr
+Us3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLi
+FRhnBkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRS
+P/TizPJhk9H9Z2vXUq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN
+9SG9dKpN6nIDSdvHXx1iY8f93ZHsM+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxP
+AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFMmAd+BikoL1Rpzz
+uvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAU18h
+9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s
+A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3t
+OluwlN5E40EIosHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo
++fsicdl9sz1Gv7SEr5AcD48Saq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7
+KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYdDnkM/crqJIByw5c/8nerQyIKx+u2
+DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWDLfJ6v9r9jv6ly0Us
+H8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0oyLQ
+I+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK7
+5t98biGCwWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h
+3PFaTWwyI0PurKju7koSCTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPz
+Y11aWOIv4x3kqdbQCtCev9eBCfHJxyYNrJgWVqA=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDUzCCAjugAwIBAgIBAjANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEd
+MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3Mg
+Q2xhc3MgMyBDQSAxMB4XDTA1MDUwOTE0MTMwM1oXDTE1MDUwOTE0MTMwM1owSzEL
+MAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MR0wGwYD
+VQQDDBRCdXlwYXNzIENsYXNzIDMgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAKSO13TZKWTeXx+HgJHqTjnmGcZEC4DVC69TB4sSveZn8AKxifZg
+isRbsELRwCGoy+Gb72RRtqfPFfV0gGgEkKBYouZ0plNTVUhjP5JW3SROjvi6K//z
+NIqeKNc0n6wv1g/xpC+9UrJJhW05NfBEMJNGJPO251P7vGGvqaMU+8IXF4Rs4HyI
++MkcVyzwPX6UvCWThOiaAJpFBUJXgPROztmuOfbIUxAMZTpHe2DC1vqRycZxbL2R
+hzyRhkmr8w+gbCZ2Xhysm3HljbybIR6c1jh+JIAVMYKWsUnTYjdbiAwKYjT+p0h+
+mbEwi5A3lRyoH6UsjfRVyNvdWQrCrXig9IsCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
+AwEB/zAdBgNVHQ4EFgQUOBTmyPCppAP0Tj4io1vy1uCtQHQwDgYDVR0PAQH/BAQD
+AgEGMA0GCSqGSIb3DQEBBQUAA4IBAQABZ6OMySU9E2NdFm/soT4JXJEVKirZgCFP
+Bdy7pYmrEzMqnji3jG8CcmPHc3ceCQa6Oyh7pEfJYWsICCD8igWKH7y6xsL+z27s
+EzNxZy5p+qksP2bAEllNC1QCkoS72xLvg3BweMhT+t/Gxv/ciC8HwEmdMldg0/L2
+mSlf56oBzKwzqBwKu5HEA6BvtjT5htOzdlSY9EqBs1OdTUDs5XcTRa9bqh/YL0yC
+e/4qxFi7T/ye/QNlGioOw6UgFpRreaaiErS7GqQjel/wroQk5PMr+4okoyeYZdow
+dXb8GZHo2+ubPzK/QJcHJrrM85SFSnonk8+QQtS4Wxam58tAA915
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEd
+MBsGA1UECgwUQnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3Mg
+Q2xhc3MgMyBSb290IENBMB4XDTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFow
+TjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBhc3MgQVMtOTgzMTYzMzI3MSAw
+HgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEB
+BQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRHsJ8Y
+ZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3E
+N3coTRiR5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9
+tznDDgFHmV0ST9tD+leh7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX
+0DJq1l1sDPGzbjniazEuOQAnFN44wOwZZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c
+/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH2xc519woe2v1n/MuwU8X
+KhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV/afmiSTY
+zIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvS
+O1UQRwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D
+34xFMFbG02SrZvPAXpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgP
+K9Dx2hzLabjKSWJtyNBjYt1gD1iqj6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3
+AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFEe4zf/lb+74suwv
+Tg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAACAj
+QTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV
+cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXS
+IGrs/CIBKM+GuIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2
+HJLw5QY33KbmkJs4j1xrG0aGQ0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsa
+O5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8ZORK15FTAaggiG6cX0S5y2CBNOxv
+033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2KSb12tjE8nVhz36u
+dmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz6MkE
+kbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg41
+3OEMXbugUZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvD
+u79leNKGef9JOxqDDPDeeOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq
+4/g7u9xN12TyUb7mqqta6THuBrxzvxNiCp/HuZc=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEDzCCAvegAwIBAgIBATANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQGEwJTSzET
+MBEGA1UEBxMKQnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UE
+AxMIQ0EgRGlzaWcwHhcNMDYwMzIyMDEzOTM0WhcNMTYwMzIyMDEzOTM0WjBKMQsw
+CQYDVQQGEwJTSzETMBEGA1UEBxMKQnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcg
+YS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQCS9jHBfYj9mQGp2HvycXXxMcbzdWb6UShGhJd4NLxs/LxFWYgmGErE
+Nx+hSkS943EE9UQX4j/8SFhvXJ56CbpRNyIjZkMhsDxkovhqFQ4/61HhVKndBpnX
+mjxUizkDPw/Fzsbrg3ICqB9x8y34dQjbYkzo+s7552oftms1grrijxaSfQUMbEYD
+XcDtab86wYqg6I7ZuUUohwjstMoVvoLdtUSLLa2GDGhibYVW8qwUYzrG0ZmsNHhW
+S8+2rT+MitcE5eN4TPWGqvWP+j1scaMtymfraHtuM6kMgiioTGohQBUgDCZbg8Kp
+FhXAJIJdKxatymP2dACw30PEEGBWZ2NFAgMBAAGjgf8wgfwwDwYDVR0TAQH/BAUw
+AwEB/zAdBgNVHQ4EFgQUjbJJaJ1yCCW5wCf1UJNWSEZx+Y8wDgYDVR0PAQH/BAQD
+AgEGMDYGA1UdEQQvMC2BE2Nhb3BlcmF0b3JAZGlzaWcuc2uGFmh0dHA6Ly93d3cu
+ZGlzaWcuc2svY2EwZgYDVR0fBF8wXTAtoCugKYYnaHR0cDovL3d3dy5kaXNpZy5z
+ay9jYS9jcmwvY2FfZGlzaWcuY3JsMCygKqAohiZodHRwOi8vY2EuZGlzaWcuc2sv
+Y2EvY3JsL2NhX2Rpc2lnLmNybDAaBgNVHSAEEzARMA8GDSuBHpGT5goAAAABAQEw
+DQYJKoZIhvcNAQEFBQADggEBAF00dGFMrzvY/59tWDYcPQuBDRIrRhCA/ec8J9B6
+yKm2fnQwM6M6int0wHl5QpNt/7EpFIKrIYwvF/k/Ji/1WcbvgAa3mkkp7M5+cTxq
+EEHA9tOasnxakZzArFvITV734VP/Q3f8nktnbNfzg9Gg4H8l37iYC5oyOGwwoPP/
+CBUz91BKez6jPiCp3C9WgArtQVCwyfTssuMmRAAOb54GvCKWU3BlxFAKRmukLyeB
+EicTXxChds6KezfqwzlhA5WYOudsiCUI/HloDYd9Yvi0X/vF2Ey9WLw/Q1vUHgFN
+PGO+I++MzVpQuGhU+QqZMxEA4Z7CRneC9VkGjCFMhwnN5ag=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFaTCCA1GgAwIBAgIJAMMDmu5QkG4oMA0GCSqGSIb3DQEBBQUAMFIxCzAJBgNV
+BAYTAlNLMRMwEQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMu
+MRkwFwYDVQQDExBDQSBEaXNpZyBSb290IFIxMB4XDTEyMDcxOTA5MDY1NloXDTQy
+MDcxOTA5MDY1NlowUjELMAkGA1UEBhMCU0sxEzARBgNVBAcTCkJyYXRpc2xhdmEx
+EzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERpc2lnIFJvb3QgUjEw
+ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCqw3j33Jijp1pedxiy3QRk
+D2P9m5YJgNXoqqXinCaUOuiZc4yd39ffg/N4T0Dhf9Kn0uXKE5Pn7cZ3Xza1lK/o
+OI7bm+V8u8yN63Vz4STN5qctGS7Y1oprFOsIYgrY3LMATcMjfF9DCCMyEtztDK3A
+fQ+lekLZWnDZv6fXARz2m6uOt0qGeKAeVjGu74IKgEH3G8muqzIm1Cxr7X1r5OJe
+IgpFy4QxTaz+29FHuvlglzmxZcfe+5nkCiKxLU3lSCZpq+Kq8/v8kiky6bM+TR8n
+oc2OuRf7JT7JbvN32g0S9l3HuzYQ1VTW8+DiR0jm3hTaYVKvJrT1cU/J19IG32PK
+/yHoWQbgCNWEFVP3Q+V8xaCJmGtzxmjOZd69fwX3se72V6FglcXM6pM6vpmumwKj
+rckWtc7dXpl4fho5frLABaTAgqWjR56M6ly2vGfb5ipN0gTco65F97yLnByn1tUD
+3AjLLhbKXEAz6GfDLuemROoRRRw1ZS0eRWEkG4IupZ0zXWX4Qfkuy5Q/H6MMMSRE
+7cderVC6xkGbrPAXZcD4XW9boAo0PO7X6oifmPmvTiT6l7Jkdtqr9O3jw2Dv1fkC
+yC2fg69naQanMVXVz0tv/wQFx1isXxYb5dKj6zHbHzMVTdDypVP1y+E9Tmgt2BLd
+qvLmTZtJ5cUoobqwWsagtQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
+DwEB/wQEAwIBBjAdBgNVHQ4EFgQUiQq0OJMa5qvum5EY+fU8PjXQ04IwDQYJKoZI
+hvcNAQEFBQADggIBADKL9p1Kyb4U5YysOMo6CdQbzoaz3evUuii+Eq5FLAR0rBNR
+xVgYZk2C2tXck8An4b58n1KeElb21Zyp9HWc+jcSjxyT7Ff+Bw+r1RL3D65hXlaA
+SfX8MPWbTx9BLxyE04nH4toCdu0Jz2zBuByDHBb6lM19oMgY0sidbvW9adRtPTXo
+HqJPYNcHKfyyo6SdbhWSVhlMCrDpfNIZTUJG7L399ldb3Zh+pE3McgODWF3vkzpB
+emOqfDqo9ayk0d2iLbYq/J8BjuIQscTK5GfbVSUZP/3oNn6z4eGBrxEWi1CXYBmC
+AMBrTXO40RMHPuq2MU/wQppt4hF05ZSsjYSVPCGvxdpHyN85YmLLW1AL14FABZyb
+7bq2ix4Eb5YgOe2kfSnbSM6C3NQCjR0EMVrHS/BsYVLXtFHCgWzN4funodKSds+x
+DzdYpPJScWc/DIh4gInByLUfkmO+p3qKViwaqKactV2zY9ATIKHrkWzQjX2v3wvk
+F7mGnjixlAxYjOBVqjtjbZqJYLhkKpLGN/R+Q0O3c+gB53+XD9fyexn9GtePyfqF
+a3qdnom2piiZk4hA9z7NUaPK6u95RyG1/jLix8NRb76AdPCkwzryT+lf3xkK8jsT
+Q6wxpLPn6/wY1gGp8yqPNg7rtLG8t0zJa7+h89n07eLw4+1knj0vllJPgFOL
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNV
+BAYTAlNLMRMwEQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMu
+MRkwFwYDVQQDExBDQSBEaXNpZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQy
+MDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sxEzARBgNVBAcTCkJyYXRpc2xhdmEx
+EzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERpc2lnIFJvb3QgUjIw
+ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbCw3Oe
+NcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNH
+PWSb6WiaxswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3I
+x2ymrdMxp7zo5eFm1tL7A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbe
+QTg06ov80egEFGEtQX6sx3dOy1FU+16SGBsEWmjGycT6txOgmLcRK7fWV8x8nhfR
+yyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqVg8NTEQxzHQuyRpDRQjrO
+QG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa5Beny912
+H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJ
+QfYEkoopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUD
+i/ZnWejBBhG93c+AAk9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORs
+nLMOPReisjQS1n6yqEm70XooQL6iFh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1
+rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
+DwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5uQu0wDQYJKoZI
+hvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM
+tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqf
+GopTpti72TVVsRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkb
+lvdhuDvEK7Z4bLQjb/D907JedR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka
++elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W81k/BfDxujRNt+3vrMNDcTa/F1bal
+TFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjxmHHEt38OFdAlab0i
+nSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01utI3
+gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18Dr
+G5gPcFw0sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3Os
+zMOl6W8KjptlwlCFtaOgUxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8x
+L4ysEr3vQCj8KWefshNPZiTEUxnpHikV7+ZtsH8tZ/3zbBt1RqPlShfppNcL
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV
+BAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4X
+DTA3MDYyOTE1MTMwNVoXDTI3MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQ
+BgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwIQ2VydGlnbmEwggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7qXOEm7RFHYeGifBZ4
+QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyHGxny
+gQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbw
+zBfsV1/pogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q
+130yGLMLLGq/jj8UEYkgDncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2
+JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKfIrjxwo1p3Po6WAbfAgMBAAGjgbwwgbkw
+DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQtCRZvgHyUtVF9lo53BEw
+ZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJBgNVBAYT
+AkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzj
+AQ/JSP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG
+9w0BAQUFAAOCAQEAhQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8h
+bV6lUmPOEvjvKtpv6zf+EwLHyzs+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFnc
+fca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1kluPBS1xp81HlDQwY9qcEQCYsuu
+HWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY1gkIl2PlwS6w
+t0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
+WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjET
+MBEGA1UEChMKQ2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxJjAk
+BgNVBAMMHUNlcnRpbm9taXMgLSBBdXRvcml0w6kgUmFjaW5lMB4XDTA4MDkxNzA4
+Mjg1OVoXDTI4MDkxNzA4Mjg1OVowYzELMAkGA1UEBhMCRlIxEzARBgNVBAoTCkNl
+cnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMSYwJAYDVQQDDB1DZXJ0
+aW5vbWlzIC0gQXV0b3JpdMOpIFJhY2luZTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
+ADCCAgoCggIBAJ2Fn4bT46/HsmtuM+Cet0I0VZ35gb5j2CN2DpdUzZlMGvE5x4jY
+F1AMnmHawE5V3udauHpOd4cN5bjr+p5eex7Ezyh0x5P1FMYiKAT5kcOrJ3NqDi5N
+8y4oH3DfVS9O7cdxbwlyLu3VMpfQ8Vh30WC8Tl7bmoT2R2FFK/ZQpn9qcSdIhDWe
+rP5pqZ56XjUl+rSnSTV3lqc2W+HN3yNw2F1MpQiD8aYkOBOo7C+ooWfHpi2GR+6K
+/OybDnT0K0kCe5B1jPyZOQE51kqJ5Z52qz6WKDgmi92NjMD2AR5vpTESOH2VwnHu
+7XSu5DaiQ3XV8QCb4uTXzEIDS3h65X27uK4uIJPT5GHfceF2Z5c/tt9qc1pkIuVC
+28+BA5PY9OMQ4HL2AHCs8MF6DwV/zzRpRbWT5BnbUhYjBYkOjUjkJW+zeL9i9Qf6
+lSTClrLooyPCXQP8w9PlfMl1I9f09bze5N/NgL+RiH2nE7Q5uiy6vdFrzPOlKO1E
+nn1So2+WLhl+HPNbxxaOu2B9d2ZHVIIAEWBsMsGoOBvrbpgT1u449fCfDu/+MYHB
+0iSVL1N6aaLwD4ZFjliCK0wi1F6g530mJ0jfJUaNSih8hp75mxpZuWW/Bd22Ql09
+5gBIgl4g9xGC3srYn+Y3RyYe63j3YcNBZFgCQfna4NH4+ej9Uji29YnfAgMBAAGj
+WzBZMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBQN
+jLZh2kS40RR9w759XkjwzspqsDAXBgNVHSAEEDAOMAwGCiqBegFWAgIAAQEwDQYJ
+KoZIhvcNAQEFBQADggIBACQ+YAZ+He86PtvqrxyaLAEL9MW12Ukx9F1BjYkMTv9s
+ov3/4gbIOZ/xWqndIlgVqIrTseYyCYIDbNc/CMf4uboAbbnW/FIyXaR/pDGUu7ZM
+OH8oMDX/nyNTt7buFHAAQCvaR6s0fl6nVjBhK4tDrP22iCj1a7Y+YEq6QpA0Z43q
+619FVDsXrIvkxmUP7tCMXWY5zjKn2BCXwH40nJ+U8/aGH88bc62UeYdocMMzpXDn
+2NU4lG9jeeu/Cg4I58UvD0KgKxRA/yHgBcUn4YQRE7rWhh1BCxMjidPJC+iKunqj
+o3M3NYB9Ergzd0A4wPpeMNLytqOx1qKVl4GbUu1pTP+A5FPbVFsDbVRfsbjvJL1v
+nxHDx2TCDyhihWZeGnuyt++uNckZM6i4J9szVb9o4XVIRFb7zdNIu0eJOqxp9YDG
+5ERQL1TEqkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWq
+pdEdnV1j6CTmNhTih60bWfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZb
+dsLLO7XSAPCjDuGtbkD326C00EauFddEwk01+dIL8hf2rGbVJLJP0RyZwG71fet0
+BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/vgt2Fl43N+bYdJeimUV5
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYT
+AlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBD
+QTAeFw0wNjA3MDQxNzIwMDRaFw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJP
+MREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTCC
+ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7IJUqOtdu0KBuqV5Do
+0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHHrfAQ
+UySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5d
+RdY4zTW2ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQ
+OA7+j0xbm0bqQfWwCHTD0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwv
+JoIQ4uNllAoEwF73XVv4EOLQunpL+943AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08C
+AwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAcYwHQYDVR0O
+BBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IBAQA+0hyJ
+LjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecY
+MnQ8SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ
+44gx+FkagQnIl6Z0x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6I
+Jd1hJyMctTEHBDa0GpC9oHRxUIltvBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNw
+i/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7NzTogVZ96edhBiIL5VaZVDADlN
+9u6wWk5JRFRYX0KD
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBM
+MSIwIAYDVQQKExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5D
+ZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBU
+cnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIyMTIwNzM3WhcNMjkxMjMxMTIwNzM3
+WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMg
+Uy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MSIw
+IAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rH
+UV+rpDKmYYe2bg+G0jACl/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LM
+TXPb865Px1bVWqeWifrzq2jUI4ZZJ88JJ7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVU
+BBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4fOQtf/WsX+sWn7Et0brM
+kUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0cvW0QM8x
+AcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNV
+HRMBAf8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNV
+HQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15y
+sHhE49wcrwn9I0j6vSrEuVUEtRCjjSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfL
+I9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1mS1FhIrlQgnXdAIv94nYmem8
+J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5ajZt3hrvJBW8qY
+VoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
+03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYD
+VQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0
+IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3
+MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xKTAnBgNVBAMTIENoYW1iZXJz
+IG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEyMjk1MFoXDTM4MDcz
+MTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBj
+dXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIw
+EAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEp
+MCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW9
+28sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKAXuFixrYp4YFs8r/lfTJq
+VKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorjh40G072Q
+DuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR
+5gN/ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfL
+ZEFHcpOrUMPrCXZkNNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05a
+Sd+pZgvMPMZ4fKecHePOjlO+Bd5gD2vlGts/4+EhySnB8esHnFIbAURRPHsl18Tl
+UlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331lubKgdaX8ZSD6e2wsWsSaR6s
++12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ0wlf2eOKNcx5
+Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj
+ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAx
+hduub+84Mxh2EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNV
+HQ4EFgQU+SSsD7K1+HnA+mCIG8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1
++HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpN
+YWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29t
+L2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVy
+ZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAt
+IDIwMDiCCQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRV
+HSAAMCowKAYIKwYBBQUHAgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20w
+DQYJKoZIhvcNAQEFBQADggIBAJASryI1wqM58C7e6bXpeHxIvj99RZJe6dqxGfwW
+PJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH3qLPaYRgM+gQDROpI9CF
+5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbURWpGqOt1
+glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaH
+FoI6M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2
+pSB7+R5KBWIBpih1YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MD
+xvbxrN8y8NmBGuScvfaAFPDRLLmF9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QG
+tjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcKzBIKinmwPQN/aUv0NCB9szTq
+jktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvGnrDQWzilm1De
+fhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
+OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZ
+d0jQ
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIID9zCCAt+gAwIBAgIESJ8AATANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMC
+Q04xMjAwBgNVBAoMKUNoaW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24g
+Q2VudGVyMUcwRQYDVQQDDD5DaGluYSBJbnRlcm5ldCBOZXR3b3JrIEluZm9ybWF0
+aW9uIENlbnRlciBFViBDZXJ0aWZpY2F0ZXMgUm9vdDAeFw0xMDA4MzEwNzExMjVa
+Fw0zMDA4MzEwNzExMjVaMIGKMQswCQYDVQQGEwJDTjEyMDAGA1UECgwpQ2hpbmEg
+SW50ZXJuZXQgTmV0d29yayBJbmZvcm1hdGlvbiBDZW50ZXIxRzBFBgNVBAMMPkNo
+aW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24gQ2VudGVyIEVWIENlcnRp
+ZmljYXRlcyBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm35z
+7r07eKpkQ0H1UN+U8i6yjUqORlTSIRLIOTJCBumD1Z9S7eVnAztUwYyZmczpwA//
+DdmEEbK40ctb3B75aDFk4Zv6dOtouSCV98YPjUesWgbdYavi7NifFy2cyjw1l1Vx
+zUOFsUcW9SxTgHbP0wBkvUCZ3czY28Sf1hNfQYOL+Q2HklY0bBoQCxfVWhyXWIQ8
+hBouXJE0bhlffxdpxWXvayHG1VA6v2G5BY3vbzQ6sm8UY78WO5upKv23KzhmBsUs
+4qpnHkWnjQRmQvaPK++IIGmPMowUc9orhpFjIpryp9vOiYurXccUwVswah+xt54u
+gQEC7c+WXmPbqOY4twIDAQABo2MwYTAfBgNVHSMEGDAWgBR8cks5x8DbYqVPm6oY
+NJKiyoOCWTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4E
+FgQUfHJLOcfA22KlT5uqGDSSosqDglkwDQYJKoZIhvcNAQEFBQADggEBACrDx0M3
+j92tpLIM7twUbY8opJhJywyA6vPtI2Z1fcXTIWd50XPFtQO3WKwMVC/GVhMPMdoG
+52U7HW8228gd+f2ABsqjPWYWqJ1MFn3AlUa1UeTiH9fqBk1jjZaM7+czV0I664zB
+echNdn3e9rG3geCg+aF4RhcaVpjwTj2rHO3sOdwHSPdj/gauwqRcalsyiMXHM4Ws
+ZkJHwlgkmeHlPuV1LI5D1l08eB6olYIpUNHRFrrvwb562bTYzB5MRuF3sTGrvSrI
+zo9uoV1/A3U05K2JRVRevq4opbs/eHnrc7MKDf2+yfdWrPa37S+bISnHOLaVxATy
+wy39FCqQmbkHzJ8=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDVTCCAj2gAwIBAgIESTMAATANBgkqhkiG9w0BAQUFADAyMQswCQYDVQQGEwJD
+TjEOMAwGA1UEChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwHhcNMDcwNDE2
+MDcwOTE0WhcNMjcwNDE2MDcwOTE0WjAyMQswCQYDVQQGEwJDTjEOMAwGA1UEChMF
+Q05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwggEiMA0GCSqGSIb3DQEBAQUAA4IB
+DwAwggEKAoIBAQDTNfc/c3et6FtzF8LRb+1VvG7q6KR5smzDo+/hn7E7SIX1mlwh
+IhAsxYLO2uOabjfhhyzcuQxauohV3/2q2x8x6gHx3zkBwRP9SFIhxFXf2tizVHa6
+dLG3fdfA6PZZxU3Iva0fFNrfWEQlMhkqx35+jq44sDB7R3IJMfAw28Mbdim7aXZO
+V/kbZKKTVrdvmW7bCgScEeOAH8tjlBAKqeFkgjH5jCftppkA9nCTGPihNIaj3XrC
+GHn2emU1z5DrvTOTn1OrczvmmzQgLx3vqR1jGqCA2wMv+SYahtKNu6m+UjqHZ0gN
+v7Sg2Ca+I19zN38m5pIEo3/PIKe38zrKy5nLAgMBAAGjczBxMBEGCWCGSAGG+EIB
+AQQEAwIABzAfBgNVHSMEGDAWgBRl8jGtKvf33VKWCscCwQ7vptU7ETAPBgNVHRMB
+Af8EBTADAQH/MAsGA1UdDwQEAwIB/jAdBgNVHQ4EFgQUZfIxrSr3991SlgrHAsEO
+76bVOxEwDQYJKoZIhvcNAQEFBQADggEBAEs17szkrr/Dbq2flTtLP1se31cpolnK
+OOK5Gv+e5m4y3R6u6jW39ZORTtpC4cMXYFDy0VwmuYK36m3knITnA3kXr5g9lNvH
+ugDnuL8BV8F3RTIMO/G0HAiw/VGgod2aHRM2mm23xzy54cXZF/qD1T0VoDy7Hgvi
+yJA/qIYM/PmLXoXLT1tLYhFHxUV8BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fL
+buXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2G8kS1sHNzYDzAgE8yGnLRUhj
+2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5mmxE=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDkzCCAnugAwIBAgIQFBOWgxRVjOp7Y+X8NId3RDANBgkqhkiG9w0BAQUFADA0
+MRMwEQYDVQQDEwpDb21TaWduIENBMRAwDgYDVQQKEwdDb21TaWduMQswCQYDVQQG
+EwJJTDAeFw0wNDAzMjQxMTMyMThaFw0yOTAzMTkxNTAyMThaMDQxEzARBgNVBAMT
+CkNvbVNpZ24gQ0ExEDAOBgNVBAoTB0NvbVNpZ24xCzAJBgNVBAYTAklMMIIBIjAN
+BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8ORUaSvTx49qROR+WCf4C9DklBKK
+8Rs4OC8fMZwG1Cyn3gsqrhqg455qv588x26i+YtkbDqthVVRVKU4VbirgwTyP2Q2
+98CNQ0NqZtH3FyrV7zb6MBBC11PN+fozc0yz6YQgitZBJzXkOPqUm7h65HkfM/sb
+2CEJKHxNGGleZIp6GZPKfuzzcuc3B1hZKKxC+cX/zT/npfo4sdAMx9lSGlPWgcxC
+ejVb7Us6eva1jsz/D3zkYDaHL63woSV9/9JLEYhwVKZBqGdTUkJe5DSe5L6j7Kpi
+Xd3DTKaCQeQzC6zJMw9kglcq/QytNuEMrkvF7zuZ2SOzW120V+x0cAwqTwIDAQAB
+o4GgMIGdMAwGA1UdEwQFMAMBAf8wPQYDVR0fBDYwNDAyoDCgLoYsaHR0cDovL2Zl
+ZGlyLmNvbXNpZ24uY28uaWwvY3JsL0NvbVNpZ25DQS5jcmwwDgYDVR0PAQH/BAQD
+AgGGMB8GA1UdIwQYMBaAFEsBmz5WGmU2dst7l6qSBe4y5ygxMB0GA1UdDgQWBBRL
+AZs+VhplNnbLe5eqkgXuMucoMTANBgkqhkiG9w0BAQUFAAOCAQEA0Nmlfv4pYEWd
+foPPbrxHbvUanlR2QnG0PFg/LUAlQvaBnPGJEMgOqnhPOAlXsDzACPw1jvFIUY0M
+cXS6hMTXcpuEfDhOZAYnKuGntewImbQKDdSFc8gS4TXt8QUxHXOZDOuWyt3T5oWq
+8Ir7dcHyCTxlZWTzTNity4hp8+SDtwy9F1qWF8pb/627HOkthIDYIb6FUtnUdLlp
+hbpN7Sgy6/lhSuTENh4Z3G+EER+V9YMoGKgzkkMn3V0TBEVPh9VGzT2ouvDzuFYk
+Res3x+F2T3I5GN9+dHLHcy056mDmrRGiVod7w2ia/viMcKjfZTL0pECMocJEAw6U
+AGegcQCCSA==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDqzCCApOgAwIBAgIRAMcoRwmzuGxFjB36JPU2TukwDQYJKoZIhvcNAQEFBQAw
+PDEbMBkGA1UEAxMSQ29tU2lnbiBTZWN1cmVkIENBMRAwDgYDVQQKEwdDb21TaWdu
+MQswCQYDVQQGEwJJTDAeFw0wNDAzMjQxMTM3MjBaFw0yOTAzMTYxNTA0NTZaMDwx
+GzAZBgNVBAMTEkNvbVNpZ24gU2VjdXJlZCBDQTEQMA4GA1UEChMHQ29tU2lnbjEL
+MAkGA1UEBhMCSUwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGtWhf
+HZQVw6QIVS3joFd67+l0Kru5fFdJGhFeTymHDEjWaueP1H5XJLkGieQcPOqs49oh
+gHMhCu95mGwfCP+hUH3ymBvJVG8+pSjsIQQPRbsHPaHA+iqYHU4Gk/v1iDurX8sW
+v+bznkqH7Rnqwp9D5PGBpX8QTz7RSmKtUxvLg/8HZaWSLWapW7ha9B20IZFKF3ue
+Mv5WJDmyVIRD9YTC2LxBkMyd1mja6YJQqTtoz7VdApRgFrFD2UNd3V2Hbuq7s8lr
+9gOUCXDeFhF6K+h2j0kQmHe5Y1yLM5d19guMsqtb3nQgJT/j8xH5h2iGNXHDHYwt
+6+UarA9z1YJZQIDTAgMBAAGjgacwgaQwDAYDVR0TBAUwAwEB/zBEBgNVHR8EPTA7
+MDmgN6A1hjNodHRwOi8vZmVkaXIuY29tc2lnbi5jby5pbC9jcmwvQ29tU2lnblNl
+Y3VyZWRDQS5jcmwwDgYDVR0PAQH/BAQDAgGGMB8GA1UdIwQYMBaAFMFL7XC29z58
+ADsAj8c+DkWfHl3sMB0GA1UdDgQWBBTBS+1wtvc+fAA7AI/HPg5Fnx5d7DANBgkq
+hkiG9w0BAQUFAAOCAQEAFs/ukhNQq3sUnjO2QiBq1BW9Cav8cujvR3qQrFHBZE7p
+iL1DRYHjZiM/EoZNGeQFsOY3wo3aBijJD4mkU6l1P7CW+6tMM1X5eCZGbxs2mPtC
+dsGCuY7e+0X5YxtiOzkGynd6qDwJz2w2PQ8KRUtpFhpFfTMDZflScZAmlaxMDPWL
+kz/MdXSFmLr/YnpNH4n+rr2UAJm/EaXc4HnFFgt9AmEd6oX5AhVP51qJThRv4zdL
+hfXBPGHg/QVBspJ/wx2g0K5SZGBrGMYmnNj1ZOQ2GmKfig8+/21OGVZOIJFsnzQz
+OjRXUDpvgV4GxvU+fE6OK85lBi5d0ipTdF7Tbieejw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYG
+A1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2Jh
+bCBSb290MB4XDTA2MTIxNTA4MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UE
+ChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBS
+b290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+Mi8vRRQZhP/8NN5
+7CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW0ozS
+J8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2y
+HLtgwEZLAfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iP
+t3sMpTjr3kfb1V05/Iin89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNz
+FtApD0mpSPCzqrdsxacwOUBdrsTiXSZT8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAY
+XSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/
+MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2MDSgMqAw
+hi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3Js
+MB8GA1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUA
+A4IBAQBW7wojoFROlZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMj
+Wqd8BfP9IjsO0QbE2zZMcwSO5bAi5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUx
+XOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2hO0j9n0Hq0V+09+zv+mKts2o
+omcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+TX3EJIrduPuoc
+A06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
+WL1WMRJOEcgh4LMRkWXbtKaIOM5V
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEc
+MBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2Vj
+IFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENB
+IDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5MjM1OTAwWjBxMQswCQYDVQQGEwJE
+RTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxl
+U2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290
+IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEU
+ha88EOQ5bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhC
+QN/Po7qCWWqSG6wcmtoIKyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1Mjwr
+rFDa1sPeg5TKqAyZMg4ISFZbavva4VhYAUlfckE8FQYBjl2tqriTtM2e66foai1S
+NNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aKSe5TBY8ZTNXeWHmb0moc
+QqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTVjlsB9WoH
+txa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAP
+BgNVHRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOC
+AQEAlGRZrTlk5ynrE/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756Abrsp
+tJh6sTtU6zkXR34ajgv8HzFZMQSyzhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpa
+IzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8rZ7/gFnkm0W09juwzTkZmDLl
+6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4Gdyd1Lx+4ivn+
+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU
+Cm26OWMohpLzGITY+9HPBVZkVw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRF
+MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBD
+bGFzcyAzIENBIDIgMjAwOTAeFw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NTha
+ME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMM
+HkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIwDQYJKoZIhvcNAQEB
+BQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOADER03
+UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42
+tSHKXzlABF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9R
+ySPocq60vFYJfxLLHLGvKZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsM
+lFqVlNpQmvH/pStmMaTJOKDfHR+4CS7zp+hnUquVH+BGPtikw8paxTGA6Eian5Rp
+/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUCAwEAAaOCARowggEWMA8G
+A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ4PGEMA4G
+A1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVj
+dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUy
+MENBJTIwMiUyMDIwMDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRl
+cmV2b2NhdGlvbmxpc3QwQ6BBoD+GPWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3Js
+L2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAwOS5jcmwwDQYJKoZIhvcNAQEL
+BQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm2H6NMLVwMeni
+acfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0
+o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4K
+zCUqNQT4YJEVdT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8
+PIWmawomDeCTmGCufsYkl4phX5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3Y
+Johw1+qRzT65ysCQblrGXnRl11z+o+I=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRF
+MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBD
+bGFzcyAzIENBIDIgRVYgMjAwOTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUw
+NDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNV
+BAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAwOTCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfSegpn
+ljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM0
+3TP1YtHhzRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6Z
+qQTMFexgaDbtCHu39b+T7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lR
+p75mpoo6Kr3HGrHhFPC+Oh25z1uxav60sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8
+HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure3511H3a6UCAwEAAaOCASQw
+ggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyvcop9Ntea
+HNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFw
+Oi8vZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xh
+c3MlMjAzJTIwQ0ElMjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1E
+RT9jZXJ0aWZpY2F0ZXJldm9jYXRpb25saXN0MEagRKBChkBodHRwOi8vd3d3LmQt
+dHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xhc3NfM19jYV8yX2V2XzIwMDku
+Y3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+PPoeUSbrh/Yp
+3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05
+nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNF
+CSuGdXzfX2lXANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7na
+xpeG0ILD5EJt/rDiZE4OJudANCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqX
+KVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVvw9y4AyHqnxbxLFS1
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNV
+BAMML0VCRyBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
+c8SxMTcwNQYDVQQKDC5FQkcgQmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXpt
+ZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAeFw0wNjA4MTcwMDIxMDlaFw0xNjA4
+MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25payBTZXJ0aWZpa2Eg
+SGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2ltIFRl
+a25vbG9qaWxlcmkgdmUgSGl6bWV0bGVyaSBBLsWeLjELMAkGA1UEBhMCVFIwggIi
+MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDuoIRh0DpqZhAy2DE4f6en5f2h
+4fuXd7hxlugTlkaDT7byX3JWbhNgpQGR4lvFzVcfd2NR/y8927k/qqk153nQ9dAk
+tiHq6yOU/im/+4mRDGSaBUorzAzu8T2bgmmkTPiab+ci2hC6X5L8GCcKqKpE+i4s
+tPtGmggDg3KriORqcsnlZR9uKg+ds+g75AxuetpX/dfreYteIAbTdgtsApWjluTL
+dlHRKJ2hGvxEok3MenaoDT2/F08iiFD9rrbskFBKW5+VQarKD7JK/oCZTqNGFav4
+c0JqwmZ2sQomFd2TkuzbqV9UIlKRcF0T6kjsbgNs2d1s/OsNA/+mgxKb8amTD8Um
+TDGyY5lhcucqZJnSuOl14nypqZoaqsNW2xCaPINStnuWt6yHd6i58mcLlEOzrz5z
++kI2sSXFCjEmN1ZnuqMLfdb3ic1nobc6HmZP9qBVFCVMLDMNpkGMvQQxahByCp0O
+Lna9XvNRiYuoP1Vzv9s6xiQFlpJIqkuNKgPlV5EQ9GooFW5Hd4RcUXSfGenmHmMW
+OeMRFeNYGkS9y8RsZteEBt8w9DeiQyJ50hBs37vmExH8nYQKE3vwO9D8owrXieqW
+fo1IhR5kX9tUoqzVegJ5a9KK8GfaZXINFHDk6Y54jzJ0fFfy1tb0Nokb+Clsi7n2
+l9GkLqq+CxnCRelwXQIDAJ3Zo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB
+/wQEAwIBBjAdBgNVHQ4EFgQU587GT/wWZ5b6SqMHwQSny2re2kcwHwYDVR0jBBgw
+FoAU587GT/wWZ5b6SqMHwQSny2re2kcwDQYJKoZIhvcNAQEFBQADggIBAJuYml2+
+8ygjdsZs93/mQJ7ANtyVDR2tFcU22NU57/IeIl6zgrRdu0waypIN30ckHrMk2pGI
+6YNw3ZPX6bqz3xZaPt7gyPvT/Wwp+BVGoGgmzJNSroIBk5DKd8pNSe/iWtkqvTDO
+TLKBtjDOWU/aWR1qeqRFsIImgYZ29fUQALjuswnoT4cCB64kXPBfrAowzIpAoHME
+wfuJJPaaHFy3PApnNgUIMbOv2AFoKuB4j3TeuFGkjGwgPaL7s9QJ/XvCgKqTbCmY
+Iai7FvOpEl90tYeY8pUm3zTvilORiF0alKM/fCL414i6poyWqD1SNGKfAB5UVUJn
+xk1Gj7sURT0KlhaOEKGXmdXTMIXM3rRyt7yKPBgpaP3ccQfuJDlq+u2lrDgv+R4Q
+DgZxGhBM/nV+/x5XOULK1+EVoVZVWRvRo68R2E7DpSvvkL/A7IITW43WciyTTo9q
+Kd+FPNMN4KIYEsxVL0e3p5sC/kH2iExt2qkBR4NkJ2IQgtYSe14DHzSpyZH+r11t
+hie3I6p1GMog57AP14kOpmciY/SDQSsGS7tY1dHXt7kQY9iJSrSq3RZj9W6+YKH4
+7ejWkE8axsWgKdOnIaj1Wjz3x0miIZpKlVIglnKaZsv30oZDfCK+lvm9AahH3eU7
+QPl1K5srRmSGjR70j/sHd9DqSaIcjVIUpgqT
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB
+8zELMAkGA1UEBhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2Vy
+dGlmaWNhY2lvIChOSUYgUS0wODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1
+YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYDVQQLEyxWZWdldSBodHRwczovL3d3
+dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UECxMsSmVyYXJxdWlh
+IEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMTBkVD
+LUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQG
+EwJFUzE7MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8g
+KE5JRiBRLTA4MDExNzYtSSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBD
+ZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZlZ2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQu
+bmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJhcnF1aWEgRW50aXRhdHMg
+ZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUNDMIIBIjAN
+BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R
+85iKw5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm
+4CgPukLjbo73FCeTae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaV
+HMf5NLWUhdWZXqBIoH7nF2W4onW4HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNd
+QlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0aE9jD2z3Il3rucO2n5nzbcc8t
+lGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw0JDnJwIDAQAB
+o4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E
+BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4
+opvpXY0wfwYDVR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBo
+dHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidW
+ZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAwDQYJKoZIhvcN
+AQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJlF7W2u++AVtd0x7Y
+/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNaAl6k
+SBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhy
+Rp/7SNVel+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOS
+Agu+TGbrIP65y7WZf+a2E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xl
+nJ2lYJU6Un/10asIbvPuW/mIPX64b24D5EI=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1
+MQswCQYDVQQGEwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1
+czEoMCYGA1UEAwwfRUUgQ2VydGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYG
+CSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIwMTAxMDMwMTAxMDMwWhgPMjAzMDEy
+MTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlBUyBTZXJ0aWZpdHNl
+ZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRyZSBS
+b290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEB
+AQUAA4IBDwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUy
+euuOF0+W2Ap7kaJjbMeMTC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvO
+bntl8jixwKIy72KyaOBhU8E2lf/slLo2rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIw
+WFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw93X2PaRka9ZP585ArQ/d
+MtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtNP2MbRMNE
+1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYD
+VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/
+zQas8fElyalL1BSZMEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYB
+BQUHAwMGCCsGAQUFBwMEBggrBgEFBQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEF
+BQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+RjxY6hUFaTlrg4wCQiZrxTFGGV
+v9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqMlIpPnTX/dqQG
+E5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u
+uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIW
+iAYLtqZLICjU3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/v
+GVCJYMzpJJUPwssd8m92kMfMdcGWxZ0=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDtjCCAp6gAwIBAgIQRJmNPMADJ72cdpW56tustTANBgkqhkiG9w0BAQUFADB1
+MQswCQYDVQQGEwJUUjEoMCYGA1UEChMfRWxla3Ryb25payBCaWxnaSBHdXZlbmxp
+Z2kgQS5TLjE8MDoGA1UEAxMzZS1HdXZlbiBLb2sgRWxla3Ryb25payBTZXJ0aWZp
+a2EgSGl6bWV0IFNhZ2xheWljaXNpMB4XDTA3MDEwNDExMzI0OFoXDTE3MDEwNDEx
+MzI0OFowdTELMAkGA1UEBhMCVFIxKDAmBgNVBAoTH0VsZWt0cm9uaWsgQmlsZ2kg
+R3V2ZW5saWdpIEEuUy4xPDA6BgNVBAMTM2UtR3V2ZW4gS29rIEVsZWt0cm9uaWsg
+U2VydGlmaWthIEhpem1ldCBTYWdsYXlpY2lzaTCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBAMMSIJ6wXgBljU5Gu4Bc6SwGl9XzcslwuedLZYDBS75+PNdU
+MZTe1RK6UxYC6lhj71vY8+0qGqpxSKPcEC1fX+tcS5yWCEIlKBHMilpiAVDV6wlT
+L/jDj/6z/P2douNffb7tC+Bg62nsM+3YjfsSSYMAyYuXjDtzKjKzEve5TfL0TW3H
+5tYmNwjy2f1rXKPlSFxYvEK+A1qBuhw1DADT9SN+cTAIJjjcJRFHLfO6IxClv7wC
+90Nex/6wN1CZew+TzuZDLMN+DfIcQ2Zgy2ExR4ejT669VmxMvLz4Bcpk9Ok0oSy1
+c+HCPujIyTQlCFzz7abHlJ+tiEMl1+E5YP6sOVkCAwEAAaNCMEAwDgYDVR0PAQH/
+BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ/uRLOU1fqRTy7ZVZoE
+VtstxNulMA0GCSqGSIb3DQEBBQUAA4IBAQB/X7lTW2M9dTLn+sR0GstG30ZpHFLP
+qk/CaOv/gKlR6D1id4k9CnU58W5dF4dvaAXBlGzZXd/aslnLpRCKysw5zZ/rTt5S
+/wzw9JKp8mxTq5vSR6AfdPebmvEvFZ96ZDAYBzwqD2fK/A+JYZ1lpTzlvBNbCNvj
+/+27BrtqBrF6T2XGgv0enIu1De5Iu7i9qgi0+6N8y5/NkHZchpZ4Vwpm+Vganf2X
+KWDeEaaQHBkc7gGWIjQ0LpH5t8Qn0Xvmv/uARFoW5evg1Ao4vOSR49XrXMGs3xtq
+fJ7lddK2l4fbzIcrQzqECK+rPNv3PGYxhrCdU3nt+CPeQuMtgvEP5fqX
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBe
+MQswCQYDVQQGEwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0
+ZC4xKjAoBgNVBAsMIWVQS0kgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
+Fw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMxMjdaMF4xCzAJBgNVBAYTAlRXMSMw
+IQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEqMCgGA1UECwwhZVBL
+SSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEF
+AAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAH
+SyZbCUNsIZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAh
+ijHyl3SJCRImHJ7K2RKilTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3X
+DZoTM1PRYfl61dd4s5oz9wCGzh1NlDivqOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1
+TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX12ruOzjjK9SXDrkb5wdJ
+fzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0OWQqraffA
+sgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uU
+WH1+ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLS
+nT0IFaUQAS2zMnaolQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pH
+dmX2Os+PYhcZewoozRrSgx4hxyy/vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJip
+NiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXiZo1jDiVN1Rmy5nk3pyKdVDEC
+AwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/QkqiMAwGA1UdEwQF
+MAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH
+ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGB
+uvl2ICO1J2B01GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6Yl
+PwZpVnPDimZI+ymBV3QGypzqKOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkP
+JXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdVxrsStZf0X4OFunHB2WyBEXYKCrC/
+gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEPNXubrjlpC2JgQCA2
+j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+rGNm6
+5ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUB
+o2M3IUxExJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS
+/jQ6fbjpKdx2qcgw+BRxgMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2z
+Gp1iro2C6pSe3VkQw63d4k3jMdXH7OjysP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTE
+W9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmODBCEIZ43ygknQW/2xzQ+D
+hNQ+IIX3Sj0rnP0qCglN6oH4EZw=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDEL
+MAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChj
+KSAyMDA3IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2
+MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
+eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1OVowgZgxCzAJBgNV
+BAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykgMjAw
+NyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNV
+BAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH
+MjB2MBAGByqGSM49AgEGBSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcL
+So17VDs6bl8VAsBQps8lL33KSLjHUGMcKiEIfJo22Av+0SbFWDEwKCXzXV2juLal
+tJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
+BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+EVXVMAoG
+CCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGT
+qQ7mndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBucz
+rD6ogRLQy7rQkgu2npaqBA+K
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCB
+mDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsT
+MChjKSAyMDA4IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
+eTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhv
+cml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIzNTk1OVowgZgxCzAJ
+BgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
+MjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0
+BgNVBAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
+LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz
++uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5jK/BGvESyiaHAKAxJcCGVn2TAppMSAmUm
+hsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdEc5IiaacDiGydY8hS2pgn
+5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3CIShwiP/W
+JmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exAL
+DmKudlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZC
+huOl1UcCAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw
+HQYDVR0OBBYEFMR5yo6hTgMdHNxr2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IB
+AQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9cr5HqQ6XErhK8WTTOd8lNNTB
+zU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbEAp7aDHdlDkQN
+kv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
+AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUH
+SJsMC8tJP33st/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2G
+spki4cErx5z481+oghLrGREt
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYD
+VQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0
+IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3
+MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
+aGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMxNDBaFw0zODA3MzEx
+MjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3Vy
+cmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAG
+A1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAl
+BgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZI
+hvcNAQEBBQADggIPADCCAgoCggIBAMDfVtPkOpt2RbQT2//BthmLN0EYlVJH6xed
+KYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXfXjaOcNFccUMd2drvXNL7
+G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0ZJJ0YPP2
+zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4
+ddPB/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyG
+HoiMvvKRhI9lNNgATH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2
+Id3UwD2ln58fQ1DJu7xsepeY7s2MH/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3V
+yJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfeOx2YItaswTXbo6Al/3K1dh3e
+beksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSFHTynyQbehP9r
+6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh
+wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsog
+zCtLkykPAgMBAAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQW
+BBS5CcqcHtvTbDprru1U8VuTBjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDpr
+ru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UEBhMCRVUxQzBBBgNVBAcTOk1hZHJp
+ZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJmaXJtYS5jb20vYWRk
+cmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJmaXJt
+YSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiC
+CQDJzdPp1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCow
+KAYIKwYBBQUHAgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZI
+hvcNAQEFBQADggIBAICIf3DekijZBZRG/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZ
+UohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6ReAJ3spED8IXDneRRXoz
+X1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/sdZ7LoR/x
+fxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVz
+a2Mg9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yyd
+Yhz2rXzdpjEetrHHfoUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMd
+SqlapskD7+3056huirRXhOukP9DuqqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9O
+AP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETrP3iZ8ntxPjzxmKfFGBI/5rso
+M0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVqc5iJWzouE4ge
+v8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
+09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
+A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
+Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
+MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
+A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
+RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
+gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
+KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd
+QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ
+XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw
+DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o
+LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU
+RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp
+jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
+6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
+mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
+Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
+WD9f
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx
+EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT
+EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp
+ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIz
+NTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH
+EwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8GA1UE
+AxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIw
+DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD
+E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH
+/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD+qK+ihVqf94Lw7YZFAXK6sOoBJQ7Rnwy
+DfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutdfMh8+7ArU6SSYmlRJQVh
+GkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMlNAJWJwGR
+tDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEA
+AaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
+FDqahQcQZyi27/a9BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmX
+WWcDYfF+OwYxdS2hII5PZYe096acvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu
+9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr
+gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo
+2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
+LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI
+4uJEvlz36hz1
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1Ix
+RDBCBgNVBAoTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1
+dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1p
+YyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIFJvb3RDQSAyMDExMB4XDTExMTIw
+NjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYTAkdSMUQwQgYDVQQK
+EztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIENl
+cnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJl
+c2VhcmNoIEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEB
+BQADggEPADCCAQoCggEBAKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPz
+dYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJ
+fel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa71HFK9+WXesyHgLacEns
+bgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u8yBRQlqD
+75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSP
+FEDH3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNV
+HRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp
+5dgTBCPuQSUwRwYDVR0eBEAwPqA8MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQu
+b3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQub3JnMA0GCSqGSIb3DQEBBQUA
+A4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVtXdMiKahsog2p
+6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8
+TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7
+dIsXRSZMFpGD/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8Acys
+Nnq/onN694/BtZqhFLKPM58N7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXI
+l7WdmplNsDz4SgCbZN2fOUvRJ9e4
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsx
+FjAUBgNVBAoTDUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3Qg
+Um9vdCBDQSAxMB4XDTAzMDUxNTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkG
+A1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdr
+b25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1ApzQ
+jVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEn
+PzlTCeqrauh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjh
+ZY4bXSNmO7ilMlHIhqqhqZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9
+nnV0ttgCXjqQesBCNnLsak3c78QA3xMYV18meMjWCnl3v/evt3a5pQuEF10Q6m/h
+q5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNVHRMBAf8ECDAGAQH/AgED
+MA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7ih9legYsC
+mEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI3
+7piol7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clB
+oiMBdDhViw+5LmeiIAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJs
+EhTkYY2sEJCehFC78JZvRZ+K88psT/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpO
+fMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilTc4afU9hDDl3WY4JxHYB0yvbi
+AmvZWg==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEAjCCAuqgAwIBAgIFORFFEJQwDQYJKoZIhvcNAQEFBQAwgYUxCzAJBgNVBAYT
+AkZSMQ8wDQYDVQQIEwZGcmFuY2UxDjAMBgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQ
+TS9TR0ROMQ4wDAYDVQQLEwVEQ1NTSTEOMAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG
+9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2LmZyMB4XDTAyMTIxMzE0MjkyM1oXDTIw
+MTAxNzE0MjkyMlowgYUxCzAJBgNVBAYTAkZSMQ8wDQYDVQQIEwZGcmFuY2UxDjAM
+BgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQTS9TR0ROMQ4wDAYDVQQLEwVEQ1NTSTEO
+MAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2
+LmZyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsh/R0GLFMzvABIaI
+s9z4iPf930Pfeo2aSVz2TqrMHLmh6yeJ8kbpO0px1R2OLc/mratjUMdUC24SyZA2
+xtgv2pGqaMVy/hcKshd+ebUyiHDKcMCWSo7kVc0dJ5S/znIq7Fz5cyD+vfcuiWe4
+u0dzEvfRNWk68gq5rv9GQkaiv6GFGvm/5P9JhfejcIYyHF2fYPepraX/z9E0+X1b
+F8bc1g4oa8Ld8fUzaJ1O/Id8NhLWo4DoQw1VYZTqZDdH6nfK0LJYBcNdfrGoRpAx
+Vs5wKpayMLh35nnAvSk7/ZR3TL0gzUEl4C7HG7vupARB0l2tEmqKm0f7yd1GQOGd
+PDPQtQIDAQABo3cwdTAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBRjAVBgNV
+HSAEDjAMMAoGCCqBegF5AQEBMB0GA1UdDgQWBBSjBS8YYFDCiQrdKyFP/45OqDAx
+NjAfBgNVHSMEGDAWgBSjBS8YYFDCiQrdKyFP/45OqDAxNjANBgkqhkiG9w0BAQUF
+AAOCAQEABdwm2Pp3FURo/C9mOnTgXeQp/wYHE4RKq89toB9RlPhJy3Q2FLwV3duJ
+L92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3QMZsyK10XZZOY
+YLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg
+Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2a
+NjSaTFR+FwNIlQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R
+0982gaEbeC9xs/FZTEYYKKuF0mBWWg==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4
+MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6
+ZW5wZS5jb20wHhcNMDcxMjEzMTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYD
+VQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5j
+b20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ03rKDx6sp4boFmVq
+scIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAKClaO
+xdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6H
+LmYRY2xU+zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFX
+uaOKmMPsOzTFlUFpfnXCPCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQD
+yCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxTOTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+
+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbKF7jJeodWLBoBHmy+E60Q
+rLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK0GqfvEyN
+BjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8L
+hij+0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIB
+QFqNeb+Lz0vPqhbBleStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+
+HMh3/1uaD7euBUbl8agW7EekFwIDAQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2lu
+Zm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+SVpFTlBFIFMuQS4gLSBDSUYg
+QTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBGNjIgUzgxQzBB
+BgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx
+MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwHQYDVR0OBBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUA
+A4ICAQB4pgwWSp9MiDrAyw6lFn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWb
+laQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbgakEyrkgPH7UIBzg/YsfqikuFgba56
+awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8qhT/AQKM6WfxZSzwo
+JNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Csg1lw
+LDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCT
+VyvehQP5aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGk
+LhObNA5me0mrZJfQRsN5nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJb
+UjWumDqtujWTI6cfSN01RpiyEGjkpTHCClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/
+QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZoQ0iy2+tzJOeRf1SktoA+
+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1ZWrOZyGls
+QyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIE5jCCA86gAwIBAgIEO45L/DANBgkqhkiG9w0BAQUFADBdMRgwFgYJKoZIhvcN
+AQkBFglwa2lAc2suZWUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKExlBUyBTZXJ0aWZp
+dHNlZXJpbWlza2Vza3VzMRAwDgYDVQQDEwdKdXVyLVNLMB4XDTAxMDgzMDE0MjMw
+MVoXDTE2MDgyNjE0MjMwMVowXTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMQsw
+CQYDVQQGEwJFRTEiMCAGA1UEChMZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEQ
+MA4GA1UEAxMHSnV1ci1TSzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AIFxNj4zB9bjMI0TfncyRsvPGbJgMUaXhvSYRqTCZUXP00B841oiqBB4M8yIsdOB
+SvZiF3tfTQou0M+LI+5PAk676w7KvRhj6IAcjeEcjT3g/1tf6mTll+g/mX8MCgkz
+ABpTpyHhOEvWgxutr2TC+Rx6jGZITWYfGAriPrsfB2WThbkasLnE+w0R9vXW+RvH
+LCu3GFH+4Hv2qEivbDtPL+/40UceJlfwUR0zlv/vWT3aTdEVNMfqPxZIe5EcgEMP
+PbgFPtGzlc3Yyg/CQ2fbt5PgIoIuvvVoKIO5wTtpeyDaTpxt4brNj3pssAki14sL
+2xzVWiZbDcDq5WDQn/413z8CAwEAAaOCAawwggGoMA8GA1UdEwEB/wQFMAMBAf8w
+ggEWBgNVHSAEggENMIIBCTCCAQUGCisGAQQBzh8BAQEwgfYwgdAGCCsGAQUFBwIC
+MIHDHoHAAFMAZQBlACAAcwBlAHIAdABpAGYAaQBrAGEAYQB0ACAAbwBuACAAdgDk
+AGwAagBhAHMAdABhAHQAdQBkACAAQQBTAC0AaQBzACAAUwBlAHIAdABpAGYAaQB0
+AHMAZQBlAHIAaQBtAGkAcwBrAGUAcwBrAHUAcwAgAGEAbABhAG0ALQBTAEsAIABz
+AGUAcgB0AGkAZgBpAGsAYQBhAHQAaQBkAGUAIABrAGkAbgBuAGkAdABhAG0AaQBz
+AGUAawBzMCEGCCsGAQUFBwIBFhVodHRwOi8vd3d3LnNrLmVlL2Nwcy8wKwYDVR0f
+BCQwIjAgoB6gHIYaaHR0cDovL3d3dy5zay5lZS9qdXVyL2NybC8wHQYDVR0OBBYE
+FASqekej5ImvGs8KQKcYP2/v6X2+MB8GA1UdIwQYMBaAFASqekej5ImvGs8KQKcY
+P2/v6X2+MA4GA1UdDwEB/wQEAwIB5jANBgkqhkiG9w0BAQUFAAOCAQEAe8EYlFOi
+CfP+JmeaUOTDBS8rNXiRTHyoERF5TElZrMj3hWVcRrs7EKACr81Ptcw2Kuxd/u+g
+kcm2k298gFTsxwhwDY77guwqYHhpNjbRxZyLabVAyJRld/JXIWY7zoVAtjNjGr95
+HvxcHdMdkxuLDF2FvZkwMhgJkVLpfKG6/2SSmuz+Ne6ML678IIbsSt4beDI3poHS
+na9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita/ZEuOyoqysOkhMp6q
+qIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0Z
+TbvGRNs2yyqcjg==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYD
+VQQGEwJIVTERMA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0
+ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0G
+CSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTAeFw0wOTA2MTYxMTMwMThaFw0y
+OTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UEBwwIQnVkYXBlc3Qx
+FjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUtU3pp
+Z25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o
+dTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvP
+kd6mJviZpWNwrZuuyjNAfW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tc
+cbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG0IMZfcChEhyVbUr02MelTTMuhTlAdX4U
+fIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKApxn1ntxVUwOXewdI/5n7
+N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm1HxdrtbC
+xkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1
++rUCAwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G
+A1UdDgQWBBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPM
+Pcu1SCOhGnqmKrs0aDAbBgNVHREEFDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqG
+SIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0olZMEyL/azXm4Q5DwpL7v8u8h
+mLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfXI/OMn74dseGk
+ddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775
+tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c
+2Pm2G2JwCz02yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5t
+HMN1Rq41Bab2XD0h7lbwyYIiLXpUq3DDfSJlgnCW
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIHqDCCBpCgAwIBAgIRAMy4579OKRr9otxmpRwsDxEwDQYJKoZIhvcNAQEFBQAw
+cjELMAkGA1UEBhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MRYwFAYDVQQKEw1NaWNy
+b3NlYyBMdGQuMRQwEgYDVQQLEwtlLVN6aWdubyBDQTEiMCAGA1UEAxMZTWljcm9z
+ZWMgZS1Temlnbm8gUm9vdCBDQTAeFw0wNTA0MDYxMjI4NDRaFw0xNzA0MDYxMjI4
+NDRaMHIxCzAJBgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVzdDEWMBQGA1UEChMN
+TWljcm9zZWMgTHRkLjEUMBIGA1UECxMLZS1Temlnbm8gQ0ExIjAgBgNVBAMTGU1p
+Y3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQDtyADVgXvNOABHzNuEwSFpLHSQDCHZU4ftPkNEU6+r+ICbPHiN1I2u
+uO/TEdyB5s87lozWbxXGd36hL+BfkrYn13aaHUM86tnsL+4582pnS4uCzyL4ZVX+
+LMsvfUh6PXX5qqAnu3jCBspRwn5mS6/NoqdNAoI/gqyFxuEPkEeZlApxcpMqyabA
+vjxWTHOSJ/FrtfX9/DAFYJLG65Z+AZHCabEeHXtTRbjcQR/Ji3HWVBTji1R4P770
+Yjtb9aPs1ZJ04nQw7wHb4dSrmZsqa/i9phyGI0Jf7Enemotb9HI6QMVJPqW+jqpx
+62z69Rrkav17fVVA71hu5tnVvCSrwe+3AgMBAAGjggQ3MIIEMzBnBggrBgEFBQcB
+AQRbMFkwKAYIKwYBBQUHMAGGHGh0dHBzOi8vcmNhLmUtc3ppZ25vLmh1L29jc3Aw
+LQYIKwYBBQUHMAKGIWh0dHA6Ly93d3cuZS1zemlnbm8uaHUvUm9vdENBLmNydDAP
+BgNVHRMBAf8EBTADAQH/MIIBcwYDVR0gBIIBajCCAWYwggFiBgwrBgEEAYGoGAIB
+AQEwggFQMCgGCCsGAQUFBwIBFhxodHRwOi8vd3d3LmUtc3ppZ25vLmh1L1NaU1ov
+MIIBIgYIKwYBBQUHAgIwggEUHoIBEABBACAAdABhAG4A+gBzAO0AdAB2AOEAbgB5
+ACAA6QByAHQAZQBsAG0AZQB6AOkAcwDpAGgAZQB6ACAA6QBzACAAZQBsAGYAbwBn
+AGEAZADhAHMA4QBoAG8AegAgAGEAIABTAHoAbwBsAGcA4QBsAHQAYQB0APMAIABT
+AHoAbwBsAGcA4QBsAHQAYQB0AOEAcwBpACAAUwB6AGEAYgDhAGwAeQB6AGEAdABh
+ACAAcwB6AGUAcgBpAG4AdAAgAGsAZQBsAGwAIABlAGwAagDhAHIAbgBpADoAIABo
+AHQAdABwADoALwAvAHcAdwB3AC4AZQAtAHMAegBpAGcAbgBvAC4AaAB1AC8AUwBa
+AFMAWgAvMIHIBgNVHR8EgcAwgb0wgbqggbeggbSGIWh0dHA6Ly93d3cuZS1zemln
+bm8uaHUvUm9vdENBLmNybIaBjmxkYXA6Ly9sZGFwLmUtc3ppZ25vLmh1L0NOPU1p
+Y3Jvc2VjJTIwZS1Temlnbm8lMjBSb290JTIwQ0EsT1U9ZS1Temlnbm8lMjBDQSxP
+PU1pY3Jvc2VjJTIwTHRkLixMPUJ1ZGFwZXN0LEM9SFU/Y2VydGlmaWNhdGVSZXZv
+Y2F0aW9uTGlzdDtiaW5hcnkwDgYDVR0PAQH/BAQDAgEGMIGWBgNVHREEgY4wgYuB
+EGluZm9AZS1zemlnbm8uaHWkdzB1MSMwIQYDVQQDDBpNaWNyb3NlYyBlLVN6aWdu
+w7MgUm9vdCBDQTEWMBQGA1UECwwNZS1TemlnbsOzIEhTWjEWMBQGA1UEChMNTWlj
+cm9zZWMgS2Z0LjERMA8GA1UEBxMIQnVkYXBlc3QxCzAJBgNVBAYTAkhVMIGsBgNV
+HSMEgaQwgaGAFMegSXUWYYTbMUuE0vE3QJDvTtz3oXakdDByMQswCQYDVQQGEwJI
+VTERMA8GA1UEBxMIQnVkYXBlc3QxFjAUBgNVBAoTDU1pY3Jvc2VjIEx0ZC4xFDAS
+BgNVBAsTC2UtU3ppZ25vIENBMSIwIAYDVQQDExlNaWNyb3NlYyBlLVN6aWdubyBS
+b290IENBghEAzLjnv04pGv2i3GalHCwPETAdBgNVHQ4EFgQUx6BJdRZhhNsxS4TS
+8TdAkO9O3PcwDQYJKoZIhvcNAQEFBQADggEBANMTnGZjWS7KXHAM/IO8VbH0jgds
+ZifOwTsgqRy7RlRw7lrMoHfqaEQn6/Ip3Xep1fvj1KcExJW4C+FEaGAHQzAxQmHl
+7tnlJNUb3+FKG6qfx1/4ehHqE5MAyopYse7tDk2016g2JnzgOsHVV4Lxdbb9iV/a
+86g4nzUGCM4ilb7N1fy+W955a9x6qWVmvrElWl/tftOsRm1M9DKHtCAE4Gx4sHfR
+hUZLphK3dehKyVZs15KrnfVJONJPU+NVkBHbmJbGSfI+9J8b4PeI3CVimUTYc78/
+MPMMNz7UwiiAc7EBt51alhQBS6kRnSlqLtBdgcDPsiBDxwPgN05dCtxZICU=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQG
+EwJIVTERMA8GA1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3
+MDUGA1UECwwuVGFuw7pzw610dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNl
+cnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBBcmFueSAoQ2xhc3MgR29sZCkgRsWR
+dGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgxMjA2MTUwODIxWjCB
+pzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxOZXRM
+b2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlm
+aWNhdGlvbiBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNz
+IEdvbGQpIEbFkXRhbsO6c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAxCRec75LbRTDofTjl5Bu0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrT
+lF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw/HpYzY6b7cNGbIRwXdrz
+AZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAkH3B5r9s5
+VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRG
+ILdwfzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2
+BJtr+UBdADTHLpl1neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAG
+AQH/AgEEMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2M
+U9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwWqZw8UQCgwBEIBaeZ5m8BiFRh
+bvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTtaYtOUZcTh5m2C
++C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC
+bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2F
+uLjbvrW5KfnaNwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2
+XjG4Kvte9nHfRCaexOYNkbQudZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCB
+ijELMAkGA1UEBhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHly
+aWdodCAoYykgMjAwNTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl
+ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQSBDQTAeFw0w
+NTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYDVQQGEwJDSDEQMA4G
+A1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIwIAYD
+VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBX
+SVNlS2V5IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAy0+zAJs9Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxR
+VVuuk+g3/ytr6dTqvirdqFEr12bDYVxgAsj1znJ7O7jyTmUIms2kahnBAbtzptf2
+w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbDd50kc3vkDIzh2TbhmYsF
+mQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ/yxViJGg
+4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t9
+4B3RLoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYw
+DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQw
+EAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOx
+SPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vImMMkQyh2I+3QZH4VFvbBsUfk2
+ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4+vg1YFkCExh8
+vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa
+hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZi
+Fj4A4xylNoEYokxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ
+/L7fCg0=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIJhjCCB26gAwIBAgIBCzANBgkqhkiG9w0BAQsFADCCAR4xPjA8BgNVBAMTNUF1
+dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIFJhaXogZGVsIEVzdGFkbyBWZW5lem9s
+YW5vMQswCQYDVQQGEwJWRTEQMA4GA1UEBxMHQ2FyYWNhczEZMBcGA1UECBMQRGlz
+dHJpdG8gQ2FwaXRhbDE2MDQGA1UEChMtU2lzdGVtYSBOYWNpb25hbCBkZSBDZXJ0
+aWZpY2FjaW9uIEVsZWN0cm9uaWNhMUMwQQYDVQQLEzpTdXBlcmludGVuZGVuY2lh
+IGRlIFNlcnZpY2lvcyBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMSUwIwYJ
+KoZIhvcNAQkBFhZhY3JhaXpAc3VzY2VydGUuZ29iLnZlMB4XDTEwMTIyODE2NTEw
+MFoXDTIwMTIyNTIzNTk1OVowgdExJjAkBgkqhkiG9w0BCQEWF2NvbnRhY3RvQHBy
+b2NlcnQubmV0LnZlMQ8wDQYDVQQHEwZDaGFjYW8xEDAOBgNVBAgTB01pcmFuZGEx
+KjAoBgNVBAsTIVByb3ZlZWRvciBkZSBDZXJ0aWZpY2Fkb3MgUFJPQ0VSVDE2MDQG
+A1UEChMtU2lzdGVtYSBOYWNpb25hbCBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9u
+aWNhMQswCQYDVQQGEwJWRTETMBEGA1UEAxMKUFNDUHJvY2VydDCCAiIwDQYJKoZI
+hvcNAQEBBQADggIPADCCAgoCggIBANW39KOUM6FGqVVhSQ2oh3NekS1wwQYalNo9
+7BVCwfWMrmoX8Yqt/ICV6oNEolt6Vc5Pp6XVurgfoCfAUFM+jbnADrgV3NZs+J74
+BCXfgI8Qhd19L3uA3VcAZCP4bsm+lU/hdezgfl6VzbHvvnpC2Mks0+saGiKLt38G
+ieU89RLAu9MLmV+QfI4tL3czkkohRqipCKzx9hEC2ZUWno0vluYC3XXCFCpa1sl9
+JcLB/KpnheLsvtF8PPqv1W7/U0HU9TI4seJfxPmOEO8GqQKJ/+MMbpfg353bIdD0
+PghpbNjU5Db4g7ayNo+c7zo3Fn2/omnXO1ty0K+qP1xmk6wKImG20qCZyFSTXai2
+0b1dCl53lKItwIKOvMoDKjSuc/HUtQy9vmebVOvh+qBa7Dh+PsHMosdEMXXqP+UH
+0quhJZb25uSgXTcYOWEAM11G1ADEtMo88aKjPvM6/2kwLkDd9p+cJsmWN63nOaK/
+6mnbVSKVUyqUtd+tFjiBdWbjxywbk5yqjKPK2Ww8F22c3HxT4CAnQzb5EuE8XL1m
+v6JpIzi4mWCZDlZTOpx+FIywBm/xhnaQr/2v/pDGj59/i5IjnOcVdo/Vi5QTcmn7
+K2FjiO/mpF7moxdqWEfLcU8UC17IAggmosvpr2uKGcfLFFb14dq12fy/czja+eev
+bqQ34gcnAgMBAAGjggMXMIIDEzASBgNVHRMBAf8ECDAGAQH/AgEBMDcGA1UdEgQw
+MC6CD3N1c2NlcnRlLmdvYi52ZaAbBgVghl4CAqASDBBSSUYtRy0yMDAwNDAzNi0w
+MB0GA1UdDgQWBBRBDxk4qpl/Qguk1yeYVKIXTC1RVDCCAVAGA1UdIwSCAUcwggFD
+gBStuyIdxuDSAaj9dlBSk+2YwU2u06GCASakggEiMIIBHjE+MDwGA1UEAxM1QXV0
+b3JpZGFkIGRlIENlcnRpZmljYWNpb24gUmFpeiBkZWwgRXN0YWRvIFZlbmV6b2xh
+bm8xCzAJBgNVBAYTAlZFMRAwDgYDVQQHEwdDYXJhY2FzMRkwFwYDVQQIExBEaXN0
+cml0byBDYXBpdGFsMTYwNAYDVQQKEy1TaXN0ZW1hIE5hY2lvbmFsIGRlIENlcnRp
+ZmljYWNpb24gRWxlY3Ryb25pY2ExQzBBBgNVBAsTOlN1cGVyaW50ZW5kZW5jaWEg
+ZGUgU2VydmljaW9zIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25pY2ExJTAjBgkq
+hkiG9w0BCQEWFmFjcmFpekBzdXNjZXJ0ZS5nb2IudmWCAQowDgYDVR0PAQH/BAQD
+AgEGME0GA1UdEQRGMESCDnByb2NlcnQubmV0LnZloBUGBWCGXgIBoAwMClBTQy0w
+MDAwMDKgGwYFYIZeAgKgEgwQUklGLUotMzE2MzUzNzMtNzB2BgNVHR8EbzBtMEag
+RKBChkBodHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52ZS9sY3IvQ0VSVElGSUNBRE8t
+UkFJWi1TSEEzODRDUkxERVIuY3JsMCOgIaAfhh1sZGFwOi8vYWNyYWl6LnN1c2Nl
+cnRlLmdvYi52ZTA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAGGG2h0dHA6Ly9v
+Y3NwLnN1c2NlcnRlLmdvYi52ZTBBBgNVHSAEOjA4MDYGBmCGXgMBAjAsMCoGCCsG
+AQUFBwIBFh5odHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52ZS9kcGMwDQYJKoZIhvcN
+AQELBQADggIBACtZ6yKZu4SqT96QxtGGcSOeSwORR3C7wJJg7ODU523G0+1ng3dS
+1fLld6c2suNUvtm7CpsR72H0xpkzmfWvADmNg7+mvTV+LFwxNG9s2/NkAZiqlCxB
+3RWGymspThbASfzXg0gTB1GEMVKIu4YXx2sviiCtxQuPcD4quxtxj7mkoP3Yldmv
+Wb8lK5jpY5MvYB7Eqvh39YtsL+1+LrVPQA3uvFd359m21D+VJzog1eWuq2w1n8Gh
+HVnchIHuTQfiSLaeS5UtQbHh6N5+LwUeaO6/u5BlOsju6rEYNxxik6SgMexxbJHm
+pHmJWhSnFFAFTKQAVzAswbVhltw+HoSvOULP5dAssSS830DD7X9jSr3hTxJkhpXz
+sOfIt+FTvZLm8wyWuevo5pLtp4EJFAv8lXrPj9Y0TzYS3F7RNHXGRoAvlQSMx4bE
+qCaJqD8Zm4G7UaRKhqsLEQ+xrmNTbSjq3TNWOByyrYDT13K9mmyZY+gAu0F2Bbdb
+mRiKw7gSXFbPVgx96OLP7bx0R/vu0xdOIk9W/1DzLuY5poLWccret9W6aAjtmcz9
+opLLabid+Qqkpj5PkygqYWwHJgD/ll9ohri4zspV4KuxPX+Y1zMOWj3YeMLEYC/H
+YvBhkdI4sPaeVdtAgAUSM84dkpvRabP/v/GSCmE1P93+hvS84Bpxs2Km
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIGizCCBXOgAwIBAgIEO0XlaDANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJF
+UzEfMB0GA1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJ
+R1ZBMScwJQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwHhcN
+MDEwNzA2MTYyMjQ3WhcNMjEwNzAxMTUyMjQ3WjBoMQswCQYDVQQGEwJFUzEfMB0G
+A1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScw
+JQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGKqtXETcvIorKA3Qdyu0togu8M1JAJke+
+WmmmO3I2F0zo37i7L3bhQEZ0ZQKQUgi0/6iMweDHiVYQOTPvaLRfX9ptI6GJXiKj
+SgbwJ/BXufjpTjJ3Cj9BZPPrZe52/lSqfR0grvPXdMIKX/UIKFIIzFVd0g/bmoGl
+u6GzwZTNVOAydTGRGmKy3nXiz0+J2ZGQD0EbtFpKd71ng+CT516nDOeB0/RSrFOy
+A8dEJvt55cs0YFAQexvba9dHq198aMpunUEDEO5rmXteJajCq+TA81yc477OMUxk
+Hl6AovWDfgzWyoxVjr7gvkkHD6MkQXpYHYTqWBLI4bft75PelAgxAgMBAAGjggM7
+MIIDNzAyBggrBgEFBQcBAQQmMCQwIgYIKwYBBQUHMAGGFmh0dHA6Ly9vY3NwLnBr
+aS5ndmEuZXMwEgYDVR0TAQH/BAgwBgEB/wIBAjCCAjQGA1UdIASCAiswggInMIIC
+IwYKKwYBBAG/VQIBADCCAhMwggHoBggrBgEFBQcCAjCCAdoeggHWAEEAdQB0AG8A
+cgBpAGQAYQBkACAAZABlACAAQwBlAHIAdABpAGYAaQBjAGEAYwBpAPMAbgAgAFIA
+YQDtAHoAIABkAGUAIABsAGEAIABHAGUAbgBlAHIAYQBsAGkAdABhAHQAIABWAGEA
+bABlAG4AYwBpAGEAbgBhAC4ADQAKAEwAYQAgAEQAZQBjAGwAYQByAGEAYwBpAPMA
+bgAgAGQAZQAgAFAAcgDhAGMAdABpAGMAYQBzACAAZABlACAAQwBlAHIAdABpAGYA
+aQBjAGEAYwBpAPMAbgAgAHEAdQBlACAAcgBpAGcAZQAgAGUAbAAgAGYAdQBuAGMA
+aQBvAG4AYQBtAGkAZQBuAHQAbwAgAGQAZQAgAGwAYQAgAHAAcgBlAHMAZQBuAHQA
+ZQAgAEEAdQB0AG8AcgBpAGQAYQBkACAAZABlACAAQwBlAHIAdABpAGYAaQBjAGEA
+YwBpAPMAbgAgAHMAZQAgAGUAbgBjAHUAZQBuAHQAcgBhACAAZQBuACAAbABhACAA
+ZABpAHIAZQBjAGMAaQDzAG4AIAB3AGUAYgAgAGgAdAB0AHAAOgAvAC8AdwB3AHcA
+LgBwAGsAaQAuAGcAdgBhAC4AZQBzAC8AYwBwAHMwJQYIKwYBBQUHAgEWGWh0dHA6
+Ly93d3cucGtpLmd2YS5lcy9jcHMwHQYDVR0OBBYEFHs100DSHHgZZu90ECjcPk+y
+eAT8MIGVBgNVHSMEgY0wgYqAFHs100DSHHgZZu90ECjcPk+yeAT8oWykajBoMQsw
+CQYDVQQGEwJFUzEfMB0GA1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0G
+A1UECxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVu
+Y2lhbmGCBDtF5WgwDQYJKoZIhvcNAQEFBQADggEBACRhTvW1yEICKrNcda3Fbcrn
+lD+laJWIwVTAEGmiEi8YPyVQqHxK6sYJ2fR1xkDar1CdPaUWu20xxsdzCkj+IHLt
+b8zog2EWRpABlUt9jppSCS/2bxzkoXHPjCpaF3ODR00PNvsETUlR4hTJZGH71BTg
+9J63NI8KJr2XXPR5OkowGcytT6CYirQxlyric21+eLj4iIlPsSKRZEv1UN4D2+XF
+ducTZnV+ZfsBn5OHiJ35Rld8TWCvmHMTI6QgkYH60GFmuH3Rr9ZvHmw96RH9qfmC
+IoaZM3Fa6hlXPZHNqcCjbgcTpsnt+GijnsNacgmHKNHEc8RzGF9QdRYxn7fofMM=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDEr
+MCkGA1UEChMiSmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoG
+A1UEAxMTU2VjdXJlU2lnbiBSb290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0
+MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSswKQYDVQQKEyJKYXBhbiBDZXJ0aWZp
+Y2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1cmVTaWduIFJvb3RD
+QTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvLTJsz
+i1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8
+h9uuywGOwvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOV
+MdrAG/LuYpmGYz+/3ZMqg6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9
+UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rPO7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni
+8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitAbpSACW22s293bzUIUPsC
+h8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZXt94wDgYD
+VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEB
+AKChOBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xm
+KbabfSVSSUOrTC4rbnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQ
+X5Ucv+2rIrVls4W6ng+4reV6G4pQOh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWr
+QbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01y8hSyn+B/tlr0/cR7SXf+Of5
+pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061lgeLKBObjBmN
+QSdJQO7e5iNEOdyhIta6A/I=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDEl
+MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMh
+U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIz
+MloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09N
+IFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNlY3VyaXR5IENvbW11
+bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSE
+RMqm4miO/VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gO
+zXppFodEtZDkBp2uoQSXWHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5
+bmB2iDQL87PRsJ3KYeJkHcFGB7hj3R4zZbOOCVVSPbW9/wfrrWFVGCypaZhKqkDF
+MxRldAD5kd6vA0jFQFTcD4SQaCDFkpbcLuUCRarAX1T4bepJz11sS6/vmsJWXMY1
+VkJqMF/Cq/biPT+zyRGPMUzXn0kCAwEAAaNCMEAwHQYDVR0OBBYEFDVK9U2vP9eC
+OKyrcWUXdYydVZPmMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0G
+CSqGSIb3DQEBBQUAA4IBAQCoh+ns+EBnXcPBZsdAS5f8hxOQWsTvoMpfi7ent/HW
+tWS3irO4G8za+6xmiEHO6Pzk2x6Ipu0nUBsCMCRGef4Eh3CXQHPRwMFXGZpppSeZ
+q51ihPZRwSzJIxXYKLerJRO1RuGGAv8mjMSIkh1W/hln8lXkgKNrnKt34VFxDSDb
+EJrbvXZ5B3eZKK2aXtqxT0QsNY6llsf9g/BYxnnWmHyojf6GPgcWkuF75x3sM3Z+
+Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+ELbmaDgcm+7XeEWT1MKZPlO9L9O
+VL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDEl
+MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMe
+U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoX
+DTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRy
+dXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3VyaXR5IENvbW11bmlj
+YXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAV
+OVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGr
+zbl+dp+++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVM
+VAX3NuRFg3sUZdbcDE3R3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQ
+hNBqyjoGADdH5H5XTz+L62e4iKrFvlNVspHEfbmwhRkGeC7bYRr6hfVKkaHnFtWO
+ojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1KEOtOghY6rCcMU/Gt1SSw
+awNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8QIH4D5cs
+OPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3
+DQEBCwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpF
+coJxDjrSzG+ntKEju/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXc
+okgfGT+Ok+vx+hfuzU7jBBJV1uXk3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8
+t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6qtnRGEmyR7jTV7JqR50S+kDFy
+1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29mvVXIwAHIRc/
+SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJO
+TDEeMBwGA1UECgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFh
+dCBkZXIgTmVkZXJsYW5kZW4gUm9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oX
+DTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMCTkwxHjAcBgNVBAoMFVN0YWF0IGRl
+ciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5lZGVybGFuZGVuIFJv
+b3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ5291
+qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8Sp
+uOUfiUtnvWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPU
+Z5uW6M7XxgpT0GtJlvOjCwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvE
+pMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiile7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp
+5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCROME4HYYEhLoaJXhena/M
+UGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpICT0ugpTN
+GmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy
+5V6548r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv
+6q012iDTiIJh8BIitrzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEK
+eN5KzlW/HdXZt1bv8Hb/C3m1r737qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6
+B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMBAAGjgZcwgZQwDwYDVR0TAQH/
+BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcCARYxaHR0cDov
+L3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV
+HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqG
+SIb3DQEBCwUAA4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLyS
+CZa59sCrI2AGeYwRTlHSeYAz+51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen
+5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwjf/ST7ZwaUb7dRUG/kSS0H4zpX897
+IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaNkqbG9AclVMwWVxJK
+gnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfkCpYL
++63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxL
+vJxxcypFURmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkm
+bEgeqmiSBeGCc1qb3AdbCG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvk
+N1trSt8sV4pAWja63XVECDdCcAz+3F4hoKOKwJCcaNpQ5kUQR3i2TtJlycM33+FC
+Y7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoVIPVVYpbtbZNQvOSqeK3Z
+ywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm66+KAQ==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMx
+EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
+HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVs
+ZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAw
+MFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
+b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQgVGVj
+aG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZp
+Y2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAL3twQP89o/8ArFvW59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMg
+nLRJdzIpVv257IzdIvpy3Cdhl+72WoTsbhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1
+HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNkN3mSwOxGXn/hbVNMYq/N
+Hwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7NfZTD4p7dN
+dloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0
+HZbUJtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
+BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0G
+CSqGSIb3DQEBCwUAA4IBAQARWfolTwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjU
+sHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx4mcujJUDJi5DnUox9g61DLu3
+4jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUwF5okxBDgBPfg
+8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
+pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1
+mMpYjn0q7pBZc2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx
+EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
+HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVs
+ZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
+MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNVBAYTAlVTMRAwDgYD
+VQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFy
+ZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2Vy
+dmljZXMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20p
+OsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm2
+8xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4PahHQUw2eeBGg6345AWh1K
+Ts9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLPLJGmpufe
+hRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk
+6mFBrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAw
+DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+q
+AdcwKziIorhtSpzyEZGDMA0GCSqGSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMI
+bw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPPE95Dz+I0swSdHynVv/heyNXB
+ve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTyxQGjhdByPq1z
+qwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
+iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn
+0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN
+sSi6
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEW
+MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
+Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM3WhcNMzYwOTE3MTk0NjM2WjB9
+MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi
+U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
+cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
+A4ICDwAwggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZk
+pMyONvg45iPwbm2xPN1yo4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rf
+OQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/C
+Ji/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/deMotHweXMAEtcnn6RtYT
+Kqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt2PZE4XNi
+HzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMM
+Av+Z6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w
++2OqqGwaVLRcJXrJosmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+
+Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3
+Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVcUjyJthkqcwEKDwOzEmDyei+B
+26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT37uMdBNSSwID
+AQABo4ICEDCCAgwwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD
+VR0OBBYEFE4L7xqkQFulF2mHMMo0aEPQQa7yMB8GA1UdIwQYMBaAFE4L7xqkQFul
+F2mHMMo0aEPQQa7yMIIBWgYDVR0gBIIBUTCCAU0wggFJBgsrBgEEAYG1NwEBATCC
+ATgwLgYIKwYBBQUHAgEWImh0dHA6Ly93d3cuc3RhcnRzc2wuY29tL3BvbGljeS5w
+ZGYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cuc3RhcnRzc2wuY29tL2ludGVybWVk
+aWF0ZS5wZGYwgc8GCCsGAQUFBwICMIHCMCcWIFN0YXJ0IENvbW1lcmNpYWwgKFN0
+YXJ0Q29tKSBMdGQuMAMCAQEagZZMaW1pdGVkIExpYWJpbGl0eSwgcmVhZCB0aGUg
+c2VjdGlvbiAqTGVnYWwgTGltaXRhdGlvbnMqIG9mIHRoZSBTdGFydENvbSBDZXJ0
+aWZpY2F0aW9uIEF1dGhvcml0eSBQb2xpY3kgYXZhaWxhYmxlIGF0IGh0dHA6Ly93
+d3cuc3RhcnRzc2wuY29tL3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgG
+CWCGSAGG+EIBDQQrFilTdGFydENvbSBGcmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1
+dGhvcml0eTANBgkqhkiG9w0BAQsFAAOCAgEAjo/n3JR5fPGFf59Jb2vKXfuM/gTF
+wWLRfUKKvFO3lANmMD+x5wqnUCBVJX92ehQN6wQOQOY+2IirByeDqXWmN3PH/UvS
+Ta0XQMhGvjt/UfzDtgUx3M2FIk5xt/JxXrAaxrqTi3iSSoX4eA+D/i+tLPfkpLst
+0OcNOrg+zvZ49q5HJMqjNTbOx8aHmNrs++myziebiMMEofYLWWivydsQD032ZGNc
+pRJvkrKTlMeIFw6Ttn5ii5B/q06f/ON1FE8qMt9bDeD1e5MNq6HPh+GlBEXoPBKl
+CcWw0bdT82AUuoVpaiF8H3VhFyAXe2w7QSlc4axa0c2Mm+tgHRns9+Ww2vl5GKVF
+P0lDV9LdJNUso/2RjSe15esUBppMeyG7Oq0wBhjA2MFrLH9ZXF2RsXAiV+uKa0hK
+1Q8p7MZAwC+ITGgBF3f0JBlPvfrhsiAhS90a2Cl9qrjeVOwhVYBsHvUwyKMQ5bLm
+KhQxw4UtjJixhlpPiVktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE
+JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ
+8dCAWZvLMdibD4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnm
+fyWl8kgAwKQB2j8=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEW
+MBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlm
+aWNhdGlvbiBBdXRob3JpdHkgRzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1
+OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoG
+A1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRzIwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2iTZbB7cgNr2Cu+EWIAOVeq8Oo1XJ
+JZlKxdBWQYeQTSFgpBSHO839sj60ZwNq7eEPS8CRhXBF4EKe3ikj1AENoBB5uNsD
+vfOpL9HG4A/LnooUCri99lZi8cVytjIl2bLzvWXFDSxu1ZJvGIsAQRSCb0AgJnoo
+D/Uefyf3lLE3PbfHkffiAez9lInhzG7TNtYKGXmu1zSCZf98Qru23QumNK9LYP5/
+Q0kGi4xDuFby2X8hQxfqp0iVAXV16iulQ5XqFYSdCI0mblWbq9zSOdIxHWDirMxW
+RST1HFSr7obdljKF+ExP6JV2tgXdNiNnvP8V4so75qbsO+wmETRIjfaAKxojAuuK
+HDp2KntWFhxyKrOq42ClAJ8Em+JvHhRYW6Vsi1g8w7pOOlz34ZYrPu8HvKTlXcxN
+nw3h3Kq74W4a7I/htkxNeXJdFzULHdfBR9qWJODQcqhaX2YtENwvKhOuJv4KHBnM
+0D4LnMgJLvlblnpHnOl68wVQdJVznjAJ85eCXuaPOQgeWeU1FEIT/wCc976qUM/i
+UUjXuG+v+E5+M5iSFGI6dWPPe/regjupuznixL0sAA7IF6wT700ljtizkC+p2il9
+Ha90OrInwMEePnWjFqmveiJdnxMaz6eg6+OGCtP95paV1yPIN93EfKo2rJgaErHg
+TuixO/XWb/Ew1wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE
+AwIBBjAdBgNVHQ4EFgQUS8W0QGutHLOlHGVuRjaJhwUMDrYwDQYJKoZIhvcNAQEL
+BQADggIBAHNXPyzVlTJ+N9uWkusZXn5T50HsEbZH77Xe7XRcxfGOSeD8bpkTzZ+K
+2s06Ctg6Wgk/XzTQLwPSZh0avZyQN8gMjgdalEVGKua+etqhqaRpEpKwfTbURIfX
+UfEpY9Z1zRbkJ4kd+MIySP3bmdCPX1R0zKxnNBFi2QwKN4fRoxdIjtIXHfbX/dtl
+6/2o1PXWT6RbdejF0mCy2wl+JYt7ulKSnj7oxXehPOBKc2thz4bcQ///If4jXSRK
+9dNtD2IEBVeC2m6kMyV5Sy5UGYvMLD0w6dEG/+gyRr61M3Z3qAFdlsHB1b6uJcDJ
+HgoJIIihDsnzb02CVAAgp9KP5DlUFy6NHrgbuxu9mk47EDTcnIhT76IxW1hPkWLI
+wpqazRVdOKnWvvgTtZ8SafJQYqz7Fzf07rh1Z2AQ+4NQ+US1dZxAF7L+/XldblhY
+XzD8AK6vM8EOTmy6p6ahfzLbOOCxchcKK5HsamMm7YnUeMx0HgX4a/6ManY5Ka5l
+IxKVCCIcl85bBu4M4ru8H0ST9tg4RQUh7eStqxK2A6RCLi3ECToDZ2mEmuFZkIoo
+hdVddLHRDiBYmxOlsGOm7XtH/UVVMKTumtTm4ofvmMkyghEpIrwACjFeLQ/Ajulr
+so8uBtjRkcfGEvRM/TAXw8HaOFvjqermobp573PYtlNXLfbQ4ddI
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEezCCA2OgAwIBAgIQNxkY5lNUfBq1uMtZWts1tzANBgkqhkiG9w0BAQUFADCB
+rjELMAkGA1UEBhMCREUxIDAeBgNVBAgTF0JhZGVuLVd1ZXJ0dGVtYmVyZyAoQlcp
+MRIwEAYDVQQHEwlTdHV0dGdhcnQxKTAnBgNVBAoTIERldXRzY2hlciBTcGFya2Fz
+c2VuIFZlcmxhZyBHbWJIMT4wPAYDVQQDEzVTLVRSVVNUIEF1dGhlbnRpY2F0aW9u
+IGFuZCBFbmNyeXB0aW9uIFJvb3QgQ0EgMjAwNTpQTjAeFw0wNTA2MjIwMDAwMDBa
+Fw0zMDA2MjEyMzU5NTlaMIGuMQswCQYDVQQGEwJERTEgMB4GA1UECBMXQmFkZW4t
+V3VlcnR0ZW1iZXJnIChCVykxEjAQBgNVBAcTCVN0dXR0Z2FydDEpMCcGA1UEChMg
+RGV1dHNjaGVyIFNwYXJrYXNzZW4gVmVybGFnIEdtYkgxPjA8BgNVBAMTNVMtVFJV
+U1QgQXV0aGVudGljYXRpb24gYW5kIEVuY3J5cHRpb24gUm9vdCBDQSAyMDA1OlBO
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2bVKwdMz6tNGs9HiTNL1
+toPQb9UY6ZOvJ44TzbUlNlA0EmQpoVXhOmCTnijJ4/Ob4QSwI7+Vio5bG0F/WsPo
+TUzVJBY+h0jUJ67m91MduwwA7z5hca2/OnpYH5Q9XIHV1W/fuJvS9eXLg3KSwlOy
+ggLrra1fFi2SU3bxibYs9cEv4KdKb6AwajLrmnQDaHgTncovmwsdvs91DSaXm8f1
+XgqfeN+zvOyauu9VjxuapgdjKRdZYgkqeQd3peDRF2npW932kKvimAoA0SVtnteF
+hy+S8dF2g08LOlk3KC8zpxdQ1iALCvQm+Z845y2kuJuJja2tyWp9iRe79n+Ag3rm
+7QIDAQABo4GSMIGPMBIGA1UdEwEB/wQIMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEG
+MCkGA1UdEQQiMCCkHjAcMRowGAYDVQQDExFTVFJvbmxpbmUxLTIwNDgtNTAdBgNV
+HQ4EFgQUD8oeXHngovMpttKFswtKtWXsa1IwHwYDVR0jBBgwFoAUD8oeXHngovMp
+ttKFswtKtWXsa1IwDQYJKoZIhvcNAQEFBQADggEBAK8B8O0ZPCjoTVy7pWMciDMD
+pwCHpB8gq9Yc4wYfl35UvbfRssnV2oDsF9eK9XvCAPbpEW+EoFolMeKJ+aQAPzFo
+LtU96G7m1R08P7K9n3frndOMusDXtk3sU5wPBG7qNWdX4wple5A64U8+wwCSersF
+iXOMy6ZNwPv2AtawB6MDwidAnwzkhYItr5pCHdDHjfhA7p0GVxzZotiAFP7hYy0y
+h9WUUpY6RsZxlj33mA6ykaqP2vROJAA5VeitF7nTNCtKqUDMFypVZUF0Qn71wK/I
+k63yGFs9iQzbRzkk+OBM8h+wPQrKBU6JIRrjKpms/H+h8Q8bHz2eBIPdltkdOpQ=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIF2TCCA8GgAwIBAgIQHp4o6Ejy5e/DfEoeWhhntjANBgkqhkiG9w0BAQsFADBk
+MQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0
+YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3Qg
+Q0EgMjAeFw0xMTA2MjQwODM4MTRaFw0zMTA2MjUwNzM4MTRaMGQxCzAJBgNVBAYT
+AmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGlnaXRhbCBDZXJ0aWZp
+Y2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAyMIICIjAN
+BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAlUJOhJ1R5tMJ6HJaI2nbeHCOFvEr
+jw0DzpPMLgAIe6szjPTpQOYXTKueuEcUMncy3SgM3hhLX3af+Dk7/E6J2HzFZ++r
+0rk0X2s682Q2zsKwzxNoysjL67XiPS4h3+os1OD5cJZM/2pYmLcX5BtS5X4HAB1f
+2uY+lQS3aYg5oUFgJWFLlTloYhyxCwWJwDaCFCE/rtuh/bxvHGCGtlOUSbkrRsVP
+ACu/obvLP+DHVxxX6NZp+MEkUp2IVd3Chy50I9AU/SpHWrumnf2U5NGKpV+GY3aF
+y6//SSj8gO1MedK75MDvAe5QQQg1I3ArqRa0jG6F6bYRzzHdUyYb3y1aSgJA/MTA
+tukxGggo5WDDH8SQjhBiYEQN7Aq+VRhxLKX0srwVYv8c474d2h5Xszx+zYIdkeNL
+6yxSNLCK/RJOlrDrcH+eOfdmQrGrrFLadkBXeyq96G4DsguAhYidDMfCd7Camlf0
+uPoTXGiTOmekl9AbmbeGMktg2M7v0Ax/lZ9vh0+Hio5fCHyqW/xavqGRn1V9TrAL
+acywlKinh/LTSlDcX3KwFnUey7QYYpqwpzmqm59m2I2mbJYV4+by+PGDYmy7Velh
+k6M99bFXi08jsJvllGov34zflVEpYKELKeRcVVi3qPyZ7iVNTA6z00yPhOgpD/0Q
+VAKFyPnlw4vP5w8CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0hBBYw
+FDASBgdghXQBUwIBBgdghXQBUwIBMBIGA1UdEwEB/wQIMAYBAf8CAQcwHQYDVR0O
+BBYEFE0mICKJS9PVpAqhb97iEoHF8TwuMB8GA1UdIwQYMBaAFE0mICKJS9PVpAqh
+b97iEoHF8TwuMA0GCSqGSIb3DQEBCwUAA4ICAQAyCrKkG8t9voJXiblqf/P0wS4R
+fbgZPnm3qKhyN2abGu2sEzsOv2LwnN+ee6FTSA5BesogpxcbtnjsQJHzQq0Qw1zv
+/2BZf82Fo4s9SBwlAjxnffUy6S8w5X2lejjQ82YqZh6NM4OKb3xuqFp1mrjX2lhI
+REeoTPpMSQpKwhI3qEAMw8jh0FcNlzKVxzqfl9NX+Ave5XLzo9v/tdhZsnPdTSpx
+srpJ9csc1fV5yJmz/MFMdOO0vSk3FQQoHt5FRnDsr7p4DooqzgB53MBfGWcsa0vv
+aGgLQ+OswWIJ76bdZWGgr4RVSJFSHMYlkSrQwSIjYVmvRRGFHQEkNI/Ps/8XciAT
+woCqISxxOQ7Qj1zB09GOInJGTB2Wrk9xseEFKZZZ9LuedT3PDTcNYtsmjGOpI99n
+Bjx8Oto0QuFmtEYE3saWmA9LSHokMnWRn6z3aOkquVVlzl1h0ydw2Df+n7mvoC5W
+t6NlUe07qxS/TFED6F+KBZvuim6c779o+sjaC+NCydAXFJy3SuCvkychVSa1ZC+N
+8f+mQAWFBVzKBxlcCxMoTFh/wqXvRdpg065lYZ1Tg3TCrvJcwhbtkj6EPnNgiLx2
+9CzP0H1907he0ZESEOnN3col49XtmS++dYFLJPlFRpTJKSFTnCZFqhMX5OfNeOI5
+wSsSnqaeG8XmDtkx2Q==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIF4DCCA8igAwIBAgIRAPL6ZOJ0Y9ON/RAdBB92ylgwDQYJKoZIhvcNAQELBQAw
+ZzELMAkGA1UEBhMCY2gxETAPBgNVBAoTCFN3aXNzY29tMSUwIwYDVQQLExxEaWdp
+dGFsIENlcnRpZmljYXRlIFNlcnZpY2VzMR4wHAYDVQQDExVTd2lzc2NvbSBSb290
+IEVWIENBIDIwHhcNMTEwNjI0MDk0NTA4WhcNMzEwNjI1MDg0NTA4WjBnMQswCQYD
+VQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0YWwgQ2Vy
+dGlmaWNhdGUgU2VydmljZXMxHjAcBgNVBAMTFVN3aXNzY29tIFJvb3QgRVYgQ0Eg
+MjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMT3HS9X6lds93BdY7Bx
+UglgRCgzo3pOCvrY6myLURYaVa5UJsTMRQdBTxB5f3HSek4/OE6zAMaVylvNwSqD
+1ycfMQ4jFrclyxy0uYAyXhqdk/HoPGAsp15XGVhRXrwsVgu42O+LgrQ8uMIkqBPH
+oCE2G3pXKSinLr9xJZDzRINpUKTk4RtiGZQJo/PDvO/0vezbE53PnUgJUmfANykR
+HvvSEaeFGHR55E+FFOtSN+KxRdjMDUN/rhPSays/p8LiqG12W0OfvrSdsyaGOx9/
+5fLoZigWJdBLlzin5M8J0TbDC77aO0RYjb7xnglrPvMyxyuHxuxenPaHZa0zKcQv
+idm5y8kDnftslFGXEBuGCxobP/YCfnvUxVFkKJ3106yDgYjTdLRZncHrYTNaRdHL
+OdAGalNgHa/2+2m8atwBz735j9m9W8E6X47aD0upm50qKGsaCnw8qyIL5XctcfaC
+NYGu+HuB5ur+rPQam3Rc6I8k9l2dRsQs0h4rIWqDJ2dVSqTjyDKXZpBy2uPUZC5f
+46Fq9mDU5zXNysRojddxyNMkM3OxbPlq4SjbX8Y96L5V5jcb7STZDxmPX2MYWFCB
+UWVv8p9+agTnNCRxunZLWB4ZvRVgRaoMEkABnRDixzgHcgplwLa7JSnaFp6LNYth
+7eVxV4O1PHGf40+/fh6Bn0GXAgMBAAGjgYYwgYMwDgYDVR0PAQH/BAQDAgGGMB0G
+A1UdIQQWMBQwEgYHYIV0AVMCAgYHYIV0AVMCAjASBgNVHRMBAf8ECDAGAQH/AgED
+MB0GA1UdDgQWBBRF2aWBbj2ITY1x0kbBbkUe88SAnTAfBgNVHSMEGDAWgBRF2aWB
+bj2ITY1x0kbBbkUe88SAnTANBgkqhkiG9w0BAQsFAAOCAgEAlDpzBp9SSzBc1P6x
+XCX5145v9Ydkn+0UjrgEjihLj6p7jjm02Vj2e6E1CqGdivdj5eu9OYLU43otb98T
+PLr+flaYC/NUn81ETm484T4VvwYmneTwkLbUwp4wLh/vx3rEUMfqe9pQy3omywC0
+Wqu1kx+AiYQElY2NfwmTv9SoqORjbdlk5LgpWgi/UOGED1V7XwgiG/W9mR4U9s70
+WBCCswo9GcG/W6uqmdjyMb3lOGbcWAXH7WMaLgqXfIeTK7KK4/HsGOV1timH59yL
+Gn602MnTihdsfSlEvoqq9X46Lmgxk7lq2prg2+kupYTNHAq4Sgj5nPFhJpiTt3tm
+7JFe3VE/23MPrQRYCd0EApUKPtN236YQHoA96M2kZNEzx5LH4k5E4wnJTsJdhw4S
+nr8PyQUQ3nqjsTzyP6WqJ3mtMX0f/fwZacXduT98zca0wjAefm6S139hdlqP65VN
+vBFuIXxZN5nQBrz5Bm0yFqXZaajh3DyAHmBR3NdUIR7KYndP+tiPsys6DXhyyWhB
+WkdKwqPrGtcKqzwyVcgKEZzfdNbwQBUdyLmPtTbFr/giuMod89a2GQ+fYWVq6nTI
+fI/DT11lgh/ZDYnadXL77/FHZxOzyNEZiCcmmpl5fx7kLD977vHeTYuWl8PVP3wb
+I+2ksx0WckNLIOFZfsLorSa/ovc=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjEL
+MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
+BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
+Q2VudGVyIENsYXNzIDIgQ0EgSUkwHhcNMDYwMTEyMTQzODQzWhcNMjUxMjMxMjI1
+OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
+SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQTElMCMGA1UEAxMc
+VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBAKuAh5uO8MN8h9foJIIRszzdQ2Lu+MNF2ujhoF/RKrLqk2jf
+tMjWQ+nEdVl//OEd+DFwIxuInie5e/060smp6RQvkL4DUsFJzfb95AhmC1eKokKg
+uNV/aVyQMrKXDcpK3EY+AlWJU+MaWss2xgdW94zPEfRMuzBwBJWl9jmM/XOBCH2J
+XjIeIqkiRUuwZi4wzJ9l/fzLganx4Duvo4bRierERXlQXa7pIXSSTYtZgo+U4+lK
+8edJsBTj9WLL1XK9H7nSn6DNqPoByNkN39r8R52zyFTfSUrxIan+GE7uSNQZu+99
+5OKdy1u2bv/jzVrndIIFuoAlOMvkaZ6vQaoahPUCAwEAAaOCATQwggEwMA8GA1Ud
+EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTjq1RMgKHbVkO3
+kUrL84J6E1wIqzCB7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRy
+dXN0Y2VudGVyLmRlL2NybC92Mi90Y19jbGFzc18yX2NhX0lJLmNybIaBn2xkYXA6
+Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBUcnVzdENlbnRlciUyMENsYXNz
+JTIwMiUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21iSCxPVT1yb290
+Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
+TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEAjNfffu4bgBCzg/XbEeprS6iS
+GNn3Bzn1LL4GdXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprt
+ZjluS5TmVfwLG4t3wVMTZonZKNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8
+au0WOB9/WIFaGusyiC2y8zl3gK9etmF1KdsjTYjKUCjLhdLTEKJZbtOTVAB6okaV
+hgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kPJOzHdiEoZa5X6AeI
+dUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfkvQ==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjEL
+MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNV
+BAsTGVRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0ExJTAjBgNVBAMTHFRDIFRydXN0
+Q2VudGVyIENsYXNzIDMgQ0EgSUkwHhcNMDYwMTEyMTQ0MTU3WhcNMjUxMjMxMjI1
+OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIgR21i
+SDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQTElMCMGA1UEAxMc
+VEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBALTgu1G7OVyLBMVMeRwjhjEQY0NVJz/GRcekPewJDRoeIMJW
+Ht4bNwcwIi9v8Qbxq63WyKthoy9DxLCyLfzDlml7forkzMA5EpBCYMnMNWju2l+Q
+Vl/NHE1bWEnrDgFPZPosPIlY2C8u4rBo6SI7dYnWRBpl8huXJh0obazovVkdKyT2
+1oQDZogkAHhg8fir/gKya/si+zXmFtGt9i4S5Po1auUZuV3bOx4a+9P/FRQI2Alq
+ukWdFHlgfa9Aigdzs5OW03Q0jTo3Kd5c7PXuLjHCINy+8U9/I1LZW+Jk2ZyqBwi1
+Rb3R0DHBq1SfqdLDYmAD8bs5SpJKPQq5ncWg/jcCAwEAAaOCATQwggEwMA8GA1Ud
+EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTUovyfs8PYA9NX
+XAek0CSnwPIA1DCB7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRy
+dXN0Y2VudGVyLmRlL2NybC92Mi90Y19jbGFzc18zX2NhX0lJLmNybIaBn2xkYXA6
+Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBUcnVzdENlbnRlciUyMENsYXNz
+JTIwMyUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21iSCxPVT1yb290
+Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
+TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEANmDkcPcGIEPZIxpC8vijsrlN
+irTzwppVMXzEO2eatN9NDoqTSheLG43KieHPOh6sHfGcMrSOWXaiQYUlN6AT0PV8
+TtXqluJucsG7Kv5sbviRmEb8yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6
+g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9IJqDnxrcOfHFcqMRA/07QlIp2+gB
+95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal092Y+tTmBvTwtiBj
+S+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc5A==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTEL
+MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNV
+BAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1
+c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcNMDYwMzIyMTU1NDI4WhcNMjUxMjMx
+MjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIg
+R21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYwJAYD
+VQQDEx1UQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0EgSTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBAKR3I5ZEr5D0MacQ9CaHnPM42Q9e3s9B6DGtxnSR
+JJZ4Hgmgm5qVSkr1YnwCqMqs+1oEdjneX/H5s7/zA1hV0qq34wQi0fiU2iIIAI3T
+fCZdzHd55yx4Oagmcw6iXSVphU9VDprvxrlE4Vc93x9UIuVvZaozhDrzznq+VZeu
+jRIPFDPiUHDDSYcTvFHe15gSWu86gzOSBnWLknwSaHtwag+1m7Z3W0hZneTvWq3z
+wZ7U10VOylY0Ibw+F1tvdwxIAUMpsN0/lm7mlaoMwCC2/T42J5zjXM9OgdwZu5GQ
+fezmlwQek8wiSdeXhrYTCjxDI3d+8NzmzSQfO4ObNDqDNOMCAwEAAaNjMGEwHwYD
+VR0jBBgwFoAUkqR1LKSevoFE63n8isWVpesQdXMwDwYDVR0TAQH/BAUwAwEB/zAO
+BgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFJKkdSyknr6BROt5/IrFlaXrEHVzMA0G
+CSqGSIb3DQEBBQUAA4IBAQAo0uCG1eb4e/CX3CJrO5UUVg8RMKWaTzqwOuAGy2X1
+7caXJ/4l8lfmXpWMPmRgFVp/Lw0BxbFg/UU1z/CyvwbZ71q+s2IhtNerNXxTPqYn
+8aEt2hojnczd7Dwtnic0XQ/CNnm8yUpiLe1r2X1BQ3y2qsrtYbE3ghUJGooWMNjs
+ydZHcnhLEEYUjl8Or+zHL6sQ17bxbuyGssLoDZJz3KL0Dzq/YSMQiZxIQG5wALPT
+ujdEWBF6AmqI8Dc08BnprNRlc/ZpjGSUOnmFKbAWKwyCPwacx/0QK54PLLae4xW/
+2TYcuiUaUj0a7CIMHOCkoj3w6DnPgcB77V0fb8XQC9eY
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDEL
+MAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMp
+IDIwMDcgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAi
+BgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMjAeFw0wNzExMDUwMDAw
+MDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
+d3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBGb3Ig
+YXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9v
+dCBDQSAtIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/
+BebfowJPDQfGAFG6DAJSLSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6
+papu+7qzcMBniKI11KOasf2twu8x+qi58/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8E
+BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUmtgAMADna3+FGO6Lts6K
+DPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUNG4k8VIZ3
+KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41ox
+XZ3Krr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCB
+rjELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf
+Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw
+MDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNV
+BAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0wODA0MDIwMDAwMDBa
+Fw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhhd3Rl
+LCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9u
+MTgwNgYDVQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXpl
+ZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEcz
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsr8nLPvb2FvdeHsbnndm
+gcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2AtP0LMqmsywCPLLEHd5N/8
+YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC+BsUa0Lf
+b1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS9
+9irY7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2S
+zhkGcuYMXDhpxwTWvGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUk
+OQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV
+HQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJKoZIhvcNAQELBQADggEBABpA
+2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweKA3rD6z8KLFIW
+oCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
+t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7c
+KUGRIjxpp7sC8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fM
+m7v/OeZWYdMKp8RcTGB7BXcmer/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZu
+MdRAGmI0Nj81Aa6sY6A=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBF
+MQswCQYDVQQGEwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQL
+ExNUcnVzdGlzIEZQUyBSb290IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTEx
+MzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNVBAoTD1RydXN0aXMgTGltaXRlZDEc
+MBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQRUN+
+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihH
+iTHcDnlkH5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjj
+vSkCqPoc4Vu5g6hBSLwacY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA
+0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zto3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlB
+OrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEAAaNTMFEwDwYDVR0TAQH/
+BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAdBgNVHQ4E
+FgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01
+GX2cGE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmW
+zaD+vkAMXBJV+JOCyinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP4
+1BIy+Q7DsdwyhEQsb8tGD+pmQQ9P8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZE
+f1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHVl/9D7S3B2l0pKoU/rGXuhg8F
+jZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYliB6XzCGcKQEN
+ZetX2fNXlrtIzYE=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUx
+KzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAd
+BgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNl
+YyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgxMDAxMTAyOTU2WhcNMzMxMDAxMjM1
+OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lzdGVtcyBFbnRlcnBy
+aXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBDZW50
+ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0G
+CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN
+8ELg63iIVl6bmlQdTQyK9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/
+RLyTPWGrTs0NvvAgJ1gORH8EGoel15YUNpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4
+hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZFiP0Zf3WHHx+xGwpzJFu5
+ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W0eDrXltM
+EnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGj
+QjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1
+A/d2O2GCahKqGFPrAyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOy
+WL6ukK2YJ5f+AbGwUgC4TeQbIXQbfsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ
+1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzTucpH9sry9uetuUg/vBa3wW30
+6gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7hP0HHRwA11fXT
+91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml
+e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4p
+TpPDpFQUWw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRS
+MRgwFgYDVQQHDA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJp
+bGltc2VsIHZlIFRla25vbG9qaWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSw
+VEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ryb25payB2ZSBLcmlwdG9sb2ppIEFy
+YcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNVBAsMGkthbXUgU2Vy
+dGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUgS8O2
+ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAe
+Fw0wNzA4MjQxMTM3MDdaFw0xNzA4MjExMTM3MDdaMIIBKzELMAkGA1UEBhMCVFIx
+GDAWBgNVBAcMD0dlYnplIC0gS29jYWVsaTFHMEUGA1UECgw+VMO8cmtpeWUgQmls
+aW1zZWwgdmUgVGVrbm9sb2ppayBBcmHFn3TEsXJtYSBLdXJ1bXUgLSBUw5xCxLBU
+QUsxSDBGBgNVBAsMP1VsdXNhbCBFbGVrdHJvbmlrIHZlIEtyaXB0b2xvamkgQXJh
+xZ90xLFybWEgRW5zdGl0w7xzw7wgLSBVRUtBRTEjMCEGA1UECwwaS2FtdSBTZXJ0
+aWZpa2FzeW9uIE1lcmtlemkxSjBIBgNVBAMMQVTDnELEsFRBSyBVRUtBRSBLw7Zr
+IFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIC0gU8O8csO8bSAzMIIB
+IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAim1L/xCIOsP2fpTo6iBkcK4h
+gb46ezzb8R1Sf1n68yJMlaCQvEhOEav7t7WNeoMojCZG2E6VQIdhn8WebYGHV2yK
+O7Rm6sxA/OOqbLLLAdsyv9Lrhc+hDVXDWzhXcLh1xnnRFDDtG1hba+818qEhTsXO
+fJlfbLm4IpNQp81McGq+agV/E5wrHur+R84EpW+sky58K5+eeROR6Oqeyjh1jmKw
+lZMq5d/pXpduIF9fhHpEORlAHLpVK/swsoHvhOPc7Jg4OQOFCKlUAwUp8MmPi+oL
+hmUZEdPpCSPeaJMDyTYcIW7OjGbxmTDY17PDHfiBLqi9ggtm/oLL4eAagsNAgQID
+AQABo0IwQDAdBgNVHQ4EFgQUvYiHyY/2pAoLquvF/pEjnatKijIwDgYDVR0PAQH/
+BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAB18+kmP
+NOm3JpIWmgV050vQbTlswyb2zrgxvMTfvCr4N5EY3ATIZJkrGG2AA1nJrvhY0D7t
+wyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLTy9LQQfMmNkqblWwM
+7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYhLBOh
+gLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5n
+oN+J1q2MdqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUs
+yZyQ2uypQjyttgI=
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEPTCCAyWgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvzE/MD0GA1UEAww2VMOc
+UktUUlVTVCBFbGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sx
+c8SxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMV4wXAYDVQQKDFVUw5xS
+S1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kg
+SGl6bWV0bGVyaSBBLsWeLiAoYykgQXJhbMSxayAyMDA3MB4XDTA3MTIyNTE4Mzcx
+OVoXDTE3MTIyMjE4MzcxOVowgb8xPzA9BgNVBAMMNlTDnFJLVFJVU1QgRWxla3Ry
+b25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTELMAkGA1UEBhMC
+VFIxDzANBgNVBAcMBkFua2FyYTFeMFwGA1UECgxVVMOcUktUUlVTVCBCaWxnaSDE
+sGxldGnFn2ltIHZlIEJpbGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7F
+ni4gKGMpIEFyYWzEsWsgMjAwNzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAKu3PgqMyKVYFeaK7yc9SrToJdPNM8Ig3BnuiD9NYvDdE3ePYakqtdTyuTFY
+KTsvP2qcb3N2Je40IIDu6rfwxArNK4aUyeNgsURSsloptJGXg9i3phQvKUmi8wUG
++7RP2qFsmmaf8EMJyupyj+sA1zU511YXRxcw9L6/P8JorzZAwan0qafoEGsIiveG
+HtyaKhUG9qPw9ODHFNRRf8+0222vR5YXm3dx2KdxnSQM9pQ/hTEST7ruToK4uT6P
+IzdezKKqdfcYbwnTrqdUKDT74eA7YH2gvnmJhsifLfkKS8RQouf9eRbHegsYz85M
+733WB2+Y8a+xwXrXgTW4qhe04MsCAwEAAaNCMEAwHQYDVR0OBBYEFCnFkKslrxHk
+Yb+j/4hhkeYO/pyBMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0G
+CSqGSIb3DQEBBQUAA4IBAQAQDdr4Ouwo0RSVgrESLFF6QSU2TJ/sPx+EnWVUXKgW
+AkD6bho3hO9ynYYKVZ1WKKxmLNA6VpM0ByWtCLCPyA8JWcqdmBzlVPi5RX9ql2+I
+aE1KBiY3iAIOtsbWcpnOa3faYjGkVh+uX4132l32iPwa2Z61gfAyuOOI0JzzaqC5
+mxRZNTZPz/OOXl0XrRWV2N2y1RVuAE6zS89mlOTgzbUF2mNXi+WzqtvALhyQRNsa
+XRik7r4EW5nVcV9VZWRi1aKbBFmGyGJ353yCRWo9F7/snXUMrqNvWtMvmDb08PUZ
+qxFdyKbjKlhqQgnDvZImZjINXQhVdP+MmNAKpoRq0Tl9
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzES
+MBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFU
+V0NBIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMz
+WhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJVEFJV0FO
+LUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlm
+aWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFE
+AcK0HMMxQhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HH
+K3XLfJ+utdGdIzdjp9xCoi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeX
+RfwZVzsrb+RH9JlF/h3x+JejiB03HFyP4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/z
+rX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1ry+UPizgN7gr8/g+YnzAx
+3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
+HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkq
+hkiG9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeC
+MErJk/9q56YAf4lCmtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdls
+XebQ79NqZp4VKIV66IIArB6nCWlWQtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62D
+lhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVYT0bf+215WfKEIlKuD8z7fDvn
+aspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocnyYh0igzyXxfkZ
+YiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
+cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
+MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
+BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
+ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
+BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
+I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
+CSqGSIb3DQEBBQUAA4GBABByUqkFFBkyCEHwxWsKzH4PIRnN5GfcX6kb5sroc50i
+2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWXbj9T/UWZYB2oK0z5XqcJ
+2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/D/xwzoiQ
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjEL
+MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
+ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2ln
+biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
+U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y
+aXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjELMAkG
+A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJp
+U2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwg
+SW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2ln
+biBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
+IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8Utpkmw4tXNherJI9/gHm
+GUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGzrl0Bp3ve
+fLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUw
+AwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJ
+aW1hZ2UvZ2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYj
+aHR0cDovL2xvZ28udmVyaXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMW
+kf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMDA2gAMGUCMGYhDBgmYFo4e1ZC
+4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIxAJw9SDkjOVga
+FRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCB
+vTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
+ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJp
+U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MTgwNgYDVQQDEy9W
+ZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
+Fw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJVUzEX
+MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0
+IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9y
+IGF1dGhvcml6ZWQgdXNlIG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNh
+bCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj1mCOkdeQmIN65lgZOIzF
+9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGPMiJhgsWH
+H26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+H
+LL729fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN
+/BMReYTtXlT2NJ8IAfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPT
+rJ9VAMf2CGqUuV/c4DPxhGD5WycRtPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1Ud
+EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0GCCsGAQUFBwEMBGEwX6FdoFsw
+WTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2Oa8PPgGrUSBgs
+exkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
+DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4
+sAPmLGd75JR3Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+
+seQxIcaBlVZaDrHC1LGmWazxY8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz
+4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTxP/jgdFcrGJ2BtMQo2pSXpXDrrB2+
+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+PwGZsY6rp2aQW9IHR
+lRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4mJO3
+7M2CYfE45k+XmCpajQ==
+-----END CERTIFICATE-----
diff --git a/src/itc/key-manager/dfb08fe4.0 b/src/itc/key-manager/dfb08fe4.0
new file mode 100755 (executable)
index 0000000..c349ba3
--- /dev/null
@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDnzCCAoegAwIBAgIJAMH/ADkC5YSTMA0GCSqGSIb3DQEBBQUAMGYxCzAJBgNV
+BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMQ0wCwYDVQQKDARBQ01FMRAwDgYD
+VQQLDAdUZXN0aW5nMSEwHwYDVQQDDBhUZXN0IHJvb3QgY2EgY2VydGlmaWNhdGUw
+HhcNMTQxMjMwMTcyMTUyWhcNMjQxMjI3MTcyMTUyWjBmMQswCQYDVQQGEwJBVTET
+MBEGA1UECAwKU29tZS1TdGF0ZTENMAsGA1UECgwEQUNNRTEQMA4GA1UECwwHVGVz
+dGluZzEhMB8GA1UEAwwYVGVzdCByb290IGNhIGNlcnRpZmljYXRlMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0EJRdUtd2th0vTVF7QxvDKzyFCF3w9vC
+9IDE/Yr12w+a9jd0s7/eG96qTHIYffS3B7x2MB+d4n+SR3W0qmYh7xk8qfEgH3da
+eDoV59IZ9r543KM+g8jm6KffYGX1bIJVVY5OhBRbO9nY6byYpd5kbCIUB6dCf7/W
+rQl1aIdLGFIegAzPGFPXDcU6F192686x54bxt/itMX4agHJ9ZC/rrTBIZghVsjJo
+5/AH5WZpasv8sfrGiiohAxtieoYoJkv5MOYP4/2lPlOY+Cgw1Yoz+HHv31AllgFs
+BquBb/kJVmCCNsAOcnvQzTZUsW/TXz9G2nwRdqI1nSy2JvVjZGsqGQIDAQABo1Aw
+TjAdBgNVHQ4EFgQUt6pkzFt1PZlfYRL/HGnufF4frdwwHwYDVR0jBBgwFoAUt6pk
+zFt1PZlfYRL/HGnufF4frdwwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
+AQEAld7Qwq0cdzDQ51w1RVLwTR8Oy25PB3rzwEHcSGJmdqlMi3xOdaz80S1R1BBX
+ldvGBG5Tn0vT7xSuhmSgI2/HnBpy9ocHVOmhtNB4473NieEpfTYrnGXrFxu46Wus
+9m/ZnugcQ2G6C54A/NFtvgLmaC8uH8M7gKdS6uYUwJFQEofkjmd4UpOYSqmcRXhS
+Jzd5FYFWkJhKJYp3nlENSOD8CUFFVGekm05nFN2gRVc/qaqQkEX77+XYvhodLRsV
+qMn7nf7taidDKLO2T4bhujztnTYOhhaXKgPy7AtZ28N2wvX96VyAPB/vrchGmyBK
+kOg11TpPdNDkhb1J4ZCh2gupDg==
+-----END CERTIFICATE-----
diff --git a/src/itc/key-manager/signer.p12 b/src/itc/key-manager/signer.p12
new file mode 100755 (executable)
index 0000000..d266ac6
Binary files /dev/null and b/src/itc/key-manager/signer.p12 differ
diff --git a/src/itc/key-manager/tct-key-manager-native.c b/src/itc/key-manager/tct-key-manager-native.c
new file mode 100755 (executable)
index 0000000..93fa448
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-key-manager-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/key-manager/tct-key-manager-native.h b/src/itc/key-manager/tct-key-manager-native.h
new file mode 100755 (executable)
index 0000000..0e2be24
--- /dev/null
@@ -0,0 +1,81 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_KEY_MANAGER_NATIVE_H__
+#define __TCT_KEY_MANAGER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_key_manager_startup(void);
+extern void ITs_key_manager_cleanup(void);
+
+extern int ITc_ckmc_save_key_p(void);
+extern int ITc_ckmc_remove_key_p(void);
+extern int ITc_ckmc_get_key_p(void);
+extern int ITc_ckmc_get_key_alias_list_p(void);
+extern int ITc_ckmc_save_cert_p(void);
+extern int ITc_ckmc_remove_cert_p(void);
+extern int ITc_ckmc_get_cert_p(void);
+extern int ITc_ckmc_get_cert_alias_list_p(void);
+extern int ITc_ckmc_save_data_p(void);
+extern int ITc_ckmc_remove_data_p(void);
+extern int ITc_ckmc_get_data_p(void);
+extern int ITc_ckmc_get_data_alias_list_p(void);
+extern int ITc_ckmc_create_key_pair_rsa_p(void);
+extern int ITc_ckmc_create_key_pair_dsa_p(void);
+extern int ITc_ckmc_create_key_pair_ecdsa_p(void);
+extern int ITc_ckmc_create_verify_signature_p(void);
+extern int ITc_ckmc_get_cert_chain_p(void);
+extern int ITc_ckmc_get_cert_chain_with_alias_p(void);
+extern int ITc_ckmc_key_free_p(void);
+extern int ITc_ckmc_buffer_free_p(void);
+extern int ITc_ckmc_cert_free_p(void);
+extern int ITc_ckmc_load_cert_from_file_p(void);
+extern int ITc_ckmc_load_from_pkcs12_file_p(void);
+extern int ITc_ckmc_alias_list_all_free_p(void);
+extern int ITc_ckmc_cert_list_all_free_p(void);
+extern int ITc_ckmc_allow_deny_access_p(void);
+
+testcase tc_array[] = {
+    {"ITc_ckmc_save_key_p", ITc_ckmc_save_key_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_remove_key_p", ITc_ckmc_remove_key_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_get_key_p", ITc_ckmc_get_key_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_get_key_alias_list_p", ITc_ckmc_get_key_alias_list_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_save_cert_p", ITc_ckmc_save_cert_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_remove_cert_p", ITc_ckmc_remove_cert_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_get_cert_p", ITc_ckmc_get_cert_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_get_cert_alias_list_p", ITc_ckmc_get_cert_alias_list_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_save_data_p", ITc_ckmc_save_data_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_remove_data_p", ITc_ckmc_remove_data_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_get_data_p", ITc_ckmc_get_data_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_get_data_alias_list_p", ITc_ckmc_get_data_alias_list_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_create_key_pair_rsa_p", ITc_ckmc_create_key_pair_rsa_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_create_key_pair_dsa_p", ITc_ckmc_create_key_pair_dsa_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_create_key_pair_ecdsa_p", ITc_ckmc_create_key_pair_ecdsa_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_create_verify_signature_p", ITc_ckmc_create_verify_signature_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_get_cert_chain_p", ITc_ckmc_get_cert_chain_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_get_cert_chain_with_alias_p", ITc_ckmc_get_cert_chain_with_alias_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_key_free_p", ITc_ckmc_key_free_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_buffer_free_p", ITc_ckmc_buffer_free_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_cert_free_p", ITc_ckmc_cert_free_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_load_cert_from_file_p", ITc_ckmc_load_cert_from_file_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_load_from_pkcs12_file_p", ITc_ckmc_load_from_pkcs12_file_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_alias_list_all_free_p", ITc_ckmc_alias_list_all_free_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_cert_list_all_free_p", ITc_ckmc_cert_list_all_free_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {"ITc_ckmc_allow_deny_access_p", ITc_ckmc_allow_deny_access_p, ITs_key_manager_startup, ITs_key_manager_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_KEY_MANAGER_NATIVE_H__
diff --git a/src/itc/libstorage/CMakeLists.txt b/src/itc/libstorage/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..1454d29
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "libstorage")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "storage")
+SET(TC_SOURCES
+       ITs-libstorage-common.c
+       ITs-libstorage.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/itc/libstorage/ITs-libstorage-common.c b/src/itc/libstorage/ITs-libstorage-common.c
new file mode 100755 (executable)
index 0000000..1510808
--- /dev/null
@@ -0,0 +1,173 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-libstorage-common.h"
+
+/** @addtogroup itc-libstorage
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stStorageStartTime;
+extern struct mallinfo g_stStorageMemInfo;
+
+
+//Add helper function definitions here
+
+/**
+ * @function           StorageGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* LibStorageGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+       case STORAGE_ERROR_NONE : szErrorVal = "Successful" ; break; 
+       case STORAGE_ERROR_INVALID_PARAMETER : szErrorVal = "Invalid parameter" ; break; 
+       case STORAGE_ERROR_OUT_OF_MEMORY : szErrorVal = "Out of memory" ; break; 
+       case STORAGE_ERROR_NOT_SUPPORTED : szErrorVal = "Not supported storage" ; break; 
+       case STORAGE_ERROR_OPERATION_FAILED : szErrorVal = "    Operation failed" ; break; 
+
+       default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+
+/**
+ * @function           LibStorageGetStorageDirEnmStr
+ * @description                Maps enums to storage type enum
+ * @parameter          nRet : enum
+ * @return                     string
+ */
+char* LibStorageGetStorageDirEnmStr(int nEnum)
+{
+       char *szType = "";
+
+       switch(nEnum)
+       {
+       case STORAGE_DIRECTORY_IMAGES : szType = "STORAGE_DIRECTORY_IMAGES" ; break; 
+       case STORAGE_DIRECTORY_SOUNDS : szType = "STORAGE_DIRECTORY_SOUNDS" ; break; 
+       case STORAGE_DIRECTORY_VIDEOS : szType = "STORAGE_DIRECTORY_VIDEOS" ; break; 
+       case STORAGE_DIRECTORY_CAMERA : szType = "STORAGE_DIRECTORY_CAMERA" ; break; 
+       case STORAGE_DIRECTORY_DOWNLOADS : szType = "STORAGE_DIRECTORY_DOWNLOADS" ; break; 
+       case STORAGE_DIRECTORY_MUSIC : szType = "STORAGE_DIRECTORY_MUSIC" ; break; 
+       case STORAGE_DIRECTORY_DOCUMENTS : szType = "STORAGE_DIRECTORY_DOCUMENTS" ; break; 
+       case STORAGE_DIRECTORY_OTHERS : szType = "STORAGE_DIRECTORY_OTHERS" ; break; 
+       case STORAGE_DIRECTORY_SYSTEM_RINGTONES : szType = "STORAGE_DIRECTORY_SYSTEM_RINGTONES" ; break; 
+       case STORAGE_DIRECTORY_MAX : szType = "STORAGE_DIRECTORY_MAX" ; break; 
+       }
+
+       return szType;
+}
+
+
+
+
+/**
+* @function                    StorageGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void LibStorageGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stStorageMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stStorageMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stStorageMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+
+/**
+* @function                    StorageGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void LibStorageGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stStorageMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           MetadataExtractorExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void LibStorageExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stStorageStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stStorageStartTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           StorageGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stMetadataExtractorStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void LibStorageGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stStorageStartTime, NULL);
+#endif
+}
+/** @} */
\ No newline at end of file
diff --git a/src/itc/libstorage/ITs-libstorage-common.h b/src/itc/libstorage/ITs-libstorage-common.h
new file mode 100755 (executable)
index 0000000..923dadd
--- /dev/null
@@ -0,0 +1,174 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_LIBSTORAGE_COMMON_H_
+#define _ITS_LIBSTORAGE_COMMON_H_
+
+#include "assert.h"
+#include <storage.h>
+#include <glib-2.0/glib.h>
+#include <stdio.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/** @addtogroup itc-libstorage
+*  @ingroup itc
+*  @{
+*/
+
+#define ERR_LOG                                "/tmp/tclog"
+FILE *g_fpLog;
+
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+
+//Add helper function declarations here
+
+struct timeval g_stStorageStartTime;
+struct mallinfo g_stStorageMemInfo;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][libstorage_ITc] Starting test : %s\n",__LINE__, __FUNCTION__);\
+}
+#define PRINT_MEMORY_LOG(api, memLog){\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [libstorage_ITc] %s_MemoryLeakStatus - %s\n", __LINE__, #api, memLog);\
+       }\
+}
+       
+               
+#define PRINT_SPEED_LOG(api, szSpeedLog)\
+       if(strlen(szSpeedLog) > 0) \
+       {\
+               szSpeedLog[strlen(szSpeedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [libstorage_ITc] %s_TimeInMicrosec- %s\n", __LINE__, #api, szSpeedLog);\
+       }\
+
+#define VALIDATE_RESULT_API(nFailCount, strTargetApiName, ptrMem1, ptrMem2) \
+       if ( nFailCount > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][libstorage_ITc] %s failed %d times out of %d times\n",__LINE__,  strTargetApiName, nFailCount, MAX_COUNT);\
+               if (ptrMem1 != NULL)\
+               {\
+                       free(ptrMem1);\
+                       ptrMem1 = NULL;\
+               }\
+               if (ptrMem2 != NULL)\
+               {\
+                       free(ptrMem2);\
+                       ptrMem2 = NULL;\
+               }\
+               return 1;\
+       }\
+
+#define VALIDATE_RESULT_PAIRAPI(nErrCount1, nErrCount2, strTargetApi1, strTargetApi2, szApi1, szApi2, szApi3) \
+       if ( nErrCount1 > 0 || nErrCount2 > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][libstorage_ITc] %s failed %d times, %s failed %d times out of %d times\n", __LINE__, strTargetApi1, nErrCount1, strTargetApi2, nErrCount2, MAX_COUNT);\
+               if (szApi1 != NULL)\
+               {\
+                       free(szApi1);\
+                       szApi1 = NULL;\
+               }\
+               if (szApi2 != NULL)\
+               {\
+                       free(szApi2);\
+                       szApi2 = NULL;\
+               }\
+               if (szApi3 != NULL)\
+               {\
+                       free(szApi3);\
+                       szApi3 = NULL;\
+               }\
+               return 1;\
+       }\
+
+#define FREE_MEMORY_2ARGS(szApi1, szApi2)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+
+#define FREE_MEMORY_3ARGS(szApi1, szApi2, szApi3)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+       if (szApi3 != NULL)\
+       {\
+               free(szApi3);\
+               szApi3 = NULL;\
+       }\
+
+#define CHECK_CALLBACK_STATUS(szApiName, nErrorCount) {\
+       int nTimeoutId = g_timeout_add(10000, TimeoutFunction, g_pMainLoop);\
+       g_main_loop_run(g_pMainLoop);\
+       g_source_remove(nTimeoutId);\
+       if (g_bLibStorageCallbackHit == false)\
+       {\
+               FPRINTF("\\n[Line : %d][libstorage_ITc] After %s, callback has not been invoked. Iteration %d \n", __LINE__, szApiName, nLoopCount);\
+               nErrorCount++;\
+               continue;\
+       }\
+       else if(g_bLibStorageCallbackResultValid == false)\
+       {\
+               FPRINTF("\\n[Line : %d][libstorage_ITc] After %s, callback having invalid values. Iteration %d \n", __LINE__, szApiName, nLoopCount);\
+               nErrorCount++;\
+               continue;\
+       }\
+       else\
+       {\
+               g_bLibStorageCallbackHit = false;\
+       }\
+}
+
+char* LibStorageGetError(int nRet);
+void LibStorageGetMemStatus(char *pszAPIMemory);
+inline void LibStorageGetMemAllocation();
+void LibStorageExecutionDelay(char* pszAPITime);
+void LibStorageGetTimeOfDay();
+char* LibStorageGetStorageDirEnmStr(int nEnum);
+/** @} */
+#endif  //_ITS_LIBSTORAGE_COMMON_H_
diff --git a/src/itc/libstorage/ITs-libstorage.c b/src/itc/libstorage/ITs-libstorage.c
new file mode 100755 (executable)
index 0000000..dab5920
--- /dev/null
@@ -0,0 +1,1056 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-libstorage-common.h"
+
+/** @addtogroup itc-libstorage
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Storage
+
+static GMainLoop *g_pMainLoop;
+bool g_bLibStorageCallbackHit;
+bool g_bLibStorageCallbackResultValid;
+gboolean TimeoutFunction(gpointer data);
+int g_nLibInternalStorageId;
+int g_nLibExternalStorageId;
+bool g_bLibStorageIsInternal;
+bool g_bLibStorageIsExternal;
+
+/**
+* @function                    TimeoutFunction
+* @description         Timeout funtion
+* @parameter[IN]       gpointer data - timeout data
+* @return                      boolean
+*/
+gboolean TimeoutFunction(gpointer data)
+{
+       g_main_loop_quit((GMainLoop *)data);
+       return false;
+}
+
+/**
+* @function                    storage_device_supported_cb_p
+* @description         callback for supported devices
+* @parameter           storage_id : storage id, type : storage type, state : state, path : storage path, user_data : user data passed to callback
+* @return                      bool
+*/
+bool storage_device_supported_cb_p(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+       g_bLibStorageCallbackHit = true;
+
+       if( (type == STORAGE_TYPE_INTERNAL || type == STORAGE_TYPE_EXTERNAL) &&
+               (state == STORAGE_STATE_UNMOUNTABLE || state == STORAGE_STATE_REMOVED || state == STORAGE_STATE_MOUNTED  
+                       || state ==STORAGE_STATE_MOUNTED_READ_ONLY) )
+                       g_bLibStorageCallbackResultValid = true;
+
+       FPRINTF("\\n[Line : %d][libstorage_ITc] storage_device_supported_callback callback hit", __LINE__);
+       
+       if(type == STORAGE_TYPE_INTERNAL)
+       {
+               g_bLibStorageIsInternal = true;
+               g_nLibInternalStorageId = storage_id;
+       }
+
+       if(type == STORAGE_TYPE_EXTERNAL)
+       {
+               g_bLibStorageIsExternal = true;
+               g_nLibExternalStorageId = storage_id;
+       }
+
+       if(g_bLibStorageIsInternal && g_bLibStorageIsExternal)
+       {
+               if (g_pMainLoop) 
+               {
+                       g_main_loop_quit(g_pMainLoop);
+               }
+               return false;
+       }
+       return true;
+}
+
+
+/**
+* @function                    get_storage_id_callback
+* @description         callback to get storage id
+* @parameter           NA
+* @return                      bool
+*/
+bool get_storage_id_callback()
+{
+       g_bLibStorageCallbackHit = false;
+       g_bLibStorageCallbackResultValid = false;
+       g_bLibStorageIsInternal = false;
+       g_bLibStorageIsExternal = false;
+       void *pvUserData = "User data";
+       int nRetVal = storage_foreach_device_supported(storage_device_supported_cb_p, pvUserData);
+       if(nRetVal != 0)
+       {
+               FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get storage_foreach_device_supported, error returned = %s ", __LINE__, LibStorageGetError(nRetVal));
+               return false;
+       }
+       
+       int nTimeoutId = g_timeout_add(10000, TimeoutFunction, g_pMainLoop);
+       g_main_loop_run(g_pMainLoop);
+       g_source_remove(nTimeoutId);
+       if (g_bLibStorageCallbackHit == false)
+       {
+               FPRINTF("\\n[Line : %d][libstorage_ITc] After %s, callback has not been invoked.", __LINE__, "storage_device_supported_callback");
+               return false;
+       }
+       else if(g_bLibStorageCallbackResultValid == false)
+       {
+               FPRINTF("\\n[Line : %d][libstorage_ITc] After %s, callback having invalid values.", __LINE__, "storage_device_supported_callback");
+               return false;
+       }
+       if(g_bLibStorageIsInternal == false)
+       {
+               FPRINTF("\\n[Line : %d][libstorage_ITc] After %s, callback could not find any internal storage id.", __LINE__, "storage_device_supported_callback");
+               return false;
+       }
+       if(g_bLibStorageIsExternal == false)
+       {
+               FPRINTF("\\n[Line : %d][libstorage_ITc] After %s, callback could not find any external storage id.", __LINE__, "storage_device_supported_callback");
+               return false;
+       }
+       return true;
+}
+
+//& purpose: Called before each test, Initializes are done here
+//& type: auto
+/**
+* @function            ITs_storage_startup
+* @description         Called before each test, set the service boolean true
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_storage_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       return;
+}
+
+
+//& purpose: Called after each test, deinitialization are done here
+//& type: auto
+/**
+* @function            ITs_storage_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_storage_cleanup(void)
+{
+       return;
+}
+
+
+/** @addtogroup itc-libstorage-testcases
+*  @brief              Integration testcases for module libstorage
+*  @ingroup    itc-libstorage
+*  @{
+*/
+
+//& purpose: Gets an internal memory size.
+//& type: auto
+/**
+ * @testcase                   ITc_libstorage_get_internal_memory_size_p
+ * @since_tizen                2.3
+ * @type                               auto
+ * @description                        Gets an internal memory size.
+ * @scenario                   Gets an internal memory size
+ * @apicovered                 storage_get_internal_memory_size
+ * @passcase                   When storage_get_internal_memory_size API return 0
+ * @failcase                   If storage_get_internal_memory_size API returns non zero value
+ * @precondition               NA
+ * @postcondition              NA
+ */
+int ITc_libstorage_get_internal_memory_size_p(void)
+{
+       START_TEST;
+
+    int nLoopCount = 0;
+    char *pszMemLog = NULL;
+    char *pszSpeedLog = NULL;
+    int nFailCount = 0;
+
+#if MEMORY_CHECK
+        pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+        pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+        struct statvfs stInternalMemSize;
+
+        for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+        {
+            LibStorageGetMemAllocation();
+
+            LibStorageGetTimeOfDay();
+            int nRetVal = storage_get_internal_memory_size(&stInternalMemSize);//target api
+            LibStorageExecutionDelay(pszSpeedLog);
+            LibStorageGetMemStatus(pszMemLog);
+
+            if(nRetVal != 0)
+            {
+                               FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get storage_get_internal_memory_size on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, LibStorageGetError(nRetVal));
+                nFailCount++;
+                continue;
+            }
+
+             FPRINTF("\\n[Line : %d][libstorage_ITc] Total mem : %lf, Avail mem : %lf\n", __LINE__,(double)stInternalMemSize.f_frsize*stInternalMemSize.f_blocks,
+                 (double)stInternalMemSize.f_bsize*stInternalMemSize.f_bavail);
+
+        }
+
+               VALIDATE_RESULT_API(nFailCount, "storage_get_internal_memory_size", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(storage_get_internal_memory_size, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(storage_get_internal_memory_size, pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+    return 0;
+}
+
+//& purpose: Gets an external SD card memory size .   
+//& type: auto
+/**
+ * @testcase                   ITc_libstorage_get_external_memory_size_p
+ * @since_tizen                2.3
+ * @type                               auto
+ * @description                        Gets an external SD card memory size 
+ * @scenario                   Gets an external SD card memory size 
+ * @apicovered                 storage_get_external_memory_size
+ * @passcase                   When storage_get_external_memory_size API return 0
+ * @failcase                   If storage_get_external_memory_size API returns non zero value
+ * @precondition               NA
+ * @postcondition              NA
+ */
+int ITc_libstorage_get_external_memory_size_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK       
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               struct statvfs stExternalMemSize;
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       LibStorageGetMemAllocation();
+
+                       LibStorageGetTimeOfDay();
+                       int nRetVal = storage_get_external_memory_size(&stExternalMemSize);//target api
+                       LibStorageExecutionDelay(pszSpeedLog);
+                       LibStorageGetMemStatus(pszMemLog);
+
+                       if(nRetVal != 0)
+                       {
+                               FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get storage_get_external_memory_size on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, LibStorageGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+                        FPRINTF("\\n[Line : %d][libstorage_ITc] Total mem : %lf, Avail mem : %lf\n", __LINE__,(double)stExternalMemSize.f_frsize*stExternalMemSize.f_blocks, 
+                                (double)stExternalMemSize.f_bsize*stExternalMemSize.f_bavail);
+
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "storage_get_external_memory_size", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(storage_get_external_memory_size, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(storage_get_external_memory_size, pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Retrieves all storage in device.   
+//& type: auto
+/**
+ * @testcase                   ITc_libstorage_foreach_device_supported_p
+ * @since_tizen                2.3
+ * @type                               auto
+ * @description                        Retrieves all storage in device
+ * @scenario                   Retrieves all storage in device
+ * @apicovered                 storage_foreach_device_supported
+ * @passcase                   When storage_foreach_device_supported API return 0
+ * @failcase                   If storage_foreach_device_supported API returns non zero value
+ * @precondition               NA
+ * @postcondition              NA
+ */
+int ITc_libstorage_foreach_device_supported_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK       
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               g_pMainLoop = g_main_loop_new(NULL, false);
+               void *pvUserData = "User data";
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       g_bLibStorageCallbackHit = false;
+                       g_bLibStorageCallbackResultValid = false;
+                       LibStorageGetMemAllocation();
+
+                       LibStorageGetTimeOfDay();
+                       int nRetVal = storage_foreach_device_supported(storage_device_supported_cb_p, pvUserData);//target api
+                       LibStorageExecutionDelay(pszSpeedLog);
+                       LibStorageGetMemStatus(pszMemLog);
+
+                       if(nRetVal != 0)
+                       {
+                               FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get storage_foreach_device_supported on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, LibStorageGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+
+                       CHECK_CALLBACK_STATUS("storage_device_supported_callback", nFailCount);
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "storage_foreach_device_supported", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("storage_foreach_device_supported", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("storage_foreach_device_supported", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Gets the absolute path to the each directory of the given storage.
+//& type: auto
+/**
+ * @testcase                   ITc_libstorage_get_directory_p
+ * @since_tizen                2.3
+ * @type                               auto
+ * @description                        Gets the absolute path to the root directory of the given storage
+ * @scenario                   Gets the absolute path to the root directory of the given storage
+ * @apicovered                 storage_get_directory
+ * @passcase                   When storage_get_directory API return 0
+ * @failcase                   If storage_get_directory API returns non zero value
+ * @precondition               NA
+ * @postcondition              NA
+ */
+int ITc_libstorage_get_directory_p(void)
+{
+       START_TEST;
+
+       int nEnumCount = 0;
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+       
+       if(get_storage_id_callback() == false)
+               return 1;
+
+       int storageType[]={STORAGE_DIRECTORY_IMAGES,STORAGE_DIRECTORY_SOUNDS,STORAGE_DIRECTORY_VIDEOS, STORAGE_DIRECTORY_CAMERA,STORAGE_DIRECTORY_DOWNLOADS,STORAGE_DIRECTORY_MUSIC,
+       STORAGE_DIRECTORY_DOCUMENTS, STORAGE_DIRECTORY_OTHERS, STORAGE_DIRECTORY_SYSTEM_RINGTONES/*, STORAGE_DIRECTORY_MAX*/};
+       
+       int nEnumSize = sizeof (storageType) / sizeof(int);
+
+       if(g_bLibStorageIsExternal == true)
+       {
+               nEnumSize = nEnumSize - 1;
+       }
+
+#if MEMORY_CHECK       
+               pszMemLog = calloc(MEMLOG * MAX_COUNT*nEnumSize , sizeof(char));
+#endif
+#if SPEED_CHECK        
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT*nEnumSize , sizeof(char));
+#endif
+
+               char *pszPath = NULL;
+
+               char *pszMemoryType = "for Internal Memory";
+               int nStorageId = g_nLibInternalStorageId; //initialize with internal memory storage id
+               
+               int nStrgIdCnt = 0;
+               
+               for(nStrgIdCnt =0 ; nStrgIdCnt < 2 ; nStrgIdCnt  ++)
+               {
+                       for (nEnumCount = 0; nEnumCount < nEnumSize; nEnumCount++)
+                       {
+                               storage_directory_e Type = storageType[nEnumCount];
+                               FPRINTF("\\nType=%s",LibStorageGetStorageDirEnmStr(Type));
+
+                               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                               {
+                                       LibStorageGetMemAllocation();
+
+                                       LibStorageGetTimeOfDay();
+                                       int nRetVal = storage_get_directory(nStorageId, Type, &pszPath);//target api
+                                       LibStorageExecutionDelay(pszSpeedLog);
+                                       LibStorageGetMemStatus(pszMemLog);
+
+                                       if(nRetVal != STORAGE_ERROR_NONE)
+                                       {
+                                               FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get storage_get_directory %s on iteration %d for enum %s, error returned = %s ", __LINE__, pszMemoryType, nLoopCount, LibStorageGetStorageDirEnmStr(Type),LibStorageGetError(nRetVal));
+                                               nFailCount++;
+                                               continue;
+                                       }
+                                       else if(pszPath == NULL)
+                                       {
+                                               FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get valid output parameter %s on iteration %d for enum %s, error returned = %s ", __LINE__, pszMemoryType, nLoopCount, LibStorageGetStorageDirEnmStr(Type), LibStorageGetError(nRetVal));
+                                               nFailCount++;
+                                               continue;
+                                       }
+                                       else
+                                       {
+                                               FPRINTF("\\n[Line : %d][libstorage_ITc] directory path for %s is = %s ", __LINE__, pszMemoryType, pszPath);
+                                       }
+
+                                       free(pszPath);
+                               }
+                       }
+
+                       nStorageId = g_nLibExternalStorageId; //assign with external memory storage id
+                       pszMemoryType = "for External Memory";
+               }
+
+
+               VALIDATE_RESULT_API(nFailCount, "storage_get_directory", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("storage_get_directory", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("storage_get_directory", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Gets the absolute path to the root directory of the given storage.
+//& type: auto
+/**
+ * @testcase                   ITc_libstorage_get_root_directory_p
+ * @since_tizen                2.3
+ * @type                               auto
+ * @description                        Gets the absolute path to the root directory of the given storage
+ * @scenario                   Gets the absolute path to the root directory of the given storage
+ * @apicovered                 storage_get_root_directory
+ * @passcase                   When storage_get_root_directory API return 0
+ * @failcase                   If storage_get_root_directory API returns non zero value
+ * @precondition               NA
+ * @postcondition              NA
+ */
+int ITc_libstorage_get_root_directory_p(void)
+{
+       START_TEST;
+
+       if(get_storage_id_callback() == false)
+               return 1;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK       
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+               
+               char *pszPath = NULL;
+
+               char *pszMemoryType = "for Internal Memory";
+               int nStorageId = g_nLibInternalStorageId; //initialize with internal memory storage id
+
+               int nStrgIdCnt = 0;
+
+               for(nStrgIdCnt =0 ; nStrgIdCnt < 2 ; nStrgIdCnt  ++)
+               {
+
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               LibStorageGetMemAllocation();
+
+                               LibStorageGetTimeOfDay();
+                               int nRetVal = storage_get_root_directory(nStorageId,&pszPath);//target api
+                               LibStorageExecutionDelay(pszSpeedLog);
+                               LibStorageGetMemStatus(pszMemLog);
+
+                               if(nRetVal != STORAGE_ERROR_NONE && nRetVal != STORAGE_ERROR_NOT_SUPPORTED)
+                               {
+                                       FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get storage_get_root_directory %s on iteration %d\n, error returned = %s ", __LINE__, pszMemoryType, nLoopCount, LibStorageGetError(nRetVal));
+                                       nFailCount++;
+                                       continue;
+                               }
+                               else if(pszPath == NULL)
+                               {
+                                       FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get valid output parameter %s on iteration %d\n, error returned = %s ", __LINE__,pszMemoryType, nLoopCount, LibStorageGetError(nRetVal));
+                                       nFailCount++;
+                                       continue;
+                               }
+                               else
+                               {
+                                       FPRINTF("\\n[Line : %d][libstorage_ITc] Root directory path %s is = %s ", __LINE__, pszMemoryType, pszPath);
+                               }
+
+                               free(pszPath);
+                       }
+                       nStorageId = g_nLibExternalStorageId; //assign with external memory storage id
+                       pszMemoryType = "for External Memory";
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "storage_get_root_directory", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("storage_get_root_directory", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("storage_get_root_directory", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Gets the type of the given storage.   
+//& type: auto
+/**
+ * @testcase                   ITc_libstorage_get_type_p
+ * @since_tizen                2.3
+ * @type                               auto
+ * @description                        Gets the type of the given storage
+ * @scenario                   Gets the type of the given storage
+ * @apicovered                 storage_get_type
+ * @passcase                   When storage_get_type API return 0
+ * @failcase                   If storage_get_type API returns non zero value
+ * @precondition               NA
+ * @postcondition              NA
+ */
+int ITc_libstorage_get_type_p(void)
+{
+       START_TEST;
+
+       if(get_storage_id_callback() == false)
+               return 1;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK       
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               storage_type_e nType;
+
+               char *pszMemoryType = "for Internal Memory";
+               int nStorageId = g_nLibInternalStorageId; //initialize with internal memory storage id
+               
+               int nStrgIdCnt = 0;
+               
+               for(nStrgIdCnt =0 ; nStrgIdCnt < 2 ; nStrgIdCnt  ++)
+               {
+
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               LibStorageGetMemAllocation();
+
+                               LibStorageGetTimeOfDay();
+                               int nRetVal = storage_get_type(nStorageId,&nType);//target api
+                               LibStorageExecutionDelay(pszSpeedLog);
+                               LibStorageGetMemStatus(pszMemLog);
+
+                               if(nRetVal != STORAGE_ERROR_NONE)
+                               {
+                                       FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get storage_get_type %s on iteration %d\n, error returned = %s ", __LINE__, pszMemoryType, nLoopCount, LibStorageGetError(nRetVal));
+                                       nFailCount++;
+                                       continue;
+                               }
+                               else if(!(nType == STORAGE_TYPE_INTERNAL || nType == STORAGE_TYPE_EXTERNAL))
+                               {
+                                       FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get valid output parameter %s on iteration %d\n, error returned = %s ", __LINE__, pszMemoryType, nLoopCount, LibStorageGetError(nRetVal));
+                                       nFailCount++;
+                                       continue;
+                               }
+                       }
+                       nStorageId = g_nLibExternalStorageId; //assign with external memory storage id
+                       pszMemoryType = "for External Memory";
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "storage_get_type", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("storage_get_type", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("storage_get_type", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Gets the current state of the given storage.  
+//& type: auto
+/**
+ * @testcase                   ITc_libstorage_get_state_p
+ * @since_tizen                2.3
+ * @type                               auto
+ * @description                        Gets the current state of the given storage
+ * @scenario                   Gets the current state of the given storage
+ * @apicovered                 storage_get_state
+ * @passcase                   When storage_get_state API return 0
+ * @failcase                   If storage_get_state API returns non zero value
+ * @precondition               This function is only supported when there is a valid privilege in your module.
+ * @postcondition              NA
+ */
+int ITc_libstorage_get_state_p(void)
+{
+       START_TEST;
+
+       if(get_storage_id_callback() == false)
+               return 1;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK       
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               storage_state_e nState;
+
+               char *pszMemoryType = "for Internal Memory";
+               int nStorageId = g_nLibInternalStorageId; //initialize with internal memory storage id
+               
+               int nStrgIdCnt = 0;
+
+               for(nStrgIdCnt =0 ; nStrgIdCnt < 2 ; nStrgIdCnt  ++)
+               {
+
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               LibStorageGetMemAllocation();
+
+                               LibStorageGetTimeOfDay();
+                               int nRetVal = storage_get_state(nStorageId,&nState);//target api
+                               LibStorageExecutionDelay(pszSpeedLog);
+                               LibStorageGetMemStatus(pszMemLog);
+
+                               if(nRetVal != 0 )
+                               {
+                                       FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get storage_get_state %s on iteration %d\n, error returned = %s ", __LINE__, pszMemoryType,nLoopCount, LibStorageGetError(nRetVal));
+                                       nFailCount++;
+                                       continue;
+                               }
+                               else if(!(nState == STORAGE_STATE_UNMOUNTABLE || nState == STORAGE_STATE_REMOVED || nState == STORAGE_STATE_MOUNTED || nState == STORAGE_STATE_MOUNTED_READ_ONLY))
+                               {
+                                       FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get valid output parameter %s on iteration %d\n, error returned = %s ", __LINE__, pszMemoryType, nLoopCount, LibStorageGetError(nRetVal));
+                                       nFailCount++;
+                                       continue;
+                               }
+                       }
+                       nStorageId = g_nLibExternalStorageId; //assign with external memory storage id
+                       pszMemoryType = "for External Memory";
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "storage_get_state", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("storage_get_state", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("storage_get_state", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Gets the total space of the given storage in bytes.   
+//& type: auto
+/**
+ * @testcase                   ITc_libstorage_get_total_space_p
+ * @since_tizen                2.3
+ * @type                               auto
+ * @description                        Gets the total space of the given storage in bytes
+ * @scenario                   Gets the total space of the given storage
+ * @apicovered                 storage_get_total_space
+ * @passcase                   When storage_get_total_space API return 0
+ * @failcase                   If storage_get_total_space API returns non zero value
+ * @precondition               This function is only supported when there is a valid privilege in your module.
+ * @postcondition              NA
+ */
+int ITc_libstorage_get_total_space_p(void)
+{
+       START_TEST;
+
+       if(get_storage_id_callback() == false)
+               return 1;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK       
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               unsigned long long ullBytes;
+
+               char *pszMemoryType = "for Internal Memory";
+               int nStorageId = g_nLibInternalStorageId; //initialize with internal memory storage id
+
+               int nStrgIdCnt = 0;
+
+               for(nStrgIdCnt =0 ; nStrgIdCnt < 2 ; nStrgIdCnt  ++)
+               {
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               LibStorageGetMemAllocation();
+
+                               LibStorageGetTimeOfDay();
+                               int nRetVal = storage_get_total_space(nStorageId,&ullBytes);//target api
+                               LibStorageExecutionDelay(pszSpeedLog);
+                               LibStorageGetMemStatus(pszMemLog);
+
+                               if(nRetVal != 0 )
+                               {
+                                       FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get storage_get_total_space %s on iteration %d\n, error returned = %s ", __LINE__, pszMemoryType, nLoopCount, LibStorageGetError(nRetVal));
+                                       nFailCount++;
+                                       continue;
+                               }
+                               FPRINTF("\\n[Line : %d][libstorage_ITc] Total Space %s is = %llu", __LINE__, pszMemoryType, ullBytes);
+                       }
+
+                       nStorageId = g_nLibExternalStorageId; //assign with external memory storage id
+                       pszMemoryType = "for External Memory";
+               }
+
+               
+
+               VALIDATE_RESULT_API(nFailCount, "storage_get_total_space", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("storage_get_total_space", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("storage_get_total_space", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+               return 0;
+}
+
+
+
+//& purpose: Gets the available space size of the given storage in bytes.  
+//& type: auto
+/**
+ * @testcase                   ITc_libstorage_get_available_space_p
+ * @since_tizen                2.3
+ * @type                               auto
+ * @description                        Gets the available space size of the given storage in bytes
+ * @scenario                   Gets the available space size of the given storage
+ * @apicovered                 storage_get_available_space
+ * @passcase                   When storage_get_available_space API return 0
+ * @failcase                   If storage_get_available_space API returns non zero value
+ * @precondition               This function is only supported when there is a valid privilege in your module
+ * @postcondition              NA
+ */
+int ITc_libstorage_get_available_space_p(void)
+{
+       START_TEST;
+
+       if(get_storage_id_callback() == false)
+               return 1;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK       
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               unsigned long long ullBytes;
+
+               char *pszMemoryType = "for Internal Memory";
+               int nStorageId = g_nLibInternalStorageId; //initialize with internal memory storage id
+               
+               int nStrgIdCnt = 0;
+               
+               for(nStrgIdCnt =0 ; nStrgIdCnt < 2 ; nStrgIdCnt  ++)
+               {
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               LibStorageGetMemAllocation();
+
+                               LibStorageGetTimeOfDay();
+                               int nRetVal = storage_get_available_space(nStorageId,&ullBytes);//target api
+                               LibStorageExecutionDelay(pszSpeedLog);
+                               LibStorageGetMemStatus(pszMemLog);
+
+                               if(nRetVal != 0 )
+                               {
+                                       FPRINTF("\\n[Line : %d][libstorage_ITc] Fail to get storage_get_available_space %s on iteration %d\n, error returned = %s ", __LINE__, pszMemoryType,nLoopCount, LibStorageGetError(nRetVal));
+                                       nFailCount++;
+                                       continue;
+                               }
+                               FPRINTF("\\n[Line : %d][libstorage_ITc] Available Space %s is = %llu", __LINE__, pszMemoryType, ullBytes);
+                       }
+                       nStorageId = g_nLibExternalStorageId; //assign with external memory storage id
+                       pszMemoryType = "for External Memory";
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "storage_get_available_space", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("storage_get_available_space", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("storage_get_available_space", pszMemLog);
+#endif
+
+               FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+//int  storage_set_state_changed_cb (int storage_id, storage_state_changed_cb callback, void *user_data)
+//int  storage_unset_state_changed_cb (int storage_id, storage_state_changed_cb callback)
+
+
+/**
+* @function                    Storage_state_changed_cb_p
+* @description         storage state change callback
+* @parameter           storage_id : storage id, state : storage state, user_data : user data passed to callback
+* @return                      NA
+*/
+void Storage_state_changed_cb_p(int storage_id, storage_state_e state, void *user_data)
+{
+       g_bLibStorageCallbackHit = true;
+
+       if( (state == STORAGE_STATE_UNMOUNTABLE || state == STORAGE_STATE_REMOVED || state == STORAGE_STATE_MOUNTED  
+                       || state ==STORAGE_STATE_MOUNTED_READ_ONLY) )
+                       g_bLibStorageCallbackResultValid = true;
+
+       
+       FPRINTF("\\n[Line : %d][libstorage_ITc] Storage_state_changed_cb_p callback hit", __LINE__);
+
+       if (g_pMainLoop) 
+       {
+               g_main_loop_quit(g_pMainLoop);
+       } 
+}
+
+
+//& purpose: Registers and Unregister a callback function to be invoked when the state of the storage changes. 
+//& type: auto
+/**
+ * @testcase                   ITc_libstorage_set_unset_state_changed_cb_p
+ * @since_tizen                2.3
+ * @type                               auto
+ * @description                        Registers and Unregister a callback function to be invoked when the state of the storage changes
+ * @scenario                   Registers and Unregister a callback function
+ * @apicovered                 storage_set_state_changed_cb
+ * @passcase                   When storage_set_state_changed_cb API return 0
+ * @failcase                   If storage_set_state_changed_cb API returns non zero value
+ * @precondition               This function is only supported when there is a valid privilege in your module.
+ * @postcondition              NA
+ */
+int ITc_libstorage_set_unset_state_changed_cb_p(void)
+{
+       START_TEST;
+
+       if(get_storage_id_callback() == false)
+               return 1;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       
+#if MEMORY_CHECK       
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+               pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+               pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+               g_pMainLoop = g_main_loop_new(NULL, false);
+
+               void *pUserData = "User Data";
+
+               char *pszMemoryType = "for Internal Memory";
+               int nStorageId = g_nLibInternalStorageId; //initialize with internal memory storage id
+
+       
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       g_bLibStorageCallbackHit = false;
+                       g_bLibStorageCallbackResultValid = false;
+
+                       LibStorageGetMemAllocation();
+
+                       LibStorageGetTimeOfDay();
+                       int nRetVal = storage_set_state_changed_cb (nStorageId,&Storage_state_changed_cb_p,pUserData);//target api//register callback
+                       LibStorageExecutionDelay(pszSetSpeedLog);
+
+                       if(nRetVal != 0)
+                       {
+                               FPRINTF("\\n[Line : %d][libstorage_ITc] storage_set_state_changed_cb failed %s on iteration %d, error returned = %s ", __LINE__, pszMemoryType,nLoopCount, LibStorageGetError(nRetVal));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       //as we need manual intruption to invoke callback like mount, unmount sdcard
+                       //so we are not checking callback status
+                       //CHECK_CALLBACK_STATUS("storage_set_state_changed_cb", nSetFailCount);
+
+
+                       //Unregisters the callback function.
+                       LibStorageGetTimeOfDay();
+                       nRetVal = storage_unset_state_changed_cb (nStorageId, &Storage_state_changed_cb_p);//target api//unregister callback
+                       LibStorageExecutionDelay(pszUnsetSpeedLog);
+
+                       LibStorageGetMemStatus(pszMemLog);
+
+                       if(nRetVal != 0)
+                       {
+                               FPRINTF("\\n[Line : %d][libstorage_ITc] storage_unset_state_changed_cb failed %s on iteration %d, error returned = %s ", __LINE__, pszMemoryType,nLoopCount, LibStorageGetError(nRetVal));
+                               nUnsetFailCount++;
+                       }
+                       /*else
+                       {
+                       //trigger callback
+                       FILE *fp  = fopen(pszTestFilePath, "w");
+                       if(fp)
+                       {
+                       fclose(fp);
+                       }
+                       else if(fp == 0)
+                       {
+                       FPRINTF("\\n[Line : %d][libstorage_ITc] Failed to create file while triggger callback for storage_unset_state_changed_cb on iteration %d, error returned = %s ", __LINE__, nLoopCount, LibStorageGetError(nRetVal));
+                       }
+
+                       int nTimeoutId = g_timeout_add(10000, TimeoutFunction, g_pMainLoop);
+                       g_main_loop_run(g_pMainLoop);
+                       g_source_remove(nTimeoutId);
+
+                       if(g_bLibStorageCallbackResult == false)
+                       FPRINTF("\\n[Line : %d][libstorage_ITc] callback unregistered successfully." );\
+                       }*/
+
+               }
+       
+
+               VALIDATE_RESULT_PAIRAPI(nSetFailCount, nUnsetFailCount, "storage_set_state_changed_cb", "storage_unset_state_changed_cb", pszMemLog,pszSetSpeedLog,
+               pszUnsetSpeedLog);
+
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("storage_set_state_changed_cb", pszSetSpeedLog);
+               PRINT_SPEED_LOG("storage_unset_state_changed_cb", pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("storage_set_unset_state_changed", pszMemLog);
+#endif
+               FREE_MEMORY_3ARGS(pszMemLog,pszSetSpeedLog,     pszUnsetSpeedLog);
+
+       return 0;
+}
+/** @} */
+/** @} */
diff --git a/src/itc/libstorage/tct-libstorage-native.c b/src/itc/libstorage/tct-libstorage-native.c
new file mode 100755 (executable)
index 0000000..667b2ef
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-libstorage-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/libstorage/tct-libstorage-native.h b/src/itc/libstorage/tct-libstorage-native.h
new file mode 100755 (executable)
index 0000000..37cb2ea
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_LIBSTORAGE_NATIVE_H__
+#define __TCT_LIBSTORAGE_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_storage_startup(void);
+extern void ITs_storage_cleanup(void);
+
+extern int ITc_libstorage_get_internal_memory_size_p(void);
+extern int ITc_libstorage_get_external_memory_size_p(void);
+extern int ITc_libstorage_foreach_device_supported_p(void);
+extern int ITc_libstorage_get_directory_p(void);
+extern int ITc_libstorage_get_root_directory_p(void);
+extern int ITc_libstorage_get_type_p(void);
+extern int ITc_libstorage_get_state_p(void);
+extern int ITc_libstorage_get_total_space_p(void);
+extern int ITc_libstorage_get_available_space_p(void);
+extern int ITc_libstorage_set_unset_state_changed_cb_p(void);
+
+testcase tc_array[] = {
+    {"ITc_libstorage_get_internal_memory_size_p", ITc_libstorage_get_internal_memory_size_p, ITs_storage_startup, ITs_storage_cleanup},
+    {"ITc_libstorage_get_external_memory_size_p", ITc_libstorage_get_external_memory_size_p, ITs_storage_startup, ITs_storage_cleanup},
+    {"ITc_libstorage_foreach_device_supported_p", ITc_libstorage_foreach_device_supported_p, ITs_storage_startup, ITs_storage_cleanup},
+    {"ITc_libstorage_get_directory_p", ITc_libstorage_get_directory_p, ITs_storage_startup, ITs_storage_cleanup},
+    {"ITc_libstorage_get_root_directory_p", ITc_libstorage_get_root_directory_p, ITs_storage_startup, ITs_storage_cleanup},
+    {"ITc_libstorage_get_type_p", ITc_libstorage_get_type_p, ITs_storage_startup, ITs_storage_cleanup},
+    {"ITc_libstorage_get_state_p", ITc_libstorage_get_state_p, ITs_storage_startup, ITs_storage_cleanup},
+    {"ITc_libstorage_get_total_space_p", ITc_libstorage_get_total_space_p, ITs_storage_startup, ITs_storage_cleanup},
+    {"ITc_libstorage_get_available_space_p", ITc_libstorage_get_available_space_p, ITs_storage_startup, ITs_storage_cleanup},
+    {"ITc_libstorage_set_unset_state_changed_cb_p", ITc_libstorage_set_unset_state_changed_cb_p, ITs_storage_startup, ITs_storage_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_LIBSTORAGE_NATIVE_H__
diff --git a/src/itc/location-manager/CMakeLists.txt b/src/itc/location-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..6e33f5d
--- /dev/null
@@ -0,0 +1,41 @@
+SET(PKG_NAME "location-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-location-manager")
+SET(TC_SOURCES
+       ITs-location-manager-common.c
+       ITs-location-manager.c
+       ITs-location-bounds.c
+       ITs-location-gps-status.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       dlog
+       location
+       capi-base-common
+       vconf
+       glib-2.0
+       capi-appfw-application
+       capi-system-info
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/location-manager/ITs-location-bounds.c b/src/itc/location-manager/ITs-location-bounds.c
new file mode 100755 (executable)
index 0000000..9e141c6
--- /dev/null
@@ -0,0 +1,890 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-location-manager-common.h"
+
+/** @addtogroup itc-location-manager
+*  @ingroup itc
+*  @{
+*/
+
+//& set: LocationManager
+
+int g_nExpectedResult = LOCATION_BOUNDS_ERROR_NONE;
+int g_nPolygonCoordsResponseCount = 0;
+/**
+* @function            ITs_location_bounds_startup
+* @description         Called before each test, set the service boolean true
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_location_bounds_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bLocationIsSupported = (Location_Manager_Check_System_Info_Feature_Supported(LOCATION_FEATURE) && (Location_Manager_Check_System_Info_Feature_Supported(LOCATION_WPS_FEATURE) || Location_Manager_Check_System_Info_Feature_Supported(LOCATION_GPS_FEATURE)));
+       /* g_bCreateSuccess = true;
+       g_bStartSuccess = true;
+       g_bLocationMismatch = true;
+       g_bLocationNotSupported = true; */
+       g_nPolygonCoordsResponseCount = 0;
+}
+
+/**
+ * @function           ITs_location_bounds_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_location_bounds_cleanup(void)
+{
+       return;
+}
+
+/**
+* @function            LocationPolygonCoordinatesCB
+* @description         to check polygon coordinates
+* @parameter           location_coords_s, void *user_data
+* @return                      bool
+*/
+bool LocationPolygonCoordinatesCB(location_coords_s coords, void *user_data)
+{
+       FPRINTF( "[Line : %d] [location-manager_ITc]location_bounds_foreach_rect_coords(latitude : %lf, longitude: %lf) \\n", __LINE__, coords.latitude, coords.longitude);
+       g_nPolygonCoordsResponseCount++;
+       return TRUE;
+}
+
+/**
+* @function            LocationBoundsPolygonStateChangedCB
+ * @description                invoke when coordinate state change on location boundry
+ * @parameter          location_boundary_state_e , void *user_data
+ * @return                     void
+ */
+void LocationBoundsPolygonStateChangedCB(location_boundary_state_e state, void *user_data)
+{
+       FPRINTF( "[Line : %d] [location-manager_ITc] Inside the callback LocationBoundsPolygonStateChangedCB \\n", __LINE__);
+}
+
+/** @addtogroup itc-location-bounds-testcases
+*  @brief              Integration testcases for module location-bounds
+*  @ingroup    itc-location-bounds
+*  @{
+*/
+
+//& purpose: To check creates/destroy a rect type of new location bounds
+//& type: auto
+/**
+* @testcase                    ITc_location_bounds_create_destory_rect_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check creates/destroy a rect type of new location bounds
+* @scenario                            creates/destroy a rect type of new location bounds and verify output\n
+*                                              check the generate location bound for null\n
+*                                              destroy a rect type of new location bounds and verify output
+* @apicovered                  location_bounds_create_rect, location_bounds_create_rect
+* @passcase                            When location_bounds_create_rect and location_bounds_destroy are successful
+* @failcase                            If target API fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_bounds_create_destory_rect_p(void)
+{
+       //START_TEST;
+       int nRet = -1, nLoopCount = 0 , nOpenFailCount = 0 , nCloseFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       location_bounds_h hRectBounds = NULL;
+
+       location_coords_s left_top;
+       left_top.latitude = 30;
+       left_top.longitude = 30;
+
+       location_coords_s right_bottom;
+       right_bottom.latitude = 10;
+       right_bottom.longitude = 50;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_create_rect(left_top, right_bottom, &hRectBounds); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("location_bounds_create_rect", nOpenFailCount);
+
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_rect failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nOpenFailCount++;
+                       continue;
+               }
+
+               if(hRectBounds == NULL)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_rect failed on iteration %d, returned location bound handle is null \\n", __LINE__, nLoopCount);
+                       nOpenFailCount++;
+                       continue;
+
+               }
+               nRet = -1;
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_destroy(hRectBounds);  // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("location_bounds_destroy", nCloseFailCount);
+               
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_destroy failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nCloseFailCount++;
+               }
+       }
+       
+       if (nOpenFailCount > 0 || nCloseFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_rect failed %d times, location_bounds_destroy failed %d times out of %d times\\n", __LINE__, nOpenFailCount, nCloseFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(location_bounds_create_rect, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(location_bounds_destroy, stSpeedMemoryLog.pszAPI2SpeedLog);
+       PRINT_MEMORY_LOG(location_bounds_create_destroy_rect, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+/************************************************************************************/
+//& purpose: To check the top left and right bottom of rect type location bounds
+//& type: auto
+/**
+* @testcase                    ITc_location_bounds_get_rect_coords_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check the top left and right bottom of rect type location bounds
+* @scenario                            creates/destroy a rect type of new location bounds and verify output\n
+*                                              check the generate location bound for null\n
+*                                              Get location bounds coords\n
+*                                              destroy a rect type of new location bounds and verify output
+* @apicovered                  location_bounds_get_rect_coords, location_bounds_create_rect, location_bounds_create_rect
+* @passcase                            When location_bounds_get_rect_coords, location_bounds_create_rect and location_bounds_destroy are successful
+* @failcase                            If target API or supporting APIs fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_bounds_get_rect_coords_p(void)
+{
+       //START_TEST;
+       int nRet = -1, nLoopCount = 0 , nFailCount = 0 ;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       location_bounds_h hRectBounds = NULL;
+
+       location_coords_s sLeftTop;
+       sLeftTop.latitude = 30;
+       sLeftTop.longitude = 30;
+
+       location_coords_s sRightBottom;
+       sRightBottom.latitude = 10;
+       sRightBottom.longitude = 50;
+
+       location_coords_s sFindLeftTop = {0};
+       location_coords_s sFindRightBottom = {0};
+
+       nRet = location_bounds_create_rect(sLeftTop, sRightBottom, &hRectBounds);
+       CHECK_UNSUPPORTED_ERROR_RETURN("location_bounds_create_rect");
+
+       PRINT_RESULT(nRet , "location_bounds_create_rect");
+
+       if(hRectBounds == NULL)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_rect failed on precondition, returned location rect bound handle is null \\n", __LINE__);
+               return 1;
+       }
+
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_get_rect_coords(hRectBounds , &sFindLeftTop , &sFindRightBottom); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_get_rect_coords failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+
+               if((sFindLeftTop.latitude != sLeftTop.latitude) ||(sFindLeftTop.longitude != sLeftTop.longitude))
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_get_rect_coords failed on iteration %d, mismatch in top left value \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+                       continue;
+               }
+
+               if((sFindRightBottom.latitude != sRightBottom.latitude)||(sFindRightBottom.longitude != sRightBottom.longitude))
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_get_rect_coords failed on iteration %d, mismatch in bottom right value \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+       }
+
+       nRet = location_bounds_destroy(hRectBounds);
+       if(nRet != g_nExpectedResult)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_destroy failed on postcondition, returned error = %s \\n", __LINE__, LocationManagerGetError(nRet));
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_get_rect_coords failed %d times, out of %d times\\n", __LINE__, nFailCount,  MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(location_bounds_get_rect_coords, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_MEMORY_LOG(location_bounds_get_rect_coords, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+/************************************************************************************/
+//& purpose: To check creates/destroy a circle type of new location bounds
+//& type: auto
+/**
+* @testcase                    ITc_location_bounds_create_destory_circle_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check creates/destroy a circle type of new location bounds
+* @scenario                            creates a circle type of new location bounds and verify output\n
+*                                              check the generate location bound for null\n
+*                                              destroy a circle type of new location bounds and verify output
+* @apicovered                  location_bounds_create_circle
+* @passcase                            When location_bounds_create_circle and location_bounds_destroy are successful
+* @failcase                            If target API fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_bounds_create_destory_circle_p(void)
+{
+       //START_TEST;
+       int nRet = -1, nLoopCount = 0 , nOpenFailCount = 0 , nCloseFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       location_bounds_h hCircleBounds = NULL;
+
+       location_coords_s center;
+       center.latitude = 37.336723;
+       center.longitude = -121.889555;
+       double dRadius = 30;
+
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_create_circle(center ,dRadius, &hCircleBounds); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("location_bounds_create_circle", nOpenFailCount);
+               
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_circle failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nOpenFailCount++;
+                       continue;
+               }
+
+               if(hCircleBounds == NULL)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_circle failed on iteration %d, returned location bound handle is null \\n", __LINE__, nLoopCount);
+                       nOpenFailCount++;
+                       continue;
+
+               }
+               nRet = -1;
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_destroy(hCircleBounds);  // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("location_bounds_destroy", nCloseFailCount);
+               
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_destroy failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nCloseFailCount++;
+               }
+       }
+
+       if (nOpenFailCount > 0 || nCloseFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_circle failed %d times, location_bounds_destroy failed %d times out of %d times\\n", __LINE__, nOpenFailCount, nCloseFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(location_bounds_create_circle, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(location_manager_destroy, stSpeedMemoryLog.pszAPI2SpeedLog);
+       PRINT_MEMORY_LOG(location_bounds_create_destroy_circle, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+/************************************************************************************/
+//& purpose: To check the center position and radius of circle bounds
+//& type: auto
+/**
+* @testcase                    ITc_location_bounds_get_circle_coords_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check the center position and radius of circle bounds
+* @scenario                            creates/destroy a rect type of new location bounds and verify output\n
+*                                              check the generate location bound for null\n  
+*                                              Get circle center location bounds and redius\n
+*                                              destroy a rect type of new location bounds and verify output
+* @apicovered                  location_bounds_get_circle_coords, location_bounds_destroy
+* @passcase                            When location_bounds_get_circle_coords and supporting APIs are successful
+* @failcase                            If target API or supporting APIs fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_bounds_get_circle_coords_p(void)
+{
+       //START_TEST;
+       int nRet = -1, nLoopCount = 0 , nFailCount = 0 ;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       location_bounds_h hCircleBounds = NULL;
+
+       location_coords_s sCenter;
+       sCenter.latitude = 37.336723;
+       sCenter.longitude = -121.889555;
+
+       double dRadius = 30;
+       double dFindRadius = 0;
+
+       location_coords_s sFindCenter = {0};
+
+       nRet = location_bounds_create_circle(sCenter ,dRadius, &hCircleBounds);
+       CHECK_UNSUPPORTED_ERROR_RETURN("location_bounds_create_circle");
+       
+       PRINT_RESULT(nRet , "location_bounds_create_circle");
+
+       if(hCircleBounds == NULL)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_circle failed on precondition, returned location circle bound handle is null \\n", __LINE__);
+               return 1;
+       }
+
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_get_circle_coords(hCircleBounds , &sFindCenter , &dFindRadius); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_get_circle_coords failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+
+               if((sCenter.latitude != sFindCenter.latitude) ||(sCenter.longitude != sFindCenter.longitude))
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_get_circle_coords failed on iteration %d, mismatch in centre coord \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+                       continue;
+               }
+
+               if(dRadius != dFindRadius )
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_get_circle_coords failed on iteration %d, mismatch in radius \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+       }
+
+       nRet = location_bounds_destroy(hCircleBounds);
+       if(nRet != g_nExpectedResult)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_destroy failed on postcondition, returned error = %s \\n", __LINE__, LocationManagerGetError(nRet));
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_get_circle_coords failed %d times, out of %d times\\n", __LINE__, nFailCount,  MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(location_bounds_get_circle_coords, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_MEMORY_LOG(location_bounds_get_circle_coords, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+/************************************************************************************/
+//& purpose: To check creates/destroy a polygon type of new location bounds
+//& type: auto
+/**
+* @testcase                    ITc_location_bounds_create_destory_polygon_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check creates/destroy a polygon type of new location bounds
+* @scenario                            creates a polygon type of new location bounds and verify output\n
+*                                              check the generate location bound for null\n
+*                                              destroy a polygon type of new location bounds and verify output
+* @apicovered                  location_bounds_create_polygon, location_bounds_destroy
+* @passcase                            When location_bounds_create_polygon and location_bounds_destroy are successful
+* @failcase                            If target API fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_bounds_create_destory_polygon_p(void)
+{
+       //START_TEST;
+       int nRet = -1, nLoopCount = 0 , nOpenFailCount = 0 , nCloseFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       location_bounds_h hPolyLocationBound = NULL;
+    int nPolySize = 3;
+       location_coords_s location_coord_list[nPolySize];
+
+       location_coord_list[0].latitude = 10;
+       location_coord_list[0].longitude = 10;
+       location_coord_list[1].latitude = 20;
+       location_coord_list[1].longitude = 20;
+       location_coord_list[2].latitude = 30;
+       location_coord_list[2].longitude = 30;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_create_polygon(location_coord_list ,nPolySize, &hPolyLocationBound); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("location_bounds_create_polygon", nOpenFailCount);
+               
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_polygon failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nOpenFailCount++;
+                       continue;
+               }
+
+               if(hPolyLocationBound == NULL)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_polygon failed on iteration %d, returned location bound handle is null \\n", __LINE__, nLoopCount);
+                       nOpenFailCount++;
+                       continue;
+
+               }
+               nRet = -1;
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_destroy(hPolyLocationBound);  // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               CHECK_UNSUPPORTED_ERROR_CONTINUE("location_bounds_destroy", nCloseFailCount);
+               
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_destroy failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nCloseFailCount++;
+               }
+       }
+       
+       if (nOpenFailCount > 0 || nCloseFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_polygon failed %d times, location_bounds_destroy failed %d times out of %d times\\n", __LINE__, nOpenFailCount, nCloseFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(location_bounds_create_polygon, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(location_manager_destroy, stSpeedMemoryLog.pszAPI2SpeedLog);
+       PRINT_MEMORY_LOG(location_bounds_create_destroy_polygon, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+/************************************************************************************/
+//& purpose: To check register/unregister callback function to be invoked when boundary area is entered or exited
+//& type: auto
+/**
+* @testcase                    ITc_location_bounds_set_unset_state_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check register/unregister callback function to be invoked when boundary area is entered or exited
+* @scenario                            creates a polygon type of new location bounds and verify output\n
+*                                              check the generate location bound for null\n
+*                                              register callback function to be invoked when boundary area is entered or exited\n  
+*                                              unregister callback function\n
+*                                              destroy a polygon type of new location bounds and verify output
+* @apicovered                  location_bounds_create_polygon, location_bounds_destroy, location_bounds_set_state_changed_cb, location_bounds_unset_state_changed_cb
+* @passcase                            When location_bounds_set_state_changed_cb, location_bounds_unset_state_changed_cb and supporting APIs are successful
+* @failcase                            If target API and supporting APIs fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_bounds_set_unset_state_changed_cb_p(void)
+{
+       //START_TEST;
+       int nRet = -1, nLoopCount = 0 , nOpenFailCount = 0 , nCloseFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       location_bounds_h hPolyLocationBound = NULL;
+    int nPolySize = 3;
+       location_coords_s location_coord_list[nPolySize];
+
+       location_coord_list[0].latitude = 10;
+       location_coord_list[0].longitude = 10;
+       location_coord_list[1].latitude = 20;
+       location_coord_list[1].longitude = 20;
+       location_coord_list[2].latitude = 30;
+       location_coord_list[2].longitude = 30;
+
+       nRet = location_bounds_create_polygon(location_coord_list ,nPolySize, &hPolyLocationBound);
+       CHECK_UNSUPPORTED_ERROR_RETURN("location_bounds_create_polygon");
+       
+       PRINT_RESULT(nRet ,"location_bounds_create_polygon" );
+
+       if(hPolyLocationBound == NULL)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_polygon failed on precondition, returned location bound handle is null \\n", __LINE__);
+               return 1;
+       }
+
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_set_state_changed_cb(hPolyLocationBound , LocationBoundsPolygonStateChangedCB , NULL); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_set_state_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nOpenFailCount++;
+                       continue;
+               }
+
+               nRet = -1;
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_unset_state_changed_cb(hPolyLocationBound);  // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_unset_state_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nCloseFailCount++;
+               }
+       }
+
+       nRet = location_bounds_destroy(hPolyLocationBound);
+       if(nRet != g_nExpectedResult)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_destroy failed on postcondition, returned location bound handle is null \\n", __LINE__);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       if (nOpenFailCount > 0 || nCloseFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_set_state_changed_cb failed %d times, location_bounds_unset_state_changed_cb failed %d times out of %d times\\n", __LINE__, nOpenFailCount, nCloseFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(location_bounds_set_state_changed_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(location_bounds_unset_state_changed_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+       PRINT_MEMORY_LOG(location_bounds_set_unset_state_changed_cb, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+/************************************************************************************/
+//& purpose: To check coordinates of polygon
+//& type: auto
+/**
+* @testcase                    ITc_location_bounds_foreach_polygon_coords_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check coordinates of polygon
+* @scenario                            creates a polygon type of new location bounds and verify output\n
+*                                              check the generate location bound for null\n
+*                                              check coordinates of polygon\n
+*                                              destroy a polygon type of new location bounds and verify output
+* @apicovered                  location_bounds_foreach_polygon_coords, location_bounds_create_polygon, location_bounds_destroy
+* @passcase                            When location_bounds_foreach_polygon_coords and supporting APIs are successful
+* @failcase                            If target API or supporting APIs fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_bounds_foreach_polygon_coords_p(void)
+{
+       //START_TEST;
+       int nRet = -1, nLoopCount = 0 , nOpenFailCount = 0 ;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       location_bounds_h hPolyLocationBound = NULL;
+
+       int nPolySize = 3;
+       location_coords_s location_coord_list[nPolySize];
+
+       location_coord_list[0].latitude = 10;
+       location_coord_list[0].longitude = 10;
+       location_coord_list[1].latitude = 20;
+       location_coord_list[1].longitude = 20;
+       location_coord_list[2].latitude = 30;
+       location_coord_list[2].longitude = 30;
+
+       nRet = location_bounds_create_polygon(location_coord_list ,nPolySize, &hPolyLocationBound);
+       CHECK_UNSUPPORTED_ERROR_RETURN("location_bounds_create_polygon");
+       
+       PRINT_RESULT(nRet , "location_bounds_create_polygon");
+
+       if(hPolyLocationBound == NULL)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_polygon failed on precondition, returned location bound handle is null \\n", __LINE__);
+               return 1;
+       }
+
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_foreach_polygon_coords(hPolyLocationBound ,LocationPolygonCoordinatesCB, &location_coord_list); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_foreach_polygon_coords failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nOpenFailCount++;
+                       continue;
+               }
+
+               if(g_nPolygonCoordsResponseCount != nPolySize)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_foreach_polygon_coords failed on iteration %d, mismatch in polygon coordinate \\n", __LINE__, nLoopCount);
+                       nOpenFailCount++;
+               }
+
+               g_nPolygonCoordsResponseCount = 0;
+       }
+
+       nRet = location_bounds_destroy(hPolyLocationBound);
+       if(nRet != g_nExpectedResult)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_destroy failed on postcondition, returned location bound handle is null \\n", __LINE__);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       if (nOpenFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_foreach_polygon_coords failed %d times, out of %d times\\n", __LINE__, nOpenFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(location_bounds_foreach_polygon_coords, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_MEMORY_LOG(location_bounds_foreach_polygon_coords, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+/************************************************************************************/
+//& purpose: To check the bounds contains the specified coordinates
+//& type: auto
+/**
+* @testcase                    ITc_location_bounds_contains_coordinates_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check the bounds contains the specified coordinates
+* @scenario                            creates a polygon type of new location bounds and verify output\n
+*                                              check the generate location bound for null\n
+*                                              check coordinates inside polygon boundary\n
+*                                              destroy a polygon type of new location bounds and verify output
+* @apicovered                  location_bounds_contains_coordinates, location_bounds_create_polygon, location_bounds_destroy
+* @passcase                            When location_bounds_contains_coordinates and supporting APIs are successful
+* @failcase                            If target API or supporting APIs fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_bounds_contains_coordinates_p(void)
+{
+       //START_TEST;
+       int nRet = -1, nLoopCount = 0 , nOpenFailCount = 0 ;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       location_bounds_h hPolyLocationBound = NULL;
+       bool bIsContained = false;
+
+       int nPolySize = 3;
+       location_coords_s location_coord_list[nPolySize];
+
+       location_coord_list[0].latitude = 10;
+       location_coord_list[0].longitude = 10;
+       location_coord_list[1].latitude = 20;
+       location_coord_list[1].longitude = 20;
+       location_coord_list[2].latitude = 30;
+       location_coord_list[2].longitude = 10;
+
+       //Checking coordinates in location boundary
+       location_coords_s testLocationCoordinates ;
+       testLocationCoordinates.latitude = 20 ;
+       testLocationCoordinates.longitude = 12;
+
+
+       nRet = location_bounds_create_polygon(location_coord_list ,nPolySize, &hPolyLocationBound);
+       CHECK_UNSUPPORTED_ERROR_RETURN("location_bounds_create_polygon");
+       
+       PRINT_RESULT(nRet , "location_bounds_create_polygon");
+
+       if(hPolyLocationBound == NULL)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_polygon failed on precondition, returned location bound handle is null \\n", __LINE__);
+               return 1;
+       }
+
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               bIsContained = location_bounds_contains_coordinates(hPolyLocationBound ,testLocationCoordinates); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (bIsContained == false)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_contains_coordinates failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nOpenFailCount++;
+               }
+               bIsContained = false;
+       }
+
+       nRet = location_bounds_destroy(hPolyLocationBound);
+       if(nRet != g_nExpectedResult)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_destroy failed on postcondition, returned location bound handle is null \\n", __LINE__);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       if (nOpenFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_contains_coordinates failed %d times, out of %d times\\n", __LINE__, nOpenFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(location_bounds_contains_coordinates, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_MEMORY_LOG(location_bounds_contains_coordinates, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+
+/************************************************************************************/
+//& purpose: To check the type of location bounds
+//& type: auto
+/**
+* @testcase                    ITc_location_bounds_get_type_p
+* @since_tizen                 2.3
+* @type                                auto 
+* @description                 To check the type of location bounds
+* @scenario                            creates a polygon type of new location bounds and verify output\n
+*                                              check the generate location bound for null\n
+*                                              check the type of location bounds\n
+*                                              destroy a polygon type of new location bounds and verify output
+* @apicovered                  location_bounds_get_type, location_bounds_create_circle, location_bounds_destroy
+* @passcase                            When location_bounds_get_type and supporting APIs are successful
+* @failcase                            If target API or supporting APIs fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_bounds_get_type_p(void)
+{
+       //START_TEST;
+       int nRet = -1, nLoopCount = 0 , nOpenFailCount = 0 ;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       location_bounds_h hCircleBounds = NULL;
+       location_bounds_type_e eFindBoundsType = -1;
+
+       location_coords_s sCenter;
+       sCenter.latitude = 37.336723;
+       sCenter.longitude = -121.889555;
+
+       double dRadius = 30;
+
+       nRet =location_bounds_create_circle(sCenter ,dRadius, &hCircleBounds);
+       CHECK_UNSUPPORTED_ERROR_RETURN("location_bounds_create_circle");
+       
+       PRINT_RESULT(nRet , "location_bounds_create_circle");
+
+       if(hCircleBounds == NULL)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_circle failed on precondition, returned location bound handle is null \\n", __LINE__);
+               return 1;
+       }
+
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = location_bounds_get_type(hCircleBounds , &eFindBoundsType); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != g_nExpectedResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_get_type failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nOpenFailCount++;
+                       continue;
+               }
+
+               if(eFindBoundsType != LOCATION_BOUNDS_CIRCLE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_get_type failed on iteration %d, mismatch in location bounds type \\n", __LINE__, nLoopCount);
+                       nOpenFailCount++;
+
+               }
+       }
+
+       nRet = location_bounds_destroy(hCircleBounds);
+       if(nRet != g_nExpectedResult)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_destroy failed on postcondition, returned location bound handle is null \\n", __LINE__);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       if (nOpenFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_get_type failed %d times, out of %d times\\n", __LINE__, nOpenFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(location_bounds_get_type, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_MEMORY_LOG(location_bounds_get_type, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/location-manager/ITs-location-gps-status.c b/src/itc/location-manager/ITs-location-gps-status.c
new file mode 100755 (executable)
index 0000000..e8607cc
--- /dev/null
@@ -0,0 +1,595 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-location-manager-common.h"
+
+/** @addtogroup itc-location-manager
+*  @ingroup itc
+*  @{
+*/
+
+//& set: LocationManager
+
+int g_nExpectedGPSResult = LOCATIONS_ERROR_NONE;
+
+location_manager_h g_hLocationManager = NULL;
+location_method_e g_eMethodType = LOCATIONS_METHOD_GPS;
+
+/**
+ * @function           ITs_location_gps_status_startup
+ * @description                Called before each test, set the service boolean true
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_location_gps_status_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bLocationIsSupported = (Location_Manager_Check_System_Info_Feature_Supported(LOCATION_FEATURE) && Location_Manager_Check_System_Info_Feature_Supported(LOCATION_GPS_FEATURE));
+       g_bSatelliteIsSupported = Location_Manager_Check_System_Info_Feature_Supported(LOCATION_GPS_SATELLITE_FEATURE);
+       LocationManagerCreateStartMethod(&g_hLocationManager , g_eMethodType);
+}
+
+/**
+ * @function           ITs_location_gps_status_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_location_gps_status_cleanup(void)
+{
+       if(g_bCleanupNotRequired != true)
+       {
+               LocationManagerStopDestroyMethod(&g_hLocationManager);
+       }
+       return;
+}
+
+/**
+ * @function           LocationGpsStatusGetSatellitesCB
+ * @description                captured satellite information
+ * @parameter          int , int , int , int , bool , void *user_data
+ * @return                     bool
+ */
+bool LocationGpsStatusGetSatellitesCB(unsigned int azimuth, unsigned int elevation, unsigned int prn, int snr,
+                                             bool is_in_use, void *user_data)
+{
+       FPRINTF( "[Line : %d] [location-manager_ITc]Invoked LocationGpsStatusGetSatellitesCB \\n", __LINE__);
+       FPRINTF( "[Line : %d] [location-manager_ITc][Current Satellite information]  azimuth  : %d, elevation : %d, prn :%d, snr : %d, used: %d\\n", __LINE__, azimuth, elevation,
+                      prn, snr, is_in_use);
+       return true;
+}
+
+/**
+ * @function           LocationGpsStatusLastSatellitesForeachCB
+ * @description                captured last satellites information
+ * @parameter          int , int , int , int , bool , void *user_data
+ * @return                     bool
+ */
+bool LocationGpsStatusLastSatellitesForeachCB(unsigned int azimuth, unsigned int elevation, unsigned int prn, int snr, bool is_in_use,
+                                      void *user_data)
+{
+       FPRINTF( "[Line : %d] [location-manager_ITc]Invoked LocationGpsStatusGetSatellitesCB \\n", __LINE__);
+       FPRINTF( "[Line : %d] [location-manager_ITc][Last Satellite information]  azimuth  : %d, elevation : %d, prn :%d, snr : %d, used: %d\\n", __LINE__, azimuth, elevation,
+              prn, snr, is_in_use);
+       return true;
+}
+
+/**
+ * @function           LocationGpsStatusSatelliteUpdatedCB
+ * @description                captured updated information of satellites in certain duration
+ * @parameter          int , int , int , int , bool , void *user_data
+ * @return                     bool
+ */
+void LocationGpsStatusSatelliteUpdatedCB(int num_of_active, int num_of_inview,  time_t timestamp, void *user_data)
+{
+       g_bCallbackHit = true;
+       FPRINTF( "[Line : %d] [location-manager_ITc]Invoked LocationGpsStatusSatelliteUpdatedCB \\n", __LINE__);
+       FPRINTF( "[Line : %d] [location-manager_ITc][Last Satellite information]  num_of_active  : %d, num_of_inview : %d, timestamp :%ld \\n", __LINE__, num_of_active, num_of_inview,
+                       timestamp);
+       g_bIsSatelliteEnabled = true;
+       if ((g_pLocationManagerMainLoop != NULL) && (g_bIsServiceEnabled == true))
+       {
+               g_main_loop_quit(g_pLocationManagerMainLoop);
+       }
+       return;
+}
+
+/** @addtogroup itc-location-gps-testcases
+*  @brief              Integration testcases for module location-gps
+*  @ingroup    itc-location-gps
+*  @{
+*/
+
+//& purpose: To check GPS NMEA data
+//& type: auto
+/**
+* @testcase                    ITc_gps_status_get_nmea_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check GPS NMEA data
+* @scenario                            Get the GPS NMEA data\n
+*                                              Check data for null
+* @apicovered                  gps_status_get_nmea
+* @passcase                            When gps_status_get_nmea is successful
+* @failcase                            If target API gps_status_get_nmea fails
+* @precondition                        location service with gps method should be start
+* @postcondition               location service should be stop and location manager should be release
+*/
+/* int ITc_gps_status_get_nmea_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nFailCount = 0 ;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       char *pszNMEA = NULL;
+       location_method_e method;
+       
+       nRet = location_manager_get_method(g_hLocationManager, &method);
+       if (nRet != LOCATIONS_ERROR_NONE || method != LOCATIONS_METHOD_GPS)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_method failed , error returned = %s \\n", __LINE__, LocationManagerGetError(nRet));
+               return 1;
+       }
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = gps_status_get_nmea(g_hLocationManager , &pszNMEA); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (!g_bSatelliteIsSupported)
+               {
+                       if (nRet == LOCATIONS_ERROR_NOT_SUPPORTED)
+                       {
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_nmea failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                               nFailCount++;
+                               continue;
+                       }
+               }
+               if (nRet != g_nExpectedGPSResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_nmea failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+
+               if(pszNMEA == NULL)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_nmea failed on iteration %d, return value is null \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+                       continue;
+               }
+
+               free(pszNMEA);
+               pszNMEA = NULL;
+       }
+
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_nmea failed %d times, out of %d times\\n", __LINE__, nFailCount,  MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(gps_status_get_nmea, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_MEMORY_LOG(gps_status_get_nmea, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+} */
+/*****************************************End*******************************************/
+/************************************************************************************/
+//& purpose: To check the information of satellites
+//& type: auto
+/**
+* @testcase                    ITc_gps_status_get_satellite_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check the information of satellites
+* @scenario                            Get the information of satellites\n
+*                                              Verify the information 
+* @apicovered                  gps_status_get_satellite
+* @passcase                            When gps_status_get_satellite is successful
+* @failcase                            If target API  fails
+* @precondition                        location service with gps method should be start
+* @postcondition               location service should be stop and location manager should be release
+*/
+int ITc_gps_status_get_satellite_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nFailCount = 0 ;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nGetActive = -1;
+       int nGetInView = -1;
+       time_t tGetTimestamp = 0 ;
+       location_method_e method;
+       
+       nRet = location_manager_get_method(g_hLocationManager, &method);
+       if (nRet != LOCATIONS_ERROR_NONE || method != LOCATIONS_METHOD_GPS)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_method failed , error returned = %s \\n", __LINE__, LocationManagerGetError(nRet));
+               return 1;
+       }
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = gps_status_get_satellite(g_hLocationManager , &nGetActive , &nGetInView , &tGetTimestamp ); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (!g_bSatelliteIsSupported)
+               {
+                       if (nRet == LOCATIONS_ERROR_NOT_SUPPORTED)
+                       {
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_satellite failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                               nFailCount++;
+                               continue;
+                       }
+               }
+               if (nRet != g_nExpectedGPSResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_satellite failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+
+               if((nGetActive == -1) ||(nGetInView == -1) ||(tGetTimestamp == 0))
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_satellite failed on iteration %d, return invalid values \\n", __LINE__, nLoopCount);
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_satellite active :%d , in_view : %d , time_stamp : %ld \\n", __LINE__, nGetActive , nGetInView , tGetTimestamp);
+                       nFailCount++;
+               }
+       }
+
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_satellite failed %d times, out of %d times\\n", __LINE__, nFailCount,  MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(gps_status_get_satellite, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_MEMORY_LOG(gps_status_get_satellite, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+/************************************************************************************/
+//& purpose: To check the last information of satellites
+//& type: auto
+/**
+* @testcase                    ITc_gps_status_get_last_satellite_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check the last information of satellites
+* @scenario                            Get the last information of satellites\n
+*                                              Verify the information
+* @apicovered                  gps_status_get_last_satellite
+* @passcase                            When gps_status_get_last_satellite is successful
+* @failcase                            If target API  fails
+* @precondition                        location service with gps method should be start
+* @postcondition               location service should be stop and location manager should be release
+*/
+int ITc_gps_status_get_last_satellite_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nFailCount = 0 ;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nGetActive = -1;
+       int nGetInView = -1;
+       time_t tGetTimestamp = 0 ;
+       location_method_e method;
+       
+       nRet = location_manager_get_method(g_hLocationManager, &method);
+       if (nRet != LOCATIONS_ERROR_NONE || method != LOCATIONS_METHOD_GPS)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_method failed , error returned = %s \\n", __LINE__, LocationManagerGetError(nRet));
+               return 1;
+       }
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = gps_status_get_last_satellite(g_hLocationManager , &nGetActive , &nGetInView , &tGetTimestamp ); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (!g_bSatelliteIsSupported)
+               {
+                       if (nRet == LOCATIONS_ERROR_NOT_SUPPORTED)
+                       {
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_last_satellite failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                               nFailCount++;
+                               continue;
+                       }
+               }
+               if (nRet != g_nExpectedGPSResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_last_satellite failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+
+               if((nGetActive == -1) ||(nGetInView == -1) ||(tGetTimestamp == 0))
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_last_satellite failed on iteration %d, return invalid values \\n", __LINE__, nLoopCount);
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_last_satellite active :%d , in_view : %d , time_stamp : %ld \\n", __LINE__, nGetActive , nGetInView , tGetTimestamp);
+                       nFailCount++;
+               }
+       }
+
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_get_last_satellite failed %d times, out of %d times\\n", __LINE__, nFailCount,  MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(gps_status_get_last_satellite, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_MEMORY_LOG(gps_status_get_last_satellite, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+/************************************************************************************/
+//& purpose: To register the callback function for each last satellite which is recorded
+//& type: auto
+/**
+* @testcase                    ITc_gps_status_foreach_last_satellites_in_view_p
+* @since_tizen                 2.3
+* @type                                auto 
+* @description                 To check the last information of satellites
+* @scenario                            Register the callback function for each last satellite which is recorded\n
+*                                              Verify the output of function
+* @apicovered                  gps_status_foreach_last_satellites_in_view
+* @passcase                            When gps_status_foreach_last_satellites_in_view is successful
+* @failcase                            If target API  fails
+* @precondition                        location service with gps method should be start
+* @postcondition               location service should be stop and location manager should be release
+*/
+int ITc_gps_status_foreach_last_satellites_in_view_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nFailCount = 0 ;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       location_method_e method;
+       
+       nRet = location_manager_get_method(g_hLocationManager, &method);
+       if (nRet != LOCATIONS_ERROR_NONE || method != LOCATIONS_METHOD_GPS)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_method failed , error returned = %s \\n", __LINE__, LocationManagerGetError(nRet));
+               return 1;
+       }
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = gps_status_foreach_last_satellites_in_view(g_hLocationManager ,LocationGpsStatusLastSatellitesForeachCB, NULL); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (!g_bSatelliteIsSupported)
+               {
+                       if (nRet == LOCATIONS_ERROR_NOT_SUPPORTED)
+                       {
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_foreach_last_satellites_in_view failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                               nFailCount++;
+                               continue;
+                       }
+               }
+               if (nRet != g_nExpectedGPSResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_foreach_last_satellites_in_view failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+       }
+
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_foreach_last_satellites_in_view failed %d times, out of %d times\\n", __LINE__, nFailCount,  MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(gps_status_foreach_last_satellites_in_view, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_MEMORY_LOG(gps_status_foreach_last_satellites_in_view, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+/************************************************************************************/
+//& purpose: To register callback function for each present satellite
+//& type: auto
+/**
+* @testcase                    ITc_gps_status_foreach_satellites_in_view_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To register callback function for each present satellite
+* @scenario                            Register the callback function for each present satellite\n
+*                                              Verify the output of function
+* @apicovered                  gps_status_foreach_satellites_in_view
+* @passcase                            When gps_status_foreach_satellites_in_view is successful
+* @failcase                            If target API  fails
+* @precondition                        location service with gps method should be start
+* @postcondition               location service should be stop and location manager should be release
+*/
+int ITc_gps_status_foreach_satellites_in_view_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nFailCount = 0 ;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       location_method_e method;
+       
+       nRet = location_manager_get_method(g_hLocationManager, &method);
+       if (nRet != LOCATIONS_ERROR_NONE || method != LOCATIONS_METHOD_GPS)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_method failed , error returned = %s \\n", __LINE__, LocationManagerGetError(nRet));
+               return 1;
+       }
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = gps_status_foreach_satellites_in_view(g_hLocationManager ,LocationGpsStatusGetSatellitesCB, NULL); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (!g_bSatelliteIsSupported)
+               {
+                       if (nRet == LOCATIONS_ERROR_NOT_SUPPORTED)
+                       {
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_foreach_satellites_in_view failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                               nFailCount++;
+                               continue;
+                       }
+               }
+               if (nRet != g_nExpectedGPSResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_foreach_satellites_in_view failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+       }
+
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_foreach_satellites_in_view failed %d times, out of %d times\\n", __LINE__, nFailCount,  MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(gps_status_foreach_satellites_in_view, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_MEMORY_LOG(gps_status_foreach_satellites_in_view, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/*****************************************End*******************************************/
+/************************************************************************************/
+
+//& purpose: To register/unregister a callback function to be invoked at defined interval with updated satellite information.
+//& type: auto
+/**
+* @testcase                    ITc_gps_status_set_unset_satellite_updated_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 To check creates/destroy a rect type of new location bounds
+* @scenario                            register/unregister a callback function to be invoked at defined interval with updated satellite information\n
+*                                              unregister a callback function to be invoked at defined interval with updated satellite information
+* @apicovered                  gps_status_set_satellite_updated_cb, gps_status_unset_satellite_updated_cb
+* @passcase                            When gps_status_set_satellite_updated_cb and gps_status_unset_satellite_updated_cb are successful
+* @failcase                            If target APIs fails
+* @precondition                        location service with gps method should be start
+* @postcondition               location service should be stop and location manager should be release
+*/
+int ITc_gps_status_set_unset_satellite_updated_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nOpenFailCount = 0 , nCloseFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nInterval = 1;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               nRet = gps_status_set_satellite_updated_cb(g_hLocationManager , LocationGpsStatusSatelliteUpdatedCB , nInterval ,  NULL); // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (!g_bSatelliteIsSupported)
+               {
+                       if (nRet == LOCATIONS_ERROR_NOT_SUPPORTED)
+                       {
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_set_satellite_updated_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                               nOpenFailCount++;
+                               continue;
+                       }
+               }
+               if (nRet != g_nExpectedGPSResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_set_satellite_updated_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nOpenFailCount++;
+                       continue;
+               }
+
+               nRet = -1;
+               LocationManagerGetTimeOfDay();
+               nRet = gps_status_unset_satellite_updated_cb(g_hLocationManager);  // Target API
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (!g_bSatelliteIsSupported)
+               {
+                       if (nRet == LOCATIONS_ERROR_NOT_SUPPORTED)
+                       {
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_unset_satellite_updated_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                               nCloseFailCount++;
+                               continue;
+                       }
+               }
+               if (nRet != g_nExpectedGPSResult)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_unset_satellite_updated_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nCloseFailCount++;
+               }
+       }
+       
+       if (nOpenFailCount > 0 || nCloseFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_set_satellite_updated_cb failed %d times, gps_status_unset_satellite_updated_cb failed %d times out of %d times\\n", __LINE__, nOpenFailCount, nCloseFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+
+       PRINT_SPEED_LOG(gps_status_set_satellite_updated_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(gps_status_unset_satellite_updated_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+       PRINT_MEMORY_LOG(gps_status_set_unset_satellite_updated_cb, stSpeedMemoryLog.pszAPI1MemLog);
+       LOCATIONMANAGER_DEINITIALIZE_LOGS;
+       return 0;
+}
+/** @} */
+/** @} */
diff --git a/src/itc/location-manager/ITs-location-manager-common.c b/src/itc/location-manager/ITs-location-manager-common.c
new file mode 100755 (executable)
index 0000000..f5d467c
--- /dev/null
@@ -0,0 +1,419 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-location-manager-common.h"
+
+/** @addtogroup itc-location-manager
+*  @ingroup itc
+*  @{
+*/
+
+/**
+* @function            LocationManagerGetError
+* @description         Maps error enumerators to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* LocationManagerGetError(location_error_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case LOCATIONS_ERROR_NONE:                                                      szErrorVal = "LOCATIONS_ERROR_NONE";                                                    break;
+       case LOCATIONS_ERROR_OUT_OF_MEMORY:                                     szErrorVal = "LOCATIONS_ERROR_OUT_OF_MEMORY";                                   break;
+       case LOCATIONS_ERROR_INVALID_PARAMETER:                         szErrorVal = "LOCATIONS_ERROR_INVALID_PARAMETER";                               break;
+       case LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED:         szErrorVal = "LOCATIONS_ERROR_ACCESSIBILITY_NOT_ALLOWED";               break;
+       case LOCATIONS_ERROR_NOT_SUPPORTED:                                     szErrorVal = "LOCATIONS_ERROR_NOT_SUPPORTED";                                   break;
+       case LOCATIONS_ERROR_INCORRECT_METHOD:                          szErrorVal = "LOCATIONS_ERROR_INCORRECT_METHOD";                                break;
+       case LOCATIONS_ERROR_NETWORK_FAILED:                            szErrorVal = "LOCATIONS_ERROR_NETWORK_FAILED";                                  break;
+       case LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE:                     szErrorVal = "LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE";                   break;
+       case LOCATIONS_ERROR_GPS_SETTING_OFF:                           szErrorVal = "LOCATIONS_ERROR_GPS_SETTING_OFF";                                 break;
+       case LOCATIONS_ERROR_SECURITY_RESTRICTED:                       szErrorVal = "LOCATIONS_ERROR_SECURITY_RESTRICTED";                             break;
+       default:                                                                                        szErrorVal = "Unknown Error";                                                                   break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+ * @function           LocationManagerGetEnum
+ * @description                Maps  enumerators to string values
+ * @parameter          nRet : enum code returned
+ * @return                     enum string
+ */
+char* LocationManagerGetEnum(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case LOCATIONS_METHOD_HYBRID : szErrorVal = "LOCATIONS_METHOD_HYBRID" ; break;
+               case LOCATIONS_METHOD_GPS : szErrorVal = "LOCATIONS_METHOD_GPS" ; break;
+               case LOCATIONS_METHOD_WPS : szErrorVal = "LOCATIONS_METHOD_WPS" ; break;
+               default : szErrorVal = "LOCATIONS_METHOD_NONE" ; break;
+       }
+
+       return szErrorVal;
+}
+
+
+/**
+* @function                    LocationManagerGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void LocationManagerGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char * pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stLocationManagerMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stLocationManagerMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stLocationManagerMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               snprintf(pszLog, MEMLOG, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    LocationManagerGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void LocationManagerGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stLocationManagerMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           LocationManagerExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void LocationManagerExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime=calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stLocationManagerStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stLocationManagerStartTime.tv_usec;
+                       
+               snprintf(pszLogTime, MEMLOG, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+
+#endif
+}
+
+/**
+ * @function           LocationManagerGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stLocationManagerStartTime
+ * @parameter          NA
+ * @return                     NA
+ *
+ */ 
+void LocationManagerGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stLocationManagerStartTime, NULL);
+#endif
+}
+
+/**
+* @function            Timeout
+* @description         Called if some callback is not invoked for a particular timeout
+* @parameter           gpointer data
+* @return                      gboolean
+*/ 
+gboolean Timeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+       }
+       FPRINTF( "[Line : %d] [location-manager_ITc] Callback Timeout \\n", __LINE__);
+       return false;
+}
+
+/**
+* @function            LocationManagerCreateStart
+* @description         Create a message service and start it
+* @parameter           pointer to location_manager_h structure
+* @return                      NA
+*/ 
+void LocationManagerCreateStart(location_manager_h *pstManager)
+{
+       g_bCreateSuccess = false;
+       g_bStartSuccess = false;
+       g_bCallbackHit = false;
+       int nTimeoutId = -1;
+       int nRet = location_manager_create(LOCATIONS_METHOD_GPS, pstManager);
+       if ( false == g_bLocationIsSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       g_bLocationMismatch = true;
+               }
+               else
+               {
+                       g_bLocationNotSupported = true;
+               }
+               return;
+       }
+       PRINT_RESULT_NORETURN(nRet, "location_manager_create");
+       if(nRet == LOCATIONS_ERROR_NONE)
+       {       
+               g_bCreateSuccess = true;
+               nRet = -1;
+               nRet = location_manager_set_service_state_changed_cb(*pstManager,LocationServiceStateChangeCb,NULL);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_service_state_changed_cb failed , error returned = %s \\n", __LINE__, LocationManagerGetError(nRet));
+                       return ;
+               }
+       
+               nRet = location_manager_start(*pstManager);
+               
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit != true || g_bCallbackReturnValue != true)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_start did not invoke service state change callback \\n", __LINE__);
+                       return ;
+               }
+       
+               PRINT_RESULT_NORETURN(nRet, "location_manager_start");
+               if(nRet == LOCATIONS_ERROR_NONE)
+               {
+                       g_bStartSuccess = true;
+               }
+       }
+}
+
+/**
+* @function            LocationManagerStopDestroy
+* @description         stops a message service
+* @parameter           pointer to location_manager_h structure
+* @return                      NA
+*/ 
+void LocationManagerStopDestroy(location_manager_h *pstManager)
+{
+       if ( g_bStartSuccess )
+       {
+               location_manager_stop(*pstManager);
+               g_bStartSuccess = false;
+       }
+       sleep(SLEEP_TIME);
+       if ( g_bCreateSuccess )
+       {
+               location_manager_unset_service_state_changed_cb(*pstManager);
+               sleep(SLEEP_TIME);
+               location_manager_destroy(*pstManager);
+               g_bCreateSuccess = false;
+       }
+}
+
+/**
+* @function            LocationManagerCreateStartMethod
+* @description         Create a message service and start it
+* @parameter           pointer to location_manager_h structure, location_method_e
+* @return                      NA
+*/
+void LocationManagerCreateStartMethod(location_manager_h *pstManager, location_method_e eLocationMethod)
+{
+       g_bCreateSuccess = false;
+       g_bStartSuccess = false;
+       g_bCallbackHit = false;
+       g_bIsServiceEnabled = false;
+       g_bIsSatelliteEnabled = false;
+       int nTimeoutId = -1;
+       int nRet = location_manager_create(eLocationMethod, pstManager);
+       if ( false == g_bLocationIsSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       g_bLocationMismatch = true;
+               }
+               else
+               {
+                       g_bLocationNotSupported = true;
+               }
+               return;
+       }
+
+       PRINT_RESULT_NORETURN(nRet, "location_manager_create");
+       if(nRet == LOCATIONS_ERROR_NONE)
+       {
+               g_bCreateSuccess = true;
+               nRet = -1;
+               nRet = location_manager_set_service_state_changed_cb(*pstManager,LocationServiceMethodStateChangeCb,NULL);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_service_state_changed_cb failed , error returned = %s \\n", __LINE__, LocationManagerGetError(nRet));
+                       return ;
+               }
+               
+               nRet = -1;
+               nRet = gps_status_set_satellite_updated_cb(*pstManager,LocationGpsStatusSatelliteUpdatedCB,1,NULL);
+               if ((!g_bSatelliteIsSupported && nRet != LOCATIONS_ERROR_NOT_SUPPORTED) || (g_bSatelliteIsSupported && nRet != LOCATIONS_ERROR_NONE))
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] gps_status_set_satellite_updated_cb failed , error returned = %s \\n", __LINE__, LocationManagerGetError(nRet));
+                       return ;
+               }
+               
+               nRet = -1;
+               nRet = location_manager_start(*pstManager);
+               
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit != true)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_start did not invoke service state change callback \\n", __LINE__);
+                       return ;
+               }
+               
+               if(g_bIsServiceEnabled != true)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Service not enabled \\n", __LINE__);
+                       return ;
+               }
+               if(g_bSatelliteIsSupported && g_bIsSatelliteEnabled != true)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Satellite not enabled \\n", __LINE__);
+                       return ;
+               }
+               PRINT_RESULT_NORETURN(nRet, "location_manager_start");
+               if(nRet == LOCATIONS_ERROR_NONE)
+               {
+                       g_bStartSuccess = true; 
+               }
+       }
+}      
+
+/**
+* @function            LocationManagerStopDestroyMethod
+* @description         stops a message service
+* @parameter           pointer to location_manager_h structure
+* @return                      NA
+*/ 
+void LocationManagerStopDestroyMethod(location_manager_h *pstManager)
+{
+       if ( g_bStartSuccess )
+       {
+               location_manager_stop(*pstManager);
+               g_bStartSuccess = false;
+       }
+       sleep(SLEEP_TIME);
+       if ( g_bCreateSuccess )
+       {
+               gps_status_unset_satellite_updated_cb(*pstManager);
+               sleep(SLEEP_TIME);
+               location_manager_unset_service_state_changed_cb(*pstManager);
+               sleep(SLEEP_TIME);
+               location_manager_destroy(*pstManager);
+               g_bCreateSuccess = false;
+       }
+}
+
+/**
+ * @function           Location_Manager_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Location_Manager_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if(NULL == pszKey)
+       {
+               FPRINTF("\\n[Line : %d][location-manager_ITc] Null key value passed to function : Location_Manager_Check_System_Info_Feature_Supported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][location-manager_ITc] system_info_get_platform_bool returned (error = %s) for (key = %s)",__LINE__, Location_Manager_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if(false == bValue)
+       {
+               FPRINTF("\\n[Line : %d][location-manager_ITc] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][location-manager_ITc] system_info_get_platform_bool returned Supported status feature for (key = %s)",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           Location_Manager_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Location_Manager_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Cannot find key in model config file " ; break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR  : szErrorVal = "Error - An input/output error occurred when read value from model config file " ; break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY   : szErrorVal = "Error - Out of memory  " ; break;
+                       
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/location-manager/ITs-location-manager-common.h b/src/itc/location-manager/ITs-location-manager-common.h
new file mode 100755 (executable)
index 0000000..4c27c9f
--- /dev/null
@@ -0,0 +1,278 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_LOCATION_MANAGER_COMMON_H_
+#define _ITS_LOCATION_MANAGER_COMMON_H_
+
+#include "assert.h"
+//Add test package related includes here
+#include <tizen.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <locations.h>
+#include <glib.h>
+#include <app.h>
+#include <system_info.h>
+
+/** @addtogroup itc-location-manager
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function declarations here
+struct timeval g_stLocationManagerStartTime;
+struct mallinfo g_stLocationManagerMemInfo;
+bool g_bStartSuccess;
+bool g_bCreateSuccess;
+bool g_bLocationIsSupported;
+bool g_bLocationMismatch;
+bool g_bLocationNotSupported;
+bool g_bCallbackHit;
+bool g_bCallbackReturnValue;
+bool g_bIsServiceEnabled;
+bool g_bIsSatelliteEnabled;
+bool g_bSatelliteIsSupported;
+GMainLoop *g_pLocationManagerMainLoop;
+location_manager_h g_stManager;
+bool g_bCleanupNotRequired;
+
+/************************* Constant values macros **********************************/
+#define PATH_LEN                               1024
+#define TIMELOG                                        30
+#define MEMLOG                                 30
+#define MICROSECONDS_PER_SECOND        1000000
+#define MINCOUNT                               1
+#define TESTSTRINGSIZE                 120*sizeof(char)
+#define TESTVALUE                              50
+#define TESTSTRING                             "TestString"
+#define TESTSTRINGNEW                  "TestStringNew"
+#define TIMEOUT_CB                             30000
+#define LOCATIONWAITTIME               30
+#define SLEEP_TIME                             3
+#define LOCATION_FEATURE               "http://tizen.org/feature/location"
+#define LOCATION_WPS_FEATURE   "http://tizen.org/feature/location.wps"
+#define LOCATION_GPS_FEATURE   "http://tizen.org/feature/location.gps"
+#define LOCATION_GPS_SATELLITE_FEATURE "http://tizen.org/feature/location.gps.satellite"
+FILE *g_fpLog;
+
+typedef struct SpeedMemory
+{
+       char *pszAPI1MemLog;
+       char *pszAPI2MemLog;
+       char *pszAPI1SpeedLog;
+       char *pszAPI2SpeedLog;
+}SpeedMemoryLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE {\
+       if(MEMORY_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if(SPEED_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+}
+
+#define LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLEMEM {\
+       if(MEMORY_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if(SPEED_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+}
+
+#define LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED {\
+       if(MEMORY_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if(SPEED_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+}
+
+#define LOCATIONMANAGER_DEINITIALIZE_LOGS {\
+       if ( stSpeedMemoryLog.pszAPI1MemLog != NULL)\
+       {\
+               free(stSpeedMemoryLog.pszAPI1MemLog);\
+               stSpeedMemoryLog.pszAPI1MemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2MemLog != NULL)\
+       {\
+               free(stSpeedMemoryLog.pszAPI2MemLog);\
+               stSpeedMemoryLog.pszAPI2MemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI1SpeedLog != NULL)\
+       {\
+               free (stSpeedMemoryLog.pszAPI1SpeedLog);\
+               stSpeedMemoryLog.pszAPI1SpeedLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2SpeedLog != NULL)\
+       {\
+               free (stSpeedMemoryLog.pszAPI2SpeedLog);\
+               stSpeedMemoryLog.pszAPI2SpeedLog = NULL;\
+       }\
+}
+
+#define START_TEST {\
+       FPRINTF( "[Line : %d] [location-manager_ITc] Starting test : %s\\n", __LINE__,__FUNCTION__);\
+       if (g_bLocationMismatch)\
+       {\
+               FPRINTF("[Line : %d][location-manager_ITc] Feature support as returned by Location_Manager_Check_System_Info_Feature_Supported() and error code as returned by location_manager_create() mismatched, Leaving test ", __LINE__);\
+               return 1;\
+       }\
+       else if (g_bLocationNotSupported)\
+       {\
+               FPRINTF("\\n[Line : %d] [location-manager_ITc] Location manager feature not supported, Leaving test ", __LINE__);\
+               return 0;\
+       }\
+       if ( !g_bCreateSuccess || !g_bStartSuccess )\
+       {\
+               FPRINTF( "[Line : %d] [location-manager_ITc] Precondition of location_manager failed so leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == LOCATIONS_ERROR_NONE)\
+       {\
+               if(DEBUG)\
+               {\
+                       FPRINTF( "[Line : %d] [location-manager_ITc] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF( "[Line : %d] [location-manager_ITc] %s failed, error returned = %s \\n", __LINE__, API, LocationManagerGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_NORETURN(nRetVal, API) {\
+       if (nRetVal == LOCATIONS_ERROR_NONE)\
+       {\
+               if(DEBUG)\
+               {\
+                       FPRINTF( "[Line : %d] [location-manager_ITc] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF( "[Line : %d] [location-manager_ITc] %s failed, error returned = %s \\n", __LINE__, API, LocationManagerGetError(nRetVal));\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if(MEMORY_CHECK)\
+       {\
+               if(strlen(memLog) > 0) \
+               {  \
+                       memLog[(strlen(memLog))-1] = '\0';\
+                       FPRINTF( "[Line : %d] [location-manager_ITc] %s_MemoryLeakStatus - %s\\n", __LINE__, #api, memLog);\
+               }\
+       }\
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(SPEED_CHECK)\
+       {\
+               if(strlen(speedLog) > 0) \
+               {\
+                       speedLog[strlen(speedLog)-1] = '\0';\
+                       FPRINTF( "[Line : %d] [location-manager_ITc] %s_TimeInMicrosec- %s\\n", __LINE__, #api, speedLog);\
+               }\
+       }\
+
+#define RUN_POLLING_LOOP {\
+       if(g_bCallbackHit == false)\
+       {\
+               g_pLocationManagerMainLoop = g_main_loop_new(NULL, false);\
+               nTimeoutId = g_timeout_add(TIMEOUT_CB, Timeout, g_pLocationManagerMainLoop);\
+               g_main_loop_run(g_pLocationManagerMainLoop);\
+               g_source_remove(nTimeoutId);\
+               g_pLocationManagerMainLoop = NULL;\
+       }\
+}
+
+#define CHECK_UNSUPPORTED_ERROR_CONTINUE(szApi, nErrorCount)\
+       if ( !g_bLocationIsSupported )\
+       {\
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )\
+               {\
+                       FPRINTF("[Line : %d][location-manager_ITc] %s returned %s error for unsupported feature", __LINE__, szApi, LocationManagerGetError(nRet));\
+                       nErrorCount++;\
+               }\
+               else\
+               {\
+                       FPRINTF("[Line : %d][location-manager_ITc] %s is not supported", __LINE__,szApi);\
+               }\
+               continue;\
+       }\
+
+#define CHECK_UNSUPPORTED_ERROR_RETURN(szApi)\
+       if ( !g_bLocationIsSupported )\
+       {\
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )\
+               {\
+                       FPRINTF("[Line : %d][location-manager_ITc] %s returned %s error for unsupported feature", __LINE__, szApi, LocationManagerGetError(nRet));\
+                       return 1;\
+               }\
+               else\
+               {\
+                       FPRINTF("[Line : %d][location-manager_ITc] %s is not supported", __LINE__,szApi);\
+                       return 0;\
+               }\
+       }\
+
+void LocationServiceStateChangeCb(location_service_state_e state, void *user_data);
+void LocationServiceMethodStateChangeCb(location_service_state_e state, void *user_data);
+void LocationGpsStatusSatelliteUpdatedCB(int num_of_active, int num_of_inview,  time_t timestamp, void *user_data);
+char* LocationManagerGetError(int nRet);
+void LocationManagerGetMemAllocation();
+void LocationManagerExecutionDelay(char* pszAPITime);
+void LocationManagerGetTimeOfDay();
+void LocationManagerGetMemStatus(char *pszAPIMemory);
+gboolean Timeout(gpointer data);
+void LocationManagerCreateStart(location_manager_h *pstManager);
+void LocationManagerStopDestroy(location_manager_h *pstManager);
+char* LocationManagerGetEnum(int nRet);
+void LocationManagerCreateStartMethod(location_manager_h *pstManager , location_method_e eLocationMethod);
+void LocationManagerStopDestroyMethod(location_manager_h *pstManager);
+bool Location_Manager_Check_System_Info_Feature_Supported(char* pszKey);
+char* Location_Manager_System_Info_GetError(int nRet);
+/** @} */
+#endif  //_ITS_LOCATION_MANAGER_COMMON_H_
diff --git a/src/itc/location-manager/ITs-location-manager.c b/src/itc/location-manager/ITs-location-manager.c
new file mode 100755 (executable)
index 0000000..3020ccc
--- /dev/null
@@ -0,0 +1,1895 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-location-manager-common.h"
+
+/** @addtogroup itc-location-manager
+*  @ingroup itc
+*  @{
+*/
+
+//& set: LocationManager
+
+//Callbacks
+
+/**
+* @function            LocationPositionUpdatedCB
+* @description         Called periodically with updated position information
+* @parameter           double latitude, double longitude, double altitude, time_t timestamp, void *user_data
+* @return                      NA
+*/
+static void LocationPositionUpdatedCB(double latitude, double longitude, double altitude, time_t timestamp, void *user_data)
+{
+#if DEBUG
+       FPRINTF( "[Line : %d] [location-manager_ITc] LocationPositionUpdatedCB callback called\\n", __LINE__);
+#endif
+       g_bCallbackHit = true;
+       if (g_pLocationManagerMainLoop)
+       {
+               g_main_loop_quit(g_pLocationManagerMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            LocationVelocityUpdatedCB
+* @description         Called periodically with updated velocity information
+* @parameter           double speed, double direction, double climb, time_t timestamp, void *user_data
+* @return                      NA
+*/
+static void LocationVelocityUpdatedCB(double speed, double direction, double climb, time_t timestamp, void *user_data)
+{
+#if DEBUG
+       FPRINTF( "[Line : %d] [location-manager_ITc] LocationVelocityUpdatedCB callback called\\n", __LINE__);
+#endif
+       g_bCallbackHit = true;
+       if (g_pLocationManagerMainLoop)
+       {
+               g_main_loop_quit(g_pLocationManagerMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            LocationZoneChangedCB
+* @description         Called when the user defined zones are entered or left.
+* @parameter           location_boundary_state_e state, double latitude, double longitude, double altitude, time_t timestamp, void *user_data
+* @return                      NA
+*/
+static void LocationZoneChangedCB(location_boundary_state_e state, double latitude, double longitude, double altitude, time_t timestamp, void *user_data)
+{
+#if DEBUG
+       FPRINTF( "[Line : %d] [location-manager_ITc] LocationZoneChangedCB callback called\\n", __LINE__);
+#endif
+       g_bCallbackHit = true;
+       if (g_pLocationManagerMainLoop)
+       {
+               g_main_loop_quit(g_pLocationManagerMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            LocationServiceStateChangeCb
+* @description         Called when state is changed
+* @parameter           location_service_state_e state, void *user_data
+* @return                      NA
+*/
+void LocationServiceStateChangeCb(location_service_state_e state, void *user_data)
+{
+       g_bCallbackReturnValue = false;
+#if DEBUG
+       FPRINTF( "[Line : %d] [location-manager_ITc] LocationServiceStateChangeCb callback called\\n", __LINE__);
+#endif
+       g_bCallbackHit = true;
+       switch(state)
+       {
+               case LOCATIONS_SERVICE_DISABLED:
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Service State: LOCATIONS_SERVICE_DISABLED \\n", __LINE__);
+                       g_bIsServiceEnabled = false;
+                       g_bCallbackReturnValue = true;
+                       break;
+               case LOCATIONS_SERVICE_ENABLED:
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Service State: LOCATIONS_SERVICE_ENABLED \\n", __LINE__);
+                       g_bIsServiceEnabled = true;
+                       g_bCallbackReturnValue = true;
+                       break;
+               default:
+                       g_bIsServiceEnabled = false;
+                       break;
+       }
+       if (g_pLocationManagerMainLoop)
+       {
+               g_main_loop_quit(g_pLocationManagerMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            LocationServiceMethodStateChangeCb
+* @description         Called when state is changed
+* @parameter           location_service_state_e state, void *user_data
+* @return                      NA
+*/
+void LocationServiceMethodStateChangeCb(location_service_state_e state, void *user_data)
+{
+       g_bCallbackReturnValue = false;
+#if DEBUG
+       FPRINTF( "[Line : %d] [location-manager_ITc] LocationServiceMethodStateChangeCb callback called\\n", __LINE__);
+#endif
+       g_bCallbackHit = true;
+       switch(state)
+       {
+               case LOCATIONS_SERVICE_DISABLED:
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Service State: LOCATIONS_SERVICE_DISABLED \\n", __LINE__);
+                       g_bIsServiceEnabled = false;
+                       g_bCallbackReturnValue = true;
+                       break;
+               case LOCATIONS_SERVICE_ENABLED:
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Service State: LOCATIONS_SERVICE_ENABLED \\n", __LINE__);
+                       g_bIsServiceEnabled = true;
+                       g_bCallbackReturnValue = true;
+                       break;
+               default:
+                       g_bIsServiceEnabled = false;
+                       break;
+       }
+       if ((g_pLocationManagerMainLoop != NULL) && (g_bIsSatelliteEnabled == true))
+       {
+               g_main_loop_quit(g_pLocationManagerMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            LocationBoundsCB
+* @description         Called iteratively to notify you of location bounds
+* @parameter           location_bounds_h bounds, void *user_data
+* @return                      NA
+*/
+static bool LocationBoundsCB(location_bounds_h bounds, void *user_data)
+{
+       g_bCallbackReturnValue = false;
+#if DEBUG
+       FPRINTF( "[Line : %d] [location-manager_ITc] LocationBoundsCB callback called\\n", __LINE__);
+#endif
+       g_bCallbackHit = true;
+       if(bounds == NULL)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] LocationBoundsCB callback returned null bounds \\n", __LINE__);
+               g_bCallbackReturnValue = false;
+       }
+       else
+       {
+               g_bCallbackReturnValue = true;
+       }
+       if (g_pLocationManagerMainLoop)
+       {
+               g_main_loop_quit(g_pLocationManagerMainLoop);
+       }
+       return false;
+}
+
+/**
+* @function            LocationSettingChangedCB
+* @description         Called when the user defined zones are entered or exited. 
+* @parameter           location_method_e method, bool enable, void *user_data
+* @return                      NA
+*/
+static void LocationSettingChangedCB(location_method_e method, bool enable, void *user_data)
+{
+#if DEBUG
+       FPRINTF( "[Line : %d] [location-manager_ITc] LocationSettingChangedCB callback called\\n", __LINE__);
+#endif
+       g_bCallbackHit = true;
+       if (g_pLocationManagerMainLoop)
+       {
+               g_main_loop_quit(g_pLocationManagerMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           LocationUpdatedCB
+ * @description                Called at defined interval with updated location information 
+ * @parameter          location_error_e error, double latitude, double longitude, double altitude, time_t timestamp, double speed, double direction, double climb, void *user_data
+ * @return                     NA
+ */
+/* static void LocationUpdatedCB(location_error_e error, double latitude, double longitude, double altitude, time_t timestamp, double speed, double direction, double climb, void *user_data)
+{
+#if DEBUG
+       FPRINTF( "[Line : %d] [location-manager_ITc] LocationUpdatedCB callback called\\n", __LINE__);
+#endif
+       g_bCallbackHit = true;
+       if (g_pLocationManagerMainLoop)
+       {
+               g_main_loop_quit(g_pLocationManagerMainLoop);
+       }
+       return;
+} */
+
+/***********************************************************************************/
+
+/**
+* @function            ITs_location_manager_startup
+* @description         Called before each test, set the service boolean true
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_location_manager_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bLocationIsSupported = (Location_Manager_Check_System_Info_Feature_Supported(LOCATION_FEATURE) && (Location_Manager_Check_System_Info_Feature_Supported(LOCATION_WPS_FEATURE) || Location_Manager_Check_System_Info_Feature_Supported(LOCATION_GPS_FEATURE)));
+       LocationManagerCreateStart(&g_stManager);
+}
+
+/**
+* @function            ITs_location_manager_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_location_manager_cleanup(void)
+{
+       if ( g_bCleanupNotRequired != true )
+       {
+               LocationManagerStopDestroy(&g_stManager);
+       }
+       return;
+}
+
+/** @addtogroup itc-location-manager-testcases
+*  @brief              Integration testcases for module location-manager
+*  @ingroup    itc-location-manager
+*  @{
+*/
+
+//& purpose: Starts/stops the location service.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_start_stop_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Starts/stops the location service.
+* @scenario                            Create location manager\n
+*                                              Start location service\n
+*                                              Stop the location service\n
+*                                              Destroy location manager
+* @apicovered                  location_manager_start, location_manager_stop
+* @passcase                            When location_manager_start and location_manager_stop are successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               It invokes location_position_updated_cb, location_velocity_updated_cb, location_zone_changed_cb, and location_service_state_changed_cb
+*/
+int ITc_location_manager_start_stop_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nTimeoutId = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nStartFailCount = 0, nStopFailCount = 0 , nStartCallbackFailCount = 0 , nStopCallbackFailCount = 0;
+       location_manager_h stManager = {0};
+       
+       LocationManagerStopDestroy(&g_stManager);
+       
+       nRet = location_manager_create(LOCATIONS_METHOD_HYBRID, &stManager);
+       if (nRet != LOCATIONS_ERROR_NONE)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_create failed , error returned = %s \\n", __LINE__, LocationManagerGetError(nRet));
+               return 1;
+       }
+       
+       nRet = location_manager_set_service_state_changed_cb(stManager,LocationServiceStateChangeCb,NULL);
+       if (nRet != LOCATIONS_ERROR_NONE)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_service_state_changed_cb failed , error returned = %s \\n", __LINE__, LocationManagerGetError(nRet));
+               return 1;
+       }
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_start(stManager);
+               
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_start failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nStartFailCount++;
+                       continue;
+               }
+
+               RUN_POLLING_LOOP;
+               if(g_bIsServiceEnabled != true)
+               {
+                       FPRINTF("[Line : %d][location-manager_ITc] location_manager_start failed  g_bIsServiceEnabled is false \\n", __LINE__);
+                       nStartFailCount++;
+                       continue;
+               }
+
+               if(g_bCallbackHit != true || g_bCallbackReturnValue != true)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_start Callback failed on iteration %d \\n", __LINE__ ,nLoopCount);
+                       nStartCallbackFailCount++;
+               }
+               nRet = -1;
+               g_bCallbackHit = false;
+               
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_stop(stManager);
+               
+               if(g_bIsServiceEnabled != false)
+               {
+                       FPRINTF("[Line : %d][location-manager_ITc] location_manager_stop failed  g_bIsServiceEnabled is false \\n", __LINE__);
+                       nStopFailCount++;
+                       continue;
+               }
+       
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_stop failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nStopFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit != true || g_bCallbackReturnValue != true)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_stop Callback failed on iteration %d \\n", __LINE__ ,nLoopCount);
+                       nStopCallbackFailCount++;
+               }
+       }
+       location_manager_destroy(stManager);    
+       g_bCleanupNotRequired = true;
+       
+       if (nStartFailCount > 0 || nStopFailCount > 0 || nStartCallbackFailCount > 0 || nStopCallbackFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_start failed %d times, location_manager_stop failed %d times, Start callback failed %d times, Stop callback failed %d times out of %d times\\n", __LINE__, nStartFailCount, nStopFailCount,nStartCallbackFailCount,nStopCallbackFailCount,MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_start, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(location_manager_stop, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_start_stop, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Api to test location_manager_create and location_manager_destroy
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_create_destroy_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Create location manager and destroy it
+* @scenario                            Create manager\n
+*                                              Destroy manager
+* @apicovered                  location_manager_create, location_manager_destroy       
+* @passcase                            When location_manager_create and location_manager_destroy are successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_manager_create_destroy_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nOpenFailCount = 0;
+       int nCloseFailCount = 0;
+       location_manager_h stManager = {0};
+       location_method_e eTestLocationMethod = -1;
+       location_method_e location_method[] = { LOCATIONS_METHOD_GPS,
+                                                                                       LOCATIONS_METHOD_WPS,
+                                                                                       LOCATIONS_METHOD_HYBRID
+                                                                                 };
+                                       
+       int nEnumSize = sizeof(location_method) / sizeof(location_method[0]);
+       int nEnumCounter = 0;
+#if MEMORY_CHECK
+       stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize , sizeof(char));
+#endif
+#if SPEED_CHECK
+       stSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       stSpeedMemoryLog.pszAPI2SpeedLog =  calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+
+       LocationManagerStopDestroy(&g_stManager);
+       
+       for ( nEnumCounter=0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               eTestLocationMethod = -1;
+               if(location_method[nEnumCounter] == LOCATIONS_METHOD_WPS)
+               {
+                       if(Location_Manager_Check_System_Info_Feature_Supported(LOCATION_FEATURE) && Location_Manager_Check_System_Info_Feature_Supported(LOCATION_WPS_FEATURE))
+                       {
+                               eTestLocationMethod = location_method[nEnumCounter];
+                       }
+               }
+
+               if(location_method[nEnumCounter] == LOCATIONS_METHOD_GPS)
+               {
+                       if(Location_Manager_Check_System_Info_Feature_Supported(LOCATION_FEATURE) && Location_Manager_Check_System_Info_Feature_Supported(LOCATION_GPS_FEATURE))
+                       {
+                               eTestLocationMethod = location_method[nEnumCounter];
+                       }
+               }
+
+               if(location_method[nEnumCounter] == LOCATIONS_METHOD_HYBRID)
+               {
+                       if(Location_Manager_Check_System_Info_Feature_Supported(LOCATION_FEATURE) && ( Location_Manager_Check_System_Info_Feature_Supported(LOCATION_GPS_FEATURE)|| Location_Manager_Check_System_Info_Feature_Supported(LOCATION_WPS_FEATURE)))
+                       {
+                               eTestLocationMethod = location_method[nEnumCounter];
+                       }
+               }
+
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       LocationManagerGetMemAllocation();
+                       LocationManagerGetTimeOfDay();
+                       // Target API
+                       nRet = location_manager_create(location_method[nEnumCounter], &stManager);
+                       LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+
+                       if(eTestLocationMethod == -1)
+                       {
+                               if (nRet != LOCATIONS_ERROR_NOT_SUPPORTED)
+                               {
+                                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_create failed on iteration %d for unsupported Enum %s, error returned = %s \\n", __LINE__, nLoopCount,LocationManagerGetEnum(location_method[nEnumCounter]), LocationManagerGetError(nRet));
+                                       nOpenFailCount++;
+                               }
+
+                               if (nRet == LOCATIONS_ERROR_NONE){
+                                       location_manager_destroy(stManager);
+                               }
+                               continue;
+                       }
+                       else if (nRet != LOCATIONS_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_create failed on iteration %d for Enum %s, error returned = %s \\n", __LINE__, nLoopCount,LocationManagerGetEnum(location_method[nEnumCounter]), LocationManagerGetError(nRet));
+                               nOpenFailCount++;
+                               continue;
+                       }
+                       nRet = -1;
+                       LocationManagerGetTimeOfDay();
+                       // Target API
+                       nRet = location_manager_destroy(stManager);
+                       LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+                       LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if (nRet != LOCATIONS_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_destroy failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                               nCloseFailCount++;
+                       }
+               }
+       }
+       
+       g_bCleanupNotRequired = true;
+       
+       if (nOpenFailCount > 0 || nCloseFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_create failed %d times, location_manager_destroy failed %d times out of %d times\\n", __LINE__, nOpenFailCount, nCloseFailCount, MAX_COUNT*nEnumSize);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_create, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(location_manager_destroy, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_create_destroy, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Registers/Unregisters a callback function to be invoked when the location service state is changed.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_set_unset_service_state_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers/Unregisters a callback function to be invoked when the location service state is changed.
+* @scenario                            Registers a callback function to be invoked when the location service state is changed\n 
+*                                              Check if callback is invoked\n
+*                                              Unregisters the callback function
+* @apicovered                  location_manager_set_service_state_changed_cb, location_manager_unset_service_state_changed_cb  
+* @passcase                            When location_manager_set_service_state_changed_cb and location_manager_unset_service_state_changed_cb are successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               location_service_state_changed_cb() will be invoked
+*/
+int ITc_location_manager_set_unset_service_state_changed_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0, nTimeoutId = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSetFailCount = 0, nUnsetFailCount = 0 , nCallbackFailCount = 0;
+       
+       location_manager_unset_service_state_changed_cb(g_stManager);
+       sleep(SLEEP_TIME);
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_set_service_state_changed_cb(g_stManager,LocationServiceStateChangeCb,NULL);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_service_state_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+               g_bCallbackHit = false;
+               
+               location_manager_start(g_stManager);
+               sleep(SLEEP_TIME);
+               location_manager_stop(g_stManager);
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit != true || g_bCallbackReturnValue != true)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Failed to call callback on iteration %d \\n", __LINE__ ,nLoopCount);
+                       nCallbackFailCount++;
+               }
+               
+               nRet = -1;
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_unset_service_state_changed_cb(g_stManager);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_unset_service_state_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nUnsetFailCount++;
+               }
+       }
+       
+       location_manager_set_service_state_changed_cb(g_stManager,LocationServiceStateChangeCb,NULL);
+       sleep(SLEEP_TIME);
+       
+       if (nSetFailCount > 0 || nUnsetFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_service_state_changed_cb failed %d times, location_manager_unset_service_state_changed_cb failed %d times, Callback failed %d times out of %d times\\n", __LINE__, nSetFailCount, nUnsetFailCount,nCallbackFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_set_service_state_changed_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(location_manager_unset_service_state_changed_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_set_unset_service_state_changed_cb, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets the current application's location accessibility status.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_get_accessibility_state_p
+* @since_tizen                 2.3
+* @type                                auto 
+* @description                 Gets the current application's location accessibility status.
+* @scenario                            Create manager\n
+*                                              Get the current application's location accessibility status\n
+*                                              Destroy manager
+* @apicovered                  location_manager_get_accessibility_state
+* @passcase                            When location_manager_get_accessibility_state is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_manager_get_accessibility_state_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       location_accessibility_state_e  eState;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_get_accessibility_state(&eState);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_accessibility_state failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_accessibility_state failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_get_accessibility_state, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_get_accessibility_state, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets the current accuracy information.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_get_accuracy_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the current accuracy information
+* @scenario                            Create and start location manager\n
+*                                              Get the current accuracy information\n
+*                                              Stop and Destroy location manager 
+* @apicovered                  location_manager_get_accuracy
+* @passcase                            When location_manager_get_accuracy is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        The location service state must be LOCATIONS_SERVICE_ENABLED with location_manager_start
+* @postcondition               None
+*/
+int ITc_location_manager_get_accuracy_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       location_accuracy_level_e level;
+       double dbHorizontal = 0, dbHertical = 0 ;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_get_accuracy(g_stManager,&level,&dbHorizontal,&dbHertical);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_accuracy failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if(level == LOCATIONS_ACCURACY_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Invalid level data on iteration %d  \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_accuracy failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_get_accuracy, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_get_accuracy, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets the distance in meters between two locations.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_get_distance_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the distance in meters between two locations.
+* @scenario                            Create and start location manager\n
+*                                              Get the distance in meters between two locations\n
+*                                              Stop and Destroy location manager
+* @apicovered                  location_manager_get_distance
+* @passcase                            When location_manager_get_distance is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_manager_get_distance_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       double  dbStartLatitude = 20,dbStartLongitude= 26,dbEndLatitude = -20,dbEndLongitude = -26;
+       double  dbDistance = 0;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_get_distance(dbStartLatitude,dbStartLongitude,dbEndLatitude,dbEndLongitude,&dbDistance);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_distance failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if(dbDistance == 0)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Distance returned = %f on iteration %d \\n", __LINE__, dbDistance ,nLoopCount);
+                       nFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_distance failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_get_distance, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_get_distance, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets the last recorded accuracy information.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_get_last_accuracy_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the last recorded accuracy information
+* @scenario                            Create and start location manager\n
+*                                              Get the last recorded accuracy information\n
+*                                              Stop and Destroy location manager
+* @apicovered                  location_manager_get_last_accuracy
+* @passcase                            When location_manager_get_last_accuracy is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        The location manager's handle must be created by location_manager_create()
+* @postcondition               None
+*/
+int ITc_location_manager_get_last_accuracy_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       location_accuracy_level_e level;
+       double dbHorizontal = 0, dbHertical = 0 ;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_get_last_accuracy(g_stManager,&level,&dbHorizontal,&dbHertical);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_last_accuracy failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if(level == LOCATIONS_ACCURACY_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Invalid level data on iteration %d \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_last_accuracy failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_get_last_accuracy, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_get_last_accuracy, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets the last location information.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_get_last_location_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the last location information
+* @scenario                            Create and start location manager\n
+*                                              Get the last location information\n
+*                                              Stop and Destroy location manager
+* @apicovered                  location_manager_get_last_location
+* @passcase                            When location_manager_get_last_location is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        The location manager's handle must be created by location_manager_create()
+* @postcondition               None
+*/
+int ITc_location_manager_get_last_location_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       location_accuracy_level_e level;
+       double dbAltitute,dbLatitude,dbLongitude,dbClimb,dbDirection,dbSpeed,dbHorizontal,dbVertical;
+       time_t timestamp;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_get_last_location(g_stManager,&dbAltitute,&dbLatitude,&dbLongitude,&dbClimb,&dbDirection,&dbSpeed,&level,&dbHorizontal,&dbVertical,&timestamp);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_last_location failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if(level == LOCATIONS_ACCURACY_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Invalid level data on iteration %d \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_last_location failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_get_last_location, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_get_last_location, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Gets the last recorded position information.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_get_last_position_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the last recorded position information
+* @scenario                            Create and start location manager\n
+*                                              Get the last recorded position information\n
+*                                              Stop and Destroy location manager
+* @apicovered                  location_manager_get_last_position
+* @passcase                            When location_manager_get_last_position is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        The location manager's handle must be created by location_manager_create()
+* @postcondition               None
+*/
+int ITc_location_manager_get_last_position_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       double dbAltitute,dbLatitude,dbLongitude;
+       time_t timestamp;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_get_last_position(g_stManager,&dbAltitute,&dbLatitude,&dbLongitude,&timestamp);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_last_position failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if(timestamp == 0)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Invalid timestamp on iteration %d  \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_last_position failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_get_last_position, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_get_last_position, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets the last recorded velocity information.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_get_last_velocity_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the last recorded velocity information
+* @scenario                            Create and start location manager\n
+*                                              Get the last recorded velocity information\n
+*                                              Stop and Destroy location manager
+* @apicovered                  location_manager_get_last_velocity
+* @passcase                            When location_manager_get_last_velocity is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        The location manager's handle must be created by location_manager_create()
+* @postcondition               None
+*/
+int ITc_location_manager_get_last_velocity_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       double dbClimb,dbDirection,dbSpeed;
+       time_t timestamp;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_get_last_velocity(g_stManager,&dbClimb,&dbDirection,&dbSpeed,&timestamp);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_last_velocity failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if(timestamp == 0)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Invalid timestamp on iteration %d  \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_last_velocity failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_get_last_velocity, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_get_last_velocity, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Gets the current position information.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_get_location_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the current position information
+* @scenario                            Create and start location manager\n
+*                                              Get the current position information\n
+*                                              Stop and Destroy location manager
+* @apicovered                  location_manager_get_location
+* @passcase                            When location_manager_get_location is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        The location service state must be LOCATIONS_SERVICE_ENABLED with location_manager_start
+* @postcondition               None
+*/
+int ITc_location_manager_get_location_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       location_accuracy_level_e level ;
+       double dbAltitute,dbLatitude,dbLongitude,dbClimb,dbDirection,dbSpeed,dbHorizontal,dbVertical;
+       time_t timestamp;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_get_location(g_stManager,&dbAltitute,&dbLatitude,&dbLongitude,&dbClimb,&dbDirection,&dbSpeed,&level,&dbHorizontal,&dbVertical,&timestamp);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_location failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if(level == LOCATIONS_ACCURACY_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Invalid level data on iteration %d \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_location failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_get_location, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_get_location, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Gets/checks the given location manager's method.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_get_is_supported_method_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets/checks the given location manager's method.
+* @scenario                            Create and start location manager
+*                                              Get the given location manager's method
+*                                              Checks whether the given location method is available or not
+*                                              Stop and Destroy location manager
+* @apicovered                  location_manager_get_method     , location_manager_is_supported_method                  
+* @passcase                            When location_manager_get_method , location_manager_is_supported_method are successful.
+* @failcase                            If target api fails or any precondition api fails.
+* @precondition                        The location manager's handle must be created by location_manager_create()
+* @postcondition               None
+*/
+int ITc_location_manager_get_is_supported_method_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nGetFailCount = 0 , nIsSupportedFailCount = 0;
+       location_method_e method;
+       bool isSupported = false;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_get_method(g_stManager,&method);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_method failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               LocationManagerGetTimeOfDay();
+               // Target API
+               isSupported = location_manager_is_supported_method(method);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (isSupported != true)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_is_supported_method failed on iteration %d, returned isSupported = %d \\n", __LINE__, nLoopCount, isSupported);
+                       nIsSupportedFailCount++;
+               }
+       }
+       
+       if (nGetFailCount > 0 || nIsSupportedFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_method failed %d times , location_manager_is_supported_method failed %d times  out of %d times\\n", __LINE__, nGetFailCount,nIsSupportedFailCount,MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_get_method, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(location_manager_is_supported_method, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_get_is_supported_method, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Gets the current position information.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_get_position_p
+* @since_tizen                 2.3
+* @type                                auto 
+* @description                 Gets the current position information
+* @scenario                            Create and start location manager\n
+*                                              Get the current position information\n
+*                                              Stop and Destroy location manager 
+* @apicovered                  location_manager_get_position
+* @passcase                            When location_manager_get_position is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        The location service state must be LOCATIONS_SERVICE_ENABLED with location_manager_start
+* @postcondition               None
+*/
+int ITc_location_manager_get_position_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       double dbAltitute,dbLatitude,dbLongitude;
+       time_t timestamp;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_get_position(g_stManager,&dbAltitute,&dbLatitude,&dbLongitude,&timestamp);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_position failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if(timestamp < 0)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Invalid timestamp on iteration %d  \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_position failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_get_position, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_get_position, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Gets the current position information.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_get_velocity_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the current position information
+* @scenario                            Create and start location manager\n
+*                                              Get the current position information\n
+*                                              Stop and Destroy location manager
+* @apicovered                  location_manager_get_velocity
+* @passcase                            When location_manager_get_velocity is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        The location service state must be LOCATIONS_SERVICE_ENABLED with location_manager_start
+* @postcondition               None
+*/
+int ITc_location_manager_get_velocity_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       double dbClimb,dbDirection,dbSpeed;
+       time_t timestamp;
+       g_bCallbackHit = false;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_get_velocity(g_stManager,&dbClimb,&dbDirection,&dbSpeed,&timestamp);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_velocity failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if(timestamp < 0)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Invalid timestamp on iteration %d  \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_get_velocity failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_get_velocity, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_get_velocity, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Adds/Removes bounds for a given location manager.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_add_remove_boundary_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Adds/Removes bounds for a given location manager.
+* @scenario                            Adds bounds for a given location manager\n
+*                                              Deletes bounds for a given location manager.
+* @apicovered                  location_manager_add_boundary, location_manager_remove_boundary 
+* @passcase                            When location_manager_add_boundary and location_manager_remove_boundary are successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               It invokes location_manager_set_zone_changed_cb() when a boundary is entered or left, if you set a callback with location_manager_set_zone_changed_cb
+* @remarks                             Callback is not checked, as callback checking is manual
+*/
+int ITc_location_manager_add_remove_boundary_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nAddFailCount = 0;
+       int nRemoveFailCount = 0;
+       
+       //Add the circle bounds
+       location_bounds_h bounds_circle;
+       location_coords_s center;
+       center.latitude = 37.258;
+       center.longitude = 127.056;
+       double radius = 30;
+       nRet = location_bounds_create_circle(center, radius, &bounds_circle);
+       if (nRet != LOCATIONS_ERROR_NONE)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_circle failed , error returned = %s \\n", __LINE__,LocationManagerGetError(nRet));
+               return 1;
+       }
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               nRet =-1;
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_add_boundary(g_stManager, bounds_circle);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_add_boundary failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nAddFailCount++;
+                       continue;
+               }
+               nRet = -1;
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_remove_boundary(g_stManager, bounds_circle);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_remove_boundary failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nRemoveFailCount++;
+               }
+       }
+       
+       if (nAddFailCount > 0 || nRemoveFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_add_boundary failed %d times, location_manager_remove_boundary failed %d times out of %d times\\n", __LINE__, nAddFailCount, nRemoveFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_add_boundary, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(location_manager_remove_boundary, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_add_remove_boundary, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Registers/Unregisters a callback function to be invoked periodically with updated position information.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_set_unset_position_updated_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers/Unregisters a callback function to be invoked periodically with updated position information
+* @scenario                            Registers a callback function to be invoked periodically with updated position information\n
+*                                              Unregisters the callback function
+* @apicovered                  location_manager_set_position_updated_cb, location_manager_unset_position_updated_cb    
+* @passcase                            When location_manager_set_position_updated_cb and location_manager_unset_position_updated_cb are successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               location_position_updated_cb() will be invoked
+*/
+int ITc_location_manager_set_unset_position_updated_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSetFailCount = 0, nUnsetFailCount = 0;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_set_position_updated_cb(g_stManager,LocationPositionUpdatedCB,1,NULL);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_position_updated_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               nRet = -1;
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_unset_position_updated_cb(g_stManager);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_unset_position_updated_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nUnsetFailCount++;
+               }
+       }
+       
+       if (nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_position_updated_cb failed %d times, location_manager_unset_position_updated_cb failed %d times out of %d times\\n", __LINE__, nSetFailCount, nUnsetFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_set_position_updated_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(location_manager_unset_position_updated_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_set_unset_position_updated_cb, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Registers/Unregisters a callback function to be invoked periodically with updated velocity information.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_set_unset_velocity_updated_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers/Unregisters a callback function to be invoked periodically with updated velocity information
+* @scenario                            Registers a callback function to be invoked periodically with updated velocity information\n
+*                                              Unregisters the callback function
+* @apicovered                  location_manager_set_velocity_updated_cb, location_manager_unset_velocity_updated_cb    
+* @passcase                            When location_manager_set_velocity_updated_cb and location_manager_unset_velocity_updated_cb are successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               location_velocity_updated_cb() will be invoked
+*/
+int ITc_location_manager_set_unset_velocity_updated_cb(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSetFailCount = 0, nUnsetFailCount = 0;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_set_velocity_updated_cb(g_stManager,LocationVelocityUpdatedCB,1,NULL);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_velocity_updated_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               nRet = -1;
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_unset_velocity_updated_cb(g_stManager);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_unset_velocity_updated_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nUnsetFailCount++;
+               }
+       }
+       
+       if (nSetFailCount > 0 || nUnsetFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_velocity_updated_cb failed %d times, location_manager_unset_velocity_updated_cb failed %d times out of %d times\\n", __LINE__, nSetFailCount, nUnsetFailCount,MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_set_velocity_updated_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(location_manager_unset_velocity_updated_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_set_unset_velocity_updated_cb, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Registers/Unregisters a callback function to be invoked when the previously set boundary area is entered or left.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_set_unset_zone_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers/Unregisters a callback function to be invoked when the previously set boundary area is entered or left.
+* @scenario                            Registers a callback function to be invoked when the previously set boundary area is entered or left\n
+*                                              Check if callback is invoked\n
+*                                              Unregisters the callback function
+* @apicovered                  location_manager_set_zone_changed_cb, location_manager_unset_zone_changed_cb    
+* @passcase                            When location_manager_set_zone_changed_cb and location_manager_unset_zone_changed_cb are successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               location_zone_changed_cb() will be invoked
+* @remarks                             Callback is not checked, as callback checking is manual
+*/
+int ITc_location_manager_set_unset_zone_changed_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSetFailCount = 0, nUnsetFailCount = 0;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_set_zone_changed_cb(g_stManager,LocationZoneChangedCB,NULL);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_zone_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               nRet = -1;
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_unset_zone_changed_cb(g_stManager);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_unset_zone_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nUnsetFailCount++;
+               }
+       }
+       
+       if (nSetFailCount > 0 || nUnsetFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_zone_changed_cb failed %d times, location_manager_unset_zone_changed_cb failed %d times out of %d times\\n", __LINE__, nSetFailCount, nUnsetFailCount,MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_set_zone_changed_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(location_manager_unset_zone_changed_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_set_unset_zone_changed_cb, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Retrieves all location bounds by invoking a specific callback for each location bounds.
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_foreach_boundary_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Retrieves all location bounds by invoking a specific callback for each location bounds
+* @scenario                            Add boundary\n
+*                                              Retrieve all location bounds by invoking a specific callback for each location bounds\n
+*                                              Remove boundary
+* @apicovered                  location_manager_foreach_boundary
+* @passcase                            When location_manager_foreach_boundary is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               location_bounds_cb() will be invoked
+*/
+int ITc_location_manager_foreach_boundary_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0, nCallbackFailCount = 0, nTimeoutId = 0;
+       
+       //Add the circle bounds
+       location_bounds_h bounds_circle;
+       location_coords_s center;
+       center.latitude = 37.258;
+       center.longitude = 127.056;
+       double radius = 30;
+       nRet = location_bounds_create_circle(center, radius, &bounds_circle);
+       if (nRet != LOCATIONS_ERROR_NONE)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_bounds_create_circle failed , error returned = %s \\n", __LINE__,LocationManagerGetError(nRet));
+               return 1;
+       }
+       nRet = location_manager_add_boundary(g_stManager, bounds_circle);
+       if (nRet != LOCATIONS_ERROR_NONE)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_add_boundary failed, error returned = %s \\n", __LINE__, LocationManagerGetError(nRet));
+               return 1;
+       }
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_foreach_boundary(g_stManager,LocationBoundsCB, NULL);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_foreach_boundary failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit != true || g_bCallbackReturnValue != true)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Callback failed on iteration %d \\n", __LINE__ ,nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_foreach_boundary failed %d times, Callback failed %d times out of %d times\\n", __LINE__, nFailCount,nCallbackFailCount,MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_foreach_boundary, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_foreach_boundary, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Registers/Unregisters a callback function to be invoked when the location setting is changed. 
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_set_unset_setting_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto 
+* @description                 Registers/Unregisters a callback function to be invoked when the location setting is changed. 
+* @scenario                            Registers a callback function to be invoked when the location setting is changed\n
+*                                              Unregisters the callback function
+* @apicovered                  location_manager_set_setting_changed_cb, location_manager_unset_setting_changed_cb      
+* @passcase                            When location_manager_set_setting_changed_cb and location_manager_unset_setting_changed_cb are successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               location_setting_changed_cb() will be invoked
+*/
+int ITc_location_manager_set_unset_setting_changed_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nSetFailCount = 0, nUnsetFailCount = 0;
+       location_method_e eTestLocationMethod = -1;
+       location_method_e location_method[] = { LOCATIONS_METHOD_HYBRID,
+                                       LOCATIONS_METHOD_GPS,LOCATIONS_METHOD_WPS};
+                                       
+       int nEnumSize = sizeof(location_method) / sizeof(location_method[0]);
+       int nEnumCounter = 0;
+#if MEMORY_CHECK
+       stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize , sizeof(char));
+#endif
+#if SPEED_CHECK
+       stSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       stSpeedMemoryLog.pszAPI2SpeedLog =  calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for ( nEnumCounter=0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               eTestLocationMethod = -1;
+
+               if(location_method[nEnumCounter] == LOCATIONS_METHOD_WPS)
+               {
+                       if(Location_Manager_Check_System_Info_Feature_Supported(LOCATION_FEATURE) && Location_Manager_Check_System_Info_Feature_Supported(LOCATION_WPS_FEATURE))
+                       {
+                               eTestLocationMethod = location_method[nEnumCounter];
+                       }
+               }
+
+               if(location_method[nEnumCounter] == LOCATIONS_METHOD_GPS)
+               {
+                       if(Location_Manager_Check_System_Info_Feature_Supported(LOCATION_FEATURE) && Location_Manager_Check_System_Info_Feature_Supported(LOCATION_GPS_FEATURE))
+                       {
+                               eTestLocationMethod = location_method[nEnumCounter];
+                       }
+               }
+
+               if(location_method[nEnumCounter] == LOCATIONS_METHOD_HYBRID)
+               {
+                       if(Location_Manager_Check_System_Info_Feature_Supported(LOCATION_FEATURE) && ( Location_Manager_Check_System_Info_Feature_Supported(LOCATION_GPS_FEATURE)|| Location_Manager_Check_System_Info_Feature_Supported(LOCATION_WPS_FEATURE)))
+                       {
+                               eTestLocationMethod = location_method[nEnumCounter];
+                       }
+               }
+
+               if(eTestLocationMethod != -1)
+               {
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               g_bCallbackHit = false;
+                               LocationManagerGetMemAllocation();
+                               LocationManagerGetTimeOfDay();
+                               // Target API
+                               nRet = location_manager_set_setting_changed_cb(location_method[nEnumCounter],LocationSettingChangedCB,NULL);
+                               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                               if (nRet != LOCATIONS_ERROR_NONE)
+                               {
+                                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_setting_changed_cb failed on iteration %d for Enum %s, error returned = %s \\n", __LINE__, nLoopCount,LocationManagerGetEnum(location_method[nEnumCounter]),LocationManagerGetError(nRet));
+                                       nSetFailCount++;
+                                       continue;
+                               }
+
+                               nRet = -1;
+                               LocationManagerGetTimeOfDay();
+                               // Target API
+                               nRet = location_manager_unset_setting_changed_cb(location_method[nEnumCounter]);
+                               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+                               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                               if (nRet != LOCATIONS_ERROR_NONE)
+                               {
+                                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_unset_setting_changed_cb failed on iteration %d for Enum %s, error returned = %s \\n", __LINE__, nLoopCount,LocationManagerGetEnum(location_method[nEnumCounter]),LocationManagerGetError(nRet));
+                                       nUnsetFailCount++;
+                               }
+                       }
+               }
+
+
+       }
+       if (nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_set_setting_changed_cb failed %d times, location_manager_unset_setting_changed_cb failed %d times out of %d times\\n", __LINE__, nSetFailCount, nUnsetFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_set_setting_changed_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(location_manager_unset_setting_changed_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_set_unset_setting_changed_cb, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Request to update current location once. 
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_request_single_location_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Request to update current location once. 
+* @scenario                            Create location manager\n
+*                                              Request to update current location once\n
+*                                              check callback\n
+*                                              Destroy location manager
+* @apicovered                  location_manager_request_single_location
+* @passcase                            When location_manager_request_single_location is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               It invokes location_updated_cb()
+*/
+/* int ITc_location_manager_request_single_location_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nCallbackFailCount = 0 , nTimeoutId = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       location_manager_h stManager = {0};
+       g_bCallbackHit = false;
+       int nTimeout = 1;
+       
+       nRet = location_manager_create(LOCATIONS_METHOD_HYBRID, &stManager);
+       if (nRet != LOCATIONS_ERROR_NONE)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_create failed , error returned = %s \\n", __LINE__,LocationManagerGetError(nRet));
+               return 1;
+       }
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_request_single_location(stManager,nTimeout,LocationUpdatedCB,NULL);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_request_single_location failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if(g_bCallbackHit != true)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] Failed to call callback on iteration %d \\n", __LINE__ ,nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+       location_manager_destroy(stManager);
+       
+       if (nFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_request_single_location failed %d times, Callback failed %d times out of %d times\\n", __LINE__, nFailCount,nCallbackFailCount,MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_request_single_location, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_request_single_location, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+} */
+
+//& purpose: Checks whether the given location method is enabled or not on setting.  
+//& type: auto
+/**
+* @testcase                    ITc_location_manager_is_enabled_method_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Checks whether the given location method is enabled or not on setting. 
+* @scenario                            Create manager\n
+*                                              Check whether the given location method is enabled or not\n
+*                                              Destroy manager
+* @apicovered                  location_manager_is_enabled_method
+* @passcase                            When location_manager_is_enabled_method is successful
+* @failcase                            If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_location_manager_is_enabled_method_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog = {0};
+       int nFailCount = 0;
+       bool bEnable = false;
+       
+       LOCATIONMANAGER_INITIALIZE_LOGS_SINGLE;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               LocationManagerGetMemAllocation();
+               LocationManagerGetTimeOfDay();
+               // Target API
+               nRet = location_manager_is_enabled_method(LOCATIONS_METHOD_HYBRID,&bEnable);
+               LocationManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               LocationManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != LOCATIONS_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_is_enabled_method failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, LocationManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if(bEnable == false)
+               {
+                       FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_is_enabled_method returned enable = %d on iteration %d \\n", __LINE__, bEnable,nLoopCount);
+                       nFailCount++;
+               }
+       }
+       
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [location-manager_ITc] location_manager_is_enabled_method failed %d times out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+               PRINT_SPEED_LOG(location_manager_is_enabled_method, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_MEMORY_LOG(location_manager_is_enabled_method, stSpeedMemoryLog.pszAPI1MemLog);
+               LOCATIONMANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/location-manager/tct-location-manager-native.c b/src/itc/location-manager/tct-location-manager-native.c
new file mode 100755 (executable)
index 0000000..2b9e6cc
--- /dev/null
@@ -0,0 +1,138 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-location-manager-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/location-manager/tct-location-manager-native.h b/src/itc/location-manager/tct-location-manager-native.h
new file mode 100755 (executable)
index 0000000..5ac41ef
--- /dev/null
@@ -0,0 +1,103 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_LOCATION_MANAGER_NATIVE_H__
+#define __TCT_LOCATION_MANAGER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_location_bounds_startup(void);
+extern void ITs_location_bounds_cleanup(void);
+extern void ITs_location_gps_status_startup(void);
+extern void ITs_location_gps_status_cleanup(void);
+extern void ITs_location_manager_startup(void);
+extern void ITs_location_manager_cleanup(void);
+
+extern int ITc_location_bounds_create_destory_rect_p(void);
+extern int ITc_location_bounds_get_rect_coords_p(void);
+extern int ITc_location_bounds_create_destory_circle_p(void);
+extern int ITc_location_bounds_get_circle_coords_p(void);
+extern int ITc_location_bounds_create_destory_polygon_p(void);
+extern int ITc_location_bounds_set_unset_state_changed_cb_p(void);
+extern int ITc_location_bounds_foreach_polygon_coords_p(void);
+extern int ITc_location_bounds_contains_coordinates_p(void);
+extern int ITc_location_bounds_get_type_p(void);
+extern int ITc_gps_status_get_satellite_p(void);
+extern int ITc_gps_status_get_last_satellite_p(void);
+extern int ITc_gps_status_foreach_last_satellites_in_view_p(void);
+extern int ITc_gps_status_foreach_satellites_in_view_p(void);
+extern int ITc_gps_status_set_unset_satellite_updated_cb_p(void);
+extern int ITc_location_manager_start_stop_p(void);
+extern int ITc_location_manager_create_destroy_p(void);
+extern int ITc_location_manager_set_unset_service_state_changed_cb_p(void);
+extern int ITc_location_manager_get_accessibility_state_p(void);
+extern int ITc_location_manager_get_accuracy_p(void);
+extern int ITc_location_manager_get_distance_p(void);
+extern int ITc_location_manager_get_last_accuracy_p(void);
+extern int ITc_location_manager_get_last_location_p(void);
+extern int ITc_location_manager_get_last_position_p(void);
+extern int ITc_location_manager_get_last_velocity_p(void);
+extern int ITc_location_manager_get_location_p(void);
+extern int ITc_location_manager_get_is_supported_method_p(void);
+extern int ITc_location_manager_get_position_p(void);
+extern int ITc_location_manager_get_velocity_p(void);
+extern int ITc_location_manager_add_remove_boundary_p(void);
+extern int ITc_location_manager_set_unset_position_updated_cb_p(void);
+extern int ITc_location_manager_set_unset_velocity_updated_cb(void);
+extern int ITc_location_manager_set_unset_zone_changed_cb_p(void);
+extern int ITc_location_manager_foreach_boundary_p(void);
+extern int ITc_location_manager_set_unset_setting_changed_cb_p(void);
+extern int ITc_location_manager_is_enabled_method_p(void);
+
+testcase tc_array[] = {
+    {"ITc_location_bounds_create_destory_rect_p", ITc_location_bounds_create_destory_rect_p, ITs_location_bounds_startup, ITs_location_bounds_cleanup},
+    {"ITc_location_bounds_get_rect_coords_p", ITc_location_bounds_get_rect_coords_p, ITs_location_bounds_startup, ITs_location_bounds_cleanup},
+    {"ITc_location_bounds_create_destory_circle_p", ITc_location_bounds_create_destory_circle_p, ITs_location_bounds_startup, ITs_location_bounds_cleanup},
+    {"ITc_location_bounds_get_circle_coords_p", ITc_location_bounds_get_circle_coords_p, ITs_location_bounds_startup, ITs_location_bounds_cleanup},
+    {"ITc_location_bounds_create_destory_polygon_p", ITc_location_bounds_create_destory_polygon_p, ITs_location_bounds_startup, ITs_location_bounds_cleanup},
+    {"ITc_location_bounds_set_unset_state_changed_cb_p", ITc_location_bounds_set_unset_state_changed_cb_p, ITs_location_bounds_startup, ITs_location_bounds_cleanup},
+    {"ITc_location_bounds_foreach_polygon_coords_p", ITc_location_bounds_foreach_polygon_coords_p, ITs_location_bounds_startup, ITs_location_bounds_cleanup},
+    {"ITc_location_bounds_contains_coordinates_p", ITc_location_bounds_contains_coordinates_p, ITs_location_bounds_startup, ITs_location_bounds_cleanup},
+    {"ITc_location_bounds_get_type_p", ITc_location_bounds_get_type_p, ITs_location_bounds_startup, ITs_location_bounds_cleanup},
+    {"ITc_gps_status_get_satellite_p", ITc_gps_status_get_satellite_p, ITs_location_gps_status_startup, ITs_location_gps_status_cleanup},
+    {"ITc_gps_status_get_last_satellite_p", ITc_gps_status_get_last_satellite_p, ITs_location_gps_status_startup, ITs_location_gps_status_cleanup},
+    {"ITc_gps_status_foreach_last_satellites_in_view_p", ITc_gps_status_foreach_last_satellites_in_view_p, ITs_location_gps_status_startup, ITs_location_gps_status_cleanup},
+    {"ITc_gps_status_foreach_satellites_in_view_p", ITc_gps_status_foreach_satellites_in_view_p, ITs_location_gps_status_startup, ITs_location_gps_status_cleanup},
+    {"ITc_gps_status_set_unset_satellite_updated_cb_p", ITc_gps_status_set_unset_satellite_updated_cb_p, ITs_location_gps_status_startup, ITs_location_gps_status_cleanup},
+    {"ITc_location_manager_start_stop_p", ITc_location_manager_start_stop_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_create_destroy_p", ITc_location_manager_create_destroy_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_set_unset_service_state_changed_cb_p", ITc_location_manager_set_unset_service_state_changed_cb_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_get_accessibility_state_p", ITc_location_manager_get_accessibility_state_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_get_accuracy_p", ITc_location_manager_get_accuracy_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_get_distance_p", ITc_location_manager_get_distance_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_get_last_accuracy_p", ITc_location_manager_get_last_accuracy_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_get_last_location_p", ITc_location_manager_get_last_location_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_get_last_position_p", ITc_location_manager_get_last_position_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_get_last_velocity_p", ITc_location_manager_get_last_velocity_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_get_location_p", ITc_location_manager_get_location_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_get_is_supported_method_p", ITc_location_manager_get_is_supported_method_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_get_position_p", ITc_location_manager_get_position_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_get_velocity_p", ITc_location_manager_get_velocity_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_add_remove_boundary_p", ITc_location_manager_add_remove_boundary_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_set_unset_position_updated_cb_p", ITc_location_manager_set_unset_position_updated_cb_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_set_unset_velocity_updated_cb", ITc_location_manager_set_unset_velocity_updated_cb, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_set_unset_zone_changed_cb_p", ITc_location_manager_set_unset_zone_changed_cb_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_foreach_boundary_p", ITc_location_manager_foreach_boundary_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_set_unset_setting_changed_cb_p", ITc_location_manager_set_unset_setting_changed_cb_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {"ITc_location_manager_is_enabled_method_p", ITc_location_manager_is_enabled_method_p, ITs_location_manager_startup, ITs_location_manager_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_LOCATION_MANAGER_NATIVE_H__
diff --git a/src/itc/media-content/20140709-115007.mp4 b/src/itc/media-content/20140709-115007.mp4
new file mode 100755 (executable)
index 0000000..9cc7b55
Binary files /dev/null and b/src/itc/media-content/20140709-115007.mp4 differ
diff --git a/src/itc/media-content/CMakeLists.txt b/src/itc/media-content/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..fc7df28
--- /dev/null
@@ -0,0 +1,41 @@
+SET(PKG_NAME "media-content")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-content-media-content")
+SET(TC_SOURCES
+       ITs-media-content-common.c
+       ITs-media-content.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       dlog
+       libmedia-service
+       media-thumbnail
+       libmedia-utils
+       capi-base-common
+       icu-i18n
+       vconf
+       bundle
+       capi-appfw-application
+       storage
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/media-content/ITs-media-content-common.c b/src/itc/media-content/ITs-media-content-common.c
new file mode 100755 (executable)
index 0000000..f3c4151
--- /dev/null
@@ -0,0 +1,239 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, 
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-media-content-common.h"
+
+/** @addtogroup itc-media-content
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stMediaStartTime;
+extern struct mallinfo g_stMediaMemInfo;
+
+/**
+ * @function           MediaGetDataPath
+ * @description                Returnes the application data path
+ * @parameter          pAppDataPath: application data path
+ * @return                     true if succeed else false
+ */
+bool MediaGetDataPath(char* pAppDataPath)
+{
+       if (NULL == pAppDataPath)
+       {
+               FPRINTF("[Line: %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if (NULL == pPath)
+       {
+               FPRINTF("[Line: %d][%s] Unable to get application data path; app_get_data_path returned null value \\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF("[Line: %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
+
+       return true;
+}
+
+
+/**
+ * @function           MediaAppendToMediaDataPath
+ * @description                Appends the input string to media data path
+ * @parameter          pInputPath: path to append to data path; pFinalPath: final resultant path
+ * @return                     true if succeed else false
+ */
+bool MediaAppendToMediaDataPath( char* pMediaDataPath, char* pFinalPath)
+{
+       if ( (NULL == pMediaDataPath) )
+       {
+               FPRINTF("[Line: %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, g_strStorageInternalLocation);
+       strcat(pFinalPath, pMediaDataPath);
+       
+       FPRINTF("[Line: %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
+
+       return true;
+}
+
+/**
+ * @function           MediaAppendToAppDataPath
+ * @description                Appends the input string to application data path
+ * @parameter          pInputPath: path to append to data path; pFinalPath: final resultant path
+ * @return                     true if succeed else false
+ */
+bool MediaAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if ( (NULL == pInputPath) || (NULL == pFinalPath) )
+       {
+               FPRINTF("[Line: %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0, };
+       if (false == MediaGetDataPath(pAppDataPath))
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+       
+       FPRINTF("[Line: %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
+
+       return true;
+}
+
+/**
+ * @function           MediaGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* MediaGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {               
+               case MEDIA_CONTENT_ERROR_DB_FAILED : szErrorVal = "MEDIA_CONTENT_ERROR_DB_FAILED" ; break;
+               case MEDIA_CONTENT_ERROR_INVALID_PARAMETER : szErrorVal = "MEDIA_CONTENT_ERROR_INVALID_PARAMETER" ; break;
+               case MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : szErrorVal = "MEDIA_CONTENT_ERROR_OUT_OF_MEMORY" ; break;
+               case MEDIA_CONTENT_ERROR_INVALID_OPERATION : szErrorVal = "MEDIA_CONTENT_ERROR_INVALID_OPERATION" ; break;
+               case MEDIA_CONTENT_ERROR_DB_BUSY : szErrorVal = "MEDIA_CONTENT_ERROR_DB_BUSY" ; break;
+               case MEDIA_CONTENT_ERROR_NETWORK : szErrorVal = "MEDIA_CONTENT_ERROR_NETWORK" ; break;
+               default : szErrorVal = "MEDIA_CONTENT_ERROR_UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function                    MediaGetMemStatus
+* @description         Returns the Memory Allocation state
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void MediaGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if ( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char * pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if (stMemInfo.uordblks > g_stMediaMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stMediaMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stMediaMemInfo.uordblks - stMemInfo.uordblks);
+               }               
+               sprintf(pszLog, "%d, ", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    MediaGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void MediaGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stMediaMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void MediaExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       if ( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime=calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);
+               ulldifference = ((stEnd.tv_sec -g_stMediaStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stMediaStartTime.tv_usec;
+                       
+               sprintf (pszLogTime, "%llu, ", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }               
+#endif
+}
+/**
+ * @function           MediaContentTimeout
+ * @description                Called if some callback is not invoked for a particular timeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */
+gboolean MediaContentTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               pMainLoop = NULL;
+       }
+       FPRINTF("[Line: %d][%s] Callback Timeout\\n", __LINE__, API_NAMESPACE);
+       return false;
+}
+/**
+ * @function           SystemGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stMediaStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */
+void MediaGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stMediaStartTime, NULL);
+#endif
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/media-content/ITs-media-content-common.h b/src/itc/media-content/ITs-media-content-common.h
new file mode 100755 (executable)
index 0000000..9da4bcc
--- /dev/null
@@ -0,0 +1,160 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, 
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_MEDIA_CONTENT_COMMON_H_
+#define _ITS_MEDIA_CONTENT_COMMON_H_
+
+#include "assert.h"
+#include "media_content.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <string.h>
+#include <glib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <app.h>
+#include <storage.h>
+
+/** @addtogroup itc-media-content
+*  @ingroup itc
+*  @{
+*/
+
+#define API_NAMESPACE                          "Media_Content_ITC"
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define BUFFER                                         256
+#define ADD_PORT                                       2
+#define GET_PORT                                       9
+#define MICROSECONDS_PER_SECOND                1000000
+#define MEDIA_BURST_ID                         "BURST_ID"
+#define TIMEOUT_CB                                     30000
+#define ERR_LOG                                        "/tmp/tclog"
+#define PATH_LEN                                       1024
+#define USER_DATA                                      NULL
+#define GMAINTIMEOUT                           30000           //30 seconds
+#define HIDDENFOLDERPATH                       "/NewName/.hide/testing"
+#define TESTFOLDERPATH                         "/test"
+#define DEFAULTFOLDERPATH                      "/Videos"
+#define DUMMY                                          "/Dummy"
+#define TESTITEMPATH                           "/test1.jpg"
+#define INSERTPATH                                     "/test.jpg"
+#define INSERTPATHALBUM                                "/test3.jpg"
+#define INSERTPATHINFO                         "/test2.jpg"
+#define INSERTPATHVIDEO                                "/Camera/20140709-115007.mp4"
+#define INSERTPATHAUDIO                                "/TestRingtone.mp3"
+
+extern char g_strStorageInternalLocation[PATH_LEN];
+FILE *g_fpLog;
+GMainLoop *g_loop;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG, "a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("Starting test : %s\\n", __FUNCTION__);\
+       if ( !g_bMediaCreation )\
+       {\
+               FPRINTF("[Line: %d][%s] Precondition of media-content create failed so leaving test\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+       if ( g_strStorageInternalLocation == NULL )\
+       {\
+               FPRINTF("[Line: %d][%s] Unable to get the media data path so leaving test\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == MEDIA_CONTENT_ERROR_NONE)\
+       {\
+               FPRINTF("[Line: %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line: %d][%s] %s failed, error returned = %s \\n", __LINE__, API_NAMESPACE, API, MediaGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_LOOP(nRetVal, API, nFailCount) {\
+       if (nRetVal == MEDIA_CONTENT_ERROR_NONE)\
+       {\
+               FPRINTF("[Line: %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line: %d][%s] %s failed for loop count = %d, error returned = %s \\n", __LINE__, API_NAMESPACE, API, nLoopCount, MediaGetError(nRetVal));\
+               ++nFailCount;\
+               continue;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if (strlen(memLog) > 0)\
+       {\
+               memLog[strlen(memLog)-1] = '\0';\
+               FPRINTF("[Line: %d][%s] %s_MemoryLeakStatus : %s\\n", __LINE__, API_NAMESPACE, #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if (strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line: %d][%s] %s_TimeInMicrosec : %s\\n", __LINE__, API_NAMESPACE, #api, speedLog);\
+       }
+       
+#define RUN_POLLING_LOOP {\
+       if (g_bMediaContentCBFlag == false)\
+       {\
+               g_loop = g_main_loop_new(NULL, false);\
+               nTimeoutId = g_timeout_add(TIMEOUT_CB, MediaContentTimeout, g_loop);\
+               g_main_loop_run(g_loop);\
+               g_source_remove(nTimeoutId);\
+               g_loop = NULL;\
+       }\
+}
+
+#define RUN_POLLING_LOOP_PATH {\
+       g_pMainLoop = g_main_loop_new(NULL, false);\
+       nDirectTimeoutId = g_timeout_add(GMAINTIMEOUT, CallbackTimeout, g_pMainLoop);\
+       g_main_loop_run(g_pMainLoop);\
+       g_source_remove(nDirectTimeoutId);\
+       g_pMainLoop = NULL;\
+}
+       
+char *MediaGetError(int nRet);
+void MediaGetMemAllocation();
+void MediaExecutionDelay(char* pszAPITime);
+void MediaGetTimeOfDay();
+void MediaGetMemStatus(char *pszAPIMemory);
+gboolean MediaContentTimeout(gpointer data);
+
+bool MediaGetDataPath(char* pPath);
+bool MediaAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+bool MediaAppendToMediaDataPath(char* pInputPath, char* pFinalPath);
+
+/** @} */
+#endif  //_ITS_MEDIA_CONTENT_COMMON_H_
diff --git a/src/itc/media-content/ITs-media-content.c b/src/itc/media-content/ITs-media-content.c
new file mode 100755 (executable)
index 0000000..d6ac021
--- /dev/null
@@ -0,0 +1,13253 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-media-content-common.h"
+
+/** @addtogroup itc-media-content
+*  @ingroup itc
+*  @{
+*/
+
+//& set: MediaContent
+
+media_album_h g_stHandleMediaAlbum;
+media_bookmark_h g_stHandlebookmark = NULL;
+filter_h g_stHandleFilter = NULL;
+media_folder_h g_stHandleFolder = NULL;
+media_playlist_h g_stHandlePlaylist = NULL;
+media_info_h g_stHandleInfo = NULL;
+media_info_h g_stImage = NULL;
+media_info_h g_stVideo = NULL;
+media_info_h g_stAudio = NULL;
+audio_meta_h g_pstAudioMetaHandle = NULL;
+video_meta_h g_pstVideoMetaHandle = NULL;
+image_meta_h g_pstImageMetaHandle = NULL;
+media_tag_h g_stHandleMediaTag = NULL;
+
+struct timeval g_stMediaStartTime;
+struct mallinfo g_stMediaMemInfo;
+
+bool g_bMediaCreation = false;
+bool g_bMediaContentCBFlag = false;
+
+int g_nTagId = 0;
+int g_nPlaylistId = 0;
+int g_nPlaylistMemberId = 0;
+int g_nBookmark_id = 0;
+int g_nAlbumid =-1;
+int g_nLiveboxId = 0;
+
+char* g_pMediaId = NULL;
+char* g_pMediaImageId = NULL;
+char* g_pMediaVideoId = NULL;
+char* g_pMediaAudioId = NULL;
+char* g_pFolderPath = NULL;
+char* g_psrcHiddenFolderUuId = NULL;
+char* g_pHiddenFolderUuId = NULL;
+char* g_pLiveBoxName = NULL;
+
+static GMainLoop* g_pMainLoop;
+int g_nStorageId = 0;
+bool g_bStorageFound = false;
+
+char g_strStorageInternalLocation[PATH_LEN];
+char g_strSystemRingtones[PATH_LEN];
+char g_strSystemImages[PATH_LEN];
+char g_strSystemSound[PATH_LEN];
+char g_strSystemSoundFolder[PATH_LEN];
+char g_strSystemVideos[PATH_LEN];
+char g_strSystemCamera[PATH_LEN];
+char g_strSystemCam[PATH_LEN];
+char g_strHiddenFolderPath[PATH_LEN];
+char g_strTestItemPath[PATH_LEN];
+char g_strInsertPath[PATH_LEN];
+char g_strInsertPathAlbum[PATH_LEN];
+char g_strInsertPathInfo[PATH_LEN];
+char g_strSystemDownloads[PATH_LEN];
+char g_strSystemOthers[PATH_LEN];
+char g_strDummyPath[PATH_LEN];
+
+/**
+* @function            CallbackTimeout
+* @description         callback function to terminate g_main loop
+* @parameter           data : user data sent to callback
+* @return                      NA
+*/
+gboolean CallbackTimeout(gpointer data)
+{
+       GMainLoop* pMainLoop = (GMainLoop*)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               g_main_loop_unref(pMainLoop);
+               pMainLoop = NULL;
+       }
+
+       FPRINTF("[Line: %d][%s] media-content event loop timeout occurred\\n", __LINE__, API_NAMESPACE);
+       return false;
+}
+
+/**
+* @function                    GetInternalMemoryIdCallBack
+* @description         callback function to retrieves internal storage in device
+* @parameter[IN]       int storage_id - storage device id
+* @parameter[IN]       storage_type_e type - storage type
+* @parameter[IN]       storage_state_e - storage device state
+* @parameter[IN]       void* user_data - user data
+* @return                      NA
+*/
+static bool MediaContent_GetInternalMemoryCallBack(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line: %d][%s] GetInternalMemoryIdCallBack callback hit\\n", __LINE__, API_NAMESPACE);
+#endif
+       
+       if ( type == STORAGE_TYPE_INTERNAL )
+       {
+               FPRINTF("[Line: %d][%s] Retrieved the Internal Storage ID Found\\n", __LINE__, API_NAMESPACE);
+               g_bStorageFound = true;
+               g_nStorageId = storage_id;
+
+               memset(g_strStorageInternalLocation, 0, PATH_LEN);
+               strcpy(g_strStorageInternalLocation, path);
+               
+               //Ringtone path
+               char *pstrRingtonePath = NULL;
+               storage_get_directory(storage_id, STORAGE_DIRECTORY_SYSTEM_RINGTONES, &pstrRingtonePath);
+               if (NULL ==pstrRingtonePath)
+               {
+                       FPRINTF("[Line: %d][%s] pstrRingtonePath is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               memset(g_strSystemRingtones, 0, PATH_LEN);
+               strcpy(g_strSystemRingtones, pstrRingtonePath);
+               FPRINTF("[Line: %d][%s] g_strSystemRingtones PATH = %s\\n", __LINE__, API_NAMESPACE, g_strSystemRingtones);
+               if ( pstrRingtonePath != NULL )
+               {
+                       free(pstrRingtonePath);
+                       pstrRingtonePath = NULL;
+               }
+               
+               //Downloads path
+               char *pstrDownloadPath = NULL;
+               storage_get_directory(storage_id, STORAGE_DIRECTORY_DOWNLOADS, &pstrDownloadPath);
+               if (NULL ==pstrDownloadPath)
+               {
+                       FPRINTF("[Line: %d][%s] pstrDownloadPath is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               memset(g_strSystemDownloads, 0, PATH_LEN);
+               strcpy(g_strSystemDownloads, pstrDownloadPath);
+               FPRINTF("[Line: %d][%s] g_strSystemDownloads PATH = %s\\n", __LINE__, API_NAMESPACE, g_strSystemDownloads);
+               if ( pstrDownloadPath != NULL )
+               {
+                       free(pstrDownloadPath);
+                       pstrDownloadPath = NULL;
+               }
+               
+               //Others path
+               char *pstrOthersPath = NULL;
+               storage_get_directory(storage_id, STORAGE_DIRECTORY_OTHERS, &pstrOthersPath);
+               if (NULL ==pstrOthersPath)
+               {
+                       FPRINTF("[Line: %d][%s] pstrOthersPath is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               memset(g_strSystemOthers, 0, PATH_LEN);
+               strcpy(g_strSystemOthers, pstrOthersPath);
+               FPRINTF("[Line: %d][%s] g_strSystemOthers PATH = %s\\n", __LINE__, API_NAMESPACE, g_strSystemOthers);
+               if ( pstrOthersPath != NULL )
+               {
+                       free(pstrOthersPath);
+                       pstrOthersPath = NULL;
+               }
+               
+               //Video File path
+               char *pstrVidPath = NULL;
+               storage_get_directory(storage_id, STORAGE_DIRECTORY_VIDEOS, &pstrVidPath) ;
+               if (NULL ==pstrVidPath)
+               {
+                       FPRINTF("[Line: %d][%s] pstrVidPath is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               memset(g_strSystemVideos, 0, PATH_LEN);
+               strcpy(g_strSystemVideos, pstrVidPath);
+               FPRINTF("[Line: %d][%s] g_strSystemVideos PATH = %s\\n", __LINE__, API_NAMESPACE, g_strSystemVideos);
+               if ( pstrVidPath != NULL )
+               {
+                       free(pstrVidPath);
+                       pstrVidPath = NULL;
+               }
+               
+               //Images File path
+               char *pstrImagePath = NULL;
+               storage_get_directory(storage_id, STORAGE_DIRECTORY_IMAGES, &pstrImagePath) ;
+               if (NULL ==pstrImagePath)
+               {
+                       FPRINTF("[Line: %d][%s] pstrImagePath is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               memset(g_strSystemImages, 0, PATH_LEN);
+               strcpy(g_strSystemImages, pstrImagePath);
+               strcat(g_strSystemImages, TESTFOLDERPATH);
+               FPRINTF("[Line: %d][%s] g_strSystemImages PATH = %s\\n", __LINE__, API_NAMESPACE, g_strSystemImages);
+               if ( pstrImagePath != NULL )
+               {
+                       free(pstrImagePath);
+                       pstrImagePath = NULL;
+               }
+               
+               //Sound File path
+               char *pstrSoundPath = NULL;
+               storage_get_directory(storage_id, STORAGE_DIRECTORY_SOUNDS, &pstrSoundPath) ;
+               if (NULL ==pstrSoundPath)
+               {
+                       FPRINTF("[Line: %d][%s] pstrSoundPath is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               memset(g_strSystemSoundFolder, 0, PATH_LEN);
+               strcpy(g_strSystemSoundFolder, pstrSoundPath);
+               memset(g_strSystemSound, 0, PATH_LEN);
+               strcpy(g_strSystemSound, pstrSoundPath);
+               strcat(g_strSystemSound, INSERTPATHAUDIO);
+               FPRINTF("[Line: %d][%s] g_strSystemSound PATH = %s\\n", __LINE__, API_NAMESPACE, g_strSystemSound);
+               if ( pstrSoundPath != NULL )
+               {
+                       free(pstrSoundPath);
+                       pstrSoundPath = NULL;
+               }
+               
+               //Camera File path
+               char *pstrVideoPath = NULL;
+               storage_get_directory(storage_id, STORAGE_DIRECTORY_CAMERA, &pstrVideoPath) ;
+               memset(g_strSystemCam, 0, PATH_LEN);
+               if (NULL ==pstrVideoPath)
+               {
+                       FPRINTF("[Line: %d][%s] pstrVideoPath is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               strcpy(g_strSystemCam, pstrVideoPath);
+               memset(g_strSystemCamera, 0, PATH_LEN);
+               strcpy(g_strSystemCamera, pstrVideoPath);
+               strcat(g_strSystemCamera, INSERTPATHVIDEO);
+               FPRINTF("[Line: %d][%s] g_strSystemCamera PATH = %s\\n", __LINE__, API_NAMESPACE, g_strSystemCamera);
+               if ( pstrVideoPath != NULL )
+               {
+                       free(pstrVideoPath);
+                       pstrVideoPath = NULL;
+               }
+               
+               if ( g_pMainLoop != NULL )
+               {
+                       g_main_loop_quit(g_pMainLoop);
+                       g_main_loop_unref(g_pMainLoop);
+                       g_pMainLoop = NULL;
+               }
+               return false;
+       }
+       
+       return true;
+}
+
+/**
+* @function            GetFileName
+* @description         Function to get recorder file
+* @parameter           none
+* @return                      true if succeeded else false
+*
+*/
+bool GetInternalMediaStoragePath()
+{
+       storage_foreach_device_supported(MediaContent_GetInternalMemoryCallBack, NULL);
+       g_bStorageFound = true;
+       int nDirectTimeoutId = -1;
+       RUN_POLLING_LOOP_PATH;
+       
+       if (! g_bStorageFound )
+       {
+               FPRINTF("[Line: %d][%s] Unable to get the internal storage location\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       return true;
+}
+
+/**
+* @function            MediaContentBookmarkCB
+* @description         Called for every bookmark in the obtained list of bookmarks
+* @parameter           media_bookmark_h : The handle to video bookmark, user_data :The user data passed from the for each function
+* @return                      boolean value : true to continue with the next iteration of the loop, false to break out of the loop
+*/
+bool MediaContentBookmarkCB(media_bookmark_h bookmark_h, void* user_data)
+{
+       g_bMediaContentCBFlag = true;
+       g_stHandlebookmark = bookmark_h;
+       FPRINTF("[Line: %d][%s] Inside MediaContentBookmarkCB\\n", __LINE__, API_NAMESPACE);
+
+       if ( bookmark_h == NULL )
+       {
+               g_bMediaContentCBFlag = false;
+       }
+       else
+       {
+               int nRet = media_bookmark_clone(&g_stHandlebookmark, bookmark_h);
+               if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] media_bookmark_clone failed\\n", __LINE__, API_NAMESPACE);
+                       g_bMediaContentCBFlag = false;
+               }
+               else
+               {
+                       nRet = media_bookmark_get_bookmark_id(g_stHandlebookmark, &g_nBookmark_id);
+                       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line: %d][%s] media_bookmark_get_bookmark_id failed\\n", __LINE__, API_NAMESPACE);
+                               g_bMediaContentCBFlag = false;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line: %d][%s] media_bookmark_get_bookmark_id returned = %d\\n", __LINE__, API_NAMESPACE, g_nBookmark_id);
+                       }
+               }
+       }
+       
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+       
+       return true; //false to break out of loop else continue
+}
+
+/**
+* @function            MediaContentAlbumCB
+* @description         Called for every album in obtained list of groups.
+* @parameter           media_album_h : The handle to media album, user_data: The user data passed from the for each function
+* @return                      boolean value : true to continue with the next iteration of the loop, false to break out of the loop
+*/
+bool MediaContentAlbumCB(media_album_h album, void* user_data)
+{
+       g_stHandleMediaAlbum = album;
+       g_bMediaContentCBFlag = true;
+       if ( album != NULL )
+       {
+               media_album_get_album_id(album, &g_nAlbumid);
+               if ( g_nAlbumid == -1 )
+               {
+                       FPRINTF("[Line: %d][%s] media_album_get_album_id returned -1 so leaving\\n", __LINE__, API_NAMESPACE);
+                       g_bMediaContentCBFlag = false;
+               }
+               else
+               {
+                       media_album_get_album_from_db(g_nAlbumid, &g_stHandleMediaAlbum);
+               }
+       }
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+       return true;
+}
+
+/**
+* @function            MediaContentCapiFolderListCB
+* @description         Called for every available media folder
+* @parameter           media_folder_h : The handle to media folder, user_data value : The user data passed from the foreach function
+* @return                      boolean value
+*/
+bool MediaContentCapiFolderListCB(media_folder_h folder, void* user_data)
+{
+       g_bMediaContentCBFlag = true;
+       if ( folder != NULL )
+       {
+               int nRet = media_folder_clone(&g_stHandleFolder, folder);
+               if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] clone folder handle failed\\n", __LINE__, API_NAMESPACE);
+                       return false;
+               }
+               media_folder_get_path(g_stHandleFolder, &g_pFolderPath);
+               media_folder_get_folder_id(g_stHandleFolder, &g_pHiddenFolderUuId);
+               media_folder_get_folder_id(g_stHandleFolder, &g_psrcHiddenFolderUuId);
+               FPRINTF("[Line: %d][%s] Folder to hide id = [ %s ]\\n", __LINE__, API_NAMESPACE, g_psrcHiddenFolderUuId );
+               FPRINTF("[Line: %d][%s] folder path : %s\\n", __LINE__, API_NAMESPACE, g_pFolderPath);
+       }
+       
+       if ( g_pFolderPath != NULL )
+       {
+               free(g_pFolderPath);
+               g_pFolderPath = NULL;
+       }
+       
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+       
+       return true;
+}
+
+/**
+* @function            MediaContentGroupCB
+* @description         Called for every group in the obtained list of groups
+* @parameter           group_name : The name of media group, user_data value : The user data passed from the foreach function
+* @return                      boolean value
+*/
+bool MediaContentGroupCB(const char* name, void* user_data)
+{
+       g_bMediaContentCBFlag = true;
+       if ( name != NULL )
+       {
+               FPRINTF("[Line: %d][%s] get group name success : %s\\n", __LINE__, API_NAMESPACE,name);
+       }
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+       
+       return true;
+}
+
+/**
+* @function            MediaContentThumbnailCompletedCB
+* @description         Called when creating a thumbnail image
+* @parameter           error : The Error code, path : The Path of thumbnail, user_data : The user data passed
+* @return                      NA
+*/
+void MediaContentThumbnailCompletedCB(media_content_error_e error, const char* path, void* user_data)
+{
+       g_bMediaContentCBFlag = true;
+       if ( path == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Path is NULL\\n", __LINE__, API_NAMESPACE);
+               g_bMediaContentCBFlag = false;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] Path : %s\\n", __LINE__, API_NAMESPACE, path);
+       }
+
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+       
+
+}
+
+/**
+* @function            MediaInfoCB
+* @description         Called for every available media info
+* @parameter           media : The handle to media info, user_data value : The user data passed from the foreach function
+* @return                      boolean value
+*/
+bool MediaInfoCB(media_info_h media, void* user_data)
+{
+       g_bMediaContentCBFlag = true;
+       media_content_type_e type = 0;
+       char* name = NULL;
+       media_info_get_media_type(media, &type);
+       media_info_get_display_name(media, &name);
+       if ( g_stImage == NULL && type == MEDIA_CONTENT_TYPE_IMAGE )
+       {
+               FPRINTF("[Line: %d][%s] MEDIA_CONTENT_TYPE_IMAGE\\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line: %d][%s] media name: %s\\n", __LINE__, API_NAMESPACE, name);
+               media_info_clone(&g_stImage, media);
+               media_info_clone(&g_stHandleInfo, media);
+               media_info_get_media_id(media, &g_pMediaImageId);
+               media_info_get_media_id(media, &g_pMediaId);
+               media_info_get_image(media, &g_pstImageMetaHandle);
+       }
+
+       if ( g_stVideo == NULL && type == MEDIA_CONTENT_TYPE_VIDEO )
+       {
+               FPRINTF("[Line: %d][%s] MEDIA_CONTENT_TYPE_VIDEO\\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line: %d][%s] media name: %s\\n", __LINE__, API_NAMESPACE, name);
+               media_info_clone(&g_stVideo, media);
+               media_info_get_media_id(media, &g_pMediaVideoId);
+               media_info_get_media_id(media, &g_pMediaId);
+               media_info_get_video(media, &g_pstVideoMetaHandle);
+       }
+       if ( g_stAudio == NULL && type == MEDIA_CONTENT_TYPE_MUSIC )
+       {
+               FPRINTF("[Line: %d][%s] MEDIA_CONTENT_TYPE_MUSIC\\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line: %d][%s] media name: %s\\n", __LINE__, API_NAMESPACE, name);
+               media_info_clone(&g_stAudio, media);
+               media_info_clone(&g_stHandleInfo, media);
+               media_info_get_media_id(media, &g_pMediaAudioId);
+               media_info_get_media_id(media, &g_pMediaId);
+               media_info_get_audio(media, &g_pstAudioMetaHandle);
+       }
+       if ( g_stAudio == NULL && type == MEDIA_CONTENT_TYPE_SOUND )
+       {
+               FPRINTF("[Line: %d][%s] MEDIA_CONTENT_TYPE_SOUND\\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line: %d][%s] media name: %s\\n", __LINE__, API_NAMESPACE, name);
+               media_info_clone(&g_stAudio, media);
+               media_info_clone(&g_stHandleInfo, media);
+               media_info_get_media_id(media, &g_pMediaAudioId);
+               media_info_get_audio(media, &g_pstAudioMetaHandle);
+               media_info_get_media_id(media, &g_pMediaId);
+       }
+       if ( g_stHandleInfo == NULL && type == MEDIA_CONTENT_TYPE_OTHERS )
+       {
+               FPRINTF("[Line: %d][%s] MEDIA_CONTENT_TYPE_OTHERS\\n", __LINE__, API_NAMESPACE);
+               FPRINTF("[Line: %d][%s] media name: %s\\n", __LINE__, API_NAMESPACE, name);
+               media_info_clone(&g_stHandleInfo, media);
+               media_info_get_media_id(media, &g_pMediaId);
+       }
+       
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+       return true;
+}
+
+/**
+* @function            MediaContentInsertBatchCB
+* @description         Called when media items are inserted completely.
+* @parameter           media : The handle to media info, user_data value : The user data passed from the foreach function
+* @return                      NA
+*/
+void MediaContentInsertBatchCB(media_content_error_e error, void* user_data)
+{
+       FPRINTF("[Line: %d][%s] MediaContentInsertBatchCB media item inserted completely\\n", __LINE__, API_NAMESPACE);
+       g_bMediaContentCBFlag = true;
+       FPRINTF("[Line: %d][%s] MediaContentInsertBatchCB :%d\\n", __LINE__, API_NAMESPACE, error);
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+}
+
+/**
+* @function            InsertBurstShotCB
+* @description         Called when burst shot is inserted completely
+* @parameter           media_content_error_e : Enumeration for media content error,\n
+*                                      user_data value : The user data passed from the foreach function
+* @return                      NA
+*/
+void InsertBurstShotCB(media_content_error_e error, void* user_data)
+{
+       g_bMediaContentCBFlag = true;
+       FPRINTF("[Line: %d][%s] media_info_insert_burst_shot_to_db completed![%d]\\n", __LINE__, API_NAMESPACE, error);
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+}
+
+/**
+* @function            PlaylistCB
+* @description         Called when burst shot is inserted completely
+* @parameter           media_playlist_h : The handle to media info\n
+*                                      user_data value : The user data passed from the foreach function
+* @return                      bool
+*/
+bool PlaylistCB(media_playlist_h playlist, void* user_data)
+{
+       g_bMediaContentCBFlag = true;
+       
+       if ( playlist != NULL )
+       {
+               int nRet = media_playlist_clone(&g_stHandlePlaylist, playlist);
+               if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] media_playlist_clone failed\\n", __LINE__, API_NAMESPACE);
+                       g_bMediaContentCBFlag = false;
+               }
+               else
+               {
+                       nRet = media_playlist_get_playlist_id(g_stHandlePlaylist, &g_nPlaylistId);
+                       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line: %d][%s] media_playlist_get_playlist_id failed\\n", __LINE__, API_NAMESPACE);
+                               g_bMediaContentCBFlag = false;
+                       }
+               }
+                               
+       }
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+       return true;
+}
+
+/**
+* @function            PlaylistItemCB
+* @description         Called for every media info with playlist member ID in obtained list of media info
+* @parameter           playlist_member_id : The ID to member of playlist\n
+*                                      media_info_h : The handle to media info\n
+*                                      user_data value : The user data passed from the foreach function
+* @return                      bool
+*/
+bool PlaylistItemCB(int playlist_member_id, media_info_h media, void* user_data)
+{
+       g_bMediaContentCBFlag = true;
+       g_nPlaylistMemberId = playlist_member_id;
+       FPRINTF("[Line: %d][%s] cb - member id : %d\\n", __LINE__, API_NAMESPACE, g_nPlaylistMemberId);
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+       return true;
+}
+
+/**
+* @function            TagCB
+* @description         Called for every tag in the obtained list of tags
+* @parameter           media_tag_h : The handle to media tag\n
+*                                      user_data value : The user data passed from the foreach function
+* @return                      bool
+*/
+bool TagCB(media_tag_h tag, void* user_data)
+{
+       char* name = NULL;
+       g_bMediaContentCBFlag = true;
+       if ( tag != NULL )
+       {
+               int nRet = media_tag_clone(&g_stHandleMediaTag, tag);
+               if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] clone tag handle failed\\n", __LINE__, API_NAMESPACE);
+                       return false;
+               }
+               media_tag_get_tag_id(g_stHandleMediaTag, &g_nTagId);
+               media_tag_get_name(g_stHandleMediaTag, &name);
+               if ( name != NULL )
+               {
+                       FPRINTF("[Line: %d][%s] [TAG] tag name : %s\\n", __LINE__, API_NAMESPACE, name);
+                       free(name);
+               }
+               
+               g_stHandleMediaTag = tag;
+               media_tag_get_tag_id(tag, &g_nTagId);
+               media_tag_get_name(tag, &name);
+               if ( name != NULL )
+               {
+                       FPRINTF("[Line: %d][%s] [TAG] tag name : %s\\n", __LINE__, API_NAMESPACE, name);
+                       free(name);
+               }
+       }
+               
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+       
+       return true;
+}
+
+/**
+* @function            ScanFolderCB
+* @description         Called when the media scanning is finished
+* @parameter           media_content_error_e : The error code\n
+*                                      user_data value : The user data passed from the foreach function
+* @return                      NA
+*/
+void ScanFolderCB(media_content_error_e error, void* user_data)
+{
+       g_bMediaContentCBFlag = true;
+       FPRINTF("[Line: %d][%s] ScanFolderCB : %d\\n", __LINE__, API_NAMESPACE, error);
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+}
+
+/**
+* @function            MediaContentDbUpdateCB
+* @description         Called when notification of media db change is subscribed
+* @parameter           error : The error code, pid : Pid which publish notification\n
+*                                      update_item : Update item of notification, update_type : update type of notification\n
+*                                      media_type : The type of media content(media_content_type_e), uuid : UUID of media or directory, which is updated\n
+*                                      path : The path of media or directory, mime_type : The mime type of media info\n
+*                                      user_data : The user data passed from the foreach function
+* @return                      NA
+*/
+void MediaContentDbUpdateCB(media_content_error_e error,
+                                                       int pid,
+                                                       media_content_db_update_item_type_e update_item,
+                                                       media_content_db_update_type_e update_type,
+                                                       media_content_type_e media_type,
+                                                       char* uuid,
+                                                       char* path,
+                                                       char* mime_type,
+                                                       void* user_data)
+{
+       g_bMediaContentCBFlag = true;
+       if ( error == 0 )
+       {
+               FPRINTF("[Line: %d][%s] Notification success! : %d\\n", __LINE__, API_NAMESPACE, error);
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] error occurred! : %d\\n", __LINE__, API_NAMESPACE, error);
+       }
+
+       FPRINTF("[Line: %d][%s] Notification from PID(%d)\\n", __LINE__, API_NAMESPACE, pid);
+
+       if ( update_item == MEDIA_ITEM_FILE )
+       {
+               FPRINTF("[Line: %d][%s] Notification item : MEDIA_ITEM_FILE\\n", __LINE__, API_NAMESPACE);
+       }
+       else if ( update_item == MEDIA_ITEM_DIRECTORY )
+       {
+               FPRINTF("[Line: %d][%s] Notification item : MEDIA_ITEM_DIRECTORY\\n", __LINE__, API_NAMESPACE);
+       }
+
+       if ( update_type == MEDIA_CONTENT_INSERT )
+       {
+               FPRINTF("[Line: %d][%s] Notification type : MEDIA_CONTENT_INSERT\\n", __LINE__, API_NAMESPACE);
+       }
+       else if ( update_type == MEDIA_CONTENT_DELETE )
+       {
+               FPRINTF("[Line: %d][%s] Notification type : MEDIA_CONTENT_DELETE\\n", __LINE__, API_NAMESPACE);
+       }
+       else if ( update_type == MEDIA_CONTENT_UPDATE )
+       {
+               FPRINTF("[Line: %d][%s] Notification type : MEDIA_CONTENT_UPDATE\\n", __LINE__, API_NAMESPACE);
+       }
+
+       FPRINTF("[Line: %d][%s] content type : %d\\n", __LINE__, API_NAMESPACE, media_type);
+
+       if ( path )
+       {
+               FPRINTF("[Line: %d][%s] path : %s\\n", __LINE__, API_NAMESPACE, path);
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] path not set\\n", __LINE__, API_NAMESPACE);
+       }
+       if ( uuid )
+       {
+               FPRINTF("[Line: %d][%s] uuid : %s\\n", __LINE__, API_NAMESPACE, uuid);
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] uuid not set\\n", __LINE__, API_NAMESPACE);
+       }
+       if ( mime_type )
+       {
+               FPRINTF("[Line: %d][%s] mime_type : %s\\n", __LINE__, API_NAMESPACE, mime_type);
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] mime not set\\n", __LINE__, API_NAMESPACE);
+       }
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+}
+
+/**
+* @function            ITs_media_content_startup
+* @description         Connects to the media content service
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_media_content_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       int nRet = media_content_connect();
+       if ( nRet == MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] media_content_connect passed\\n", __LINE__, API_NAMESPACE);
+               g_bMediaCreation = true;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] media_content_connect failed, error returned = %s\\n", __LINE__, API_NAMESPACE, MediaGetError(nRet));
+               g_bMediaCreation = false;
+       }
+       
+       GetInternalMediaStoragePath();
+       if ( strlen(g_strStorageInternalLocation) > 0 && strlen(g_strStorageInternalLocation) < PATH_LEN )
+       {
+               MediaAppendToMediaDataPath( HIDDENFOLDERPATH, g_strHiddenFolderPath );
+               MediaAppendToMediaDataPath( TESTITEMPATH, g_strTestItemPath );
+               MediaAppendToMediaDataPath( INSERTPATH, g_strInsertPath );
+               MediaAppendToMediaDataPath( INSERTPATHALBUM, g_strInsertPathAlbum );
+               MediaAppendToMediaDataPath( INSERTPATHINFO, g_strInsertPathInfo );
+               MediaAppendToMediaDataPath( DUMMY, g_strDummyPath);
+       }
+}
+
+/**
+* @function            ITs_media_content_cleanup
+* @description         Disconnects from the media content service
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_media_content_cleanup(void)
+{
+       if ( g_bMediaCreation )
+       {
+               int nRet = media_content_disconnect();
+               if ( nRet == MEDIA_CONTENT_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] media_content_disconnect passed\\n", __LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       FPRINTF("[Line: %d][%s] media_content_disconnect failed, error returned = %s\\n", __LINE__, API_NAMESPACE, MediaGetError(nRet));
+               }
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] media_content_connect failed\\n", __LINE__, API_NAMESPACE);
+       }
+}
+
+/** @addtogroup itc-media-content-testcases
+*  @brief              Integration testcases for module media-content
+*  @ingroup    itc-media-content
+*  @{
+*/
+
+//& purpose: Requests to scan a media file
+//& type: auto
+/**
+* @testcase                    ITc_media_content_scan_file_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function requests to scan a media file to media server.
+* @scenario                            Connects to the media content service\n
+*                                              Requests to scan a media file\n
+*                                              Disconnects from the media content service
+* @apicovered                  media_content_scan_file
+* @passcase                            When media_content_scan_file is successful
+* @failcase                            If target API media_content_scan_file fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_scan_file_p(void)
+{
+       START_TEST;
+       char *pszMediaScanFileMemLog = NULL;
+       char *pszMediaScanFileSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       
+#if MEMORY_CHECK
+       pszMediaScanFileMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaScanFileSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_content_scan_file(g_strTestItemPath);
+               MediaExecutionDelay(pszMediaScanFileSpeedLog);
+               MediaGetMemStatus(pszMediaScanFileMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_content_scan_file",nMediaContentFailCount);
+               
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_scan_file_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszMediaScanFileSpeedLog);
+               free(pszMediaScanFileMemLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_content_scan_file, pszMediaScanFileSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_scan_file_p, pszMediaScanFileMemLog);
+#endif
+
+       free(pszMediaScanFileSpeedLog);
+       free(pszMediaScanFileMemLog);
+
+       return 0;
+}
+
+//& purpose: Requests to scan a media folder, asynchronously
+//& type: auto
+/**
+* @testcase                    ITc_media_content_scan_folder_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function requests to scan a media folder to media server with given completed callback function
+* @scenario                            Connects to the media content service\n
+*                                              Requests to scan a media folder, asynchronously\n
+*                                              Disconnects from the media content service
+* @apicovered                  media_content_scan_folder
+* @passcase                            When media_content_scan_folder is successful
+* @failcase                            If target API media_content_scan_folder fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_scan_folder_p(void)
+{
+       START_TEST;
+       char *pszMediaScanFileMemLog = NULL;
+       char *pszMediaScanFileSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0 , nTimeoutId = 0;
+       
+#if MEMORY_CHECK
+       pszMediaScanFileMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaScanFileSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_content_scan_folder(g_strSystemImages, false, ScanFolderCB, NULL);
+               MediaExecutionDelay(pszMediaScanFileSpeedLog);
+               MediaGetMemStatus(pszMediaScanFileMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_content_scan_folder",nMediaContentFailCount);
+               RUN_POLLING_LOOP;
+               if ( !g_bMediaContentCBFlag )
+               {
+                       FPRINTF("[Line: %d][%s] ScanFolderCB callback failed\\n", __LINE__, API_NAMESPACE);
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_scan_folder_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszMediaScanFileSpeedLog);
+               free(pszMediaScanFileMemLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_content_scan_folder, pszMediaScanFileSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_scan_folder_p, pszMediaScanFileMemLog);
+#endif
+
+       free(pszMediaScanFileSpeedLog);
+       free(pszMediaScanFileMemLog);
+
+       return 0;
+}
+
+//& purpose: Subscribes/Unsubscribes notifications of media db change
+//& type: auto
+/**
+* @testcase                    ITc_media_content_set_unset_db_updated_cb_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function subscribes/Unsubscribes notifications of media db change which are published by media server or other apps
+* @scenario                            Connects to the media content service\n
+*                                              Subscribe notifications of media db change\n
+*                                              Unsubscribe notifications of media db change\n
+*                                              Disconnects from the media content service
+* @apicovered                  media_info_get_media_id, media_info_delete_from_db, media_content_set_db_updated_cb, media_info_insert_to_db, media_content_unset_db_updated_cb, media_info_destroy
+* @passcase                            When media_content_set_db_updated_cb is successful
+* @failcase                            If target API media_content_set_db_updated_cb fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_set_unset_db_updated_cb_p(void)
+{
+       START_TEST;
+       char *pszMediaUpdatedCBMemLog = NULL;
+       char *pszMediaUpdatedCBSpeedLog = NULL;
+       char *pszMediaUpdatedUnsetCBSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0 , nTimeoutId = 0;
+       char *pInsertedMediaId = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_get_media_id(stHandleInfo, &pInsertedMediaId);
+       PRINT_RESULT(nRet, "media_info_get_media_id");
+       FPRINTF("[Line: %d][%s] Media id = %s\\n", __LINE__, API_NAMESPACE, pInsertedMediaId);
+       
+       nRet = media_info_delete_from_db(pInsertedMediaId);
+       PRINT_RESULT(nRet, "media_info_delete_from_db");
+       
+       stHandleInfo = NULL;
+#if MEMORY_CHECK
+       pszMediaUpdatedCBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaUpdatedCBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszMediaUpdatedUnsetCBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_content_set_db_updated_cb(MediaContentDbUpdateCB, NULL);
+               MediaExecutionDelay(pszMediaUpdatedCBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_content_set_db_updated_cb",nMediaContentFailCount);
+               
+               nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               RUN_POLLING_LOOP;
+               if ( !g_bMediaContentCBFlag )
+               {
+                       FPRINTF("[Line: %d][%s] MediaContentDbUpdateCB callback failed\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+                               
+               MediaGetTimeOfDay();
+               nRet = media_content_unset_db_updated_cb();
+               MediaExecutionDelay(pszMediaUpdatedUnsetCBSpeedLog);
+               MediaGetMemStatus(pszMediaUpdatedCBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_content_unset_db_updated_cb",nMediaContentFailCount);
+               
+       }
+       media_info_destroy(stHandleInfo);
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_set_unset_db_updated_cb_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszMediaUpdatedCBSpeedLog);
+               free(pszMediaUpdatedUnsetCBSpeedLog);
+               free(pszMediaUpdatedCBMemLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_content_set_db_updated_cb, pszMediaUpdatedCBSpeedLog);
+       PRINT_SPEED_LOG(media_content_unset_db_updated_cb, pszMediaUpdatedUnsetCBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_set_unset_db_updated_cb_p, pszMediaUpdatedCBMemLog);
+#endif
+
+       free(pszMediaUpdatedCBSpeedLog);
+       free(pszMediaUpdatedUnsetCBSpeedLog);
+       free(pszMediaUpdatedCBMemLog);
+
+       return 0;
+}
+
+/*
+********************* Media Content Bookmark*************************
+*/
+
+//& purpose: Clones a media bookmark
+//& type: auto
+/**
+* @testcase                    ITc_media_content_bookmark_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Clones a media bookmark
+* @scenario                            Get media info for each media from DB\n
+*                                              Get media info for each bookmark from DB\n
+*                                              Clone a media bookmark\n
+*                                              Destroy the media bookmark
+* @apicovered                  media_info_foreach_media_from_db, media_bookmark_delete_from_db, media_bookmark_insert_to_db, media_info_foreach_bookmark_from_db, media_bookmark_clone and media_bookmark_destroy
+* @passcase                            When media_bookmark_clone and media_bookmark_destroy are successful
+* @failcase                            If media_bookmark_clone and media_bookmark_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. Destroys a media bookmark
+*/
+int ITc_media_content_bookmark_clone_p(void)
+{
+       START_TEST;
+       char *pszBookmarkCloneMemLog = NULL;
+       char *pszBookmarkCloneSpeedLog = NULL;
+       char *pszBookmarkDestroySpeedLog = NULL;
+       media_bookmark_h stHandlebookmark = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_stHandlebookmark = NULL;
+       g_pMediaId = NULL;
+       time_t tAddedTime;
+       time(&tAddedTime);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB,NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       FPRINTF("[Line: %d][%s] g_pMediaId = %s\\n", __LINE__, API_NAMESPACE, g_pMediaId);
+               
+       nRet = media_bookmark_insert_to_db(g_pMediaId, tAddedTime, NULL);
+       PRINT_RESULT(nRet, "media_bookmark_insert_to_db");
+       
+       nRet = media_info_foreach_bookmark_from_db(g_pMediaId, NULL, MediaContentBookmarkCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_bookmark_from_db");
+       if ( g_stHandlebookmark == NULL )
+       {
+               FPRINTF("[Line: %d][%s] g_stHandlebookmark not initialize\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK               
+       pszBookmarkCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszBookmarkDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszBookmarkCloneSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_bookmark_clone(&stHandlebookmark, g_stHandlebookmark);
+               MediaExecutionDelay(pszBookmarkCloneSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_bookmark_clone", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_bookmark_destroy(stHandlebookmark);
+               MediaExecutionDelay(pszBookmarkDestroySpeedLog);
+               MediaGetMemStatus(pszBookmarkCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_bookmark_destroy", nMediaContentFailCount);
+       }
+       media_bookmark_delete_from_db(g_nBookmark_id);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_bookmark_clone_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE,nMediaContentFailCount, MAX_COUNT);
+               free(pszBookmarkCloneSpeedLog);
+               free(pszBookmarkDestroySpeedLog);
+               free(pszBookmarkCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_bookmark_clone, pszBookmarkCloneSpeedLog);
+       PRINT_SPEED_LOG(media_bookmark_destroy, pszBookmarkDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_bookmark_clone_p, pszBookmarkCloneMemLog);
+#endif
+       free(pszBookmarkCloneSpeedLog);
+       free(pszBookmarkDestroySpeedLog);
+       free(pszBookmarkCloneMemLog);
+       return 0;
+}
+
+//& purpose: Gets bookmark's time marked parameter
+//& type: auto
+/**
+* @testcase                    ITc_media_content_bookmark_get_marked_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets bookmark's time marked parameter
+* @scenario                            Get media info for each media from DB\n
+*                                              Get media info for each bookmark from DB\n
+*                                              Gets bookmark's time marked parameter
+* @apicovered                  media_info_foreach_media_from_db, media_info_foreach_bookmark_from_db and media_bookmark_get_marked_time, media_bookmark_insert_to_db, media_bookmark_delete_from_db
+* @passcase                            When media_bookmark_get_marked_time is successful
+* @failcase                            If media_bookmark_get_marked_time fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_bookmark_get_marked_p(void)
+{
+       START_TEST;
+       char *pszBookmarkGetMarkedMemLog = NULL;
+       char *pszBookmarkGetMarkedSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pMediaId = NULL;
+       g_stHandlebookmark = NULL;
+       time_t tBookmarkTime = 0;
+       time_t tAddedTime;
+       
+       time(&tAddedTime);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB,NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       FPRINTF("[Line: %d][%s] g_pMediaId = %s\\n", __LINE__, API_NAMESPACE,g_pMediaId);
+       
+       nRet = media_bookmark_insert_to_db(g_pMediaId, tAddedTime, NULL);
+       PRINT_RESULT(nRet, "media_bookmark_insert_to_db");
+       
+       nRet = media_info_foreach_bookmark_from_db(g_pMediaId, NULL, MediaContentBookmarkCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_bookmark_from_db");
+       
+       if ( g_stHandlebookmark == NULL )
+       {
+               FPRINTF("[Line: %d][%s] g_stHandlebookmark not initialize\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK       
+       pszBookmarkGetMarkedMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszBookmarkGetMarkedSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_bookmark_get_marked_time(g_stHandlebookmark, &tBookmarkTime);
+               MediaExecutionDelay(pszBookmarkGetMarkedSpeedLog);
+               MediaGetMemStatus(pszBookmarkGetMarkedMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_bookmark_get_marked_time", nMediaContentFailCount);
+       }
+       media_bookmark_delete_from_db(g_nBookmark_id);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_bookmark_get_marked_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszBookmarkGetMarkedSpeedLog);
+               free(pszBookmarkGetMarkedMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_bookmark_get_marked_time, pszBookmarkGetMarkedSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_bookmark_get_marked_p, pszBookmarkGetMarkedMemLog);
+#endif
+
+       free(pszBookmarkGetMarkedSpeedLog);
+       free(pszBookmarkGetMarkedMemLog);
+       return 0;
+}
+
+//& purpose: Gets the media bookmark's thumbnail
+//& type: auto
+/**
+* @testcase                    ITc_media_content_bookmark_get_path_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the media bookmark's thumbnail
+* @scenario                            Get media info for each media from DB\n
+*                                              Get media info for each bookmark from DB\n
+*                                              Get the media bookmark's thumbnail
+* @apicovered                  media_info_foreach_media_from_db, media_info_foreach_bookmark_from_db and media_bookmark_get_thumbnail_path, media_bookmark_insert_to_db, media_bookmark_delete_from_db
+* @passcase                            When media_bookmark_get_thumbnail_path is successful
+* @failcase                            If media_bookmark_get_thumbnail_path fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_bookmark_get_path_p(void)
+{      
+       START_TEST;
+       char *pszBookmarkGetPathMemLog = NULL;
+       char *pszBookmarkGetPathSpeedLog = NULL;
+       char *pPath = NULL;
+       g_stHandlebookmark = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pMediaId = NULL;
+       time_t tAddedTime;
+       time(&tAddedTime);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB,NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       FPRINTF("[Line: %d][%s] g_pMediaId = %s\\n", __LINE__, API_NAMESPACE,g_pMediaId);
+       
+       
+       nRet = media_bookmark_insert_to_db(g_pMediaId, tAddedTime, NULL);
+       PRINT_RESULT(nRet, "media_bookmark_insert_to_db");
+       
+       nRet = media_info_foreach_bookmark_from_db(g_pMediaId, NULL, MediaContentBookmarkCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_bookmark_from_db");
+       
+       if ( g_stHandlebookmark == NULL )
+       {
+               FPRINTF("[Line: %d][%s] g_stHandlebookmark not initialize\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK       
+       pszBookmarkGetPathMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszBookmarkGetPathSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_bookmark_get_thumbnail_path(g_stHandlebookmark, &pPath);
+               MediaExecutionDelay(pszBookmarkGetPathSpeedLog);
+               MediaGetMemStatus(pszBookmarkGetPathMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_bookmark_get_thumbnail_path", nMediaContentFailCount);
+               if ( pPath != NULL )
+               {
+                       free(pPath);
+                       pPath = NULL;
+               }
+       }
+       media_bookmark_delete_from_db(g_nBookmark_id);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_bookmark_get_path_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszBookmarkGetPathSpeedLog);
+               free(pszBookmarkGetPathMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_bookmark_get_thumbnail_path, pszBookmarkGetPathSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_bookmark_get_path_p, pszBookmarkGetPathMemLog);
+#endif
+
+       free(pszBookmarkGetPathSpeedLog);
+       free(pszBookmarkGetPathMemLog);
+       return 0;
+}
+
+//& purpose: Inserts a new bookmark in media And Removes media bookmark from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_bookmark_insert_delete_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Inserts a new bookmark in media on the specified time offset to the media database
+* @scenario                            Get media info for each media from DB\n
+*                                              Get media info for each bookmark from DB\n
+*                                              Inserts a new bookmark in media\n
+*                                              Removes media bookmark from the media database
+* @apicovered                  media_info_foreach_media_from_db, media_bookmark_delete_from_db and media_bookmark_insert_to_db
+* @passcase                            When media_bookmark_insert_to_db is successful
+* @failcase                            If media_bookmark_insert_to_db fails or any precondition API fails
+* @precondition                        Connect to the media content service, media_info_foreach_bookmark_from_db() will invoke this function.
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_bookmark_insert_delete_p(void)
+{
+       START_TEST;
+       char *pszBookmarkInsertMemLog = NULL;
+       char *pszBookmarkInsertSpeedLog = NULL;
+       char *pszBookmarkDeleteSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pMediaId = NULL;
+       g_stHandlebookmark = NULL;
+       g_bMediaContentCBFlag = false;
+       
+#if MEMORY_CHECK               
+       pszBookmarkInsertMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszBookmarkInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszBookmarkDeleteSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               time_t tAddedTime;
+               time(&tAddedTime);
+               
+               nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB,NULL);
+               PRINT_RESULT_LOOP(nRet, "media_info_foreach_media_from_db",nMediaContentFailCount);
+               FPRINTF("[Line: %d][%s] g_pMediaId = %s\\n", __LINE__, API_NAMESPACE,g_pMediaId);
+               
+               if ( g_bMediaContentCBFlag != true )
+               {
+                       nMediaContentFailCount++;
+                       FPRINTF("[Line: %d][%s] MediaInfoCB callback failed\\n", __LINE__, API_NAMESPACE);
+               }
+       
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_bookmark_insert_to_db(g_pMediaId, tAddedTime, NULL);
+               MediaExecutionDelay(pszBookmarkInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_bookmark_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_bookmark_delete_from_db(g_nBookmark_id);
+               MediaExecutionDelay(pszBookmarkDeleteSpeedLog);
+               MediaGetMemStatus(pszBookmarkInsertMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_bookmark_delete_from_db", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_bookmark_insert_delete_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+
+               free(pszBookmarkInsertSpeedLog);
+               free(pszBookmarkDeleteSpeedLog);
+               free(pszBookmarkInsertMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_bookmark_insert_to_db, pszBookmarkInsertSpeedLog);
+       PRINT_SPEED_LOG(media_bookmark_delete_from_db, pszBookmarkDeleteSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_bookmark_insert_delete_p, pszBookmarkInsertMemLog);
+#endif
+       free(pszBookmarkInsertSpeedLog);
+       free(pszBookmarkDeleteSpeedLog);
+       free(pszBookmarkInsertMemLog);
+       return 0;
+}
+
+//& purpose: Gets number of bookmarks
+//& type: auto
+/**
+* @testcase                    ITc_media_content_bookmark_count_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets number of bookmarks with optional filter from media database
+* @scenario                            Gets number of bookmarks
+* @apicovered                  media_bookmark_get_bookmark_count_from_db
+* @passcase                            When media_bookmark_get_bookmark_count_from_db is successful
+* @failcase                            If media_bookmark_get_bookmark_count_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_bookmark_count_p(void)
+{
+       START_TEST;
+       char *pszBookmarkCountMemLog = NULL;
+       char *pszBookmarkCountSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       int nBookmark_count = 0;
+               
+#if MEMORY_CHECK
+       pszBookmarkCountMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszBookmarkCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_bookmark_get_bookmark_count_from_db(NULL, &nBookmark_count );
+               MediaExecutionDelay(pszBookmarkCountSpeedLog);
+               MediaGetMemStatus(pszBookmarkCountMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_bookmark_get_bookmark_count_from_db", nMediaContentFailCount);
+               FPRINTF("[Line: %d][%s] nBookmark_count = [%d]\\n", __LINE__, API_NAMESPACE,nBookmark_count);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_bookmark_count_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszBookmarkCountSpeedLog);
+               free(pszBookmarkCountMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_bookmark_get_bookmark_count_from_db, pszBookmarkCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_bookmark_count_p, pszBookmarkCountMemLog);
+#endif
+       free(pszBookmarkCountSpeedLog);
+       free(pszBookmarkCountMemLog);
+       return 0;
+}
+
+/*
+************************ Media Filter ***************************
+*/
+
+//& purpose: Creates a media filter handle
+//& type: auto
+/**
+* @testcase                    ITc_media_content_filter_create_destroy_filter_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Creates a media filter handle
+* @scenario                            Creates a media filter handle\n
+*                                              Destroy a media filter handle
+* @apicovered                  media_filter_create and media_filter_destroy
+* @passcase                            When media_filter_create and media_filter_destroy is successful
+* @failcase                            If targetmedia_filter_create and media_filter_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_filter_create_destroy_filter_p(void)
+{
+       START_TEST;
+       char *pszCreateFilterMemLog = NULL;
+       char *pszCreateFilterSpeedLog = NULL;
+       char *pszDestroyFilterSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       
+#if MEMORY_CHECK
+       pszCreateFilterMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCreateFilterSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszDestroyFilterSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_filter_create(&g_stHandleFilter);
+               MediaExecutionDelay(pszCreateFilterSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_filter_create", nMediaContentFailCount);
+                               
+               MediaGetTimeOfDay();
+               nRet = media_filter_destroy(g_stHandleFilter);
+               MediaExecutionDelay(pszDestroyFilterSpeedLog);
+               MediaGetMemStatus(pszCreateFilterMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_filter_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_filter_create_destroy_filter_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszCreateFilterSpeedLog);
+               free(pszCreateFilterMemLog);
+               free(pszDestroyFilterSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_filter_create, pszCreateFilterSpeedLog);
+       PRINT_SPEED_LOG(media_filter_create, pszDestroyFilterSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_filter_create_destroy_filter_p, pszCreateFilterMemLog);
+#endif
+
+       free(pszCreateFilterSpeedLog);
+       free(pszCreateFilterMemLog);
+       free(pszDestroyFilterSpeedLog);
+       return 0;
+}
+
+//& purpose: Set/Get the condition for given filter.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_filter_set_get_condition_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the condition for given filter.
+* @scenario                            Creates a media filter handle\n
+*                                              Set the condition for given filter\n
+*                                              Get the condition for given filter.
+* @apicovered                  media_filter_create, media_filter_set_condition, media_filter_destroy and media_filter_get_condition
+* @passcase                            When media_filter_set_condition and media_filter_get_condition is successful
+* @failcase                            If target media_filter_set_condition and media_filter_get_condition fails or any precondition API fails
+* @precondition                        Connect to the media content service and Creates a media filter handle must be created
+* @postcondition               Disconnect from the media content service and Destroys a media filter handle must be released
+*/
+int ITc_media_content_filter_set_get_condition_p(void)
+{
+       START_TEST;
+       char *pszFilterConditionMemLog = NULL;
+       char *pszFilterSetConditionSpeedLog = NULL;
+       char *pszFilterGetConditionSpeedLog = NULL;
+       char *pCondition = NULL;
+       media_content_collation_e eCollationTypeInput[] = { MEDIA_CONTENT_COLLATE_DEFAULT,
+                                                               MEDIA_CONTENT_COLLATE_NOCASE,
+                                                               MEDIA_CONTENT_COLLATE_RTRIM,
+                                                               MEDIA_CONTENT_COLLATE_LOCALIZED                                                 
+                                                       };
+
+       media_content_collation_e eCollateType = -1;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       
+       int nEnumSize = sizeof(eCollationTypeInput) / sizeof(eCollationTypeInput[0]);
+       int nEnumCounter = 0;
+       
+       nRet = media_filter_create(&g_stHandleFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       if ( g_stHandleFilter == NULL )
+       {
+               FPRINTF("[Line: %d][%s] g_stHandleFilter is NULL. media_filter_create failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszFilterConditionMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFilterSetConditionSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszFilterGetConditionSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nEnumCounter=0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       char *szEnumVal = NULL;
+                       
+                       MediaGetMemAllocation();
+                       MediaGetTimeOfDay();
+                       nRet = media_filter_set_condition( g_stHandleFilter, "MEDIA_TYPE=3", eCollationTypeInput[nEnumCounter]);
+                       MediaExecutionDelay(pszFilterSetConditionSpeedLog);
+                       PRINT_RESULT_LOOP(nRet, "media_filter_set_condition", nMediaContentFailCount);
+                       switch ( eCollationTypeInput[nEnumCounter] )
+                       {
+                               case MEDIA_CONTENT_COLLATE_DEFAULT : szEnumVal = "MEDIA_CONTENT_COLLATE_DEFAULT" ; break;
+                               case MEDIA_CONTENT_COLLATE_NOCASE : szEnumVal = "MEDIA_CONTENT_COLLATE_NOCASE" ; break;
+                               case MEDIA_CONTENT_COLLATE_RTRIM : szEnumVal = "MEDIA_CONTENT_COLLATE_RTRIM" ; break;
+                               case MEDIA_CONTENT_COLLATE_LOCALIZED : szEnumVal = "MEDIA_CONTENT_COLLATE_LOCALIZED" ; break;
+                       }
+                       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line: %d][%s] Failed for [ %d] times, for enum = [ %s ]\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, szEnumVal);
+                       }
+                       else
+                       {
+                               FPRINTF("[Line: %d][%s] Passed for enum = [ %s ]\\n", __LINE__, API_NAMESPACE, szEnumVal);
+                       }
+                       MediaGetTimeOfDay();
+                       nRet = media_filter_get_condition( g_stHandleFilter, &pCondition, &eCollateType);
+                       MediaExecutionDelay(pszFilterGetConditionSpeedLog);
+                       MediaGetMemStatus(pszFilterConditionMemLog);
+                       PRINT_RESULT_LOOP(nRet, "media_filter_get_condition", nMediaContentFailCount);
+
+                       if ( eCollateType != eCollationTypeInput[nEnumCounter] )
+                       {
+                               FPRINTF("[Line: %d][%s] eCollateType in media_filter_get_condition is not same, as set\\n", __LINE__, API_NAMESPACE);
+                               nMediaContentFailCount++;
+                       }
+               }
+       }
+       media_filter_destroy(g_stHandleFilter);
+                               
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_filter_set_get_condition_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT * nEnumSize);
+               free(pszFilterSetConditionSpeedLog);
+               free(pszFilterConditionMemLog);
+               free(pszFilterGetConditionSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_filter_set_condition, pszFilterSetConditionSpeedLog);
+       PRINT_SPEED_LOG(media_filter_get_condition, pszFilterGetConditionSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_filter_set_get_condition_p, pszFilterConditionMemLog);
+#endif
+       free(pszFilterSetConditionSpeedLog);
+       free(pszFilterConditionMemLog);
+       free(pszFilterGetConditionSpeedLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media filter's offset and count.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_filter_set_get_offset_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media filter's content order and order keyword either descending or ascending.
+* @scenario                            Creates a media filter handle\n
+*                                              Set the media filter's offset and count\n
+*                                              Get the media filter's offset and count
+* @apicovered                  media_filter_create, media_filter_set_offset, media_filter_destroy and media_filter_get_offset
+* @passcase                            When media_filter_set_offset and media_filter_get_offset is successful
+* @failcase                            If target media_filter_set_offset and media_filter_get_offset fails or any precondition API fails
+* @precondition                        Connect to the media content service and Creates a media filter handle must be created
+* @postcondition               Disconnect from the media content service and Destroys a media filter handle must be released
+*/
+int ITc_media_content_filter_set_get_offset_p(void)
+{
+       START_TEST;
+       char *pszFilterConditionMemLog = NULL;
+       char *pszFilterSetConditionSpeedLog = NULL;
+       char *pszFilterGetConditionSpeedLog = NULL;
+       int nOffset = 0, nCount = 3;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       
+       nRet = media_filter_create(&g_stHandleFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       if ( g_stHandleFilter == NULL )
+       {
+               FPRINTF("[Line: %d][%s] g_stHandleFilter is NULL. media_filter_create failed\\n", __LINE__, API_NAMESPACE);
+       }
+#if MEMORY_CHECK
+       pszFilterConditionMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFilterSetConditionSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszFilterGetConditionSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_filter_set_offset(g_stHandleFilter, nOffset, nCount);
+               MediaExecutionDelay(pszFilterSetConditionSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_filter_set_offset", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_filter_get_offset(g_stHandleFilter, &nOffset, &nCount);
+               MediaExecutionDelay(pszFilterGetConditionSpeedLog);
+               MediaGetMemStatus(pszFilterConditionMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_filter_get_offset", nMediaContentFailCount);
+       }
+       media_filter_destroy(g_stHandleFilter);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_filter_set_get_offset_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszFilterSetConditionSpeedLog);
+               free(pszFilterConditionMemLog);
+               free(pszFilterGetConditionSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_filter_set_offset, pszFilterSetConditionSpeedLog);
+       PRINT_SPEED_LOG(media_filter_get_offset, pszFilterGetConditionSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_filter_set_get_offset_p, pszFilterConditionMemLog);
+#endif
+       free(pszFilterSetConditionSpeedLog);
+       free(pszFilterConditionMemLog);
+       free(pszFilterGetConditionSpeedLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media filter's content order
+//& type: auto
+/**
+* @testcase                    ITc_media_content_filter_set_get_order_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media filter's content order and order keyword either descending or ascending.
+* @scenario                            Creates a media filter handle\n
+*                                              Set the media filter's content order\n
+*                                              Get the media filter's content order
+* @apicovered                  media_filter_create, media_filter_set_order, media_filter_destroy and media_filter_get_order
+* @passcase                            When media_filter_set_order and media_filter_get_order is successful
+* @failcase                            If target media_filter_set_order and media_filter_get_order fails or any precondition API fails
+* @precondition                        Connect to the media content service and Creates a media filter handle must be created
+* @postcondition               Disconnect from the media content service and Destroys a media filter handle must be released
+*/
+int ITc_media_content_filter_set_get_order_p(void)
+{
+       START_TEST;
+       char *pszFilterConditionMemLog = NULL;
+       char *pszFilterSetConditionSpeedLog = NULL;
+       char *pszFilterGetConditionSpeedLog = NULL;
+       media_content_order_e eOrder;
+       char *pOrderkeyword = NULL;
+       media_content_order_e   eContentOrder[] = {
+                                                               MEDIA_CONTENT_ORDER_ASC,
+                                                               MEDIA_CONTENT_ORDER_DESC
+                                                       };
+       media_content_collation_e eCollateTypeInput[] = {
+                                                               MEDIA_CONTENT_COLLATE_DEFAULT,
+                                                               MEDIA_CONTENT_COLLATE_NOCASE,
+                                                               MEDIA_CONTENT_COLLATE_RTRIM,
+                                                               MEDIA_CONTENT_COLLATE_LOCALIZED                                                 
+                                                       };
+       media_content_collation_e eCollateType = -1;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       
+       int nEnumSizeOrder = sizeof(eContentOrder) / sizeof(eContentOrder[0]);
+       int nEnumCounterOreder = 0;
+       int nEnumSizeCollation = sizeof(eCollateTypeInput) / sizeof(eCollateTypeInput[0]);
+       int nEnumCounterCollation = 0;
+       
+       nRet = media_filter_create(&g_stHandleFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       if ( g_stHandleFilter == NULL )
+       {
+               FPRINTF("[Line: %d][%s] g_stHandleFilter is NULL. media_filter_create failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszFilterConditionMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSizeOrder * nEnumSizeCollation, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFilterSetConditionSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSizeOrder * nEnumSizeCollation, sizeof(char));
+       pszFilterGetConditionSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSizeOrder * nEnumSizeCollation, sizeof(char));
+#endif
+
+       for ( nEnumCounterOreder=0; nEnumCounterOreder<nEnumSizeOrder; nEnumCounterOreder++)
+       {
+               for ( nEnumCounterCollation=0; nEnumCounterCollation<nEnumSizeCollation; nEnumCounterCollation++)
+               {
+                       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+                       {
+                               char *szEnumOrder = NULL;
+                               char *szEnumCollation = NULL;
+                               MediaGetMemAllocation();
+                               MediaGetTimeOfDay();
+                               nRet = media_filter_set_order(g_stHandleFilter, eContentOrder[nEnumCounterOreder], MEDIA_TITLE, eCollateTypeInput[nEnumCounterCollation]);
+                               MediaExecutionDelay(pszFilterSetConditionSpeedLog);
+                               PRINT_RESULT_LOOP(nRet, "media_filter_set_order", nMediaContentFailCount);
+                               switch( eContentOrder[nEnumCounterOreder])
+                               {
+                                       case MEDIA_CONTENT_ORDER_ASC : szEnumOrder = "MEDIA_CONTENT_ORDER_ASC" ; break;
+                                       case MEDIA_CONTENT_ORDER_DESC : szEnumOrder = "MEDIA_CONTENT_ORDER_DESC" ; break;
+                               }
+                               switch( eCollateTypeInput[nEnumCounterCollation] )
+                               {
+                                       case MEDIA_CONTENT_COLLATE_DEFAULT : szEnumCollation = "MEDIA_CONTENT_COLLATE_DEFAULT" ; break;
+                                       case MEDIA_CONTENT_COLLATE_NOCASE : szEnumCollation = "MEDIA_CONTENT_COLLATE_NOCASE" ; break;
+                                       case MEDIA_CONTENT_COLLATE_RTRIM : szEnumCollation = "MEDIA_CONTENT_COLLATE_RTRIM" ; break;
+                                       case MEDIA_CONTENT_COLLATE_LOCALIZED : szEnumCollation = "MEDIA_CONTENT_COLLATE_LOCALIZED" ; break;
+                               }
+                               if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+                               {
+                                       FPRINTF("[Line: %d][%s] Failed for [ %d] times, for enum Order = [ %s ] and for enum Collate Type = [ %s ]\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, szEnumOrder, szEnumCollation );
+                               }
+                               else
+                               {
+                                       FPRINTF("[Line: %d][%s] for enum Order = [ %s ] and for enum Collate Type = [ %s ]\\n", __LINE__, API_NAMESPACE, szEnumOrder, szEnumCollation );
+                               }
+                               MediaGetTimeOfDay();
+                               nRet = media_filter_get_order(g_stHandleFilter, &eOrder, &pOrderkeyword, &eCollateType);
+                               MediaExecutionDelay(pszFilterGetConditionSpeedLog);
+                               MediaGetMemStatus(pszFilterConditionMemLog);
+                               PRINT_RESULT_LOOP(nRet, "media_filter_get_order", nMediaContentFailCount);
+
+                               if ( (eOrder != eContentOrder[nEnumCounterOreder]) || (eCollateType != eCollateTypeInput[nEnumCounterCollation]) )
+                               {
+                                       FPRINTF("[Line: %d][%s] media_content_order_e OR media_content_collation_e is not matced in return type\\n", __LINE__, API_NAMESPACE);
+                                       FPRINTF("[Line: %d][%s] failed for count %d for EnumOrder = [%s] and EnumCollation = [%s]\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, szEnumOrder, szEnumCollation);
+                                       nMediaContentFailCount++;
+                               }
+                       }
+               }
+       }
+       media_filter_destroy(g_stHandleFilter);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_filter_set_get_order_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT * nEnumSizeOrder * nEnumSizeCollation);
+               free(pszFilterSetConditionSpeedLog);
+               free(pszFilterConditionMemLog);
+               free(pszFilterGetConditionSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_filter_set_order, pszFilterSetConditionSpeedLog);
+       PRINT_SPEED_LOG(media_filter_get_order, pszFilterGetConditionSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_filter_set_get_order_p, pszFilterConditionMemLog);
+#endif
+       free(pszFilterSetConditionSpeedLog);
+       free(pszFilterConditionMemLog);
+       free(pszFilterGetConditionSpeedLog);
+       return 0;
+}
+
+/*
+****************************** Media Folder ************************
+*/
+
+//& purpose:Iterates through available media folders
+//& type: auto
+/**
+* @testcase                    ITc_media_content_folder_foreach_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Iterate through available media folders with optional filter from the media database
+* @scenario                            Iterate through available media folders\n
+*                                              call to callback [MediaContentCapiFolderListCB]
+* @apicovered                  media_folder_foreach_folder_from_db
+* @passcase                            When media_folder_foreach_folder_from_db is successful
+* @failcase                            If target media_folder_foreach_folder_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_folder_foreach_from_db_p(void)
+{
+       START_TEST;
+       char *pszFolderForeachMemLog = NULL;
+       char *pszFolderForeachSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       
+#if MEMORY_CHECK
+       pszFolderForeachMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFolderForeachSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_folder_foreach_folder_from_db(NULL, MediaContentCapiFolderListCB, NULL);
+               MediaExecutionDelay(pszFolderForeachSpeedLog);
+               MediaGetMemStatus(pszFolderForeachMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_foreach_folder_from_db", nMediaContentFailCount);
+               
+               if ( g_bMediaContentCBFlag == false )
+               {
+                       FPRINTF("[Line: %d][%s] callback [MediaContentCapiFolderListCB] failed\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_folder_foreach_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszFolderForeachSpeedLog);
+               free(pszFolderForeachMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_folder_foreach_folder_from_db, pszFolderForeachSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_folder_foreach_from_db_p, pszFolderForeachMemLog);
+#endif
+       free(pszFolderForeachSpeedLog);
+       free(pszFolderForeachMemLog);
+       return 0;
+}
+
+//& purpose: Clones the media folder
+//& type: auto
+/**
+* @testcase                    ITc_media_content_folder_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Clones the media folder and Destroys the media folder
+* @scenario                            Iterate through available media folders\n
+*                                              Clones the media folder\n
+*                                              Destroys the media folder
+* @apicovered                  media_folder_clone, media_folder_foreach_folder_from_db and media_folder_destroy
+* @passcase                            When media_folder_clone and media_folder_destroy are successful
+* @failcase                            If target media_folder_clone and media_folder_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_folder_clone_p(void)
+{
+       START_TEST;
+       char *pszFolderCloneMemLog = NULL;
+       char *pszFolderCloneSpeedLog = NULL;
+       char *pszFolderDestroySpeedLog = NULL;
+       media_folder_h stHandleLocalFolder = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       
+       g_bMediaContentCBFlag = false;
+       nRet = media_folder_foreach_folder_from_db(NULL, MediaContentCapiFolderListCB, NULL);
+       PRINT_RESULT(nRet, "media_folder_foreach_folder_from_db");
+       
+       if ( g_bMediaContentCBFlag == false )
+       {
+               FPRINTF("[Line: %d][%s] callback [MediaContentCapiFolderListCB] failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszFolderCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFolderCloneSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszFolderDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_folder_clone(&stHandleLocalFolder, g_stHandleFolder);
+               MediaExecutionDelay(pszFolderCloneSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_clone", nMediaContentFailCount);
+       
+               MediaGetTimeOfDay();
+               nRet = media_folder_destroy(stHandleLocalFolder);
+               MediaExecutionDelay(pszFolderDestroySpeedLog);
+               MediaGetMemStatus(pszFolderCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_folder_clone_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszFolderCloneSpeedLog);
+               free(pszFolderCloneMemLog);
+               free(pszFolderDestroySpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_folder_clone, pszFolderCloneSpeedLog);
+       PRINT_SPEED_LOG(media_folder_destroy, pszFolderDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_folder_clone_p, pszFolderCloneMemLog);
+#endif
+       free(pszFolderCloneSpeedLog);
+       free(pszFolderCloneMemLog);
+       free(pszFolderDestroySpeedLog);
+       return 0;
+}
+
+//& purpose: This function gets all media files associated with the given group
+//& type: auto
+/**
+* @testcase                    ITc_media_content_folder_foreach_media_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function gets all media files associated with the given group
+* @scenario                            Iterate through available media folders\n
+*                                              Get Folder ID\n
+*                                              Iterate through the media files in the given folder from the media database\n
+*                                              Get the number of media files for hidden folder from the media database
+* @apicovered                  media_filter_create, media_folder_foreach_folder_from_db, media_folder_foreach_media_from_db, media_filter_destroy
+* @passcase                            When media_folder_get_folder_id and media_folder_foreach_media_from_db are successful
+* @failcase                            If target API media_folder_get_folder_id and media_folder_foreach_media_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_folder_foreach_media_from_db_p(void)
+{
+       START_TEST;
+       char *pszFolderHideMemLog = NULL;
+       char *pszFolderForeachMediaSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_bMediaContentCBFlag = false;
+       filter_h stHandlefilter = NULL;
+       
+       nRet=media_filter_create(&stHandlefilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       nRet = media_folder_foreach_folder_from_db(stHandlefilter, MediaContentCapiFolderListCB, NULL);
+       PRINT_RESULT(nRet, "media_folder_foreach_folder_from_db");
+       
+       if ( !g_bMediaContentCBFlag )
+       {
+               FPRINTF("[Line: %d][%s] Unable to call MediaContentCapiFolderListCB, folder handler not set\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszFolderHideMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK                
+       pszFolderForeachMediaSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_folder_foreach_media_from_db(g_psrcHiddenFolderUuId, NULL, MediaInfoCB, NULL);
+               MediaExecutionDelay(pszFolderForeachMediaSpeedLog);
+               MediaGetMemStatus(pszFolderHideMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_foreach_media_from_db", nMediaContentFailCount);
+               
+               if ( g_bMediaContentCBFlag == false )
+               {
+                       nMediaContentFailCount++;
+                       FPRINTF("[Line: %d][%s] Callback [MediaInfoCB] Failed\\n", __LINE__, API_NAMESPACE);
+               }
+       }
+       if ( g_psrcHiddenFolderUuId != NULL )
+       {
+               free(g_psrcHiddenFolderUuId);
+               g_psrcHiddenFolderUuId = NULL;
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_folder_foreach_media_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszFolderForeachMediaSpeedLog);
+               free(pszFolderHideMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_folder_foreach_media_from_db, pszFolderForeachMediaSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_folder_foreach_media_from_db_p, pszFolderHideMemLog);
+#endif
+       free(pszFolderForeachMediaSpeedLog);
+       free(pszFolderHideMemLog);
+       
+       return 0;
+}
+
+//& purpose: Gets the number of folder for the passed filter from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_folder_get_folder_count_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the number of folder for the passed filter from the media database
+* @scenario                            provide output variable count to [media_folder_get_folder_count_from_db]
+* @apicovered                  media_folder_get_folder_count_from_db
+* @passcase                            When media_folder_get_folder_count_from_db is successful
+* @failcase                            If target API media_folder_get_folder_count_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_folder_get_folder_count_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       int nFolder_count = 0;
+       char *pszFolderCountMemLog = NULL;
+       char *pszFolderCountSpeedLog = NULL;
+               
+#if MEMORY_CHECK
+       pszFolderCountMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFolderCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_folder_get_folder_count_from_db(NULL, &nFolder_count);
+               MediaExecutionDelay(pszFolderCountSpeedLog);
+               MediaGetMemStatus(pszFolderCountMemLog);
+               FPRINTF("[Line: %d][%s] nFolder_count = [%d] \\n", __LINE__, API_NAMESPACE,nFolder_count);
+               PRINT_RESULT_LOOP(nRet, "media_folder_get_folder_count_from_db", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_folder_get_folder_count_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszFolderCountSpeedLog);
+               free(pszFolderCountMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_folder_get_folder_count_from_db, pszFolderCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_folder_get_folder_count_p, pszFolderCountMemLog);
+#endif
+       free(pszFolderCountSpeedLog);
+       free(pszFolderCountMemLog);
+       return 0;
+}
+
+//& purpose: Gets the media folder from the media database.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_folder_get_folder_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the media folder from the media database.
+* @scenario                            Iterate through available media folders\n
+*                                              Gets media folder's ID\n
+*                                              Get the media folder from the media database.\n
+*                                              Destroys the media folder
+* @apicovered                  media_folder_foreach_folder_from_db, media_folder_get_folder_from_db, media_folder_destroy
+* @passcase                            When media_folder_get_folder_id, media_folder_get_folder_from_db and media_folder_destroy are successful
+* @failcase                            If target API media_folder_get_folder_id, media_folder_get_folder_from_db and media_folder_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_folder_get_folder_from_db_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszFolderGetFolderMemLog = NULL;
+       char *pszFolderGetFolderSpeedLog = NULL;
+       char *pszFolderDestroySpeedLog = NULL;
+       media_folder_h stMediaFolderHandle = NULL;
+       
+       g_bMediaContentCBFlag = false;
+       nRet = media_folder_foreach_folder_from_db(NULL, MediaContentCapiFolderListCB, NULL);
+       PRINT_RESULT(nRet, "media_folder_foreach_folder_from_db");
+               
+       if ( !g_bMediaContentCBFlag )
+       {
+               FPRINTF("[Line: %d][%s] Unable to call MediaContentCapiFolderListCB, folder handler not set\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszFolderGetFolderMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFolderGetFolderSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszFolderDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_folder_get_folder_from_db(g_psrcHiddenFolderUuId, &stMediaFolderHandle);
+               MediaExecutionDelay(pszFolderGetFolderSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_get_folder_from_db", nMediaContentFailCount);
+                                       
+               MediaGetTimeOfDay();
+               nRet = media_folder_destroy(stMediaFolderHandle);
+               MediaExecutionDelay(pszFolderDestroySpeedLog);
+               MediaGetMemStatus(pszFolderGetFolderMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_destroy", nMediaContentFailCount);
+       }
+       if ( g_psrcHiddenFolderUuId != NULL )
+       {
+               free(g_psrcHiddenFolderUuId);
+               g_psrcHiddenFolderUuId = NULL;
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_folder_get_folder_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszFolderDestroySpeedLog);
+               free(pszFolderGetFolderSpeedLog);
+               free(pszFolderGetFolderMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_folder_get_folder_id, pszFolderGetFolderSpeedLog);
+       PRINT_SPEED_LOG(media_folder_destroy, pszFolderDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_folder_get_folder_from_db_p, pszFolderGetFolderMemLog);
+#endif
+       free(pszFolderDestroySpeedLog);
+       free(pszFolderGetFolderSpeedLog);
+       free(pszFolderGetFolderMemLog);
+       return 0;
+}
+
+//& purpose: Gets the number of media files for the passed filter in the given folder from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_folder_get_media_count_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the number of media files for the passed filter in the given folder from the media database
+* @scenario                            Iterate through available media folders\n
+*                                              Gets media folder's ID\n
+*                                              Get the number of media files for the passed filter in the given folder from the media database\n
+*                                              Destroys the media folder
+* @apicovered                  media_folder_foreach_folder_from_db, media_folder_get_media_count_from_db
+* @passcase                            When media_folder_get_folder_from_db and media_folder_destroy are successful
+* @failcase                            If target API media_folder_get_folder_from_db and media_folder_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_folder_get_media_count_from_db_p(void)
+{
+       START_TEST;
+       char *pszFolderGetFolderMemLog = NULL;
+       char *pszFolderGetFolderSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+               
+       g_bMediaContentCBFlag = false;
+       nRet = media_folder_foreach_folder_from_db(NULL, MediaContentCapiFolderListCB, NULL);
+       PRINT_RESULT(nRet, "media_folder_foreach_folder_from_db");
+       
+       if ( !g_bMediaContentCBFlag )
+       {
+               FPRINTF("[Line: %d][%s] Unable to call MediaContentCapiFolderListCB, folder handler not set\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszFolderGetFolderMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFolderGetFolderSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               int nCountMedia = 0;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_folder_get_media_count_from_db(g_psrcHiddenFolderUuId,NULL, &nCountMedia);
+               MediaExecutionDelay(pszFolderGetFolderSpeedLog);
+               MediaGetMemStatus(pszFolderGetFolderMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_get_folder_from_db", nMediaContentFailCount);
+       }
+       if ( g_psrcHiddenFolderUuId != NULL )
+       {
+               free(g_psrcHiddenFolderUuId);
+               g_psrcHiddenFolderUuId = NULL;
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_folder_get_media_count_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszFolderGetFolderSpeedLog);
+               free(pszFolderGetFolderMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_folder_get_media_count_from_db, pszFolderGetFolderSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_folder_get_media_count_from_db_p, pszFolderGetFolderMemLog);
+#endif
+       free(pszFolderGetFolderSpeedLog);
+       free(pszFolderGetFolderMemLog);
+       return 0;
+}
+
+//& purpose: Gets the modified date of the folder
+//& type: auto
+/**
+* @testcase                    ITc_media_content_folder_get_modified_time_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the modified date of the folder
+* @scenario                            Iterate through available media folders\n
+*                                              Get the handle to media folder\n
+*                                              Get the modified date of the folder
+* @apicovered                  media_folder_foreach_folder_from_db, media_folder_get_modified_time
+* @passcase                            When media_folder_get_modified_time is successful
+* @failcase                            If target API media_folder_get_modified_time fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_folder_get_modified_time_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszFolderGetFolderMemLog = NULL;
+       char *pszFolderGetFolderTimeSpeedLog = NULL;
+       time_t tDateModifed = 0;
+       
+       g_bMediaContentCBFlag = false;
+       nRet = media_folder_foreach_folder_from_db(NULL, MediaContentCapiFolderListCB, NULL);
+       PRINT_RESULT(nRet, "media_folder_foreach_folder_from_db");
+       
+       
+       if ( !g_bMediaContentCBFlag )
+       {
+               FPRINTF("[Line: %d][%s] Unable to call MediaContentCapiFolderListCB, folder handler not set\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszFolderGetFolderMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFolderGetFolderTimeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_folder_get_modified_time(g_stHandleFolder, &tDateModifed);
+               MediaExecutionDelay(pszFolderGetFolderTimeSpeedLog);
+               MediaGetMemStatus(pszFolderGetFolderMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_get_modified_time", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_folder_get_modified_time_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE,nMediaContentFailCount, MAX_COUNT);
+               free(pszFolderGetFolderTimeSpeedLog);
+               free(pszFolderGetFolderMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_folder_get_modified_time, pszFolderGetFolderTimeSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_folder_get_modified_time_p, pszFolderGetFolderMemLog);
+#endif
+       free(pszFolderGetFolderTimeSpeedLog);
+       free(pszFolderGetFolderMemLog);
+       return 0;
+}
+
+//& purpose: Gets folder's storage type
+//& type: auto
+/**
+* @testcase                    ITc_media_content_folder_get_storage_type_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets folder's storage type
+* @scenario                            Iterate through available media folders\n
+*                                              Gets folder's storage type
+* @apicovered                  media_folder_foreach_folder_from_db, media_folder_get_storage_type
+* @passcase                            When media_folder_get_storage_type is successful
+* @failcase                            If target API media_folder_get_storage_type fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_folder_get_storage_type_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszFolderGetStorageTypeMemLog = NULL;
+       char *pszFolderGetStorageTypeSpeedLog = NULL;
+       media_content_storage_e eStorageType;
+       
+       g_bMediaContentCBFlag = false;
+       nRet = media_folder_foreach_folder_from_db(NULL, MediaContentCapiFolderListCB, NULL);
+       PRINT_RESULT(nRet, "media_folder_foreach_folder_from_db");
+       
+       
+       if ( !g_bMediaContentCBFlag )
+       {
+               FPRINTF("[Line: %d][%s] Unable to call MediaContentCapiFolderListCB, folder handler not set\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszFolderGetStorageTypeMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFolderGetStorageTypeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_folder_get_storage_type(g_stHandleFolder, &eStorageType);
+               MediaExecutionDelay(pszFolderGetStorageTypeSpeedLog);
+               MediaGetMemStatus(pszFolderGetStorageTypeMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_get_storage_type", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_folder_get_storage_type_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszFolderGetStorageTypeSpeedLog);
+               free(pszFolderGetStorageTypeMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_folder_get_modified_time, pszFolderGetStorageTypeSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_folder_get_storage_type_p, pszFolderGetStorageTypeMemLog);
+#endif
+       free(pszFolderGetStorageTypeSpeedLog);
+       free(pszFolderGetStorageTypeMemLog);
+       return 0;
+}
+
+/*
+************************* Media Group ****************************
+*/
+
+
+//& purpose: Gets the number of group for the passed filter from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_group_get_group_count_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the number of group for the passed filter from the media database
+* @scenario                            Get the number of group for the passed filter from the media database
+* @apicovered                  media_group_get_group_count_from_db
+* @passcase                            When media_group_get_group_count_from_db is successful
+* @failcase                            If target API media_group_get_group_count_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_group_get_group_count_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszGroupGetCountMemLog = NULL;
+       char *pszGroupGetCountSpeedLog = NULL;
+       int nGroupCount = 0;
+       
+#if MEMORY_CHECK
+       pszGroupGetCountMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGroupGetCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_group_get_group_count_from_db(NULL, MEDIA_CONTENT_GROUP_DISPLAY_NAME, &nGroupCount);
+               MediaExecutionDelay(pszGroupGetCountSpeedLog);
+               MediaGetMemStatus(pszGroupGetCountMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_group_get_group_count_from_db", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_group_get_group_count_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGroupGetCountSpeedLog);
+               free(pszGroupGetCountMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_folder_get_modified_time, pszGroupGetCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_group_get_group_count_p, pszGroupGetCountMemLog);
+#endif
+       free(pszGroupGetCountSpeedLog);
+       free(pszGroupGetCountMemLog);
+       return 0;
+}
+
+//& purpose: Iterates through the media group with optional filter from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_group_foreach_group_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the number of group for the passed filter from the media database
+* @scenario                            Iterate through the media group with optional filter from the media database
+* @apicovered                  media_group_foreach_group_from_db
+* @passcase                            When media_group_foreach_group_from_db is successful
+* @failcase                            If target API media_group_foreach_group_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_group_foreach_group_from_db_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszGroupGetCountMemLog = NULL;
+       char *pszGroupGetCountSpeedLog = NULL;
+       
+
+#if MEMORY_CHECK
+       pszGroupGetCountMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGroupGetCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               g_bMediaContentCBFlag = false;
+               nRet = media_group_foreach_group_from_db(NULL, MEDIA_CONTENT_GROUP_DISPLAY_NAME, MediaContentGroupCB, NULL);
+               MediaExecutionDelay(pszGroupGetCountSpeedLog);
+               MediaGetMemStatus(pszGroupGetCountMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_group_foreach_group_from_db", nMediaContentFailCount);
+               
+               if ( g_bMediaContentCBFlag == false )
+               {
+                       FPRINTF("[Line: %d][%s] callback[MediaContentGroupCB] failed\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_group_foreach_group_fromDB_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGroupGetCountSpeedLog);
+               free(pszGroupGetCountMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_group_foreach_group_from_db, pszGroupGetCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_group_foreach_group_fromDB_p, pszGroupGetCountMemLog);
+#endif
+       free(pszGroupGetCountSpeedLog);
+       free(pszGroupGetCountMemLog);
+       return 0;
+}
+
+//& purpose: Iterates through the media files with optional filter in the given group from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_group_foreach_media_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function gets all media files associated with the given group and meeting\n
+*                                              desired filter option and calls registered callback function for
+* @scenario                            Iterate through the media files\n
+*                                              The callback function[media_info_cb] to be invoked
+* @apicovered                  media_group_foreach_media_from_db
+* @passcase                            When media_group_foreach_media_from_db is successful
+* @failcase                            If target API media_group_foreach_media_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_group_foreach_media_from_db_p(void)
+{
+       START_TEST;
+       
+       media_group_e eMediaGroup[] = {
+               MEDIA_CONTENT_GROUP_DISPLAY_NAME,
+               MEDIA_CONTENT_GROUP_TYPE,
+               MEDIA_CONTENT_GROUP_MIME_TYPE,
+               MEDIA_CONTENT_GROUP_SIZE,
+               MEDIA_CONTENT_GROUP_ADDED_TIME,
+               MEDIA_CONTENT_GROUP_MODIFIED_TIME,
+               MEDIA_CONTENT_GROUP_TITLE,
+               MEDIA_CONTENT_GROUP_ARTIST,
+               MEDIA_CONTENT_GROUP_ALBUM_ARTIST,
+               MEDIA_CONTENT_GROUP_GENRE,
+               MEDIA_CONTENT_GROUP_COMPOSER,
+               MEDIA_CONTENT_GROUP_YEAR,
+               MEDIA_CONTENT_GROUP_RECORDED_DATE,
+               MEDIA_CONTENT_GROUP_COPYRIGHT,
+               MEDIA_CONTENT_GROUP_TRACK_NUM,
+               MEDIA_CONTENT_GROUP_DESCRIPTION,
+               MEDIA_CONTENT_GROUP_LONGITUDE,
+               MEDIA_CONTENT_GROUP_LATITUDE,
+               MEDIA_CONTENT_GROUP_ALTITUDE,
+               MEDIA_CONTENT_GROUP_BURST_IMAGE,
+               MEDIA_CONTENT_GROUP_RATING,
+               MEDIA_CONTENT_GROUP_AUTHOR,
+               MEDIA_CONTENT_GROUP_PROVIDER,
+               MEDIA_CONTENT_GROUP_CONTENT_NAME,
+               MEDIA_CONTENT_GROUP_CATEGORY,
+               MEDIA_CONTENT_GROUP_LOCATION_TAG,
+               MEDIA_CONTENT_GROUP_AGE_RATING,
+               MEDIA_CONTENT_GROUP_KEYWORD,
+               MEDIA_CONTENT_GROUP_WEATHER
+       };
+       
+       int nEnumCounterCollation = 0;
+       int nEnumSizeMediaGroup = sizeof(eMediaGroup) / sizeof(eMediaGroup[0]);
+       
+       int nLoopCount, nMediaContentFailCount = 0;
+       char *pszGroupGetCountMemLog = NULL;
+       char *pszGroupGetCountSpeedLog = NULL;
+
+#if MEMORY_CHECK
+       pszGroupGetCountMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGroupGetCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               for ( nEnumCounterCollation = 0; nEnumCounterCollation < nEnumSizeMediaGroup; nEnumCounterCollation++ )
+               {
+                       int nCount = 0;
+                       int nRet = media_group_get_media_count_from_db(NULL, eMediaGroup[nEnumCounterCollation], NULL, &nCount);
+                       PRINT_RESULT(nRet, "media_group_get_media_count_from_db");
+                       
+                       if ( nCount > 0 )
+                       {
+                               MediaGetMemAllocation();
+                               MediaGetTimeOfDay();
+                               g_bMediaContentCBFlag = false;
+                               nRet = media_group_foreach_media_from_db(NULL, MEDIA_CONTENT_GROUP_DISPLAY_NAME, NULL, MediaInfoCB, NULL);
+                               MediaExecutionDelay(pszGroupGetCountSpeedLog);
+                               MediaGetMemStatus(pszGroupGetCountMemLog);
+                               PRINT_RESULT_LOOP(nRet, "media_group_foreach_media_from_db", nMediaContentFailCount);
+               
+                               if ( g_bMediaContentCBFlag == false )
+                               {
+                                       FPRINTF("[Line: %d][%s] callback[MediaInfoCB] failed\\n", __LINE__, API_NAMESPACE);
+                               }
+                       }
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_group_foreach_media_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGroupGetCountSpeedLog);
+               free(pszGroupGetCountMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_group_foreach_media_from_db, pszGroupGetCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_group_foreach_media_from_db_p, pszGroupGetCountMemLog);
+#endif
+       free(pszGroupGetCountSpeedLog);
+       free(pszGroupGetCountMemLog);
+       return 0;
+}
+
+//& purpose: Gets number of media info for the given media group present in the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_group_get_media_count_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets number of media info for the given media group present in the media database
+* @scenario                            Open connection to content service\n
+*                                              Gets number of media info for the given media group present in the media database\n
+*                                              Close connection to content service
+* @apicovered                  media_group_get_media_count_from_db
+* @passcase                            When media_group_get_media_count_from_db is successful
+* @failcase                            If target API media_group_get_media_count_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_group_get_media_count_from_db_p(void)
+{
+       START_TEST;
+
+       media_group_e eMediaGroup[] = {
+       MEDIA_CONTENT_GROUP_DISPLAY_NAME,
+       MEDIA_CONTENT_GROUP_TYPE,
+       MEDIA_CONTENT_GROUP_MIME_TYPE,
+       MEDIA_CONTENT_GROUP_SIZE,
+       MEDIA_CONTENT_GROUP_ADDED_TIME,
+       MEDIA_CONTENT_GROUP_MODIFIED_TIME,
+       MEDIA_CONTENT_GROUP_TITLE,
+       MEDIA_CONTENT_GROUP_ARTIST,
+       MEDIA_CONTENT_GROUP_ALBUM_ARTIST,
+       MEDIA_CONTENT_GROUP_GENRE,
+       MEDIA_CONTENT_GROUP_COMPOSER,
+       MEDIA_CONTENT_GROUP_YEAR,
+       MEDIA_CONTENT_GROUP_RECORDED_DATE,
+       MEDIA_CONTENT_GROUP_COPYRIGHT,
+       MEDIA_CONTENT_GROUP_TRACK_NUM,
+       MEDIA_CONTENT_GROUP_DESCRIPTION,
+       MEDIA_CONTENT_GROUP_LONGITUDE,
+       MEDIA_CONTENT_GROUP_LATITUDE,
+       MEDIA_CONTENT_GROUP_ALTITUDE,
+       MEDIA_CONTENT_GROUP_BURST_IMAGE,
+       MEDIA_CONTENT_GROUP_RATING,
+       MEDIA_CONTENT_GROUP_AUTHOR,
+       MEDIA_CONTENT_GROUP_PROVIDER,
+       MEDIA_CONTENT_GROUP_CONTENT_NAME,
+       MEDIA_CONTENT_GROUP_CATEGORY,
+       MEDIA_CONTENT_GROUP_LOCATION_TAG,
+       MEDIA_CONTENT_GROUP_AGE_RATING,
+       MEDIA_CONTENT_GROUP_KEYWORD,
+       MEDIA_CONTENT_GROUP_WEATHER
+       };
+
+       int nEnumCounterCollation = 0;
+       int nEnumSizeMediaGroup = sizeof(eMediaGroup) / sizeof(eMediaGroup[0]);
+       
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszGroupGetCountMemLog = NULL;
+       char *pszGroupGetCountSpeedLog = NULL;
+       
+#if MEMORY_CHECK
+       pszGroupGetCountMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGroupGetCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               for ( nEnumCounterCollation = 0; nEnumCounterCollation < nEnumSizeMediaGroup; nEnumCounterCollation++ )
+               {
+               int nMediaCount = -1;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_group_get_media_count_from_db(NULL, MEDIA_CONTENT_GROUP_DISPLAY_NAME, NULL, &nMediaCount);
+               MediaExecutionDelay(pszGroupGetCountSpeedLog);
+               MediaGetMemStatus(pszGroupGetCountMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_group_get_media_count_from_db", nMediaContentFailCount);
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_group_get_media_count_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGroupGetCountSpeedLog);
+               free(pszGroupGetCountMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_group_foreach_group_from_db, pszGroupGetCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_group_get_media_count_from_db_p, pszGroupGetCountMemLog);
+#endif
+       free(pszGroupGetCountSpeedLog);
+       free(pszGroupGetCountMemLog);
+       return 0;
+}
+
+/*
+*********************** Media Info ********************************
+*/
+
+//& purpose: Inserts media file into the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_insert_to_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Inserts media file into the media database
+* @scenario                            Open connection to content service\n
+*                                              Inserts media file into the media database\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db and media_info_destroy
+* @passcase                            When media_info_insert_to_db is successful
+* @failcase                            If target API media_info_insert_to_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_insert_to_db_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoCreateThumbnailSpeedLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       media_info_h stHandleInfo = NULL;
+               
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoCreateThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoCreateThumbnailSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_insert_to_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoCreateThumbnailSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoCreateThumbnailSpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_insert_to_db_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoCreateThumbnailSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Cancels creation of image's thumbnail for given media
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_create_cancel_thumbnail_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Cancels creation of image's thumbnail for given media
+* @scenario                            Open connection to content service\n
+*                                              Creates a thumbnail image for given media\n
+*                                              invoke callback function\n
+*                                              Cancels creation of image's thumbnail for given media\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_create_thumbnail, media_info_cancel_thumbnail and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_create_thumbnail, media_info_cancel_thumbnail and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_create_thumbnail, media_info_cancel_thumbnail and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_create_cancel_thumbnail_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoCreateThumbnailSpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       char *pszInfoCancelThumbnailSpeedLog = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoCreateThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoCancelThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_create_thumbnail(stHandleInfo, MediaContentThumbnailCompletedCB, NULL);
+               MediaExecutionDelay(pszInfoCreateThumbnailSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_create_thumbnail", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_cancel_thumbnail(stHandleInfo);
+               MediaExecutionDelay(pszInfoCancelThumbnailSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_cancel_thumbnail", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_create_cancel_thumbnail_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoCreateThumbnailSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoCancelThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_create_thumbnail, pszInfoCreateThumbnailSpeedLog);
+       PRINT_MEMORY_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_MEMORY_LOG(media_info_cancel_thumbnail, pszInfoCancelThumbnailSpeedLog);
+       PRINT_MEMORY_LOG(media_info_destroy, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_create_cancel_thumbnail_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoCreateThumbnailSpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoCancelThumbnailSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Iterates through media info from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_foreach_media_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Clones the media info handle
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db
+* @passcase                            When media_info_foreach_media_from_db is successful
+* @failcase                            If target API media_info_foreach_media_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_foreach_media_from_db_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoCreateThumbnailSpeedLog = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoCreateThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+               MediaExecutionDelay(pszInfoCreateThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_foreach_media_from_db", nMediaContentFailCount);
+                               
+               if ( g_bMediaContentCBFlag == false )
+               {
+                       FPRINTF("[Line: %d][%s] callback[MediaInfoCB] failed\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_foreach_media_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoCreateThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoCreateThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_foreach_media_from_db_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoCreateThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Clones the media info handle
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function copies the media info handle from a source to destination
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Clones the media info handle\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, media_info_clone, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, media_info_clone, media_info_destroy are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_clone, media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_clone_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoCreateThumbnailSpeedLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       char *pszInfoCloneSpeedLog = NULL;
+       media_info_h stHandleInfo = NULL;
+       g_bMediaContentCBFlag = false;
+       g_stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoCreateThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoCloneSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+               MediaExecutionDelay(pszInfoCreateThumbnailSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_foreach_media_from_db", nMediaContentFailCount);
+                       
+               if ( g_bMediaContentCBFlag == false )
+               {
+                       FPRINTF("[Line: %d][%s] callback[MediaInfoCB] failed\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_clone(&stHandleInfo, g_stHandleInfo);
+               MediaExecutionDelay(pszInfoCloneSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_clone", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_clone_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoCreateThumbnailSpeedLog);
+               free(pszInfoCloneSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoCreateThumbnailSpeedLog);
+       PRINT_SPEED_LOG(media_info_clone, pszInfoCloneSpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_clone_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoCreateThumbnailSpeedLog);
+       free(pszInfoCloneSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+
+
+//& purpose: Gets the media info's date of modification
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_modified_time_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the media info's date of modification
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Clones the media info handle\n
+*                                              Get the media info's date of modification\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, media_info_clone, media_info_get_modified_time, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, media_info_clone, media_info_get_modified_time, media_info_destroy are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_clone, media_info_get_modified_time, media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_modified_time_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoCreateThumbnailSpeedLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       char *pszInfoCloneSpeedLog = NULL;
+       char *pszGetModifiedTimeSpeedLog = NULL;
+       time_t pDateModi;
+       
+       media_info_h stHandleInfo = NULL;
+       g_bMediaContentCBFlag = false;
+       g_stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoCreateThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoCloneSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetModifiedTimeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+               MediaExecutionDelay(pszInfoCreateThumbnailSpeedLog);
+               
+               PRINT_RESULT_LOOP(nRet, "media_info_foreach_media_from_db", nMediaContentFailCount);
+               if ( g_bMediaContentCBFlag == false )
+               {
+                       FPRINTF("[Line: %d][%s] callback[MediaInfoCB] failed\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_clone(&stHandleInfo, g_stHandleInfo);
+               MediaExecutionDelay(pszInfoCloneSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_clone", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_modified_time(stHandleInfo, &pDateModi);
+               MediaExecutionDelay(pszGetModifiedTimeSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_modified_time", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_modified_time_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoCreateThumbnailSpeedLog);
+               free(pszInfoCloneSpeedLog);
+               free(pszGetModifiedTimeSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoCreateThumbnailSpeedLog);
+       PRINT_SPEED_LOG(media_info_clone, pszInfoCloneSpeedLog);
+       PRINT_SPEED_LOG(mmedia_info_get_modified_time, pszGetModifiedTimeSpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_modified_time_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoCreateThumbnailSpeedLog);
+       free(pszInfoCloneSpeedLog);
+       free(pszGetModifiedTimeSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Gets media file's size
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_size_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets media file's size
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Clones the media info handle\n
+*                                              Gets media file's size\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, media_info_clone, media_info_get_size, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, media_info_clone, media_info_get_size, media_info_destroy are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_clone, media_info_get_size, media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_size_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoCreateThumbnailSpeedLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       char *pszInfoCloneSpeedLog = NULL;
+       char *pszGetGetSizeSpeedLog = NULL;
+        unsigned long long lSizeDest = 0;
+       
+       media_info_h stHandleInfo = NULL;
+       g_bMediaContentCBFlag = false;
+       g_stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoCreateThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoCloneSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetGetSizeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+               MediaExecutionDelay(pszInfoCreateThumbnailSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_foreach_media_from_db", nMediaContentFailCount);
+               
+               if ( g_bMediaContentCBFlag == false )
+               {
+                       FPRINTF("[Line: %d][%s] callback[MediaInfoCB] failed\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_clone(&stHandleInfo, g_stHandleInfo);
+               MediaExecutionDelay(pszInfoCloneSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_clone", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_size(stHandleInfo, &lSizeDest);
+               MediaExecutionDelay(pszGetGetSizeSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_size", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_size_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE,nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoCreateThumbnailSpeedLog);
+               free(pszInfoCloneSpeedLog);
+               free(pszGetGetSizeSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoCreateThumbnailSpeedLog);
+       PRINT_SPEED_LOG(media_info_clone, pszInfoCloneSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_size, pszGetGetSizeSpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_size_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoCreateThumbnailSpeedLog);
+       free(pszInfoCloneSpeedLog);
+       free(pszGetGetSizeSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Deletes media file from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_delete_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Deletes media file from the media database
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Insert info into DB\n
+*                                              Gets tag ID for media info\n
+*                                              Deletes media file from the media database\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service\n
+* @apicovered                  media_info_insert_to_db, media_info_get_media_id, media_info_delete_from_db and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_get_media_id, media_info_delete_from_db and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_get_media_id, media_info_delete_from_db and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_delete_from_db_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfoGetMediaIdSpeedLog = NULL;
+       char *pszInfoDeleteFromDbSpeedLog = NULL;
+       media_info_h stHandleInfo = NULL;
+       char *pInsertedMediaId = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetMediaIdSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDeleteFromDbSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_media_id(stHandleInfo, &pInsertedMediaId);
+               MediaExecutionDelay(pszInfoGetMediaIdSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_media_id", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_delete_from_db(pInsertedMediaId);
+               MediaExecutionDelay(pszInfoDeleteFromDbSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_delete_from_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_delete_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoGetMediaIdSpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoDeleteFromDbSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_get_media_id, pszInfoGetMediaIdSpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_delete_from_db, pszInfoDeleteFromDbSpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_delete_from_db_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoGetMediaIdSpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoDeleteFromDbSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+
+
+//& purpose: Deletes media files from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_insert_delete_batch_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Deletes media files from the media database
+* @scenario                            Open connection to content service\n
+*                                              Inserts media files into the media database, asynchronously\n
+*                                              Deletes media files from the media database\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_batch_to_db, media_info_delete_batch_from_db,
+* @passcase                            When media_info_insert_batch_to_db and media_info_delete_batch_from_db are successful
+* @failcase                            If target API media_info_insert_batch_to_db and media_info_delete_batch_from_db, fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_insert_delete_batch_from_db_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0 , nTimeoutId = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfoDeleteFromDbSpeedLog = NULL;
+       filter_h stFilter = NULL;
+       const char *pszInsertPathList[3] = {
+               g_strInsertPath,
+               g_strTestItemPath,
+               g_strInsertPathAlbum
+       };
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDeleteFromDbSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               nRet = media_filter_create(&stFilter);
+               PRINT_RESULT_LOOP(nRet, "media_filter_create", nMediaContentFailCount);
+                               
+               nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+               PRINT_RESULT_LOOP(nRet, "media_filter_set_condition", nMediaContentFailCount);
+               
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_batch_to_db(pszInsertPathList, sizeof(pszInsertPathList) / sizeof(*pszInsertPathList), MediaContentInsertBatchCB, NULL);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_batch_to_db", nMediaContentFailCount);
+               RUN_POLLING_LOOP;
+               if ( g_bMediaContentCBFlag == false )
+               {
+                       FPRINTF("[Line: %d][%s] callback [MediaContentInsertBatchCB] failed\\n", __LINE__, API_NAMESPACE);
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_delete_batch_from_db(stFilter);
+               MediaExecutionDelay(pszInfoDeleteFromDbSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_delete_batch_from_db", nMediaContentFailCount);
+               
+               nRet = media_filter_destroy(stFilter);
+               PRINT_RESULT_LOOP(nRet, "media_filter_destroy", nMediaContentFailCount);
+
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_insert_delete_batch_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoDeleteFromDbSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK                
+       PRINT_SPEED_LOG(media_info_insert_batch_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_delete_batch_from_db, pszInfoDeleteFromDbSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_insert_delete_batch_from_db_p, pszInfoCreateThumbnailMemLog);
+#endif 
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoDeleteFromDbSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Get/Add addition time of the media
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_set_added_time_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Deletes media file from the media database
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Add addition time of the media\n
+*                                              Get addition time of the media\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_added_time, media_info_get_added_time and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_added_time, media_info_get_added_time and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_added_time, media_info_get_added_time and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_set_added_time_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfoGetMediaIdSpeedLog = NULL;
+       char *pszInfoDeleteFromDbSpeedLog = NULL;
+       media_info_h stHandleInfo = NULL;
+       time_t tAddedTime;
+       time_t tGetAddedTime;
+       time(&tAddedTime);
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetMediaIdSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDeleteFromDbSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_added_time(stHandleInfo, tAddedTime);
+               MediaExecutionDelay(pszInfoGetMediaIdSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_added_time", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_added_time(stHandleInfo, &tGetAddedTime);
+               MediaExecutionDelay(pszInfoDeleteFromDbSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_added_time", nMediaContentFailCount);
+               
+               if ( tAddedTime != tGetAddedTime )
+               {
+                       FPRINTF("[Line: %d][%s] tGetAddedTime in media_info_get_added_time is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+                               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_set_added_time_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE,nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoGetMediaIdSpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoDeleteFromDbSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_added_time, pszInfoGetMediaIdSpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_added_time, pszInfoDeleteFromDbSpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_set_added_time_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoGetMediaIdSpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoDeleteFromDbSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Moves the media info to the given destination path in the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_move_to_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Moves the media info to the given destination path in the media database
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Moves the media info\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_move_to_db and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_move_to_db and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_move_to_db and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_move_to_db_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoMovelMemLog = NULL;
+       char *pszInfoMoveSpeedLog = NULL;
+       media_info_h stHandleInfo = NULL;
+               
+#if MEMORY_CHECK
+       pszInfoMovelMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoMoveSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               const char *pTestFolderPath = g_strStorageInternalLocation;
+               
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_move_to_db(stHandleInfo, pTestFolderPath);
+               MediaExecutionDelay(pszInfoMoveSpeedLog);
+               MediaGetMemStatus(pszInfoMovelMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_move_to_db", nMediaContentFailCount);
+               
+               nRet = media_info_destroy(stHandleInfo);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_move_to_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE,nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoMoveSpeedLog);
+               free(pszInfoMovelMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_move_to_db, pszInfoMoveSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_move_to_db_p, pszInfoMovelMemLog);
+#endif
+       free(pszInfoMoveSpeedLog);
+       free(pszInfoMovelMemLog);
+       return 0;
+}
+
+//& purpose: Gets the media info's title
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_title_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the media info's title
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Get the media info's title\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_get_title and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_get_title and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_get_title and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_title_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoTiltelMemLog = NULL;
+       char *pszInfoTitleSpeedLog = NULL;
+       char *pTitle = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       
+#if MEMORY_CHECK
+       pszInfoTiltelMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoTitleSpeedLog    = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_title(stHandleInfo, &pTitle);
+               MediaExecutionDelay(pszInfoTitleSpeedLog);
+               MediaGetMemStatus(pszInfoTiltelMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_title", nMediaContentFailCount);
+               if ( pTitle != NULL )
+               {
+                       free(pTitle);
+                       pTitle = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_title_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoTitleSpeedLog);
+               free(pszInfoTiltelMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_get_title, pszInfoTitleSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_title_p, pszInfoTiltelMemLog);
+#endif
+       free(pszInfoTitleSpeedLog);
+       free(pszInfoTiltelMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's author.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_author_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's author.
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's author.\n
+*                                              Get the media info's author\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_author, media_info_get_author and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_author, media_info_get_author and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_author, media_info_get_author and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_set_get_author_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0 , nTimeoutId = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfoGetMediaIdSpeedLog = NULL;
+       char *pszInfoDeleteFromDbSpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       const char *pAuthor = "author:test";
+       char *pGetAuthor = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetMediaIdSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDeleteFromDbSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_author(stHandleInfo, pAuthor);
+               MediaExecutionDelay(pszInfoGetMediaIdSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_author", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               RUN_POLLING_LOOP;
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_author(stHandleInfo, &pGetAuthor);
+               MediaExecutionDelay(pszInfoDeleteFromDbSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_author", nMediaContentFailCount);
+               if (NULL ==pGetAuthor)
+               {
+                       FPRINTF("[Line: %d][%s] pGetAuthor is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               if ( strcmp( pGetAuthor, pAuthor ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pGetAuthor in media_info_get_author is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+               if ( pGetAuthor != NULL )
+               {
+                       free(pGetAuthor);
+                       pGetAuthor = NULL;
+               }
+       }
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_author_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoGetMediaIdSpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoDeleteFromDbSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_author, pszInfoGetMediaIdSpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_author, pszInfoDeleteFromDbSpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_author_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoGetMediaIdSpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoDeleteFromDbSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's Category.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_category_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's Category.
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's Category.\n
+*                                              Get the media info's Category\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_category, media_info_get_category and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_category, media_info_get_category and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_category, media_info_get_category and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service, Update DB after set call
+*/
+int ITc_media_content_media_info_set_get_category_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0 , nTimeoutId = 0;
+       char *pszInfoSetGetCategoryMemLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfSetCategorySpeedLog = NULL;
+       char *pszInfoGetCategorySpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       const char *pCategory = "new category";
+       char *pGetCategory = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoSetGetCategoryMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfSetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_category(stHandleInfo, pCategory);
+               MediaExecutionDelay(pszInfSetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_category", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               RUN_POLLING_LOOP;
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_category(stHandleInfo, &pGetCategory);
+               if (NULL ==pGetCategory)
+               {
+                       FPRINTF("[Line: %d][%s] pGetCategory is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               MediaExecutionDelay(pszInfoGetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_category", nMediaContentFailCount);
+               if ( strcmp( pGetCategory, pCategory ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pGetCategory in media_info_get_category is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszInfoSetGetCategoryMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+               if ( pGetCategory != NULL )
+               {
+                       free(pGetCategory);
+                       pGetCategory = NULL;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_category_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfSetCategorySpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoGetCategorySpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszInfoSetGetCategoryMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_author, pszInfSetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_author, pszInfoGetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_category_p, pszInfoSetGetCategoryMemLog);
+#endif
+       free(pszInfSetCategorySpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoGetCategorySpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszInfoSetGetCategoryMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's content name.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_content_name_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's content name.
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's content name.\n
+*                                              Get the media info's content name\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_content_name, media_info_get_content_name and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_content_name, media_info_get_content_name and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_content_name, media_info_get_content_name and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service, Update DB after set call
+*/
+int ITc_media_content_media_info_set_get_content_name_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateMemLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfSetCategorySpeedLog = NULL;
+       char *pszInfoGetCategorySpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       const char *pContent = "content:tasia";
+       char *pGetContent = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfSetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_content_name(stHandleInfo, pContent);
+               MediaExecutionDelay(pszInfSetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_content_name", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_content_name(stHandleInfo, &pGetContent);
+               MediaExecutionDelay(pszInfoGetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_content_name", nMediaContentFailCount);
+               if (NULL ==pGetContent)
+               {
+                       FPRINTF("[Line: %d][%s] pGetContent is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               if ( strcmp( pGetContent, pContent ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pGetContent in media_info_get_content_name is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+                       
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszInfoCreateMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+               if ( pGetContent != NULL )
+               {
+                       free(pGetContent);
+                       pGetContent = NULL;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_content_name_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfSetCategorySpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoGetCategorySpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszInfoCreateMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_author, pszInfSetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_author, pszInfoGetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_content_name_p, pszInfoCreateMemLog);
+#endif
+       free(pszInfSetCategorySpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoGetCategorySpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszInfoCreateMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's Description.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_description_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info'sDescription.
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's Description.\n
+*                                              Get the media info's Description\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_description, media_info_get_description and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_description, media_info_get_description and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_description, media_info_get_description and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service, Update DB after set call
+*/
+int ITc_media_content_media_info_set_get_description_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateMemLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfSetCategorySpeedLog = NULL;
+       char *pszInfoGetCategorySpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       const char *pDescription = "new description";
+       char *pGetDescription = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfSetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_description(stHandleInfo, pDescription);
+               MediaExecutionDelay(pszInfSetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_description", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet =media_info_get_description(stHandleInfo, &pGetDescription);
+               if ( pGetDescription == NULL )
+               {
+                       FPRINTF("[Line: %d][%s] pGetDescription in media_info_get_description is NULL\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+                       continue;
+               }
+               MediaExecutionDelay(pszInfoGetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_description", nMediaContentFailCount);
+               
+               if ( strcmp( pGetDescription, pDescription ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pGetDescription in media_info_get_description is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszInfoCreateMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+               if ( pGetDescription != NULL )
+               {
+                       free(pGetDescription);
+                       pGetDescription = NULL;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_description_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfSetCategorySpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoGetCategorySpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszInfoCreateMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_author, pszInfSetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_author, pszInfoGetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_description_p, pszInfoCreateMemLog);
+#endif
+       free(pszInfSetCategorySpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoGetCategorySpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszInfoCreateMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's DisplayName.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_display_name_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's DisplayName.
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's DisplayName.\n
+*                                              Get the media info's DisplayName\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_display_name, media_info_update_to_db, media_info_get_display_name and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_display_name, media_info_get_display_name and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_display_name, media_info_get_display_name and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service, Update DB after set call
+*/
+int ITc_media_content_media_info_set_get_display_name_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateMemLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfSetCategorySpeedLog = NULL;
+       char *pszInfoGetCategorySpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       const char *pDisplayName = "TestName";
+       char *pGetDisplayName = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfSetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_display_name(stHandleInfo, pDisplayName);
+               MediaExecutionDelay(pszInfSetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_display_name", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_display_name(stHandleInfo, &pGetDisplayName);
+               MediaExecutionDelay(pszInfoGetCategorySpeedLog);
+               if (NULL ==pGetDisplayName)
+               {
+                       FPRINTF("[Line: %d][%s] pGetDisplayName is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               PRINT_RESULT_LOOP(nRet, "media_info_get_display_name", nMediaContentFailCount);
+               if ( strcmp( pGetDisplayName, pDisplayName ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pGetDisplayName in media_info_get_display_name is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszInfoCreateMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+               if ( pGetDisplayName != NULL )
+               {
+                       free(pGetDisplayName);
+                       pGetDisplayName = NULL;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_display_name_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfSetCategorySpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoGetCategorySpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszInfoCreateMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_author, pszInfSetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_author, pszInfoGetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_display_name_p, pszInfoCreateMemLog);
+#endif
+       free(pszInfSetCategorySpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoGetCategorySpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszInfoCreateMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's Favorite status.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_favorite_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's favourite status.
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's favourite status\n
+*                                              Get the media info's favourite status\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_favorite, media_info_update_to_db, media_info_get_favorite and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_favorite, media_info_get_favorite and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_favorite, media_info_get_favorite and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service, Update DB after set call
+*/
+int ITc_media_content_media_info_set_get_favorite_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateMemLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfSetCategorySpeedLog = NULL;
+       char *pszInfoGetCategorySpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       bool bFavorite = false;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfSetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_favorite(stHandleInfo, true);
+               MediaExecutionDelay(pszInfSetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_favorite", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_favorite(stHandleInfo, &bFavorite);
+               MediaExecutionDelay(pszInfoGetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_favorite", nMediaContentFailCount);
+               if ( bFavorite != true )
+               {
+                       FPRINTF("[Line: %d][%s] bFavorite in media_info_get_favorite is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszInfoCreateMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_favorite_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfSetCategorySpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoGetCategorySpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszInfoCreateMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_author, pszInfSetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_author, pszInfoGetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_favorite_p, pszInfoCreateMemLog);
+#endif
+       free(pszInfSetCategorySpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoGetCategorySpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszInfoCreateMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's Provider
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_provider_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's Provider
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's Provider\n
+*                                              Get the media info's Provider\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_provider, media_info_update_to_db, media_info_get_provider and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_provider, media_info_get_provider and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_provider, media_info_get_provider and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service, Update DB after set call
+*/
+int ITc_media_content_media_info_set_get_provider_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateMemLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfSetCategorySpeedLog = NULL;
+       char *pszInfoGetCategorySpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       const char *pProvider = "provider added";
+       char *pGetProvider = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfSetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_provider(stHandleInfo, pProvider);
+               MediaExecutionDelay(pszInfSetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_provider", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_provider(stHandleInfo, &pGetProvider);
+               
+               MediaExecutionDelay(pszInfoGetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_provider", nMediaContentFailCount);
+               if (NULL ==pGetProvider)
+               {
+                       FPRINTF("[Line: %d][%s] pGetProvider is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               if ( strcmp( pGetProvider, pProvider ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pGetProvider in media_info_get_provider is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszInfoCreateMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+               
+               if ( pGetProvider != NULL )
+               {
+                       free(pGetProvider);
+                       pGetProvider = NULL;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_provider_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfSetCategorySpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoGetCategorySpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszInfoCreateMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_author, pszInfSetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_author, pszInfoGetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_provider_p, pszInfoCreateMemLog);
+#endif
+       free(pszInfSetCategorySpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoGetCategorySpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszInfoCreateMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's Location Tag
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_location_tag_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's Location Tag
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's Location Tag\n
+*                                              Get the media info's Location Tag\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_location_tag, media_info_update_to_db, media_info_get_location_tag and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_location_tag, media_info_get_location_tag and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_location_tag, media_info_get_location_tag and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service, Update DB after set call
+*/
+int ITc_media_content_media_info_set_get_location_tag_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateMemLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfSetCategorySpeedLog = NULL;
+       char *pszInfoGetCategorySpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       const char *pLocation = "new location";
+       char *pGetLocation = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfSetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_location_tag(stHandleInfo, pLocation);
+               MediaExecutionDelay(pszInfSetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_provider", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_location_tag(stHandleInfo, &pGetLocation);
+               MediaExecutionDelay(pszInfoGetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_location_tag", nMediaContentFailCount);
+               if (NULL ==pGetLocation)
+               {
+                       FPRINTF("[Line: %d][%s] pstrRingtonePath is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               if ( strcmp( pGetLocation, pLocation ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pGetLocation in media_info_get_location_tag is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszInfoCreateMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+               
+               if ( pGetLocation != NULL )
+               {
+                       free(pGetLocation);
+                       pGetLocation = NULL;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_location_tag_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfSetCategorySpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoGetCategorySpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszInfoCreateMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_author, pszInfSetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_author, pszInfoGetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_location_tag_p, pszInfoCreateMemLog);
+#endif
+       free(pszInfSetCategorySpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoGetCategorySpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszInfoCreateMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's Keyword
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_keyword_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's Keyword
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's Keyword\n
+*                                              Get the media info's Keyword\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_keyword, media_info_update_to_db, media_info_get_keyword and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_keyword, media_info_get_keyword and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_keyword, media_info_get_keyword and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service, Update DB after set call
+*/
+int ITc_media_content_media_info_set_get_keyword_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateMemLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfSetCategorySpeedLog = NULL;
+       char *pszInfoGetCategorySpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       const char *pKeyword = "keyword added";
+       char *pGetKeyword = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfSetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_keyword(stHandleInfo, pKeyword);
+               MediaExecutionDelay(pszInfSetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_provider", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_keyword(stHandleInfo, &pGetKeyword);
+               MediaExecutionDelay(pszInfoGetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_keyword", nMediaContentFailCount);
+               if (NULL ==pGetKeyword)
+               {
+                       FPRINTF("[Line: %d][%s] pGetKeyword is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               if ( strcmp( pGetKeyword, pKeyword ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pGetKeyword in media_info_get_keyword is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszInfoCreateMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+               
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_keyword_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfSetCategorySpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoGetCategorySpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszInfoCreateMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_author, pszInfSetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_author, pszInfoGetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_keyword_p, pszInfoCreateMemLog);
+#endif
+       free(pszInfSetCategorySpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoGetCategorySpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszInfoCreateMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's Rating
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_rating_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's Rating
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's Rating\n
+*                                              Get the media info's Rating\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_rating, media_info_update_to_db, media_info_get_rating and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_rating, media_info_get_rating and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_rating, media_info_get_rating and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service, Update DB after set call
+*/
+int ITc_media_content_media_info_set_get_rating_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateMemLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfSetCategorySpeedLog = NULL;
+       char *pszInfoGetCategorySpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       int nRating = 5;
+       int nGetRating = 0;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfSetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_rating(stHandleInfo, nRating);
+               MediaExecutionDelay(pszInfSetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_rating", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_rating(stHandleInfo, &nGetRating);
+               MediaExecutionDelay(pszInfoGetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_rating", nMediaContentFailCount);
+               if ( nGetRating != nRating )
+               {
+                       FPRINTF("[Line: %d][%s] nGetRating in media_info_get_rating is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+                       
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszInfoCreateMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_rating_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfSetCategorySpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoGetCategorySpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszInfoCreateMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_author, pszInfSetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_author, pszInfoGetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_rating_p, pszInfoCreateMemLog);
+#endif
+       free(pszInfSetCategorySpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoGetCategorySpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszInfoCreateMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's weather
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_weather_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's Weather
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's weather\n
+*                                              Get the media info's weather\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_weather, media_info_update_to_db, media_info_get_weather and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_weather, media_info_get_weather and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_weather, media_info_get_weather and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service, Update DB after set call
+*/
+int ITc_media_content_media_info_set_get_weather_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateMemLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfSetCategorySpeedLog = NULL;
+       char *pszInfoGetCategorySpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       const char *pWeather = "weather set : ok";
+       char *pGetWeather = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+#if MEMORY_CHECK
+       pszInfoCreateMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfSetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetCategorySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_weather(stHandleInfo, pWeather);
+               MediaExecutionDelay(pszInfSetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_weather", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_weather(stHandleInfo, &pGetWeather);
+               if (NULL ==pGetWeather)
+               {
+                       FPRINTF("[Line: %d][%s] pGetWeather is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               MediaExecutionDelay(pszInfoGetCategorySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_weather", nMediaContentFailCount);
+               if ( strcmp( pGetWeather, pWeather ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pGetWeather in media_info_get_weather is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszInfoCreateMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+               if ( pGetWeather != NULL )
+               {
+                       free(pGetWeather);
+                       pGetWeather = NULL;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_weather_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfSetCategorySpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoGetCategorySpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszInfoCreateMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_author, pszInfSetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_author, pszInfoGetCategorySpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_weather_p, pszInfoCreateMemLog);
+#endif
+       free(pszInfSetCategorySpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoGetCategorySpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszInfoCreateMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get media info age_rating
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_age_rating_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get media info age_rating
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's age rating\n
+*                                              Get media info age_rating\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_age_rating, media_info_update_to_db, media_info_get_age_rating and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_age_rating, media_info_update_to_db, media_info_get_age_rating and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_age_rating, media_info_update_to_db, media_info_get_age_rating and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_set_get_age_rating_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfoSetAgeRatingSpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       char *pszInfoGetAgeSpeedLog = NULL;
+       const char *pAgeRating = "age rating added";
+       char *pAgeRatingGet = NULL;
+       media_info_h stHandleInfo = NULL;
+               
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoSetAgeRatingSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetAgeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_age_rating(stHandleInfo, pAgeRating);
+               MediaExecutionDelay(pszInfoSetAgeRatingSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_age_rating", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_age_rating(stHandleInfo, &pAgeRatingGet);
+               MediaExecutionDelay(pszInfoGetAgeSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_age_rating", nMediaContentFailCount);
+               if (NULL ==pAgeRatingGet)
+               {
+                       FPRINTF("[Line: %d][%s] pAgeRatingGet is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               if ( strcmp( pAgeRatingGet, pAgeRating ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pAgeRatingGet in media_info_get_age_rating is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+               if ( pAgeRatingGet != NULL )
+               {
+                       free(pAgeRatingGet);
+                       pAgeRatingGet = NULL;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_age_rating_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoSetAgeRatingSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoGetAgeSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_age_rating, pszInfoSetAgeRatingSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_age_rating, pszInfoGetAgeSpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_age_rating_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoSetAgeRatingSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoGetAgeSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's altitude
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_altitude_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's altitude
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's altitude\n
+*                                              Get the media info's altitude\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_altitude, media_info_update_to_db, media_info_get_altitude and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_altitude, media_info_update_to_db, media_info_get_altitude and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_altitude, media_info_update_to_db, media_info_get_altitude and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_set_get_altitude_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfoSetAgeRatingSpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       char *pszInfoGetAgeSpeedLog = NULL;
+       double dAltitude = 200.0;
+       double dAltitudeGet= 0.0;
+       media_info_h stHandleInfo = NULL;
+               
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoSetAgeRatingSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetAgeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_altitude(stHandleInfo, dAltitude);
+               MediaExecutionDelay(pszInfoSetAgeRatingSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_altitude", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_altitude(stHandleInfo, &dAltitudeGet);
+               MediaExecutionDelay(pszInfoGetAgeSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_altitude", nMediaContentFailCount);
+               if ( dAltitudeGet != dAltitude )
+               {
+                       FPRINTF("[Line: %d][%s] dAltitudeGet in media_info_get_altitude is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_altitude_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoSetAgeRatingSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoGetAgeSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_altitude, pszInfoSetAgeRatingSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_altitude, pszInfoGetAgeSpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_altitude_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoSetAgeRatingSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoGetAgeSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+
+//& purpose: Set/Get the media info's latitude
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_latitude_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's latitude
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's latitude\n
+*                                              Get the media info's latitude\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_latitude, media_info_update_to_db, media_info_get_latitude and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_latitude, media_info_update_to_db, media_info_get_latitude and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_latitude, media_info_update_to_db, media_info_get_latitude and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_set_get_latitude_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfoSetAgeRatingSpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       char *pszInfoGetAgeSpeedLog = NULL;
+       double dLatitude = -200.0;
+       double dLatitudeGet= 0.0;
+       media_info_h stHandleInfo = NULL;
+               
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoSetAgeRatingSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetAgeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_latitude(stHandleInfo, dLatitude);
+               MediaExecutionDelay(pszInfoSetAgeRatingSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_latitude", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_latitude(stHandleInfo, &dLatitudeGet);
+               MediaExecutionDelay(pszInfoGetAgeSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_latitude", nMediaContentFailCount);
+               if ( dLatitudeGet != dLatitude )
+               {
+                       FPRINTF("[Line: %d][%s] dLatitudeGet in media_info_get_latitude is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_latitude_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoSetAgeRatingSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoGetAgeSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_latitude, pszInfoSetAgeRatingSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_latitude, pszInfoGetAgeSpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_latitude_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoSetAgeRatingSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoGetAgeSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the media info's longitude
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_set_get_longitude_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the media info's longitude
+* @scenario                            Open connection to content service\n
+*                                              Insert info into DB\n
+*                                              Set the media info's longitude\n
+*                                              Get the media info's longitude\n
+*                                              Destroy the media info handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_set_longitude, media_info_update_to_db, media_info_get_longitude and media_info_destroy
+* @passcase                            When media_info_insert_to_db, media_info_set_latitude, media_info_update_to_db, media_info_get_latitude and media_info_destroy are successful
+* @failcase                            If target API media_info_insert_to_db, media_info_set_latitude, media_info_update_to_db, media_info_get_latitude and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_set_get_longitude_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoDestroyThumbnailSpeedLog = NULL;
+       char *pszInfoInsertSpeedLog = NULL;
+       char *pszInfoSetAgeRatingSpeedLog = NULL;
+       char *pszInfoUpdateSpeedLog = NULL;
+       char *pszInfoGetAgeSpeedLog = NULL;
+       double dLongitude = 1000.0;
+       double dLongitudeGet= 0.0;
+       media_info_h stHandleInfo = NULL;
+               
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoInsertSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyThumbnailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoSetAgeRatingSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoGetAgeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+               MediaExecutionDelay(pszInfoInsertSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_set_longitude(stHandleInfo, dLongitude);
+               MediaExecutionDelay(pszInfoSetAgeRatingSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_set_longitude", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_update_to_db(stHandleInfo);
+               MediaExecutionDelay(pszInfoUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_get_longitude(stHandleInfo, &dLongitudeGet);
+               MediaExecutionDelay(pszInfoGetAgeSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_longitude", nMediaContentFailCount);
+               if ( dLongitudeGet != dLongitude )
+               {
+                       FPRINTF("[Line: %d][%s] dLongitudeGet in media_info_get_longitude is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleInfo);
+               MediaExecutionDelay(pszInfoDestroyThumbnailSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_set_get_longitude_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoSetAgeRatingSpeedLog);
+               free(pszInfoUpdateSpeedLog);
+               free(pszInfoInsertSpeedLog);
+               free(pszInfoGetAgeSpeedLog);
+               free(pszInfoDestroyThumbnailSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_set_longitude, pszInfoSetAgeRatingSpeedLog);
+       PRINT_SPEED_LOG(media_info_update_to_db, pszInfoUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_info_insert_to_db, pszInfoInsertSpeedLog);
+       PRINT_SPEED_LOG(media_info_get_longitude, pszInfoGetAgeSpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroyThumbnailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_set_get_longitude_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoSetAgeRatingSpeedLog);
+       free(pszInfoUpdateSpeedLog);
+       free(pszInfoInsertSpeedLog);
+       free(pszInfoGetAgeSpeedLog);
+       free(pszInfoDestroyThumbnailSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+
+//& purpose: Gets audio metadata for a given media info
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_audio_metadata_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets audio metadata for a given media info
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets audio metadata\n
+*                                              Destroy audio metadata handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_filter_create, media_filter_set_condition, media_info_foreach_media_from_db, media_info_get_audio, audio_meta_destroy, media_filter_destroy, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, media_info_get_audio, audio_meta_destroy are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_get_audio, audio_meta_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_audio_metadata_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoGetAudioSpeedLog = NULL;
+       char *pszInfoDestroyAudioSpeedLog = NULL;
+       audio_meta_h stAudio = NULL;
+       filter_h stFilter = NULL;
+       g_bMediaContentCBFlag = false;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+       nRet = media_info_foreach_media_from_db(stFilter, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_stAudio == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo Audio handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoGetAudioSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyAudioSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_audio(g_stAudio, &stAudio);
+               MediaExecutionDelay(pszInfoGetAudioSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_audio", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = audio_meta_destroy(stAudio);
+               MediaExecutionDelay(pszInfoDestroyAudioSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_destroy", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_audio_metadata_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoGetAudioSpeedLog);
+               free(pszInfoDestroyAudioSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_get_audio, pszInfoGetAudioSpeedLog);
+       PRINT_SPEED_LOG(audio_meta_destroy, pszInfoDestroyAudioSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_audio_metadata_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoGetAudioSpeedLog);
+       free(pszInfoDestroyAudioSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+//& purpose: Iterates through the media tag in the given media info from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_foreach_tag_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function gets all media tag associated with the given media and calls registered\n
+*                                              callback function for every retrieved media tag
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Iterate through the media tag in the given media info from the media database\n
+*                                              Close connection to content service
+* @apicovered                  media_tag_insert_to_db, media_tag_get_tag_id, media_filter_create, media_filter_set_condition, media_info_foreach_media_from_db, media_tag_add_media, media_tag_update_to_db, media_info_foreach_tag_from_db, media_filter_destroy, media_tag_delete_from_db, media_tag_destroy
+* @passcase                            When media_info_foreach_media_from_db, media_info_foreach_tag_from_db are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_foreach_tag_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_foreach_tag_from_db_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoTagFromDBMemLog = NULL;
+       char *pszInfoTagFromDBSpeedLog = NULL;
+
+       filter_h stFilter = NULL;
+       g_bMediaContentCBFlag = false;
+
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+       nRet = media_info_foreach_media_from_db(stFilter, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pMediaImageId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo Image handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszInfoTagFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoTagFromDBSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_foreach_tag_from_db(g_pMediaImageId, NULL, TagCB, NULL);
+               MediaExecutionDelay(pszInfoTagFromDBSpeedLog);
+               MediaGetMemStatus(pszInfoTagFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_foreach_tag_from_db", nMediaContentFailCount);
+               
+               if ( !g_bMediaContentCBFlag )
+               {
+                       FPRINTF("[Line: %d][%s] callback [TagCB] failed\\n", __LINE__, API_NAMESPACE);
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_foreach_tag_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoTagFromDBSpeedLog);
+               free(pszInfoTagFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_foreach_tag_from_db, pszInfoTagFromDBSpeedLog);
+       
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_foreach_tag_from_db_p, pszInfoTagFromDBMemLog);
+#endif
+       free(pszInfoTagFromDBSpeedLog);
+       free(pszInfoTagFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Gets the number of media info for the passed filter from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_media_count_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the number of media info for the passed filter from the media database.\n
+*                                              callback function for every retrieved media tag
+* @scenario                            Open connection to content service\n
+*                                              set filter\n
+*                                              Get the number of media info for the passed filter from the media database\n
+*                                              Close connection to content service
+* @apicovered                  media_filter_create, media_filter_set_condition media_info_get_media_count_from_db and media_filter_destroy
+* @passcase                            When media_info_foreach_media_from_db, media_info_get_media_count_from_db are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_get_media_count_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_media_count_from_db_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoMediaCountMemLog = NULL;
+       char *pszInfoMediaCountSpeedLog = NULL;
+       filter_h stFilter = NULL;
+       int nMediaCount = 0;
+       
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+
+#if MEMORY_CHECK
+       pszInfoMediaCountMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoMediaCountSpeedLog       = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_media_count_from_db(stFilter, &nMediaCount);
+               MediaExecutionDelay(pszInfoMediaCountSpeedLog);
+               MediaGetMemStatus(pszInfoMediaCountMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_media_count_from_db", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_media_count_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoMediaCountSpeedLog);
+               free(pszInfoMediaCountMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_get_media_count_from_db, pszInfoMediaCountSpeedLog);
+       
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_media_count_from_db_p, pszInfoMediaCountMemLog);
+#endif
+       free(pszInfoMediaCountSpeedLog);
+       free(pszInfoMediaCountMemLog);
+       return 0;
+}
+
+//& purpose: Gets image metadata for a given media info
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_image_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function returns an image metadata handle retrieved from the media info
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets audio metadata\n
+*                                              Destroy audio metadata handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, media_filter_create, media_filter_set_condition, media_info_insert_to_db, media_info_foreach_media_from_db, media_info_get_image, image_meta_destroy, media_info_destroy and media_filter_destroy
+* @passcase                            When media_info_foreach_media_from_db, media_info_get_audio, audio_meta_destroy are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_get_audio, audio_meta_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_image_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoGetImageSpeedLog = NULL;
+       char *pszInfoDestroyImageSpeedLog = NULL;
+       image_meta_h stHandleImage = NULL;
+       filter_h stFilter = NULL;
+       g_bMediaContentCBFlag = false;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+       
+       nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+               
+       nRet = media_info_foreach_media_from_db(stFilter, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_stImage == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo Image handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoGetImageSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyImageSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_image(g_stImage, &stHandleImage);
+               MediaExecutionDelay(pszInfoGetImageSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_image", nMediaContentFailCount);
+                                                               
+               MediaGetTimeOfDay();
+               nRet = image_meta_destroy(stHandleImage);
+               MediaExecutionDelay(pszInfoDestroyImageSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "image_meta_destroy", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_image_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoGetImageSpeedLog);
+               free(pszInfoDestroyImageSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_get_audio, pszInfoGetImageSpeedLog);
+       PRINT_SPEED_LOG(audio_meta_destroy, pszInfoDestroyImageSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_image_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoGetImageSpeedLog);
+       free(pszInfoDestroyImageSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Gets Video metadata for a given media info
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_video_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function returns an image metadata handle retrieved from the media info
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets Video metadata\n
+*                                              Destroy Video metadata handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_get_video, video_meta_destroy, media_filter_destroy, media_info_destroy, media_info_insert_to_db, media_filter_create, media_filter_set_condition and media_info_foreach_media_from_db
+* @passcase                            When media_info_foreach_media_from_db, media_info_get_Video, Video_meta_destroy are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_get_Video, Video_meta_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service, Add video on device for this API test
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_video_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoGetImageSpeedLog = NULL;
+       char *pszInfoDestroyImageSpeedLog = NULL;
+       video_meta_h stHandleVideo = NULL;
+       filter_h stFilter = NULL;
+       g_bMediaContentCBFlag = false;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+               
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+       nRet = media_info_foreach_media_from_db(stFilter, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_stVideo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo Image handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoGetImageSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyImageSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_video(g_stVideo, &stHandleVideo);
+               MediaExecutionDelay(pszInfoGetImageSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_video", nMediaContentFailCount);
+                               
+               MediaGetTimeOfDay();
+               nRet = video_meta_destroy(stHandleVideo);
+               MediaExecutionDelay(pszInfoDestroyImageSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_destroy", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_video_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoGetImageSpeedLog);
+               free(pszInfoDestroyImageSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_get_audio, pszInfoGetImageSpeedLog);
+       PRINT_SPEED_LOG(audio_meta_destroy, pszInfoDestroyImageSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_video_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoGetImageSpeedLog);
+       free(pszInfoDestroyImageSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Gets the media info's storage_type
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_storage_type_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the media info's storage_type
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the media info's storage_type\n
+*                                              Close connection to content service
+* @apicovered                  media_filter_create, media_filter_set_condition, media_info_foreach_media_from_db, media_info_get_storage_type, media_filter_destroy
+* @passcase                            When media_info_foreach_media_from_db, media_info_get_storage_type are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_get_storage_type fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_storage_type_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoGetStorageSpeedLog = NULL;
+       filter_h stFilter = NULL;
+       g_bMediaContentCBFlag = false;
+       media_content_storage_e sStorageType;
+       
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+       
+       nRet = media_info_foreach_media_from_db(stFilter, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_stImage == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoGetStorageSpeedLog       = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_storage_type(g_stImage, &sStorageType);
+               MediaExecutionDelay(pszInfoGetStorageSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_storage_type", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_storage_type_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoGetStorageSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_get_storage_type, pszInfoGetStorageSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_storage_type_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoGetStorageSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Gets the number of media tags
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_tag_count_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the number of media tags for the passed filter in the given media ID from the media database
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the number of media tags\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_filter_create, media_filter_set_condition, media_filter_destroy, media_info_destroy, media_info_foreach_media_from_db, media_info_get_tag_count_from_db
+* @passcase                            When media_info_foreach_media_from_db, media_info_get_tag_count_from_db are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_get_tag_count_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_tag_count_from_db_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoGetTagCountMemLog = NULL;
+       char *pszInfoGetTagCountSpeedLog = NULL;
+       filter_h stFilter = NULL;
+       g_bMediaContentCBFlag = false;
+       int nTagCount = 0;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+       
+       nRet = media_info_foreach_media_from_db(stFilter, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_bMediaContentCBFlag == false )
+       {
+               FPRINTF("[Line: %d][%s] Callback[MediaInfoCB] failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszInfoGetTagCountMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoGetTagCountSpeedLog      = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_tag_count_from_db(g_pMediaId, NULL, &nTagCount);
+               MediaExecutionDelay(pszInfoGetTagCountSpeedLog);
+               MediaGetMemStatus(pszInfoGetTagCountMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_tag_count_from_db", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_tag_count_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoGetTagCountSpeedLog);
+               free(pszInfoGetTagCountMemLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_get_tag_count_from_db, pszInfoGetTagCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_tag_count_from_db_p, pszInfoGetTagCountMemLog);
+#endif
+       
+       free(pszInfoGetTagCountSpeedLog);
+       free(pszInfoGetTagCountMemLog);
+       return 0;
+}
+
+//& purpose: Checks whether the media is protected via drm.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_is_drm_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the media info's storage_type
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Checks whether the media is protected via drm.\n
+*                                              Close connection to content service
+* @apicovered                  media_filter_create, media_filter_set_condition, media_filter_destroy, media_info_foreach_media_from_db, media_info_is_drm
+* @passcase                            When media_info_foreach_media_from_db, media_info_is_drm are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_is_drm fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_is_drm_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoGetStorageSpeedLog = NULL;
+       filter_h stFilter = NULL;
+       g_bMediaContentCBFlag = false;
+       bool bIsDrm = false;
+       
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+       
+       nRet = media_info_foreach_media_from_db(stFilter, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_stImage == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoGetStorageSpeedLog       = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_is_drm(g_stImage, &bIsDrm);
+               MediaExecutionDelay(pszInfoGetStorageSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_is_drm", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_is_drm_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoGetStorageSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_is_drm, pszInfoGetStorageSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_is_drm_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoGetStorageSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Gets the media info's thumbnail
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_thumbnail_path_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the media info's thumbnail
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the media info's thumbnail\n
+*                                              Destroy audio metadata handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, media_info_get_thumbnail_path, media_filter_create, media_filter_set_condition, media_filter_destroy
+* @passcase                            When media_info_foreach_media_from_db, media_info_get_thumbnail_path, are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_get_thumbnail_path, fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_thumbnail_path_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoCreateThumbnailMemLog = NULL;
+       char *pszInfoGetThumbnailPathSpeedLog = NULL;
+       filter_h stFilter = NULL;
+       g_bMediaContentCBFlag = false;
+       char *pThumbnailPath = NULL;
+       
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+       
+       nRet = media_info_foreach_media_from_db(stFilter, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_stImage == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo Image handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszInfoCreateThumbnailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoGetThumbnailPathSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_thumbnail_path(g_stImage, &pThumbnailPath);
+               if (pThumbnailPath)
+               {
+                       free(pThumbnailPath);
+                       pThumbnailPath = NULL;
+               }
+               MediaExecutionDelay(pszInfoGetThumbnailPathSpeedLog);
+               MediaGetMemStatus(pszInfoCreateThumbnailMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_thumbnail_path", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_thumbnail_path_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoGetThumbnailPathSpeedLog);
+               free(pszInfoCreateThumbnailMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_get_thumbnail_path, pszInfoGetThumbnailPathSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_thumbnail_path_p, pszInfoCreateThumbnailMemLog);
+#endif
+       free(pszInfoGetThumbnailPathSpeedLog);
+       free(pszInfoCreateThumbnailMemLog);
+       return 0;
+}
+
+//& purpose: Gets path to media info
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_file_path_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function Gets path to media info
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets path to media info\n
+*                                              Destroy Video metadata handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_destroy, media_info_get_file_path, media_info_insert_to_db, media_info_foreach_media_from_db, media_info_get_file_path, media_filter_create, media_filter_set_condition, media_filter_destroy
+* @passcase                            When media_info_foreach_media_from_db, media_info_get_file_path are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_get_file_path fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_file_path_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoFilePathMemLog = NULL;
+       char *pszInfoFilePathSpeedLog = NULL;
+       char *pPath = NULL;
+       filter_h stFilter = NULL;
+       g_bMediaContentCBFlag = false;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+       
+       nRet = media_info_insert_to_db(g_strInsertPathInfo, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(stFilter, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_stImage == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo Image handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszInfoFilePathMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoFilePathSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_file_path(g_stImage, &pPath);
+               MediaExecutionDelay(pszInfoFilePathSpeedLog);
+               MediaGetMemStatus(pszInfoFilePathMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_file_path", nMediaContentFailCount);
+               if ( pPath != NULL )
+               {
+                       free (pPath);
+                       pPath = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_file_path_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoFilePathSpeedLog);
+               free(pszInfoFilePathMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_get_file_path, pszInfoFilePathSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_file_path_p, pszInfoFilePathMemLog);
+#endif
+       free(pszInfoFilePathSpeedLog);
+       free(pszInfoFilePathMemLog);
+
+       return 0;
+}
+
+//& purpose: Gets the media info's timeline
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_timeline_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the media info's timeline
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the media info's timeline\n
+*                                              Destroy Video metadata handle\n
+*                                              Close connection to content service
+* @apicovered                  media_filter_create, media_filter_set_condition, media_filter_destroy, media_info_foreach_media_from_db, media_info_get_timeline
+* @passcase                            When media_info_foreach_media_from_db, media_info_get_timeline are successful
+* @failcase                            If target API media_info_foreach_media_from_db, media_info_get_timeline fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_media_info_get_timeline_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszInfoFilePathMemLog = NULL;
+       char *pszInfoFilePathSpeedLog = NULL;
+       time_t tTimevalue = 0;
+       filter_h stFilter = NULL;
+       g_bMediaContentCBFlag = false;
+
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+       
+       nRet = media_info_foreach_media_from_db(stFilter, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_stImage == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo Image handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszInfoFilePathMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInfoFilePathSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_timeline(g_stImage, &tTimevalue);                 
+               MediaExecutionDelay(pszInfoFilePathSpeedLog);
+               MediaGetMemStatus(pszInfoFilePathMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_timeline", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_timeline_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInfoFilePathSpeedLog);
+               free(pszInfoFilePathMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_info_get_timeline, pszInfoFilePathSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_timeline_p, pszInfoFilePathMemLog);
+#endif
+       free(pszInfoFilePathSpeedLog);
+       free(pszInfoFilePathMemLog);
+
+       return 0;
+}
+//& purpose: Gets the number of bookmarks for the passed filter in the given media ID from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_bookmark_count_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the number of bookmarks for the passed filter in the given media ID from the media database
+* @scenario                            Get media info for each media from DB\n
+*                                              Get media info for each bookmark from DB\n
+*                                              Get the number of bookmarks\n
+*                                              Destroys a media bookmark
+* @apicovered                  media_info_foreach_media_from_db, media_info_foreach_bookmark_from_db, media_info_get_bookmark_count_from_db, media_bookmark_delete_from_db and media_bookmark_insert_to_db
+* @passcase                            When media_info_get_bookmark_count_from_db and media_bookmark_destroy are successful
+* @failcase                            If media_info_get_bookmark_count_from_db and media_bookmark_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. Destroys a media bookmark
+*/
+int ITc_media_content_media_info_get_bookmark_count_from_db_p(void)
+{
+       START_TEST;
+       char *pszBookmarkMemLog = NULL;
+       char *pszBookmarkCountSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nCount = 0;
+       g_bMediaContentCBFlag = false;
+       g_pMediaId = NULL;
+       time_t tAddedTime;
+       time(&tAddedTime);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB,NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       FPRINTF("[Line: %d][%s] g_pMediaId = %s\\n", __LINE__, API_NAMESPACE, g_pMediaId);
+       
+       
+       nRet = media_bookmark_insert_to_db(g_pMediaId, tAddedTime, NULL);
+       PRINT_RESULT(nRet, "media_bookmark_insert_to_db");
+       
+       g_bMediaContentCBFlag = false;
+       nRet = media_info_foreach_bookmark_from_db(g_pMediaId, NULL, MediaContentBookmarkCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_bookmark_from_db");
+       if ( g_stHandlebookmark == NULL )
+       {
+               FPRINTF("[Line: %d][%s] callback[MediaContentBookmarkCB] failed handle not initialize\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK               
+       pszBookmarkMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszBookmarkCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_bookmark_count_from_db(g_pMediaId, NULL, &nCount);
+               MediaExecutionDelay(pszBookmarkCountSpeedLog);
+               MediaGetMemStatus(pszBookmarkMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_bookmark_count_from_db", nMediaContentFailCount);
+       }
+       media_bookmark_delete_from_db(g_nBookmark_id);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_bookmark_count_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+       
+               free(pszBookmarkCountSpeedLog);
+               free(pszBookmarkMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_get_bookmark_count_from_db, pszBookmarkCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_bookmark_count_from_db_p, pszBookmarkMemLog);
+#endif
+       free(pszBookmarkCountSpeedLog);
+       free(pszBookmarkMemLog);
+       return 0;
+}
+
+
+//& purpose: Gets the mime type from media info
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_mime_type_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the mime type from media info
+* @scenario                            Get media info for each media from DB\n
+*                                              Get media info for each bookmark from DB\n
+*                                              Get the mime type from media info\n
+*                                              Destroys a media bookmark
+* @apicovered                  media_filter_create, media_filter_set_condition, media_filter_destroy, media_info_foreach_media_from_db, media_info_get_mime_type
+* @passcase                            When media_info_get_mime_type are successful
+* @failcase                            If media_info_get_mime_type fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. Destroys a media bookmark
+*/
+int ITc_media_content_media_info_get_mime_type_p(void)
+{
+       START_TEST;
+       char *pszMimeTypeMemLog = NULL;
+       char *pszMimeTypeSpeedLog = NULL;
+       char *pMimeType = NULL;
+       filter_h stFilter = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_bMediaContentCBFlag = false;
+                       
+       nRet = media_filter_create(&stFilter);
+       PRINT_RESULT(nRet, "media_filter_create");
+       
+       nRet = media_filter_set_condition(stFilter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       PRINT_RESULT(nRet, "media_filter_set_condition");
+       
+       nRet = media_info_foreach_media_from_db(stFilter, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_bMediaContentCBFlag == false )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK               
+       pszMimeTypeMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMimeTypeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               FPRINTF("[Line: %d][%s] callback called. Got media handle\\n", __LINE__, API_NAMESPACE);
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_mime_type(g_stImage, &pMimeType);
+               MediaExecutionDelay(pszMimeTypeSpeedLog);
+               MediaGetMemStatus(pszMimeTypeMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_mime_type", nMediaContentFailCount);
+               if ( pMimeType != NULL )
+               {
+                       free(pMimeType);
+                       pMimeType = NULL;
+               }
+       }
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_mime_type_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+       
+               free(pszMimeTypeSpeedLog);
+               free(pszMimeTypeMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_get_mime_type, pszMimeTypeSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_mime_type_p, pszMimeTypeMemLog);
+#endif
+       free(pszMimeTypeSpeedLog);
+       free(pszMimeTypeMemLog);
+       return 0;
+}
+
+//& purpose: Gets the number of bookmarks for the passed filter in the given media ID from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_get_media_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the number of bookmarks for the passed filter in the given media ID from the media database
+* @scenario                            Get media info for each media from DB\n
+*                                              Get media info for each bookmark from DB\n
+*                                              Get the number of bookmarks\n
+*                                              Destroys a media bookmark
+* @apicovered                  media_info_foreach_media_from_db, media_info_get_media_from_db, media_info_destroy
+* @passcase                            When media_info_get_media_from_db and media_info_destroy are successful
+* @failcase                            If media_info_get_media_from_db and media_info_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_media_info_get_media_from_db_p(void)
+{
+       START_TEST;
+       char *pszGetMediaFromDBMemLog = NULL;
+       char *pszGetMediaFromDBSpeedLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_bMediaContentCBFlag = false;
+       media_info_h stHandleMedia = NULL;
+       g_pMediaId = NULL;
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB,NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       FPRINTF("[Line: %d][%s] g_pMediaId = %s\\n", __LINE__, API_NAMESPACE, g_pMediaId);
+       
+       if ( g_bMediaContentCBFlag == false )
+       {
+               FPRINTF("[Line: %d][%s] Callback[MediaInfoCB] failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK               
+       pszGetMediaFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetMediaFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               FPRINTF("[Line: %d][%s] callback called. Got media handle\\n", __LINE__, API_NAMESPACE);
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_get_media_from_db(g_pMediaId, &stHandleMedia);
+               MediaExecutionDelay(pszGetMediaFromDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_get_bookmark_count_from_db", nMediaContentFailCount);
+                                               
+               MediaGetTimeOfDay();
+               nRet = media_info_destroy(stHandleMedia);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszGetMediaFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_get_media_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetMediaFromDBSpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszGetMediaFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_get_media_from_db, pszGetMediaFromDBSpeedLog);
+       PRINT_SPEED_LOG(media_info_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_get_media_from_db_p, pszGetMediaFromDBMemLog);
+#endif
+       free(pszGetMediaFromDBSpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszGetMediaFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Refreshes the media metadata to media database.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_refresh_metadata_to_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Refreshes the media metadata to media database.
+* @scenario                            Get media info for each media from DB\n
+*                                              Get media info for each bookmark from DB\n
+*                                              Refreshes the media metadata to media database
+* @apicovered                  media_info_foreach_media_from_db and media_info_refresh_metadata_to_db
+* @passcase                            When media_info_refresh_metadata_to_db and media_info_foreach_media_from_db are successful
+* @failcase                            If media_info_refresh_metadata_to_db and media_info_foreach_media_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_media_info_refresh_metadata_to_db_p(void)
+{
+       START_TEST;
+       char *pszGetMediaFromDBMemLog = NULL;
+       char *pszGetMediaFromDBSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_bMediaContentCBFlag = false;
+       g_pMediaId = NULL;
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB,NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       FPRINTF("[Line: %d][%s] g_pMediaId = %s\\n", __LINE__, API_NAMESPACE,g_pMediaId);
+       
+       if ( g_bMediaContentCBFlag == false )
+       {
+               FPRINTF("[Line: %d][%s] Callback[MediaInfoCB] failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK               
+       pszGetMediaFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetMediaFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               FPRINTF("[Line: %d][%s] callback called. Got media handle\\n", __LINE__, API_NAMESPACE);
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_refresh_metadata_to_db(g_pMediaId);
+               MediaExecutionDelay(pszGetMediaFromDBSpeedLog);
+               MediaGetMemStatus(pszGetMediaFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_refresh_metadata_to_db", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_refresh_metadata_to_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetMediaFromDBSpeedLog);
+               free(pszGetMediaFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_get_media_from_db, pszGetMediaFromDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_refresh_metadata_to_db_p, pszGetMediaFromDBMemLog);
+#endif
+       free(pszGetMediaFromDBSpeedLog);
+       free(pszGetMediaFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Inserts the burst shot images into the media database, asynchronously.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_media_info_insert_burstshot_to_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function insert burst images into the content storage.
+* @scenario                            Set path array to the burst shot images\n
+*                                              Inserts the burst shot images into the media database, asynchronously.
+* @apicovered                  media_info_insert_burst_shot_to_db
+* @passcase                            When media_info_insert_burst_shot_to_db and are successful
+* @failcase                            If media_info_insert_burst_shot_to_db and fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. InsertBurstShotCB callback should call
+*/
+int ITc_media_content_media_info_insert_burstshot_to_db_p(void)
+{
+       START_TEST;
+       char *pszInsertBurstDBMemLog = NULL;
+       char *pszInsertBurstDBSpeedLog = NULL;
+       char *pPathArray[4];
+       int nArrayLen = 4, i=0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0 , nTimeoutId = 0;
+       g_bMediaContentCBFlag = false;
+       
+       for (i = 0; i < 4; i++) {
+               char filepath[255] = {0};
+               snprintf(filepath, sizeof(filepath), "%s/test%d.jpg", g_strStorageInternalLocation, i);
+               pPathArray[i] = strdup(filepath);
+               FPRINTF("[Line: %d][%s] pPathArray = %s\\n", __LINE__, API_NAMESPACE,pPathArray[i]);
+       }
+#if MEMORY_CHECK               
+       pszInsertBurstDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszInsertBurstDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_info_insert_burst_shot_to_db((const char **) pPathArray, nArrayLen, InsertBurstShotCB, NULL);
+               for (i = 0;i < 4;i++)
+               {
+                       free(pPathArray[i]);
+               }
+               MediaExecutionDelay(pszInsertBurstDBSpeedLog);
+               MediaGetMemStatus(pszInsertBurstDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_info_insert_burst_shot_to_db", nMediaContentFailCount);
+               RUN_POLLING_LOOP;
+               if ( !g_bMediaContentCBFlag )
+               {
+                       FPRINTF("[Line: %d][%s] InsertBurstShotCB callback failed\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_media_info_insert_burstshot_to_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszInsertBurstDBSpeedLog);
+               free(pszInsertBurstDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_info_insert_burst_shot_to_db, pszInsertBurstDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_media_info_insert_burstshot_to_db_p, pszInsertBurstDBMemLog);
+#endif
+       free(pszInsertBurstDBSpeedLog);
+       free(pszInsertBurstDBMemLog);
+       return 0;
+}
+
+/*
+****************************** Media Playlist *****************************
+*/
+
+//& purpose: Inserts a new playlist with given name into the media database.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_foreach_playlist_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Inserts a new playlist with given name into the media database.
+* @scenario                            Get media info for each media from DB\n
+*                                              Insert playlist to DB\n
+*                                              Destroys a playlist handle
+* @apicovered                  media_info_insert_to_db, media_playlist_insert_to_db, media_playlist_get_playlist_id, media_playlist_foreach_playlist_from_db, media_playlist_delete_from_db, media_playlist_destroy and media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db is are successful
+* @failcase                            If media_info_foreach_media_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_playlist_foreach_playlist_from_db_p(void)
+{
+       START_TEST;
+       char *pszPlaylistForeachPlaylistFromDBMemLog = NULL;
+       char *pszPlaylistForeachPlaylistFromDBSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nPlaylistId = 0;
+       
+       media_playlist_h stHandlePlaylist = NULL;
+       media_info_h stHandleInfo = NULL;
+       g_pMediaAudioId = NULL;
+       
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_playlist_insert_to_db("Playlist Foreach", &stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_insert_to_db");
+       
+       nRet = media_playlist_get_playlist_id(stHandlePlaylist, &nPlaylistId);
+       PRINT_RESULT(nRet, "media_playlist_get_playlist_id");
+               
+#if MEMORY_CHECK               
+       pszPlaylistForeachPlaylistFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszPlaylistForeachPlaylistFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               FPRINTF("[Line: %d][%s] callback called. Got media handle\\n", __LINE__, API_NAMESPACE);
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_foreach_playlist_from_db(NULL, PlaylistCB, NULL);
+               MediaExecutionDelay(pszPlaylistForeachPlaylistFromDBSpeedLog);
+               MediaGetMemStatus(pszPlaylistForeachPlaylistFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_foreach_playlist_from_db", nMediaContentFailCount);
+       }
+       media_playlist_delete_from_db(nPlaylistId);
+       media_info_destroy(stHandleInfo);
+       media_playlist_destroy(stHandlePlaylist);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_foreach_playlist_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszPlaylistForeachPlaylistFromDBSpeedLog);
+               free(pszPlaylistForeachPlaylistFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_playlist_add_media, pszPlaylistForeachPlaylistFromDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_foreach_playlist_from_db_p, pszPlaylistForeachPlaylistFromDBMemLog);
+#endif
+       free(pszPlaylistForeachPlaylistFromDBSpeedLog);
+       free(pszPlaylistForeachPlaylistFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Inserts a new playlist with given name into the media database.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_insert_to_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Inserts a new playlist with given name into the media database.
+* @scenario                            Get media info for each media from DB\n
+*                                              Insert playlist to DB\n
+*                                              Destroys a playlist handle
+* @apicovered                  media_playlist_insert_to_db, media_playlist_get_playlist_id, media_playlist_delete_from_db and media_playlist_destroy
+* @passcase                            When media_playlist_insert_to_db, media_info_foreach_media_from_db and media_playlist_destroy are successful
+* @failcase                            If media_playlist_insert_to_db, media_info_foreach_media_from_db and media_playlist_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_playlist_insert_to_db_p(void)
+{
+       START_TEST;
+       char *pszPlaylistInsertToDBMemLog = NULL;
+       char *pszPlaylistInsertToDBSpeedLog = NULL;
+       char *pszPlaylistDestroySpeedLog = NULL;
+       char *pszPlaylistIDSpeedLog = NULL;
+       char *pszPlaylistDeleteSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nPlaylistId = 0;
+       media_playlist_h stHandlePlaylist = NULL;
+
+#if MEMORY_CHECK               
+       pszPlaylistInsertToDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszPlaylistInsertToDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistDestroySpeedLog      = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistIDSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistDeleteSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               FPRINTF("[Line: %d][%s] callback called. Got media handle\\n", __LINE__, API_NAMESPACE);
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_insert_to_db("playlists", &stHandlePlaylist);
+               MediaExecutionDelay(pszPlaylistInsertToDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_playlist_get_playlist_id(stHandlePlaylist, &nPlaylistId);
+               MediaExecutionDelay(pszPlaylistIDSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_get_playlist_id", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_playlist_delete_from_db(nPlaylistId);
+               MediaExecutionDelay(pszPlaylistDeleteSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_delete_from_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_playlist_destroy(stHandlePlaylist);
+               MediaExecutionDelay(pszPlaylistDestroySpeedLog);
+               MediaGetMemStatus(pszPlaylistInsertToDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_destroy", nMediaContentFailCount);
+       }
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_insert_to_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszPlaylistInsertToDBSpeedLog);
+               free(pszPlaylistDestroySpeedLog);
+               free(pszPlaylistIDSpeedLog);
+               free(pszPlaylistDeleteSpeedLog);
+               free(pszPlaylistInsertToDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_playlist_add_media, pszPlaylistInsertToDBSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_destroy, pszPlaylistDestroySpeedLog);
+       PRINT_SPEED_LOG(media_playlist_get_playlist_id, pszPlaylistIDSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_delete_from_db, pszPlaylistDeleteSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_insert_to_db_p, pszPlaylistInsertToDBMemLog);
+#endif
+       free(pszPlaylistInsertToDBSpeedLog);
+       free(pszPlaylistDestroySpeedLog);
+       free(pszPlaylistIDSpeedLog);
+       free(pszPlaylistDeleteSpeedLog);
+       free(pszPlaylistInsertToDBMemLog);
+       return 0;
+}
+
+//& purpose: Adds a new media info to the playlist
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_add_media_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Adds a new media info to the playlist
+* @scenario                            Get media info for each media from DB\n
+*                                              Insert play-list to DB\n
+*                                              Adds a new media info to the playlist
+* @apicovered                  media_info_insert_to_db, media_playlist_insert_to_db, media_playlist_get_playlist_id, media_info_foreach_media_from_db, media_playlist_add_media, media_playlist_update_to_db, media_playlist_delete_from_db, media_playlist_destroy, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db and media_playlist_add_media are successful
+* @failcase                            If media_info_foreach_media_from_db and media_playlist_add_media fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_playlist_add_media_p(void)
+{
+       START_TEST;
+       char *pszPlaylistAddMediaMemLog = NULL;
+       char *pszPlaylistAddMediaSpeedLog = NULL;
+       char *pszPlaylistUpdateMediaSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nPlaylistId = 0;
+       media_playlist_h stHandlePlaylist = NULL;
+       media_info_h stHandleInfo = NULL;
+       g_pMediaAudioId = NULL;
+       
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_playlist_insert_to_db("new playlist add", &stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_insert_to_db");
+       
+       nRet = media_playlist_get_playlist_id(stHandlePlaylist, &nPlaylistId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] Pmedia_playlist_get_playlist_id failed\\n", __LINE__, API_NAMESPACE);
+               media_playlist_destroy(stHandlePlaylist);
+               return 1;
+       }
+       FPRINTF("[Line: %d][%s] Playlist ID = %d\\n", __LINE__, API_NAMESPACE,nPlaylistId);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pMediaAudioId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo Image handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               media_playlist_delete_from_db(nPlaylistId);
+               media_playlist_destroy(stHandlePlaylist);
+               media_info_destroy(stHandleInfo);
+               return 1;
+       }
+       
+#if MEMORY_CHECK               
+       pszPlaylistAddMediaMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszPlaylistAddMediaSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistUpdateMediaSpeedLog  = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_add_media(stHandlePlaylist, g_pMediaAudioId);
+               MediaExecutionDelay(pszPlaylistAddMediaSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_add_media", nMediaContentFailCount);
+
+               MediaGetTimeOfDay();
+               nRet = media_playlist_update_to_db(stHandlePlaylist);
+               MediaExecutionDelay(pszPlaylistUpdateMediaSpeedLog);
+               MediaGetMemStatus(pszPlaylistAddMediaMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_update_to_db", nMediaContentFailCount);
+       }
+       media_playlist_delete_from_db(nPlaylistId);
+       media_playlist_destroy(stHandlePlaylist);
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_add_media_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszPlaylistAddMediaSpeedLog);
+               free(pszPlaylistUpdateMediaSpeedLog);
+               free(pszPlaylistAddMediaMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_playlist_add_media, pszPlaylistAddMediaSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_update_to_db, pszPlaylistUpdateMediaSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_add_media_p, pszPlaylistAddMediaMemLog);
+#endif
+       free(pszPlaylistAddMediaSpeedLog);
+       free(pszPlaylistUpdateMediaSpeedLog);
+       free(pszPlaylistAddMediaMemLog);
+       return 0;
+}
+
+//& purpose: Clones playlist handle
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function copies the media playlist handle from a source to destination.
+* @scenario                            Get media info for each media from DB\n
+*                                              Clones playlist handle\n
+*                                              Destroys a playlist handle
+* @apicovered                  media_info_insert_to_db, media_playlist_insert_to_db, media_playlist_get_playlist_id, media_playlist_clone, media_playlist_destroy and media_info_destroy
+* @passcase                            When media_playlist_foreach_playlist_from_db, media_playlist_clone, media_playlist_destroy are successful
+* @failcase                            If media_playlist_foreach_playlist_from_db, media_playlist_clone, media_playlist_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. The created handle must be released with media_playlist_destroy
+*/
+int ITc_media_content_playlist_clone_p(void)
+{
+       START_TEST;
+       char *pszPlaylistAddMediaMemLog = NULL;
+       char *pszPlaylistAddMediaSpeedLog = NULL;
+       char *pszPlaylistUpdateMediaSpeedLog = NULL;
+       media_playlist_h stHandlePlaylist = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nPlaylistId = 0;
+       g_stHandlePlaylist = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_playlist_insert_to_db("new playlist clone", &g_stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_insert_to_db");
+       
+       nRet = media_playlist_get_playlist_id(g_stHandlePlaylist, &nPlaylistId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] Pmedia_playlist_get_playlist_id failed\\n", __LINE__, API_NAMESPACE);
+               media_playlist_destroy(g_stHandlePlaylist);
+               media_info_destroy(stHandleInfo);
+               return 1;
+       }
+       FPRINTF("[Line: %d][%s] Playlist ID = %d\\n", __LINE__, API_NAMESPACE,nPlaylistId);
+       
+#if MEMORY_CHECK               
+       pszPlaylistAddMediaMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszPlaylistAddMediaSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistUpdateMediaSpeedLog  = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_clone(&stHandlePlaylist, g_stHandlePlaylist);
+               MediaExecutionDelay(pszPlaylistAddMediaSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_clone", nMediaContentFailCount);
+
+               MediaGetTimeOfDay();
+               nRet = media_playlist_destroy(stHandlePlaylist);
+               MediaExecutionDelay(pszPlaylistUpdateMediaSpeedLog);
+               MediaGetMemStatus(pszPlaylistAddMediaMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_destroy", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       media_playlist_delete_from_db(nPlaylistId);
+       media_playlist_destroy(g_stHandlePlaylist);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_clone_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszPlaylistAddMediaSpeedLog);
+               free(pszPlaylistUpdateMediaSpeedLog);
+               free(pszPlaylistAddMediaMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_playlist_add_media, pszPlaylistAddMediaSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_destroy, pszPlaylistUpdateMediaSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_clone_p, pszPlaylistAddMediaMemLog);
+#endif
+       free(pszPlaylistAddMediaSpeedLog);
+       free(pszPlaylistUpdateMediaSpeedLog);
+       free(pszPlaylistAddMediaMemLog);
+       return 0;
+}
+
+//& purpose: Gets media playlist's ID
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_get_playlist_id_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets media playlist's ID
+* @scenario                            Get media info for each media from DB\n
+*                                              Clones playlist handle\n
+*                                              Gets media playlist's ID\n
+*                                              Destroys a playlist handle
+* @apicovered                  media_playlist_insert_to_db, media_playlist_clone, media_playlist_get_playlist_id, media_playlist_delete_from_db and media_playlist_destroy,
+* @passcase                            When media_playlist_foreach_playlist_from_db, media_playlist_clone, media_playlist_get_playlist_id, media_playlist_destroy are successful
+* @failcase                            If media_playlist_foreach_playlist_from_db, media_playlist_clone, media_playlist_get_playlist_id, media_playlist_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. The created handle must be released with media_playlist_destroy
+*/
+int ITc_media_content_playlist_get_playlist_id_p(void)
+{
+       START_TEST;
+       char *pszPlaylistAddMediaMemLog = NULL;
+       char *pszPlaylistIDSpeedLog = NULL;
+       media_playlist_h stHandlePlaylist = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       int nPlaylistId=0;
+
+       nRet = media_playlist_insert_to_db("new playlist get id", &stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_insert_to_db");
+       
+#if MEMORY_CHECK               
+       pszPlaylistAddMediaMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszPlaylistIDSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_get_playlist_id(stHandlePlaylist, &nPlaylistId);
+               MediaExecutionDelay(pszPlaylistIDSpeedLog);
+               MediaGetMemStatus(pszPlaylistAddMediaMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_get_playlist_id", nMediaContentFailCount);
+       }
+       media_playlist_delete_from_db(nPlaylistId);
+       media_playlist_destroy(stHandlePlaylist);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_get_playlist_id_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+
+               free(pszPlaylistIDSpeedLog);
+               free(pszPlaylistAddMediaMemLog);
+               return 1;
+       }
+#if SPEED_CHECK                
+       PRINT_SPEED_LOG(media_playlist_get_playlist_id, pszPlaylistIDSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_get_playlist_id_p, pszPlaylistAddMediaMemLog);
+#endif
+
+       free(pszPlaylistIDSpeedLog);
+       free(pszPlaylistAddMediaMemLog);
+       return 0;
+}
+
+//& purpose: Iterates through the media files in the given audio playlist from the media database.
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_foreach_media_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Iterate through the media files with optional filter in the given audio playlist from the media database.
+* @scenario                            Get media info for each media from DB\n
+*                                              Iterate through the media files
+* @apicovered                  media_playlist_insert_to_db, media_info_insert_to_db, media_info_foreach_media_from_db, media_playlist_add_media, media_playlist_get_playlist_id, media_playlist_update_to_db, media_playlist_foreach_media_from_db, media_playlist_delete_from_db, media_playlist_destroy and media_info_destroy
+* @passcase                            When media_playlist_foreach_playlist_from_db, media_playlist_foreach_media_from_db are successful
+* @failcase                            If media_playlist_foreach_playlist_from_db, media_playlist_foreach_media_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_playlist_foreach_media_from_db_p(void)
+{
+       START_TEST;
+       char *pszPlaylistForeachMediaFromDBMemLog = NULL;
+       char *pszPlaylistForeachMediaFromDBSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       int nPlaylistId = 0;
+       media_playlist_h stHandlePlaylist;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_playlist_insert_to_db("play-list media", &stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_insert_to_db");
+       
+       nRet = media_playlist_get_playlist_id(stHandlePlaylist, &nPlaylistId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] Pmedia_playlist_get_playlist_id failed\\n", __LINE__, API_NAMESPACE);
+               media_playlist_destroy(stHandlePlaylist);
+               return 1;
+       }
+       FPRINTF("[Line: %d][%s] Playlist ID = %d\\n", __LINE__, API_NAMESPACE,nPlaylistId);
+       
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pMediaAudioId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Value for MediaInfo handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               media_info_destroy(stHandleInfo);
+               return 1;
+       }
+       
+       nRet = media_playlist_add_media(stHandlePlaylist, g_pMediaAudioId);
+       PRINT_RESULT(nRet, "media_playlist_add_media");
+       
+       nRet = media_playlist_update_to_db(stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_update_to_db");
+#if MEMORY_CHECK               
+       pszPlaylistForeachMediaFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszPlaylistForeachMediaFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_foreach_media_from_db(nPlaylistId, NULL, PlaylistItemCB, NULL);
+               MediaExecutionDelay(pszPlaylistForeachMediaFromDBSpeedLog);
+               MediaGetMemStatus(pszPlaylistForeachMediaFromDBMemLog);
+                               
+               PRINT_RESULT_LOOP(nRet, "media_playlist_foreach_media_from_db", nMediaContentFailCount);
+       }
+       media_playlist_delete_from_db(nPlaylistId);
+       media_playlist_destroy(stHandlePlaylist);
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_foreach_media_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszPlaylistForeachMediaFromDBSpeedLog);
+               free(pszPlaylistForeachMediaFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_playlist_foreach_media_from_db, pszPlaylistForeachMediaFromDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_foreach_media_from_db_p, pszPlaylistForeachMediaFromDBMemLog);
+#endif
+       free(pszPlaylistForeachMediaFromDBSpeedLog);
+       free(pszPlaylistForeachMediaFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Gets the number of media info for the given playlist present in the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_get_media_count_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Iterate through the media files with optional filter in the given audio playlist from the media database.
+* @scenario                            Get media info for each media from DB\n
+*                                              Get the number of media info for the given playlist present in the media database
+* @apicovered                  media_playlist_insert_to_db, media_playlist_insert_to_db, media_playlist_get_media_count_from_db, media_playlist_delete_from_db and media_playlist_destroy
+* @passcase                            When media_playlist_foreach_playlist_from_db, media_playlist_get_media_count_from_db are successful
+* @failcase                            If media_playlist_foreach_playlist_from_db, media_playlist_get_media_count_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_playlist_get_media_count_from_db_p(void)
+{
+       START_TEST;
+       char *pszPlaylistForeachMediaFromDBMemLog = NULL;
+       char *pszPlaylistForeachMediaFromDBSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       int nMediaCount = 0, nPlaylistId = 0;
+       media_playlist_h stHandlePlaylist;
+       
+       nRet = media_playlist_insert_to_db("new playlist count", &stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_insert_to_db");
+       
+       nRet = media_playlist_get_playlist_id(stHandlePlaylist, &nPlaylistId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] media_playlist_get_playlist_id failed\\n", __LINE__, API_NAMESPACE);
+               media_playlist_destroy(stHandlePlaylist);
+               return 1;
+       }
+       FPRINTF("[Line: %d][%s] Playlist ID = %d\\n", __LINE__, API_NAMESPACE,nPlaylistId);
+       
+#if MEMORY_CHECK               
+       pszPlaylistForeachMediaFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszPlaylistForeachMediaFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_get_media_count_from_db(nPlaylistId, NULL, &nMediaCount);
+               MediaExecutionDelay(pszPlaylistForeachMediaFromDBSpeedLog);
+               MediaGetMemStatus(pszPlaylistForeachMediaFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_get_media_count_from_db", nMediaContentFailCount);
+       }
+       media_playlist_delete_from_db(nPlaylistId);
+       media_playlist_destroy(stHandlePlaylist);
+
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_get_media_count_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszPlaylistForeachMediaFromDBSpeedLog);
+               free(pszPlaylistForeachMediaFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_playlist_get_media_count_from_db, pszPlaylistForeachMediaFromDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_get_media_count_from_db_p, pszPlaylistForeachMediaFromDBMemLog);
+#endif
+       free(pszPlaylistForeachMediaFromDBSpeedLog);
+       free(pszPlaylistForeachMediaFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get a name of the playlist
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_set_get_name_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get a name of the playlist
+* @scenario                            Iterate through the media playlists with optional filter from the media database\n
+*                                              Set a name of the playlist\n
+*                                              Update a name of the playlist\n
+*                                              Get a name of the playlist
+* @apicovered                  media_playlist_insert_to_db, media_playlist_delete_from_db, media_playlist_get_playlist_id, media_playlist_set_name, media_playlist_update_to_db, media_playlist_get_name and media_playlist_destroy
+* @passcase                            When media_playlist_foreach_playlist_from_db, media_playlist_set_name, media_playlist_update_to_db, media_playlist_get_name are successful
+* @failcase                            If media_playlist_foreach_playlist_from_db, media_playlist_set_name, media_playlist_update_to_db, media_playlist_get_name fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_playlist_set_get_name_p(void)
+{
+       START_TEST;
+       char *pszPlaylistSetGetNameMemLog = NULL;
+       char *pszPlaylistSetNameSpeedLog = NULL;
+       char *pszPlaylistGetNameSpeedLog = NULL;
+       char *pszPlaylistUpdateSpeedLog = NULL;
+       const char *pPlaylistName = "new playlist set";
+       media_playlist_h stHandlePlaylist;
+       char *pGetPlaylistName = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nPlaylistId = 0;
+
+       nRet = media_playlist_insert_to_db("new playlist gnmae", &stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_insert_to_db");
+       
+       nRet = media_playlist_get_playlist_id(stHandlePlaylist, &nPlaylistId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] media_playlist_get_playlist_id failed\\n", __LINE__, API_NAMESPACE);
+               media_playlist_destroy(stHandlePlaylist);
+               return 1;
+       }
+       FPRINTF("[Line: %d][%s] Playlist ID = %d\\n", __LINE__, API_NAMESPACE,nPlaylistId);
+       
+#if MEMORY_CHECK               
+       pszPlaylistSetGetNameMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszPlaylistSetNameSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistGetNameSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_set_name(stHandlePlaylist, pPlaylistName);
+               MediaExecutionDelay(pszPlaylistSetNameSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_set_name", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_playlist_update_to_db(stHandlePlaylist);
+               MediaExecutionDelay(pszPlaylistUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_update_to_db", nMediaContentFailCount);
+               usleep(2000000);
+                               
+               MediaGetTimeOfDay();
+               nRet = media_playlist_get_name(stHandlePlaylist, &pGetPlaylistName);
+               if (NULL ==pGetPlaylistName)
+               {
+                       FPRINTF("[Line: %d][%s] pGetPlaylistName is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               MediaExecutionDelay(pszPlaylistGetNameSpeedLog);
+               MediaGetMemStatus(pszPlaylistSetGetNameMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_get_name", nMediaContentFailCount);
+       
+               if ( strcmp( pGetPlaylistName, pPlaylistName ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pGetPlaylistName in media_playlist_get_name is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       
+               if ( pGetPlaylistName != NULL )
+               {
+                       free(pGetPlaylistName);
+                       pGetPlaylistName = NULL;
+               }
+       }
+       media_playlist_delete_from_db(nPlaylistId);
+       media_playlist_destroy(stHandlePlaylist);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_set_get_name_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszPlaylistSetNameSpeedLog);
+               free(pszPlaylistUpdateSpeedLog);
+               free(pszPlaylistGetNameSpeedLog);
+               free(pszPlaylistSetGetNameMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_playlist_set_name, pszPlaylistSetNameSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_update_to_db, pszPlaylistUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_get_name, pszPlaylistGetNameSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_set_get_name_p, pszPlaylistSetGetNameMemLog);
+#endif
+       free(pszPlaylistSetNameSpeedLog);
+       free(pszPlaylistUpdateSpeedLog);
+       free(pszPlaylistGetNameSpeedLog);
+       free(pszPlaylistSetGetNameMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get the playing order in the playlist
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_set_get_play_order_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get a name of the playlist
+* @scenario                            Iterate through the media playlists with optional filter from the media database\n
+*                                              Set the playing order in the playlist\n
+*                                              Update the playing order in the playlist\n
+*                                              Get the playing order in the playlist
+* @apicovered                  media_playlist_insert_to_db, media_playlist_get_playlist_id, media_playlist_set_play_order, media_playlist_update_to_db, media_playlist_get_play_order, media_playlist_delete_from_db and media_playlist_destroy
+* @passcase                            When media_playlist_foreach_playlist_from_db, media_playlist_set_play_order, media_playlist_update_to_db, media_playlist_get_play_order are successful
+* @failcase                            If media_playlist_foreach_playlist_from_db, media_playlist_set_play_order, media_playlist_update_to_db, media_playlist_get_play_order fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_playlist_set_get_play_order_p(void)
+{
+       START_TEST;
+       char *pszPlaylistSetGetNameMemLog = NULL;
+       char *pszPlaylistSetNameSpeedLog = NULL;
+       char *pszPlaylistGetNameSpeedLog = NULL;
+       char *pszPlaylistUpdateSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       int nPlayOrder = 0, nGetPlayOrder=0, nPlaylistId = 0;
+       media_playlist_h stHandlePlaylist;
+       
+       nRet = media_playlist_insert_to_db("new playlist order", &stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_insert_to_db");
+       
+       nRet = media_playlist_get_playlist_id(stHandlePlaylist, &nPlaylistId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] media_playlist_get_playlist_id failed\\n", __LINE__, API_NAMESPACE);
+               media_playlist_destroy(stHandlePlaylist);
+               return 1;
+       }
+       FPRINTF("[Line: %d][%s] Playlist ID = %d\\n", __LINE__, API_NAMESPACE,nPlaylistId);
+       
+#if MEMORY_CHECK               
+       pszPlaylistSetGetNameMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszPlaylistSetNameSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistGetNameSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_set_play_order(stHandlePlaylist, nPlaylistId, nPlayOrder);
+               MediaExecutionDelay(pszPlaylistSetNameSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_set_play_order", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_playlist_update_to_db(stHandlePlaylist);
+               MediaExecutionDelay(pszPlaylistUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_update_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_playlist_get_play_order(stHandlePlaylist, nPlaylistId, &nGetPlayOrder);
+               MediaExecutionDelay(pszPlaylistGetNameSpeedLog);
+               MediaGetMemStatus(pszPlaylistSetGetNameMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_get_play_order", nMediaContentFailCount);
+
+               if ( nGetPlayOrder != nPlayOrder )
+               {
+                       FPRINTF("[Line: %d][%s] nGetPlayOrder in media_playlist_get_play_order is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       media_playlist_delete_from_db(nPlaylistId);
+       media_playlist_destroy(stHandlePlaylist);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_set_get_play_order_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszPlaylistSetNameSpeedLog);
+               free(pszPlaylistUpdateSpeedLog);
+               free(pszPlaylistGetNameSpeedLog);
+               free(pszPlaylistSetGetNameMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_playlist_set_play_order, pszPlaylistSetNameSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_update_to_db, pszPlaylistUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_get_play_order, pszPlaylistGetNameSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_set_get_play_order_p, pszPlaylistSetGetNameMemLog);
+#endif
+       free(pszPlaylistSetNameSpeedLog);
+       free(pszPlaylistUpdateSpeedLog);
+       free(pszPlaylistGetNameSpeedLog);
+       free(pszPlaylistSetGetNameMemLog);
+       return 0;
+}
+
+//& purpose: Set/Get a thumbnail path of the playlist
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_set_get_thumbnail_path_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get a name of the playlist
+* @scenario                            Iterate through the media playlists with optional filter from the media database\n
+*                                              Set thumbnail path of the playlist\n
+*                                              Update thumbnail path of the playlist\n
+*                                              Get thumbnail path of the playlist
+* @apicovered                  media_playlist_insert_to_db, media_playlist_get_playlist_id, media_playlist_delete_from_db, media_playlist_set_thumbnail_path, media_playlist_update_to_db, media_playlist_get_thumbnail_path and media_playlist_destroy
+* @passcase                            When media_playlist_foreach_playlist_from_db, media_playlist_set_thumbnail_path, media_playlist_update_to_db, media_playlist_get_thumbnail_path are successful
+* @failcase                            If media_playlist_foreach_playlist_from_db, media_playlist_set_thumbnail_path, media_playlist_update_to_db, media_playlist_get_thumbnail_path fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_playlist_set_get_thumbnail_path_p(void)
+{
+       START_TEST;
+       char *pszPlaylistSetGetNameMemLog = NULL;
+       char *pszPlaylistSetNameSpeedLog = NULL;
+       char *pszPlaylistGetNameSpeedLog = NULL;
+       char *pszPlaylistUpdateSpeedLog = NULL;
+       media_playlist_h stHandlePlaylist;
+       const char *pThumbnailPath = g_strInsertPath;
+       char *pGetThumbnailPath = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nPlaylistId = 0;
+               
+       nRet = media_playlist_insert_to_db("new playlist thumnail", &stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_insert_to_db");
+       
+       nRet = media_playlist_get_playlist_id(stHandlePlaylist, &nPlaylistId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] media_playlist_get_playlist_id failed\\n", __LINE__, API_NAMESPACE);
+               media_playlist_destroy(stHandlePlaylist);
+               return 1;
+       }
+       FPRINTF("[Line: %d][%s] Playlist ID = %d\\n", __LINE__, API_NAMESPACE,nPlaylistId);
+       
+#if MEMORY_CHECK               
+       pszPlaylistSetGetNameMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszPlaylistSetNameSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistGetNameSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_set_thumbnail_path(stHandlePlaylist, pThumbnailPath);
+               MediaExecutionDelay(pszPlaylistSetNameSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_set_thumbnail_path", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_playlist_update_to_db(stHandlePlaylist);
+               MediaExecutionDelay(pszPlaylistUpdateSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_update_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_playlist_get_thumbnail_path(stHandlePlaylist, &pGetThumbnailPath);
+               if (NULL ==pGetThumbnailPath)
+               {
+                       FPRINTF("[Line: %d][%s] pGetThumbnailPath is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               MediaExecutionDelay(pszPlaylistGetNameSpeedLog);
+               MediaGetMemStatus(pszPlaylistSetGetNameMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_get_play_order", nMediaContentFailCount);
+                       
+               if ( strcmp( pGetThumbnailPath, pThumbnailPath ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] pGetThumbnailPath in media_playlist_get_thumbnail_path is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       
+               if ( pGetThumbnailPath != NULL )
+               {
+                       free(pGetThumbnailPath);
+                       pGetThumbnailPath = NULL;
+               }
+       }
+       
+       media_playlist_delete_from_db (nPlaylistId);
+       media_playlist_destroy(stHandlePlaylist);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_set_get_thumbnail_path_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszPlaylistSetNameSpeedLog);
+               free(pszPlaylistUpdateSpeedLog);
+               free(pszPlaylistGetNameSpeedLog);
+               free(pszPlaylistSetGetNameMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_playlist_set_thumbnail_path, pszPlaylistSetNameSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_update_to_db, pszPlaylistUpdateSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_get_thumbnail_path, pszPlaylistGetNameSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_set_get_thumbnail_path_p, pszPlaylistSetGetNameMemLog);
+#endif
+       free(pszPlaylistSetNameSpeedLog);
+       free(pszPlaylistUpdateSpeedLog);
+       free(pszPlaylistGetNameSpeedLog);
+       free(pszPlaylistSetGetNameMemLog);
+       return 0;
+}
+
+//& purpose: Gets the media playlist from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_get_playlist_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function creates a new media playlist handle from the media database by the given playlist_id
+* @scenario                            Iterate through the media playlists with optional filter from the media database\n
+*                                              Insert Playlist to DB\n
+*                                              Get playlist ID\n
+*                                              Get the media playlist from the media database\n
+*                                              Destroy media playlist handle\n
+*                                              Delete media playlist
+* @apicovered                  media_playlist_insert_to_db, media_playlist_get_playlist_id, media_playlist_get_playlist_from_db, media_playlist_destroy and media_playlist_delete_from_db
+* @passcase                            When media_playlist_foreach_playlist_from_db, media_playlist_get_playlist_from_db, media_playlist_destroy, media_playlist_delete_from_db are successful
+* @failcase                            If media_playlist_foreach_playlist_from_db, media_playlist_get_playlist_from_db, media_playlist_destroy, media_playlist_delete_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_playlist_get_playlist_from_db_p(void)
+{
+       START_TEST;
+       char *pszGetPlaylistMemLog = NULL;
+       char *pszGetPlaylistFromDBSpeedLog = NULL;
+       char *pszPlaylistDestroySpeedLog = NULL;
+       media_playlist_h stHandlePlaylist, stHandleGetPlaylist;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nPlaylistId = 0;
+       
+       nRet = media_playlist_insert_to_db("new playlist db", &stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_insert_to_db");
+       
+       nRet = media_playlist_get_playlist_id(stHandlePlaylist, &nPlaylistId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] media_playlist_get_playlist_id failed\\n", __LINE__, API_NAMESPACE);
+               media_playlist_destroy(stHandlePlaylist);
+               return 1;
+       }
+       FPRINTF("[Line: %d][%s] Playlist ID = %d\\n", __LINE__, API_NAMESPACE,nPlaylistId);
+       
+#if MEMORY_CHECK               
+       pszGetPlaylistMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetPlaylistFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaylistDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_get_playlist_from_db(nPlaylistId, &stHandleGetPlaylist);
+               MediaExecutionDelay(pszGetPlaylistFromDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_get_playlist_from_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_playlist_destroy(stHandleGetPlaylist);
+               MediaExecutionDelay(pszPlaylistDestroySpeedLog);
+               MediaGetMemStatus(pszGetPlaylistMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_destroy", nMediaContentFailCount);
+       }
+       media_playlist_delete_from_db (nPlaylistId);
+       media_playlist_destroy(stHandlePlaylist);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_get_playlist_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetPlaylistFromDBSpeedLog);
+               free(pszPlaylistDestroySpeedLog);
+               free(pszGetPlaylistMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_playlist_get_playlist_from_db, pszGetPlaylistFromDBSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_destroy, pszPlaylistDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_get_playlist_from_db_p, pszGetPlaylistMemLog);
+#endif
+       free(pszGetPlaylistFromDBSpeedLog);
+       free(pszPlaylistDestroySpeedLog);
+       free(pszGetPlaylistMemLog);
+       return 0;
+}
+
+//& purpose: Gets the number of playlists from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_get_playlist_count_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the number of playlists for the passed filter from the media database
+* @scenario                            Iterate through the media playlists with optional filter from the media database\n
+*                                              Insert Playlist to DB\n
+*                                              Get playlist ID\n
+*                                              Get the number of playlists from the media database
+* @apicovered                  media_playlist_get_playlist_count_from_db
+* @passcase                            When media_playlist_foreach_playlist_from_db, media_playlist_get_playlist_count_from_db are successful
+* @failcase                            If media_playlist_foreach_playlist_from_db, media_playlist_get_playlist_count_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_playlist_get_playlist_count_p(void)
+{
+       START_TEST;
+       char *pszGetPlaylistMemLog = NULL;
+       char *pszPlaylistDestroySpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nPlaylistCount = 0;
+       
+#if MEMORY_CHECK               
+       pszGetPlaylistMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszPlaylistDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_get_playlist_count_from_db(NULL, &nPlaylistCount);
+               MediaExecutionDelay(pszPlaylistDestroySpeedLog);
+               MediaGetMemStatus(pszGetPlaylistMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_get_playlist_count_from_db", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] ITc_media_content_playlist_get_playlist_count_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszPlaylistDestroySpeedLog);
+               free(pszGetPlaylistMemLog);
+               return 1;
+       }
+#if SPEED_CHECK                
+       PRINT_SPEED_LOG(media_playlist_get_playlist_count_from_db, pszPlaylistDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_get_playlist_count_p, pszGetPlaylistMemLog);
+#endif
+       free(pszPlaylistDestroySpeedLog);
+       free(pszGetPlaylistMemLog);
+       return 0;
+}
+
+//& purpose: Removes playlist members related with media from the given playlist
+//& type: auto
+/**
+* @testcase                    ITc_media_content_playlist_remove_media_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Removes playlist members related with media from the given playlist
+* @scenario                            Iterate through the media playlists with optional filter from the media database\n
+*                                              Insert Playlist to DB\n
+*                                              Get playlist ID\n
+*                                              Removes playlist members related with media from the given playlist\n
+*                                              Destroy media playlist handle\n
+*                                              Delete media playlist
+* @apicovered                  media_playlist_insert_to_db, media_playlist_get_playlist_id, media_playlist_delete_from_db, media_playlist_remove_media, media_playlist_update_to_db and media_playlist_destroy
+* @passcase                            When media_playlist_insert_to_db, media_playlist_get_playlist_id, media_playlist_delete_from_db are successful
+* @failcase                            If media_playlist_foreach_playlist_from_db, media_playlist_insert_to_db, media_playlist_get_playlist_id, media_playlist_delete_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_playlist_remove_media_p(void)
+{
+       START_TEST;
+       char *pszGetPlaylistMemLog = NULL;
+       char *pszGetPlaylistFromDBSpeedLog = NULL;
+       char *pszPlaylistUpdateSpeedLog = NULL;
+       media_playlist_h stHandlePlaylist;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nPlaylistId = 0;
+               
+       nRet = media_playlist_insert_to_db("new playlist db", &stHandlePlaylist);
+       PRINT_RESULT(nRet, "media_playlist_insert_to_db");
+       
+       nRet = media_playlist_get_playlist_id(stHandlePlaylist, &nPlaylistId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] media_playlist_get_playlist_id failed\\n", __LINE__, API_NAMESPACE);
+               media_playlist_destroy(stHandlePlaylist);
+               return 1;
+       }
+       FPRINTF("[Line: %d][%s] Playlist ID = %d\\n", __LINE__, API_NAMESPACE,nPlaylistId);
+       
+#if MEMORY_CHECK               
+       pszGetPlaylistMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetPlaylistFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT ,sizeof(char));
+       pszPlaylistUpdateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_playlist_remove_media(stHandlePlaylist, nPlaylistId);
+               MediaExecutionDelay(pszGetPlaylistFromDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_get_playlist_from_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_playlist_update_to_db(stHandlePlaylist);
+               MediaExecutionDelay(pszPlaylistUpdateSpeedLog);
+               MediaGetMemStatus(pszGetPlaylistMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_playlist_update_to_db", nMediaContentFailCount);
+       }
+       
+       media_playlist_delete_from_db (nPlaylistId);
+       media_playlist_destroy(stHandlePlaylist);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_playlist_remove_media_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetPlaylistFromDBSpeedLog);
+               free(pszPlaylistUpdateSpeedLog);
+               free(pszGetPlaylistMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_playlist_remove_media, pszGetPlaylistFromDBSpeedLog);
+       PRINT_SPEED_LOG(media_playlist_update_to_db, pszPlaylistUpdateSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_playlist_remove_media_p, pszGetPlaylistMemLog);
+#endif
+       free(pszGetPlaylistFromDBSpeedLog);
+       free(pszPlaylistUpdateSpeedLog);
+       free(pszGetPlaylistMemLog);
+       return 0;
+}
+
+/*
+******************************* Media Tag ***********************************
+*/
+
+//& purpose: Inserts a new tag in the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_tag_insert_to_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Inserts a new tag in the media database
+* @scenario                            Inserts a new tag in the media database\n
+*                                              Destroys the media tag\n
+*                                              Get playlist ID
+* @apicovered                  media_tag_insert_to_db, media_tag_destroy
+* @passcase                            When media_tag_insert_to_db, media_tag_destroy are successful
+* @failcase                            If media_tag_insert_to_db, media_tag_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service.
+*/
+int ITc_media_content_tag_insert_to_db_p(void)
+{
+       START_TEST;
+       char *pszTagInsertToDBMemLog = NULL;
+       char *pszTagInsertToDBSpeedLog = NULL;
+       char *pszTagDestroyDBSpeedLog = NULL;
+       char *pszTagIDSpeedLog= NULL;
+       char *pszTagDeleteFromDBSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nTagId = 0;
+       media_tag_h stHandleMediaTag = NULL;
+       
+#if MEMORY_CHECK               
+       pszTagInsertToDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszTagInsertToDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszTagDestroyDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszTagIDSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszTagDeleteFromDBSpeedLog      = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_tag_insert_to_db("tag test insert", &stHandleMediaTag);
+               MediaExecutionDelay(pszTagInsertToDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_insert_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_tag_get_tag_id(stHandleMediaTag, &nTagId);
+               MediaExecutionDelay(pszTagIDSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_get_tag_id", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_tag_delete_from_db(nTagId);
+               MediaExecutionDelay(pszTagDeleteFromDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_delete_from_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_tag_destroy(stHandleMediaTag);
+               MediaExecutionDelay(pszTagDestroyDBSpeedLog);
+               MediaGetMemStatus(pszTagInsertToDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_tag_insert_to_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszTagInsertToDBSpeedLog);
+               free(pszTagIDSpeedLog);
+               free(pszTagDeleteFromDBSpeedLog);
+               free(pszTagDestroyDBSpeedLog);
+               free(pszTagInsertToDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_tag_insert_to_db, pszTagInsertToDBSpeedLog);
+       PRINT_SPEED_LOG(media_tag_get_tag_id, pszTagIDSpeedLog);
+       PRINT_SPEED_LOG(media_tag_delete_from_db, pszTagDeleteFromDBSpeedLog);
+       PRINT_SPEED_LOG(media_tag_destroy, pszTagDestroyDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_tag_insert_to_db_p, pszTagInsertToDBMemLog);
+#endif
+       free(pszTagInsertToDBSpeedLog);
+       free(pszTagIDSpeedLog);
+       free(pszTagDeleteFromDBSpeedLog);
+       free(pszTagDestroyDBSpeedLog);
+       free(pszTagInsertToDBMemLog);
+       return 0;
+}
+
+//& purpose: Iterates through tags from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_tag_foreach_tag_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Iterate through tags from the media database
+* @scenario                            Iterate through tags from the media database\n
+*                                              Iterates over a list of tags
+* @apicovered                  media_tag_foreach_tag_from_db, media_tag_insert_to_db, media_tag_get_tag_id, media_tag_delete_from_db and media_tag_destroy
+* @passcase                            When media_tag_foreach_tag_from_db, media_tag_cb are successful
+* @failcase                            If media_tag_foreach_tag_from_db, media_tag_cb fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. media_tag_cb callback
+*/
+int ITc_media_content_tag_foreach_tag_from_db_p(void)
+{
+       START_TEST;
+       char *pszTagForeachTagFromDBMemLog = NULL;
+       char *pszTagForeachTagFromDBSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0,nTagId = 0;
+       media_tag_h stHandleMediaTag = NULL;
+               
+       nRet = media_tag_insert_to_db("tag-foreach", &stHandleMediaTag);
+       PRINT_RESULT(nRet, "media_tag_insert_to_db");
+       
+       nRet = media_tag_get_tag_id(stHandleMediaTag, &nTagId);
+       PRINT_RESULT(nRet, "media_tag_get_tag_id");
+       
+#if MEMORY_CHECK               
+       pszTagForeachTagFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszTagForeachTagFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_tag_foreach_tag_from_db(NULL, TagCB, NULL);
+               MediaExecutionDelay(pszTagForeachTagFromDBSpeedLog);
+               MediaGetMemStatus(pszTagForeachTagFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_foreach_tag_from_db", nMediaContentFailCount);
+               
+               if ( !g_bMediaContentCBFlag )
+               {
+                       FPRINTF("[Line: %d][%s] TAG] callback [TagCB] failed\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+               
+       media_tag_delete_from_db(nTagId);
+       media_tag_destroy(stHandleMediaTag);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_tag_foreach_tag_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszTagForeachTagFromDBSpeedLog);
+               free(pszTagForeachTagFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_tag_foreach_tag_from_db, pszTagForeachTagFromDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_tag_foreach_tag_from_db_p, pszTagForeachTagFromDBMemLog);
+#endif
+       free(pszTagForeachTagFromDBSpeedLog);
+       free(pszTagForeachTagFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Clones the media tag
+//& type: auto
+/**
+* @testcase                    ITc_media_content_tag_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Clones the media tag
+* @scenario                            Iterate through tags from the media database\n
+*                                              Iterates over a list of tags\n
+*                                              Clones the media tag\n
+*                                              Destroy Tag
+* @apicovered                  media_tag_insert_to_db, media_tag_get_tag_id, media_tag_clone, media_tag_destroy and media_tag_delete_from_db
+* @passcase                            When media_tag_foreach_tag_from_db, media_tag_cb, media_tag_clone, media_tag_destroy are successful
+* @failcase                            If media_tag_foreach_tag_from_db, media_tag_cb, media_tag_clone, media_tag_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. media_tag_cb callback
+*/
+int ITc_media_content_tag_clone_p(void)
+{
+       START_TEST;
+       char *pszTagCloneMemLog = NULL;
+       char *pszTagCloneSpeedLog = NULL;
+       char *pszTagDestroySpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nTagId = 0;
+       media_tag_h stHandleMediaTag = NULL;
+       g_stHandleMediaTag = NULL;
+               
+       nRet = media_tag_insert_to_db("tag for clone", &g_stHandleMediaTag);
+       PRINT_RESULT(nRet, "media_tag_insert_to_db");
+               
+       nRet = media_tag_get_tag_id(g_stHandleMediaTag, &nTagId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] edia_tag_get_tag_id failed\\n", __LINE__, API_NAMESPACE);
+               media_tag_destroy(g_stHandleMediaTag);
+       }
+       
+#if MEMORY_CHECK               
+       pszTagCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszTagCloneSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszTagDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_tag_clone(&stHandleMediaTag, g_stHandleMediaTag);
+               MediaExecutionDelay(pszTagCloneSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_clone", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_tag_destroy(stHandleMediaTag);
+               MediaExecutionDelay(pszTagDestroySpeedLog);
+               MediaGetMemStatus(pszTagCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_destroy", nMediaContentFailCount);
+       }
+       media_tag_delete_from_db(nTagId);
+       media_tag_destroy(g_stHandleMediaTag);
+                       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_tag_clone_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszTagCloneSpeedLog);
+               free(pszTagDestroySpeedLog);
+               free(pszTagCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_tag_clone, pszTagCloneSpeedLog);
+       PRINT_SPEED_LOG(media_tag_destroy, pszTagDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_tag_clone_p, pszTagCloneMemLog);
+#endif
+       free(pszTagCloneSpeedLog);
+       free(pszTagDestroySpeedLog);
+       free(pszTagCloneMemLog);
+       return 0;
+}
+
+//& purpose: Gets the number of tag for the passed filter from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_tag_get_tag_count_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the number of tag for the passed filter from the media database
+* @scenario                            Iterate through tags from the media database\n
+*                                              Iterates over a list of tags\n
+*                                              Get the number of tag
+* @apicovered                  media_tag_get_tag_count_from_db
+* @passcase                            When media_tag_foreach_tag_from_db, media_tag_cb, media_tag_get_tag_count_from_db are successful
+* @failcase                            If media_tag_foreach_tag_from_db, media_tag_cb, media_tag_get_tag_count_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. media_tag_cb callback
+*/
+int ITc_media_content_tag_get_tag_count_from_db_p(void)
+{
+       START_TEST;
+       char *pszTagForeachTagFromDBMemLog = NULL;
+       char *pszTagForeachTagCountFromDBSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nTagCount = 0;
+       
+#if MEMORY_CHECK               
+       pszTagForeachTagFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK                
+       pszTagForeachTagCountFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_tag_get_tag_count_from_db(NULL, &nTagCount);
+               MediaExecutionDelay(pszTagForeachTagCountFromDBSpeedLog);
+               MediaGetMemStatus(pszTagForeachTagFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_get_tag_count_from_db", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_tag_get_tag_count_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszTagForeachTagCountFromDBSpeedLog);
+               free(pszTagForeachTagFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_tag_get_tag_count_from_db, pszTagForeachTagCountFromDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_tag_get_tag_count_from_db_p, pszTagForeachTagFromDBMemLog);
+#endif
+       free(pszTagForeachTagCountFromDBSpeedLog);
+       free(pszTagForeachTagFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Iterates through media items for a given tag from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_tag_foreach_media_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Iterate through media items for a given tag from the media database
+* @scenario                            Insert tag to DB\n
+*                                              Get tag ID\n
+*                                              Iterate through media items for a given tag\n
+*                                              Delete tag from DB
+* @apicovered                  media_tag_insert_to_db, media_tag_get_tag_id, media_filter_create, media_filter_set_condition, media_info_foreach_media_from_db, media_filter_destroy
+*                                              media_tag_add_media, media_tag_update_to_db, media_tag_delete_from_db, media_tag_foreach_media_from_db, media_tag_destroy
+* @passcase                            When media_tag_insert_to_db, media_tag_get_tag_id, media_tag_delete_from_db, media_tag_foreach_media_from_db are successful
+* @failcase                            If media_tag_insert_to_db, media_tag_get_tag_id, media_tag_delete_from_db, media_tag_foreach_media_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. media_tag_cb callback
+*/
+int ITc_media_content_tag_foreach_media_from_db_p(void)
+{
+       START_TEST;
+       char *pszTagForeachTagFromDBMemLog = NULL;
+       char *pszTagForeachTagCountFromDBSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nTagId = 0;
+       media_tag_h stHandleMediaTag = NULL;
+       g_bMediaContentCBFlag = false;
+       
+       nRet = media_tag_insert_to_db("tag test m", &stHandleMediaTag);
+       PRINT_RESULT(nRet, "media_tag_insert_to_db");
+               
+       nRet = media_tag_get_tag_id(stHandleMediaTag, &nTagId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] edia_tag_get_tag_id failed\\n", __LINE__, API_NAMESPACE);
+               media_tag_destroy(stHandleMediaTag);
+       }
+       
+#if MEMORY_CHECK               
+       pszTagForeachTagFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK                
+       pszTagForeachTagCountFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_tag_foreach_media_from_db(nTagId, NULL, MediaInfoCB, NULL);
+               MediaExecutionDelay(pszTagForeachTagCountFromDBSpeedLog);
+               MediaGetMemStatus(pszTagForeachTagFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_foreach_media_from_db", nMediaContentFailCount);
+               
+               if ( !g_bMediaContentCBFlag )
+               {
+                       FPRINTF("[Line: %d][%s] TAG] callback [MediaInfoCB] failed\\n", __LINE__, API_NAMESPACE);
+               }
+       }
+       media_tag_delete_from_db(nTagId);
+       media_tag_destroy(stHandleMediaTag);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_tag_foreach_media_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszTagForeachTagCountFromDBSpeedLog);
+               free(pszTagForeachTagFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK                
+       PRINT_SPEED_LOG(media_tag_foreach_media_from_db, pszTagForeachTagCountFromDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_tag_foreach_media_from_db_p, pszTagForeachTagFromDBMemLog);
+#endif
+       free(pszTagForeachTagCountFromDBSpeedLog);
+       free(pszTagForeachTagFromDBMemLog);
+       return 0;
+}
+
+
+//& purpose: Iterates through media items for a given tag from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_tag_get_media_count_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Iterate through media items for a given tag from the media database
+* @scenario                            Insert tag to DB\n
+*                                              Get tag ID\n
+*                                              Iterate through media items for a given tag\n
+*                                              Delete tag from DB
+* @apicovered                  media_tag_insert_to_db, media_tag_get_tag_id, media_filter_create, media_filter_set_condition, media_info_foreach_media_from_db, media_tag_add_media, media_tag_update_to_db, media_tag_get_media_count_from_db, media_tag_delete_from_db and media_tag_destroy
+* @passcase                            When media_tag_insert_to_db, media_tag_get_tag_id, media_tag_delete_from_db, media_tag_foreach_media_from_db are successful
+* @failcase                            If media_tag_insert_to_db, media_tag_get_tag_id, media_tag_delete_from_db, media_tag_foreach_media_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. media_tag_cb callback
+*/
+int ITc_media_content_tag_get_media_count_from_db_p(void)
+{
+       START_TEST;
+       char *pszTagForeachTagFromDBMemLog = NULL;
+       char *pszTagForeachMediaFromDBSpeedLog = NULL;
+       char *pszTagForeachTagCountFromDBSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nTagId = 0, nMediaCount = 0;
+       media_tag_h stHandleMediaTag = NULL;
+       
+       nRet = media_tag_insert_to_db("tag test mcount", &stHandleMediaTag);
+       PRINT_RESULT(nRet, "media_tag_insert_to_db");
+               
+       nRet = media_tag_get_tag_id(stHandleMediaTag, &nTagId);
+       PRINT_RESULT(nRet, "media_tag_get_tag_id");
+       
+#if MEMORY_CHECK               
+       pszTagForeachTagFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK                
+       pszTagForeachMediaFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszTagForeachTagCountFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_tag_foreach_media_from_db(nTagId, NULL, MediaInfoCB, NULL);
+               MediaExecutionDelay(pszTagForeachMediaFromDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_foreach_media_from_db", nMediaContentFailCount);
+               
+               if ( !g_bMediaContentCBFlag )
+               {
+                       FPRINTF("[Line: %d][%s] TAG] callback [MediaInfoCB] failed\\n", __LINE__, API_NAMESPACE);
+               }
+               
+               MediaGetTimeOfDay();
+               nRet = media_tag_get_media_count_from_db(nTagId, NULL, &nMediaCount);
+               MediaExecutionDelay(pszTagForeachTagCountFromDBSpeedLog);
+               MediaGetMemStatus(pszTagForeachTagFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_get_media_count_from_db", nMediaContentFailCount);
+       }
+       media_tag_delete_from_db(nTagId);
+       media_tag_destroy(stHandleMediaTag);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_tag_get_media_count_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszTagForeachTagCountFromDBSpeedLog);
+               free(pszTagForeachTagFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK                
+       PRINT_SPEED_LOG(media_tag_foreach_media_from_db, pszTagForeachTagCountFromDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_tag_get_media_count_from_db_p, pszTagForeachTagFromDBMemLog);
+#endif
+       free(pszTagForeachTagCountFromDBSpeedLog);
+       free(pszTagForeachTagFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Adds a new media info to the tag
+//& type: auto
+/**
+* @testcase                    ITc_media_content_tag_add_remove_media_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Adds a new media info to the tag
+* @scenario                            Insert tag to DB\n
+*                                              Get tag ID\n
+*                                              Adds a new media info to the tag\n
+*                                              Update media info to the tag\n
+*                                              Delete tag from DB
+* @apicovered                  media_info_foreach_media_from_db, media_tag_update_to_db, media_tag_remove_media, media_tag_insert_to_db, media_tag_get_tag_id, media_tag_add_media, media_tag_delete_from_db,
+* @passcase                            When media_tag_insert_to_db, media_tag_get_tag_id, media_tag_add_media, media_tag_delete_from_db, are successful
+* @failcase                            If media_tag_insert_to_db, media_tag_get_tag_id, media_tag_add_media, media_tag_delete_from_db, fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. media_tag_cb callback
+*/
+int ITc_media_content_tag_add_remove_media_p(void)
+{
+       START_TEST;
+       char *pszTagForeachTagFromDBMemLog = NULL;
+       char *pszTagForeachMediaFromDBSpeedLog = NULL;
+       char *pszTagUpdateToDBSpeedLog = NULL;
+       char *pszTagRemoveSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nTagId = 0;
+       media_tag_h stHandleMediaTag = NULL;
+       g_pMediaId = NULL;
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB,NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pMediaId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] _pMediaId is NULL\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+       nRet = media_tag_insert_to_db("tag test add-x", &stHandleMediaTag);
+       PRINT_RESULT(nRet, "media_tag_insert_to_db");
+               
+       nRet = media_tag_get_tag_id(stHandleMediaTag, &nTagId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] edia_tag_get_tag_id failed\\n", __LINE__, API_NAMESPACE);
+               media_tag_destroy(stHandleMediaTag);
+               return 1;
+       }
+       FPRINTF("[Line: %d][%s] edia tag id = %d\\n", __LINE__, API_NAMESPACE,nTagId);
+       
+#if MEMORY_CHECK               
+       pszTagForeachTagFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK                
+       pszTagForeachMediaFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszTagUpdateToDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszTagRemoveSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_tag_add_media(stHandleMediaTag, g_pMediaId);
+               MediaExecutionDelay(pszTagForeachMediaFromDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_add_media", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_tag_update_to_db(stHandleMediaTag);
+               MediaExecutionDelay(pszTagUpdateToDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_update_to_db", nMediaContentFailCount);
+               
+               nRet = media_tag_remove_media(stHandleMediaTag, g_pMediaId);
+               MediaExecutionDelay(pszTagRemoveSpeedLog);
+               MediaGetMemStatus(pszTagForeachTagFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_remove_media", nMediaContentFailCount);
+       }
+       media_tag_delete_from_db(nTagId);
+       media_tag_destroy(stHandleMediaTag);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_tag_add_remove_media_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszTagForeachMediaFromDBSpeedLog);
+               free(pszTagUpdateToDBSpeedLog);
+               free(pszTagRemoveSpeedLog);
+               free(pszTagForeachTagFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK                
+       PRINT_SPEED_LOG(media_tag_add_media, pszTagForeachMediaFromDBSpeedLog);
+       PRINT_SPEED_LOG(media_tag_update_to_db, pszTagUpdateToDBSpeedLog);
+       PRINT_SPEED_LOG(media_tag_remove_media, pszTagRemoveSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_tag_add_remove_media_p, pszTagForeachTagFromDBMemLog);
+#endif
+       free(pszTagForeachMediaFromDBSpeedLog);
+       free(pszTagUpdateToDBSpeedLog);
+       free(pszTagRemoveSpeedLog);
+       free(pszTagForeachTagFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Set/Gets the tag name
+//& type: auto
+/**
+* @testcase                    ITc_media_content_tag_set_get_name_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Gets the tag name
+* @scenario                            Insert tag to DB\n
+*                                              Get tag ID\n
+*                                              Set the tag name\n
+*                                              Update media info to the tag\n
+*                                              Get the tag name\n
+*                                              Delete tag from DB
+* @apicovered                  media_tag_insert_to_db, media_tag_get_tag_id, media_tag_set_name, media_tag_get_name, media_tag_delete_from_db, media_tag_update_to_db, media_tag_destroy
+* @passcase                            When media_tag_insert_to_db, media_tag_get_tag_id, media_tag_set_name, media_tag_get_name, media_tag_delete_from_db, are successful
+* @failcase                            If media_tag_insert_to_db, media_tag_get_tag_id, media_tag_set_name, media_tag_get_name, media_tag_delete_from_db, fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. media_tag_cb callback
+*/
+int ITc_media_content_tag_set_get_name_p(void)
+{
+       START_TEST;
+       char *pszTagForeachTagFromDBMemLog = NULL;
+       char *pszTagForeachMediaFromDBSpeedLog = NULL;
+       char *pszTagUpdateToDBSpeedLog = NULL;
+       char *pszTagGetTagSpeedLog = NULL;
+       char *pTagName = "myTag1";
+       char *pGetTagName = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nTagId = 0;
+       media_tag_h stHandleMediaTag = NULL;
+       g_bMediaContentCBFlag = false;
+       
+       nRet = media_tag_insert_to_db("tag test set", &stHandleMediaTag);
+       PRINT_RESULT(nRet, "media_tag_insert_to_db");
+               
+       nRet = media_tag_get_tag_id(stHandleMediaTag, &nTagId);
+       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] edia_tag_get_tag_id failed\\n", __LINE__, API_NAMESPACE);
+               media_tag_destroy(stHandleMediaTag);
+               return 1;
+       }
+       
+#if MEMORY_CHECK               
+       pszTagForeachTagFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK                
+       pszTagForeachMediaFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszTagUpdateToDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszTagGetTagSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_tag_set_name(stHandleMediaTag, pTagName);
+               MediaExecutionDelay(pszTagForeachMediaFromDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_set_name", nMediaContentFailCount);
+                       
+               MediaGetTimeOfDay();
+               nRet = media_tag_update_to_db(stHandleMediaTag);
+               MediaExecutionDelay(pszTagUpdateToDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_update_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_tag_get_name(stHandleMediaTag, &pGetTagName);
+               MediaExecutionDelay(pszTagGetTagSpeedLog);
+               MediaGetMemStatus(pszTagForeachTagFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_get_name", nMediaContentFailCount);
+               if (NULL ==pGetTagName)
+               {
+                       FPRINTF("[Line: %d][%s] GetTagName is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               if ( strcmp( pGetTagName, pTagName ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] GetTagName in media_tag_get_name is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       
+               if ( pGetTagName != NULL )
+               {
+                       free(pGetTagName);
+                       pGetTagName = NULL;
+               }
+       }
+       media_tag_delete_from_db(nTagId);
+       media_tag_destroy(stHandleMediaTag);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_tag_set_get_name_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszTagForeachMediaFromDBSpeedLog);
+               free(pszTagUpdateToDBSpeedLog);
+               free(pszTagGetTagSpeedLog);
+               free(pszTagForeachTagFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK                
+       PRINT_SPEED_LOG(media_tag_set_name, pszTagForeachMediaFromDBSpeedLog);
+       PRINT_SPEED_LOG(media_tag_update_to_db, pszTagUpdateToDBSpeedLog);
+       PRINT_SPEED_LOG(media_tag_get_name, pszTagGetTagSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_tag_set_get_name_p, pszTagForeachTagFromDBMemLog);
+#endif
+       free(pszTagForeachMediaFromDBSpeedLog);
+       free(pszTagUpdateToDBSpeedLog);
+       free(pszTagGetTagSpeedLog);
+       free(pszTagForeachTagFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Gets the media tag from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_tag_get_tag_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 This function creates a new media tag handle from the media database by the given tag_id
+* @scenario                            Insert tag to DB\n
+*                                              Get tag ID\n
+*                                              Adds a new media info to the tag\n
+*                                              Update media info to the tag\n
+*                                              Delete tag from DB
+* @apicovered                  media_tag_insert_to_db, media_tag_get_tag_id, media_tag_get_tag_from_db, media_tag_delete_from_db and media_tag_destroy
+* @passcase                            When media_tag_insert_to_db, media_tag_get_tag_id, media_tag_add_media, media_tag_delete_from_db, are successful
+* @failcase                            If media_tag_insert_to_db, media_tag_get_tag_id, media_tag_add_media, media_tag_delete_from_db, fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service. media_tag_cb callback
+*/
+int ITc_media_content_tag_get_tag_from_db_p(void)
+{
+       START_TEST;
+       char *pszTagForeachTagFromDBMemLog = NULL;
+       char *pszTagGetTagSpeedLog = NULL;
+       char *pszTagDestroySpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nTagId = 0;
+       media_tag_h stHandleMediaTag = NULL;
+       media_tag_h stHandleGetMediaTag = NULL;
+       g_bMediaContentCBFlag = false;
+       
+       nRet = media_tag_insert_to_db("tag test get", &stHandleMediaTag);
+       PRINT_RESULT(nRet, "media_tag_insert_to_db");
+               
+       nRet = media_tag_get_tag_id(stHandleMediaTag, &nTagId);
+       PRINT_RESULT(nRet, "media_tag_get_tag_id");
+       
+#if MEMORY_CHECK               
+       pszTagForeachTagFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK                
+       pszTagGetTagSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszTagDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_tag_get_tag_from_db(nTagId, &stHandleGetMediaTag);
+               MediaExecutionDelay(pszTagGetTagSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_get_tag_from_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_tag_destroy(stHandleGetMediaTag);
+               MediaExecutionDelay(pszTagDestroySpeedLog);
+               MediaGetMemStatus(pszTagForeachTagFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_tag_destroy", nMediaContentFailCount);
+       }
+       media_tag_delete_from_db(nTagId);
+       media_tag_destroy(stHandleMediaTag);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_tag_get_tag_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszTagGetTagSpeedLog);
+               free(pszTagDestroySpeedLog);
+               free(pszTagForeachTagFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK                
+       PRINT_SPEED_LOG(media_tag_get_tag_from_db, pszTagGetTagSpeedLog);
+       PRINT_SPEED_LOG(media_tag_destroy, pszTagDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_tag_get_tag_from_db_p, pszTagForeachTagFromDBMemLog);
+#endif
+       free(pszTagGetTagSpeedLog);
+       free(pszTagDestroySpeedLog);
+       free(pszTagForeachTagFromDBMemLog);
+       return 0;
+}
+
+/*
+************************** Media Audio Metadata ************************************
+*/
+
+//& purpose: Clones audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Function copies the audio metadata handle from source to destination
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Clones audio metadata\n
+*                                              Destroy audio metadata handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_foreach_media_from_db, audio_meta_clone, audio_meta_destroy, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_clone, audio_meta_destroy are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_clone, audio_meta_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_clone_p(void)
+{
+       START_TEST;
+       char *pszpszAudioCloneMemLog = NULL;
+       char *pszAudioCloneSpeedLog = NULL;
+       char *pszInfoDestroyAudioSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       audio_meta_h stAudio = NULL;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszpszAudioCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioCloneSpeedLog   = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroyAudioSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_clone(&stAudio, g_pstAudioMetaHandle);
+               MediaExecutionDelay(pszAudioCloneSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_clone", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = audio_meta_destroy(stAudio);
+               MediaExecutionDelay(pszInfoDestroyAudioSpeedLog);
+               MediaGetMemStatus(pszpszAudioCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_destroy", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_clone_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioCloneSpeedLog);
+               free(pszInfoDestroyAudioSpeedLog);
+               free(pszpszAudioCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_clone, pszAudioCloneSpeedLog);
+       PRINT_SPEED_LOG(audio_meta_destroy, pszInfoDestroyAudioSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_clone_p, pszpszAudioCloneMemLog);
+#endif
+       free(pszAudioCloneSpeedLog);
+       free(pszInfoDestroyAudioSpeedLog);
+       free(pszpszAudioCloneMemLog);
+       return 0;
+}
+
+//& purpose: Gets the album name of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_album_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the album name of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the album name\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_foreach_media_from_db, audio_meta_get_album, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_album are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_album fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_album_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       char *pAalbumName = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_album(g_pstAudioMetaHandle, &pAalbumName);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_album", nMediaContentFailCount);
+               if ( pAalbumName != NULL )
+               {
+                       free(pAalbumName);
+                       pAalbumName = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_album_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_album, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_album_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets the album artist name of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_album_artist_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the album artist name of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the album artist name of the given audio metadata\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_foreach_media_from_db, audio_meta_get_album_artist, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_album_artist are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_album_artist fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_album_artist_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       char *pAalbumName = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_album_artist(g_pstAudioMetaHandle, &pAalbumName);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_album_artist", nMediaContentFailCount);
+               if ( pAalbumName != NULL )
+               {
+                       free(pAalbumName);
+                       pAalbumName = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_album_artist_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_album_artist, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_album_artist_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets the artist name of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_artist_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the artist name of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the artist name\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_foreach_media_from_db, audio_meta_get_artist, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_artist are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_artist fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_artist_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       char *pArtist = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_artist(g_pstAudioMetaHandle, &pArtist);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_artist", nMediaContentFailCount);
+               if ( pArtist != NULL )
+               {
+                       free(pArtist);
+                       pArtist = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_artist_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_artist, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_artist_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets bit rate of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_bitpersample_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets bit rate of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets bit rate of the given audio metadata\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, audio_meta_get_bitpersample, media_info_insert_to_db, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_bitpersample are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_bitpersample fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_bitpersample_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       int nBitPerSample = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_bitpersample(g_pstAudioMetaHandle, &nBitPerSample);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_bitpersample", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_bitpersample_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_bitpersample, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_bitpersample_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets bitrate of the given audio metadata in bitrate per second
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_bit_rate_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets bitrate of the given audio metadata in bitrate per second
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the bitrate of audio\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, media_info_insert_to_db, audio_meta_get_bit_rate, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_bit_rate are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_bit_rate fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_bit_rate_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       int nBitRate = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_bit_rate(g_pstAudioMetaHandle, &nBitRate);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_bit_rate", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_bit_rate_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_bit_rate, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_bit_rate_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets sample rate of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_sample_rate_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets sample rate of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets sample rate\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, audio_meta_get_sample_rate, media_info_destroy, media_info_insert_to_db
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_sample_rate are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_sample_rate fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_sample_rate_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       int nSampleRate = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_sample_rate(g_pstAudioMetaHandle, &nSampleRate);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_sample_rate", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_sample_rate_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_sample_rate, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_sample_rate_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets channel of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_channel_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets channel of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets channel of the given audio metadata\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, audio_meta_get_channel, media_info_insert_to_db, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_channel are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_channel fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_channel_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       int nChannel = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_channel(g_pstAudioMetaHandle, &nChannel);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_channel", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_channel_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_channel, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_channel_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets composer of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_composer_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets composer of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets composer of the given audio metadata\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_foreach_media_from_db, audio_meta_get_composer, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_composer are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_composer fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_composer_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       char *pComposer = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_composer(g_pstAudioMetaHandle, &pComposer);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_composer", nMediaContentFailCount);
+               if ( pComposer != NULL )
+               {
+                       free(pComposer);
+                       pComposer = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_composer_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_composer, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_composer_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets copyright notice of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_copyright_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets copyright notice of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets copyright notice of the given audio metadata\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_foreach_media_from_db, audio_meta_get_copyright, media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_copyright are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_copyright fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_copyright_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       char *pCopyright = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_copyright(g_pstAudioMetaHandle, &pCopyright);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_copyright", nMediaContentFailCount);
+               if ( pCopyright != NULL )
+               {
+                       free(pCopyright);
+                       pCopyright = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_copyright_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_copyright, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_copyright_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets track duration of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_duration_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets track duration of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets track duration\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, audio_meta_get_duration
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_duration are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_duration fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_duration_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       int nDuration = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_duration(g_pstAudioMetaHandle, &nDuration);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_duration", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_duration_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_duration, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_duration_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets the genre name of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_genre_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the genre name of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the genre name of the given audio metadata\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, audio_meta_get_genre
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_genre are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_genre fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_genre_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       char *pGenreName = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_genre(g_pstAudioMetaHandle, &pGenreName);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_genre", nMediaContentFailCount);
+               if ( pGenreName != NULL )
+               {
+                       free(pGenreName);
+                       pGenreName = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_genre_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_genre, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_genre_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets the audio if of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_media_id_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the audio if of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the audio if of the given audio metadata\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, audio_meta_get_media_id
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_media_id are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_media_id fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_media_id_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       char *pMediaId = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_media_id(g_pstAudioMetaHandle, &pMediaId);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_media_id", nMediaContentFailCount);
+               if ( pMediaId != NULL )
+               {
+                       free(pMediaId);
+                       pMediaId = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_media_id_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE,nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_media_id, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_media_id_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Sets the played count to an audio meta handle
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_set_get_played_count_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set the played count to an audio meta handle
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Set the played count to an audio meta handle\n
+*                                              Update the played count to DB\n
+*                                              Get the played count to an audio meta handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, audio_meta_set_played_count, audio_meta_update_to_db, audio_meta_get_played_count
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_set_played_count, audio_meta_update_to_db, audio_meta_get_played_count are successful.
+* @failcase                            If target api media_info_foreach_media_from_db, audio_meta_set_played_count, audio_meta_update_to_db, audio_meta_get_played_count fails or any precondition api fails.
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_set_get_played_count_p(void)
+{
+       START_TEST;
+       char *pszAudioGetMemLog = NULL;
+       char *pszSetPlayedCountSpeedLog = NULL;
+       char *pszGetPlayedCountSpeedLog = NULL;
+       char *pszUpdatePlayedCountSpeedLog = NULL;
+       int nPlayedCount = 3, nCountPlayed;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUpdatePlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_set_played_count(g_pstAudioMetaHandle, nPlayedCount);
+               MediaExecutionDelay(pszSetPlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_set_played_count", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = audio_meta_update_to_db(g_pstAudioMetaHandle);
+               MediaExecutionDelay(pszUpdatePlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_update_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_played_count(g_pstAudioMetaHandle, &nCountPlayed);
+               MediaExecutionDelay(pszGetPlayedCountSpeedLog);
+               MediaGetMemStatus(pszAudioGetMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_played_count", nMediaContentFailCount);
+               if ( nCountPlayed != nPlayedCount )
+               {
+                       FPRINTF("[Line: %d][%s] CountPlayed in audio_meta_get_played_count is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_set_get_played_count_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszSetPlayedCountSpeedLog);
+               free(pszUpdatePlayedCountSpeedLog);
+               free(pszGetPlayedCountSpeedLog);
+               free(pszAudioGetMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_set_played_count, pszSetPlayedCountSpeedLog);
+       PRINT_SPEED_LOG(audio_meta_update_to_db, pszUpdatePlayedCountSpeedLog);
+       PRINT_SPEED_LOG(audio_meta_get_played_count, pszGetPlayedCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_set_get_played_count_p, pszAudioGetMemLog);
+#endif
+       free(pszSetPlayedCountSpeedLog);
+       free(pszUpdatePlayedCountSpeedLog);
+       free(pszGetPlayedCountSpeedLog);
+       free(pszAudioGetMemLog);
+       return 0;
+}
+
+//& purpose: Sets/Gets the played position to an audio meta handle
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_set_get_played_position_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Sets/Gets the played position to an audio meta handle
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Set the played position to an audio meta handle\n
+*                                              Update the played position to DB\n
+*                                              Get the played position to an audio meta handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, audio_meta_set_played_position, audio_meta_update_to_db, audio_meta_get_played_position
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_set_played_position, audio_meta_update_to_db, audio_meta_get_played_position are successful.
+* @failcase                            If target api media_info_foreach_media_from_db, audio_meta_set_played_position, audio_meta_update_to_db, audio_meta_get_played_position fails or any precondition api fails.
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_set_get_played_position_p(void)
+{
+       START_TEST;
+       char *pszAudioGetMemLog = NULL;
+       char *pszSetPlayedCountSpeedLog = NULL;
+       char *pszGetPlayedCountSpeedLog = NULL;
+       char *pszUpdatePlayedCountSpeedLog = NULL;
+       int nPlayedPosition = 5, nPositionPlayed = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUpdatePlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_set_played_position(g_pstAudioMetaHandle, nPlayedPosition);
+               MediaExecutionDelay(pszSetPlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_set_played_position", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = audio_meta_update_to_db(g_pstAudioMetaHandle);
+               MediaExecutionDelay(pszUpdatePlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_update_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_played_position(g_pstAudioMetaHandle, &nPositionPlayed);
+               MediaExecutionDelay(pszGetPlayedCountSpeedLog);
+               MediaGetMemStatus(pszAudioGetMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_played_position", nMediaContentFailCount);
+               if ( nPositionPlayed != nPlayedPosition )
+               {
+                       FPRINTF("[Line: %d][%s] PositionPlayed in audio_meta_get_played_position is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_set_get_played_position_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszSetPlayedCountSpeedLog);
+               free(pszUpdatePlayedCountSpeedLog);
+               free(pszGetPlayedCountSpeedLog);
+               free(pszAudioGetMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_set_played_position, pszSetPlayedCountSpeedLog);
+       PRINT_SPEED_LOG(audio_meta_update_to_db, pszUpdatePlayedCountSpeedLog);
+       PRINT_SPEED_LOG(audio_meta_get_played_position, pszGetPlayedCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_set_get_played_position_p, pszAudioGetMemLog);
+#endif
+       free(pszSetPlayedCountSpeedLog);
+       free(pszUpdatePlayedCountSpeedLog);
+       free(pszGetPlayedCountSpeedLog);
+       free(pszAudioGetMemLog);
+       return 0;
+}
+
+//& purpose: Sets/Gets the played time to an audio meta handle
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_set_get_played_time_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Sets/Gets the played time to an audio meta handle
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Set the played time to an audio meta handle\n
+*                                              Update the played time to DB\n
+*                                              Get the played time to an audio meta handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, audio_meta_set_played_time, audio_meta_update_to_db, audio_meta_get_played_time
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_set_played_time, audio_meta_update_to_db, audio_meta_get_played_time are successful.
+* @failcase                            If target api media_info_foreach_media_from_db, audio_meta_set_played_time, audio_meta_update_to_db, audio_meta_get_played_time fails or any precondition api fails.
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_set_get_played_time_p(void)
+{
+       START_TEST;
+       char *pszAudioGetMemLog = NULL;
+       char *pszSetPlayedCountSpeedLog = NULL;
+       char *pszGetPlayedCountSpeedLog = NULL;
+       char *pszUpdatePlayedCountSpeedLog = NULL;
+       time_t tPlayedTime = 20, tGetPlayedTime = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUpdatePlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_set_played_time(g_pstAudioMetaHandle, tPlayedTime);
+               MediaExecutionDelay(pszSetPlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_set_played_position", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = audio_meta_update_to_db(g_pstAudioMetaHandle);
+               MediaExecutionDelay(pszUpdatePlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_update_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_played_time(g_pstAudioMetaHandle, &tGetPlayedTime);
+               MediaExecutionDelay(pszGetPlayedCountSpeedLog);
+               MediaGetMemStatus(pszAudioGetMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_played_position", nMediaContentFailCount);
+               if ( tGetPlayedTime != tPlayedTime )
+               {
+                       FPRINTF("[Line: %d][%s] GetPlayedTime in audio_meta_get_played_time is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_set_get_played_time_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszSetPlayedCountSpeedLog);
+               free(pszUpdatePlayedCountSpeedLog);
+               free(pszGetPlayedCountSpeedLog);
+               free(pszAudioGetMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_set_played_position, pszSetPlayedCountSpeedLog);
+       PRINT_SPEED_LOG(audio_meta_update_to_db, pszUpdatePlayedCountSpeedLog);
+       PRINT_SPEED_LOG(audio_meta_get_played_position, pszGetPlayedCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_set_get_played_time_p, pszAudioGetMemLog);
+#endif
+       free(pszSetPlayedCountSpeedLog);
+       free(pszUpdatePlayedCountSpeedLog);
+       free(pszGetPlayedCountSpeedLog);
+       free(pszAudioGetMemLog);
+       return 0;
+}
+
+//& purpose: Gets the recorded date of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_recorded_date_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the recorded date of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the recorded date of the given audio metadata\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, audio_meta_get_recorded_date
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_recorded_date are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_recorded_date fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_recorded_date_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       char *pRecordedDate = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_recorded_date(g_pstAudioMetaHandle, &pRecordedDate);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_recorded_date", nMediaContentFailCount);
+               if ( pRecordedDate != NULL )
+               {
+                       free(pRecordedDate);
+                       pRecordedDate = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_recorded_date_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_recorded_date, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_recorded_date_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+
+//& purpose: Gets the year of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_year_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the year of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the year\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, audio_meta_get_year
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_year are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_year fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_year_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       char *pYear = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_year(g_pstAudioMetaHandle, &pYear);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_year", nMediaContentFailCount);
+               if ( pYear != NULL )
+               {
+                       free(pYear);
+                       pYear = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_year_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_year, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_year_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+//& purpose: Gets track number of the given audio metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_audio_meta_get_track_num_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets track number of the given audio metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets track number\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, audio_meta_get_track_num
+* @passcase                            When media_info_foreach_media_from_db, audio_meta_get_track_num are successful
+* @failcase                            If target API media_info_foreach_media_from_db, audio_meta_get_track_num fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_audio_meta_get_track_num_p(void)
+{
+       START_TEST;
+       char *pszAudioGetAlbumSMemLog = NULL;
+       char *pszAudioGetAlbumSpeedLog = NULL;
+       char *pTrackNum = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstAudioMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemSound, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstAudioMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetAlbumSMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAudioGetAlbumSpeedLog        = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = audio_meta_get_track_num(g_pstAudioMetaHandle, &pTrackNum);
+               MediaExecutionDelay(pszAudioGetAlbumSpeedLog);
+               MediaGetMemStatus(pszAudioGetAlbumSMemLog);
+               PRINT_RESULT_LOOP(nRet, "audio_meta_get_track_num", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_audio_meta_get_track_num_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszAudioGetAlbumSpeedLog);
+               free(pszAudioGetAlbumSMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(audio_meta_get_track_num, pszAudioGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_audio_meta_get_track_num_p, pszAudioGetAlbumSMemLog);
+#endif
+       free(pszAudioGetAlbumSpeedLog);
+       free(pszAudioGetAlbumSMemLog);
+       return 0;
+}
+
+/*
+********************************* Media Video Meta *****************************
+*/
+
+//& purpose: Clones video metadata
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Function copies the video metadata handle from source to destination
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Clones video metadata\n
+*                                              Destroy video metadata handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_foreach_media_from_db, video_meta_clone, media_info_insert_to_db, video_meta_destroy and media_info_destroy
+* @passcase                            When media_info_foreach_media_from_db, video_meta_clone, audio_meta_destroy are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_clone, audio_meta_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service, Video file should be there in Video folder
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_clone_p(void)
+{
+       START_TEST;
+       char *pszpszVideoCloneMemLog = NULL;
+       char *pszVidioCloneSpeedLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       video_meta_h stHandleVideo = NULL;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszpszVideoCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszVidioCloneSpeedLog   = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_clone(&stHandleVideo, g_pstVideoMetaHandle);
+               MediaExecutionDelay(pszVidioCloneSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_clone", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = video_meta_destroy(stHandleVideo);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszpszVideoCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_destroy", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_clone_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszVidioCloneSpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszpszVideoCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_clone, pszVidioCloneSpeedLog);
+       PRINT_SPEED_LOG(video_meta_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_clone_p, pszpszVideoCloneMemLog);
+#endif
+       free(pszVidioCloneSpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszpszVideoCloneMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's height in pixel
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_height_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's height in pixels
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's height in pixels\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_height
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_height are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_height fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_height_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       int nHeight = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_height(g_pstVideoMetaHandle, &nHeight);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               FPRINTF("[Line: %d][%s] ideo Height = [%d]\\n", __LINE__, API_NAMESPACE, nHeight);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_height", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_height_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_height, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_height_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's width in pixels
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_width_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's width in pixels
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's width in pixels\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_width
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_width are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_width fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_width_p(void)
+{
+       START_TEST;
+       char *psGetWidthMemLog = NULL;
+       char *pszGetWidthSpeedLog = NULL;
+       int nWidth = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetWidthMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetWidthSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_width(g_pstVideoMetaHandle, &nWidth);
+               MediaExecutionDelay(pszGetWidthSpeedLog);
+               MediaGetMemStatus(psGetWidthMemLog);
+               FPRINTF("[Line: %d][%s] ideo Width = [%d]\\n", __LINE__, API_NAMESPACE, nWidth);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_width", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_width_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetWidthSpeedLog);
+               free (psGetWidthMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_width, pszGetWidthSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_width_p, psGetWidthMemLog);
+#endif
+       free(pszGetWidthSpeedLog);
+       free (psGetWidthMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's album
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_album_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's album
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's album\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_album
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_album are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_album fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_album_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       char *pAalbumName = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_album(g_pstVideoMetaHandle, &pAalbumName);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_album", nMediaContentFailCount);
+               if ( pAalbumName != NULL )
+               {
+                       free(pAalbumName);
+                       pAalbumName = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_album_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_album, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_album_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's artist
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_artist_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's artist
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's artist\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_artist
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_artist are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_artist fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_artist_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       char *pArtist = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_artist(g_pstVideoMetaHandle, &pArtist);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_artist", nMediaContentFailCount);
+               if ( pArtist != NULL )
+               {
+                       free(pArtist);
+                       pArtist = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_artist_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_artist, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_artist_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's bit rate
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_bit_rate_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's bit rate
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's bit rate\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_bit_rate
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_bit_rate are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_bit_rate fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_bit_rate_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       int nBitRate = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_bit_rate(g_pstVideoMetaHandle, &nBitRate);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_bit_rate", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_bit_rate_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_bit_rate, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_bit_rate_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Gets duration of video's metadata
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_duration_p
+* @type                                Auto
+* @description                 Gets duration of video's metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets duration of video's metadata\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_duration
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_duration are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_duration fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_duration_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       int nDuration = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_duration(g_pstVideoMetaHandle, &nDuration);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_duration", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_duration_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_duration, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_duration_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's composer
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_composer_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's composer
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's composer\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_composer
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_composer are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_composer fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_composer_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       char *pComposer = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_composer(g_pstVideoMetaHandle, &pComposer);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_composer", nMediaContentFailCount);
+               if ( pComposer != NULL )
+               {
+                       free(pComposer);
+                       pComposer = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_composer_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_composer, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_composer_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's copyright
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_copyright_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's copyright
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's copyright\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_copyright
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_copyright are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_copyright fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_copyright_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       char *pCopyright = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_copyright(g_pstVideoMetaHandle, &pCopyright);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_copyright", nMediaContentFailCount);
+               if ( pCopyright != NULL )
+               {
+                       free(pCopyright);
+                       pCopyright = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_copyright_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_copyright, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_copyright_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's genre
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_genre_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's genre
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's genre\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_genre
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_genre are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_genre fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_genre_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       char *pGenre = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_genre(g_pstVideoMetaHandle, &pGenre);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_genre", nMediaContentFailCount);
+               if ( pGenre != NULL )
+               {
+                       free(pGenre);
+                       pGenre = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_genre_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_genre, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_genre_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Gets id of media of given video metadata
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_media_id_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets id of media of given video metadata
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Gets id of media of given video metadata\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_media_id
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_media_id are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_media_id fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_media_id_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       char *pMediaId = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_media_id(g_pstVideoMetaHandle, &pMediaId);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_media_id", nMediaContentFailCount);
+               if ( pMediaId != NULL )
+               {
+                       free(pMediaId);
+                       pMediaId = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_media_id_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_media_id, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_media_id_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's track number
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_track_num_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's track number
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's track number\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_track_num
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_track_num are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_track_num fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_track_num_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       char *pTrackNum = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_track_num(g_pstVideoMetaHandle, &pTrackNum);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_track_num", nMediaContentFailCount);
+               if ( pTrackNum != NULL )
+               {
+                       free(pTrackNum);
+                       pTrackNum = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_track_num_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_track_num, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_track_num_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's year
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_year_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's year
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's year\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_year
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_year are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_year fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_year_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       char *pYear = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_year(g_pstVideoMetaHandle, &pYear);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_year", nMediaContentFailCount);
+               if ( pYear != NULL )
+               {
+                       free(pYear);
+                       pYear = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_year_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_year, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_year_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's recorded date
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_recorded_date_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's recorded date
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's recorded date\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_recorded_date
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_recorded_date are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_recorded_date fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_recorded_date_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       char *pRecordedDate = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_recorded_date(g_pstVideoMetaHandle, &pRecordedDate);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_recorded_date", nMediaContentFailCount);
+               if ( pRecordedDate != NULL )
+               {
+                       free(pRecordedDate);
+                       pRecordedDate = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_recorded_date_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_recorded_date, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_recorded_date_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+//& purpose: Sets/Gets the played time to an video meta handle
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_set_get_played_time_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Sets/Gets the played time to an video meta handle
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Set the played time to an video meta handle\n
+*                                              Update the played time to DB\n
+*                                              Get the played time to an video meta handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, video_meta_set_played_time, video_meta_update_to_db, video_meta_get_played_time
+* @passcase                            When media_info_foreach_media_from_db, video_meta_set_played_time, video_meta_update_to_db, video_meta_get_played_time are successful.
+* @failcase                            If target api media_info_foreach_media_from_db, video_meta_set_played_time, video_meta_update_to_db, video_meta_get_played_time fails or any precondition api fails.
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_set_get_played_time_p(void)
+{
+       START_TEST;
+       char *pszAudioGetMemLog = NULL;
+       char *pszSetPlayedCountSpeedLog = NULL;
+       char *pszGetPlayedCountSpeedLog = NULL;
+       char *pszUpdatePlayedCountSpeedLog = NULL;
+       time_t tPlayedTime = 20, tGetPlayedTime = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUpdatePlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_set_played_time(g_pstVideoMetaHandle, tPlayedTime);
+               MediaExecutionDelay(pszSetPlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_set_played_time", nMediaContentFailCount);
+
+               MediaGetTimeOfDay();
+               nRet = video_meta_update_to_db(g_pstVideoMetaHandle);
+               MediaExecutionDelay(pszUpdatePlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_update_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_played_time(g_pstVideoMetaHandle, &tGetPlayedTime);
+               MediaExecutionDelay(pszGetPlayedCountSpeedLog);
+               MediaGetMemStatus(pszAudioGetMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_played_time", nMediaContentFailCount);
+               if ( tGetPlayedTime != tPlayedTime )
+               {
+                       FPRINTF("[Line: %d][%s] GetPlayedTime in video_meta_get_played_time is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_set_get_played_time_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszSetPlayedCountSpeedLog);
+               free(pszUpdatePlayedCountSpeedLog);
+               free(pszGetPlayedCountSpeedLog);
+               free(pszAudioGetMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_set_played_time, pszSetPlayedCountSpeedLog);
+       PRINT_SPEED_LOG(video_meta_update_to_db, pszUpdatePlayedCountSpeedLog);
+       PRINT_SPEED_LOG(video_meta_get_played_time, pszGetPlayedCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_set_get_played_time_p, pszAudioGetMemLog);
+#endif
+       free(pszSetPlayedCountSpeedLog);
+       free(pszUpdatePlayedCountSpeedLog);
+       free(pszGetPlayedCountSpeedLog);
+       free(pszAudioGetMemLog);
+       return 0;
+}
+
+
+//& purpose: Sets/Gets the video's played count
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_set_get_played_count_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Sets/Gets the video's played count
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Set the video's played count\n
+*                                              Update to DB\n
+*                                              Get the video's played count\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, video_meta_set_played_count, video_meta_update_to_db, video_meta_get_played_count
+* @passcase                            When media_info_foreach_media_from_db, video_meta_set_played_count, video_meta_update_to_db, video_meta_get_played_count are successful.
+* @failcase                            If target api media_info_foreach_media_from_db, video_meta_set_played_count, video_meta_update_to_db, video_meta_get_played_count fails or any precondition api fails.
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_set_get_played_count_p(void)
+{
+       START_TEST;
+       char *pszAudioGetMemLog = NULL;
+       char *pszSetPlayedCountSpeedLog = NULL;
+       char *pszGetPlayedCountSpeedLog = NULL;
+       char *pszUpdatePlayedCountSpeedLog = NULL;
+       int nPlayCount = 3, nGetPlayCount = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUpdatePlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_set_played_count(g_pstVideoMetaHandle, nPlayCount);
+               MediaExecutionDelay(pszSetPlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_set_played_count", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = video_meta_update_to_db(g_pstVideoMetaHandle);
+               MediaExecutionDelay(pszUpdatePlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_update_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_played_count(g_pstVideoMetaHandle, &nGetPlayCount);
+               MediaExecutionDelay(pszGetPlayedCountSpeedLog);
+               MediaGetMemStatus(pszAudioGetMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_played_count", nMediaContentFailCount);
+               if ( nGetPlayCount != nPlayCount )
+               {
+                       FPRINTF("[Line: %d][%s] GetPlayCount in video_meta_get_played_count is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_set_get_played_count_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszSetPlayedCountSpeedLog);
+               free(pszUpdatePlayedCountSpeedLog);
+               free(pszGetPlayedCountSpeedLog);
+               free(pszAudioGetMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_set_played_count, pszSetPlayedCountSpeedLog);
+       PRINT_SPEED_LOG(video_meta_update_to_db, pszUpdatePlayedCountSpeedLog);
+       PRINT_SPEED_LOG(video_meta_get_played_count, pszGetPlayedCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_set_get_played_count_p, pszAudioGetMemLog);
+#endif
+       free(pszSetPlayedCountSpeedLog);
+       free(pszUpdatePlayedCountSpeedLog);
+       free(pszGetPlayedCountSpeedLog);
+       free(pszAudioGetMemLog);
+       return 0;
+}
+
+//& purpose: Sets/Gets the video's position played parameter
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_set_get_played_position_p
+* @type                                Auto
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Set the video's position played parameter\n
+*                                              Update the to DB\n
+*                                              Get the video's position played parameter\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, video_meta_set_played_position, video_meta_update_to_db, video_meta_get_played_position
+* @passcase                            When media_info_foreach_media_from_db, video_meta_set_played_position, video_meta_update_to_db, video_meta_get_played_position are successful.
+* @failcase                            If target api media_info_foreach_media_from_db, video_meta_set_played_position, video_meta_update_to_db, video_meta_get_played_position fails or any precondition api fails.
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_set_get_played_position_p(void)
+{
+       START_TEST;
+       char *pszAudioGetMemLog = NULL;
+       char *pszSetPlayedCountSpeedLog = NULL;
+       char *pszGetPlayedCountSpeedLog = NULL;
+       char *pszUpdatePlayedCountSpeedLog = NULL;
+       int nPlayedPosition = 5, nGetPlayedPosition = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for audio_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUpdatePlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_set_played_position(g_pstVideoMetaHandle, nPlayedPosition);
+               MediaExecutionDelay(pszSetPlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_set_played_count", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = video_meta_update_to_db(g_pstVideoMetaHandle);
+               MediaExecutionDelay(pszUpdatePlayedCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_update_to_db", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_played_position(g_pstVideoMetaHandle, &nGetPlayedPosition);
+               MediaExecutionDelay(pszGetPlayedCountSpeedLog);
+               MediaGetMemStatus(pszAudioGetMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_played_count", nMediaContentFailCount);
+               if ( nGetPlayedPosition != nPlayedPosition )
+               {
+                       FPRINTF("[Line: %d][%s] GetPlayedPosition in video_meta_get_played_position is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_set_get_played_position_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszSetPlayedCountSpeedLog);
+               free(pszUpdatePlayedCountSpeedLog);
+               free(pszGetPlayedCountSpeedLog);
+               free(pszAudioGetMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_set_played_count, pszSetPlayedCountSpeedLog);
+       PRINT_SPEED_LOG(video_meta_update_to_db, pszUpdatePlayedCountSpeedLog);
+       PRINT_SPEED_LOG(video_meta_get_played_count, pszGetPlayedCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_set_get_played_position_p, pszAudioGetMemLog);
+#endif
+       free(pszSetPlayedCountSpeedLog);
+       free(pszUpdatePlayedCountSpeedLog);
+       free(pszGetPlayedCountSpeedLog);
+       free(pszAudioGetMemLog);
+       return 0;
+}
+
+//& purpose: Gets the video's album_artist
+//& type: Auto
+/**
+* @testcase                    ITc_media_content_video_meta_get_album_artist_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the video's album_artist
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the video's album_artist\n
+*                                              Close connection to content service
+* @apicovered                  media_info_insert_to_db, media_info_destroy, media_info_foreach_media_from_db, video_meta_get_album_artist
+* @passcase                            When media_info_foreach_media_from_db, video_meta_get_album_artist are successful
+* @failcase                            If target API media_info_foreach_media_from_db, video_meta_get_album_artist fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_video_meta_get_album_artist_p(void)
+{
+       START_TEST;
+       char *psGetAlbumMemLog = NULL;
+       char *pszGetAlbumSpeedLog = NULL;
+       char *pAalbumArtist = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstVideoMetaHandle = NULL;
+       media_info_h stHandleInfo = NULL;
+       
+       nRet = media_info_insert_to_db(g_strSystemCamera, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstVideoMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ideo_meta_h not set in Callback[MediaInfoCB]. Video might not present on device\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       psGetAlbumMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumSpeedLog     = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = video_meta_get_album_artist(g_pstVideoMetaHandle, &pAalbumArtist);
+               MediaExecutionDelay(pszGetAlbumSpeedLog);
+               MediaGetMemStatus(psGetAlbumMemLog);
+               PRINT_RESULT_LOOP(nRet, "video_meta_get_album_artist", nMediaContentFailCount);
+               if ( pAalbumArtist != NULL )
+               {
+                       FPRINTF("[Line: %d][%s] albumArtist = [%s]\\n", __LINE__, API_NAMESPACE,pAalbumArtist);
+                       free(pAalbumArtist);
+                       pAalbumArtist = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_video_meta_get_album_artist_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumSpeedLog);
+               free (psGetAlbumMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(video_meta_get_album_artist, pszGetAlbumSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_video_meta_get_album_artist_p, psGetAlbumMemLog);
+#endif
+       free(pszGetAlbumSpeedLog);
+       free (psGetAlbumMemLog);
+       return 0;
+}
+
+/*
+************************* Media Image Metadata *****************************
+*/
+
+//& purpose: Clones image metadata
+//& type: auto
+/**
+* @testcase                    ITc_media_content_image_meta_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Function copies the image metadata handle from source to destination
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Clones image metadata\n
+*                                              Destroy image metadata handle\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, image_meta_clone, image_meta_destroy
+* @passcase                            When media_info_foreach_media_from_db, image_meta_clone, image_meta_destroy are successful
+* @failcase                            If target API media_info_foreach_media_from_db, image_meta_clone, image_meta_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_image_meta_clone_p(void)
+{
+       START_TEST;
+       char *pszImageCloneMemLog = NULL;
+       char *pszImageCloneSpeedLog = NULL;
+       char *pszInfoDestroySpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       image_meta_h stHandleImage = NULL;
+       g_pstImageMetaHandle = NULL;
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstImageMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] mage_meta_h not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszImageCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszImageCloneSpeedLog   = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInfoDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = image_meta_clone(&stHandleImage, g_pstImageMetaHandle);
+               MediaExecutionDelay(pszImageCloneSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "image_meta_clone", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = image_meta_destroy(stHandleImage);
+               MediaExecutionDelay(pszInfoDestroySpeedLog);
+               MediaGetMemStatus(pszImageCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "image_meta_destroy", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_image_meta_clone_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszImageCloneSpeedLog);
+               free(pszInfoDestroySpeedLog);
+               free(pszImageCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_meta_clone, pszImageCloneSpeedLog);
+       PRINT_SPEED_LOG(image_meta_destroy, pszInfoDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_image_meta_clone_p, pszImageCloneMemLog);
+#endif
+       free(pszImageCloneSpeedLog);
+       free(pszInfoDestroySpeedLog);
+       free(pszImageCloneMemLog);
+       return 0;
+}
+
+//& purpose: Gets the burst shot id
+//& type: auto
+/**
+* @testcase                    ITc_media_content_image_meta_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the burst shot id
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the burst shot id\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, image_meta_get_burst_id
+* @passcase                            When media_info_foreach_media_from_db, image_meta_get_burst_id are successful
+* @failcase                            If target API media_info_foreach_media_from_db, image_meta_get_burst_id fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_image_meta_get_burst_id_p(void)
+{
+       START_TEST;
+       char *pszImageCloneMemLog = NULL;
+       char *pszImageCloneSpeedLog = NULL;
+       char *pBurstId = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstImageMetaHandle = NULL;
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstImageMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] mage_meta_h not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszImageCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszImageCloneSpeedLog   = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = image_meta_get_burst_id(g_pstImageMetaHandle, &pBurstId);
+               MediaExecutionDelay(pszImageCloneSpeedLog);
+               MediaGetMemStatus(pszImageCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "image_meta_get_burst_id", nMediaContentFailCount);
+               if ( pBurstId != NULL )
+               {
+                       free(pBurstId);
+                       pBurstId = NULL;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_image_meta_clone_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszImageCloneSpeedLog);
+               free(pszImageCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_meta_get_burst_id, pszImageCloneSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_image_meta_clone_p, pszImageCloneMemLog);
+#endif
+       free(pszImageCloneSpeedLog);
+       free(pszImageCloneMemLog);
+       return 0;
+}
+
+
+//& purpose: Gets the image's creation time as time_t structure
+//& type: auto
+/**
+* @testcase                    ITc_media_content_image_meta_get_date_taken_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the image's creation time as time_t structure
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the image's creation time as time_t structure\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, image_meta_get_date_taken
+* @passcase                            When media_info_foreach_media_from_db, image_meta_get_date_taken are successful
+* @failcase                            If target API media_info_foreach_media_from_db, image_meta_get_date_taken fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_image_meta_get_date_taken_p(void)
+{
+       START_TEST;
+       char *pszImageCloneMemLog = NULL;
+       char *pszImageCloneSpeedLog = NULL;
+       char *pDateTaken = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstImageMetaHandle = NULL;
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstImageMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] mage_meta_h not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszImageCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszImageCloneSpeedLog   = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = image_meta_get_date_taken(g_pstImageMetaHandle, &pDateTaken);
+               MediaExecutionDelay(pszImageCloneSpeedLog);
+               MediaGetMemStatus(pszImageCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "image_meta_get_date_taken", nMediaContentFailCount);
+       }
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_image_meta_get_date_taken_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszImageCloneSpeedLog);
+               free(pszImageCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_meta_get_date_taken, pszImageCloneSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_image_meta_get_date_taken_p, pszImageCloneMemLog);
+#endif
+       free(pszImageCloneSpeedLog);
+       free(pszImageCloneMemLog);
+       return 0;
+}
+
+
+//& purpose: Gets the image's height in pixels
+//& type: auto
+/**
+* @testcase                    ITc_media_content_image_meta_get_height_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the image's height in pixels
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the image's height in pixels\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, image_meta_get_height
+* @passcase                            When media_info_foreach_media_from_db, image_meta_get_height are successful
+* @failcase                            If target API media_info_foreach_media_from_db, image_meta_get_height fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_image_meta_get_height_p(void)
+{
+       START_TEST;
+       char *pszImageCloneMemLog = NULL;
+       char *pszImageCloneSpeedLog = NULL;
+       int nHeight = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstImageMetaHandle = NULL;
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstImageMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] mage_meta_h not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszImageCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszImageCloneSpeedLog   = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = image_meta_get_height(g_pstImageMetaHandle, &nHeight);
+               MediaExecutionDelay(pszImageCloneSpeedLog);
+               MediaGetMemStatus(pszImageCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "image_meta_get_height", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_image_meta_get_height_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszImageCloneSpeedLog);
+               free(pszImageCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_meta_get_height, pszImageCloneSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_image_meta_get_height_p, pszImageCloneMemLog);
+#endif
+       free(pszImageCloneSpeedLog);
+       free(pszImageCloneMemLog);
+       return 0;
+}
+
+//& purpose: Gets the image's width in pixels
+//& type: auto
+/**
+* @testcase                    ITc_media_content_image_meta_get_width_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the image's width in pixels
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the image's width in pixels\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, image_meta_get_width
+* @passcase                            When media_info_foreach_media_from_db, image_meta_get_width are successful
+* @failcase                            If target API media_info_foreach_media_from_db, image_meta_get_width fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_image_meta_get_width_p(void)
+{
+       START_TEST;
+       char *pszImageCloneMemLog = NULL;
+       char *pszImageCloneSpeedLog = NULL;
+       int nWidth = 0;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstImageMetaHandle = NULL;
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstImageMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] mage_meta_h not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszImageCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszImageCloneSpeedLog   = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = image_meta_get_width(g_pstImageMetaHandle, &nWidth);
+               MediaExecutionDelay(pszImageCloneSpeedLog);
+               MediaGetMemStatus(pszImageCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "image_meta_get_width", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_image_meta_get_width_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszImageCloneSpeedLog);
+               free(pszImageCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_meta_get_width, pszImageCloneSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_image_meta_get_width_p, pszImageCloneMemLog);
+#endif
+       free(pszImageCloneSpeedLog);
+       free(pszImageCloneMemLog);
+       return 0;
+}
+
+//& purpose: Checks whether the media is burst shot image
+//& type: auto
+/**
+* @testcase                    ITc_media_content_image_meta_is_burst_shot_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 GChecks whether the media is burst shot image
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Checks whether the media is burst shot image\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, image_meta_is_burst_shot
+* @passcase                            When media_info_foreach_media_from_db, image_meta_is_burst_shot are successful
+* @failcase                            If target API media_info_foreach_media_from_db, image_meta_is_burst_shot fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_image_meta_is_burst_shot_p(void)
+{
+       START_TEST;
+       char *pszImageCloneMemLog = NULL;
+       char *pszImageCloneSpeedLog = NULL;
+       bool bIsBurstShot = false;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstImageMetaHandle = NULL;
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstImageMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] mage_meta_h not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszImageCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszImageCloneSpeedLog   = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = image_meta_is_burst_shot(g_pstImageMetaHandle, &bIsBurstShot);
+               MediaExecutionDelay(pszImageCloneSpeedLog);
+               MediaGetMemStatus(pszImageCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "image_meta_is_burst_shot", nMediaContentFailCount);
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_image_meta_is_burst_shot_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszImageCloneSpeedLog);
+               free(pszImageCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_meta_is_burst_shot, pszImageCloneSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_image_meta_is_burst_shot_p, pszImageCloneMemLog);
+#endif
+       free(pszImageCloneSpeedLog);
+       free(pszImageCloneMemLog);
+       return 0;
+}
+
+//& purpose: Gets the ID of an image
+//& type: auto
+/**
+* @testcase                    ITc_media_content_image_meta_get_media_id_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the ID of an image
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Get the ID of an image\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, image_meta_get_media_id
+* @passcase                            When media_info_foreach_media_from_db, image_meta_get_media_id are successful
+* @failcase                            If target API media_info_foreach_media_from_db, image_meta_get_media_id fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_image_meta_get_media_id_p(void)
+{
+       START_TEST;
+       char *pszImageCloneMemLog = NULL;
+       char *pszImageCloneSpeedLog = NULL;
+       char *pMediaId = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstImageMetaHandle = NULL;
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       if ( g_pstImageMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] mage_meta_h not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszImageCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszImageCloneSpeedLog   = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = image_meta_get_media_id(g_pstImageMetaHandle, &pMediaId);
+               MediaExecutionDelay(pszImageCloneSpeedLog);
+               MediaGetMemStatus(pszImageCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "image_meta_get_media_id", nMediaContentFailCount);
+               if ( pMediaId != NULL )
+               {
+                       free(pMediaId);
+                       pMediaId = NULL;
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_image_meta_get_media_id_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszImageCloneSpeedLog);
+               free(pszImageCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_meta_get_media_id, pszImageCloneSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_image_meta_get_media_id_p, pszImageCloneMemLog);
+#endif
+       free(pszImageCloneSpeedLog);
+       free(pszImageCloneMemLog);
+       return 0;
+}
+
+
+//& purpose: Sets/Gets the image's orientation
+//& type: auto
+/**
+* @testcase                    ITc_media_content_image_meta_set_get_orientation_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Sets/Gets the image's orientation
+* @scenario                            Open connection to content service\n
+*                                              Iterate through media info from the media database\n
+*                                              Set the image's orientation\n
+*                                              Update the to DB\n
+*                                              Get the image's orientation\n
+*                                              Close connection to content service
+* @apicovered                  media_info_foreach_media_from_db, image_meta_set_orientation, image_meta_update_to_db, image_meta_get_orientation
+* @passcase                            When media_info_foreach_media_from_db, image_meta_set_orientation, image_meta_update_to_db, image_meta_get_orientation are successful
+* @failcase                            If target API media_info_foreach_media_from_db, image_meta_set_orientation, image_meta_update_to_db, image_meta_get_orientation fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_image_meta_set_get_orientation_p(void)
+{
+       START_TEST;
+       char *pszAudioGetMemLog = NULL;
+       char *pszSetPlayedCountSpeedLog = NULL;
+       char *pszGetPlayedCountSpeedLog = NULL;
+       char *pszUpdatePlayedCountSpeedLog = NULL;
+       media_content_orientation_e eGetOrientation;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_pstImageMetaHandle = NULL;
+       media_content_orientation_e eMediaContentOrientation[] = {
+                                       MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE,
+                                       MEDIA_CONTENT_ORIENTATION_NORMAL,
+                                       MEDIA_CONTENT_ORIENTATION_HFLIP,
+                                       MEDIA_CONTENT_ORIENTATION_ROT_180,
+                                       MEDIA_CONTENT_ORIENTATION_VFLIP ,
+                                       MEDIA_CONTENT_ORIENTATION_TRANSPOSE,
+                                       MEDIA_CONTENT_ORIENTATION_ROT_90,
+                                       MEDIA_CONTENT_ORIENTATION_TRANSVERSE,
+                                       MEDIA_CONTENT_ORIENTATION_ROT_270
+                                       };
+                                       
+       int nEnumSize = sizeof(eMediaContentOrientation) / sizeof(eMediaContentOrientation[0]);
+       int nEnumCounter = 0;
+       
+       
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       if ( g_pstImageMetaHandle == NULL )
+       {
+               FPRINTF("[Line: %d][%s] alue for Image_meta_h handle not set in Callback[MediaInfoCB]\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszAudioGetMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       pszUpdatePlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       pszGetPlayedCountSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+
+       for ( nEnumCounter=0; nEnumCounter<nEnumSize; nEnumCounter++)
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       char *szEnumVal = NULL;
+                       MediaGetMemAllocation();
+                       MediaGetTimeOfDay();
+                       nRet = image_meta_set_orientation(g_pstImageMetaHandle, eMediaContentOrientation[nEnumCounter]);
+                       MediaExecutionDelay(pszSetPlayedCountSpeedLog);
+                       switch( eMediaContentOrientation[nEnumCounter] )
+                       {
+                               case MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE : szEnumVal = "MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE" ; break;
+                               case MEDIA_CONTENT_ORIENTATION_NORMAL : szEnumVal = "MEDIA_CONTENT_ORIENTATION_NORMAL" ; break;
+                               case MEDIA_CONTENT_ORIENTATION_HFLIP : szEnumVal = "MEDIA_CONTENT_ORIENTATION_HFLIP" ; break;
+                               case MEDIA_CONTENT_ORIENTATION_ROT_180 : szEnumVal = "MEDIA_CONTENT_ORIENTATION_ROT_180" ; break;
+                               case MEDIA_CONTENT_ORIENTATION_VFLIP : szEnumVal = "MEDIA_CONTENT_ORIENTATION_VFLIP" ; break;
+                               case MEDIA_CONTENT_ORIENTATION_TRANSPOSE : szEnumVal = "MEDIA_CONTENT_ORIENTATION_TRANSPOSE" ; break;
+                               case MEDIA_CONTENT_ORIENTATION_ROT_90 : szEnumVal = "MEDIA_CONTENT_ORIENTATION_ROT_90" ; break;
+                               case MEDIA_CONTENT_ORIENTATION_TRANSVERSE : szEnumVal = "MEDIA_CONTENT_ORIENTATION_TRANSVERSE" ; break;
+                               case MEDIA_CONTENT_ORIENTATION_ROT_270 : szEnumVal = "MEDIA_CONTENT_ORIENTATION_ROT_270" ; break;
+                       }
+                       PRINT_RESULT_LOOP(nRet, "image_meta_set_orientation", nMediaContentFailCount);
+                       if ( nRet != MEDIA_CONTENT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line: %d][%s] ailed for [ %d] times, for enum = [ %s ]\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, szEnumVal);
+                       }
+                       else
+                       {
+                               FPRINTF("[Line: %d][%s] or enum = [ %s ]\\n", __LINE__, API_NAMESPACE,szEnumVal);
+                       }
+                       MediaGetTimeOfDay();
+                       nRet = image_meta_update_to_db(g_pstImageMetaHandle);
+                       MediaExecutionDelay(pszUpdatePlayedCountSpeedLog);
+                       PRINT_RESULT_LOOP(nRet, "image_meta_update_to_db", nMediaContentFailCount);
+                       
+                       MediaGetTimeOfDay();
+                       nRet = image_meta_get_orientation(g_pstImageMetaHandle, &eGetOrientation);
+                       MediaExecutionDelay(pszGetPlayedCountSpeedLog);
+                       MediaGetMemStatus(pszAudioGetMemLog);
+                       PRINT_RESULT_LOOP(nRet, "image_meta_get_orientation", nMediaContentFailCount);
+               
+                       if ( eGetOrientation != eMediaContentOrientation[nEnumCounter] )
+                       {
+                               FPRINTF("[Line: %d][%s] GetOrientation in image_meta_get_orientation is not same, as set\\n", __LINE__, API_NAMESPACE);
+                               nMediaContentFailCount++;
+                       }
+               }
+       }
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_image_meta_set_get_orientation_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT * nEnumSize );
+               free(pszSetPlayedCountSpeedLog);
+               free(pszUpdatePlayedCountSpeedLog);
+               free(pszGetPlayedCountSpeedLog);
+               free(pszAudioGetMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(image_meta_set_orientation, pszSetPlayedCountSpeedLog);
+       PRINT_SPEED_LOG(image_meta_update_to_db, pszUpdatePlayedCountSpeedLog);
+       PRINT_SPEED_LOG(image_meta_get_orientation, pszGetPlayedCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_image_meta_set_get_orientation_p, pszAudioGetMemLog);
+#endif
+       free(pszSetPlayedCountSpeedLog);
+       free(pszUpdatePlayedCountSpeedLog);
+       free(pszGetPlayedCountSpeedLog);
+       free(pszAudioGetMemLog);
+       return 0;
+}
+
+/*
+******************************* Media Live Box ***********************
+*/
+// REMOVED from LITE
+
+/*
+************************* Media Content Cloud ********************************
+*/
+// REMOVED from LITE
+
+/*
+************************ Media Album ******************************
+*/
+
+//& purpose: Iterates through the media album
+//& type: auto
+/**
+* @testcase                    ITc_media_content_album_foreach_album_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Iterate through the media album
+* @scenario                            Iterate through available media folders\n
+*                                              call for callback [MediaContentAlbumCB].Called for every album in obtained list of groups
+* @apicovered                  media_info_insert_to_db, media_info_foreach_media_from_db, media_info_destroy, media_album_foreach_album_from_db
+* @passcase                            When media_album_foreach_album_from_db is successful
+* @failcase                            If target API media_album_foreach_album_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_album_foreach_album_from_db_p(void)
+{
+       START_TEST;
+       char *pszMediaAlbumForEachMemLog = NULL;
+       char *pszMediaAlbumForEachSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_bMediaContentCBFlag = false;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strInsertPathAlbum, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       
+#if MEMORY_CHECK
+       pszMediaAlbumForEachMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszMediaAlbumForEachSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bMediaContentCBFlag = false;
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_album_foreach_album_from_db(NULL, MediaContentAlbumCB, NULL);
+               MediaExecutionDelay(pszMediaAlbumForEachSpeedLog);
+               MediaGetMemStatus(pszMediaAlbumForEachMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_album_foreach_album_from_db",nMediaContentFailCount);
+               if ( g_bMediaContentCBFlag == false )
+               {
+                       FPRINTF("[Line: %d][%s] allback failed\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+               
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_album_foreach_album_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszMediaAlbumForEachSpeedLog);
+               free(pszMediaAlbumForEachMemLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_album_foreach_album_from_db, pszMediaAlbumForEachSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_album_foreach_album_from_db_p, pszMediaAlbumForEachMemLog);
+#endif
+
+       free(pszMediaAlbumForEachSpeedLog);
+       free(pszMediaAlbumForEachMemLog);
+
+       return 0;
+}
+
+//& purpose: Clones a media album
+//& type: auto
+/**
+* @testcase                    ITc_media_content_album_clone_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Clones a media album and Destroys the album handle
+* @scenario                            Iterate through available media folders\n
+*                                              Clones a media album with call to media_album_clone\n
+*                                              Destroys the album handle
+* @apicovered                  media_info_insert_to_db, media_info_foreach_media_from_db, media_album_foreach_album_from_db, media_album_clone, media_album_destroy, media_info_destroy
+* @passcase                            When media_album_clone and media_album_destroy are successful
+* @failcase                            If target API media_album_clone and media_album_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_album_clone_p(void)
+{
+       START_TEST;
+       char *pszCloneMemLog = NULL;
+       char *pszCloneSpeedLog = NULL;
+       char *pszAlbumDestroySpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       media_album_h stAlbumHandle = NULL;
+       g_bMediaContentCBFlag = false;
+       g_stHandleMediaAlbum = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strInsertPathAlbum, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       nRet = media_album_foreach_album_from_db(NULL, MediaContentAlbumCB, NULL);
+       PRINT_RESULT(nRet, "media_album_foreach_album_from_db");
+       
+       if ( g_stHandleMediaAlbum == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ediaAlbum_handle not initialize\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCloneSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszAlbumDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif                 
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_album_clone(&stAlbumHandle, g_stHandleMediaAlbum);
+               MediaExecutionDelay(pszCloneSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_album_clone", nMediaContentFailCount);
+                                               
+               MediaGetTimeOfDay();
+               nRet = media_album_destroy(stAlbumHandle);
+               MediaExecutionDelay(pszAlbumDestroySpeedLog);
+               MediaGetMemStatus(pszCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_album_destroy", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_album_clone_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszCloneSpeedLog);
+               free(pszCloneMemLog);
+               free(pszAlbumDestroySpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_album_clone, pszCloneSpeedLog);
+       PRINT_SPEED_LOG(media_album_destroy, pszAlbumDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_album_clone_p, pszCloneMemLog);
+#endif
+
+       free(pszCloneSpeedLog);
+       free(pszCloneMemLog);
+       free(pszAlbumDestroySpeedLog);
+
+       return 0;
+}
+
+//& purpose: Get media album name
+//& type: auto
+/**
+* @testcase                    ITc_media_content_album_get_name_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get media album name
+* @scenario                            Iterate through available media folders\n
+*                                              Clones a media album with call to media_album_clone\n
+*                                              Get media album name\n
+*                                              Destroys the album handle
+* @apicovered                  media_info_insert_to_db, media_info_foreach_media_from_db, media_album_foreach_album_from_db, media_album_get_name, media_album_clone, media_album_destroy, media_info_destroy
+* @passcase                            When media_album_get_name, media_album_clone and media_album_destroy are successful
+* @failcase                            If target API media_album_get_name, media_album_clone and media_album_destroy fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_album_get_name_p(void)
+{
+       START_TEST;
+       char *pszCloneMemLog = NULL;
+       char *pszCloneSpeedLog = NULL;
+       char *pAlbumName = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       media_album_h stAlbumHandle = NULL;
+       g_bMediaContentCBFlag = false;
+       g_stHandleMediaAlbum = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strInsertPathAlbum, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       
+       nRet = media_album_foreach_album_from_db(NULL, MediaContentAlbumCB, NULL);
+       PRINT_RESULT(nRet, "media_album_foreach_album_from_db");
+       
+       if ( g_stHandleMediaAlbum == NULL )
+       {
+               FPRINTF("[Line: %d][%s] ediaAlbum_handle not initialize\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszCloneMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszCloneSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif                 
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = media_album_clone(&stAlbumHandle, g_stHandleMediaAlbum);
+               PRINT_RESULT_LOOP(nRet, "media_album_clone", nMediaContentFailCount);
+               
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_album_get_name(stAlbumHandle, &pAlbumName);
+               MediaExecutionDelay(pszCloneSpeedLog);
+               MediaGetMemStatus(pszCloneMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_album_get_name", nMediaContentFailCount);
+               if ( pAlbumName != NULL )
+               {
+                       FPRINTF("[Line: %d][%s] edia album name = [%s]\\n", __LINE__, API_NAMESPACE,pAlbumName );
+                       free(pAlbumName);
+                       pAlbumName = NULL;
+               }
+               
+               nRet = media_album_destroy(stAlbumHandle);
+               PRINT_RESULT_LOOP(nRet, "media_album_destroy", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_album_get_name_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszCloneSpeedLog);
+               free(pszCloneMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_album_get_name, pszCloneSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_album_get_name_p, pszCloneMemLog);
+#endif
+       free(pszCloneSpeedLog);
+       free(pszCloneMemLog);
+       return 0;
+}
+
+//& purpose: Gets the number of album for the passed filter from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_album_get_album_count_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the number of album for the passed filter from the media database
+* @scenario                            Iterate through available media folders through [media_album_foreach_album_from_db] api\n
+*                                              Calls to [media_album_get_album_count_from_db] to get number of album,
+* @apicovered                  media_info_insert_to_db, media_info_foreach_media_from_db, media_album_foreach_album_from_db, media_album_get_album_count_from_db, media_info_destroy
+* @passcase                            When media_album_get_album_count_from_db is successful
+* @failcase                            If target API media_album_get_album_count_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_album_get_album_count_from_db_p(void)
+{
+       START_TEST;
+       char *pszGetAlbumFromDBMemLog = NULL;
+       char *pszGetAlbumFromDBSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nAlbum_count = 0;
+       g_bMediaContentCBFlag = false;
+       g_stHandleMediaAlbum = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strInsertPathAlbum, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+               
+       
+       nRet = media_album_foreach_album_from_db(NULL, MediaContentAlbumCB, NULL);
+       PRINT_RESULT(nRet, "media_album_foreach_album_from_db");
+       
+       if ( g_bMediaContentCBFlag != true )
+       {
+               FPRINTF("[Line: %d][%s] ediaContentAlbumCB callback failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszGetAlbumFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAlbumFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_album_get_album_count_from_db(NULL, &nAlbum_count);
+               MediaExecutionDelay(pszGetAlbumFromDBSpeedLog);
+               MediaGetMemStatus(pszGetAlbumFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_album_get_album_count_from_db", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_album_get_album_count_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAlbumFromDBSpeedLog);
+               free(pszGetAlbumFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_album_get_album_count_from_db, pszGetAlbumFromDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_album_get_album_count_from_db_p, pszGetAlbumFromDBMemLog);
+#endif
+
+       free(pszGetAlbumFromDBSpeedLog);
+       free(pszGetAlbumFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Gets the name of the artist from the given album
+//& type: auto
+/**
+* @testcase                    ITc_media_content_album_get_artist_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the name of the artist from the given album
+* @scenario                            Iterate through available media folders through [media_album_foreach_album_from_db] api\n
+*                                              Call to [media_album_get_artist] for getting Album artist
+* @apicovered                  media_info_destroy, media_info_insert_to_db, media_info_foreach_media_from_db, media_album_foreach_album_from_db, media_album_get_artist
+* @passcase                            When media_album_get_artist is successful
+* @failcase                            If target API media_album_get_artist fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_album_get_artist_p(void)
+{
+       START_TEST;
+       char *pszArtistMemLog = NULL;
+       char *pszArtistSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pArtist_name = NULL;
+       g_bMediaContentCBFlag = false;
+       g_stHandleMediaAlbum = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strInsertPathAlbum, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       
+       nRet = media_album_foreach_album_from_db(NULL, MediaContentAlbumCB, NULL);
+       PRINT_RESULT(nRet, "media_album_foreach_album_from_db");
+       
+       if ( g_bMediaContentCBFlag != true )
+       {
+               FPRINTF("[Line: %d][%s] ediaContentAlbumCB callback failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszArtistMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszArtistSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_album_get_artist(g_stHandleMediaAlbum, &pArtist_name);
+               MediaExecutionDelay(pszArtistSpeedLog);
+               MediaGetMemStatus(pszArtistMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_album_get_artist", nMediaContentFailCount);
+               if ( pArtist_name != NULL )
+               {
+                       free(pArtist_name);
+                       pArtist_name = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_album_get_artist_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszArtistSpeedLog);
+               free(pszArtistMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_album_get_artist, pszArtistSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_album_get_artist_p, pszArtistMemLog);
+#endif
+
+       free(pszArtistSpeedLog);
+       free(pszArtistMemLog);
+       return 0;
+}
+
+//& purpose: Gets number of media info for the given album present and to gets all media files associated with the given media album
+//& type: auto
+/**
+* @testcase                    ITc_media_content_album_get_media_count_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets number of media info for the given album present in the media database
+* @scenario                            Iterate through available media folders through [media_album_foreach_album_from_db] api\n
+*                                              [media_album_foreach_media_from_db] gets all media files associated with the given media album\n
+*                                              Call to [media_album_get_media_count_from_db] for getting number of media info for the given album present
+* @apicovered                  media_info_destroy, media_info_insert_to_db, media_info_foreach_media_from_db, media_album_foreach_album_from_db, media_album_get_media_count_from_db, media_album_foreach_media_from_db
+* @passcase                            When media_album_get_media_count_from_db and media_album_foreach_media_from_db are successful
+* @failcase                            If target API media_album_get_media_count_from_db and media_album_foreach_media_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_album_get_media_count_from_db_p(void)
+{
+       START_TEST;
+       char *pszGetMediaCountFromDBMemLog = NULL;
+       char *pszGetMediaCountFromDBSpeedLog = NULL;
+       char *pszForeachMediaSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0, nMediaCount = 0;
+       g_bMediaContentCBFlag = false;
+       g_stHandleMediaAlbum = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strInsertPathAlbum, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       
+       nRet = media_album_foreach_album_from_db(NULL, MediaContentAlbumCB, NULL);
+       PRINT_RESULT(nRet, "media_album_foreach_album_from_db");
+       
+       if ( g_bMediaContentCBFlag != true )
+       {
+               FPRINTF("[Line: %d][%s] ediaContentAlbumCB callback failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszGetMediaCountFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetMediaCountFromDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszForeachMediaSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               FPRINTF("[Line: %d][%s] edia_album_get_album_id passed\\n", __LINE__, API_NAMESPACE);
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_album_get_media_count_from_db(g_nAlbumid, NULL, &nMediaCount);
+               MediaExecutionDelay(pszGetMediaCountFromDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_album_get_media_count_from_db", nMediaContentFailCount);
+
+               g_bMediaContentCBFlag = false;
+               MediaGetTimeOfDay();
+               nRet = media_album_foreach_media_from_db(g_nAlbumid, NULL, MediaInfoCB, NULL);
+               MediaExecutionDelay(pszForeachMediaSpeedLog);
+               MediaGetMemStatus(pszGetMediaCountFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_album_foreach_media_from_db", nMediaContentFailCount);
+               
+               if ( g_bMediaContentCBFlag == false )
+               {
+                       nMediaContentFailCount++;
+                       FPRINTF("[Line: %d][%s] ediaInfoCB not called\\n", __LINE__, API_NAMESPACE);
+               }
+       }
+       media_info_destroy(stHandleInfo);
+               
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_album_get_media_count_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE,nMediaContentFailCount, MAX_COUNT);
+               free(pszGetMediaCountFromDBSpeedLog);
+               free(pszGetMediaCountFromDBMemLog);
+               free(pszForeachMediaSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_album_get_media_count_from_db, pszGetMediaCountFromDBSpeedLog);
+       PRINT_SPEED_LOG(media_album_foreach_media_from_db, pszForeachMediaSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_album_get_media_count_from_db_p, pszGetMediaCountFromDBMemLog);
+#endif
+
+       free(pszGetMediaCountFromDBSpeedLog);
+       free(pszGetMediaCountFromDBMemLog);
+       free(pszForeachMediaSpeedLog);
+       return 0;
+}
+
+//& purpose: Gets the media album from the media database
+//& type: auto
+/**
+* @testcase                    ITc_media_content_album_get_album_from_db_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Get the media album from the media database
+* @scenario                            Iterate through available media folders through [media_album_foreach_album_from_db] api\n
+*                                              [media_album_get_album_from_db] Gets the media album from the media database
+* @apicovered                  media_info_destroy, media_album_destroy, media_info_insert_to_db, media_album_get_album_from_db, media_info_foreach_media_from_db, media_album_foreach_album_from_db
+* @passcase                            When media_album_get_album_from_db is successful
+* @failcase                            If target API media_album_get_album_from_db fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_album_get_album_from_db_p(void)
+{
+       START_TEST;
+       char *pszGetMediaCountFromDBMemLog = NULL;
+       char *pszGetAbumFrmDBSpeedLog = NULL;
+       char *pszAlbumDestroySpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char* pAlbum_name = NULL;
+       media_album_h stAlbumNew = NULL;
+       g_bMediaContentCBFlag = false;
+       g_stHandleMediaAlbum = NULL;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strInsertPathAlbum, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       nRet = media_album_foreach_album_from_db(NULL, MediaContentAlbumCB, pAlbum_name);
+       PRINT_RESULT(nRet, "media_album_foreach_album_from_db");
+       
+       if ( g_bMediaContentCBFlag != true )
+       {
+               FPRINTF("[Line: %d][%s] ediaContentAlbumCB callback failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszGetMediaCountFromDBMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetAbumFrmDBSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszAlbumDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               FPRINTF("[Line: %d][%s] edia_album_get_album_id passed\\n", __LINE__, API_NAMESPACE);
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_album_get_album_from_db(g_nAlbumid, &stAlbumNew);
+               MediaExecutionDelay(pszGetAbumFrmDBSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_album_get_album_from_db", nMediaContentFailCount);
+                                                                       
+               MediaGetTimeOfDay();
+               nRet = media_album_destroy(stAlbumNew);
+               MediaExecutionDelay(pszAlbumDestroySpeedLog);
+               MediaGetMemStatus(pszGetMediaCountFromDBMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_album_destroy", nMediaContentFailCount);
+       }
+       media_info_destroy(stHandleInfo);
+               
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_album_get_album_from_db_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszGetAbumFrmDBSpeedLog);
+               free(pszAlbumDestroySpeedLog);
+               free(pszGetMediaCountFromDBMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_album_get_album_from_db, pszGetAbumFrmDBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_album_get_album_from_db_p, pszGetMediaCountFromDBMemLog);
+#endif
+
+       free(pszGetAbumFrmDBSpeedLog);
+       free(pszAlbumDestroySpeedLog);
+       free(pszGetMediaCountFromDBMemLog);
+       return 0;
+}
+
+//& purpose: Gets a album art path from album
+//& type: auto
+/**
+* @testcase                    ITc_media_content_album_get_album_art_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Gets a album art path from album
+* @scenario                            Iterate through available media folders through [media_album_foreach_album_from_db] api\n
+*                                              [media_album_get_album_art] Gets a album art path from album
+* @apicovered                  media_info_destroy, media_album_get_album_art, media_info_insert_to_db, media_info_foreach_media_from_db, media_album_foreach_album_from_db, media_album_get_album_art
+* @passcase                            When media_album_get_album_art is successful
+* @failcase                            If target API media_album_get_album_art fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Disconnect from the media content service
+*/
+int ITc_media_content_album_get_album_art_p(void)
+{
+       START_TEST;
+       char *pszMediaAlbumForEachMemLog = NULL;
+       char *pszArtSpeedLog = NULL;
+       char *pAlbum_art = NULL;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       g_bMediaContentCBFlag = false;
+       media_info_h stHandleInfo = NULL;
+
+       nRet = media_info_insert_to_db(g_strInsertPathAlbum, &stHandleInfo);
+       PRINT_RESULT(nRet, "media_info_insert_to_db");
+       usleep(2000000);
+
+       nRet = media_info_foreach_media_from_db(NULL, MediaInfoCB, NULL);
+       PRINT_RESULT(nRet, "media_info_foreach_media_from_db");
+       
+       
+       nRet = media_album_foreach_album_from_db(NULL, MediaContentAlbumCB, NULL);
+       PRINT_RESULT(nRet, "media_album_foreach_album_from_db");
+       
+       if ( g_bMediaContentCBFlag != true )
+       {
+               FPRINTF("[Line: %d][%s] ediaContentAlbumCB callback failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszMediaAlbumForEachMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszArtSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_album_get_album_art(g_stHandleMediaAlbum, &pAlbum_art);
+               MediaExecutionDelay(pszArtSpeedLog);
+               MediaGetMemStatus(pszMediaAlbumForEachMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_album_get_album_art", nMediaContentFailCount);
+               FPRINTF("[Line: %d][%s] lbum artist = [%s]\\n", __LINE__, API_NAMESPACE, pAlbum_art);           
+               if ( pAlbum_art != NULL )
+               {
+                       free(pAlbum_art);
+                       pAlbum_art = NULL;
+               }
+       }
+       media_info_destroy(stHandleInfo);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_album_get_album_art_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszArtSpeedLog);
+               free(pszMediaAlbumForEachMemLog);
+               return 1;
+       }
+#if SPEED_CHECK        
+       PRINT_SPEED_LOG(media_album_get_album_art, pszArtSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_album_get_album_art_p, pszMediaAlbumForEachMemLog);
+#endif
+
+       free(pszArtSpeedLog);
+       free(pszMediaAlbumForEachMemLog);
+       return 0;
+}
+
+/*
+********************* Media Folder **********************
+*/
+
+//& purpose: Set/Get the folder name
+//& type: auto
+/**
+* @testcase                    ITc_media_content_folder_set_get_name_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 Set/Get the folder name
+* @scenario                            Iterate through available media folders\n
+*                                              Set the folder name\n
+*                                              Updates the media folder to the media database\n
+*                                              Get the folder name
+* @apicovered                  media_folder_foreach_folder_from_db, media_folder_get_folder_from_db, media_folder_get_name, media_folder_set_name, media_folder_update_to_db and media_folder_destroy
+* @passcase                            When media_folder_get_modified_time is successful
+* @failcase                            If target API media_folder_get_modified_time fails or any precondition API fails
+* @precondition                        Connect to the media content service
+* @postcondition               Updates the media folder to the media database, Disconnects from the media content service
+*/
+int ITc_media_content_folder_set_get_name_p(void)
+{
+       START_TEST;
+       int nRet = 0, nLoopCount, nMediaContentFailCount = 0;
+       char *pszFolderGetFolderMemLog = NULL;
+       char *pszFolderSetFolderNameSpeedLog = NULL;
+       char *pszFolderUpdateFolderNameSpeedLog = NULL;
+       char *pszFolderGetFolderNameSpeedLog = NULL;
+       char *pFolderName = "Dummy";
+       char *pName = NULL;
+       char *pOrignalName = NULL;
+       media_folder_h stMediaFolderHandle = NULL;
+       g_bMediaContentCBFlag = false;
+       nRet = media_folder_foreach_folder_from_db(NULL, MediaContentCapiFolderListCB, NULL);
+       PRINT_RESULT(nRet, "media_folder_foreach_folder_from_db");
+       
+       if ( !g_bMediaContentCBFlag )
+       {
+               FPRINTF("[Line: %d][%s] nable to call MediaContentCapiFolderListCB, folder handler not set\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszFolderGetFolderMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFolderSetFolderNameSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszFolderUpdateFolderNameSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszFolderGetFolderNameSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       nRet = media_folder_get_folder_from_db(g_psrcHiddenFolderUuId, &stMediaFolderHandle);
+       PRINT_RESULT(nRet, "media_folder_get_folder_from_db");
+       
+       nRet = media_folder_get_name(stMediaFolderHandle, &pOrignalName);
+       PRINT_RESULT(nRet, "media_folder_get_name");
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MediaGetMemAllocation();
+               MediaGetTimeOfDay();
+               nRet = media_folder_set_name(stMediaFolderHandle, pFolderName);
+               MediaExecutionDelay(pszFolderSetFolderNameSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_set_name", nMediaContentFailCount);
+               
+               MediaGetTimeOfDay();
+               nRet = media_folder_update_to_db(stMediaFolderHandle);
+               MediaExecutionDelay(pszFolderUpdateFolderNameSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_update_to_db", nMediaContentFailCount);
+                               
+               MediaGetTimeOfDay();
+               nRet = media_folder_get_name(stMediaFolderHandle, &pName);
+               if (NULL ==pName)
+               {
+                       FPRINTF("[Line: %d][%s] Name is NULL\\n", __LINE__, API_NAMESPACE);
+                       return 1;
+               }
+               MediaExecutionDelay(pszFolderGetFolderNameSpeedLog);
+               MediaGetMemStatus(pszFolderGetFolderMemLog);
+               PRINT_RESULT_LOOP(nRet, "media_folder_get_name", nMediaContentFailCount);
+               
+               if ( strcmp( pName, pFolderName ) != 0 )
+               {
+                       FPRINTF("[Line: %d][%s] Name in media_folder_get_name is not same, as set\\n", __LINE__, API_NAMESPACE);
+                       nMediaContentFailCount++;
+               }
+               if ( pName != NULL )
+               {
+                       free(pName);
+                       pName = NULL;
+               }
+       }
+       media_folder_set_name(stMediaFolderHandle, pOrignalName);
+       media_folder_update_to_db(stMediaFolderHandle);
+       media_folder_destroy(stMediaFolderHandle);
+       
+       if ( nMediaContentFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] Tc_media_content_folder_set_get_name_p failed for %d out of %d times\\n", __LINE__, API_NAMESPACE, nMediaContentFailCount, MAX_COUNT);
+               free(pszFolderSetFolderNameSpeedLog);
+               free(pszFolderUpdateFolderNameSpeedLog);
+               free(pszFolderGetFolderNameSpeedLog);
+               free(pszFolderGetFolderMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_folder_get_modified_time, pszFolderSetFolderNameSpeedLog);
+       PRINT_SPEED_LOG(media_folder_get_modified_time, pszFolderUpdateFolderNameSpeedLog);
+       PRINT_SPEED_LOG(media_folder_get_modified_time, pszFolderGetFolderNameSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_media_content_folder_set_get_name_p, pszFolderGetFolderMemLog);
+#endif
+       free(pszFolderSetFolderNameSpeedLog);
+       free(pszFolderUpdateFolderNameSpeedLog);
+       free(pszFolderGetFolderNameSpeedLog);
+       free(pszFolderGetFolderMemLog);
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/media-content/TestRingtone.mp3 b/src/itc/media-content/TestRingtone.mp3
new file mode 100755 (executable)
index 0000000..79ba4a4
Binary files /dev/null and b/src/itc/media-content/TestRingtone.mp3 differ
diff --git a/src/itc/media-content/tct-media-content-native.c b/src/itc/media-content/tct-media-content-native.c
new file mode 100755 (executable)
index 0000000..8e95cf2
--- /dev/null
@@ -0,0 +1,134 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-media-content-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                                               
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+                       
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/media-content/tct-media-content-native.h b/src/itc/media-content/tct-media-content-native.h
new file mode 100755 (executable)
index 0000000..75658be
--- /dev/null
@@ -0,0 +1,313 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_MEDIA_CONTENT_NATIVE_H__
+#define __TCT_MEDIA_CONTENT_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_media_content_startup(void);
+extern void ITs_media_content_cleanup(void);
+
+extern int ITc_media_content_scan_file_p(void);
+extern int ITc_media_content_scan_folder_p(void);
+extern int ITc_media_content_set_unset_db_updated_cb_p(void);
+extern int ITc_media_content_bookmark_clone_p(void);
+extern int ITc_media_content_bookmark_get_marked_p(void);
+extern int ITc_media_content_bookmark_get_path_p(void);
+extern int ITc_media_content_bookmark_insert_delete_p(void);
+extern int ITc_media_content_bookmark_count_p(void);
+extern int ITc_media_content_filter_create_destroy_filter_p(void);
+extern int ITc_media_content_filter_set_get_condition_p(void);
+extern int ITc_media_content_filter_set_get_offset_p(void);
+extern int ITc_media_content_filter_set_get_order_p(void);
+extern int ITc_media_content_folder_foreach_from_db_p(void);
+extern int ITc_media_content_folder_clone_p(void);
+extern int ITc_media_content_folder_foreach_media_from_db_p(void);
+extern int ITc_media_content_folder_get_folder_count_p(void);
+extern int ITc_media_content_folder_get_folder_from_db_p(void);
+extern int ITc_media_content_folder_get_media_count_from_db_p(void);
+extern int ITc_media_content_folder_get_modified_time_p(void);
+extern int ITc_media_content_folder_get_storage_type_p(void);
+extern int ITc_media_content_group_get_group_count_p(void);
+extern int ITc_media_content_group_foreach_group_from_db_p(void);
+extern int ITc_media_content_group_foreach_media_from_db_p(void);
+extern int ITc_media_content_group_get_media_count_from_db_p(void);
+extern int ITc_media_content_media_info_insert_to_db_p(void);
+extern int ITc_media_content_media_info_create_cancel_thumbnail_p(void);
+extern int ITc_media_content_media_info_foreach_media_from_db_p(void);
+extern int ITc_media_content_media_info_clone_p(void);
+extern int ITc_media_content_media_info_get_modified_time_p(void);
+extern int ITc_media_content_media_info_get_size_p(void);
+extern int ITc_media_content_media_info_delete_from_db_p(void);
+extern int ITc_media_content_media_info_insert_delete_batch_from_db_p(void);
+extern int ITc_media_content_media_info_get_set_added_time_p(void);
+extern int ITc_media_content_media_info_move_to_db_p(void);
+extern int ITc_media_content_media_info_get_title_p(void);
+extern int ITc_media_content_media_info_set_get_author_p(void);
+extern int ITc_media_content_media_info_set_get_category_p(void);
+extern int ITc_media_content_media_info_set_get_content_name_p(void);
+extern int ITc_media_content_media_info_set_get_description_p(void);
+extern int ITc_media_content_media_info_set_get_display_name_p(void);
+extern int ITc_media_content_media_info_set_get_favorite_p(void);
+extern int ITc_media_content_media_info_set_get_provider_p(void);
+extern int ITc_media_content_media_info_set_get_location_tag_p(void);
+extern int ITc_media_content_media_info_set_get_keyword_p(void);
+extern int ITc_media_content_media_info_set_get_rating_p(void);
+extern int ITc_media_content_media_info_set_get_weather_p(void);
+extern int ITc_media_content_media_info_set_get_age_rating_p(void);
+extern int ITc_media_content_media_info_set_get_altitude_p(void);
+extern int ITc_media_content_media_info_set_get_latitude_p(void);
+extern int ITc_media_content_media_info_set_get_longitude_p(void);
+extern int ITc_media_content_media_info_get_audio_metadata_p(void);
+extern int ITc_media_content_media_info_foreach_tag_from_db_p(void);
+extern int ITc_media_content_media_info_get_media_count_from_db_p(void);
+extern int ITc_media_content_media_info_get_image_p(void);
+extern int ITc_media_content_media_info_get_video_p(void);
+extern int ITc_media_content_media_info_get_storage_type_p(void);
+extern int ITc_media_content_media_info_get_tag_count_from_db_p(void);
+extern int ITc_media_content_media_info_is_drm_p(void);
+extern int ITc_media_content_media_info_get_thumbnail_path_p(void);
+extern int ITc_media_content_media_info_get_file_path_p(void);
+extern int ITc_media_content_media_info_get_timeline_p(void);
+extern int ITc_media_content_media_info_get_bookmark_count_from_db_p(void);
+extern int ITc_media_content_media_info_get_mime_type_p(void);
+extern int ITc_media_content_media_info_get_media_from_db_p(void);
+extern int ITc_media_content_media_info_refresh_metadata_to_db_p(void);
+extern int ITc_media_content_media_info_insert_burstshot_to_db_p(void);
+extern int ITc_media_content_playlist_foreach_playlist_from_db_p(void);
+extern int ITc_media_content_playlist_insert_to_db_p(void);
+extern int ITc_media_content_playlist_add_media_p(void);
+extern int ITc_media_content_playlist_clone_p(void);
+extern int ITc_media_content_playlist_get_playlist_id_p(void);
+extern int ITc_media_content_playlist_foreach_media_from_db_p(void);
+extern int ITc_media_content_playlist_get_media_count_from_db_p(void);
+extern int ITc_media_content_playlist_set_get_name_p(void);
+extern int ITc_media_content_playlist_set_get_play_order_p(void);
+extern int ITc_media_content_playlist_set_get_thumbnail_path_p(void);
+extern int ITc_media_content_playlist_get_playlist_from_db_p(void);
+extern int ITc_media_content_playlist_get_playlist_count_p(void);
+extern int ITc_media_content_playlist_remove_media_p(void);
+extern int ITc_media_content_tag_insert_to_db_p(void);
+extern int ITc_media_content_tag_foreach_tag_from_db_p(void);
+extern int ITc_media_content_tag_clone_p(void);
+extern int ITc_media_content_tag_get_tag_count_from_db_p(void);
+extern int ITc_media_content_tag_foreach_media_from_db_p(void);
+extern int ITc_media_content_tag_get_media_count_from_db_p(void);
+extern int ITc_media_content_tag_add_remove_media_p(void);
+extern int ITc_media_content_tag_set_get_name_p(void);
+extern int ITc_media_content_tag_get_tag_from_db_p(void);
+extern int ITc_media_content_audio_meta_clone_p(void);
+extern int ITc_media_content_audio_meta_get_album_p(void);
+extern int ITc_media_content_audio_meta_get_album_artist_p(void);
+extern int ITc_media_content_audio_meta_get_artist_p(void);
+extern int ITc_media_content_audio_meta_get_bitpersample_p(void);
+extern int ITc_media_content_audio_meta_get_bit_rate_p(void);
+extern int ITc_media_content_audio_meta_get_sample_rate_p(void);
+extern int ITc_media_content_audio_meta_get_channel_p(void);
+extern int ITc_media_content_audio_meta_get_composer_p(void);
+extern int ITc_media_content_audio_meta_get_copyright_p(void);
+extern int ITc_media_content_audio_meta_get_duration_p(void);
+extern int ITc_media_content_audio_meta_get_genre_p(void);
+extern int ITc_media_content_audio_meta_get_media_id_p(void);
+extern int ITc_media_content_audio_meta_set_get_played_count_p(void);
+extern int ITc_media_content_audio_meta_set_get_played_position_p(void);
+extern int ITc_media_content_audio_meta_set_get_played_time_p(void);
+extern int ITc_media_content_audio_meta_get_recorded_date_p(void);
+extern int ITc_media_content_audio_meta_get_year_p(void);
+extern int ITc_media_content_audio_meta_get_track_num_p(void);
+extern int ITc_media_content_video_meta_clone_p(void);
+extern int ITc_media_content_video_meta_get_height_p(void);
+extern int ITc_media_content_video_meta_get_width_p(void);
+extern int ITc_media_content_video_meta_get_album_p(void);
+extern int ITc_media_content_video_meta_get_artist_p(void);
+extern int ITc_media_content_video_meta_get_bit_rate_p(void);
+extern int ITc_media_content_video_meta_get_duration_p(void);
+extern int ITc_media_content_video_meta_get_composer_p(void);
+extern int ITc_media_content_video_meta_get_copyright_p(void);
+extern int ITc_media_content_video_meta_get_genre_p(void);
+extern int ITc_media_content_video_meta_get_media_id_p(void);
+extern int ITc_media_content_video_meta_get_track_num_p(void);
+extern int ITc_media_content_video_meta_get_year_p(void);
+extern int ITc_media_content_video_meta_get_recorded_date_p(void);
+extern int ITc_media_content_video_meta_set_get_played_time_p(void);
+extern int ITc_media_content_video_meta_set_get_played_count_p(void);
+extern int ITc_media_content_video_meta_set_get_played_position_p(void);
+extern int ITc_media_content_video_meta_get_album_artist_p(void);
+extern int ITc_media_content_image_meta_clone_p(void);
+extern int ITc_media_content_image_meta_get_burst_id_p(void);
+extern int ITc_media_content_image_meta_get_date_taken_p(void);
+extern int ITc_media_content_image_meta_get_height_p(void);
+extern int ITc_media_content_image_meta_get_width_p(void);
+extern int ITc_media_content_image_meta_is_burst_shot_p(void);
+extern int ITc_media_content_image_meta_get_media_id_p(void);
+extern int ITc_media_content_image_meta_set_get_orientation_p(void);
+extern int ITc_media_content_album_foreach_album_from_db_p(void);
+extern int ITc_media_content_album_clone_p(void);
+extern int ITc_media_content_album_get_name_p(void);
+extern int ITc_media_content_album_get_album_count_from_db_p(void);
+extern int ITc_media_content_album_get_artist_p(void);
+extern int ITc_media_content_album_get_media_count_from_db_p(void);
+extern int ITc_media_content_album_get_album_from_db_p(void);
+extern int ITc_media_content_album_get_album_art_p(void);
+extern int ITc_media_content_folder_set_get_name_p(void);
+
+testcase tc_array[] = {
+    {"ITc_media_content_scan_file_p", ITc_media_content_scan_file_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_scan_folder_p", ITc_media_content_scan_folder_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_set_unset_db_updated_cb_p", ITc_media_content_set_unset_db_updated_cb_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_bookmark_clone_p", ITc_media_content_bookmark_clone_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_bookmark_get_marked_p", ITc_media_content_bookmark_get_marked_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_bookmark_get_path_p", ITc_media_content_bookmark_get_path_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_bookmark_insert_delete_p", ITc_media_content_bookmark_insert_delete_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_bookmark_count_p", ITc_media_content_bookmark_count_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_filter_create_destroy_filter_p", ITc_media_content_filter_create_destroy_filter_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_filter_set_get_condition_p", ITc_media_content_filter_set_get_condition_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_filter_set_get_offset_p", ITc_media_content_filter_set_get_offset_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_filter_set_get_order_p", ITc_media_content_filter_set_get_order_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_folder_foreach_from_db_p", ITc_media_content_folder_foreach_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_folder_clone_p", ITc_media_content_folder_clone_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_folder_foreach_media_from_db_p", ITc_media_content_folder_foreach_media_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_folder_get_folder_count_p", ITc_media_content_folder_get_folder_count_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_folder_get_folder_from_db_p", ITc_media_content_folder_get_folder_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_folder_get_media_count_from_db_p", ITc_media_content_folder_get_media_count_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_folder_get_modified_time_p", ITc_media_content_folder_get_modified_time_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_folder_get_storage_type_p", ITc_media_content_folder_get_storage_type_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_group_get_group_count_p", ITc_media_content_group_get_group_count_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_group_foreach_group_from_db_p", ITc_media_content_group_foreach_group_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_group_foreach_media_from_db_p", ITc_media_content_group_foreach_media_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_group_get_media_count_from_db_p", ITc_media_content_group_get_media_count_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_insert_to_db_p", ITc_media_content_media_info_insert_to_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_create_cancel_thumbnail_p", ITc_media_content_media_info_create_cancel_thumbnail_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_foreach_media_from_db_p", ITc_media_content_media_info_foreach_media_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_clone_p", ITc_media_content_media_info_clone_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_modified_time_p", ITc_media_content_media_info_get_modified_time_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_size_p", ITc_media_content_media_info_get_size_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_delete_from_db_p", ITc_media_content_media_info_delete_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_insert_delete_batch_from_db_p", ITc_media_content_media_info_insert_delete_batch_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_set_added_time_p", ITc_media_content_media_info_get_set_added_time_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_move_to_db_p", ITc_media_content_media_info_move_to_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_title_p", ITc_media_content_media_info_get_title_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_author_p", ITc_media_content_media_info_set_get_author_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_category_p", ITc_media_content_media_info_set_get_category_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_content_name_p", ITc_media_content_media_info_set_get_content_name_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_description_p", ITc_media_content_media_info_set_get_description_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_display_name_p", ITc_media_content_media_info_set_get_display_name_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_favorite_p", ITc_media_content_media_info_set_get_favorite_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_provider_p", ITc_media_content_media_info_set_get_provider_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_location_tag_p", ITc_media_content_media_info_set_get_location_tag_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_keyword_p", ITc_media_content_media_info_set_get_keyword_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_rating_p", ITc_media_content_media_info_set_get_rating_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_weather_p", ITc_media_content_media_info_set_get_weather_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_age_rating_p", ITc_media_content_media_info_set_get_age_rating_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_altitude_p", ITc_media_content_media_info_set_get_altitude_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_latitude_p", ITc_media_content_media_info_set_get_latitude_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_set_get_longitude_p", ITc_media_content_media_info_set_get_longitude_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_audio_metadata_p", ITc_media_content_media_info_get_audio_metadata_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_foreach_tag_from_db_p", ITc_media_content_media_info_foreach_tag_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_media_count_from_db_p", ITc_media_content_media_info_get_media_count_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_image_p", ITc_media_content_media_info_get_image_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_video_p", ITc_media_content_media_info_get_video_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_storage_type_p", ITc_media_content_media_info_get_storage_type_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_tag_count_from_db_p", ITc_media_content_media_info_get_tag_count_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_is_drm_p", ITc_media_content_media_info_is_drm_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_thumbnail_path_p", ITc_media_content_media_info_get_thumbnail_path_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_file_path_p", ITc_media_content_media_info_get_file_path_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_timeline_p", ITc_media_content_media_info_get_timeline_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_bookmark_count_from_db_p", ITc_media_content_media_info_get_bookmark_count_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_mime_type_p", ITc_media_content_media_info_get_mime_type_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_get_media_from_db_p", ITc_media_content_media_info_get_media_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_refresh_metadata_to_db_p", ITc_media_content_media_info_refresh_metadata_to_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_media_info_insert_burstshot_to_db_p", ITc_media_content_media_info_insert_burstshot_to_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_foreach_playlist_from_db_p", ITc_media_content_playlist_foreach_playlist_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_insert_to_db_p", ITc_media_content_playlist_insert_to_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_add_media_p", ITc_media_content_playlist_add_media_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_clone_p", ITc_media_content_playlist_clone_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_get_playlist_id_p", ITc_media_content_playlist_get_playlist_id_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_foreach_media_from_db_p", ITc_media_content_playlist_foreach_media_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_get_media_count_from_db_p", ITc_media_content_playlist_get_media_count_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_set_get_name_p", ITc_media_content_playlist_set_get_name_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_set_get_play_order_p", ITc_media_content_playlist_set_get_play_order_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_set_get_thumbnail_path_p", ITc_media_content_playlist_set_get_thumbnail_path_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_get_playlist_from_db_p", ITc_media_content_playlist_get_playlist_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_get_playlist_count_p", ITc_media_content_playlist_get_playlist_count_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_playlist_remove_media_p", ITc_media_content_playlist_remove_media_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_tag_insert_to_db_p", ITc_media_content_tag_insert_to_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_tag_foreach_tag_from_db_p", ITc_media_content_tag_foreach_tag_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_tag_clone_p", ITc_media_content_tag_clone_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_tag_get_tag_count_from_db_p", ITc_media_content_tag_get_tag_count_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_tag_foreach_media_from_db_p", ITc_media_content_tag_foreach_media_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_tag_get_media_count_from_db_p", ITc_media_content_tag_get_media_count_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_tag_add_remove_media_p", ITc_media_content_tag_add_remove_media_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_tag_set_get_name_p", ITc_media_content_tag_set_get_name_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_tag_get_tag_from_db_p", ITc_media_content_tag_get_tag_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_clone_p", ITc_media_content_audio_meta_clone_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_album_p", ITc_media_content_audio_meta_get_album_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_album_artist_p", ITc_media_content_audio_meta_get_album_artist_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_artist_p", ITc_media_content_audio_meta_get_artist_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_bitpersample_p", ITc_media_content_audio_meta_get_bitpersample_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_bit_rate_p", ITc_media_content_audio_meta_get_bit_rate_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_sample_rate_p", ITc_media_content_audio_meta_get_sample_rate_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_channel_p", ITc_media_content_audio_meta_get_channel_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_composer_p", ITc_media_content_audio_meta_get_composer_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_copyright_p", ITc_media_content_audio_meta_get_copyright_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_duration_p", ITc_media_content_audio_meta_get_duration_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_genre_p", ITc_media_content_audio_meta_get_genre_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_media_id_p", ITc_media_content_audio_meta_get_media_id_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_set_get_played_count_p", ITc_media_content_audio_meta_set_get_played_count_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_set_get_played_position_p", ITc_media_content_audio_meta_set_get_played_position_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_set_get_played_time_p", ITc_media_content_audio_meta_set_get_played_time_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_recorded_date_p", ITc_media_content_audio_meta_get_recorded_date_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_year_p", ITc_media_content_audio_meta_get_year_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_audio_meta_get_track_num_p", ITc_media_content_audio_meta_get_track_num_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_clone_p", ITc_media_content_video_meta_clone_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_height_p", ITc_media_content_video_meta_get_height_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_width_p", ITc_media_content_video_meta_get_width_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_album_p", ITc_media_content_video_meta_get_album_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_artist_p", ITc_media_content_video_meta_get_artist_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_bit_rate_p", ITc_media_content_video_meta_get_bit_rate_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_duration_p", ITc_media_content_video_meta_get_duration_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_composer_p", ITc_media_content_video_meta_get_composer_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_copyright_p", ITc_media_content_video_meta_get_copyright_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_genre_p", ITc_media_content_video_meta_get_genre_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_media_id_p", ITc_media_content_video_meta_get_media_id_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_track_num_p", ITc_media_content_video_meta_get_track_num_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_year_p", ITc_media_content_video_meta_get_year_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_recorded_date_p", ITc_media_content_video_meta_get_recorded_date_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_set_get_played_time_p", ITc_media_content_video_meta_set_get_played_time_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_set_get_played_count_p", ITc_media_content_video_meta_set_get_played_count_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_set_get_played_position_p", ITc_media_content_video_meta_set_get_played_position_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_video_meta_get_album_artist_p", ITc_media_content_video_meta_get_album_artist_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_image_meta_clone_p", ITc_media_content_image_meta_clone_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_image_meta_get_burst_id_p", ITc_media_content_image_meta_get_burst_id_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_image_meta_get_date_taken_p", ITc_media_content_image_meta_get_date_taken_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_image_meta_get_height_p", ITc_media_content_image_meta_get_height_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_image_meta_get_width_p", ITc_media_content_image_meta_get_width_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_image_meta_is_burst_shot_p", ITc_media_content_image_meta_is_burst_shot_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_image_meta_get_media_id_p", ITc_media_content_image_meta_get_media_id_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_image_meta_set_get_orientation_p", ITc_media_content_image_meta_set_get_orientation_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_album_foreach_album_from_db_p", ITc_media_content_album_foreach_album_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_album_clone_p", ITc_media_content_album_clone_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_album_get_name_p", ITc_media_content_album_get_name_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_album_get_album_count_from_db_p", ITc_media_content_album_get_album_count_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_album_get_artist_p", ITc_media_content_album_get_artist_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_album_get_media_count_from_db_p", ITc_media_content_album_get_media_count_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_album_get_album_from_db_p", ITc_media_content_album_get_album_from_db_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_album_get_album_art_p", ITc_media_content_album_get_album_art_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {"ITc_media_content_folder_set_get_name_p", ITc_media_content_folder_set_get_name_p, ITs_media_content_startup, ITs_media_content_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_MEDIA_CONTENT_NATIVE_H__
diff --git a/src/itc/media-content/test.jpg b/src/itc/media-content/test.jpg
new file mode 100755 (executable)
index 0000000..7a15f14
Binary files /dev/null and b/src/itc/media-content/test.jpg differ
diff --git a/src/itc/media-content/test0.jpg b/src/itc/media-content/test0.jpg
new file mode 100755 (executable)
index 0000000..7a15f14
Binary files /dev/null and b/src/itc/media-content/test0.jpg differ
diff --git a/src/itc/media-content/test1.jpg b/src/itc/media-content/test1.jpg
new file mode 100755 (executable)
index 0000000..7a15f14
Binary files /dev/null and b/src/itc/media-content/test1.jpg differ
diff --git a/src/itc/media-content/test2.jpg b/src/itc/media-content/test2.jpg
new file mode 100755 (executable)
index 0000000..7a15f14
Binary files /dev/null and b/src/itc/media-content/test2.jpg differ
diff --git a/src/itc/media-content/test3.jpg b/src/itc/media-content/test3.jpg
new file mode 100755 (executable)
index 0000000..7a15f14
Binary files /dev/null and b/src/itc/media-content/test3.jpg differ
diff --git a/src/itc/media-key/CMakeLists.txt b/src/itc/media-key/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..701556e
--- /dev/null
@@ -0,0 +1,39 @@
+SET(PKG_NAME "media-key")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-system-media-key")
+SET(TC_SOURCES
+       ITs-media-key-common.c
+       ITs-media-key.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       elementary
+       ecore
+       evas
+       ecore-x
+       appcore-efl
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/media-key/ITs-media-key-common.c b/src/itc/media-key/ITs-media-key-common.c
new file mode 100755 (executable)
index 0000000..9fcdd56
--- /dev/null
@@ -0,0 +1,134 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-media-key-common.h"
+
+/** @addtogroup itc-media-key
+* @ingroup             itc
+* @{
+*/
+
+struct timeval g_stMedia_KeyTime;
+struct mallinfo g_stMedia_KeyMemInfo;
+
+/**
+* @function            Media_KeyGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* Media_KeyGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case MEDIA_KEY_ERROR_NONE:                                      szErrorVal = "MEDIA_KEY_ERROR_NONE";                            break;
+       case MEDIA_KEY_ERROR_INVALID_PARAMETER:         szErrorVal = "MEDIA_KEY_ERROR_INVALID_PARAMETER";       break;
+       default:                                                                        szErrorVal = "Unknown Error";                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function                    Media_KeyGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void Media_KeyGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stMedia_KeyMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stMedia_KeyMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stMedia_KeyMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    Media_KeyGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void Media_KeyGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stMedia_KeyMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           Media_KeyExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void Media_KeyExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stMedia_KeyTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stMedia_KeyTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           Media_KeyGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stMedia_KeyTime
+ * @parameter          NA
+ * @return                     NA
+ *
+ */ 
+void Media_KeyGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stMedia_KeyTime, NULL);
+#endif
+}
+
+/** @} */ //end of itc-media-key
\ No newline at end of file
diff --git a/src/itc/media-key/ITs-media-key-common.h b/src/itc/media-key/ITs-media-key-common.h
new file mode 100755 (executable)
index 0000000..a62b9ce
--- /dev/null
@@ -0,0 +1,100 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_MEDIA_KEY_COMMON_H_
+#define _ITS_MEDIA_KEY_COMMON_H_
+
+//Add test package related includes here
+
+#include "assert.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/time.h>
+#include "media_key.h"
+#include <appcore-efl.h>
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <Ecore.h>
+
+/** @addtogroup itc-media-key
+* @ingroup             itc
+* @{
+*/
+
+#define TIMELOG                                                256
+#define MEMLOG                                         256
+#define WAIT_CALLBACK                          5
+#define MICROSECONDS_PER_SECOND                1000000
+#define LOG                                                    100
+
+FILE *g_fpLog;
+
+//Add helper function declarations here
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+
+#define START_TEST {\
+       FPRINTF("\\n[Line No : %d]Starting test : %s\n",__LINE__, __FUNCTION__);\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF("\\n[Line No : %d]%s passed\n", __LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("\\n[Line No : %d]%s failed, error returned = %s \n", __LINE__, API, Media_KeyGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line No : %d]%s_MemoryLeakStatus - %s\n", __LINE__, #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line No : %d]%s_TimeInMicrosec- %s\n", __LINE__, #api, speedLog);\
+       }
+
+char* Media_KeyGetError(int nRet);
+void Media_KeyGetMemAllocation();
+void Media_KeyExecutionDelay(char* pszAPITime);
+void Media_KeyGetTimeOfDay();
+void Media_KeyGetMemStatus(char *pszAPIMemory);
+
+/** @} */ //end of itc-media-key
+
+#endif  //_ITS_MEDIA_KEY_COMMON_H_
diff --git a/src/itc/media-key/ITs-media-key.c b/src/itc/media-key/ITs-media-key.c
new file mode 100755 (executable)
index 0000000..baa7063
--- /dev/null
@@ -0,0 +1,159 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-media-key-common.h"
+
+/** @addtogroup itc-media-key
+* @ingroup             itc
+* @{
+*/
+
+//& set: MediaKey
+
+/**
+* @function            ITs_media_key_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_media_key_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       return;
+}
+
+/**
+* @function            ITs_media_key_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_media_key_cleanup(void)
+{
+       return;
+}
+
+/**
+* @function                    media_key_event_callback
+* @description                         Callback function for any media-key event
+* @parameter   [IN]    media_key_e
+* @parameter   [IN]    media_key_event_e
+*              [IN]    void *user_data
+* @return                              NA
+*/ 
+void media_key_event_callback(media_key_e key, media_key_event_e status, void *user_data)
+{
+       FPRINTF("\\n[Line No : %d][Media_Key_ITc]media_key_event_callback invoked, media-key = %d, status = %d ", __LINE__, key, status);
+}
+
+/** @addtogroup        itc-media-key-testcases
+* @brief               Integration testcases for module media-key
+* @ingroup             itc-media-key
+* @{
+*/
+
+//& type: auto
+//& purpose: Registers and then unregisters a change event callback for all media keys
+/**
+* @testcase                    ITc_media_key_reserve_release_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers and then unregisters a change event callback for all media keys
+* @scenario                            Registers change event callback\n
+*                                              Unregisters change event callback
+* @apicovered                  media_key_release, media_key_reserve                                            
+* @passcase                            When media_key_release and  media_key_reserve are successful.
+* @failcase                            If target api fails.
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_media_key_reserve_release_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szMediakeyRegisterReleaseMemLog[MEMLOG * MAX_COUNT];
+       char szMediakeyRegisterSpeedLog[TIMELOG * MAX_COUNT];
+       char szMediakeyReleaseSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szMediakeyRegisterReleaseMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szMediakeyRegisterSpeedLog, 0, TIMELOG * MAX_COUNT);
+       memset(szMediakeyReleaseSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nRegisterFailCount = 0;
+       int nReleaseFailCount = 0;
+       
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               //Target API
+               Media_KeyGetMemAllocation();
+               
+               Media_KeyGetTimeOfDay();
+               int nRetVal = media_key_reserve(media_key_event_callback, NULL);
+               Media_KeyExecutionDelay(szMediakeyRegisterSpeedLog);
+               
+               if(nRetVal != 0)
+               {
+                       FPRINTF("\\n[Line No : %d]media_key_reserve failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, Media_KeyGetError(nRetVal));
+                       nRegisterFailCount++;
+                       continue;
+               }
+
+               FPRINTF("\\n[Line No : %d]media_key_reserve returns success on iteration %d", __LINE__, nLoopCount);
+
+               // Give some sleep between register and release
+               usleep(2000);
+               
+               Media_KeyGetTimeOfDay();
+               nRetVal = media_key_release();
+               Media_KeyExecutionDelay(szMediakeyReleaseSpeedLog);
+               
+               Media_KeyGetMemStatus(szMediakeyRegisterReleaseMemLog);
+               
+               if (nRetVal != 0)
+               {
+                       FPRINTF("\\n[Line No : %d]media_key_release failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, Media_KeyGetError(nRetVal));
+                       nReleaseFailCount++;
+               }
+
+               FPRINTF("\\n[Line No : %d]media_key_release returns success on iteration %d", __LINE__, nLoopCount);
+       }
+       
+       if ( nRegisterFailCount > 0 || nReleaseFailCount > 0 )
+       {
+               FPRINTF("\\n[Line No : %d]media_key_reserve failed %d times, media_key_release failed %d times out of %d times", __LINE__, nRegisterFailCount, nReleaseFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(media_key_reserve, szMediakeyRegisterSpeedLog);
+       PRINT_SPEED_LOG(media_key_release, szMediakeyReleaseSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(media_key_reserve_release, szMediakeyRegisterReleaseMemLog);
+#endif
+               return 0;
+       }
+}
+
+/** @} */ //end of itc-media-key
+/** @} */ //end of itc-media-key-testcases
\ No newline at end of file
diff --git a/src/itc/media-key/tct-media-key-native.c b/src/itc/media-key/tct-media-key-native.c
new file mode 100755 (executable)
index 0000000..2c49fbf
--- /dev/null
@@ -0,0 +1,134 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-media-key-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/media-key/tct-media-key-native.h b/src/itc/media-key/tct-media-key-native.h
new file mode 100755 (executable)
index 0000000..4f30d9b
--- /dev/null
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_MEDIA_KEY_NATIVE_H__
+#define __TCT_MEDIA_KEY_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_media_key_startup(void);
+extern void ITs_media_key_cleanup(void);
+
+extern int ITc_media_key_reserve_release_p(void);
+
+testcase tc_array[] = {
+    {"ITc_media_key_reserve_release_p", ITc_media_key_reserve_release_p, ITs_media_key_startup, ITs_media_key_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_MEDIA_KEY_NATIVE_H__
diff --git a/src/itc/mediacodec/CMakeLists.txt b/src/itc/mediacodec/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..755fd66
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "mediacodec")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-codec")
+SET(TC_SOURCES
+       ITs-mediacodec-common.c
+       ITs-mediacodec.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       ecore
+       capi-appfw-application
+       appcore-efl
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/mediacodec/ITs-mediacodec-common.c b/src/itc/mediacodec/ITs-mediacodec-common.c
new file mode 100755 (executable)
index 0000000..de01bc9
--- /dev/null
@@ -0,0 +1,322 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-mediacodec-common.h"
+
+/** @addtogroup itc-mediacodec
+* @ingroup             itc
+* @{
+*/
+
+//Add helper function definitions here
+
+extern struct mallinfo g_stMedia_CodecMemInfo;
+extern struct timeval g_stMedia_CodecStartTime;
+
+/**
+ * @function           Media_CodecGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Media_CodecGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       
+       switch(nRet)
+       {
+       case MEDIACODEC_ERROR_NONE : szErrorVal = "Successful" ; break;
+       case MEDIACODEC_ERROR_OUT_OF_MEMORY : szErrorVal = "MEDIACODEC_ERROR_OUT_OF_MEMORY" ; break;
+       case MEDIACODEC_ERROR_INVALID_PARAMETER : szErrorVal = "MEDIACODEC_ERROR_INVALID_PARAMETER" ; break;
+       case MEDIACODEC_ERROR_INVALID_OPERATION : szErrorVal = "MEDIACODEC_ERROR_INVALID_OPERATION" ; break;
+       case MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE : szErrorVal = "MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE" ; break;
+       case MEDIACODEC_ERROR_PERMISSION_DENIED : szErrorVal = "MEDIACODEC_ERROR_PERMISSION_DENIED" ; break;
+       case MEDIACODEC_ERROR_INVALID_STATE : szErrorVal = "MEDIACODEC_ERROR_INVALID_STATE" ; break;
+       case MEDIACODEC_ERROR_INVALID_INBUFFER : szErrorVal = "MEDIACODEC_ERROR_INVALID_INBUFFER" ; break;
+       case MEDIACODEC_ERROR_INVALID_OUTBUFFER : szErrorVal = "MEDIACODEC_ERROR_INVALID_OUTBUFFER" ; break;
+       case MEDIACODEC_ERROR_INTERNAL : szErrorVal = "MEDIACODEC_ERROR_INTERNAL" ; break;
+       case MEDIACODEC_ERROR_NOT_INITIALIZED : szErrorVal = "MEDIACODEC_ERROR_NOT_INITIALIZED" ; break;
+       case MEDIACODEC_ERROR_INVALID_STREAM : szErrorVal = "MEDIACODEC_ERROR_INVALID_STREAM" ; break;
+       case MEDIACODEC_ERROR_CODEC_NOT_FOUND : szErrorVal = "MEDIACODEC_ERROR_CODEC_NOT_FOUND" ; break;
+       case MEDIACODEC_ERROR_DECODE : szErrorVal = "MEDIACODEC_ERROR_DECODE" ; break;
+       case MEDIACODEC_ERROR_NO_FREE_SPACE : szErrorVal = "MEDIACODEC_ERROR_NO_FREE_SPACE" ; break;
+       case MEDIACODEC_ERROR_STREAM_NOT_FOUND : szErrorVal = "MEDIACODEC_ERROR_STREAM_NOT_FOUND" ; break;
+       case MEDIACODEC_ERROR_NOT_SUPPORTED_FORMAT : szErrorVal = "MEDIACODEC_ERROR_NOT_SUPPORTED_FORMAT" ; break;
+       case MEDIACODEC_ERROR_BUFFER_NOT_AVAILABLE : szErrorVal = "MEDIACODEC_ERROR_BUFFER_NOT_AVAILABLE" ; break;
+    default : szErrorVal = "Unknown error" ; break;
+    }
+
+    return szErrorVal;
+}
+
+/**
+ * @function           Media_CodecGetCodecTypeEnumString
+ * @description                return a string name of snum
+ * @parameter          int enum
+ * @return                     string
+ */
+char* Media_CodecGetCodecTypeEnumString(int nEnum)
+{
+       char *szString = NULL;
+
+       switch(nEnum)
+       {
+       case MEDIACODEC_NONE : szString = "MEDIACODEC_NONE" ; break;
+       case MEDIACODEC_L16 : szString = "MEDIACODEC_L16" ; break;
+       case MEDIACODEC_ALAW : szString = "MEDIACODEC_ALAW" ; break;
+       case MEDIACODEC_ULAW : szString = "MEDIACODEC_ULAW" ; break;
+       case MEDIACODEC_AMR : szString = "MEDIACODEC_AMR" ; break;
+       case MEDIACODEC_G729 : szString = "MEDIACODEC_G729" ; break;
+       case MEDIACODEC_AAC : szString = "MEDIACODEC_AAC" ; break;
+       case MEDIACODEC_MP3 : szString = "MEDIACODEC_MP3" ; break;
+       case MEDIACODEC_H261 : szString = "MEDIACODEC_H261" ; break;
+       case MEDIACODEC_H263 : szString = "MEDIACODEC_H263" ; break;
+       case MEDIACODEC_H264 : szString = "MEDIACODEC_H264" ; break;
+       case MEDIACODEC_MJPEG : szString = "MEDIACODEC_MJPEG" ; break;
+       case MEDIACODEC_MPEG1 : szString = "MEDIACODEC_MPEG1" ; break;
+       case MEDIACODEC_MPEG2 : szString = "MEDIACODEC_MPEG2" ; break;
+       case MEDIACODEC_MPEG4 : szString = "MEDIACODEC_MPEG4" ; break;
+    }
+
+    return szString;
+}
+
+/**
+ * @function           Media_CodecGetCodecSupportTypeEnumString
+ * @description                return a string name of snum
+ * @parameter          int enum
+ * @return                     string
+ */
+char* Media_CodecGetCodecSupportTypeEnumString(int nEnum)
+{
+       char *szString = NULL;
+
+       switch(nEnum)
+       {
+       case MEDIACODEC_ENCODER : szString = "MEDIACODEC_ENCODER" ; break;
+       case MEDIACODEC_DECODER : szString = "MEDIACODEC_DECODER" ; break;
+       case MEDIACODEC_SUPPORT_TYPE_HW : szString = "MEDIACODEC_SUPPORT_TYPE_HW" ; break;
+       case MEDIACODEC_SUPPORT_TYPE_SW : szString = "MEDIACODEC_SUPPORT_TYPE_SW" ; break;
+       }
+
+    return szString;
+}
+
+
+
+/**
+* @function                    Media_CodecGetMemStatus
+* @description         Returns the Memory Allocation state
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void Media_CodecGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+
+    if( pszAPIMemory != NULL )
+    {
+        struct mallinfo stMemInfo;
+        int nMemDifference;
+        char *pszLog;
+
+        stMemInfo = mallinfo();
+        pszLog= calloc(MEMLOG , sizeof(char));
+
+        if(stMemInfo.uordblks > g_stMedia_CodecMemInfo.uordblks)
+        {
+            nMemDifference = (stMemInfo.uordblks - g_stMedia_CodecMemInfo.uordblks);
+        }
+        else
+        {
+            nMemDifference = (g_stMedia_CodecMemInfo.uordblks - stMemInfo.uordblks);
+        }
+
+        sprintf(pszLog, "%d,", nMemDifference);
+        strcat(pszAPIMemory, pszLog);
+        free(pszLog);
+    }
+
+#endif
+}
+
+
+/**
+* @function                    Media_CodecGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void Media_CodecGetMemAllocation()
+{
+#if MEMORY_CHECK
+    g_stMedia_CodecMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           Media_CodecExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void Media_CodecExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+
+    char* pszLogTime;
+    struct timeval stEnd;
+    unsigned long long ulldifference = 0;
+
+    pszLogTime = calloc(TIMELOG , sizeof(char));
+    gettimeofday(&stEnd, NULL);
+    ulldifference = ((stEnd.tv_sec -g_stMedia_CodecStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stMedia_CodecStartTime.tv_usec;
+
+    sprintf (pszLogTime, "%llu,", ulldifference);
+    strcat(pszAPITime, pszLogTime);
+    free(pszLogTime);
+
+#endif
+}
+
+/**
+ * @function           Media_CodecGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stMedia_CodecStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */
+void Media_CodecGetTimeOfDay()
+{
+#if SPEED_CHECK
+    gettimeofday(&g_stMedia_CodecStartTime, NULL);
+#endif
+}
+
+/**
+* @function            MediaCodecTimeoutFunction
+* @description         Called if some callback is not invoked for a particular Recorder Timeout
+* @parameter           gpointer data
+* @return                      gboolean
+*/
+gboolean MediaCodecTimeoutFunction(gpointer data)
+{
+    FPRINTF( "\\n [Line : %d] [Media_Codec_ITc] Callback MediaCodec wait complete for 30 seconds. Timeout\\n",__LINE__);
+    ecore_main_loop_quit();
+    return FALSE;
+}
+
+/**
+* @function            MediaCodecWaitForAsync
+* @description         Called to wait
+* @parameter           NA
+* @return                      NA
+*/
+void MediaCodecWaitForAsync()
+{
+    g_timeout_add(TIMEOUT, MediaCodecTimeoutFunction, NULL);
+    ecore_main_loop_begin();
+}
+
+/**
+* @function            GetDataFromFile
+* @description         Called to get data
+* @parameter           NA
+* @return                      NA
+*/
+unsigned int GetDataFromFile(void *DataPointer)
+{
+       //char *szBuffer = (char *)malloc(1024*2*2);
+       //char pPath[PATH_LEN] = {0,};
+       //memset(szBuffer, 0x00, 1024*2*2);
+       //MediaCodecAppendToAppDataPath(FILENAME, pPath);
+       //FILE *pFile = NULL;
+       //pFile = fopen(pPath, "r");
+       //if(pFile)
+       //{
+       //      fread(szBuffer, 1, 1024*2*2, pFile);
+       //      fclose(pFile);
+       //}
+       //DataPointer = szBuffer;
+       ////memcpy(DataPointer, szBuffer, 1024*2*2);
+       //return(1024*2*2);
+       return(1024*2*2);
+}
+
+/**
+ * @function           MediaCodecGetDataPath
+ * @description                Returnes the application data path
+ * @parameter          pAppDataPath: application data path
+ * @return                     true if succeed else false
+ */
+bool MediaCodecGetDataPath(char* pAppDataPath)
+{
+       if(NULL == pAppDataPath)
+       {
+               FPRINTF( "[Line : %d] [Media_Codec_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if(NULL == pPath)
+       {
+               FPRINTF( "\\n[Line : %d] [Media_Codec_ITc] Unable to get application data path; app_get_data_path returned null value ", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF( "\\n[Line : %d] [Media_Codec_ITc] application data path returned = %s", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+
+
+/**
+ * @function           MediaCodecAppendToAppDataPath
+ * @description                Appends the input string to application data path
+ * @parameter          pInputPath: path to append to data path; pFinalPath: final resultant path
+ * @return                     true if succeed else false
+ */
+bool MediaCodecAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if( (NULL == pInputPath) || (NULL == pFinalPath) )
+       {
+               FPRINTF( "\\n[Line : %d] [Media_Codec_ITc] Null Path provided; Check the input string", __LINE__);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if(false == MediaCodecGetDataPath(pAppDataPath))
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+       
+       FPRINTF( "\\n[Line : %d] [Media_Codec_ITc] result path returned = %s", __LINE__, pFinalPath);
+
+       return true;
+}
+
+/** @} */ //end of itc-mediacodec
\ No newline at end of file
diff --git a/src/itc/mediacodec/ITs-mediacodec-common.h b/src/itc/mediacodec/ITs-mediacodec-common.h
new file mode 100755 (executable)
index 0000000..e4bc0da
--- /dev/null
@@ -0,0 +1,230 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS__MEDIACODEC_COMMON_H_
+#define _ITS__MEDIACODEC_COMMON_H_
+
+//Add test package related includes here
+
+#include "assert.h"
+#include <media_codec.h>
+#include <glib-2.0/glib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <Ecore.h>
+#include <app.h>
+
+/** @addtogroup itc-mediacodec
+* @ingroup             itc
+* @{
+*/
+
+#define ERR_LOG                                "/tmp/tclog"
+#define FILENAME                               "TestData.pcm"
+
+
+struct mallinfo g_stMedia_CodecMemInfo;
+struct timeval g_stMedia_CodecStartTime;
+bool g_bIsMediaCodecValidHandle;
+media_packet_h hInputBuff;
+media_packet_h hOutputBuff;
+media_format_h hFormat;
+FILE *g_fpLog;
+
+
+#define PATH_LEN                                       1024
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define TIMEOUT                                                30000
+#define SLEEP_TIME                                     5
+
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][[Media_Codec_ITc] Starting test : %s\n", __LINE__,__FUNCTION__);\
+       if ( !g_bIsMediaCodecValidHandle )\
+       {\
+               FPRINTF("\\n[Line : %d][[Media_Codec_ITc] Precondition of metadata extractor failed so leaving test\n",__LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal != MEDIACODEC_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][[Media_Codec_ITc] %s failed in pre-condition, error returned = %s\n", __LINE__, API, Metadata_ExtractorGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_POST_RESULT(nRetVal, API) {\
+       if (nRetVal != MEDIACODEC_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][[Media_Codec_ITc] %s failed in post-condition, error returned = %s\n", __LINE__, API, Metadata_ExtractorGetError(nRetVal));\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog) {\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d][[Media_Codec_ITc] %s_MemoryLeakStatus - %s\n", __LINE__, #api, memLog);\
+       }\
+}
+       
+#define PRINT_SPEED_LOG(api, speedLog) {\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][[Media_Codec_ITc] %s_TimeInMicrosec- %s\n", __LINE__, #api, speedLog);\
+       }\
+}
+
+#define VALIDATE_RESULT(nErrCount1, strApi) {\
+       if ( nErrCount1 > 0)\
+       {\
+               FPRINTF("\\n[Line : %d][[Media_Codec_ITc] %s failed %d times, out of %d times\n", __LINE__, strApi, nErrCount1, MAX_COUNT);\
+               return 1;\
+       }\
+       else\
+       {\
+               return 0;\
+       }\
+}
+
+#define VALIDATE_RESULT_PAIRAPI(nErrCount1, nErrCount2, strTargetApi1, strTargetApi2, szApi1, szApi2, szApi3) \
+       if ( nErrCount1 > 0 || nErrCount2 > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][[Media_Codec_ITc] %s failed %d times, %s failed %d times out of %d times\n", __LINE__, strTargetApi1, nErrCount1, strTargetApi2, nErrCount2, MAX_COUNT);\
+               if (szApi1 != NULL)\
+               {\
+                       free(szApi1);\
+                       szApi1 = NULL;\
+               }\
+               if (szApi2 != NULL)\
+               {\
+                       free(szApi2);\
+                       szApi2 = NULL;\
+               }\
+               if (szApi3 != NULL)\
+               {\
+                       free(szApi3);\
+                       szApi3 = NULL;\
+               }\
+               return 1;\
+       }\
+       
+#define VALIDATE_RESULT_API(nFailCount, strTargetApiName, ptrMem1, ptrMem2, nTotalCount) \
+       if ( nFailCount > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][[Media_Codec_ITc] %s failed %d times out of %d times\n", __LINE__, strTargetApiName, nFailCount, nTotalCount);\
+               if (ptrMem1 != NULL)\
+               {\
+                       free(ptrMem1);\
+                       ptrMem1 = NULL;\
+               }\
+               if (ptrMem2 != NULL)\
+               {\
+                       free(ptrMem2);\
+                       ptrMem2 = NULL;\
+               }\
+               return 1;\
+       }\
+
+#define FREE_MEMORY_3ARGS(szApi1, szApi2, szApi3)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+       if (szApi3 != NULL)\
+       {\
+               free(szApi3);\
+               szApi3 = NULL;\
+       }\
+
+#define FREE_MEMORY_2ARGS(szApi1, szApi2)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+
+#define FREE(szApi1)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+
+
+#define CHECK_CALLBACK_STATUS(szApiName, nErrorCount) {\
+       MediaCodecWaitForAsync();\
+       if (g_bCallbackResult == false)\
+       {\
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] After %s, callback has not been invoked. Iteration %d \n", __LINE__, szApiName, nLoopCount);\
+               nErrorCount++;\
+               continue;\
+       }\
+       else\
+       {\
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] After %s, callback invoked.\n", __LINE__, szApiName);\
+               g_bCallbackResult = false;\
+       }\
+}
+
+char* Media_CodecGetError(int nRet);
+char* Media_CodecGetCodecTypeEnumString(int nEnum);
+char* Media_CodecGetCodecSupportTypeEnumString(int nEnum);
+void Media_CodecGetMemStatus(char *pszAPIMemory);
+inline void Media_CodecGetMemAllocation();
+void Media_CodecExecutionDelay(char* pszAPITime);
+void Media_CodecGetTimeOfDay();
+void MediaCodecWaitForAsync(void);
+gboolean MediaCodecTimeoutFunction(gpointer data);
+unsigned int GetDataFromFile(void *DataPointer);
+bool MediaCodecGetDataPath(char* pAppDataPath);
+bool MediaCodecAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+
+/** @} */ //end of itc-mediacodec
+
+#endif  //_ITS__MEDIACODEC_COMMON_H_
diff --git a/src/itc/mediacodec/ITs-mediacodec.c b/src/itc/mediacodec/ITs-mediacodec.c
new file mode 100755 (executable)
index 0000000..7321e08
--- /dev/null
@@ -0,0 +1,1281 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-mediacodec-common.h"
+
+/** @addtogroup itc-mediacodec
+* @ingroup             itc
+* @{
+*/
+
+//& set: MediaCodec
+
+mediacodec_h g_mediacodec = NULL;
+bool g_bCallbackResult;
+bool g_bCallbackResultValid;
+
+/**
+* @function                    mediacodec_get_output_cb_p
+* @description         Called when the output buffer, It will be invoked when mediacodec has output buffer
+* @parameter[IN]       media_packet_h, void *
+* @return                      NA
+*/
+static void mediacodec_get_output_cb_p(media_packet_h pkt, void *user_data)
+{
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       g_bCallbackResult = false;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG, sizeof(char));
+#endif
+
+       Media_CodecGetMemAllocation();
+       Media_CodecGetTimeOfDay();
+       int nRetVal = mediacodec_get_output(g_mediacodec, &hOutputBuff, 0);//Target API
+       Media_CodecExecutionDelay(pszSpeedLog);
+       Media_CodecGetMemStatus(pszMemLog);
+       if ( nRetVal != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_get_output failed, error returned = %s\n", __LINE__, Media_CodecGetError(nRetVal));
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG("mediacodec_get_output", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG("mediacodec_get_output", pszMemLog);
+#endif
+               FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+               g_bCallbackResult = true;
+       }
+
+       if ( hOutputBuff != NULL )
+       {
+               media_packet_destroy(hOutputBuff);
+               hOutputBuff = NULL;
+       }
+       ecore_main_loop_quit();
+}
+
+/**
+* @function                    mediacodec_error_cb_p
+* @description         Called when the error has occurred, It will be invoked when the error has occurred
+* @parameter[IN]       mediacodec_error_e, void *
+* @return                      NA
+*/
+static void mediacodec_error_cb_p(mediacodec_error_e error, void *user_data)
+{
+       g_bCallbackResult = true;
+       ecore_main_loop_quit();
+}
+
+/**
+* @function                    mediacodec_eos_cb_p
+* @description         Called when there is no data to decode/encode, It will be invoked when the eos event has occurred
+* @parameter[IN]       void *
+* @return                      NA
+*/
+static void mediacodec_eos_cb_p(void *user_data)
+{
+       g_bCallbackResult = true;
+       ecore_main_loop_quit();
+}
+
+/**
+* @function                    mediacodec_input_buffer_used_cb_p
+* @description         Called when the input buffer(pkt) used, It will be invoked when mediacodec has used input buffer
+* @parameter[IN]       media_packet_h, void *
+* @return                      NA
+*/
+static void mediacodec_input_buffer_used_cb_p(media_packet_h pkt, void *user_data)
+{
+       g_bCallbackResult = true;
+       ecore_main_loop_quit();
+}
+
+/**
+* @function                    mediacodec_output_buffer_available_cb_p
+* @description         Called when the input buffer(pkt) used, It will be invoked when mediacodec has used input buffer
+* @parameter[IN]       media_packet_h, void *
+* @return                      NA
+*/
+static void mediacodec_output_buffer_available_cb_p(media_packet_h pkt, void *user_data)
+{
+       g_bCallbackResult = true;
+       if ( pkt != NULL )
+       {
+               media_packet_destroy(pkt);
+       }
+       ecore_main_loop_quit();
+}
+
+/**
+* @function            ITs_media_codec_startup
+* @description         Called before each test, set the service boolean true
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_media_codec_startup(void)
+{
+       ecore_main_loop_glib_integrate();
+
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       g_bIsMediaCodecValidHandle = true;
+
+       int nRet = mediacodec_create(&g_mediacodec);
+       if ( nRet != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] Unable to create mediacodec handle for decoding/encoding, error returned = %s\n",__LINE__, Media_CodecGetError(nRet));
+               g_bIsMediaCodecValidHandle = false;
+       }
+
+       if(!g_mediacodec){
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc]mediacodec_create return NULL , error returned = %s\n",__LINE__, Media_CodecGetError(nRet));
+               g_bIsMediaCodecValidHandle = false;
+       }
+
+       media_format_create(&hFormat);
+       media_format_set_audio_mime(hFormat, MEDIA_FORMAT_PCM);
+       media_format_set_audio_samplerate(hFormat, 48000);
+       media_format_set_audio_channel(hFormat, 2);
+       media_format_set_audio_bit(hFormat, 16);
+       media_format_set_audio_avg_bps(hFormat,128000);
+       media_packet_create_alloc(hFormat, NULL, NULL, &hInputBuff);
+}
+
+/**
+* @function            ITs_media_codec_cleanup
+* @description         Called after each test, destroys handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_media_codec_cleanup(void)
+{
+       if(g_bIsMediaCodecValidHandle)
+       {
+               mediacodec_destroy(g_mediacodec);
+       }
+
+       if (hInputBuff)
+       {
+               media_packet_destroy(hInputBuff);
+       }
+       if (hFormat)
+       {
+               media_format_unref(hFormat);
+       }
+
+       sleep(SLEEP_TIME);
+       return;
+}
+
+/** @addtogroup        itc-mediacodec-testcases
+* @brief               Integration testcases for module mediacodec
+* @ingroup             itc-mediacodec
+* @{
+*/
+
+//& purpose: Create and destroy a mediacodec handle for decoding/encoding
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_create_destroy_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Create and destroy a mediacodec handle for decoding/encoding
+* @scenario                                    Create a mediacodec handle for decoding/encoding\n
+*                                                      Destroy the mediacodec handle
+* @apicovered                          mediacodec_create, mediacodec_destroy
+* @passcase                                    If mediacodec_create and mediacodec_destroy is successful
+* @failcase                                    If mediacodec_create or mediacodec_destroy fails
+* @precondition                                NA
+* @postcondition                       NA
+*/
+int ITc_mediacodec_create_destroy_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1, nLoopCount = 0;
+
+       char *pszListCreateSpeedLog = NULL;
+       char *pszListDestroySpeedLog = NULL;
+       char *pszCreateDestroyMemLog = NULL;
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+
+#if MEMORY_CHECK
+       pszCreateDestroyMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszListCreateSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszListDestroySpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       mediacodec_h mediacodec = NULL;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               Media_CodecGetMemAllocation();
+               Media_CodecGetTimeOfDay();
+               nRetVal = mediacodec_create(&mediacodec);//Target APIs
+               Media_CodecExecutionDelay(pszListCreateSpeedLog);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_create failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nCreateFailCount++;
+                       continue;
+               }
+
+               Media_CodecGetTimeOfDay();
+               nRetVal = mediacodec_destroy(mediacodec);//Target APIs
+               Media_CodecExecutionDelay(pszListCreateSpeedLog);
+               Media_CodecGetMemStatus(pszCreateDestroyMemLog);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_destroy failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nDestroyFailCount++;
+               }
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nCreateFailCount, nDestroyFailCount, "mediacodec_create", "mediacodec_destroy", pszCreateDestroyMemLog, pszCreateDestroyMemLog, pszListDestroySpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(mediacodec_create, pszListCreateSpeedLog);
+       PRINT_SPEED_LOG(mediacodec_destroy, pszListDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(mediacodec_create_destroy, pszCreateDestroyMemLog);
+#endif
+
+       FREE_MEMORY_3ARGS(pszListCreateSpeedLog, pszListDestroySpeedLog, pszCreateDestroyMemLog);
+
+       return 0;
+}
+
+
+//& purpose: Prepares @a mediacodec for encoding/decoding and The most recently used mediacodec is reset and no longer associated with the mediacodec.
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_prepare_unprepare_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Prepares and unprepares a mediacodec for encoding/decoding
+* @scenario                                    Prepare a mediacodec for encoding/decoding\n
+*                                                      Unprepare the mediacodec
+* @apicovered                          mediacodec_is_encoding_supported, mediacodec_set_codec, mediacodec_set_aenc_info, mediacodec_prepare, mediacodec_unprepare
+* @passcase                                    If mediacodec_prepare and mediacodec_unprepare is successful
+* @failcase                                    If mediacodec_prepare or mediacodec_unprepare fails
+* @precondition                                NA
+* @postcondition                       NA
+*/
+int ITc_mediacodec_prepare_unprepare_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1, nLoopCount = 0;
+
+       char *pszListPrepareSpeedLog = NULL;
+       char *pszListUnprepareSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       int nPrapareFailCount = 0;
+       int nUnprepareFailCount = 0;
+
+       //precondition
+       nRetVal = mediacodec_set_codec(g_mediacodec,  MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+       if ( nRetVal != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] Precondition failed for ITc_mediacodec_prepare_unprepare_p of api - mediacodec_set_codec on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+               return 1;
+       }
+       nRetVal = mediacodec_set_aenc_info(g_mediacodec, 48000, 2, 16, 128000);
+       if ( nRetVal != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] Precondition failed for ITc_mediacodec_prepare_unprepare_p of api - mediacodec_set_vdec_info on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszListPrepareSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszListUnprepareSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               Media_CodecGetMemAllocation();
+               Media_CodecGetTimeOfDay();
+
+
+               nRetVal = mediacodec_prepare(g_mediacodec);//Target APIs
+
+               Media_CodecExecutionDelay(pszListPrepareSpeedLog);
+
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_create failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nPrapareFailCount++;
+                       continue;
+               }
+
+               Media_CodecGetTimeOfDay();
+
+
+               nRetVal = mediacodec_unprepare(g_mediacodec);//Target APIs
+
+               Media_CodecExecutionDelay(pszListPrepareSpeedLog);
+               Media_CodecGetMemStatus(pszMemLog);
+
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_destroy failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nUnprepareFailCount++;
+               }
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nPrapareFailCount, nUnprepareFailCount, "mediacodec_prepare", "mediacodec_unprepare", pszMemLog, pszListPrepareSpeedLog, pszListUnprepareSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("mediacodec_prepare", pszListPrepareSpeedLog);
+       PRINT_SPEED_LOG("mediacodec_unprepare", pszListUnprepareSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("mediacodec_prepare_unprepare", pszMemLog);
+#endif
+
+       FREE_MEMORY_3ARGS(pszListPrepareSpeedLog,pszListUnprepareSpeedLog, pszMemLog);
+
+       return 0;
+
+}
+
+
+
+//& purpose: Sets the default info for the video encoder
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_set_venc_info_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Sets the default info for the video encoder
+* @scenario                                    Set the default info for the video encoder
+* @apicovered                          mediacodec_is_encoding_supported, mediacodec_set_codec, mediacodec_set_venc_info
+* @passcase                                    If mediacodec_set_venc_info is successful
+* @failcase                                    If mediacodec_set_venc_info fails
+* @precondition                                NA
+* @postcondition                       NA
+*/
+int ITc_mediacodec_set_venc_info_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       //precondition
+       int nRetVal = mediacodec_set_codec(g_mediacodec,  MEDIACODEC_H264, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));  
+       if ( nRetVal != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] Unable to set mediacodec for MEDIACODEC_H264, error returned = %s\n", __LINE__, Media_CodecGetError(nRetVal));
+               nRetVal = mediacodec_set_codec(g_mediacodec,  MEDIACODEC_H263, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] Unable to set mediacodec for MEDIACODEC_H263, error returned = %s\n", __LINE__, Media_CodecGetError(nRetVal));
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] Unable to set H263 and H264 video codec to device.\n", __LINE__);
+                       return 1;
+               }
+               else
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] MEDIACODEC_H263 codec set successfully\n", __LINE__);
+               }
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] MEDIACODEC_H264 codec set successfully\n", __LINE__);
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               Media_CodecGetMemAllocation();
+               Media_CodecGetTimeOfDay();
+
+               int nRetVal = mediacodec_set_venc_info(g_mediacodec, 100, 100, 32, 0);//Target API
+
+               Media_CodecExecutionDelay(pszSpeedLog);
+               Media_CodecGetMemStatus(pszMemLog);
+
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_set_venc_info failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+       }
+       VALIDATE_RESULT_API(nFailCount, "mediacodec_set_venc_info", pszMemLog, pszSpeedLog, MAX_COUNT);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("mediacodec_set_venc_info", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("mediacodec_set_venc_info", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+
+       return 0;
+}
+
+
+//& purpose: Sets the default info for the audio decoder
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_set_adec_info_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Sets the default info for the audio decoder
+* @scenario                                    Set the default info for the audio decoder
+* @apicovered                          mediacodec_is_decoding_supported, mediacodec_set_adec_info, mediacodec_set_codec
+* @passcase                                    If mediacodec_set_adec_info is successful
+* @failcase                                    If mediacodec_set_adec_info fails
+* @precondition                                NA
+* @postcondition                       NA
+*/
+int ITc_mediacodec_set_adec_info_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       //precondition
+       int nRetVal = mediacodec_set_codec(g_mediacodec, MEDIACODEC_AAC, (MEDIACODEC_DECODER | MEDIACODEC_SUPPORT_TYPE_SW));//Target API
+       if ( nRetVal != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] Precondition failed for ITc_mediacodec_set_venc_info_p of api - mediacodec_set_codec on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               Media_CodecGetMemAllocation();
+               Media_CodecGetTimeOfDay();
+
+               int nRetVal = mediacodec_set_adec_info(g_mediacodec, 48000, 2, 16);//Target API
+
+               Media_CodecExecutionDelay(pszSpeedLog);
+               Media_CodecGetMemStatus(pszMemLog);
+
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_set_adec_info failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+       }
+       VALIDATE_RESULT_API(nFailCount, "mediacodec_set_adec_info", pszMemLog, pszSpeedLog, MAX_COUNT);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("mediacodec_set_adec_info", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("mediacodec_set_adec_info", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+
+       return 0;
+}
+
+
+//& purpose: Sets the default info for the audio encdoer
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_set_aenc_info_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Sets the default info for the audio encoder
+* @scenario                                    Set the default info for the audio encoder
+* @apicovered                          mediacodec_set_aenc_info, mediacodec_is_encoding_supported, mediacodec_set_codec
+* @passcase                                    If mediacodec_set_aenc_info is successful
+* @failcase                                    If mediacodec_set_aenc_info fails
+* @precondition                                NA
+* @postcondition                       NA
+*/
+int ITc_mediacodec_set_aenc_info_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       //precondition
+       int nRetVal = mediacodec_set_codec(g_mediacodec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));//Target API
+       if ( nRetVal != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] Precondition failed for ITc_mediacodec_set_venc_info_p of api - mediacodec_set_codec on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               Media_CodecGetMemAllocation();
+               Media_CodecGetTimeOfDay();
+
+               int nRetVal = mediacodec_set_aenc_info(g_mediacodec, 100, 64, 32, 0);//Target API
+
+               Media_CodecExecutionDelay(pszSpeedLog);
+               Media_CodecGetMemStatus(pszMemLog);
+
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_set_aenc_info failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+       }
+       VALIDATE_RESULT_API(nFailCount, "mediacodec_set_aenc_info", pszMemLog, pszSpeedLog, MAX_COUNT);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("mediacodec_set_aenc_info", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("mediacodec_set_aenc_info", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+
+       return 0;
+}
+
+
+//& purpose: Sets the default info for the video decoder
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_set_vdec_info_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Sets the default info for the video decoder
+* @scenario                                    Set the default info for the video decoder
+* @apicovered                          mediacodec_set_vdec_info, mediacodec_is_decoding_supported, mediacodec_set_codec
+* @passcase                                    If mediacodec_set_vdec_info is successful
+* @failcase                                    If mediacodec_set_vdec_info fails
+* @precondition                                NA
+* @postcondition                       NA
+*/
+int ITc_mediacodec_set_vdec_info_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       //precondition
+       int nRetVal = mediacodec_set_codec(g_mediacodec, MEDIACODEC_H264, (MEDIACODEC_DECODER | MEDIACODEC_SUPPORT_TYPE_SW));
+       if ( nRetVal != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] Precondition failed for ITc_mediacodec_set_vdec_info_p of api - mediacodec_set_codec on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               Media_CodecGetMemAllocation();
+               Media_CodecGetTimeOfDay();
+
+               int nRetVal = mediacodec_set_vdec_info(g_mediacodec, 100, 100);//Target API
+
+               Media_CodecExecutionDelay(pszSpeedLog);
+               Media_CodecGetMemStatus(pszMemLog);
+
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_set_vdec_info failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+       }
+       VALIDATE_RESULT_API(nFailCount, "mediacodec_set_vdec_info", pszMemLog, pszSpeedLog, MAX_COUNT);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("mediacodec_set_vdec_info", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("mediacodec_set_vdec_info", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Sets the codec type and decoder/encoder.
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_set_codec_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Sets the codec type and decoder/encoder
+* @scenario                                    Set the codec type and decoder/encoder
+* @apicovered                          mediacodec_set_codec, mediacodec_foreach_supported_codec
+* @passcase                                    If mediacodec_set_codec is successful
+* @failcase                                    If mediacodec_set_codec fails
+* @precondition                                NA
+* @postcondition                       NA
+*/
+int ITc_mediacodec_set_codec_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       int arCodecType[]={MEDIACODEC_AAC};
+       int arCodecSupportType[] = {MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW, MEDIACODEC_DECODER | MEDIACODEC_SUPPORT_TYPE_SW};
+
+       int nCodecTypeSize = sizeof(arCodecType) / sizeof(int);
+       int nCodecSupportTypeSize = sizeof(arCodecSupportType) / sizeof(int);
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * nCodecTypeSize * nCodecSupportTypeSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT * nCodecTypeSize * nCodecSupportTypeSize, sizeof(char));
+#endif
+
+       int nSupportType = 0;
+       for(nSupportType = 0; nSupportType < nCodecSupportTypeSize; ++nSupportType)
+       {
+               int CodecSupportType = arCodecSupportType[nSupportType];
+               int nType = 0;
+               for(nType = 0; nType < nCodecTypeSize; ++nType)
+               {
+                       int CodecType = arCodecType[nType];
+                       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+                       {
+                               Media_CodecGetMemAllocation();
+                               Media_CodecGetTimeOfDay();
+
+                               int nRetVal = mediacodec_set_codec(g_mediacodec, CodecType, CodecSupportType);//Target API
+
+                               Media_CodecExecutionDelay(pszSpeedLog);
+                               Media_CodecGetMemStatus(pszMemLog);
+
+                               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+                               {
+                                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_set_codec failed on iteration %d, error returned = %s for Codec Type = %s and Codec Support Type = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal),
+                                               Media_CodecGetCodecTypeEnumString(CodecType), Media_CodecGetCodecSupportTypeEnumString(CodecSupportType));
+
+                                       nFailCount++;
+                                       continue;
+                               }
+                       }
+               }
+       }
+       VALIDATE_RESULT_API(nFailCount, "mediacodec_set_codec", pszMemLog, pszSpeedLog, MAX_COUNT * nCodecTypeSize * nCodecSupportTypeSize);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("mediacodec_set_codec", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("mediacodec_set_codec", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Decodes/Encodes a single picture. The output buffers will be transferred to the queue.
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_process_input_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Decodes/Encodes a single picture and then transfer the output buffers to the queue
+* @scenario                                    Decode/Encode a single picture\n
+*                                                      Transfer the output buffers to the queue
+* @apicovered                          mediacodec_is_encoding_supported, mediacodec_set_codec, mediacodec_set_aenc_info, mediacodec_prepare, mediacodec_unprepare, mediacodec_process_input
+* @passcase                                    If mediacodec_process_input is successful
+* @failcase                                    If mediacodec_process_input fails
+* @precondition                                NA
+* @postcondition                       NA
+*/
+int ITc_mediacodec_process_input_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nOtherCount = 0;
+       unsigned int unSize = 0;
+       void *szData = NULL;
+
+       int nRetVal = mediacodec_set_codec(g_mediacodec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+       if ( nRetVal != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] Precondition failed for mediacodec_set_codec, error returned = %s\n", __LINE__, Media_CodecGetError(nRetVal));
+               return 1;
+       }
+       
+       nRetVal = mediacodec_set_aenc_info(g_mediacodec, 48000, 2, 16, 128000);
+       if ( nRetVal != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] Precondition failed for mediacodec_set_aenc_info, error returned = %s\n", __LINE__, Media_CodecGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRetVal = mediacodec_prepare(g_mediacodec);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_prepare failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nOtherCount++;
+                       continue;
+               }
+
+               media_packet_get_buffer_data_ptr(hInputBuff, &szData);
+               unSize = GetDataFromFile(szData);
+               media_packet_set_buffer_size(hInputBuff, unSize);
+
+               Media_CodecGetMemAllocation();
+               Media_CodecGetTimeOfDay();
+               nRetVal = mediacodec_process_input(g_mediacodec, hInputBuff, 1000);//Target API
+               Media_CodecExecutionDelay(pszSpeedLog);
+               Media_CodecGetMemStatus(pszMemLog);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       mediacodec_unprepare(g_mediacodec);
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_process_input failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+
+               mediacodec_unprepare(g_mediacodec);
+       }
+       VALIDATE_RESULT_API(nOtherCount, "Precondition API", pszMemLog, pszSpeedLog, MAX_COUNT);
+       VALIDATE_RESULT_API(nFailCount, "mediacodec_process_input", pszMemLog, pszSpeedLog, MAX_COUNT);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("mediacodec_process_input", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("mediacodec_process_input", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Gets the output from the queue.
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_get_output_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Gets the output from the queue
+* @scenario                                    Get the output from the queue
+* @apicovered                          mediacodec_is_encoding_supported, mediacodec_set_codec, mediacodec_set_aenc_info, mediacodec_set_output_buffer_available_cb, mediacodec_prepare\n
+*                                                      mediacodec_get_output, mediacodec_process_input, mediacodec_unprepare, mediacodec_unset_output_buffer_available_cb
+* @passcase                                    If mediacodec_get_output is successful
+* @failcase                                    If mediacodec_get_output fails
+* @precondition                                NA
+* @postcondition                       NA
+*/
+int ITc_mediacodec_get_output_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       int nFailCount = 0;
+       int nOtherCount = 0;
+       unsigned int unSize = 0;
+       void *szData = NULL;
+
+       int nRetVal = mediacodec_set_codec(g_mediacodec, MEDIACODEC_AAC, MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW);
+       if ( nRetVal != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] Precondition failed for mediacodec_set_codec, error returned = %s\n", __LINE__, Media_CodecGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = mediacodec_set_aenc_info(g_mediacodec, 48000, 2, 16, 128000);
+       if ( nRetVal != MEDIACODEC_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Media_Codec_ITc] Precondition failed for mediacodec_set_aenc_info, error returned = %s\n", __LINE__, Media_CodecGetError(nRetVal));
+               return 1;
+       }
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRetVal = mediacodec_set_output_buffer_available_cb(g_mediacodec, mediacodec_get_output_cb_p, NULL); 
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_set_output_buffer_available_cb failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nOtherCount++;
+                       continue;
+               }
+
+               nRetVal = mediacodec_prepare(g_mediacodec);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_prepare failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nOtherCount++;
+                       continue;
+               }
+
+               media_packet_get_buffer_data_ptr(hInputBuff, &szData);
+               unSize = GetDataFromFile(szData);
+               media_packet_set_buffer_size(hInputBuff, unSize);
+
+               g_bCallbackResult = false;
+               nRetVal = mediacodec_process_input(g_mediacodec, hInputBuff, 0);
+               
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_process_input failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nOtherCount++;
+                       continue;
+               }
+               
+               CHECK_CALLBACK_STATUS("mediacodec_get_output", nFailCount);
+               mediacodec_unprepare(g_mediacodec);
+               mediacodec_unset_output_buffer_available_cb(g_mediacodec);
+       }
+       if ( nFailCount > 0  || nOtherCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][[Media_Codec_ITc] mediacodec_get_output failed %d , Precondition failed %d times out of %d times\n", __LINE__, nFailCount, nOtherCount, MAX_COUNT);
+               return 1;
+       }
+       return 0;
+}
+
+//& purpose: set and unset error callback the media codec for process, asynchronously.
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_set_unset_error_cb_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Sets and unsets error callback the media codec for process, asynchronously
+* @scenario                                    Set error callback the media codec for process, asynchronously\n
+*                                                      Unset error callback the media codec for process, asynchronously
+* @apicovered                          mediacodec_set_error_cb, mediacodec_unset_error_cb
+* @passcase                                    If mediacodec_set_error_cb and mediacodec_unset_error_cb is successful
+* @failcase                                    If mediacodec_set_error_cb or mediacodec_unset_error_cb fails
+* @precondition                                mediacodec_set_error_cb should be called before mediacodec_preare
+* @postcondition                       mediacodec_error_cb will be invoked
+*/
+int ITc_mediacodec_set_unset_error_cb_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszListSetSpeedLog = NULL;
+       char *pszListUnsetSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszListSetSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszListUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               Media_CodecGetMemAllocation();
+               Media_CodecGetTimeOfDay();
+               nRetVal = mediacodec_set_error_cb(g_mediacodec,mediacodec_error_cb_p, NULL);//Target APIs
+               Media_CodecExecutionDelay(pszListSetSpeedLog);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_set_error_cb failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               Media_CodecGetTimeOfDay();
+               nRetVal = mediacodec_unset_error_cb(g_mediacodec);//Target APIs
+               Media_CodecExecutionDelay(pszListUnsetSpeedLog);
+               Media_CodecGetMemStatus(pszMemLog);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_unset_error_cb failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nUnsetFailCount++;
+               }
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nUnsetFailCount, "mediacodec_set_error_cb", "mediacodec_unset_error_cb", pszMemLog, pszListSetSpeedLog, pszListUnsetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("mediacodec_set_error_cb", pszListSetSpeedLog);
+       PRINT_SPEED_LOG("mediacodec_unset_error_cb", pszListUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("mediacodec_set_unset_error_cb", pszMemLog);
+#endif
+
+       FREE_MEMORY_3ARGS(pszListSetSpeedLog,pszListUnsetSpeedLog, pszMemLog);
+       return 0;
+}
+
+//& purpose: set and unset eos callback the media codec for process, asynchronously.
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_set_eos_cb_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Sets and unsets error callback the media codec for process, asynchronously
+* @scenario                                    Set error callback the media codec for process, asynchronously\n
+*                                                      Unset error callback the media codec for process, asynchronously
+* @apicovered                          mediacodec_set_eos_cb, mediacodec_unset_eos_cb
+* @passcase                                    If mediacodec_set_eos_cb and mediacodec_unset_eos_cb is successful
+* @failcase                                    If mediacodec_set_eos_cb or mediacodec_unset_eos_cb fails
+* @precondition                                mediacodec_set_eos_cb should be called before mediacodec_preare
+* @postcondition                       mediacodec_eos_cb will be invoked
+*/
+int ITc_mediacodec_set_eos_cb_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszListSetSpeedLog = NULL;
+       char *pszListUnsetSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszListSetSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszListUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {       
+               Media_CodecGetMemAllocation();
+               Media_CodecGetTimeOfDay();
+               nRetVal = mediacodec_set_eos_cb(g_mediacodec, mediacodec_eos_cb_p, NULL);//Target APIs
+               Media_CodecExecutionDelay(pszListSetSpeedLog);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_set_eos_cb failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               Media_CodecGetTimeOfDay();
+               nRetVal = mediacodec_unset_eos_cb(g_mediacodec);//Target APIs
+               Media_CodecExecutionDelay(pszListUnsetSpeedLog);
+               Media_CodecGetMemStatus(pszMemLog);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_unset_eos_cb failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nUnsetFailCount++;
+                       continue;
+               }
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nUnsetFailCount, "mediacodec_set_eos_cb", "mediacodec_unset_eos_cb", pszMemLog, pszListSetSpeedLog, pszListUnsetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("mediacodec_set_eos_cb", pszListSetSpeedLog);
+       PRINT_SPEED_LOG("mediacodec_unset_eos_cb", pszListUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("mediacodec_set_unset_eos_cb", pszMemLog);
+#endif
+       FREE_MEMORY_3ARGS(pszListSetSpeedLog,pszListUnsetSpeedLog, pszMemLog);
+       return 0;
+}
+
+//& purpose: set and unset empty buffer callback the media codec for process, asynchronously.
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_set_unset_input_buffer_used_cb_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Sets and unsets empty buffer callback the media codec for process, asynchronously
+* @scenario                                    Set empty buffer callback the media codec for process, asynchronously\n
+*                                                      Unset empty buffer callback the media codec for process, asynchronously
+* @apicovered                          mediacodec_is_encoding_supported, mediacodec_set_codec, mediacodec_set_aenc_info, mediacodec_set_input_buffer_used_cb\n
+*                                                      mediacodec_prepare, mediacodec_process_input, mediacodec_unprepare, mediacodec_unset_input_buffer_used_cb
+* @passcase                                    If mediacodec_set_input_buffer_used_cb and mediacodec_unset_input_buffer_used_cb is successful
+* @failcase                                    If mediacodec_set_input_buffer_used_cb or mediacodec_unset_input_buffer_used_cb fails
+* @precondition                                mediacodec_set_input_buffer_used_cb should be called before mediacodec_preare
+* @postcondition                       mediacodec_input_buffer_used_cb will be invoked
+*/
+int ITc_mediacodec_set_unset_input_buffer_used_cb_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszListSetSpeedLog = NULL;
+       char *pszListUnsetSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       unsigned int unSize = 0;
+       void *szData = NULL;
+       mediacodec_set_codec(g_mediacodec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+       mediacodec_set_aenc_info(g_mediacodec, 48000, 2, 16, 128000);
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszListSetSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszListUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               Media_CodecGetMemAllocation();
+               Media_CodecGetTimeOfDay();
+               nRetVal = mediacodec_set_input_buffer_used_cb(g_mediacodec, mediacodec_input_buffer_used_cb_p, NULL);//Target APIs
+               Media_CodecExecutionDelay(pszListSetSpeedLog);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_set_input_buffer_used_cb failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               nRetVal = mediacodec_prepare(g_mediacodec);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_prepare failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               media_packet_get_buffer_data_ptr(hInputBuff, &szData);
+               unSize = GetDataFromFile(szData);
+               media_packet_set_buffer_size(hInputBuff, unSize);
+
+               g_bCallbackResult = false;
+               nRetVal = mediacodec_process_input(g_mediacodec, hInputBuff, 0);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_process_input failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               CHECK_CALLBACK_STATUS("mediacodec_set_input_buffer_used_cb", nSetFailCount);
+
+               mediacodec_unprepare(g_mediacodec);
+               
+               Media_CodecGetTimeOfDay();
+               nRetVal = mediacodec_unset_input_buffer_used_cb(g_mediacodec);//Target APIs
+               Media_CodecExecutionDelay(pszListUnsetSpeedLog);
+               Media_CodecGetMemStatus(pszMemLog);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_unset_input_buffer_used_cb failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nUnsetFailCount++;
+               }
+       }
+       
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nUnsetFailCount, "mediacodec_set_input_buffer_used_cb", "mediacodec_unset_input_buffer_used_cb", pszMemLog, pszListSetSpeedLog, pszListUnsetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("mediacodec_set_input_buffer_used_cb", pszListSetSpeedLog);
+       PRINT_SPEED_LOG("mediacodec_unset_input_buffer_used_cb", pszListUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("mediacodec_set_unset_input_buffer_used_cb", pszMemLog);
+#endif
+       FREE_MEMORY_3ARGS(pszListSetSpeedLog,pszListUnsetSpeedLog, pszMemLog);
+       return 0;
+}
+
+//& purpose: set and unset output buffer available callback the media codec for process, asynchronously.
+//& type: auto
+/**
+* @testcase                            ITc_mediacodec_set_unset_output_buffer_available_cb_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                         Sets and unsets output buffer available callback for the media codec for process, asynchronously
+* @scenario                                    Prepares a mediacodec for encoding/decoding\n
+*                                                      Set output buffer available callback for the media codec for process, asynchronously\n
+*                                                      Unset output buffer available callback for the media codec for process, asynchronously
+* @apicovered                          mediacodec_is_encoding_supported, mediacodec_set_codec, mediacodec_set_aenc_info, mediacodec_set_output_buffer_available_cb\n
+*                                                      mediacodec_prepare, mediacodec_process_input, mediacodec_unprepare, mediacodec_unset_output_buffer_available_cb*
+* @passcase                                    If mediacodec_set_output_buffer_available_cb and mediacodec_unset_output_buffer_available_cb is successful
+* @failcase                                    If mediacodec_set_output_buffer_available_cb or mediacodec_unset_output_buffer_available_cb fails
+* @precondition                                mediacodec_set_fill_buffer_cb should be called before mediacodec_preare
+* @postcondition                       mediacodec_output_buffer_available_cb will be invoked
+*/
+int ITc_mediacodec_set_unset_output_buffer_available_cb_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszListSetSpeedLog = NULL;
+       char *pszListUnsetSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       unsigned int unSize = 0;
+       void *szData = NULL;
+       mediacodec_set_codec(g_mediacodec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+       mediacodec_set_aenc_info(g_mediacodec, 48000, 2, 16, 128000);
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszListSetSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszListUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               Media_CodecGetMemAllocation();
+               Media_CodecGetTimeOfDay();
+               nRetVal = mediacodec_set_output_buffer_available_cb(g_mediacodec, mediacodec_output_buffer_available_cb_p, NULL);//Target APIs
+               Media_CodecExecutionDelay(pszListSetSpeedLog);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_set_output_buffer_available_cb failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               nRetVal = mediacodec_prepare(g_mediacodec);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_prepare failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               media_packet_get_buffer_data_ptr(hInputBuff, &szData);
+               unSize = GetDataFromFile(szData);
+               media_packet_set_buffer_size(hInputBuff, unSize);
+
+               g_bCallbackResult = false;
+               nRetVal = mediacodec_process_input(g_mediacodec, hInputBuff, 0);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_process_input failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               CHECK_CALLBACK_STATUS("mediacodec_set_output_buffer_available_cb", nSetFailCount);
+
+               mediacodec_unprepare(g_mediacodec);
+
+               Media_CodecGetTimeOfDay();
+               nRetVal = mediacodec_unset_output_buffer_available_cb(g_mediacodec);//Target APIs
+               Media_CodecExecutionDelay(pszListUnsetSpeedLog);
+               Media_CodecGetMemStatus(pszMemLog);
+               if ( nRetVal != MEDIACODEC_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Media_Codec_ITc] mediacodec_unset_output_buffer_available_cb failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Media_CodecGetError(nRetVal));
+                       nUnsetFailCount++;
+               }
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nSetFailCount, nUnsetFailCount, "mediacodec_set_output_buffer_available_cb", "mediacodec_unset_output_buffer_available_cb", pszMemLog, pszListSetSpeedLog, pszListUnsetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("mediacodec_set_output_buffer_available_cb", pszListSetSpeedLog);
+       PRINT_SPEED_LOG("mediacodec_unset_output_buffer_available_cb", pszListUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("mediacodec_set_unset_output_buffer_available_cb", pszMemLog);
+#endif
+       FREE_MEMORY_3ARGS(pszListSetSpeedLog,pszListUnsetSpeedLog, pszMemLog);
+       return 0;
+}
+
+/** @} */ //end of itc-mediacodec
+/** @} */ //end of itc-mediacodec-testcases
\ No newline at end of file
diff --git a/src/itc/mediacodec/TestData.pcm b/src/itc/mediacodec/TestData.pcm
new file mode 100755 (executable)
index 0000000..38a4275
Binary files /dev/null and b/src/itc/mediacodec/TestData.pcm differ
diff --git a/src/itc/mediacodec/tct-mediacodec-native.c b/src/itc/mediacodec/tct-mediacodec-native.c
new file mode 100755 (executable)
index 0000000..39a205e
--- /dev/null
@@ -0,0 +1,135 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-mediacodec-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/mediacodec/tct-mediacodec-native.h b/src/itc/mediacodec/tct-mediacodec-native.h
new file mode 100755 (executable)
index 0000000..218999f
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_MEDIACODEC_NATIVE_H__
+#define __TCT_MEDIACODEC_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_media_codec_startup(void);
+extern void ITs_media_codec_cleanup(void);
+
+extern int ITc_mediacodec_create_destroy_p(void);
+extern int ITc_mediacodec_prepare_unprepare_p(void);
+extern int ITc_mediacodec_set_venc_info_p(void);
+extern int ITc_mediacodec_set_adec_info_p(void);
+extern int ITc_mediacodec_set_aenc_info_p(void);
+extern int ITc_mediacodec_set_vdec_info_p(void);
+extern int ITc_mediacodec_set_codec_p(void);
+extern int ITc_mediacodec_process_input_p(void);
+extern int ITc_mediacodec_get_output_p(void);
+extern int ITc_mediacodec_set_unset_error_cb_p(void);
+extern int ITc_mediacodec_set_eos_cb_p(void);
+extern int ITc_mediacodec_set_unset_input_buffer_used_cb_p(void);
+extern int ITc_mediacodec_set_unset_output_buffer_available_cb_p(void);
+
+testcase tc_array[] = {
+    {"ITc_mediacodec_create_destroy_p", ITc_mediacodec_create_destroy_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_prepare_unprepare_p", ITc_mediacodec_prepare_unprepare_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_set_venc_info_p", ITc_mediacodec_set_venc_info_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_set_adec_info_p", ITc_mediacodec_set_adec_info_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_set_aenc_info_p", ITc_mediacodec_set_aenc_info_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_set_vdec_info_p", ITc_mediacodec_set_vdec_info_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_set_codec_p", ITc_mediacodec_set_codec_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_process_input_p", ITc_mediacodec_process_input_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_get_output_p", ITc_mediacodec_get_output_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_set_unset_error_cb_p", ITc_mediacodec_set_unset_error_cb_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_set_eos_cb_p", ITc_mediacodec_set_eos_cb_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_set_unset_input_buffer_used_cb_p", ITc_mediacodec_set_unset_input_buffer_used_cb_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {"ITc_mediacodec_set_unset_output_buffer_available_cb_p", ITc_mediacodec_set_unset_output_buffer_available_cb_p, ITs_media_codec_startup, ITs_media_codec_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_MEDIACODEC_NATIVE_H__
diff --git a/src/itc/messages/CMakeLists.txt b/src/itc/messages/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..f4bea70
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "messages")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-messaging-messages")
+SET(TC_SOURCES
+       ITs-messages-common.c
+       ITs-messages-mms.c
+       ITs-messages.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-appfw-application
+       capi-system-info
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/messages/ITs-messages-common.c b/src/itc/messages/ITs-messages-common.c
new file mode 100755 (executable)
index 0000000..99d62a1
--- /dev/null
@@ -0,0 +1,354 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-messages-common.h"
+
+/** @addtogroup itc-messages
+* @ingroup             itc
+* @{
+*/
+
+extern struct timeval g_stMessagesStartTime;
+extern struct mallinfo g_stMessagesMemInfo;
+
+/**
+* @function            MessagesGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* MessagesGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {               
+               case MESSAGES_ERROR_INVALID_PARAMETER : szErrorVal = "MESSAGES_ERROR_INVALID_PARAMETER" ; break; 
+               case MESSAGES_ERROR_OUT_OF_MEMORY : szErrorVal = "MESSAGES_ERROR_OUT_OF_MEMORY" ; break;                
+               case MESSAGES_ERROR_SERVER_NOT_READY : szErrorVal = "MESSAGES_ERROR_SERVER_NOT_READY" ; break; 
+               case MESSAGES_ERROR_COMMUNICATION_WITH_SERVER_FAILED : szErrorVal = "MESSAGES_ERROR_COMMUNICATION_WITH" ; break; 
+               case MESSAGES_ERROR_OPERATION_FAILED : szErrorVal = "MESSAGES_ERROR_OPERATION_FAILED" ; break; 
+               case MESSAGES_ERROR_SENDING_FAILED : szErrorVal = "MESSAGES_ERROR_SENDING_FAILED" ; break; 
+               case MESSAGES_ERROR_OUT_OF_RANGE : szErrorVal = "MESSAGES_ERROR_OUT_OF_RANGE" ; break;          
+               case MESSAGES_ERROR_NO_SIM_CARD : szErrorVal = "MESSAGES_ERROR_NO_SIM_CARD" ; break; 
+               case MESSAGES_ERROR_NO_DATA : szErrorVal = "MESSAGES_ERROR_NO_DATA" ; break; 
+               case MESSAGES_ERROR_PERMISSION_DENIED : szErrorVal = "MESSAGES_ERROR_PERMISSION_DENIED" ; break;                
+               case MESSAGES_ERROR_NOT_SUPPORTED : szErrorVal = "MESSAGES_ERROR_NOT_SUPPORTED" ; break;                
+               case MESSAGES_ERROR_NONE : szErrorVal = "MESSAGES_ERROR_NONE" ; break;
+               default : szErrorVal = "MESSAGES_ERROR_UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           Messages_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Messages_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if(NULL == pszKey)
+       {
+               FPRINTF("[Line : %d][messages_ITC] Null key value passed to function : Messages_Check_System_Info_Feature_Supported\\n",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d][messages_ITC] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n",__LINE__, Messages_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if(false == bValue)
+       {
+               FPRINTF("[Line : %d][messages_ITC] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)\\n",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][messages_ITC] system_info_get_platform_bool returned Supported status feature for (key = %s)\\n",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           Messages_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Messages_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Cannot find key in model config file " ; break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR  : szErrorVal = "Error - An input/output error occurred when read value from model config file " ; break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY   : szErrorVal = "Error - Out of memory  " ; break;
+                       
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+
+/**
+ * @function           MessagesGetDataPath
+ * @description                Returnes the application data path
+ * @parameter          pAppDataPath: application data path
+ * @return                     true if succeed else false
+ */
+bool MessagesGetDataPath(char* pAppDataPath)
+{
+       if(NULL == pAppDataPath)
+       {
+               FPRINTF( "[Line : %d] [messages_ITC] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if(NULL == pPath)
+       {
+               FPRINTF( "[Line : %d] [messages_ITC] Unable to get application data path; app_get_data_path returned null value \\n", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF( "[Line : %d] [messages_ITC] application data path returned = %s\\n", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+
+
+/**
+ * @function           MessagesAppendToAppDataPath
+ * @description                Appends the input string to application data path
+ * @parameter          pInputPath: path to append to data path; pFinalPath: final resultant path
+ * @return                     true if succeed else false
+ */
+bool MessagesAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if( (NULL == pInputPath) || (NULL == pFinalPath) )
+       {
+               FPRINTF( "[Line : %d] [messages_ITC] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if(false == MessagesGetDataPath(pAppDataPath))
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+       
+       FPRINTF( "[Line : %d] [messages_ITC] result path returned = %s\\n", __LINE__, pFinalPath);
+
+       return true;
+}
+
+/**
+* @function                    MessagesGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void MessagesGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char * pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stMessagesMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stMessagesMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stMessagesMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    MessagesGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void MessagesGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stMessagesMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void MessagesExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime=calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stMessagesStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stMessagesStartTime.tv_usec;
+                       
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }               
+#endif
+}
+
+/**
+ * @function           MessagesTimeout
+ * @description                Called if some callback is not invoked for a particular timeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */ 
+gboolean MessagesTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               pMainLoop = NULL; 
+       }
+       FPRINTF("[Line : %d][messages_ITC] Callback Timeout\\n",__LINE__);
+       return false;
+}
+
+/**
+ * @function           SystemGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stMessagesStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void MessagesGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stMessagesStartTime, NULL);
+#endif
+}
+
+
+/**
+ * @function           GetValueFromConfigFile
+ * @description                gets the corresponding value for a key from config file
+ * @parameter          pstrKeyString : Key, pstrValue : Value
+ * @return                     true for success, false for failure
+ */ 
+bool GetValueFromConfigFile(char* pstrKeyString, char* pstrValue)
+{
+       if(NULL == pstrKeyString)
+       {
+               FPRINTF("[Line : %d] [messages_ITC] The key string provided to fetch config file value is null\\n", __LINE__);
+               return false;
+       }
+               
+       
+       FILE* pfilePtr = fopen(CONFIGFILE_PATH, "r");
+       if(NULL == pfilePtr)
+       {
+               FPRINTF("[Line : %d] [messages_ITC] Unable to open configuration file : %s\\n", __LINE__, CONFIGFILE_PATH);
+               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 ( pszKey != NULL )
+                       {
+                               if ( 0 == strcmp(pszKey, pstrKeyString) )
+                               {
+#if DEBUG
+                                       FPRINTF("[Line : %d] [messages_ITC] [Key = %s; Config value = %s]\\n", __LINE__, pszKey, pszValue);
+#endif
+                                       break;
+                               }
+                       }
+
+                       pszKey = NULL;
+                       pszValue = NULL;
+               }
+       }
+       
+       fclose(pfilePtr);
+       if(NULL == pszValue)
+       {
+               FPRINTF("[Line : %d] [messages_ITC] [Key = %s; Unable to retrieve config value for this key. Check key at config file location : %s]\\n", __LINE__, pstrKeyString, CONFIGFILE_PATH);
+               return false;
+       }
+
+       if(strlen(pszValue) >= CONFIG_VALUE_LEN_MAX)
+       {
+               FPRINTF("[Line : %d] [messages_ITC] [Key = %s; Config Value should be less than %d characters in length]\\n", __LINE__, pszKey, CONFIG_VALUE_LEN_MAX);
+               return false;
+       }
+
+       memset(pstrValue, 0, CONFIG_VALUE_LEN_MAX);
+       strcpy(pstrValue, pszValue);
+       return true;
+}
+
+/** @} */ //end of itc-messages
\ No newline at end of file
diff --git a/src/itc/messages/ITs-messages-common.h b/src/itc/messages/ITs-messages-common.h
new file mode 100755 (executable)
index 0000000..8e022a2
--- /dev/null
@@ -0,0 +1,171 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_MESSAGES_COMMON_H_
+#define _ITS_MESSAGES_COMMON_H_
+
+#include "assert.h"
+#include <msg.h>
+#include <msg_transport.h>
+#include <msg_storage.h>
+#include <messages.h>
+#include <messages_types.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <string.h>
+#include <glib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <app.h>
+#include <system_info.h>
+
+/** @addtogroup itc-messages
+* @ingroup             itc
+* @{
+*/
+
+#define LOG                    100
+#define WIDTH          16
+#define HEIGHT         9
+#define TIMELOG                20
+#define MEMLOG         20
+#define BUFFER         256
+#define ADD_PORT       2
+
+#define MICROSECONDS_PER_SECOND        1000000
+#define CONFIG_LINE_LEN_MAX                    2048
+#define CONFIG_VALUE_LEN_MAX           1024
+#define TIMEOUT_CB                                     30000
+#define PUSH_TEST_APP_ID                       "TEST_APP_ID"
+#define PUSH_TEST_CONTENT_TYPE                 "text/vnd.wap.connectivity-xml"
+#define ERR_LOG                                        "/tmp/tclog"
+
+
+FILE     *g_fpLog;
+GMainLoop *g_loop;
+
+#define PATH_LEN                                       1024
+#define USER_DATA                                      NULL
+#define TELEPHONY_FEATURE                      "http://tizen.org/feature/network.telephony"
+#define TELEPHONY_FEATURE_MMS                  "http://tizen.org/feature/network.telephony.mms"
+#define MESSAGES_IMAGE_FILE            "Image.jpg"
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("Starting test : %s \\n",__FUNCTION__);\
+       if ( g_bFeatureMismatch )\
+       {\
+               return 1;\
+       }\
+       if ( g_bFeatureNotSupported )\
+       {\
+               return 0;\
+       }\
+       if ( !g_bMessageService || !g_bMessagesCreation )\
+       {\
+               FPRINTF("[Line : %d][messages_ITC] Precondition of mesages create failed so leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+} 
+
+#define START_TEST_MMS {\
+       FPRINTF("Starting test : %s \\n",__FUNCTION__);\
+       if ( g_bFeatureMismatchMms )\
+       {\
+               return 1;\
+       }\
+       if ( g_bFeatureNotSupportedMms )\
+       {\
+               return 0;\
+       }\
+       if ( !g_bMessageServiceMms )\
+       {\
+               FPRINTF("[Line : %d][messages_ITC] Precondition of mesages open service failed so leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+} 
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == MESSAGES_ERROR_NONE)\
+       {\
+               FPRINTF("[Line : %d][messages_ITC] %s passed\\n",__LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][messages_ITC] %s failed, error returned = %s \\n",__LINE__, API, MessagesGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_LOOP(nRetVal, API, nFailCount) {\
+       if (nRetVal == MESSAGES_ERROR_NONE)\
+       {\
+               FPRINTF("[Line : %d][messages_ITC] %s passed\\n",__LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][messages_ITC] %s failed for loop count = %d, error returned = %s \\n",__LINE__, API, nLoopCount, MessagesGetError(nRetVal));\
+               ++nFailCount;\
+               continue;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if(strlen(memLog) > 0) \
+       {  \
+               memLog[strlen(memLog)-1] = '\0';\
+               FPRINTF("[Line : %d][messages_ITC] %s_MemoryLeakStatus : %s\\n",__LINE__, #api, memLog);\
+       }
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d][messages_ITC] %s_TimeInMicrosec : %s\\n", __LINE__, #api, speedLog);\
+       }
+       
+#define RUN_POLLING_LOOP {\
+       if(g_bMessagesCB == false)\
+       {\
+               g_loop = g_main_loop_new(NULL, false);\
+               nTimeoutId = g_timeout_add(TIMEOUT_CB, MessagesTimeout, g_loop);\
+               g_main_loop_run(g_loop);\
+               g_source_remove(nTimeoutId);\
+               g_loop = NULL;\
+       }\
+}
+char* Messages_System_Info_GetError(int nRet);
+char* MessagesGetError(int nRet);
+bool GetValueFromConfigFile(char* pstrKeyString, char* pstrValue);
+bool MessagesAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+bool Messages_Check_System_Info_Feature_Supported(char* pszKey);
+bool MessagesGetDataPath(char* pPath);
+void MessagesGetMemAllocation();
+void MessagesGetTimeOfDay();
+void MessagesExecutionDelay(char* pszAPITime);
+void MessagesGetMemStatus(char *pszAPIMemory);
+gboolean MessagesTimeout(gpointer data);
+
+/** @} */ //end of itc-messages
+
+#endif  //_ITS_MESSAGES_COMMON_H_
diff --git a/src/itc/messages/ITs-messages-mms.c b/src/itc/messages/ITs-messages-mms.c
new file mode 100755 (executable)
index 0000000..490e728
--- /dev/null
@@ -0,0 +1,552 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-messages-common.h"
+
+/** @addtogroup itc-messages
+* @ingroup             itc
+* @{
+*/
+
+messages_service_h g_pstHandleMessageServiceMms = NULL;
+bool g_bIsTelephonyFeatureSupportedMms = false;
+bool g_bMessageServiceMms = false;
+bool g_bFeatureMismatchMms = false;
+bool g_bFeatureNotSupportedMms = false;
+
+/**
+* @function            ITs_messages_startup
+* @description         Opens a handle for a messaging service and Creates a message handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_messages_mms_startup(void)
+{
+       int nRet = 0;
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bIsTelephonyFeatureSupportedMms = true;
+       g_bFeatureMismatchMms = false;
+       g_bFeatureNotSupportedMms = false;
+
+       g_bIsTelephonyFeatureSupportedMms = Messages_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE);
+
+       nRet = messages_open_service(&g_pstHandleMessageServiceMms);
+       if ( !g_bIsTelephonyFeatureSupportedMms )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][messages_ITC] messages_open_service returned %s error for unsupported feature\\n", __LINE__, MessagesGetError(nRet));
+                       g_bFeatureMismatchMms = true;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][messages_ITC] messages_open_service correctly returned %s error for unsupported feature\\n", __LINE__, MessagesGetError(nRet));
+                       g_bFeatureNotSupportedMms = true;
+               }
+               return;
+       }
+       if ( nRet == MESSAGES_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][messages_ITC] messages_open_service in startup passed\\n",__LINE__);
+               g_bMessageServiceMms = true;
+       }
+       else
+       {
+               FPRINTF("[Line : %d][messages_ITC]messages_open_service failed, error returned = %d(%s) \\n",__LINE__, nRet, MessagesGetError(nRet));
+               g_bMessageServiceMms = false;
+       }
+       return;
+}
+
+/**
+* @function            ITs_messages_cleanup
+* @description         Close a handle for a messaging service and Destroy a message handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_messages_mms_cleanup(void)
+{
+       int nRet = 0;
+       if(g_bIsTelephonyFeatureSupportedMms && g_bMessageServiceMms)
+       {
+               nRet = messages_close_service(g_pstHandleMessageServiceMms);
+               if(nRet == 0)
+               {
+                       FPRINTF("[Line : %d][messages_ITC]messages_close_service passed cleanUp\\n",__LINE__);
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][messages_ITC]messages_close_service failed, error returned = %d(%s) \\n",__LINE__, nRet,MessagesGetError(nRet));
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][messages_ITC]messages_open_service failed \\n", __LINE__);
+       }
+       g_pstHandleMessageServiceMms = NULL; 
+
+       return;
+}
+
+/** @addtogroup        itc-messages-testcases
+* @brief               Integration testcases for module messages
+* @ingroup             itc-messages
+* @{
+*/
+
+//& purpose: Add/Get attachment
+//& type: auto
+/**
+* @testcase                    ITc_messages_mms_add_get_attachement_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Adds/Get the attachment MMS message.
+* @scenario                            Create MMS message\n
+*                                              Add attachment\n
+*                                              Get attachment
+* @apicovered                  messages_mms_add_attachment, messages_mms_get_attachment
+* @passcase                            When messages_mms_add_attachment and  messages_mms_get_attachment are successful.
+* @failcase                            If target API messages_mms_add_attachment or messages_mms_get_attachment fails or any precondition API fails.
+* @precondition                        Message handle must be created
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_mms_add_get_attachement_p(void)
+{
+       START_TEST_MMS;
+       bool bIsTelephonyFeatureMmsSupported = Messages_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE_MMS);
+               
+       messages_message_h stHandleMMSMessage = NULL;
+       char *pszAddGetAttachmentMemLog = NULL;
+       char *pszAddSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       char *pszPath = NULL;
+       char pPath[PATH_LEN] = {0,};
+       if(false == MessagesAppendToAppDataPath(MESSAGES_IMAGE_FILE, pPath))
+       {
+               FPRINTF( "[Line : %d] [messages_ITC] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+       messages_media_type_e eMessageMediaType;
+       int nRet = 0, nLoopCount, nRetAtt = 0, nMMSAddGetAttachementFailCount = 0;
+       messages_media_type_e eMessagesMediaType[] = {
+                                       MESSAGES_MEDIA_UNKNOWN,
+                                       MESSAGES_MEDIA_IMAGE,
+                                       MESSAGES_MEDIA_AUDIO,
+                                       MESSAGES_MEDIA_VIDEO
+                                       };
+
+       int nEnumSize = sizeof(eMessagesMediaType) / sizeof(eMessagesMediaType[0]);
+       int nEnumCounter = 0;
+
+       nRet = messages_create_message(MESSAGES_TYPE_MMS, &stHandleMMSMessage);
+       PRINT_RESULT(nRet, "messages_create_message");
+
+#if MEMORY_CHECK
+       pszAddGetAttachmentMemLog =  calloc(MEMLOG * MAX_COUNT * nEnumSize , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAddSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+
+       for ( nEnumCounter=0; nEnumCounter<nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       char *szEnumVal = NULL;
+                       MessagesGetMemAllocation();
+                       MessagesGetTimeOfDay();
+                       nRetAtt = messages_mms_add_attachment(stHandleMMSMessage, eMessagesMediaType[nEnumCounter], MESSAGES_IMAGE_FILE);
+                       MessagesExecutionDelay(pszAddSpeedLog);
+                       usleep(2000000);
+                       if ( !bIsTelephonyFeatureMmsSupported )
+                       {
+                               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                               {
+                                       FPRINTF("[Line : %d][messages_ITC] messages_mms_add_attachment() returned %d(%s) error for unsupported MMS feature\\n", __LINE__, nRet, MessagesGetError(nRet));
+                                       nMMSAddGetAttachementFailCount++;
+                               }
+                               else
+                               {
+                                       FPRINTF("[Line : %d][messages_ITC] messages_mms_add_attachment failed for unsuported (http://tizen.org/feature/network.telephony.mms ) MMS telephony feature\\n", __LINE__);
+                               }
+                               continue;
+                       }       
+                       PRINT_RESULT_LOOP(nRetAtt, "messages_mms_add_attachment",nMMSAddGetAttachementFailCount);
+                       switch( eMessagesMediaType[nEnumCounter] )
+                       {
+                               case MESSAGES_MEDIA_UNKNOWN : szEnumVal = "MESSAGES_MEDIA_UNKNOWN" ; break;
+                               case MESSAGES_MEDIA_IMAGE : szEnumVal = "MESSAGES_MEDIA_IMAGE" ; break;
+                               case MESSAGES_MEDIA_AUDIO : szEnumVal = "MESSAGES_MEDIA_AUDIO" ; break;
+                               case MESSAGES_MEDIA_VIDEO : szEnumVal = "MESSAGES_MEDIA_VIDEO" ; break;
+                       }
+                       if(nRet !=0)
+                       {
+                               FPRINTF("[Line : %d][messages_ITC] Failed for [ %d] times, for enum  = [ %s ][%d] \\n", __LINE__, nMMSAddGetAttachementFailCount, szEnumVal, eMessagesMediaType[nEnumCounter]);
+                               nMMSAddGetAttachementFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][messages_ITC] for enum  = [ %s ][%d] \\n", __LINE__, szEnumVal,eMessagesMediaType[nEnumCounter]);
+                       }
+
+                       MessagesGetTimeOfDay();
+                       nRetAtt = messages_mms_get_attachment(stHandleMMSMessage, 0, &eMessageMediaType, &pszPath);
+                       MessagesExecutionDelay(pszGetSpeedLog);
+                       PRINT_RESULT_LOOP(nRetAtt, "messages_mms_add_attachment",nMMSAddGetAttachementFailCount);
+                       MessagesGetMemStatus(pszAddGetAttachmentMemLog);
+
+                       if(pszPath != NULL)
+                       {
+                               free(pszPath);
+                               pszPath = NULL;
+                       }
+               }
+       }
+
+       nRet = messages_destroy_message (stHandleMMSMessage);
+       if (nRet == 0)
+       {
+               FPRINTF("[Line : %d][messages_ITC]messages_destroy_message passed\\n",__LINE__);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][messages_ITC]messages_destroy_message failed, error returned = %d(%s) \\n", __LINE__, nRet,MessagesGetError(nRet));
+       }
+
+       if (nMMSAddGetAttachementFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_mms_add_get_attachement_p failed for %d out of %d times\\n",__LINE__, nMMSAddGetAttachementFailCount, MAX_COUNT*nEnumSize);
+               free (pszAddGetAttachmentMemLog);
+               free (pszAddSpeedLog);
+               free (pszGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_mms_add_attachment, pszAddSpeedLog);
+       PRINT_SPEED_LOG(messages_mms_get_attachment, pszGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(MMS_AddGetAttachement, pszAddGetAttachmentMemLog);
+#endif
+
+       free (pszAddGetAttachmentMemLog);
+       free (pszAddSpeedLog);
+       free (pszGetSpeedLog);
+       return 0;
+}
+
+//& purpose: Gets the attachment with the specified index
+//& type: auto
+/**
+* @testcase                    ITc_messages_mms_get_attachement_count_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the attachment with the specified index
+* @scenario                            Create MMS message\n
+*                                              Gets the attachment with the specified index
+* @apicovered                  messages_mms_get_attachment_count
+* @passcase                            When messages_mms_get_attachment_count is successful.
+* @failcase                            If target API messages_mms_get_attachment_count fails or any precondition API fails.
+* @precondition                        Message handle must be created
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_mms_get_attachement_count_p(void)
+{
+       START_TEST_MMS;
+       bool bIsTelephonyFeatureMmsSupported = Messages_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE_MMS);     
+               
+       messages_message_h stHandleMMSMessage = NULL;
+       char *pszAddGetAttCountMemLog   = NULL;
+       char *pszAttCountSpeedLog = NULL;
+       int nCount = 0, nRet = 0, nLoopCount, nMMSAddGetAttachementFailCount = 0;
+
+       nRet = messages_create_message(MESSAGES_TYPE_MMS, &stHandleMMSMessage);
+       PRINT_RESULT(nRet, "messages_create_message");
+
+#if MEMORY_CHECK
+       pszAddGetAttCountMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAttCountSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+          MessagesGetMemAllocation();
+          MessagesGetTimeOfDay();
+          nRet = messages_mms_get_attachment_count(stHandleMMSMessage, &nCount);
+          MessagesExecutionDelay(pszAttCountSpeedLog);
+          if ( !bIsTelephonyFeatureMmsSupported )
+          {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][messages_ITC] messages_mms_get_attachment_count() returned %d(%s) error for unsupported MMS feature\\n", __LINE__, nRet, MessagesGetError(nRet));
+                               nMMSAddGetAttachementFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][messages_ITC] messages_mms_get_attachment_count failed for unsuported (http://tizen.org/feature/network.telephony.mms ) MMS telephony feature\\n", __LINE__);
+                       }
+                       continue;
+               }
+          PRINT_RESULT_LOOP(nRet, "messages_mms_get_attachment_count",nMMSAddGetAttachementFailCount);
+          MessagesGetMemStatus(pszAddGetAttCountMemLog);
+       }
+
+       nRet = messages_destroy_message (stHandleMMSMessage);
+       if (nRet == 0)
+       {
+               FPRINTF("[Line : %d][messages_ITC]messages_destroy_message passed\\n",__LINE__);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][messages_ITC]messages_destroy_message failed, error returned = %d(%s) \\n", __LINE__, nRet, MessagesGetError(nRet));
+       }
+       if (nMMSAddGetAttachementFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_mms_get_attachement_count_p failed for %d out of %d times\\n", __LINE__, nMMSAddGetAttachementFailCount, MAX_COUNT);
+               free (pszAddGetAttCountMemLog);
+               free (pszAttCountSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_mms_get_attachment_count, pszAttCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(MMS_GetAttachementCount, pszAddGetAttCountMemLog);
+#endif
+
+       free (pszAddGetAttCountMemLog);
+       free (pszAttCountSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Sets/Gets the subject of a message
+//& type: auto
+/**
+* @testcase                    ITc_messages_mms_set_get_subject_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets/Gets the subject of a message
+* @scenario                            Create MMS message\n
+*                                              Sets the subject of a message\n
+*                                              Gets the subject of a message
+* @apicovered                  messages_mms_set_subject, messages_mms_get_subject,
+* @passcase                            When messages_mms_set_subject and messages_mms_get_subject are successful.
+* @failcase                            If target API messages_mms_set_subject and messages_mms_get_subject are fails or any precondition API fails.
+* @precondition                        Message handle must be created
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_mms_set_get_subject_p(void)
+{
+       START_TEST_MMS;
+       bool bIsTelephonyFeatureMmsSupported = Messages_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE_MMS);
+       
+       messages_message_h stHandleMMSMessage = NULL;
+       char *pszSetGetSubjectMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       const char *pInputSubject = "mms message subject";
+       char *pSubject = NULL;
+       int nLoopCount, nRet = 0, nMMSAddGetAttachementFailCount = 0;
+
+       nRet = messages_create_message(MESSAGES_TYPE_MMS, &stHandleMMSMessage);
+       PRINT_RESULT(nRet, "messages_create_message");
+
+#if MEMORY_CHECK
+    pszSetGetSubjectMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+    pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+    pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_mms_set_subject(stHandleMMSMessage,pInputSubject);
+               MessagesExecutionDelay(pszSetSpeedLog);
+               if ( !bIsTelephonyFeatureMmsSupported )
+           {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][messages_ITC] messages_mms_set_subject() returned %d(%s) error for unsupported MMS feature\\n", __LINE__, nRet, MessagesGetError(nRet));
+                               nMMSAddGetAttachementFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][messages_ITC] messages_mms_set_subject failed for unsuported (http://tizen.org/feature/network.telephony.mms ) MMS telephony feature\\n", __LINE__);
+                       }
+                       continue;
+               }
+               PRINT_RESULT_LOOP(nRet, "messages_mms_set_subject",nMMSAddGetAttachementFailCount);
+               if ( NULL == pInputSubject )
+               {
+                       FPRINTF("[Line : %d][media-content_ITC] pSubject is NULL \\n",__LINE__);
+                       return 1;
+               }
+               MessagesGetTimeOfDay();
+               nRet = messages_mms_get_subject(stHandleMMSMessage, &pSubject);
+               MessagesExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_mms_get_subject", nMMSAddGetAttachementFailCount);
+               MessagesGetMemStatus(pszSetGetSubjectMemLog);
+               if ( NULL == pSubject )
+               {
+                       FPRINTF("[Line : %d][media-content_ITC] pSubject is NULL \\n",__LINE__);
+                       return 1;
+               }
+               if ( strcmp( pSubject, pInputSubject ) != 0 )
+               {
+                       FPRINTF("[Line : %d][messages_ITC] pSubject in messages_mms_get_subject is not same, as set \\n", __LINE__);
+                       nMMSAddGetAttachementFailCount++;
+               }
+
+               if ( pSubject != NULL )
+               {
+                       free(pSubject);
+                       pSubject = NULL;
+               }
+       }
+
+       nRet = messages_destroy_message (stHandleMMSMessage);
+       if (nRet == 0)
+       {
+               FPRINTF("[Line : %d][messages_ITC] messages_destroy_message passed\\n",__LINE__);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][messages_ITC]messages_destroy_message failed, error returned = %d(%s) \\n",__LINE__, nRet, MessagesGetError(nRet));
+       }
+
+       if (nMMSAddGetAttachementFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_mms_set_get_subject_p failed for %d out of %d times\\n", __LINE__, nMMSAddGetAttachementFailCount, MAX_COUNT);
+               free (pszSetGetSubjectMemLog);
+               free (pszSetSpeedLog);
+               free (pszGetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_mms_set_subject, pszSetSpeedLog);
+       PRINT_SPEED_LOG(messages_mms_get_subject, pszGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(MMS_GetSetSubjectCount, pszSetGetSubjectMemLog);
+#endif
+
+       free (pszSetGetSubjectMemLog);
+       free (pszSetSpeedLog);
+       free (pszGetSpeedLog);
+       return 0;
+}
+
+//& purpose: Removes all attachments from a MMS message
+//& type: auto
+/**
+* @testcase                    ITc_messages_mms_remove_all_attachments_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Removes all attachments from a MMS message
+* @scenario                            Create MMS message\n
+*                                              Removes all attachments from a MMS message
+* @apicovered                  messages_mms_remove_all_attachments
+* @passcase                            When messages_mms_remove_all_attachments is successful.
+* @failcase                            If target API messages_mms_remove_all_attachments is fails or any precondition API fails.
+* @precondition                        Message handle must be created
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_mms_remove_all_attachments_p(void)
+{
+       START_TEST_MMS;
+       bool bIsTelephonyFeatureMmsSupported = Messages_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE_MMS);
+               
+       messages_message_h stHandleMMSMessage = NULL;
+       char *pszRemoveAllMemLog = NULL;
+       char *pszRemoveAllSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nMMSAddGetAttachementFailCount = 0;
+
+       nRet = messages_create_message(MESSAGES_TYPE_MMS, &stHandleMMSMessage);
+       PRINT_RESULT(nRet, "messages_create_message");
+
+#if MEMORY_CHECK
+       pszRemoveAllMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszRemoveAllSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_mms_remove_all_attachments(stHandleMMSMessage);
+               MessagesExecutionDelay(pszRemoveAllSpeedLog);
+               if ( !bIsTelephonyFeatureMmsSupported )
+           {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][messages_ITC] messages_mms_remove_all_attachments() returned %d(%s) error for unsupported MMS feature\\n", __LINE__, nRet, MessagesGetError(nRet));
+                               nMMSAddGetAttachementFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][messages_ITC] messages_mms_remove_all_attachments failed for unsuported (http://tizen.org/feature/network.telephony.mms ) MMS telephony feature\\n", __LINE__);
+                       }
+                       continue;
+               }
+               PRINT_RESULT_LOOP(nRet, "messages_mms_remove_all_attachments",nMMSAddGetAttachementFailCount);  
+               MessagesGetMemStatus(pszRemoveAllMemLog);
+       }
+
+       nRet = messages_destroy_message (stHandleMMSMessage);
+       if (nRet == 0)
+       {
+               FPRINTF("[Line : %d][messages_ITC]messages_destroy_message passed\\n",__LINE__);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][messages_ITC]messages_destroy_message failed, error returned = %d (%s) \\n",__LINE__, nRet, MessagesGetError(nRet));
+       }
+
+       if (nMMSAddGetAttachementFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_mms_remove_all_attachments_p failed for %d out of %d times\\n", __LINE__, nMMSAddGetAttachementFailCount, MAX_COUNT);
+               free (pszRemoveAllMemLog);
+               free (pszRemoveAllSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_mms_remove_all_attachments, pszRemoveAllSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(MMS_RemoveAllCount, pszRemoveAllMemLog);
+#endif
+
+       free (pszRemoveAllMemLog);
+       free (pszRemoveAllSpeedLog);
+
+       return 0;
+}
+
+/** @} */ //end of itc-messages
+/** @} */ //end of itc-messages-testcases
\ No newline at end of file
diff --git a/src/itc/messages/ITs-messages.c b/src/itc/messages/ITs-messages.c
new file mode 100755 (executable)
index 0000000..c3515f3
--- /dev/null
@@ -0,0 +1,1402 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-messages-common.h"
+
+/** @addtogroup itc-messages
+* @ingroup             itc
+* @{
+*/
+
+messages_message_h g_pstHandleSMSMessage = NULL;
+messages_service_h g_pstHandleMessageService = NULL;
+bool g_bIsTelephonyFeatureSupported = false;
+bool g_bMessagesCreation = false;
+bool g_bMessageService = false;
+bool g_bMessagesCB = false;
+bool g_bFeatureMismatch = false;
+bool g_bFeatureNotSupported = false;
+struct timeval g_stMessagesStartTime;
+struct mallinfo g_stMessagesMemInfo;
+
+
+/**
+* @function            MessagesSearchCB
+* @description         Called when a message is retrieved from a search request
+* @parameter           msg : The message handle, index : The index of a message from the messages\n
+*                                      result_count : The count of the messages that have been retrieved, nTotal_count : The count of the messages\n
+*                                      data : The user data passed from the for each function
+* @return                      NA
+*/
+bool MessagesSearchCB(messages_message_h msg, int index, int result_count, int nTotal_count, void * data)
+{
+       g_bMessagesCB = true;
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+       return true;
+}
+
+/**
+* @function            MessagesSetMessageSentCB
+* @description         Called when the process of sending a message to all recipients is finished
+* @parameter           result : The result of message sending, user_data : The user data passed from the callback registration function
+* @return                      NA
+*/
+void MessagesSetMessageSentCB(messages_sending_result_e result, void *user_data)
+{
+       g_bMessagesCB = true;
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+}
+
+/**
+* @function            IncomingCB
+* @description         Called when an incoming message is received
+* @parameter           incoming_msg : An incoming message, data : The user data passed from the callback registration function
+* @return                      NA
+*/
+void IncomingCB(messages_message_h incoming_msg, void * data)
+{
+       g_bMessagesCB = true;
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+}
+
+/**
+* @function            PushCallback
+* @description         Called when an incoming push message is received
+* @parameter           header : The header of the push message\n
+*                                      body : The body of the push message (it is not a null-terminated string)\n
+*                                      body length : The length of body\n
+*                                      user : The user data to be passed to the callback function
+* @return                      NA
+*/
+static void PushCallback(const char *header, const char *body, int body_length, void* data)
+{
+       g_bMessagesCB = true;
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+}
+/**
+* @function            ITs_messages_startup
+* @description         Opens a handle for a messaging service and Creates a message handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_messages_startup(void)
+{
+       int nRet = 0;
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       g_bIsTelephonyFeatureSupported = true;
+       g_bFeatureMismatch = false;
+       g_bFeatureNotSupported = false;
+
+       g_bIsTelephonyFeatureSupported = Messages_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE);
+
+       nRet = messages_open_service(&g_pstHandleMessageService);
+       if ( !g_bIsTelephonyFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][messages_ITC] messages_open_service returned %s error for unsupported feature\\n", __LINE__, MessagesGetError(nRet));
+                       g_bFeatureMismatch = true;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][messages_ITC] messages_open_service correctly returned %s error for unsupported feature\\n", __LINE__, MessagesGetError(nRet));
+                       g_bFeatureNotSupported = true;
+               }
+               return;
+       }
+       if ( nRet == MESSAGES_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][messages_ITC] messages_open_service in startup passed\\n",__LINE__);
+               g_bMessageService = true;
+       }
+       else
+       {
+               FPRINTF("[Line : %d][messages_ITC]messages_open_service failed, error returned = %d(%s) \\n",__LINE__, nRet, MessagesGetError(nRet));
+               g_bMessageService = false;
+       }
+
+       nRet = messages_create_message(MESSAGES_TYPE_SMS, &g_pstHandleSMSMessage);
+       if ( nRet == MESSAGES_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][messages_ITC] message created successfully startup\\n",__LINE__);
+               g_bMessagesCreation = true;
+       }
+    else
+       {
+               FPRINTF("[Line : %d][messages_ITC] Unable to create message, error returned = %d(%s) \\n", __LINE__, nRet,MessagesGetError(nRet));
+               g_bMessagesCreation = false;
+       }
+       return;
+}
+
+/**
+* @function            ITs_messages_cleanup
+* @description         Close a handle for a messaging service and Destroy a message handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_messages_cleanup(void)
+{
+       int nRet = 0;
+       if ( g_bIsTelephonyFeatureSupported && g_bMessagesCreation )
+       {
+               nRet = messages_destroy_message(g_pstHandleSMSMessage);
+               if ( nRet == MESSAGES_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][messages_ITC]messages_destroy_message passed cleanUp\\n",__LINE__);
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][messages_ITC]messages_destroy_message failed, error returned = %d(%s) \\n", __LINE__, nRet,MessagesGetError(nRet));
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][messages_ITC]Message not created\\n", __LINE__);
+       }
+
+       if ( g_bMessageService )
+       {
+               nRet = messages_close_service(g_pstHandleMessageService);
+               if ( nRet == MESSAGES_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][messages_ITC]messages_close_service passed cleanUp\\n",__LINE__);
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][messages_ITC]messages_close_service failed, error returned = %d(%s) \\n",__LINE__, nRet,MessagesGetError(nRet));
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][messages_ITC]messages_open_service failed \\n", __LINE__);
+       }
+       g_pstHandleMessageService = NULL; 
+       
+       return;
+}
+
+/** @addtogroup        itc-messages-testcases
+* @brief               Integration testcases for module messages
+* @ingroup             itc-messages
+* @{
+*/
+
+//& purpose: Adds/Get a recipient's address to the message
+//& type: auto
+/**
+* @testcase                    ITc_messages_add_get_address_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Adds a recipient's address (phone number) to the message
+* @scenario                            Create SMS message\n
+*                                              Add recipient's address\n
+*                                              Get recipient's address
+* @apicovered                  messages_add_address, messages_get_address, messages_get_address_count, messages_remove_all_addresses
+* @passcase                            When messages_add_address, messages_get_address, messages_get_address_count and messages_remove_all_addresses are successful.
+* @failcase                            If target API messages_add_address, messages_get_address, messages_get_address_count and messages_remove_all_addresses are fails or any precondition API fails.
+* @precondition                        Message handle must be created, Change the [MOBILE_NUMBER] parameter in ITs-messages-common.h accordingly for [messages_add_address]
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_add_get_address_p(void)
+{
+       START_TEST;
+       messages_recipient_type_e recipient_type;
+       int nRet = 0, nLoopCount, nIndex=0, nNoOfRecipents = 23, nSMSFailCount = 0;
+       char *pAaddress=NULL;
+       char *pszAddGetAddressMemLog = NULL;
+       char *pszAddAddresspeedLog = NULL;
+       char *pszGetAddressSpeedLog = NULL;
+       char *pszAddressCountSpeedLog = NULL;
+       char *pszRemoveAddressSpeedLog = NULL;
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("MESSAGES_MOBILE_NUMBER", pszValue ))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [messages_ITC] Values Received = %s \\n", __LINE__, pszValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [messages_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+       messages_recipient_type_e eMessagesRecipientType[] = {
+               MESSAGES_RECIPIENT_UNKNOWN,
+               MESSAGES_RECIPIENT_TO,
+               MESSAGES_RECIPIENT_CC,
+               MESSAGES_RECIPIENT_BCC
+       };
+
+       int nEnumSize = sizeof(eMessagesRecipientType) / sizeof(eMessagesRecipientType[0]);
+       int nEnumCounter = 0;
+
+#if MEMORY_CHECK
+       pszAddGetAddressMemLog =  calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAddAddresspeedLog =  calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       pszGetAddressSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       pszAddressCountSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+       pszRemoveAddressSpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+
+       for ( nEnumCounter=0; nEnumCounter<nEnumSize; nEnumCounter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       char *szEnumVal = NULL;
+
+                       MessagesGetMemAllocation();
+                       MessagesGetTimeOfDay();
+                       nRet = messages_add_address(g_pstHandleSMSMessage, pszValue, eMessagesRecipientType[nEnumCounter] );
+                       MessagesExecutionDelay(pszAddAddresspeedLog);
+                       PRINT_RESULT_LOOP(nRet, "messages_add_address",nSMSFailCount);
+                       switch( eMessagesRecipientType[nEnumCounter] )
+                       {
+                               case MESSAGES_RECIPIENT_UNKNOWN : szEnumVal = "MESSAGES_RECIPIENT_UNKNOWN" ; break;
+                               case MESSAGES_RECIPIENT_TO : szEnumVal = "MESSAGES_RECIPIENT_TO" ; break;
+                               case MESSAGES_RECIPIENT_CC : szEnumVal = "MESSAGES_RECIPIENT_CC" ; break;
+                               case MESSAGES_RECIPIENT_BCC : szEnumVal = "MESSAGES_RECIPIENT_BCC" ; break;
+                       }
+                       if(nRet !=0)
+                       {
+                               FPRINTF("[Line : %d][messages_ITC] Failed for [ %d] times, for enum  = [ %s ][%d] \\n", __LINE__, nSMSFailCount, szEnumVal, eMessagesRecipientType[nEnumCounter]);
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][messages_ITC] for enum  = [ %s ][%d] \\n",__LINE__, szEnumVal,eMessagesRecipientType[nEnumCounter]);
+                       }
+                       MessagesGetTimeOfDay();
+                       nRet = messages_get_address(g_pstHandleSMSMessage, nIndex, &pAaddress, &recipient_type);
+                       MessagesExecutionDelay(pszGetAddressSpeedLog);
+                       PRINT_RESULT_LOOP(nRet, "messages_get_address",nSMSFailCount);
+
+                       MessagesGetTimeOfDay();
+                       nRet = messages_get_address_count(g_pstHandleSMSMessage, &nNoOfRecipents);
+                       MessagesExecutionDelay(pszAddressCountSpeedLog);
+                       PRINT_RESULT_LOOP(nRet, "messages_get_address_count",nSMSFailCount);
+
+                       MessagesGetTimeOfDay();
+                       nRet = messages_remove_all_addresses(g_pstHandleSMSMessage);
+                       MessagesExecutionDelay(pszRemoveAddressSpeedLog);
+                       PRINT_RESULT_LOOP(nRet, "messages_remove_all_addresses",nSMSFailCount);
+                       MessagesGetMemStatus(pszAddGetAddressMemLog);
+
+                       if(pAaddress != NULL)
+                       {
+                               free(pAaddress);
+                               pAaddress = NULL;
+                       }
+               }
+       }
+       if (nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_add_get_address_p failed for %d out of %d times\\n",__LINE__, nSMSFailCount, MAX_COUNT * nEnumSize);
+               free(pszAddGetAddressMemLog);
+               free(pszGetAddressSpeedLog);
+               free(pszAddAddresspeedLog);
+               free(pszAddressCountSpeedLog);
+               free(pszRemoveAddressSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_add_address, pszAddAddresspeedLog);
+       PRINT_SPEED_LOG(messages_get_address, pszGetAddressSpeedLog);
+       PRINT_SPEED_LOG(messages_get_address_count, pszAddressCountSpeedLog);
+       PRINT_SPEED_LOG(messages_remove_all_addresses, pszRemoveAddressSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(AddGetAddressCount, pszAddGetAddressMemLog);
+#endif
+
+       free(pszAddGetAddressMemLog);
+       free(pszGetAddressSpeedLog);
+       free(pszAddAddresspeedLog);
+       free(pszAddressCountSpeedLog);
+       free(pszRemoveAddressSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Gets the message box type of a message
+//& type: auto
+/**
+* @testcase                    ITc_messages_get_mboxType_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the message box type of a message
+* @scenario                            Create SMS message\n
+*                                              Gets the message box type of a message
+* @apicovered                  messages_get_mbox_type
+* @passcase                            When  messages_get_mbox_type is successful.
+* @failcase                            If target API messages_get_mbox_type fails or any precondition API fails.
+* @precondition                        Message handle must be created
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_get_mboxType_p(void)
+{
+       START_TEST;
+       char *pszGetTypeMemLog = NULL;
+       char *pszGetMboxTypeSpeedLog = NULL;
+       messages_message_box_e eBoxType;
+       int nRet = 0, nSMSFailCount = 0, nLoopCount;
+
+#if MEMORY_CHECK
+       pszGetTypeMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetMboxTypeSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_get_mbox_type(g_pstHandleSMSMessage, &eBoxType);
+               MessagesExecutionDelay(pszGetMboxTypeSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_get_mbox_type",nSMSFailCount);
+               MessagesGetMemStatus(pszGetTypeMemLog);
+       }
+       if (nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_get_mboxType_p failed for %d out of %d times\\n", __LINE__, nSMSFailCount, MAX_COUNT);
+               free (pszGetTypeMemLog);
+               free (pszGetMboxTypeSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_get_mbox_type, pszGetMboxTypeSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_messages_getMboxType_p, pszGetTypeMemLog);
+#endif
+
+       free (pszGetTypeMemLog);
+       free (pszGetMboxTypeSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Gets the message count in the specific message box
+//& type: auto
+/**
+* @testcase                    ITc_messages_get_message_count_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the message count in the specific message box
+* @scenario                            Create SMS message\n
+*                                              Gets the message count in the specific message box
+* @apicovered                  messages_get_message_count
+* @passcase                            When  messages_get_message_cout is successful.
+* @failcase                            If target API messages_get_message_count fails or any precondition API fails.
+* @precondition                        Message handle must be created
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_get_message_count_p(void)
+{
+       START_TEST;
+       char *pszGetMsgMemLog = NULL;
+       char *pszGetMsgCountSpeedLog = NULL;
+       int nCount = 0, nRet = 0, nLoopCount, nSMSFailCount = 0;
+
+#if MEMORY_CHECK
+       pszGetMsgMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetMsgCountSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_get_message_count(g_pstHandleMessageService, MESSAGES_MBOX_ALL, MESSAGES_TYPE_UNKNOWN, &nCount);
+               MessagesExecutionDelay(pszGetMsgCountSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_get_message_count",nSMSFailCount);
+               MessagesGetMemStatus(pszGetMsgMemLog);
+       }
+
+       if (nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_get_message_count_p failed for %d out of %d times\\n",__LINE__, nSMSFailCount, MAX_COUNT);
+               free (pszGetMsgMemLog);
+               free (pszGetMsgCountSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_get_message_count, pszGetMsgCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(GetMessageCount, pszGetMsgMemLog);
+#endif
+
+       free (pszGetMsgMemLog);
+       free (pszGetMsgCountSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Adds an additional listening port for the incoming SMS messages
+//& type: auto
+/**
+* @testcase                    ITc_messages_add_get_sms_listening_port_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the message count in the specific message box
+* @scenario                            Create SMS message\n
+*                                              Add listening port for the incoming SMS messages
+* @apicovered                  messages_add_sms_listening_port
+* @passcase                            When  messages_add_sms_listening_port is successful.
+* @failcase                            If target API messages_add_sms_listening_port fails or any precondition API fails.
+* @precondition                        Message handle must be created
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_add_get_sms_listening_port_p(void)
+{                      
+       START_TEST;
+       char *pszAddGetSmsListeningMemLog = NULL;
+       char *pszAddSmsListeningSpeedLog = NULL;
+       char *pszGetSmsListeningSpeedLog = NULL;
+       messages_service_h pstHandleMessageService = NULL;
+       int nAddPort = ADD_PORT;
+       int nGetPort = 0;
+       int nRet = 0, nLoopCount, nSMSFailCount = 0;
+
+#if MEMORY_CHECK
+       pszAddGetSmsListeningMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+    pszAddSmsListeningSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetSmsListeningSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               nRet = messages_open_service(&pstHandleMessageService);
+               PRINT_RESULT_LOOP(nRet, "messages_open_service",nSMSFailCount);
+
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_add_sms_listening_port(pstHandleMessageService, nAddPort);
+               MessagesExecutionDelay(pszAddSmsListeningSpeedLog);             
+               PRINT_RESULT_LOOP(nRet, "messages_add_sms_listening_port",nSMSFailCount);
+
+               MessagesGetTimeOfDay();
+               nRet =  messages_get_message_port(g_pstHandleSMSMessage, &nGetPort);
+               MessagesExecutionDelay(pszGetSmsListeningSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_get_message_port",nSMSFailCount);
+               MessagesGetMemStatus(pszAddGetSmsListeningMemLog);
+
+               nRet = messages_close_service(pstHandleMessageService);
+               PRINT_RESULT_LOOP(nRet, "messages_close_service",nSMSFailCount);
+       }
+
+       if (nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_add_get_sms_listening_port_p failed for %d out of %d times\\n", __LINE__, nSMSFailCount, MAX_COUNT);
+               free (pszGetSmsListeningSpeedLog);
+               free (pszAddSmsListeningSpeedLog);
+               free (pszAddGetSmsListeningMemLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_add_sms_listening_port, pszAddSmsListeningSpeedLog);
+       PRINT_SPEED_LOG(messages_get_message_port, pszGetSmsListeningSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(addGetSmsListeningPort, pszAddGetSmsListeningMemLog);
+#endif
+
+       free (pszGetSmsListeningSpeedLog);
+       free (pszAddSmsListeningSpeedLog);
+       free (pszAddGetSmsListeningMemLog);
+
+       return 0;
+}
+
+//& purpose: Gets the type of a message
+//& type: auto
+/**
+* @testcase                    ITc_messages_get_message_type_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the type of a message
+* @scenario                            Create SMS message\n
+*                                              Gets the message type
+* @apicovered                  messages_get_message_type
+* @passcase                            When  messages_get_message_type is successful.
+* @failcase                            If target API messages_get_message_type fails or any precondition API fails.
+* @precondition                        Message handle must be created
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_get_message_type_p(void)
+{
+       START_TEST;
+       char *pszGetMessageMemLog = NULL;
+       char *pszGetMessageTypeSpeedLog = NULL;
+       messages_message_type_e eMsgType;
+       int nRet = 0, nLoopCount, nSMSFailCount = 0;
+
+#if MEMORY_CHECK
+       pszGetMessageMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetMessageTypeSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_get_message_type(g_pstHandleSMSMessage, &eMsgType);
+               MessagesExecutionDelay(pszGetMessageTypeSpeedLog);
+               MessagesGetMemStatus(pszGetMessageMemLog);
+               PRINT_RESULT_LOOP(nRet, "messages_get_message_type",nSMSFailCount);
+       }
+
+       if (nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_get_message_type_p failed for %d out of %d times\\n", __LINE__, nSMSFailCount, MAX_COUNT);
+               free (pszGetMessageMemLog);
+               free (pszGetMessageTypeSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_get_message_type, pszGetMessageTypeSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(addGetMessageType, pszGetMessageMemLog);
+#endif
+
+       free (pszGetMessageMemLog);
+       free (pszGetMessageTypeSpeedLog);
+
+       return 0;
+
+}
+
+//& purpose: Sets/Gets the text of a message.
+//& type: auto
+/**
+* @testcase                    ITc_messages_set_get_text_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set and get the text of a message.
+* @scenario                            Create SMS message\n
+*                                              Sets message text\n
+*                                              Gets message text
+* @apicovered                  messages_set_text, messages_get_text
+* @passcase                            When  messages_set_text and messages_get_text are successful.
+* @failcase                            If target API messages_set_text and messages_get_text are fails or any precondition API fails.
+* @precondition                        Message handle must be created
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_set_get_text_p(void)
+{
+       START_TEST;
+       char *pszSetNGetTextMemLog = NULL;
+       char *pszSetTextSpeedLog = NULL;
+       char *pszGetTextSpeedLog = NULL;
+       const char *pText = "this is the text";
+       char* pTextget = NULL;
+       int nRet = 0, nLoopCount, nSMSFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetNGetTextMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetTextSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetTextSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_set_text(g_pstHandleSMSMessage, pText);
+               MessagesExecutionDelay(pszSetTextSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_set_text",nSMSFailCount);
+
+               MessagesGetTimeOfDay();
+               nRet = messages_get_text(g_pstHandleSMSMessage, &pTextget);
+               MessagesExecutionDelay(pszGetTextSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_get_text",nSMSFailCount);
+               MessagesGetMemStatus(pszSetNGetTextMemLog);
+
+               if ( NULL == pTextget )
+               {
+                       FPRINTF("[Line : %d] pTextget is NULL \\n",__LINE__);
+                       return 1;
+               }
+               if( strcmp( pTextget, pText ) != 0 )
+               {
+                       FPRINTF("[Line : %d][messages_ITC] pTextget in messages_get_text is not same, as set \\n", __LINE__);
+                       nSMSFailCount++;
+               }
+
+               if(pTextget != NULL)
+               {
+                       free(pTextget);
+                       pTextget = NULL;
+               }
+       }
+
+       if (nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_set_get_text_p failed for %d out of %d times\\n",__LINE__, nSMSFailCount, MAX_COUNT);
+               free (pszSetNGetTextMemLog);
+               free (pszGetTextSpeedLog);
+               free (pszSetTextSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_set_text, pszSetTextSpeedLog);
+       PRINT_SPEED_LOG(messages_get_text, pszGetTextSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(SetNGetText, pszSetNGetTextMemLog);
+#endif
+
+       free (pszSetNGetTextMemLog);
+       free (pszGetTextSpeedLog);
+       free (pszSetTextSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Gets the time of a message
+//& type: auto
+/**
+* @testcase                    ITc_messages_get_time_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the time of a message
+* @scenario                            Create SMS message\n
+*                                              Gets message time
+* @apicovered                  messages_set_text, messages_get_text
+* @passcase                            When messages_get_time is successful.
+* @failcase                            If target API messages_get_time fails or any precondition API fails.
+* @precondition                        Message handle must be created
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_get_time_p(void)
+{
+       START_TEST;
+       time_t stGetTime;
+       char *pszGetTimeMemLog = NULL;
+       char *pszGetTimeSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nSMSFailCount = 0;
+
+#if MEMORY_CHECK
+       pszGetTimeMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetTimeSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_get_time(g_pstHandleSMSMessage, &stGetTime);
+               MessagesExecutionDelay(pszGetTimeSpeedLog);             
+               MessagesGetMemStatus(pszGetTimeMemLog);
+               PRINT_RESULT_LOOP(nRet, "messages_get_time",nSMSFailCount);
+       }
+
+       if (nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_get_time_p failed for %d out of %d times\\n",__LINE__, nSMSFailCount, MAX_COUNT);
+               free (pszGetTimeMemLog);
+               free (pszGetTimeSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_get_time, pszGetTimeSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(get_time, pszGetTimeMemLog);
+#endif
+
+       free (pszGetTimeMemLog);
+       free (pszGetTimeSpeedLog);
+
+       return 0;
+
+}
+
+//& purpose: Set/Get the sim id of the sending message
+//& type: auto
+/**
+* @testcase                    ITc_messages_set_get_sim_id_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set/Get the sim id of the sending message
+* @scenario                            Create SMS message
+*                                              Set the sim id of the sending message
+*                                              Get the sim id of the sending message
+* @apicovered                  messages_set_sim_id, messages_get_sim_id
+* @passcase                            When  messages_set_sim_id, messages_get_sim_id is successful.
+* @failcase                            If target API messages_set_sim_id, messages_get_sim_id fails or any precondition API fails.
+* @precondition                        Message handle must be created
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_set_get_sim_id_p(void)
+{
+       START_TEST;
+       int nSetSimId = 1 , nGetSimId = -1;
+       char *pszGetTimeMemLog = NULL;
+       char *pszGetTextSpeedLog = NULL;
+       char *pszGetTimeSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nSMSFailCount = 0;
+
+#if MEMORY_CHECK
+       pszGetTimeMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetTimeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetTextSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_set_sim_id(g_pstHandleSMSMessage, nSetSimId);
+               MessagesExecutionDelay(pszGetTimeSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_set_sim_id",nSMSFailCount);
+
+               MessagesGetTimeOfDay();
+               nRet = messages_get_sim_id(g_pstHandleSMSMessage, &nGetSimId);
+               MessagesExecutionDelay(pszGetTextSpeedLog);
+               MessagesGetMemStatus(pszGetTimeMemLog);
+               PRINT_RESULT_LOOP(nRet, "messages_get_sim_id",nSMSFailCount);
+               FPRINTF("[Line : %d][messages_ITC] sim id = [%d]\n",__LINE__, nGetSimId);
+               if( nSetSimId != nGetSimId )
+               {
+                       FPRINTF("[Line : %d][messages_ITC] Sim id in ITc_messages_get_sim_id_p is not same, as set \\n", __LINE__);
+                       nSMSFailCount++;
+               }
+       }
+       if (nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_set_get_sim_id_p failed for %d out of %d times\\n",__LINE__, nSMSFailCount, MAX_COUNT);
+               free (pszGetTimeMemLog);
+               free (pszGetTextSpeedLog);
+               free (pszGetTimeSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_set_sim_id, pszGetTimeSpeedLog);
+       PRINT_SPEED_LOG(messages_get_sim_id, pszGetTextSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_messages_set_get_sim_id_p, pszGetTimeMemLog);
+#endif
+
+       free (pszGetTimeMemLog);
+       free (pszGetTextSpeedLog);
+       free (pszGetTimeSpeedLog);
+
+       return 0;
+}
+//& purpose: Registers a callback to be invoked when a WAP Push message is received
+//& type: auto
+/**
+* @testcase                    ITc_messages_push_add_remove_incoming_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback to be invoked when a WAP Push message is received
+* @scenario                            handle for a messaging service\n
+*                                              Registers a callback to be invoked when a WAP Push message is received
+* @apicovered                  messages_push_add_incoming_cb
+* @passcase                            When messages_push_add_incoming_cb
+* @failcase                            If target API messages_push_add_incoming_cb fails or any precondition API fails.
+* @precondition                        Message service handle must be created,
+* @postcondition               Message service handle must be released
+*/
+int ITc_messages_push_add_remove_incoming_cb_p(void)
+{              
+       START_TEST;
+       int nRet = 0, nLoopCount, nSMSFailCount = 0;
+       char *pszPushAddCBMemLog = NULL;
+       char *pszPushAddCBSpeedLog = NULL;
+       char *pszPushRemoveCBSpeedLog = NULL;
+
+#if MEMORY_CHECK
+       pszPushAddCBMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszPushAddCBSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPushRemoveCBSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_push_add_incoming_cb(g_pstHandleMessageService, PUSH_TEST_APP_ID, PushCallback, NULL);
+               MessagesExecutionDelay(pszPushAddCBSpeedLog);                           
+               PRINT_RESULT_LOOP(nRet, "messages_push_add_incoming_cb",nSMSFailCount);
+
+               MessagesGetTimeOfDay();
+               nRet = messages_push_remove_incoming_cb(g_pstHandleMessageService, PUSH_TEST_APP_ID);
+               MessagesExecutionDelay(pszPushRemoveCBSpeedLog);                
+               MessagesGetMemStatus(pszPushAddCBMemLog);               
+               PRINT_RESULT_LOOP(nRet, "messages_push_remove_incoming_cb",nSMSFailCount);
+       }
+       if(nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_push_add_remove_incoming_cb_p failed for %d out of %d times\\n", __LINE__, nSMSFailCount, MAX_COUNT);           free (pszPushAddCBSpeedLog);
+               free (pszPushAddCBMemLog);
+               free (pszPushRemoveCBSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_push_add_incoming_cb, pszPushAddCBSpeedLog);
+       PRINT_SPEED_LOG(messages_push_remove_incoming_cb, pszPushRemoveCBSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_messages_push_add_remove_incoming_cb_p, pszPushAddCBMemLog);
+#endif
+
+       free (pszPushAddCBSpeedLog);
+       free (pszPushRemoveCBSpeedLog);
+       free (pszPushAddCBMemLog);
+       return 0;
+}
+
+//& purpose: Registers/Deregister an application to the mapping table of the WAP Push service
+//& type: auto
+/**
+* @testcase                    ITc_messages_push_register_deregister_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers/Deregister an application to the mapping table of the WAP Push service
+* @scenario                            handle for a messaging service\n
+*                                              Registers an application to the mapping table of the WAP Push service\n
+*                                              Deregister an application to the mapping table of the WAP Push service
+* @apicovered                  messages_push_register
+* @passcase                            When messages_push_register 
+* @failcase                            If target API messages_push_register fails or any precondition API fails.
+* @precondition                        Message service handle must be created,
+* @postcondition               Message service handle must be released
+*/
+int ITc_messages_push_register_deregister_p(void)
+{      
+       START_TEST;
+       int nRet = 0, nLoopCount, nSMSFailCount = 0;
+       char *pszPushRegisterMemLog = NULL;
+       char *pszPushRegisterSpeedLog = NULL;
+       char *pszPushDeregisterSpeedLog = NULL; 
+                                  
+#if MEMORY_CHECK               
+       pszPushRegisterMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif 
+#if SPEED_CHECK        
+       pszPushRegisterSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));  
+       pszPushDeregisterSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));        
+#endif
+       
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {       
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay(); 
+               nRet = messages_push_register(g_pstHandleMessageService, PUSH_TEST_CONTENT_TYPE, PUSH_TEST_APP_ID);             
+               MessagesExecutionDelay(pszPushRegisterSpeedLog);
+               MessagesGetMemStatus(pszPushRegisterMemLog);
+               PRINT_RESULT_LOOP(nRet, "messages_push_register",nSMSFailCount);        
+               
+               MessagesGetTimeOfDay(); 
+               nRet = messages_push_deregister(g_pstHandleMessageService, PUSH_TEST_CONTENT_TYPE, PUSH_TEST_APP_ID);           
+               MessagesExecutionDelay(pszPushDeregisterSpeedLog);
+               MessagesGetMemStatus(pszPushRegisterMemLog);            
+               PRINT_RESULT_LOOP(nRet, "messages_push_deregister",nSMSFailCount);      
+       }
+       if (nSMSFailCount > 0 )
+       {
+               printf("[messages_ITC] ITc_messages_push_register_deregister_p failed for %d out of %d times\n", nSMSFailCount, MAX_COUNT);
+               free (pszPushRegisterSpeedLog);
+               free (pszPushDeregisterSpeedLog);
+               free (pszPushRegisterMemLog);   
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_push_register, pszPushRegisterSpeedLog);                       
+       PRINT_SPEED_LOG(messages_push_deregister, pszPushDeregisterSpeedLog);           
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_messages_push_register_deregister_p, pszPushRegisterMemLog);
+#endif
+
+       free (pszPushRegisterSpeedLog);
+       free (pszPushDeregisterSpeedLog);
+       free (pszPushRegisterMemLog);   
+       return 0;       
+}
+
+//& purpose: Re-registers an application to the mapping table of the WAP Push service
+//& type: auto
+/**
+* @testcase                    ITc_messages_push_reregister_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Re-registers an application to the mapping table of the WAP Push service
+* @scenario                            handle for a messaging service\n
+*                                              Re-registers an application to the mapping table of the WAP Push service
+* @apicovered                  messages_push_reregister
+* @passcase                            When messages_push_reregister 
+* @failcase                            If target API messages_push_reregister fails or any precondition API fails.
+* @precondition                        Message service handle must be created,
+* @postcondition               Message service handle must be released
+*/
+int ITc_messages_push_reregister_p(void)
+{      
+       START_TEST;
+       int nRet = 0, nLoopCount, nSMSFailCount = 0;
+       char *pszPushReregisterMemLog = NULL;
+       char *pszPushReregisterSpeedLog = NULL;
+               
+#if MEMORY_CHECK               
+       pszPushReregisterMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif 
+#if SPEED_CHECK        
+       pszPushReregisterSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));        
+#endif
+       
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {       
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay(); 
+               nRet = messages_push_reregister(g_pstHandleMessageService, PUSH_TEST_CONTENT_TYPE, PUSH_TEST_APP_ID, PUSH_TEST_CONTENT_TYPE, PUSH_TEST_APP_ID);         
+               MessagesExecutionDelay(pszPushReregisterSpeedLog);
+               MessagesGetMemStatus(pszPushReregisterMemLog);
+               PRINT_RESULT_LOOP(nRet, "messages_push_reregister",nSMSFailCount);      
+       }
+       if (nSMSFailCount > 0 )
+       {
+               printf("[messages_ITC] ITc_messages_push_reregister_p failed for %d out of %d times\n", nSMSFailCount, MAX_COUNT);
+               free (pszPushReregisterSpeedLog);
+               free (pszPushReregisterMemLog); 
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_push_reregister, pszPushReregisterSpeedLog);                   
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_messages_push_reregister_p, pszPushReregisterMemLog);
+#endif
+
+       free (pszPushReregisterSpeedLog);
+       free (pszPushReregisterMemLog); 
+       return 0;       
+}
+
+
+//& purpose: Send message.
+//& type: Manual
+/**
+* @testcase                    ITc_messages_send_message_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Send message
+* @scenario                            Add recipient address\n
+*                                              Set message text\n
+*                                              Send message\n
+*                                              Set message incoming callback\n
+*                                              Check callback\n
+*                                              Unset message incoming callback
+* @apicovered                  messages_add_address, messages_set_text, messages_send_message, messages_set_message_incoming_cb, messages_unset_message_incoming_cb
+* @passcase                            When messages_send_message, messages_set_message_incoming_cb and  messages_unset_message_incoming_cb are successful.
+* @failcase                            If target API messages_add_address,  messages_set_message_incoming_cb or messages_unset_message_incoming_cb fails or any precondition API fails.
+* @precondition                        Message handle must be created, message recipient and text must be set
+*                                              Change the [MOBILE_NUMBER] parameter in ITs-messages-common.h accordingly for [messages_add_address]
+* @postcondition               Message handle must be released
+*/
+
+int ITc_messages_send_message_p(void)
+{              
+       START_TEST;
+       char *pszSendMessageMemLog = NULL;
+       char *pszAddAddressSpeedLog = NULL;
+       char *pszSetTextSpeedLog = NULL;
+       char *pszSendMessageSpeedLog = NULL;
+       char *pszSetMessageSpeedLog = NULL;
+       char *pszUnsetMessageSpeedLog = NULL;
+       const char* pData = "CALL BACK FOR INCOMING MMS";
+       const char *pMsgText = "Test Message Text";
+       int nRet = 0, nLoopCount, nSMSFailCount = 0, nTimeoutId = 0;
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("MESSAGES_MOBILE_NUMBER", pszValue))
+       {
+               FPRINTF("[Line : %d] [messages_ITC] Values Received = %s \\n", __LINE__, pszValue);
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [messages_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszSendMessageMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAddAddressSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszSetTextSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszSendMessageSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszSetMessageSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetMessageSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bMessagesCB = false;
+
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_add_address(g_pstHandleSMSMessage, pszValue, MESSAGES_RECIPIENT_TO);
+               MessagesExecutionDelay(pszAddAddressSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_add_address",nSMSFailCount);
+
+               MessagesGetTimeOfDay();
+               nRet = messages_set_text(g_pstHandleSMSMessage, pMsgText);
+               MessagesExecutionDelay(pszSetTextSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_set_text",nSMSFailCount);
+
+               MessagesGetTimeOfDay();
+               nRet = messages_set_message_incoming_cb(g_pstHandleMessageService, IncomingCB, (void*)pData);
+               PRINT_RESULT_LOOP(nRet, "messages_set_message_incoming_cb",nSMSFailCount);
+               MessagesExecutionDelay(pszSetMessageSpeedLog);          
+
+               nRet = messages_set_sim_id(g_pstHandleSMSMessage, 1);
+               PRINT_RESULT_LOOP(nRet, "messages_set_sim_id",nSMSFailCount);
+
+               g_bMessagesCB = false;
+               MessagesGetTimeOfDay();
+               nRet = messages_send_message(g_pstHandleMessageService, g_pstHandleSMSMessage, true, MessagesSetMessageSentCB, NULL);
+               MessagesExecutionDelay(pszSendMessageSpeedLog);         
+               RUN_POLLING_LOOP;
+               PRINT_RESULT_LOOP(nRet, "messages_send_message",nSMSFailCount);
+               
+               if(g_bMessagesCB == false)
+               {
+                       FPRINTF("[Line : %d][messages_ITC] MessagesSetMessageSentCB failed \\n", __LINE__);
+                       nSMSFailCount++;
+                       continue;
+               }
+
+               MessagesGetTimeOfDay();
+               nRet = messages_unset_message_incoming_cb(g_pstHandleMessageService);
+               MessagesExecutionDelay(pszUnsetMessageSpeedLog);                
+               MessagesGetMemStatus(pszSendMessageMemLog);
+               PRINT_RESULT_LOOP(nRet, "messages_unset_message_incoming_cb",nSMSFailCount);
+       }
+       if (nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_send_message_p failed for %d out of %d times\\n",__LINE__, nSMSFailCount, MAX_COUNT);
+               free (pszSendMessageMemLog);
+               free (pszAddAddressSpeedLog);
+               free (pszSetTextSpeedLog);
+               free (pszSendMessageSpeedLog);
+               free (pszSetMessageSpeedLog);
+               free (pszUnsetMessageSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_add_address, pszAddAddressSpeedLog);
+       PRINT_SPEED_LOG(messages_set_text, pszSetTextSpeedLog);
+       PRINT_SPEED_LOG(messages_send_message, pszSendMessageSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(MessagesSend, pszSendMessageMemLog);
+#endif
+
+       free (pszSendMessageMemLog);
+       free (pszAddAddressSpeedLog);
+       free (pszSetTextSpeedLog);
+       free (pszSendMessageSpeedLog);
+       free (pszSetMessageSpeedLog);
+       free (pszUnsetMessageSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Search message/by ID and free message array
+//& type: auto
+/**
+* @testcase                    ITc_messages_search_getid_searchbyid_freemessage_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Search message, search message by id and free message array
+* @scenario                            Add recipient address\n
+*                                              Search message\n
+*                                              Get message ID\n
+*                                              Search message by id\n
+*                                              Destroy used message handle in search message\n
+*                                              Free message by ID
+* @apicovered                  messages_search_message, messages_get_message_id, messages_search_message_by_id, messages_destroy_message, messages_free_message_array
+* @passcase                            When messages_search_message, messages_get_message_id, messages_search_message_by_id,\n
+*                                              messages_destroy_message and messages_free_message_array are successful.
+* @failcase                            If target API or any supporting API fails.
+* @precondition                        Message handle and message service handle must be created\n
+*                                              Change the [MOBILE_NUMBER] parameter in ITs-messages-common.h accordingly for [messages_add_address]
+* @postcondition               Message handle and message service handle must be released
+*/
+int ITc_messages_search_getid_searchbyid_freemessage_p(void)
+{      
+       START_TEST;
+       messages_message_h stHandleSMSMessage = NULL;
+       char *pszMessageSearchMemLog = NULL;
+       char *pszSearchMessageSpeedLog = NULL;
+       char *pszGetMessageIdSpeedLog = NULL;
+       char *pszSearchByMessageIdSpeedLog = NULL;
+       char *pszFreeMessageArraySpeedLog = NULL;
+       char *pszDestroyMessageSpeedLog = NULL;
+       const char *pKeyword = "Test";
+       const char *pMsgText = "Test Message Text 1";
+       messages_message_h *pSearched_message_array = NULL;
+       int nSearched_message_length = 0, nTotalMsg = 0, nId=0;
+       int nRet = 0, nLoopCount, nSMSFailCount = 0;
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+
+       if(true == GetValueFromConfigFile("MESSAGES_MOBILE_NUMBER", pszValue))
+       {
+               FPRINTF("[Line : %d] [messages_ITC] Values Received = %s \\n", __LINE__, pszValue);
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [messages_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       nRet = messages_add_address(g_pstHandleSMSMessage, pszValue, MESSAGES_RECIPIENT_TO);
+       PRINT_RESULT(nRet, "messages_add_address");
+
+       nRet = messages_set_text(g_pstHandleSMSMessage, pMsgText);
+       PRINT_RESULT(nRet, "messages_set_text");
+
+       nRet = messages_set_message_incoming_cb(g_pstHandleMessageService, IncomingCB, NULL);
+       PRINT_RESULT(nRet, "messages_set_message_incoming_cb");
+
+       nRet = messages_set_sim_id(g_pstHandleSMSMessage, 1);
+       PRINT_RESULT(nRet, "messages_set_sim_id");
+
+       nRet = messages_send_message(g_pstHandleMessageService, g_pstHandleSMSMessage, true, MessagesSetMessageSentCB, NULL);
+       usleep(3000000);
+       PRINT_RESULT(nRet, "messages_send_message");
+       
+       char *pszSearchValue = strdup(pszValue + 4);
+       FPRINTF("[Line : %d][messages_ITC] Search message recipient = %s \\n",__LINE__, pszSearchValue);
+
+
+#if MEMORY_CHECK
+       pszMessageSearchMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSearchMessageSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetMessageIdSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszSearchByMessageIdSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszFreeMessageArraySpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszDestroyMessageSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               MessagesGetMemAllocation();
+
+               MessagesGetTimeOfDay();
+               nRet = messages_search_message(g_pstHandleMessageService, MESSAGES_MBOX_ALL, MESSAGES_TYPE_UNKNOWN, pKeyword, pszSearchValue, 0, 0,
+                                                                                       &pSearched_message_array, &nSearched_message_length, &nTotalMsg);
+               MessagesExecutionDelay(pszSearchMessageSpeedLog);
+               MessagesGetTimeOfDay();
+               PRINT_RESULT_LOOP(nRet, "messages_search_message",nSMSFailCount);               
+
+               if( nSearched_message_length <= 0 )
+               {
+                       FPRINTF("[Line : %d][messages_ITC] There is no message in message Array[] \\n", __LINE__);
+                       nSMSFailCount++;
+                       continue;
+               }
+
+               MessagesGetTimeOfDay();
+               nRet = messages_get_message_id(pSearched_message_array[0], &nId);
+               MessagesExecutionDelay(pszGetMessageIdSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_get_message_id",nSMSFailCount);
+               FPRINTF("[Line : %d][messages_ITC] message id is = %d \\n",__LINE__, nId);
+
+               MessagesGetTimeOfDay();
+               nRet = messages_search_message_by_id(g_pstHandleMessageService, nId, &stHandleSMSMessage);
+               MessagesExecutionDelay(pszSearchByMessageIdSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_search_message_by_id",nSMSFailCount);
+               
+               MessagesGetTimeOfDay();
+               nRet = messages_free_message_array(pSearched_message_array);
+               MessagesExecutionDelay(pszFreeMessageArraySpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_free_message_array",nSMSFailCount);
+
+               MessagesGetTimeOfDay();
+               nRet = messages_destroy_message(stHandleSMSMessage);
+               MessagesExecutionDelay(pszDestroyMessageSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "messages_destroy_message",nSMSFailCount);
+
+               MessagesGetMemStatus(pszMessageSearchMemLog);
+       }
+
+       if (nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_search_getid_searchbyid_freemessage_p failed for %d out of %d times\\n", __LINE__, nSMSFailCount, MAX_COUNT);
+               free (pszMessageSearchMemLog);
+               free (pszSearchMessageSpeedLog);
+               free (pszGetMessageIdSpeedLog);
+               free (pszSearchByMessageIdSpeedLog);
+               free (pszFreeMessageArraySpeedLog);
+               free (pszDestroyMessageSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_search_message, pszSearchMessageSpeedLog);
+       PRINT_SPEED_LOG(messages_get_message_id, pszGetMessageIdSpeedLog);
+       PRINT_SPEED_LOG(messages_search_message_by_id, pszSearchByMessageIdSpeedLog);
+       PRINT_SPEED_LOG(messages_free_message_array, pszFreeMessageArraySpeedLog);
+       PRINT_SPEED_LOG(messages_destroy_message, pszDestroyMessageSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(MessagesSearch, pszMessageSearchMemLog);
+#endif
+
+       free (pszMessageSearchMemLog);
+       free (pszSearchMessageSpeedLog);
+       free (pszGetMessageIdSpeedLog);
+       free (pszSearchByMessageIdSpeedLog);
+       free (pszFreeMessageArraySpeedLog);
+       free (pszDestroyMessageSpeedLog);
+
+       return 0;
+}
+
+
+//& purpose: Retrieves the found messages
+//& type: auto
+/**
+* @testcase                    ITc_messages_foreach_message_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Send message
+* @scenario                            Create message handle\n
+*                                              Retrieves the found messages by invoking the given callback function iteratively
+* @apicovered                  messages_foreach_message
+* @passcase                            When messages_send_message is successful.
+* @failcase                            If target API messages_add_address fails or any precondition API fails.
+* @precondition                        Message handle must be created, message recipient and text must be successful,\n
+*                                              Change the [MOBILE_NUMBER] parameter in ITs-messages-common.h accordingly for [messages_add_address]
+* @postcondition               Message handle must be released
+*/
+int ITc_messages_foreach_message_p(void)
+{              
+       START_TEST;
+       char *pszForEachMessageMemLog = NULL;
+       char *pszForEachMessageSpeedLog = NULL;
+       int nRet = 0, nLoopCount, nSMSFailCount = 0, nTimeoutId = 0;
+       const char *pKeyWord = "test";
+       const char *pMsgText = "Test Message Text 1";
+       char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("MESSAGES_MOBILE_NUMBER", pszValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [messages_ITC] Values Received = %s \\n", __LINE__, pszValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [messages_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       nRet = messages_add_address(g_pstHandleSMSMessage, pszValue, MESSAGES_RECIPIENT_TO);
+       PRINT_RESULT(nRet, "messages_add_address");
+
+       nRet = messages_set_text(g_pstHandleSMSMessage, pMsgText);
+       PRINT_RESULT(nRet, "messages_set_text");
+
+       nRet = messages_set_message_incoming_cb(g_pstHandleMessageService, IncomingCB, NULL);
+       PRINT_RESULT(nRet, "messages_set_message_incoming_cb");
+
+       nRet = messages_set_sim_id(g_pstHandleSMSMessage, 1);
+       PRINT_RESULT(nRet, "messages_set_sim_id");
+
+       nRet = messages_send_message(g_pstHandleMessageService, g_pstHandleSMSMessage, true, MessagesSetMessageSentCB, NULL);
+       usleep(3000000);        
+       PRINT_RESULT(nRet, "messages_send_message");
+
+#if MEMORY_CHECK
+       pszForEachMessageMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszForEachMessageSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bMessagesCB = false;
+               MessagesGetMemAllocation();
+               MessagesGetTimeOfDay();
+               nRet = messages_foreach_message(g_pstHandleMessageService, MESSAGES_MBOX_ALL, MESSAGES_TYPE_UNKNOWN, pKeyWord, pszValue, 0, 1, MessagesSearchCB, NULL);
+               MessagesExecutionDelay(pszForEachMessageSpeedLog);              
+               MessagesGetMemStatus(pszForEachMessageMemLog);
+               PRINT_RESULT_LOOP(nRet, "messages_foreach_message",nSMSFailCount);
+               RUN_POLLING_LOOP;
+               if(!g_bMessagesCB)
+               {
+                       FPRINTF("[Line : %d][messages_ITC] Callback [MessagesSearchCB] failed \\n", __LINE__);
+                       nSMSFailCount++;
+               }
+       }
+       if (nSMSFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][messages_ITC] ITc_messages_foreach_message_p failed for %d out of %d times\\n",__LINE__, nSMSFailCount, MAX_COUNT);
+               free (pszForEachMessageMemLog);
+               free (pszForEachMessageSpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(messages_foreach_message, pszForEachMessageSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(foreach_message, pszForEachMessageMemLog);
+#endif
+       free (pszForEachMessageMemLog);
+       free (pszForEachMessageSpeedLog);
+       return 0;
+}
+
+/** @} */ //end of itc-messages
+/** @} */ //end of itc-messages-testcases
diff --git a/src/itc/messages/Image.jpg b/src/itc/messages/Image.jpg
new file mode 100755 (executable)
index 0000000..7a15f14
Binary files /dev/null and b/src/itc/messages/Image.jpg differ
diff --git a/src/itc/messages/tct-messages-native.c b/src/itc/messages/tct-messages-native.c
new file mode 100755 (executable)
index 0000000..6965a6b
--- /dev/null
@@ -0,0 +1,134 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-messages-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+                       
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/messages/tct-messages-native.h b/src/itc/messages/tct-messages-native.h
new file mode 100755 (executable)
index 0000000..8e1fb33
--- /dev/null
@@ -0,0 +1,67 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_MESSAGES_NATIVE_H__
+#define __TCT_MESSAGES_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_messages_mms_startup(void);
+extern void ITs_messages_mms_cleanup(void);
+extern void ITs_messages_startup(void);
+extern void ITs_messages_cleanup(void);
+
+extern int ITc_messages_mms_add_get_attachement_p(void);
+extern int ITc_messages_mms_get_attachement_count_p(void);
+extern int ITc_messages_mms_set_get_subject_p(void);
+extern int ITc_messages_mms_remove_all_attachments_p(void);
+extern int ITc_messages_add_get_address_p(void);
+extern int ITc_messages_get_mboxType_p(void);
+extern int ITc_messages_get_message_count_p(void);
+extern int ITc_messages_add_get_sms_listening_port_p(void);
+extern int ITc_messages_get_message_type_p(void);
+extern int ITc_messages_set_get_text_p(void);
+extern int ITc_messages_get_time_p(void);
+extern int ITc_messages_set_get_sim_id_p(void);
+extern int ITc_messages_push_add_remove_incoming_cb_p(void);
+extern int ITc_messages_push_register_deregister_p(void);
+extern int ITc_messages_push_reregister_p(void);
+extern int ITc_messages_send_message_p(void);
+extern int ITc_messages_search_getid_searchbyid_freemessage_p(void);
+extern int ITc_messages_foreach_message_p(void);
+
+testcase tc_array[] = {
+    {"ITc_messages_mms_add_get_attachement_p", ITc_messages_mms_add_get_attachement_p, ITs_messages_mms_startup, ITs_messages_mms_cleanup},
+    {"ITc_messages_mms_get_attachement_count_p", ITc_messages_mms_get_attachement_count_p, ITs_messages_mms_startup, ITs_messages_mms_cleanup},
+    {"ITc_messages_mms_set_get_subject_p", ITc_messages_mms_set_get_subject_p, ITs_messages_mms_startup, ITs_messages_mms_cleanup},
+    {"ITc_messages_mms_remove_all_attachments_p", ITc_messages_mms_remove_all_attachments_p, ITs_messages_mms_startup, ITs_messages_mms_cleanup},
+    {"ITc_messages_add_get_address_p", ITc_messages_add_get_address_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_get_mboxType_p", ITc_messages_get_mboxType_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_get_message_count_p", ITc_messages_get_message_count_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_add_get_sms_listening_port_p", ITc_messages_add_get_sms_listening_port_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_get_message_type_p", ITc_messages_get_message_type_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_set_get_text_p", ITc_messages_set_get_text_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_get_time_p", ITc_messages_get_time_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_set_get_sim_id_p", ITc_messages_set_get_sim_id_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_push_add_remove_incoming_cb_p", ITc_messages_push_add_remove_incoming_cb_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_push_register_deregister_p", ITc_messages_push_register_deregister_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_push_reregister_p", ITc_messages_push_reregister_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_send_message_p", ITc_messages_send_message_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_search_getid_searchbyid_freemessage_p", ITc_messages_search_getid_searchbyid_freemessage_p, ITs_messages_startup, ITs_messages_cleanup},
+    {"ITc_messages_foreach_message_p", ITc_messages_foreach_message_p, ITs_messages_startup, ITs_messages_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_MESSAGES_NATIVE_H__
diff --git a/src/itc/metadata-extractor/CMakeLists.txt b/src/itc/metadata-extractor/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..95fbb41
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "metadata-extractor")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-metadata-extractor")
+SET(TC_SOURCES
+       ITs-metadata-extractor-common.c
+       ITs-metadata-extractor.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-appfw-application
+       bundle
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/metadata-extractor/ITs-metadata-extractor-common.c b/src/itc/metadata-extractor/ITs-metadata-extractor-common.c
new file mode 100755 (executable)
index 0000000..b9fceb3
--- /dev/null
@@ -0,0 +1,311 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-metadata-extractor-common.h"
+
+/** @addtogroup itc-metadata-extractor
+* @ingroup             itc
+* @{
+*/
+
+extern struct timeval g_stMetadataExtractorStartTime;
+extern struct mallinfo g_stMetadataExtractorMemInfo;
+extern metadata_extractor_h g_hMetadataExtractorHandle;
+
+//Add helper function definitions here
+
+/**
+* @function            MetadataExtractorGetDataPath
+* @description         Returns the application data path
+* @parameter           pAppDataPath: application data path
+* @return                      true if succeed else false
+*/
+bool MetadataExtractorGetDataPath(char* pAppDataPath)
+{
+       if ( NULL == pAppDataPath )
+       {
+               FPRINTF( "[Line : %d] [Meatadata_Extractor_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if ( NULL == pPath )
+       {
+               FPRINTF( "[Line : %d] [Meatadata_Extractor_ITc] Unable to get application data path; app_get_data_path returned null value \\n", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF( "[Line : %d] [Meatadata_Extractor_ITc] application data path returned = %s\\n", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+/**
+* @function            MetadataExtractorAppendToAppDataPath
+* @description         Appends the input string to application data path
+* @parameter           pInputPath: path to append to data path; pFinalPath: final resultant path
+* @return                      true if succeed else false
+*/
+bool MetadataExtractorAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if ( NULL == pInputPath || NULL == pFinalPath )
+       {
+               FPRINTF( "[Line : %d] [Meatadata_Extractor_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if(false == MetadataExtractorGetDataPath(pAppDataPath))
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+       
+       FPRINTF( "[Line : %d] [Meatadata_Extractor_ITc] result path returned = %s\\n", __LINE__, pFinalPath);
+
+       return true;
+}
+
+/**
+* @function            ExtractorGetError
+* @description         Maps error enums to string values
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* Metadata_ExtractorGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case METADATA_EXTRACTOR_ERROR_NONE:                             szErrorVal = "METADATA_EXTRACTOR_ERROR_NONE";                                   break;
+       case METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER:        szErrorVal = "METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER";              break;
+       case METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY:            szErrorVal = "METADATA_EXTRACTOR_ERROR_OUT_OF_MEMORY";                  break;
+       case METADATA_EXTRACTOR_ERROR_OPERATION_FAILED:         szErrorVal = "METADATA_EXTRACTOR_ERROR_OPERATION_FAILED";               break;
+       case METADATA_EXTRACTOR_ERROR_FILE_EXISTS:                      szErrorVal = "METADATA_EXTRACTOR_ERROR_FILE_EXISTS";                    break;
+       default:                                                                                        szErrorVal = "Unknown Error";                                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            Metadata_ExtractorGetEnumAttributeError
+* @description         get the string name of enum
+* @parameter           nVal: enum value
+* @return                      error string
+*/
+char* Metadata_ExtractorGetEnumAttributeString(int nVal)
+{
+       char *szString = NULL;
+       switch ( nVal )
+       {
+       case METADATA_DURATION:                                 szString = "METADATA_DURATION";                         break;
+       case METADATA_VIDEO_BITRATE:                    szString = "METADATA_VIDEO_BITRATE";            break;
+       case METADATA_VIDEO_FPS:                                szString = "METADATA_VIDEO_FPS";                        break;
+       case METADATA_VIDEO_WIDTH:                              szString = "METADATA_VIDEO_WIDTH";                      break;
+       case METADATA_VIDEO_HEIGHT:                     szString = "METADATA_VIDEO_HEIGHT";             break;
+       case METADATA_HAS_VIDEO:                                szString = "METADATA_HAS_VIDEO";                        break;
+       case METADATA_AUDIO_BITRATE:                    szString = "METADATA_AUDIO_BITRATE";            break;
+       case METADATA_AUDIO_CHANNELS:                   szString = "METADATA_AUDIO_CHANNELS";           break;
+       case METADATA_AUDIO_SAMPLERATE:                 szString = "METADATA_AUDIO_SAMPLERATE";         break;
+       case METADATA_HAS_AUDIO:                                szString = "METADATA_HAS_AUDIO";                        break;
+       case METADATA_ARTIST:                                   szString = "METADATA_ARTIST";                           break;
+       case METADATA_TITLE:                                    szString = "METADATA_TITLE";                            break;
+       case METADATA_ALBUM:                                    szString = "METADATA_ALBUM";                            break;
+       case METADATA_ALBUM_ARTIST:                     szString = "METADATA_ALBUM_ARTIST";                     break;
+       case METADATA_GENRE:                                    szString = "METADATA_GENRE";                            break;
+       case METADATA_AUTHOR:                                   szString = "METADATA_AUTHOR";                           break;
+       case METADATA_COPYRIGHT:                                szString = "METADATA_COPYRIGHT";                        break;
+       case METADATA_DATE:                                     szString = "METADATA_DATE";                             break;
+       case METADATA_DESCRIPTION:                              szString = "METADATA_DESCRIPTION";                      break;
+       case METADATA_COMMENT:                                  szString = "METADATA_COMMENT";                          break;
+       case METADATA_TRACK_NUM:                                szString = "METADATA_TRACK_NUM";                        break;
+       case METADATA_CLASSIFICATION:                   szString = "METADATA_CLASSIFICATION";           break;
+       case METADATA_RATING:                                   szString = "METADATA_RATING";                           break;
+       case METADATA_LONGITUDE:                                szString = "METADATA_LONGITUDE";                        break;
+       case METADATA_LATITUDE:                                 szString = "METADATA_LATITUDE";                         break;
+       case METADATA_ALTITUDE:                                 szString = "METADATA_ALTITUDE";                         break;
+       case METADATA_CONDUCTOR:                                szString = "METADATA_CONDUCTOR";                        break;
+       case METADATA_UNSYNCLYRICS:                     szString = "METADATA_UNSYNCLYRICS";             break;
+       case METADATA_SYNCLYRICS_NUM:                   szString = "METADATA_SYNCLYRICS_NUM";           break;
+       case METADATA_RECDATE:                                  szString = "METADATA_RECDATE";                          break;
+       case METADATA_ROTATE:                                   szString = "METADATA_ROTATE";                           break;
+       }
+
+       return szString;
+}
+
+/**
+ * @function           Metadata_Extractor_SetPath_Audio
+ * @description                set file path for audio file
+ * @parameter          NA
+ * @return                     NA
+ */
+bool Metadata_Extractor_SetPath_Audio(void)
+{
+       char szAudioFilePath[PATH_LEN] = {0,};
+       if(false == MetadataExtractorAppendToAppDataPath(MEDIA_AUDIO_PATH, szAudioFilePath))
+       {
+               FPRINTF( "[Line : %d] [Meatadata_Extractor_ITc] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+
+       bool nRet = metadata_extractor_set_path(g_hMetadataExtractorHandle,szAudioFilePath)==0?0:1;
+       FPRINTF("\\n[Meatadata_Extractor_ITc] Metadata_Extractor_SetPath_Audio API- %s\n", Metadata_ExtractorGetError(nRet));
+
+       return nRet;
+}
+
+/**
+ * @function           Metadata_Extractor_SetPath_Video
+ * @description                set file path for video file
+ * @parameter          NA
+ * @return                     NA
+ */ 
+bool Metadata_Extractor_SetPath_Video(void)
+{
+       char szVideoFilePath[PATH_LEN] = {0,};
+       if(false == MetadataExtractorAppendToAppDataPath(MEDIA_VIDEO_PATH, szVideoFilePath))
+       {
+               FPRINTF( "[Line : %d] [Meatadata_Extractor_ITc] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+
+       bool nRet = metadata_extractor_set_path(g_hMetadataExtractorHandle,szVideoFilePath)==0?0:1;
+       FPRINTF("\\n[Meatadata_Extractor_ITc] Metadata_Extractor_SetPath_Video API- %s\n", Metadata_ExtractorGetError(nRet));
+
+       return nRet;
+}
+
+/**
+* @function                    MetadataExtractorGetMemStatus
+* @description         Returns the Memory Allocation state
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void MetadataExtractorGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+
+               if(stMemInfo.uordblks > g_stMetadataExtractorMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stMetadataExtractorMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stMetadataExtractorMemInfo.uordblks - stMemInfo.uordblks);
+               }
+
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+
+#endif
+}
+
+
+/**
+* @function                    MetadataExtractorGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void MetadataExtractorGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stMetadataExtractorMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           MetadataExtractorExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ */
+void MetadataExtractorExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);
+       ulldifference = ((stEnd.tv_sec -g_stMetadataExtractorStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stMetadataExtractorStartTime.tv_usec;
+
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+
+#endif
+}
+
+/**
+ * @function           MetadataExtractorGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stMetadataExtractorStartTime
+ * @parameter          NA
+ * @return             NA
+ */
+void MetadataExtractorGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stMetadataExtractorStartTime, NULL);
+#endif
+}
+
+
+/**
+ * @function           ReadFromFile
+ * @description                Get file size and fill buffer with file content
+ * @parameter          NA
+ * @return                     void
+ */
+void ReadFromFile(char *pFilePath,void **pBuffer, int *pSize)
+{
+       FILE * fp = fopen (pFilePath, "r");     
+       if ( fp )
+       {
+               fseek (fp, 0, SEEK_END);        
+               *pSize = ftell(fp);     
+               fseek (fp, 0, SEEK_SET);        
+               *pBuffer = malloc (*pSize);     
+               if ( fread (*pBuffer, *pSize, sizeof(char), fp) ==0 )
+               {
+                       free(*pBuffer);
+                       *pBuffer = NULL;
+               }
+               fclose (fp);
+       }
+}
+/** @} */ //end of itc-metadata-extractor
\ No newline at end of file
diff --git a/src/itc/metadata-extractor/ITs-metadata-extractor-common.h b/src/itc/metadata-extractor/ITs-metadata-extractor-common.h
new file mode 100755 (executable)
index 0000000..707b5a0
--- /dev/null
@@ -0,0 +1,207 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_METADATA_EXTRACTOR_COMMON_H_
+#define _ITS_METADATA_EXTRACTOR_COMMON_H_
+
+
+#include "assert.h"
+#include <metadata_extractor.h>
+#include <stdio.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <app.h>
+
+/** @addtogroup itc-metadata-extractor
+* @ingroup             itc
+* @{
+*/
+
+#define ERR_LOG                                "/tmp/tclog"
+FILE *g_fpLog;
+
+metadata_extractor_h g_hMetadataExtractorHandle;
+struct mallinfo g_stMetadataExtractorMemInfo;
+struct timeval g_stMetadataExtractorStartTime;
+bool g_bIsValidHandle;
+
+#define PATH_LEN                                                       1024
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+
+#define MEDIA_VIDEO_PATH                       "metadata_video.mp4"
+#define MEDIA_AUDIO_PATH                       "metadata_audio.mp3"
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][[Meatadata_Extractor_ITc] Starting test : %s\n", __LINE__,__FUNCTION__);\
+       if ( !g_bIsValidHandle )\
+       {\
+               FPRINTF("\\n[Line : %d][[Meatadata_Extractor_ITc] Precondition of metadata extractor failed so leaving test\n",__LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal != METADATA_EXTRACTOR_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][[Meatadata_Extractor_ITc] %s failed in pre-condition, error returned = %s\n", __LINE__, API, Metadata_ExtractorGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_POST_RESULT(nRetVal, API) {\
+       if (nRetVal != METADATA_EXTRACTOR_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][[Meatadata_Extractor_ITc] %s failed in post-condition, error returned = %s\n", __LINE__, API, Metadata_ExtractorGetError(nRetVal));\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog) {\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d][[Meatadata_Extractor_ITc] %s_MemoryLeakStatus - %s\n", __LINE__, #api, memLog);\
+       }\
+}
+       
+#define PRINT_SPEED_LOG(api, speedLog) {\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][[Meatadata_Extractor_ITc] %s_TimeInMicrosec- %s\n", __LINE__, #api, speedLog);\
+       }\
+}
+
+#define VALIDATE_RESULT(nErrCount1, strApi) {\
+       if ( nErrCount1 > 0)\
+       {\
+               FPRINTF("\\n[Line : %d][[Meatadata_Extractor_ITc] %s failed %d times, out of %d times\n", __LINE__, strApi, nErrCount1, MAX_COUNT);\
+               return 1;\
+       }\
+       else\
+       {\
+               return 0;\
+       }\
+}
+
+#define VALIDATE_RESULT_PAIRAPI(nErrCount1, nErrCount2, strTargetApi1, strTargetApi2, szApi1, szApi2, szApi3) \
+       if ( nErrCount1 > 0 || nErrCount2 > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][[Meatadata_Extractor_ITc] %s failed %d times, %s failed %d times out of %d times\n", __LINE__, strTargetApi1, nErrCount1, strTargetApi2, nErrCount2, MAX_COUNT);\
+               if (szApi1 != NULL)\
+               {\
+                       free(szApi1);\
+                       szApi1 = NULL;\
+               }\
+               if (szApi2 != NULL)\
+               {\
+                       free(szApi2);\
+                       szApi2 = NULL;\
+               }\
+               if (szApi3 != NULL)\
+               {\
+                       free(szApi3);\
+                       szApi3 = NULL;\
+               }\
+               return 1;\
+       }\
+       
+#define VALIDATE_RESULT_API(nFailCount, strTargetApiName, ptrMem1, ptrMem2, nTotalCount) \
+       if ( nFailCount > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][[Meatadata_Extractor_ITc] %s failed %d times out of %d times\n", __LINE__, strTargetApiName, nFailCount, nTotalCount);\
+               if (ptrMem1 != NULL)\
+               {\
+                       free(ptrMem1);\
+                       ptrMem1 = NULL;\
+               }\
+               if (ptrMem2 != NULL)\
+               {\
+                       free(ptrMem2);\
+                       ptrMem2 = NULL;\
+               }\
+               return 1;\
+       }\
+
+#define FREE_MEMORY_3ARGS(szApi1, szApi2, szApi3)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+       if (szApi3 != NULL)\
+       {\
+               free(szApi3);\
+               szApi3 = NULL;\
+       }\
+
+#define FREE_MEMORY_2ARGS(szApi1, szApi2)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+
+#define FREE(szApi1)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+
+
+
+char* Metadata_ExtractorGetError(int nRet);
+bool Metadata_Extractor_SetPath_Audio(void);
+bool Metadata_Extractor_SetPath_Video(void);
+void ReadFromFile(char *pFilePath,void **pBuffer, int *pSize);
+void MetadataExtractorGetMemStatus(char *pszAPIMemory);
+inline void MetadataExtractorGetMemAllocation();
+void MetadataExtractorExecutionDelay(char* pszAPITime);
+void MetadataExtractorGetTimeOfDay();
+void MetadataExtractorGetFileSize(int *pnSize);
+char* Metadata_ExtractorGetEnumAttributeString(int nVal);
+bool MetadataExtractorGetDataPath(char* pAppDataPath);
+bool MetadataExtractorAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+
+/** @} */ //end of itc-metadata-extractor
+
+#endif  //_ITS_METADATA_EXTRACTOR_COMMON_H_
diff --git a/src/itc/metadata-extractor/ITs-metadata-extractor.c b/src/itc/metadata-extractor/ITs-metadata-extractor.c
new file mode 100755 (executable)
index 0000000..f4b951a
--- /dev/null
@@ -0,0 +1,747 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-metadata-extractor-common.h"
+
+/** @addtogroup itc-metadata-extractor
+* @ingroup             itc
+* @{
+*/
+
+//& set: MetadataExtractor
+
+/**
+* @function            ITs_metadata_extractor_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_metadata_extractor_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+
+       g_bIsValidHandle = true;
+       int nRet = metadata_extractor_create(&g_hMetadataExtractorHandle);
+       if ( nRet != METADATA_EXTRACTOR_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] Unable to create extractor handle, error returned = %s\n",__LINE__, Metadata_ExtractorGetError(nRet));
+               g_bIsValidHandle = false;
+       }
+}
+
+/**
+* @function            ITs_metadata_extractor_cleanup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_metadata_extractor_cleanup(void)
+{
+       int nRet = metadata_extractor_destroy(g_hMetadataExtractorHandle);
+       if ( nRet != METADATA_EXTRACTOR_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] Unable to destroy extractor handle, error returned = %s\n", __LINE__, Metadata_ExtractorGetError(nRet));
+       }
+}
+
+/** @addtogroup        itc-metadata-extractor-testcases
+* @brief               Integration testcases for module metadata-extractor
+* @ingroup             itc-metadata-extractor
+* @{
+*/
+
+//& purpose: create and destroy meta-data extractor handle
+//& type: auto
+/**
+* @testcase                    ITc_metadata_extractor_create_destroy_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 create and destroy meta-data extractor handle
+* @scenario                            NA                                                      
+* @apicovered                  metadata_extractor_create, metadata_extractor_destroy
+* @passcase                            When metadata_extractor_create and metadata_extractor_destroy is successful
+* @failcase                            If metadata_extractor_create or metadata_extractor_destroy fails
+* @precondition                        create a meta-data extractor valid handle using metadata_extractor_create API
+* @postcondition               NA.
+*/
+int ITc_metadata_extractor_create_destroy_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1, nLoopCount = 0;
+
+       char *pszListCreateSpeedLog = NULL;
+       char *pszListDestroySpeedLog = NULL;
+       char *pszCreateDestroyMemLog = NULL;
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+
+#if MEMORY_CHECK
+       pszCreateDestroyMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszListCreateSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszListDestroySpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       metadata_extractor_h hHandle = NULL;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MetadataExtractorGetMemAllocation();
+               MetadataExtractorGetTimeOfDay();
+               
+               //Target APIs
+               nRetVal = metadata_extractor_create(&hHandle);
+               
+               MetadataExtractorExecutionDelay(pszListCreateSpeedLog);
+
+               if ( nRetVal != METADATA_EXTRACTOR_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_create failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Metadata_ExtractorGetError(nRetVal));
+                       nCreateFailCount++;
+                       continue;
+               }
+
+               MetadataExtractorGetTimeOfDay();
+               
+               //Target APIs
+               nRetVal = metadata_extractor_destroy(hHandle);
+               
+               MetadataExtractorExecutionDelay(pszListCreateSpeedLog);
+               MetadataExtractorGetMemStatus(pszCreateDestroyMemLog);
+
+               if ( nRetVal != METADATA_EXTRACTOR_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_destroy failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Metadata_ExtractorGetError(nRetVal));
+                       nDestroyFailCount++;
+               }
+       }
+
+       VALIDATE_RESULT_PAIRAPI(nCreateFailCount, nDestroyFailCount, "metadata_extractor_create", "metadata_extractor_destroy", pszCreateDestroyMemLog, pszCreateDestroyMemLog, pszListDestroySpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(metadata_extractor_create, pszListCreateSpeedLog);
+       PRINT_SPEED_LOG(metadata_extractor_destroy, pszListDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(metadata_extractor_create_destroy, pszCreateDestroyMemLog);
+#endif
+
+       FREE_MEMORY_3ARGS(pszCreateDestroyMemLog, pszCreateDestroyMemLog, pszListDestroySpeedLog);
+
+       return 0;
+}
+
+
+//& purpose: Gets an artwork image of a media file
+//& type: auto
+/**
+* @testcase                    ITc_metadata_extractor_get_artwork_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets an artwork image of a media file
+* @scenario                            get the artwork image of a media file
+* @apicovered                  metadata_extractor_get_artwork
+* @passcase                            When metadata_extractor_get_artwork and metadata_extractor_get_artwork is successful
+* @failcase                            If metadata_extractor_set_path or metadata_extractor_get_artwork fails
+* @precondition                        Set path to extract by calling metadata_extractor_set_path().
+* @precondition                        None
+* @postcondition               return artwork, size and mime-type of file.
+*/
+int ITc_metadata_extractor_get_artwork_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       //precondition api,//set path
+       int nRet = Metadata_Extractor_SetPath_Audio();
+
+       if ( nRet != METADATA_EXTRACTOR_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] Precondition of metadata_extractor_get_artwork failed on Metadata_Extractor_SetPath_Audio, error returned = %s\n", __LINE__, Metadata_ExtractorGetError(nRet));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       void *vpArtwork=NULL;
+       int  nSize = 0;
+       char *pcMime_type = NULL;
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MetadataExtractorGetMemAllocation();
+               MetadataExtractorGetTimeOfDay();
+               
+               //Target API
+               int nRetVal = metadata_extractor_get_artwork(g_hMetadataExtractorHandle, &vpArtwork, &nSize, &pcMime_type);
+               
+               MetadataExtractorExecutionDelay(pszSpeedLog);
+               MetadataExtractorGetMemStatus(pszMemLog);
+
+               if ( nRetVal != METADATA_EXTRACTOR_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_get_artwork failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Metadata_ExtractorGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+               else if ( vpArtwork == NULL || pcMime_type == NULL || nSize == 0 )
+               {
+                       FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_get_artwork failed, output parameter having invalid value on iteration %d\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+
+               FREE_MEMORY_2ARGS(vpArtwork, pcMime_type);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "metadata_extractor_get_artwork", pszMemLog, pszSpeedLog, MAX_COUNT);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(metadata_extractor_get_artwork, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(metadata_extractor_get_artwork, pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+       
+       return 0;
+}
+
+
+//& purpose: Gets frame of a video media file.  
+//& type: auto
+/**
+* @testcase                    ITc_metadata_extractor_get_frame_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets frame of a video media file.  
+* @scenario                            Before getting frame of file, set file path                                             
+* @apicovered                  metadata_extractor_get_frame
+* @passcase                            When metadata_extractor_get_frame is successful
+* @failcase                            If metadata_extractor_get_frame fails
+* @precondition                        Set path to extract by calling metadata_extractor_set_path
+* @postcondition               return frame of file and frame size
+*/
+int ITc_metadata_extractor_get_frame_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       //precondition api,//set path
+       int nRet = Metadata_Extractor_SetPath_Video();
+
+       if ( nRet != METADATA_EXTRACTOR_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] Precondition of metadata_extractor_get_frame failed on Metadata_Extractor_SetPath_Video, error returned = %s\n", __LINE__, Metadata_ExtractorGetError(nRet));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       void *pvFrame =NULL; 
+       int nFramesize = 0;
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MetadataExtractorGetMemAllocation();
+               MetadataExtractorGetTimeOfDay();
+               
+               //Target API
+               int nRetVal = metadata_extractor_get_frame(g_hMetadataExtractorHandle, &pvFrame, &nFramesize);
+               
+               MetadataExtractorExecutionDelay(pszSpeedLog);
+               MetadataExtractorGetMemStatus(pszMemLog);
+
+               if ( nRetVal != METADATA_EXTRACTOR_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_get_frame failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Metadata_ExtractorGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+
+               else if ( pvFrame == NULL || nFramesize <= 0 )
+               {
+                       FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_get_frame failed, output parameter having invalid value on iteration %d\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+
+               FREE(pvFrame);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "metadata_extractor_get_frame", pszMemLog, pszSpeedLog, MAX_COUNT);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(metadata_extractor_get_frame, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(metadata_extractor_get_frame, pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+
+       return 0;
+}
+
+//& purpose: Gets a frame of video media.  
+//& type: auto
+/**
+* @testcase                    ITc_metadata_extractor_get_frame_at_time_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets a frame of video media. . 
+* @scenario                            Before getting frame, set file path                                                     
+* @apicovered                  metadata_extractor_get_frame_at_time 
+* @passcase                            When ITc_metadata_extractor_get_frame_at_time is successful
+* @failcase                            If ITc_metadata_extractor_get_frame_at_time fails
+* @precondition                        Set path to extract by calling metadata_extractor_set_path
+* @postcondition               return frame and size of a frame
+*/
+int ITc_metadata_extractor_get_frame_at_time_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       //precondition api,//set path
+       int nRet = Metadata_Extractor_SetPath_Video();
+
+       if ( nRet != METADATA_EXTRACTOR_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] Precondition of metadata_extractor_get_frame_at_time failed on Metadata_Extractor_SetPath_Video, error returned = %s\n", __LINE__, Metadata_ExtractorGetError(nRet));
+               return 1;
+       }
+
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       unsigned long ulTimestamp = 1;
+       bool bIs_accurate = false; 
+       void *pvFrame = NULL;
+       int nSize = 0;
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MetadataExtractorGetMemAllocation();
+               MetadataExtractorGetTimeOfDay();
+               
+               //Target API
+               int nRetVal = metadata_extractor_get_frame_at_time(g_hMetadataExtractorHandle, ulTimestamp, bIs_accurate, &pvFrame, &nSize);
+               
+               MetadataExtractorExecutionDelay(pszSpeedLog);
+               MetadataExtractorGetMemStatus(pszMemLog);
+
+               if ( nRetVal != METADATA_EXTRACTOR_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_get_frame_at_time failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Metadata_ExtractorGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+               else if ( pvFrame == NULL || nSize <= 0 )
+               {
+                       FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_get_frame_at_time failed, output parameter having invalid value on iteration %d\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+
+               FREE(pvFrame);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "metadata_extractor_get_frame_at_time", pszMemLog, pszSpeedLog, MAX_COUNT);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(metadata_extractor_get_frame_at_time, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(metadata_extractor_get_frame_at_time, pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+       return 0;
+}
+
+//& purpose: Gets meta-data of multimedia file.  
+//& type: auto
+/**
+* @testcase                    ITc_metadata_extractor_get_metadata_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets meta-data of multimedia file.   
+* @scenario                            Before getting artwork of file need to set file path                                                    
+* @apicovered                  metadata_extractor_get_metadata
+* @passcase                            When metadata_extractor_get_metadata is successful
+* @failcase                            If metadata_extractor_get_metadata fails
+* @precondition                        Set path to extract by calling metadata_extractor_set_path
+* @postcondition               return buffer on success
+*/
+int ITc_metadata_extractor_get_metadata_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       //precondition api,//set path
+       int nRet = Metadata_Extractor_SetPath_Video();
+
+       if ( nRet != METADATA_EXTRACTOR_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] Precondition of metadata_extractor_get_metadata failed on Metadata_Extractor_SetPath_Video, error returned = %s\n", __LINE__, Metadata_ExtractorGetError(nRet));
+               return 1;
+       }
+
+       int nAttributes[] = { METADATA_DURATION, METADATA_VIDEO_BITRATE, METADATA_VIDEO_FPS, METADATA_VIDEO_WIDTH, METADATA_VIDEO_HEIGHT, METADATA_HAS_VIDEO, 
+               METADATA_AUDIO_BITRATE, METADATA_AUDIO_CHANNELS, METADATA_AUDIO_SAMPLERATE, METADATA_HAS_AUDIO, METADATA_ARTIST, METADATA_TITLE, METADATA_ALBUM, 
+               METADATA_ALBUM_ARTIST, METADATA_GENRE, METADATA_AUTHOR, METADATA_COPYRIGHT, METADATA_DATE, /*METADATA_DESCRIPTION,*/ METADATA_COMMENT, METADATA_TRACK_NUM,
+               /*METADATA_CLASSIFICATION, METADATA_RATING,*/ METADATA_LONGITUDE, METADATA_LATITUDE, METADATA_ALTITUDE, /*METADATA_CONDUCTOR, METADATA_UNSYNCLYRICS,*/ METADATA_SYNCLYRICS_NUM, 
+               METADATA_RECDATE, /*METADATA_ROTATE*/ };
+       int nEnum_Size = sizeof(nAttributes) / sizeof(nAttributes[0]);
+       int nEnum_Counter;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * nEnum_Size* MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * nEnum_Size * MAX_COUNT, sizeof(char));
+#endif
+
+       //metadata_extractor_attr_e attribute = METADATA_AUDIO_BITRATE ;
+       char *pcValue = NULL;
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               for ( nEnum_Counter = 0; nEnum_Counter < nEnum_Size; nEnum_Counter++ )
+               {
+                       MetadataExtractorGetMemAllocation();
+                       MetadataExtractorGetTimeOfDay();
+                       
+                       //Target API
+                       int nRetVal = metadata_extractor_get_metadata(g_hMetadataExtractorHandle, nAttributes[nEnum_Counter], &pcValue);
+                       
+                       MetadataExtractorExecutionDelay(pszSpeedLog);
+                       MetadataExtractorGetMemStatus(pszMemLog);
+
+                       if ( nRetVal != METADATA_EXTRACTOR_ERROR_NONE )
+                       {
+                               FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_get_metadata failed on iteration %d for attribute = %s, error returned = %s\n", __LINE__,
+                                       nLoopCount, Metadata_ExtractorGetEnumAttributeString(nAttributes[nEnum_Counter]), Metadata_ExtractorGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+                       else if ( pcValue == NULL )
+                       {
+                               FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_get_metadata failed, output parameter for enum %s having invalid value on iteration %d\n", __LINE__,
+                                       Metadata_ExtractorGetEnumAttributeString(nAttributes[nEnum_Counter]), nLoopCount);
+                               nFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_get_metadata succeeded on iteration %d for attribute = %s\n", __LINE__,
+                                       nLoopCount, Metadata_ExtractorGetEnumAttributeString(nAttributes[nEnum_Counter]));
+                       }
+
+                       FREE(pcValue);
+               }
+       }
+       
+       int nTotalCount = nEnum_Size * MAX_COUNT;
+       VALIDATE_RESULT_API(nFailCount, "metadata_extractor_get_metadata", pszMemLog, pszSpeedLog, nTotalCount);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(metadata_extractor_get_metadata, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(metadata_extractor_get_metadata, pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+       return 0;
+}
+
+
+//& purpose: Gets sync-lyric of a media file  
+//& type: auto
+/**
+* @testcase                    ITc_metadata_extractor_get_synclyrics_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets sync-lyric of a media file.   
+* @scenario                            Before getting sync-lyrics of file, set file path                                                       
+* @apicovered                  metadata_extractor_get_synclyrics
+* @passcase                            When metadata_extractor_get_synclyrics is successful
+* @failcase                            If metadata_extractor_get_synclyrics fails
+* @precondition                        Set path to extract by calling metadata_extractor_set_path. Get time/lyrics set number by calling metadata_extractor_get_metadata 
+* @postcondition               return buffer on success
+*/
+int ITc_metadata_extractor_get_synclyrics_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       //precondition api,//set path
+       int nRet = Metadata_Extractor_SetPath_Video();
+
+       if( nRet != METADATA_EXTRACTOR_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] Precondition of metadata_extractor_get_synclyrics failed on Metadata_Extractor_SetPath_Video, error returned = %s\n", __LINE__, Metadata_ExtractorGetError(nRet));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       unsigned long ulTimestamp = 0;
+       char *pcLyrics = NULL;
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MetadataExtractorGetMemAllocation();
+               MetadataExtractorGetTimeOfDay();
+               
+               //Target API
+               int nRetVal = metadata_extractor_get_synclyrics (g_hMetadataExtractorHandle, 1, &ulTimestamp, &pcLyrics);
+               
+               MetadataExtractorExecutionDelay(pszSpeedLog);
+               MetadataExtractorGetMemStatus(pszMemLog);
+
+               if ( nRetVal != METADATA_EXTRACTOR_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_get_synclyrics failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Metadata_ExtractorGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+               //else if ( pcLyrics == NULL )
+               //{
+               //      FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_get_synclyrics failed, output parameter having invalid value on iteration %d\n", __LINE__, nLoopCount);
+               //      nFailCount++;
+               //}
+
+               FREE(pcLyrics);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "metadata_extractor_get_synclyrics", pszMemLog, pszSpeedLog, MAX_COUNT);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(metadata_extractor_get_synclyrics, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(metadata_extractor_get_synclyrics, pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+
+       return 0;
+}
+
+
+//& purpose: Sets a buffer for meta-data extraction. . 
+//& type: auto
+/**
+* @testcase                    ITc_metadata_extractor_set_buffer_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Sets a buffer for meta-data extraction. 
+* @scenario                            Before getting artwork of file need to set file path                                                    
+* @apicovered                  metadata_extractor_set_buffer
+* @passcase                            When metadata_extractor_set_buffer is successful
+* @failcase                            If metadata_extractor_set_buffer fails
+* @precondition                        create a meta-data extractor valid handle using metadata_extractor_create API
+* @postcondition               return 0 on success
+*/
+int ITc_metadata_extractor_set_buffer_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       char szAudioFilePath[PATH_LEN] = {0,};
+       if(false == MetadataExtractorAppendToAppDataPath(MEDIA_AUDIO_PATH, szAudioFilePath))
+       {
+               FPRINTF( "[Line : %d] [Meatadata_Extractor_ITc] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+
+       void *pBuffer = NULL;
+       int nSize = 0;
+       ReadFromFile(szAudioFilePath, &pBuffer,&nSize);
+       if ( pBuffer == NULL )
+       {
+               FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] Precondition failed. Could not allocate memory to buffer", __LINE__);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MetadataExtractorGetMemAllocation();
+               MetadataExtractorGetTimeOfDay();
+               
+               //Target API
+               int nRetVal = metadata_extractor_set_buffer(g_hMetadataExtractorHandle, pBuffer, nSize);
+               
+               MetadataExtractorExecutionDelay(pszSpeedLog);
+               MetadataExtractorGetMemStatus(pszMemLog);
+
+               if ( nRetVal != METADATA_EXTRACTOR_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_set_buffer failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Metadata_ExtractorGetError(nRetVal));
+                       nFailCount++;
+               }
+       }
+
+       FREE(pBuffer);
+       VALIDATE_RESULT_API(nFailCount, "metadata_extractor_set_buffer", pszMemLog, pszSpeedLog, MAX_COUNT);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(metadata_extractor_set_buffer, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(metadata_extractor_set_buffer, pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+
+       return 0;
+}
+
+
+//& purpose: Sets a file path for meta-data extraction. 
+//& type: auto
+/**
+* @testcase                            ITc_metadata_extractor_set_path_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Sets a file path for meta-data extraction. 
+* @scenario                            Before getting artwork of file need to set file path
+* @apicovered                          metadata_extractor_set_path
+* @passcase                            When metadata_extractor_set_path is successful
+* @failcase                            If metadata_extractor_set_path fails
+* @precondition                        create a meta-data extractor valid handle using metadata_extractor_create api
+* @postcondition                       return 0 on success
+*/
+int ITc_metadata_extractor_set_path_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+       char szAudioFilePath[PATH_LEN] = {0,};
+       if(false == MetadataExtractorAppendToAppDataPath(MEDIA_AUDIO_PATH, szAudioFilePath))
+       {
+               FPRINTF( "[Line : %d] [Meatadata_Extractor_ITc] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               MetadataExtractorGetMemAllocation();
+               MetadataExtractorGetTimeOfDay();
+               
+               //Target API
+               int nRetVal= metadata_extractor_set_path(g_hMetadataExtractorHandle, szAudioFilePath);
+               
+               MetadataExtractorExecutionDelay(pszSpeedLog);
+               MetadataExtractorGetMemStatus(pszMemLog);
+
+               if ( nRetVal != METADATA_EXTRACTOR_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][Meatadata_Extractor_ITc] metadata_extractor_set_path failed on iteration %d, error returned = %s\n", __LINE__, nLoopCount, Metadata_ExtractorGetError(nRetVal));
+                       nFailCount++;
+               }
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "metadata_extractor_set_path", pszMemLog, pszSpeedLog, MAX_COUNT);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(metadata_extractor_set_path, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(metadata_extractor_set_path, pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszSpeedLog);
+
+       return 0;
+}
+
+/** @} */ //end of itc-metadata-extractor
+/** @} */ //end of itc-metadata-extractor-testcases
diff --git a/src/itc/metadata-extractor/metadata_audio.mp3 b/src/itc/metadata-extractor/metadata_audio.mp3
new file mode 100755 (executable)
index 0000000..d8f2112
Binary files /dev/null and b/src/itc/metadata-extractor/metadata_audio.mp3 differ
diff --git a/src/itc/metadata-extractor/metadata_video.mp4 b/src/itc/metadata-extractor/metadata_video.mp4
new file mode 100755 (executable)
index 0000000..ecf3f9f
Binary files /dev/null and b/src/itc/metadata-extractor/metadata_video.mp4 differ
diff --git a/src/itc/metadata-extractor/tct-metadata-extractor-native.c b/src/itc/metadata-extractor/tct-metadata-extractor-native.c
new file mode 100755 (executable)
index 0000000..d8fc1de
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-metadata-extractor-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/metadata-extractor/tct-metadata-extractor-native.h b/src/itc/metadata-extractor/tct-metadata-extractor-native.h
new file mode 100755 (executable)
index 0000000..878fd70
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_METADATA_EXTRACTOR_NATIVE_H__
+#define __TCT_METADATA_EXTRACTOR_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_metadata_extractor_startup(void);
+extern void ITs_metadata_extractor_cleanup(void);
+
+extern int ITc_metadata_extractor_create_destroy_p(void);
+extern int ITc_metadata_extractor_get_artwork_p(void);
+extern int ITc_metadata_extractor_get_frame_p(void);
+extern int ITc_metadata_extractor_get_frame_at_time_p(void);
+extern int ITc_metadata_extractor_get_metadata_p(void);
+extern int ITc_metadata_extractor_get_synclyrics_p(void);
+extern int ITc_metadata_extractor_set_buffer_p(void);
+extern int ITc_metadata_extractor_set_path_p(void);
+
+testcase tc_array[] = {
+    {"ITc_metadata_extractor_create_destroy_p", ITc_metadata_extractor_create_destroy_p, ITs_metadata_extractor_startup, ITs_metadata_extractor_cleanup},
+    {"ITc_metadata_extractor_get_artwork_p", ITc_metadata_extractor_get_artwork_p, ITs_metadata_extractor_startup, ITs_metadata_extractor_cleanup},
+    {"ITc_metadata_extractor_get_frame_p", ITc_metadata_extractor_get_frame_p, ITs_metadata_extractor_startup, ITs_metadata_extractor_cleanup},
+    {"ITc_metadata_extractor_get_frame_at_time_p", ITc_metadata_extractor_get_frame_at_time_p, ITs_metadata_extractor_startup, ITs_metadata_extractor_cleanup},
+    {"ITc_metadata_extractor_get_metadata_p", ITc_metadata_extractor_get_metadata_p, ITs_metadata_extractor_startup, ITs_metadata_extractor_cleanup},
+    {"ITc_metadata_extractor_get_synclyrics_p", ITc_metadata_extractor_get_synclyrics_p, ITs_metadata_extractor_startup, ITs_metadata_extractor_cleanup},
+    {"ITc_metadata_extractor_set_buffer_p", ITc_metadata_extractor_set_buffer_p, ITs_metadata_extractor_startup, ITs_metadata_extractor_cleanup},
+    {"ITc_metadata_extractor_set_path_p", ITc_metadata_extractor_set_path_p, ITs_metadata_extractor_startup, ITs_metadata_extractor_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_METADATA_EXTRACTOR_NATIVE_H__
diff --git a/src/itc/mime-type/CMakeLists.txt b/src/itc/mime-type/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..0b8e270
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "mime-type")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-content-mime-type")
+SET(TC_SOURCES
+       ITs-mime-type-common.c
+       ITs-mime-type.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/mime-type/ITs-mime-type-common.c b/src/itc/mime-type/ITs-mime-type-common.c
new file mode 100755 (executable)
index 0000000..912499a
--- /dev/null
@@ -0,0 +1,141 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-mime-type-common.h"
+
+/** @addtogroup itc-mime-type
+* @ingroup             itc
+* @{
+*/
+
+//Add helper function definitions here
+
+extern struct timeval g_stmime_typeStartTime;
+extern struct mallinfo g_stmime_typeMemInfo;
+
+/**
+ * @function           db_util_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* mime_type_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case MIME_TYPE_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case MIME_TYPE_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Invalid parameter " ; break; 
+               case MIME_TYPE_ERROR_OUT_OF_MEMORY  : szErrorVal = "Error - Out of memory " ; break;
+               case MIME_TYPE_ERROR_IO_ERROR   : szErrorVal = "Error - Internal I/O error  " ; break;
+                       
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function                    db_util_GetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void mime_type_GetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stmime_typeMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stmime_typeMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stmime_typeMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+
+/**
+* @function                    db_util_GetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void mime_type_GetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stmime_typeMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           db_util_ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void mime_type_ExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stmime_typeStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stmime_typeStartTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           db_util_GetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stMetadataExtractorStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void mime_type_GetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stmime_typeStartTime, NULL);
+#endif
+}
+
+/** @} */ //end of itc-mime-type
\ No newline at end of file
diff --git a/src/itc/mime-type/ITs-mime-type-common.h b/src/itc/mime-type/ITs-mime-type-common.h
new file mode 100755 (executable)
index 0000000..a0bcff9
--- /dev/null
@@ -0,0 +1,115 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_MIME_TYPE_COMMON_H_
+#define _ITS_MIME_TYPE_COMMON_H_
+
+#include "assert.h"
+#include <mime_type.h>
+#include <stdio.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/** @addtogroup itc-mime-type
+* @ingroup             itc
+* @{
+*/
+
+FILE *g_fpLog;
+
+#define LOG                                                    100
+#define TIMELOG                                                10
+#define MEMLOG                                         10
+#define MICROSECONDS_PER_SECOND                1000000
+#define TIME_DELAY                                     20
+#define USLEEPDELAY                                    500000
+#define GMAINTIMEOUT                           2000
+#define PACKAGE                                                "org.tizen.sms"
+#define ERR_LOG                                "/tmp/tclog"
+
+//Add test package related includes here
+struct timeval g_stmime_typeStartTime;
+struct mallinfo g_stmime_typeMemInfo;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][mime-type_ITc] ***** Starting test : %s\n",__LINE__, __FUNCTION__);\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog){\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [mime-type_ITc] %s_MemoryLeakStatus - %s\n", __LINE__, #api, memLog);\
+       }\
+}
+       
+#define PRINT_SPEED_LOG(api, szSpeedLog)\
+       if(strlen(szSpeedLog) > 0) \
+       {\
+               szSpeedLog[strlen(szSpeedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [mime-type_ITc] %s_TimeInMicrosec- %s\n", __LINE__, #api, szSpeedLog);\
+       }\
+
+#define VALIDATE_RESULT_API(nFailCount, strTargetApiName, ptrMem1, ptrMem2) \
+       if ( nFailCount > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][mime-type_ITc] %s failed %d times out of %d times\n", __LINE__,  strTargetApiName, nFailCount, MAX_COUNT);\
+               if (ptrMem1 != NULL)\
+               {\
+                       free(ptrMem1);\
+                       ptrMem1 = NULL;\
+               }\
+               if (ptrMem2 != NULL)\
+               {\
+                       free(ptrMem2);\
+                       ptrMem2 = NULL;\
+               }\
+               return 1;\
+       }\
+
+
+#define FREE_MEMORY_2ARGS(szApi1, szApi2)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+
+char* mime_type_GetError(int nRet);
+void mime_type_GetMemStatus(char *pszAPIMemory);
+inline void mime_type_GetMemAllocation();
+void mime_type_ExecutionDelay(char* pszAPITime);
+void mime_type_GetTimeOfDay();
+
+/** @} */ //end of itc-mime-type
+
+#endif  //_ITS_MIME_TYPE_COMMON_H_
diff --git a/src/itc/mime-type/ITs-mime-type.c b/src/itc/mime-type/ITs-mime-type.c
new file mode 100755 (executable)
index 0000000..d1a8525
--- /dev/null
@@ -0,0 +1,206 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-mime-type-common.h"
+
+/** @addtogroup itc-mime-type
+* @ingroup             itc
+* @{
+*/
+
+//& set: MimeType
+
+/**
+* @function            ITs_mime_type_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_mime_type_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+}
+
+/**
+* @function            ITs_mime_type_cleanup
+* @description         Called after each test, destroys camera handle
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_mime_type_cleanup(void)
+{
+       return;
+}
+
+/** @addtogroup        itc-mime-type-testcases
+* @brief               Integration testcases for module mime-type
+* @ingroup             itc-mime-type
+* @{
+*/
+
+//& purpose: Gets file extensions for the given MIME type. 
+//& type: auto
+/**
+* @testcase                    ITc_mime_type_get_file_extension_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets file extensions for the given MIME type. 
+* @scenario                            Get mime-type\n
+*                                              Get file extension
+* @apicovered                  mime_type_get_mime_type, mime_type_get_file_extension
+* @passcase                            if mime_type_get_mime_type and mime_type_get_file_extension are successful
+* @failcase                            if mime_type_get_mime_type or mime_type_get_file_extension fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_mime_type_get_file_extension_p(void)
+{
+   START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK       
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               //precondition
+               char *pcMime_type=NULL;
+               int nRet = mime_type_get_mime_type ("png",&pcMime_type);
+       
+               if(nRet != MIME_TYPE_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][mime_type_ITc] Precondition failed,  error returned = %s ", __LINE__, mime_type_GetError(nRet));
+                       return 1;
+               }
+
+               char **pcFile_extension = NULL;
+               int nLength=0;
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       mime_type_GetMemAllocation();
+                       mime_type_GetTimeOfDay();
+                       int nRetVal = mime_type_get_file_extension (pcMime_type,&pcFile_extension, &nLength);//target api
+                       mime_type_ExecutionDelay(pszSpeedLog);
+                       mime_type_GetMemStatus(pszMemLog);
+
+                       if(nRetVal != MIME_TYPE_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][mime_type_ITc] system_info_get_custom_bool failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, mime_type_GetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d]file_extension : %s " ,__LINE__, *pcFile_extension);
+                               FPRINTF("\\n[Line : %d]length : %d " , __LINE__, nLength);
+                       }
+                       free(pcFile_extension);
+               }
+
+               free(pcMime_type);
+               VALIDATE_RESULT_API(nFailCount, "mime_type_get_file_extension", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(mime_type_get_file_extension, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(mime_type_get_file_extension, pszMemLog);
+#endif
+               FREE_MEMORY_2ARGS(pszSpeedLog,pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Gets the MIME type for the given file extension. 
+//& type: auto
+/**
+* @testcase                    ITc_mime_type_get_mime_type_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Gets the MIME type for the given file extension. 
+* @scenario                            Get mime-type using mime_type_get_mime_type
+* @apicovered                  mime_type_get_mime_type
+* @passcase                            if mime_type_get_mime_type successful
+* @failcase                            if mime_type_get_mime_type fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_mime_type_get_mime_type_p(void)
+{
+   START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK       
+               pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+               pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               char *pcMime_type=NULL;
+               
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       mime_type_GetMemAllocation();
+                       mime_type_GetTimeOfDay();
+                       int nRetVal = mime_type_get_mime_type ("png",&pcMime_type);//target api
+                       mime_type_ExecutionDelay(pszSpeedLog);
+                       mime_type_GetMemStatus(pszMemLog);
+
+                       if(nRetVal != MIME_TYPE_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][mime_type_ITc] mime_type_get_mime_type failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, mime_type_GetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][mime_type_ITc] mime_type : %s " , __LINE__, pcMime_type);
+                       }
+                       free(pcMime_type);
+               }
+
+               VALIDATE_RESULT_API(nFailCount, "mime_type_get_mime_type", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(mime_type_get_mime_type, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(mime_type_get_mime_type, pszMemLog);
+#endif
+               FREE_MEMORY_2ARGS(pszSpeedLog,pszMemLog);
+
+       return 0;
+}
+
+/** @} */ //end of itc-mime-type
+/** @} */ //end of itc-mime-type-testcases
\ No newline at end of file
diff --git a/src/itc/mime-type/tct-mime-type-native.c b/src/itc/mime-type/tct-mime-type-native.c
new file mode 100755 (executable)
index 0000000..dae60b6
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-mime-type-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/mime-type/tct-mime-type-native.h b/src/itc/mime-type/tct-mime-type-native.h
new file mode 100755 (executable)
index 0000000..e77f475
--- /dev/null
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_MIME_TYPE_NATIVE_H__
+#define __TCT_MIME_TYPE_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_mime_type_startup(void);
+extern void ITs_mime_type_cleanup(void);
+
+extern int ITc_mime_type_get_file_extension_p(void);
+extern int ITc_mime_type_get_mime_type_p(void);
+
+testcase tc_array[] = {
+    {"ITc_mime_type_get_file_extension_p", ITc_mime_type_get_file_extension_p, ITs_mime_type_startup, ITs_mime_type_cleanup},
+    {"ITc_mime_type_get_mime_type_p", ITc_mime_type_get_mime_type_p, ITs_mime_type_startup, ITs_mime_type_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_MIME_TYPE_NATIVE_H__
diff --git a/src/itc/native-common/CMakeLists.txt b/src/itc/native-common/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..1a7a08e
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "native-common")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-base-common")
+SET(TC_SOURCES
+       ITs-native-common-common.c
+       ITs-native-common.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/native-common/ITs-native-common-common.c b/src/itc/native-common/ITs-native-common-common.c
new file mode 100755 (executable)
index 0000000..071bd56
--- /dev/null
@@ -0,0 +1,228 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-native-common-common.h"
+
+/** @addtogroup itc-native-common
+* @ingroup             itc
+* @{
+*/
+
+//Add helper function definitions here
+
+/**
+* @function            NativeCommonGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* NativeCommonGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch (nRet)
+       {
+       case TIZEN_ERROR_NONE:                                                          szErrorVal = "TIZEN_ERROR_NONE";                                                        break;          /* Successful */
+       case TIZEN_ERROR_NOT_PERMITTED:                                         szErrorVal = "TIZEN_ERROR_NOT_PERMITTED";                                       break;          /* Operation not permitted */
+       case TIZEN_ERROR_NO_SUCH_FILE:                                          szErrorVal = "TIZEN_ERROR_NO_SUCH_FILE";                                        break;          /* No such file or directory */
+       case TIZEN_ERROR_NO_SUCH_PROCESS:                                       szErrorVal = "TIZEN_ERROR_NO_SUCH_PROCESS";                                     break;          /* No such process */
+       case TIZEN_ERROR_INTERRUPTED_SYS_CALL:                          szErrorVal = "TIZEN_ERROR_INTERRUPTED_SYS_CALL";                        break;          /* Interrupted system call */
+       case TIZEN_ERROR_IO_ERROR:                                                      szErrorVal = "TIZEN_ERROR_IO_ERROR";                                            break;          /* I/O error */
+       case TIZEN_ERROR_NO_SUCH_DEVICE:                                        szErrorVal = "TIZEN_ERROR_NO_SUCH_DEVICE";                                      break;          /* No such device or address */
+       case TIZEN_ERROR_ARGUMENT_LIST_TOO_LONG:                        szErrorVal = "TIZEN_ERROR_ARGUMENT_LIST_TOO_LONG";                      break;          /* Argument list too long */
+       case TIZEN_ERROR_EXEC_FORMAT_ERROR:                                     szErrorVal = "TIZEN_ERROR_EXEC_FORMAT_ERROR";                           break;          /* Exec format error */
+       case TIZEN_ERROR_BAD_FILE_NUMBER:                                       szErrorVal = "TIZEN_ERROR_BAD_FILE_NUMBER";                                     break;          /* Bad file number */
+       //case TIZEN_ERROR_TRY_AGAIN:                                                   szErrorVal = "TIZEN_ERROR_TRY_AGAIN";                                   break;          /* Try again */
+       case TIZEN_ERROR_OUT_OF_MEMORY:                                         szErrorVal = "TIZEN_ERROR_OUT_OF_MEMORY";                                       break;          /* Out of memory */
+       case TIZEN_ERROR_PERMISSION_DENIED:                                     szErrorVal = "TIZEN_ERROR_PERMISSION_DENIED";                           break;          /* Permission denied */
+       case TIZEN_ERROR_BAD_ADDRESS:                                           szErrorVal = "TIZEN_ERROR_BAD_ADDRESS";                                         break;          /* Bad address */
+       case TIZEN_ERROR_BLOCK_DEVICE_REQUIRED:                         szErrorVal = "TIZEN_ERROR_BLOCK_DEVICE_REQUIRED";                       break;          /* Block device required */
+       case TIZEN_ERROR_RESOURCE_BUSY:                                         szErrorVal = "TIZEN_ERROR_RESOURCE_BUSY";                                       break;          /* Device or resource busy */
+       case TIZEN_ERROR_FILE_EXISTS:                                           szErrorVal = "TIZEN_ERROR_FILE_EXISTS";                                         break;          /* File exists */
+       case TIZEN_ERROR_CROSS_DEVICE_LINK:                                     szErrorVal = "TIZEN_ERROR_CROSS_DEVICE_LINK";                           break;          /* Cross-device link */
+       case TIZEN_ERROR_NOT_A_DIRECTORY:                                       szErrorVal = "TIZEN_ERROR_NOT_A_DIRECTORY";                                     break;          /* Not a directory */
+       case TIZEN_ERROR_IS_A_DIRECTORY:                                        szErrorVal = "TIZEN_ERROR_IS_A_DIRECTORY";                                      break;          /* Is a directory */
+       case TIZEN_ERROR_INVALID_PARAMETER:                                     szErrorVal = "TIZEN_ERROR_INVALID_PARAMETER";                           break;          /* Invalid function parameter */
+       case TIZEN_ERROR_FILE_TABLE_OVERFLOW:                           szErrorVal = "TIZEN_ERROR_FILE_TABLE_OVERFLOW";                         break;          /* File table overflow */
+       case TIZEN_ERROR_TOO_MANY_OPEN_FILES:                           szErrorVal = "TIZEN_ERROR_TOO_MANY_OPEN_FILES";                         break;          /* Too many open files */
+       case TIZEN_ERROR_TOO_NOT_A_TERMINAL:                            szErrorVal = "TIZEN_ERROR_TOO_NOT_A_TERMINAL";                          break;          /* Not a terminal */
+       case TIZEN_ERROR_TOO_TEXT_FILE_BUSY:                            szErrorVal = "TIZEN_ERROR_TOO_TEXT_FILE_BUSY";                          break;          /* Not a terminal */
+       case TIZEN_ERROR_FILE_TOO_LARGE:                                        szErrorVal = "TIZEN_ERROR_FILE_TOO_LARGE";                                      break;          /* File too large */
+       case TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE:                       szErrorVal = "TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE";                     break;          /* No space left on device */
+       case TIZEN_ERROR_ILLEGAL_SEEK:                                          szErrorVal = "TIZEN_ERROR_ILLEGAL_SEEK";                                        break;          /* Illegal seek */
+       case TIZEN_ERROR_READ_ONLY_FILESYSTEM:                          szErrorVal = "TIZEN_ERROR_READ_ONLY_FILESYSTEM";                        break;          /* Read-only file system */
+       case TIZEN_ERROR_NO_DATA:                                                       szErrorVal = "TIZEN_ERROR_NO_DATA";                                                     break;          /* No data available */
+       case TIZEN_ERROR_TOO_MANY_LINKS:                                        szErrorVal = "TIZEN_ERROR_TOO_MANY_LINKS";                                      break;          /* Too many links */
+       case TIZEN_ERROR_BROKEN_PIPE:                                           szErrorVal = "TIZEN_ERROR_BROKEN_PIPE";                                         break;          /* Broken pipe */
+       case TIZEN_ERROR_ARGUMENT_OUT_OF_DOMAIN:                        szErrorVal = "TIZEN_ERROR_ARGUMENT_OUT_OF_DOMAIN";                      break;          /* Math argument out of domain of func */
+       case TIZEN_ERROR_RESULT_OUT_OF_RANGE:                           szErrorVal = "TIZEN_ERROR_RESULT_OUT_OF_RANGE";                         break;          /* Math result not representable */
+       case TIZEN_ERROR_WOULD_CAUSE_DEADLOCK:                          szErrorVal = "TIZEN_ERROR_WOULD_CAUSE_DEADLOCK";                        break;          /* Resource deadlock would occur */
+       case TIZEN_ERROR_FILE_NAME_TOO_LONG:                            szErrorVal = "TIZEN_ERROR_FILE_NAME_TOO_LONG";                          break;          /* File name too long */
+       case TIZEN_ERROR_FILE_NO_LOCKS_AVAILABLE:                       szErrorVal = "TIZEN_ERROR_FILE_NO_LOCKS_AVAILABLE";                     break;          /* No record locks available */
+       case TIZEN_ERROR_INVALID_OPERATION:                                     szErrorVal = "TIZEN_ERROR_INVALID_OPERATION";                           break;          /* Function not implemented */
+       case TIZEN_ERROR_DIR_NOT_EMPTY:                                         szErrorVal = "TIZEN_ERROR_DIR_NOT_EMPTY";                                       break;          /* Directory not empty */
+       case TIZEN_ERROR_TOO_MANY_SYMBOLIC_LINKS:                       szErrorVal = "TIZEN_ERROR_TOO_MANY_SYMBOLIC_LINKS";                     break;          /* Too many symbolic links encountered */
+       case TIZEN_ERROR_WOULD_BLOCK:                                           szErrorVal = "TIZEN_ERROR_WOULD_BLOCK or TIZEN_ERROR_TRY_AGAIN";                break;          /* Operation would block */
+       case TIZEN_ERROR_CORRUPTED_SHARED_LIB:                          szErrorVal = "TIZEN_ERROR_CORRUPTED_SHARED_LIB";                        break;          /* Accessing a corrupted shared library */
+       case TIZEN_ERROR_LIB_SECTION_CORRUPTED:                         szErrorVal = "TIZEN_ERROR_LIB_SECTION_CORRUPTED";                       break;          /* .lib section in a.out corrupted */
+       case TIZEN_ERROR_LINK_TOO_MANY_SHARED_LIB:                      szErrorVal = "TIZEN_ERROR_LINK_TOO_MANY_SHARED_LIB";            break;          /* Attempting to link in too many shared libraries */
+       case TIZEN_ERROR_SHARED_LIB_EXEC:                                       szErrorVal = "TIZEN_ERROR_SHARED_LIB_EXEC";                                     break;          /* Cannot exec a shared library directly */
+       case TIZEN_ERROR_ILLEGAL_BYTE_SEQ:                                      szErrorVal = "TIZEN_ERROR_ILLEGAL_BYTE_SEQ";                            break;          /* Illegal byte sequence */
+       case TIZEN_ERROR_SYSTEM_CALL_RESTART:                           szErrorVal = "TIZEN_ERROR_SYSTEM_CALL_RESTART";                         break;          /* Interrupted system call should be restarted */
+       case TIZEN_ERROR_STREAMS_PIPE:                                          szErrorVal = "TIZEN_ERROR_STREAMS_PIPE";                                        break;          /* Streams pipe error */
+       case TIZEN_ERROR_TOO_MANY_USERS:                                        szErrorVal = "TIZEN_ERROR_TOO_MANY_USERS";                                      break;          /* Too many users */
+       case TIZEN_ERROR_NON_SOCKET:                                            szErrorVal = "TIZEN_ERROR_NON_SOCKET";                                          break;          /* Socket operation on non-socket */
+       case TIZEN_ERROR_NO_DEST_ADDRESS:                                       szErrorVal = "TIZEN_ERROR_NO_DEST_ADDRESS";                                     break;          /* Destination address required */
+       case TIZEN_ERROR_MSG_TOO_LONG:                                          szErrorVal = "TIZEN_ERROR_MSG_TOO_LONG";                                        break;          /* Message too long */
+       case TIZEN_ERROR_PROTOCOL_WRONG_TYPE:                           szErrorVal = "TIZEN_ERROR_PROTOCOL_WRONG_TYPE";                         break;          /* Protocol wrong type for socket */
+       case TIZEN_ERROR_PROTOCOL_NOT_AVALIABLE:                        szErrorVal = "TIZEN_ERROR_PROTOCOL_NOT_AVALIABLE";                      break;          /* Protocol not available */
+       case TIZEN_ERROR_PROTOCOL_NOT_SUPPORTED:                        szErrorVal = "TIZEN_ERROR_PROTOCOL_NOT_SUPPORTED";                      break;          /* Protocol not supported */
+       case TIZEN_ERROR_SOCKET_TYPE_NOT_SUPPORTED:                     szErrorVal = "TIZEN_ERROR_SOCKET_TYPE_NOT_SUPPORTED";           break;          /* Socket type not supported */
+       case TIZEN_ERROR_ENDPOINT_OPERATIN_NOT_SUPPORTED:       szErrorVal = "TIZEN_ERROR_ENDPOINT_OPERATIN_NOT_SUPPORTED";     break;          /* Operation not supported on transport endpoint */
+       case TIZEN_ERROR_PROTOCOL_FAMILY_NOT_SUPPORTED:         szErrorVal = "TIZEN_ERROR_PROTOCOL_FAMILY_NOT_SUPPORTED";       break;          /* Protocol family not supported */
+       case TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED:          szErrorVal = "TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED";        break;          /* Address family not supported by protocol */
+       case TIZEN_ERROR_ADDRES_IN_USE:                                         szErrorVal = "TIZEN_ERROR_ADDRES_IN_USE";                                       break;          /* Address already in use */
+       case TIZEN_ERROR_CANNOT_ASSIGN_ADDRESS:                         szErrorVal = "TIZEN_ERROR_CANNOT_ASSIGN_ADDRESS";                       break;          /* Cannot assign requested address */
+       case TIZEN_ERROR_NETWORK_DOWN:                                          szErrorVal = "TIZEN_ERROR_NETWORK_DOWN";                                        break;          /* Network is down */
+       case TIZEN_ERROR_NETWORK_UNREACHABLE:                           szErrorVal = "TIZEN_ERROR_NETWORK_UNREACHABLE";                         break;          /* Network is unreachable */
+       case TIZEN_ERROR_NETWORK_RESET:                                         szErrorVal = "TIZEN_ERROR_NETWORK_RESET";                                       break;          /* Network dropped connection because of reset */
+       case TIZEN_ERROR_CONNECTION_ABORTED:                            szErrorVal = "TIZEN_ERROR_CONNECTION_ABORTED";                          break;          /* Software caused connection abort */
+       case TIZEN_ERROR_CONNECTION_RESET_BY_PEER:                      szErrorVal = "TIZEN_ERROR_CONNECTION_RESET_BY_PEER";            break;          /* Connection reset by peer */
+       case TIZEN_ERROR_BUFFER_SPACE:                                          szErrorVal = "TIZEN_ERROR_BUFFER_SPACE";                                        break;          /* No buffer space available */
+       case TIZEN_ERROR_ENDPOINT_CONNECTED:                            szErrorVal = "TIZEN_ERROR_ENDPOINT_CONNECTED";                          break;          /* Transport endpoint is already connected */
+       case TIZEN_ERROR_ENDPOINT_NOT_CONNECTED:                        szErrorVal = "TIZEN_ERROR_ENDPOINT_NOT_CONNECTED";                      break;          /* Transport endpoint is not connected */
+       case TIZEN_ERROR_ENDPOINT_SHUTDOWN:                                     szErrorVal = "TIZEN_ERROR_ENDPOINT_SHUTDOWN";                           break;          /* Cannot send after transport endpoint shutdown */
+       case TIZEN_ERROR_TOO_MANY_REFERENCES:                           szErrorVal = "TIZEN_ERROR_TOO_MANY_REFERENCES";                         break;          /* Too many references: cannot splice */
+       case TIZEN_ERROR_CONNECTION_TIME_OUT:                           szErrorVal = "TIZEN_ERROR_CONNECTION_TIME_OUT";                         break;          /* Connection timed out */
+       case TIZEN_ERROR_CONNECTION_REFUSED:                            szErrorVal = "TIZEN_ERROR_CONNECTION_REFUSED";                          break;          /* Connection refused */
+       case TIZEN_ERROR_HOST_DOWN:                                                     szErrorVal = "TIZEN_ERROR_HOST_DOWN";                                           break;          /* Host is down */
+       case TIZEN_ERROR_NO_ROUTE_TO_HOST:                                      szErrorVal = "TIZEN_ERROR_NO_ROUTE_TO_HOST";                            break;          /* No route to host */
+       case TIZEN_ERROR_ALREADY_IN_PROGRESS:                           szErrorVal = "TIZEN_ERROR_ALREADY_IN_PROGRESS";                         break;          /* Operation already in progress */
+       case TIZEN_ERROR_NOW_IN_PROGRESS:                                       szErrorVal = "TIZEN_ERROR_NOW_IN_PROGRESS";                                     break;          /* Operation now in progress */
+       case TIZEN_ERROR_STALE_NFS_FILE_HANDLE:                         szErrorVal = "TIZEN_ERROR_STALE_NFS_FILE_HANDLE";                       break;          /* Stale NFS file handle */
+       case TIZEN_ERROR_STRUCTURE_UNCLEAN:                                     szErrorVal = "TIZEN_ERROR_STRUCTURE_UNCLEAN";                           break;          /* Structure needs cleaning */
+       case TIZEN_ERROR_NOT_XENIX_NAMED_TYPE_FILE:                     szErrorVal = "TIZEN_ERROR_NOT_XENIX_NAMED_TYPE_FILE";           break;          /* Not a XENIX named type file */
+       case TIZEN_ERROR_NO_XENIX_SEMAPHORES_AVAILABLE:         szErrorVal = "TIZEN_ERROR_NO_XENIX_SEMAPHORES_AVAILABLE";       break;          /* No XENIX semaphores available */
+       case TIZEN_ERROR_IS_NAMED_TYPE_FILE:                            szErrorVal = "TIZEN_ERROR_IS_NAMED_TYPE_FILE";                          break;          /* Is a named type file */
+       case TIZEN_ERROR_REMOTE_IO:                                                     szErrorVal = "TIZEN_ERROR_REMOTE_IO";                                           break;          /* Remote I/O error */
+       case TIZEN_ERROR_QUOTA_EXCEEDED:                                        szErrorVal = "TIZEN_ERROR_QUOTA_EXCEEDED";                                      break;          /* Quota exceeded */
+       case TIZEN_ERROR_NO_MEDIUM:                                                     szErrorVal = "TIZEN_ERROR_NO_MEDIUM";                                           break;          /* No medium found */
+       case TIZEN_ERROR_WRONG_MEDIUM_TYPE:                                     szErrorVal = "TIZEN_ERROR_WRONG_MEDIUM_TYPE";                           break;          /* Wrong medium type */
+       case TIZEN_ERROR_CANCELED:                                                      szErrorVal = "TIZEN_ERROR_CANCELED";                                            break;          /* Operation Canceled */
+       case TIZEN_ERROR_KEY_NOT_AVAILABLE:                                     szErrorVal = "TIZEN_ERROR_KEY_NOT_AVAILABLE";                           break;          /* Required key not available */
+       case TIZEN_ERROR_KEY_EXPIRED:                                           szErrorVal = "TIZEN_ERROR_KEY_EXPIRED";                                         break;          /* Key has expired */
+       case TIZEN_ERROR_KEY_REVOKED:                                           szErrorVal = "TIZEN_ERROR_KEY_REVOKED";                                         break;          /* Key has been revoked */
+       case TIZEN_ERROR_KEY_REJECTED:                                          szErrorVal = "TIZEN_ERROR_KEY_REJECTED";                                        break;          /* Key was rejected by service */
+       case TIZEN_ERROR_OWNER_DEAD:                                            szErrorVal = "TIZEN_ERROR_OWNER_DEAD";                                          break;          /* Owner died (for robust mutexes) */
+       case TIZEN_ERROR_UNKNOWN:                                                       szErrorVal = "TIZEN_ERROR_UNKNOWN";                                                     break;          /* Unknown error */
+       case TIZEN_ERROR_TIMED_OUT:                                                     szErrorVal = "TIZEN_ERROR_TIMED_OUT";                                           break;          /* Time out */
+       case TIZEN_ERROR_NOT_SUPPORTED:                                         szErrorVal = "TIZEN_ERROR_NOT_SUPPORTED";                                       break;          /* Not supported */
+       case TIZEN_ERROR_USER_NOT_CONSENTED:                            szErrorVal = "TIZEN_ERROR_USER_NOT_CONSENTED";                          break;          /* Not Consented */
+       default:                                                                                        szErrorVal = "Unknown Error";                                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function                    NativeCommonGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void NativeCommonGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if ( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if ( stMemInfo.uordblks > g_stNativeCommonMemInfo.uordblks )
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stNativeCommonMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stNativeCommonMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    NativeCommonGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void NativeCommonGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stNativeCommonMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           NativeCommonExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void NativeCommonExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stNativeCommonStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stNativeCommonStartTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           NativeCommonGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stNativeCommonStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void NativeCommonGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stNativeCommonStartTime, NULL);
+#endif
+}
+
+/** @} */ //end of itc-native-common
\ No newline at end of file
diff --git a/src/itc/native-common/ITs-native-common-common.h b/src/itc/native-common/ITs-native-common-common.h
new file mode 100755 (executable)
index 0000000..73260db
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_NATIVE_COMMON_COMMON_H_
+#define _ITS_NATIVE_COMMON_COMMON_H_
+
+#include "assert.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <malloc.h>    
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+//Add test package related includes here
+#include <tizen.h>
+
+/** @addtogroup itc-native-common
+* @ingroup             itc
+* @{
+*/
+
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define TIMEOUT_CB                                     5000
+
+FILE *g_fpLog;
+
+struct timeval g_stNativeCommonStartTime;
+struct mallinfo g_stNativeCommonMemInfo;
+
+typedef struct speedmemory
+{
+       char *pszMemLog;
+       char *pszAPI1SpeedLog;
+       char *pszAPI2SpeedLog;
+} NativeCommonSpeedMemoryLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][Native_Common_ITC] Starting test : %s\\n", __LINE__, __FUNCTION__);\
+}
+
+#define PRINT_STABILITY_LOG(api, nFailCount, nTotalCount) \
+       FPRINTF("[Line : %d][Native_Common_ITC] [%s] FAIL-COUNT: %d, NO.OF.ITERATION: %d\\n", __LINE__, #api, nFailCount, nTotalCount);
+       
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF("[Line : %d][Native_Common_ITC] %s passed\\n", __LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][Native_Common_ITC] %s failed, error returned = %s\\n", __LINE__, API, NativeCommonGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define NATIVE_COMMON_INITIALISE_MEM_LOG(nEnumSize) \
+       stSpeedMemoryLog.pszMemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize, sizeof(char));
+
+#define NATIVE_COMMON_INITIALISE_SPEED_LOGS(nEnumSize) {\
+       stSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));\
+       stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));\
+}
+
+#define NATIVE_COMMON_DEINITIALISE_LOGS {\
+       if ( stSpeedMemoryLog.pszMemLog != NULL )\
+       {\
+               free(stSpeedMemoryLog.pszMemLog);\
+               stSpeedMemoryLog.pszMemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI1SpeedLog != NULL )\
+       {\
+               free (stSpeedMemoryLog.pszAPI1SpeedLog);\
+               stSpeedMemoryLog.pszAPI1SpeedLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2SpeedLog != NULL )\
+       {\
+               free (stSpeedMemoryLog.pszAPI2SpeedLog);\
+               stSpeedMemoryLog.pszAPI2SpeedLog = NULL;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if ( nMLogLen > 0 )\
+       {\
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d][Native_Common_ITC] %s_MemoryLeakStatus - %s\\n", __LINE__, #api, memLog);\
+       }
+       
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if ( strlen(speedLog) > 0 )\
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d][Native_Common_ITC] %s_TimeInMicrosec- %s\\n", __LINE__, #api, speedLog);\
+       }
+       
+//Add helper function declarations here
+
+char* NativeCommonGetError(int nRet);
+void NativeCommonGetMemAllocation();
+void NativeCommonExecutionDelay(char* pszAPITime);
+void NativeCommonGetTimeOfDay();
+void NativeCommonGetMemStatus(char *pszAPIMemory);
+
+/** @} */ //end of itc-native-common
+
+#endif  //_ITS_NATIVE_COMMON_COMMON_H_
diff --git a/src/itc/native-common/ITs-native-common.c b/src/itc/native-common/ITs-native-common.c
new file mode 100755 (executable)
index 0000000..7b97ab0
--- /dev/null
@@ -0,0 +1,334 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-native-common-common.h"
+
+/** @addtogroup itc-native-common
+* @ingroup             itc
+* @{
+*/
+
+//& set: NativeCommon
+
+tizen_error_e error_type[] = {
+       TIZEN_ERROR_NONE , /**< Successful */
+       TIZEN_ERROR_NOT_PERMITTED, /**< Operation not permitted */
+       TIZEN_ERROR_NO_SUCH_FILE, /**< No such file or directory */
+       TIZEN_ERROR_NO_SUCH_PROCESS, /**< No such process */
+       TIZEN_ERROR_INTERRUPTED_SYS_CALL, /**< Interrupted system call */
+       TIZEN_ERROR_IO_ERROR, /**< I/O error */
+       TIZEN_ERROR_NO_SUCH_DEVICE, /**< No such device or address */
+       TIZEN_ERROR_ARGUMENT_LIST_TOO_LONG, /**< Argument list too long */
+       TIZEN_ERROR_EXEC_FORMAT_ERROR, /**< Exec format error */
+       TIZEN_ERROR_BAD_FILE_NUMBER, /**< Bad file number */
+       TIZEN_ERROR_TRY_AGAIN, /**< Try again */
+       TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+       TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+       TIZEN_ERROR_BAD_ADDRESS, /**< Bad address */
+       TIZEN_ERROR_BLOCK_DEVICE_REQUIRED, /**< Block device required */
+       TIZEN_ERROR_RESOURCE_BUSY, /**< Device or resource busy */
+       TIZEN_ERROR_FILE_EXISTS, /**< File exists */
+       TIZEN_ERROR_CROSS_DEVICE_LINK, /**< Cross-device link */
+       TIZEN_ERROR_NOT_A_DIRECTORY, /**< Not a directory */
+       TIZEN_ERROR_IS_A_DIRECTORY, /**< Is a directory */
+       TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */
+       TIZEN_ERROR_FILE_TABLE_OVERFLOW, /**< File table overflow */
+       TIZEN_ERROR_TOO_MANY_OPEN_FILES, /**< Too many open files */
+       TIZEN_ERROR_TOO_NOT_A_TERMINAL, /**< Not a terminal */
+       TIZEN_ERROR_TOO_TEXT_FILE_BUSY, /**< Not a terminal */
+       TIZEN_ERROR_FILE_TOO_LARGE, /**< File too large */
+       TIZEN_ERROR_FILE_NO_SPACE_ON_DEVICE, /**< No space left on device */
+       TIZEN_ERROR_ILLEGAL_SEEK, /**< Illegal seek */
+       TIZEN_ERROR_READ_ONLY_FILESYSTEM, /**< Read-only file system */
+       TIZEN_ERROR_NO_DATA, /**< No data available */
+       TIZEN_ERROR_TOO_MANY_LINKS, /**< Too many links */
+       TIZEN_ERROR_BROKEN_PIPE, /**< Broken pipe */
+       TIZEN_ERROR_ARGUMENT_OUT_OF_DOMAIN, /**< Math argument out of domain of func */
+       TIZEN_ERROR_RESULT_OUT_OF_RANGE, /**< Math result not representable */
+       TIZEN_ERROR_WOULD_CAUSE_DEADLOCK, /**< Resource deadlock would occur */
+       TIZEN_ERROR_FILE_NAME_TOO_LONG,/**< File name too long */
+       TIZEN_ERROR_FILE_NO_LOCKS_AVAILABLE, /**< No record locks available */
+       TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented */
+       TIZEN_ERROR_DIR_NOT_EMPTY, /**< Directory not empty */
+       TIZEN_ERROR_TOO_MANY_SYMBOLIC_LINKS, /**< Too many symbolic links encountered */
+       TIZEN_ERROR_WOULD_BLOCK, /**< Operation would block */
+       TIZEN_ERROR_CORRUPTED_SHARED_LIB, /**< Accessing a corrupted shared library */
+       TIZEN_ERROR_LIB_SECTION_CORRUPTED, /**< .lib section in a.out corrupted */
+       TIZEN_ERROR_LINK_TOO_MANY_SHARED_LIB, /**< Attempting to link in too many shared libraries */
+       TIZEN_ERROR_SHARED_LIB_EXEC, /**< Cannot exec a shared library directly */
+       TIZEN_ERROR_ILLEGAL_BYTE_SEQ, /**< Illegal byte sequence */
+       TIZEN_ERROR_SYSTEM_CALL_RESTART, /**< Interrupted system call should be restarted */
+       TIZEN_ERROR_STREAMS_PIPE, /**< Streams pipe error */
+       TIZEN_ERROR_TOO_MANY_USERS, /**< Too many users */
+       TIZEN_ERROR_NON_SOCKET, /**< Socket operation on non-socket */
+       TIZEN_ERROR_NO_DEST_ADDRESS, /**< Destination address required */
+       TIZEN_ERROR_MSG_TOO_LONG, /**< Message too long */
+       TIZEN_ERROR_PROTOCOL_WRONG_TYPE, /**< Protocol wrong type for socket */
+       TIZEN_ERROR_PROTOCOL_NOT_AVALIABLE, /**< Protocol not available */
+       TIZEN_ERROR_PROTOCOL_NOT_SUPPORTED, /**< Protocol not supported */
+       TIZEN_ERROR_SOCKET_TYPE_NOT_SUPPORTED, /**< Socket type not supported */
+       TIZEN_ERROR_ENDPOINT_OPERATIN_NOT_SUPPORTED, /**< Operation not supported on transport endpoint */
+       TIZEN_ERROR_PROTOCOL_FAMILY_NOT_SUPPORTED, /**< Protocol family not supported */
+       TIZEN_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED, /**< Address family not supported by protocol */
+       TIZEN_ERROR_ADDRES_IN_USE, /**< Address already in use */
+       TIZEN_ERROR_CANNOT_ASSIGN_ADDRESS, /**< Cannot assign requested address */
+       TIZEN_ERROR_NETWORK_DOWN, /**< Network is down */
+       TIZEN_ERROR_NETWORK_UNREACHABLE, /**< Network is unreachable */
+       TIZEN_ERROR_NETWORK_RESET, /**< Network dropped connection because of reset */
+       TIZEN_ERROR_CONNECTION_ABORTED, /**< Software caused connection abort */
+       TIZEN_ERROR_CONNECTION_RESET_BY_PEER, /**< Connection reset by peer */
+       TIZEN_ERROR_BUFFER_SPACE, /**< No buffer space available */
+       TIZEN_ERROR_ENDPOINT_CONNECTED, /**< Transport endpoint is already connected */
+       TIZEN_ERROR_ENDPOINT_NOT_CONNECTED, /**< Transport endpoint is not connected */
+       TIZEN_ERROR_ENDPOINT_SHUTDOWN, /**< Cannot send after transport endpoint shutdown */
+       TIZEN_ERROR_TOO_MANY_REFERENCES, /**< Too many references: cannot splice */
+       TIZEN_ERROR_CONNECTION_TIME_OUT, /**< Connection timed out */
+       TIZEN_ERROR_CONNECTION_REFUSED, /**< Connection refused */
+       TIZEN_ERROR_HOST_DOWN, /**< Host is down */
+       TIZEN_ERROR_NO_ROUTE_TO_HOST, /**< No route to host */
+       TIZEN_ERROR_ALREADY_IN_PROGRESS, /**< Operation already in progress */
+       TIZEN_ERROR_NOW_IN_PROGRESS, /**< Operation now in progress */
+       TIZEN_ERROR_STALE_NFS_FILE_HANDLE, /**< Stale NFS file handle */
+       TIZEN_ERROR_STRUCTURE_UNCLEAN, /**< Structure needs cleaning */
+       TIZEN_ERROR_NOT_XENIX_NAMED_TYPE_FILE, /**< Not a XENIX named type file */
+       TIZEN_ERROR_NO_XENIX_SEMAPHORES_AVAILABLE, /**< No XENIX semaphores available */
+       TIZEN_ERROR_IS_NAMED_TYPE_FILE, /**< Is a named type file */
+       TIZEN_ERROR_REMOTE_IO, /**< Remote I/O error */
+       TIZEN_ERROR_QUOTA_EXCEEDED, /**< Quota exceeded */
+       TIZEN_ERROR_NO_MEDIUM, /**< No medium found */
+       TIZEN_ERROR_WRONG_MEDIUM_TYPE, /**< Wrong medium type */
+       TIZEN_ERROR_CANCELED, /**< Operation Canceled */
+       TIZEN_ERROR_KEY_NOT_AVAILABLE, /**< Required key not available */
+       TIZEN_ERROR_KEY_EXPIRED, /**< Key has expired */
+       TIZEN_ERROR_KEY_REVOKED, /**< Key has been revoked */
+       TIZEN_ERROR_KEY_REJECTED, /**< Key was rejected by service */
+       TIZEN_ERROR_OWNER_DEAD, /**< Owner died (for robust mutexes) */
+       TIZEN_ERROR_UNKNOWN, /**< Unknown error */
+       TIZEN_ERROR_TIMED_OUT, /**< Time out */
+       TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
+       TIZEN_ERROR_USER_NOT_CONSENTED, /**< Not Consented */
+       TIZEN_ERROR_END_OF_COLLECTION
+};
+
+/**
+* @function            ITs_native_common_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_native_common_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][Native_Common_ITC] TEST SUIT start-up: ITs_Base_Common_p\\n", __LINE__);
+#endif
+       return;
+}
+
+/**
+* @function            ITs_native_common_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_native_common_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][Native_Common_ITC] TEST SUIT clean-up: ITs_Base_Common_p\\n", __LINE__);
+#endif
+}
+
+/** @addtogroup        itc-native-common-testcases
+* @brief               Integration testcases for module native-common
+* @ingroup             itc-native-common
+* @{
+*/
+
+//& purpose: To set and get the last error code in thread
+//& type: auto
+/**
+* @testcase            ITc_native_common_set_get_last_result_p
+* @since_tizen         2.3
+* @type                        auto
+* @description         To set and get the last error code in thread
+* @scenario                    Set the last error code to be returned in thread\n
+*                                      Get the last error code in thread
+* @apicovered          set_last_result, get_last_result
+* @passcase                    When set_last_result and get_last_result is successful.
+* @failcase                    If target API set_last_result or get_last_result API fails.
+* @precondition                NA
+* @postcondition       NA
+*/
+int ITc_native_common_set_get_last_result_p(void)
+{
+       START_TEST;
+       
+       int nLoopCount = 0;
+       //int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       tizen_error_e nGetResult;
+
+       int enum_size = sizeof(error_type) / sizeof(error_type[0]);
+       int enum_counter = 0;
+
+       NativeCommonSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK       
+       NATIVE_COMMON_INITIALISE_MEM_LOG(enum_size);
+#endif
+
+#if SPEED_CHECK
+       NATIVE_COMMON_INITIALISE_SPEED_LOGS(enum_size);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+               {
+                       NativeCommonGetMemAllocation();
+                       NativeCommonGetTimeOfDay();
+
+                       // Target API
+                       set_last_result(error_type[enum_counter]);
+
+                       NativeCommonExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+
+                       NativeCommonGetTimeOfDay();
+                       
+                       // Target API
+                       nGetResult = get_last_result();
+
+                       NativeCommonExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+                       NativeCommonGetMemStatus(stSpeedMemoryLog.pszMemLog);
+
+                       if ( nGetResult != error_type[enum_counter] )
+                       {
+                               FPRINTF("[Line : %d][Native_Common_ITC] get_last_result return value %s mismatched set_last_result value %s on iteration %d",
+                                       __LINE__, NativeCommonGetError(nGetResult), NativeCommonGetError(error_type[enum_counter]), nLoopCount);
+                               nGetFailCount++;
+                       }
+               }
+       }
+       
+       int nTotalCount = enum_size * MAX_COUNT;
+       //PRINT_STABILITY_LOG(set_last_result, nSetFailCount, nTotalCount);
+       PRINT_STABILITY_LOG(get_last_result, nGetFailCount, nTotalCount);
+
+       if ( /*nSetFailCount > 0 ||*/ nGetFailCount > 0 )
+       {
+               NATIVE_COMMON_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(set_last_result, stSpeedMemoryLog.pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(get_last_result, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_native_common_set_get_last_result, stSpeedMemoryLog.pszMemLog);
+#endif
+
+       NATIVE_COMMON_DEINITIALISE_LOGS;
+       return 0;
+}
+
+//& purpose: To get the last error message in thread
+//& type: auto
+/**
+* @testcase            ITc_native_common_get_error_message_p
+* @since_tizen         2.3
+* @type                        auto
+* @description         To get the last error message in thread
+* @scenario                    Set the last error code to be returned in thread\n
+*                                      Get the last error message in thread
+* @apicovered          get_error_message
+* @passcase                    When get_error_message is successful.
+* @failcase                    If target API get_error_message API fails.
+* @precondition                NA
+* @postcondition       NA
+*/
+int ITc_native_common_get_error_message_p(void)
+{
+       START_TEST;
+       
+       int nLoopCount = 0;
+       int nSetFailCount = 0, nGetFailCount = 0;
+       char* nGetMessage;
+       
+       int enum_size = sizeof(error_type) / sizeof(error_type[0]);
+       int enum_counter = 0;
+
+       NativeCommonSpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+#if MEMORY_CHECK       
+       NATIVE_COMMON_INITIALISE_MEM_LOG(enum_size);
+#endif
+
+#if SPEED_CHECK
+       NATIVE_COMMON_INITIALISE_SPEED_LOGS(enum_size);
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+               {
+                       NativeCommonGetMemAllocation();
+                       NativeCommonGetTimeOfDay();
+
+                       // Target API
+                       nGetMessage = get_error_message(error_type[enum_counter]);
+
+                       NativeCommonExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+                       NativeCommonGetMemStatus(stSpeedMemoryLog.pszMemLog);
+
+                       if ( nGetMessage == NULL )
+                       {
+                               FPRINTF("[Line : %d][Native_Common_ITC] get_error_message returned invalid message %s for error code %s on iteration %d",
+                                       __LINE__, nGetMessage, NativeCommonGetError(error_type[enum_counter]), nLoopCount);
+                               nGetFailCount++;
+                       }
+               }
+       }
+       
+       int nTotalCount = enum_size * MAX_COUNT;
+       PRINT_STABILITY_LOG(get_error_message, nGetFailCount, nTotalCount);
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 )
+       {
+               NATIVE_COMMON_DEINITIALISE_LOGS;
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(get_error_message, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(ITc_native_common_get_error_message, stSpeedMemoryLog.pszMemLog);
+#endif
+
+       NATIVE_COMMON_DEINITIALISE_LOGS;
+       return 0;
+}
+/** @} */ //end of itc-native-common
+/** @} */ //end of itc-native-common-testcases
\ No newline at end of file
diff --git a/src/itc/native-common/tct-native-common-native.c b/src/itc/native-common/tct-native-common-native.c
new file mode 100755 (executable)
index 0000000..6b7900c
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-native-common-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/native-common/tct-native-common-native.h b/src/itc/native-common/tct-native-common-native.h
new file mode 100755 (executable)
index 0000000..40244b3
--- /dev/null
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_NATIVE_COMMON_NATIVE_H__
+#define __TCT_NATIVE_COMMON_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_native_common_startup(void);
+extern void ITs_native_common_cleanup(void);
+
+extern int ITc_native_common_set_get_last_result_p(void);
+extern int ITc_native_common_get_error_message_p(void);
+
+testcase tc_array[] = {
+    {"ITc_native_common_set_get_last_result_p", ITc_native_common_set_get_last_result_p, ITs_native_common_startup, ITs_native_common_cleanup},
+    {"ITc_native_common_get_error_message_p", ITc_native_common_get_error_message_p, ITs_native_common_startup, ITs_native_common_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_NATIVE_COMMON_NATIVE_H__
diff --git a/src/itc/nfc/CMakeLists.txt b/src/itc/nfc/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..08492e4
--- /dev/null
@@ -0,0 +1,39 @@
+SET(PKG_NAME "nfc")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-network-nfc")
+SET(TC_SOURCES
+       ITs-nfc-common.c
+       ITs-nfc-se.c
+       ITs-nfc-ndef.c
+       ITs-nfc-snep.c
+       ITs-nfc-manager.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB} glib-2.0
+       bundle
+       capi-appfw-application
+       capi-system-info 
+       capi-appfw-app-manager
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/nfc/ITs-nfc-common.c b/src/itc/nfc/ITs-nfc-common.c
new file mode 100755 (executable)
index 0000000..0248235
--- /dev/null
@@ -0,0 +1,566 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-nfc-common.h"
+
+/** @addtogroup itc-nfc
+* @ingroup             itc
+* @{
+*/
+
+extern app_control_h g_app_control_handler;
+
+/**
+ * @function           Timeout
+ * @description                Called if some callback is not invoked for a particular timeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */ 
+gboolean Timeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+       }
+       FPRINTF( "\\n [Line : %d] [NFC_ITc] Callback Timeout \\n", __LINE__);
+       return false;
+}
+
+/**
+* @function                    NFCGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* NFCGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case NFC_ERROR_NONE:                                    szErrorVal = "NFC_ERROR_NONE";                                          break;
+       case NFC_ERROR_OUT_OF_MEMORY:                   szErrorVal = "NFC_ERROR_OUT_OF_MEMORY";                         break;
+       case NFC_ERROR_OPERATION_FAILED:                szErrorVal = "NFC_ERROR_OPERATION_FAILED";                      break;
+       case NFC_ERROR_INVALID_PARAMETER:               szErrorVal = "NFC_ERROR_INVALID_PARAMETER";                     break;
+       case NFC_ERROR_INVALID_NDEF_MESSAGE:    szErrorVal = "NFC_ERROR_INVALID_NDEF_MESSAGE";          break;
+       case NFC_ERROR_INVALID_RECORD_TYPE:             szErrorVal = "NFC_ERROR_INVALID_RECORD_TYPE";           break;
+       case NFC_ERROR_TIMED_OUT:                               szErrorVal = "NFC_ERROR_TIMED_OUT";                                     break;   
+       case NFC_ERROR_DEVICE_BUSY:                             szErrorVal = "NFC_ERROR_DEVICE_BUSY";                           break;  
+       case NFC_ERROR_NO_DEVICE:                               szErrorVal = "NFC_ERROR_NO_DEVICE";                                     break;  
+       case NFC_ERROR_NOT_ACTIVATED:                   szErrorVal = "NFC_ERROR_NOT_ACTIVATED";                         break;  
+       case NFC_ERROR_NOT_SUPPORTED:                   szErrorVal = "NFC_ERROR_NOT_SUPPORTED";                         break;  
+       case NFC_ERROR_ALREADY_ACTIVATED:               szErrorVal = "NFC_ERROR_ALREADY_ACTIVATED";                     break;  
+       case NFC_ERROR_ALREADY_DEACTIVATED:             szErrorVal = "NFC_ERROR_ALREADY_DEACTIVATED";           break; 
+       case NFC_ERROR_READ_ONLY_NDEF:                  szErrorVal = "NFC_ERROR_READ_ONLY_NDEF";                        break;  
+       case NFC_ERROR_NO_SPACE_ON_NDEF:                szErrorVal = "NFC_ERROR_NO_SPACE_ON_NDEF";                      break;  
+       case NFC_ERROR_NO_NDEF_MESSAGE:                 szErrorVal = "NFC_ERROR_NO_NDEF_MESSAGE";                       break;  
+       case NFC_ERROR_NOT_NDEF_FORMAT:                 szErrorVal = "NFC_ERROR_NOT_NDEF_FORMAT";                       break;   
+       case NFC_ERROR_SECURITY_RESTRICTED:             szErrorVal = "NFC_ERROR_SECURITY_RESTRICTED";           break; 
+       default:                                                                szErrorVal = "Unknown Error";                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function                    NFCTagFilterEnumString
+* @description         Enumerations for NFC Tag filter
+* @parameter[IN]       nRet: enum value
+* @return                      pszEnumString: enum value as a string
+*/
+char* NFCTagFilterEnumString(int nRet)
+{
+       char *pszEnumString = NULL;
+       switch ( nRet )
+       {
+       case NFC_TAG_FILTER_ALL_DISABLE:                        pszEnumString = "NFC_TAG_FILTER_ALL_DISABLE";                   break;
+       case NFC_TAG_FILTER_ISO14443A_ENABLE:           pszEnumString = "NFC_TAG_FILTER_ISO14443A_ENABLE";              break;
+       case NFC_TAG_FILTER_ISO14443B_ENABLE:           pszEnumString = "NFC_TAG_FILTER_ISO14443B_ENABLE";              break;
+       case NFC_TAG_FILTER_ISO15693_ENABLE:            pszEnumString = "NFC_TAG_FILTER_ISO15693_ENABLE";               break;
+       case NFC_TAG_FILTER_FELICA_ENABLE:                      pszEnumString = "NFC_TAG_FILTER_FELICA_ENABLE";                 break;
+       case NFC_TAG_FILTER_JEWEL_ENABLE:                       pszEnumString = "NFC_TAG_FILTER_JEWEL_ENABLE";                  break;
+       case NFC_TAG_FILTER_IP_ENABLE:                          pszEnumString = "NFC_TAG_FILTER_IP_ENABLE";                             break;
+       case NFC_TAG_FILTER_ALL_ENABLE:                         pszEnumString = "NFC_TAG_FILTER_ALL_ENABLE";                    break;
+       default:                                                                        pszEnumString = "Unknown Filter";                                               break;
+       }
+       return pszEnumString;
+}
+
+/**
+* @function                    NFCSeTypeEnumString
+* @description         Enumerations for NFC Secure Element type
+* @parameter[IN]       nRet: enum value
+* @return                      pszEnumString: enum value as a string
+*/
+char* NFCSeTypeEnumString(int nRet)
+{
+       char *pszEnumString = NULL;
+       switch ( nRet )
+       {
+       case NFC_SE_TYPE_DISABLE:               pszEnumString = "NFC_SE_TYPE_DISABLE";          break;
+       case NFC_SE_TYPE_ESE:                   pszEnumString = "NFC_SE_TYPE_ESE";                      break;
+       case NFC_SE_TYPE_UICC:                  pszEnumString = "NFC_SE_TYPE_UICC";                     break;
+       default:                                                pszEnumString = "UNKNOWN";                                      break;
+       }
+       return pszEnumString;
+}
+
+/**
+* @function                    NFCGetTnfEnumString
+* @description         Maps type enums to string values
+* @parameter[IN]       nRet: enum value
+* @return                      pszEnumString: enum value as a string
+*/
+char* NFCGetTnfEnumString(int nRet)
+{
+       char *pszEnumString = NULL;
+       switch ( nRet )
+       {
+       case NFC_RECORD_TNF_EMPTY:                      pszEnumString = "NFC_RECORD_TNF_EMPTY";                         break;
+       case NFC_RECORD_TNF_WELL_KNOWN:         pszEnumString = "NFC_RECORD_TNF_WELL_KNOWN";            break;
+       case NFC_RECORD_TNF_MIME_MEDIA:         pszEnumString = "NFC_RECORD_TNF_MIME_MEDIA";            break;
+       case NFC_RECORD_TNF_URI:                        pszEnumString = "NFC_RECORD_TNF_URI";                           break;
+       case NFC_RECORD_TNF_EXTERNAL_RTD:       pszEnumString = "NFC_RECORD_TNF_EXTERNAL_RTD";          break;
+       case NFC_RECORD_TNF_UNKNOWN:            pszEnumString = "NFC_RECORD_TNF_UNKNOWN";                       break;
+       case NFC_RECORD_TNF_UNCHAGNED:          pszEnumString = "NFC_RECORD_TNF_UNCHAGNED";                     break;
+       default:                                                        pszEnumString = "Unknown Record";                                       break;
+       }
+       return pszEnumString;
+}
+
+/**
+* @function                    NFCGetEncodeEnumString
+* @description         Maps type enums to string values
+* @parameter[IN]       nRet: enum value
+* @return                      pszEnumString: enum value as a string
+*/
+char * NFCGetEncodeEnumString(int nRet)
+{
+       char *pszEnumString = NULL;
+       switch ( nRet )
+       {
+       case NFC_ENCODE_UTF_8:          pszEnumString = "NFC_ENCODE_UTF_8";             break;
+       case NFC_ENCODE_UTF_16:         pszEnumString = "NFC_ENCODE_UTF_16";    break;
+       default:                                        pszEnumString = "Unknown Encoding";             break;
+       }
+       return pszEnumString;
+}
+
+/**
+* @function                    NFCGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void NFCGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+               
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+               
+               if(stMemInfo.uordblks > g_stNFCMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stNFCMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stNFCMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    NFCGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void NFCGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stNFCMemInfo = mallinfo();
+#endif
+}
+
+/**
+* @function            NFCExecutionDelay
+* @description             Returns a log for a code-block of statements execution delay
+* @parameter[OUT]      pszAPITime [String poniter containg the time difference]
+* @return                      NA
+*
+*/
+void NFCExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+
+       if( pszAPITime != NULL )
+       {       
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+               
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stNFCStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stNFCStartTime.tv_usec;
+               
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }       
+#endif
+}
+
+/**
+* @function            NFCGetTimeOfDay
+* @description         Get time prior to target api call & set it to g_stNFCStartTime
+* @parameter           NA
+* @return              NA
+*
+*/ 
+void NFCGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stNFCStartTime, NULL);
+#endif
+}
+
+/**
+* @function            FreeMemory
+* @description         Function to free the memory allocated
+* @parameter           [in]pszMem1, pszMem2, pszMem3
+* @return                      NA
+*
+*/ 
+void NFCFreeMemory(char *pszMem1, char *pszMem2, char *pszMem3)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+}
+
+/**
+* @function                    NFCCreateMessageRecordHandle
+* @description         Create ndef message handle and ndef record handle
+* @parameter           NA
+* @return                      true or false
+*/ 
+bool NFCCreateMessageRecordHandle(void)
+{
+       int nRetVal = -1;
+
+       nRetVal = nfc_ndef_message_create(&g_hMessage);
+       if (nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_create failed, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               return false;
+       }
+       else if (g_hMessage == NULL)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_message_create' message handle is null \\n", __LINE__);
+               return false;
+       }
+       else
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_create passed \\n", __LINE__);
+       }
+       sleep(2);
+
+       nRetVal = nfc_ndef_record_create_uri(&g_hRecord, URI);
+       if (nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_uri failed, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               return false;
+       }
+       else if (g_hRecord == NULL)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_create_uri', record handle is null. \\n", __LINE__);
+               return false;
+       }
+       else
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_uri passed\\n", __LINE__);
+       }
+       sleep(2);
+       return true;
+}
+
+/**
+* @function                    NFCCreateRecordText
+* @description         Create ndef record text
+* @parameter[IN]       encode_type: NFC_ENCODE_UTF_8 or NFC_ENCODE_UTF_16
+* @parameter[IN]       nEnumCounter: Counter, to display the iteration no in message
+* @return                      true or false
+*/ 
+bool NFCCreateRecordText(nfc_encode_type_e encode_type, int nEnumCounter)
+{
+       int nRetVal = -1;
+       if (encode_type == NFC_ENCODE_UTF_8)
+       {
+               nRetVal = nfc_ndef_record_create_text(&g_hRecord, ENCODE_TEXT, ENCODE_TYPE_UTF8, encode_type);
+       }
+       else
+       {
+               nRetVal = nfc_ndef_record_create_text(&g_hRecord, ENCODE_TEXT, ENCODE_TYPE_UTF16, encode_type);
+       }
+       if (nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_text failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nEnumCounter, NFCGetEncodeEnumString(encode_type), NFCGetError(nRetVal));
+               return false;
+       }
+       else if (g_hRecord == NULL)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_create_text' message handle is null in iteration %d for enum: %s  \\n", __LINE__, nEnumCounter, NFCGetEncodeEnumString(encode_type));
+               return false;
+       }
+       else
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_text passed for enum: %s \\n", __LINE__, NFCGetEncodeEnumString(encode_type));
+       }
+       return true;
+}
+
+/**
+* @function                    NFCDestroyText
+* @description         Create ndef record text
+* @parameter[IN]       encode_type: NFC_ENCODE_UTF_8 or NFC_ENCODE_UTF_16
+* @parameter[IN]       nEnumCounter: Counter, to display the iteration no in message
+* @return                      NA
+*/ 
+void NFCDestroyText(nfc_encode_type_e encode_type, int nEnumCounter)
+{
+       int nRetVal = -1;
+       nRetVal = nfc_ndef_record_destroy(g_hRecord);
+       if ( nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_destroy failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nEnumCounter, NFCGetEncodeEnumString(encode_type), NFCGetError(nRetVal));
+       }
+       else
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_destroy passed for enum: %s \\n", __LINE__, NFCGetEncodeEnumString(encode_type));
+       }
+}
+
+/**
+* @function                    NFCCreateUri
+* @description         Create ndef record for uri
+* @parameter]          NA
+* @return                      true or false
+*/ 
+bool NFCCreateUri(void)
+{
+       int nRetVal = -1;
+       nRetVal = nfc_ndef_record_create_uri(&g_hRecord, URI);
+       if (nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_uri failed, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               return false;
+       }
+       else if (g_hRecord == NULL)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_create_uri', record handle is null. \\n", __LINE__);
+               return false;
+       }
+       else
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_uri passed\\n", __LINE__);
+       }
+       return true;
+}
+
+
+/**
+ * @function           NFCCheckSystemInfoFeatureSupported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool NFCCheckSystemInfoFeatureSupported(char* pszKey)
+{
+       if(NULL == pszKey)
+       {
+               FPRINTF("\\n[Line : %d][NFC_ITc] Null key value passed to function : NFCCheckSystemInfoFeatureSupported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][NFC_ITc] system_info_get_platform_bool returned (error = %s) for (key = %s)",__LINE__, NFCSystemInfoGetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if(false == bValue)
+       {
+               FPRINTF("\\n[Line : %d][NFC_ITc] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][NFC_ITc] system_info_get_platform_bool returned Supported status feature for (key = %s)",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           NFCSystemInfoGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* NFCSystemInfoGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Cannot find key in model config file " ; break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR  : szErrorVal = "Error - An input/output error occurred when read value from model config file " ; break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY   : szErrorVal = "Error - Out of memory  " ; break;
+                       
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            AppControlGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* AppControlGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case APP_CONTROL_ERROR_NONE:                                    szErrorVal = "APP_CONTROL_ERROR_NONE";                                          break;
+       case APP_CONTROL_ERROR_INVALID_PARAMETER:               szErrorVal = "APP_CONTROL_ERROR_INVALID_PARAMETER";                     break;
+       case APP_CONTROL_ERROR_OUT_OF_MEMORY:                   szErrorVal = "APP_CONTROL_ERROR_OUT_OF_MEMORY";                         break;
+       case APP_CONTROL_ERROR_APP_NOT_FOUND:                   szErrorVal = "APP_CONTROL_ERROR_APP_NOT_FOUND";                         break;
+       case APP_CONTROL_ERROR_KEY_NOT_FOUND:                   szErrorVal = "APP_CONTROL_ERROR_KEY_NOT_FOUND";                         break;
+       case APP_CONTROL_ERROR_KEY_REJECTED:                    szErrorVal = "APP_CONTROL_ERROR_KEY_REJECTED";                          break;
+       case APP_CONTROL_ERROR_INVALID_DATA_TYPE:               szErrorVal = "APP_CONTROL_ERROR_INVALID_DATA_TYPE";                     break;
+       case APP_CONTROL_ERROR_LAUNCH_REJECTED:                 szErrorVal = "APP_CONTROL_ERROR_LAUNCH_REJECTED";                       break;
+       case APP_CONTROL_ERROR_PERMISSION_DENIED:               szErrorVal = "APP_CONTROL_ERROR_PERMISSION_DENIED";                     break;
+       case APP_CONTROL_ERROR_LAUNCH_FAILED:                   szErrorVal = "APP_CONTROL_ERROR_LAUNCH_FAILED";                         break;
+       case APP_CONTROL_ERROR_TIMED_OUT:                               szErrorVal = "APP_CONTROL_ERROR_TIMED_OUT";                                     break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            LaunchAppToSendMsg
+* @description         launches application needed for send message
+* @parameter           NA
+* @return                      true : if app is launched successfully, false : if app is not launched
+*/
+bool LaunchApp (char *pszRemoteAppId)
+{
+       bool bIsRunning = false;
+       int nCounter = COUNTER;
+       
+       int nRet = app_control_create(&g_app_control_handler);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] app_control_create fail error returned : %s \\n", __LINE__, API_NAMESPACE , AppControlGetError(nRet));
+               return false;
+       }
+               
+       if ( g_app_control_handler == NULL )
+       {
+               FPRINTF("[Line : %d][%s] app_control_create fail created handle value null \\n", __LINE__, API_NAMESPACE);
+               app_control_destroy(g_app_control_handler);
+               return false;
+       }
+       
+       nRet = app_control_set_app_id(g_app_control_handler , pszRemoteAppId);
+       if ( nRet != APP_CONTROL_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] app_control_set_app_id fail error returned : %s \\n", __LINE__, API_NAMESPACE , AppControlGetError(nRet));
+               app_control_destroy(g_app_control_handler);
+               return false;
+       }
+       
+       do {
+
+               nRet = app_manager_is_running(pszRemoteAppId, &bIsRunning);
+               if(nRet == APP_MANAGER_ERROR_NONE)
+               {
+                       if (!bIsRunning) {
+                               nRet = app_control_send_launch_request(g_app_control_handler , NULL , NULL);
+                               if ( nRet != APP_CONTROL_ERROR_NONE )
+                               {
+                                       sleep(1);
+                               }                               
+                       }                       
+               }
+
+       } while (--nCounter > 0 && !bIsRunning);
+       
+       if ( !bIsRunning )
+       {
+               FPRINTF("[Line : %d][%s] app_control_send_launch_request failed \\n", __LINE__, API_NAMESPACE);
+               app_control_destroy(g_app_control_handler);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            TerminateApp
+* @description         terminates application launched for sending message
+* @parameter           NA
+* @return                      NA
+*/
+void TerminateApp()
+{
+       app_control_send_terminate_request(g_app_control_handler);
+       app_control_destroy(g_app_control_handler);     
+}
+
+/** @} */ //end of itc-nfc
\ No newline at end of file
diff --git a/src/itc/nfc/ITs-nfc-common.h b/src/itc/nfc/ITs-nfc-common.h
new file mode 100755 (executable)
index 0000000..0006ddb
--- /dev/null
@@ -0,0 +1,174 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_nfc_COMMON_H_
+#define _ITS_nfc_COMMON_H_
+
+#include "assert.h"
+#include <stdio.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <system_info.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <nfc.h> 
+#include <unistd.h>
+#include <app_manager.h>
+#include <stdlib.h>
+#include <app.h>
+#include <glib-object.h>
+#include <glib-2.0/glib.h>
+
+/** @addtogroup itc-nfc
+* @ingroup             itc
+* @{
+*/
+
+FILE *g_fpLog;
+
+#define API_NAMESPACE                          "ITC_NFC"
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define COUNTER                                        30
+#define MICROSECONDS_PER_SECOND                1000000
+#define TIMEOUT_CB                                     10000
+#define SEAPPIDNAME                                    "org.tizen.testnfclient"
+#define SEAPPIDHEXVALUE                                "6f72672e74697a656e2e746573746e66636c69656e74" // Hex value of org.tizen.testnfclient
+#define ENCODE_TEXT                            "TEST"
+#define ENCODE_TYPE_UTF8                       "en-US"
+#define ENCODE_TYPE_UTF16                      "ko-KR"
+#define URI                                                    "https://www.tizen.org"
+#define SERVICE_ACCESS_NAME                    "urn:nfc:sn:snep"
+#define SERVICE_ACCESS_POINT           4
+#define NFC_FEATURE                 "http://tizen.org/feature/network.nfc"
+#define NFC_CARD_EMULATION_FEATURE  "http://tizen.org/feature/network.nfc.card_emulation"
+#define NFC_HCE_FEATURE                        "http://tizen.org/feature/network.nfc.card_emulation.hce"
+#define NFC_P2P_FEATURE                        "http://tizen.org/feature/network.nfc.p2p"
+#define NFC_TAG_FEATURE                        "http://tizen.org/feature/network.nfc.tag"
+
+bool g_bNFCTestPrecondition;
+bool g_bNFCSupported;
+bool g_bIsSupportedNfc;
+bool g_bNfcNotSupported;
+bool g_bMismatch;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][NFC_ITc] Starting test : %s\\n",__LINE__, __FUNCTION__);\
+       if ( g_bNfcNotSupported )\
+       {\
+               FPRINTF("\\n[Line : %d] [NFC_ITc]  [Not supported]  system_info_get_platform_bool and nfc_manager_is_supported returned Unsupported feature capability for NFC \\n", __LINE__);\
+               return 0;\
+       }\
+       if ( g_bMismatch )\
+       {\
+               FPRINTF("\\n[Line : %d] [NFC_ITc]  system_info_get_platform_bool and nfc_manager_is_supported returned different feature for NFC so leaving test \\n", __LINE__);\
+               return 1;\
+       }\
+       if ( !g_bNFCTestPrecondition )\
+       {\
+               FPRINTF("\\n[Line : %d][NFC_ITc] Precondition api failed so leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+               if (nRetVal == 0)\
+               {\
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc]  %s passed\\n",__LINE__, API);\
+               }\
+               else \
+               {\
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] %s failed, error returned = %s \\n",__LINE__, API, NFCGetError(nRetVal));\
+               }\
+       }
+
+#define PRINT_MEMORY_LOG(api, szMemLog) {\
+       int nMLogLen = strlen(szMemLog);\
+       if(nMLogLen > 0) \
+       {  \
+               szMemLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d][NFC_ITc] %s_MemoryLeakStatus - %s\\n", __LINE__, #api, szMemLog);\
+               free(szMemLog);\
+               szMemLog = NULL;\
+       }\
+}
+       
+#define PRINT_SPEED_LOG(api, szSpeedLog) {\
+       if(strlen(szSpeedLog) > 0) \
+       {\
+               szSpeedLog[strlen(szSpeedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][NFC_ITc] %s_TimeInMicrosec- %s\\n", __LINE__, #api, szSpeedLog);\
+               free(szSpeedLog);\
+               szSpeedLog = NULL;\
+       }\
+}
+
+#define RUN_POLLING_LOOP {\
+       g_pNFCMainLoop = g_main_loop_new(NULL, false);\
+       nTimeoutId = g_timeout_add(TIMEOUT_CB, Timeout, g_pNFCMainLoop);\
+       g_main_loop_run(g_pNFCMainLoop);\
+       g_source_remove(nTimeoutId);\
+       g_pNFCMainLoop = NULL;\
+       }
+       
+#define CHECK_ERROR(szApi, nErrorCount)\
+       if (nRetVal != NFC_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d] [NFC_ITc] %s failed on iteration %d, error returned = %s ", __LINE__, szApi, nLoopCount, NFCGetError(nRetVal));\
+               nErrorCount++;\
+       }\
+       else\
+       {\
+               FPRINTF("\\n[Line : %d] [NFC_ITc] %s passed on iteration %d ", __LINE__, szApi, nLoopCount);\
+       }\
+
+       
+       
+struct mallinfo g_stNFCMemInfo;
+struct timeval g_stNFCStartTime;
+nfc_ndef_message_h g_hMessage;
+nfc_ndef_record_h g_hRecord;   
+gboolean Timeout(gpointer data);
+bool NFCCreateMessageRecordHandle(void);
+bool NFCCreateRecordText(nfc_encode_type_e encode_type, int nEnumCounter);
+void NFCDestroyText(nfc_encode_type_e encode_type, int nEnumCounter);
+bool NFCCreateUri(void);       
+bool NFCCheckSystemInfoFeatureSupported(char* pszKey);
+char* NFCSystemInfoGetError(int nRet);
+char* NFCTagFilterEnumString(int nRet);
+char* NFCSeTypeEnumString(int nRet);
+char* NFCGetError(int nRet);
+char* NFCGetTnfEnumString(int nRet);
+char* NFCGetEncodeEnumString(int nRet);
+void NFCGetMemAllocation();
+void NFCExecutionDelay(char* pszAPITime);
+void NFCGetTimeOfDay();
+void NFCGetMemStatus(char *pszAPIMemory);
+void NFCFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3);
+bool LaunchApp (char *pszRemoteAppId);
+char* AppControlGetError(int nRet);
+void TerminateApp();
+/** @} */ //end of itc-nfc
+
+#endif  //_ITS_nfc_COMMON_H_
diff --git a/src/itc/nfc/ITs-nfc-manager.c b/src/itc/nfc/ITs-nfc-manager.c
new file mode 100755 (executable)
index 0000000..c140c1f
--- /dev/null
@@ -0,0 +1,1229 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-nfc-common.h"
+
+/** @addtogroup itc-nfc
+* @ingroup             itc
+* @{
+*/
+
+//& set: NFC
+
+static GMainLoop *g_pNFCMainLoop;
+bool g_bNFCManagerCallback;
+nfc_se_h g_pstNfcSEHandle = NULL;
+unsigned char *g_pszHCEData = NULL;
+unsigned int g_nHCEDataLen = 0;
+//Callbacks
+
+/**
+* @function            NFCNdefDiscoveredCB
+* @description         Callback function which is invoked when an NDEF Message is discovered
+* @parameter           nfc_ndef_message_h message, void *user_data
+* @return              void
+*/
+static void NFCNdefDiscoveredCB(nfc_ndef_message_h message, void *user_data)
+{
+       FPRINTF( "\\n [Line : %d]  [NFC_ITc] callback invoked \\n", __LINE__);
+       g_bNFCManagerCallback = true;
+       if (g_pNFCMainLoop) 
+       {
+               g_main_loop_quit(g_pNFCMainLoop);
+       } 
+}
+
+/**
+* @function            NFCSeEventCB
+* @description         Callback function which is invoked for receiving Secure Element event
+* @parameter           nfc_se_event_e event, void *user_data
+* @return              void
+*/
+static void NFCSeEventCB(nfc_se_event_e event, void *user_data)
+{
+       FPRINTF( "\\n [Line : %d]  [NFC_ITc] callback invoked \\n", __LINE__);
+}
+
+/**
+* @function            NFCActivationChangedCB
+* @description         Callback function which is invoked when NFC activation state has changed
+* @parameter           bool activated, void *user_data
+* @return              void
+*/
+static void NFCActivationChangedCB(bool activated, void *user_data)
+{
+       FPRINTF( "\\n [Line : %d]  [NFC_ITc] callback invoked \\n", __LINE__);
+}
+
+/**
+* @function            NFCSeTransactionEventCB
+* @description         Callback function which is invoked when receiving Secure Element transaction event data
+* @parameter           nfc_se_type_e se_type, unsigned char *aid, int aid_size, unsigned char *param, int param_size, void *user_data
+* @return              void
+*/
+static void NFCSeTransactionEventCB(nfc_se_type_e se_type, unsigned char *aid, int aid_size, unsigned char *param, int param_size, void *user_data)
+{
+       FPRINTF( "\\n [Line : %d]  [NFC_ITc] callback invoked \\n", __LINE__);
+       g_bNFCManagerCallback = true;
+       switch (se_type)
+       {
+               case NFC_SE_TYPE_DISABLE:
+                       FPRINTF( "\\n [Line : %d]  [NFC_ITc] se_type:  NFC_SE_TYPE_DISABLE \\n", __LINE__);
+                       break;
+
+               case NFC_SE_TYPE_ESE:
+                       FPRINTF( "\\n [Line : %d]  [NFC_ITc] se_type:  NFC_SE_TYPE_ESE \\n", __LINE__);
+                       break;
+
+               case NFC_SE_TYPE_UICC:
+                       FPRINTF( "\\n [Line : %d]  [NFC_ITc] se_type:  NFC_SE_TYPE_UICC \\n", __LINE__);
+                       break;
+                       
+               default:
+                       FPRINTF( "\\n [Line : %d]  [NFC_ITc] No Valid type. \\n", __LINE__);
+                       break;
+       }
+       if (g_pNFCMainLoop) 
+       {
+               g_main_loop_quit(g_pNFCMainLoop);
+       } 
+}
+
+/**
+* @function            NFCTagDiscoveredCB
+* @description         Callback function which is invoked when NFC tag appears or disappears
+* @parameter           nfc_discovered_type_e type, nfc_tag_h tag, void *user_data
+* @return              void
+*/
+static void NFCTagDiscoveredCB(nfc_discovered_type_e type, nfc_tag_h tag, void *user_data)
+{
+       FPRINTF( "\\n [Line : %d]  [NFC_ITc] callback invoked \\n", __LINE__);
+       g_bNFCManagerCallback = true;
+       switch (type)
+       {
+               case NFC_DISCOVERED_TYPE_ATTACHED:
+                       FPRINTF( "\\n [Line : %d]  [NFC_ITc] type:  NFC_DISCOVERED_TYPE_ATTACHED \\n", __LINE__);
+                       break;
+
+               case NFC_DISCOVERED_TYPE_DETACHED:
+                       FPRINTF( "\\n [Line : %d]  [NFC_ITc] type:  NFC_DISCOVERED_TYPE_DETACHED \\n", __LINE__);
+                       break;
+
+               default:
+                       FPRINTF( "\\n [Line : %d]  [NFC_ITc] No Valid type. \\n", __LINE__);
+                       break;
+       }
+       if (g_pNFCMainLoop) 
+       {
+               g_main_loop_quit(g_pNFCMainLoop);
+       } 
+}
+
+/**
+* @function            NFCP2PTargetDiscoveredCB
+* @description         Callback function which is invoked when NFC peer-to-peer target appeared or disappeared
+* @parameter           nfc_discovered_type_e type, nfc_p2p_target_h target, void *user_data
+* @return              void
+*/
+static void NFCP2PTargetDiscoveredCB(nfc_discovered_type_e type, nfc_p2p_target_h target, void *user_data)
+{
+       FPRINTF( "\\n [Line : %d]  [NFC_ITc] callback invoked \\n", __LINE__);
+       g_bNFCManagerCallback = true;
+       switch (type)
+       {
+               case NFC_DISCOVERED_TYPE_ATTACHED:
+                       FPRINTF( "\\n [Line : %d]  [NFC_ITc] type:  NFC_SE_TYPE_DISABLE \\n", __LINE__);
+                       break;
+
+               case NFC_DISCOVERED_TYPE_DETACHED:
+                       FPRINTF( "\\n [Line : %d]  [NFC_ITc] type:  NFC_SE_TYPE_ESE \\n", __LINE__);
+                       break;
+
+               default:
+                       FPRINTF( "\\n [Line : %d]  [NFC_ITc] No Valid type. \\n", __LINE__);
+                       break;
+       }
+       if (g_pNFCMainLoop) 
+       {
+               g_main_loop_quit(g_pNFCMainLoop);
+       } 
+}
+
+
+/**
+* @function            NfcHCEEventCallback
+* @description         Callback function which is invoked for receiving Secure Element event
+* @parameter           handle : nfc handle, event : HCE event, apdu : bytes array of apdu command data, apdu_len : size of apdu command, user_data : user data
+* @return              void
+*/
+static void NfcHCEEventCallback (nfc_se_h handle, nfc_hce_event_type_e event, unsigned char *apdu, unsigned int apdu_len, void *user_data)
+{
+       FPRINTF( "\\n [Line : %d] [NFC_ITc] NfcHCEEventCallback callback invoked \\n", __LINE__);
+       g_pstNfcSEHandle = handle;
+       g_nHCEDataLen = apdu_len;
+       g_pszHCEData = apdu;
+}
+
+
+/**
+* @function            ITs_nfc_manager_startup
+* @description         Called before each test, Check whether NFC is supported or not and initialize the NFC manager.
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_nfc_manager_startup(void)
+{
+       struct stat buf;   
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }       
+       
+       g_bNfcNotSupported = false;
+       g_bMismatch = false;
+       g_bIsSupportedNfc = NFCCheckSystemInfoFeatureSupported(NFC_FEATURE);    
+       if(!g_bIsSupportedNfc)
+       {
+               if( !( nfc_manager_is_supported() ) )
+               {
+                       g_bNfcNotSupported = true;
+                       return;
+               }
+               g_bMismatch = true;
+               return;
+       } 
+                       
+       int nRetVal = nfc_manager_initialize();
+       if ( nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc_manager_initialize failed in startup, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               g_bNFCTestPrecondition = false;
+               return;
+       }       
+       FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc_manager_initialize successfully \\n",__LINE__);
+       g_bNFCTestPrecondition = true;
+       
+       return;
+}
+
+/**
+* @function            ITs_nfc_manager_cleanup
+* @description         Called after each test, deinitialize the NFC manager.
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_nfc_manager_cleanup(void)
+{
+    if(g_bNFCTestPrecondition)
+       {
+               int nRetVal = nfc_manager_deinitialize();
+               if ( nRetVal != 0 )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_deinitialize failed in cleanup, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               }
+       }
+       else if (g_bNfcNotSupported && g_bMismatch)
+       {
+               FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc manager was not initialized initially \\n",__LINE__);
+       }
+       return;
+}
+
+/** @addtogroup        itc-nfc-testcases
+* @brief               Integration testcases for module nfc
+* @ingroup             itc-nfc
+* @{
+*/
+
+//& purpose: Check if nfc is supported. 
+//& type: auto 
+/**
+* @testcase                            ITc_nfc_is_supported_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Check if NFC is supported
+* @scenario                                    Check if NFC is supported
+* @apicovered                          nfc_manager_is_supported                                                
+* @passcase                                    Always pass if API does not crash, just prints if NFC is supported or not.
+* @failcase                                    If nfc_manager_is_supported crashes or throws exception.
+* @precondition                                N/A
+* @postcondition                       N/A
+*/
+int ITc_nfc_is_supported_p(void)
+{
+       START_TEST;
+       bool bRetVal = -1;
+       int nLoopCount = 0;
+       char *pszGetMemLog   = NULL;
+       char *pszGetSpeedLog = NULL;
+
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               bRetVal = nfc_manager_is_supported(); // Target API
+               NFCExecutionDelay(pszGetSpeedLog);
+               NFCGetMemStatus(pszGetMemLog);
+               if (bRetVal)
+               {
+                       FPRINTF("\\n[Line : %d][NFC_ITc] NFC is supported on the device\\n", __LINE__);
+               }
+               else 
+               {
+                       FPRINTF("\\n[Line : %d][NFC_ITc] NFC is not supported on the device\\n", __LINE__);
+               }
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_is_supported, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_is_supported, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+
+//& purpose: To initialize and deinitialize the NFC Manager
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_initialize_deinitialize_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     To initialize and deinitialize the NFC Manager
+* @scenario                                Initialize the NFC Manager\n
+*                                                      Deinitialize the NFC Manager
+* @apicovered                          nfc_manager_initialize, nfc_manager_deinitialize
+* @passcase                                    When nfc_manager_initialize and nfc_manager_deinitialize are successful
+* @failcase                                    When nfc_manager_initialize or nfc_manager_deinitialize fails
+* @precondition                                N/A
+* @postcondition                       N/A
+*/
+int ITc_nfc_manager_initialize_deinitialize_p(void)
+{
+    START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszAvailMemLog   = NULL;
+       char *pszInitSpeedLog = NULL;
+       char *pszDeinitSpeedLog = NULL;
+       int nInitFailCount = 0;
+       int nDeinitFailCount = 0;
+
+       nRetVal = nfc_manager_deinitialize();
+       if ( nRetVal != 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_deinitialize failed, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               return 1;
+       }
+       usleep(MICROSECONDS_PER_SECOND);
+       
+#if MEMORY_CHECK
+       pszAvailMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszInitSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszDeinitSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_manager_initialize(); // Target API
+               NFCExecutionDelay(pszInitSpeedLog);
+               if(nRetVal != 0)        
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc]  nfc_manager_initialize failed on iteration %d, error returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+                       nInitFailCount++;
+                       continue;
+               }               
+
+               usleep(MICROSECONDS_PER_SECOND);
+               NFCGetTimeOfDay();
+               nRetVal = nfc_manager_deinitialize(); // Target API
+               NFCExecutionDelay(pszDeinitSpeedLog);
+               NFCGetMemStatus(pszAvailMemLog);
+               if ( nRetVal != 0 )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_deinitialize failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nDeinitFailCount++;
+               }
+       }
+       usleep(MICROSECONDS_PER_SECOND);
+       nRetVal = nfc_manager_initialize();
+       PRINT_RESULT(nRetVal, "nfc_manager_initialize");
+
+       if ( nInitFailCount > 0 || nDeinitFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_initialize failed %d times, nfc_manager_deinitialize failed %d times out of %d times ", __LINE__, nInitFailCount, nDeinitFailCount, MAX_COUNT);
+               NFCFreeMemory(pszAvailMemLog, pszInitSpeedLog, pszDeinitSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_initialize, pszInitSpeedLog);
+       PRINT_SPEED_LOG(nfc_manager_deinitialize, pszDeinitSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_initialize_deinitialize, pszAvailMemLog);
+#endif
+
+       NFCFreeMemory(pszAvailMemLog, pszInitSpeedLog, pszDeinitSpeedLog);
+       return 0;
+}
+
+
+//& purpose: Check if nfc is activated. 
+//& type: auto 
+/**
+* @testcase                            ITc_nfc_is_activated_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Check if NFC is activated
+* @scenario                                    Check if NFC is activated
+* @apicovered                          nfc_manager_is_activated                                                
+* @passcase                                    Always pass if API does not crash, just prints if NFC is activated or not.
+* @failcase                                    If nfc_manager_is_supported crashes or throws exception.
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_is_activated_p(void)
+{
+       START_TEST;
+       bool bRetVal = -1;
+       int nLoopCount = 0;
+       char *pszGetMemLog   = NULL;
+       char *pszGetSpeedLog = NULL;
+
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               bRetVal = nfc_manager_is_activated(); // Target API
+               NFCExecutionDelay(pszGetSpeedLog);
+               NFCGetMemStatus(pszGetMemLog);
+               if (bRetVal)
+               {
+                       FPRINTF("\\n[Line : %d][NFC_ITc] NFC is activated \\n", __LINE__);
+               }
+               else 
+               {
+                       FPRINTF("\\n[Line : %d][NFC_ITc] NFC is not activated \\n", __LINE__);
+               }
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_is_activated, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_is_activated, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+
+//& purpose: To set and get the state of the system handler. 
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_nfc_manager_system_handler_enable_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     To set and get the state of the system handler
+* @scenario                                Set the state of the system handler\n
+*                           Get the state of the system handler
+* @apicovered                          nfc_manager_set_system_handler_enable, nfc_manager_is_system_handler_enabled
+* @passcase                                    When nfc_manager_set_system_handler_enable is successful and get state matches the state which was set
+* @failcase                                    When nfc_manager_set_system_handler_enable fails or get state mismatches the state which was set
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_manager_nfc_manager_system_handler_enable_p(void)
+{
+    START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       bool bRetVal = -1;
+       char *pszAvailMemLog   = NULL;
+       char *pszSetSystemHandlerSpeedLog = NULL;
+       char *pszIsSystemHandlerSpeedLog = NULL;
+       int nSetSystemHandlerFailCount = 0;
+       int nMismatchCount = 0;
+       bool bEnable = true;
+
+#if MEMORY_CHECK
+       pszAvailMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSystemHandlerSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszIsSystemHandlerSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_manager_set_system_handler_enable(bEnable); // Target API                 
+               NFCExecutionDelay(pszSetSystemHandlerSpeedLog);
+               if(nRetVal != 0)        
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_system_handler_enable failed on iteration %d, error returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+                       nSetSystemHandlerFailCount++;
+                       continue;
+               }
+               
+               NFCGetTimeOfDay();
+               bRetVal = nfc_manager_is_system_handler_enabled(); // Target API
+               NFCExecutionDelay(pszIsSystemHandlerSpeedLog);
+               NFCGetMemStatus(pszAvailMemLog);
+               if (bRetVal)
+               {
+                       FPRINTF("\\n[Line : %d][NFC_ITc] state of system handler is enable \\n", __LINE__);
+               }
+               else 
+               {
+                       FPRINTF("\\n[Line : %d][NFC_ITc] state of system handler is not enable \\n", __LINE__);
+                       nMismatchCount++;
+                       
+               }
+       }
+
+       if ( nSetSystemHandlerFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_initialize failed %d times, state of system handler is mismatched %d times out of %d times ", __LINE__, nSetSystemHandlerFailCount, nMismatchCount, MAX_COUNT);
+               NFCFreeMemory(pszAvailMemLog, pszSetSystemHandlerSpeedLog, pszIsSystemHandlerSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_set_system_handler_enable, pszSetSystemHandlerSpeedLog);
+       PRINT_SPEED_LOG(nfc_manager_is_system_handler_enabled, pszIsSystemHandlerSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_system_handler_enable, pszAvailMemLog);
+#endif
+
+       NFCFreeMemory(pszAvailMemLog, pszSetSystemHandlerSpeedLog, pszIsSystemHandlerSpeedLog);
+       return 0;
+}
+
+
+//& purpose: To register and unregister the NDEF discovery callback function.
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_set_unset_ndef_discovered_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     To register and unregisters the NDEF discovery callback function
+* @scenario                                Register the NDEF discovery callback function\n
+*                                                      Unregister the NDEF discovery callback function
+* @apicovered                          nfc_manager_set_ndef_discovered_cb, nfc_manager_unset_ndef_discovered_cb
+* @passcase                                    When nfc_manager_set_ndef_discovered_cb is successful
+* @failcase                                    When nfc_manager_set_ndef_discovered_cb fails
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_manager_set_unset_ndef_discovered_p(void)
+{
+    START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_manager_set_ndef_discovered_cb(NFCNdefDiscoveredCB, NULL); // Target API
+               NFCExecutionDelay(pszSetSpeedLog);
+               if(nRetVal != 0)        
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc]  nfc_manager_set_ndef_discovered_cb failed on iteration %d, error returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               /** There is manual operation required for callback invocation. Callback cannot be tested **/
+               usleep(MICROSECONDS_PER_SECOND);
+               NFCGetTimeOfDay();
+               nfc_manager_unset_ndef_discovered_cb(); // Target API
+               NFCExecutionDelay(pszUnsetSpeedLog);
+               NFCGetMemStatus(pszSetUnsetMemLog);
+       }
+
+       if ( nSetFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_ndef_discovered_cb failed %d times out of %d times ", __LINE__, nSetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_set_ndef_discovered_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(nfc_manager_unset_ndef_discovered_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_set_unset_ndef_discovered, pszSetUnsetMemLog);
+#endif
+
+       NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: To set and get filter of target types.
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_set_get_tag_filter_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     To set and get filter of target types
+* @scenario                                Set filter of target types\n
+*                           Get the current filter status
+* @apicovered                          nfc_manager_set_tag_filter, nfc_manager_get_tag_filter
+* @passcase                                    When current filter status is matched with set filter of target type
+* @failcase                                    When current filter status is mismatched with set filter of target type
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_manager_set_get_tag_filter_p(void)
+{
+    START_TEST;
+       nfc_tag_filter_e nRetVal = 0;
+       int  nLoopCount = 0;
+       char *pszSetGetTagMemLog   = NULL;
+       char *pszSetTagSpeedLog = NULL;
+       char *pszGetTagSpeedLog = NULL;
+       int nSetGetFailCount = 0;
+       nfc_tag_filter_e eConfig[] = {NFC_TAG_FILTER_ALL_DISABLE, NFC_TAG_FILTER_ISO14443A_ENABLE, NFC_TAG_FILTER_ISO14443B_ENABLE, NFC_TAG_FILTER_ISO15693_ENABLE, NFC_TAG_FILTER_FELICA_ENABLE, NFC_TAG_FILTER_JEWEL_ENABLE, NFC_TAG_FILTER_IP_ENABLE, NFC_TAG_FILTER_ALL_ENABLE};
+       int nEnumSize = sizeof(eConfig) / sizeof(eConfig[0]);
+       int nEnumCounter = 0;
+
+       if(!NFCCheckSystemInfoFeatureSupported(NFC_TAG_FEATURE))
+       {
+               return 0;
+       }
+
+#if MEMORY_CHECK
+       pszSetGetTagMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetTagSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetTagSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+    
+       for ( nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       NFCGetMemAllocation();
+                       NFCGetTimeOfDay();
+                       nfc_manager_set_tag_filter(eConfig[nEnumCounter]);
+                       NFCExecutionDelay(pszSetTagSpeedLog);
+
+                       usleep(MICROSECONDS_PER_SECOND);
+                       NFCGetTimeOfDay();
+                       nRetVal = nfc_manager_get_tag_filter();
+                       NFCExecutionDelay(pszGetTagSpeedLog);
+                       NFCGetMemStatus(pszSetGetTagMemLog);
+                       if ( eConfig[nEnumCounter] != NFC_TAG_FILTER_ALL_ENABLE )
+                       {
+                               if ( nRetVal != eConfig[nEnumCounter] )
+                               {
+                                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_get_tag_filter is mismatched on iteration %d for enum: %s,\\n", __LINE__, nLoopCount, NFCTagFilterEnumString(eConfig[nEnumCounter]));
+                                       nSetGetFailCount++;
+                               }
+                       }
+                       else
+                       {
+                               if ( nRetVal == 0 )
+                               {
+                                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_get_tag_filter is mismatched on iteration %d for enum: %s,\\n", __LINE__, nLoopCount, NFCTagFilterEnumString(eConfig[nEnumCounter]));
+                                       nSetGetFailCount++;
+                               }
+                       }                       
+               }
+       }
+
+               if ( nSetGetFailCount > 0 )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_get_tag_filter is mismatched %d times out of %d times ", __LINE__, nSetGetFailCount, nEnumSize*MAX_COUNT);
+                       NFCFreeMemory(pszSetGetTagMemLog, pszSetTagSpeedLog, pszGetTagSpeedLog);
+                       return 1;
+               }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_set_tag_filter, pszSetTagSpeedLog);
+       PRINT_SPEED_LOG(nfc_manager_get_tag_filter, pszGetTagSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_set_get_tag_filter, pszSetGetTagMemLog);
+#endif
+
+       NFCFreeMemory(pszSetGetTagMemLog, pszSetTagSpeedLog, pszGetTagSpeedLog);
+       return 0;
+}
+
+
+//& purpose: To register and unregister the Secure Element event callback function.
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_set_unset_se_event_cb_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     To register and unregister the Secure Element event callback function
+* @scenario                                Register Secure Element event callback function\n
+*                                                      Unregister Secure Element event callback function
+* @apicovered                          nfc_manager_set_se_event_cb, nfc_manager_unset_se_event_cb
+* @passcase                                    When nfc_manager_set_se_event_cb is successful
+* @failcase                                    When nfc_manager_set_se_event_cb is not successful
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_manager_set_unset_se_event_cb_p(void)
+{
+    START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       bool bIsSupportedNfcEmulation = NFCCheckSystemInfoFeatureSupported(NFC_CARD_EMULATION_FEATURE);
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_manager_set_se_event_cb(NFCSeEventCB, NULL);
+               NFCExecutionDelay(pszSetSpeedLog);
+               if( !bIsSupportedNfcEmulation)
+               {
+                       if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n[Line : %d][NFC_ITc] nfc_manager_set_se_event_cb API call returned mismatch %s error for unsupported nfc feature", __LINE__, NFCGetError(nRetVal));
+                               nSetFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][NFC_ITc] nfc_manager_set_se_event_cb API call correctly returned %s error for unsupported nfc feature", __LINE__, NFCGetError(nRetVal));
+                       }
+                       continue;
+               }
+               if(nRetVal != 0)        
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_se_event_cb failed on iteration %d, error returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               /** There is manual operation required for callback invocation. Callback cannot be tested **/
+               usleep(MICROSECONDS_PER_SECOND);
+               NFCGetTimeOfDay();
+               nfc_manager_unset_se_event_cb();
+               NFCExecutionDelay(pszUnsetSpeedLog);
+               NFCGetMemStatus(pszSetUnsetMemLog);
+       }
+
+       if ( nSetFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_se_event_cb failed %d times out of %d times ", __LINE__, nSetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_set_se_event_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(nfc_manager_unset_se_event_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_set_unset_se_event_cb, pszSetUnsetMemLog);
+#endif
+
+       NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+
+//& purpose: To set and unset the NFC Activation state changed callback.
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_set_unset_activation_changed_cb_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     To set and unset the NFC Activation state changed callback
+* @scenario                                Set and unset the NFC Activation state changed callback\n
+*                                                      Unset the NFC Activation state changed callback
+* @apicovered                          nfc_manager_set_activation_changed_cb, nfc_manager_unset_activation_changed_cb
+* @passcase                                    When nfc_manager_set_activation_changed_cb is successful
+* @failcase                                    When nfc_manager_set_activation_changed_cb is not successful
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_manager_set_unset_activation_changed_cb_p(void)
+{
+    START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_manager_set_activation_changed_cb(NFCActivationChangedCB, NULL); 
+               NFCExecutionDelay(pszSetSpeedLog);
+               if(nRetVal != 0)        
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_activation_changed_cb failed on iteration %d, error returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               /** There is manual operation required for callback invocation. Callback cannot be tested **/ 
+               usleep(MICROSECONDS_PER_SECOND);
+               NFCGetTimeOfDay();
+           nfc_manager_unset_activation_changed_cb();
+               NFCExecutionDelay(pszUnsetSpeedLog);
+               NFCGetMemStatus(pszSetUnsetMemLog);
+       }
+
+       if ( nSetFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_activation_changed_cb failed %d times out of %d times ", __LINE__, nSetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_set_activation_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(nfc_manager_unset_activation_changed_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_set_unset_activation_changed_cb, pszSetUnsetMemLog);
+#endif
+
+       NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+
+//& purpose: To register and unregister callback function for receiving Secure Element transaction event(NFC_SE_EVENT_TRANSACTION) data.
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_set_unset_se_transaction_event_cb_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     To register and unregister callback function for receiving Secure Element transaction event(NFC_SE_EVENT_TRANSACTION) data
+* @scenario                                Register callback function for receiving Secure Element transaction event(NFC_SE_EVENT_TRANSACTION) data\n
+*                                                      Unregister callback function for receiving Secure Element transaction event(NFC_SE_EVENT_TRANSACTION) data
+* @apicovered                          nfc_manager_set_se_transaction_event_cb, nfc_manager_unset_se_transaction_event_cb
+* @passcase                                    When nfc_manager_set_se_transaction_event_cb is successful
+* @failcase                                    When nfc_manager_set_se_transaction_event_cb fails
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_manager_set_unset_se_transaction_event_cb_p(void)
+{
+    START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       nfc_se_type_e eSeType[] = {NFC_SE_TYPE_ESE, NFC_SE_TYPE_UICC};
+       int nEnumSize = sizeof(eSeType) / sizeof(eSeType[0]);
+       int nEnumCounter = 0;
+       bool bIsSupportedNfcEmulation = NFCCheckSystemInfoFeatureSupported(NFC_CARD_EMULATION_FEATURE);
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+    for ( nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       NFCGetMemAllocation();
+                       NFCGetTimeOfDay();
+                       nRetVal = nfc_manager_set_se_transaction_event_cb(eSeType[nEnumCounter], NFCSeTransactionEventCB, NULL);
+                       NFCExecutionDelay(pszSetSpeedLog);
+                       if( !bIsSupportedNfcEmulation)
+                       {
+                               if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+                               {
+                                       FPRINTF("\\n[Line : %d][NFC_ITc] nfc_manager_set_se_transaction_event_cb API call returned mismatch %s error for unsupported nfc feature", __LINE__, NFCGetError(nRetVal));
+                                       nSetFailCount++;
+                               }
+                               else
+                               {
+                                       FPRINTF("\\n[Line : %d][NFC_ITc] nfc_manager_set_se_transaction_event_cb API call correctly returned %s error for unsupported nfc feature", __LINE__, NFCGetError(nRetVal));
+                               }
+                               continue;
+                       }
+                       if(nRetVal != 0)        
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc]  nfc_manager_set_se_transaction_event_cb failed on iteration %d for enum: %s, error returned = %s ", __LINE__,nLoopCount, NFCSeTypeEnumString(eSeType[nEnumCounter]), NFCGetError(nRetVal));
+                               nSetFailCount++;
+                               continue;
+                       }
+                               
+                       /** There is manual operation required for callback invocation. Callback cannot be tested **/
+                       usleep(MICROSECONDS_PER_SECOND);
+                       NFCGetTimeOfDay();
+                       nfc_manager_unset_se_transaction_event_cb(eSeType[nEnumCounter]);
+                       NFCExecutionDelay(pszUnsetSpeedLog);
+                       NFCGetMemStatus(pszSetUnsetMemLog);
+               }
+       }
+
+       if ( nSetFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_se_transaction_event_cb failed %d times out of %d times ", __LINE__, nSetFailCount, nEnumSize*MAX_COUNT);
+               NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_set_se_transaction_event_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(nfc_manager_unset_se_transaction_event_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_set_unset_se_transaction_event_cb, pszSetUnsetMemLog);
+#endif
+
+       NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+
+//& purpose: To register and unregister callback function for receiving notification about tag discovery.
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_set_unset_tag_discovered_cb_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     To register and unregister callback function for receiving notification about tag discovery
+* @scenario                                Register callback function for receiving notification about tag discovery\n
+*                           Set filter of target types\n
+*                                                      Unregister callback function for receiving notification about tag discovery
+* @apicovered                          nfc_manager_set_tag_discovered_cb, nfc_manager_unset_tag_discovered_cb
+* @passcase                                    When nfc_manager_set_tag_discovered_cb is successful
+* @failcase                                    When nfc_manager_set_tag_discovered_cb fails
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_manager_set_unset_tag_discovered_cb_p(void)
+{
+    START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       bool bIsSupportedTAG = NFCCheckSystemInfoFeatureSupported(NFC_TAG_FEATURE);
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_manager_set_tag_discovered_cb(NFCTagDiscoveredCB, NULL);
+               NFCExecutionDelay(pszSetSpeedLog);
+               if(!bIsSupportedTAG)
+               {
+                       if(nRetVal != NFC_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_tag_discovered_cb failed on iteration %d, expected return = NFC_ERROR_NOT_SUPPORTED, value returned = %s ", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                               nSetFailCount++;
+                       }
+                       continue;
+               }
+               if(nRetVal != 0)        
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc]  nfc_manager_set_tag_discovered_cb failed on iteration %d, error returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }               
+
+               /** There is manual operation required for callback invocation. Callback cannot be tested **/
+               usleep(MICROSECONDS_PER_SECOND);
+               NFCGetTimeOfDay();
+               nfc_manager_unset_tag_discovered_cb();
+               NFCExecutionDelay(pszUnsetSpeedLog);
+               NFCGetMemStatus(pszSetUnsetMemLog);
+       }
+
+       if ( nSetFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_tag_discovered_cb failed %d times out of %d times ", __LINE__, nSetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_set_tag_discovered_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(nfc_manager_unset_tag_discovered_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_set_unset_tag_discovered_cb, pszSetUnsetMemLog);
+#endif
+
+       NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: To register and unregister callback function for receiving NFC peer-to-peer target discovered notification.
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_set_unset_p2p_target_discovered_cb_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     To register and unregister callback function for receiving NFC peer-to-peer target discovered notification
+* @scenario                                Register callback function for receiving NFC peer-to-peer target discovered notification\n
+*                           Set filter of target types\n
+*                                                      Unregister callback function for receiving NFC peer-to-peer target discovered notification
+* @apicovered                          nfc_manager_set_p2p_target_discovered_cb, nfc_manager_unset_p2p_target_discovered_cb
+* @passcase                                When nfc_manager_set_p2p_target_discovered_cb is successful
+* @failcase                                    When nfc_manager_set_p2p_target_discovered_cb fails
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_manager_set_unset_p2p_target_discovered_cb_p(void)
+{
+    START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       bool bIsSupportedP2P = NFCCheckSystemInfoFeatureSupported(NFC_P2P_FEATURE);
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_manager_set_p2p_target_discovered_cb(NFCP2PTargetDiscoveredCB, NULL);
+               NFCExecutionDelay(pszSetSpeedLog);
+               if(!bIsSupportedP2P)
+               {
+                       if(nRetVal != NFC_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_p2p_target_discovered_cb failed on iteration %d, expected return = NFC_ERROR_NOT_SUPPORTED, value returned = %s ", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                               nSetFailCount++;
+                       }
+                       continue;
+               }
+               if(nRetVal != 0)        
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc]  nfc_manager_set_p2p_target_discovered_cb failed on iteration %d, error returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }                       
+        /** There is manual operation required for callback invocation. Callback cannot be tested **/
+               usleep(MICROSECONDS_PER_SECOND);
+               NFCGetTimeOfDay();
+               nfc_manager_unset_p2p_target_discovered_cb();
+               NFCExecutionDelay(pszUnsetSpeedLog);
+               NFCGetMemStatus(pszSetUnsetMemLog);
+       }
+
+       if ( nSetFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_p2p_target_discovered_cb failed %d times out of %d times ", __LINE__, nSetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_set_p2p_target_discovered_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(nfc_manager_unset_p2p_target_discovered_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_set_unset_tag_discovered_cb, pszSetUnsetMemLog);
+#endif
+
+       NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: To register and unregister callback function for receiving HCE(Host Card Emulation) event
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_set_unset_hce_event_cb_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     To register and unregister callback function for receiving HCE(Host Card Emulation) event
+* @scenario                                register callback function for receiving HCE(Host Card Emulation) event\n
+*                                                      Unregister callback function for receiving HCE(Host Card Emulation) event
+* @apicovered                          nfc_manager_set_hce_event_cb, nfc_manager_unset_hce_event_cb
+* @passcase                                When nfc_manager_set_hce_event_cb is successful
+* @failcase                                    When nfc_manager_set_hce_event_cb fails
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_manager_set_unset_hce_event_cb_p(void)
+{
+    START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       bool bIsSupportedHCE = NFCCheckSystemInfoFeatureSupported(NFC_HCE_FEATURE);
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_manager_set_hce_event_cb(NfcHCEEventCallback, NULL);
+               NFCExecutionDelay(pszSetSpeedLog);
+               if(!bIsSupportedHCE)
+               {
+                       if(nRetVal != NFC_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_hce_event_cb failed on iteration %d, expected return = NFC_ERROR_NOT_SUPPORTED, value returned = %s ", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                               nSetFailCount++;
+                       }
+                       continue;
+               }
+               if(nRetVal != NFC_ERROR_NONE)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_hce_event_cb failed on iteration %d, error returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+        /** There is manual operation required for callback invocation. Callback cannot be tested **/
+               usleep(MICROSECONDS_PER_SECOND);
+               NFCGetTimeOfDay();
+               nfc_manager_unset_hce_event_cb();
+               NFCExecutionDelay(pszUnsetSpeedLog);
+               NFCGetMemStatus(pszSetUnsetMemLog);
+       }
+
+       if ( nSetFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_set_hce_event_cb failed %d times out of %d times ", __LINE__, nSetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_set_hce_event_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(nfc_manager_unset_hce_event_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_set_unset_hce_event_cb, pszSetUnsetMemLog);
+#endif
+
+       NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+
+/** @} */ //end of itc-nfc
+/** @} */ //end of itc-nfc-testcases
\ No newline at end of file
diff --git a/src/itc/nfc/ITs-nfc-ndef.c b/src/itc/nfc/ITs-nfc-ndef.c
new file mode 100755 (executable)
index 0000000..88309c9
--- /dev/null
@@ -0,0 +1,2148 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-nfc-common.h"
+
+/** @addtogroup itc-nfc
+* @ingroup             itc
+* @{
+*/
+
+//& set: Nfc
+
+/**
+* @function            ITs_nfc_ndef_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_nfc_ndef_startup(void)
+{
+       struct stat buf;   
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       g_bNfcNotSupported = false;
+       g_bMismatch = false;
+       g_bIsSupportedNfc = NFCCheckSystemInfoFeatureSupported(NFC_FEATURE);
+       if(!g_bIsSupportedNfc)
+       {
+               if ( !nfc_manager_is_supported() )
+               {
+                       g_bNfcNotSupported = true;
+                       return;
+               }
+               g_bMismatch = true;
+               return;
+       }
+
+       int nRetVal = nfc_manager_initialize();
+       if ( nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc_manager_initialize failed in startup, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               g_bNFCTestPrecondition = false;
+               return;
+       }
+       FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc_manager_initialize successfully \\n",__LINE__);
+       g_bNFCTestPrecondition = true;
+       g_hMessage = NULL;
+       g_hRecord = NULL;
+       return;
+}
+
+/**
+* @function            ITs_nfc_ndef_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_nfc_ndef_cleanup(void)
+{
+       if(g_bNFCTestPrecondition)
+       {
+               int nRetVal = nfc_manager_deinitialize();
+               if ( nRetVal != 0 )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_deinitialize failed in cleanup, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               }
+       }
+       else if (g_bIsSupportedNfc && g_bNFCSupported)
+       {
+               FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc manager was not initialized initially \\n",__LINE__);
+       }
+       return;
+}
+
+/** @addtogroup        itc-nfc-testcases
+* @brief               Integration testcases for module nfc
+* @ingroup             itc-nfc
+* @{
+*/
+
+//& purpose: Creates a record with given parameter value and destroy the record
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_create_destroy_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Creates a record with given parameter value and destroy the record
+* @scenario                                    Create record\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_create and nfc_ndef_record_destroy
+* @passcase                                    When nfc_ndef_record_create and nfc_ndef_record_destroy is successfull
+* @failcase                                    If target APIs nfc_ndef_record_create or nfc_ndef_record_destroy fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_create_destroy_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszCreateDestroyMemLog   = NULL;
+       char *pszCreateSpeedLog = NULL;
+       char *pszDestroySpeedLog = NULL;
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+       unsigned char szType[] = "TEST";
+       unsigned char szID[] = "TEST";
+       unsigned char szPayLoad[] = "TEST";
+       int nTypeSize = 1;
+       int nIdSize = 4;
+       int nPayloadSize = 4;
+       nfc_record_tnf_e tnf_type[] = {NFC_RECORD_TNF_EMPTY, NFC_RECORD_TNF_WELL_KNOWN, NFC_RECORD_TNF_MIME_MEDIA, NFC_RECORD_TNF_URI, NFC_RECORD_TNF_EXTERNAL_RTD, NFC_RECORD_TNF_UNKNOWN, NFC_RECORD_TNF_UNCHAGNED};
+       int nEnumSize = sizeof(tnf_type) / sizeof(tnf_type[0]);
+       int nEnumCounter = 0;
+       
+#if MEMORY_CHECK
+       pszCreateDestroyMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszCreateSpeedLog =     calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszDestroySpeedLog =    calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       NFCGetMemAllocation();
+                       NFCGetTimeOfDay();
+                       if (tnf_type[nEnumCounter] == NFC_RECORD_TNF_EMPTY)
+                       {
+                               nRetVal = nfc_ndef_record_create(&g_hRecord, tnf_type[nEnumCounter], NULL, 0, NULL, 0, NULL, 0);
+                       }
+                       else
+                       {
+                               nRetVal = nfc_ndef_record_create(&g_hRecord, tnf_type[nEnumCounter], szType, nTypeSize, szID, nIdSize, szPayLoad, nPayloadSize);
+                       }
+                       NFCExecutionDelay(pszCreateSpeedLog);
+                       if (nRetVal != NFC_ERROR_NONE )
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nLoopCount, NFCGetTnfEnumString(tnf_type[nEnumCounter]), NFCGetError(nRetVal));
+                               nCreateFailCount++;
+                               continue;
+                       }
+                       else if (g_hRecord == NULL)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_create' record handle is null in iteration %d for enum: %s. \\n", __LINE__, nLoopCount, NFCGetTnfEnumString(tnf_type[nEnumCounter]));
+                               nCreateFailCount++;
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create passed in iteration %d for enum: %s \\n", __LINE__, nLoopCount, NFCGetTnfEnumString(tnf_type[nEnumCounter]));
+                       }
+                       
+                       sleep(2);
+                       
+                       NFCGetTimeOfDay();
+                       nRetVal = nfc_ndef_record_destroy(g_hRecord);
+                       NFCExecutionDelay(pszDestroySpeedLog);
+                       NFCGetMemStatus(pszCreateDestroyMemLog);
+                       if (nRetVal != NFC_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d] [NFC_ITc] nfc_ndef_record_destroy failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nLoopCount, NFCGetTnfEnumString(tnf_type[nEnumCounter]), NFCGetError(nRetVal));
+                               nDestroyFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d] [NFC_ITc] nfc_ndef_record_destroy passed on iteration %d for enum: %s \\n", __LINE__, nLoopCount, NFCGetTnfEnumString(tnf_type[nEnumCounter]));
+                       }
+               }
+       }
+       
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create failed %d times, nfc_ndef_record_destroy failed %d times out of %d times ", __LINE__, nCreateFailCount, nDestroyFailCount, nEnumSize * MAX_COUNT);
+               NFCFreeMemory(pszCreateDestroyMemLog, pszCreateSpeedLog, pszDestroySpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_create, pszCreateSpeedLog);
+       PRINT_SPEED_LOG(nfc_ndef_record_destroy, pszDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_create_destroy, pszCreateDestroyMemLog);
+#endif
+
+       NFCFreeMemory(pszCreateDestroyMemLog, pszCreateSpeedLog, pszDestroySpeedLog);
+       
+       return 0;
+}
+
+
+//& purpose: Creates a record with text type payload
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_create_text_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Creates a record with text type payload
+* @scenario                                    Create record with text\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_create_text and nfc_ndef_record_destroy
+* @passcase                                    When nfc_ndef_record_create_text is successfull
+* @failcase                                    If target APIs nfc_ndef_record_create_text fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_create_text_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszCreateMemLog = NULL;
+       char *pszCreateSpeedLog = NULL;
+       int nCreateFailCount = 0;
+       nfc_encode_type_e encode_type[] = {NFC_ENCODE_UTF_8, NFC_ENCODE_UTF_16};
+       int nEnumSize = sizeof(encode_type) / sizeof(encode_type[0]);
+       int nEnumCounter = 0;
+       
+#if MEMORY_CHECK
+       pszCreateMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszCreateSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for ( nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       NFCGetMemAllocation();
+                       NFCGetTimeOfDay();
+                       if (encode_type[nEnumCounter] == NFC_ENCODE_UTF_8)
+                       {
+                               nRetVal = nfc_ndef_record_create_text(&g_hRecord, ENCODE_TEXT, ENCODE_TYPE_UTF8, encode_type[nEnumCounter]);
+                       }
+                       else
+                       {
+                               nRetVal = nfc_ndef_record_create_text(&g_hRecord, ENCODE_TEXT, ENCODE_TYPE_UTF16, encode_type[nEnumCounter]);
+                       }
+                       NFCExecutionDelay(pszCreateSpeedLog);
+                       NFCGetMemStatus(pszCreateMemLog);
+                       
+                       if (nRetVal != NFC_ERROR_NONE )
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_text failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]), NFCGetError(nRetVal));
+                               nCreateFailCount++;
+                               continue;
+                       }
+                       else if (g_hRecord == NULL)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_create_text', record handle is null in iteration %d for enum: %s. \\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]));
+                               nCreateFailCount++;
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_text passed in iteration %d for enum: %s \\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]));
+                       }
+                       
+                       sleep(2);
+                       
+                       nRetVal = nfc_ndef_record_destroy(g_hRecord);
+                       if ( nRetVal != NFC_ERROR_NONE )
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_destroy failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]), NFCGetError(nRetVal));
+                       }
+                       else
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_destroy passed in iteration %d for enum: %s\\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]));
+                       }
+               }
+       }
+       
+       if ( nCreateFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_text failed %d times out of %d times ", __LINE__, nCreateFailCount, nEnumSize * MAX_COUNT);
+               NFCFreeMemory(pszCreateMemLog, pszCreateSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_create_text, pszCreateSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_create_text, pszCreateMemLog);
+#endif
+
+       NFCFreeMemory(pszCreateMemLog, pszCreateSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+//& purpose: Creates a record with URI type payload
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_create_uri_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Creates a record with URI type payload
+* @scenario                                    Create record with uri\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_create_uri and nfc_ndef_record_destroy
+* @passcase                                    When nfc_ndef_record_create_uri is successfull
+* @failcase                                    If target APIs nfc_ndef_record_create_uri fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_create_uri_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszCreateMemLog = NULL;
+       char *pszCreateSpeedLog = NULL;
+       int nCreateFailCount = 0;
+       
+#if MEMORY_CHECK
+       pszCreateMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszCreateSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_record_create_uri(&g_hRecord, URI);
+               NFCExecutionDelay(pszCreateSpeedLog);
+               NFCGetMemStatus(pszCreateMemLog);
+               
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_uri failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nCreateFailCount++;
+                       continue;
+               }
+               else if (g_hRecord == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_create_uri', record handle is null in iteration %d. \\n", __LINE__, nLoopCount);
+                       nCreateFailCount++;
+                       continue;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_uri passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+               
+               sleep(2);
+               
+               nRetVal = nfc_ndef_record_destroy(g_hRecord);
+               if ( nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_destroy failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_destroy passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+       }
+       
+       if ( nCreateFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_uri failed %d times out of %d times ", __LINE__, nCreateFailCount, MAX_COUNT);
+               NFCFreeMemory(pszCreateMemLog, pszCreateSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_create_uri, pszCreateSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_create_uri, pszCreateMemLog);
+#endif
+
+       NFCFreeMemory(pszCreateMemLog, pszCreateSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+//& purpose: Creates a record with MIME type payload
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_create_mime_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Creates a record with MIME type payload
+* @scenario                                    Create record with MIME\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_create_mime and nfc_ndef_record_destroy
+* @passcase                                    When nfc_ndef_record_create_mime is successfull
+* @failcase                                    If target APIs nfc_ndef_record_create_mime fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_create_mime_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszCreateMemLog = NULL;
+       char *pszCreateSpeedLog = NULL;
+       int nCreateFailCount = 0;
+       const char *pszMimeType = "text/plain";
+       const unsigned char pszData[] = "TempData";
+       int nDataSize = sizeof(pszData);
+       
+#if MEMORY_CHECK
+       pszCreateMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszCreateSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_record_create_mime(&g_hRecord, pszMimeType, pszData, nDataSize);
+               NFCExecutionDelay(pszCreateSpeedLog);
+               NFCGetMemStatus(pszCreateMemLog);
+               
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_mime failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nCreateFailCount++;
+                       continue;
+               }
+               else if (g_hRecord == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_create_mime', record handle is null in iteration %d. \\n", __LINE__, nLoopCount);
+                       nCreateFailCount++;
+                       continue;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_mime passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+               
+               sleep(2);
+               
+               nRetVal = nfc_ndef_record_destroy(g_hRecord);
+               if ( nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_destroy failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_destroy passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+       }
+       
+       if ( nCreateFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_mime failed %d times out of %d times ", __LINE__, nCreateFailCount, MAX_COUNT);
+               NFCFreeMemory(pszCreateMemLog, pszCreateSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_create_mime, pszCreateSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_create_mime, pszCreateMemLog);
+#endif
+
+       NFCFreeMemory(pszCreateMemLog, pszCreateSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+
+//& purpose: Creates NDEF message handle
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_message_create_destroy_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Creates NDEF message handle
+* @scenario                                    Create message handle\n
+*                                                      Destroy message handle
+* @apicovered                          nfc_ndef_message_create and nfc_ndef_message_destroy
+* @passcase                                    When nfc_ndef_message_create and nfc_ndef_message_destroy is successfull
+* @failcase                                    If target APIs nfc_ndef_message_create or nfc_ndef_message_destroy fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_message_create_destroy_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszCreateDestroyMemLog   = NULL;
+       char *pszCreateSpeedLog = NULL;
+       char *pszDestroySpeedLog = NULL;
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+       
+#if MEMORY_CHECK
+       pszCreateDestroyMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszCreateSpeedLog =     calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszDestroySpeedLog =    calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_message_create(&g_hMessage);
+               NFCExecutionDelay(pszCreateSpeedLog);
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_create failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nCreateFailCount++;
+                       continue;
+               }
+               else if (g_hMessage == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_message_create' record handle is null in iteration %d. \\n", __LINE__, nLoopCount);
+                       nCreateFailCount++;
+                       continue;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_create passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+               
+               sleep(2);
+               
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_message_destroy(g_hMessage);
+               NFCExecutionDelay(pszDestroySpeedLog);
+               NFCGetMemStatus(pszCreateDestroyMemLog);
+               CHECK_ERROR("nfc_ndef_message_destroy", nDestroyFailCount);
+       }
+       
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_create failed %d times, nfc_ndef_message_destroy failed %d times out of %d times ", __LINE__, nCreateFailCount, nDestroyFailCount, MAX_COUNT);
+               NFCFreeMemory(pszCreateDestroyMemLog, pszCreateSpeedLog, pszDestroySpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_message_create, pszCreateSpeedLog);
+       PRINT_SPEED_LOG(nfc_ndef_message_destroy, pszDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_message_create_destroy, pszCreateDestroyMemLog);
+#endif
+
+       NFCFreeMemory(pszCreateDestroyMemLog, pszCreateSpeedLog, pszDestroySpeedLog);
+       
+       return 0;
+}
+
+
+
+//& purpose: Gets the number of record in NDEF message
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_message_get_record_count_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Gets the number of record in NDEF message
+* @scenario                                    Create message handle\n
+*                                                      Create record handle\n
+*                                                      Append record in message\n
+*                                                      Get record count\n
+*                                                      Destroy message handle
+* @apicovered                          nfc_ndef_message_append_record, nfc_ndef_message_destroy and nfc_ndef_message_get_record_count
+* @passcase                                    When nfc_ndef_message_get_record_count is successfull and count is 1
+* @failcase                                    If target APIs nfc_ndef_message_get_record_count fails or count is less than 1
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_message_get_record_count_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetCountMemLog = NULL;
+       char *pszGetCountSpeedLog = NULL;
+       int nGetCountFailCount = 0;
+       int nCount = 0;
+       
+       if (NFCCreateMessageRecordHandle() == false)
+       {
+               return 1;
+       }
+       
+       nRetVal = nfc_ndef_message_append_record(g_hMessage, g_hRecord);
+       if (nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_append_record failed, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               nRetVal = nfc_ndef_record_destroy(g_hRecord);
+               PRINT_RESULT(nRetVal, "nfc_ndef_record_destroy");
+               nRetVal = nfc_ndef_message_destroy(g_hMessage);
+               PRINT_RESULT(nRetVal, "nfc_ndef_message_destroy");
+               return 1;
+       }
+       else
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_append_record passed \\n", __LINE__);
+       }
+       sleep(2);
+       
+#if MEMORY_CHECK
+       pszGetCountMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetCountSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_message_get_record_count(g_hMessage, &nCount);
+               NFCExecutionDelay(pszGetCountSpeedLog);
+               NFCGetMemStatus(pszGetCountMemLog);
+               
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_get_record_count failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nGetCountFailCount++;
+                       continue;
+               }
+               else if (nCount == 0)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_message_get_record_count', count is 0 in iteration %d. \\n", __LINE__, nLoopCount);
+                       nGetCountFailCount++;
+                       continue;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] Count value: %d in iteration %d \\n", __LINE__, nCount, nLoopCount);
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_get_record_count passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+       }
+       
+       nRetVal = nfc_ndef_message_destroy(g_hMessage);
+       PRINT_RESULT(nRetVal, "nfc_ndef_message_destroy");
+       
+       if ( nGetCountFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_get_record_count failed %d times out of %d times ", __LINE__, nGetCountFailCount, MAX_COUNT);
+               NFCFreeMemory(pszGetCountMemLog, pszGetCountSpeedLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_message_get_record_count, pszGetCountSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_message_get_record_count, pszGetCountMemLog);
+#endif
+
+       NFCFreeMemory(pszGetCountMemLog, pszGetCountSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+//& purpose: Appends a record into NDEF message
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_message_append_record_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Appends a record into NDEF message
+* @scenario                                    Create message handle\n
+*                                                      Create record handle\n
+*                                                      Append record in message\n
+*                                                      Destroy message handle
+* @apicovered                          nfc_ndef_message_create, nfc_ndef_message_append_record and nfc_ndef_message_destroy
+* @passcase                                    When nfc_ndef_message_append_record is successfull
+* @failcase                                    If target API nfc_ndef_message_append_record fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_message_append_record_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszAppendRecordMemLog = NULL;
+       char *pszAppendRecordSpeedLog = NULL;
+       int nAppendRecordFailCount = 0;
+       
+#if MEMORY_CHECK
+       pszAppendRecordMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszAppendRecordSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               nRetVal = nfc_ndef_message_create(&g_hMessage);
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_create failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nAppendRecordFailCount++;
+                       continue;
+               }
+               else if (g_hMessage == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_message_create' message handle is null in iteration %d \\n", __LINE__, nLoopCount);
+                       nAppendRecordFailCount++;
+                       continue;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_create passed in iteration %d, \\n", __LINE__, nLoopCount);
+               }
+               sleep(2);
+               
+               nRetVal = nfc_ndef_record_create_uri(&g_hRecord, URI);
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_uri failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nAppendRecordFailCount++;
+                       nRetVal = nfc_ndef_message_destroy(g_hMessage);
+                       PRINT_RESULT(nRetVal, "nfc_ndef_message_destroy");
+                       continue;
+               }
+               else if (g_hRecord == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_create_uri' message handle is null in iteration %d \\n", __LINE__, nLoopCount);
+                       nAppendRecordFailCount++;
+                       nRetVal = nfc_ndef_message_destroy(g_hMessage);
+                       PRINT_RESULT(nRetVal, "nfc_ndef_message_destroy");
+                       continue;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_uri passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+               sleep(2);
+               
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_message_append_record(g_hMessage, g_hRecord);
+               NFCExecutionDelay(pszAppendRecordSpeedLog);
+               NFCGetMemStatus(pszAppendRecordMemLog);
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_append_record failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nAppendRecordFailCount++;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_append_record passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+               sleep(2);
+               
+               nRetVal = nfc_ndef_message_destroy(g_hMessage);
+               PRINT_RESULT(nRetVal, "nfc_ndef_message_destroy");
+       }
+       
+       if ( nAppendRecordFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_append_record failed %d times out of %d times ", __LINE__, nAppendRecordFailCount, MAX_COUNT);
+               NFCFreeMemory(pszAppendRecordMemLog, pszAppendRecordSpeedLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_message_append_record, pszAppendRecordSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_message_append_record, pszAppendRecordMemLog);
+#endif
+
+       NFCFreeMemory(pszAppendRecordMemLog, pszAppendRecordSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+
+//& purpose: Inserts a record at index into NDEF message and remove record
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_message_insert_remove_record_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Inserts a record at index into NDEF message and remove record
+* @scenario                                    Create message handle\n
+*                                                      Create record handle\n
+*                                                      Insert record in message\n
+*                                                      Destroy message handle
+* @apicovered                          nfc_ndef_message_insert_record and nfc_ndef_message_destroy
+* @passcase                                    When nfc_ndef_message_insert_record and nfc_ndef_message_remove_record is successfull
+* @failcase                                    If target APIs nfc_ndef_message_insert_record or nfc_ndef_message_remove_record fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_message_insert_remove_record_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszInsertRemoveMemLog   = NULL;
+       char *pszInsertSpeedLog = NULL;
+       char *pszRemoveSpeedLog = NULL;
+       int nInsertFailCount = 0;
+       int nRemoveFailCount = 0;
+       int nIndex = 0;
+       
+       if (NFCCreateMessageRecordHandle() == false)
+       {
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszInsertRemoveMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszInsertSpeedLog =     calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszRemoveSpeedLog =     calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_message_insert_record(g_hMessage, nIndex, g_hRecord);
+               NFCExecutionDelay(pszInsertSpeedLog);
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_insert_record failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nInsertFailCount++;
+                       continue;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_insert_record passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+               
+               sleep(2);
+               
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_message_remove_record(g_hMessage, nIndex);
+               NFCExecutionDelay(pszRemoveSpeedLog);
+               NFCGetMemStatus(pszInsertRemoveMemLog);
+               CHECK_ERROR("nfc_ndef_message_remove_record", nRemoveFailCount);
+       }
+       
+       nRetVal = nfc_ndef_message_destroy(g_hMessage);
+       PRINT_RESULT(nRetVal, "nfc_ndef_message_destroy");
+       
+       if ( nInsertFailCount > 0 || nRemoveFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_insert_record failed %d times, nfc_ndef_message_remove_record failed %d times out of %d times ", __LINE__, nInsertFailCount, nRemoveFailCount, MAX_COUNT);
+               NFCFreeMemory(pszInsertRemoveMemLog, pszInsertSpeedLog, pszRemoveSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_message_insert_record, pszInsertSpeedLog);
+       PRINT_SPEED_LOG(nfc_ndef_message_remove_record, pszRemoveSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_message_insert_remove_record, pszInsertRemoveMemLog);
+#endif
+
+       NFCFreeMemory(pszInsertRemoveMemLog, pszInsertSpeedLog, pszRemoveSpeedLog);
+       
+       return 0;
+}
+
+
+
+
+//& purpose: Gets record by index
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_message_get_record_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Gets record by index
+* @scenario                                    Create message handle\n
+*                                                      Create record handle\n
+*                                                      Append record in message\n
+*                                                      Get record\n
+*                                                      Destroy message handle
+* @apicovered                          nfc_ndef_message_destroy and nfc_ndef_message_get_record
+* @passcase                                    When nfc_ndef_message_get_record is successfull
+* @failcase                                    If target API nfc_ndef_message_get_record fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_message_get_record_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nIndex = 0;
+       nfc_ndef_record_h hGetRecord = NULL;
+       
+       if (NFCCreateMessageRecordHandle() == false)
+       {
+               return 1;
+       }
+       
+       nRetVal = nfc_ndef_message_insert_record(g_hMessage, nIndex, g_hRecord);
+       if (nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_insert_record failed, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               nRetVal = nfc_ndef_message_destroy(g_hMessage);
+               PRINT_RESULT(nRetVal, "nfc_ndef_message_destroy");
+               return 1;
+       }
+       else
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_insert_record passed \\n", __LINE__);
+       }
+       
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_message_get_record(g_hMessage, nIndex, &hGetRecord);
+               NFCExecutionDelay(pszGetSpeedLog);
+               NFCGetMemStatus(pszGetMemLog);
+               
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_get_record failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if (hGetRecord == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_message_get_record', record is null in iteration %d. \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_get_record passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+       }
+       
+       nRetVal = nfc_ndef_message_remove_record(g_hMessage, nIndex);
+       PRINT_RESULT(nRetVal, "nfc_ndef_message_remove_record");
+       
+       nRetVal = nfc_ndef_message_destroy(g_hMessage);
+       PRINT_RESULT(nRetVal, "nfc_ndef_message_destroy");
+       
+       if ( nGetFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_get_record failed %d times out of %d times ", __LINE__, nGetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_message_get_record, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_message_get_record, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+
+
+
+//& purpose: Gets serial bytes array of NDEF message and Creates NDEF message handle from raw serial bytes
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_message_get_rawdata_create_from_rawdata_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Gets serial bytes array of NDEF message and Creates NDEF message handle from raw serial bytes
+* @scenario                                    Create message handle\n
+*                                                      Create record handle\n
+*                                                      Append record in message\n
+*                                                      Get raw data\n
+*                                                      Create message from raw data\n
+*                                                      Destroy message handle
+* @apicovered                          nfc_ndef_message_append_record, nfc_ndef_message_destroy, nfc_ndef_message_get_rawdata and nfc_ndef_message_create_from_rawdata
+* @passcase                                    When nfc_ndef_message_get_rawdata and nfc_ndef_message_create_from_rawdata is successful
+* @failcase                                    If target APIs nfc_ndef_message_get_rawdata or nfc_ndef_message_create_from_rawdata fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_message_get_rawdata_create_from_rawdata_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       char *pszCreateMemLog = NULL;
+       char *pszCreateSpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nCreateFailCount = 0;
+       nfc_ndef_message_h hGetMessage = NULL;
+       unsigned char *pszBuffer = NULL;
+       unsigned int nBufferSize = 0;
+
+       if ( NFCCreateMessageRecordHandle() == false )
+       {
+               return 1;
+       }
+
+       nRetVal = nfc_ndef_message_append_record(g_hMessage, g_hRecord);
+       if (nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_append_record failed, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               nRetVal = nfc_ndef_message_destroy(g_hMessage);
+               PRINT_RESULT(nRetVal, "nfc_ndef_message_destroy");
+               return 1;
+       }
+       else
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_append_record passed \\n", __LINE__);
+       }
+       
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       pszCreateMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszCreateSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               //Target api: nfc_ndef_message_get_rawdata
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_message_get_rawdata(g_hMessage, &pszBuffer, &nBufferSize);
+               NFCExecutionDelay(pszGetSpeedLog);
+               NFCGetMemStatus(pszGetMemLog);
+               
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_get_rawdata failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if (pszBuffer == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_message_get_rawdata', Buffer is null in iteration %d. \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+                       continue;
+               }
+               else if (nBufferSize <= 0)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_message_get_rawdata', Buffer size is: %u in iteration %d. \\n", __LINE__, nBufferSize, nLoopCount);
+                       nGetFailCount++;
+                       free(pszBuffer);
+                       pszBuffer = NULL;
+                       continue;
+               }
+               else 
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_get_rawdata passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+               
+               //Target api: nfc_ndef_message_create_from_rawdata
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_message_create_from_rawdata(&hGetMessage, pszBuffer, nBufferSize);
+               NFCExecutionDelay(pszCreateSpeedLog);
+               NFCGetMemStatus(pszCreateMemLog);
+               
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_create_from_rawdata failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nCreateFailCount++;
+                       free(pszBuffer);
+                       pszBuffer = NULL;
+                       continue;
+               }
+               else if (hGetMessage == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_message_create_from_rawdata', handle is null in iteration %d. \\n", __LINE__, nLoopCount);
+                       nCreateFailCount++;
+                       free(pszBuffer);
+                       pszBuffer = NULL;
+                       continue;
+               }
+               else 
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_create_from_rawdata passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+               
+               nRetVal = nfc_ndef_message_destroy(hGetMessage);
+               PRINT_RESULT(nRetVal, "nfc_ndef_message_destroy");
+               free(pszBuffer);
+               pszBuffer = NULL;
+       }
+       
+       nRetVal = nfc_ndef_message_destroy(g_hMessage);
+       PRINT_RESULT(nRetVal, "nfc_ndef_message_destroy");
+       
+       if ( nGetFailCount > 0 || nCreateFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_message_get_rawdata failed %d times, nfc_ndef_message_create_from_rawdata failed % times out of %d times ", __LINE__, nGetFailCount, nCreateFailCount, MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               NFCFreeMemory(pszCreateMemLog, pszCreateSpeedLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_message_get_rawdata, pszGetSpeedLog);
+       PRINT_SPEED_LOG(nfc_ndef_message_create_from_rawdata, pszCreateSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_message_get_rawdata, pszGetMemLog);
+       PRINT_MEMORY_LOG(nfc_ndef_message_create_from_rawdata, pszCreateMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       NFCFreeMemory(pszCreateMemLog, pszCreateSpeedLog, NULL);
+       return 0;
+}
+
+
+
+
+//& purpose: Gets record payload
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_get_payload_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Gets record payload
+* @scenario                                    Create record handle\n
+*                                                      Get record payload\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_destroy and nfc_ndef_record_get_payload
+* @passcase                                    When nfc_ndef_record_get_payload is successfull
+* @failcase                                    If target API nfc_ndef_record_get_payload fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_get_payload_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       unsigned char *pszPayload = NULL;
+       unsigned int nSize = 0;
+       
+       if (NFCCreateUri() == false)
+       {
+               return 1;
+       }
+               
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));   
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_record_get_payload(g_hRecord, &pszPayload, &nSize);
+               NFCExecutionDelay(pszGetSpeedLog);
+               NFCGetMemStatus(pszGetMemLog);
+               
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_payload failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (pszPayload == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_payload', Payload is NULL in iteration %d \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+                       continue;
+               }
+               else if (nSize <= 0)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_payload', Size value is incorrect in iteration %d \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_payload passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+       }
+       
+       nRetVal = nfc_ndef_record_destroy(g_hRecord);
+       PRINT_RESULT(nRetVal, "nfc_ndef_record_destroy");
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_payload failed %d times out of %d times ", __LINE__, nGetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_get_payload, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_get_payload, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+//& purpose: Set record ID and get record id
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_set_get_id_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Set record ID and get record id
+* @scenario                                    Create record handle\n
+*                                                      Set record id\n
+*                                                      Get record id\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_destroy, nfc_ndef_record_set_id and nfc_ndef_record_get_id
+* @passcase                                    When nfc_ndef_record_set_id and nfc_ndef_record_get_id is successfull
+* @failcase                                    If target APIs nfc_ndef_record_set_id or nfc_ndef_record_get_id fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_set_get_id_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       unsigned char szSetId[10] = {0,};
+       unsigned char *pszGetId = NULL;
+       int nGetSize = 0;
+       int nLength = 0;
+       
+       if (NFCCreateUri() == false)
+       {
+               return 1;
+       }
+               
+#if MEMORY_CHECK
+       pszSetGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));   
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sprintf((char *)szSetId, "ID_%d", nLoopCount + 1);
+               nLength = strlen((char *)szSetId);
+               
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_record_set_id(g_hRecord, szSetId, nLength);
+               NFCExecutionDelay(pszSetSpeedLog);
+               
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_set_id failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_set_id passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+               
+               sleep(2);
+               
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_record_get_id(g_hRecord, &pszGetId, &nGetSize);
+               NFCExecutionDelay(pszGetSpeedLog);
+               NFCGetMemStatus(pszSetGetMemLog);
+               if ( nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_id failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (pszGetId == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After nfc_ndef_record_get_id, Received ID is null in iteration %d, \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+               else if (nGetSize != nLength)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After nfc_ndef_record_get_id, ID mismatch in iteration %d, \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_id passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+       }
+       
+       nRetVal = nfc_ndef_record_destroy(g_hRecord);
+       PRINT_RESULT(nRetVal, "nfc_ndef_record_destroy");
+       
+       if ( nSetFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_set_id failed %d times, nfc_ndef_record_get_id failed %d times, out of %d times ", __LINE__, nSetFailCount, nGetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszSetSpeedLog, pszGetSpeedLog, pszSetGetMemLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_set_id, pszSetSpeedLog);
+       PRINT_SPEED_LOG(nfc_ndef_record_get_id, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_set_get_id, pszSetGetMemLog);
+#endif
+
+       NFCFreeMemory(pszSetSpeedLog, pszGetSpeedLog, pszSetGetMemLog);
+       
+       return 0;
+}
+
+
+
+//& purpose: Gets record type
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_get_type_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Gets record type
+* @scenario                                    Create record handle\n
+*                                                      Get record type\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_destroy and nfc_ndef_record_get_type
+* @passcase                                    When nfc_ndef_record_get_type is successfull
+* @failcase                                    If target API nfc_ndef_record_get_type fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_get_type_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       unsigned char *pszType = NULL;
+       int nSize = 0;
+       
+       if (NFCCreateUri() == false)
+       {
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));   
+#endif
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_record_get_type(g_hRecord, &pszType, &nSize);
+               NFCExecutionDelay(pszGetSpeedLog);
+               NFCGetMemStatus(pszGetMemLog);
+               
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_type failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else if (pszType == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_type', Type is NULL in iteration %d \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+               else if (nSize <= 0)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_type', Size value is incorrect in iteration %d \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_type passed in iteration %d\\n", __LINE__, nLoopCount);
+               }
+       }
+                               
+       nRetVal = nfc_ndef_record_destroy(g_hRecord);
+       PRINT_RESULT(nRetVal, "nfc_ndef_record_destroy");
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_type failed %d times out of %d times ", __LINE__, nGetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_get_type, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_get_type, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+
+//& purpose: Gets record TNF(Type Name Format) value
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_get_tnf_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Gets record TNF(Type Name Format) value
+* @scenario                                    Create record handle\n
+*                                                      Get tnf type\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_destroy and nfc_ndef_record_get_tnf
+* @passcase                                    When nfc_ndef_record_get_tnf is successfull
+* @failcase                                    If target API nfc_ndef_record_get_tnf fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_get_tnf_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       nfc_record_tnf_e tnf = NFC_RECORD_TNF_EMPTY;
+       nfc_record_tnf_e tnf_type[] = {NFC_RECORD_TNF_EMPTY, NFC_RECORD_TNF_WELL_KNOWN, NFC_RECORD_TNF_MIME_MEDIA, NFC_RECORD_TNF_URI, NFC_RECORD_TNF_EXTERNAL_RTD, NFC_RECORD_TNF_UNKNOWN, NFC_RECORD_TNF_UNCHAGNED};
+       int nEnumSize = sizeof(tnf_type) / sizeof(tnf_type[0]);
+       int nEnumCounter = 0;
+       unsigned char szType[] = "TEST";
+       unsigned char szID[] = "TEST";
+       unsigned char szPayLoad[] = "TEST";
+       int nTypeSize = 1;
+       int nIdSize = 4;
+       int nPayloadSize = 4;
+       
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));   
+#endif
+
+       for ( nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               if (tnf_type[nEnumCounter] == NFC_RECORD_TNF_EMPTY)
+               {
+                       nRetVal = nfc_ndef_record_create(&g_hRecord, tnf_type[nEnumCounter], NULL, 0, NULL, 0, NULL, 0);
+               }
+               else
+               {
+                       nRetVal = nfc_ndef_record_create(&g_hRecord, tnf_type[nEnumCounter], szType, nTypeSize, szID, nIdSize, szPayLoad, nPayloadSize);
+               }
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nEnumCounter, NFCGetTnfEnumString(tnf_type[nEnumCounter]), NFCGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if (g_hRecord == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_create' record handle is null in iteration %d for enum: %s. \\n", __LINE__, nEnumCounter, NFCGetTnfEnumString(tnf_type[nEnumCounter]));
+                       nGetFailCount++;
+                       continue;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create passed for enum: %s \\n", __LINE__, NFCGetTnfEnumString(tnf_type[nEnumCounter]));
+               }
+                       
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       NFCGetMemAllocation();
+                       NFCGetTimeOfDay();
+                       nRetVal = nfc_ndef_record_get_tnf(g_hRecord, &tnf);
+                       NFCExecutionDelay(pszGetSpeedLog);
+                       NFCGetMemStatus(pszGetMemLog);
+                       
+                       if (nRetVal != NFC_ERROR_NONE )
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_tnf failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nLoopCount, NFCGetTnfEnumString(tnf_type[nEnumCounter]), NFCGetError(nRetVal));
+                               nGetFailCount++;
+                       }
+                       else if (tnf != tnf_type[nEnumCounter])
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_tnf', tnf value is incorrect in iteration %d for enum: %s\\n", __LINE__, nLoopCount, NFCGetTnfEnumString(tnf_type[nEnumCounter]));
+                               nGetFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_tnf passed in iteration %d, tnf value: %d \\n", __LINE__, nLoopCount, tnf);
+                       }
+               }
+               
+               nRetVal = nfc_ndef_record_destroy(g_hRecord);
+               if ( nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_destroy failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nEnumCounter, NFCGetTnfEnumString(tnf_type[nEnumCounter]), NFCGetError(nRetVal));
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_destroy passed for enum: %s \\n", __LINE__, NFCGetTnfEnumString(tnf_type[nEnumCounter]));
+               }
+       }
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_tnf failed %d times out of %d times ", __LINE__, nGetFailCount, nEnumSize * MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_get_tnf, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_get_tnf, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+
+//& purpose: Gets text from text record
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_get_text_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Gets text from text record
+* @scenario                                    Create record handle\n
+*                                                      Get text\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_get_text
+* @passcase                                    When nfc_ndef_record_get_text is successfull
+* @failcase                                    If target API nfc_ndef_record_get_text fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_get_text_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszText = NULL;
+       nfc_encode_type_e encode_type[] = {NFC_ENCODE_UTF_8, NFC_ENCODE_UTF_16};
+       int nEnumSize = sizeof(encode_type) / sizeof(encode_type[0]);
+       int nEnumCounter = 0;
+               
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));   
+#endif
+
+       for ( nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               if (NFCCreateRecordText(encode_type[nEnumCounter], nEnumCounter) == false)
+               {
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       NFCGetMemAllocation();
+                       NFCGetTimeOfDay();
+                       nRetVal = nfc_ndef_record_get_text(g_hRecord, &pszText);
+                       NFCExecutionDelay(pszGetSpeedLog);
+                       NFCGetMemStatus(pszGetMemLog);
+                       
+                       if (nRetVal != NFC_ERROR_NONE )
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_text failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]), NFCGetError(nRetVal));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       else if (pszText == NULL)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_text', text value is null in iteration %d for enum: %s\\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       else if (strcmp(pszText, ENCODE_TEXT) != 0)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_text', text value mismatch in iteration %d for enum: %s\\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]));
+                               nGetFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_text passed in iteration %d \\n", __LINE__, nLoopCount);
+                       }
+                       free(pszText);
+                       pszText = NULL;
+               }
+               
+               NFCDestroyText(encode_type[nEnumCounter], nEnumCounter);
+       }
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_text failed %d times out of %d times ", __LINE__, nGetFailCount, nEnumSize * MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_get_text, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_get_text, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+//& purpose: Gets language code from text record
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_get_langcode_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Gets language code from text record
+* @scenario                                    Create record handle\n
+*                                                      Get language code\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_get_langcode
+* @passcase                                    When nfc_ndef_record_get_langcode is successfull
+* @failcase                                    If target API nfc_ndef_record_get_langcode fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_get_langcode_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszLanguage = NULL;
+       nfc_encode_type_e encode_type[] = {NFC_ENCODE_UTF_8, NFC_ENCODE_UTF_16};
+       int nEnumSize = sizeof(encode_type) / sizeof(encode_type[0]);
+       int nEnumCounter = 0;
+       
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));   
+#endif
+       
+       for ( nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               if (NFCCreateRecordText(encode_type[nEnumCounter], nEnumCounter) == false)
+               {
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       NFCGetMemAllocation();
+                       NFCGetTimeOfDay();
+                       nRetVal = nfc_ndef_record_get_langcode(g_hRecord, &pszLanguage);
+                       NFCExecutionDelay(pszGetSpeedLog);
+                       NFCGetMemStatus(pszGetMemLog);
+                       
+                       if (nRetVal != NFC_ERROR_NONE )
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_langcode failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]), NFCGetError(nRetVal));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       else if (pszLanguage == NULL)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_langcode', language value is null in iteration %d for enum: %s \\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       else
+                       {
+                               if (encode_type[nEnumCounter] == NFC_ENCODE_UTF_8)      
+                               {
+                                       if (strcmp(pszLanguage, ENCODE_TYPE_UTF8) != 0)
+                                       {
+                                               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_langcode', language value mismatch in iteration %d for enum: %s \\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]));
+                                               nGetFailCount++;
+                                       }
+                                       else
+                                       {
+                                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_langcode passed in iteration %d \\n", __LINE__, nLoopCount);
+                                       }
+                               }
+                               else
+                               {
+                                       if (strcmp(pszLanguage, ENCODE_TYPE_UTF16) != 0)
+                                       {
+                                               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_langcode', language value mismatch in iteration %d for enum: %s\\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]));
+                                               nGetFailCount++;
+                                       }
+                                       else
+                                       {
+                                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_langcode passed in iteration %d \\n", __LINE__, nLoopCount);
+                                       }
+                               }
+                       }
+                       free(pszLanguage);
+                       pszLanguage = NULL;
+               }
+               
+               NFCDestroyText(encode_type[nEnumCounter], nEnumCounter);
+       }
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_langcode failed %d times out of %d times ", __LINE__, nGetFailCount, nEnumSize * MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_get_langcode, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_get_langcode, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+
+//& purpose: Gets encoding type from text record
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_get_encode_type_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Gets encoding type from text record
+* @scenario                                    Create record handle\n
+*                                                      Get encoding type\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_get_encode_type
+* @passcase                                    When nfc_ndef_record_get_encode_type is successfull
+* @failcase                                    If target API nfc_ndef_record_get_encode_type fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_get_encode_type_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       nfc_encode_type_e encode;
+       nfc_encode_type_e encode_type[] = {NFC_ENCODE_UTF_8, NFC_ENCODE_UTF_16};
+       int nEnumSize = sizeof(encode_type) / sizeof(encode_type[0]);
+       int nEnumCounter = 0;
+       
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));   
+#endif
+       
+       for ( nEnumCounter = 0; nEnumCounter < nEnumSize; nEnumCounter++)
+       {
+               if (NFCCreateRecordText(encode_type[nEnumCounter], nEnumCounter) == false)
+               {
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       NFCGetMemAllocation();
+                       NFCGetTimeOfDay();
+                       nRetVal = nfc_ndef_record_get_encode_type(g_hRecord, &encode);
+                       NFCExecutionDelay(pszGetSpeedLog);
+                       NFCGetMemStatus(pszGetMemLog);
+                       
+                       if (nRetVal != NFC_ERROR_NONE )
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_encode_type failed in iteration %d for enum: %s, error returned = %s \\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]), NFCGetError(nRetVal));
+                               nGetFailCount++;
+                       }
+                       else if (encode != encode_type[nEnumCounter])
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_encode_type', encode value is incorrect in iteration %d for enum: %s \\n", __LINE__, nLoopCount, NFCGetEncodeEnumString(encode_type[nEnumCounter]));
+                               nGetFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_encode_type passed in iteration %d \\n", __LINE__, nLoopCount);
+                       }
+               }
+               NFCDestroyText(encode_type[nEnumCounter], nEnumCounter);
+       }
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_encode_type failed %d times out of %d times ", __LINE__, nGetFailCount, nEnumSize * MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_get_encode_type, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_get_encode_type, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+
+//& purpose: Gets URI from uri record
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_get_uri_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Gets URI from uri record
+* @scenario                                    Create record handle\n
+*                                                      Get uri\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_destroy and nfc_ndef_record_get_uri
+* @passcase                                    When nfc_ndef_record_get_uri is successfull
+* @failcase                                    If target API nfc_ndef_record_get_uri fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_get_uri_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszGetUri = NULL;
+       
+       if (NFCCreateUri() == false)
+       {
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));   
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_record_get_uri(g_hRecord, &pszGetUri);
+               NFCExecutionDelay(pszGetSpeedLog);
+               NFCGetMemStatus(pszGetMemLog);
+               
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_uri failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nGetFailCount++;
+                       if (pszGetUri != NULL)
+                       {
+                               free(pszGetUri);
+                               pszGetUri = NULL;
+                       }
+                       continue;
+               }
+               else if (pszGetUri == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_uri', uri value is null in iteration %d \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+                       continue;
+               }
+               else if (strcmp(pszGetUri, URI) != 0)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_uri' uri value mismatch (set value is: %s and get value is: %s) in iteration %d \\n", __LINE__, URI, pszGetUri, nLoopCount);
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_uri passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+               free(pszGetUri);
+               pszGetUri = NULL;
+       }
+       
+       nRetVal = nfc_ndef_record_destroy(g_hRecord);
+       PRINT_RESULT(nRetVal, "nfc_ndef_record_destroy");
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_uri failed %d times out of %d times ", __LINE__, nGetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_get_uri, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_get_uri, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+
+//& purpose: Gets mime type from mime type record
+//& type: auto
+/**
+* @testcase                            ITc_nfc_ndef_record_get_mime_type_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Gets mime type from mime type record
+* @scenario                                    Create record handle\n
+*                                                      Get mime type\n
+*                                                      Destroy record
+* @apicovered                          nfc_ndef_record_destroy and nfc_ndef_record_get_mime_type
+* @passcase                                    When nfc_ndef_record_get_mime_type is successfull
+* @failcase                                    If target API nfc_ndef_record_get_mime_type fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_ndef_record_get_mime_type_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       const char *pszMimeType = "text/plain";
+       const unsigned char pszData[] = "TempData";
+       int nDataSize = sizeof(pszData);
+       char *pszGetMimeType = NULL;
+       
+       nRetVal = nfc_ndef_record_create_mime(&g_hRecord, pszMimeType, pszData, nDataSize);
+       if (nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_mime failed, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               return 1;
+       }
+       else if (g_hRecord == NULL)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_create_mime', record handle is null. \\n", __LINE__);
+               return 1;
+       }
+       else
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_create_mime passed\\n", __LINE__);
+       }
+       
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));   
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_ndef_record_get_mime_type(g_hRecord, &pszGetMimeType);
+               NFCExecutionDelay(pszGetSpeedLog);
+               NFCGetMemStatus(pszGetMemLog);
+               
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_mime_type failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nGetFailCount++;
+                       if (pszGetMimeType != NULL)
+                       {
+                               free(pszGetMimeType);
+                               pszGetMimeType = NULL;
+                       }
+                       continue;
+               }
+               else if (pszGetMimeType == NULL)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_mime_type', Mime type value is null in iteration %d \\n", __LINE__, nLoopCount);
+                       nGetFailCount++;
+                       continue;
+               }
+               else if (strcmp(pszGetMimeType, pszMimeType) != 0)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] After 'nfc_ndef_record_get_mime_type' Mime type value mismatch (set value is: %s and get value is: %s) in iteration %d \\n", __LINE__, pszMimeType, pszGetMimeType, nLoopCount);
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_mime_type passed in iteration %d \\n", __LINE__, nLoopCount);
+               }
+               free(pszGetMimeType);
+               pszGetMimeType = NULL;
+       }
+       
+       nRetVal = nfc_ndef_record_destroy(g_hRecord);
+       PRINT_RESULT(nRetVal, "nfc_ndef_record_destroy");
+       
+       if (nGetFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_ndef_record_get_mime_type failed %d times out of %d times ", __LINE__, nGetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_ndef_record_get_mime_type, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_ndef_record_get_mime_type, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       
+       return 0;
+}
+
+/** @} */ //end of itc-nfc
+/** @} */ //end of itc-nfc-testcases
\ No newline at end of file
diff --git a/src/itc/nfc/ITs-nfc-se.c b/src/itc/nfc/ITs-nfc-se.c
new file mode 100755 (executable)
index 0000000..4100caa
--- /dev/null
@@ -0,0 +1,758 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-nfc-common.h"
+
+/** @addtogroup itc-nfc
+* @ingroup             itc
+* @{
+*/
+
+//& set: NFC
+
+app_control_h g_app_control_handler;
+
+/**
+* @function            ITs_nfc_se_startup
+* @description         Called before each test, Check whether NFC is supported or not and initialize the NFC manager.
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_nfc_se_startup(void)
+{
+       struct stat buf;   
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }       
+       
+       g_bNfcNotSupported = false;
+       g_bMismatch = false;
+       g_bIsSupportedNfc = NFCCheckSystemInfoFeatureSupported(NFC_FEATURE);    
+       if(!g_bIsSupportedNfc)
+       {
+               if( !( nfc_manager_is_supported() ) )
+               {
+                       g_bNfcNotSupported = true;
+                       return;
+               }
+               g_bMismatch = true;
+               return;
+       } 
+                       
+       int nRetVal = nfc_manager_initialize();
+       if ( nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc_manager_initialize failed in startup, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               g_bNFCTestPrecondition = false;
+               return;
+       }       
+       FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc_manager_initialize successfully \\n",__LINE__);
+       g_bNFCTestPrecondition = true;
+       
+       return;
+}
+
+/**
+* @function            ITs_nfc_se_cleanup
+* @description         Called after each test, deinitialize the NFC manager.
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_nfc_se_cleanup(void)
+{
+    if(g_bNFCTestPrecondition)
+       {
+               int nRetVal = nfc_manager_deinitialize();
+               if ( nRetVal != 0 )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_deinitialize failed in cleanup, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               }
+       }
+       else if (g_bNfcNotSupported && g_bMismatch)
+       {
+               FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc manager was not initialized initially \\n",__LINE__);
+       }
+       return;
+}
+
+
+/**
+* @function            NfcSERegisteredAidCallback
+* @description         callback function Secure Element
+* @parameter           se_type : type of Secure Element , aid : Application Id, read_only : Secure Element read mode, user_data = user data
+* @return                      NA
+*/ 
+void NfcSERegisteredAidCallback (nfc_se_type_e se_type,        const char *aid, bool read_only, void *user_data)
+{
+       FPRINTF("[Line : %d][%s] Reached NfcSERegisteredAidCallback \\n", __LINE__, API_NAMESPACE);
+       return;
+}
+
+/** @addtogroup        itc-nfc-testcases
+* @brief               Integration testcases for module nfc
+* @ingroup             itc-nfc
+* @{
+*/
+
+//& purpose: Get the current card emulation mode
+//& type: auto
+/**
+* @testcase                            ITc_nfc_se_get_card_emulation_mode_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Get the current card emulation mode.
+* @scenario                                    Get the current card emulation mode.
+* @apicovered                          nfc_se_get_card_emulation_mode
+* @passcase                                    When nfc_se_get_card_emulation_mode is successfull
+* @failcase                                    If target API nfc_se_get_card_emulation_mode fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_se_get_card_emulation_mode_p(void)
+{
+       START_TEST;
+       
+       int nRetVal = 0;
+       int nLoopCount = 0;
+       char *pszGetMemLog   = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nMismatchFeatureFailCount = 0;
+       nfc_se_card_emulation_mode_type_e type = NFC_SE_CARD_EMULATION_MODE_ON; 
+       bool bIsSupportedNfcEmulation = NFCCheckSystemInfoFeatureSupported(NFC_CARD_EMULATION_FEATURE);
+       
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszGetSpeedLog =        calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_se_get_card_emulation_mode(&type);
+               NFCExecutionDelay(pszGetSpeedLog);
+               NFCGetMemStatus(pszGetMemLog);
+               if( !bIsSupportedNfcEmulation)
+               {
+                       if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n[Line : %d][NFC_ITc] nfc_se_get_card_emulation_mode API call returned mismatch %s error for unsupported nfc feature", __LINE__, NFCGetError(nRetVal));
+                               nMismatchFeatureFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][NFC_ITc] nfc_se_get_card_emulation_mode API call correctly returned %s error for unsupported nfc feature", __LINE__, NFCGetError(nRetVal));
+                       }
+                       continue;
+               }
+               if (nRetVal != NFC_ERROR_NONE )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_get_card_emulation_mode failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nGetFailCount++;
+               }
+               else
+               {
+                       if (type == NFC_SE_CARD_EMULATION_MODE_ON)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] emulation mode is: %s \\n", __LINE__, "NFC_SE_CARD_EMULATION_MODE_ON");
+                       }
+                       else
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] emulation mode is: %s \\n", __LINE__, "NFC_SE_CARD_EMULATION_MODE_OFF");
+                       }
+               }
+       }
+       
+       if ( nMismatchFeatureFailCount > 0 || nGetFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_get_card_emulation_mode API call returned mismatch return type for unsupported nfc feature %d times, nfc_se_get_card_emulation_mode failed %d times out of %d times ", __LINE__, nMismatchFeatureFailCount, nGetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_se_get_card_emulation_mode, pszGetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_se_get_card_emulation_mode, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       
+       return 0;
+}
+
+//& purpose: To get the card emulation Secure Element type.
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_get_se_type_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     To get the card emulation Secure Element type
+* @scenario                                Get the card emulation Secure Element type\n
+*                           Check whether output value is valid or not
+* @apicovered                          nfc_manager_get_se_type
+* @passcase                                    When nfc_manager_get_se_type are successful and output value is valid
+* @failcase                                    When nfc_manager_get_se_type fails or output value is invalid
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_manager_get_se_type_p(void)
+{
+    START_TEST;
+       int nRetVal = 0;
+       int  nLoopCount = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nMismatchFailCount = 0;
+       int nMismatchFeatureFailCount = 0;
+       bool bIsSupportedNfcEmulation = NFCCheckSystemInfoFeatureSupported(NFC_CARD_EMULATION_FEATURE);
+       
+#if MEMORY_CHECK
+       pszGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszGetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       nfc_se_type_e eGeType = -1;
+                       NFCGetMemAllocation();
+                       NFCGetTimeOfDay();
+                       nRetVal = nfc_manager_get_se_type(&eGeType);
+                       if( !bIsSupportedNfcEmulation)
+                       {
+                               if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+                               {
+                                       FPRINTF("\\n[Line : %d][NFC_ITc] nfc_manager_get_se_type API call returned mismatch %s error for unsupported nfc card emulation feature", __LINE__, NFCGetError(nRetVal));
+                                       nMismatchFeatureFailCount++;
+                               }
+                               else
+                               {
+                                       FPRINTF("\\n[Line : %d][NFC_ITc] nfc_manager_get_se_type API call correctly returned %s error for unsupported nfc card emulation feature", __LINE__, NFCGetError(nRetVal));
+                               }
+                               continue;
+                       }
+                       NFCExecutionDelay(pszGetSpeedLog);
+                       NFCGetMemStatus(pszGetMemLog);
+                       if(nRetVal != 0)        
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_get_se_type failed on iteration %d, error returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       else if(eGeType < 0)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_get_se_type failed on iteration %d, error returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+                               nMismatchFailCount++;
+                       }
+               }
+
+       if ( nMismatchFeatureFailCount || nGetFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_get_se_type API call returned mismatch return type for unsupported nfc feature %d times, nfc_manager_get_se_type failed %d times, nfc_manager_get_se_type is mismatched %d times out of %d times ", __LINE__, nMismatchFeatureFailCount, nGetFailCount, nMismatchFailCount, MAX_COUNT);
+               NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_manager_get_se_type, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_get_se_type, pszGetMemLog);
+#endif
+
+       NFCFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+
+//& purpose: Get the current card emulation mode
+//& type: auto
+/**
+* @testcase                            ITc_nfc_se_set_default_route_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Set the default route
+* @scenario                                Set the default route
+* @apicovered                          nfc_se_set_default_route,nfc_manager_get_se_type
+* @passcase                                    When nfc_se_set_default_route are successful and output value is valid
+* @failcase                                    When nfc_se_set_default_route fails or output value is invalid
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_se_set_default_route_p(void)
+{
+       START_TEST;
+       bool bIsSupportedNfcEmulation = NFCCheckSystemInfoFeatureSupported(NFC_CARD_EMULATION_FEATURE);
+       bool bIsSupportedHCE = NFCCheckSystemInfoFeatureSupported(NFC_HCE_FEATURE);
+       nfc_se_type_e ePowerOnStatus = -1;
+       int nRetVal = nfc_manager_get_se_type(&ePowerOnStatus);
+       if ( ! bIsSupportedNfcEmulation )
+       {
+               if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] nfc_manager_get_se_type API call returned mismatch for unsupported NFC card emulation feature, error returned = %s\\n",
+                               __LINE__, API_NAMESPACE, NFCGetError(nRetVal));
+                       return 1;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][%s] nfc_manager_get_se_type API call correctly returned for unsupported NFC feature, error returned = %s\\n",
+                               __LINE__, API_NAMESPACE, NFCGetError(nRetVal));
+                       return 0;
+               }
+       }
+       
+       int nLoopCount = 0;
+       char *pszSetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nMismatchFeatureFailCount = 0;      
+       
+#if MEMORY_CHECK
+       pszSetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszSetSpeedLog =        calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_se_set_default_route(ePowerOnStatus, ePowerOnStatus, ePowerOnStatus);
+               NFCExecutionDelay(pszSetSpeedLog);
+               NFCGetMemStatus(pszSetMemLog);
+               if( !bIsSupportedHCE)
+               {
+                       if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n[Line : %d][NFC_ITc] nfc_se_set_default_route API call returned mismatch %s error for unsupported nfc feature", __LINE__, NFCGetError(nRetVal));
+                               nMismatchFeatureFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][NFC_ITc] nfc_se_set_default_route API call correctly returned %s error for unsupported nfc feature", __LINE__, NFCGetError(nRetVal));
+                       }
+                       continue;
+               }
+               if (nRetVal != NFC_ERROR_NONE
+                       && nRetVal != NFC_ERROR_SECURITY_RESTRICTED)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_set_default_route failed in iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nSetFailCount++;
+               }               
+       }
+       
+       if ( nMismatchFeatureFailCount > 0 || nSetFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_set_default_route API call returned mismatch return type for unsupported nfc feature %d times, nfc_se_set_default_route failed %d times out of %d times ", __LINE__, nMismatchFeatureFailCount, nSetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszSetMemLog, pszSetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_se_set_default_route, pszSetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_se_set_default_route, pszSetMemLog);
+#endif
+
+       NFCFreeMemory(pszSetMemLog, pszSetSpeedLog, NULL);
+       
+       return 0;
+}
+
+
+//& purpose: To register and unregister a AID for a specific category
+//& type : auto
+/**
+* @testcase                                ITc_nfc_manager_nfc_se_register_unregister_aid_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     register and unregister a AID for a specific category
+* @scenario                                register AID for a specific category
+*                                                  unregister AID for a specific category
+* @apicovered                          nfc_se_register_aid, nfc_se_unregister_aid
+* @passcase                                    When nfc_se_register_aid is successful
+* @failcase                                    When nfc_se_register_aid fails
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_manager_nfc_se_register_unregister_aid_p(void)
+{
+    START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszRegisterUnRegisterMemLog   = NULL;
+       char *pszRegisterSpeedLog = NULL;
+       char *pszUnRegisterSpeedLog = NULL;
+       int nRegisterFailCount = 0;
+       int nUnRegisterFailCount = 0;
+       bool bIsSupportedHCE = NFCCheckSystemInfoFeatureSupported(NFC_HCE_FEATURE);
+       nfc_card_emulation_category_type_e eNfcCardEmuCategory = NFC_CARD_EMULATION_CATEGORY_PAYMENT;
+       if (!LaunchApp(SEAPPIDNAME))
+       {
+               return 1;       
+       }
+#if MEMORY_CHECK
+       pszRegisterUnRegisterMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszRegisterSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnRegisterSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_se_register_aid(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, SEAPPIDHEXVALUE);
+               NFCExecutionDelay(pszRegisterSpeedLog);
+               if(!bIsSupportedHCE)
+               {
+                       if(nRetVal != NFC_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_register_aid failed on iteration %d, expected return = NFC_ERROR_NOT_SUPPORTED, value returned = %s ", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                               nRegisterFailCount++;
+                       }
+                       continue;
+               }
+               if(nRetVal != NFC_ERROR_NONE)   
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_register_aid failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nRegisterFailCount++;
+                       continue;
+               }                       
+        usleep(MICROSECONDS_PER_SECOND);
+               NFCGetTimeOfDay();
+               nRetVal = nfc_se_unregister_aid(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, SEAPPIDHEXVALUE);
+               NFCExecutionDelay(pszUnRegisterSpeedLog);
+               NFCGetMemStatus(pszRegisterUnRegisterMemLog);
+               if(nRetVal != NFC_ERROR_NONE)   
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_register_aid failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nUnRegisterFailCount++;
+                       continue;
+               }       
+       }
+
+       if ( nRegisterFailCount > 0 || nUnRegisterFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_register_aid failed %d times and nfc_se_unregister_aid failed %d time out of %d times ", __LINE__, nRegisterFailCount, nUnRegisterFailCount, MAX_COUNT);
+               NFCFreeMemory(pszRegisterUnRegisterMemLog, pszRegisterSpeedLog, pszUnRegisterSpeedLog);
+               TerminateApp();
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_se_register_aid, pszRegisterSpeedLog);
+       PRINT_SPEED_LOG(nfc_se_unregister_aid, pszUnRegisterSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_manager_nfc_se_register_unregister_aid, pszRegisterUnRegisterMemLog);
+#endif
+
+       NFCFreeMemory(pszRegisterUnRegisterMemLog, pszRegisterSpeedLog, pszUnRegisterSpeedLog);
+       TerminateApp();
+       return 0;
+}
+
+
+//& purpose: Check whether an application to call this api is currently the activated handler for specific AID
+//& type: auto
+/**
+* @testcase                            ITc_nfc_se_is_activated_handler_for_aid_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Check whether an application to call this api is currently the activated handler for specific AID
+* @scenario                                Check whether an application to call this api is currently the activated handler for specific AID
+* @apicovered                          nfc_se_register_aid, nfc_se_is_activated_handler_for_aid, nfc_se_unregister_aid
+* @passcase                                    When nfc_se_is_activated_handler_for_aid is successful
+* @failcase                                    When nfc_se_is_activated_handler_for_aid fails
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_se_is_activated_handler_for_aid_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszIsActivatedMemLog   = NULL;
+       char *pszIsActivatedSpeedLog = NULL;
+       int nIsActivatedFailCount = 0;
+       bool bIsActivatedHandler = false;
+       bool bIsSupportedHCE = NFCCheckSystemInfoFeatureSupported(NFC_HCE_FEATURE);
+       nfc_card_emulation_category_type_e eNfcCardEmuCategory = NFC_CARD_EMULATION_CATEGORY_PAYMENT;
+       if (!LaunchApp(SEAPPIDNAME))
+       {
+               return 1;       
+       }
+       
+       nRetVal = nfc_se_register_aid(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, SEAPPIDHEXVALUE);
+       if(!bIsSupportedHCE)
+       {
+               if(nRetVal != NFC_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_register_aid failed, expected return = NFC_ERROR_NOT_SUPPORTED, value returned = %s ", __LINE__, NFCGetError(nRetVal));
+                       return 1;
+               }
+               return 0;
+       }
+       if(nRetVal != NFC_ERROR_NONE)   
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_register_aid failed, error returned = %s", __LINE__, NFCGetError(nRetVal));
+               TerminateApp();
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszIsActivatedMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszIsActivatedSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_se_is_activated_handler_for_aid(NFC_SE_TYPE_HCE , SEAPPIDHEXVALUE, &bIsActivatedHandler);         
+               NFCExecutionDelay(pszIsActivatedSpeedLog);
+               NFCGetMemStatus(pszIsActivatedMemLog);
+               if(nRetVal != NFC_ERROR_NONE)   
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_is_activated_handler_for_aid failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nIsActivatedFailCount++;
+               }               
+       }
+
+       if ( nIsActivatedFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_is_activated_handler_for_aid failed %d times out of %d times ", __LINE__, nIsActivatedFailCount, MAX_COUNT);
+               NFCFreeMemory(pszIsActivatedMemLog, pszIsActivatedSpeedLog, NULL);
+               nfc_se_unregister_aid(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, SEAPPIDHEXVALUE);
+               TerminateApp();
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_se_is_activated_handler_for_aid, pszIsActivatedSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_se_is_activated_handler_for_aid, pszIsActivatedMemLog);
+#endif
+
+       NFCFreeMemory(pszIsActivatedMemLog, pszIsActivatedSpeedLog, NULL);
+       nfc_se_unregister_aid(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, SEAPPIDHEXVALUE);
+       TerminateApp();
+       return 0;
+}
+
+//& purpose: Check whether an application to call this api is currently the activated handler for category.
+//& type: auto
+/**
+* @testcase                            ITc_nfc_se_is_activated_handler_for_category_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         Check whether an application to call this api is currently the activated handler for category.
+* @scenario                                Check whether an application to call this api is currently the activated handler for category.
+* @apicovered                          nfc_se_register_aid, nfc_se_is_activated_handler_for_category, nfc_se_unregister_aid
+* @passcase                                    When nfc_se_is_activated_handler_for_category is successful
+* @failcase                                    When nfc_se_is_activated_handler_for_category fails
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_se_is_activated_handler_for_category_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszIsActivatedMemLog   = NULL;
+       char *pszIsActivatedSpeedLog = NULL;
+       int nIsActivatedFailCount = 0;
+       bool bIsActivatedHandler = false;
+       bool bIsSupportedHCE = NFCCheckSystemInfoFeatureSupported(NFC_HCE_FEATURE);
+       nfc_card_emulation_category_type_e eNfcCardEmuCategory = NFC_CARD_EMULATION_CATEGORY_PAYMENT;
+       if (!LaunchApp(SEAPPIDNAME))
+       {
+               return 1;       
+       }
+       
+       nRetVal = nfc_se_register_aid(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, SEAPPIDHEXVALUE);
+       if(!bIsSupportedHCE)
+       {
+               if(nRetVal != NFC_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_register_aid failed, expected return = NFC_ERROR_NOT_SUPPORTED, value returned = %s ", __LINE__, NFCGetError(nRetVal));
+                       return 1;
+               }
+               return 0;
+       }
+       if(nRetVal != NFC_ERROR_NONE)   
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_register_aid failed, error returned = %s", __LINE__, NFCGetError(nRetVal));
+               TerminateApp();
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszIsActivatedMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszIsActivatedSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_se_is_activated_handler_for_category(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, &bIsActivatedHandler);                
+               NFCExecutionDelay(pszIsActivatedSpeedLog);
+               NFCGetMemStatus(pszIsActivatedMemLog);
+               if(nRetVal != NFC_ERROR_NONE)   
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_is_activated_handler_for_category failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nIsActivatedFailCount++;
+               }               
+       }
+
+       if ( nIsActivatedFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_is_activated_handler_for_category failed %d times out of %d times ", __LINE__, nIsActivatedFailCount, MAX_COUNT);
+               NFCFreeMemory(pszIsActivatedMemLog, pszIsActivatedSpeedLog, NULL);
+               nfc_se_unregister_aid(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, SEAPPIDHEXVALUE);
+               TerminateApp();
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_se_is_activated_handler_for_category, pszIsActivatedSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_se_is_activated_handler_for_category, pszIsActivatedMemLog);
+#endif
+
+       NFCFreeMemory(pszIsActivatedMemLog, pszIsActivatedSpeedLog, NULL);
+       nfc_se_unregister_aid(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, SEAPPIDHEXVALUE);
+       TerminateApp();
+       return 0;
+}
+
+//& purpose: Check whether an application to call this api is currently the activated handler for specific AID
+//& type: auto
+/**
+* @testcase                            ITc_nfc_se_foreach_registered_aids_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     Check whether an application to call this api is currently the activated handler for category.
+* @scenario                                Check whether an application to call this api is currently the activated handler for category.
+* @apicovered                          nfc_se_register_aid, nfc_se_foreach_registered_aids, nfc_se_unregister_aid
+* @passcase                                    When nfc_se_foreach_registered_aids is successful
+* @failcase                                    When nfc_se_foreach_registered_aids fails
+* @precondition                                NFC Manager must be initialize
+* @postcondition                       Releases all resources of the NFC Manager
+*/
+int ITc_nfc_se_foreach_registered_aids_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszRegisteredMemLog   = NULL;
+       char *pszRegisteredSpeedLog = NULL;
+       int nRegisteredFailCount = 0;
+       bool bIsSupportedHCE = NFCCheckSystemInfoFeatureSupported(NFC_HCE_FEATURE);
+       nfc_card_emulation_category_type_e eNfcCardEmuCategory = NFC_CARD_EMULATION_CATEGORY_PAYMENT;
+       if (!LaunchApp(SEAPPIDNAME))
+       {
+               return 1;       
+       }
+       
+       nRetVal = nfc_se_register_aid(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, SEAPPIDHEXVALUE);
+       if(!bIsSupportedHCE)
+       {
+               if(nRetVal != NFC_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_register_aid failed, expected return = NFC_ERROR_NOT_SUPPORTED, value returned = %s ", __LINE__, NFCGetError(nRetVal));
+                       return 1;
+               }
+               return 0;
+       }
+       if(nRetVal != NFC_ERROR_NONE)   
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_register_aid failed, error returned = %s", __LINE__, NFCGetError(nRetVal));
+               TerminateApp();
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszRegisteredMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszRegisteredSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_se_foreach_registered_aids(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, NfcSERegisteredAidCallback, NULL);              
+               NFCExecutionDelay(pszRegisteredSpeedLog);
+               NFCGetMemStatus(pszRegisteredMemLog);
+               if(nRetVal != NFC_ERROR_NONE)   
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_foreach_registered_aids failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nRegisteredFailCount++;
+               }               
+       }
+
+       if ( nRegisteredFailCount > 0)
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_se_foreach_registered_aids failed %d times out of %d times ", __LINE__, nRegisteredFailCount, MAX_COUNT);
+               NFCFreeMemory(pszRegisteredMemLog, pszRegisteredSpeedLog, NULL);
+               nfc_se_unregister_aid(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, SEAPPIDHEXVALUE);
+               TerminateApp();
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_se_foreach_registered_aids, pszRegisteredSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_se_foreach_registered_aids, pszRegisteredMemLog);
+#endif
+
+       NFCFreeMemory(pszRegisteredMemLog, pszRegisteredSpeedLog, NULL);
+       nfc_se_unregister_aid(NFC_SE_TYPE_HCE , eNfcCardEmuCategory, SEAPPIDHEXVALUE);
+       TerminateApp();
+       return 0;
+}
+
+/** @} */ //end of itc-nfc
+/** @} */ //end of itc-nfc-testcases
diff --git a/src/itc/nfc/ITs-nfc-snep.c b/src/itc/nfc/ITs-nfc-snep.c
new file mode 100755 (executable)
index 0000000..54168a8
--- /dev/null
@@ -0,0 +1,208 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-nfc-common.h"
+
+/** @addtogroup itc-nfc
+* @ingroup             itc
+* @{
+*/
+
+//& set: NFC
+
+static GMainLoop *g_pNFCMainLoop;
+
+/**
+* @function            NFCSnepEventCB
+* @description         Called when SNEP event is raised.
+* @parameter           nfc_p2p_snep_h handle, nfc_snep_event_e event, nfc_error_e result, nfc_ndef_message_h msg, void *user_data
+* @return              void
+*/
+static void NFCSnepEventCB(nfc_p2p_snep_h handle, nfc_snep_event_e event, nfc_error_e result, nfc_ndef_message_h msg, void *user_data)
+{
+       FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc snep event callback invoked \\n", __LINE__);
+       if (g_pNFCMainLoop) 
+       {
+               g_main_loop_quit(g_pNFCMainLoop);
+       } 
+}
+
+/**
+* @function            ITs_nfc_snep_startup
+* @description         Called before each test, Check whether NFC is supported or not and initialize the NFC manager.
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_nfc_snep_startup(void)
+{
+       struct stat buf;   
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       g_bNfcNotSupported = false;
+       g_bMismatch = false;
+       g_bIsSupportedNfc = NFCCheckSystemInfoFeatureSupported(NFC_FEATURE);
+       if(!g_bIsSupportedNfc)
+       {
+               if( !( nfc_manager_is_supported() ) )
+               {
+                       g_bNfcNotSupported = true;
+                       return;
+               }
+               g_bMismatch = true;
+               return;
+       }
+
+       int nRetVal = nfc_manager_initialize();
+       if ( nRetVal != NFC_ERROR_NONE )
+       {
+               FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc_manager_initialize failed in startup, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               g_bNFCTestPrecondition = false;
+               return;
+       }
+       FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc_manager_initialize successfully \\n",__LINE__);
+       g_bNFCTestPrecondition = true;
+
+       return;
+}
+
+/**
+* @function            ITs_nfc_snep_cleanup
+* @description         Called after each test, deinitialize the NFC manager.
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_nfc_snep_cleanup(void)
+{
+    if(g_bNFCTestPrecondition)
+       {
+               int nRetVal = nfc_manager_deinitialize();
+               if ( nRetVal != 0 )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_manager_deinitialize failed in cleanup, error returned = %s \\n", __LINE__, NFCGetError(nRetVal));
+               }
+       }
+       else if (g_bIsSupportedNfc && g_bNFCSupported)
+       {
+               FPRINTF( "\\n [Line : %d]  [NFC_ITc] nfc manager was not initialized initially \\n",__LINE__);
+       }
+       return;
+}
+
+/** @addtogroup        itc-nfc-testcases
+* @brief               Integration testcases for module nfc
+* @ingroup             itc-nfc
+* @{
+*/
+
+//& purpose: Register/Unregister peer-to-peer server using SNEP protocol.
+//& type : auto
+/**
+* @testcase                                ITc_nfc_snep_register_unregister_server_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                     Register/Unregister peer-to-peer server using SNEP protocol.
+* @scenario                                Register the peer-to-peer server using SNEP protocol\n
+*                                                      Unregister the peer-to-peer server using SNEP protocol
+* @apicovered                          nfc_snep_register_server, nfc_snep_unregister_server
+* @passcase                                    When nfc_snep_register_server and nfc_snep_unregister_server are successful
+* @failcase                                    When nfc_snep_register_server or nfc_snep_unregister_server fails
+* @precondition                                NFC Manager must be initialized
+* @postcondition                       NFC Manager must be deinitialized
+*/
+int ITc_nfc_snep_register_unregister_server_p(void)
+{
+    START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       bool bIsSupportedP2P = NFCCheckSystemInfoFeatureSupported(NFC_P2P_FEATURE);
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               NFCGetMemAllocation();
+               NFCGetTimeOfDay();
+               nRetVal = nfc_snep_register_server(SERVICE_ACCESS_NAME, SERVICE_ACCESS_POINT, NFCSnepEventCB, NULL); // Target API
+               NFCExecutionDelay(pszSetSpeedLog);
+               if(!bIsSupportedP2P)
+               {
+                       if(nRetVal != NFC_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_snep_register_server failed on iteration %d, expected return = NFC_ERROR_NOT_SUPPORTED, value returned = %s ", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                               nSetFailCount++;
+                       }
+                       continue;
+               }
+               if(nRetVal != 0)        
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc]  nfc_snep_register_server failed on iteration %d, error returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc]  nfc_snep_register_server success on iteration %d, returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+               }
+               usleep(MICROSECONDS_PER_SECOND);
+               NFCGetTimeOfDay();
+               nRetVal = nfc_snep_unregister_server(SERVICE_ACCESS_NAME, SERVICE_ACCESS_POINT); // Target API
+               NFCExecutionDelay(pszUnsetSpeedLog);
+               NFCGetMemStatus(pszSetUnsetMemLog);
+               if ( nRetVal != 0 )
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_snep_unregister_server failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, NFCGetError(nRetVal));
+                       nUnsetFailCount++;
+               }
+               else
+               {
+                       FPRINTF( "\\n [Line : %d] [NFC_ITc]  nfc_snep_unregister_server success on iteration %d, returned = %s ", __LINE__,nLoopCount, NFCGetError(nRetVal));
+               }
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+               FPRINTF( "\\n [Line : %d] [NFC_ITc] nfc_snep_register_server failed %d times, nfc_snep_unregister_server failed %d times out of %d times ", __LINE__, nSetFailCount, nUnsetFailCount, MAX_COUNT);
+               NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(nfc_snep_register_server, pszSetSpeedLog);
+       PRINT_SPEED_LOG(nfc_snep_unregister_server, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(nfc_snep_register_unregister_server, pszSetUnsetMemLog);
+#endif
+
+       NFCFreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog);
+       return 0;
+}
+/** @} */ //end of itc-nfc
+/** @} */ //end of itc-nfc-testcases
\ No newline at end of file
diff --git a/src/itc/nfc/org.tizen.testnfclient-1.0.0-arm.tpk b/src/itc/nfc/org.tizen.testnfclient-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..ecad379
Binary files /dev/null and b/src/itc/nfc/org.tizen.testnfclient-1.0.0-arm.tpk differ
diff --git a/src/itc/nfc/org.tizen.testnfclient-1.0.0-i386.tpk b/src/itc/nfc/org.tizen.testnfclient-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..a759619
Binary files /dev/null and b/src/itc/nfc/org.tizen.testnfclient-1.0.0-i386.tpk differ
diff --git a/src/itc/nfc/tct-nfc-native.c b/src/itc/nfc/tct-nfc-native.c
new file mode 100755 (executable)
index 0000000..f2316f0
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-nfc-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/nfc/tct-nfc-native.h b/src/itc/nfc/tct-nfc-native.h
new file mode 100755 (executable)
index 0000000..f2ae140
--- /dev/null
@@ -0,0 +1,113 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_NFC_NATIVE_H__
+#define __TCT_NFC_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_nfc_manager_startup(void);
+extern void ITs_nfc_manager_cleanup(void);
+extern void ITs_nfc_ndef_startup(void);
+extern void ITs_nfc_ndef_cleanup(void);
+extern void ITs_nfc_se_startup(void);
+extern void ITs_nfc_se_cleanup(void);
+extern void ITs_nfc_snep_startup(void);
+extern void ITs_nfc_snep_cleanup(void);
+
+extern int ITc_nfc_is_supported_p(void);
+extern int ITc_nfc_manager_initialize_deinitialize_p(void);
+extern int ITc_nfc_is_activated_p(void);
+extern int ITc_nfc_manager_nfc_manager_system_handler_enable_p(void);
+extern int ITc_nfc_manager_set_unset_ndef_discovered_p(void);
+extern int ITc_nfc_manager_set_get_tag_filter_p(void);
+extern int ITc_nfc_manager_set_unset_se_event_cb_p(void);
+extern int ITc_nfc_manager_set_unset_activation_changed_cb_p(void);
+extern int ITc_nfc_manager_set_unset_se_transaction_event_cb_p(void);
+extern int ITc_nfc_manager_set_unset_tag_discovered_cb_p(void);
+extern int ITc_nfc_manager_set_unset_p2p_target_discovered_cb_p(void);
+extern int ITc_nfc_manager_set_unset_hce_event_cb_p(void);
+extern int ITc_nfc_ndef_record_create_destroy_p(void);
+extern int ITc_nfc_ndef_record_create_text_p(void);
+extern int ITc_nfc_ndef_record_create_uri_p(void);
+extern int ITc_nfc_ndef_record_create_mime_p(void);
+extern int ITc_nfc_ndef_message_create_destroy_p(void);
+extern int ITc_nfc_ndef_message_get_record_count_p(void);
+extern int ITc_nfc_ndef_message_append_record_p(void);
+extern int ITc_nfc_ndef_message_insert_remove_record_p(void);
+extern int ITc_nfc_ndef_message_get_record_p(void);
+extern int ITc_nfc_ndef_message_get_rawdata_create_from_rawdata_p(void);
+extern int ITc_nfc_ndef_record_get_payload_p(void);
+extern int ITc_nfc_ndef_record_set_get_id_p(void);
+extern int ITc_nfc_ndef_record_get_type_p(void);
+extern int ITc_nfc_ndef_record_get_tnf_p(void);
+extern int ITc_nfc_ndef_record_get_text_p(void);
+extern int ITc_nfc_ndef_record_get_langcode_p(void);
+extern int ITc_nfc_ndef_record_get_encode_type_p(void);
+extern int ITc_nfc_ndef_record_get_uri_p(void);
+extern int ITc_nfc_ndef_record_get_mime_type_p(void);
+extern int ITc_nfc_se_get_card_emulation_mode_p(void);
+extern int ITc_nfc_manager_get_se_type_p(void);
+extern int ITc_nfc_se_set_default_route_p(void);
+extern int ITc_nfc_manager_nfc_se_register_unregister_aid_p(void);
+extern int ITc_nfc_se_is_activated_handler_for_aid_p(void);
+extern int ITc_nfc_se_is_activated_handler_for_category_p(void);
+extern int ITc_nfc_se_foreach_registered_aids_p(void);
+extern int ITc_nfc_snep_register_unregister_server_p(void);
+
+testcase tc_array[] = {
+    {"ITc_nfc_is_supported_p", ITc_nfc_is_supported_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_manager_initialize_deinitialize_p", ITc_nfc_manager_initialize_deinitialize_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_is_activated_p", ITc_nfc_is_activated_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_manager_nfc_manager_system_handler_enable_p", ITc_nfc_manager_nfc_manager_system_handler_enable_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_manager_set_unset_ndef_discovered_p", ITc_nfc_manager_set_unset_ndef_discovered_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_manager_set_get_tag_filter_p", ITc_nfc_manager_set_get_tag_filter_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_manager_set_unset_se_event_cb_p", ITc_nfc_manager_set_unset_se_event_cb_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_manager_set_unset_activation_changed_cb_p", ITc_nfc_manager_set_unset_activation_changed_cb_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_manager_set_unset_se_transaction_event_cb_p", ITc_nfc_manager_set_unset_se_transaction_event_cb_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_manager_set_unset_tag_discovered_cb_p", ITc_nfc_manager_set_unset_tag_discovered_cb_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_manager_set_unset_p2p_target_discovered_cb_p", ITc_nfc_manager_set_unset_p2p_target_discovered_cb_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_manager_set_unset_hce_event_cb_p", ITc_nfc_manager_set_unset_hce_event_cb_p, ITs_nfc_manager_startup, ITs_nfc_manager_cleanup},
+    {"ITc_nfc_ndef_record_create_destroy_p", ITc_nfc_ndef_record_create_destroy_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_create_text_p", ITc_nfc_ndef_record_create_text_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_create_uri_p", ITc_nfc_ndef_record_create_uri_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_create_mime_p", ITc_nfc_ndef_record_create_mime_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_message_create_destroy_p", ITc_nfc_ndef_message_create_destroy_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_message_get_record_count_p", ITc_nfc_ndef_message_get_record_count_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_message_append_record_p", ITc_nfc_ndef_message_append_record_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_message_insert_remove_record_p", ITc_nfc_ndef_message_insert_remove_record_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_message_get_record_p", ITc_nfc_ndef_message_get_record_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_message_get_rawdata_create_from_rawdata_p", ITc_nfc_ndef_message_get_rawdata_create_from_rawdata_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_get_payload_p", ITc_nfc_ndef_record_get_payload_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_set_get_id_p", ITc_nfc_ndef_record_set_get_id_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_get_type_p", ITc_nfc_ndef_record_get_type_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_get_tnf_p", ITc_nfc_ndef_record_get_tnf_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_get_text_p", ITc_nfc_ndef_record_get_text_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_get_langcode_p", ITc_nfc_ndef_record_get_langcode_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_get_encode_type_p", ITc_nfc_ndef_record_get_encode_type_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_get_uri_p", ITc_nfc_ndef_record_get_uri_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_ndef_record_get_mime_type_p", ITc_nfc_ndef_record_get_mime_type_p, ITs_nfc_ndef_startup, ITs_nfc_ndef_cleanup},
+    {"ITc_nfc_se_get_card_emulation_mode_p", ITc_nfc_se_get_card_emulation_mode_p, ITs_nfc_se_startup, ITs_nfc_se_cleanup},
+    {"ITc_nfc_manager_get_se_type_p", ITc_nfc_manager_get_se_type_p, ITs_nfc_se_startup, ITs_nfc_se_cleanup},
+    {"ITc_nfc_se_set_default_route_p", ITc_nfc_se_set_default_route_p, ITs_nfc_se_startup, ITs_nfc_se_cleanup},
+    {"ITc_nfc_manager_nfc_se_register_unregister_aid_p", ITc_nfc_manager_nfc_se_register_unregister_aid_p, ITs_nfc_se_startup, ITs_nfc_se_cleanup},
+    {"ITc_nfc_se_is_activated_handler_for_aid_p", ITc_nfc_se_is_activated_handler_for_aid_p, ITs_nfc_se_startup, ITs_nfc_se_cleanup},
+    {"ITc_nfc_se_is_activated_handler_for_category_p", ITc_nfc_se_is_activated_handler_for_category_p, ITs_nfc_se_startup, ITs_nfc_se_cleanup},
+    {"ITc_nfc_se_foreach_registered_aids_p", ITc_nfc_se_foreach_registered_aids_p, ITs_nfc_se_startup, ITs_nfc_se_cleanup},
+    {"ITc_nfc_snep_register_unregister_server_p", ITc_nfc_snep_register_unregister_server_p, ITs_nfc_snep_startup, ITs_nfc_snep_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_NFC_NATIVE_H__
diff --git a/src/itc/notification/CMakeLists.txt b/src/itc/notification/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..af2d34d
--- /dev/null
@@ -0,0 +1,44 @@
+SET(PKG_NAME "notification")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "notification")
+SET(APP_LIB "capi-appfw-application")
+SET(TC_SOURCES
+       ITs-notification-common.c
+       ITs-notification.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-appfw-application
+       dlog
+)
+
+PKG_CHECK_MODULES(${APP_LIB} REQUIRED
+       ${APP_LIB}
+       glib-2.0
+       gobject-2.0
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+       ${${APP_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       ${${APP_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/notification/ITs-notification-common.c b/src/itc/notification/ITs-notification-common.c
new file mode 100755 (executable)
index 0000000..130128d
--- /dev/null
@@ -0,0 +1,401 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "ITs-notification-common.h"
+
+/** @addtogroup itc-notification
+* @ingroup             itc
+* @{
+*/
+
+/**
+* @function            NotificationGetDataPath
+* @description         Returns the application data path
+* @parameter           pAppDataPath: application data path
+* @return                      true if succeed else false
+*/
+bool NotificationGetDataPath(char* pAppDataPath)
+{
+       if ( NULL == pAppDataPath )
+       {
+               FPRINTF("[Line : %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if ( NULL == pPath )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get application data path; app_get_data_path returned null value\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+       FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
+       return true;
+}
+
+/**
+* @function            NotificationAppendToAppDataPath
+* @description         Appends the input string to application data path
+* @parameter           pInputPath: path to append to data path; pFinalPath: final resultant path
+* @return                      true if succeed else false
+*/
+bool NotificationAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if ( NULL == pInputPath || NULL == pFinalPath )
+       {
+               FPRINTF("[Line : %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if ( false == NotificationGetDataPath(pAppDataPath) )
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+
+       FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
+
+       return true;
+}
+
+/**
+* @function            notification_changed_callback
+* @description         Callback function for notification changed
+* @parameter[IN]   void *data 
+*           [IN]   notification_type_e   
+* @return                      NA
+*/
+void notification_changed_callback(void *data, notification_type_e type)
+{
+        g_bNotificationChangeCallback = true;
+        FPRINTF("\\n[Line: %d][%s]notification_changed_callback invoked, notification type = %d", __LINE__, API_NAMESPACE, type);
+}
+
+/**
+* @function            notification_result_callback
+* @description         Callback function for notification changed
+* @parameter[IN]   int priv_id 
+*           [IN]   int result   
+*           [IN]   void *data
+* @return                      NA
+*/
+void notification_result_callback(int priv_id, int result, void *data)
+{
+       g_bNotificationResultCallback = true;
+       FPRINTF("\\n[Line: %d][%s]notification_result_callback invoked, Private Data = %d, Result = %d", __LINE__, API_NAMESPACE, priv_id, result);
+}
+
+/**
+* @function            notification_deffered_job_callback
+* @description         Callback function for deferred job
+* @parameter           NA
+* @return                      NA
+*/ 
+void notification_deffered_job_callback(void *data)
+{
+       g_bNotificationDeferredJobCallback = true;
+       FPRINTF("\n[Line: %d][%s]notification_deffered_job_callback invoked",__LINE__, API_NAMESPACE );
+}      
+       
+/**
+* @function            CreateNotification
+* @description         Creates internal structure data and returns a notification handle.
+* @parameter       NotificationType
+* @return                      NA
+*/
+bool CreateNotification(notification_type_e eNotificationType)
+{
+       int nRet = 0;
+       FreeAndDeleteNotificationResourceHandle();
+       g_NotificationHandle = notification_create(eNotificationType);
+       if(g_NotificationHandle == NULL)
+       {
+               NotificationPrintErrorMessage("notification_create");
+               return false;
+       }
+       nRet = notification_post(g_NotificationHandle);
+       if(nRet != NOTIFICATION_ERROR_NONE) 
+       {
+               NotificationPrintErrorMessage("notification_post");
+               FreeAndDeleteNotificationResourceHandle();
+               return false;
+       }       
+
+       return true;
+}
+
+/**
+* @function            FreeAndDeleteNotificationResourceHandle
+* @description         Free internal data structure and notification handle.
+* @parameter       
+* @return                      NA
+*/
+void FreeAndDeleteNotificationResourceHandle()
+{
+       DELETE_NOTIFICATION(g_NotificationHandle);
+       FREE_NOTIFICATION(g_NotificationHandle);
+       g_NotificationHandle = NULL;
+}
+
+/**
+* @function            NotificationFreeGlobalMemoryResources
+* @description         Free all memory allocated resources in case of return or ending tc execution
+* @parameter           NA
+* @return                      NA
+*/ 
+void NotificationFreeGlobalMemoryResources()
+{
+       FREE_MEMORY(g_pszNotificationSpeedLog);
+       FREE_MEMORY(g_pszNotificationMemLog);
+}
+
+/**    
+* @function                    NotificationPrintSpeedLog
+* @description                 Prints speed Log
+* @parameter   [IN]    pszAPI[API name]
+*                              [IN]    pszLog[LOG messages]
+* @return                              NA
+*/
+void NotificationPrintSpeedLog(char *pszAPI, char *pszLog)
+{
+       int nStrLen = strlen(pszLog);
+       if(nStrLen > 0) 
+       {
+               pszLog[nStrLen-1]='\0';
+               FPRINTF("\\n[Line: %d][%s]%s_TimeInMicrosec- %s", __LINE__, API_NAMESPACE, pszAPI, pszLog);
+       }
+}
+
+/**    
+* @function                    NotificationPrintMemLog
+* @description                 Prints memory leak status
+* @parameter   [IN]    pszAPI[API name]
+*                              [IN]    pszLog[LOG messages]
+* @return                              NA
+*/
+void NotificationPrintMemLog(char *pszAPI, char *pszLog)
+{
+       int nStrLen = strlen(pszLog);
+       if(nStrLen > 0) 
+       {
+               pszLog[nStrLen-1]='\0';
+               FPRINTF("\\n[Line: %d][%s]%s_memoryleak- %s\n", __LINE__, API_NAMESPACE, pszAPI, pszLog);
+       }
+}
+
+/**
+* @function                    SystemGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void NotificationGetMemAllocation()
+{
+       #if MEMORY_CHECK
+               g_stNotificationSystemMemInfo = mallinfo();
+       #endif
+}
+
+/**
+* @function                    SystemGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and Previous Memory Allocation.]
+* @return                      NA
+*/
+void NotificationGetMemStatus(char *pszAPIMemory)
+{
+       #if MEMORY_CHECK        
+               if( pszAPIMemory != NULL )
+               {
+                       struct mallinfo stMemInfo;
+                       int nMemDifference;
+                       char* pszLog;
+                       
+                       stMemInfo = mallinfo();
+                       pszLog= calloc(MEMLOG , sizeof(char));
+                       
+                       if(stMemInfo.uordblks > g_stNotificationSystemMemInfo.uordblks)
+                       {
+                               nMemDifference = (stMemInfo.uordblks - g_stNotificationSystemMemInfo.uordblks);
+                       }
+                       else
+                       {
+                               nMemDifference = (g_stNotificationSystemMemInfo.uordblks - stMemInfo.uordblks);
+                       }
+               
+                       sprintf(pszLog, "%d,", nMemDifference);
+                       strcat(pszAPIMemory, pszLog);
+                       free(pszLog);
+               }
+       #endif
+}
+
+/**
+* @function            SystemGetTimeOfDay
+* @description         Get time perior to target api call & set it to g_stVconfStartTime
+* @parameter           NA
+* @return                      NA
+*/ 
+void NotificationGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stNotificationStartTime, NULL);
+#endif
+}
+
+/**
+* @function                    ExecutionDelay
+* @description                 Returns a log for a code-block of statements execution delay
+* @parameter[OUT]              pszAPITime [String poniter containg the time difference]
+* @return                              NA
+*/
+void NotificationExecutionDelay(char* pszAPITime)
+{
+       #if SPEED_CHECK
+       
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+               
+               pszLogTime=calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec - g_stNotificationStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stNotificationStartTime.tv_usec;
+               
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+               
+       #endif
+}
+
+/**
+* @function            Notification_GetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* Notification_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case NOTIFICATION_ERROR_NONE:                                   szErrorVal = "NOTIFICATION_ERROR_NONE";                                         break;
+       case NOTIFICATION_ERROR_INVALID_PARAMETER:              szErrorVal = "NOTIFICATION_ERROR_INVALID_PARAMETER";            break;
+       case NOTIFICATION_ERROR_OUT_OF_MEMORY:                  szErrorVal = "NOTIFICATION_ERROR_OUT_OF_MEMORY";                        break;
+       case NOTIFICATION_ERROR_FROM_DB:                                szErrorVal = "NOTIFICATION_ERROR_FROM_DB";                                      break;
+       case NOTIFICATION_ERROR_ALREADY_EXIST_ID:               szErrorVal = "NOTIFICATION_ERROR_ALREADY_EXIST_ID";                     break;
+       case NOTIFICATION_ERROR_FROM_DBUS:                              szErrorVal = "NOTIFICATION_ERROR_FROM_DBUS";                            break;
+       case NOTIFICATION_ERROR_NOT_EXIST_ID:                   szErrorVal = "NOTIFICATION_ERROR_NOT_EXIST_ID";                         break;
+       case NOTIFICATION_ERROR_IO_ERROR:                               szErrorVal = "NOTIFICATION_ERROR_IO_ERROR";                                     break;
+       case NOTIFICATION_ERROR_SERVICE_NOT_READY:              szErrorVal = "NOTIFICATION_ERROR_SERVICE_NOT_READY";            break;
+       case NOTIFICATION_ERROR_PERMISSION_DENIED:              szErrorVal = "NOTIFICATION_ERROR_PERMISSION_DENIED";            break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**    
+* @function                    NotificationPrintErrorMessage
+* @description                 Prints Error API Error message
+* @parameter   [IN]    pszAPI[API name]
+* @return                              NA
+*/
+void  NotificationPrintErrorMessage(char *pszAPI)
+{
+       FPRINTF("\\n[Line: %d][%s][%s API Call Failed]\n", __LINE__, API_NAMESPACE, pszAPI);
+}
+
+/**    
+* @function                    NotificationLogAPICallErrorMessage
+* @description                 Prints API Error message to the console only
+* @parameter   [IN]    pszAPI[API name]
+*                              [IN]    nRet[API return value]
+* @return                              NA
+*/
+void NotificationLogAPICallErrorMessage(char *pszAPI, int nRet)
+{
+       switch(nRet)
+       {
+               case NOTIFICATION_ERROR_NONE:
+                               FPRINTF("\\n[Line: %d][%s][%s API Call Failed with Return Value: NOTIFICATION_ERROR_NONE]\n", __LINE__, API_NAMESPACE, pszAPI);
+                               break;
+               case NOTIFICATION_ERROR_INVALID_PARAMETER:
+                               FPRINTF("\\n[Line: %d][%s][%s API Call Failed with Return Value: NOTIFICATION_ERROR_INVALID_PARAMETER ]\n", __LINE__, API_NAMESPACE, pszAPI);
+                               break;
+               case NOTIFICATION_ERROR_OUT_OF_MEMORY:
+                               FPRINTF("\\n[Line: %d][%s][%s API Call Failed with Return Value: NOTIFICATION_ERROR_OUT_OF_MEMORY ]\n", __LINE__, API_NAMESPACE, pszAPI);
+                               break;
+               case NOTIFICATION_ERROR_FROM_DB:
+                               FPRINTF("\\n[Line: %d][%s][%s API Call Failed with Return Value: NOTIFICATION_ERROR_FROM_DB ]\n", __LINE__, API_NAMESPACE, pszAPI);
+                               break;
+               case NOTIFICATION_ERROR_ALREADY_EXIST_ID:
+                               FPRINTF("\\n[Line: %d][%s][%s API Call Failed with Return Value: NOTIFICATION_ERROR_ALREADY_EXIST_ID ]\n", __LINE__, API_NAMESPACE, pszAPI);
+                               break;
+               case NOTIFICATION_ERROR_FROM_DBUS:
+                               FPRINTF("\\n[Line: %d][%s][%s API Call Failed with Return Value: NOTIFICATION_ERROR_FROM_DBUS ]\n", __LINE__, API_NAMESPACE, pszAPI);
+                               break;
+               case NOTIFICATION_ERROR_NOT_EXIST_ID:
+                               FPRINTF("\\n[Line: %d][%s][%s API Call Failed with Return Value: NOTIFICATION_ERROR_NOT_EXIST_ID ]\n", __LINE__, API_NAMESPACE, pszAPI);
+                               break;
+               case NOTIFICATION_ERROR_IO_ERROR:
+                               FPRINTF("\\n[Line: %d][%s][%s API Call Failed with Return Value: NOTIFICATION_ERROR_IO_ERROR ]\n", __LINE__, API_NAMESPACE, pszAPI);
+                               break;
+               case NOTIFICATION_ERROR_SERVICE_NOT_READY:
+                               FPRINTF("\\n[Line: %d][%s][%s API Call Failed with Return Value: NOTIFICATION_ERROR_SERVICE_NOT_READY ]\n", __LINE__, API_NAMESPACE, pszAPI);
+                               break;
+               case NOTIFICATION_ERROR_PERMISSION_DENIED:
+                               FPRINTF("\\n[Line: %d][%s][%s API Call Failed with Return Value: NOTIFICATION_ERROR_PERMISSION_DENIED ]\n", __LINE__, API_NAMESPACE, pszAPI);
+                               break;
+               default:
+                               FPRINTF("\\n[Line: %d][%s][%s API Call Failed with Return Value: Undifine]\n", __LINE__, API_NAMESPACE, pszAPI);
+                               break;
+        }
+}
+
+/**
+* @function            Application_AppControlGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* Application_AppControlGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case APP_CONTROL_ERROR_NONE :                                   szErrorVal = "APP_CONTROL_ERROR_NONE";                                          break; 
+       case APP_CONTROL_ERROR_INVALID_PARAMETER:               szErrorVal = "APP_CONTROL_ERROR_INVALID_PARAMETER";                     break; 
+       case APP_CONTROL_ERROR_OUT_OF_MEMORY:                   szErrorVal = "APP_CONTROL_ERROR_OUT_OF_MEMORY";                         break; 
+       case APP_CONTROL_ERROR_APP_NOT_FOUND:                   szErrorVal = "APP_CONTROL_ERROR_APP_NOT_FOUND";                         break;
+       case APP_CONTROL_ERROR_KEY_NOT_FOUND:                   szErrorVal = "APP_CONTROL_ERROR_KEY_NOT_FOUND";                         break;
+       case APP_CONTROL_ERROR_KEY_REJECTED:                    szErrorVal = "APP_CONTROL_ERROR_KEY_REJECTED";                          break;
+       case APP_CONTROL_ERROR_INVALID_DATA_TYPE:               szErrorVal = "APP_CONTROL_ERROR_INVALID_DATA_TYPE";                     break;
+       case APP_CONTROL_ERROR_LAUNCH_REJECTED:                 szErrorVal = "APP_CONTROL_ERROR_LAUNCH_REJECTED";                       break;
+       case APP_CONTROL_ERROR_PERMISSION_DENIED:               szErrorVal = "APP_CONTROL_ERROR_PERMISSION_DENIED";                     break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                           break;
+       }
+       return szErrorVal;
+}
+
+/** @} */ //end of itc-notification
\ No newline at end of file
diff --git a/src/itc/notification/ITs-notification-common.h b/src/itc/notification/ITs-notification-common.h
new file mode 100755 (executable)
index 0000000..1d81f5d
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_NOTIFICATION_COMMON_H_
+#define _ITS_NOTIFICATION_COMMON_H_
+
+#include "assert.h"
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <pthread.h>
+#include <time.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <libintl.h>
+#include "app.h"
+#include <notification.h>
+#include <bundle.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <app.h>
+
+/** @addtogroup itc-notification
+* @ingroup             itc
+* @{
+*/
+
+#define API_NAMESPACE                                  "Notification_ITC"
+#define TIMELOG                                                                100
+#define MEMLOG                                                                 100
+#define LOGSIZE                                                        1024
+#define BOOTUP_TIME                                                    5000
+#define MEMLOG_SIZE                                            1000
+#define MICROSECONDS_PER_SECOND                        1000000
+#define SET_PACKAGE_NAME                               "org.tizen.quickpanel"
+#define APP_IMAGE_FULL_PATH                    "file:///tmp/info.png"
+#define BASIC_TEXT                             "I'm Title"
+#define TEXT_KEY_FOR_LOCALIZATION              "IDS_APP_BODY_IM_TITLE"  
+#define BUNDLE_KEY                             "foo_key"
+#define BUNDLE_VALUE                           "bar_val"
+#define PKG_SET_NAME                           "testkit"
+#define NOTIFICATION_PROPERTY_SET              "OPT_NOTIFICATION"
+#define NOTIFICATION_PROPERTY_VALUE            "1"
+#define NOTIFICATION_SET_DOMAIN_VALUE          "domain"
+#define NOTIFICATION_DOMAIN_DIR_VALUE          "domain.po"
+#define DEFAULT_FILE_PATH                                      "path"
+#define BUNDLE_RESUT_FAIL                                      -1
+#define BUNDLE_RESUT_SUCCESS                           0
+#define NOTIFICATION_LED_COLOR                         0 
+#define NOTIFICATION_SET_PROGRESS_VAL          0.5
+#define NOTIFICATION_SET_SIZE_VAL                      1000.0
+#define WAIT_CALLBACK                                          5
+#define NOTIFICATION_TAG                                       "notification_tag"
+#define PATH_LEN                                                       1024
+
+FILE *g_fpLog;
+
+//Add helper function declarations here
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define FREE_MEMORY(src)                                                       { if(src) {free(src); src = NULL;}}
+#define FREE_NOTIFICATION(notification)                                { if(notification != NULL) {notification_free(notification);}}
+#define DELETE_NOTIFICATION(notification)                              { if(notification != NULL) {notification_delete(notification);}}
+#define START_TEST                                                                             {\
+                                                                                                                       FPRINTF("\\n[Line No : %d][%s] Starting test : %s\n",__LINE__, API_NAMESPACE, __FUNCTION__);\
+                                                                                                               }
+
+struct timeval g_stNotificationStartTime;
+struct mallinfo g_stNotificationSystemMemInfo;
+
+bool g_bNotificationDeferredJobCallback;       
+bool g_bNotificationStatusMsgCallback;
+bool g_bNotificationChangeCallback;
+bool g_bNotificationDetailChangeCallback;
+bool g_bNotificationResultCallback;
+
+bool g_bTargetAPISetupSuccess;
+bundle *g_pstBundle;
+char* g_pszNotificationMemLog;
+char* g_pszNotificationSpeedLog;
+
+notification_h g_NotificationHandle;
+
+bool CreateNotification(notification_type_e eNotificationType);
+void FreeAndDeleteNotificationResourceHandle();
+
+void NotificationGetMemAllocation();
+void NotificationGetMemStatus(char *pszAPIMemory);
+void NotificationGetTimeOfDay();
+void NotificationExecutionDelay(char* pszAPITime);
+char* Notification_GetError(int nRet);
+void NotificationLogAPICallErrorMessage(char *pszAPI, int nRet);
+void NotificationPrintErrorMessage(char *pszAPI);
+void NotificationPrintSpeedLog(char *pszAPI, char *pszLog);
+void NotificationPrintMemLog(char *pszAPI, char *pszLog);
+void NotificationFreeGlobalMemoryResources();
+
+void notification_changed_callback(void *data, notification_type_e type);
+void notification_result_callback(int nPrivId, int nResult, void *data);
+void notification_deffered_job_callback(void *data);
+
+char* Application_AppControlGetError(int nRet);
+bool NotificationGetDataPath(char* pPath); // this function outputs tha application data path
+bool NotificationAppendToAppDataPath(char* pInputPath, char* pFinalPath); // this function appends the input string to app data path and outputs the final resultant path
+
+/** @} */ //end of itc-notification
+
+#endif  //_ITS_NOTIFICATION_COMMON_H_
diff --git a/src/itc/notification/ITs-notification.c b/src/itc/notification/ITs-notification.c
new file mode 100755 (executable)
index 0000000..394487d
--- /dev/null
@@ -0,0 +1,3829 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-notification-common.h"
+
+/** @addtogroup itc-notification
+* @ingroup             itc
+* @{
+*/
+
+//& set: notification
+
+/**
+* @function            ITs_notification_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_notification_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       return;
+}
+
+/**
+* @function            ITs_notification_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_notification_cleanup(void)
+{
+       return;
+}
+
+/** @addtogroup        itc-notification-testcases
+* @brief               Integration testcases for module notification
+* @ingroup             itc-notification
+* @{
+*/
+
+//& type : auto
+//& purpose: Creates a notification clone.
+/**
+* @testcase                            ITc_notification_clone_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Creates a notification clone.
+* @scenario                            Create notification\n
+*                                              Perform notification_clone API\n
+*                                              Check return value and also check clone value is null or not.
+* @apicovered                  notification_create, notification_clone
+* @passcase                            notification_clone is successful and return correct value
+* @failcase                            notification_clone gets failed or return null value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notification_clone_p(void)
+{
+       START_TEST;
+       
+       notification_error_e eRetNotiErr;
+       int nLoopControler = 0, nCreateFailCount = 0, nCloneFailCount = 0;
+
+       notification_type_e noti_type[] = { NOTIFICATION_TYPE_NOTI,
+                                                                               NOTIFICATION_TYPE_ONGOING};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       notification_h cloneNotiHandler = NULL;
+                       g_NotificationHandle = notification_create(noti_type[enum_counter]);
+                       if(NULL == g_NotificationHandle)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_create failed at iteration count = %d for notification_type_e enum value = %d, returns null handle vale\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter]);
+                               nCreateFailCount++;     
+                               continue;
+                       }
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr = notification_clone(g_NotificationHandle, &cloneNotiHandler);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_clone failed at iteration count = %d for notification_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nCloneFailCount++;
+                               FreeAndDeleteNotificationResourceHandle();
+                               continue;
+                       }
+
+                       if(NULL == cloneNotiHandler)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_clone returns null handler at iteration count = %d notification_type_e enum value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter]);
+                               nCloneFailCount++;
+                               FreeAndDeleteNotificationResourceHandle();
+                               continue;
+                       }
+
+                       notification_free(cloneNotiHandler);
+
+                       FreeAndDeleteNotificationResourceHandle();
+               }
+       }
+
+       if( nCreateFailCount > 0 || nCloneFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_create failed %d times, notifiation_clone failed %d times out of %d times", __LINE__, API_NAMESPACE, nCreateFailCount, nCloneFailCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notifiation_clone",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notifiation_clone",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Creates notification handle
+/**
+* @testcase                            ITc_notifiation_create_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Creates notification handle
+* @scenario                            Creates notification handle\n
+*                                              Free and delete the handle
+* @apicovered                  notification_create
+* @passcase                            notifiation_create is successful and return valid handle
+* @failcase                            notifiation_create gets failed or return invalid handle
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notifiation_create_p(void)
+{
+       START_TEST;
+
+       int nLoopControler=0, nCreateFailCount=0;
+
+       notification_type_e noti_type[] = { NOTIFICATION_TYPE_NOTI,
+                                                                               NOTIFICATION_TYPE_ONGOING};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {       
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       g_NotificationHandle = notification_create(noti_type[enum_counter]);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(NULL == g_NotificationHandle)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_create failed at iteration count = %d for notification_type_e enum value = %d, returns null handle vale\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter]);
+                               nCreateFailCount++;     
+                               continue;
+                       }
+
+                       FreeAndDeleteNotificationResourceHandle();
+               }
+       }
+
+       if( nCreateFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_create failed %d times out of %d times", __LINE__, API_NAMESPACE, nCreateFailCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notifiation_create",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notifiation_create",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+//& type : auto
+//& purpose: Creates and deleted notification handle
+/**
+* @testcase                            ITc_notification_delete_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Creates and deleted notification handle
+* @scenario                            Creates notification handle\n
+*                                              Free and delete the handle
+* @apicovered                  notification_create, notification_free, notification_delete
+* @passcase                            notifiation_delete is successful and behave properly
+* @failcase                            notifiation_delete gets failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notification_delete_p(void)
+{
+       START_TEST;
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nCreateFailCount=0, nDeleteFailCount=0;
+       
+       notification_type_e noti_type[] = { NOTIFICATION_TYPE_NOTI,
+                                                                               NOTIFICATION_TYPE_ONGOING};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       g_NotificationHandle = notification_create(noti_type[enum_counter]);
+                       if(NULL == g_NotificationHandle)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_create failed at iteration count = %d for notification_type_e enum value = %d, returns null handle vale\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter]);
+                               nCreateFailCount++;     
+                               continue;
+                       }
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr = notification_delete(g_NotificationHandle);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_delete failed at iteration count = %d for notification_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nDeleteFailCount++;
+                       }
+
+                       notification_free(g_NotificationHandle);
+               }
+       }
+
+       if( nCreateFailCount > 0 || nDeleteFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_create failed %d times, notification_delete failed %d times out of %d times", __LINE__, API_NAMESPACE, nCreateFailCount, nDeleteFailCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_delete",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_delete",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+//& type : auto
+//& purpose: Creates and frees notification handle
+/**
+* @testcase                            ITc_notification_free_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Creates and frees notification handle
+* @scenario                            Creates notification handle\n
+*                                              Free and delete the handle
+* @apicovered                  notification_create, notification_free, notification_delete
+* @passcase                            notifiation_free is successful and behave properly
+* @failcase                            notifiation_free gets failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notification_free_p(void)
+{
+       START_TEST;
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nCreateFailCount=0, nFreeFailCount=0;
+       
+       notification_type_e noti_type[] = { NOTIFICATION_TYPE_NOTI,
+                                                                               NOTIFICATION_TYPE_ONGOING};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       g_NotificationHandle = notification_create(noti_type[enum_counter]);
+                       if(NULL == g_NotificationHandle)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_create failed at iteration count = %d for notification_type_e enum value = %d, returns null handle vale\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter]);
+                               nCreateFailCount++;     
+                               continue;
+                       }
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr = notification_free(g_NotificationHandle);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_free failed at iteration count = %d for notification_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nFreeFailCount++;
+                       }
+
+                       notification_delete(g_NotificationHandle);
+               }
+       }
+
+       if( nCreateFailCount > 0 || nFreeFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_create failed %d times, notification_free failed %d times out of %d times", __LINE__, API_NAMESPACE, nCreateFailCount, nFreeFailCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_free",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_free",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Creates and deletes all notifications.
+/**
+* @testcase                            ITc_notification_delete_all_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Creates and deletes all notifications.
+* @scenario                            Create notification\n
+*                                              Delete all notifications of the given type
+* @apicovered                  notification_create, notification_delete_all
+* @passcase                            notification_delete_all is successful after notification_create operation.
+* @failcase                            Return error code for notification_delete_all or notification_create reports error
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notification_delete_all_p(void)
+{
+       START_TEST;
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nCreateFailCount=0, nDeleteAllByTypeFailCount=0;
+       
+       notification_type_e noti_type[] = { NOTIFICATION_TYPE_NOTI,
+                                                                               NOTIFICATION_TYPE_ONGOING};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       g_NotificationHandle = notification_create(noti_type[enum_counter]);
+                       if(NULL == g_NotificationHandle)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_create failed at iteration count = %d for notification_type_e enum value = %d, returns null handle vale\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter]);
+                               nCreateFailCount++;     
+                               continue;
+                       }
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr = notification_delete_all(noti_type[enum_counter]);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_delete_all failed at iteration count = %d for notification_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nDeleteAllByTypeFailCount++;
+                       }
+
+                       FreeAndDeleteNotificationResourceHandle();
+               }
+       }
+
+       if( nCreateFailCount > 0 || nDeleteAllByTypeFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_create failed %d times, notification_delete_all failed %d times out of %d times", __LINE__, API_NAMESPACE, nCreateFailCount, nDeleteAllByTypeFailCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_delete_all",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_delete_all",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+
+//& type : auto
+//& purpose: Get the notification image.
+/**
+ * @testcase                                   ITc_notification_get_image_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set image\n
+ *                          Get image\n
+ *                          Validate the get image
+ * @apicovered                         notification_create, notification_get_image, notification_set_image, notification_free, notification_delete
+ * @passcase                           notification_get_image is successful and return correct value.
+ * @failcase                           notification_get_image gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_image_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       notification_image_type_e noti_type[] = { NOTIFICATION_IMAGE_TYPE_ICON,
+                                                                                       NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR,
+                                                                                       NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK,
+                                                                                       NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
+                                                                                       NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK,
+                                                                                       NOTIFICATION_IMAGE_TYPE_ICON_SUB,
+                                                                                       NOTIFICATION_IMAGE_TYPE_BACKGROUND,
+                                                                                       NOTIFICATION_IMAGE_TYPE_LIST_1,
+                                                                                       NOTIFICATION_IMAGE_TYPE_LIST_2,
+                                                                                       NOTIFICATION_IMAGE_TYPE_LIST_3,
+                                                                                       NOTIFICATION_IMAGE_TYPE_LIST_4,
+                                                                                       NOTIFICATION_IMAGE_TYPE_LIST_5};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       eRetNotiErr  = notification_set_image(g_NotificationHandle,noti_type[enum_counter],(char*)APP_IMAGE_FULL_PATH);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_image failed at iteration count = %d for notification_image_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       char *pszGetImage = NULL;
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_get_image(g_NotificationHandle,noti_type[enum_counter], &pszGetImage);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_image failed at iteration count = %d for notification_image_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(0 != strcmp(APP_IMAGE_FULL_PATH, pszGetImage))
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_image_type_e enum value = %d, setvalue = %s, get value = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], APP_IMAGE_FULL_PATH, pszGetImage);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_image failed %d times, notification_get_image failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_image",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_image",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification image.
+/**
+ * @testcase                                   ITc_notification_set_image_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set image\n
+ *                          Get image\n
+ *                          Validate the set image
+ * @apicovered                         notification_create, notification_get_image, notification_set_image, notification_free, notification_delete
+ * @passcase                           notification_set_image is successful and set correct value.
+ * @failcase                           notification_set_image gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_image_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       notification_image_type_e noti_type[] = { NOTIFICATION_IMAGE_TYPE_ICON,
+                                                                                       NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR,
+                                                                                       NOTIFICATION_IMAGE_TYPE_ICON_FOR_LOCK,
+                                                                                       NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
+                                                                                       NOTIFICATION_IMAGE_TYPE_THUMBNAIL_FOR_LOCK,
+                                                                                       NOTIFICATION_IMAGE_TYPE_ICON_SUB,
+                                                                                       NOTIFICATION_IMAGE_TYPE_BACKGROUND,
+                                                                                       NOTIFICATION_IMAGE_TYPE_LIST_1,
+                                                                                       NOTIFICATION_IMAGE_TYPE_LIST_2,
+                                                                                       NOTIFICATION_IMAGE_TYPE_LIST_3,
+                                                                                       NOTIFICATION_IMAGE_TYPE_LIST_4,
+                                                                                       NOTIFICATION_IMAGE_TYPE_LIST_5};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_set_image(g_NotificationHandle,noti_type[enum_counter],(char*)APP_IMAGE_FULL_PATH);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_image failed at iteration count = %d for notification_image_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       char *pszGetImage = NULL;
+                       eRetNotiErr  = notification_get_image(g_NotificationHandle,noti_type[enum_counter],&pszGetImage);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_image failed at iteration count = %d for notification_image_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(0 != strcmp(APP_IMAGE_FULL_PATH, pszGetImage))
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_image_type_e enum value = %d, setvalue = %s, get value = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], APP_IMAGE_FULL_PATH, pszGetImage);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_image failed %d times, notification_get_image failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_image",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_image",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+//& type : auto
+//& purpose: Set/Get the notification layout.
+/**
+* @testcase                            ITc_notification_set_get_layout_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Set/Get the notification layout.
+* @scenario                            Creates notification\n
+*                                              Set layout\n
+*                                              Get layout\n
+*                                              Validate the get layout
+* @apicovered                  notification_get_layout, notification_set_layout
+* @passcase                            notification_set_layout and notification_get_layout are successful and return correct value
+* @failcase                            notification_set_layout or notification_get_layout gets failed or return incorrect value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notification_set_get_layout_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               eRetNotiErr  = notification_set_layout(g_NotificationHandle,NOTIFICATION_LY_NOTI_EVENT_SINGLE);
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_layout failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               notification_ly_type_e eRetLyType = NOTIFICATION_LY_NONE;
+               
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_get_layout(g_NotificationHandle,&eRetLyType);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+               
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_layout failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(NOTIFICATION_LY_NOTI_EVENT_SINGLE != eRetLyType)
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, NOTIFICATION_LY_NOTI_EVENT_SINGLE, eRetLyType);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_layout failed %d times, notification_get_layout failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_layout",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_layout",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification layout.
+/**
+ * @testcase                                   ITc_notification_set_layout_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set layout\n
+ *                          Get layout\n
+ *                          Validate the set layout
+ * @apicovered                         notification_create, notification_get_layout, notification_set_layout, notification_free, notification_delete
+ * @passcase                           notification_set_layout is successful and set correct value.
+ * @failcase                           notification_set_layout gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_layout_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_set_layout(g_NotificationHandle,NOTIFICATION_LY_NOTI_EVENT_SINGLE);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_layout failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               notification_ly_type_e eRetLyType = NOTIFICATION_LY_NONE;
+               eRetNotiErr  = notification_get_layout(g_NotificationHandle,&eRetLyType);
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_layout failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(NOTIFICATION_LY_NOTI_EVENT_SINGLE != eRetLyType)
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, NOTIFICATION_LY_NOTI_EVENT_SINGLE, eRetLyType);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_layout failed %d times, notification_get_layout failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_layout",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_layout",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+
+//& type : auto
+//& purpose: Set/Get the notification led.
+/**
+* @testcase                            ITc_notification_set_get_led_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Set/Get the notification led.
+* @scenario                            Creates notification\n
+*                                              Set led\n
+*                                              Get led\n
+*                                              Validate the get led
+* @apicovered                  notification_get_led, notification_set_led
+* @passcase                            notification_set_led and notification_get_led are successful and return correct value
+* @failcase                            notification_set_led or notification_get_led gets failed or return incorrect value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notification_set_get_led_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       notification_led_op_e noti_type[] = { NOTIFICATION_LED_OP_ON,
+                                                                               NOTIFICATION_LED_OP_ON_CUSTOM_COLOR};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       eRetNotiErr  = notification_set_led(g_NotificationHandle,noti_type[enum_counter], NOTIFICATION_LED_COLOR);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_led failed at iteration count = %d for notification_led_op_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       notification_led_op_e eRetLedOpType = NOTIFICATION_LED_OP_OFF;
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_get_led(g_NotificationHandle,&eRetLedOpType,NULL);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_led failed at iteration count = %d for notification_led_op_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(noti_type[enum_counter] != eRetLedOpType)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_led_op_e enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], noti_type[enum_counter], eRetLedOpType);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_led failed %d times, notification_get_led failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_led",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_led",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification led.
+/**
+ * @testcase                                   ITc_notification_set_led_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set led\n
+ *                          Get led\n
+ *                          Validate the set led
+ * @apicovered                         notification_create, notification_get_led, notification_set_led, notification_free, notification_delete
+ * @passcase                           notification_set_led is successful and set correct value.
+ * @failcase                           notification_set_led gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_led_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       notification_led_op_e noti_type[] = { NOTIFICATION_LED_OP_ON,
+                                                                               NOTIFICATION_LED_OP_ON_CUSTOM_COLOR};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_set_led(g_NotificationHandle,noti_type[enum_counter], NOTIFICATION_LED_COLOR);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_led failed at iteration count = %d for notification_led_op_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       notification_led_op_e eRetLedOpType = NOTIFICATION_LED_OP_OFF;
+                       eRetNotiErr  = notification_get_led(g_NotificationHandle,&eRetLedOpType,NULL);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_led failed at iteration count = %d for notification_led_op_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(noti_type[enum_counter] != eRetLedOpType)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_led_op_e enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], noti_type[enum_counter], eRetLedOpType);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_led failed %d times, notification_get_led failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_led",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_led",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+//& type : auto
+//& purpose: Get the notification led_time_period.
+/**
+ * @testcase                                   ITc_notification_get_led_time_period_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set led_time_period\n
+ *                          Get led_time_period\n
+ *                          Validate the get led_time_period
+ * @apicovered                         notification_create, notification_get_led_time_period, notification_set_led_time_period, notification_free, notification_delete
+ * @passcase                           notification_get_led_time_period is successful and return correct value.
+ * @failcase                           notification_get_led_time_period gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_led_time_period_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               int nSetLedOnMs = 100,nSetLedOffMs = 100,nGetLedOnMs = 0,nGetLedOffMs = 0;
+               eRetNotiErr  = notification_set_led_time_period(g_NotificationHandle,nSetLedOnMs,nSetLedOffMs);
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_led_time_period failed_time_period at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_get_led_time_period(g_NotificationHandle,&nGetLedOnMs, &nGetLedOffMs);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+               
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_led_time_period failed_time_period at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if((nSetLedOnMs != nGetLedOnMs) || (nSetLedOffMs != nGetLedOffMs))
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = (%d,%d), get value = (%d,%d)\n", __LINE__, API_NAMESPACE, nLoopControler, nSetLedOnMs, nSetLedOffMs, nGetLedOnMs, nGetLedOffMs);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_led_time_period failed_time_period %d times, notification_get_led_time_period failed_time_period %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_led_time_period",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_led_time_period",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification led_time_period.
+/**
+ * @testcase                                   ITc_notification_set_led_time_period_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set led_time_period\n
+ *                          Get led_time_period\n
+ *                          Validate the set led_time_period
+ * @apicovered                         notification_create, notification_get_led_time_period, notification_set_led_time_period, notification_free, notification_delete
+ * @passcase                           notification_set_led_time_period is successful and set correct value.
+ * @failcase                           notification_set_led_time_period gets failed or set incorrect value.
+ * @preccondition                      NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_led_time_period_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               int nSetLedOnMs = 100,nSetLedOffMs = 100,nGetLedOnMs = 0,nGetLedOffMs = 0;
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_set_led_time_period(g_NotificationHandle,nSetLedOnMs,nSetLedOffMs);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_led_time_period failed_time_period at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               eRetNotiErr  = notification_get_led_time_period(g_NotificationHandle,&nGetLedOnMs, &nGetLedOffMs);
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_led_time_period failed_time_period at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if((nSetLedOnMs != nGetLedOnMs) || (nSetLedOffMs != nGetLedOffMs))
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = (%d,%d), get value = (%d,%d)\n", __LINE__, API_NAMESPACE, nLoopControler, nSetLedOnMs, nSetLedOffMs, nGetLedOnMs, nGetLedOffMs);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_led_time_period failed_time_period %d times, notification_get_led_time_period failed_time_period %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_led_time_period",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_led_time_period",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Get the notification size.
+/**
+* @testcase                            ITc_notification_get_size_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get the notification size.
+* @scenario                            Creates notification\n
+*                                              Set size\n
+*                                              Get size\n
+*                                              Validate the get size
+* @apicovered                  notification_get_size, notification_set_size
+* @passcase                            notification_set_size and notification_get_size are successful and return correct value
+* @failcase                            notification_set_size or notification_get_size gets failed or return incorrect value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notification_get_size_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               eRetNotiErr  = notification_set_size(g_NotificationHandle,NOTIFICATION_SET_SIZE_VAL);
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_size failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               double dGetSizeVal = 0.0;
+               
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_get_size(g_NotificationHandle,&dGetSizeVal);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+               
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_size failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(NOTIFICATION_SET_SIZE_VAL != dGetSizeVal)
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, (int)NOTIFICATION_SET_SIZE_VAL, (int)dGetSizeVal);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_size failed %d times, notification_get_size failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_size",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_size",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification size.
+/**
+ * @testcase                                   ITc_notification_set_size_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set size\n
+ *                          Get size\n
+ *                          Validate the set size
+ * @apicovered                         notification_create, notification_get_size, notification_set_size, notification_free, notification_delete
+ * @passcase                           notification_set_size is successful and set correct value.
+ * @failcase                           notification_set_size gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_size_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_set_size(g_NotificationHandle,NOTIFICATION_SET_SIZE_VAL);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_size failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               double dGetSizeVal = 0.0;
+               eRetNotiErr  = notification_get_size(g_NotificationHandle,&dGetSizeVal);
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_size failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(NOTIFICATION_SET_SIZE_VAL != dGetSizeVal)
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, (int)NOTIFICATION_SET_SIZE_VAL, (int)dGetSizeVal);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_size failed %d times, notification_get_size failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_size",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_size",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+//& type : auto
+//& purpose: Get the notification text.
+/**
+ * @testcase                                   ITc_notification_get_text_p
+ * @type                                       auto
+  * @scenario                          Creates notification\n
+ *                          Set text\n
+ *                          Get text\n
+ *                          Validate the get text
+ * @apicovered                         notification_create, notification_get_text, notification_set_text, notification_free, notification_delete
+ * @passcase                           notification_get_text is successful and return correct value.
+ * @failcase                           notification_get_text gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_text_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       notification_text_type_e noti_type[] = { NOTIFICATION_TEXT_TYPE_TITLE,
+                                                                                       NOTIFICATION_TEXT_TYPE_CONTENT,
+                                                                                       NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
+                                                                                       NOTIFICATION_TEXT_TYPE_EVENT_COUNT,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_1,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_2,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_3,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_3,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_TITLE,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_CONTENT,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       eRetNotiErr  = notification_set_text(g_NotificationHandle, noti_type[enum_counter],(char*)TEXT_KEY_FOR_LOCALIZATION,(char*)BASIC_TEXT,NOTIFICATION_VARIABLE_TYPE_NONE);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_text failed at iteration count = %d for notification_text_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       char *pszGetText = NULL;
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_get_text(g_NotificationHandle, NOTIFICATION_TEXT_TYPE_TITLE, &pszGetText); 
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_text failed at iteration count = %d for notification_text_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(0 != strcmp(BASIC_TEXT, pszGetText))
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_text_type_e enum value = %d, setvalue = %s, get value = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], BASIC_TEXT, pszGetText);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_text failed %d times, notification_get_text failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_text",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_text",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification text.
+/**
+ * @testcase                                   ITc_notification_set_text_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set text\n
+ *                          Get text\n
+ *                          Validate the set text
+ * @apicovered                         notification_create, notification_get_text, notification_set_text, notification_free, notification_delete
+ * @passcase                           notification_set_text is successful and set correct value.
+ * @failcase                           notification_set_text gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_text_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       notification_text_type_e noti_type[] = { NOTIFICATION_TEXT_TYPE_TITLE,
+                                                                                       NOTIFICATION_TEXT_TYPE_CONTENT,
+                                                                                       NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
+                                                                                       NOTIFICATION_TEXT_TYPE_EVENT_COUNT,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_1,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_2,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_3,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_3,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_TITLE,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_CONTENT,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_set_text(g_NotificationHandle, noti_type[enum_counter],(char*)TEXT_KEY_FOR_LOCALIZATION,(char*)BASIC_TEXT,NOTIFICATION_VARIABLE_TYPE_NONE);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_text failed at iteration count = %d for notification_text_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       char *pszGetText = NULL;
+                       eRetNotiErr  = notification_get_text(g_NotificationHandle, noti_type[enum_counter], &pszGetText); 
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_text failed at iteration count = %d for notification_text_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(0 != strcmp(pszGetText, BASIC_TEXT))
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_text_type_e enum value = %d, setvalue = %s, get value = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], BASIC_TEXT, pszGetText);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_text failed %d times, notification_get_text failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_text",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_text",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+//& type : auto
+//& purpose: Get the notification sound.
+/**
+ * @testcase                                   ITc_notification_get_sound_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set sound\n
+ *                          Get sound\n
+ *                          Validate the get sound
+ * @apicovered                         notification_create, notification_get_sound, notification_set_sound, notification_free, notification_delete
+ * @passcase                           notification_get_sound is successful and return correct value.
+ * @failcase                           notification_get_sound gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_sound_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       notification_sound_type_e noti_type[] = { NOTIFICATION_SOUND_TYPE_DEFAULT,
+                                                                                       NOTIFICATION_SOUND_TYPE_USER_DATA};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       eRetNotiErr  = notification_set_sound(g_NotificationHandle, noti_type[enum_counter], (char*)DEFAULT_FILE_PATH);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_sound failed at iteration count = %d for notification_sound_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       notification_sound_type_e eSoundType = NOTIFICATION_SOUND_TYPE_DEFAULT;
+                       const char *pszGetSoundPath = NULL;
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_get_sound(g_NotificationHandle, &eSoundType, &pszGetSoundPath);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_sound failed at iteration count = %d for notification_sound_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(noti_type[enum_counter] != eSoundType)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_sound_type_e enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], noti_type[enum_counter], eSoundType);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_sound failed %d times, notification_get_sound failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_sound",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_sound",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification sound.
+/**
+ * @testcase                                   ITc_notification_set_sound_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set sound\n
+ *                          Get sound\n
+ *                          Validate the set sound
+ * @apicovered                         notification_create, notification_get_sound, notification_set_sound, notification_free, notification_delete
+ * @passcase                           notification_set_sound is successful and set correct value.
+ * @failcase                           notification_set_sound gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_sound_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       notification_sound_type_e noti_type[] = { NOTIFICATION_SOUND_TYPE_DEFAULT,
+                                                                                       NOTIFICATION_SOUND_TYPE_USER_DATA};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_set_sound(g_NotificationHandle, noti_type[enum_counter], (char*)DEFAULT_FILE_PATH);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_sound failed at iteration count = %d for notification_sound_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       const char *pszGetSoundPath = NULL;
+                       notification_sound_type_e eSoundType = NOTIFICATION_SOUND_TYPE_DEFAULT;
+                       eRetNotiErr  = notification_get_sound(g_NotificationHandle, &eSoundType, &pszGetSoundPath);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_sound failed at iteration count = %d for notification_sound_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(noti_type[enum_counter] != eSoundType)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_sound_type_e enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], noti_type[enum_counter], eSoundType);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_sound failed %d times, notification_get_sound failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_sound",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_sound",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+
+//& type : auto
+//& purpose: Get the notification vibration.
+/**
+ * @testcase                                   ITc_notification_get_vibration_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set vibration\n
+ *                          Get vibration\n
+ *                          Validate the get vibration
+  * @apicovered                                notification_create, notification_get_vibration, notification_set_vibration, notification_free, notification_delete
+ * @passcase                           notification_get_vibration is successful and return correct value.
+ * @failcase                           notification_get_vibration gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_vibration_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       notification_vibration_type_e noti_type[] = { NOTIFICATION_VIBRATION_TYPE_DEFAULT,
+                                                                                               NOTIFICATION_VIBRATION_TYPE_USER_DATA};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+       
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       eRetNotiErr  = notification_set_vibration(g_NotificationHandle,noti_type[enum_counter],(char*)DEFAULT_FILE_PATH);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_vibration failed at iteration count = %d for notification_vibration_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       const char *pszGetVibrationPath = NULL;
+                       notification_vibration_type_e eVibrationType = NOTIFICATION_VIBRATION_TYPE_DEFAULT;
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_get_vibration(g_NotificationHandle,&eVibrationType,&pszGetVibrationPath);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_vibration failed at iteration count = %d for notification_vibration_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(noti_type[enum_counter] != eVibrationType)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_vibration_type_e enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], noti_type[enum_counter], eVibrationType);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_vibration failed %d times, notification_get_vibration failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_vibration",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_vibration",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification vibration.
+/**
+ * @testcase                                   ITc_notification_set_vibration_p
+ * @type                                       auto
+ * @scenario                           Creates notification
+ *                          Set vibration\n
+ *                          Get vibration\n
+ *                          Validate the set vibration
+ * @apicovered                         notification_create, notification_get_vibration, notification_set_vibration, notification_free, notification_delete
+ * @passcase                           notification_set_vibration is successful and set correct value.
+ * @failcase                           notification_set_vibration gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_vibration_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       notification_vibration_type_e noti_type[] = { NOTIFICATION_VIBRATION_TYPE_DEFAULT,
+                                                                                               NOTIFICATION_VIBRATION_TYPE_USER_DATA};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_set_vibration(g_NotificationHandle,noti_type[enum_counter],(char*)DEFAULT_FILE_PATH);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_vibration failed at iteration count = %d for notification_vibration_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       const char *pszGetVibrationPath = NULL;
+                       notification_vibration_type_e eVibrationType = NOTIFICATION_VIBRATION_TYPE_DEFAULT;
+                       eRetNotiErr  = notification_get_vibration(g_NotificationHandle,&eVibrationType,&pszGetVibrationPath);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_vibration failed at iteration count = %d for notification_vibration_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(noti_type[enum_counter] != eVibrationType)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_vibration_type_e enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], noti_type[enum_counter], eVibrationType);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_vibration failed %d times, notification_get_vibration failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_vibration",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_vibration",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+//& type : auto
+//& purpose: Get the notification time.
+/**
+ * @testcase                                   ITc_notification_get_time_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set time\n
+ *                          Get time\n
+ *                          Validate the get time
+ * @apicovered                         notification_create, notification_get_time, notification_set_time, notification_free, notification_delete
+ * @passcase                           notification_get_time is successful and return correct value.
+ * @failcase                           notification_get_time gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_time_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+       time_t setTime = time(NULL);
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               eRetNotiErr  = notification_set_time(g_NotificationHandle,setTime);
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_time failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               time_t getTime = 0;
+               
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_get_time(g_NotificationHandle,&getTime);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+               
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_time failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(getTime != setTime)
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, (int)setTime, (int)getTime);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_time failed %d times, notification_get_time failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_time",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_time",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification time.
+/**
+ * @testcase                                   ITc_notification_set_time_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set time\n
+ *                          Get time\n
+ *                          Validate the set time
+ * @apicovered                         notification_create, notification_get_time, notification_set_time, notification_free, notification_delete
+ * @passcase                           notification_set_time is successful and set correct value.
+ * @failcase                           notification_set_time gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_time_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+       time_t setTime = time(NULL);
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_set_time(g_NotificationHandle,setTime);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_time failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               time_t getTime = 0;
+               eRetNotiErr  = notification_get_time(g_NotificationHandle,&getTime);
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_time failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(getTime != setTime)
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, (int)setTime, (int)getTime);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_time failed %d times, notification_get_time failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_time",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_time",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Get the notification time_from_text.
+/**
+ * @testcase                                   ITc_notification_get_time_from_text_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set time_to_text\n
+ *                          Get time_from_text\n
+ *                          Validate the get time_from_text
+ * @apicovered                         notification_create, notification_get_time_from_text, notification_set_time_to_text, notification_free, notification_delete
+ * @passcase                           notification_get_time_from_text is successful and return correct value.
+ * @failcase                           notification_get_time_from_text gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_time_from_text_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       time_t setTime = time(NULL);
+
+       notification_text_type_e noti_type[] = { NOTIFICATION_TEXT_TYPE_TITLE,
+                                                                                       NOTIFICATION_TEXT_TYPE_CONTENT,
+                                                                                       NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
+                                                                                       NOTIFICATION_TEXT_TYPE_EVENT_COUNT,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_1,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_2,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_3,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_3,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_TITLE,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_CONTENT,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       eRetNotiErr  = notification_set_time_to_text(g_NotificationHandle,noti_type[enum_counter], setTime);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_time_to_text failed at iteration count = %d for notification_text_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       time_t getTime = 0;
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_get_time_from_text(g_NotificationHandle,noti_type[enum_counter], &getTime);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_time_from_text failed at iteration count = %d for notification_text_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(getTime != setTime)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_text_type_e enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], (int)setTime, (int)getTime);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_time_to_text failed %d times, notification_get_time_from_text failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_time_from_text",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_time_from_text",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification time_from_text.
+/**
+ * @testcase                                   ITc_notification_set_time_to_text_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set time_to_text\n
+ *                          Get time_from_text\n
+ *                          Validate the set time_to_text
+ * @apicovered                         notification_create, notification_get_time_from_text, notification_set_time_to_text, notification_free, notification_delete
+ * @passcase                           notification_set_time_to_text is successful and set correct value.
+ * @failcase                           notification_set_time_to_text gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_time_to_text_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       time_t setTime = time(NULL);
+
+       notification_text_type_e noti_type[] = { NOTIFICATION_TEXT_TYPE_TITLE,
+                                                                                       NOTIFICATION_TEXT_TYPE_CONTENT,
+                                                                                       NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF,
+                                                                                       NOTIFICATION_TEXT_TYPE_EVENT_COUNT,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_1,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_2,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_3,
+                                                                                       NOTIFICATION_TEXT_TYPE_INFO_SUB_3,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_TITLE,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_CONTENT,
+                                                                                       NOTIFICATION_TEXT_TYPE_GROUP_CONTENT_FOR_DISPLAY_OPTION_IS_OFF};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_set_time_to_text(g_NotificationHandle,noti_type[enum_counter], setTime);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_time_to_text failed at iteration count = %d for notification_text_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       time_t getTime = 0;
+                       eRetNotiErr  = notification_get_time_from_text(g_NotificationHandle,noti_type[enum_counter], &getTime);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_time_from_text failed at iteration count = %d for notification_text_type_e enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(getTime != setTime)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for notification_text_type_e enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], (int)setTime, (int)getTime);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_time_to_text failed %d times, notification_get_time_from_text failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_time_to_text",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_time_to_text",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Get the notification progress.
+/**
+ * @testcase                                   ITc_notification_get_progress_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set progress\n
+ *                          Get progress\n
+ *                          Validate the get progress
+ * @apicovered                         notification_create, notification_get_progress, notification_set_progress, notification_free, notification_delete
+ * @passcase                           notification_get_progress is successful and return correct value.
+ * @failcase                           notification_get_progress gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_progress_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               eRetNotiErr  = notification_set_progress(g_NotificationHandle,NOTIFICATION_SET_PROGRESS_VAL);
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_progress failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               double dGetProgressVal = 0.0;
+               
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_get_progress(g_NotificationHandle,&dGetProgressVal);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+               
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_progress failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(NOTIFICATION_SET_PROGRESS_VAL != dGetProgressVal)
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, (int)NOTIFICATION_SET_PROGRESS_VAL, (int)dGetProgressVal);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_progress failed %d times, notification_get_progress failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_progress",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_progress",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification progress.
+/**
+ * @testcase                                   ITc_notification_set_progress_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set progress\n
+ *                          Get progress\n
+ *                          Validate the set progress
+ * @apicovered                         notification_create, notification_get_progress, notification_set_progress, notification_free, notification_delete
+ * @passcase                           notification_set_progress is successful and set correct value.
+ * @failcase                           notification_set_progress gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_progress_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_set_progress(g_NotificationHandle,NOTIFICATION_SET_PROGRESS_VAL);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_progress failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               double dGetProgressVal = 0.0;
+               eRetNotiErr  = notification_get_progress(g_NotificationHandle,&dGetProgressVal);
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_progress failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(NOTIFICATION_SET_PROGRESS_VAL != dGetProgressVal)
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, (int)NOTIFICATION_SET_PROGRESS_VAL, (int)dGetProgressVal);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_progress failed %d times, notification_get_progress failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_progress",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_progress",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Get the notification property.
+/**
+ * @testcase                                   ITc_notification_get_property_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set property\n
+ *                          Get property\n
+ *                          Validate the get property
+ * @apicovered                         notification_create, notification_get_property, notification_set_property, notification_free, notification_delete
+ * @passcase                           notification_get_property is successful and return correct value.
+ * @failcase                           notification_get_property gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_property_p(void)
+{
+       START_TEST;
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nCreateFailCount=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       enum _notification_property noti_type[] = { NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE,
+                                                                               NOTIFICATION_PROP_DISABLE_APP_LAUNCH,
+                                                                               NOTIFICATION_PROP_DISABLE_AUTO_DELETE,
+                                                                               NOTIFICATION_PROP_LAUNCH_UG,
+                                                                               NOTIFICATION_PROP_DISABLE_TICKERNOTI,
+                                                                               NOTIFICATION_PROP_PERMANENT_DISPLAY,
+                                                                               NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT,
+                                                                               NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE,
+                                                                               NOTIFICATION_PROP_VOLATILE_DISPLAY};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       g_NotificationHandle = notification_create(NOTIFICATION_TYPE_NOTI);
+                       if(NULL == g_NotificationHandle) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_create returned NULL handle at iteration count = %d\n", __LINE__, API_NAMESPACE, nLoopControler);
+                               nCreateFailCount++;
+                               continue;
+                       }
+
+                       eRetNotiErr  = notification_set_property(g_NotificationHandle,noti_type[enum_counter]);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_property failed at iteration count = %d for _notification_property enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+
+                               FreeAndDeleteNotificationResourceHandle();
+                               continue;
+                       }
+
+                       int nGetNotiProperty = 0;
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_get_property(g_NotificationHandle,&nGetNotiProperty); 
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_property failed at iteration count = %d for _notification_property enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+
+                               FreeAndDeleteNotificationResourceHandle();
+                               continue;
+                       }
+
+                       if(nGetNotiProperty != noti_type[enum_counter])
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for _notification_property enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], noti_type[enum_counter], nGetNotiProperty);
+                               nMismatchCount++;
+                       }
+
+                       FreeAndDeleteNotificationResourceHandle();
+               }
+       }
+
+       if( nCreateFailCount > 0 || nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_create failed %d times, notification_set_property failed %d times, notification_get_property failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nCreateFailCount, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_property",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_property",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification property.
+/**
+ * @testcase                                   ITc_notification_set_property_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set property\n
+ *                          Get property\n
+ *                          Validate the set property
+ * @apicovered                         notification_create, notification_get_property, notification_set_property, notification_free, notification_delete
+ * @passcase                           notification_set_property is successful and set correct value.
+ * @failcase                           notification_set_property gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_property_p(void)
+{
+       START_TEST;
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nCreateFailCount=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       enum _notification_property noti_type[] = { NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE,
+                                                                               NOTIFICATION_PROP_DISABLE_APP_LAUNCH,
+                                                                               NOTIFICATION_PROP_DISABLE_AUTO_DELETE,
+                                                                               NOTIFICATION_PROP_LAUNCH_UG,
+                                                                               NOTIFICATION_PROP_DISABLE_TICKERNOTI,
+                                                                               NOTIFICATION_PROP_PERMANENT_DISPLAY,
+                                                                               NOTIFICATION_PROP_DISABLE_UPDATE_ON_INSERT,
+                                                                               NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE,
+                                                                               NOTIFICATION_PROP_VOLATILE_DISPLAY};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       g_NotificationHandle  = notification_create(NOTIFICATION_TYPE_NOTI);
+                       if(NULL == g_NotificationHandle) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_create returned NULL handle at iteration count = %d\n", __LINE__, API_NAMESPACE, nLoopControler);
+                               nCreateFailCount++;
+                               continue;
+                       }
+
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_set_property(g_NotificationHandle,noti_type[enum_counter]);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_property failed at iteration count = %d for _notification_property enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+
+                               FreeAndDeleteNotificationResourceHandle();
+                               continue;
+                       }
+
+                       int nGetNotiProperty = 0;
+                       eRetNotiErr  = notification_get_property(g_NotificationHandle,&nGetNotiProperty); 
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_property failed at iteration count = %d for _notification_property enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+
+                               FreeAndDeleteNotificationResourceHandle();
+                               continue;
+                       }
+
+                       if(nGetNotiProperty != noti_type[enum_counter])
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for _notification_property enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], noti_type[enum_counter], nGetNotiProperty);
+                               nMismatchCount++;
+                       }
+
+                       FreeAndDeleteNotificationResourceHandle();
+               }
+       }
+
+       if( nCreateFailCount > 0 || nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_create failed %d times, notification_set_property failed %d times, notification_get_property failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nCreateFailCount, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_property",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_property",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Get the notification display_applist.
+/**
+ * @testcase                                   ITc_notification_get_display_applist_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set display_applist\n
+ *                          Get display_applist\n
+ *                          Validate the get display_applist
+ * @apicovered                         notification_create, notification_get_display_applist, notification_set_display_applist, notification_free, notification_delete
+ * @passcase                           notification_get_display_applist is successful and return correct value.
+ * @failcase                           notification_get_display_applist gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_display_applist_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       enum _notificaton_display_applist noti_type[] = { NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY,
+                                                                                                       NOTIFICATION_DISPLAY_APP_TICKER,
+                                                                                                       NOTIFICATION_DISPLAY_APP_LOCK,
+                                                                                                       NOTIFICATION_DISPLAY_APP_INDICATOR,
+                                                                                                       NOTIFICATION_DISPLAY_APP_ALL};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_set_display_applist(g_NotificationHandle,noti_type[enum_counter]);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_display_applist failed at iteration count = %d for _notificaton_display_applist enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       int nGetDisplayApplistVal = 0;
+                       eRetNotiErr  = notification_get_display_applist(g_NotificationHandle,&nGetDisplayApplistVal);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_display_applist failed at iteration count = %d for _notificaton_display_applist enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(noti_type[enum_counter] != nGetDisplayApplistVal)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for _notificaton_display_applist enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], noti_type[enum_counter], nGetDisplayApplistVal);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_get_display_applist failed %d times, notification_get_display_applist failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_display_applist",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_display_applist",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+//& type : auto
+//& purpose: Set the notification display_applist.
+/**
+ * @testcase                                   ITc_notification_set_display_applist_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set display_applist\n
+ *                          Get display_applist\n
+ *                          Validate the set display_applist
+ * @apicovered                         notification_create, notification_get_display_applist, notification_set_display_applist, notification_free, notification_delete
+ * @passcase                           notification_set_display_applist is successful and set correct value.
+ * @failcase                           notification_set_display_applist gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_display_applist_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       
+       enum _notificaton_display_applist noti_type[] = { NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY,
+                                                                                                       NOTIFICATION_DISPLAY_APP_TICKER,
+                                                                                                       NOTIFICATION_DISPLAY_APP_LOCK,
+                                                                                                       NOTIFICATION_DISPLAY_APP_INDICATOR,
+                                                                                                       NOTIFICATION_DISPLAY_APP_ALL};
+
+       int enum_size = sizeof(noti_type) / sizeof(noti_type[0]);
+       int enum_counter = 0;
+
+       g_pszNotificationMemLog   = calloc(MEMLOG_SIZE * MAX_COUNT * enum_size, sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+               {
+                       NotificationGetTimeOfDay();
+                       NotificationGetMemAllocation();
+                       eRetNotiErr  = notification_set_display_applist(g_NotificationHandle,noti_type[enum_counter]);
+                       NotificationGetMemStatus(g_pszNotificationMemLog);
+                       NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_set_display_applist failed at iteration count = %d for _notificaton_display_applist enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       int nGetDisplayApplistVal = 0;
+                       eRetNotiErr  = notification_get_display_applist(g_NotificationHandle,&nGetDisplayApplistVal);
+                       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+                       {
+                               FPRINTF("\\n[Line : %d][%s]notification_get_display_applist failed at iteration count = %d for _notificaton_display_applist enum value = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], Notification_GetError(eRetNotiErr));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(noti_type[enum_counter] != nGetDisplayApplistVal)
+                       {
+                               FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d for _notificaton_display_applist enum value = %d, setvalue = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, noti_type[enum_counter], noti_type[enum_counter], nGetDisplayApplistVal);
+                               nMismatchCount++;
+                       }
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_display_applist failed %d times, notification_get_display_applist failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*enum_size);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_display_applist",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_display_applist",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Get the notification type.
+/**
+ * @testcase                                   ITc_notification_get_type_p
+ * @type                                       auto
+ * @scenario                           Creates notification of NOTIFICATION_TYPE_NOTI type\n
+ *                          Get type\n
+ *                          Validate the get type
+ * @apicovered                         notification_create, notification_get_type, notification_free, notification_delete
+ * @passcase                           notification_get_type is successful and return correct value.
+ * @failcase                           notification_get_type gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_type_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               notification_type_e eGetNotificationType = NOTIFICATION_TYPE_NONE; 
+               
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_get_type(g_NotificationHandle,&eGetNotificationType);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+               
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_type failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if( NOTIFICATION_TYPE_NOTI != eGetNotificationType)
+               {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, expected value = %d, get value = %d\n", __LINE__, API_NAMESPACE, nLoopControler, NOTIFICATION_TYPE_NOTI, eGetNotificationType);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_get_type failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_type",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_type",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+//& type : auto
+//& purpose: Get Insertion time of the inserted notification.
+/**
+* @testcase                            ITc_notification_get_insert_time_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Get Insertion time of the inserted notification.
+* @scenario                            Create notification\n
+*                                              Set package name to the notification\n
+*                                              Insert notification and fetch private id\n
+*                                              Get Insertion Time
+* @apicovered                  notification_get_insert_time
+* @passcase                            notification_get_insert_time is successful and returns valid value
+* @failcase                            notification_get_insert_time returns error or invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notification_get_insert_time_p(void)
+{
+       START_TEST;
+       
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetInsertTimeFailCount=0;
+       
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               time_t ret_time = 0;
+
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr = notification_get_insert_time(g_NotificationHandle, &ret_time);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][%s]notification_get_insert_time failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetInsertTimeFailCount++;
+               }
+               else if(ret_time <= 0)
+               {
+                       FPRINTF("\\n[Line : %d][%s]notification_get_insert_time returns invalid value = %d at iteration count = %d\n", __LINE__, API_NAMESPACE, (int)ret_time, nLoopControler);
+                       nGetInsertTimeFailCount++;
+               }
+       }
+       
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetInsertTimeFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_get_insert_time failed %d times out of %d times", __LINE__, API_NAMESPACE, nGetInsertTimeFailCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_insert_time",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_insert_time",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Post notification status message.
+/**
+* @testcase                            ITc_notification_status_message_post_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Post notification status message.
+* @scenario                            Set notification status monitor message callback\n
+*                                              Post status Message\n
+*                                              Check monitor message callback\n
+*                                              Unset the callback
+* @apicovered                  notification_status_message_post
+* @passcase                            notification_status_message_post should be successful and behave properly
+* @failcase                            notification_status_message_post gets failed or didn't behaved properly
+* @precondition                        none
+* @postcondition               none
+*/
+int ITc_notification_status_message_post_p(void)
+{
+       START_TEST;
+
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nPostFailCount=0;
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               g_bNotificationStatusMsgCallback = false;
+
+               //Target API
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr = notification_status_message_post(BASIC_TEXT);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+               
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][%s]notification_status_message_post failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nPostFailCount++;
+                       continue;
+               }
+
+               usleep(WAIT_CALLBACK*MICROSECONDS_PER_SECOND);
+       }
+
+       if ( nPostFailCount > 0 )
+       {
+               FPRINTF("\n[Line : %d][%s]notification_status_message_post failed %d times out of %d times", __LINE__, API_NAMESPACE, nPostFailCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_status_message_post",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_status_message_post",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+//& type : auto
+//& purpose: Updates notification data.
+/**
+* @testcase                            ITc_notification_update_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Updates notification data.
+* @scenario                            Create notification\n
+*                                              Set package name to the notification\n
+*                                              Insert notification and fetch private id\n
+*                                              Call notification_update to update notification data
+* @apicovered                  notification_update
+* @passcase                            notification_update is successful.
+* @failcase                            notification_update returns error
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notification_update_p(void)
+{
+       START_TEST;
+
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nCreateFailCount=0, nUpdateFailCount=0;
+       
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+               {
+                       nCreateFailCount++;
+                       continue;
+               }
+
+               notification_set_text(g_NotificationHandle, NOTIFICATION_TEXT_TYPE_TITLE, "updated", NULL, NOTIFICATION_VARIABLE_TYPE_NONE);    //sample text : "updated"
+
+           NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr = notification_update(g_NotificationHandle);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][%s]notification_update failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nUpdateFailCount++;
+               }       
+               
+               FreeAndDeleteNotificationResourceHandle();
+       }
+
+       if( nCreateFailCount > 0 || nUpdateFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]handle creation failed %d times, notification_update failed %d times out of %d times", __LINE__, API_NAMESPACE, nCreateFailCount, nUpdateFailCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_update",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_update",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+//& type : auto
+//& purpose: Get the notification tag.
+/**
+ * @testcase                                   ITc_notification_get_tag_p
+ * @type                                       auto
+  * @scenario                          Creates notification\n
+ *                          Set tag\n
+ *                          Get tag\n
+ *                          Validate the get tag
+ * @apicovered                         notification_create, notification_get_tag, notification_set_tag, notification_free, notification_delete
+ * @passcase                           notification_get_tag is successful and return correct value.
+ * @failcase                           notification_get_tag gets failed or return incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_tag_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       char* pSetTag = NOTIFICATION_TAG;
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               const char* pGetTag = NULL;
+               eRetNotiErr  = notification_set_tag(g_NotificationHandle,NOTIFICATION_TAG);
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_tag failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_get_tag(g_NotificationHandle,&pGetTag);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+               
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_tag failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(NULL == pGetTag) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_tag output NULL tag value at iteration count = %d\n", __LINE__, API_NAMESPACE, nLoopControler);
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(strcmp(pGetTag, pSetTag))
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = (%s), get value = (%s)\n", __LINE__, API_NAMESPACE, nLoopControler, pSetTag, pGetTag);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_tag failed %d times, notification_get_tag failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_tag",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_tag",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Set the notification tag.
+/**
+ * @testcase                                   ITc_notification_set_tag_p
+ * @type                                       auto
+ * @scenario                           Creates notification\n
+ *                          Set tag\n
+ *                          Get tag\n
+ *                          Validate the set tag
+ * @apicovered                         notification_create, notification_get_tag, notification_set_tag, notification_free, notification_delete
+ * @passcase                           notification_set_tag is successful and set correct value.
+ * @failcase                           notification_set_tag gets failed or set incorrect value.
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_tag_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nGetFailCount=0, nSetFailCount=0, nMismatchCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       char* pSetTag = NOTIFICATION_TAG;
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               const char* pGetTag = NULL;
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr  = notification_set_tag(g_NotificationHandle,pSetTag);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+        if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_set_tag failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+        }
+
+               eRetNotiErr  = notification_get_tag(g_NotificationHandle,&pGetTag);
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_tag failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(NULL == pGetTag) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_get_tag output NULL tag value at iteration count = %d\n", __LINE__, API_NAMESPACE, nLoopControler);
+                       nGetFailCount++;
+                       continue;
+        }
+
+               if(strcmp(pGetTag, pSetTag))
+        {
+                       FPRINTF("\\n[Line : %d][%s]Mismatch happened at iteration count = %d, setvalue = (%s), get value = (%s)\n", __LINE__, API_NAMESPACE, nLoopControler, pSetTag, pGetTag);
+                       nMismatchCount++;
+               }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nGetFailCount > 0 || nSetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_tag failed %d times, notification_get_tag failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_tag",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_tag",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+//& type : auto
+//& purpose: Loads the notification tag.
+/**
+* @testcase                            ITc_notification_load_by_tag_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Loads the notification tag.
+* @scenario                            Creates notification\n
+*                                              Set tag\n
+*                                              Load tag
+* @apicovered                  notification_set_tag, notification_load_by_tag
+* @passcase                            notification_load_by_tag is successful and behave properly
+* @failcase                            notification_load_by_tag gets failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notification_load_by_tag_p(void)
+{
+       START_TEST;
+
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               return 1;
+       }
+
+       notification_error_e eRetNotiErr;
+       int nLoopControler=0, nFailCount=0;
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       char* pSetTag = NOTIFICATION_TAG;
+       eRetNotiErr  = notification_set_tag(g_NotificationHandle,pSetTag);
+       if(eRetNotiErr != NOTIFICATION_ERROR_NONE) 
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_tag failed with error returned = %s\n", __LINE__, API_NAMESPACE, Notification_GetError(eRetNotiErr));
+               FreeAndDeleteNotificationResourceHandle();
+               return 1;
+       }
+
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               notification_h hNotificationHandle = NULL;
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               hNotificationHandle = notification_load_by_tag(pSetTag);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+        if(NULL == hNotificationHandle) 
+        {
+            FPRINTF("\\n[Line : %d][%s]notification_load_by_tag returned NULL handle at iteration count = %d\n", __LINE__, API_NAMESPACE, nLoopControler);
+                       nFailCount++;
+                       continue;
+        }
+       }
+
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_load_by_tag failed %d times out of %d times", __LINE__, API_NAMESPACE, nFailCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_load_by_tag",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_load_by_tag",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+//& type: auto
+//& purpose: Post notification
+/**
+* @testcase                            ITc_notification_post_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 Post notification
+* @scenario                            Create notification handle\n
+*                                              Set Pkg name\n
+*                                              Insert notification handle\n
+*                                              call notification_post.
+* @apicovered                  notification_create, notification_post
+* @passcase                            notification_post is successful and behave properly
+* @failcase                            notification_post gets failed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_notification_post_p(void)
+{
+       START_TEST;
+       
+       FreeAndDeleteNotificationResourceHandle();
+       g_NotificationHandle = notification_create(NOTIFICATION_TYPE_NOTI);
+       if(g_NotificationHandle == NULL) 
+       {
+               NotificationPrintErrorMessage("notification_create");
+               return 1;
+       }
+       
+       notification_error_e eRetNotiErr = NOTIFICATION_ERROR_NONE;
+        
+    g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       int nLoopControler=0, nFailCount=0;
+       
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr = notification_post(g_NotificationHandle);  
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][%s]notification_post failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nFailCount++;
+                       continue;
+               }
+       }
+    
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_post failed %d times out of %d times", __LINE__, API_NAMESPACE, nFailCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_post",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_post",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+
+
+
+//& type: auto
+//& purpose: Set launch option for a notification
+/**
+ * @testcase                                   ITc_notification_set_launch_option_p
+ * @type                                       auto
+ * @scenario                           Create notification handle\n
+ *                          Set Pkg name.\n
+ *                          Insert notification handle\n
+ *                          call notification_set_launch_option.
+ *                                                     call notification_get_launch_option and validate result.
+ * @apicovered                         notification_create, notification_set_launch_option, notification_get_launch_option, notification_free, notification_delete
+ * @passcase                           notification_set_launch_option is successful and behave properly
+ * @failcase                           notification_set_launch_option gets failed
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_set_launch_option_p(void)
+{
+       START_TEST;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("\\n[Application_ITc]app_control_create API call gets failed, error returned = %s ", Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+
+       char* pSetAppID = "org.tizen.app";      //dummy app id
+       nRetVal = app_control_set_app_id(hAppControl, pSetAppID);       
+       if(nRetVal != 0)
+       {
+               FPRINTF("\\n[Application_ITc]app_control_set_app_id API call gets failed, error returned = %s ", Application_AppControlGetError(nRetVal));
+               app_control_destroy(hAppControl);
+               return 1;
+       }
+       
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               app_control_destroy(hAppControl);
+               return 1;
+       }
+       
+       notification_error_e eRetNotiErr = NOTIFICATION_ERROR_NONE;
+        
+    g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       int nLoopControler=0, nSetFailCount=0, nGetFailCount=0, nMismatchFailCount=0;
+       
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr = notification_set_launch_option(g_NotificationHandle, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void*)hAppControl); 
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][%s]notification_set_launch_option failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               app_control_h hGetAppControl;
+               app_control_create(&hGetAppControl);
+
+               eRetNotiErr = notification_get_launch_option(g_NotificationHandle, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void*)&hGetAppControl);
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][%s]notification_get_launch_option failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       app_control_destroy(hGetAppControl);
+                       continue;
+               }
+
+               char* pszGetVal = NULL;
+               app_control_get_app_id(hGetAppControl, &pszGetVal);
+
+               if(NULL == pszGetVal)
+               {
+                       FPRINTF("\\n[Application_ITc]set and get operation mis-match occurs on iteration %d, set app id = %s, get app id = NULL", nLoopControler, pSetAppID);
+                       nMismatchFailCount++;
+                       continue;
+               }
+
+               //check for value mis-match
+               if(pszGetVal != NULL)
+               {
+                       if(0 != strcmp(pSetAppID, pszGetVal))
+                       {
+                               FPRINTF("\\n[Application_ITc]set and get operation mis-match occurs on iteration %d, set app id = %s, get app id = %s ", nLoopControler, pSetAppID, pszGetVal);
+                               nMismatchFailCount++;
+                       }
+               }
+               free(pszGetVal);
+
+               app_control_destroy(hGetAppControl);
+       }
+    
+       app_control_destroy(hAppControl);
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_launch_option failed %d times, notification_get_launch_option failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchFailCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_set_launch_option",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_set_launch_option",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+
+//& type: auto
+//& purpose: Get launch option for a notification
+/**
+ * @testcase                                   ITc_notification_get_launch_option_p
+ * @type                                       auto
+  * @scenario                          Create notification handle
+ *                          Set Pkg name.
+ *                          Insert notification handle
+ *                          call notification_set_launch_option.
+ *                                                     call notification_get_launch_option and validate result.
+ * @apicovered                         notification_create, notification_set_launch_option, notification_get_launch_option, notification_free, notification_delete
+ * @passcase                           notification_get_launch_option is successful and behave properly
+ * @failcase                           notification_get_launch_option gets failed
+ * @precondition                       NA
+ * @postcondition                      NA
+ */
+int ITc_notification_get_launch_option_p(void)
+{
+       START_TEST;
+
+       app_control_h hAppControl;
+       int nRetVal = app_control_create(&hAppControl);
+       if(nRetVal != 0)
+       {
+               FPRINTF("\\n[Application_ITc]app_control_create API call gets failed, error returned = %s ", Application_AppControlGetError(nRetVal));
+               return 1;
+       }
+
+       char* pSetAppID = "org.tizen.app";      //dummy app id
+       nRetVal = app_control_set_app_id(hAppControl, pSetAppID);       
+       if(nRetVal != 0)
+       {
+               FPRINTF("\\n[Application_ITc]app_control_set_app_id API call gets failed, error returned = %s ", Application_AppControlGetError(nRetVal));
+               app_control_destroy(hAppControl);
+               return 1;
+       }
+       
+       if(false == CreateNotification(NOTIFICATION_TYPE_NOTI))
+       {
+               app_control_destroy(hAppControl);
+               return 1;
+       }
+       
+       notification_error_e eRetNotiErr = NOTIFICATION_ERROR_NONE;
+        
+       g_pszNotificationMemLog = calloc(MEMLOG_SIZE * MAX_COUNT , sizeof(char));
+       g_pszNotificationSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       int nLoopControler=0, nSetFailCount=0, nGetFailCount=0, nMismatchFailCount=0;
+       
+       for(nLoopControler = 0; nLoopControler < MAX_COUNT; nLoopControler++)
+       {
+               eRetNotiErr = notification_set_launch_option(g_NotificationHandle, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void*)hAppControl); 
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][%s]notification_set_launch_option failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               app_control_h hGetAppControl;
+               app_control_create(&hGetAppControl);
+
+               NotificationGetTimeOfDay();
+               NotificationGetMemAllocation();
+               eRetNotiErr = notification_get_launch_option(g_NotificationHandle, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void*)&hGetAppControl);
+               NotificationGetMemStatus(g_pszNotificationMemLog);
+               NotificationExecutionDelay(g_pszNotificationSpeedLog);
+
+               if(eRetNotiErr != NOTIFICATION_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][%s]notification_get_launch_option failed at iteration count = %d, error returned = %s\n", __LINE__, API_NAMESPACE, nLoopControler, Notification_GetError(eRetNotiErr));
+                       nGetFailCount++;
+                       app_control_destroy(hGetAppControl);
+                       continue;
+               }
+
+               char* pszGetVal = NULL;
+               app_control_get_app_id(hGetAppControl, &pszGetVal);
+
+               if(NULL == pszGetVal)
+               {
+                       FPRINTF("\\n[Application_ITc]set and get operation mis-match occurs on iteration %d, set app id = %s, get app id = NULL", nLoopControler, pSetAppID);
+                       nMismatchFailCount++;
+               }
+
+               //check for value mis-match
+               if(pszGetVal != NULL)
+               {
+                       if(0 != strcmp(pSetAppID, pszGetVal))
+                       {
+                               FPRINTF("\\n[Application_ITc]set and get operation mis-match occurs on iteration %d, set app id = %s, get app id = %s ", nLoopControler, pSetAppID, pszGetVal);
+                               nMismatchFailCount++;
+                       }
+               }
+
+               free(pszGetVal);
+
+               app_control_destroy(hGetAppControl);
+       }
+    
+       app_control_destroy(hAppControl);
+       FreeAndDeleteNotificationResourceHandle();
+
+       if( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][%s]notification_set_launch_option failed %d times, notification_get_launch_option failed %d times, mismatch happened %d times out of %d times", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchFailCount, MAX_COUNT);
+               NotificationFreeGlobalMemoryResources();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               NotificationPrintSpeedLog("notification_get_launch_option",g_pszNotificationSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               NotificationPrintMemLog("notification_get_launch_option",g_pszNotificationMemLog);
+#endif
+               NotificationFreeGlobalMemoryResources();
+               return 0;
+       }
+}
+/** @} */ //end of itc-notification
+/** @} */ //end of itc-notification-testcases
\ No newline at end of file
diff --git a/src/itc/notification/tct-notification-native.c b/src/itc/notification/tct-notification-native.c
new file mode 100755 (executable)
index 0000000..2c919d1
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-notification-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/notification/tct-notification-native.h b/src/itc/notification/tct-notification-native.h
new file mode 100755 (executable)
index 0000000..985fe26
--- /dev/null
@@ -0,0 +1,111 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_NOTIFICATION_NATIVE_H__
+#define __TCT_NOTIFICATION_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_notification_startup(void);
+extern void ITs_notification_cleanup(void);
+
+extern int ITc_notification_clone_p(void);
+extern int ITc_notifiation_create_p(void);
+extern int ITc_notification_delete_p(void);
+extern int ITc_notification_free_p(void);
+extern int ITc_notification_delete_all_p(void);
+extern int ITc_notification_get_image_p(void);
+extern int ITc_notification_set_image_p(void);
+extern int ITc_notification_set_get_layout_p(void);
+extern int ITc_notification_set_layout_p(void);
+extern int ITc_notification_set_get_led_p(void);
+extern int ITc_notification_set_led_p(void);
+extern int ITc_notification_get_led_time_period_p(void);
+extern int ITc_notification_set_led_time_period_p(void);
+extern int ITc_notification_get_size_p(void);
+extern int ITc_notification_set_size_p(void);
+extern int ITc_notification_get_text_p(void);
+extern int ITc_notification_set_text_p(void);
+extern int ITc_notification_get_sound_p(void);
+extern int ITc_notification_set_sound_p(void);
+extern int ITc_notification_get_vibration_p(void);
+extern int ITc_notification_set_vibration_p(void);
+extern int ITc_notification_get_time_p(void);
+extern int ITc_notification_set_time_p(void);
+extern int ITc_notification_get_time_from_text_p(void);
+extern int ITc_notification_set_time_to_text_p(void);
+extern int ITc_notification_get_progress_p(void);
+extern int ITc_notification_set_progress_p(void);
+extern int ITc_notification_get_property_p(void);
+extern int ITc_notification_set_property_p(void);
+extern int ITc_notification_get_display_applist_p(void);
+extern int ITc_notification_set_display_applist_p(void);
+extern int ITc_notification_get_type_p(void);
+extern int ITc_notification_get_insert_time_p(void);
+extern int ITc_notification_status_message_post_p(void);
+extern int ITc_notification_update_p(void);
+extern int ITc_notification_get_tag_p(void);
+extern int ITc_notification_set_tag_p(void);
+extern int ITc_notification_load_by_tag_p(void);
+extern int ITc_notification_post_p(void);
+extern int ITc_notification_set_launch_option_p(void);
+extern int ITc_notification_get_launch_option_p(void);
+
+testcase tc_array[] = {
+    {"ITc_notification_clone_p", ITc_notification_clone_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notifiation_create_p", ITc_notifiation_create_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_delete_p", ITc_notification_delete_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_free_p", ITc_notification_free_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_delete_all_p", ITc_notification_delete_all_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_image_p", ITc_notification_get_image_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_image_p", ITc_notification_set_image_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_get_layout_p", ITc_notification_set_get_layout_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_layout_p", ITc_notification_set_layout_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_get_led_p", ITc_notification_set_get_led_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_led_p", ITc_notification_set_led_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_led_time_period_p", ITc_notification_get_led_time_period_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_led_time_period_p", ITc_notification_set_led_time_period_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_size_p", ITc_notification_get_size_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_size_p", ITc_notification_set_size_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_text_p", ITc_notification_get_text_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_text_p", ITc_notification_set_text_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_sound_p", ITc_notification_get_sound_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_sound_p", ITc_notification_set_sound_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_vibration_p", ITc_notification_get_vibration_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_vibration_p", ITc_notification_set_vibration_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_time_p", ITc_notification_get_time_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_time_p", ITc_notification_set_time_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_time_from_text_p", ITc_notification_get_time_from_text_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_time_to_text_p", ITc_notification_set_time_to_text_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_progress_p", ITc_notification_get_progress_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_progress_p", ITc_notification_set_progress_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_property_p", ITc_notification_get_property_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_property_p", ITc_notification_set_property_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_display_applist_p", ITc_notification_get_display_applist_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_display_applist_p", ITc_notification_set_display_applist_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_type_p", ITc_notification_get_type_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_insert_time_p", ITc_notification_get_insert_time_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_status_message_post_p", ITc_notification_status_message_post_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_update_p", ITc_notification_update_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_tag_p", ITc_notification_get_tag_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_tag_p", ITc_notification_set_tag_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_load_by_tag_p", ITc_notification_load_by_tag_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_post_p", ITc_notification_post_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_set_launch_option_p", ITc_notification_set_launch_option_p, ITs_notification_startup, ITs_notification_cleanup},
+    {"ITc_notification_get_launch_option_p", ITc_notification_get_launch_option_p, ITs_notification_startup, ITs_notification_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_NOTIFICATION_NATIVE_H__
diff --git a/src/itc/package-manager/CMakeLists.txt b/src/itc/package-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..a8225f8
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "package-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-appfw-package-manager")
+SET(TC_SOURCES
+       ITs-package-manager-common.c
+       ITs-package-manager.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/package-manager/ITs-package-manager-common.c b/src/itc/package-manager/ITs-package-manager-common.c
new file mode 100755 (executable)
index 0000000..cea4f8e
--- /dev/null
@@ -0,0 +1,257 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-package-manager-common.h"
+
+/** @addtogroup itc-package-manager
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stPackageManagerStartTime;
+extern struct mallinfo g_stPackageManagerMemInfo;
+
+//Add helper function definitions here
+
+/**
+* @function            PackageManagerGetDataPath
+* @description         Returns the application data path
+* @parameter           pAppDataPath: application data path
+* @return                      true if succeed else false
+*/
+bool PackageManagerGetDataPath(char* pAppDataPath)
+{
+       if ( NULL == pAppDataPath )
+       {
+               FPRINTF("[Line: %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if ( NULL == pPath )
+       {
+               FPRINTF("[Line: %d][%s] Unable to get application data path; app_get_data_path returned null value\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+       FPRINTF("[Line: %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
+       return true;
+}
+
+/**
+* @function            PackageManagerAppendToAppDataPath
+* @description         Appends the input string to application data path
+* @parameter           pInputPath: path to append to data path; pFinalPath: final resultant path
+* @return                      true if succeed else false
+*/
+bool PackageManagerAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if ( pInputPath == NULL || pFinalPath == NULL )
+       {
+               FPRINTF("[Line: %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if ( false == PackageManagerGetDataPath(pAppDataPath) )
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+       
+       FPRINTF("[Line: %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
+
+       return true;
+}
+
+/**
+* @function            PackageManagerGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* PackageManagerGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case PACKAGE_MANAGER_ERROR_INVALID_PARAMETER:   szErrorVal = "PACKAGE_MANAGER_ERROR_INVALID_PARAMETER";         break;
+       case PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY:               szErrorVal = "PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY";                     break;
+       case PACKAGE_MANAGER_ERROR_IO_ERROR:                    szErrorVal = "PACKAGE_MANAGER_ERROR_IO_ERROR";                          break;
+       case PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE:             szErrorVal = "PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE";           break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                           break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            PackageManagerGetEnum
+* @description         Maps enum to string values
+* @parameter           nRet : enum code returned
+* @return                      enum string
+*/
+char* PackageManagerGetEnum(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case PACKAGE_MANAGER_REQUEST_MODE_QUIET:                szErrorVal = "PACKAGE_MANAGER_REQUEST_MODE_QUIET";              break;
+       case PACKAGE_MANAGER_REQUEST_MODE_DEFAULT:              szErrorVal = "PACKAGE_MANAGER_REQUEST_MODE_DEFAULT";    break;
+       default:                                                                                szErrorVal = "Unknown Request";                                                 break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            PackageManagerGetEnumForComponent
+* @description         Maps enum to string values
+* @parameter           nRet : enum code returned
+* @return                      enum string
+*/
+char* PackageManagerGetEnumForComponent(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case PACKAGE_INFO_ALLAPP:                       szErrorVal = "PACKAGE_INFO_ALLAPP";                     break;
+       case PACKAGE_INFO_UIAPP:                        szErrorVal = "PACKAGE_INFO_UIAPP";                      break;
+       case PACKAGE_INFO_SERVICEAPP:           szErrorVal = "PACKAGE_INFO_SERVICEAPP";         break;
+       default:                                                        szErrorVal = "Unknown Info";                            break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           PackageManagerGetCompareResult
+ * @description                Maps enums to string values
+ * @parameter          eCompResult: compare code returned
+ * @return                     string
+ */
+char* PackageManagerGetCompareResult(package_manager_compare_result_type_e eCompResult)
+{
+       char *szCompareVal = NULL;
+
+       switch ( eCompResult )
+       {
+       case PACKAGE_MANAGER_COMPARE_MATCH:                     szCompareVal ="PACKAGE_MANAGER_COMPARE_MATCH";                  break;
+       case PACKAGE_MANAGER_COMPARE_MISMATCH:          szCompareVal ="PACKAGE_MANAGER_COMPARE_MISMATCH";               break;
+       case PACKAGE_MANAGER_COMPARE_LHS_NO_CERT:       szCompareVal ="PACKAGE_MANAGER_COMPARE_LHS_NO_CERT";    break;
+       case PACKAGE_MANAGER_COMPARE_RHS_NO_CERT:       szCompareVal ="PACKAGE_MANAGER_COMPARE_RHS_NO_CERT";    break;
+       case PACKAGE_MANAGER_COMPARE_BOTH_NO_CERT:      szCompareVal ="PACKAGE_MANAGER_COMPARE_BOTH_NO_CERT";   break;
+       default:                                                                        szCompareVal ="Unknown Result";                                                 break;
+       }
+
+       return szCompareVal;
+}
+
+
+/**
+* @function                    PackageManagerGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void PackageManagerGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if ( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+               
+               if ( stMemInfo.uordblks > g_stPackageManagerMemInfo.uordblks )
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stPackageManagerMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stPackageManagerMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog,"%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    PackageManagerGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void PackageManagerGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stPackageManagerMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           PackageManagerExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ */
+void PackageManagerExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       if ( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+               
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stPackageManagerStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stPackageManagerStartTime.tv_usec;
+                       
+               sprintf(pszLogTime,"%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+               
+#endif
+}
+
+/**
+ * @function           PackageManagerGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stPackageManagerStartTime
+ * @parameter          NA
+ * @return                     NA
+ */
+void PackageManagerGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stPackageManagerStartTime, NULL);
+#endif
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/package-manager/ITs-package-manager-common.h b/src/itc/package-manager/ITs-package-manager-common.h
new file mode 100755 (executable)
index 0000000..8b36674
--- /dev/null
@@ -0,0 +1,215 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_PACKAGE_MANAGER_COMMON_H_
+#define _ITS_PACKAGE_MANAGER_COMMON_H_
+
+#include"assert.h"
+//Add test package related includes here
+
+#include <package_manager.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <glib.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <app.h>
+
+/** @addtogroup itc-package-manager
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function declarations here
+#define LOG                                                    100
+#define TIMELOG                                                10
+#define MEMLOG                                         10
+#define MICROSECONDS_PER_SECOND                1000000
+#define TIMEOUT_CB                                     10000
+#define SLEEP_TIME                                     5
+FILE *g_fpLog;
+
+/************************* Constant values macros **********************************/
+#define PATH_LEN                                                       1024
+#define USER_DATA                                                      NULL
+#define APPID1                                                         "core-testapp-itc"
+#define APPID2                                                         "org.tizen.testapp"
+#define PKG_NAME2                                                      "org.tizen.testapp"
+#define FILTER_PROPERTY                                                "PMINFO_PKGINFO_PROP_PACKAGE_UPDATE"
+#define API_NAMESPACE                                          "PACKAGE_MANAGER_ITC"
+
+typedef struct speedmemory
+{
+       char *pszAPI1MemLog;
+       char *pszAPI2MemLog;
+       char *pszAPI1SpeedLog;
+       char *pszAPI2SpeedLog;
+}SpeedMemoryLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf (g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line: %d][%s] Starting test: %s\\n", __LINE__, API_NAMESPACE,__FUNCTION__);\
+       if ( !g_bPackageManagerCreation )\
+       {\
+               FPRINTF("[Line: %d][%s] Precondition of Package-Manager create failed so leaving test\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+}
+
+
+#define PRINT_RESULT(eCompare, eRetVal, API, Error) {\
+       if ( eRetVal == eCompare )\
+       {\
+               if ( DEBUG )\
+               {\
+                       FPRINTF("[Line: %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line: %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_CLEANUP(eCompare, eRetVal, API, Error, FreeResource) {\
+       if ( eRetVal == eCompare )\
+       {\
+               if ( DEBUG )\
+               {\
+                       FPRINTF("[Line: %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line: %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+               FreeResource;\
+               return 1;\
+       }\
+}
+
+#define CHECK_HANDLE(Handle, API) {\
+       if ( Handle == NULL )\
+       {\
+               FPRINTF("[Line: %d][%s] %s failed, error returned = Handle returned is NULL\\n", __LINE__, API_NAMESPACE, API);\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if ( strlen(memLog) > 0 )\
+       {\
+               memLog[strlen(memLog)-1] = '\0';\
+               FPRINTF("[Line: %d][%s]%s_MemoryLeakStatus - %s\\n", __LINE__, API_NAMESPACE, #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if ( strlen(speedLog) > 0 )\
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line: %d][%s]%s_TimeInMicrosec- %s\\n", __LINE__, API_NAMESPACE, #api, speedLog);\
+       }
+
+#define PACKAGE_MANAGER_INITIALIZE_LOGS {\
+       if ( MEMORY_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if ( SPEED_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+}
+       
+#define PACKAGE_MANAGER_INITIALIZE_LOGS_DOUBLEMEM {\
+       if ( MEMORY_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if ( SPEED_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+}
+       
+#define PACKAGE_MANAGER_INITIALIZE_LOGS_DOUBLESPEED {\
+       if ( MEMORY_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if ( SPEED_CHECK )\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+       }
+       
+#define PACKAGE_MANAGER_DEINITIALIZE_LOGS {\
+       if ( stSpeedMemoryLog.pszAPI1MemLog != NULL )\
+       {\
+               free(stSpeedMemoryLog.pszAPI1MemLog);\
+               stSpeedMemoryLog.pszAPI1MemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2MemLog != NULL )\
+       {\
+               free(stSpeedMemoryLog.pszAPI2MemLog);\
+               stSpeedMemoryLog.pszAPI2MemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI1SpeedLog != NULL )\
+       {\
+               free (stSpeedMemoryLog.pszAPI1SpeedLog);\
+               stSpeedMemoryLog.pszAPI1SpeedLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2SpeedLog != NULL )\
+       {\
+               free (stSpeedMemoryLog.pszAPI2SpeedLog);\
+               stSpeedMemoryLog.pszAPI2SpeedLog = NULL;\
+       }\
+}
+
+#define RUN_POLLING_LOOP {\
+       g_pPacakageManagerMainLoop = g_main_loop_new(NULL, false);\
+       nTimeoutId = g_timeout_add(TIMEOUT_CB, Timeout, g_pPacakageManagerMainLoop);\
+       g_main_loop_run(g_pPacakageManagerMainLoop);\
+       g_source_remove(nTimeoutId);\
+       g_pPacakageManagerMainLoop = NULL;\
+}
+       
+char* PackageManagerGetError(int nRet);
+void PackageManagerGetMemAllocation(void);
+void PackageManagerExecutionDelay(char* pszAPITime);
+void PackageManagerGetTimeOfDay(void);
+void PackageManagerGetMemStatus(char *pszAPIMemory);
+char* PackageManagerGetCompareResult(package_manager_compare_result_type_e eCompResult);
+char* PackageManagerGetEnum(int nRet);
+char* PackageManagerGetEnumForComponent(int nRet);
+
+bool PackageManagerGetDataPath(char* pPath);
+bool PackageManagerAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+/** @} */
+#endif  //_ITS_PACKAGE_MANAGER_COMMON_H_
diff --git a/src/itc/package-manager/ITs-package-manager.c b/src/itc/package-manager/ITs-package-manager.c
new file mode 100755 (executable)
index 0000000..30f4f89
--- /dev/null
@@ -0,0 +1,2967 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-package-manager-common.h"
+
+/** @addtogroup itc-package-manager
+*  @ingroup itc
+*  @{
+*/
+
+//& set: PackageManager
+
+struct timeval g_stPackageManagerStartTime;
+struct mallinfo g_stPackageManagerMemInfo;
+
+bool g_bCallbackHit = false;
+bool g_bCallbackReturnValue = false;
+bool g_bEventTypeInstall = false;
+package_manager_h g_hAppfwPackageManagerHandler = NULL;
+bool g_bPackageManagerCreation;
+static GMainLoop *g_pPacakageManagerMainLoop;
+
+/**
+* @function            Timeout
+* @description         Called if some callback is not invoked for a particular timeout
+* @parameter           gpointer data
+* @return                      gboolean
+*/ 
+gboolean Timeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+       }
+       FPRINTF("[Line: %d][%s]Callback Timeout\\n", __LINE__, API_NAMESPACE);
+       return false;
+}
+//Callbacks
+
+/**
+* @function            PackageManagerPackageInfoCB
+* @description         Callback function which is invoked when package_manager_foreach_package_info is called
+* @parameter           package_info_s * package_info_h : package info , void *user_data: user data to be passed
+* @return                      bool
+*/
+static bool PackageManagerPackageInfoCB(package_info_h hPackInfo,void *pUserData)
+{
+       g_bCallbackReturnValue = false;
+#if DEBUG
+       FPRINTF("[Line: %d][%s] PackageManagerPackageInfoCB callback called\\n", __LINE__, API_NAMESPACE);
+#endif
+       g_bCallbackHit = true;
+       if ( hPackInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] PackageManagerPackageInfoCB callback returned null package info\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackReturnValue = false;
+       }
+       else
+       {
+               g_bCallbackReturnValue = true;
+       }
+       if ( g_pPacakageManagerMainLoop )
+       {
+               g_main_loop_quit(g_pPacakageManagerMainLoop);
+       }
+       return false;
+}
+
+/**
+* @function            PackageManagerEventCB
+* @description         Callback function to be invoked when the package is installed, uninstalled or updated.
+* @parameter           const char *pszType,const char *pszPkg, package_manager_event_type_e eEventType,package_manager_event_state_e eEventState,int progress,package_manager_error_e eErr,void *pUserData
+* @return                      NA
+*/
+static void PackageManagerEventCB(const char *pszType,const char *pszPkg, package_manager_event_type_e eEventType,
+                                                                 package_manager_event_state_e eEventState,
+                                                                 int progress,
+                                                                 package_manager_error_e eErr,
+                                                                 void *pUserData)
+{
+       g_bCallbackReturnValue = false;
+#if DEBUG
+       FPRINTF("[Line: %d][%s] PackageManagerEventCB callback called\\n", __LINE__, API_NAMESPACE);
+#endif
+       g_bCallbackHit = true;
+       if ( pszType == NULL || pszPkg == NULL || progress< 0 || progress > 100 )
+       {
+               FPRINTF("[Line: %d][%s] PackageManagerEventCB callback returned null package type and package\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackReturnValue = false;
+       }
+       else
+       {
+               g_bCallbackReturnValue = true;
+       }
+       switch ( eEventType )
+       {
+               case PACKAGE_MANAGER_EVENT_TYPE_INSTALL:
+                       FPRINTF("[Line: %d][%s] Event type: PACKAGE_MANAGER_EVENT_TYPE_INSTALL\\n", __LINE__, API_NAMESPACE);
+                       if ( g_bEventTypeInstall == true )
+                       {
+                               g_bCallbackReturnValue = true;
+                       }
+                       break;
+               case PACKAGE_MANAGER_EVENT_TYPE_UNINSTALL:
+                       FPRINTF("[Line: %d][%s] Event type: PACKAGE_MANAGER_EVENT_TYPE_UNINSTALL\\n", __LINE__, API_NAMESPACE);
+                       if ( g_bEventTypeInstall == false )
+                       {
+                               g_bCallbackReturnValue = true;
+                       }
+                       break;
+               case PACKAGE_MANAGER_EVENT_TYPE_UPDATE:
+                       FPRINTF("[Line: %d][%s] Event type: PACKAGE_MANAGER_EVENT_TYPE_UPDATE\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;  
+               default:
+                       g_bCallbackReturnValue = false;
+                       break;
+       }
+       switch (eEventState)
+       {
+               case PACKAGE_MANAGER_EVENT_STATE_STARTED:
+                       FPRINTF("[Line: %d][%s] Event State: PACKAGE_MANAGER_EVENT_STATE_STARTED\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PACKAGE_MANAGER_EVENT_STATE_PROCESSING:
+                       FPRINTF("[Line: %d][%s] Event State: PACKAGE_MANAGER_EVENT_STATE_PROCESSING\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PACKAGE_MANAGER_EVENT_STATE_COMPLETED:
+                       FPRINTF("[Line: %d][%s] Event State: PACKAGE_MANAGER_EVENT_STATE_COMPLETED\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PACKAGE_MANAGER_EVENT_STATE_FAILED:
+                       FPRINTF("[Line: %d][%s] Event State: PACKAGE_MANAGER_EVENT_STATE_FAILED\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               default:
+                       g_bCallbackReturnValue = false;
+                       break;
+       }
+       
+       if ( g_pPacakageManagerMainLoop )
+       {
+               g_main_loop_quit(g_pPacakageManagerMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            PackageManagerPackageInfoCertInfoCB
+* @description         Callback function which is invoked when package_info_foreach_cert_info is called
+* @parameter           package_info_h handle, package_cert_type_e cert_type, const char *cert_value, void *user_data
+* @return                      bool
+*/
+static bool PackageManagerPackageInfoCertInfoCB(package_info_h handle, package_cert_type_e cert_type, const char *cert_value, void *user_data)
+{
+       g_bCallbackReturnValue = false;
+#if DEBUG
+       FPRINTF("[Line: %d][%s] PackageManagerPackageInfoCertInfoCB callback called\\n", __LINE__, API_NAMESPACE);
+#endif
+       g_bCallbackHit = true;
+       if ( handle == NULL || cert_value == NULL )
+       {
+               FPRINTF("[Line: %d][%s] PackageManagerPackageInfoCertInfoCB callback returned null package info and cert value\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackReturnValue = false;
+       }
+       else
+       {
+               g_bCallbackReturnValue = true;
+       }
+       switch (cert_type)
+       {
+               case PACKAGE_INFO_AUTHOR_ROOT_CERT:
+                       FPRINTF("[Line: %d][%s] Cert Type: PACKAGE_INFO_AUTHOR_ROOT_CERT\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PACKAGE_INFO_AUTHOR_INTERMEDIATE_CERT:
+                       FPRINTF("[Line: %d][%s] Cert Type: PACKAGE_INFO_AUTHOR_INTERMEDIATE_CERT\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PACKAGE_INFO_AUTHOR_SIGNER_CERT:
+                       FPRINTF("[Line: %d][%s] Cert Type: PACKAGE_INFO_AUTHOR_SIGNER_CERT\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PACKAGE_INFO_DISTRIBUTOR_ROOT_CERT:
+                       FPRINTF("[Line: %d][%s] Cert Type: PACKAGE_INFO_DISTRIBUTOR_ROOT_CERT\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PACKAGE_INFO_DISTRIBUTOR_INTERMEDIATE_CERT:
+                       FPRINTF("[Line: %d][%s] Cert Type: PACKAGE_INFO_DISTRIBUTOR_INTERMEDIATE_CERT\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PACKAGE_INFO_DISTRIBUTOR_SIGNER_CERT:
+                       FPRINTF("[Line: %d][%s] Cert Type: PACKAGE_INFO_DISTRIBUTOR_SIGNER_CERT\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PACKAGE_INFO_DISTRIBUTOR2_ROOT_CERT:
+                       FPRINTF("[Line: %d][%s] Cert Type: PACKAGE_INFO_DISTRIBUTOR2_ROOT_CERT\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PACKAGE_INFO_DISTRIBUTOR2_INTERMEDIATE_CERT:
+                       FPRINTF("[Line: %d][%s] Cert Type: PACKAGE_INFO_DISTRIBUTOR2_INTERMEDIATE_CERT\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PACKAGE_INFO_DISTRIBUTOR2_SIGNER_CERT:
+                       FPRINTF("[Line: %d][%s] Cert Type: PACKAGE_INFO_DISTRIBUTOR2_SIGNER_CERT\\n", __LINE__, API_NAMESPACE);
+                       g_bCallbackReturnValue = true;
+                       break;
+               default:
+                       g_bCallbackReturnValue = false;
+                       break;
+       }
+       if ( g_pPacakageManagerMainLoop )
+       {
+               g_main_loop_quit(g_pPacakageManagerMainLoop);
+       }
+       return false;
+}
+
+
+/**
+* @function            PackageManagerPackageInfoAppCB
+* @description         Called to get the application id once for each installed package.
+* @parameter           package_info_app_component_type_e comp_type, const char *app_id, void *user_data
+* @return                      NA
+*/
+static bool PackageManagerPackageInfoAppCB(package_info_app_component_type_e comp_type, const char *app_id, void *user_data)
+{
+       g_bCallbackReturnValue = false;
+#if DEBUG
+       FPRINTF("[Line: %d][%s] PackageManagerPackageInfoAppCB callback called\\n", __LINE__, API_NAMESPACE);
+#endif
+       g_bCallbackHit = true;
+       if ( app_id == NULL )
+       {
+               FPRINTF("[Line: %d][%s] PackageManagerPackageInfoAppCB callback returned null app id\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackReturnValue = false;
+       }
+       else
+       {
+               g_bCallbackReturnValue = true;
+       }
+       if ( g_pPacakageManagerMainLoop )
+       {
+               g_main_loop_quit(g_pPacakageManagerMainLoop);
+       }
+       return false;
+}
+
+/**
+* @function            PackageManagerPackageInfoPrivilegeInfoCB
+* @description         Callback function which retrieves privilege information of package
+* @parameter           const char *privilege_name, void *user_data
+* @return                      bool
+*/
+static bool PackageManagerPackageInfoPrivilegeInfoCB(const char *privilege_name, void *user_data)
+{
+       g_bCallbackReturnValue = false;
+#if DEBUG
+       FPRINTF("[Line: %d][%s] PackageManagerPackageInfoPrivilegeInfoCB callback called\\n", __LINE__, API_NAMESPACE);
+#endif
+       g_bCallbackHit = true;
+       if ( privilege_name == NULL )
+       {
+               FPRINTF("[Line: %d][%s] PackageManagerPackageInfoPrivilegeInfoCB callback returned null privilege name\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackReturnValue = false;
+       }
+       else
+       {
+               g_bCallbackReturnValue = true;
+       }
+
+       if ( g_pPacakageManagerMainLoop )
+       {
+               g_main_loop_quit(g_pPacakageManagerMainLoop);
+       }
+       return false;
+}
+
+/**
+* @function            ITs_package_manager_startup
+* @description         Called before each test, created package manager handle
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_package_manager_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Package_Manager_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       int nRet = package_manager_create(&g_hAppfwPackageManagerHandler);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s]\\n package_manager_create failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               g_bPackageManagerCreation = false;
+       }
+       else
+       {
+#if DEBUG
+               FPRINTF("[Line: %d][%s]\\n Package Manager created successfully\\n", __LINE__, API_NAMESPACE);
+#endif
+               g_bPackageManagerCreation = true;
+       }
+       return;
+}
+
+/**
+* @function            ITs_package_manager_cleanup
+* @description         Called after each test, destroys package manager handle
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_package_manager_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Package_Manager_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       int nRet = package_manager_destroy(g_hAppfwPackageManagerHandler);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s]package_manager_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+       }
+       sleep(SLEEP_TIME);
+       return;
+}
+
+/** @addtogroup itc-package-manager-testcases
+*  @brief              Integration testcases for module package-manager
+*  @ingroup    itc-package-manager
+*  @{
+*/
+
+
+//& purpose: This API executes the user supplied callback function for each package that satisfy the filter conditions
+//& type: auto
+
+/**
+* @testcase                            ITc_package_manager_filter_foreach_package_info_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 This API executes the user supplied callback function for each package that satisfy the filter conditions
+* @scenario                            Create filter\n
+*                                              Check if callback is thrown or not\n
+*                                              Destroys the package information filter handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_manager_filter_foreach_package_info
+* @passcase                            If all the pre conditions are met and packages should be traversed first
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_filter_foreach_package_info_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nTimeoutId = 0;
+       int nFailCount = 0 , nCallbackFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       package_manager_filter_h hAppfwPackageManagerFilterHandler;
+       
+       nRet = package_manager_filter_create(&hAppfwPackageManagerFilterHandler);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_filter_create failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               nRet = package_manager_filter_add_bool(hAppfwPackageManagerFilterHandler,FILTER_PROPERTY, true);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_filter_add_bool failed on iteration %d , error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount ,PackageManagerGetError(nRet));
+               }
+               nRet = -1;
+               g_bCallbackHit = false;
+               g_bCallbackReturnValue = false;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_manager_filter_foreach_package_info (hAppfwPackageManagerFilterHandler,PackageManagerPackageInfoCB, USER_DATA);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_filter_foreach_package_info failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               nRet = package_manager_foreach_package_info (PackageManagerPackageInfoCB, USER_DATA);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_foreach_package_info failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+               }               
+               RUN_POLLING_LOOP;               
+               if ( g_bCallbackHit == false || g_bCallbackReturnValue == false )
+               {
+                       nCallbackFailCount++;
+               }
+       }
+       package_manager_filter_destroy(hAppfwPackageManagerFilterHandler);
+       
+       if ( nFailCount > 0 || nCallbackFailCount > 0 ) 
+       {
+               FPRINTF("[Line: %d][%s] package_manager_filter_foreach_package_info failed %d times , Callback failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount,nCallbackFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_filter_foreach_package_info, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_filter_foreach_package_info, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Retrieves all package information of installed packages. 
+//& type: auto
+
+/**
+* @testcase                            ITc_package_manager_foreach_package_info_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Retrieves all package information of installed packages
+* @scenario                            Retrieve all package information of installed packages\n
+*                                              Check if callback is thrown or not\n
+*                                              Get a package info\n
+*                                              Check the package is invalid or not\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_manager_foreach_package_info
+* @passcase                            If all the pre conditions are met and packages should be traversed first
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_foreach_package_info_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nTimeoutId = 0;
+       int nFailCount = 0 , nCallbackFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+       PACKAGE_MANAGER_INITIALIZE_LOGS;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bCallbackHit = false;
+               g_bCallbackReturnValue = false;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_manager_foreach_package_info (PackageManagerPackageInfoCB, USER_DATA);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_foreach_package_info failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               
+               RUN_POLLING_LOOP;
+               
+               if ( g_bCallbackHit == false || g_bCallbackReturnValue == false )
+               {
+                       nCallbackFailCount++;
+               }
+       }
+
+       if ( nFailCount > 0 || nCallbackFailCount > 0 ) 
+       {
+               FPRINTF("[Line: %d][%s] package_manager_foreach_package_info failed %d times , Callback failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount,nCallbackFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_foreach_package_info, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_foreach_package_info, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Retrieves all application id of each package. 
+//& type: auto
+
+/**
+* @testcase                            ITc_package_info_foreach_app_from_package_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Retrieves all package information of installed packages
+* @scenario                            Get package info from package id\n
+*                                              Retrieves all application id of each package\n 
+*                                              Check if callback is thrown or not\n
+*                                              Check the package is invalid or not\n
+*                                              Destroys the package information handle and releases all its resources\n 
+*                                              Cleanup all resources
+* @apicovered                  package_info_foreach_app_from_package
+* @passcase                            If all the pre conditions are met and packages should be traversed first
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_foreach_app_from_package_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nTimeoutId = 0;
+       int nFailCount = 0 , nCallbackFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID2, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       // we do not have any service app available so not checking for PACKAGE_INFO_SERVICEAPP
+       package_info_app_component_type_e component_type[] = { PACKAGE_INFO_ALLAPP,PACKAGE_INFO_UIAPP};
+                               
+       int nEnumSize = sizeof(component_type) / sizeof(component_type[0]);
+       int nEnumCounter = 0;
+#if MEMORY_CHECK
+       stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT * nEnumSize , sizeof(char));
+#endif
+#if SPEED_CHECK
+       stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * nEnumSize, sizeof(char));
+#endif
+       for ( nEnumCounter=0;nEnumCounter < nEnumSize;nEnumCounter++)
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       g_bCallbackHit = false;
+                       PackageManagerGetMemAllocation();
+                       PackageManagerGetTimeOfDay();
+                       //target API
+                       nRet = package_info_foreach_app_from_package (hPkgInfo,component_type[nEnumCounter],PackageManagerPackageInfoAppCB, USER_DATA);
+                       PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+                       {
+                               FPRINTF("[Line: %d][%s] package_info_foreach_app_from_package failed on iteration %d for Enum %s, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount,PackageManagerGetEnumForComponent(component_type[nEnumCounter]),PackageManagerGetError(nRet));
+                               nFailCount++;
+                               continue;
+                       }
+                       
+                       RUN_POLLING_LOOP;
+                       if ( g_bCallbackHit == false || g_bCallbackReturnValue == false )
+                       {
+                               FPRINTF("[Line: %d][%s] package_info_foreach_app_from_package callback failed on iteration %d for Enum %s\\n", __LINE__, API_NAMESPACE,nLoopCount,PackageManagerGetEnumForComponent(component_type[nEnumCounter]));
+                               nCallbackFailCount++;
+                       }
+               }
+       }
+       if ( nFailCount > 0 || nCallbackFailCount > 0 ) 
+       {
+               FPRINTF("[Line: %d][%s] package_info_foreach_app_from_package failed %d times , Callback failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount,nCallbackFailCount, MAX_COUNT*nEnumSize);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_info_foreach_app_from_package, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_info_foreach_app_from_package, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Creates/Destroys a package manager handle.
+//& type: auto
+
+/**
+* @testcase                    ITc_package_manager_create_destroy_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Creates/Destroys a package manager handle.
+* @scenario                            Creates a package manager handle\n
+*                                              Destroys the package manager handle\n
+*                                              Cleanup all resources
+* @apicovered                  package_manager_create, package_manager_destroy
+* @passcase                            If all the pre conditions are met and package handler created
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @remarks                             The manager must be released using package_manager_destroy
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_create_destroy_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+       package_manager_h hAppfwPackageManagerHandler;
+       
+       PACKAGE_MANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ ) 
+       {
+               hAppfwPackageManagerHandler = NULL;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               // Target API
+               nRet = package_manager_create(&hAppfwPackageManagerHandler);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_create failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nCreateFailCount++;
+                       continue;
+               }
+               nRet = -1;
+               PackageManagerGetTimeOfDay();
+               // Target API
+               nRet = package_manager_destroy(hAppfwPackageManagerHandler);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_destroy failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nDestroyFailCount++;
+               }
+       }
+
+       if (nCreateFailCount > 0 || nDestroyFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_create failed %d times, package_manager_destroy failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nCreateFailCount, nDestroyFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_create, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(package_manager_destroy, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_create_destroy, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Compares whether two app certification are matched.
+//& type: auto
+
+/**
+* @testcase                            ITc_package_manager_compare_app_cert_info_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Compares whether two app certification are matched
+* @scenario                            compare whether two app certification are matched\n
+*                                              Cleanup all resources
+* @apicovered                  package_manager_compare_app_cert_info
+* @passcase                            When package_manager_compare_app_cert_info successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_compare_app_cert_info_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+       package_manager_compare_result_type_e eCompResult = -1;
+       
+       PACKAGE_MANAGER_INITIALIZE_LOGS;
+       
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_manager_compare_app_cert_info(APPID1, APPID2, &eCompResult);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_compare_app_cert_info failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               else 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_compare_app_cert_info returned = %s\\n", __LINE__, API_NAMESPACE ,PackageManagerGetCompareResult(eCompResult));
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_compare_app_cert_info failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_compare_app_cert_info, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_compare_app_cert_info, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Compares whether two package certifications are matched
+//& type: auto
+
+/**
+* @testcase                    ITc_package_manager_compare_package_cert_info_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Compares whether two package certifications are matched
+* @scenario                            Compares whether two package certifications are matched\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_manager_compare_package_cert_info
+* @passcase                            When package_manager_compare_package_cert_info is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_compare_package_cert_info_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       char *pszPkgId1 = NULL;
+       char *pszPkgId2 = NULL;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+       package_manager_compare_result_type_e eCompResult = -1;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId1);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for APPID1, error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId1 == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id for APPID1\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = package_manager_get_package_id_by_app_id(APPID2, &pszPkgId2);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for APPID2, error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if (pszPkgId2 == NULL)
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id for APPID2\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_manager_compare_package_cert_info (pszPkgId1, pszPkgId2, &eCompResult);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_compare_package_cert_info failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               else 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_compare_package_cert_info returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetCompareResult(eCompResult));
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_compare_package_cert_info failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_compare_package_cert_info, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_compare_package_cert_info, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets the package_id for the given app_id.
+//& type: auto
+
+/**
+* @testcase                    ITc_package_manager_get_package_id_by_app_id_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the package_id for the given app_id.
+* @scenario                            Gets the package_id for the given app_id\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_manager_get_package_id_by_app_id
+* @passcase                            When package_manager_get_package_id_by_app_id is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_get_package_id_by_app_id_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0, nFailCount = 0;
+       char *pszPkgId = NULL;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+               
+       PACKAGE_MANAGER_INITIALIZE_LOGS;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE ,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               else if ( pszPkgId == NULL )
+               {
+                       FPRINTF("[Line: %d][%s] package id not returned\\n", __LINE__, API_NAMESPACE);
+                       nFailCount++;
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_get_package_id_by_app_id, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_get_package_id_by_app_id, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets/Destroys the package information for the given package. 
+//& type: auto
+
+/**
+* @testcase                    ITc_package_manager_get_destroy_package_info_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets/Destroys the package information for the given package.
+* @scenario                            Gets the package_id for the given app_id.
+*                                              Gets the package information for the given package.
+*                                              Destroys the package information handle and releases all its resources. 
+*                                              Cleanup all resources
+* @apicovered                  package_manager_get_package_info, package_info_destroy
+* @passcase                            If all the pre conditions are met and package by app id should be traversed first
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               package_info must be released using package_info_destroy
+*/
+int ITc_package_manager_get_destroy_package_info_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nPackageInfoFailCount = 0 , nDestroyFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       char *pszPkgId = NULL;
+       package_info_h  hPkgInfo;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+       PACKAGE_MANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_get_package_info failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nPackageInfoFailCount++;
+                       continue;
+               }
+               nRet = -1;
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_destroy(hPkgInfo);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_info_destroy failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nDestroyFailCount++;
+               }
+               if ( pszPkgId )
+               {
+                       free(pszPkgId);
+                       pszPkgId = NULL;
+               }
+       }
+
+       if (nPackageInfoFailCount > 0 || nDestroyFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed %d times, package_info_destroy failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nPackageInfoFailCount, nDestroyFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_get_package_info, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(package_info_destroy, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_get_destroy_package_info, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Checks whether the package is preload or not by app_id. 
+//& type: auto
+
+/**
+* @testcase                            ITc_package_manager_is_preload_package_by_app_id_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Checks whether the package is preload or not by app_id. 
+* @scenario                            Checks whether the package is preload or not by app_id.
+* @apicovered                  package_manager_is_preload_package_by_app_id
+* @passcase                            If API returns PACKAGE_MANAGER_ERROR_NONE
+* @failcase                            If API returns negative error value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_is_preload_package_by_app_id_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       bool bPreload = false;
+               
+       PACKAGE_MANAGER_INITIALIZE_LOGS;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_manager_is_preload_package_by_app_id(APPID1,&bPreload);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if (nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_is_preload_package_by_app_id failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_is_preload_package_by_app_id failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_is_preload_package_by_app_id, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_is_preload_package_by_app_id, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets the package permission type by app_id.
+//& type: auto
+
+/**
+* @testcase                            ITc_package_manager_get_permission_type_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the package permission type by app_id.
+* @scenario                            Gets the package permission type by app_id.
+*                                              Destroys the package information handle and releases all its resources.
+*                                              Cleanup all resources
+* @apicovered                  package_manager_get_permission_type
+* @passcase                            If all the pre conditions are met and package by app id should be traversed first
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_get_permission_type_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       package_manager_permission_type_e ePermission = -1;
+               
+       PACKAGE_MANAGER_INITIALIZE_LOGS;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_manager_get_permission_type(APPID2,&ePermission);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_get_permission_type failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               if ( ePermission == -1 )
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_get_permission_type failed for invalid permission type on iteration %d\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount++;
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_permission_type failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+       PRINT_SPEED_LOG( package_manager_get_permission_type, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG( package_manager_get_permission_type, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+       PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Registers/Unregisters a callback function to be invoked when the package is installed, uninstalled or updated.
+//& type: auto
+
+/**
+* @testcase                            ITc_package_manager_set_unset_event_cb_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Registers/Unregisters a callback function to be invoked when the package is installed, uninstalled or updated.
+* @scenario                            Registers a callback function to be invoked when the package is installed, uninstalled or updated\n
+*                                              Unregisters the callback function\n
+*                                              Cleanup all resources
+* @apicovered                  package_manager_set_event_cb ,package_manager_unset_event_cb
+* @passcase                            If all the pre conditions are met
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_set_unset_event_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       
+       PACKAGE_MANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               // target API
+               nRet = package_manager_set_event_cb(g_hAppfwPackageManagerHandler, PackageManagerEventCB, USER_DATA);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_set_event_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+               nRet = -1;
+               PackageManagerGetTimeOfDay();
+               // target API
+               nRet = package_manager_unset_event_cb(g_hAppfwPackageManagerHandler);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_unset_event_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nUnsetFailCount++;
+               }
+       }
+       
+       if (nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_set_event_cb failed %d times, package_manager_unset_event_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nSetFailCount, nUnsetFailCount,MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_set_event_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(package_manager_unset_event_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_set_unset_event_cb, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+
+
+//& purpose: Clones the package information handle./ Checks whether two package information are equal. 
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_clone_is_equal_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Clones and checks whether two package information are equal.
+* @scenario                            Get packaged id by application id\n
+*                                              Get a package info\n
+*                                              Clones the package information handle\n
+*                                              Checks whether two package information are equal\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_clone, package_info_is_equal
+* @passcase                            When package_info_clone is successful and package_info_is_equal returns true
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_clone_is_equal_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nCloneFailCount = 0 , nIsEqualFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       bool bIsEql = false;
+       char *pszPkgId = NULL;
+       package_info_h hPackInfoCloned = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS_DOUBLEMEM;      
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_clone(&hPackInfoCloned, hPkgInfo);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_info_clone failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nCloneFailCount++;
+                       continue;
+               }
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_is_equal(hPkgInfo, hPackInfoCloned, &bIsEql);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI2MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_is_equal failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nIsEqualFailCount++;
+               }
+               if ( bIsEql != true )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_is_equal failed for unequal package info on iteration %d\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nIsEqualFailCount++;
+               }                       
+       } 
+       package_info_destroy (hPackInfoCloned);
+       package_info_destroy (hPkgInfo);
+
+       if ( nCloneFailCount > 0 || nIsEqualFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_clone failed %d times, package_info_is_equal failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nCloneFailCount, nIsEqualFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_info_clone, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(package_info_is_equal, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_info_clone, stSpeedMemoryLog.pszAPI1MemLog);
+               PRINT_MEMORY_LOG(package_info_is_equal, stSpeedMemoryLog.pszAPI2MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }       
+}
+
+
+
+//& purpose: Retrieves certification information of the package
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_foreach_cert_info_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Retrieves certification information of the package
+* @scenario                            Gets package id by app id\n
+*                                              Get a package info\n
+*                                              Retrieves certification information of the package\n
+*                                              Checks the callback is thrown\n
+*                                              Checks if a certification is found or not\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_foreach_cert_info
+* @passcase                            package_info_foreach_cert_info is successful and callback is invoked
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_foreach_cert_info_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0 , nTimeoutId = 0;
+       int nFailCount = 0, nCallbackFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       nRet = package_manager_get_package_id_by_app_id(APPID2, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               g_bCallbackHit = false;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_foreach_cert_info(hPkgInfo, PackageManagerPackageInfoCertInfoCB, USER_DATA);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_foreach_cert_info failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+               if ( g_bCallbackHit == false || g_bCallbackReturnValue == false )
+               {
+                       FPRINTF("[Line: %d][%s] Callback failed\\n", __LINE__, API_NAMESPACE);
+                       nCallbackFailCount++;
+               }
+       } 
+       if ( nFailCount > 0 || nCallbackFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_foreach_cert_info failed %d times , Callback failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, nCallbackFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_foreach_cert_info, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_foreach_cert_info, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }       
+}
+
+
+//& purpose: Gets the absolute path to the icon image
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_get_icon_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the absolute path to the icon image
+* @scenario                            Gets packaged id by app id\n
+*                                              Get a package info\n
+*                                              Gets the absolute path to the icon image\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_get_icon
+* @passcase                            If all the pre conditions are met and package_info_get_icon is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_get_icon_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       char *pszPkgIcon = NULL;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_get_icon (hPkgInfo, &pszPkgIcon);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_icon failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               if ( pszPkgIcon == NULL )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_icon failed for invalid package icon path\\n", __LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       free(pszPkgIcon);
+                       pszPkgIcon = NULL;
+               }
+       }
+       package_info_destroy (hPkgInfo);
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_get_icon failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_get_icon, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_get_icon, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }       
+}
+
+//& purpose: Gets the label of the package
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_get_label_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                         Gets the label of the package
+* @scenario                            Gets packaged id by app id\n
+*                                              Get a package info\n
+*                                              Gets the label of the package\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_get_label
+* @passcase                            If all the pre conditions are met and package_info_get_label is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_get_label_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       char *pszPkgLabel = NULL;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_get_label(hPkgInfo, &pszPkgLabel);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_label failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               if ( pszPkgLabel == NULL )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_label failed for invalid package label path\\n", __LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       free(pszPkgLabel);
+                       pszPkgLabel = NULL;
+               }
+       }
+       package_info_destroy (hPkgInfo);
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_get_label failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_get_label, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_get_label, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }       
+}
+
+//& purpose: Get the package name
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_get_package_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Get the package name
+* @scenario                            Gets packaged id by app id\n
+*                                              Get a package info\n
+*                                              Get the package name\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_get_package
+* @passcase                            If all the pre conditions are met and package_info_get_package is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_get_package_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       char *pszPkgName = NULL;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_get_package(hPkgInfo, &pszPkgName);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_package failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE ,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               if ( pszPkgName == NULL )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_package failed for invalid package name\\n", __LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       free(pszPkgName);
+                       pszPkgName = NULL;
+               }
+       }
+       package_info_destroy (hPkgInfo);
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_get_package failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_get_package, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_get_package, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }       
+}
+
+
+//& purpose: Gets the installed storage for the given package
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_get_installed_storage_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the installed storage for the given package
+* @scenario                            Gets packaged id by app id\n
+*                                              Get a package info\n
+*                                              Gets the installed storage for the given package\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_get_installed_storage
+* @passcase                            If all the pre conditions are met and package_info_get_installed_storage is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_get_installed_storage_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       package_info_installed_storage_type_e eStorType = -1;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE , PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               eStorType = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_get_installed_storage(hPkgInfo, &eStorType);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_installed_storage failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               if ( eStorType == -1 )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_installed_storage failed for invalid storage type on iteration %d\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount++;
+               }
+       }
+       package_info_destroy (hPkgInfo);
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_get_installed_storage failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_get_installed_storage, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_get_installed_storage, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }       
+}
+
+//& purpose: Gets the type of the package
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_get_type_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the type of the package
+* @scenario                            Gets packaged id by app id\n
+*                                              Get a package info\n
+*                                              Gets the type of the package\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_get_type
+* @passcase                            If all the pre conditions are met and package_info_get_type is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_get_type_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       char *pszPkgType = NULL;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_get_type(hPkgInfo, &pszPkgType);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_type failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               if ( pszPkgType == NULL )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_type failed for invalid package type\\n", __LINE__, API_NAMESPACE);
+               }
+               else 
+               {
+                       free(pszPkgType);
+                       pszPkgType = NULL;
+               }
+       }
+
+       package_info_destroy (hPkgInfo);
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_get_type failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_get_type, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_get_type, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Gets the version of the package
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_get_version_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the version of the package
+* @scenario                            Gets packaged id by app id\n
+*                                              Get a package info\n
+*                                              Gets the version of the package\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_get_version
+* @passcase                            If all the pre conditions are met and package_info_get_version is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case 
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_get_version_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       char *pszPkgVer = NULL;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_get_version(hPkgInfo, &pszPkgVer);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_version failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               if (pszPkgVer == NULL)
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_version failed for invalid package type\\n", __LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       free(pszPkgVer);
+                       pszPkgVer = NULL;
+               }
+       }
+       package_info_destroy (hPkgInfo);
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_get_version failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_get_version, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_get_version, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets the package accessible for the given package. 
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_is_accessible_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the package accessible for the given package. 
+* @scenario                            Gets packaged id by app id\n
+*                                              Get a package info\n
+*                                              Gets the package accessible for the given package\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_is_accessible
+* @passcase                            If all the pre conditions are met and package_info_is_accessible is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_is_accessible_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       bool bIsAccessiblePkg = false;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_is_accessible(hPkgInfo, &bIsAccessiblePkg);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_is_accessible failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+       }
+       package_info_destroy (hPkgInfo);
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_is_accessible failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_is_accessible, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_is_accessible, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets whether the package is preload or not
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_is_preload_package_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets whether the package is preload or not
+* @scenario                            Gets packaged id by app id\n
+*                                              Retrieves all application id of each package\n
+*                                              Gets whether the package is preload or not\n
+*                                              Gets whether the package is preload or not by app_id\n
+*                                              Check if both values are same\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_is_preload_package
+* @passcase                            If all the pre conditions are met and package_info_is_preload_package is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_is_preload_package_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0 , nMismatchCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       bool bIsPreloadPkg = false, bIsPreloadPkgByAppId = false;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               bIsPreloadPkg = bIsPreloadPkgByAppId = false;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_is_preload_package (hPkgInfo, &bIsPreloadPkg);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_is_preload_package failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               nRet = package_manager_is_preload_package_by_app_id(APPID1, &bIsPreloadPkgByAppId);
+               if ( bIsPreloadPkgByAppId != bIsPreloadPkg )
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_is_preload_package_by_app_id is failed for value mismatch\\n", __LINE__, API_NAMESPACE);
+                       nMismatchCount++;
+               }
+       }
+       package_info_destroy (hPkgInfo);
+
+       if ( nFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_is_preload_package failed %d times , mismatch failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, nMismatchCount , MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_is_preload_package, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_is_preload_package, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets whether the package is removable or not.
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_is_removable_package_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets whether the package is removable or not.
+* @scenario                            Get a package info\n
+*                                              Gets whether the package is removable or not\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_is_removable_package
+* @passcase                            If all the pre conditions are met and package_info_is_removable_package is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_is_removable_package_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       bool bIsRemPkg = false;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               bIsRemPkg = false;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_is_removable_package(hPkgInfo, &bIsRemPkg);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_is_removable_package failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+       }
+       package_info_destroy (hPkgInfo);
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_is_removable_package failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_is_removable_package, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_is_removable_package, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets whether the package is system package or not
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_is_system_package_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets whether the package is system package or not
+* @scenario                            Get a package info\n
+*                                              Gets whether the package is system package or not\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_is_system_package
+* @passcase                            If all the pre conditions are met and package_info_is_system_package is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_is_system_package_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       bool bIsSysPkg = false;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               bIsSysPkg = false;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_is_system_package(hPkgInfo, &bIsSysPkg);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_is_system_package failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE ,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+       }
+       package_info_destroy (hPkgInfo);
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_is_system_package failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_is_system_package, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_is_system_package, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Gets the root path of the package.
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_get_root_path_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the root path of the package.
+* @scenario                            Get a package info\n
+*                                              Get he root path of the package\n
+*                                              Destroys the package information handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_get_root_path
+* @passcase                            If all the pre conditions are met and package_info_get_root_path is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_get_root_path_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       char *pszRootPath = NULL;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID1, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = -1;
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_get_root_path(hPkgInfo, &pszRootPath);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_get_root_path failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+               if ( pszRootPath == NULL )
+               {       
+                       FPRINTF("[Line: %d][%s] package_info_get_root_path failed for invalid root path\\n", __LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       free(pszRootPath);
+                       pszRootPath = NULL;
+               }
+       }
+       package_info_destroy (hPkgInfo);
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_get_root_path failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_get_root_path, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_get_root_path, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Set the event of status of package when the package is installed, uninstalled or updated
+//& type: auto
+
+/**
+* @testcase                    ITc_package_manager_set_event_status_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                         Set the event of status of package when the package is installed, uninstalled or updated
+* @scenario                            Creates package manager handle\n
+*                                              Set the event of status of package\n
+*                                              Destroys the package manager handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_manager_set_event_status
+* @passcase                            If package_manager_set_event_status is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_set_event_status_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nStatusType = 1;
+       
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_manager_set_event_status(g_hAppfwPackageManagerHandler, nStatusType);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_set_event_status failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_set_event_status failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_manager_set_event_status, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_manager_set_event_status, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Creates package info
+//& type: auto
+
+/**
+* @testcase                            ITc_package_info_create_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Creates package info
+* @scenario                            Creates a request handle to the package manager\n
+*                                              Get packaged id from app id\n
+*                                              Get package info\n
+*                                              Create package info\n
+*                                              destroy package info\n
+*                                              Destroys the request handle to the package manager\n
+*                                              Cleanup all resources
+* @apicovered                  package_info_create
+* @passcase                            If package_info_create is successful
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        Insert an external storage micro SD/ SD Card.
+* @postcondition               NA
+*/
+int ITc_package_info_create_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       char *pszPkgId = NULL;
+       package_info_h  hPkgInfo;
+       
+       nRet = package_manager_get_package_id_by_app_id(APPID2, &pszPkgId);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed for Null Package id\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       if ( hPkgInfo == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_info failed for Null Package info\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;        
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_info_create(PKG_NAME2, &hPkgInfo);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_info_create failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+               }
+       }
+       package_info_destroy(hPkgInfo);
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_info_create failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG( package_info_create, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG( package_info_create, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: Creates/Destroys the package information filter handle from db.
+//& type: auto
+
+/**
+* @testcase                    ITc_package_manager_filter_create_destroy_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Creates/Destroys the package information filter handle from db.
+* @scenario                            Create package information filter handle\n
+*                                              Destroy the package information filter handle\n
+*                                              Cleanup all resources
+* @apicovered                  package_manager_filter_create, package_manager_filter_destroy
+* @passcase                            If all the pre conditions are met and package information filter handler created
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_filter_create_destroy_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+       package_manager_filter_h hAppfwPackageManagerFilterHandler;
+       
+       PACKAGE_MANAGER_INITIALIZE_LOGS_DOUBLESPEED;
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ ) 
+       {
+               hAppfwPackageManagerFilterHandler = NULL;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               // Target API
+               nRet = package_manager_filter_create(&hAppfwPackageManagerFilterHandler);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_filter_create failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nCreateFailCount++;
+                       continue;
+               }
+               nRet = -1;
+               PackageManagerGetTimeOfDay();
+               // Target API
+               nRet = package_manager_filter_destroy(hAppfwPackageManagerFilterHandler);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_filter_destroy failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nDestroyFailCount++;
+               }
+       }
+               
+       if (nCreateFailCount > 0 || nDestroyFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_filter_create failed %d times, package_manager_filter_destroy failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nCreateFailCount, nDestroyFailCount, MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_filter_create, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(package_manager_filter_destroy, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_filter_create_destroy, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Counts the package that satisfy the filter conditions
+//& type: auto
+
+/**
+* @testcase                            ITc_package_manager_filter_count_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Counts the package that satisfy the filter conditions
+* @scenario                            Create filter\n
+*                                              Check count\n
+*                                              Destroys the package information filter handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_manager_filter_count
+* @passcase                            If it returns 0
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_filter_count_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       package_manager_filter_h hAppfwPackageManagerFilterHandler;
+       int nCount = -1;
+       
+       nRet = package_manager_filter_create(&hAppfwPackageManagerFilterHandler);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_filter_create failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       PACKAGE_MANAGER_INITIALIZE_LOGS;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               nRet = package_manager_filter_add_bool(hAppfwPackageManagerFilterHandler,FILTER_PROPERTY, true);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_filter_add_bool failed on iteration %d , error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount ,PackageManagerGetError(nRet));
+               }
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_manager_filter_count(hAppfwPackageManagerFilterHandler,&nCount);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_filter_count failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if (nCount < 0)
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_filter_count failed on iteration %d, count returned = %d\\n", __LINE__, API_NAMESPACE,nLoopCount, nCount);
+                       nFailCount++;
+               }
+               
+       }
+       package_manager_filter_destroy(hAppfwPackageManagerFilterHandler);
+       
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_filter_count failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount,MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_filter_count, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_filter_count, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Counts the package that satisfy the filter conditions
+//& type: auto
+
+/**
+* @testcase                            ITc_package_manager_filter_add_bool_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Counts the package that satisfy the filter conditions
+* @scenario                            Create filter\n
+*                                              Check count\n
+*                                              Destroys the package information filter handle and releases all its resources\n
+*                                              Cleanup all resources
+* @apicovered                  package_manager_filter_add_bool
+* @passcase                            If it returns 0
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_manager_filter_add_bool_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nFailCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       package_manager_filter_h hAppfwPackageManagerFilterHandler;
+       
+       nRet = package_manager_filter_create(&hAppfwPackageManagerFilterHandler);
+       if ( nRet != PACKAGE_MANAGER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_filter_create failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PackageManagerGetError(nRet));
+               return 1;
+       }
+       
+       PACKAGE_MANAGER_INITIALIZE_LOGS;
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = -1;
+               PackageManagerGetMemAllocation();
+               PackageManagerGetTimeOfDay();
+               //target API
+               nRet = package_manager_filter_add_bool(hAppfwPackageManagerFilterHandler,FILTER_PROPERTY, true);
+               PackageManagerExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PackageManagerGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if ( nRet != PACKAGE_MANAGER_ERROR_NONE ) 
+               {
+                       FPRINTF("[Line: %d][%s] package_manager_filter_add_bool failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE,nLoopCount, PackageManagerGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }               
+       }
+       package_manager_filter_destroy(hAppfwPackageManagerFilterHandler);
+       
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_filter_add_bool failed %d times out of %d times\\n", __LINE__, API_NAMESPACE,nFailCount,MAX_COUNT);
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 1;
+       } 
+       else 
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(package_manager_filter_add_bool, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(package_manager_filter_add_bool, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PACKAGE_MANAGER_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Retrieves privilege information of the package
+//& type: auto
+
+/**
+* @testcase                    ITc_package_info_foreach_privilege_info_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Retrieves privilege information of the package
+* @scenario                            Gets package id by app id
+*                                              Get a package info.
+*                                              Retrieves privilege information of the package
+*                                              Checks the callback is thrown.
+*                                              Checks if a certification is found or not.
+*                                              Destroys the package information handle and releases all its resources. 
+*                                              Cleanup all resources
+* @apicovered                  package_info_foreach_privilege_info()
+* @passcase                            package_info_foreach_privilege_info is successful and callback is invoked
+* @failcase                            If API fails to complete the scenario cycle in pass case
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_package_info_foreach_privilege_info_p(void)
+{
+       START_TEST;
+       int nRet = -1, nTimeoutId = 0;
+       char *pszPkgId = NULL;
+       package_info_h hPkgInfo = NULL;
+       nRet = package_manager_get_package_id_by_app_id(APPID2, &pszPkgId);
+       PRINT_RESULT(PACKAGE_MANAGER_ERROR_NONE, nRet,"package_manager_get_package_id_by_app_id", PackageManagerGetError(nRet));
+       if ( pszPkgId == NULL )
+       {
+               FPRINTF("[Line: %d][%s] package_manager_get_package_id_by_app_id failed, error = Null Package ID for %s\\n", __LINE__, API_NAMESPACE, APPID2);
+               return 1;
+       }
+
+       nRet = package_manager_get_package_info(pszPkgId, &hPkgInfo);
+       PRINT_RESULT(PACKAGE_MANAGER_ERROR_NONE, nRet,"package_manager_get_package_info", PackageManagerGetError(nRet));
+       CHECK_HANDLE(hPkgInfo,"package_manager_get_package_info");
+
+       g_bCallbackHit = false;
+       //target API
+       nRet = package_info_foreach_privilege_info(hPkgInfo, PackageManagerPackageInfoPrivilegeInfoCB, USER_DATA);
+       PRINT_RESULT_CLEANUP(PACKAGE_MANAGER_ERROR_NONE, nRet,"package_info_foreach_privilege_info", PackageManagerGetError(nRet), package_info_destroy(hPkgInfo));
+       RUN_POLLING_LOOP;
+       if ( g_bCallbackHit == false || g_bCallbackReturnValue == false )
+       {
+
+               FPRINTF("[Line: %d][%s] package_info_foreach_privilege_info failed, error = callback not invoked\\n", __LINE__, API_NAMESPACE);
+               package_info_destroy(hPkgInfo);
+               return 1;
+       }
+
+       nRet = package_info_destroy(hPkgInfo);
+       PRINT_RESULT(PACKAGE_MANAGER_ERROR_NONE, nRet,"package_info_destroy", PackageManagerGetError(nRet));
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/package-manager/native-testapp-itc-0.1-0.armv7l.rpm b/src/itc/package-manager/native-testapp-itc-0.1-0.armv7l.rpm
new file mode 100755 (executable)
index 0000000..5b1400c
Binary files /dev/null and b/src/itc/package-manager/native-testapp-itc-0.1-0.armv7l.rpm differ
diff --git a/src/itc/package-manager/native-testapp-itc-0.1-0.i586.rpm b/src/itc/package-manager/native-testapp-itc-0.1-0.i586.rpm
new file mode 100755 (executable)
index 0000000..c502859
Binary files /dev/null and b/src/itc/package-manager/native-testapp-itc-0.1-0.i586.rpm differ
diff --git a/src/itc/package-manager/org.tizen.testapp-1.0.0-arm.tpk b/src/itc/package-manager/org.tizen.testapp-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..2f6a029
Binary files /dev/null and b/src/itc/package-manager/org.tizen.testapp-1.0.0-arm.tpk differ
diff --git a/src/itc/package-manager/org.tizen.testapp-1.0.0-i386.tpk b/src/itc/package-manager/org.tizen.testapp-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..bb8f070
Binary files /dev/null and b/src/itc/package-manager/org.tizen.testapp-1.0.0-i386.tpk differ
diff --git a/src/itc/package-manager/tct-package-manager-native.c b/src/itc/package-manager/tct-package-manager-native.c
new file mode 100755 (executable)
index 0000000..c090772
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-package-manager-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/package-manager/tct-package-manager-native.h b/src/itc/package-manager/tct-package-manager-native.h
new file mode 100755 (executable)
index 0000000..ef660b6
--- /dev/null
@@ -0,0 +1,89 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_PACKAGE_MANAGER_NATIVE_H__
+#define __TCT_PACKAGE_MANAGER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_package_manager_startup(void);
+extern void ITs_package_manager_cleanup(void);
+
+extern int ITc_package_manager_filter_foreach_package_info_p(void);
+extern int ITc_package_manager_foreach_package_info_p(void);
+extern int ITc_package_info_foreach_app_from_package_p(void);
+extern int ITc_package_manager_create_destroy_p(void);
+extern int ITc_package_manager_compare_app_cert_info_p(void);
+extern int ITc_package_manager_compare_package_cert_info_p(void);
+extern int ITc_package_manager_get_package_id_by_app_id_p(void);
+extern int ITc_package_manager_get_destroy_package_info_p(void);
+extern int ITc_package_manager_is_preload_package_by_app_id_p(void);
+extern int ITc_package_manager_get_permission_type_p(void);
+extern int ITc_package_manager_set_unset_event_cb_p(void);
+extern int ITc_package_info_clone_is_equal_p(void);
+extern int ITc_package_info_foreach_cert_info_p(void);
+extern int ITc_package_info_get_icon_p(void);
+extern int ITc_package_info_get_label_p(void);
+extern int ITc_package_info_get_package_p(void);
+extern int ITc_package_info_get_installed_storage_p(void);
+extern int ITc_package_info_get_type_p(void);
+extern int ITc_package_info_get_version_p(void);
+extern int ITc_package_info_is_accessible_p(void);
+extern int ITc_package_info_is_preload_package_p(void);
+extern int ITc_package_info_is_removable_package_p(void);
+extern int ITc_package_info_is_system_package_p(void);
+extern int ITc_package_info_get_root_path_p(void);
+extern int ITc_package_manager_set_event_status_p(void);
+extern int ITc_package_info_create_p(void);
+extern int ITc_package_manager_filter_create_destroy_p(void);
+extern int ITc_package_manager_filter_count_p(void);
+extern int ITc_package_manager_filter_add_bool_p(void);
+extern int ITc_package_info_foreach_privilege_info_p(void);
+
+testcase tc_array[] = {
+    {"ITc_package_manager_filter_foreach_package_info_p", ITc_package_manager_filter_foreach_package_info_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_foreach_package_info_p", ITc_package_manager_foreach_package_info_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_foreach_app_from_package_p", ITc_package_info_foreach_app_from_package_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_create_destroy_p", ITc_package_manager_create_destroy_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_compare_app_cert_info_p", ITc_package_manager_compare_app_cert_info_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_compare_package_cert_info_p", ITc_package_manager_compare_package_cert_info_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_get_package_id_by_app_id_p", ITc_package_manager_get_package_id_by_app_id_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_get_destroy_package_info_p", ITc_package_manager_get_destroy_package_info_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_is_preload_package_by_app_id_p", ITc_package_manager_is_preload_package_by_app_id_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_get_permission_type_p", ITc_package_manager_get_permission_type_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_set_unset_event_cb_p", ITc_package_manager_set_unset_event_cb_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_clone_is_equal_p", ITc_package_info_clone_is_equal_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_foreach_cert_info_p", ITc_package_info_foreach_cert_info_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_get_icon_p", ITc_package_info_get_icon_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_get_label_p", ITc_package_info_get_label_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_get_package_p", ITc_package_info_get_package_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_get_installed_storage_p", ITc_package_info_get_installed_storage_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_get_type_p", ITc_package_info_get_type_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_get_version_p", ITc_package_info_get_version_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_is_accessible_p", ITc_package_info_is_accessible_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_is_preload_package_p", ITc_package_info_is_preload_package_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_is_removable_package_p", ITc_package_info_is_removable_package_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_is_system_package_p", ITc_package_info_is_system_package_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_get_root_path_p", ITc_package_info_get_root_path_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_set_event_status_p", ITc_package_manager_set_event_status_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_create_p", ITc_package_info_create_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_filter_create_destroy_p", ITc_package_manager_filter_create_destroy_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_filter_count_p", ITc_package_manager_filter_count_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_manager_filter_add_bool_p", ITc_package_manager_filter_add_bool_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {"ITc_package_info_foreach_privilege_info_p", ITc_package_info_foreach_privilege_info_p, ITs_package_manager_startup, ITs_package_manager_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_PACKAGE_MANAGER_NATIVE_H__
diff --git a/src/itc/player/AWB_header_change_AMR.amr b/src/itc/player/AWB_header_change_AMR.amr
new file mode 100755 (executable)
index 0000000..5d8a7e6
Binary files /dev/null and b/src/itc/player/AWB_header_change_AMR.amr differ
diff --git a/src/itc/player/CMakeLists.txt b/src/itc/player/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..6deebb1
--- /dev/null
@@ -0,0 +1,42 @@
+SET(PKG_NAME "player")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-player")
+SET(TC_SOURCES
+       ITs-player-common.c
+       ITs-player.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       bundle
+       appcore-efl
+       elementary
+       ecore
+       evas
+       ecore-x
+       capi-appfw-application
+       capi-system-info
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/itc/player/ITs-player-common.c b/src/itc/player/ITs-player-common.c
new file mode 100755 (executable)
index 0000000..f8923e0
--- /dev/null
@@ -0,0 +1,517 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-player-common.h"
+
+/** @addtogroup itc-player
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stPlayerStartTime;
+extern struct mallinfo g_stPlayerMemInfo;
+
+//Print Player State Code
+void PlayerGetState(player_state_e state)
+{
+       switch ( state )
+       {
+       case PLAYER_STATE_NONE:         FPRINTF("[Line: %d][%s] PLAYER_STATE_NONE\\n", __LINE__, API_NAMESPACE);                break;
+       case PLAYER_STATE_IDLE:         FPRINTF("[Line: %d][%s] PLAYER_STATE_IDLE\\n", __LINE__, API_NAMESPACE);                break;
+       case PLAYER_STATE_READY:        FPRINTF("[Line: %d][%s] PLAYER_STATE_READY\\n", __LINE__, API_NAMESPACE);               break;
+       case PLAYER_STATE_PLAYING:      FPRINTF("[Line: %d][%s] PLAYER_STATE_PLAYING\\n", __LINE__, API_NAMESPACE);             break;
+       case PLAYER_STATE_PAUSED:       FPRINTF("[Line: %d][%s] PLAYER_STATE_PAUSED\\n", __LINE__, API_NAMESPACE);              break;
+       default:                                        FPRINTF("[Line: %d][%s] None State\\n", __LINE__, API_NAMESPACE);                               break;
+       }
+}
+
+/**
+* @function            PlayerGetDataPath
+* @description         Returns the application data path
+* @parameter           pAppDataPath: application data path
+* @return                      true if succeed else false
+*/
+bool PlayerGetDataPath(char* pAppDataPath)
+{
+       if ( NULL == pAppDataPath )
+       {
+               FPRINTF("[Line: %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if ( NULL == pPath )
+       {
+               FPRINTF("[Line: %d][%s] Unable to get application data path; app_get_data_path returned null value\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+       FPRINTF("[Line: %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
+       return true;
+}
+
+/**
+* @function            PlayerAppendToAppDataPath
+* @description         Appends the input string to application data path
+* @parameter           pInputPath: path to append to data path;pFinalPath: final resultant path
+* @return                      true if succeed else false
+*/
+bool PlayerAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if ( (NULL == pInputPath) || (NULL == pFinalPath) )
+       {
+               FPRINTF("[Line: %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if ( false == PlayerGetDataPath(pAppDataPath) )
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+       
+       FPRINTF("[Line: %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
+
+       return true;
+}
+
+/**
+* @function            PlayerGetError
+* @description         Maps error enums to string values
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* PlayerGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+       case PLAYER_ERROR_NONE: szErrorVal = "PLAYER_ERROR_NONE" ; break;
+       case PLAYER_ERROR_INVALID_PARAMETER: szErrorVal = "PLAYER_ERROR_INVALID_PARAMETER" ; break; 
+       case PLAYER_ERROR_INVALID_URI: szErrorVal = "PLAYER_ERROR_INVALID_URI" ; break;
+       case PLAYER_ERROR_NO_SUCH_FILE: szErrorVal = "PLAYER_ERROR_NO_SUCH_FILE" ; break;
+       case PLAYER_ERROR_NOT_SUPPORTED_FILE: szErrorVal = "PLAYER_ERROR_NOT_SUPPORTED_FILE" ; break; 
+       case PLAYER_ERROR_INVALID_OPERATION: szErrorVal = "PLAYER_ERROR_INVALID_OPERATION" ; break;
+       case PLAYER_ERROR_INVALID_STATE: szErrorVal = "PLAYER_ERROR_INVALID_STATE" ; break;
+       default: szErrorVal = "PLAYER_ERROR_UNKNOWN" ; break;
+       }
+
+       return szErrorVal;
+}
+
+
+/**
+* @function                    PlayerGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void PlayerGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if ( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+               
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+               if ( NULL == pszLog )                   
+               {
+                       FPRINTF("[Line: %d][%s] Memory Allocation Failed\\n", __LINE__, API_NAMESPACE, pFinalPath);
+                       return result;  
+               }
+               if ( stMemInfo.uordblks > g_stPlayerMemInfo.uordblks )
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stPlayerMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stPlayerMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    PlayerGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void PlayerGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stPlayerMemInfo = mallinfo();
+#endif
+}
+
+/**
+* @function            ExecutionDelay
+* @description         Returns a log for a code-block of statements execution delay
+* @parameter[OUT]      pszAPITime [String poniter containg the time difference]
+* @return                      NA
+*
+*/
+void PlayerExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+
+       if ( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+               
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stPlayerStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stPlayerStartTime.tv_usec;
+               
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }       
+#endif
+}
+
+/**
+* @function            SystemGetTimeOfDay
+* @description         Get time prior to target api call & set it to g_stPlayerStartTime
+* @parameter           NA
+* @return              NA
+*
+*/ 
+void PlayerGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stPlayerStartTime, NULL);
+#endif
+}
+
+
+/**
+* @function            FREE_MEMORY
+* @description         Function to free the memory allocated
+* @parameter           NA
+* @return                      NA
+*
+*/ 
+void FREE_MEMORY(char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4,char *pszMem5)
+{
+       if ( pszMem1 != NULL )
+       {
+               free(pszMem1 );
+               pszMem1 = NULL;
+       }
+       if ( pszMem2 != NULL )
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if ( pszMem3 != NULL )
+       {
+               free(pszMem3 );
+               pszMem3 = NULL;
+       }
+       if ( pszMem4 != NULL )
+       {
+               free(pszMem4 );
+               pszMem4 = NULL;
+       }
+       if ( pszMem5 != NULL )
+       {
+               free(pszMem5 );
+               pszMem5 = NULL;
+       }
+}
+
+
+/**
+* @function            InitializePlayerHandler
+* @description                 Creates a player handler, sets an uri and prepares the handler
+* @parameter[IN]       bool bPrepare   [if it is true, player would be prepared. Otherwise, player would not be prepared]
+*                      [IN]    int nMediaType  [if it is 0, player_set_uri would be set with an audio file. if it is 1, player_set_uri would be set with a video file. Otherwise, player_set_uri would be set with a download source file]
+* @return                      true if successful, otherwise false. 
+*/
+bool InitializePlayerHandler(bool bPrepare, int nMediaType)
+{
+       int nRet = -1;
+       player_state_e state;
+
+       char pPath1[PATH_LEN] = {0,};
+       char pPath2[PATH_LEN] = {0,};
+       if ( false == PlayerAppendToAppDataPath(MEDIA_PATH_AUDIO, pPath1) )
+       {
+               FPRINTF("[Line: %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+       if ( false == PlayerAppendToAppDataPath(MEDIA_PATH_VIDEO, pPath2) )
+       {
+               FPRINTF("[Line: %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       nRet=player_get_state(g_player,&state);
+       PlayerGetState(state);
+       if ( state != PLAYER_STATE_IDLE )
+       {
+               FPRINTF("[Line: %d][%s] Could not create player\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       if ( nMediaType == 0 )
+       {
+               nRet = player_set_uri(g_player, pPath1);
+       }
+       else if ( nMediaType == 1 )
+       { 
+               nRet = player_set_uri(g_player, pPath2);
+       }
+       else if ( nMediaType == 2 )
+       { 
+               char pstrValue[CONFIG_VALUE_LEN_MAX] = {0,};
+               if ( true == GetValueFromConfigFile("PLAYER_DOWNLOAD_URL", pstrValue) )
+               {
+               #if DEBUG
+                       FPRINTF("[Line: %d][%s] Values Received = %s\\n", __LINE__, API_NAMESPACE, pstrValue);
+               #endif
+               }
+               else
+               {
+                       FPRINTF("[Line: %d][%s] GetValueFromConfigFile returned error\\n", __LINE__, API_NAMESPACE);
+                       return false;
+               }
+               nRet = player_set_uri(g_player, pstrValue);
+       }
+
+       if ( nRet != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] Could not set player uri\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       if ( bPrepare )
+       {
+               nRet = player_prepare(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] Could not prepare player\\n", __LINE__, API_NAMESPACE);
+                       return false;
+               }
+
+               if ( state != PLAYER_STATE_READY )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_prepare() call\\n", __LINE__, API_NAMESPACE);
+                       return false;
+               }
+       }
+       return true;
+}
+
+/**
+* @function            WinDel
+* @description                 Callback function registered by evas_object_smart_callback_add API
+* @parameter[IN]       void*, Evas_Object*, void*
+* @return                      NA. 
+*/
+void WinDel(void *data, Evas_Object *obj, void *event)
+{
+       elm_exit();
+}
+
+/**
+* @function            CreateEvasWindow
+* @description                 Creates an Evas window object
+* @parameter[IN]       NA
+* @return                      Evas_Object if successful, otherwise NULL. 
+*/
+void CreateEvasWindow()
+{
+       /* use gl backend */
+       elm_config_preferred_engine_set("opengl_x11");
+
+       /* create window */
+       g_pEvasWindow = elm_win_util_standard_add(PACKAGE, PACKAGE);
+       if ( g_pEvasWindow )
+       {
+               elm_win_borderless_set(g_pEvasWindow, EINA_TRUE);
+               evas_object_smart_callback_add(g_pEvasWindow, "delete,request",WinDel, NULL);
+               elm_win_autodel_set(g_pEvasWindow, EINA_TRUE);
+       }
+
+       if ( !g_pEvasWindow )
+       {
+               FPRINTF("[Line: %d][%s] Evas object window not created\\n", __LINE__, API_NAMESPACE);
+               return;
+       }
+
+       g_pEvasCore = evas_object_evas_get(g_pEvasWindow);
+       if ( !g_pEvasCore )
+       {
+               FPRINTF("[Line: %d][%s] evas_object_evas_get failed , Evas created is NULL\\n", __LINE__, API_NAMESPACE);
+               return;
+       }
+
+       g_pEvasObject = evas_object_image_add(g_pEvasCore);
+
+       evas_object_image_size_set(g_pEvasObject, 500, 500);
+       evas_object_image_fill_set(g_pEvasObject, 0, 0, 500, 500);
+       evas_object_resize(g_pEvasObject, 500, 500);
+
+       elm_win_activate(g_pEvasWindow);
+       evas_object_show(g_pEvasWindow);
+}
+
+/**
+ * @function           GetValueFromConfigFile
+ * @description                gets the corresponding value for a key from config file
+ * @parameter          pstrKeyString: Key, pstrValue: Value
+ * @return                     true for success, false for failure
+ */ 
+bool GetValueFromConfigFile(char* pstrKeyString, char* pstrValue)
+{
+       if (NULL == pstrKeyString)
+       {
+               FPRINTF("[Line: %d][%s] The key string provided to fetch config file value is null\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+               
+       
+       FILE* pfilePtr = fopen(CONFIGFILE_PATH, "r");
+       if (NULL == pfilePtr)
+       {
+               FPRINTF("[Line: %d][%s] Unable to open configuration file: %s\\n", __LINE__, API_NAMESPACE, CONFIGFILE_PATH);
+               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 (pszKey != NULL)
+                       {       
+                               if ( 0 == strcmp(pszKey, pstrKeyString) )
+                               {
+#if DEBUG
+                                       FPRINTF("[Line: %d][%s] [Key = %s; Config value = %s]\\n", __LINE__, API_NAMESPACE, 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__, API_NAMESPACE, pstrKeyString, CONFIGFILE_PATH);
+               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__, API_NAMESPACE, pszKey, CONFIG_VALUE_LEN_MAX);
+               return false;
+       }
+
+       memset(pstrValue, 0, CONFIG_VALUE_LEN_MAX);
+       strcpy(pstrValue, pszValue);
+       return true;
+}
+
+/**
+ * @function           Player_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Player_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("[Line: %d][%s] Null key value passed to function: Player_Check_System_Info_Feature_Supported\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool(pszKey, &bValue);
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n", __LINE__, API_NAMESPACE, Player_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("[Line: %d][%s] system_info_get_platform_bool returned unsupported feature capability for (key = %s)\\n", __LINE__, API_NAMESPACE, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] system_info_get_platform_bool returned supported status feature for (key = %s)\\n", __LINE__, API_NAMESPACE, pszKey);
+       }
+
+       return bValue;
+}
+
+/**
+ * @function           Player_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet: error code returned
+ * @return                     error string
+ */
+char* Player_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            szErrorVal = "SYSTEM_INFO_ERROR_NONE";                          break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER";     break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR";                      break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY";         break;
+               default:                                                                        szErrorVal = "Unknown error";                                           break;
+       }
+
+       return szErrorVal;
+}
+/** @} */
diff --git a/src/itc/player/ITs-player-common.h b/src/itc/player/ITs-player-common.h
new file mode 100755 (executable)
index 0000000..65e3963
--- /dev/null
@@ -0,0 +1,150 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_PLAYER_COMMON_H_
+#define _ITS_PLAYER_COMMON_H_
+
+#include "assert.h"
+#include "player.h"
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <dlfcn.h>
+#include <appcore-efl.h>
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <app.h>
+#include <system_info.h>
+
+/** @addtogroup itc-player
+*  @ingroup itc
+*  @{
+*/
+
+#define API_NAMESPACE                          "PLAYER_ITC"
+#define PATH_LEN                                       1024
+#define MAX_HANDLE                                     20
+#define PACKAGE                                        "player_test"
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define MEDIA_FILE_LENGTH                      28
+#define TIMEOUT                                                20000
+#define SLEEP_TIME                                     12
+#define CONFIG_LINE_LEN_MAX                    2048
+#define CONFIG_VALUE_LEN_MAX           1024
+
+#define MEDIA_PATH_CORRUPT_FILE                "AWB_header_change_AMR.amr"
+#define MEDIA_PATH_VIDEO2                      "v.mp4"
+#define MEDIA_PATH_VIDEO                       "file.mp4"
+#define MEDIA_PATH_AUDIO                       "short.mp3"
+#define DOWNLOAD_DESTINATION           "WaltzingMathilda320X240_512kb.mp4"
+#define MEDIA_PATH_SUBTITLE                    "sub.srt"
+#define WIFI_FEATURE                           "http://tizen.org/feature/network.wifi"
+#define TELEPHONY_FEATURE                      "http://tizen.org/feature/network.telephony"
+#define ETHERNET_FEATURE                       "http://tizen.org/feature/network.ethernet"
+
+FILE *g_fpLog;
+Evas_Object *g_pEvasWindow;
+Evas_Object *g_pEvasObject;
+Evas *g_pEvasCore;
+
+#define FPRINTF(...) {\
+               g_fpLog = fopen(ERR_LOG,"a");\
+               fprintf(g_fpLog, __VA_ARGS__);\
+               fclose(g_fpLog);\
+               }
+
+#define START_TEST {\
+               FPRINTF("[Line: %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE,__FUNCTION__);\
+               if ( !g_bPlayerCreation )\
+               {\
+                       FPRINTF("[Line: %d][%s] Precondition of player create failed so leaving test\\n", __LINE__, API_NAMESPACE);\
+                       return 1;\
+               }\
+       }
+
+#define PRINT_RESULT(nRetVal, API) {\
+               if ( nRetVal == PLAYER_ERROR_NONE )\
+               {\
+                       FPRINTF("[Line: %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+               }\
+               else\
+               {\
+                       FPRINTF("[Line: %d][%s] %s failed, error returned = %s\\n", __LINE__, API_NAMESPACE, API, PlayerGetError(nRetVal));\
+                       return 1;\
+               }\
+       }
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if ( nMLogLen > 0 )\
+       {\
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line: %d][%s] %s MemoryLeakStatus - %s\\n", __LINE__, API_NAMESPACE, #api, memLog);\
+       }
+
+
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if ( strlen(speedLog) > 0 )\
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line: %d][%s] %s TimeInMicrosec- %s\\n", __LINE__, API_NAMESPACE, #api, speedLog);\
+       }
+
+#define PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(api)\
+       FPRINTF("[Line: %d][%s] %s API Call Failed] *****\\n", __LINE__, API_NAMESPACE, #api);
+
+#define PRINT_API_ERROR_IN_LOOP_MSG(api, nRet)\
+       FPRINTF("[Line: %d][%s] %s API Call Failed With Return Value: %d] *****\\n", __LINE__, API_NAMESPACE, #api, nRet);
+
+player_h g_player;     
+char* PlayerGetError(int nRet);
+void PlayerGetMemAllocation();
+void PlayerExecutionDelay(char* pszAPITime);
+void PlayerGetTimeOfDay();
+void PlayerGetMemStatus(char *pszAPIMemory);
+void FREE_MEMORY(char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4,char *pszMem5);
+bool PlayerGetDataPath(char* pPath);
+bool PlayerAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+bool GetValueFromConfigFile(char* pstrKeyString, char* pstrValue);
+
+
+// HELPER FUNCTIONS
+/***********************************************************************/
+// initialization for player handler
+bool InitializePlayerHandler(bool bPrepare, int nMediaType);
+
+//Print Player State
+void PlayerGetState(player_state_e e);
+
+void CreateEvasWindow();
+void WinDel(void *data, Evas_Object *obj, void *event);
+
+bool Player_Check_System_Info_Feature_Supported(char* pszKey);
+char* Player_System_Info_GetError(int nRet);
+/************************************************************************/
+
+/** @} */
+#endif  //_ITS_PLAYER_COMMON_H_
diff --git a/src/itc/player/ITs-player.c b/src/itc/player/ITs-player.c
new file mode 100755 (executable)
index 0000000..94c0e4f
--- /dev/null
@@ -0,0 +1,4730 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-player-common.h"
+
+/** @addtogroup itc-player
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Player
+
+bool g_bPlayerCreation;
+bool g_bPlayerVideoCaptureCallback;
+bool g_bPlayerAudioEffectSupportedEffectCallback;
+bool g_bPlayerAudioEffectSupportedPresetCallback;
+bool g_bPlayerAudioFrameDecodedCallback;
+bool g_bPlayerBufferingCallback;
+bool g_bPlayerCompletedCallback;
+bool g_bPlayerErrorCallback;
+bool g_bPlayerSubtitleUpdatedCallback;
+bool g_bPlayerInterruptedCallback;
+bool g_bPlayerMediaPacketVideoFrameDecodedCallback;
+bool g_bPlayerPdMessageCallback;
+bool g_bPlayerSeekCompletedCallback;
+bool g_bPlayerPreparedCallback;
+bool g_bPlayerSeekCallback;
+struct timeval g_stPlayerStartTime;
+struct mallinfo g_stPlayerMemInfo;
+
+/**
+* @function            ITs_player_startup
+* @description         Called before each test, created player handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_player_startup(void)
+{
+       ecore_main_loop_glib_integrate();
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       CreateEvasWindow();
+       if (GET_DISPLAY(g_pEvasWindow) == NULL)
+       {
+               FPRINTF("[Line: %d][%s] Evas window object is not created, failed in Precondition\\n", __LINE__, API_NAMESPACE);
+               g_bPlayerCreation = false;
+               return;
+       }
+
+       int nRetVal = player_create(&g_player);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] Unable to create player, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               g_bPlayerCreation = false;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] Player created successfully\\n", __LINE__, API_NAMESPACE);
+               g_bPlayerCreation = true;
+       }
+       return;
+}
+/**
+* @function            ITs_player_cleanup
+* @description         Called after each test, destroys player handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_player_cleanup(void)
+{
+       if (g_bPlayerCreation && g_player)
+       {
+               int nRetVal = player_destroy (g_player);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               }
+               g_player = NULL;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] Player was not created\\n", __LINE__, API_NAMESPACE);
+       }
+
+       if (g_pEvasObject)
+       {
+               evas_object_del(g_pEvasObject);
+               g_pEvasObject = NULL;
+       }
+       if (g_pEvasWindow)
+       {
+               evas_object_del(g_pEvasWindow);
+               g_pEvasWindow = NULL;
+       }
+       sleep(SLEEP_TIME);
+       return;
+}
+
+/**
+* @function            PlayerTimeoutFunction
+* @description         Called if some callback is not invoked for a particular Player Timeout
+* @parameter           gpointer data
+* @return                      gboolean
+*/
+static gboolean PlayerTimeoutFunction(gpointer data)
+{
+       FPRINTF("[Line: %d][%s] Callback Player wait complete for 20 seconds. Timeout\\n", __LINE__, API_NAMESPACE);
+       ecore_main_loop_quit();
+       return FALSE;
+}
+
+/**
+* @function            PlayerWaitForAsync
+* @description         Called to wait
+* @parameter           NA
+* @return                      NA
+*/
+static void PlayerWaitForAsync()
+{
+       g_timeout_add(TIMEOUT, PlayerTimeoutFunction, NULL);
+       ecore_main_loop_begin();
+}
+
+//Callbacks
+
+/**
+* @function                            PlayerVideoCaptureCallback
+* @description                 Callback function which is invoked when the video is captured
+* @parameter                   unsigned char *data, int width, int height, unsigned int size, void *user_data
+* @return                              void
+*/
+static void PlayerVideoCaptureCallback(unsigned char *data, int width, int height, unsigned int size, void *user_data)
+{
+       g_bPlayerVideoCaptureCallback = true;
+       ecore_main_loop_quit();
+}
+
+//Callbacks
+
+/**
+* @function                            PlayerBufferingCallback
+* @description                 Callback function which is invoked when the buffering percentage of media playback is updated
+* @parameter                   int percent, void *user_data
+* @return                              void
+*/
+static void PlayerBufferingCallback(int percent, void *user_data)
+{
+       g_bPlayerBufferingCallback = true;
+       ecore_main_loop_quit();
+}
+
+//Callbacks
+
+/**
+* @function                            PlayerCompletedCallback
+* @description                 Callback function which is invoked when the media player is completed
+* @parameter                   void *user_data
+* @return                              void
+*/
+static void PlayerCompletedCallback(void *user_data)
+{
+       g_bPlayerCompletedCallback = true;
+       ecore_main_loop_quit();
+}
+
+//Callbacks
+
+/**
+* @function                            PlayerErrorCallback
+* @description                 Callback function which is invoked when the media player's error occurred
+* @parameter                   int error_code, void *user_data
+* @return                              void
+*/
+static void PlayerErrorCallback(int error_code, void *user_data)
+{
+       g_bPlayerErrorCallback = true;
+       ecore_main_loop_quit();
+}
+
+//Callbacks
+
+/**
+* @function                            PlayerSubtitleUpdatedCallback
+* @description                 Callback function which is invoked when the image tag is posted
+* @parameter                   char *buffer, int size, void *user_data
+* @return                              void
+*/
+static void PlayerSubtitleUpdatedCallback(unsigned long duration, char *text, void *user_data)
+{
+       g_bPlayerSubtitleUpdatedCallback = true;
+       ecore_main_loop_quit();
+}
+
+//Callbacks
+
+/**
+* @function                    PlayerInterruptedCallback
+* @description         Callback function which is invoked when the media player is interrupted
+* @parameter           player_interrupted_code_e code, void *user_data
+* @return                      void
+*/
+static void PlayerInterruptedCallback(player_interrupted_code_e code, void *user_data)
+{
+       g_bPlayerInterruptedCallback = true;
+       ecore_main_loop_quit();
+}
+
+//Callbacks
+
+/**
+* @function                    PlayerMediaPacketVideoFrameDecodedCallback
+* @description         Callback function which is invoked when the every video frame is decoded
+* @parameter           unsigned char *data, int width, int height, unsigned int size, void *user_data
+* @return                      void
+*/
+static void PlayerMediaPacketVideoFrameDecodedCallback(media_packet_h pkt, void *user_data)
+{
+       g_bPlayerMediaPacketVideoFrameDecodedCallback = true;
+       ecore_main_loop_quit();
+}
+
+//Callbacks
+
+/**
+* @function                    PlayerPdMessageCallback
+* @description         Callback function which is invoked when the progressive download is started or completed
+* @parameter           player_pd_message_type_e type, void *user_data
+* @return                      void
+*/
+static void PlayerPdMessageCallback(player_pd_message_type_e type, void *user_data)
+{
+       g_bPlayerPdMessageCallback = true;
+       ecore_main_loop_quit();
+}
+
+//Callbacks
+
+/**
+* @function                    PlayerPreparedCallback
+* @description         Callback function which is invoked when the media player is prepared
+* @parameter           void *user_data
+* @return                      void
+*/
+static void PlayerPreparedCallback(void *user_data)
+{
+       g_bPlayerPreparedCallback = true;
+       ecore_main_loop_quit();
+}
+
+/**
+* @function            PlayerSeekCompletedCallback
+* @description         Callback function which is invoked when the media player is seeking the position
+* @parameter           void *user_data
+* @return              void
+*/
+static void PlayerSeekCompletedCallback(void *user_data)
+{
+       g_bPlayerSeekCallback = true;
+       ecore_main_loop_quit();
+}
+
+/** @addtogroup itc-player-testcases
+*  @brief              Integration testcases for module player
+*  @ingroup    itc-player
+*  @{
+*/
+
+//& purpose: create and destroy player
+//& type : auto
+/**
+* @testcase                    ITc_player_create_destroy_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 create and destroy player
+* @scenario                            Create player\n
+*                                              destroy player
+* @apicovered                  player_create, player_destroy
+* @passcase                            When it can create and destroy player
+* @failcase                            When it can not create and destroy player
+* @precondition                        N/A
+* @postcondition               N/A
+*/
+int ITc_player_create_destroy_p(void)
+{
+       int nRet = -1, nLoopCount = 0;
+       char *pszAvailMemLog = NULL;
+       char *pszCreateSpeedLog = NULL;
+       char *pszDestroySpeedLog = NULL;
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+
+       usleep(2000);
+       nRet = player_destroy(g_player);
+       if ( nRet != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRet));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszAvailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszCreateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszDestroySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               usleep(2000);
+               // Target API
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRet= player_create(&g_player);
+               PlayerExecutionDelay(pszCreateSpeedLog);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_create failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRet));
+                       nCreateFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               // Target API
+               PlayerGetTimeOfDay();
+               nRet = player_destroy(g_player);
+               PlayerExecutionDelay(pszDestroySpeedLog);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_destroy failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRet));
+                       nDestroyFailCount++;
+               }
+               PlayerGetMemStatus(pszAvailMemLog);
+       }
+       nRet= player_create(&g_player);
+
+       if ( nRet != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_create failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRet));
+               return 1;
+       }
+
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_create failed %d times, player_destroy failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nCreateFailCount, nDestroyFailCount, MAX_COUNT);
+               FREE_MEMORY(pszAvailMemLog, pszCreateSpeedLog, pszDestroySpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_create, pszCreateSpeedLog);
+       PRINT_SPEED_LOG(player_destroy, pszDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_create, pszAvailMemLog);
+#endif
+
+
+       FREE_MEMORY(pszAvailMemLog, pszCreateSpeedLog, pszDestroySpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Initialize player
+//& type : auto
+/**
+* @testcase                    ITc_player_initialize_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 create and destroy player
+* @scenario                            Create player\n
+*                                              destroy player
+* @apicovered                  player_create, player_state, player_set_uri, player_prepare, player_unprepare
+* @passcase                            When it can initialize player
+* @failcase                            When it can not create and destroy player
+* @precondition                        N/A
+* @postcondition               N/A
+*/
+int ITc_player_initialize_p(void)
+{
+       int nRet = -1, nLoopCount = 0;
+       char *pszAvailMemLog = NULL;
+       char *pszStateSpeedLog = NULL;
+       char *pszUriSpeedLog = NULL;
+       char *pszPrepSpeedLog = NULL;
+       char *pszUnprepSpeedLog = NULL;
+       int nStateFailCount = 0;
+       int nUriFailCount = 0;
+       int nPrepFailCount = 0;
+       int nUnprepFailCount = 0;
+       player_state_e state;
+
+       char pPath[PATH_LEN] = {0,};
+       if ( false == PlayerAppendToAppDataPath(MEDIA_PATH_AUDIO, pPath))
+       {
+               FPRINTF("[Line: %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszAvailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszStateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUriSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPrepSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnprepSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               //Target API
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRet=player_get_state(g_player,&state);
+               PlayerGetState(state);
+               PlayerExecutionDelay(pszStateSpeedLog);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_state failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRet));
+                       nStateFailCount++;
+                       continue;
+               }
+               if  (state != PLAYER_STATE_IDLE )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_create() call", __LINE__, API_NAMESPACE);
+                       nStateFailCount++;
+                       continue;
+               }
+
+
+               PlayerGetTimeOfDay();
+               nRet = player_set_uri(g_player, pPath);
+               PlayerExecutionDelay(pszUriSpeedLog);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_uri failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRet));
+                       nUriFailCount++;
+                       continue;
+               }
+
+               PlayerGetTimeOfDay();
+               nRet = player_prepare(g_player);
+               PlayerExecutionDelay(pszPrepSpeedLog);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_prepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRet));
+                       nPrepFailCount++;
+                       continue;
+               }
+               PlayerGetTimeOfDay();
+               nRet = player_unprepare(g_player);
+               PlayerExecutionDelay(pszUnprepSpeedLog);
+               if ( nRet != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_unprepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRet));
+                       nUnprepFailCount++;
+               }
+
+
+               PlayerGetMemStatus(pszAvailMemLog);
+       }
+
+       if ( nStateFailCount > 0 || nUriFailCount > 0 || nPrepFailCount > 0 || nUnprepFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_state failed %d times, player_set_uri failed %d times, player_prepare failed %d times, player_unprepare failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nStateFailCount, nUriFailCount, nPrepFailCount, nUnprepFailCount, MAX_COUNT);
+               FREE_MEMORY(pszAvailMemLog, pszStateSpeedLog, pszUriSpeedLog, pszPrepSpeedLog, pszUnprepSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_state, pszStateSpeedLog);
+       PRINT_SPEED_LOG(player_set_uri, pszUriSpeedLog);
+       PRINT_SPEED_LOG(player_prepare, pszPrepSpeedLog);
+       PRINT_SPEED_LOG(player_unprepare, pszUnprepSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_initialize, pszAvailMemLog);
+#endif
+
+       FREE_MEMORY(pszAvailMemLog, pszStateSpeedLog, pszUriSpeedLog, pszPrepSpeedLog, pszUnprepSpeedLog);
+       return 0;
+}
+
+//& purpose: Provides the audio stream information
+//& type : auto
+/**
+* @testcase                    ITc_player_get_audio_stream_info_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Provides the audio stream information
+* @scenario                            Initialize player handle\n
+*                                              start player\n
+*                                              call player get audio stream info\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_get_audio_stream_info, player_unprepare
+* @passcase                            When it gets audio stream information
+* @failcase                            When it can not get audio stream information
+* @precondition                        The player state must be one of: PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED
+* @postcondition               N/A
+*/
+int ITc_player_get_audio_stream_info_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszStreamMemLog = NULL;
+       char *pszStreamSpeedLog = NULL;
+       int nStreamFailCount = 0;
+       int nSupportFailCount = 0;
+       int nSample_rate;
+       int nChannel;
+       int nBit_rate;
+       player_state_e state;
+#if MEMORY_CHECK
+       pszStreamMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszStreamSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 0) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_audio_stream_info(g_player,&nSample_rate,&nChannel,&nBit_rate);
+               PlayerExecutionDelay(pszStreamSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_audio_stream_info failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nStreamFailCount++;
+               }
+               PlayerGetMemStatus(pszStreamMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nStreamFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_get_audio_stream_info failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nStreamFailCount, MAX_COUNT);
+               FREE_MEMORY(pszStreamMemLog, pszStreamSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_get_audio_stream_info, pszStreamSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_get_audio_stream_info, pszStreamMemLog);
+#endif
+       FREE_MEMORY(pszStreamMemLog, pszStreamSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Set and get rotation of the x surface video display
+//& type: auto
+/**
+* @testcase                    ITc_player_set_get_display_rotation_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Set and get rotation of the x surface video display
+* @scenario                            Create player handle\n
+*                                              set player display\n
+*                                              set display rotation\n
+*                                              get display rotation\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_set_display, player_set_display_rotation, player_get_display_rotation
+* @passcase                            When it set and get x11 display rotation
+* @failcase                            When it does not set or get x11 display rotation
+* @precondition                        The player display must be set as PLAYER_DISPLAY_TYPE_OVERLAY
+* @postcondition               N/A
+*/
+int ITc_player_set_get_display_rotation_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetGetRotMemLog = NULL;
+       char *pszSetRotSpeedLog = NULL;
+       char *pszGetRotSpeedLog = NULL;
+       int nSetRotFailCount = 0;
+       int nGetRotFailCount = 0;
+       int nSetDisplayFailCount = 0;
+       int nMismatchCount = 0;
+       player_display_rotation_e rotation;
+
+#if MEMORY_CHECK
+       pszSetGetRotMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetRotSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetRotSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_display failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetDisplayFailCount++;
+                       continue;
+               }
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_display_rotation(g_player, PLAYER_DISPLAY_ROTATION_90);
+               PlayerExecutionDelay(pszSetRotSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_display_rotation failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetRotFailCount++;
+                       continue;
+               }
+               usleep(2000);
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_display_rotation(g_player, &rotation);
+
+               PlayerExecutionDelay(pszGetRotSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_display_rotation failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nGetRotFailCount++;
+                       continue;
+               }
+               if (rotation != PLAYER_DISPLAY_ROTATION_90)
+               {
+                       FPRINTF("[Line: %d][%s] player_set_get_display_rotation mismatched %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nMismatchCount++;
+               }
+               PlayerGetMemStatus(pszSetGetRotMemLog);
+       }
+
+       if ( nSetRotFailCount > 0 || nGetRotFailCount > 0 || nSetDisplayFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_set_display failed %d times, player_set_display_rotation failed %d times, player_get_display_rotation failed %d times, player_set_get_display_rotation mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetDisplayFailCount, nSetRotFailCount, nGetRotFailCount, nMismatchCount, MAX_COUNT);
+               FREE_MEMORY(pszSetGetRotMemLog, pszSetRotSpeedLog, pszGetRotSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_display_rotation, pszSetRotSpeedLog);
+       PRINT_SPEED_LOG(player_get_display_rotation, pszGetRotSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_set_get_display_rotation, pszSetGetRotMemLog);
+#endif
+       FREE_MEMORY(pszSetGetRotMemLog, pszSetRotSpeedLog, pszGetRotSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Set x surface video display visible
+//& type: auto
+
+/**
+* @testcase                            ITc_player_set_display_visible_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Set x surface video display visible
+* @scenario                            Create player handle\n
+*                                              set player display\n
+*                                              set x surface video display visible\n
+*                                              destroy the handler
+* @apicovered                  player_set_display, player_set_display_visible,
+* @passcase                            When it can set visibility of the x surface video display
+* @failcase                            When it can not set visibility of the x surface video display
+* @precondition                        The player display must be set as PLAYER_DISPLAY_TYPE_OVERLAY
+* @postcondition               N/A
+*/
+int ITc_player_set_display_visible_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszIsVisibleMemLog = NULL;
+       char *pszSetVisibleSpeedLog = NULL;
+       int nSetVisibleFailCount = 0;
+       int nSetDisplayFailCount = 0;
+
+#if MEMORY_CHECK
+       pszIsVisibleMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetVisibleSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_display failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetDisplayFailCount++;
+                       continue;
+               }
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_display_visible(g_player, true);
+               PlayerExecutionDelay(pszSetVisibleSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_display_visible failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetVisibleFailCount++;
+               }
+
+
+               PlayerGetMemStatus(pszIsVisibleMemLog);
+       }
+
+       if ( nSetVisibleFailCount > 0 || nSetDisplayFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_set_display failed %d times, player_set_display_visible failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetDisplayFailCount, nSetVisibleFailCount, MAX_COUNT);
+               FREE_MEMORY(pszIsVisibleMemLog, pszSetVisibleSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_display_visible, pszSetVisibleSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_set_display_visible, pszIsVisibleMemLog);
+#endif
+       FREE_MEMORY(pszIsVisibleMemLog, pszSetVisibleSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Gets the album art in media resource
+//& type : auto
+/**
+* @testcase                    ITc_player_get_album_art_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Gets the album art in media resource
+* @scenario                            Initialize player handle\n
+*                                              start player\n
+*                                              get album art\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_start, player_get_album_art, player_unprepare
+* @passcase                            When it can get the album art
+* @failcase                            When it can not get the album art
+* @precondition                        The player state must be PLAYER_STATE_PLAYING
+* @postcondition               N/A
+*/
+int ITc_player_get_album_art_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszArtMemLog = NULL;
+       char *pszArtSpeedLog = NULL;
+       int nArtFailCount = 0;
+       int nSupportFailCount = 0;
+       void* pAlbum_Art;
+       int nSize;
+       player_state_e state;
+#if MEMORY_CHECK
+       pszArtMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszArtSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 0) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_album_art(g_player, &pAlbum_Art, &nSize);
+               PlayerExecutionDelay(pszArtSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_album_art failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nArtFailCount++;
+               }
+               PlayerGetMemStatus(pszArtMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nArtFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_get_album_art failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nArtFailCount, MAX_COUNT);
+               FREE_MEMORY(pszArtMemLog, pszArtSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_get_album_art, pszArtSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_get_album_art, pszArtMemLog);
+#endif
+       FREE_MEMORY(pszArtMemLog, pszArtSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Gets the audio codec information
+//& type : auto
+/**
+* @testcase                    ITc_player_get_codec_info_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Gets the audio codec information
+* @scenario                            Initialize player handle\n
+*                                              start player\n
+*                                              get audio codec information\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_start, player_get_codec_info, player_unprepare
+* @passcase                            When it can get audio codec information
+* @failcase                            When it can not get audio codec information
+* @precondition                        The player state must be PLAYER_STATE_PLAYING
+* @postcondition               N/A
+*/
+int ITc_player_get_codec_info_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszCodecInfoMemLog = NULL;
+       char *pszCodecInfoSpeedLog = NULL;
+       int nCodecInfoFailCount = 0;
+       int nSupportFailCount = 0;
+       char *pszAudio_Codec;
+       char *pszVideo_Codec;
+       player_state_e state;
+#if MEMORY_CHECK
+       pszCodecInfoMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszCodecInfoSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 0) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_codec_info(g_player, &pszAudio_Codec, &pszVideo_Codec);
+               PlayerExecutionDelay(pszCodecInfoSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_codec_info failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nCodecInfoFailCount++;
+               }
+               free(pszAudio_Codec);
+               free(pszVideo_Codec);
+               PlayerGetMemStatus(pszCodecInfoMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nCodecInfoFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_get_codec_info failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nCodecInfoFailCount, MAX_COUNT);
+               FREE_MEMORY(pszCodecInfoMemLog, pszCodecInfoSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_get_codec_info, pszCodecInfoSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_get_codec_info, pszCodecInfoMemLog);
+#endif
+       FREE_MEMORY(pszCodecInfoMemLog, pszCodecInfoSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+
+
+//& purpose: Captures the video frame, asynchronously
+//& type: auto
+/**
+* @testcase                    ITc_player_capture_video_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Captures the video frame, asynchronously
+* @scenario                            Set player display\n
+*                                              Initialize player handle\n
+*                                              Start player\n
+*                                              callback player capture video\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_set_uri, player_prepare, player_start, player_capture_video, player_unprepare
+* @passcase                            When it captures video frame
+* @failcase                            When it does not captures video frame
+* @precondition                        The player state must be PLAYER_STATE_PLAYING by player_start() or PLAYER_STATE_PAUSED by player_pause()
+* @postcondition               It invokes player_video_captured_cb() when capture completes, if you set a callback
+*/
+int ITc_player_capture_video_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszCaptureMemLog = NULL;
+       char *pszCaptureSpeedLog = NULL;
+       int nCaptureFailCount = 0;
+       int nSupportFailCount = 0;
+       int nFailCount = 0;
+       player_state_e state;
+
+       char pPath[PATH_LEN] = {0,};
+       if ( false == PlayerAppendToAppDataPath(MEDIA_PATH_VIDEO2, pPath))
+       {
+               FPRINTF("[Line: %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_display failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+               return 1;
+       }
+       sleep(2);
+       nRetVal = player_set_uri(g_player, pPath);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_uri failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszCaptureMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszCaptureSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRetVal = player_prepare(g_player);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_prepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       continue;
+               }
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               sleep(4);
+               nRetVal = player_pause(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_pause failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PAUSED )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_pause() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               sleep(2);
+               g_bPlayerVideoCaptureCallback = false;
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_capture_video(g_player, PlayerVideoCaptureCallback, NULL);
+               PlayerExecutionDelay(pszCaptureSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_capture_video failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nCaptureFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerWaitForAsync();
+
+               if ( !g_bPlayerVideoCaptureCallback )
+               {
+                       FPRINTF("[Line: %d][%s] player_video_captured_cb failed on iteration = %d , error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount ++;
+               }
+               PlayerGetMemStatus(pszCaptureMemLog);
+               player_unprepare(g_player);
+       }
+
+       if ( nCaptureFailCount > 0 || nSupportFailCount > 0 || nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_capture_video failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nCaptureFailCount, MAX_COUNT);
+               FREE_MEMORY(pszCaptureMemLog, pszCaptureSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_capture_video, pszCaptureSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_capture_video, pszCaptureMemLog);
+#endif
+       FREE_MEMORY(pszCaptureMemLog, pszCaptureSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+
+
+
+
+//& purpose: Gets the video display's height and width
+//& type : auto
+/**
+* @testcase                    ITc_player_get_video_size_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Gets the video display's height and width
+* @scenario                            Initialize player handle\n
+*                                              start player\n
+*                                              get video display's height and width\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_start, player_get_video_size, player_unprepare
+* @passcase                            When it can get video display's height and width
+* @failcase                            When it can not get video display's height and width
+* @precondition                        The player state must be PLAYER_STATE_PLAYING or PLAYER_STATE_PAUSED
+* @postcondition               N/A
+*/
+int ITc_player_get_video_size_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszVideoSizeMemLog = NULL;
+       char *pszVideoSizeSpeedLog = NULL;
+       int nVideoSizeFailCount = 0;
+       int nSupportFailCount = 0;
+       int nWidth;
+       int nHeight;
+       player_state_e state;
+#if MEMORY_CHECK
+       pszVideoSizeMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszVideoSizeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 1) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_video_size(g_player, &nWidth, &nHeight);
+               PlayerExecutionDelay(pszVideoSizeSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_video_size failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nVideoSizeFailCount++;
+               }
+               PlayerGetMemStatus(pszVideoSizeMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nVideoSizeFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_get_video_size failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nVideoSizeFailCount, MAX_COUNT);
+               FREE_MEMORY(pszVideoSizeMemLog, pszVideoSizeSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_get_video_size, pszVideoSizeSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_get_video_size, pszVideoSizeMemLog);
+#endif
+       FREE_MEMORY(pszVideoSizeMemLog, pszVideoSizeSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Gets the video stream information
+//& type : auto
+/**
+* @testcase                    ITc_player_get_video_stream_info_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Gets the video stream information
+* @scenario                            Initialize player handle\n
+*                                              start player\n
+*                                              get video stream info\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_start, player_get_video_stream_info, player_unprepare
+* @passcase                            When it can get video stream information
+* @failcase                            When it can not get video stream information
+* @precondition                        The player state must be PLAYER_STATE_PLAYING or PLAYER_STATE_PAUSED
+* @postcondition               N/A
+*/
+int ITc_player_get_video_stream_info_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszVideoInfoMemLog = NULL;
+       char *pszVideoInfoSpeedLog = NULL;
+       int nVideoInfoFailCount = 0;
+       int nSupportFailCount = 0;
+       int nFps;
+       int nBit_rate;
+       player_state_e state;
+#if MEMORY_CHECK
+       pszVideoInfoMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszVideoInfoSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 1) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_video_stream_info(g_player, &nFps, &nBit_rate);
+               PlayerExecutionDelay(pszVideoInfoSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_video_stream_info failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nVideoInfoFailCount++;
+               }
+               PlayerGetMemStatus(pszVideoInfoMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nVideoInfoFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_get_video_stream_info failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nVideoInfoFailCount, MAX_COUNT);
+               FREE_MEMORY(pszVideoInfoMemLog, pszVideoInfoSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_get_video_stream_info, pszVideoInfoSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_get_video_stream_info, pszVideoInfoMemLog);
+#endif
+       FREE_MEMORY(pszVideoInfoMemLog, pszVideoInfoSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when there is a change in the buffering status of a media stream
+//& type : auto
+/**
+* @testcase                    ITc_player_set_unset_buffering_cb_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Registers a callback function to be invoked when there is a change in the buffering status of a media stream
+* @scenario                            call player_set_buffering_cb\n
+*                                              check if callback is hit\n
+*                                              destroy the handler\n
+* @apicovered                  player_set_buffering_cb, player_unset_buffering_cb, player_prepare, player_unprepare, player_get_state, player_start, player_stop, player_set_uri
+* @passcase                            Callback is hit
+* @failcase                            Callback is not hit
+* @precondition                        NA
+* @postcondition               player_buffering_cb() will be invoked
+*/
+int ITc_player_set_unset_buffering_cb_p(void)
+{
+       START_TEST;
+       
+       bool bTelFeatureSupported = Player_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE);
+       bool bWifiFeatureSupported = Player_Check_System_Info_Feature_Supported(WIFI_FEATURE);
+       bool bEthFeatureSupported = Player_Check_System_Info_Feature_Supported(ETHERNET_FEATURE);
+       if ( !bTelFeatureSupported && !bWifiFeatureSupported && !bEthFeatureSupported)
+       {
+               FPRINTF("[Line: %d][%s] Network is not working. Skipping Test\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetBufferMemLog = NULL;
+       char *pszSetBufferSpeedLog = NULL;
+       char *pszUnsetBufferSpeedLog = NULL;
+       int nSetBufferFailCount = 0;
+       int nUnsetBufferFailCount = 0;
+       player_state_e state;
+       int nSupportFailCount = 0;
+       int nFailCount=0;
+       
+#if MEMORY_CHECK
+       pszSetUnsetBufferMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetBufferSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetBufferSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(false, 2) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               g_bPlayerBufferingCallback = false ;
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_buffering_cb(g_player, PlayerBufferingCallback, NULL);
+               PlayerExecutionDelay(pszSetBufferSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_buffering_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetBufferFailCount++;
+                       continue;
+               }
+               sleep(3);
+               nRetVal = player_prepare(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_prepare failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       continue;
+               }
+               if ( state != PLAYER_STATE_READY )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_prepare() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       continue;
+               }
+               sleep(3);
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerWaitForAsync();
+
+               if ( !g_bPlayerBufferingCallback )
+               {
+                       FPRINTF("[Line: %d][%s] player_buffering_cb failed on iteration = %d , error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount ++;
+               }
+               PlayerGetTimeOfDay();
+               nRetVal = player_unset_buffering_cb(g_player);
+               PlayerExecutionDelay(pszUnsetBufferSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_unset_buffering_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nUnsetBufferFailCount++;
+               }
+               PlayerGetMemStatus(pszSetUnsetBufferMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nSetBufferFailCount > 0 || nUnsetBufferFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times, player_set_buffering_cb failed %d times, player_unset_buffering_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetBufferFailCount, nUnsetBufferFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetUnsetBufferMemLog, pszSetBufferSpeedLog, pszUnsetBufferSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_buffering_cb, pszSetBufferSpeedLog);
+       PRINT_SPEED_LOG(player_unset_buffering_cb, pszUnsetBufferSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_setunset_buffering_cb, pszSetUnsetBufferMemLog);
+#endif
+       FREE_MEMORY(pszSetUnsetBufferMemLog, pszSetBufferSpeedLog, pszUnsetBufferSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when error occurred
+//& type : auto
+/**
+* @testcase                    ITc_player_set_unset_error_cb_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Registers a callback function to be invoked when error occurred
+* @scenario                            call player_set_error_cb\n
+*                                              check if callback is hit\n
+*                                              destroy the handler
+* @apicovered                  player_set_error_cb, player_unset_error_cb
+* @passcase                            Callback is hit
+* @failcase                            Callback is not hit
+* @precondition                        NA
+* @postcondition               player_error_cb() will be invoked
+*/
+int ITc_player_set_unset_error_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetErrorMemLog = NULL;
+       char *pszSetErrorSpeedLog = NULL;
+       char *pszUnsetErrorSpeedLog = NULL;
+       int nSetErrorFailCount = 0;
+       int nUnsetErrorFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetErrorMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetErrorSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetErrorSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_error_cb(g_player, PlayerErrorCallback, NULL);
+               PlayerExecutionDelay(pszSetErrorSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_error_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetErrorFailCount++;
+                       continue;
+               }
+
+               PlayerGetTimeOfDay();
+               nRetVal = player_unset_error_cb(g_player);
+               PlayerExecutionDelay(pszUnsetErrorSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_unset_error_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nUnsetErrorFailCount++;
+               }
+               PlayerGetMemStatus(pszSetUnsetErrorMemLog);
+       }
+       if ( nSetErrorFailCount > 0 || nUnsetErrorFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_set_error_cb failed %d times, player_unset_error_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetErrorFailCount, nUnsetErrorFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetUnsetErrorMemLog, pszSetErrorSpeedLog, pszUnsetErrorSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_error_cb, pszSetErrorSpeedLog);
+       PRINT_SPEED_LOG(player_unset_error_cb, pszUnsetErrorSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_setunset_error_cb, pszSetUnsetErrorMemLog);
+#endif
+       FREE_MEMORY(pszSetUnsetErrorMemLog, pszSetErrorSpeedLog, pszUnsetErrorSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when the playback is interrupted or the interrupt is completed
+//& type : auto
+/**
+* @testcase                    ITc_player_set_unset_interrupted_cb_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Registers a callback function to be invoked when the playback is interrupted or the interrupt is completed.
+* @scenario                            call player_set_interrupted_cb\n
+*                                              check if callback is hit\n
+*                                              destroy the handler
+* @apicovered                  player_set_interrupted_cb, player_unset_interrupted_cb, player_prepare, player_unprepare
+* @passcase                            Callback is hit
+* @failcase                            Callback is not hit
+* @precondition                        NA
+* @postcondition               player_interrupted_cb() will be invoked
+*/
+int ITc_player_set_unset_interrupted_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetInterruptMemLog = NULL;
+       char *pszSetInterruptSpeedLog = NULL;
+       char *pszUnsetInterruptSpeedLog = NULL;
+       int nSetInterruptFailCount = 0;
+       int nUnsetInterruptFailCount = 0;
+
+
+#if MEMORY_CHECK
+       pszSetUnsetInterruptMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetInterruptSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetInterruptSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_interrupted_cb(g_player, PlayerInterruptedCallback, NULL);
+               PlayerExecutionDelay(pszSetInterruptSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_interrupted_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetInterruptFailCount++;
+                       continue;
+               }
+               usleep(2000);
+               /** unable to generate required manual interruption for callback invocation, so ignoring callback hit check*/
+               PlayerGetTimeOfDay();
+               nRetVal = player_unset_interrupted_cb(g_player);
+               PlayerExecutionDelay(pszUnsetInterruptSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_unset_interrupted_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nUnsetInterruptFailCount++;
+               }
+               PlayerGetMemStatus(pszSetUnsetInterruptMemLog);
+       }
+       if ( nSetInterruptFailCount > 0 || nUnsetInterruptFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_set_interrupted_cb failed %d times, player_unset_interrupted_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetInterruptFailCount, nUnsetInterruptFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetUnsetInterruptMemLog, pszSetInterruptSpeedLog, pszUnsetInterruptSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_interrupted_cb, pszSetInterruptSpeedLog);
+       PRINT_SPEED_LOG(player_unset_interrupted_cb, pszUnsetInterruptSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_setunset_interrupted_cb, pszSetUnsetInterruptMemLog);
+#endif
+       FREE_MEMORY(pszSetUnsetInterruptMemLog, pszSetInterruptSpeedLog, pszUnsetInterruptSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when subtitle is updated
+//& type : auto
+/**
+* @testcase                    ITc_player_set_unset_subtitle_updated_cb_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Registers a callback function to be invoked when subtitle is updated
+* @scenario                            call player_set_subtitle_updated_cb\n
+*                                              check if callback is hit\n
+*                                              destroy the handler
+* @apicovered                  player_set_subtitle_updated_cb, player_set_subtitle_path, player_unset_subtitle_updated_cb, player_prepare, player_unprepare, player_set_display, player_start, player_get_state, player_stop
+* @passcase                            Callback is hit
+* @failcase                            Callback is not hit
+* @precondition                        The subtitle must be set by player_set_subtitle_path()
+* @postcondition               player_subtitle_updated_cb() will be invoked
+*/
+int ITc_player_set_unset_subtitle_updated_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetSubMemLog = NULL;
+       char *pszSetSubSpeedLog = NULL;
+       char *pszUnsetSubSpeedLog = NULL;
+       int nSetSubFailCount = 0;
+       int nUnsetSubFailCount = 0;
+       int nFailCount = 0;
+       int nSupportFailCount = 0;
+       player_state_e state;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == PlayerAppendToAppDataPath(MEDIA_PATH_SUBTITLE, pPath))
+       {
+               FPRINTF("[Line: %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszSetUnsetSubMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSubSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSubSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bPlayerSubtitleUpdatedCallback = false;
+               if ( InitializePlayerHandler(false, 1) == false )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+               nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_display failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       continue;
+               }
+               nRetVal = player_set_subtitle_path(g_player, pPath);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_subtitle_path failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       continue;
+               }
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_subtitle_updated_cb(g_player, PlayerSubtitleUpdatedCallback, NULL);
+               PlayerExecutionDelay(pszSetSubSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_subtitle_updated_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetSubFailCount++;
+                       continue;
+               }
+               nRetVal = player_prepare(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_prepare failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       continue;
+               }
+               else if ( state != PLAYER_STATE_READY )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_prepare() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       continue;
+               }
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               else if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerWaitForAsync();
+
+               if ( !g_bPlayerSubtitleUpdatedCallback )
+               {
+                       FPRINTF("[Line: %d][%s] player_subtitle_updated_cb failed on iteration = %d , error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount ++;
+               }
+               PlayerGetTimeOfDay();
+               nRetVal = player_unset_subtitle_updated_cb(g_player);
+               PlayerExecutionDelay(pszUnsetSubSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_unset_subtitle_updated_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nUnsetSubFailCount++;
+               }
+               PlayerGetMemStatus(pszSetUnsetSubMemLog);
+               player_unprepare(g_player);
+       }
+
+       if ( nSetSubFailCount > 0 || nUnsetSubFailCount > 0 || nFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times, player_set_subtitle_updated_cb failed %d times, player_unset_subtitle_updated_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetSubFailCount, nUnsetSubFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetUnsetSubMemLog, pszSetSubSpeedLog, pszUnsetSubSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_subtitle_updated_cb, pszSetSubSpeedLog);
+       PRINT_SPEED_LOG(player_unset_subtitle_updated_cb, pszUnsetSubSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_setunset_subtitle_updated_cb, pszSetUnsetSubMemLog);
+#endif
+       FREE_MEMORY(pszSetUnsetSubMemLog, pszSetSubSpeedLog, pszUnsetSubSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Gets the status of progressive download
+//& type: auto
+/**
+* @testcase                    ITc_player_get_progressive_download_status_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Gets the status of progressive download
+* @scenario                            Initialize player handle\n
+*                                              set progressive download path\n
+*                                              prepare the player\n
+*                                              start the player\n
+*                                              get progressive download status\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_set_uri, player_prepare, player_set_progressive_download_path, player_get_progressive_download_status, player_unprepare
+* @passcase                            When it set progressive download path and get progressive download status
+* @failcase                            When it does not set progressive download path or get progressive download status
+* @precondition                        The player state must be one of these: PLAYER_STATE_PLAYING or PLAYER_STATE_PAUSED
+* @postcondition               N/A
+*/
+int ITc_player_get_progressive_download_status_p(void)
+{
+       START_TEST;
+       
+       bool bTelFeatureSupported = Player_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE);
+       bool bWifiFeatureSupported = Player_Check_System_Info_Feature_Supported(WIFI_FEATURE);
+       bool bEthFeatureSupported = Player_Check_System_Info_Feature_Supported(ETHERNET_FEATURE);
+       if ( !bTelFeatureSupported && !bWifiFeatureSupported && !bEthFeatureSupported)
+       {
+               FPRINTF("[Line: %d][%s] Network is not working. Skipping Test\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszGetStatusMemLog = NULL;
+       char *pszSetPathSpeedLog = NULL;
+       char *pszGetStatusSpeedLog = NULL;
+       int nSetPathFailCount = 0;
+       int nGetStatusFailCount = 0;
+       int nSupportFailCount = 0;
+       unsigned long ulCurrent;
+       unsigned long ulTotal_size;
+       player_state_e state;
+       char pPath[PATH_LEN] = {0,};
+       
+       if ( false == PlayerAppendToAppDataPath(DOWNLOAD_DESTINATION, pPath))
+       {
+               FPRINTF("[Line: %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_display failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       char pstrValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if (true == GetValueFromConfigFile("PLAYER_DOWNLOAD_PROGRESS_URL", pstrValue))
+       {
+       #if DEBUG
+                       FPRINTF("[Line: %d][%s] Values Received = %s\\n", __LINE__, API_NAMESPACE, pstrValue);
+       #endif
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] GetValueFromConfigFile returned error\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRetVal = player_set_uri(g_player, pstrValue);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_uri failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszGetStatusMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetPathSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetStatusSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_progressive_download_path(g_player,pPath);
+               PlayerExecutionDelay(pszSetPathSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_progressive_download_path failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetPathFailCount++;
+                       continue;
+               }
+
+               sleep(3);
+               nRetVal = player_prepare(g_player);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_prepare failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               sleep(3);
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_progressive_download_status(g_player, &ulCurrent, &ulTotal_size);
+               PlayerExecutionDelay(pszGetStatusSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_progressive_download_status failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nGetStatusFailCount++;
+               }
+               PlayerGetMemStatus(pszGetStatusMemLog);
+
+               sleep(20);
+               player_unprepare(g_player);
+       }
+
+       if ( nSetPathFailCount > 0 || nGetStatusFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times, player_set_progressive_download_path failed %d times, player_get_progressive_download_status failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetPathFailCount, nGetStatusFailCount, MAX_COUNT);
+               FREE_MEMORY(pszGetStatusMemLog, pszSetPathSpeedLog, pszGetStatusSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_progressive_download_path, pszSetPathSpeedLog);
+       PRINT_SPEED_LOG(player_get_progressive_download_status, pszGetStatusSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_get_progressive_download_status, pszGetStatusMemLog);
+#endif
+       FREE_MEMORY(pszGetStatusMemLog, pszSetPathSpeedLog, pszGetStatusSpeedLog, NULL, NULL);
+
+       return 0;
+}
+
+//& purpose: Gets the download progress for streaming playback
+//& type: auto
+/**
+* @testcase                    ITc_player_get_streaming_download_progress_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Gets the download progress for streaming playback
+* @scenario                            Initialize player handle\n
+*                                              set progressive download path\n
+*                                              prepare the player\n
+*                                              start the player\n
+*                                              get download progress for streaming playback\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_set_uri, player_prepare, player_set_progressive_download_path, player_get_streaming_download_progress, player_unprepare
+* @passcase                            When it set progressive download path and get download progress for streaming playback
+* @failcase                            When it does not set progressive download path or get download progress for streaming playback
+* @precondition                        The player state must be one of these: PLAYER_STATE_PLAYING or PLAYER_STATE_PAUSED
+* @postcondition               N/A
+*/
+int ITc_player_get_streaming_download_progress_p(void)
+{
+       START_TEST;
+       
+       bool bTelFeatureSupported = Player_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE);
+       bool bWifiFeatureSupported = Player_Check_System_Info_Feature_Supported(WIFI_FEATURE);
+       bool bEthFeatureSupported = Player_Check_System_Info_Feature_Supported(ETHERNET_FEATURE);
+       if ( !bTelFeatureSupported && !bWifiFeatureSupported && !bEthFeatureSupported)
+       {
+               FPRINTF("[Line: %d][%s] Network is not working. Skipping Test\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszGetProgressMemLog = NULL;
+       char *pszSetPathSpeedLog = NULL;
+       char *pszGetProgressSpeedLog = NULL;
+       int nSetPathFailCount = 0;
+       int nGetProgressFailCount = 0;
+       int nSupportFailCount = 0;
+       int nStart, nCurrent;
+       player_state_e state;
+       
+       char pPath[PATH_LEN] = {0,};
+       if ( false == PlayerAppendToAppDataPath(DOWNLOAD_DESTINATION, pPath))
+       {
+               FPRINTF("[Line: %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_display failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       char pstrValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if (true == GetValueFromConfigFile("PLAYER_DOWNLOAD_PROGRESS_URL", pstrValue))
+       {
+       #if DEBUG
+                       FPRINTF("[Line: %d][%s] Values Received = %s\\n", __LINE__, API_NAMESPACE, pstrValue);
+       #endif
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] GetValueFromConfigFile returned error\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRetVal = player_set_uri(g_player, pstrValue);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_uri failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszGetProgressMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetPathSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetProgressSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_progressive_download_path(g_player,pPath);
+               PlayerExecutionDelay(pszSetPathSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_progressive_download_path failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetPathFailCount++;
+                       continue;
+               }
+
+               sleep(3);
+               nRetVal = player_prepare(g_player);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_prepare failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               sleep(3);
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_streaming_download_progress(g_player, &nStart, &nCurrent);
+               PlayerExecutionDelay(pszGetProgressSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_progressive_download_status failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nGetProgressFailCount++;
+               }
+               PlayerGetMemStatus(pszGetProgressMemLog);
+
+               sleep(20);
+               player_unprepare(g_player);
+       }
+
+       if ( nSetPathFailCount > 0 || nGetProgressFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_set_progressive_download_path failed %d times, player_get_streaming_download_progress failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetPathFailCount, nGetProgressFailCount, MAX_COUNT);
+               FREE_MEMORY(pszGetProgressMemLog, pszSetPathSpeedLog, pszGetProgressSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_progressive_download_path, pszSetPathSpeedLog);
+       PRINT_SPEED_LOG(player_get_streaming_download_progress, pszGetProgressSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_get_streaming_download_progress, pszGetProgressMemLog);
+#endif
+       FREE_MEMORY(pszGetProgressMemLog, pszSetPathSpeedLog, pszGetProgressSpeedLog, NULL, NULL);
+
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when progressive download is started or completed
+//& type : auto
+/**
+* @testcase                    ITc_player_set_unset_progressive_download_message_cb_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Registers a callback function to be invoked when progressive download is started or completed
+* @scenario                            call player_set_progressive_download_message_cb\n
+*                                              check if callback is hit\n
+*                                              destroy the handler
+* @apicovered                  player_set_progressive_download_path, player_set_progressive_download_message_cb, player_prepare, player_unprepare ,player_set_display, player_set_uri, player_start, player_stop, player_get_state
+* @passcase                            Callback is hit
+* @failcase                            Callback is not hit
+* @precondition                        The path to download must be set by player_set_progressive_download_path()
+* @postcondition               player_pd_message_cb() will be invoked
+*/
+int ITc_player_set_unset_progressive_download_message_cb_p(void)
+{
+       START_TEST;
+       
+       bool bTelFeatureSupported = Player_Check_System_Info_Feature_Supported(TELEPHONY_FEATURE);
+       bool bWifiFeatureSupported = Player_Check_System_Info_Feature_Supported(WIFI_FEATURE);
+       bool bEthFeatureSupported = Player_Check_System_Info_Feature_Supported(ETHERNET_FEATURE);
+       if ( !bTelFeatureSupported && !bWifiFeatureSupported && !bEthFeatureSupported)
+       {
+               FPRINTF("[Line: %d][%s] Network is not working. Skipping Test\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetMsgMemLog = NULL;
+       char *pszSetMsgSpeedLog = NULL;
+       char *pszUnsetmsgSpeedLog = NULL;
+       int nSetPathFailCount = 0;
+       int nSetMsgFailCount = 0;
+       int nUnsetMsgFailCount = 0;
+       int nFailCount = 0;
+       int nSupportFailCount = 0;
+       player_state_e state;
+       
+       char pPath[PATH_LEN] = {0,};
+       if ( false == PlayerAppendToAppDataPath(DOWNLOAD_DESTINATION, pPath))
+       {
+               FPRINTF("[Line: %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_display failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       char pstrValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if ( true == GetValueFromConfigFile("PLAYER_DOWNLOAD_PROGRESS_URL", pstrValue) )
+       {
+       #if DEBUG
+                       FPRINTF("[Line: %d][%s] Values Received = %s\\n", __LINE__, API_NAMESPACE, pstrValue);
+       #endif
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] GetValueFromConfigFile returned error\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRetVal = player_set_uri(g_player, pstrValue);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_uri failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+
+
+#if MEMORY_CHECK
+       pszSetUnsetMsgMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetMsgSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetmsgSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(false, 2) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               nRetVal = player_set_progressive_download_path(g_player, pPath);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_progressive_download_path failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetPathFailCount++;
+                       continue;
+               }
+
+               g_bPlayerPdMessageCallback = false;
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_progressive_download_message_cb(g_player, PlayerPdMessageCallback, NULL);
+               PlayerExecutionDelay(pszSetMsgSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_progressive_download_message_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetMsgFailCount++;
+                       continue;
+               }
+
+               sleep(3);
+               nRetVal = player_prepare(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_prepare failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       continue;
+               }
+               if (state != PLAYER_STATE_READY)
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_prepare() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               sleep(3);
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerWaitForAsync();
+
+               if (!g_bPlayerPdMessageCallback)
+               {
+                       FPRINTF("[Line: %d][%s] player_pd_message_cb failed on iteration = %d , error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount ++;
+               }
+
+               PlayerGetTimeOfDay();
+               nRetVal = player_unset_progressive_download_message_cb(g_player);
+               PlayerExecutionDelay(pszUnsetmsgSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_unset_progressive_download_message_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nUnsetMsgFailCount++;
+               }
+               PlayerGetMemStatus(pszSetUnsetMsgMemLog);
+
+               sleep(20);
+               player_unprepare(g_player);
+       }
+
+       if ( nSetPathFailCount > 0 || nSetMsgFailCount > 0 || nUnsetMsgFailCount > 0 || nFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_set_progressive_download_path failed %d times, player_set_progressive_download_message_cb failed %d times, player_unset_progressive_download_message_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetPathFailCount, nSetMsgFailCount, nUnsetMsgFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetUnsetMsgMemLog, pszSetMsgSpeedLog, pszUnsetmsgSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_progressive_download_message_cb, pszSetMsgSpeedLog);
+       PRINT_SPEED_LOG(player_unset_progressive_download_message_cb, pszUnsetmsgSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_setunset_progressive_download_message_cb, pszSetUnsetMsgMemLog);
+#endif
+
+       FREE_MEMORY(pszSetUnsetMsgMemLog, pszSetMsgSpeedLog, pszUnsetmsgSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Gets the media content information
+//& type : auto
+/**
+* @testcase                    ITc_player_get_content_info_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Gets the media content information
+* @scenario                            initilize player\n
+*                                              call player_get_content_info\n
+*                                              destroy the handler
+* @apicovered                  player_start, player_get_content_info, player_unprepare ,player_stop, player_prepare, player_set_uri, player_get_state
+* @passcase                            If it gets the media content information successfully
+* @failcase                            If it does not gets the media content information successfully
+* @precondition                        The player state must be one of: PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED
+* @postcondition               NA
+*/
+int ITc_player_get_content_info_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszContentInfoMemLog = NULL;
+       char *pszContentInfoSpeedLog = NULL;
+       int nContAlbumFailCount = 0;
+       int nContArtistFailCount = 0;
+       int nContAuthorFailCount = 0;
+       int nContGenreFailCount = 0;
+       int nContTitleFailCount = 0;
+       int nContYearFailCount = 0;
+       int nSupportFailCount = 0;
+       char *pszValue;
+       player_state_e state;
+#if MEMORY_CHECK
+       pszContentInfoMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszContentInfoSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 0) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_content_info(g_player, PLAYER_CONTENT_INFO_ALBUM, &pszValue);
+               PlayerExecutionDelay(pszContentInfoSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_content_info as album failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nContAlbumFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               nRetVal = player_get_content_info(g_player, PLAYER_CONTENT_INFO_ARTIST, &pszValue);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_content_info as artist failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nContArtistFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               nRetVal = player_get_content_info(g_player, PLAYER_CONTENT_INFO_AUTHOR, &pszValue);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_content_info as author failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nContAuthorFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               nRetVal = player_get_content_info(g_player, PLAYER_CONTENT_INFO_GENRE, &pszValue);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_content_info as album as genre failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nContGenreFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               nRetVal = player_get_content_info(g_player, PLAYER_CONTENT_INFO_TITLE, &pszValue);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_content_info as title failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nContTitleFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               nRetVal = player_get_content_info(g_player, PLAYER_CONTENT_INFO_YEAR, &pszValue);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_content_info as year failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nContYearFailCount++;
+               }
+               PlayerGetMemStatus(pszContentInfoMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nContAlbumFailCount > 0 || nContArtistFailCount > 0 || nContAuthorFailCount > 0 || nContGenreFailCount > 0 || nContTitleFailCount > 0 || nContYearFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_get_content_info as album failed %d times, player_get_content_info as artist failed %d times, player_get_content_info as author failed %d times, player_get_content_info as genre failed %d times, player_get_content_info as title failed %d times, player_get_content_info as year failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nContAlbumFailCount, nContArtistFailCount, nContAuthorFailCount, nContGenreFailCount, nContTitleFailCount, nContYearFailCount, MAX_COUNT);
+               FREE_MEMORY(pszContentInfoMemLog, pszContentInfoSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_get_content_info, pszContentInfoSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_get_content_info, pszContentInfoMemLog);
+#endif
+       FREE_MEMORY(pszContentInfoMemLog, pszContentInfoSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Sets memory as the data source
+//& type : auto
+/**
+* @testcase                    ITc_player_set_memory_buffer_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Sets memory as the data source
+* @scenario                            call player_set_memory_buffer\n
+*                                              destroy the handler
+* @apicovered                  player_set_memory_buffer, player_prepare, player_unprepare
+* @passcase                            If it sets memory buffer successfully
+* @failcase                            If it does not sets memory buffer successfully
+* @precondition                        The player state should be PLAYER_STATE_IDLE by player_create() or player_unprepare()
+* @postcondition               NA
+*/
+int ITc_player_set_memory_buffer_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetBufferMemLog = NULL;
+       char *pszSetBufferSpeedLog = NULL;
+       int nSetMemBufferFailCount = 0;
+       int nSupportFailCount = 0;
+       player_state_e state;
+       GMappedFile* file;
+       gsize file_size;
+       guint8* g_media_mem = NULL;
+
+       char pPath[PATH_LEN] = {0,};
+       if ( false == PlayerAppendToAppDataPath(MEDIA_PATH_VIDEO, pPath))
+       {
+               FPRINTF("[Line: %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       file = g_mapped_file_new (pPath, FALSE,NULL);
+       file_size = g_mapped_file_get_length (file);
+       g_media_mem = (guint8 *) g_mapped_file_get_contents (file);
+#if MEMORY_CHECK
+       pszSetBufferMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetBufferSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_memory_buffer(g_player, (void*)g_media_mem ,file_size);
+               PlayerExecutionDelay(pszSetBufferSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_memory_buffer failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetMemBufferFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               player_prepare(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( state != PLAYER_STATE_READY )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_prepare() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+               }
+               PlayerGetMemStatus(pszSetBufferMemLog);
+       }
+       if ( nSetMemBufferFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_state doed not changed %d times, player_set_memory_buffer failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetMemBufferFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetBufferMemLog, pszSetBufferSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_memory_buffer, pszSetBufferSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_set_memory_buffer, pszSetBufferMemLog);
+#endif
+       FREE_MEMORY(pszSetBufferMemLog, pszSetBufferSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+
+//& purpose: set and get the audio latency mode
+//& type : auto
+/**
+* @testcase                    ITc_player_set_get_audio_latency_mode_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Set and get the audio latency mode
+* @scenario                            Create a handle for player\n
+*                                              Set audio latency mode\n
+*                                              get audio latency mode\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_set_audio_latency_mode, player_get_audio_latency_mode
+* @passcase                            When it can get audio latency mode
+* @failcase                            When it can not get audio latency mode
+* @precondition                        N/A
+* @postcondition               N/A
+*/
+int ITc_player_set_get_audio_latency_mode_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetGetLatencyMemLog = NULL;
+       char *pszSetLatencySpeedLog = NULL;
+       char *pszGetLatencySpeedLog = NULL;
+       int nSetLatencyFailCount = 0;
+       int nGetLatencyFailCount = 0;
+       int nSupportFailCount = 0;
+       int nMismatchCount = 0;
+       audio_latency_mode_e eLatencyMode ;
+#if MEMORY_CHECK
+       pszSetGetLatencyMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetLatencySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetLatencySpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_audio_latency_mode(g_player, AUDIO_LATENCY_MODE_LOW);
+               PlayerExecutionDelay(pszSetLatencySpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_audio_latency_mode failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetLatencyFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_audio_latency_mode(g_player, &eLatencyMode);
+               PlayerExecutionDelay(pszGetLatencySpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_audio_latency_mode failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nGetLatencyFailCount++;
+                       continue;
+               }
+               if (eLatencyMode != AUDIO_LATENCY_MODE_LOW)
+               {
+                       FPRINTF("[Line: %d][%s] player_set_get_audio_latency_mode mismatched %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nMismatchCount++;
+               }
+               PlayerGetMemStatus(pszSetGetLatencyMemLog);
+       }
+       if ( nSetLatencyFailCount > 0 || nGetLatencyFailCount > 0 || nSupportFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_set_audio_latency_mode failed %d times, player_get_audio_latency_mode failed %d times player_set_get_audio_latency_mode mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetLatencyFailCount, nSetLatencyFailCount, nMismatchCount, MAX_COUNT);
+               FREE_MEMORY(pszSetGetLatencyMemLog, pszSetLatencySpeedLog, pszGetLatencySpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_audio_latency_mode, pszSetLatencySpeedLog);
+       PRINT_SPEED_LOG(player_get_audio_latency_mode, pszGetLatencySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_audio_effect_setgetvalue_3d, pszSetGetLatencyMemLog);
+#endif
+       FREE_MEMORY(pszSetGetLatencyMemLog, pszSetLatencySpeedLog, pszGetLatencySpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Set and get video display mode
+//& type : auto
+/**
+* @testcase                    ITc_player_set_get_display_mode_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Set and get video display mode
+* @scenario                            Initialize player handle\n
+*                                              set display mode\n
+*                                              get display mode\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_set_display_mode, player_get_display_mode
+* @passcase                            When it can set and get player position
+* @failcase                            When it can not set or get player position
+* @precondition                        The player state must be one of these: PLAYER_STATE_READY, PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED
+* @postcondition               N/A
+*/
+int ITc_player_set_get_display_mode_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetGetDisplayModeMemLog = NULL;
+       char *pszSetDisplayModeSpeedLog = NULL;
+       char *pszGetDisplayModeSpeedLog = NULL;
+       int nSetDisplayModeFailCount = 0;
+       int nGetDisplayModeFailCount = 0;
+       int nMismatchCount = 0;
+       int nSupportFailCount = 0;
+       player_display_mode_e mode ;
+
+#if MEMORY_CHECK
+       pszSetGetDisplayModeMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetDisplayModeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetDisplayModeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 0) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_display_mode(g_player, PLAYER_DISPLAY_MODE_DST_ROI);
+               PlayerExecutionDelay(pszSetDisplayModeSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_display_mode failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetDisplayModeFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               usleep(2000);
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_display_mode(g_player, &mode);
+               PlayerExecutionDelay(pszGetDisplayModeSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_display_mode failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nGetDisplayModeFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if (mode != PLAYER_DISPLAY_MODE_DST_ROI)
+               {
+                       FPRINTF("[Line: %d][%s] player_set_get_display_mode mismatched %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nMismatchCount++;
+               }
+               PlayerGetMemStatus(pszSetGetDisplayModeMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nSetDisplayModeFailCount > 0 || nGetDisplayModeFailCount > 0 || nMismatchCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times, player_set_display_mode failed %d times, player_get_display_mode failed %d times player_set_get_display_mode mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetDisplayModeFailCount, nGetDisplayModeFailCount, nMismatchCount, MAX_COUNT);
+               FREE_MEMORY(pszSetGetDisplayModeMemLog, pszSetDisplayModeSpeedLog, pszGetDisplayModeSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_display_mode, pszSetDisplayModeSpeedLog);
+       PRINT_SPEED_LOG(player_get_display_mode, pszGetDisplayModeSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_set_get_display_mode, pszSetGetDisplayModeMemLog);
+#endif
+       FREE_MEMORY(pszSetGetDisplayModeMemLog, pszSetDisplayModeSpeedLog, pszGetDisplayModeSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Gets the total running time of the associated media
+//& type : auto
+/**
+* @testcase                    ITc_player_get_duration_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Gets the total running time of the associated media
+* @scenario                            Initialize player handle\n
+*                                              start player\n
+*                                              get player duration\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_start, player_get_duration, player_unprepare
+* @passcase                            When it can get player duration
+* @failcase                            When it can not get player duration
+* @precondition                        The player state must be PLAYER_STATE_PLAYING
+* @postcondition               N/A
+*/
+int ITc_player_get_duration_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszGetDurMemLog = NULL;
+       char *pszGetDurSpeedLog = NULL;
+       int nGetDurFailCount = 0;
+       int nSupportFailCount = 0;
+       int nDuration = -1;
+       player_state_e state;
+#if MEMORY_CHECK
+       pszGetDurMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszGetDurSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 1) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_duration(g_player, &nDuration);
+               FPRINTF("[Line: %d][%s] Media file duration = %d\\n", __LINE__, API_NAMESPACE, nDuration);
+               PlayerExecutionDelay(pszGetDurSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_duration failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nGetDurFailCount++;
+               }
+               PlayerGetMemStatus(pszGetDurMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nGetDurFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_get_duration failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nGetDurFailCount, MAX_COUNT);
+               FREE_MEMORY(pszGetDurMemLog, pszGetDurSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_get_duration, pszGetDurSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_get_duration, pszGetDurMemLog);
+#endif
+       FREE_MEMORY(pszGetDurMemLog, pszGetDurSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: set and get the player's volume
+//& type : auto
+/**
+* @testcase                    ITc_player_set_get_volume_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Set and get the player's volume
+* @scenario                            Initialize player handle\n
+*                                              set volume\n
+*                                              get volume\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_set_volume, player_get_volume
+* @passcase                            When it can get volume
+* @failcase                            When it can not get volume
+* @precondition                        N/A
+* @postcondition               N/A
+*/
+int ITc_player_set_get_volume_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetGetVolMemLog = NULL;
+       char *pszSetVolSpeedLog = NULL;
+       char *pszGetVolSpeedLog = NULL;
+       int nSetVolFailCount = 0;
+       int nGetVolFailCount = 0;
+       int nSupportFailCount = 0;
+       int nMismatchCount = 0;
+       float fSetLeft = 0.4;
+       float fSetRight = 0.4;
+       float fGetLeft = -1.0;
+       float fGetRight = -1.0;
+#if MEMORY_CHECK
+       pszSetGetVolMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetVolSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetVolSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 0) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_volume(g_player, fSetLeft, fSetRight);
+               PlayerExecutionDelay(pszSetVolSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_volume failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetVolFailCount++;
+                       continue;
+               }
+               FPRINTF("[Line: %d][%s] player_set_volume, left value = %f, right value = %f\\n", __LINE__, API_NAMESPACE, fSetLeft, fSetRight);
+
+               usleep(2000);
+               PlayerGetTimeOfDay();
+               nRetVal = player_get_volume(g_player, &fGetLeft, &fGetRight);
+               PlayerExecutionDelay(pszGetVolSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_get_volume failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nGetVolFailCount++;
+                       continue;
+               }
+               FPRINTF("[Line: %d][%s] player_get_volume, left value = %f, right value = %f\\n", __LINE__, API_NAMESPACE, fGetLeft, fGetRight);
+               if (fGetLeft != fSetLeft || fGetRight != fSetRight)
+               {
+                       FPRINTF("[Line: %d][%s] player_set_get_volume mismatched %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nMismatchCount++;
+               }
+               PlayerGetMemStatus(pszSetGetVolMemLog);
+       }
+       if ( nSetVolFailCount > 0 || nGetVolFailCount > 0 || nSupportFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_set_volume failed %d times, player_get_volume failed %d times, player_set_get_volume mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetVolFailCount, nGetVolFailCount, nMismatchCount, MAX_COUNT);
+               FREE_MEMORY(pszSetGetVolMemLog, pszSetVolSpeedLog, pszGetVolSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_volume, pszSetVolSpeedLog);
+       PRINT_SPEED_LOG(player_get_volume, pszGetVolSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_set_get_volume, pszSetGetVolMemLog);
+#endif
+       FREE_MEMORY(pszSetGetVolMemLog, pszSetVolSpeedLog, pszGetVolSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Sets the player's looping status
+//& type : auto
+/**
+* @testcase                    ITc_player_set_looping_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Sets the player's looping status
+* @scenario                            Initialize player handle\n
+*                                              prepare player\n
+*                                              set player looping\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_set_looping, player_is_looping, player_unprepare
+* @passcase                            When it can set player looping
+* @failcase                            When it can not set player looping
+* @precondition                        The player state must be one of these: PLAYER_STATE_READY, PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED
+* @postcondition               N/A
+*/
+int ITc_player_set_looping_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetLoopMemLog = NULL;
+       char *pszSetloopSpeedLog = NULL;
+       char *pszIsLoopSpeedLog = NULL;
+       int nSetLoopFailCount = 0;
+       int nIsLoopFailCount = 0;
+       int nMismatchCount = 0;
+       int nSupportFailCount = 0;
+       bool bIsLooping;
+       player_state_e state;
+#if MEMORY_CHECK
+       pszSetLoopMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetloopSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszIsLoopSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 0) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_looping(g_player, true);
+               PlayerExecutionDelay(pszSetloopSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_set_looping failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nLoopCount, PlayerGetError(nRetVal));
+                       nSetLoopFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               PlayerGetTimeOfDay();
+               nRetVal = player_is_looping(g_player, &bIsLooping);
+               PlayerExecutionDelay(pszIsLoopSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_is_looping failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nIsLoopFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( bIsLooping != true )
+               {
+                       FPRINTF("[Line: %d][%s] player_is_looping false %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nMismatchCount++;
+               }
+               PlayerGetMemStatus(pszSetLoopMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nSetLoopFailCount > 0 || nIsLoopFailCount > 0 || nMismatchCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_set_looping failed %d times, player_is_looping failed %d times, player_is_looping false %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetLoopFailCount, nIsLoopFailCount, nMismatchCount, MAX_COUNT);
+               FREE_MEMORY(pszSetLoopMemLog, pszSetloopSpeedLog, pszIsLoopSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_looping, pszSetloopSpeedLog);
+       PRINT_SPEED_LOG(player_is_looping, pszIsLoopSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_set_looping, pszSetLoopMemLog);
+#endif
+       FREE_MEMORY(pszSetLoopMemLog, pszSetloopSpeedLog, pszIsLoopSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Sets the player's mute status
+//& type : auto
+/**
+* @testcase                    ITc_player_set_mute_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Sets the player's mute status
+* @scenario                            Initialize player handle\n
+*                                              set player mute\n
+*                                              check player mute\n
+*                                              destroy the handler
+* @apicovered                  player_set_mute, player_is_muted, player_unprepare ,player_start, player_stop, player_prepare, player_get_state, player_set_uri
+* @passcase                            When it can set player mute
+* @failcase                            When it can not set player mute
+* @precondition                        The player state must be one of these: PLAYER_STATE_READY, PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED
+* @postcondition               N/A
+*/
+int ITc_player_set_mute_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetMuteMemLog = NULL;
+       char *pszSetMuteSpeedLog = NULL;
+       char *pszIsMuteSpeedLog = NULL;
+       int nSetMuteFailCount = 0;
+       int nIsMuteFailCount = 0;
+       int nMismatchCount = 0;
+       int nSupportFailCount =0;
+       bool bIsMuted = true;
+       player_state_e state;
+#if MEMORY_CHECK
+       pszSetMuteMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetMuteSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszIsMuteSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 0) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_mute(g_player, true);
+               PlayerExecutionDelay(pszSetMuteSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_mute failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetMuteFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               
+               PlayerGetTimeOfDay();
+               nRetVal = player_is_muted(g_player, &bIsMuted);
+               PlayerExecutionDelay(pszIsMuteSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_is_muted failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nIsMuteFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if (bIsMuted != true )
+               {
+                       FPRINTF("[Line: %d][%s] player_is_muted false %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nMismatchCount++;
+               }
+               PlayerGetMemStatus(pszSetMuteMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nSetMuteFailCount > 0 || nIsMuteFailCount > 0 || nMismatchCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_set_mute failed %d times, player_is_muted failed %d times, player_is_muted false %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetMuteFailCount, nIsMuteFailCount, nMismatchCount, MAX_COUNT);
+               FREE_MEMORY(pszSetMuteMemLog, pszSetMuteSpeedLog, pszIsMuteSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_mute, pszSetMuteSpeedLog);
+       PRINT_SPEED_LOG(player_is_muted, pszIsMuteSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_set_mute, pszSetMuteMemLog);
+#endif
+       FREE_MEMORY(pszSetMuteMemLog, pszSetMuteSpeedLog, pszIsMuteSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: pause playback
+//& type : auto
+/**
+* @testcase                    ITc_player_pause_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 pause playback
+* @scenario                            Initialize player handle\n
+*                                              start player\n
+*                                              pause player\n
+*                                              check the result\n
+*                                              stop the player\n
+*                                              destroy the handler
+* @apicovered                  player_start, player_pause, player_stop, player_unprepare
+* @passcase                            When it can stop player
+* @failcase                            When it can not stop player
+* @precondition                        the player state should be PLAYER_STATE_PLAYING
+* @postcondition               N/A
+*/
+int ITc_player_pause_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszPauseMemLog = NULL;
+       char *pszPauseSpeedLog = NULL;
+       char *pszStopSpeedLog = NULL;
+       int nPauseFailCount = 0;
+       int nStopFailCount = 0;
+       int nSupportFailCount = 0;
+       player_state_e state;
+
+       nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_display failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+               return 1;
+       }
+       sleep(2);
+
+#if MEMORY_CHECK
+       pszPauseMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszPauseSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszStopSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 1) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               sleep(4);
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_pause(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               PlayerExecutionDelay(pszPauseSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_pause failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nPauseFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PAUSED )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_pause() call", __LINE__, API_NAMESPACE);
+                       nPauseFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerGetTimeOfDay();
+               nRetVal = player_stop(g_player);
+               PlayerExecutionDelay(pszStopSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_stop failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nStopFailCount++;
+               }
+               PlayerGetMemStatus(pszPauseMemLog);
+               player_unprepare(g_player);
+       }
+
+       if ( nPauseFailCount > 0 || nStopFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_pause failed %d times, player_stop failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nPauseFailCount, nStopFailCount, MAX_COUNT);
+               FREE_MEMORY(pszPauseMemLog, pszPauseSpeedLog, pszStopSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_pause, pszPauseSpeedLog);
+       PRINT_SPEED_LOG(player_stop, pszStopSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_pause, pszPauseMemLog);
+#endif
+       FREE_MEMORY(pszPauseMemLog, pszPauseSpeedLog, pszStopSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Sets the playback rate
+//& type : auto
+/**
+* @testcase                    ITc_player_set_playback_rate_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Sets the playback rate
+* @scenario                            Initialize player handle\n
+*                                              start player\n
+*                                              set playback rate\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_start, player_set_playback_rate, player_unprepare
+* @passcase                            When it can set playback rate
+* @failcase                            When it can not set playback rate
+* @precondition                        The player state must be PLAYER_STATE_PLAYING
+* @postcondition               N/A
+*/
+int ITc_player_set_playback_rate_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszRateMemLog = NULL;
+       char *pszRateSpeedLog = NULL;
+       int nRateFailCount = 0;
+       int nSupportFailCount = 0;
+       float fRate = 1.5;
+       player_state_e state;
+#if MEMORY_CHECK
+       pszRateMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszRateSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(true, 0) != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_playback_rate(g_player, fRate);
+               PlayerExecutionDelay(pszRateSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_playback_rate failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nRateFailCount++;
+               }
+               PlayerGetMemStatus(pszRateMemLog);
+               player_unprepare(g_player);
+       }
+       if ( nRateFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_set_playback_rate failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nRateFailCount, MAX_COUNT);
+               FREE_MEMORY(pszRateMemLog, pszRateSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_playback_rate, pszRateSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_set_playback_rate, pszRateMemLog);
+#endif
+       FREE_MEMORY(pszRateMemLog, pszRateSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Sets the player's sound type
+//& type : auto
+/**
+* @testcase                    ITc_player_set_sound_type_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Sets the player's sound type
+* @scenario                            Create a handle for player\n
+*                                              Set player's sound type\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_create, player_set_sound_type
+* @passcase                            When it can Set player's sound type.
+* @failcase                            When it can not Set player's sound type.
+* @precondition                        The player state should be Idle
+* @postcondition               N/A
+*/
+int ITc_player_set_sound_type_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSoundTypeMemLog = NULL;
+       char *pszSoundTypeSpeedLog = NULL;
+       int nSoundTypeFailCount = 0;
+       sound_type_e SetType = SOUND_TYPE_SYSTEM;
+#if MEMORY_CHECK
+       pszSoundTypeMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSoundTypeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_sound_type(g_player, SetType);
+               PlayerExecutionDelay(pszSoundTypeSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_sound_type failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSoundTypeFailCount++;
+               }
+               PlayerGetMemStatus(pszSoundTypeMemLog);
+       }
+       if ( nSoundTypeFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_set_sound_type failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSoundTypeFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSoundTypeMemLog, pszSoundTypeSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_sound_type, pszSoundTypeSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_set_sound_type, pszSoundTypeMemLog);
+#endif
+       FREE_MEMORY(pszSoundTypeMemLog, pszSoundTypeSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Sets the cookie for streaming playback
+//& type : auto
+/**
+* @testcase                    ITc_player_set_streaming_cookie_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Sets the cookie for streaming playback
+* @scenario                            Initialize player handle\n
+*                                              set streaming cookie\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_set_streaming_cookie
+* @passcase                            When it can Set the cookie for streaming playback
+* @failcase                            When it can not set the cookie for streaming playback
+* @precondition                        The player state must be PLAYER_STATE_IDLE
+* @postcondition               N/A
+*/
+int ITc_player_set_streaming_cookie_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszCookieMemLog = NULL;
+       char *pszCookieSpeedLog = NULL;
+       int nCookieFailCount = 0;
+       int nSupportFailCount = 0;
+       const char* pszCookie = "Cookie";
+#if MEMORY_CHECK
+       pszCookieMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszCookieSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(false, 0) == false )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_streaming_cookie(g_player, pszCookie, sizeof(char));
+               PlayerExecutionDelay(pszCookieSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_streaming_cookie failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nCookieFailCount++;
+               }
+               PlayerGetMemStatus(pszCookieMemLog);
+       }
+       if ( nCookieFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_set_streaming_cookie failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nCookieFailCount, MAX_COUNT);
+               FREE_MEMORY(pszCookieMemLog, pszCookieSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_streaming_cookie, pszCookieSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_set_streaming_cookie, pszCookieMemLog);
+#endif
+       FREE_MEMORY(pszCookieMemLog, pszCookieSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+
+
+//& purpose: Sets the streaming user agent for playback.
+//& type : auto
+/**
+* @testcase                    ITc_player_set_streaming_user_agent_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Sets the streaming user agent for playback
+* @scenario                            Initialize player handle\n
+*                                              set streaming user agent\n
+*                                              check the result\n
+*                                              destroy the handler
+* @apicovered                  player_set_streaming_user_agent
+* @passcase                            When it can set the streaming user agent for playback
+* @failcase                            When it can not set the streaming user agent for playback
+* @precondition                        The player state must be PLAYER_STATE_IDLE
+* @postcondition               N/A
+*/
+int ITc_player_set_streaming_user_agent_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszUserAgentMemLog = NULL;
+       char *pszUserAgentSpeedLog = NULL;
+       int nUserAgentFailCount = 0;
+       int nSupportFailCount = 0;
+       const char* pszUserAgent = "UserAgent";
+#if MEMORY_CHECK
+       pszUserAgentMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszUserAgentSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( InitializePlayerHandler(false, 0) == false)
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_streaming_user_agent(g_player, pszUserAgent, sizeof(char));
+               PlayerExecutionDelay(pszUserAgentSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_streaming_user_agent failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nUserAgentFailCount++;
+               }
+               PlayerGetMemStatus(pszUserAgentMemLog);
+       }
+       if ( nUserAgentFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times player_set_streaming_user_agent failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nUserAgentFailCount, MAX_COUNT);
+               FREE_MEMORY(pszUserAgentMemLog, pszUserAgentSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_streaming_user_agent, pszUserAgentSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_set_streaming_user_agent, pszUserAgentMemLog);
+#endif
+       FREE_MEMORY(pszUserAgentMemLog, pszUserAgentSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Checks whether the custom equalizer effect is available or not
+//& type: auto
+/**
+* @testcase                    ITc_player_audio_effect_equalizer_is_available_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Checks whether the custom equalizer effect is available or not
+* @scenario                            call player_audio_effect_equalizer_is_available\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_audio_effect_equalizer_is_available
+* @passcase                            When specified audio effect is available
+* @failcase                            When specified audio effect is not available
+* @precondition                        The player state should be PLAYER_STATE_IDLE
+* @postcondition               N/A
+*/
+int ITc_player_audio_effect_equalizer_is_available_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszAvailMemLog = NULL;
+       char *pszAvailSpeedLog = NULL;
+       int nAvailFailCount = 0;
+       bool bAvailable;
+#if MEMORY_CHECK
+       pszAvailMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAvailSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_audio_effect_equalizer_is_available(g_player, &bAvailable);
+               PlayerExecutionDelay(pszAvailSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nAvailFailCount++;
+               }
+               if (bAvailable != true )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available false %d\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nAvailFailCount++;
+               }
+               PlayerGetMemStatus(pszAvailMemLog);
+       }
+
+       if ( nAvailFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nAvailFailCount, MAX_COUNT);
+               FREE_MEMORY(pszAvailMemLog, pszAvailSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_audio_effect_equalizer_is_available, pszAvailSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_audio_effect_equalizer_is_available, pszAvailMemLog);
+#endif
+       FREE_MEMORY(pszAvailMemLog, pszAvailSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Gets the bands number of equalizer
+//& type: auto
+/**
+* @testcase                    ITc_player_audio_effect_get_equalizer_bands_count_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Gets the bands number of equalizer
+* @scenario                            check player_audio_effect_equalizer_is_available\n
+*                                              player_audio_effect_get_equalizer_bands_count\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_audio_effect_equalizer_is_available, player_audio_effect_get_equalizer_bands_count
+* @passcase                            player_audio_effect_get_equalizer_bands_count is Passed
+* @failcase                            player_audio_effect_get_equalizer_bands_count is Failed
+* @precondition                        The player state should be PLAYER_STATE_IDLE
+* @postcondition               N/A
+*/
+int ITc_player_audio_effect_get_equalizer_bands_count_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszBandsCountMemLog = NULL;
+       char *pszBandsCountSpeedLog = NULL;
+       int nBandsCountFailCount = 0;
+       bool bAvailable;
+       int nBandCount = -1;
+
+       nRetVal = player_audio_effect_equalizer_is_available(g_player, &bAvailable);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       else if ( bAvailable != true )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available false", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszBandsCountMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszBandsCountSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_audio_effect_get_equalizer_bands_count(g_player, &nBandCount);
+               PlayerExecutionDelay(pszBandsCountSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_bands_count failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nBandsCountFailCount++;
+               }
+               else if ( nBandCount < 0 )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_bands_count return wrong value %d\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nBandsCountFailCount++;
+               }
+               PlayerGetMemStatus(pszBandsCountMemLog);
+       }
+
+       if ( nBandsCountFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_bands_count failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nBandsCountFailCount, MAX_COUNT);
+               FREE_MEMORY(pszBandsCountMemLog, pszBandsCountSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_audio_effect_get_equalizer_bands_count, pszBandsCountSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_audio_effect_get_equalizer_bands_count, pszBandsCountMemLog);
+#endif
+       FREE_MEMORY(pszBandsCountMemLog, pszBandsCountSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Clears the equalizer effect
+//& type: auto
+/**
+* @testcase                    ITc_player_audio_effect_equalizer_clear_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Clears the equalizer effect
+* @scenario                            check player_audio_effect_equalizer_is_available\n
+*                                              player_audio_effect_get_equalizer_bands_count\n
+*                                              player_audio_effect_get_equalizer_level_range\n
+*                                              player_audio_effect_set_equalizer_all_bands\n
+*                                              player_audio_effect_equalizer_clear\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_audio_effect_equalizer_is_available, player_audio_effect_get_equalizer_bands_count,\n
+*                                              player_audio_effect_get_equalizer_level_range, player_audio_effect_set_equalizer_all_bands,\n
+*                                              player_audio_effect_equalizer_clear
+* @passcase                            player_audio_effect_equalizer_clear is Passed
+* @failcase                            player_audio_effect_equalizer_clear is Failed
+* @precondition                        The player state should be PLAYER_STATE_IDLE
+* @postcondition               N/A
+*/
+int ITc_player_audio_effect_get_equalizer_band_frequency_range_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszFreqRangeMemLog = NULL;
+       char *pszFreqRangeSpeedLog = NULL;
+       int nFreqRangeFailCount = 0;
+       bool bAvailable;
+       int nRange = -1;
+       int index = 0;
+
+       nRetVal = player_audio_effect_equalizer_is_available(g_player, &bAvailable);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       else if (bAvailable != true )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available false", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszFreqRangeMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFreqRangeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_audio_effect_get_equalizer_band_frequency_range(g_player, index, &nRange);
+               PlayerExecutionDelay(pszFreqRangeSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_band_frequency_range failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nFreqRangeFailCount++;
+               }
+               else if ( nRange < 0 )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_band_frequency_range return wrong value %d\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFreqRangeFailCount++;
+               }
+               PlayerGetMemStatus(pszFreqRangeMemLog);
+       }
+
+       if (nFreqRangeFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_band_frequency_range failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nFreqRangeFailCount, MAX_COUNT);
+               FREE_MEMORY(pszFreqRangeMemLog, pszFreqRangeSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_audio_effect_get_equalizer_band_frequency_range, pszFreqRangeSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_audio_effect_get_equalizer_band_frequency_range, pszFreqRangeMemLog);
+#endif
+       FREE_MEMORY(pszFreqRangeMemLog, pszFreqRangeSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Gets the band frequency of equalizer
+//& type: auto
+/**
+* @testcase                    ITc_player_audio_effect_get_equalizer_band_frequency_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Gets the band frequency of equalizer
+* @scenario                            check player_audio_effect_equalizer_is_available\n
+*                                              player_audio_effect_get_equalizer_band_frequency\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_audio_effect_equalizer_is_available, player_audio_effect_get_equalizer_band_frequency
+* @passcase                            player_audio_effect_get_equalizer_band_frequency is Passed
+* @failcase                            player_audio_effect_get_equalizer_band_frequency is Failed
+* @precondition                        The player state should be PLAYER_STATE_IDLE
+* @postcondition               N/A
+*/
+int ITc_player_audio_effect_get_equalizer_band_frequency_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszFreqMemLog = NULL;
+       char *pszFreqSpeedLog = NULL;
+       int nFreqFailCount = 0;
+       bool bAvailable;
+       int nFrequency = -1;
+       int index = 0;
+
+       nRetVal = player_audio_effect_equalizer_is_available(g_player, &bAvailable);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       else if (bAvailable != true )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available false", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszFreqMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszFreqSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_audio_effect_get_equalizer_band_frequency(g_player, index, &nFrequency);
+               PlayerExecutionDelay(pszFreqSpeedLog);
+               PlayerGetMemStatus(pszFreqMemLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_band_frequency failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nFreqFailCount++;
+               }
+               else if (nFrequency < 0)
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_band_frequency return wrong value %d\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFreqFailCount++;
+               }
+       }
+       if ( nFreqFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_band_frequency failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nFreqFailCount, MAX_COUNT);
+               FREE_MEMORY(pszFreqMemLog, pszFreqSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_audio_effect_get_equalizer_band_frequency, pszFreqSpeedLog)
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_audio_effect_get_equalizer_band_frequency, pszFreqMemLog);
+#endif
+       FREE_MEMORY(pszFreqMemLog, pszFreqSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Gets the valid band level range of equalizer
+//& type: auto
+/**
+* @testcase                    ITc_player_audio_effect_get_equalizer_level_range_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Gets the valid band level range of equalizer
+* @scenario                            check player_audio_effect_equalizer_is_available\n
+*                                              player_audio_effect_get_equalizer_level_range\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_audio_effect_equalizer_is_available, player_audio_effect_get_equalizer_level_range
+* @passcase                            player_audio_effect_get_equalizer_level_range is Passed
+* @failcase                            player_audio_effect_get_equalizer_level_range is Failed
+* @precondition                        The player state should be PLAYER_STATE_IDLE
+* @postcondition               N/A
+*/
+int ITc_player_audio_effect_get_equalizer_level_range_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszLevelRangeMemLog = NULL;
+       char *pszLevelRangeSpeedLog = NULL;
+       int nLevelRangeFailCount = 0;
+       bool bAvailable;
+       int nMin, nMax;
+
+       nRetVal = player_audio_effect_equalizer_is_available(g_player, &bAvailable);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       else if (bAvailable != true )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available false", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszLevelRangeMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszLevelRangeSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_audio_effect_get_equalizer_level_range(g_player, &nMin, &nMax);
+               PlayerExecutionDelay(pszLevelRangeSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_level_range failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nLevelRangeFailCount++;
+               }
+               PlayerGetMemStatus(pszLevelRangeMemLog);
+       }
+
+       if (nLevelRangeFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_level_range failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nLevelRangeFailCount, MAX_COUNT);
+               FREE_MEMORY(pszLevelRangeMemLog, pszLevelRangeSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_audio_effect_get_equalizer_level_range, pszLevelRangeSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_audio_effect_get_equalizer_level_range, pszLevelRangeMemLog);
+#endif
+       FREE_MEMORY(pszLevelRangeMemLog, pszLevelRangeSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Set and get the gain set for the given equalizer band
+//& type: auto
+/**
+* @testcase                    ITc_player_audio_effect_set_get_equalizer_band_level_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Set and get the gain set for the given equalizer band
+* @scenario                            check player_audio_effect_equalizer_is_available\n
+*                                              player_audio_effect_get_equalizer_level_range\n
+*                                              player_audio_effect_set_equalizer_band_level\n
+*                                              player_audio_effect_get_equalizer_band_level\n
+*                                              check results
+*                                              destroy the handler
+* @apicovered                  player_audio_effect_equalizer_is_available, player_audio_effect_get_equalizer_level_range,\n
+                                               player_audio_effect_set_equalizer_band_level, player_audio_effect_get_equalizer_band_level
+* @passcase                            player_audio_effect_set_equalizer_band_level and player_audio_effect_get_equalizer_band_level are Passed
+* @failcase                            player_audio_effect_set_equalizer_band_level or player_audio_effect_get_equalizer_band_level are Failed
+* @precondition                        The player state should be PLAYER_STATE_IDLE
+* @postcondition               N/A
+*/
+int ITc_player_audio_effect_set_get_equalizer_band_level_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetGetLevelMemLog = NULL;
+       char *pszSetLevelSpeedLog = NULL;
+       char *pszGetLevelSpeedLog = NULL;
+       int nSetLevelFailCount = 0;
+       int nGetLevelFailCount = 0;
+       int nLevelRangeFailCount = 0;
+       int nMismatchCount = 0;
+       bool bAvailable;
+       int nMin, nMax;
+       int index = 0;
+       int nSetLevel = -1;
+       int nGetLevel = -1;
+
+       nRetVal = player_audio_effect_equalizer_is_available(g_player, &bAvailable);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       else if (bAvailable != true )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available false", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszSetGetLevelMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetLevelSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetLevelSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               nRetVal = player_audio_effect_get_equalizer_level_range(g_player, &nMin, &nMax);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_level_range failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nLevelRangeFailCount++;
+                       continue;
+               }
+               usleep(2000);
+               nSetLevel = (nMin + nMax)/2     ;
+               usleep(2000);
+               PlayerGetTimeOfDay();
+               nRetVal = player_audio_effect_set_equalizer_band_level(g_player, index, nSetLevel);
+               PlayerExecutionDelay(pszSetLevelSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_set_equalizer_band_level failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetLevelFailCount++;
+                       continue;
+               }
+               usleep(2000);
+               PlayerGetTimeOfDay();
+               nRetVal = player_audio_effect_get_equalizer_band_level(g_player, index, &nGetLevel);
+               PlayerExecutionDelay(pszGetLevelSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_band_level failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nGetLevelFailCount++;
+                       continue;
+               }
+               if (nGetLevel != nSetLevel)
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_set_get_equalizer_band_level mismatched %d\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nMismatchCount++;
+               }
+               PlayerGetMemStatus(pszSetGetLevelMemLog);
+       }
+       if ( nSetLevelFailCount > 0 || nGetLevelFailCount > 0 || nLevelRangeFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_level_range failed %d times, player_audio_effect_set_equalizer_band_level failed %d times, player_audio_effect_get_equalizer_band_level failed %d times, player_audio_effect_set_get_equalizer_band_level mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nLevelRangeFailCount, nSetLevelFailCount, nGetLevelFailCount, nMismatchCount, MAX_COUNT);
+               FREE_MEMORY(pszSetGetLevelMemLog, pszSetLevelSpeedLog, pszGetLevelSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_audio_effect_set_equalizer_level_range, pszSetLevelSpeedLog);
+       PRINT_SPEED_LOG(player_audio_effect_get_equalizer_level_range, pszGetLevelSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_audio_effect_set_get_equalizer_level_range, pszSetGetLevelMemLog);
+#endif
+       FREE_MEMORY(pszSetGetLevelMemLog, pszSetLevelSpeedLog, pszGetLevelSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Sets the all bands of equalizer
+//& type: auto
+/**
+* @testcase                    ITc_player_audio_effect_set_equalizer_all_bands_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Sets the all bands of equalizer
+* @scenario                            check player_audio_effect_equalizer_is_available\n
+*                                              player_audio_effect_get_equalizer_bands_count\n
+*                                              player_audio_effect_get_equalizer_level_range\n
+*                                              player_audio_effect_set_equalizer_all_bands\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_audio_effect_equalizer_is_available, player_audio_effect_get_equalizer_bands_count,\n
+*                                              player_audio_effect_get_equalizer_level_range, player_audio_effect_set_equalizer_all_bands
+* @passcase                            player_audio_effect_set_equalizer_all_bands is Passed
+* @failcase                            player_audio_effect_set_equalizer_all_bands is Failed
+* @precondition                        The player state should be PLAYER_STATE_IDLE
+* @postcondition               N/A
+*/
+int ITc_player_audio_effect_set_equalizer_all_bands_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetAllBandMemLog = NULL;
+       char *pszSetAllBandSpeedLog = NULL;
+       int nSetAllBandFailCount = 0;
+       bool bAvailable;
+       int nBandCount = -1;
+       int nMin, nMax;
+       int i ;
+
+       nRetVal = player_audio_effect_equalizer_is_available(g_player, &bAvailable);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       else if (bAvailable != true )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available false", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRetVal = player_audio_effect_get_equalizer_bands_count(g_player, &nBandCount);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_bands_count failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       else if ( nBandCount < 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_bands_count return wrong value %d\\n", __LINE__, API_NAMESPACE, nLoopCount);
+               return 1;
+       }
+       nRetVal = player_audio_effect_get_equalizer_level_range(g_player, &nMin, &nMax);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_level_range failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszSetAllBandMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetAllBandSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               int *nBandLevels = (int*) malloc(sizeof(int) * nBandCount);
+               if ( nBandLevels == NULL )
+               {
+                       FPRINTF("[Line: %d][%s] nBandLevels is NULL error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+                       return 1;
+               }
+               for ( i=0; i<nBandCount; i++ )
+               {
+                       nBandLevels[i] = (nMin + nMax)/2 ;
+               }
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_audio_effect_set_equalizer_all_bands(g_player, nBandLevels, nBandCount);
+               PlayerExecutionDelay(pszSetAllBandSpeedLog);
+
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_set_equalizer_all_bands failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetAllBandFailCount++;
+               }
+               PlayerGetMemStatus(pszSetAllBandMemLog);
+       }
+
+       if (nSetAllBandFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_set_equalizer_all_bands failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetAllBandFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetAllBandMemLog, pszSetAllBandSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_audio_effect_set_equalizer_all_bands, pszSetAllBandSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_audio_effect_set_equalizer_all_bands, pszSetAllBandMemLog);
+#endif
+       FREE_MEMORY(pszSetAllBandMemLog, pszSetAllBandSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Clears the equalizer effect
+//& type: auto
+/**
+* @testcase                    ITc_player_audio_effect_equalizer_clear_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Clears the equalizer effect
+* @scenario                            check player_audio_effect_equalizer_is_available\n
+*                                              player_audio_effect_get_equalizer_bands_count\n
+*                                              player_audio_effect_get_equalizer_level_range\n
+*                                              player_audio_effect_set_equalizer_all_bands\n
+*                                              player_audio_effect_equalizer_clear\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_audio_effect_equalizer_is_available, player_audio_effect_get_equalizer_bands_count,\n
+*                                              player_audio_effect_get_equalizer_level_range, player_audio_effect_set_equalizer_all_bands,\n
+*                                              player_audio_effect_equalizer_clear
+* @passcase                            player_audio_effect_equalizer_clear is Passed
+* @failcase                            player_audio_effect_equalizer_clear is Failed
+* @precondition                        The player state should be PLAYER_STATE_IDLE
+* @postcondition               N/A
+*/
+int ITc_player_audio_effect_equalizer_clear_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszClearMemLog = NULL;
+       char *pszClearSpeedLog = NULL;
+       int nClearFailCount = 0;
+       bool bAvailable;
+       int nBandCount = -1;
+       int nMin, nMax;
+       int i;
+
+       nRetVal = player_audio_effect_equalizer_is_available(g_player, &bAvailable);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       else if ( bAvailable != true )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_is_available false", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRetVal = player_audio_effect_get_equalizer_bands_count(g_player, &nBandCount);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_bands_count failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       else if ( nBandCount < 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_bands_count return wrong value %d\\n", __LINE__, API_NAMESPACE, nLoopCount);
+               return 1;
+       }
+       nRetVal = player_audio_effect_get_equalizer_level_range(g_player, &nMin, &nMax);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_get_equalizer_level_range failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       int *nBandLevels = (int*) malloc(sizeof(int) * nBandCount);
+       if ( nBandLevels == NULL )
+       {
+               FPRINTF("[Line: %d][%s] nBandLevels is NULL error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       for ( i=0; i< nBandCount; i++ )
+       {
+               nBandLevels[i] = (nMin + nMax)/2 ;
+       }
+       nRetVal = player_audio_effect_set_equalizer_all_bands(g_player, nBandLevels, nBandCount);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_set_equalizer_all_bands failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszClearMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszClearSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_audio_effect_equalizer_clear(g_player);
+               PlayerExecutionDelay(pszClearSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_audio_effect_equalizer_clear failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nClearFailCount++;
+               }
+               PlayerGetMemStatus(pszClearMemLog);
+       }
+
+       if ( nClearFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_audio_effect_set_equalizer_all_bands failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nClearFailCount, MAX_COUNT);
+               FREE_MEMORY(pszClearMemLog, pszClearSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_audio_effect_set_equalizer_all_bands, pszClearSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_audio_effect_set_equalizer_all_bands, pszClearMemLog);
+#endif
+       FREE_MEMORY(pszClearMemLog, pszClearSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Registers a callback function to be invoked when the playback is finished
+//& type : auto
+/**
+* @testcase                    ITc_player_set_unset_completed_cb_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Registers a callback function to be invoked when the playback is finished
+* @scenario                            call player_set_completed_cb\n
+*                                              check if callback is hit\n
+*                                              destroy the handler
+* @apicovered                  player_set_completed_cb, player_unset_completed_cb, player_unprepare, player_set_display, player_get_state ,player_start, player_stop, player_prepare, player_set_uri
+* @passcase                            Callback is hit
+* @failcase                            Callback is not hit
+* @precondition                        NA
+* @postcondition               player_completed_cb() will be invoked
+*/
+int ITc_player_set_unset_completed_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetCompMemLog = NULL;
+       char *pszSetCompSpeedLog = NULL;
+       char *pszUnsetCompSpeedLog = NULL;
+       int nSetCompFailCount = 0;
+       int nUnsetCompFailCount = 0;
+       int nFailCount = 0;
+       int nSupportFailCount = 0;
+       player_state_e state;
+
+#if MEMORY_CHECK
+       pszSetUnsetCompMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetCompSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetCompSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bPlayerCompletedCallback = false ;
+
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_completed_cb(g_player, PlayerCompletedCallback, NULL);
+               PlayerExecutionDelay(pszSetCompSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_completed_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetCompFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_display failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+                       return 1;
+               }
+
+               if ( InitializePlayerHandler(true, 1) == false )
+               {
+                       FPRINTF("[Line: %d][%s] InitializePlayerHandler failed in Pre-condition ", __LINE__, API_NAMESPACE);
+                       nSetCompFailCount++;
+                       continue;
+               }
+
+               nRetVal = player_start(g_player);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerWaitForAsync();
+
+               if (!g_bPlayerCompletedCallback)
+               {
+                       FPRINTF("[Line: %d][%s] player_completed_cb failed on iteration = %d , error returned = callback not invoked\n\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount ++;
+                       continue;
+               }
+
+               PlayerGetTimeOfDay();
+               nRetVal = player_unset_completed_cb(g_player);
+               PlayerExecutionDelay(pszUnsetCompSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_unset_completed_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nUnsetCompFailCount++;
+               }
+
+               PlayerGetMemStatus(pszSetUnsetCompMemLog);
+               player_unprepare(g_player);
+       }
+
+       if ( nSetCompFailCount > 0 || nUnsetCompFailCount > 0 || nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_set_completed_cb failed %d times, player_unset_completed_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetCompFailCount, nUnsetCompFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetUnsetCompMemLog, pszSetCompSpeedLog, pszUnsetCompSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_completed_cb, pszSetCompSpeedLog);
+       PRINT_SPEED_LOG(player_unset_completed_cb, pszUnsetCompSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_setunset_completed_cb, pszSetUnsetCompMemLog);
+#endif
+       FREE_MEMORY(pszSetUnsetCompMemLog, pszSetCompSpeedLog, pszUnsetCompSpeedLog, NULL, NULL);
+       return 0;
+}
+
+
+//& purpose: Registers a callback function to be invoked when every video frame is decoded
+//& type : auto
+/**
+* @testcase                    ITc_player_set_unset_media_packet_video_frame_decoded_cb_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Registers a callback function to be invoked when every video frame is decoded
+* @scenario                            all player_set_media_packet_video_frame_decoded_cb\n
+*                                              heck if callback is hit\n
+*                                              estroy the handler
+* @apicovered                  player_set_media_packet_video_frame_decoded_cb, player_unset_media_packet_video_frame_decoded_cb, player_unprepare, player_set_display, player_get_state ,player_start, player_stop, player_prepare, player_set_uri
+* @passcase                            Callback is hit
+* @failcase                            Callback is not hit
+* @precondition                        The player state must be PLAYER_STATE_IDLE by player_create() or player_unprepare()
+* @postcondition               player_media_packet_video_frame_decoded_cb() will be invoked
+*/
+int ITc_player_set_unset_media_packet_video_frame_decoded_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszSetUnsetFrameMemLog = NULL;
+       char *pszSetFrameSpeedLog = NULL;
+       char *pszUnsetFrameSpeedLog = NULL;
+       int nSetFrameFailCount = 0;
+       int nUnsetFrameFailCount = 0;
+       int nSupportFailCount = 0;
+       int nFailCount = 0;
+       player_state_e state;
+
+#if MEMORY_CHECK
+       pszSetUnsetFrameMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetFrameSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetFrameSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bPlayerPreparedCallback = false;
+               g_bPlayerMediaPacketVideoFrameDecodedCallback = false;
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_set_media_packet_video_frame_decoded_cb(g_player, PlayerMediaPacketVideoFrameDecodedCallback, NULL);
+               PlayerExecutionDelay(pszSetFrameSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_media_packet_video_frame_decoded_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSetFrameFailCount++;
+                       continue;
+               }
+
+               nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_NONE, NULL);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_set_display failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       return 1;
+               }
+
+               if ( InitializePlayerHandler(true, 1) == false )
+               {
+                       FPRINTF("[Line: %d][%s] InitializePlayerHandler failed in Pre-condition\\n", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       continue;
+               }
+
+               nRetVal = player_start(g_player);
+               FPRINTF("[Line: %d][%s] value of return type = %d\\n", __LINE__, API_NAMESPACE, nRetVal);
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_start failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+               if ( state != PLAYER_STATE_PLAYING )
+               {
+                       FPRINTF("[Line: %d][%s] Player state does not change after player_start() call", __LINE__, API_NAMESPACE);
+                       nSupportFailCount++;
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerWaitForAsync();
+
+               if (!g_bPlayerMediaPacketVideoFrameDecodedCallback)
+               {
+                       FPRINTF("[Line: %d][%s] player_media_packet_video_frame_decoded_cb failed on iteration = %d , callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount ++;
+               }
+
+               player_stop(g_player);
+
+               player_get_state(g_player,&state);
+               PlayerGetState(state);
+               
+               if ( state == PLAYER_STATE_READY )
+               {
+                       PlayerGetTimeOfDay();
+                       nRetVal = player_unset_media_packet_video_frame_decoded_cb(g_player);
+                       PlayerExecutionDelay(pszUnsetFrameSpeedLog);
+                       if ( nRetVal != PLAYER_ERROR_NONE )
+                       {
+                               FPRINTF("[Line: %d][%s] player_unset_media_packet_video_frame_decoded_cb failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                               nUnsetFrameFailCount++;
+                       }
+
+                       player_unprepare(g_player);
+                       continue;
+               }
+
+               PlayerGetMemStatus(pszSetUnsetFrameMemLog);
+               player_unprepare(g_player);
+       }
+
+       if ( nSupportFailCount > 0 || nSetFrameFailCount > 0 || nUnsetFrameFailCount > 0 || nFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times, player_set_media_packet_video_frame_decoded_cb failed %d times, player_unset_media_packet_video_frame_decoded_cb failed %d times, callback not invoked %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nSetFrameFailCount, nUnsetFrameFailCount, nFailCount, MAX_COUNT);
+               FREE_MEMORY(pszSetUnsetFrameMemLog, pszSetFrameSpeedLog, pszUnsetFrameSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_set_media_packet_video_frame_decoded_cb, pszSetFrameSpeedLog);
+       PRINT_SPEED_LOG(player_unset_media_packet_video_frame_decoded_cb, pszUnsetFrameSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_setunset_media_packet_video_frame_decoded_cb, pszSetUnsetFrameMemLog);
+#endif
+       FREE_MEMORY(pszSetUnsetFrameMemLog, pszSetFrameSpeedLog, pszUnsetFrameSpeedLog, NULL, NULL);
+       return 0;
+}
+
+
+//& purpose: Prepares the media player for playback, asynchronously
+//& type: auto
+/**
+* @testcase                    ITc_player_prepare_async_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 Prepares the media player for playback, asynchronously
+* @scenario                            Initialize player handler\n
+*                                              call player_prepare_async\n
+*                                              check results\n
+*                                              destroy the handler
+* @apicovered                  player_prepare_async
+* @passcase                            When it can prepare player asynchronously
+* @failcase                            When it can not prepare player asynchronously
+* @precondition                        The player state should be PLAYER_STATE_IDLE
+* @postcondition               N/A
+*/
+int ITc_player_prepare_async_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszAsyncMemLog = NULL;
+       char *pszAsyncSpeedLog = NULL;
+       int nAsyncFailCount = 0;
+       int nSupportFailCount = 0;
+       int nFailCount = 0;
+
+       if ( InitializePlayerHandler(false, 1) == false )
+       {
+               PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+               return 1;
+       }
+
+       nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_display failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszAsyncMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszAsyncSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bPlayerPreparedCallback = false;
+               PlayerGetMemAllocation();
+               PlayerGetTimeOfDay();
+               nRetVal = player_prepare_async(g_player, PlayerPreparedCallback, NULL);
+               PlayerExecutionDelay(pszAsyncSpeedLog);
+               if ( nRetVal != PLAYER_ERROR_NONE )
+               {
+                       FPRINTF("[Line: %d][%s] player_prepare_async failed %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, PlayerGetError(nRetVal));
+                       nAsyncFailCount++;
+                       continue;
+               }
+
+               PlayerWaitForAsync();
+
+               if ( !g_bPlayerPreparedCallback )
+               {
+                       FPRINTF("[Line: %d][%s] player_prepared_cb failed on iteration = %d , error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount ++;
+               }
+               PlayerGetMemStatus(pszAsyncMemLog);
+               player_unprepare(g_player);
+       }
+
+       if ( nAsyncFailCount > 0 || nFailCount > 0 || nSupportFailCount > 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_handler_initialize_condition failed %d times, player_prepare_async failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSupportFailCount, nAsyncFailCount, MAX_COUNT);
+               FREE_MEMORY(pszAsyncMemLog, pszAsyncSpeedLog, NULL, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(player_prepare_async, pszAsyncSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(player_prepare_async, pszAsyncMemLog);
+#endif
+       FREE_MEMORY(pszAsyncMemLog, pszAsyncSpeedLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: check x-surface video display visible properties.
+/**
+* @testcase                            ITc_player_is_display_visible_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description             check x surface video display visible
+* @scenario                            Create player handle
+*                                              set player display
+*                                              set x surface video display visible
+*                                              check x surface video display visible
+*                                              destroy the handler
+* @apicovered                  player_create, player_set_display, player_set_display_visible,player_is_display_visible
+* @passcase                            When player_is_display_visible return PLAYER_ERROR_NONE along with precondition apis
+* @failcase                            When player_is_display_visible do not return PLAYER_ERROR_NONE along with precondition apis
+* @precondition                        The player display must be set as PLAYER_DISPLAY_TYPE_OVERLAY
+* @postcondition               N/A
+*/
+int ITc_player_is_display_visible_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       bool b_set_visible = true;
+       bool b_get_visible = false;
+
+    nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_display failed , error returned = %s\\n", __LINE__, API_NAMESPACE,  PlayerGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = player_set_display_visible(g_player, b_set_visible);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_display_visible failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = player_is_display_visible(g_player, &b_get_visible);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_is_display_visible failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+
+       if ( b_set_visible != b_get_visible )
+       {
+               FPRINTF("[Line: %d][%s] player_is_display_visible failed , mismatch in set:get:: %d:%d\\n", __LINE__, API_NAMESPACE, b_set_visible , b_get_visible);
+               return 1;
+       }
+
+       return 0;
+}
+
+
+//& type : auto
+//& purpose: to check play position
+/**
+* @testcase                            ITc_player_set_get_play_position_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 check play position on player
+* @scenario                            Initialize player handle
+*                                              start player
+*                                              pause player
+*                                              check the result
+                                               stop the player
+*                                              destroy the handler
+* @apicovered                  player_create, player_set_uri, player_prepare, player_start, player_pause, player_stop, player_unprepare , player_get_play_position , player_set_play_position
+* @passcase                        When all used api return expected value (PLAYER_ERROR_NONE)
+* @failcase                        When all used api do not return expected value (PLAYER_ERROR_NONE)
+* @precondition                    the player state should be PLAYER_STATE_PLAYING
+* @postcondition               N/A
+*/
+int ITc_player_set_get_play_position_p(void)
+{
+       START_TEST;
+       int nRetVal = -1;
+       player_state_e state;
+       int n_set_millisecond = 10 , n_get_millisecond = 0;
+
+       nRetVal = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(g_pEvasWindow));
+
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_display failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+       sleep(2);
+
+       if ( InitializePlayerHandler(true, 1) != true )
+       {
+               //PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+               FPRINTF("[Line: %d][%s] player prepared failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               return 1;
+       }
+
+       nRetVal = player_start(g_player);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               //PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+               FPRINTF("[Line: %d][%s] player_start failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               player_unprepare(g_player);
+               return 1;
+       }
+
+
+       nRetVal = player_get_state(g_player,&state);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               //PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(InitializePlayerHandler);
+               FPRINTF("[Line: %d][%s] player_get_state failed, error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               player_stop(g_player);
+               player_unprepare(g_player);
+               return 1;
+       }
+
+       sleep(2);
+       PlayerGetState(state);
+       nRetVal = player_pause(g_player);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_start failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               player_stop(g_player);
+               player_unprepare(g_player);
+               return 1;
+       }
+       PlayerGetState(state);
+
+       // reseting value
+       g_bPlayerSeekCallback = false;
+
+       nRetVal = player_set_play_position(g_player, n_set_millisecond, false, PlayerSeekCompletedCallback, NULL);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_set_play_position failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               player_stop(g_player);
+               player_unprepare(g_player);
+               return 1;
+       }
+
+       PlayerWaitForAsync();
+
+       if ( g_bPlayerSeekCallback == false )
+       {
+               FPRINTF("[Line: %d][%s] player_set_play_position failed , callback not invoked\\n", __LINE__, API_NAMESPACE);
+               player_stop(g_player);
+               player_unprepare(g_player);
+               return 1;
+       }
+
+
+       nRetVal = player_get_play_position(g_player, &n_get_millisecond);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_get_play_position failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               player_stop(g_player);
+               player_unprepare(g_player);
+               return 1;
+       }
+
+       if ( n_get_millisecond == 0 )
+       {
+               FPRINTF("[Line: %d][%s] player_get_play_position failed , get millisecond == %d\\n", __LINE__, API_NAMESPACE, n_get_millisecond);
+               player_stop(g_player);
+               player_unprepare(g_player);
+               return 1;
+       }
+
+
+       nRetVal = player_stop(g_player);
+       if ( nRetVal != PLAYER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] player_stop failed , error returned = %s\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRetVal));
+               player_unprepare(g_player);
+               return 1;
+       }
+
+       player_unprepare(g_player);
+
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/player/file.mp4 b/src/itc/player/file.mp4
new file mode 100755 (executable)
index 0000000..9737271
Binary files /dev/null and b/src/itc/player/file.mp4 differ
diff --git a/src/itc/player/short.mp3 b/src/itc/player/short.mp3
new file mode 100755 (executable)
index 0000000..78527be
Binary files /dev/null and b/src/itc/player/short.mp3 differ
diff --git a/src/itc/player/sub.srt b/src/itc/player/sub.srt
new file mode 100755 (executable)
index 0000000..9759794
--- /dev/null
@@ -0,0 +1,4179 @@
+1
+00:00:00,318 --> 00:00:03,843
+When the boy was born...
+
+2
+00:01:11,721 --> 00:01:13,814
+...like all Spartans, he was inspected.
+
+3
+00:01:15,625 --> 00:01:20,255
+If he'd been small or puny
+or sickly or misshapen...
+
+4
+00:01:20,430 --> 00:01:22,762
+...he would have been discarded.
+
+5
+00:01:29,873 --> 00:01:35,573
+From the time he could stand,
+he was baptized in the fire of combat.
+
+6
+00:01:57,634 --> 00:02:01,297
+Taught never to retreat,
+never to surrender.
+
+7
+00:02:01,471 --> 00:02:06,340
+Taught that death on the battlefield
+in service to Sparta...
+
+8
+00:02:06,543 --> 00:02:09,842
+...was the greatest glory
+he could achieve in his life.
+
+9
+00:02:24,994 --> 00:02:29,522
+At age 7,
+as is customary in Sparta...
+
+10
+00:02:29,699 --> 00:02:34,864
+...the boy was taken from his mother
+and plunged into a world of violence.
+
+11
+00:02:35,672 --> 00:02:40,200
+Manufactured by 300 years
+of Spartan warrior society...
+
+12
+00:02:41,244 --> 00:02:45,544
+...to create the finest soldiers
+the world has ever known.
+
+13
+00:02:45,715 --> 00:02:50,277
+The agoge, as it's called,
+forces the boy to fight.
+
+14
+00:02:50,453 --> 00:02:54,082
+Starves them,
+forces them to steal...
+
+15
+00:02:54,257 --> 00:02:58,626
+...and if necessary, to kill.
+
+16
+00:02:59,696 --> 00:03:02,688
+By rod and lash
+the boy was punished...
+
+17
+00:03:02,866 --> 00:03:06,165
+...taught to show no pain,
+no mercy.
+
+18
+00:03:07,871 --> 00:03:11,363
+Constantly tested,
+tossed into the wild.
+
+19
+00:03:11,541 --> 00:03:16,843
+Left to pit his wits and will
+against nature's fury.
+
+20
+00:03:17,213 --> 00:03:19,408
+It was his initiation...
+
+21
+00:03:19,582 --> 00:03:22,142
+...his time in the wild...
+
+22
+00:03:22,318 --> 00:03:26,812
+...for he would return
+to his people a Spartan...
+
+23
+00:03:26,990 --> 00:03:29,117
+...or not at all.
+
+24
+00:03:51,447 --> 00:03:54,314
+The wolf begins to circle the boy.
+
+25
+00:03:54,484 --> 00:03:56,918
+Claws of black steel...
+
+26
+00:03:57,086 --> 00:03:59,316
+...fur as dark night.
+
+27
+00:03:59,822 --> 00:04:01,153
+Eyes glowing red...
+
+28
+00:04:01,324 --> 00:04:05,260
+...jewels from
+the pit of hell itself.
+
+29
+00:04:14,003 --> 00:04:17,996
+The giant wolf sniffing...
+
+30
+00:04:18,174 --> 00:04:21,234
+...savoring the scent
+of the meal to come.
+
+31
+00:04:45,401 --> 00:04:46,925
+It's not fear that grips him...
+
+32
+00:04:47,537 --> 00:04:50,700
+...only a heightened
+sense of things.
+
+33
+00:04:51,040 --> 00:04:54,407
+The cold air in his lungs.
+
+34
+00:04:54,978 --> 00:04:58,311
+Windswept pines
+moving against the coming night.
+
+35
+00:05:06,322 --> 00:05:08,722
+His hands are steady.
+
+36
+00:05:08,891 --> 00:05:11,155
+His form...
+
+37
+00:05:11,327 --> 00:05:13,420
+...perfect.
+
+38
+00:05:39,222 --> 00:05:41,952
+And so the boy,
+given up for dead...
+
+39
+00:05:42,125 --> 00:05:46,858
+...returns to his people,
+to sacred Sparta, a king!
+
+40
+00:05:47,296 --> 00:05:51,027
+Our king, Leonidas!
+
+41
+00:05:56,939 --> 00:06:00,705
+It's been more than 30 years
+since the wolf and the winter cold.
+
+42
+00:06:02,111 --> 00:06:06,411
+And now, as then, a beast approaches.
+
+43
+00:06:06,582 --> 00:06:11,519
+Patient and confident,
+savoring the meal to come.
+
+44
+00:06:12,155 --> 00:06:15,454
+But this beast
+is made of men and horses...
+
+45
+00:06:15,625 --> 00:06:18,423
+...swords and spears.
+
+46
+00:06:18,628 --> 00:06:23,588
+An army of slaves, vast beyond imagining,
+ready to devour tiny Greece.
+
+47
+00:06:23,933 --> 00:06:28,700
+Ready to snuff out the world's
+one hope for reason and justice.
+
+48
+00:06:31,441 --> 00:06:34,205
+A beast approaches...
+
+49
+00:06:36,979 --> 00:06:42,508
+...and it was King Leonidas himself
+who provoked it.
+
+50
+00:07:53,156 --> 00:07:54,987
+That's it.
+
+51
+00:07:55,324 --> 00:08:00,193
+Now, the more you sweat here,
+the less you'll bleed in battle.
+
+52
+00:08:01,397 --> 00:08:03,865
+My father taught me...
+
+53
+00:08:04,033 --> 00:08:06,501
+...that fear is always a constant.
+
+54
+00:08:06,669 --> 00:08:08,193
+But accepting it...
+
+55
+00:08:08,571 --> 00:08:09,697
+...makes you stronger.
+
+56
+00:08:09,872 --> 00:08:11,237
+My queen.
+
+57
+00:08:11,407 --> 00:08:14,240
+A Persian emissary awaits Leonidas.
+
+58
+00:08:16,779 --> 00:08:18,178
+In the end...
+
+59
+00:08:18,347 --> 00:08:21,908
+...a Spartan's true strength
+is the warrior next to him.
+
+60
+00:08:22,685 --> 00:08:27,179
+So give respect and honor to him,
+and it will be returned to you.
+
+61
+00:08:27,723 --> 00:08:29,213
+First...
+
+62
+00:08:29,992 --> 00:08:32,927
+- ...you fight with your head.
+- Then you fight with your heart.
+
+63
+00:08:35,264 --> 00:08:36,959
+What is it?
+
+64
+00:08:37,200 --> 00:08:39,065
+A Persian messenger awaits you.
+
+65
+00:08:41,370 --> 00:08:42,837
+Do not forget today's lesson.
+
+66
+00:08:43,005 --> 00:08:45,701
+- Respect and honor.
+- Respect and honor.
+
+67
+00:09:01,224 --> 00:09:05,684
+Councilman Theron.
+You found yourself needed, for once.
+
+68
+00:09:06,762 --> 00:09:09,697
+My king and queen,
+I was just entertaining your guests.
+
+69
+00:09:09,899 --> 00:09:11,127
+I'm sure.
+
+70
+00:09:12,368 --> 00:09:14,199
+Before you speak, Persian...
+
+71
+00:09:14,370 --> 00:09:17,635
+...know that in Sparta everyone,
+even a king's messenger...
+
+72
+00:09:17,807 --> 00:09:20,401
+...is held accountable
+for the words of his voice.
+
+73
+00:09:21,410 --> 00:09:24,140
+Now, what message do you bring?
+
+74
+00:09:25,248 --> 00:09:27,716
+Earth and water.
+
+75
+00:09:29,986 --> 00:09:33,615
+You rode all the way from Persia
+for earth and water?
+
+76
+00:09:35,191 --> 00:09:39,093
+Do not be coy or stupid, Persian.
+You can afford neither in Sparta.
+
+77
+00:09:39,595 --> 00:09:42,063
+What makes this woman
+think she can speak among men?
+
+78
+00:09:42,231 --> 00:09:45,064
+Because only Spartan women
+give birth to real men.
+
+79
+00:09:46,569 --> 00:09:50,164
+Let us walk to cool our tongues.
+
+80
+00:09:52,775 --> 00:09:55,938
+If you value your lives
+over your complete annihilation...
+
+81
+00:09:56,112 --> 00:09:57,773
+...listen carefully, Leonidas.
+
+82
+00:09:57,947 --> 00:10:02,646
+Xerxes conquers and controls
+everything he rests his eyes upon.
+
+83
+00:10:02,818 --> 00:10:05,912
+He leads an army so massive,
+it shakes the ground with its march.
+
+84
+00:10:06,088 --> 00:10:08,784
+So vast, it drinks the rivers dry.
+
+85
+00:10:08,958 --> 00:10:11,950
+All the God-King Xerxes requires is this:
+
+86
+00:10:12,295 --> 00:10:15,526
+A simple offering of earth and water...
+
+87
+00:10:15,698 --> 00:10:19,862
+...a token of Sparta's submission
+to the will of Xerxes.
+
+88
+00:10:30,913 --> 00:10:33,074
+Submission.
+
+89
+00:10:35,251 --> 00:10:37,185
+Now, that's a bit of a problem.
+
+90
+00:10:37,620 --> 00:10:38,848
+See, rumor has it...
+
+91
+00:10:39,021 --> 00:10:41,649
+...the Athenians
+have already turned you down.
+
+92
+00:10:42,558 --> 00:10:47,791
+And if those philosophers and boy-lovers
+have found that kind of nerve, then--
+
+93
+00:10:47,963 --> 00:10:52,195
+- We must be diplomatic.
+- And, of course, Spartans...
+
+94
+00:10:53,235 --> 00:10:55,294
+...have their reputation to consider.
+
+95
+00:10:55,471 --> 00:10:59,498
+Choose your next words carefully,
+Leonidas.
+
+96
+00:10:59,742 --> 00:11:02,370
+They may be your last as king.
+
+97
+00:11:42,852 --> 00:11:46,151
+"Earth and water."
+
+98
+00:11:51,427 --> 00:11:53,520
+Madman. You're a madman.
+
+99
+00:11:53,696 --> 00:11:55,357
+Earth and water.
+
+100
+00:11:55,731 --> 00:11:57,892
+You'll find plenty of both down there.
+
+101
+00:11:58,167 --> 00:12:01,603
+No man, Persian or Greek,
+no man threatens a messenger.
+
+102
+00:12:02,071 --> 00:12:07,031
+You bring the crowns and heads
+of conquered kings to my city steps.
+
+103
+00:12:07,209 --> 00:12:09,268
+You insult my queen.
+
+104
+00:12:09,445 --> 00:12:13,176
+You threaten my people
+with slavery and death.
+
+105
+00:12:13,349 --> 00:12:16,284
+Oh, I've chosen my words carefully,
+Persian.
+
+106
+00:12:16,452 --> 00:12:18,420
+Perhaps you should have done the same.
+
+107
+00:12:18,587 --> 00:12:22,250
+This is blasphemy. This is madness!
+
+108
+00:12:39,642 --> 00:12:41,701
+Madness?
+
+109
+00:12:42,344 --> 00:12:44,471
+This is Sparta!
+
+110
+00:14:11,000 --> 00:14:13,366
+Welcome, Leonidas.
+
+111
+00:14:13,969 --> 00:14:17,132
+We have been expecting you.
+
+112
+00:14:23,612 --> 00:14:28,948
+The ephors,
+priests to the old gods.
+
+113
+00:14:29,351 --> 00:14:31,683
+Inbred swine.
+
+114
+00:14:31,854 --> 00:14:34,618
+More creature than man.
+
+115
+00:14:35,057 --> 00:14:40,495
+Creatures whom even Leonidas
+must bribe and beg.
+
+116
+00:14:41,363 --> 00:14:46,198
+For no Spartan king has gone to war
+without the ephors' blessing.
+
+117
+00:14:47,870 --> 00:14:51,931
+The Persians claim their forces
+number in the millions.
+
+118
+00:14:52,575 --> 00:14:55,840
+I hope, for our sake, they exaggerate.
+
+119
+00:14:56,312 --> 00:15:00,544
+But there's no question, we face
+the most massive army ever assembled.
+
+120
+00:15:00,783 --> 00:15:04,116
+Before your plan is heard...
+
+121
+00:15:04,286 --> 00:15:06,550
+...what do you offer?
+
+122
+00:15:16,098 --> 00:15:20,432
+We will use
+our superior fighting skills...
+
+123
+00:15:20,603 --> 00:15:24,664
+...and the terrain of Greece herself
+to destroy them.
+
+124
+00:15:24,840 --> 00:15:27,673
+We will march north to the coast,
+where I will make sure--
+
+125
+00:15:27,843 --> 00:15:32,746
+It is August, Leonidas.
+The full moon approaches.
+
+126
+00:15:33,115 --> 00:15:36,312
+The sacred and ancient festival.
+
+127
+00:15:36,485 --> 00:15:40,581
+Sparta wages no war
+at the time of the Carneia.
+
+128
+00:15:40,756 --> 00:15:42,348
+Sparta will burn!
+
+129
+00:15:42,791 --> 00:15:44,315
+Her men will die at arms...
+
+130
+00:15:44,493 --> 00:15:48,156
+...and her women and children
+will be slaves or worse.
+
+131
+00:15:50,299 --> 00:15:55,362
+Now, we will block
+the Persian coastal assault...
+
+132
+00:15:55,671 --> 00:15:57,969
+...by rebuilding the great Phocian Wall.
+
+133
+00:15:58,140 --> 00:16:02,839
+And from there, we will funnel them into
+the mountain pass we call the Hot Gates.
+
+134
+00:16:03,012 --> 00:16:07,381
+Now, in that narrow corridor,
+their numbers will count for nothing.
+
+135
+00:16:07,549 --> 00:16:10,143
+And wave after wave of Persian attack...
+
+136
+00:16:10,319 --> 00:16:14,255
+...will smash against Spartan shields.
+
+137
+00:16:14,823 --> 00:16:19,123
+Xerxes' losses will be so great,
+his men so demoralized...
+
+138
+00:16:19,294 --> 00:16:23,697
+...he will have no choice
+but to abandon his campaign.
+
+139
+00:16:23,866 --> 00:16:26,562
+We must consult the oracle.
+
+140
+00:16:27,269 --> 00:16:29,863
+Trust the gods, Leonidas.
+
+141
+00:16:30,039 --> 00:16:33,372
+I'd prefer you trusted your reason.
+
+142
+00:16:33,542 --> 00:16:35,567
+Your blasphemies...
+
+143
+00:16:35,744 --> 00:16:40,113
+...have cost us quite enough already.
+
+144
+00:16:40,849 --> 00:16:43,875
+Don't compound them.
+
+145
+00:16:45,954 --> 00:16:50,755
+We will consult the oracle.
+
+146
+00:16:52,895 --> 00:16:55,386
+Diseased old mystics.
+
+147
+00:16:56,398 --> 00:17:01,028
+Worthless remnants of a time
+before Sparta's ascent from darkness.
+
+148
+00:17:01,370 --> 00:17:04,635
+Remnants of a senseless tradition.
+
+149
+00:17:04,807 --> 00:17:09,176
+Tradition even Leonidas
+cannot defy...
+
+150
+00:17:09,344 --> 00:17:13,747
+...for he must respect
+the word of the ephors.
+
+151
+00:17:13,916 --> 00:17:15,850
+That is the law.
+
+152
+00:17:18,887 --> 00:17:23,221
+And no Spartan, subject or citizen,
+man or woman...
+
+153
+00:17:23,392 --> 00:17:27,419
+...slave or king, is above the law.
+
+154
+00:18:02,297 --> 00:18:06,563
+The ephors choose only
+the most beautiful Spartan girls...
+
+155
+00:18:06,735 --> 00:18:09,226
+...to live among them as oracles.
+
+156
+00:18:09,404 --> 00:18:12,669
+Their beauty is their curse...
+
+157
+00:18:12,841 --> 00:18:16,641
+...for the old wretches
+have the needs of men...
+
+158
+00:18:17,646 --> 00:18:21,742
+...and souls as black as hell.
+
+159
+00:18:24,720 --> 00:18:27,917
+"Pray to the winds...
+
+160
+00:18:30,425 --> 00:18:32,620
+...Sparta will fall.
+
+161
+00:18:35,564 --> 00:18:39,261
+All Greece will fall.
+
+162
+00:18:41,436 --> 00:18:45,065
+Trust not in men...
+
+163
+00:18:47,109 --> 00:18:50,374
+...honor the gods.
+
+164
+00:18:54,116 --> 00:18:57,779
+Honor the Carneia."
+
+165
+00:18:59,588 --> 00:19:03,183
+The king's climb down is harder.
+
+166
+00:19:03,358 --> 00:19:06,259
+Pompous, inbred swine.
+
+167
+00:19:06,428 --> 00:19:09,659
+Worthless, diseased, rotten...
+
+168
+00:19:09,832 --> 00:19:11,857
+...corrupt.
+
+169
+00:19:15,237 --> 00:19:18,866
+Truly, you're in the god-king's
+favor now...
+
+170
+00:19:19,441 --> 00:19:21,534
+...O wise and holy men.
+
+171
+00:19:21,844 --> 00:19:23,277
+Yes.
+
+172
+00:19:23,445 --> 00:19:28,405
+And when Sparta burns,
+you shall bathe in gold.
+
+173
+00:19:28,584 --> 00:19:31,178
+Fresh oracles shall be
+delivered to you...
+
+174
+00:19:31,653 --> 00:19:33,052
+...daily...
+
+175
+00:19:33,222 --> 00:19:37,022
+...from every corner of the empire.
+
+176
+00:20:12,694 --> 00:20:16,255
+Your lips can finish
+what your fingers have started.
+
+177
+00:20:19,401 --> 00:20:21,869
+Or has the oracle robbed you
+of your desire as well?
+
+178
+00:20:23,405 --> 00:20:26,431
+It would take more than the words
+of a drunken adolescent girl...
+
+179
+00:20:26,608 --> 00:20:28,303
+...to rob me of my desire for you.
+
+180
+00:20:32,481 --> 00:20:33,948
+Then why so distant?
+
+181
+00:20:37,085 --> 00:20:39,076
+Because it seems...
+
+182
+00:20:39,254 --> 00:20:45,193
+...though a slave and captive
+of lecherous old men...
+
+183
+00:20:45,527 --> 00:20:48,758
+...the oracle's words
+could set fire to all that I love.
+
+184
+00:20:48,931 --> 00:20:52,594
+So that is why my king loses sleep
+and is forced from the warmth of his bed?
+
+185
+00:20:55,570 --> 00:20:59,904
+There's only one woman's words that
+should affect the mood of my husband.
+
+186
+00:21:00,742 --> 00:21:02,300
+Those are mine.
+
+187
+00:21:06,481 --> 00:21:08,881
+Then what must a king do
+to save his world...
+
+188
+00:21:09,051 --> 00:21:13,488
+...when the very laws he is sworn
+to protect force him to do nothing?
+
+189
+00:21:16,425 --> 00:21:19,758
+It is not a question
+of what a Spartan citizen should do...
+
+190
+00:21:19,928 --> 00:21:22,795
+...nor a husband, nor a king.
+
+191
+00:21:23,432 --> 00:21:26,128
+Instead ask yourself, my dearest love...
+
+192
+00:21:27,769 --> 00:21:29,760
+...what should a free man do?
+
+193
+00:22:35,237 --> 00:22:39,401
+- Is this all of them?
+- As you ordered. Three hundred.
+
+194
+00:22:40,409 --> 00:22:43,708
+All with born sons
+to carry on their name.
+
+195
+00:22:54,456 --> 00:22:55,787
+We are with you, sire.
+
+196
+00:22:56,158 --> 00:22:58,285
+For Sparta. For freedom.
+
+197
+00:22:58,460 --> 00:23:00,428
+To the death.
+
+198
+00:23:11,239 --> 00:23:12,900
+He is your son.
+
+199
+00:23:13,708 --> 00:23:16,609
+He is too young
+to have felt a woman's warmth.
+
+200
+00:23:16,778 --> 00:23:20,737
+I have others to replace him.
+Astinos is as brave and ready as any.
+
+201
+00:23:21,083 --> 00:23:25,110
+No younger than we were the first time
+you stood next to me in battle.
+
+202
+00:23:28,890 --> 00:23:31,017
+You are a good friend...
+
+203
+00:23:31,193 --> 00:23:34,685
+...but a better captain, there is none.
+
+204
+00:23:40,202 --> 00:23:42,136
+My good king.
+
+205
+00:23:43,071 --> 00:23:46,404
+My good king, the oracle has spoken.
+
+206
+00:23:46,575 --> 00:23:49,442
+The ephors have spoken.
+There must be no march.
+
+207
+00:23:49,611 --> 00:23:51,408
+It is the law, my lord.
+
+208
+00:23:51,580 --> 00:23:55,573
+- The Spartan army must not go to war.
+- Nor shall it.
+
+209
+00:23:56,485 --> 00:23:58,077
+I've issued no such orders.
+
+210
+00:23:58,453 --> 00:24:01,980
+I'm here just taking a stroll,
+stretching my legs.
+
+211
+00:24:02,224 --> 00:24:07,389
+These 300 men
+are my personal bodyguard.
+
+212
+00:24:07,662 --> 00:24:09,823
+Our army will stay in Sparta.
+
+213
+00:24:10,432 --> 00:24:11,763
+Where will you go?
+
+214
+00:24:14,736 --> 00:24:16,966
+I hadn't really thought about it...
+
+215
+00:24:17,772 --> 00:24:19,933
+...but now that you ask...
+
+216
+00:24:20,108 --> 00:24:22,838
+...I suppose I'll head north.
+
+217
+00:24:24,279 --> 00:24:25,371
+The Hot Gates?
+
+218
+00:24:28,016 --> 00:24:30,416
+Move out!
+
+219
+00:24:30,619 --> 00:24:32,678
+Move out!
+
+220
+00:24:33,822 --> 00:24:35,414
+What shall we do?
+
+221
+00:24:36,958 --> 00:24:38,289
+What can we do?
+
+222
+00:24:38,994 --> 00:24:40,723
+What can you do?
+
+223
+00:24:43,765 --> 00:24:47,599
+Sparta will need sons.
+
+224
+00:25:35,383 --> 00:25:37,112
+Spartan!
+
+225
+00:25:46,394 --> 00:25:47,622
+Yes, milady?
+
+226
+00:26:03,712 --> 00:26:06,010
+Come back with your shield...
+
+227
+00:26:06,948 --> 00:26:08,381
+...or on it.
+
+228
+00:26:09,851 --> 00:26:11,216
+Yes, milady.
+
+229
+00:26:19,728 --> 00:26:22,026
+"Goodbye, my love."
+
+230
+00:26:22,664 --> 00:26:24,859
+He doesn't say it.
+
+231
+00:26:25,367 --> 00:26:27,597
+There's no room for softness...
+
+232
+00:26:27,769 --> 00:26:29,760
+...not in Sparta.
+
+233
+00:26:29,938 --> 00:26:32,702
+No place for weakness.
+
+234
+00:26:36,211 --> 00:26:40,409
+Only the hard and strong
+may call themselves Spartans.
+
+235
+00:26:41,249 --> 00:26:45,743
+Only the hard. Only the strong.
+
+236
+00:27:14,215 --> 00:27:16,080
+We march...
+
+237
+00:27:16,785 --> 00:27:22,280
+...for our lands, for our families,
+for our freedoms.
+
+238
+00:27:23,058 --> 00:27:25,219
+We march.
+
+239
+00:27:26,961 --> 00:27:28,622
+Daxos.
+
+240
+00:27:28,797 --> 00:27:32,198
+- What a pleasant surprise.
+- This morning's full of surprises, Leonidas.
+
+241
+00:27:32,367 --> 00:27:34,767
+- We've been tricked.
+- Can't be more than a hundred.
+
+242
+00:27:34,936 --> 00:27:37,166
+- This is a surprise.
+- Silence.
+
+243
+00:27:37,605 --> 00:27:39,573
+This isn't their army.
+
+244
+00:27:39,741 --> 00:27:43,905
+We heard Sparta was on the warpath
+and we were eager to join forces.
+
+245
+00:27:44,579 --> 00:27:48,675
+If it is blood you seek,
+you are welcome to join us.
+
+246
+00:27:49,017 --> 00:27:52,248
+But you bring only this handful
+of soldiers against Xerxes?
+
+247
+00:27:52,420 --> 00:27:56,015
+I see I was wrong to expect Sparta's
+commitment to at least match our own.
+
+248
+00:27:57,192 --> 00:27:59,023
+Doesn't it?
+
+249
+00:28:00,462 --> 00:28:02,157
+You, there.
+
+250
+00:28:02,630 --> 00:28:03,824
+What is your profession?
+
+251
+00:28:04,366 --> 00:28:06,493
+I'm a potter, sir.
+
+252
+00:28:07,669 --> 00:28:11,435
+And you, Arcadian.
+What is your profession?
+
+253
+00:28:11,806 --> 00:28:15,242
+- Sculptor, sir.
+- Sculptor.
+
+254
+00:28:15,610 --> 00:28:17,544
+- And you?
+- Blacksmith.
+
+255
+00:28:22,217 --> 00:28:25,516
+Spartans! What is your profession?
+
+256
+00:28:32,694 --> 00:28:34,628
+You see, old friend?
+
+257
+00:28:34,796 --> 00:28:37,697
+I brought more soldiers than you did.
+
+258
+00:28:47,642 --> 00:28:49,439
+No sleep tonight...
+
+259
+00:28:50,512 --> 00:28:52,980
+...not for the king.
+
+260
+00:28:53,148 --> 00:28:55,378
+All his 40 years
+have been a straight road...
+
+261
+00:28:55,550 --> 00:28:59,111
+...to this one gleaming moment
+in destiny...
+
+262
+00:28:59,287 --> 00:29:02,051
+...this one radiant clash
+of shield and spear...
+
+263
+00:29:02,223 --> 00:29:05,818
+...sword and bone,
+and flesh and blood.
+
+264
+00:29:07,529 --> 00:29:09,326
+His only regret...
+
+265
+00:29:09,497 --> 00:29:13,228
+...is that he has so few
+to sacrifice.
+
+266
+00:29:34,522 --> 00:29:36,513
+We're being followed.
+
+267
+00:29:41,563 --> 00:29:43,758
+It has followed us since Sparta.
+
+268
+00:29:48,703 --> 00:29:51,695
+My king! Look!
+
+269
+00:30:12,660 --> 00:30:14,127
+What happened here?
+
+270
+00:30:14,696 --> 00:30:16,027
+Where are all the people?
+
+271
+00:30:17,131 --> 00:30:18,826
+Persians.
+
+272
+00:30:19,000 --> 00:30:20,797
+I put their number at around 20.
+
+273
+00:30:23,171 --> 00:30:24,536
+A scouting party.
+
+274
+00:30:27,909 --> 00:30:29,399
+But these footprints....
+
+275
+00:30:40,788 --> 00:30:42,255
+Behind us!
+
+276
+00:30:56,304 --> 00:30:57,532
+Child!
+
+277
+00:31:30,505 --> 00:31:33,235
+It's quiet now.
+
+278
+00:31:33,708 --> 00:31:35,505
+They....
+
+279
+00:31:35,877 --> 00:31:39,904
+They came with beasts
+from the blackness.
+
+280
+00:31:41,482 --> 00:31:43,746
+With their claws and fangs...
+
+281
+00:31:43,918 --> 00:31:46,148
+...they grabbed them.
+
+282
+00:31:47,055 --> 00:31:49,216
+Everyone...
+
+283
+00:31:50,224 --> 00:31:52,283
+...but me.
+
+284
+00:32:04,539 --> 00:32:06,097
+The villagers.
+
+285
+00:32:06,641 --> 00:32:08,575
+I found them.
+
+286
+00:32:20,088 --> 00:32:22,886
+Have the gods no mercy?
+
+287
+00:32:24,058 --> 00:32:26,083
+We are doomed.
+
+288
+00:32:26,260 --> 00:32:28,888
+Quiet yourself.
+
+289
+00:32:32,300 --> 00:32:37,533
+The child speaks of the Persian ghosts,
+known from the ancient times.
+
+290
+00:32:38,406 --> 00:32:41,102
+They are the hunters of men's souls.
+
+291
+00:32:42,143 --> 00:32:44,771
+They cannot be killed or defeated.
+
+292
+00:32:45,380 --> 00:32:49,544
+Not this darkness. Not these Immortals.
+
+293
+00:32:51,719 --> 00:32:53,914
+Immortals?
+
+294
+00:32:54,222 --> 00:32:57,282
+We'll put their name to the test.
+
+295
+00:33:19,347 --> 00:33:22,111
+Into the Hot Gates we march.
+
+296
+00:33:22,283 --> 00:33:25,582
+Into that narrow corridor
+we march...
+
+297
+00:33:25,753 --> 00:33:28,017
+...where Xerxes' numbers
+count for nothing.
+
+298
+00:33:29,190 --> 00:33:33,126
+Spartans, citizen-soldiers,
+freed slaves.
+
+299
+00:33:33,294 --> 00:33:35,194
+Brave Greeks, all.
+
+300
+00:33:36,197 --> 00:33:39,291
+Brothers, fathers, sons...
+
+301
+00:33:39,467 --> 00:33:41,458
+...we march.
+
+302
+00:33:42,136 --> 00:33:46,334
+For honor's sake, for duty's sake,
+for glory's sake, we march.
+
+303
+00:33:46,507 --> 00:33:49,601
+Look! Persians.
+
+304
+00:33:54,749 --> 00:33:58,480
+Into hell's mouth we march.
+
+305
+00:34:07,528 --> 00:34:09,587
+Let's watch these motherless dogs...
+
+306
+00:34:09,831 --> 00:34:13,892
+...as they're embraced by the loving arms
+of Greece herself. Come.
+
+307
+00:34:16,704 --> 00:34:18,399
+True.
+
+308
+00:34:22,610 --> 00:34:25,078
+It does look like rain.
+
+309
+00:34:28,382 --> 00:34:31,613
+Zeus stabs the sky
+with thunderbolts...
+
+310
+00:34:31,919 --> 00:34:35,946
+...and batters the Persian ships
+with hurricane wind.
+
+311
+00:34:37,091 --> 00:34:39,525
+Glorious.
+
+312
+00:34:51,806 --> 00:34:54,673
+Only one among us
+keeps his Spartan reserve.
+
+313
+00:35:00,615 --> 00:35:02,549
+Only he.
+
+314
+00:35:02,717 --> 00:35:05,185
+Only our king.
+
+315
+00:35:22,603 --> 00:35:24,537
+My queen?
+
+316
+00:35:29,710 --> 00:35:31,041
+My queen...
+
+317
+00:35:31,212 --> 00:35:34,545
+...the courtyard is a more fitting place
+for a married woman.
+
+318
+00:35:34,715 --> 00:35:36,376
+I'm afraid gossip and protocol...
+
+319
+00:35:36,551 --> 00:35:39,076
+...are the least of my worries now,
+councilman.
+
+320
+00:35:40,755 --> 00:35:42,586
+Is such secrecy needed?
+
+321
+00:35:42,757 --> 00:35:45,419
+How am I to trust beyond the walls
+of my own home?
+
+322
+00:35:45,593 --> 00:35:49,324
+Even here, Theron has eyes and ears
+which fuel Sparta with doubt and fear.
+
+323
+00:35:49,730 --> 00:35:53,131
+You speak as if all Sparta
+conspires against you.
+
+324
+00:35:53,768 --> 00:35:55,827
+I wish it were only against me.
+
+325
+00:35:58,472 --> 00:36:01,964
+Many on our council
+would vote to give all we have...
+
+326
+00:36:02,143 --> 00:36:04,008
+...and follow Leonidas...
+
+327
+00:36:04,345 --> 00:36:06,313
+...but you must show them favor.
+
+328
+00:36:08,616 --> 00:36:11,084
+And you can arrange for me
+to speak to the council?
+
+329
+00:36:11,252 --> 00:36:13,686
+If it is reason they want,
+I will let them know.
+
+330
+00:36:13,855 --> 00:36:15,982
+Know what, my queen?
+
+331
+00:36:16,357 --> 00:36:18,348
+Freedom isn't free at all.
+
+332
+00:36:18,526 --> 00:36:21,859
+That it comes with the highest of costs,
+the cost of blood.
+
+333
+00:36:24,131 --> 00:36:26,759
+I will do my best to gather our council.
+
+334
+00:36:27,201 --> 00:36:31,035
+And its chamber
+shall be filled with your voice.
+
+335
+00:36:31,372 --> 00:36:33,203
+- I'm in your debt.
+- No.
+
+336
+00:36:33,541 --> 00:36:37,705
+Leonidas is my king as well as yours.
+
+337
+00:37:02,503 --> 00:37:04,368
+I saw those ships smash on the rocks.
+
+338
+00:37:05,473 --> 00:37:06,838
+How can this be?
+
+339
+00:37:07,008 --> 00:37:10,307
+We saw but a fraction of the monster
+that is Xerxes' army.
+
+340
+00:37:10,978 --> 00:37:13,378
+There can be no victory here.
+
+341
+00:37:17,318 --> 00:37:19,013
+Why do you smile?
+
+342
+00:37:20,721 --> 00:37:22,655
+Arcadian...
+
+343
+00:37:22,823 --> 00:37:25,849
+...I have fought countless times...
+
+344
+00:37:26,127 --> 00:37:28,789
+...yet I've never met an adversary
+who could offer me...
+
+345
+00:37:28,963 --> 00:37:31,124
+...what we Spartans
+call "a beautiful death."
+
+346
+00:37:31,933 --> 00:37:33,594
+I can only hope...
+
+347
+00:37:33,768 --> 00:37:36,498
+...with all the world's warriors
+gathered against us...
+
+348
+00:37:36,671 --> 00:37:40,334
+...there might be one down there
+who's up to the task.
+
+349
+00:37:51,786 --> 00:37:54,118
+Move!
+
+350
+00:37:55,423 --> 00:37:58,358
+Keep going, you dogs!
+
+351
+00:38:06,033 --> 00:38:08,058
+Move!
+
+352
+00:38:09,503 --> 00:38:12,063
+Forward, I say!
+
+353
+00:38:14,408 --> 00:38:16,000
+Stop here!
+
+354
+00:38:16,844 --> 00:38:19,005
+Who commands here?
+
+355
+00:38:21,215 --> 00:38:23,877
+I am the emissary...
+
+356
+00:38:24,051 --> 00:38:26,315
+...to the ruler of all the world...
+
+357
+00:38:27,121 --> 00:38:31,023
+...the god of gods, king of kings...
+
+358
+00:38:31,192 --> 00:38:32,784
+...and by that authority...
+
+359
+00:38:32,960 --> 00:38:36,726
+...I demand that someone
+show me your commander.
+
+360
+00:38:40,501 --> 00:38:46,406
+Listen. Do you think the paltry dozen
+you slew scares us?
+
+361
+00:38:46,574 --> 00:38:50,066
+These hills swarm with our scouts.
+
+362
+00:38:50,244 --> 00:38:54,943
+And do you think your pathetic wall
+will do anything...
+
+363
+00:38:55,116 --> 00:39:01,419
+...except fall like a heap of dry leaves
+in the face of...?
+
+364
+00:39:13,134 --> 00:39:15,432
+Our ancestors built this wall...
+
+365
+00:39:16,170 --> 00:39:20,106
+...using ancient stones
+from the bosom of Greece herself.
+
+366
+00:39:20,541 --> 00:39:22,907
+And with a little Spartan help...
+
+367
+00:39:23,210 --> 00:39:25,678
+...your Persian scouts
+supplied the mortar.
+
+368
+00:39:26,280 --> 00:39:30,239
+You will pay for your barbarism!
+
+369
+00:39:49,403 --> 00:39:50,961
+My arm!
+
+370
+00:39:53,541 --> 00:39:55,406
+It's not yours anymore.
+
+371
+00:39:55,676 --> 00:40:00,306
+Go now. Run along and tell your Xerxes
+he faces free men here...
+
+372
+00:40:00,681 --> 00:40:02,046
+...not slaves.
+
+373
+00:40:02,216 --> 00:40:03,444
+Do it quickly...
+
+374
+00:40:03,684 --> 00:40:06,619
+...before we decide to make our wall
+just a little bit bigger.
+
+375
+00:40:07,121 --> 00:40:08,713
+No.
+
+376
+00:40:08,889 --> 00:40:11,323
+Not slaves.
+
+377
+00:40:13,127 --> 00:40:16,563
+Your women will be slaves.
+
+378
+00:40:16,897 --> 00:40:19,730
+Your sons, your daughters...
+
+379
+00:40:19,900 --> 00:40:22,232
+...your elders will be slaves!
+
+380
+00:40:22,403 --> 00:40:25,167
+But not you, no.
+
+381
+00:40:25,339 --> 00:40:29,400
+By noon this day you will be dead men.
+
+382
+00:40:30,578 --> 00:40:36,574
+A thousand nations of the Persian Empire
+descend upon you.
+
+383
+00:40:36,984 --> 00:40:40,476
+Our arrows will blot out the sun.
+
+384
+00:40:42,256 --> 00:40:44,952
+Then we will fight in the shade.
+
+385
+00:40:46,494 --> 00:40:48,257
+The wall is solid.
+
+386
+00:40:48,429 --> 00:40:51,592
+It'll do the job of funneling the Persians
+into the Hot Gates.
+
+387
+00:40:51,932 --> 00:40:54,628
+Have the men found any route
+through the hills to our back?
+
+388
+00:40:55,136 --> 00:40:57,161
+None, sire.
+
+389
+00:40:57,438 --> 00:40:58,996
+There is such a route, good king.
+
+390
+00:40:59,540 --> 00:41:01,269
+Just pass that western ridge.
+
+391
+00:41:01,942 --> 00:41:03,637
+It's an old goat path.
+
+392
+00:41:03,811 --> 00:41:06,644
+The Persians could use it to outflank us.
+
+393
+00:41:06,814 --> 00:41:10,545
+Not one step closer, monster!
+
+394
+00:41:12,186 --> 00:41:15,781
+Wise king, I humbly request an audience.
+
+395
+00:41:15,956 --> 00:41:19,323
+- I'll skewer you where you stand.
+- I gave no such order.
+
+396
+00:41:29,837 --> 00:41:31,065
+Forgive the captain.
+
+397
+00:41:31,739 --> 00:41:33,229
+He is a good soldier...
+
+398
+00:41:33,807 --> 00:41:36,435
+...but a bit short on manners.
+
+399
+00:41:36,610 --> 00:41:40,671
+There is nothing to forgive, brave king.
+I know what I look like.
+
+400
+00:41:41,115 --> 00:41:43,140
+You wear the crimson of a Spartan.
+
+401
+00:41:43,751 --> 00:41:49,383
+I am Ephialtes, born of Sparta.
+
+402
+00:41:49,990 --> 00:41:54,051
+My mother's love
+led my parents to flee Sparta...
+
+403
+00:41:54,228 --> 00:41:55,695
+...lest I be discarded.
+
+404
+00:41:56,230 --> 00:41:59,028
+Your shield and armor?
+
+405
+00:41:59,934 --> 00:42:01,595
+My father's, sir.
+
+406
+00:42:02,937 --> 00:42:06,998
+I beg you, bold king,
+to permit me...
+
+407
+00:42:07,174 --> 00:42:12,202
+...to redeem my father's name
+by serving you in combat.
+
+408
+00:42:12,513 --> 00:42:18,383
+My father trained me to feel no fear,
+to make spear and shield and sword...
+
+409
+00:42:18,552 --> 00:42:21,282
+...as much a part of me
+as my own beating heart.
+
+410
+00:42:21,722 --> 00:42:25,021
+I will earn my father's armor,
+noble king...
+
+411
+00:42:25,192 --> 00:42:27,353
+...by serving you in the battle.
+
+412
+00:42:32,533 --> 00:42:34,626
+A fine thrust.
+
+413
+00:42:34,802 --> 00:42:36,394
+I will kill many Persians.
+
+414
+00:42:42,276 --> 00:42:43,868
+Raise your shield.
+
+415
+00:42:44,044 --> 00:42:46,706
+- Sire?
+- Raise your shield as high as you can.
+
+416
+00:42:54,955 --> 00:42:57,981
+Your father should have taught you
+how our phalanx works.
+
+417
+00:42:58,659 --> 00:42:59,956
+We fight...
+
+418
+00:43:00,494 --> 00:43:03,395
+...as a single, impenetrable unit.
+
+419
+00:43:03,564 --> 00:43:06,499
+That is the source of our strength.
+
+420
+00:43:07,334 --> 00:43:10,963
+Each Spartan protects the man
+to his left...
+
+421
+00:43:11,138 --> 00:43:14,335
+...from thigh to neck with his shield.
+
+422
+00:43:14,508 --> 00:43:19,172
+A single weak spot
+and the phalanx shatters.
+
+423
+00:43:20,581 --> 00:43:23,812
+From thigh to neck, Ephialtes.
+
+424
+00:43:25,853 --> 00:43:28,253
+I am sorry, my friend.
+
+425
+00:43:28,422 --> 00:43:31,016
+- But not all of us were made to be soldiers.
+- But I--
+
+426
+00:43:31,191 --> 00:43:33,625
+- If you want to help in a Spartan victory...
+- Yes.
+
+427
+00:43:33,794 --> 00:43:38,959
+...clear the battlefield of the dead,
+tend the wounded, bring them water...
+
+428
+00:43:39,133 --> 00:43:40,760
+...but as for the fight itself...
+
+429
+00:43:42,136 --> 00:43:44,036
+...I cannot use you.
+
+430
+00:43:45,873 --> 00:43:47,306
+You....
+
+431
+00:43:55,182 --> 00:43:59,278
+Mother! Father! You were wrong!
+
+432
+00:44:02,556 --> 00:44:04,319
+You are wrong!
+
+433
+00:44:04,491 --> 00:44:09,019
+Leonidas! You are wrong!
+
+434
+00:44:09,496 --> 00:44:11,964
+Dispatch the Phocians to the goat path...
+
+435
+00:44:12,132 --> 00:44:16,660
+...and pray to the gods
+nobody tells the Persians about it.
+
+436
+00:44:22,376 --> 00:44:23,934
+Earthquake.
+
+437
+00:44:24,478 --> 00:44:25,706
+No, captain.
+
+438
+00:44:27,314 --> 00:44:29,248
+Battle formations.
+
+439
+00:44:53,140 --> 00:44:56,337
+This is where we hold them.
+
+440
+00:44:56,510 --> 00:44:58,774
+This is where we fight!
+
+441
+00:44:59,346 --> 00:45:01,576
+This is where they die!
+
+442
+00:45:01,915 --> 00:45:03,780
+Earn these shields, boys!
+
+443
+00:45:06,520 --> 00:45:09,011
+Remember this day, men...
+
+444
+00:45:09,189 --> 00:45:12,920
+...for it will be yours for all time.
+
+445
+00:45:24,037 --> 00:45:25,800
+Spartans!
+
+446
+00:45:25,973 --> 00:45:28,100
+Lay down your weapons!
+
+447
+00:45:44,992 --> 00:45:47,256
+Persians!
+
+448
+00:45:47,828 --> 00:45:49,887
+Come and get them!
+
+449
+00:46:11,385 --> 00:46:13,012
+Hold!
+
+450
+00:46:15,856 --> 00:46:17,414
+Give them nothing...
+
+451
+00:46:17,858 --> 00:46:21,453
+...but take from them everything!
+
+452
+00:46:23,163 --> 00:46:24,892
+Steady!
+
+453
+00:46:35,676 --> 00:46:37,200
+Push!
+
+454
+00:46:41,048 --> 00:46:43,448
+Is that the best you can do?
+
+455
+00:46:45,652 --> 00:46:47,643
+Push! Push!
+
+456
+00:46:57,731 --> 00:46:59,255
+Now!
+
+457
+00:47:11,078 --> 00:47:12,568
+Push!
+
+458
+00:47:56,123 --> 00:47:58,717
+No prisoners!
+
+459
+00:47:59,059 --> 00:48:00,788
+No mercy!
+
+460
+00:49:20,107 --> 00:49:22,234
+They look thirsty.
+
+461
+00:49:23,343 --> 00:49:26,278
+Well, let's give them something to drink.
+
+462
+00:49:29,182 --> 00:49:31,844
+To the cliffs.
+
+463
+00:49:55,475 --> 00:49:57,636
+Halt.
+
+464
+00:49:59,746 --> 00:50:01,839
+Hell of a good start.
+
+465
+00:50:24,504 --> 00:50:26,972
+Tuck tail!
+
+466
+00:50:32,446 --> 00:50:34,004
+Persian cowards.
+
+467
+00:50:41,788 --> 00:50:44,723
+- What the hell are you laughing at?
+- Well, you had to say it.
+
+468
+00:50:45,525 --> 00:50:49,188
+- What?
+- "Fight in the shade."
+
+469
+00:51:02,709 --> 00:51:04,643
+Recover.
+
+470
+00:51:27,934 --> 00:51:30,562
+Today no Spartan dies.
+
+471
+00:51:55,695 --> 00:51:57,128
+Easy, son.
+
+472
+00:52:23,356 --> 00:52:25,324
+We do what we were trained to do...
+
+473
+00:52:25,492 --> 00:52:26,959
+...what we were bred to do...
+
+474
+00:52:27,127 --> 00:52:30,119
+...what we were born to do.
+
+475
+00:52:37,504 --> 00:52:40,496
+No prisoners. No mercy.
+
+476
+00:52:40,674 --> 00:52:42,141
+A good start.
+
+477
+00:53:51,611 --> 00:53:54,876
+- I was afraid you might not come.
+- I'm sorry, my son is--
+
+478
+00:53:55,048 --> 00:54:00,645
+Is doing what children do best.
+Please, don't apologize.
+
+479
+00:54:01,655 --> 00:54:03,782
+Your son starts the agoge next year.
+
+480
+00:54:04,391 --> 00:54:08,384
+That is always a difficult time
+for a Spartan mother.
+
+481
+00:54:09,496 --> 00:54:14,058
+Yes, it will be hard. But also necessary.
+
+482
+00:54:16,503 --> 00:54:20,735
+You will speak before the council
+in two days' time.
+
+483
+00:54:22,609 --> 00:54:24,634
+My husband does not have two days.
+
+484
+00:54:25,045 --> 00:54:27,013
+Think of the two days as a gift.
+
+485
+00:54:29,082 --> 00:54:31,107
+It's no secret...
+
+486
+00:54:31,284 --> 00:54:34,151
+...Theron wants what you control.
+
+487
+00:54:34,321 --> 00:54:37,154
+It's his voice you must silence.
+
+488
+00:54:37,324 --> 00:54:39,417
+Make him your ally...
+
+489
+00:54:39,726 --> 00:54:42,286
+...and you will have your victory.
+
+490
+00:54:43,096 --> 00:54:44,859
+Thank you.
+
+491
+00:54:45,198 --> 00:54:47,598
+You are wise as you are kind.
+
+492
+00:55:14,661 --> 00:55:16,424
+There's your mother.
+
+493
+00:55:22,902 --> 00:55:26,338
+You should keep a better eye on him
+if he's to be king one day.
+
+494
+00:55:26,539 --> 00:55:29,007
+Be unfortunate if anything
+were to happen to him.
+
+495
+00:55:30,510 --> 00:55:32,375
+Or to his beautiful mother.
+
+496
+00:55:33,846 --> 00:55:35,336
+No!
+
+497
+00:55:53,584 --> 00:55:59,022
+Our Greek comrades are begging
+for a crack at the Persians, sire.
+
+498
+00:55:59,323 --> 00:56:00,654
+Good.
+
+499
+00:56:00,825 --> 00:56:03,589
+I've got something
+I think they can handle.
+
+500
+00:56:04,094 --> 00:56:05,789
+Tell Daxos that I want him...
+
+501
+00:56:05,963 --> 00:56:10,491
+...and 20 of his best eager, sober
+and ready for the next charge.
+
+502
+00:56:10,668 --> 00:56:12,499
+King Leonidas.
+
+503
+00:56:15,005 --> 00:56:18,805
+- Stelios, catch your breath, boy.
+- Yes, milord.
+
+504
+00:56:19,443 --> 00:56:21,570
+The Persians are approaching.
+
+505
+00:56:22,947 --> 00:56:26,815
+A small contingent.
+Too small for an attack.
+
+506
+00:56:30,554 --> 00:56:34,115
+- Captain, I leave you in charge.
+- But sire--
+
+507
+00:56:34,291 --> 00:56:35,519
+Relax, old friend.
+
+508
+00:56:35,693 --> 00:56:40,255
+If they assassinate me,
+all of Sparta goes to war.
+
+509
+00:56:41,198 --> 00:56:43,792
+Pray they're that stupid.
+
+510
+00:56:44,902 --> 00:56:46,597
+Pray...
+
+511
+00:56:47,137 --> 00:56:49,332
+...we're that lucky.
+
+512
+00:56:52,476 --> 00:56:54,239
+Besides...
+
+513
+00:56:56,514 --> 00:56:59,847
+...there's no reason we can't be civil...
+
+514
+00:57:00,150 --> 00:57:01,742
+...is there?
+
+515
+00:57:03,087 --> 00:57:04,076
+None, sire.
+
+516
+00:57:23,471 --> 00:57:25,701
+Let me guess.
+
+517
+00:57:26,440 --> 00:57:29,432
+You must be Xerxes.
+
+518
+00:57:41,455 --> 00:57:43,650
+Come, Leonidas.
+
+519
+00:57:45,092 --> 00:57:46,855
+Let us reason together.
+
+520
+00:57:47,128 --> 00:57:49,096
+It would be a regrettable waste...
+
+521
+00:57:49,497 --> 00:57:52,694
+...it would be nothing short of madness
+were you, brave king...
+
+522
+00:57:52,867 --> 00:57:56,064
+...and your valiant troops to perish...
+
+523
+00:57:56,704 --> 00:57:58,763
+...all because of a simple
+misunderstanding.
+
+524
+00:57:59,373 --> 00:58:02,206
+- There's much our cultures could share.
+- Haven't you noticed?
+
+525
+00:58:02,376 --> 00:58:04,776
+We've been sharing our culture
+with you all morning.
+
+526
+00:58:05,379 --> 00:58:07,643
+Yours is a fascinating tribe.
+
+527
+00:58:07,815 --> 00:58:09,976
+Even now you are defiant...
+
+528
+00:58:10,151 --> 00:58:14,281
+...in the face of annihilation
+and the presence of a god.
+
+529
+00:58:14,455 --> 00:58:16,480
+It isn't wise to stand against me,
+Leonidas.
+
+530
+00:58:17,158 --> 00:58:19,388
+Imagine what a horrible fate
+awaits my enemies...
+
+531
+00:58:19,560 --> 00:58:22,461
+...when I would gladly kill
+any of my own men for victory.
+
+532
+00:58:22,630 --> 00:58:25,258
+And I would die for any one of mine.
+
+533
+00:58:25,433 --> 00:58:29,665
+You Greeks take pride in your logic.
+I suggest you employ it.
+
+534
+00:58:29,837 --> 00:58:33,398
+Consider the beautiful land
+you so vigorously defend.
+
+535
+00:58:33,574 --> 00:58:36,065
+Picture it reduced to ash at my whim.
+
+536
+00:58:36,310 --> 00:58:37,777
+Consider the fate of your women.
+
+537
+00:58:38,379 --> 00:58:40,904
+Clearly you don't know our women.
+
+538
+00:58:41,082 --> 00:58:44,609
+I might as well have marched them up here,
+judging by what I've seen.
+
+539
+00:58:45,720 --> 00:58:48,245
+You have many slaves, Xerxes...
+
+540
+00:58:49,190 --> 00:58:51,488
+...but few warriors.
+
+541
+00:58:51,659 --> 00:58:55,595
+It won't be long
+before they fear my spears...
+
+542
+00:58:55,997 --> 00:58:58,431
+...more than your whips.
+
+543
+00:59:02,269 --> 00:59:05,136
+It's not the lash they fear...
+
+544
+00:59:07,875 --> 00:59:09,536
+...it is my divine power.
+
+545
+00:59:10,277 --> 00:59:14,771
+But I am a generous god.
+I can make you rich beyond all measure.
+
+546
+00:59:15,216 --> 00:59:17,616
+I will make you warlord of all Greece.
+
+547
+00:59:18,252 --> 00:59:22,154
+You will carry my battle standard
+to the heart of Europa.
+
+548
+00:59:22,323 --> 00:59:24,917
+Your Athenian rivals...
+
+549
+00:59:25,226 --> 00:59:27,387
+...will kneel at your feet...
+
+550
+00:59:28,095 --> 00:59:30,893
+...if you will but kneel at mine.
+
+551
+00:59:31,732 --> 00:59:33,996
+You are generous...
+
+552
+00:59:34,568 --> 00:59:36,968
+...as you are divine...
+
+553
+00:59:37,705 --> 00:59:39,332
+...O king of kings.
+
+554
+00:59:39,507 --> 00:59:43,409
+Such an offer
+only a madman would refuse.
+
+555
+00:59:44,011 --> 00:59:46,002
+But the....
+
+556
+00:59:46,914 --> 00:59:49,747
+The idea of kneeling, it's....
+
+557
+00:59:49,917 --> 00:59:54,445
+You see, slaughtering
+all those men of yours has....
+
+558
+00:59:54,622 --> 00:59:58,456
+Well, it's left a nasty cramp in my leg...
+
+559
+00:59:58,626 --> 01:00:00,719
+...so kneeling will be hard for me.
+
+560
+01:00:00,995 --> 01:00:04,362
+There will be no glory in your sacrifice.
+
+561
+01:00:04,532 --> 01:00:08,127
+I will erase even the memory of Sparta
+from the histories.
+
+562
+01:00:08,302 --> 01:00:11,499
+Every piece of Greek parchment
+shall be burned.
+
+563
+01:00:11,672 --> 01:00:15,005
+Every Greek historian and every scribe
+shall have their eyes put out...
+
+564
+01:00:15,176 --> 01:00:17,440
+...and their tongues
+cut from their mouths.
+
+565
+01:00:17,611 --> 01:00:23,607
+Why, uttering the very name of Sparta
+or Leonidas will be punishable by death.
+
+566
+01:00:24,251 --> 01:00:27,516
+The world will never know
+you existed at all.
+
+567
+01:00:29,657 --> 01:00:34,253
+The world will know
+that free men stood against a tyrant.
+
+568
+01:00:34,462 --> 01:00:37,954
+That few stood against many.
+
+569
+01:00:38,365 --> 01:00:41,493
+And before this battle was over...
+
+570
+01:00:41,769 --> 01:00:44,738
+...that even a god-king can bleed.
+
+571
+01:00:52,113 --> 01:00:54,308
+You fought well today...
+
+572
+01:00:55,649 --> 01:00:57,549
+...for a woman.
+
+573
+01:00:58,719 --> 01:01:00,380
+As did you.
+
+574
+01:01:00,554 --> 01:01:03,648
+Maybe if I'm injured,
+you'll be able to keep up with me.
+
+575
+01:01:04,158 --> 01:01:09,118
+Perhaps I was so far ahead
+you couldn't see me.
+
+576
+01:01:09,730 --> 01:01:12,927
+More likely offering your backside
+to the Thespians.
+
+577
+01:01:13,868 --> 01:01:15,495
+Jealousy...
+
+578
+01:01:15,669 --> 01:01:18,160
+...does not become you, my friend.
+
+579
+01:01:20,908 --> 01:01:23,240
+Move it, men!
+
+580
+01:01:25,346 --> 01:01:27,576
+Pile those Persians high.
+
+581
+01:01:30,718 --> 01:01:33,516
+For unless I miss my guess...
+
+582
+01:01:34,088 --> 01:01:37,080
+...we're in for one wild night.
+
+583
+01:02:01,015 --> 01:02:06,180
+They have served the dark will
+of Persian kings for 500 years.
+
+584
+01:02:06,353 --> 01:02:08,685
+Eyes as dark as night.
+
+585
+01:02:08,856 --> 01:02:10,847
+Teeth filed to fangs.
+
+586
+01:02:12,960 --> 01:02:15,224
+Soulless.
+
+587
+01:02:22,636 --> 01:02:27,403
+The personal guard to King Xerxes himself.
+The Persian warrior elite.
+
+588
+01:02:29,210 --> 01:02:32,304
+The deadliest fighting force
+in all of Asia:
+
+589
+01:02:33,080 --> 01:02:35,139
+The Immortals.
+
+590
+01:02:43,357 --> 01:02:46,758
+The god-king
+has betrayed a fatal flaw:
+
+591
+01:02:47,261 --> 01:02:49,024
+Hubris.
+
+592
+01:02:51,265 --> 01:02:54,029
+Easy to taunt, easy to trick.
+
+593
+01:02:54,702 --> 01:02:57,136
+Before wounds and weariness
+have taken their toll...
+
+594
+01:02:57,304 --> 01:03:00,831
+...the mad king
+throws the best he has at us.
+
+595
+01:03:01,342 --> 01:03:03,037
+Xerxes has taken the bait.
+
+596
+01:03:03,210 --> 01:03:05,007
+Spartans, push!
+
+597
+01:03:15,689 --> 01:03:17,281
+Immortals.
+
+598
+01:03:17,758 --> 01:03:20,727
+We put their name to the test.
+
+599
+01:04:04,905 --> 01:04:06,338
+Father!
+
+600
+01:05:52,012 --> 01:05:53,274
+My king!
+
+601
+01:07:06,053 --> 01:07:08,021
+Arcadians, now!
+
+602
+01:07:10,324 --> 01:07:13,088
+Go! Show the Spartans what we can do.
+
+603
+01:07:13,694 --> 01:07:15,127
+Go!
+
+604
+01:07:24,538 --> 01:07:26,438
+They shout and curse...
+
+605
+01:07:26,607 --> 01:07:29,804
+...stabbing wildly,
+more brawlers than warriors.
+
+606
+01:07:30,944 --> 01:07:33,504
+They make a wondrous
+mess of things.
+
+607
+01:07:34,548 --> 01:07:37,312
+Brave amateurs, they do their part.
+
+608
+01:08:24,932 --> 01:08:26,797
+Immortals.
+
+609
+01:08:26,967 --> 01:08:29,561
+They fail our king's test.
+
+610
+01:08:29,736 --> 01:08:32,671
+And a man
+who fancies himself a god...
+
+611
+01:08:33,407 --> 01:08:38,344
+...feels a very human chill
+crawl up his spine.
+
+612
+01:08:45,452 --> 01:08:47,579
+To our king!
+
+613
+01:08:47,955 --> 01:08:49,946
+And our honored dead.
+
+614
+01:08:50,123 --> 01:08:52,921
+Whom will Xerxes dare to send next?
+Whom?!
+
+615
+01:08:53,260 --> 01:08:55,956
+There's nothing that can stop us now!
+
+616
+01:08:56,830 --> 01:09:00,357
+Even the king allows himself
+to hope for more than glory.
+
+617
+01:09:00,534 --> 01:09:03,867
+Such mad hope, but there it is:
+
+618
+01:09:04,304 --> 01:09:09,708
+"Against Asia's endless hordes,
+against all odds, we can do it.
+
+619
+01:09:09,876 --> 01:09:12,606
+We can hold the Hot Gates.
+
+620
+01:09:12,779 --> 01:09:14,906
+We can win."
+
+621
+01:09:22,489 --> 01:09:24,252
+Dawn.
+
+622
+01:09:24,858 --> 01:09:28,885
+Whips crack. Barbarians howl.
+
+623
+01:09:29,062 --> 01:09:32,964
+Those behind cry, "Forward!"
+
+624
+01:09:34,835 --> 01:09:38,635
+Those in front cry, "Back!"
+
+625
+01:09:44,745 --> 01:09:47,270
+Our eyes bear witness
+to the grotesque spectacle...
+
+626
+01:09:47,447 --> 01:09:51,543
+...coughed forth from the darkest
+corner of Xerxes' empire.
+
+627
+01:10:41,768 --> 01:10:43,292
+When muscle failed...
+
+628
+01:10:43,737 --> 01:10:46,399
+...they turned to their magic.
+
+629
+01:10:47,441 --> 01:10:52,242
+One hundred nations descend
+upon us, the armies of all Asia.
+
+630
+01:10:52,412 --> 01:10:56,872
+Funneled into this narrow corridor,
+their numbers count for nothing.
+
+631
+01:11:31,251 --> 01:11:33,219
+They fall by the hundreds.
+
+632
+01:11:33,386 --> 01:11:38,983
+We send the severed bodies and the
+fragile hearts back to Xerxes' feet.
+
+633
+01:11:55,609 --> 01:11:59,773
+King Xerxes is displeased
+with his generals.
+
+634
+01:11:59,946 --> 01:12:02,506
+He disciplines them.
+
+635
+01:12:19,399 --> 01:12:23,802
+Xerxes dispatches his monsters
+from half the world away.
+
+636
+01:12:34,781 --> 01:12:36,874
+They're clumsy beasts...
+
+637
+01:12:37,050 --> 01:12:39,416
+...and the piled Persian dead
+are slippery.
+
+638
+01:13:15,856 --> 01:13:18,290
+- You still here?
+- Somebody's gotta watch your back.
+
+639
+01:13:18,458 --> 01:13:20,050
+Not now, I'm a little busy.
+
+640
+01:14:00,333 --> 01:14:02,858
+Regroup!
+
+641
+01:14:06,072 --> 01:14:07,699
+Astinos!
+
+642
+01:14:07,908 --> 01:14:09,603
+My son!
+
+643
+01:14:18,551 --> 01:14:20,178
+Astinos!
+
+644
+01:14:20,353 --> 01:14:23,117
+No!
+
+645
+01:14:46,379 --> 01:14:48,506
+Day wears on.
+
+646
+01:14:48,848 --> 01:14:51,009
+We lose few...
+
+647
+01:14:51,184 --> 01:14:54,415
+...but each felled is a friend,
+or dearest blood.
+
+648
+01:14:56,623 --> 01:15:00,525
+And upon seeing the headless body
+of his own young son...
+
+649
+01:15:00,694 --> 01:15:02,559
+...the captain breaks rank.
+
+650
+01:15:02,729 --> 01:15:06,165
+He goes wild, blood-drunk.
+
+651
+01:15:30,790 --> 01:15:33,281
+The captain's cries of pain
+at the loss of his son...
+
+652
+01:15:33,460 --> 01:15:37,191
+...are more frightening to the enemy
+than the deepest battle drums.
+
+653
+01:15:37,364 --> 01:15:41,357
+It takes three men to restrain him
+and bring him back to our own.
+
+654
+01:15:41,701 --> 01:15:44,033
+The day is ours.
+
+655
+01:15:44,437 --> 01:15:47,099
+No songs are sung.
+
+656
+01:16:27,213 --> 01:16:31,809
+Your gods were cruel to shape you so,
+friend Ephialtes.
+
+657
+01:16:34,220 --> 01:16:35,517
+The Spartans, too...
+
+658
+01:16:36,256 --> 01:16:39,157
+...were cruel to reject you.
+
+659
+01:16:41,995 --> 01:16:44,429
+But I am kind.
+
+660
+01:16:50,937 --> 01:16:53,064
+Everything you could ever desire...
+
+661
+01:16:54,307 --> 01:16:56,070
+...every happiness you can imagine...
+
+662
+01:16:58,278 --> 01:17:02,874
+...every pleasure your fellow Greeks
+and your false gods have denied you...
+
+663
+01:17:03,683 --> 01:17:05,947
+...I will grant you.
+
+664
+01:17:07,220 --> 01:17:09,620
+For I am kind.
+
+665
+01:17:23,570 --> 01:17:26,869
+Embrace me as your king
+and as your god.
+
+666
+01:17:28,007 --> 01:17:29,702
+Yes.
+
+667
+01:17:31,177 --> 01:17:35,978
+Lead my soldiers to the hidden path
+that enters behind the cursed Spartans...
+
+668
+01:17:36,149 --> 01:17:38,413
+...and your joys will be endless.
+
+669
+01:17:46,860 --> 01:17:50,023
+Yes! I want it all.
+
+670
+01:17:50,463 --> 01:17:54,024
+Wealth. Women.
+
+671
+01:17:56,035 --> 01:17:57,730
+And one more thing...
+
+672
+01:18:00,907 --> 01:18:03,569
+...I want a uniform.
+
+673
+01:18:08,081 --> 01:18:09,776
+Done.
+
+674
+01:18:11,417 --> 01:18:13,112
+You will find...
+
+675
+01:18:13,720 --> 01:18:15,654
+...I am kind.
+
+676
+01:18:16,789 --> 01:18:21,021
+Unlike the cruel Leonidas,
+who demanded that you stand...
+
+677
+01:18:23,129 --> 01:18:24,824
+...I require only...
+
+678
+01:18:25,565 --> 01:18:26,998
+...that you kneel.
+
+679
+01:18:54,661 --> 01:18:56,595
+Beautiful night.
+
+680
+01:18:58,031 --> 01:19:02,024
+Yes, but I did not ask you here
+for small talk, Theron.
+
+681
+01:19:02,669 --> 01:19:04,762
+You can be sure of that.
+
+682
+01:19:06,172 --> 01:19:08,834
+You never spared words with me.
+
+683
+01:19:09,409 --> 01:19:12,674
+Can I offer you something?
+A drink, perhaps?
+
+684
+01:19:12,845 --> 01:19:14,676
+Is it poison?
+
+685
+01:19:15,081 --> 01:19:17,845
+I'm sorry to disappoint you,
+it's only water.
+
+686
+01:19:27,627 --> 01:19:30,790
+I'm told it's been arranged for you
+to go before the council.
+
+687
+01:19:31,464 --> 01:19:33,193
+Yes.
+
+688
+01:19:33,399 --> 01:19:36,732
+I need your help in winning votes
+to send the army north to our king.
+
+689
+01:19:37,303 --> 01:19:38,930
+Yes.
+
+690
+01:19:39,606 --> 01:19:42,166
+I can see it,
+the two of us standing together.
+
+691
+01:19:42,342 --> 01:19:46,711
+Me, politician. You, warrior.
+Our voices as one.
+
+692
+01:19:48,047 --> 01:19:49,514
+But why would I want to do that?
+
+693
+01:19:50,483 --> 01:19:54,442
+It proves you care for a king who right now
+fights for the very water we drink.
+
+694
+01:19:54,787 --> 01:19:56,379
+True.
+
+695
+01:19:56,756 --> 01:19:59,384
+But this is politics, not war.
+
+696
+01:19:59,692 --> 01:20:01,216
+Leonidas is an idealist.
+
+697
+01:20:01,628 --> 01:20:05,564
+I know your kind too well. You send men
+to slaughter for your own gain.
+
+698
+01:20:05,732 --> 01:20:10,635
+Your husband, our king,
+has taken 300 of our finest to slaughter.
+
+699
+01:20:10,803 --> 01:20:15,433
+He's broken our laws
+and left without the council's consent.
+
+700
+01:20:15,942 --> 01:20:18,934
+- I'm simply a realist.
+- You're an opportunist.
+
+701
+01:20:19,912 --> 01:20:24,212
+You're as foolish as Leonidas if you think
+men don't have a price in this world.
+
+702
+01:20:24,384 --> 01:20:28,946
+All men are not created equal.
+That's the Spartan code, my little queen.
+
+703
+01:20:32,625 --> 01:20:35,025
+I admire your passion.
+
+704
+01:20:36,362 --> 01:20:38,091
+But don't think that you...
+
+705
+01:20:38,531 --> 01:20:40,863
+...a woman, even a queen...
+
+706
+01:20:41,034 --> 01:20:44,970
+...can walk into the council chamber
+and sway the minds of men.
+
+707
+01:20:45,138 --> 01:20:47,572
+I own that chamber...
+
+708
+01:20:47,740 --> 01:20:49,799
+...as if it were built with these hands.
+
+709
+01:20:54,280 --> 01:20:57,807
+I could crush
+the life out of you right now.
+
+710
+01:20:58,885 --> 01:21:02,548
+You will go before the council,
+but your words will fall on deaf ears.
+
+711
+01:21:02,722 --> 01:21:08,490
+Leonidas will receive no reinforcements,
+and if he returns, without my help...
+
+712
+01:21:08,661 --> 01:21:11,630
+...he will go to jail or worse.
+
+713
+01:21:15,368 --> 01:21:16,835
+Do you love your Sparta?
+
+714
+01:21:17,337 --> 01:21:19,032
+Yes.
+
+715
+01:21:19,205 --> 01:21:21,469
+- And your king?
+- I do.
+
+716
+01:21:27,313 --> 01:21:31,010
+Your husband fights for his land
+and his love.
+
+717
+01:21:31,684 --> 01:21:33,982
+What do you have to offer...
+
+718
+01:21:34,754 --> 01:21:37,723
+...in return for my word
+that I'll help you send our army north?
+
+719
+01:21:41,694 --> 01:21:44,356
+What does a realist want with his queen?
+
+720
+01:21:48,968 --> 01:21:50,697
+I think you know.
+
+721
+01:22:05,151 --> 01:22:07,847
+This will not be over quickly.
+
+722
+01:22:08,888 --> 01:22:11,379
+You will not enjoy this.
+
+723
+01:22:11,924 --> 01:22:14,188
+I'm not your king.
+
+724
+01:22:38,985 --> 01:22:40,782
+Dilios.
+
+725
+01:22:42,789 --> 01:22:46,816
+I trust that scratch
+hasn't made you useless?
+
+726
+01:22:46,993 --> 01:22:50,019
+Hardly, my lord. It's just an eye.
+
+727
+01:22:50,196 --> 01:22:53,393
+The gods saw fit to grace me
+with a spare.
+
+728
+01:22:55,268 --> 01:22:57,202
+My captain?
+
+729
+01:22:58,504 --> 01:23:02,304
+Curses the gods and mourns alone.
+
+730
+01:23:04,277 --> 01:23:06,245
+Leonidas!
+
+731
+01:23:07,447 --> 01:23:10,439
+We are undone.
+Undone, I tell you. Destroyed.
+
+732
+01:23:10,616 --> 01:23:12,049
+Daxos, calm yourself.
+
+733
+01:23:12,218 --> 01:23:15,813
+Our hunchback traitor led Xerxes' Immortals
+to the hidden goat path behind us.
+
+734
+01:23:16,222 --> 01:23:19,055
+The Phocians you posted there
+were scattered without a fight.
+
+735
+01:23:19,225 --> 01:23:24,458
+- This battle is over, Leonidas.
+- This battle is over when I say it is over.
+
+736
+01:23:24,630 --> 01:23:28,999
+By morning, the Immortals will surround us.
+The Hot Gates will fall.
+
+737
+01:23:29,635 --> 01:23:34,004
+Spartans! Prepare for glory!
+
+738
+01:23:34,173 --> 01:23:37,370
+Glory? Have you gone mad?
+
+739
+01:23:37,543 --> 01:23:39,101
+There is no glory to be had now.
+
+740
+01:23:39,712 --> 01:23:43,307
+Only retreat or surrender. Or death.
+
+741
+01:23:43,483 --> 01:23:46,646
+Well, that's an easy choice
+for us, Arcadian.
+
+742
+01:23:46,819 --> 01:23:52,314
+Spartans never retreat.
+Spartans never surrender.
+
+743
+01:23:52,925 --> 01:23:55,018
+Go spread the word.
+
+744
+01:23:55,261 --> 01:23:58,924
+Let every Greek assembled
+know the truth of this.
+
+745
+01:23:59,098 --> 01:24:01,931
+Let each among them
+search his own soul.
+
+746
+01:24:03,636 --> 01:24:07,766
+And while you're at it, search your own.
+
+747
+01:24:15,281 --> 01:24:17,545
+My men will leave with me.
+
+748
+01:24:22,889 --> 01:24:25,119
+Godspeed, Leonidas.
+
+749
+01:24:31,430 --> 01:24:33,022
+Children!
+
+750
+01:24:34,000 --> 01:24:35,331
+Children.
+
+751
+01:24:36,369 --> 01:24:38,360
+Gather round.
+
+752
+01:24:40,239 --> 01:24:43,504
+No retreat, no surrender.
+
+753
+01:24:43,676 --> 01:24:47,544
+That is Spartan law.
+
+754
+01:24:47,780 --> 01:24:52,843
+And by Spartan law,
+we will stand and fight...
+
+755
+01:24:53,019 --> 01:24:55,010
+...and die.
+
+756
+01:24:58,457 --> 01:25:01,949
+A new age has begun.
+
+757
+01:25:03,696 --> 01:25:06,824
+An age of freedom.
+
+758
+01:25:07,900 --> 01:25:11,563
+And all will know that 300 Spartans...
+
+759
+01:25:11,737 --> 01:25:15,002
+...gave their last breath to defend it.
+
+760
+01:25:35,294 --> 01:25:37,057
+My friend.
+
+761
+01:25:40,600 --> 01:25:46,163
+I have lived my entire life
+without regret until now.
+
+762
+01:25:49,542 --> 01:25:55,481
+It's not that my son
+gave up his life for his country.
+
+763
+01:25:57,383 --> 01:26:01,251
+It's just that I never told him
+that I loved him the most.
+
+764
+01:26:02,855 --> 01:26:05,722
+That he stood by me with honor.
+
+765
+01:26:07,159 --> 01:26:10,094
+That he was all that was best in me.
+
+766
+01:26:19,205 --> 01:26:21,730
+My heart is broken for your loss.
+
+767
+01:26:22,475 --> 01:26:24,170
+Heart?
+
+768
+01:26:29,248 --> 01:26:32,342
+I have filled my heart...
+
+769
+01:26:32,518 --> 01:26:34,247
+...with hate.
+
+770
+01:26:38,391 --> 01:26:40,052
+Good.
+
+771
+01:26:49,201 --> 01:26:51,032
+Dilios...
+
+772
+01:26:52,738 --> 01:26:54,865
+...let's take a walk.
+
+773
+01:26:56,342 --> 01:26:58,401
+Yes, my lord.
+
+774
+01:27:00,813 --> 01:27:03,475
+But, sire, I am fit and ready for battle.
+
+775
+01:27:03,649 --> 01:27:06,777
+That you are, one of the finest.
+
+776
+01:27:07,086 --> 01:27:10,681
+But you have another talent
+unlike any other Spartan.
+
+777
+01:27:13,392 --> 01:27:16,828
+You will deliver my final orders
+to the council...
+
+778
+01:27:16,996 --> 01:27:19,487
+...with force and verve.
+
+779
+01:27:22,001 --> 01:27:24,265
+Tell them our story.
+
+780
+01:27:24,437 --> 01:27:28,965
+Make every Greek know
+what happened here.
+
+781
+01:27:29,809 --> 01:27:32,437
+You'll have a grand tale to tell.
+
+782
+01:27:34,246 --> 01:27:35,941
+A tale of victory.
+
+783
+01:27:36,615 --> 01:27:38,173
+Victory.
+
+784
+01:27:42,221 --> 01:27:44,212
+Yes, my lord.
+
+785
+01:27:49,895 --> 01:27:52,261
+Sire, any message...?
+
+786
+01:27:55,134 --> 01:27:56,499
+For the queen?
+
+787
+01:28:18,958 --> 01:28:21,392
+None that need be spoken.
+
+788
+01:28:36,509 --> 01:28:38,909
+Hundreds leave.
+
+789
+01:28:39,545 --> 01:28:41,979
+A handful stay.
+
+790
+01:28:47,153 --> 01:28:49,781
+Only one looks back.
+
+791
+01:29:00,099 --> 01:29:02,294
+Spartans!
+
+792
+01:29:03,369 --> 01:29:06,532
+Ready your breakfast and eat hearty...
+
+793
+01:29:06,705 --> 01:29:10,641
+...for tonight we dine in hell!
+
+794
+01:29:19,518 --> 01:29:22,180
+May I give the floor now...
+
+795
+01:29:22,354 --> 01:29:26,791
+...to the wife of Leonidas
+and queen of Sparta.
+
+796
+01:29:38,504 --> 01:29:40,233
+- What's this?
+- This is nothing.
+
+797
+01:29:40,406 --> 01:29:42,237
+Councilmen...
+
+798
+01:29:42,408 --> 01:29:46,174
+...I stand before you
+not only as your queen.
+
+799
+01:29:47,046 --> 01:29:49,776
+I come to you as a mother.
+
+800
+01:29:51,050 --> 01:29:53,450
+I come to you as a wife.
+
+801
+01:29:55,254 --> 01:29:57,779
+I come to you as a Spartan woman.
+
+802
+01:30:02,795 --> 01:30:05,889
+I come to you with great humility.
+
+803
+01:30:09,335 --> 01:30:11,735
+I am not here to represent Leonidas.
+
+804
+01:30:11,904 --> 01:30:14,668
+His actions speak louder
+than my words ever could.
+
+805
+01:30:15,007 --> 01:30:17,407
+I am here for all those voices
+which cannot be heard.
+
+806
+01:30:17,576 --> 01:30:20,101
+Mothers, daughters, fathers, sons.
+
+807
+01:30:20,279 --> 01:30:23,248
+Three hundred families
+that bleed for our rights...
+
+808
+01:30:23,682 --> 01:30:26,879
+...and for the very principles
+this room was built upon.
+
+809
+01:30:27,486 --> 01:30:29,579
+We are at war, gentlemen.
+
+810
+01:30:30,022 --> 01:30:32,547
+We must send the entire Spartan army
+to aid our king...
+
+811
+01:30:32,725 --> 01:30:35,819
+...in the preservation of not
+just ourselves, but of our children.
+
+812
+01:30:36,395 --> 01:30:39,523
+Send the army
+for the preservation of liberty.
+
+813
+01:30:39,698 --> 01:30:42,030
+Send it for justice.
+
+814
+01:30:42,201 --> 01:30:43,828
+Send it for law and order.
+
+815
+01:30:44,370 --> 01:30:46,565
+Send it for reason.
+
+816
+01:30:46,739 --> 01:30:50,835
+But most importantly,
+send our army for hope.
+
+817
+01:30:51,010 --> 01:30:54,571
+Hope that a king and his men have not
+been wasted to the pages of history.
+
+818
+01:30:55,414 --> 01:30:58,850
+That their courage bonds us together.
+
+819
+01:30:59,151 --> 01:31:02,348
+That we are made stronger
+by their actions...
+
+820
+01:31:03,355 --> 01:31:07,451
+...and that your choices today
+reflect their bravery.
+
+821
+01:31:09,395 --> 01:31:11,056
+Three hundred.
+
+822
+01:31:13,399 --> 01:31:15,230
+We must send them.
+
+823
+01:31:19,004 --> 01:31:20,835
+Moving...
+
+824
+01:31:21,173 --> 01:31:24,074
+...eloquent, passionate.
+
+825
+01:31:24,476 --> 01:31:28,640
+But it doesn't change the fact
+that your husband has brought war upon us.
+
+826
+01:31:28,814 --> 01:31:31,248
+You are wrong.
+Xerxes brought it forth...
+
+827
+01:31:31,417 --> 01:31:33,885
+...and before that,
+his father Darius at Marathon.
+
+828
+01:31:34,053 --> 01:31:35,782
+The Persians will not stop...
+
+829
+01:31:35,955 --> 01:31:39,322
+...until the only shelter we will find
+is rubble and chaos.
+
+830
+01:31:39,725 --> 01:31:43,456
+This chamber needs no
+history lesson, my queen.
+
+831
+01:31:43,963 --> 01:31:46,158
+Then what is the lesson
+you would like to leave?
+
+832
+01:31:46,332 --> 01:31:48,425
+Shall I begin to enumerate all of them?
+
+833
+01:31:48,834 --> 01:31:52,270
+Honor. Duty. Glory.
+
+834
+01:31:52,538 --> 01:31:57,566
+You speak of honor, duty and glory?
+
+835
+01:31:58,877 --> 01:32:00,105
+But what of adultery?
+
+836
+01:32:00,279 --> 01:32:02,747
+- How dare you.
+- How dare I?
+
+837
+01:32:03,182 --> 01:32:06,174
+Watch her carefully.
+
+838
+01:32:06,352 --> 01:32:09,321
+She is a trickster in true form.
+
+839
+01:32:09,488 --> 01:32:12,651
+Do not play with the members
+of this sacred chamber, my queen.
+
+840
+01:32:12,825 --> 01:32:15,919
+Just hours ago,
+you offered yourself to me.
+
+841
+01:32:16,095 --> 01:32:20,532
+Were I a weaker man,
+I would have her scent on me still.
+
+842
+01:32:20,699 --> 01:32:23,691
+- This is outrage.
+- Oh, the hypocrite speaks!
+
+843
+01:32:23,869 --> 01:32:26,861
+Did you not receive a similar payment,
+which you took...
+
+844
+01:32:27,039 --> 01:32:30,270
+...in exchange for her having an audience
+with these noble men?
+
+845
+01:32:30,442 --> 01:32:32,205
+- That is a lie.
+- Is it?
+
+846
+01:32:32,378 --> 01:32:36,144
+Was he not, by your invitation,
+asked to come to the king's bedchamber?
+
+847
+01:32:36,682 --> 01:32:41,312
+The very bed where you attempted
+to negotiate with me so vigorously?
+
+848
+01:32:43,956 --> 01:32:47,414
+You look shocked.
+A bribe of the flesh, gentlemen...
+
+849
+01:32:47,593 --> 01:32:50,892
+...while her husband
+promotes anarchy and war.
+
+850
+01:32:53,832 --> 01:32:55,026
+He speaks truth.
+
+851
+01:32:55,634 --> 01:32:58,831
+Words escape
+even the most cunning tongue...
+
+852
+01:32:59,004 --> 01:33:01,063
+...my little whore queen.
+
+853
+01:33:05,811 --> 01:33:07,642
+What queen-like behavior.
+
+854
+01:33:09,348 --> 01:33:12,476
+Remove her from this chamber
+before she infects us further...
+
+855
+01:33:12,651 --> 01:33:15,643
+...with her inglorious and shabby self.
+
+856
+01:33:22,461 --> 01:33:24,053
+This will not be over quickly.
+
+857
+01:33:25,397 --> 01:33:28,924
+You will not enjoy this.
+I am not your queen.
+
+858
+01:33:51,090 --> 01:33:53,024
+Traitor.
+
+859
+01:33:53,559 --> 01:33:58,360
+Traitor! Traitor! Traitor!
+
+860
+01:33:58,630 --> 01:34:00,894
+Traitor!
+
+861
+01:34:37,936 --> 01:34:43,932
+Leonidas, my compliments
+and congratulations.
+
+862
+01:34:44,109 --> 01:34:47,772
+You surely have turned calamity
+into victory.
+
+863
+01:34:47,946 --> 01:34:50,938
+Despite your insufferable arrogance...
+
+864
+01:34:51,116 --> 01:34:55,280
+...the god-king has come to admire
+Spartan valor and fighting skill.
+
+865
+01:34:56,021 --> 01:34:57,386
+You will make a mighty ally.
+
+866
+01:34:57,556 --> 01:34:59,285
+Yield, Leonidas.
+
+867
+01:35:00,459 --> 01:35:03,326
+Use your reason. Think of your men.
+
+868
+01:35:06,165 --> 01:35:07,792
+I beg you.
+
+869
+01:35:08,367 --> 01:35:10,335
+Listen to your fellow Greek.
+
+870
+01:35:10,502 --> 01:35:14,199
+He can attest
+to the divine one's generosity.
+
+871
+01:35:14,373 --> 01:35:18,833
+Despite your several insults,
+despite your horrid blasphemies...
+
+872
+01:35:19,745 --> 01:35:22,942
+...the lord of hosts
+is prepared to forgive all...
+
+873
+01:35:23,182 --> 01:35:26,208
+...and more, to reward your service.
+
+874
+01:35:26,485 --> 01:35:27,816
+You fight for your lands.
+
+875
+01:35:28,520 --> 01:35:30,351
+Keep them.
+
+876
+01:35:31,056 --> 01:35:33,024
+You fight for Sparta.
+
+877
+01:35:33,192 --> 01:35:37,185
+She will be wealthier and more powerful
+than ever before.
+
+878
+01:35:37,396 --> 01:35:39,330
+You fight for your kingship.
+
+879
+01:35:40,232 --> 01:35:43,201
+You will be proclaimed warlord
+of all Greece...
+
+880
+01:35:43,368 --> 01:35:47,668
+...answerable only
+to the one true master of the world.
+
+881
+01:35:48,040 --> 01:35:52,773
+Leonidas, your victory will be complete...
+
+882
+01:35:52,945 --> 01:35:55,539
+...if you but lay down your arms...
+
+883
+01:35:55,714 --> 01:35:58,877
+...and kneel to holy Xerxes.
+
+884
+01:36:29,381 --> 01:36:34,318
+It's been more than 30 years
+since the wolf in the winter cold.
+
+885
+01:36:34,486 --> 01:36:39,048
+And now, as then,
+it's not fear that grips him...
+
+886
+01:36:39,224 --> 01:36:44,389
+...only restlessness.
+A heightened sense of things.
+
+887
+01:36:45,163 --> 01:36:49,964
+The seaborne breeze coolly kissing
+the sweat at his chest and neck.
+
+888
+01:36:50,135 --> 01:36:51,625
+Gulls cawing...
+
+889
+01:36:51,803 --> 01:36:56,035
+...complaining even as they feast
+on the thousands of floating dead.
+
+890
+01:36:57,643 --> 01:37:02,706
+The steady breathing
+of the 300 at his back...
+
+891
+01:37:03,482 --> 01:37:06,940
+...ready to die for him
+without a moment's pause.
+
+892
+01:37:09,554 --> 01:37:10,919
+Every one of them...
+
+893
+01:37:12,391 --> 01:37:14,325
+...ready to die.
+
+894
+01:37:29,841 --> 01:37:32,776
+His helmet is stifling.
+
+895
+01:37:53,465 --> 01:37:56,298
+His shield is heavy.
+
+896
+01:38:03,909 --> 01:38:05,274
+Your spear.
+
+897
+01:38:14,086 --> 01:38:15,519
+You there...
+
+898
+01:38:15,954 --> 01:38:17,945
+...Ephialtes.
+
+899
+01:38:23,061 --> 01:38:25,325
+May you live forever.
+
+900
+01:38:32,738 --> 01:38:35,036
+Leonidas, your spear.
+
+901
+01:39:42,274 --> 01:39:43,866
+Stelios!
+
+902
+01:39:53,885 --> 01:39:55,477
+Slaughter them!
+
+903
+01:39:58,857 --> 01:40:00,449
+His helmet was stifling.
+
+904
+01:40:00,625 --> 01:40:03,753
+It narrowed his vision,
+and he must see far.
+
+905
+01:40:05,063 --> 01:40:08,931
+His shield was heavy.
+It threw him off balance...
+
+906
+01:40:09,100 --> 01:40:12,763
+...and his target is far away.
+
+907
+01:41:17,335 --> 01:41:21,897
+The old ones say we Spartans are
+descended from Hercules himself.
+
+908
+01:41:23,375 --> 01:41:27,709
+Bold Leonidas gives testament
+to our bloodline.
+
+909
+01:41:27,879 --> 01:41:32,009
+His roar is long and loud.
+
+910
+01:42:02,113 --> 01:42:03,705
+My king.
+
+911
+01:42:15,961 --> 01:42:19,590
+It's an honor to die at your side.
+
+912
+01:42:21,166 --> 01:42:25,660
+It's an honor to have lived at yours.
+
+913
+01:42:46,591 --> 01:42:48,684
+My queen!
+
+914
+01:42:56,935 --> 01:42:58,664
+My wife.
+
+915
+01:43:10,115 --> 01:43:11,912
+My love.
+
+916
+01:45:38,329 --> 01:45:40,456
+"Remember us."
+
+917
+01:45:42,133 --> 01:45:45,569
+As simple an order
+as a king can give.
+
+918
+01:45:47,138 --> 01:45:50,335
+"Remember why we died."
+
+919
+01:45:52,343 --> 01:45:56,370
+For he did not wish tribute or song...
+
+920
+01:45:58,216 --> 01:46:02,414
+...nor monuments,
+nor poems of war and valor.
+
+921
+01:46:05,290 --> 01:46:07,588
+His wish was simple.
+
+922
+01:46:12,964 --> 01:46:15,023
+"Remember us"...
+
+923
+01:46:16,067 --> 01:46:17,796
+...he said to me.
+
+924
+01:46:19,470 --> 01:46:21,665
+That was his hope.
+
+925
+01:46:21,873 --> 01:46:25,604
+Should any free soul
+come across that place...
+
+926
+01:46:26,377 --> 01:46:29,710
+...in all the countless
+centuries yet to be...
+
+927
+01:46:30,148 --> 01:46:32,708
+...may all our voices...
+
+928
+01:46:32,884 --> 01:46:36,945
+...whisper to you
+from the ageless stones.
+
+929
+01:46:37,922 --> 01:46:41,551
+Go tell the Spartans, passerby...
+
+930
+01:46:41,893 --> 01:46:47,763
+...that here, by Spartan law,
+we lie.
+
+931
+01:46:50,535 --> 01:46:53,231
+And so my king died...
+
+932
+01:46:54,105 --> 01:46:56,733
+...and my brothers died...
+
+933
+01:46:59,110 --> 01:47:01,578
+...barely a year ago.
+
+934
+01:47:05,516 --> 01:47:10,749
+Long I pondered my king's
+cryptic talk of victory.
+
+935
+01:47:10,989 --> 01:47:13,617
+Time has proven him wise.
+
+936
+01:47:14,525 --> 01:47:17,551
+For from free Greek to free Greek...
+
+937
+01:47:17,729 --> 01:47:22,325
+...the word was spread
+that bold Leonidas and his 300...
+
+938
+01:47:22,500 --> 01:47:24,491
+...so far from home...
+
+939
+01:47:24,669 --> 01:47:28,070
+...laid down their lives
+not just for Sparta...
+
+940
+01:47:28,239 --> 01:47:32,039
+...but for all Greece
+and the promise this country holds.
+
+941
+01:47:32,944 --> 01:47:38,007
+Now, here on this rugged patch of earth
+called Plataea...
+
+942
+01:47:38,182 --> 01:47:43,176
+...Xerxes' hordes face obliteration!
+
+943
+01:47:44,856 --> 01:47:48,257
+Just there the barbarians huddle...
+
+944
+01:47:48,426 --> 01:47:53,295
+...sheer terror gripping tight
+their hearts...
+
+945
+01:47:53,464 --> 01:47:55,364
+...with icy fingers...
+
+946
+01:47:55,533 --> 01:47:58,764
+...knowing full well
+what merciless horrors they suffered...
+
+947
+01:47:58,937 --> 01:48:01,462
+...at the swords and spears of 300.
+
+948
+01:48:02,874 --> 01:48:08,437
+Yet they stare now across the plain
+at 10,000 Spartans...
+
+949
+01:48:08,613 --> 01:48:11,912
+...commanding 30,000 free Greeks!
+
+950
+01:48:18,723 --> 01:48:22,625
+The enemy outnumber us
+a paltry three to one.
+
+951
+01:48:22,927 --> 01:48:24,918
+Good odds for any Greek.
+
+952
+01:48:25,630 --> 01:48:30,329
+This day, we rescue a world
+from mysticism and tyranny...
+
+953
+01:48:30,501 --> 01:48:34,870
+...and usher in a future
+brighter than anything we can imagine.
+
+954
+01:48:39,310 --> 01:48:40,800
+Give thanks, men...
+
+955
+01:48:41,512 --> 01:48:45,278
+...to Leonidas and the brave 300!.
+
+956
+01:48:45,450 --> 01:48:48,180
+To Victory!
+
+957
+01:56:27,577 --> 01:56:29,568
+[ENGLISH]
+
diff --git a/src/itc/player/tct-player-native.c b/src/itc/player/tct-player-native.c
new file mode 100755 (executable)
index 0000000..470c168
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-player-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/player/tct-player-native.h b/src/itc/player/tct-player-native.h
new file mode 100755 (executable)
index 0000000..254f2f3
--- /dev/null
@@ -0,0 +1,115 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_PLAYER_NATIVE_H__
+#define __TCT_PLAYER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_player_startup(void);
+extern void ITs_player_cleanup(void);
+
+extern int ITc_player_create_destroy_p(void);
+extern int ITc_player_initialize_p(void);
+extern int ITc_player_get_audio_stream_info_p(void);
+extern int ITc_player_set_get_display_rotation_p(void);
+extern int ITc_player_set_display_visible_p(void);
+extern int ITc_player_get_album_art_p(void);
+extern int ITc_player_get_codec_info_p(void);
+extern int ITc_player_capture_video_p(void);
+extern int ITc_player_get_video_size_p(void);
+extern int ITc_player_get_video_stream_info_p(void);
+extern int ITc_player_set_unset_buffering_cb_p(void);
+extern int ITc_player_set_unset_error_cb_p(void);
+extern int ITc_player_set_unset_interrupted_cb_p(void);
+extern int ITc_player_set_unset_subtitle_updated_cb_p(void);
+extern int ITc_player_get_progressive_download_status_p(void);
+extern int ITc_player_get_streaming_download_progress_p(void);
+extern int ITc_player_set_unset_progressive_download_message_cb_p(void);
+extern int ITc_player_get_content_info_p(void);
+extern int ITc_player_set_memory_buffer_p(void);
+extern int ITc_player_set_get_audio_latency_mode_p(void);
+extern int ITc_player_set_get_display_mode_p(void);
+extern int ITc_player_get_duration_p(void);
+extern int ITc_player_set_get_volume_p(void);
+extern int ITc_player_set_looping_p(void);
+extern int ITc_player_set_mute_p(void);
+extern int ITc_player_pause_p(void);
+extern int ITc_player_set_playback_rate_p(void);
+extern int ITc_player_set_sound_type_p(void);
+extern int ITc_player_set_streaming_cookie_p(void);
+extern int ITc_player_set_streaming_user_agent_p(void);
+extern int ITc_player_audio_effect_equalizer_is_available_p(void);
+extern int ITc_player_audio_effect_get_equalizer_bands_count_p(void);
+extern int ITc_player_audio_effect_get_equalizer_band_frequency_range_p(void);
+extern int ITc_player_audio_effect_get_equalizer_band_frequency_p(void);
+extern int ITc_player_audio_effect_get_equalizer_level_range_p(void);
+extern int ITc_player_audio_effect_set_get_equalizer_band_level_p(void);
+extern int ITc_player_audio_effect_set_equalizer_all_bands_p(void);
+extern int ITc_player_audio_effect_equalizer_clear_p(void);
+extern int ITc_player_set_unset_completed_cb_p(void);
+extern int ITc_player_set_unset_media_packet_video_frame_decoded_cb_p(void);
+extern int ITc_player_prepare_async_p(void);
+extern int ITc_player_is_display_visible_p(void);
+extern int ITc_player_set_get_play_position_p(void);
+
+testcase tc_array[] = {
+    {"ITc_player_create_destroy_p", ITc_player_create_destroy_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_initialize_p", ITc_player_initialize_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_get_audio_stream_info_p", ITc_player_get_audio_stream_info_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_get_display_rotation_p", ITc_player_set_get_display_rotation_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_display_visible_p", ITc_player_set_display_visible_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_get_album_art_p", ITc_player_get_album_art_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_get_codec_info_p", ITc_player_get_codec_info_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_capture_video_p", ITc_player_capture_video_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_get_video_size_p", ITc_player_get_video_size_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_get_video_stream_info_p", ITc_player_get_video_stream_info_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_unset_buffering_cb_p", ITc_player_set_unset_buffering_cb_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_unset_error_cb_p", ITc_player_set_unset_error_cb_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_unset_interrupted_cb_p", ITc_player_set_unset_interrupted_cb_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_unset_subtitle_updated_cb_p", ITc_player_set_unset_subtitle_updated_cb_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_get_progressive_download_status_p", ITc_player_get_progressive_download_status_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_get_streaming_download_progress_p", ITc_player_get_streaming_download_progress_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_unset_progressive_download_message_cb_p", ITc_player_set_unset_progressive_download_message_cb_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_get_content_info_p", ITc_player_get_content_info_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_memory_buffer_p", ITc_player_set_memory_buffer_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_get_audio_latency_mode_p", ITc_player_set_get_audio_latency_mode_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_get_display_mode_p", ITc_player_set_get_display_mode_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_get_duration_p", ITc_player_get_duration_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_get_volume_p", ITc_player_set_get_volume_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_looping_p", ITc_player_set_looping_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_mute_p", ITc_player_set_mute_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_pause_p", ITc_player_pause_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_playback_rate_p", ITc_player_set_playback_rate_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_sound_type_p", ITc_player_set_sound_type_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_streaming_cookie_p", ITc_player_set_streaming_cookie_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_streaming_user_agent_p", ITc_player_set_streaming_user_agent_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_audio_effect_equalizer_is_available_p", ITc_player_audio_effect_equalizer_is_available_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_audio_effect_get_equalizer_bands_count_p", ITc_player_audio_effect_get_equalizer_bands_count_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_audio_effect_get_equalizer_band_frequency_range_p", ITc_player_audio_effect_get_equalizer_band_frequency_range_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_audio_effect_get_equalizer_band_frequency_p", ITc_player_audio_effect_get_equalizer_band_frequency_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_audio_effect_get_equalizer_level_range_p", ITc_player_audio_effect_get_equalizer_level_range_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_audio_effect_set_get_equalizer_band_level_p", ITc_player_audio_effect_set_get_equalizer_band_level_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_audio_effect_set_equalizer_all_bands_p", ITc_player_audio_effect_set_equalizer_all_bands_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_audio_effect_equalizer_clear_p", ITc_player_audio_effect_equalizer_clear_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_unset_completed_cb_p", ITc_player_set_unset_completed_cb_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_unset_media_packet_video_frame_decoded_cb_p", ITc_player_set_unset_media_packet_video_frame_decoded_cb_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_prepare_async_p", ITc_player_prepare_async_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_is_display_visible_p", ITc_player_is_display_visible_p, ITs_player_startup, ITs_player_cleanup},
+    {"ITc_player_set_get_play_position_p", ITc_player_set_get_play_position_p, ITs_player_startup, ITs_player_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_PLAYER_NATIVE_H__
diff --git a/src/itc/player/v.mp4 b/src/itc/player/v.mp4
new file mode 100755 (executable)
index 0000000..9737271
Binary files /dev/null and b/src/itc/player/v.mp4 differ
diff --git a/src/itc/privilege-info/CMakeLists.txt b/src/itc/privilege-info/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..9d08dcf
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "privilege-info")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "privilege-info")
+SET(TC_SOURCES
+       ITs-privilege-info-common.c
+       ITs-privilege-info.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-security-privilege-manager
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+       capi-security-privilege-manager
+       privilege-info
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/privilege-info/ITs-privilege-info-common.c b/src/itc/privilege-info/ITs-privilege-info-common.c
new file mode 100755 (executable)
index 0000000..bf84e0a
--- /dev/null
@@ -0,0 +1,139 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-privilege-info-common.h"
+
+/** @addtogroup itc-privilege-info
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stPrivilegeInfoStartTime;
+extern struct mallinfo g_stPrivilegeInfoMemInfo;
+
+
+/**
+* @function            PrivilegeinfoGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* PrivilegeinfoGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+       case PRVINFO_ERROR_NONE: szErrorVal = "PRVINFO_ERROR_NONE" ; break;
+       case PRVINFO_ERROR_OUT_OF_MEMORY: szErrorVal = "PRVINFO_ERROR_OUT_OF_MEMORY" ; break;
+       case PRVINFO_ERROR_INVALID_PARAMETER: szErrorVal = "PRVINFO_ERROR_INVALID_PARAMETER" ; break;
+       case PRVINFO_ERROR_INTERNAL_ERROR: szErrorVal = "PRVINFO_ERROR_INTERNAL_ERROR" ; break;
+       default : szErrorVal = "PRVINFO_ERROR_UNKNOWN" ; break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function                    PrivilegeinfoGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void PrivilegeinfoGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stPrivilegeInfoMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stPrivilegeInfoMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stPrivilegeInfoMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+
+/**
+* @function                    PrivilegeinfoGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+void PrivilegeinfoGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stPrivilegeInfoMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           PrivilegeinfoExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void PrivilegeinfoExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stPrivilegeInfoStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stPrivilegeInfoStartTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           PrivilegeinfoGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stPrivilegeInfoStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void PrivilegeinfoGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stPrivilegeInfoStartTime, NULL);
+#endif
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/privilege-info/ITs-privilege-info-common.h b/src/itc/privilege-info/ITs-privilege-info-common.h
new file mode 100755 (executable)
index 0000000..d7103c9
--- /dev/null
@@ -0,0 +1,124 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_PRIVILEGE_INFO_COMMON_H__
+#define _ITS_PRIVILEGE_INFO_COMMON_H__
+
+//Add test package related includes here
+
+#include "assert.h"
+#include <privilege_information.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/** @addtogroup itc-privilege-info
+*  @ingroup itc
+*  @{
+*/
+
+#define ERR_LOG                                "/tmp/tclog"
+FILE *g_fpLog;
+
+
+#define PATH_LEN                                                       1024
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+
+struct timeval g_stPrivilegeInfoStartTime;
+struct mallinfo g_stPrivilegeInfoMemInfo;
+
+bool g_bIsPrivilegeInfoInitialized;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][Privilege-Info_ITc] ***** Starting test : %s\n", __LINE__,__FUNCTION__);\
+       if ( !g_bIsPrivilegeInfoInitialized )\
+       {\
+               FPRINTF("\\n[Line : %d][Privilege-Info_ITc] Precondition of key-manager failed so leaving test\n",__LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog){\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [Privilege-Info_ITc] %s_MemoryLeakStatus - %s\n", __LINE__, #api, memLog);\
+       }\
+}
+       
+               
+#define PRINT_SPEED_LOG(api, szSpeedLog)\
+       if(strlen(szSpeedLog) > 0) \
+       {\
+               szSpeedLog[strlen(szSpeedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [Privilege-Info_ITc] %s_TimeInMicrosec- %s\n", __LINE__, #api, szSpeedLog);\
+       }\
+
+#define VALIDATE_RESULT_API(nFailCount, strTargetApiName, ptrMem1, ptrMem2) \
+       if ( nFailCount > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][Privilege-Info_ITc] %s failed %d times out of %d times\n", __LINE__, strTargetApiName, nFailCount, MAX_COUNT);\
+               if (ptrMem1 != NULL)\
+               {\
+                       free(ptrMem1);\
+                       ptrMem1 = NULL;\
+               }\
+               if (ptrMem2 != NULL)\
+               {\
+                       free(ptrMem2);\
+                       ptrMem2 = NULL;\
+               }\
+               return 1;\
+       }\
+
+#define FREE_MEMORY_2ARGS(szApi1, szApi2)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+
+
+char* PrivilegeinfoGetError(int nRet);
+void PrivilegeinfoGetMemStatus(char *pszAPIMemory);
+void PrivilegeinfoGetMemAllocation();
+void PrivilegeinfoExecutionDelay(char* pszAPITime);
+void PrivilegeinfoGetTimeOfDay();
+
+/** @} */
+#endif  //_ITS_PRIVILEGE_INFO_H_
diff --git a/src/itc/privilege-info/ITs-privilege-info.c b/src/itc/privilege-info/ITs-privilege-info.c
new file mode 100755 (executable)
index 0000000..47be6c7
--- /dev/null
@@ -0,0 +1,343 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-privilege-info-common.h"
+
+/** @addtogroup itc-privilege-info
+*  @ingroup itc
+*  @{
+*/
+
+//& set: PrivilegeInfo
+
+void ITs_privilege_info_startup(void)
+{
+       g_bIsPrivilegeInfoInitialized = true;
+
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       return;
+}
+
+void ITs_privilege_info_cleanup(void)
+{
+       return;
+}
+
+
+/** @addtogroup itc-privilege-info-testcases
+*  @brief              Integration testcases for module privilege-info
+*  @ingroup    itc-privilege-info
+*  @{
+*/
+
+//& purpose: Gets the discription of given privilege
+//& type: auto
+/**
+* @testcase                    ITc_privilege_info_get_description_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets the discription of given privilege
+* @scenario                            startup function
+* @apicovered                  privilege_info_get_description
+* @passcase                            When privilege_info_get_description api return 0
+* @failcase                            If privilege_info_get_description api returns non zero value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_privilege_info_get_description_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal = -1;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       const char *pszApiVersion  = "2.3";
+       const char *pszPrivilege = "http://tizen.org/privilege/account.read";
+       char* pszDescription = NULL; 
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+
+               PrivilegeinfoGetMemAllocation();
+
+               PrivilegeinfoGetTimeOfDay();
+               nRetVal = privilege_info_get_description(pszApiVersion, pszPrivilege, &pszDescription);//target api
+               PrivilegeinfoExecutionDelay(pszSpeedLog);
+               PrivilegeinfoGetMemStatus(pszMemLog);
+
+               if(nRetVal != PRVINFO_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get ckmc_save_key on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)PrivilegeinfoGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+               free(pszDescription);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "privilege_info_get_description", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("privilege_info_get_description", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("privilege_info_get_description", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Get the discription of given privilege 
+//& type: auto
+/**
+* @testcase                    ITc_privilege_info_get_description_by_pkgtype_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Get the discription of given privilege 
+* @scenario                            NA
+* @apicovered                  get_description_by_pkgtype
+* @passcase                            if get_description_by_pkgtype return 0
+* @failcase                            if get_description_by_pkgtype return non zero
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_privilege_info_get_description_by_pkgtype_p(void)
+{
+       START_TEST;
+
+       char arrPkgTypes[][100] = {"PRVINFO_PACKAGE_TYPE_NATIVE", "PRVINFO_PACKAGE_TYPE_WEB"};
+       int nEnumSize = 2;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal = -1;
+
+       
+#if MEMORY_CHECK       
+       pszMemLog = calloc(MEMLOG * MAX_COUNT *nEnumSize , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT *nEnumSize, sizeof(char));
+#endif
+
+       int i = 0;
+       for(i = 0; i<nEnumSize ; i++)
+       {
+               char *pPkgType = arrPkgTypes[i];
+
+               const char *pszApiVersion  = "2.3";
+               const char *pszPrivilege = "http://tizen.org/privilege/account.read";
+               char* pszDescription = NULL; 
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       PrivilegeinfoGetMemAllocation();
+                       PrivilegeinfoGetTimeOfDay();
+                       nRetVal = privilege_info_get_description_by_pkgtype(pPkgType,pszApiVersion,pszPrivilege,&pszDescription);// Target APIs
+                       PrivilegeinfoExecutionDelay(pszSpeedLog);
+                       PrivilegeinfoGetMemStatus(pszMemLog);
+
+                       if(nRetVal != PRVINFO_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get privilege_info_get_description_by_pkgtype on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)PrivilegeinfoGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+                       free(pszDescription);
+               }
+       }
+               
+       VALIDATE_RESULT_API(nFailCount, "privilege_info_get_description_by_pkgtype", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("privilege_info_get_description_by_pkgtype", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("privilege_info_get_description_by_pkgtype", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Gets the display name of given privilege
+//& type: auto
+/**
+* @testcase                    ITc_privilege_info_get_display_name_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets the display name of given privilege
+* @scenario                            startup function
+* @apicovered                  privilege_info_get_display_name
+* @passcase                            When privilege_info_get_display_name api return 0
+* @failcase                            If privilege_info_get_display_name api returns non zero value
+* @precondition                        NA
+* @postcondition               NA.
+*/
+int ITc_privilege_info_get_display_name_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal = -1;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       
+       const char *pszApiVersion  = "2.3";
+       const char *pszPrivilege = "http://tizen.org/privilege/account.read";
+       char* pszDisplayName = NULL;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+
+               PrivilegeinfoGetMemAllocation();
+
+               PrivilegeinfoGetTimeOfDay();
+               nRetVal = privilege_info_get_display_name(pszApiVersion, pszPrivilege, &pszDisplayName);//target api
+               PrivilegeinfoExecutionDelay(pszSpeedLog);
+               PrivilegeinfoGetMemStatus(pszMemLog);
+
+               if(nRetVal != PRVINFO_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get privilege_info_get_display_name on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)PrivilegeinfoGetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+               free(pszDisplayName);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "privilege_info_get_display_name", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("privilege_info_get_display_name", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("privilege_info_get_display_name", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Gets the display name of the given privilege.
+//& type: auto
+/**
+* @testcase                    ITc_privilege_info_get_display_name_by_pkgtype_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets the display name of the given privilege.
+* @scenario                            NA
+* @apicovered                  get_display_name
+* @passcase                            if get_display_name return 0
+* @failcase                            if get_display_name return non zero
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_privilege_info_get_display_name_by_pkgtype_p(void)
+{
+       START_TEST;
+
+       char arrPkgTypes[][100] = {"PRVINFO_PACKAGE_TYPE_NATIVE", "PRVINFO_PACKAGE_TYPE_WEB"};
+       int nEnumSize = 2;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       int nRetVal = -1;
+
+       
+#if MEMORY_CHECK       
+       pszMemLog = calloc(MEMLOG * MAX_COUNT *nEnumSize , sizeof(char));
+#endif
+#if SPEED_CHECK        
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT *nEnumSize, sizeof(char));
+#endif
+
+       int i = 0;
+       for(i = 0; i<nEnumSize ; i++)
+       {
+               char *pPkgType = arrPkgTypes[i];
+
+               const char *pszApiVersion  = "2.3";
+               const char *pszPrivilege = "http://tizen.org/privilege/account.read";
+               char* pszDisplayName = NULL;
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       PrivilegeinfoGetMemAllocation();
+                       PrivilegeinfoGetTimeOfDay();
+                       nRetVal = privilege_info_get_display_name_by_pkgtype(pPkgType,pszApiVersion,pszPrivilege,&pszDisplayName);// Target APIs
+                       PrivilegeinfoExecutionDelay(pszSpeedLog);
+                       PrivilegeinfoGetMemStatus(pszMemLog);
+
+                       if(nRetVal != PRVINFO_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][Key-Manager_ITc] Fail to get privilege_info_get_display_name_by_pkgtype on iteration %d\n, error returned = %s ", __LINE__, nLoopCount, (char *)PrivilegeinfoGetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+                       free(pszDisplayName);
+               }
+               
+       }
+               
+       VALIDATE_RESULT_API(nFailCount, "privilege_info_get_display_name_by_pkgtype", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("privilege_info_get_display_name_by_pkgtype", pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("privilege_info_get_display_name_by_pkgtype", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszSpeedLog, pszMemLog);
+
+       return 0;
+}
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/privilege-info/tct-privilege-info-native.c b/src/itc/privilege-info/tct-privilege-info-native.c
new file mode 100755 (executable)
index 0000000..3d33d61
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-privilege-info-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/privilege-info/tct-privilege-info-native.h b/src/itc/privilege-info/tct-privilege-info-native.h
new file mode 100755 (executable)
index 0000000..9ef4dae
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_PRIVILEGE_INFO_NATIVE_H__
+#define __TCT_PRIVILEGE_INFO_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_privilege_info_startup(void);
+extern void ITs_privilege_info_cleanup(void);
+
+extern int ITc_privilege_info_get_description_p(void);
+extern int ITc_privilege_info_get_description_by_pkgtype_p(void);
+extern int ITc_privilege_info_get_display_name_p(void);
+extern int ITc_privilege_info_get_display_name_by_pkgtype_p(void);
+
+testcase tc_array[] = {
+    {"ITc_privilege_info_get_description_p", ITc_privilege_info_get_description_p, ITs_privilege_info_startup, ITs_privilege_info_cleanup},
+    {"ITc_privilege_info_get_description_by_pkgtype_p", ITc_privilege_info_get_description_by_pkgtype_p, ITs_privilege_info_startup, ITs_privilege_info_cleanup},
+    {"ITc_privilege_info_get_display_name_p", ITc_privilege_info_get_display_name_p, ITs_privilege_info_startup, ITs_privilege_info_cleanup},
+    {"ITc_privilege_info_get_display_name_by_pkgtype_p", ITc_privilege_info_get_display_name_by_pkgtype_p, ITs_privilege_info_startup, ITs_privilege_info_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_PRIVILEGE_INFO_NATIVE_H__
diff --git a/src/itc/push/CMakeLists.txt b/src/itc/push/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..044b83d
--- /dev/null
@@ -0,0 +1,41 @@
+SET(PKG_NAME "push")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "push")
+SET(TC_SOURCES
+       ITs-push-common.c
+       ITs-push-service.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-base-common
+       capi-appfw-application
+       push
+       libcurl
+       aul
+       json-glib-1.0
+       capi-system-info
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/push/ITs-push-common.c b/src/itc/push/ITs-push-common.c
new file mode 100755 (executable)
index 0000000..bc18f70
--- /dev/null
@@ -0,0 +1,857 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-push-common.h"
+
+/** @addtogroup itc-push
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stPushStartTime;
+extern struct mallinfo g_stPushMemInfo;
+
+//Add helper function definitions here
+
+/**
+ * @function           PushCheckSystemInfoFeatureSupported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool PushCheckSystemInfoFeatureSupported(char* pszKey)
+{
+       if(NULL == pszKey)
+       {
+               FPRINTF("\\n[Line : %d][Wifi_ITc] Null key value passed to function : PushCheckSystemInfoFeatureSupported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Wifi_ITc] system_info_get_platform_bool returned (error = %s) for (key = %s)",__LINE__, PushSystemInfoGetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if(false == bValue)
+       {
+               FPRINTF("\\n[Line : %d][Wifi_ITc] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Wifi_ITc] system_info_get_platform_bool returned Supported status feature for (key = %s)",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           PushSystemInfoGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* PushSystemInfoGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               case SYSTEM_INFO_ERROR_NONE:                                    szErrorVal = "SYSTEM_INFO_ERROR_NONE";                                          break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:               szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER";                     break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                                szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR";                                      break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:                   szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY";                         break;
+               default:                                                                                szErrorVal = "Unknown Error";                                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+ * @function           PushGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* PushGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               case PUSH_ERROR_NONE:                                   szErrorVal = "PUSH_ERROR_NONE";                                 break;
+               case PUSH_ERROR_OUT_OF_MEMORY:                  szErrorVal = "PUSH_ERROR_OUT_OF_MEMORY";                break;
+               case PUSH_ERROR_INVALID_PARAMETER:              szErrorVal = "PUSH_ERROR_INVALID_PARAMETER";    break;
+               case PUSH_ERROR_NOT_CONNECTED:                  szErrorVal = "PUSH_ERROR_NOT_CONNECTED";                break;
+               case PUSH_ERROR_NO_DATA:                                szErrorVal = "PUSH_ERROR_NO_DATA";                              break;
+               case PUSH_ERROR_OPERATION_FAILED:               szErrorVal = "PUSH_ERROR_OPERATION_FAILED";             break;
+               case PUSH_ERROR_PERMISSION_DENIED:              szErrorVal = "PUSH_ERROR_PERMISSION_DENIED";    break;
+               default:                                                                szErrorVal = "Unknown Error";                                   break;
+       }
+       return szErrorVal;
+}
+
+
+/**
+ * @function           PushServiceGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* PushServiceGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               case PUSH_SERVICE_ERROR_NONE:                           szErrorVal = "PUSH_SERVICE_ERROR_NONE";                                 break;
+               case PUSH_SERVICE_ERROR_OUT_OF_MEMORY:          szErrorVal = "PUSH_SERVICE_ERROR_OUT_OF_MEMORY";                break;
+               case PUSH_SERVICE_ERROR_INVALID_PARAMETER:      szErrorVal = "PUSH_SERVICE_ERROR_INVALID_PARAMETER";    break;
+               case PUSH_SERVICE_ERROR_NOT_CONNECTED:          szErrorVal = "PUSH_SERVICE_ERROR_NOT_CONNECTED";                break;
+               case PUSH_SERVICE_ERROR_NO_DATA:                        szErrorVal = "PUSH_SERVICE_ERROR_NO_DATA";                              break;
+               case PUSH_SERVICE_ERROR_OPERATION_FAILED:       szErrorVal = "PUSH_SERVICE_ERROR_OPERATION_FAILED";             break;
+               case PUSH_SERVICE_ERROR_PERMISSION_DENIED:      szErrorVal = "PUSH_SERVICE_ERROR_PERMISSION_DENIED";    break;
+               default:                                                                        szErrorVal = "UNKNOWN_ERROR";                                                   break;
+       }
+       return szErrorVal;
+}
+
+
+/**
+* @function                    PushGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void PushGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stPushMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stPushMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stPushMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    PushGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void PushGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stPushMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           PushExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void PushExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stPushStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stPushStartTime.tv_usec;
+                       
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+               
+#endif
+}
+
+/**
+ * @function           PushGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stPushStartTime
+ * @parameter          NA
+ * @return                     NA
+ *
+ */ 
+void PushGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stPushStartTime, NULL);
+#endif
+}
+
+/**
+ * @function           Timeout
+ * @description                Called if some callback is not invoked for a particular timeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */ 
+gboolean Timeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+       }
+       FPRINTF( "[Line : %d] [Push_ITc]Callback Timeout \\n", __LINE__);
+       return false;
+}
+
+/**
+ * @function           CurlResponseCallback
+ * @description                get result from json
+ * @parameter          char *ptr, size_t size, size_t nmemb, void *userdata
+ * @return                     size of response
+ */
+size_t CurlResponseCallback(char *ptr, size_t size, size_t nmemb, void *userdata)
+{
+       int nRet = 0;
+       int *curl_response = (int *) userdata;
+       char response_string[CURL_RES_MAX_STRING+1];
+       strncpy(response_string, ptr, CURL_RES_MAX_STRING);
+
+       if (CURL_RES_MAX_STRING < strlen(ptr)) {
+               response_string[CURL_RES_MAX_STRING] = '\0';
+       }
+
+       nRet = GetResultFromJson(response_string);
+       if (!nRet) 
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Request successfully sent \\n", __LINE__);
+               *curl_response = 0;
+       }
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] CurlResponseCallback Response string is = %s \\n", __LINE__, response_string);
+#endif
+       return size*nmemb;
+}
+
+/**
+ * @function           GetResultFromJson
+ * @description                get result from json
+ * @parameter          char* json_string
+ * @return                     0 for success, -1 for failure
+ */
+int GetResultFromJson(char* json_string)
+{
+       gint i = 0;
+       int retval = 0;
+       JsonParser *parser;
+       gboolean ret = FALSE;
+
+       if (NULL == json_string)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] json_string is NULL \\n", __LINE__);
+               return -1;
+       }
+       parser = json_parser_new();
+       
+       if(parser == NULL)
+       {
+#if DEBUG
+               FPRINTF( "[Line : %d] [Push_ITc] json parsor is NULL\\n", __LINE__);
+#endif
+               goto FINALLY;
+       }
+       
+       if (!JSON_IS_PARSER(parser))
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Parser creation failed. \\n", __LINE__);
+               goto FINALLY;
+       }
+       
+       ret = json_parser_load_from_data(parser, json_string, strlen(json_string), NULL);
+       if (FALSE == ret)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Parser load failed \\n", __LINE__);
+               goto FINALLY;
+       }
+       
+       JsonObject *objnode = json_node_get_object(json_parser_get_root(parser));
+       if (objnode == NULL)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] object node is NULL \\n", __LINE__);
+               goto FINALLY;
+       }
+       
+       JsonNode* node = json_object_get_member(objnode, "results");
+       if (node == NULL)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Node is null \\n", __LINE__);
+               goto FINALLY;
+       }
+       
+       JsonArray* jsonArray = json_node_get_array(node);
+       if (jsonArray == NULL)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Json Array is NULL \\n", __LINE__);
+               goto FINALLY;
+       }
+
+       int length = json_array_get_length(jsonArray);
+       for (i = 0; i < length; i++)
+       {
+               JsonNode *jsonNode = json_array_get_element(jsonArray, i);
+               JsonObject* obj = json_node_get_object(jsonNode);
+               char *status_msg = NULL;
+
+               retval = json_object_get_int_member(obj, "statusCode");
+               status_msg = g_strndup(json_object_get_string_member(obj, "statusMsg"), 100);
+               
+               if (status_msg)
+               {
+                       g_free(status_msg);
+               }
+       }
+       
+       FINALLY:
+       {
+               g_object_unref (parser);
+       }
+       return retval == 1000 ? 0 : -1;
+}
+
+/**
+ * @function           CurlDebugCallback
+ * @description                get result from json
+ * @parameter          CURL *handle, curl_infotype type, char *data, size_t size, void *userptr
+ * @return                     0 for success, -1 for failure
+ */
+int CurlDebugCallback(CURL *handle, curl_infotype type, char *data, size_t size, void *userptr)
+{
+       const char *text;
+       (void)handle; /* prevent compiler warning */
+       
+       switch (type)
+       {
+               case CURLINFO_TEXT:
+#if DEBUG
+                       FPRINTF( "[Line : %d] [Push_ITc] Info = %s \\n", __LINE__, data);
+#endif
+                       return 0;
+               default: /* in case a new one is introduced to shock us */
+                       return 0;
+               case CURLINFO_HEADER_OUT:
+                       text = "=> Send header";
+                       break;
+               case CURLINFO_DATA_OUT:
+                       text = "=> Send data";
+                       break;
+               case CURLINFO_SSL_DATA_OUT:
+                       text = "=> Send SSL data";
+                       break;
+               case CURLINFO_HEADER_IN:
+                       text = "<= Recv header";
+                       break;
+               case CURLINFO_DATA_IN:
+                       text = "<= Recv data";
+                       break;
+               case CURLINFO_SSL_DATA_IN:
+                       text = "<= Recv SSL data";
+                       break;
+       }
+#if DEBUG
+         FPRINTF( "[Line : %d] [Push_ITc] Info = %s \\n", __LINE__, text);
+#endif
+         return 0;
+}
+
+/**
+ * @function           SendNotificationUsingCurl
+ * @description                Send notification data to server using curl
+ * @parameter          OutgoingNotification *pstNotificationInfo, bool verbose
+ * @return                     response from curl API
+ */
+int SendNotificationUsingCurl(OutgoingNotification *pstNotificationInfo, bool verbose)
+{
+
+       char app_id_str[23];
+       char app_secret_str[50];
+
+       char *server_address = NULL;
+       char body[MAX_BODY_LENGTH];
+       int current_size = 0;
+
+       char *temp_str= NULL;
+
+       struct curl_slist *header_list = NULL;
+       CURL *curl_handle;
+       CURLcode curl_err;
+
+       int curl_response = PUSH_ERROR_NOT_CONNECTED;
+       int ret =0;
+
+       // Determine RQM server
+       if (strncmp(pstNotificationInfo->reg_id, "00", 2) == 0) {
+               server_address = "https://useast.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "01", 2) == 0) {
+               server_address = "https://uswest.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "02", 2) == 0) {
+               server_address = "https://apsoutheast.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "03", 2) == 0) {
+               server_address = "https://euwest.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "04", 2) == 0) {
+               server_address = "https://apnortheast.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "05", 2) == 0) {
+               server_address = "https://apkorea.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "06", 2) == 0) {
+               server_address = "https://apchina.push.samsungosp.com.cn:8088/spp/pns/api/push";
+       }
+       else {
+               FPRINTF( "[Line : %d] [Push_ITc] REG_ID has a wrong prefix \\n", __LINE__);
+       }
+       
+
+       ////////////////////////////////////
+       // Create JSON query from here    //
+       ////////////////////////////////////
+
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "{");
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       // Add regID and requestID
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "\"regID\":\"%s\",\"requestID\":\"%s\"", pstNotificationInfo->reg_id, pstNotificationInfo->request_id);
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       // Add time_stamp
+       if (pstNotificationInfo->time_stamp>0)
+       {
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               ",\"timeStamp\":\"%ld\"", pstNotificationInfo->time_stamp);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       // Add type
+       if (pstNotificationInfo->type > 0 )
+       {
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               ",\"type\":\"%d\"", pstNotificationInfo->type);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       // Add delayDate
+       if (pstNotificationInfo->delay >0 )
+       {
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               ",\"delayDate\":\"%d\"", pstNotificationInfo->delay);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       // Add sender
+       if (pstNotificationInfo->sender)
+       {
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               ",\"sender\":\"%s\"", pstNotificationInfo->sender);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+       
+       // Add session info field
+       if (pstNotificationInfo->session_info)
+       {
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               ",\"sessionInfo\":\"%s\"", pstNotificationInfo->session_info);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+       
+       // Add message
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       ",\"message\":\"");
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       switch (pstNotificationInfo->action) {
+               case PUSH_ACTION_ALERT:
+                       temp_str = "ALERT";
+                       break;
+
+               case PUSH_ACTION_DISCARD:
+                       temp_str = "DISCARD";
+                       break;
+
+               case PUSH_ACTION_LAUNCH:
+                       temp_str = "LAUNCH";
+                       break;
+
+               case PUSH_ACTION_SILENT:
+                       temp_str = "SILENT";
+                       break;
+               default :
+                       FPRINTF( "[Line : %d] [Push_ITc] Invalid action \\n", __LINE__);
+                       return PUSH_SERVICE_ERROR_INVALID_PARAMETER;
+       }
+
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "action=%s", temp_str);
+
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       if (pstNotificationInfo->action == PUSH_ACTION_ALERT) {
+
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "&alartMessage=%s", pstNotificationInfo->alert_message);
+
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       if (pstNotificationInfo->badge_option != PUSH_BADGE_OPTION_NONE) {
+
+               switch (pstNotificationInfo->badge_option) {
+                       case PUSH_BADGE_OPTION_INCREASE:
+                               temp_str = "INCREASE";
+                               break;
+
+                       case PUSH_BADGE_OPTION_DECREASE:
+                               temp_str = "DECREASE";
+                               break;
+
+                       case PUSH_BADGE_OPTION_SET:
+                               temp_str = "SET";
+                               break;
+
+                       default:
+                               FPRINTF( "[Line : %d] [Push_ITc] Invalid badge option \\n", __LINE__);
+                               return PUSH_SERVICE_ERROR_INVALID_PARAMETER;
+                               break;
+               }
+
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               "&badgeOption=%s&badgeNumber=%d", temp_str, pstNotificationInfo->badge_number);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "\"");
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       // Add appData
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       ",\"appData\":\"%s\"", pstNotificationInfo->app_data);
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       // Close the json query
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "}");
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow \\n", __LINE__);
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+       
+       ///////////////////////////////////////
+       // End of creating the JSON query    //
+       ///////////////////////////////////////
+
+       // Send noti to the RQM server using LIBCURL
+       do {
+
+               // Initiate the CURL handle
+               curl_handle = curl_easy_init();
+
+               ret = snprintf(app_id_str, sizeof(app_id_str), "appID:%s", pstNotificationInfo->app_id);
+               if (ret == sizeof(app_id_str)) {
+                       FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow-app_id \\n", __LINE__);
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+
+               ret = snprintf(app_secret_str, sizeof(app_secret_str), "appSecret:%s", pstNotificationInfo->app_secret);
+               if (ret == sizeof(app_secret_str)) {
+                       FPRINTF( "[Line : %d] [Push_ITc] Buffer overflow-app_secret \\n", __LINE__);
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+
+               // Print the headers
+               
+               // Add the headers to the CURL handle
+               header_list = curl_slist_append(header_list, app_id_str);
+               header_list = curl_slist_append(header_list, app_secret_str);
+               curl_err = curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, header_list);
+               if ( curl_err != CURLE_OK ) {
+                       FPRINTF( "[Line : %d] [Push_ITc] CURL_ERR:header_list [%d] \\n", __LINE__, curl_err);
+                       ret = PUSH_SERVICE_ERROR_OPERATION_FAILED;
+                       break;
+               }
+
+               // Link the data to post
+               curl_err = curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDS, body);
+               if ( curl_err != CURLE_OK ) {
+                       FPRINTF( "[Line : %d] [Push_ITc] CURL_ERR:body [%d] \\n", __LINE__, curl_err);
+                       ret = PUSH_SERVICE_ERROR_OPERATION_FAILED;
+                       break;
+               }
+
+               // Link the server address
+               curl_err = curl_easy_setopt(curl_handle, CURLOPT_URL, server_address);
+               if ( curl_err != CURLE_OK ) {
+                       FPRINTF( "[Line : %d] [Push_ITc] CURL_ERR:server_address [%d] \\n", __LINE__, curl_err);
+                       ret = PUSH_SERVICE_ERROR_OPERATION_FAILED;
+                       break;
+               }
+
+               curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, 0L);
+               curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, CurlResponseCallback);
+               curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, &curl_response);
+               curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT_MS, 8000);
+               
+               // Display DEBUG info
+               if (verbose)
+               {
+                       curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1L);
+                       curl_easy_setopt(curl_handle, CURLOPT_DEBUGFUNCTION, CurlDebugCallback);
+               }
+
+               // Perform HTTP POST using CURL
+               curl_err = curl_easy_perform(curl_handle);
+               if ( curl_err != CURLE_OK ) {
+                       FPRINTF( "[Line : %d] [Push_ITc] CURL_ERR: perform [%d] \\n", __LINE__, curl_err);
+                       ret = PUSH_SERVICE_ERROR_OPERATION_FAILED;
+                       break;
+               }
+
+               long lCodeReturned = 0L;
+               curl_easy_getinfo(curl_handle, CURLINFO_RESPONSE_CODE, &lCodeReturned);
+#if DEBUG
+               FPRINTF( "[Line : %d] [Push_ITc] server status = %ld \\n", __LINE__, lCodeReturned);
+#endif
+               ret = curl_response;
+
+       } while (0);
+
+       curl_slist_free_all(header_list);
+       curl_easy_cleanup(curl_handle);
+
+       return ret;
+}
+
+/**
+ * @function           SendPushDataToServer
+ * @description                Send notification data
+ * @parameter          const char *push_app_id, const char *app_secret, const char *reg_id, const char *request_id,
+ *                                     const char *app_data, int app_data_size, const char *alert_message, push_action_e action,
+ *                                     push_badge_option_e badge_option, int badge_number, long time_stamp, int type, int delay,
+ *                                     const char *sender, bool verbose
+ * @return                     response from curl API
+ */
+int SendPushDataToServer(const char *push_app_id, const char *app_secret, const char *reg_id, const char *request_id,
+                                       const char *app_data, int app_data_size, const char *alert_message, push_action_e action,
+                                       push_badge_option_e badge_option, int badge_number, long time_stamp, int type, int delay,
+                                       const char *sender, bool verbose)
+{
+       int ret;
+       OutgoingNotification stOutgoingData;
+
+       stOutgoingData.app_id = push_app_id;
+       stOutgoingData.app_secret = app_secret;
+       stOutgoingData.reg_id = reg_id;
+       stOutgoingData.request_id = request_id;
+       stOutgoingData.app_data = app_data;
+       stOutgoingData.app_data_size = app_data_size;
+       stOutgoingData.alert_message = alert_message;
+       stOutgoingData.action = action;
+       stOutgoingData.badge_option = badge_option;
+       stOutgoingData.badge_number = badge_number;
+       stOutgoingData.time_stamp = time_stamp;
+       stOutgoingData.type = type;
+       stOutgoingData.delay = delay;
+       stOutgoingData.sender = sender;
+       stOutgoingData.session_info = "001001";
+
+       if (CheckOutgoingNotification(&stOutgoingData))
+       {
+               return PUSH_SERVICE_ERROR_INVALID_PARAMETER;
+       }
+
+       ret = SendNotificationUsingCurl(&stOutgoingData, verbose);
+
+       return ret;
+}
+
+/**
+ * @function           CheckOutgoingNotification
+ * @description                check notification data
+ * @parameter          OutgoingNotification *pstNotificationInfo
+ * @return                     response from curl API
+ */
+int CheckOutgoingNotification(OutgoingNotification *pstNotificationInfo)
+{
+       int ret;
+
+       // NULL check
+       if (!pstNotificationInfo->app_id)       {
+               FPRINTF( "[Line : %d] [Push_ITc] app_id is NULL \\n", __LINE__);
+               return 1;
+       }
+
+       if (!pstNotificationInfo->app_secret)   {
+               FPRINTF( "[Line : %d] [Push_ITc] app_secret is NULL \\n", __LINE__);
+               return 1;
+       }
+
+       if (!pstNotificationInfo->reg_id)       {
+               FPRINTF( "[Line : %d] [Push_ITc] reg_id is NULL \\n", __LINE__);
+               return 1;
+       }
+
+       if (!pstNotificationInfo->request_id)   {
+               FPRINTF( "[Line : %d] [Push_ITc] request_id is NULL \\n", __LINE__);
+               return 1;
+       }
+
+       // Size check
+       ret = strnlen(pstNotificationInfo->app_id, SPP_ID_MAX_LENGTH+1);
+       if ( ret > SPP_ID_MAX_LENGTH && ret < SPP_ID_MIN_LENGTH) {
+               FPRINTF( "[Line : %d] [Push_ITc] app_id [%s] : wrong length \\n", __LINE__, pstNotificationInfo->app_id);
+               return 1;
+       }
+
+
+       ret = strnlen(pstNotificationInfo->app_secret, APP_SECRET_LENGTH+1);
+       if ( ret > APP_SECRET_LENGTH) {
+               FPRINTF( "[Line : %d] [Push_ITc] app_secret [%s] : wrong length \\n", __LINE__, pstNotificationInfo->app_secret);
+               return 1;
+       }
+
+       ret = strnlen(pstNotificationInfo->alert_message, ALERT_MESSAGE_MAX_LENGTH+1);
+       if ( ret > ALERT_MESSAGE_MAX_LENGTH) {
+               FPRINTF( "[Line : %d] [Push_ITc] alert_message [%s] is too long or too short \\n", __LINE__, pstNotificationInfo->alert_message);
+               return 1;
+       }
+
+       ret = strnlen(pstNotificationInfo->app_data, APP_DATA_MAX_SIZE+1);
+       if ( ret > APP_DATA_MAX_SIZE) {
+               FPRINTF( "[Line : %d] [Push_ITc] app_data [%s] is too long or too short \\n", __LINE__, pstNotificationInfo->app_data);
+               return 1;
+       }
+
+       if (pstNotificationInfo->badge_number < 0 || pstNotificationInfo->badge_number > 1000) {
+               FPRINTF( "[Line : %d] [Push_ITc] badge size is out of range!! \\n", __LINE__);
+               return 1;
+       }
+
+       return 0;
+}
+/** @} */
diff --git a/src/itc/push/ITs-push-common.h b/src/itc/push/ITs-push-common.h
new file mode 100755 (executable)
index 0000000..2c6065e
--- /dev/null
@@ -0,0 +1,248 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_PUSH_COMMON_H_
+#define _ITS_PUSH_COMMON_H_
+
+#include "assert.h"
+//Add test package related includes here
+#include <push.h>
+#include <push-service.h>
+#include <app.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <glib.h>
+#include <bundle.h>
+#include <aul.h>
+#include <system_info.h>
+
+/** @addtogroup itc-push
+*  @ingroup itc
+*  @{
+*/
+
+// For the sending feature
+#include <json-glib/json-glib.h>
+#include <curl/curl.h>
+#define APP_SECRET_LENGTH 50
+#define APP_DATA_MAX_SIZE 4096
+#define ALERT_MESSAGE_MAX_LENGTH 127
+#define MAX_BODY_LENGTH        APP_DATA_MAX_SIZE + 500
+#define MAX_HEADER_LENGTH 100
+#define SPP_ID_MAX_LENGTH 128
+#define SPP_ID_MIN_LENGTH 10
+#define CURL_RES_MAX_STRING 500
+
+//Add helper function declarations here
+#define LOG                                                    100
+#define TIMELOG                                                10
+#define MEMLOG                                         10
+#define MICROSECONDS_PER_SECOND                1000000
+#define TIMEOUT_CB                                     250000
+#define APPID1                                         "7c58a4ac98388bba"
+#define ERR_LOG                                        "/tmp/tclog"
+#define APPSECRET                                      "F0100FFE6907F9070F2CC355CEE3DD88"
+#define SLEEP_TIME                                     5
+#define PUSH_FEATURE                           "http://tizen.org/feature/network.push"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+FILE *g_fpLog;
+
+typedef struct speedmemory
+{
+       char *pszAPI1MemLog;
+       char *pszAPI2MemLog;
+       char *pszAPI1SpeedLog;
+       char *pszAPI2SpeedLog;
+}SpeedMemoryLog;
+
+typedef enum {
+       PUSH_ACTION_DISCARD = 0,
+       PUSH_ACTION_ALERT,
+       PUSH_ACTION_SILENT,
+       PUSH_ACTION_LAUNCH,
+} push_action_e;
+
+typedef enum {
+       PUSH_BADGE_OPTION_MAINTAIN = 0,
+       PUSH_BADGE_OPTION_NONE = 0,
+       PUSH_BADGE_OPTION_INCREASE,
+       PUSH_BADGE_OPTION_DECREASE,
+       PUSH_BADGE_OPTION_SET,
+} push_badge_option_e;
+
+struct timeval g_stPushStartTime;
+struct mallinfo g_stPushMemInfo;
+bool g_bStateCallbackHit;
+bool g_bNotifyCallbackHit;
+bool g_bRegisteredState;
+bool g_bCallbackReturnValue;
+bool g_bCallbackHit;
+GMainLoop *g_pPushMainLoop;
+bool g_bIsPushFeatureSupported;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+
+#define START_TEST {\
+       FPRINTF( "[Line : %d] [Push_ITc] Starting test : %s\\n", __LINE__,__FUNCTION__);\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF( "[Line : %d] [Push_ITc]%s passed\\n", __LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF( "[Line : %d] [Push_ITc]%s failed, error returned = %s \\n", __LINE__, API, PushGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if(strlen(memLog) > 0) \
+       {  \
+               memLog[strlen(memLog)-1] = '\0';\
+               FPRINTF( "[Line : %d] [Push_ITc]%s_MemoryLeakStatus - %s\\n", __LINE__, #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF( "[Line : %d] [Push_ITc]%s_TimeInMicrosec- %s\\n", __LINE__, #api, speedLog);\
+       }
+
+#define PUSH_INITIALIZE_LOGS {\
+       if(MEMORY_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if(SPEED_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+       }
+       
+#define PUSH_INITIALIZE_LOGS_DOUBLEMEM {\
+       if(MEMORY_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if(SPEED_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+       }
+       
+#define PUSH_INITIALIZE_LOGS_DOUBLESPEED {\
+       if(MEMORY_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1MemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+       }\
+       if(SPEED_CHECK)\
+       {\
+               stSpeedMemoryLog.pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+               stSpeedMemoryLog.pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       }\
+       }
+       
+#define PUSH_DEINITIALIZE_LOGS {\
+       if ( stSpeedMemoryLog.pszAPI1MemLog != NULL)\
+               {\
+                       free(stSpeedMemoryLog.pszAPI1MemLog);\
+                       stSpeedMemoryLog.pszAPI1MemLog = NULL;\
+               }\
+               if ( stSpeedMemoryLog.pszAPI2MemLog != NULL)\
+               {\
+                       free(stSpeedMemoryLog.pszAPI2MemLog);\
+                       stSpeedMemoryLog.pszAPI2MemLog = NULL;\
+               }\
+               if ( stSpeedMemoryLog.pszAPI1SpeedLog != NULL)\
+               {\
+                       free (stSpeedMemoryLog.pszAPI1SpeedLog);\
+                       stSpeedMemoryLog.pszAPI1SpeedLog = NULL;\
+               }\
+               if ( stSpeedMemoryLog.pszAPI2SpeedLog != NULL)\
+               {\
+                       free (stSpeedMemoryLog.pszAPI2SpeedLog);\
+                       stSpeedMemoryLog.pszAPI2SpeedLog = NULL;\
+               }\
+       }
+
+#define RUN_POLLING_LOOP {\
+       g_pPushMainLoop = g_main_loop_new(NULL, false);\
+       nTimeoutId = g_timeout_add(TIMEOUT_CB, Timeout, g_pPushMainLoop);\
+       g_main_loop_run(g_pPushMainLoop);\
+       g_source_remove(nTimeoutId);\
+       g_pPushMainLoop = NULL;\
+}
+
+typedef struct outgoing_notification_s {
+       const char *app_id;
+       const char *app_secret;
+       const char *reg_id;
+       const char *request_id;
+       const char *sender;
+       const char *app_data;
+       int app_data_size;
+       const char *alert_message;
+       push_action_e action;
+       push_badge_option_e badge_option;
+       int badge_number;
+       int type;
+       int delay;
+       long time_stamp;
+       const char *session_info;
+} OutgoingNotification;
+
+char* PushGetError(int nRet);
+char* PushServiceGetError(int nRet);
+void PushGetMemAllocation(void);
+void PushExecutionDelay(char* pszAPITime);
+void PushGetTimeOfDay(void);
+void PushGetMemStatus(char *pszAPIMemory);
+void PushServiceDisconnect();
+bool PushServiceConnect(push_service_state_cb pFnCallback);
+gboolean Timeout(gpointer data);
+int SendPushDataToServer(const char *push_app_id, const char *app_secret, const char *reg_id, const char *request_id,
+                                       const char *app_data, int app_data_size, const char *alert_message, push_action_e action,
+                                       push_badge_option_e badge_option, int badge_number, long time_stamp, int type, int delay,
+                                       const char *sender, bool verbose);
+int SendNotificationUsingCurl(struct outgoing_notification_s *noti_info, bool verbose);
+int CheckOutgoingNotification(OutgoingNotification *pstNotificationInfo);
+size_t CurlResponseCallback(char *ptr, size_t size, size_t nmemb, void *userdata);
+int GetResultFromJson(char* json_string);
+int CurlDebugCallback(CURL *handle, curl_infotype type, char *data, size_t size, void *userptr);
+bool PushServiceConnectSendDisconnect();
+bool PushCheckSystemInfoFeatureSupported(char* pszKey);
+char* PushSystemInfoGetError(int nRet);
+/** @} */
+#endif  //_ITS_PUSH_COMMON_H_
diff --git a/src/itc/push/ITs-push-service.c b/src/itc/push/ITs-push-service.c
new file mode 100755 (executable)
index 0000000..21cb438
--- /dev/null
@@ -0,0 +1,2145 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-push-common.h"
+
+/** @addtogroup itc-push
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Push
+push_service_connection_h g_hServiceConnection = NULL;
+bool g_bGetNotificationCallback = false;
+bool g_bFeatureMismatch = false;
+bool g_bFeatureNotSupported = false;
+
+//Callbacks
+
+/**
+* @function            PushServiceResultCB
+* @description         Called with the result of a registration/deregistration.
+* @parameter           push_service_result_e res, const char *msg, void *data
+* @return                      NA
+*/
+static void PushServiceResultCB(push_service_result_e res, const char *msg, void *data)
+{
+       g_bCallbackReturnValue = false;
+       g_bCallbackHit = true;
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] PushServiceResultCB callback called\\n", __LINE__);
+#endif
+       switch ( res )
+       {
+               case PUSH_SERVICE_RESULT_SUCCESS  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service Result: PUSH_SERVICE_RESULT_SUCCESS \\n", __LINE__);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PUSH_SERVICE_RESULT_TIMEOUT   :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service Result: PUSH_SERVICE_RESULT_TIMEOUT \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_RESULT_SERVER_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service Result: PUSH_SERVICE_RESULT_SERVER_ERROR \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_RESULT_SYSTEM_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service Result: PUSH_SERVICE_RESULT_SYSTEM_ERROR \\n", __LINE__);
+                       break;
+               default:
+                       FPRINTF( "[Line : %d] [Push_ITc] Service Result: Unknown Value \\n", __LINE__);
+                       break;
+       }
+       if ( g_pPushMainLoop )
+       {
+               g_main_loop_quit(g_pPushMainLoop);
+               g_pPushMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+* @function            PushServiceResultNewCB
+* @description         Called with the result of a registration/deregistration.
+* @parameter           push_service_result_e res, const char *msg, void *data
+* @return                      NA
+*/
+static void PushServiceResultNewCB(push_service_result_e res, const char *msg, void *data)
+{
+       g_bCallbackReturnValue = false;
+       g_bCallbackHit = true;
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] PushServiceResultNewCB callback called\\n", __LINE__);
+#endif
+       switch ( res )
+       {
+               case PUSH_SERVICE_RESULT_SUCCESS  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service Result: PUSH_SERVICE_RESULT_SUCCESS \\n", __LINE__);
+                       g_bCallbackReturnValue = true;
+                       break;
+               case PUSH_SERVICE_RESULT_TIMEOUT   :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service Result: PUSH_SERVICE_RESULT_TIMEOUT \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_RESULT_SERVER_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service Result: PUSH_SERVICE_RESULT_SERVER_ERROR \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_RESULT_SYSTEM_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service Result: PUSH_SERVICE_RESULT_SYSTEM_ERROR \\n", __LINE__);
+                       break;
+               default:
+                       FPRINTF( "[Line : %d] [Push_ITc] Service Result: Unknown Value \\n", __LINE__);
+                       break;
+       }
+       return;
+}
+
+/**
+ * @function           PushServiceNotifyCB
+ * @description                Called to handle a notification.
+ * @parameter          const push_service_notification_h noti, void *data
+ * @return                     NA
+ */
+static void PushServiceNotifyCB(const push_service_notification_h noti, void *data)
+{
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] PushServiceNotifyCB callback called\\n", __LINE__);
+#endif
+       g_bNotifyCallbackHit = true;
+       return;
+}
+
+/**
+* @function            ConnectDisconnectPushServiceStateCB
+* @description         Called when the registration state is refreshed.
+* @parameter           push_service_state_e st, const char *err, void *data
+* @return                      NA
+*/
+static void ConnectDisconnectPushServiceStateCB(push_service_state_e st, const char *err, void *data)
+{
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] ConnectDisconnectPushServiceStateCB callback invoked\\n", __LINE__);
+#endif
+       g_bStateCallbackHit = true;
+       if ( st == PUSH_SERVICE_STATE_REGISTERED )
+       {
+               g_bRegisteredState = true;
+       }
+
+       if ( g_pPushMainLoop )
+       {
+               g_main_loop_quit(g_pPushMainLoop);
+               g_pPushMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+* @function            GetNotificationDataPushServiceStateCB
+* @description         Called when the registration state is refreshed.
+* @parameter           push_service_state_e st, const char *err, void *data
+* @return                      NA
+*/
+static void GetNotificationDataPushServiceStateCB(push_service_state_e st, const char *err, void *data)
+{
+       push_service_notification_h pstNotification = NULL;
+       char *pszData = NULL;
+       int nRet = -1;
+
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] GetNotificationDataPushServiceStateCB callback invoked\\n", __LINE__);
+#endif
+       g_bStateCallbackHit = true;
+       switch(st)
+       {
+               case PUSH_SERVICE_STATE_UNREGISTERED :
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_UNREGISTERED  \\n", __LINE__);
+                       nRet = push_service_register(g_hServiceConnection, PushServiceResultNewCB, NULL);
+                       if(nRet!= PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = %s , g_bCallbackHit = %d \\n",__LINE__,PushServiceGetError(nRet),g_bCallbackHit);
+                               break;
+                       }
+                       return;
+               }
+               case PUSH_SERVICE_STATE_REGISTERED :
+               {
+                       g_bRegisteredState = true;
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_REGISTERED  \\n", __LINE__);
+                       nRet = push_service_get_unread_notification(g_hServiceConnection, &pstNotification);
+                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_unread_notification failed, error returned = %s \\n",__LINE__,PushServiceGetError(nRet));
+                       }
+
+                       if(pstNotification != NULL)
+                       {
+                               int nLoopCount, nFailCount = 0;
+                               SpeedMemoryLog stSpeedMemoryLog;
+                               memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+                               PUSH_INITIALIZE_LOGS;
+
+                               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                               {
+                                       PushGetMemAllocation();
+                                       PushGetTimeOfDay();
+                                       // Target API
+                                       nRet = push_service_get_notification_data(pstNotification, &pszData);
+                                       PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                                       PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_data failed on iteration %d, error returned = %s \\n", __LINE__,nLoopCount, PushServiceGetError(nRet));
+                                               nFailCount++;
+                                               continue;
+                                       }
+                                       if (pszData == NULL)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_data on iteration %d, error returned = data is NULL \\n", __LINE__, nLoopCount);
+                                               nFailCount++;
+                                               continue;
+                                       }
+#if DEBUG
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_data passed on iteration = %d, message is = %s \\n", __LINE__, nLoopCount, pszData);
+#endif
+                                       free(pszData);
+                               }
+
+                               push_service_free_notification(pstNotification);
+
+                               if (nFailCount > 0)
+                               {
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_data failed %d times, out of %d times \\n", __LINE__,nFailCount, MAX_COUNT);
+                                       PUSH_DEINITIALIZE_LOGS;
+                               }
+                               else
+                               {
+#if SPEED_CHECK
+                                       PRINT_SPEED_LOG(push_service_get_notification_data, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+                                       PRINT_MEMORY_LOG(push_service_get_notification_data, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+                                       PUSH_DEINITIALIZE_LOGS;
+                                       g_bGetNotificationCallback = true;
+                               }
+                       }
+               }
+               break;
+               case PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_PING_CHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PING_CHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_ERROR \\n", __LINE__);
+                       break;
+               default:
+                       break;
+       }
+
+       if ( g_pPushMainLoop )
+       {
+               g_main_loop_quit(g_pPushMainLoop);
+               g_pPushMainLoop = NULL;
+       }
+       return;
+}
+
+/**
+* @function            GetNotificationMessagePushServiceStateCB
+* @description         Called when the registration state is refreshed.
+* @parameter           push_service_state_e st, const char *err, void *data
+* @return                      NA
+*/
+static void GetNotificationMessagePushServiceStateCB(push_service_state_e st, const char *err, void *data)
+{
+       push_service_notification_h pstNotification = NULL;
+       char *pszData = NULL;
+       int nRet = -1;
+
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] GetNotificationMessagePushServiceStateCB callback invoked\\n", __LINE__);
+#endif
+       g_bStateCallbackHit = true;
+       switch(st)
+       {
+               case PUSH_SERVICE_STATE_UNREGISTERED :
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_UNREGISTERED  \\n", __LINE__);
+                       nRet = push_service_register(g_hServiceConnection, PushServiceResultNewCB, NULL);
+                       if(nRet!= PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = %s , g_bCallbackHit = %d \\n",__LINE__,PushServiceGetError(nRet),g_bCallbackHit);
+                               break;
+                       }
+                       return;
+               }
+               case PUSH_SERVICE_STATE_REGISTERED :
+               {
+                       g_bRegisteredState = true;
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_REGISTERED  \\n", __LINE__);
+                       nRet = push_service_get_unread_notification(g_hServiceConnection, &pstNotification);
+                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_unread_notification failed, error returned = %s \\n",__LINE__,PushServiceGetError(nRet));
+                       }
+                       
+                       if(pstNotification != NULL)
+                       {
+                               int nLoopCount, nFailCount = 0;
+                               SpeedMemoryLog stSpeedMemoryLog;
+                               memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+                               PUSH_INITIALIZE_LOGS;
+
+                               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                               {
+                                       PushGetMemAllocation();
+                                       PushGetTimeOfDay();
+                                       // Target API
+                                       nRet = push_service_get_notification_message(pstNotification, &pszData);
+                                       PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                                       PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_message failed on iteration %d, error returned = %s \\n", __LINE__,nLoopCount, PushServiceGetError(nRet));
+                                               nFailCount++;
+                                               continue;
+                                       }
+                                       if (pszData == NULL)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_message on iteration %d, error returned = data is NULL \\n", __LINE__, nLoopCount);
+                                               nFailCount++;
+                                               continue;
+                                       }
+#if DEBUG
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_message passed on iteration = %d, message is = %s \\n", __LINE__, nLoopCount, pszData);
+#endif
+                                       free(pszData);
+                               }
+
+                               push_service_free_notification(pstNotification);
+
+                               if (nFailCount > 0)
+                               {
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_message failed %d times, out of %d times \\n", __LINE__,nFailCount, MAX_COUNT);
+                                       PUSH_DEINITIALIZE_LOGS;
+                               }
+                               else
+                               {
+#if SPEED_CHECK
+                                       PRINT_SPEED_LOG(push_service_get_notification_message, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+                                       PRINT_MEMORY_LOG(push_service_get_notification_message, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+                                       PUSH_DEINITIALIZE_LOGS;
+                                       g_bGetNotificationCallback = true;
+                               }
+                       }
+               }
+               break;
+               case PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_PING_CHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PING_CHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_ERROR \\n", __LINE__);
+                       break;
+               default:
+                       break;
+       }
+
+       if ( g_pPushMainLoop )
+       {
+               g_main_loop_quit(g_pPushMainLoop);
+       }
+       return;
+}
+
+/**
+* @function            GetNotificationTimePushServiceStateCB
+* @description         Called when the registration state is refreshed.
+* @parameter           push_service_state_e st, const char *err, void *data
+* @return                      NA
+*/
+static void GetNotificationTimePushServiceStateCB(push_service_state_e st, const char *err, void *data)
+{
+       push_service_notification_h pstNotification = NULL;
+       long long int llnTime = 0;
+       int nRet = -1;
+
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] GetNotificationTimePushServiceStateCB callback invoked\\n", __LINE__);
+#endif
+       g_bStateCallbackHit = true;
+       switch(st)
+       {
+               case PUSH_SERVICE_STATE_UNREGISTERED :
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_UNREGISTERED  \\n", __LINE__);
+                       nRet = push_service_register(g_hServiceConnection, PushServiceResultNewCB, NULL);
+                       if(nRet!= PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = %s , g_bCallbackHit = %d \\n",__LINE__,PushServiceGetError(nRet),g_bCallbackHit);
+                               break;
+                       }
+                       return;
+               }
+               case PUSH_SERVICE_STATE_REGISTERED :
+               {
+                       g_bRegisteredState = true;
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_REGISTERED  \\n", __LINE__);
+                       nRet = push_service_get_unread_notification(g_hServiceConnection, &pstNotification);
+                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_unread_notification failed, error returned = %s \\n",__LINE__,PushServiceGetError(nRet));
+                       }
+                       
+                       if(pstNotification != NULL)
+                       {
+                               int nLoopCount, nFailCount = 0;
+                               SpeedMemoryLog stSpeedMemoryLog;
+                               memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+                               PUSH_INITIALIZE_LOGS;
+                               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                               {
+                                       PushGetMemAllocation();
+                                       PushGetTimeOfDay();
+                                       // Target API
+                                       nRet = push_service_get_notification_time(pstNotification, &llnTime);
+                                       PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                                       PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_time failed on iteration %d, error returned = %s \\n", __LINE__,nLoopCount, PushServiceGetError(nRet));
+                                               nFailCount++;
+                                               continue;
+                                       }
+                                       if (llnTime == 0)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_time on iteration %d, error returned = data is NULL \\n", __LINE__, nLoopCount);
+                                               nFailCount++;
+                                               continue;
+                                       }
+#if DEBUG
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_time passed on iteration = %d, time = %lld \\n", __LINE__, nLoopCount, llnTime);
+#endif
+                               }
+
+                               push_service_free_notification(pstNotification);
+
+                               if (nFailCount > 0)
+                               {
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_data failed %d times, out of %d times \\n", __LINE__,nFailCount, MAX_COUNT);
+                                       PUSH_DEINITIALIZE_LOGS;
+                               }
+                               else
+                               {
+#if SPEED_CHECK
+                                       PRINT_SPEED_LOG(push_service_get_notification_time, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+                                       PRINT_MEMORY_LOG(push_service_get_notification_time, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+                                       PUSH_DEINITIALIZE_LOGS;
+                                       g_bGetNotificationCallback = true;
+                               }
+                       }
+               }
+               break;
+               case PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_PING_CHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PING_CHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_ERROR \\n", __LINE__);
+                       break;
+               default:
+                       break;
+       }
+       if (g_pPushMainLoop)
+       {
+               g_main_loop_quit(g_pPushMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           GetNotificationSenderPushServiceStateCB
+ * @description                Called when the registration state is refreshed.
+ * @parameter          push_service_state_e st, const char *err, void *data
+ * @return                     NA
+ */
+static void GetNotificationSenderPushServiceStateCB(push_service_state_e st, const char *err, void *data)
+{
+       push_service_notification_h pstNotification = NULL;
+       char *pszSender = NULL;
+       int nRet = -1;
+
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] GetNotificationSenderPushServiceStateCB callback invoked\\n", __LINE__);
+#endif
+       g_bStateCallbackHit = true;
+       switch(st)
+       {
+               case PUSH_SERVICE_STATE_UNREGISTERED :
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_UNREGISTERED  \\n", __LINE__);
+                       nRet = push_service_register(g_hServiceConnection, PushServiceResultNewCB, NULL);
+                       if(nRet!= PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = %s , g_bCallbackHit = %d \\n",__LINE__,PushServiceGetError(nRet),g_bCallbackHit);
+                               break;
+                       }
+                       return;
+               }
+               case PUSH_SERVICE_STATE_REGISTERED :
+               {
+                       g_bRegisteredState = true;
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_REGISTERED  \\n", __LINE__);
+                       nRet = push_service_get_unread_notification(g_hServiceConnection, &pstNotification);
+                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_unread_notification failed, error returned = %s \\n",__LINE__,PushServiceGetError(nRet));
+                       }
+
+                       if(pstNotification != NULL)
+                       {
+                               int nLoopCount, nFailCount = 0;
+                               SpeedMemoryLog stSpeedMemoryLog;
+                               memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+                               PUSH_INITIALIZE_LOGS;
+
+                               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                               {
+                                       PushGetMemAllocation();
+                                       PushGetTimeOfDay();
+                                       // Target API
+                                       nRet = push_service_get_notification_sender(pstNotification, &pszSender);
+                                       PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                                       PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_sender failed on iteration %d, error returned = %s \\n", __LINE__,nLoopCount, PushServiceGetError(nRet));
+                                               nFailCount++;
+                                               continue;
+                                       }
+                                       if (pszSender == NULL)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_sender on iteration %d, error returned = Sender is NULL \\n", __LINE__, nLoopCount);
+                                               nFailCount++;
+                                               continue;
+                                       }
+#if DEBUG
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_sender passed on iteration = %d, sender is = %s \\n", __LINE__, nLoopCount, pszSender);
+#endif
+                                       free(pszSender);
+                               }
+
+                               push_service_free_notification(pstNotification);
+
+                               if (nFailCount > 0)
+                               {
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_sender failed %d times, out of %d times \\n", __LINE__,nFailCount, MAX_COUNT);
+                                       PUSH_DEINITIALIZE_LOGS;
+                               }
+                               else
+                               {
+#if SPEED_CHECK
+                                       PRINT_SPEED_LOG(push_service_get_notification_sender, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+                                       PRINT_MEMORY_LOG(push_service_get_notification_sender, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+                                       PUSH_DEINITIALIZE_LOGS;
+                                       g_bGetNotificationCallback = true;
+                               }
+                       }
+               }
+               break;
+               case PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_PING_CHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PING_CHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_ERROR \\n", __LINE__);
+                       break;
+               default:
+                       break;
+       }
+
+       if (g_pPushMainLoop)
+       {
+               g_main_loop_quit(g_pPushMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           GetNotificationSessionInfoPushServiceStateCB
+ * @description                Called when the registration state is refreshed.
+ * @parameter          push_service_state_e st, const char *err, void *data
+ * @return                     NA
+ */
+static void GetNotificationSessionInfoPushServiceStateCB(push_service_state_e st, const char *err, void *data)
+{
+       push_service_notification_h pstNotification = NULL;
+       char *pszSessionInfo = NULL;
+       int nRet = -1;
+
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] GetNotificationSessionInfoPushServiceStateCB callback invoked\\n", __LINE__);
+#endif
+       g_bStateCallbackHit = true;
+       switch(st)
+       {
+               case PUSH_SERVICE_STATE_UNREGISTERED :
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_UNREGISTERED  \\n", __LINE__);
+                       nRet = push_service_register(g_hServiceConnection, PushServiceResultNewCB, NULL);
+                       if(nRet!= PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = %s , g_bCallbackHit = %d \\n",__LINE__,PushServiceGetError(nRet),g_bCallbackHit);
+                               break;
+                       }
+                       return;
+               }
+               case PUSH_SERVICE_STATE_REGISTERED :
+               {
+                       g_bRegisteredState = true;
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_REGISTERED  \\n", __LINE__);
+                       nRet = push_service_get_unread_notification(g_hServiceConnection, &pstNotification);
+                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_unread_notification failed, error returned = %s \\n",__LINE__,PushServiceGetError(nRet));
+                       }
+
+                       if(pstNotification != NULL)
+                       {
+                               int nLoopCount, nFailCount = 0;
+                               SpeedMemoryLog stSpeedMemoryLog;
+                               memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+                               PUSH_INITIALIZE_LOGS;
+
+                               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                               {
+                                       PushGetMemAllocation();
+                                       PushGetTimeOfDay();
+                                       // Target API
+                                       nRet = push_service_get_notification_session_info(pstNotification, &pszSessionInfo);
+                                       PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                                       PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_session_info failed on iteration %d, error returned = %s \\n", __LINE__,nLoopCount, PushServiceGetError(nRet));
+                                               nFailCount++;
+                                               continue;
+                                       }
+                                       if (pszSessionInfo == NULL)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_session_info on iteration %d, error returned = Session ID is NULL \\n", __LINE__, nLoopCount);
+                                               nFailCount++;
+                                               continue;
+                                       }
+#if DEBUG
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_session_info passed on iteration = %d, Session ID is = %s \\n", __LINE__, nLoopCount, pszSessionInfo);
+#endif
+                                       free(pszSessionInfo);
+                               }
+
+                               push_service_free_notification(pstNotification);
+
+                               if (nFailCount > 0)
+                               {
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_session_info failed %d times, out of %d times \\n", __LINE__,nFailCount, MAX_COUNT);
+                                       PUSH_DEINITIALIZE_LOGS;
+                               }
+                               else
+                               {
+#if SPEED_CHECK
+                                       PRINT_SPEED_LOG(push_service_get_notification_session_info, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+                                       PRINT_MEMORY_LOG(push_service_get_notification_session_info, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+                                       PUSH_DEINITIALIZE_LOGS;
+                                       g_bGetNotificationCallback = true;
+                               }
+                       }
+               }
+               break;
+               case PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_PING_CHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PING_CHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_ERROR \\n", __LINE__);
+                       break;
+               default:
+                       break;
+       }
+
+       if (g_pPushMainLoop)
+       {
+               g_main_loop_quit(g_pPushMainLoop);
+       }
+       return;
+}
+
+
+/**
+ * @function           GetNotificationRequestIdPushServiceStateCB
+ * @description                Called when the registration state is refreshed.
+ * @parameter          push_service_state_e st, const char *err, void *data
+ * @return                     NA
+ */
+static void GetNotificationRequestIdPushServiceStateCB(push_service_state_e st, const char *err, void *data)
+{
+       push_service_notification_h pstNotification = NULL;
+       char *pszRequestId = NULL;
+       int nRet = -1;
+
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] GetNotificationRequestIdPushServiceStateCB callback invoked\\n", __LINE__);
+#endif
+       g_bStateCallbackHit = true;
+       switch(st)
+       {
+               case PUSH_SERVICE_STATE_UNREGISTERED :
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_UNREGISTERED  \\n", __LINE__);
+                       nRet = push_service_register(g_hServiceConnection, PushServiceResultNewCB, NULL);
+                       if(nRet!= PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = %s , g_bCallbackHit = %d \\n",__LINE__,PushServiceGetError(nRet),g_bCallbackHit);
+                               break;
+                       }
+                       return;
+               }
+               case PUSH_SERVICE_STATE_REGISTERED :
+               {
+                       g_bRegisteredState = true;
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_REGISTERED  \\n", __LINE__);
+                       nRet = push_service_get_unread_notification(g_hServiceConnection, &pstNotification);
+                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_unread_notification failed, error returned = %s \\n",__LINE__,PushServiceGetError(nRet));
+                       }
+
+                       if(pstNotification != NULL)
+                       {
+                               int nLoopCount, nFailCount = 0;
+                               SpeedMemoryLog stSpeedMemoryLog;
+                               memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+                               PUSH_INITIALIZE_LOGS;
+
+                               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                               {
+                                       PushGetMemAllocation();
+                                       PushGetTimeOfDay();
+                                       // Target API
+                                       nRet = push_service_get_notification_request_id(pstNotification, &pszRequestId);
+                                       PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                                       PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_request_id failed on iteration %d, error returned = %s \\n", __LINE__,nLoopCount, PushServiceGetError(nRet));
+                                               nFailCount++;
+                                               continue;
+                                       }
+                                       if (pszRequestId == NULL)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_request_id on iteration %d, error returned = Request ID is NULL \\n", __LINE__, nLoopCount);
+                                               nFailCount++;
+                                               continue;
+                                       }
+#if DEBUG
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_request_id passed on iteration = %d, request id is = %s \\n", __LINE__, nLoopCount, pszRequestId);
+#endif
+                                       free(pszRequestId);
+                               }
+
+                               push_service_free_notification(pstNotification);
+
+                               if (nFailCount > 0)
+                               {
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_request_id failed %d times, out of %d times \\n", __LINE__,nFailCount, MAX_COUNT);
+                                       PUSH_DEINITIALIZE_LOGS;
+                               }
+                               else
+                               {
+#if SPEED_CHECK
+                                       PRINT_SPEED_LOG(push_service_get_notification_request_id, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+                                       PRINT_MEMORY_LOG(push_service_get_notification_request_id, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+                                       PUSH_DEINITIALIZE_LOGS;
+                                       g_bGetNotificationCallback = true;
+                               }
+                       }
+               }
+               break;
+               case PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_PING_CHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PING_CHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_ERROR \\n", __LINE__);
+                       break;
+               default:
+                       break;
+       }
+
+       if (g_pPushMainLoop)
+       {
+               g_main_loop_quit(g_pPushMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           GetNotificationTypePushServiceStateCB
+ * @description                Called when the registration state is refreshed.
+ * @parameter          push_service_state_e st, const char *err, void *data
+ * @return                     NA
+ */
+static void GetNotificationTypePushServiceStateCB(push_service_state_e st, const char *err, void *data)
+{
+       push_service_notification_h pstNotification = NULL;
+       int nType = -1;
+       int nRet = -1;
+
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] GetNotificationTypePushServiceStateCB callback invoked\\n", __LINE__);
+#endif
+       g_bStateCallbackHit = true;
+       switch(st)
+       {
+               case PUSH_SERVICE_STATE_UNREGISTERED :
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_UNREGISTERED  \\n", __LINE__);
+                       nRet = push_service_register(g_hServiceConnection, PushServiceResultNewCB, NULL);
+                       if(nRet!= PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = %s , g_bCallbackHit = %d \\n",__LINE__,PushServiceGetError(nRet),g_bCallbackHit);
+                               break;
+                       }
+                       return;
+               }
+               case PUSH_SERVICE_STATE_REGISTERED :
+               {
+                       g_bRegisteredState = true;
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_REGISTERED  \\n", __LINE__);
+                       nRet = push_service_get_unread_notification(g_hServiceConnection, &pstNotification);
+                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_unread_notification failed, error returned = %s \\n",__LINE__,PushServiceGetError(nRet));
+                       }
+
+                       if(pstNotification != NULL)
+                       {
+                               int nLoopCount, nFailCount = 0;
+                               SpeedMemoryLog stSpeedMemoryLog;
+                               memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+                               PUSH_INITIALIZE_LOGS;
+
+                               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                               {
+                                       PushGetMemAllocation();
+                                       PushGetTimeOfDay();
+                                       // Target API
+                                       nRet = push_service_get_notification_type(pstNotification, &nType);
+                                       PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                                       PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_type failed on iteration %d, error returned = %s \\n", __LINE__,nLoopCount, PushServiceGetError(nRet));
+                                               nFailCount++;
+                                               continue;
+                                       }
+                                       if (nType < 0)
+                                       {
+                                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_type on iteration %d, type returned = %d  \\n", __LINE__, nLoopCount,nType);
+                                               nFailCount++;
+                                               continue;
+                                       }
+#if DEBUG
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_type passed on iteration = %d, type is = %d \\n", __LINE__, nLoopCount, nType);
+#endif
+                               }
+
+                               push_service_free_notification(pstNotification);
+
+                               if (nFailCount > 0)
+                               {
+                                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_notification_type failed %d times, out of %d times \\n", __LINE__,nFailCount, MAX_COUNT);
+                                       PUSH_DEINITIALIZE_LOGS;
+                               }
+                               else
+                               {
+#if SPEED_CHECK
+                                       PRINT_SPEED_LOG(push_service_get_notification_type, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+                                       PRINT_MEMORY_LOG(push_service_get_notification_type, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+                                       PUSH_DEINITIALIZE_LOGS;
+                                       g_bGetNotificationCallback = true;
+                               }
+                       }
+               }
+               break;
+               case PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_PING_CHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PING_CHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_ERROR \\n", __LINE__);
+                       break;
+               default:
+                       break;
+       }
+
+       if (g_pPushMainLoop)
+       {
+               g_main_loop_quit(g_pPushMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           GetNotificationRequestUnreadPushServiceStateCB
+ * @description                Called when the registration state is refreshed.
+ * @parameter          push_service_state_e st, const char *err, void *data
+ * @return                     NA
+ */
+static void GetNotificationRequestUnreadPushServiceStateCB(push_service_state_e st, const char *err, void *data)
+{
+       int nRet = -1;
+
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] GetNotificationRequestUnreadPushServiceStateCB callback invoked\\n", __LINE__);
+#endif
+       g_bStateCallbackHit = true;
+       switch(st)
+       {
+               case PUSH_SERVICE_STATE_UNREGISTERED :
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_UNREGISTERED  \\n", __LINE__);
+                       nRet = push_service_register(g_hServiceConnection, PushServiceResultNewCB, NULL);
+                       if(nRet!= PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = %s , g_bCallbackHit = %d \\n",__LINE__,PushServiceGetError(nRet),g_bCallbackHit);
+                               break;
+                       }
+                       return;
+               }
+               case PUSH_SERVICE_STATE_REGISTERED :
+               {
+                       g_bRegisteredState = true;
+                       int nFailCount = 0;
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_REGISTERED  \\n", __LINE__);
+                       SpeedMemoryLog stSpeedMemoryLog;
+                       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+                       PUSH_INITIALIZE_LOGS;
+                       
+                       PushGetMemAllocation();
+                       PushGetTimeOfDay();
+                       // Target API
+                       nRet = push_service_request_unread_notification(g_hServiceConnection);
+                       PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_request_unread_notification failed , error returned = %s \\n", __LINE__, PushServiceGetError(nRet));
+                               nFailCount++;
+                       }
+#if DEBUG
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_request_unread_notification passed \\n", __LINE__ );
+#endif
+
+                       if (nFailCount > 0)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_request_unread_notification failed \\n", __LINE__);
+                               PUSH_DEINITIALIZE_LOGS;;
+                       }
+                       else
+                       {
+#if SPEED_CHECK
+                               PRINT_SPEED_LOG(push_service_request_unread_notification, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+                               PRINT_MEMORY_LOG(push_service_request_unread_notification, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+                               PUSH_DEINITIALIZE_LOGS;
+                               g_bGetNotificationCallback = true;
+                       }
+               }
+               break;
+
+               case PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_PING_CHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PING_CHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_ERROR \\n", __LINE__);
+                       break;
+               default:
+                       break;
+       }
+
+       if (g_pPushMainLoop)
+       {
+               g_main_loop_quit(g_pPushMainLoop);
+       }
+       return;
+}
+
+/**
+ * @function           GetNotificationUnreadFreeNotificationCB
+ * @description                Called when the registration state is refreshed.
+ * @parameter          push_service_state_e st, const char *err, void *data
+ * @return                     NA
+ */
+static void GetNotificationUnreadFreeNotificationCB(push_service_state_e st, const char *err, void *data)
+{
+       push_service_notification_h pstNotification = NULL;
+       int nRet = -1;
+
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] GetNotificationUnreadFreeNotificationCB callback invoked\\n", __LINE__);
+#endif
+       g_bStateCallbackHit = true;
+       switch(st)
+       {
+               case PUSH_SERVICE_STATE_UNREGISTERED :
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_UNREGISTERED  \\n", __LINE__);
+                       nRet = push_service_register(g_hServiceConnection, PushServiceResultNewCB, NULL);
+                       if(nRet!= PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = %s , g_bCallbackHit = %d \\n",__LINE__,PushServiceGetError(nRet),g_bCallbackHit);
+                               break;
+                       }
+                       return;
+               }
+               case PUSH_SERVICE_STATE_REGISTERED :
+               {
+                       g_bRegisteredState = true;
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_REGISTERED  \\n", __LINE__);
+                       
+                       int nFailCount = 0;
+                       SpeedMemoryLog stSpeedMemoryLog;
+                       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+                       PUSH_INITIALIZE_LOGS_DOUBLEMEM;
+                       
+                       PushGetMemAllocation();
+                       PushGetTimeOfDay();
+                       // Target API
+                       nRet = push_service_get_unread_notification(g_hServiceConnection, &pstNotification);
+                       if(nRet != PUSH_SERVICE_ERROR_NONE)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_unread_notification failed, error returned = %s \\n",__LINE__,PushServiceGetError(nRet));
+                               nFailCount++;
+                       }
+                       PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+                       PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+#if DEBUG
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_unread_notification passed \\n", __LINE__);
+#endif
+                       if(pstNotification != NULL)
+                       {
+                               PushGetMemAllocation();
+                               PushGetTimeOfDay();
+                               // Target API
+                               push_service_free_notification(pstNotification);
+                               PushExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+                               PushGetMemStatus(stSpeedMemoryLog.pszAPI2MemLog);
+                       }
+
+                       if (nFailCount > 0)
+                       {
+                               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_unread_notification failed \\n", __LINE__);
+                               PUSH_DEINITIALIZE_LOGS;
+                       }
+                       else
+                       {
+#if SPEED_CHECK
+                               PRINT_SPEED_LOG(push_service_get_unread_notification, stSpeedMemoryLog.pszAPI1SpeedLog);
+                               PRINT_SPEED_LOG(push_service_free_notification, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+                               PRINT_MEMORY_LOG(push_service_get_unread_notification, stSpeedMemoryLog.pszAPI1MemLog);
+                               PRINT_MEMORY_LOG(push_service_free_notification, stSpeedMemoryLog.pszAPI2MemLog);
+#endif
+                               PUSH_DEINITIALIZE_LOGS;
+                               g_bGetNotificationCallback = true;
+                       }
+               }
+               break;
+               case PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PROVISIONING_IPCHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_PING_CHANGE  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_PING_CHANGE \\n", __LINE__);
+                       break;
+               case PUSH_SERVICE_STATE_ERROR  :
+                       FPRINTF( "[Line : %d] [Push_ITc] Service State: PUSH_SERVICE_STATE_ERROR \\n", __LINE__);
+                       break;
+               default:
+                       break;
+       }
+
+       if (g_pPushMainLoop)
+       {
+               g_main_loop_quit(g_pPushMainLoop);
+       }
+       return;
+}
+
+
+/*********************************************************************/
+//Helper Functions
+
+/**
+ * @function           PushServiceConnect
+ * @description                Connect to the push service
+ * @parameter          bIsRegisteration : Registration to be done from callback
+ * @return                     true : success, false : failure
+ */
+bool PushServiceConnect(push_service_state_cb pFnCallback)
+{
+       g_bStateCallbackHit = false;
+       int nTimeoutId = 0, nRet = -1;
+       nRet = push_service_connect(APPID1, pFnCallback, PushServiceNotifyCB, NULL, &g_hServiceConnection);
+       FPRINTF( "[Line : %d] [Push_ITc] connect was called\\n", __LINE__);
+       
+       if ( !g_bIsPushFeatureSupported )
+       {
+               if ( nRet != PUSH_SERVICE_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("\\n [Line : %d][Push_ITc]  push_service_connect returned %s error for unsupported feature", __LINE__, PushServiceGetError(nRet));
+                       g_bFeatureMismatch = true;
+               }
+               else
+               {
+                       FPRINTF("\\n [Line : %d][Push_ITc]  push_service_connect API call correctly returned %s error for unsupported feature", __LINE__, PushServiceGetError(nRet));
+                       g_bFeatureNotSupported = true;
+               }
+               return false;
+       }
+       
+       if(nRet != PUSH_SERVICE_ERROR_NONE)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] push_service_connect failed in precondition, error returned = %s \\n", __LINE__, PushServiceGetError(nRet));
+               return false;
+       }
+       
+       RUN_POLLING_LOOP;
+
+       if (!g_bStateCallbackHit)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] push_service_connect failed in precondition, error returned = Callback not invoked \\n", __LINE__);
+               return false;
+       }
+
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] push_service_connect passed in function PushServiceConnect \\n", __LINE__);
+#endif
+       return true;
+}
+
+/**
+ * @function           PushServiceDisconnect
+ * @description                Closes the connection and releases resources
+ * @parameter          NA
+ * @return                     NA
+ */
+void PushServiceDisconnect()
+{
+       push_service_disconnect(g_hServiceConnection);
+#if DEBUG
+       FPRINTF( "[Line : %d] [Push_ITc] push_service_disconnect passed in function PushServiceDisconnect \\n", __LINE__);
+#endif
+}
+
+/**
+ * @function           PushServiceConnectSendDisconnect
+ * @description                connects, send notification, disconnects
+ * @parameter          NA
+ * @return                     NA
+ */
+bool PushServiceConnectSendDisconnect()
+{
+       int nRet = -1;
+       int nTimeoutId = 0;
+       char* pszRegId = NULL;
+       
+       if (!PushServiceConnect(ConnectDisconnectPushServiceStateCB))
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return false;
+       }
+
+       if(!g_bRegisteredState)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] App not registered. Trying to register \\n", __LINE__);
+               nRet = push_service_register(g_hServiceConnection, PushServiceResultCB, NULL);
+               RUN_POLLING_LOOP;
+               if(nRet != PUSH_SERVICE_ERROR_NONE || g_bCallbackHit == false)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = %s , g_bCallbackHit = %d \\n",__LINE__, PushServiceGetError(nRet), g_bCallbackHit);
+                       PushServiceDisconnect();
+                       return false;
+               }
+               if (!g_bCallbackReturnValue)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = Register state not achieved \\n",__LINE__);
+                       PushServiceDisconnect();
+                       return false;
+               }
+       }
+       
+       nRet = push_service_get_registration_id(g_hServiceConnection,&pszRegId);
+       if(nRet != PUSH_SERVICE_ERROR_NONE)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_registration_id failed , error returned = %s \\n", __LINE__, PushServiceGetError(nRet));
+               PushServiceDisconnect();
+               return false;
+       }
+       if (pszRegId == NULL)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_registration_id returned Registration ID = NULL \\n", __LINE__);
+               PushServiceDisconnect();
+               return false;
+       }
+       
+       PushServiceDisconnect();
+       sleep(5);
+       
+       nRet = SendPushDataToServer(APPID1 , APPSECRET, pszRegId, "000101", "App_Data_to_send", 16, "Alert-Message-to-Quick-Panel", PUSH_ACTION_ALERT, PUSH_BADGE_OPTION_INCREASE, 1, 1L, 0, 0, APPID1, false);
+       sleep(5);
+       
+       return true;
+}
+
+
+/*********************************************************************/
+
+/*********************************************************************/
+
+/**
+* @testcase                    ITs_push_service_startup
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Called before each test, creates connection to push service
+* @apicovered                  NA
+* @passcase                            NA
+* @failcase                            NA
+* @precondition                        NA
+* @postcondition               NA
+*/
+void ITs_push_service_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       
+       g_bIsPushFeatureSupported = PushCheckSystemInfoFeatureSupported(PUSH_FEATURE);
+       g_bFeatureMismatch = false;
+       g_bFeatureNotSupported = false;
+}
+
+/**
+* @testcase                    ITs_push_service_cleanup
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Called after each test, Closes the connection and releases all its resources
+* @apicovered                  NA
+* @passcase                            NA
+* @failcase                            NA
+* @precondition                        NA
+* @postcondition               NA
+ */
+void ITs_push_service_cleanup(void)
+{
+       sleep(SLEEP_TIME);
+       return;
+}
+
+
+/** @addtogroup itc-push-testcases
+*  @brief              Integration testcases for module push
+*  @ingroup    itc-push
+*  @{
+*/
+
+//& purpose: Connects/Disconnects to the push service.
+//& type: auto
+
+/**
+* @testcase                    ITc_push_service_connect_disconnect_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Connects/Disconnects to the push service
+* @apicovered                  push_service_connect() , push_service_disconnect()
+* @passcase                            If push_service_connect and push_service_disconnect returns success and callbacks are invoked
+* @failcase                            If push_service_connect and push_service_disconnect fails to complete the scenario cycle in <@passcase>
+* @precondition                        There is no connection for the app_id to the push service.
+* @postcondition               The state callback will be called
+*/
+int ITc_push_service_connect_disconnect_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0, nTimeoutId = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nConnectFailCount = 0 , nCallbackFailCount = 0;
+
+       PUSH_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bStateCallbackHit = false;
+               PushGetMemAllocation();
+               PushGetTimeOfDay();
+               // Target API
+               nRet = push_service_connect(APPID1, ConnectDisconnectPushServiceStateCB, PushServiceNotifyCB, NULL, &g_hServiceConnection);
+               PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               
+               if ( !g_bIsPushFeatureSupported )
+               {
+                       if ( nRet != PUSH_SERVICE_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n [Line : %d][Push_ITc]  push_service_connect returned %s error for unsupported feature", __LINE__, PushServiceGetError(nRet));
+                               nConnectFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n [Line : %d][Push_ITc]  push_service_connect API call correctly returned %s error for unsupported feature", __LINE__, PushServiceGetError(nRet));
+                       }
+                       continue;
+               }
+
+               if(nRet != PUSH_SERVICE_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_connect failed on iteration %d, error returned = %s \\n", __LINE__,nLoopCount, PushServiceGetError(nRet));
+                       nConnectFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+
+               if (!g_bStateCallbackHit)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_connect failed on iteration %d, error returned = Callback not invoked \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+                       continue;
+               }
+
+               PushGetTimeOfDay();
+               // Target API
+               push_service_disconnect(g_hServiceConnection);
+               PushExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+       }
+
+       if (nConnectFailCount > 0 || nCallbackFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] push_service_connect failed %d times, Callback failed %d times out of %d times \\n", __LINE__, nConnectFailCount, nCallbackFailCount, MAX_COUNT);
+               PUSH_DEINITIALIZE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(push_service_connect, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(push_service_disconnect, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(push_service_connect_disconnect, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PUSH_DEINITIALIZE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: Registers/Deregisters an application to the push server.
+//& type: auto
+
+
+/**
+* @testcase                    ITc_push_service_register_deregister_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Registers/Deregisters an application to the push server
+* @apicovered                  push_service_register() , push_service_deregister()
+* @passcase                            If push_service_connect, push_service_disconnect, push_service_register and push_service_deregister returns success and callbacks are invoked
+* @failcase                            If any API fails to complete the scenario cycle in <@passcase>
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_push_service_register_deregister_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0, nTimeoutId = 0;
+       g_bRegisteredState = false;
+       if (!PushServiceConnect(ConnectDisconnectPushServiceStateCB))
+       {
+               if(true == g_bFeatureMismatch)
+               {
+                       return 1;
+               }
+               if(true == g_bFeatureNotSupported)
+               {
+                       return 0;
+               }
+               
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return 1;
+       }
+
+       if (g_bRegisteredState)
+       {
+#if DEBUG
+               FPRINTF( "[Line : %d] [Push_ITc] Already in registered stated. Unregistering the service \\n", __LINE__);
+#endif
+               nRet = push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+               if(nRet != PUSH_SERVICE_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_deregister failed, error returned = %s \\n", __LINE__, PushServiceGetError(nRet));
+                       PushServiceDisconnect();
+                       return 1;
+               }
+               if(!g_bCallbackHit)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_deregister failed, error returned = callback not invoked \\n", __LINE__);
+                       PushServiceDisconnect();
+                       return 1;
+               }
+               if(!g_bCallbackReturnValue)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_deregister failed, error returned = callback returned error \\n", __LINE__);
+                       PushServiceDisconnect();
+                       return 1;
+               }
+       }
+
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nRegisterFailCount = 0 , nDeregisterFailCount = 0, nCallbackFailCount = 0;
+
+       PUSH_INITIALIZE_LOGS_DOUBLESPEED;
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCallbackHit = false;
+               g_bCallbackReturnValue = false;
+               PushGetMemAllocation();
+               PushGetTimeOfDay();
+               // Target API
+               nRet = push_service_register(g_hServiceConnection, PushServiceResultCB, NULL);
+               PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               if(nRet != PUSH_SERVICE_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, PushServiceGetError(nRet));
+                       nRegisterFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+
+               if(!g_bCallbackHit)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+                       continue;
+               }
+               if(!g_bCallbackReturnValue)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed on iteration %d, error returned = registration state not achieved \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+                       continue;
+               }
+
+               g_bCallbackHit = false;
+               g_bCallbackReturnValue = false;
+               PushGetTimeOfDay();
+               // Target API
+               nRet = push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+               PushExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if(nRet != PUSH_SERVICE_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_deregister failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, PushServiceGetError(nRet));
+                       nDeregisterFailCount++;
+                       continue;
+               }
+
+               RUN_POLLING_LOOP;
+               if(!g_bCallbackHit)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_deregister failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+                       continue;
+               }
+               if(!g_bCallbackReturnValue)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_deregister failed on iteration %d, error returned = callback returned error \\n", __LINE__, nLoopCount);
+                       nCallbackFailCount++;
+               }
+       }
+
+       if (nRegisterFailCount > 0 || nCallbackFailCount > 0 || nDeregisterFailCount > 0 )
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed %d times, callback failed %d times, push_service_deregister failed %d times out of %d times \\n", __LINE__, nRegisterFailCount, nCallbackFailCount, nDeregisterFailCount, MAX_COUNT);
+               PUSH_DEINITIALIZE_LOGS;
+               PushServiceDisconnect();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(push_service_register, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(push_service_deregister, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(push_service_register_deregister, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PUSH_DEINITIALIZE_LOGS;
+               PushServiceDisconnect();
+               return 0;
+       }
+}
+
+//& purpose: Gets the registration ID in PUSH_STATE_REGISTERED state.
+//& type: auto
+
+/**
+* @testcase                    ITc_push_service_get_registration_id_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Gets the registration ID in PUSH_STATE_REGISTERED state.
+* @apicovered                  push_service_get_registration_id
+* @passcase                            If push_service_get_registration_id returns success and all pre-conditions pass
+* @failcase                            If any API fails to complete the scenario cycle in <@passcase>
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_push_service_get_registration_id_p(void)
+{
+       START_TEST;
+       g_bRegisteredState = false;
+       int nTimeoutId = 0;
+       int nRet = -1, nLoopCount = 0;
+       if (!PushServiceConnect(ConnectDisconnectPushServiceStateCB))
+       {
+               if(true == g_bFeatureMismatch)
+               {
+                       return 1;
+               }
+               if(true == g_bFeatureNotSupported)
+               {
+                       return 0;
+               }
+               
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return 1;
+       }
+
+       if(!g_bRegisteredState)
+       {
+#if DEBUG
+               FPRINTF( "[Line : %d] [Push_ITc] App not registered. Trying to register \\n", __LINE__);
+#endif
+               nRet = push_service_register(g_hServiceConnection, PushServiceResultCB, NULL);
+               RUN_POLLING_LOOP;
+               if(nRet != PUSH_SERVICE_ERROR_NONE || g_bCallbackHit == false)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = %s , g_bCallbackHit = %d \\n",__LINE__, PushServiceGetError(nRet), g_bCallbackHit);
+                       PushServiceDisconnect();
+                       return 1;
+               }
+               if (!g_bCallbackReturnValue)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_register failed, error returned = Register state not achieved \\n",__LINE__);
+                       PushServiceDisconnect();
+                       return 1;
+               }
+       }
+
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nFailCount = 0;
+       char* pszRegId = NULL;
+       PUSH_INITIALIZE_LOGS;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               nRet = -1;
+               PushGetMemAllocation();
+               PushGetTimeOfDay();
+               // Target API
+               nRet = push_service_get_registration_id(g_hServiceConnection,&pszRegId);
+               PushExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+               PushGetMemStatus(stSpeedMemoryLog.pszAPI1MemLog);
+               if(nRet != PUSH_SERVICE_ERROR_NONE)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_registration_id failed on iteration %d, error returned = %s \\n", __LINE__,nLoopCount, PushServiceGetError(nRet));
+                       nFailCount++;
+                       continue;
+               }
+               if (pszRegId == NULL)
+               {
+                       FPRINTF( "[Line : %d] [Push_ITc] push_service_get_registration_id returned Registration ID = NULL \\n", __LINE__);
+                       nFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_registration_id returned Registration ID= %s \\n", __LINE__, pszRegId);
+#endif
+               free(pszRegId);
+       }
+
+       push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+
+       if (nFailCount > 0)
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] push_service_get_registration_id failed %d times, out of %d times \\n", __LINE__,nFailCount, MAX_COUNT);
+               PUSH_DEINITIALIZE_LOGS;
+               PushServiceDisconnect();
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(push_service_get_registration_id, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(push_service_get_registration_id, stSpeedMemoryLog.pszAPI1MemLog);
+#endif
+               PUSH_DEINITIALIZE_LOGS;
+               PushServiceDisconnect();
+               return 0;
+       }
+}
+
+
+//& purpose: Gets notification data sent by the server.
+//& type: auto
+/**
+* @testcase                    ITc_push_service_get_notification_data_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Gets notification data sent by the server.
+* @apicovered                  PushServiceConnectSendDisconnect, PushServiceConnect, push_service_deregister,PushServiceDisconnect
+* @passcase                            If it returns 0
+* @failcase                            If api fails to complete the scenario cycle in <@passcase>
+* @precondition                        NA
+* @postcondition               The data must be released using free().
+*/
+int ITc_push_service_get_notification_data_p(void)
+{
+       START_TEST;
+       g_bGetNotificationCallback = false;
+       bool bResult = PushServiceConnectSendDisconnect();
+       if(bResult == false)
+       {
+               if(true == g_bFeatureMismatch)
+               {
+                       return 1;
+               }
+               if(true == g_bFeatureNotSupported)
+               {
+                       return 0;
+               }
+               
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnectSendDisconnect \\n", __LINE__);
+       }
+       
+       g_bRegisteredState = false;
+       bResult = PushServiceConnect(GetNotificationDataPushServiceStateCB);
+       if(g_bRegisteredState)
+       {
+               push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+       }
+       PushServiceDisconnect();
+       
+       if((g_bGetNotificationCallback == true) && (bResult == true))
+       {
+               return 0;
+       }
+       else
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return 1;
+       }
+}
+
+
+//& purpose: Gets the notification message sent by the server.
+//& type: auto
+
+/**
+* @testcase                    ITc_push_service_get_notification_message_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Gets notification data sent by the server.
+* @apicovered                  PushServiceConnectSendDisconnect, PushServiceConnect, push_service_deregister,PushServiceDisconnect
+* @passcase                            If it returns 0
+* @failcase                            If api fails to complete the scenario cycle in <@passcase>
+* @precondition                        NA
+* @postcondition               The msg must be released using free().
+*/
+int ITc_push_service_get_notification_message_p(void)
+{
+       START_TEST;
+       g_bGetNotificationCallback = false;
+       bool bResult = PushServiceConnectSendDisconnect();
+       if(bResult == false)
+       {
+               if(true == g_bFeatureMismatch)
+               {
+                       return 1;
+               }
+               if(true == g_bFeatureNotSupported)
+               {
+                       return 0;
+               }
+               
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnectSendDisconnect \\n", __LINE__);
+       }
+       
+       g_bRegisteredState = false;
+       bResult = PushServiceConnect(GetNotificationMessagePushServiceStateCB);
+       if(g_bRegisteredState)
+       {
+               push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+       }
+       PushServiceDisconnect();
+       
+       if((g_bGetNotificationCallback == true) && (bResult == true))
+       {
+               return 0;
+       }
+       else
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return 1;
+       }
+}
+
+//& purpose: Gets the received time of the notification message.
+//& type: auto
+
+/**
+* @testcase                    ITc_push_service_get_notification_time_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Gets the received time of the notification message.
+* @apicovered                  PushServiceConnectSendDisconnect, PushServiceConnect, push_service_deregister,PushServiceDisconnect
+* @passcase                            If it returns 0
+* @failcase                            If api fails to complete the scenario cycle in <@passcase>
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_push_service_get_notification_time_p(void)
+{
+       START_TEST;
+       g_bGetNotificationCallback = false;
+       bool bResult = PushServiceConnectSendDisconnect();
+       if(bResult == false)
+       {
+               if(true == g_bFeatureMismatch)
+               {
+                       return 1;
+               }
+               if(true == g_bFeatureNotSupported)
+               {
+                       return 0;
+               }
+               
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnectSendDisconnect \\n", __LINE__);
+       }
+       
+       g_bRegisteredState = false;
+       bResult = PushServiceConnect(GetNotificationTimePushServiceStateCB);
+       if(g_bRegisteredState)
+       {
+               push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+       }
+       PushServiceDisconnect();
+       
+       if((g_bGetNotificationCallback == true) && (bResult == true))
+       {
+               return 0;
+       }
+       else
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return 1;
+       }
+}
+
+//& purpose: Gets the sender of the notification.
+//& type: auto
+
+/**
+* @testcase                    ITc_push_service_get_notification_sender_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Gets the sender of the notification.
+* @apicovered                  PushServiceConnectSendDisconnect, PushServiceConnect, push_service_deregister,PushServiceDisconnect
+* @passcase                            If it returns 0
+* @failcase                            If api fails to complete the scenario cycle in <@passcase>
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_push_service_get_notification_sender_p(void)
+{
+       START_TEST;
+       g_bGetNotificationCallback = false;
+       bool bResult = PushServiceConnectSendDisconnect();
+       if(bResult == false)
+       {
+               if(true == g_bFeatureMismatch)
+               {
+                       return 1;
+               }
+               if(true == g_bFeatureNotSupported)
+               {
+                       return 0;
+               }
+               
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnectSendDisconnect \\n", __LINE__);
+       }
+       
+       g_bRegisteredState = false;
+       bResult = PushServiceConnect(GetNotificationSenderPushServiceStateCB);
+       if(g_bRegisteredState)
+       {
+               push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+       }
+       PushServiceDisconnect();
+       
+       if((g_bGetNotificationCallback == true) && (bResult == true))
+       {
+               return 0;
+       }
+       else
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return 1;
+       }
+}
+
+//& purpose: Gets the session ID of the notification.
+//& type: auto
+
+/**
+* @testcase                    ITc_push_service_get_notification_session_info_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Gets the session ID of the notification.
+* @apicovered                  PushServiceConnectSendDisconnect, PushServiceConnect, push_service_deregister,PushServiceDisconnect
+* @passcase                            If it returns 0
+* @failcase                            If api fails to complete the scenario cycle in <@passcase>
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_push_service_get_notification_session_info_p(void)
+{
+       START_TEST;
+       g_bGetNotificationCallback = false;
+       bool bResult = PushServiceConnectSendDisconnect();
+       if(bResult == false)
+       {
+               if(true == g_bFeatureMismatch)
+               {
+                       return 1;
+               }
+               if(true == g_bFeatureNotSupported)
+               {
+                       return 0;
+               }
+               
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnectSendDisconnect \\n", __LINE__);
+       }
+       
+       g_bRegisteredState = false;
+       bResult = PushServiceConnect(GetNotificationSessionInfoPushServiceStateCB);
+       if(g_bRegisteredState)
+       {
+               push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+       }
+       PushServiceDisconnect();
+       
+       if((g_bGetNotificationCallback == true) && (bResult == true))
+       {
+               return 0;
+       }
+       else
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return 1;
+       }
+}
+
+//& purpose: Gets the request ID assigned by the sender.
+//& type: auto
+
+/**
+* @testcase                    ITc_push_service_get_notification_request_id_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Called when the registration state is refreshed.
+* @apicovered                  PushServiceConnectSendDisconnect, PushServiceConnect, push_service_deregister,PushServiceDisconnect
+* @passcase                            If it returns 0
+* @failcase                            If api fails to complete the scenario cycle in <@passcase>
+* @precondition                        NA
+* @postcondition               The request_id must be released using free().
+*/
+int ITc_push_service_get_notification_request_id_p(void)
+{
+       START_TEST;
+       g_bGetNotificationCallback = false;
+       bool bResult = PushServiceConnectSendDisconnect();
+       if(bResult == false)
+       {
+               if(true == g_bFeatureMismatch)
+               {
+                       return 1;
+               }
+               if(true == g_bFeatureNotSupported)
+               {
+                       return 0;
+               }
+               
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnectSendDisconnect \\n", __LINE__);
+       }
+       
+       g_bRegisteredState = false;
+       bResult = PushServiceConnect(GetNotificationRequestIdPushServiceStateCB);
+       if(g_bRegisteredState)
+       {
+               push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+       }
+       PushServiceDisconnect();
+       
+       if((g_bGetNotificationCallback == true) && (bResult == true))
+       {
+               return 0;
+       }
+       else
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return 1;
+       }
+}
+
+//& purpose: Gets the value in the type field of the notification.
+//& type: auto
+
+/**
+* @testcase                    ITc_push_service_get_notification_type_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Gets the value in the type field of the notification.
+* @apicovered                  PushServiceConnectSendDisconnect, PushServiceConnect, push_service_deregister,PushServiceDisconnect
+* @passcase                            If it returns 0
+* @failcase                            If api fails to complete the scenario cycle in <@passcase>
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_push_service_get_notification_type_p(void)
+{
+       START_TEST;
+       g_bGetNotificationCallback = false;
+       bool bResult = PushServiceConnectSendDisconnect();
+       if(bResult == false)
+       {
+               if(true == g_bFeatureMismatch)
+               {
+                       return 1;
+               }
+               if(true == g_bFeatureNotSupported)
+               {
+                       return 0;
+               }
+               
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnectSendDisconnect \\n", __LINE__);
+       }
+       
+       g_bRegisteredState = false;
+       bResult = PushServiceConnect(GetNotificationTypePushServiceStateCB);
+       if(g_bRegisteredState)
+       {
+               push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+       }
+       PushServiceDisconnect();
+       
+       if((g_bGetNotificationCallback == true) && (bResult == true))
+       {
+               return 0;
+       }
+       else
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return 1;
+       }
+}
+
+//& purpose: Requests unread notification messages to the push server.
+//& type: auto
+
+/**
+* @testcase                    ITc_push_service_request_unread_notification_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Requests unread notification messages to the push server ,check callback.
+* @apicovered                  PushServiceConnectSendDisconnect, PushServiceConnect, push_service_deregister,PushServiceDisconnect
+* @passcase                            If it returns 0
+* @failcase                            If api fails to complete the scenario cycle in <@passcase>
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_push_service_request_unread_notification_p(void)
+{
+       START_TEST;
+       g_bGetNotificationCallback = false;
+       bool bResult = PushServiceConnectSendDisconnect();
+       if(bResult == false)
+       {
+               if(true == g_bFeatureMismatch)
+               {
+                       return 1;
+               }
+               if(true == g_bFeatureNotSupported)
+               {
+                       return 0;
+               }
+               
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnectSendDisconnect \\n", __LINE__);
+       }
+       
+       g_bRegisteredState = false;
+       bResult = PushServiceConnect(GetNotificationRequestUnreadPushServiceStateCB);
+       if(g_bRegisteredState)
+       {
+               push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+       }
+       PushServiceDisconnect();
+       
+       if((g_bGetNotificationCallback == true) && (bResult == true))
+       {
+               return 0;
+       }
+       else
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return 1;
+       }
+}
+
+/**
+* @testcase                    ITc_push_service_get_unread_free_notification_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 NA
+* @scenario                            Get unread notification, Free notification
+* @apicovered                  PushServiceConnectSendDisconnect, PushServiceConnect, push_service_deregister,PushServiceDisconnect
+* @passcase                            If it returns 0
+* @failcase                            If api fails to complete the scenario cycle in <@passcase>
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_push_service_get_unread_free_notification_p(void)
+{
+       START_TEST;
+       g_bGetNotificationCallback = false;
+       bool bResult = PushServiceConnectSendDisconnect();
+       if(bResult == false)
+       {
+               if(true == g_bFeatureMismatch)
+               {
+                       return 1;
+               }
+               if(true == g_bFeatureNotSupported)
+               {
+                       return 0;
+               }
+               
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnectSendDisconnect \\n", __LINE__);
+       }
+       
+       g_bRegisteredState = false;
+       bResult = PushServiceConnect(GetNotificationUnreadFreeNotificationCB);
+       if(g_bRegisteredState)
+       {
+               push_service_deregister(g_hServiceConnection, PushServiceResultCB, NULL);
+       }
+       PushServiceDisconnect();
+       
+       if((g_bGetNotificationCallback == true) && (bResult == true))
+       {
+               return 0;
+       }
+       else
+       {
+               FPRINTF( "[Line : %d] [Push_ITc] Precondition failed in PushServiceConnect \\n", __LINE__);
+               return 1;
+       }
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/push/tct-push-native.c b/src/itc/push/tct-push-native.c
new file mode 100755 (executable)
index 0000000..b38b384
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-push-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/push/tct-push-native.h b/src/itc/push/tct-push-native.h
new file mode 100755 (executable)
index 0000000..77dfbff
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_PUSH_NATIVE_H__
+#define __TCT_PUSH_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_push_service_startup(void);
+extern void ITs_push_service_cleanup(void);
+
+extern int ITc_push_service_connect_disconnect_p(void);
+extern int ITc_push_service_register_deregister_p(void);
+extern int ITc_push_service_get_registration_id_p(void);
+extern int ITc_push_service_get_notification_data_p(void);
+extern int ITc_push_service_get_notification_message_p(void);
+extern int ITc_push_service_get_notification_time_p(void);
+extern int ITc_push_service_get_notification_sender_p(void);
+extern int ITc_push_service_get_notification_session_info_p(void);
+extern int ITc_push_service_get_notification_request_id_p(void);
+extern int ITc_push_service_get_notification_type_p(void);
+extern int ITc_push_service_request_unread_notification_p(void);
+extern int ITc_push_service_get_unread_free_notification_p(void);
+
+testcase tc_array[] = {
+    {"ITc_push_service_connect_disconnect_p", ITc_push_service_connect_disconnect_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {"ITc_push_service_register_deregister_p", ITc_push_service_register_deregister_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {"ITc_push_service_get_registration_id_p", ITc_push_service_get_registration_id_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {"ITc_push_service_get_notification_data_p", ITc_push_service_get_notification_data_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {"ITc_push_service_get_notification_message_p", ITc_push_service_get_notification_message_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {"ITc_push_service_get_notification_time_p", ITc_push_service_get_notification_time_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {"ITc_push_service_get_notification_sender_p", ITc_push_service_get_notification_sender_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {"ITc_push_service_get_notification_session_info_p", ITc_push_service_get_notification_session_info_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {"ITc_push_service_get_notification_request_id_p", ITc_push_service_get_notification_request_id_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {"ITc_push_service_get_notification_type_p", ITc_push_service_get_notification_type_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {"ITc_push_service_request_unread_notification_p", ITc_push_service_request_unread_notification_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {"ITc_push_service_get_unread_free_notification_p", ITc_push_service_get_unread_free_notification_p, ITs_push_service_startup, ITs_push_service_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_PUSH_NATIVE_H__
diff --git a/src/itc/radio/CMakeLists.txt b/src/itc/radio/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..a9df5e7
--- /dev/null
@@ -0,0 +1,37 @@
+SET(PKG_NAME "radio")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-radio")
+SET(TC_SOURCES
+       ITs-radio-common.c
+       ITs-radio.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       gobject-2.0
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/radio/ITs-radio-common.c b/src/itc/radio/ITs-radio-common.c
new file mode 100755 (executable)
index 0000000..f201ba9
--- /dev/null
@@ -0,0 +1,213 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-radio-common.h"
+
+/** @addtogroup itc-radio
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function definitions here
+extern struct timeval g_stRadioStartTime;
+extern struct mallinfo g_stRadioMemInfo;
+
+/**
+* @function                    RadioGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void RadioGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stRadioMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stRadioMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stRadioMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }       
+#endif
+}
+
+/**
+* @function            RadioGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* RadioGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case RADIO_ERROR_NONE:                          szErrorVal = "RADIO_ERROR_NONE";                                        break;
+       case RADIO_ERROR_INVALID_PARAMETER:     szErrorVal = "RADIO_ERROR_INVALID_PARAMETER";           break;
+       case RADIO_ERROR_INVALID_OPERATION:     szErrorVal = "RADIO_ERROR_INVALID_OPERATION";           break;
+       case RADIO_ERROR_OUT_OF_MEMORY:         szErrorVal = "RADIO_ERROR_OUT_OF_MEMORY";                       break;
+       case RADIO_ERROR_INVALID_STATE:         szErrorVal = "RADIO_ERROR_INVALID_STATE";                       break;
+       case RADIO_ERROR_SOUND_POLICY:          szErrorVal = "RADIO_ERROR_SOUND_POLICY";                        break;
+       default:                                                        szErrorVal = "Unknown Error";                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            RadioGetState
+* @description         Maps state enums to string values
+* @parameter           nRet : state code returned
+* @return                      state string
+*/
+char* RadioGetState(radio_state_e nRet)
+{
+       char *szStateVal = NULL;
+       switch ( nRet )
+       {
+       case RADIO_STATE_READY:                 szStateVal = "RADIO_STATE_READY";                       break;  
+       case RADIO_STATE_PLAYING:               szStateVal = "RADIO_STATE_PLAYING";                     break;
+       case RADIO_STATE_SCANNING:              szStateVal = "RADIO_STATE_SCANNING";            break;
+       default:                                                szStateVal = "Unknown State";                           break;
+       }
+
+       return szStateVal;
+}
+/**
+* @function                    RadioGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void RadioGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stRadioMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void RadioExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stRadioStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stRadioStartTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+/**
+ * @function           RadioGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stRadioStartTime
+ * @parameter          NA
+ * @return                 NA
+ *
+ */ 
+void RadioGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stRadioStartTime, NULL);
+#endif
+}
+
+/**
+ * @function           Radio_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Radio_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("[Line : %d][radio_ITc] Null key value passed to function : Radio_Check_System_Info_Feature_Supported\\n",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool(pszKey, &bValue);
+
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][radio_ITc] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n",__LINE__, Radio_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("[Line : %d][radio_ITc] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)\\n",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][radio_ITc] system_info_get_platform_bool returned Supported status feature for (key = %s)\\n",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+/**
+ * @function           Radio_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Radio_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            szErrorVal = "Successful";                                                                              break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       szErrorVal = "Error - Cannot find key in model config file";    break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        szErrorVal = "Error - An input/output error occurred when read value from model config file";   break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           szErrorVal = "Error - Out of memory";                                                   break;
+               default:                                                                        szErrorVal = "Unknown error";                                                                   break;
+       }
+
+       return szErrorVal;
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/radio/ITs-radio-common.h b/src/itc/radio/ITs-radio-common.h
new file mode 100755 (executable)
index 0000000..f204f35
--- /dev/null
@@ -0,0 +1,141 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_RADIO_COMMON_H_
+#define _ITS_RADIO_COMMON_H_
+
+#include "assert.h"
+#include <radio.h>
+#include <system_info.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/** @addtogroup itc-radio
+*  @ingroup itc
+*  @{
+*/
+
+#define LOG                                                    100
+#define TIMELOG                                                10
+#define MEMLOG                                         10
+#define MICROSECONDS_PER_SECOND                1000000
+#define GMAINTIMEOUT                           25000
+#define RADIO_FEATURE               "http://tizen.org/feature/fmradio"
+FILE* g_fpLog;
+
+typedef struct speedmemory
+{
+       char *pszMemLog;
+       char *pszAPI1SpeedLog;
+       char *pszAPI2SpeedLog;
+} SpeedMemoryLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf (g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][radio_ITc] Starting test : %s\\n", __LINE__, __FUNCTION__);\
+       if ( g_bRadioNotSupported )\
+       {\
+               FPRINTF("[Line : %d][radio_ITc] Required feature of radio is not supported. So leaving test\\n", __LINE__);\
+               return 0;\
+       }\
+       if ( g_bMismatch )\
+       {\
+          FPRINTF("[Line : %d][radio_ITc] Radio_Check_System_Info_Feature_Supported and radio_create returned different value. So leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+       if ( !g_nRadioCreated)\
+       {\
+               FPRINTF("[Line : %d][radio_ITc] Precondition of radio failed\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       if ( strlen(memLog) > 0 )\
+       {\
+               memLog[strlen(memLog)-1] = '\0';\
+               FPRINTF(" [radio_ITc] %s_MemoryLeakStatus - %s\\n", #api, memLog);\
+       }
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if ( strlen(speedLog) > 0 )\
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[radio_ITc] %s_TimeInMicrosec- %s\\n", #api, speedLog);\
+       }
+
+#define RADIO_INITIALISE_MEM_LOGS {\
+       stSpeedMemoryLog.pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));\
+}
+       
+#define RADIO_INITIALISE_SPEED_LOGS {\
+       stSpeedMemoryLog.pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+       stSpeedMemoryLog.pszAPI2SpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));\
+}
+
+#define RADIO_DEINITIALISE_LOGS {\
+       if ( stSpeedMemoryLog.pszMemLog != NULL)\
+       {\
+               free(stSpeedMemoryLog.pszMemLog);\
+               stSpeedMemoryLog.pszMemLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI1SpeedLog != NULL)\
+       {\
+               free (stSpeedMemoryLog.pszAPI1SpeedLog);\
+               stSpeedMemoryLog.pszAPI1SpeedLog = NULL;\
+       }\
+       if ( stSpeedMemoryLog.pszAPI2SpeedLog != NULL)\
+       {\
+               free (stSpeedMemoryLog.pszAPI2SpeedLog);\
+               stSpeedMemoryLog.pszAPI2SpeedLog = NULL;\
+       }\
+}
+
+#define RUN_POLLING_LOOP {\
+       g_pMainLoop = g_main_loop_new(NULL, false);\
+       nTimeoutId = g_timeout_add(GMAINTIMEOUT, RadioTimeout, g_pMainLoop);\
+       g_main_loop_run(g_pMainLoop);\
+       g_source_remove(nTimeoutId);\
+       g_pMainLoop = NULL;\
+}
+
+void RadioGetMemAllocation();
+void RadioExecutionDelay(char* pszAPITime);
+void RadioGetTimeOfDay();
+void RadioGetMemStatus(char *pszAPIMemory);
+char* RadioGetError(int nRet);
+char* RadioGetState(radio_state_e nRet);
+
+// Check the supported feature for the given key value
+bool Radio_Check_System_Info_Feature_Supported(char* pszKey);
+
+// Maps error enums to string values
+char* Radio_System_Info_GetError(int nRet);
+
+/** @} */
+#endif  //_ITS_RADIO_COMMON_H_
diff --git a/src/itc/radio/ITs-radio.c b/src/itc/radio/ITs-radio.c
new file mode 100755 (executable)
index 0000000..846877f
--- /dev/null
@@ -0,0 +1,1286 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-radio-common.h"
+
+/** @addtogroup itc-radio
+*  @ingroup itc
+*  @{
+*/
+
+bool g_bCallbackHit;
+bool g_bCallbackScanComplete;
+bool g_bRadioNotSupported = false;
+bool g_bMismatch = false;
+struct timeval g_stRadioStartTime;
+struct mallinfo g_stRadioMemInfo;
+static GMainLoop *g_pMainLoop = NULL;
+int nContextTimeoutId;
+radio_h g_pstRadio;
+int g_nRadioCreated;
+
+//& set: Radio
+
+void ITs_radio_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       g_bRadioNotSupported = false;
+       g_bMismatch = false;
+       g_nRadioCreated = false;
+       if ( !Radio_Check_System_Info_Feature_Supported(RADIO_FEATURE) )
+       {
+               if( radio_create(&g_pstRadio) != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       g_bMismatch = true;
+               }
+               else
+               {
+                       g_bRadioNotSupported = true;
+               }
+               return;
+       }
+       int nRetVal = radio_create(&g_pstRadio);
+       if ( nRetVal != RADIO_ERROR_NONE )
+       {
+               g_nRadioCreated = false;
+               FPRINTF("[Line : %d][radio_ITc] radio_create failed in startup, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+               return;
+       }
+       else
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_create successful in startup\\n", __LINE__);
+               radio_state_e eState ;
+               nRetVal = radio_get_state(g_pstRadio, &eState);
+               if(nRetVal != RADIO_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state failed in startup, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+                       g_nRadioCreated = false;
+                       return;
+               }
+               else if(eState != RADIO_STATE_READY)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state return wrong state in startup, state returned = %s\\n", __LINE__, RadioGetState(eState));
+                       g_nRadioCreated = false;
+                       return;
+               }
+               else
+               {
+                       g_nRadioCreated = true;
+               }
+       }
+}
+
+void ITs_radio_cleanup(void)
+{
+       int nRetVal = -1;
+       
+       if(g_nRadioCreated)
+       {
+               nRetVal = radio_destroy(g_pstRadio);
+               if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_destroy failed in cleanup, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+               }
+       }
+}
+
+/**
+ * @function           RadioTimeout
+ * @description                Called if some callback is not invoked for a particular serial Timeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */
+gboolean RadioTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               g_main_loop_unref(pMainLoop);
+               pMainLoop = NULL;
+       }
+       FPRINTF("[Line : %d][radio_ITc] Callback RadioTimeout\\n", __LINE__);
+       return false;
+}
+
+/**
+ * @function           RadioSeekCompletedCB
+ * @description                Called when power state changes.
+ * @parameter          frequency of next station , user_data data that user passes for calling callback
+ * @return                     NA
+ */
+static void RadioSeekCompletedCB(int frequency, void* user_data)
+{
+       FPRINTF("[Line : %d][radio_ITc] callback function RadioSeekCompletedCB called successfully\\n", __LINE__);
+       g_bCallbackHit = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+}
+
+/**
+ * @function           RadioScanStoppedCB
+ * @description                Called when radio scan is stopped completed.
+ * @parameter          user_data data that user passes for calling callback
+ * @return                     NA
+ */
+static void RadioScanStoppedCB(void* user_data)
+{
+       FPRINTF("[Line : %d][radio_ITc] callback function RadioScanStoppedCB called successfully\\n", __LINE__);
+       g_bCallbackHit = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+}
+
+/**
+ * @function           RadioScanUpdatedCB
+ * @description                Called when scan updated.
+ * @parameter          frequency of next station, user_data data that user passes for calling callback
+ * @return                     NA
+ */
+static void RadioScanUpdatedCB(int frequency, void* user_data)
+{
+       FPRINTF("[Line : %d][radio_ITc] callback function RadioScanUpdatedCB called successfully\\n", __LINE__);
+       g_bCallbackHit = true;
+}
+
+
+/**
+ * @function           RadioScanUpdatedCallBack
+ * @description                Called when scan updated.
+ * @parameter          frequency of next station, user_data data that user passes for calling callback
+ * @return                     NA
+ */
+static void RadioScanUpdatedCallBack(int frequency, void* user_data)
+{
+       FPRINTF("[Line : %d][radio_ITc] callback function RadioScanUpdatedCallBack called successfully\\n", __LINE__);
+       g_bCallbackHit = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+}
+
+/**
+ * @function           RadioScanCompletedCB
+ * @description                Called when radio scan is  completed.
+ * @parameter          user_data data that user passes for calling callback
+ * @return                     NA
+ */
+static void RadioScanCompletedCB(void* user_data)
+{
+       FPRINTF("[Line : %d][radio_ITc] callback function RadioScanCompletedCB called successfully\\n", __LINE__);
+       g_bCallbackScanComplete = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+}
+
+/**
+ * @function           RadioInterruptedCB
+ * @description                Called when radio radio is interrupted.
+ * @parameter          radio interrupted code, user_data data that user passes for calling callback
+ * @return                     NA
+ */
+static void RadioInterruptedCB(radio_interrupted_code_e code, void* user_data)
+{
+       FPRINTF("[Line : %d][radio_ITc] callback function RadioInterruptedCB called successfully\\n", __LINE__);
+       g_bCallbackHit = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+}
+
+/** @addtogroup itc-radio-testcases
+*  @brief              Integration testcases for module radio
+*  @ingroup    itc-radio
+*  @{
+*/
+
+//& purpose: radio_create_destroy TC.
+//& type: auto
+/**
+* @testcase                    ITc_radio_create_destroy_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Creates and destroy a radio handle
+* @scenario                            Create a radio handle\n
+*                                              Destroy the radio handle and release all resource
+* @apicovered                  radio_create, radio_destroy
+* @passcse                             When radio_create, radio_destroy are successful
+* @failcase                            If target API radio_create or radio_destroy fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_radio_create_destroy_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       radio_state_e eState ;
+       int nGetFailCount = 0;
+       
+       nRetVal = radio_destroy(g_pstRadio);
+       if ( nRetVal != RADIO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_destroy failed , error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+               return 1;
+       }
+       
+       g_nRadioCreated = false;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nCreateFailCount = 0, nDestroyFailCount = 0;
+#if SPEED_CHECK
+       RADIO_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       RADIO_INITIALISE_MEM_LOGS;
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RadioGetMemAllocation();
+               RadioGetTimeOfDay();
+               nRetVal = radio_create(&g_pstRadio);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_create failed, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+                       nCreateFailCount++;
+                       continue;
+               }
+#if DEBUG
+                       FPRINTF("[Line : %d][radio_ITc] radio_create passed\\n", __LINE__);
+#endif
+               
+               nRetVal = radio_get_state(g_pstRadio, &eState);
+               if(nRetVal != RADIO_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state failed, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if(eState != RADIO_STATE_READY)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state returned invalid state , state returned = %s\\n", __LINE__, RadioGetState(eState));
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               RadioGetTimeOfDay();
+               nRetVal = radio_destroy(g_pstRadio);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               RadioGetMemStatus(stSpeedMemoryLog.pszMemLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_destroy failed, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+                       nDestroyFailCount++;
+               }
+#if DEBUG
+                       FPRINTF("[Line : %d][radio_ITc] radio_destroy passed\\n", __LINE__);
+#endif
+       }
+
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_create failed %d times, radio_destroy failed %d  times, radio_get_state failed %d times out of %d times\\n", __LINE__, nCreateFailCount, nDestroyFailCount, nGetFailCount, MAX_COUNT);
+               RADIO_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(radio_create, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(radio_destroy, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(radio_create_destroy, stSpeedMemoryLog.pszMemLog);
+#endif
+               RADIO_DEINITIALISE_LOGS;
+       }
+       return 0;
+}
+
+//& purpose: radio_start_stop TC.
+//& type: auto
+/**
+* @testcase                    ITc_radio_start_stop_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description             starts and stops a radio handle
+* @scenario                            Creates a radio handle and start the radio\n
+*                       Stop the radio
+* @apicovered                  radio_start, radio_stop
+* @passcse                             When radio_start, radio_stop, radio_create and radio_destroy are successful
+* @failcase                            If target API radio_start, radio_stop, radio_create or radio_destroy fails
+* @precondition                        Radio state must be RADIO_STATE_READY by radio create for start\n
+*                       The radio state must be RADIO_STATE_PLAYING by radio_start for stop
+* @postcondition               The radio state will be RADIO_STATE_PLAYING after radio_start\n
+*                                              The radio state will be RADIO_STATE_READY after radio stop
+*/
+int ITc_radio_start_stop_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0, nGetFailCount = 0;
+       radio_state_e eState ;
+       
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nStartFailCount = 0, nStopFailCount = 0;
+#if SPEED_CHECK
+       RADIO_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       RADIO_INITIALISE_MEM_LOGS;
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RadioGetMemAllocation();
+               RadioGetTimeOfDay();
+               nRetVal = radio_start(g_pstRadio);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_start failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nStartFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_start passed  for loop count = %d\\n", __LINE__, nLoopCount);
+#endif
+
+               nRetVal = radio_get_state(g_pstRadio, &eState);
+               if(nRetVal != RADIO_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state failed, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if(eState != RADIO_STATE_PLAYING)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state return invalid state , state returned = %s\\n", __LINE__, RadioGetState(eState));
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               RadioGetTimeOfDay();
+               nRetVal = radio_stop(g_pstRadio);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               RadioGetMemStatus(stSpeedMemoryLog.pszMemLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_stop failed  for loop count = %d, error returned = %s\\n", __LINE__,  nLoopCount, RadioGetError(nRetVal));
+                       nStopFailCount++;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_stop passed for loop count = %d\\n", __LINE__,  nLoopCount);
+#endif
+       }
+
+       if ( nStartFailCount > 0 || nStopFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_start failed %d times, radio_stop failed %d times, radio_get_state failed %d times out of %d times\\n",  __LINE__, nStartFailCount, nStopFailCount, nGetFailCount, MAX_COUNT);
+               RADIO_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(radio_start, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(radio_stop, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(radio_start_stop, stSpeedMemoryLog.pszMemLog);
+#endif
+               RADIO_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose:  radio_set_get_frequency TC.
+//& type: auto
+/**
+* @testcase                    ITc_radio_set_get_frequency_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 set and get radio frequency
+* @scenario                            Set radio frequency\n
+*                                              Get radio frequency
+* @apicovered                  radio_set_frequency, radio_get_frequency
+* @passcse                             When radio_set_frequency, radio_get_frequency are successful
+* @failcase                            If target API radio_set_frequency or radio_get_frequency fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_radio_set_get_frequency_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchFailCount = 0;
+       int nSetFrequency = 93100;
+       int nGetFrequency = -1;
+
+#if SPEED_CHECK
+       RADIO_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       RADIO_INITIALISE_MEM_LOGS;
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RadioGetMemAllocation();
+               RadioGetTimeOfDay();
+               nRetVal = radio_set_frequency(g_pstRadio,nSetFrequency);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_set_frequency failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_set_frequency passed\\n", __LINE__);
+#endif
+
+               RadioGetTimeOfDay();
+               nRetVal = radio_get_frequency(g_pstRadio, &nGetFrequency);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               RadioGetMemStatus(stSpeedMemoryLog.pszMemLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_frequency failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_get_frequency passed for loop count = %d\\n", __LINE__, nLoopCount);
+#endif
+
+               if( nSetFrequency != nGetFrequency )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_frequency failed for loop count = %d, error returned = set get values mismatched, set value = %d, get value = %d\\n", __LINE__, nLoopCount, nSetFrequency, nGetFrequency);
+                       nMismatchFailCount++;
+               }
+       }
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchFailCount > 0)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_set_frequency failed %d times, radio_get_frequency failed %d  times, radio frequency mismatch occurred %d times, out of %d times\\n",  __LINE__, nSetFailCount, nGetFailCount, nMismatchFailCount, MAX_COUNT);
+               RADIO_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(radio_create, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(radio_destroy, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(radio_create_destroy, stSpeedMemoryLog.pszMemLog);
+#endif
+               RADIO_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: radio_set_mute_muted TC.
+//& type: auto
+/**
+* @testcase                    ITc_radio_set_mute_muted_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 mute the radio and check whether it is muted or not
+* @scenario                            Mute radio\n
+*                                              Check it is muted or not
+* @apicovered                  radio_set_mute, radio_is_muted
+* @passcse                             When radio_set_mute, radio_muted are successful
+* @failcase                            If target API radio_set_mute or radio_is_muted fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_radio_set_mute_muted_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       radio_state_e eState ;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nSetFailCount = 0;
+       int nGetFailCount = 0, nMismatchCount = 0;
+       bool bMute = false;
+       bool bMuted = true;
+       nRetVal = radio_start(g_pstRadio);
+       if ( nRetVal != RADIO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_start failed in precondition, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+               return 1;
+       }
+       nRetVal = radio_get_state(g_pstRadio, &eState);
+       if(nRetVal != RADIO_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_get_state failed in precondition, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+               return 1;
+       }
+       else if(eState != RADIO_STATE_PLAYING)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_get_state return wrong state in precondition, state returned = %s\\n", __LINE__, RadioGetState(eState));
+               return 1;
+       }
+#if SPEED_CHECK
+       RADIO_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       RADIO_INITIALISE_MEM_LOGS;
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RadioGetMemAllocation();
+               RadioGetTimeOfDay();
+               nRetVal = radio_set_mute(g_pstRadio, bMute);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_set_mute failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_set_mute passed for loop count = %d\\n", __LINE__, nLoopCount);
+#endif
+
+               RadioGetTimeOfDay();
+               nRetVal = radio_is_muted(g_pstRadio, &bMuted);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               RadioGetMemStatus(stSpeedMemoryLog.pszMemLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_is_muted failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_is_muted passed for loop count = %d\\n", __LINE__, nLoopCount);
+#endif
+               if ( bMuted != bMute )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_is_muted failed for loop count = %d, error returned = value mismatched \\n", __LINE__, nLoopCount);
+                       nMismatchCount++;
+               }
+       }
+       nRetVal = radio_stop(g_pstRadio);
+       if ( nRetVal != RADIO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_stop failed,error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+       }
+       else
+       {
+               nRetVal = radio_get_state(g_pstRadio, &eState);
+               if(nRetVal != RADIO_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state failed in, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+               }
+               else if(eState != RADIO_STATE_READY)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state return wrong state, state returned = %s\\n", __LINE__, RadioGetState(eState));
+               }
+       }
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_set_mute failed %d times, radio_is_muted failed %d times, mismatch in value = %d times out of %d times\\n",  __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               RADIO_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(radio_set_mute, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(radio_is_muted, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(radio_set_mute_muted, stSpeedMemoryLog.pszMemLog);
+#endif
+               RADIO_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: radio_get_state TC.
+//& type: auto
+/**
+* @testcase                    ITc_radio_get_state_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 gets the radio state
+* @scenario                            Creates a radio handle\n
+*                                              Gets the radio state
+* @apicovered                  radio_get_state
+* @passcse                             When radio_get_state if successful
+* @failcase                            If target API radio_get_state fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_radio_get_state_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nGetStateFailCount = 0;
+       radio_state_e eState = RADIO_STATE_PLAYING;
+
+#if SPEED_CHECK
+       stSpeedMemoryLog.pszAPI1SpeedLog = calloc (TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       RADIO_INITIALISE_MEM_LOGS;
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RadioGetMemAllocation();
+               RadioGetTimeOfDay();
+               nRetVal = radio_get_state(g_pstRadio, &eState);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nGetStateFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_get_state passed for loop count = %d\\n", __LINE__, nLoopCount);
+#endif
+       }
+
+       if ( nGetStateFailCount > 0)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_get_state failed %d times, out of %d times\\n",  __LINE__, nGetStateFailCount, MAX_COUNT);
+               RADIO_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(radio_get_state, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(radio_get_state, stSpeedMemoryLog.pszMemLog);
+#endif
+               RADIO_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: radio_get_signal_strength TC.
+//& type: auto
+/**
+* @testcase                    ITc_radio_get_signal_strength_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 gets the radio state
+* @scenario                            Creates a radio handle\n
+*                                              Gets the signal strength
+* @apicovered                  radio_get_signal_strength
+* @passcse                             When radio_create, radio_get_signal_strength are successful
+* @failcase                            If target API radio_create or radio_get_signal_strength fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_radio_get_signal_strength_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nGetSignalFailCount = 0;
+       int nStrength = 0;
+
+#if SPEED_CHECK
+       stSpeedMemoryLog.pszAPI1SpeedLog = calloc (TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+#if MEMORY_CHECK
+       RADIO_INITIALISE_MEM_LOGS;
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RadioGetMemAllocation();
+               RadioGetTimeOfDay();
+               nRetVal = radio_get_signal_strength(g_pstRadio, &nStrength);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_signal_strength failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nGetSignalFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_get_signal_strength passed for loop count = %d\\n", __LINE__, nLoopCount);
+#endif
+       }
+
+       if ( nGetSignalFailCount > 0)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_get_signal_strength failed %d times, out of %d times\\n", __LINE__, nGetSignalFailCount, MAX_COUNT);
+               RADIO_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(radio_get_signal_strength, stSpeedMemoryLog.pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(radio_get_signal_strength, stSpeedMemoryLog.pszMemLog);
+#endif
+               RADIO_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: radio_seek_up_down TC.
+//& type: auto
+/**
+* @testcase                    ITc_radio_seek_up_down_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 starts and stops a radio handle
+* @scenario                            Creates a radio handle and start the radio and seeks up or down
+* @apicovered                  radio_start, radio_stop, radio_seek_up, radio_seek_down
+* @passcse                             When radio_start, radio_stop, radio_seek_up and radio_seek_down are successful
+* @failcase                            If target API radio_start, radio_stop, radio_seek_up or radio_seek_down fails
+* @precondition                        The radio state must be RADIO_STATE_PLAYING by radio_start for radio_seek_up
+* @postcondition               It invokes RadioSeekCompletedCB when seek completes
+*/
+int ITc_radio_seek_up_down_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nSeekUpFailCount = 0;
+       int nSeekDownFailCount = 0;
+       int nCallbackUpFailCount = 0;
+       int nCallbackDownFailCount = 0;
+       int nTimeoutId = -1;
+       radio_state_e eState ;
+       int nGetFailCount = 0;
+       nRetVal = radio_start(g_pstRadio);
+       if ( nRetVal != RADIO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_start failed in precondition, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+               return 1;
+       }
+       nRetVal = radio_get_state(g_pstRadio, &eState);
+       if(nRetVal != RADIO_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_get_state failed in precondition, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+               return 1;
+       }
+       else if(eState != RADIO_STATE_PLAYING)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_get_state return wrong state, State returned = %s\\n", __LINE__, RadioGetState(eState));
+               return 1;
+       }
+#if SPEED_CHECK
+       RADIO_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       RADIO_INITIALISE_MEM_LOGS;
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bCallbackHit = false;
+               RadioGetMemAllocation();
+               RadioGetTimeOfDay();
+               nRetVal = radio_seek_up(g_pstRadio, RadioSeekCompletedCB, NULL);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_seek_up for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nSeekUpFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+        if ( !g_bCallbackHit )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_seek_up failed for loop count = %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                       nCallbackUpFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_seek_up passed for loop count = %d callback is invoked \\n", __LINE__, nLoopCount);
+#endif
+               
+               nRetVal = radio_get_state(g_pstRadio, &eState);
+               if(nRetVal != RADIO_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state failed in iteration = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if(eState != RADIO_STATE_PLAYING)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state return wrong state in iteration = %d, State returned = %s\\n", __LINE__, nLoopCount, RadioGetState(eState));
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               
+               g_bCallbackHit = false;
+               RadioGetTimeOfDay();
+               nRetVal = radio_seek_down(g_pstRadio, RadioSeekCompletedCB, NULL);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               RadioGetMemStatus(stSpeedMemoryLog.pszMemLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_seek_down failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nSeekDownFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+        if ( !g_bCallbackHit )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_seek_down failed for loop count = %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                       nCallbackDownFailCount++;
+                       continue;
+               }
+               nRetVal = radio_get_state(g_pstRadio, &eState);
+               if(nRetVal != RADIO_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state failed in iteration = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if(eState != RADIO_STATE_PLAYING)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state return wrong state in iteration = %d, State returned = %s\\n", __LINE__, nLoopCount, RadioGetState(eState));
+                       nGetFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_seek_down passed  for loop count = %d callback is invoked \\n", __LINE__, nLoopCount);
+#endif
+       }
+       
+       nRetVal = radio_stop(g_pstRadio);
+       if ( nRetVal != RADIO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_stop failed,error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+       }
+       else
+       {
+               nRetVal = radio_get_state(g_pstRadio, &eState);
+               if(nRetVal != RADIO_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state failed in, error returned = %s\\n", __LINE__, RadioGetError(nRetVal));
+               }
+               else if(eState != RADIO_STATE_READY)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state return wrong state, state returned = %s\\n", __LINE__, RadioGetState(eState));
+               }
+       }
+       if ( nSeekDownFailCount > 0 || nSeekUpFailCount > 0 || nCallbackDownFailCount > 0 || nCallbackUpFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_seek_up failed %d  times, radio_seek_down failed %d times, radio_seek_up callback hit failed %d times, radio_seek_down callback hit failed %d times, radio_get_state failed %d time out of %d times\\n",  __LINE__, nSeekUpFailCount, nSeekDownFailCount, nCallbackUpFailCount, nCallbackDownFailCount, nGetFailCount, MAX_COUNT);
+               RADIO_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(radio_seek_up, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(radio_seek_down, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(radio_seek_up_down, stSpeedMemoryLog.pszMemLog);
+#endif
+               RADIO_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: radio_scan_start_stop TC.
+//& type: auto
+/**
+* @testcase                    ITc_radio_scan_start_stop_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 starts scanning radio signal asynchronously
+* @scenario                            Creates a radio handle and start scanning the radio\n
+*                                              Stop scanning
+* @apicovered                  radio_scan_start, radio_scan_stop
+* @passcse                             When radio_scan_start and radio_scan_stop are successful
+* @failcase                            If target API radio_scan_start or radio_scan_stop fails
+* @precondition                        The radio state must be RADIO_STATE_READY by radio_create for radio_scan_start\n
+*                                              Radio state must be radio state scanning for radio_scan_stop.
+* @postcondition               Radio_scan_start radio state will be RADIO_STATE_SCANNING during scanning\n
+*                                              Radio_scan_stop radio state will be RADIO_STATE_READY
+*/
+int ITc_radio_scan_start_stop_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       radio_state_e eState ;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nScanUPFailCount = 0;
+       int nScanDownFailCount = 0;
+       int nCallbackUpFailCount = 0;
+       int nCallbackDownFailCount = 0;
+       int nTimeoutId = -1;
+       int nGetFailCount = 0;
+
+#if SPEED_CHECK
+       RADIO_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       RADIO_INITIALISE_MEM_LOGS;
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bCallbackHit = false;
+               RadioGetMemAllocation();
+               RadioGetTimeOfDay();
+               nRetVal = radio_scan_start(g_pstRadio, RadioScanUpdatedCallBack, NULL);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_scan_start failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nScanUPFailCount++;
+                       continue;
+               }
+               RUN_POLLING_LOOP;
+
+        if ( !g_bCallbackHit )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_scan_start failed for loop count = %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                       nCallbackUpFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_scan_start passed  for loop count = %d callback is invoked \\n", __LINE__, nLoopCount);
+#endif
+               
+               nRetVal = radio_get_state(g_pstRadio, &eState);
+               if(nRetVal != RADIO_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state failed in iteration = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if(eState != RADIO_STATE_SCANNING)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state return wrong state in iteration = %d, State returned = %s\\n", __LINE__, nLoopCount, RadioGetState(eState));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               
+               g_bCallbackHit = false;
+               RadioGetTimeOfDay();
+               nRetVal = radio_scan_stop(g_pstRadio, RadioScanStoppedCB, NULL);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               RadioGetMemStatus(stSpeedMemoryLog.pszMemLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_scan_stop failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nScanDownFailCount++;
+                       continue;
+               }
+               
+               RUN_POLLING_LOOP;
+
+        if ( !g_bCallbackHit )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_scan_stop failed for loop count = %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                       nCallbackDownFailCount++;
+                       continue;
+               }
+               
+               nRetVal = radio_get_state(g_pstRadio, &eState);
+               if(nRetVal != RADIO_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state failed in iteration = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               else if(eState != RADIO_STATE_READY)
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state return wrong state in iteration = %d, State returned = %s\\n", __LINE__, nLoopCount, RadioGetState(eState));
+                       nGetFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_scan_stop passed  for loop count = %d callback is invoked \\n", __LINE__, nLoopCount);
+#endif
+       }
+       if ( nScanUPFailCount > 0 || nScanDownFailCount > 0 || nCallbackDownFailCount > 0 || nCallbackUpFailCount > 0 || nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_scan_start failed %d  times, radio_scan_stop failed %d times, radio_seek_up callback hit failed %d times, radio_seek_down callback hit failed %d times, radio_get_state failed %d times out of %d times\\n",  __LINE__, nScanUPFailCount, nScanDownFailCount, nCallbackUpFailCount, nCallbackDownFailCount, nGetFailCount, MAX_COUNT);
+               RADIO_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(radio_scan_start, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(radio_scan_stop, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(radio_scan_start_stop, stSpeedMemoryLog.pszMemLog);
+#endif
+               RADIO_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+
+//& purpose: radio_set_unset_scan_completed_cb TC.
+//& type: auto
+/**
+* @testcase                    ITc_radio_set_unset_scan_completed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function to be invoked when the scan finishes
+* @scenario                            Registers a callback function for scan\n
+*                                              Unregister the callback function
+* @apicovered                  radio_scan_start,  radio_set_scan_completed_cb, radio_unset_scan_completed_cb
+* @passcse                             When radio_scan_start, radio_set_scan_completed_cb, radio_unset_scan_completed_cb are successful
+* @failcase                            If target API radio_scan_start, radio_set_scan_completed_cb or radio_unset_scan_completed_cb fails
+* @precondition                        NA
+* @postcondition               Radio_scan_completed_cb will be invoked
+*/
+int ITc_radio_set_unset_scan_completed_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nRegisterFailCount = 0;
+       int nUnregisterFailCount = 0;
+       int nCallbackUpFailCount = 0;
+       int nCallbackDownFailCount = 0;
+       int nTimeoutId = -1;
+       radio_state_e eState ;
+
+#if SPEED_CHECK
+       RADIO_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       RADIO_INITIALISE_MEM_LOGS;
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bCallbackScanComplete = false;
+               RadioGetMemAllocation();
+               RadioGetTimeOfDay();
+               nRetVal = radio_set_scan_completed_cb(g_pstRadio, RadioScanCompletedCB, NULL);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_set_scan_completed_cb failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nRegisterFailCount++;
+                       continue;
+               }
+
+               radio_scan_start(g_pstRadio, RadioScanUpdatedCB, NULL);
+               RUN_POLLING_LOOP;
+               if ( !g_bCallbackScanComplete )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_set_scan_completed_cb failed for loop count = %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                       nCallbackUpFailCount++;
+                       continue;
+               }
+               nRetVal = radio_get_state(g_pstRadio, &eState);
+               if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_get_state failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nRegisterFailCount++;
+                       continue;
+               }
+               if ( eState != RADIO_STATE_READY )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] Unable to get READY state in radio for loop count = %d\\n", __LINE__, nLoopCount);
+                       nRegisterFailCount++;
+                       continue;
+               }
+               
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_set_scan_completed_cb passed  for loop count = %d callback is invoked \\n", __LINE__, nLoopCount);
+#endif
+
+               g_bCallbackScanComplete = false;
+               RadioGetTimeOfDay();
+               nRetVal = radio_unset_scan_completed_cb(g_pstRadio);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               RadioGetMemStatus(stSpeedMemoryLog.pszMemLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_unset_scan_completed_cb failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nUnregisterFailCount++;
+                       continue;
+               }
+
+               radio_scan_start(g_pstRadio, RadioScanUpdatedCB, NULL);
+               RUN_POLLING_LOOP;
+
+        if ( g_bCallbackScanComplete )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_unset_scan_completed_cb failed for loop count = %d, error returned = callback is invoked after unset\\n", __LINE__, nLoopCount);
+                       nCallbackDownFailCount++;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_unset_scan_completed_cb passed  for loop count = %d callback is not invoked \\n", __LINE__, nLoopCount);
+#endif
+       }
+
+       if ( nUnregisterFailCount > 0 || nRegisterFailCount > 0 || nCallbackDownFailCount > 0 || nCallbackUpFailCount > 0)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_set_scan_completed_cb %d  times, radio_unset_scan_completed_cb failed %d times, radio_set_scan_completed_cb callback hit failed %d times, radio_unset_scan_completed_cb callback hit failed %d times, out of %d times\\n",  __LINE__, nRegisterFailCount, nUnregisterFailCount, nCallbackUpFailCount, nCallbackDownFailCount, MAX_COUNT);
+               RADIO_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(radio_set_scan_completed_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(radio_unset_scan_completed_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(radio_set_unset_scan_completed_cb, stSpeedMemoryLog.pszMemLog);
+#endif
+               RADIO_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+//& purpose: radio_set_unset_interrupted_cb TC.
+//& type: auto
+/**
+* @testcase                    ITc_radio_set_unset_interrupted_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function to be invoked when radio is interrupted
+* @scenario                            Registers a callback function for interrupt.\n
+*                                              Unregister the callback function
+* @apicovered                  radio_set_interrupted_cb, radio_unset_interrupted_cb
+* @passcase                            When radio_set_interrupted_cb, radio_unset_interrupted_cb are successful
+* @failcase                            If target API radio_set_interrupted_cb or radio_unset_interrupted_cb fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_radio_set_unset_interrupted_cb_p(void)
+{
+       START_TEST;
+       int nRetVal = -1, nLoopCount = 0;
+       SpeedMemoryLog stSpeedMemoryLog;
+       memset(&stSpeedMemoryLog, 0, sizeof(stSpeedMemoryLog));
+       int nRegisterFailCount = 0;
+       int nUnregisterFailCount = 0;
+       int nCallbackUpFailCount = 0;
+       int nCallbackDownFailCount = 0;
+
+#if SPEED_CHECK
+       RADIO_INITIALISE_SPEED_LOGS;
+#endif
+#if MEMORY_CHECK
+       RADIO_INITIALISE_MEM_LOGS;
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               g_bCallbackHit = false;
+               RadioGetMemAllocation();
+               RadioGetTimeOfDay();
+               nRetVal = radio_set_interrupted_cb(g_pstRadio, RadioInterruptedCB, NULL);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI1SpeedLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_set_interrupted_cb failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nRegisterFailCount++;
+                       continue;
+               }
+               
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_set_interrupted_cb passed for loop count = %d \\n", __LINE__, nLoopCount);
+#endif
+               RadioGetTimeOfDay();
+               nRetVal = radio_unset_interrupted_cb(g_pstRadio);
+               RadioExecutionDelay(stSpeedMemoryLog.pszAPI2SpeedLog);
+               RadioGetMemStatus(stSpeedMemoryLog.pszMemLog);
+        if ( nRetVal != RADIO_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][radio_ITc] radio_unset_interrupted_cb failed for loop count = %d, error returned = %s\\n", __LINE__, nLoopCount, RadioGetError(nRetVal));
+                       nUnregisterFailCount++;
+                       continue;
+               }
+               
+#if DEBUG
+               FPRINTF("[Line : %d][radio_ITc] radio_unset_interrupted_cb passed for loop count = %d \\n", __LINE__, nLoopCount);
+#endif
+       }
+
+       if ( nUnregisterFailCount > 0 || nRegisterFailCount > 0 || nCallbackDownFailCount > 0 || nCallbackUpFailCount > 0)
+       {
+               FPRINTF("[Line : %d][radio_ITc] radio_set_interrupted_cb %d  times, radio_unset_interrupted_cb failed %d times, radio_set_interrupted_cb callback hit failed %d times, radio_unset_interrupted_cb callback hit failed %d times, out of %d times\\n", __LINE__, nRegisterFailCount, nUnregisterFailCount, nCallbackUpFailCount, nCallbackDownFailCount, MAX_COUNT);
+               RADIO_DEINITIALISE_LOGS;
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(radio_set_interrupted_cb, stSpeedMemoryLog.pszAPI1SpeedLog);
+               PRINT_SPEED_LOG(radio_unset_interrupted_cb, stSpeedMemoryLog.pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(radio_set_unset_interrupted_cb, stSpeedMemoryLog.pszMemLog);
+#endif
+               RADIO_DEINITIALISE_LOGS;
+               return 0;
+       }
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/radio/tct-radio-native.c b/src/itc/radio/tct-radio-native.c
new file mode 100755 (executable)
index 0000000..6c65f55
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-radio-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/radio/tct-radio-native.h b/src/itc/radio/tct-radio-native.h
new file mode 100755 (executable)
index 0000000..dd28236
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_RADIO_NATIVE_H__
+#define __TCT_RADIO_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_radio_startup(void);
+extern void ITs_radio_cleanup(void);
+
+extern int ITc_radio_create_destroy_p(void);
+extern int ITc_radio_start_stop_p(void);
+extern int ITc_radio_set_get_frequency_p(void);
+extern int ITc_radio_set_mute_muted_p(void);
+extern int ITc_radio_get_state_p(void);
+extern int ITc_radio_get_signal_strength_p(void);
+extern int ITc_radio_seek_up_down_p(void);
+extern int ITc_radio_scan_start_stop_p(void);
+extern int ITc_radio_set_unset_scan_completed_cb_p(void);
+extern int ITc_radio_set_unset_interrupted_cb_p(void);
+
+testcase tc_array[] = {
+    {"ITc_radio_create_destroy_p", ITc_radio_create_destroy_p, ITs_radio_startup, ITs_radio_cleanup},
+    {"ITc_radio_start_stop_p", ITc_radio_start_stop_p, ITs_radio_startup, ITs_radio_cleanup},
+    {"ITc_radio_set_get_frequency_p", ITc_radio_set_get_frequency_p, ITs_radio_startup, ITs_radio_cleanup},
+    {"ITc_radio_set_mute_muted_p", ITc_radio_set_mute_muted_p, ITs_radio_startup, ITs_radio_cleanup},
+    {"ITc_radio_get_state_p", ITc_radio_get_state_p, ITs_radio_startup, ITs_radio_cleanup},
+    {"ITc_radio_get_signal_strength_p", ITc_radio_get_signal_strength_p, ITs_radio_startup, ITs_radio_cleanup},
+    {"ITc_radio_seek_up_down_p", ITc_radio_seek_up_down_p, ITs_radio_startup, ITs_radio_cleanup},
+    {"ITc_radio_scan_start_stop_p", ITc_radio_scan_start_stop_p, ITs_radio_startup, ITs_radio_cleanup},
+    {"ITc_radio_set_unset_scan_completed_cb_p", ITc_radio_set_unset_scan_completed_cb_p, ITs_radio_startup, ITs_radio_cleanup},
+    {"ITc_radio_set_unset_interrupted_cb_p", ITc_radio_set_unset_interrupted_cb_p, ITs_radio_startup, ITs_radio_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_RADIO_NATIVE_H__
diff --git a/src/itc/recorder/CMakeLists.txt b/src/itc/recorder/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..1a79cca
--- /dev/null
@@ -0,0 +1,37 @@
+SET(PKG_NAME "recorder")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-recorder")
+SET(TC_SOURCES
+       ITs-recorder-common.c
+       ITs-recorder.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       storage
+       ecore
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle storage ecore
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/recorder/ITs-recorder-common.c b/src/itc/recorder/ITs-recorder-common.c
new file mode 100755 (executable)
index 0000000..8c82407
--- /dev/null
@@ -0,0 +1,499 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-recorder-common.h"
+
+/** @addtogroup itc-recorder
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stRecorderStartTime;
+extern struct mallinfo g_stRecorderMemInfo;
+
+/**
+ * @function           Recorder_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Recorder_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("[Line: %d][%s] Null key value passed to function: Recorder_Check_System_Info_Feature_Supported\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       bool bValue = false;
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n", __LINE__, API_NAMESPACE, Recorder_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("[Line: %d][%s] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)\\n", __LINE__, API_NAMESPACE, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] system_info_get_platform_bool returned Supported status feature for (key = %s)\\n", __LINE__, API_NAMESPACE, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           Recorder_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet: error code returned
+ * @return                     error string
+ */
+char* Recorder_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch (nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            szErrorVal = "SYSTEM_INFO_ERROR_NONE";                                  break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER";             break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR";                              break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY";                 break;
+               default:                                                                        szErrorVal = "Unknown error";                                                   break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function                    GetInternalMemoryIdCallBack
+* @description         callback function to retrieves all storage in device
+* @parameter[IN]       int storage_id - storage device id
+* @parameter[IN]       storage_type_e type - storage type
+* @parameter[IN]       storage_state_e - storage device state
+* @parameter[IN]       void *user_data - user data
+* @return                      NA
+*/
+static bool GetInternalMemoryIdCallBack(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line: %d][%s] GetInternalMemoryIdCallBack callback hit\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       if ( type == STORAGE_TYPE_INTERNAL )
+       {
+               FPRINTF("[Line: %d][%s] Internal Storage ID Found\\n", __LINE__, API_NAMESPACE);
+               g_bStorageFound = true;
+               g_nStorageId = storage_id;
+               ecore_main_loop_quit();
+               return false;
+       }       
+       return true;
+}
+
+/**
+* @function            RecorderGetState
+* @description         Maps error enums to string values and print Recorder State Code
+* @parameter           Recorder state
+* @return                      N/A
+*/
+void RecorderGetState(recorder_state_e RecordState)
+{
+       switch ( RecordState )
+       {
+               case RECORDER_STATE_NONE:
+               FPRINTF("[Line: %d][%s] RECORDER_STATE_NONE\\n", __LINE__, API_NAMESPACE);
+               break;
+               
+               case RECORDER_STATE_CREATED:
+               FPRINTF("[Line: %d][%s] RECORDER_STATE_CREATED\\n", __LINE__, API_NAMESPACE);
+               break;
+               
+               case RECORDER_STATE_READY:
+               FPRINTF("[Line: %d][%s] RECORDER_STATE_READY\\n", __LINE__, API_NAMESPACE);
+               break;
+               
+               case RECORDER_STATE_RECORDING:
+               FPRINTF("[Line: %d][%s] RECORDER_STATE_RECORDING\\n", __LINE__, API_NAMESPACE);
+               break;
+               
+               case RECORDER_STATE_PAUSED:
+               FPRINTF("[Line: %d][%s] RECORDER_STATE_PAUSED\\n", __LINE__, API_NAMESPACE);
+               break;
+               
+               default:
+               FPRINTF("[Line: %d][%s] Unknown State\\n", __LINE__, API_NAMESPACE);
+               break;
+       }
+}
+
+/**
+* @function            RecorderGetError
+* @description         Maps error enums to string values
+* @parameter           nRet: error code returned
+* @return                      error string
+*/
+char* RecorderGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case RECORDER_ERROR_NONE:                               szErrorVal = "RECORDER_ERROR_NONE";                                             break;
+       case RECORDER_ERROR_INVALID_PARAMETER:                  szErrorVal = "RECORDER_ERROR_INVALID_PARAMETER";                break;
+       case RECORDER_ERROR_INVALID_STATE:                      szErrorVal = "RECORDER_ERROR_INVALID_STATE";                    break;
+       case RECORDER_ERROR_OUT_OF_MEMORY:                      szErrorVal = "RECORDER_ERROR_OUT_OF_MEMORY";                    break;
+       case RECORDER_ERROR_DEVICE:                                     szErrorVal = "RECORDER_ERROR_DEVICE";                                   break;
+       case RECORDER_ERROR_INVALID_OPERATION:                  szErrorVal = "RECORDER_ERROR_INVALID_OPERATION";                break;
+       case RECORDER_ERROR_SOUND_POLICY:                               szErrorVal = "RECORDER_ERROR_SOUND_POLICY";                             break;
+       case RECORDER_ERROR_SECURITY_RESTRICTED:                szErrorVal = "RECORDER_ERROR_SECURITY_RESTRICTED";              break;
+       case RECORDER_ERROR_SOUND_POLICY_BY_CALL:               szErrorVal = "RECORDER_ERROR_SOUND_POLICY_BY_CALL";             break;
+       case RECORDER_ERROR_SOUND_POLICY_BY_ALARM:              szErrorVal = "RECORDER_ERROR_SOUND_POLICY_BY_ALARM";    break;
+       case RECORDER_ERROR_ESD:                                                szErrorVal = "RECORDER_ERROR_ESD";                                              break;
+       case RECORDER_ERROR_OUT_OF_STORAGE:                     szErrorVal = "RECORDER_ERROR_OUT_OF_STORAGE";                   break;
+       case RECORDER_ERROR_PERMISSION_DENIED:                  szErrorVal = "RECORDER_ERROR_PERMISSION_DENIED";                break;
+       case RECORDER_ERROR_NOT_SUPPORTED:                              szErrorVal = "RECORDER_ERROR_NOT_SUPPORTED";                    break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                   break;
+       }
+       return szErrorVal;
+}
+
+
+/**
+* @function                    RecorderGetMemStatus
+* @description         Returns the Memory Allocation state
+* @parameter[OUT]      pszAPIMemory [String pointer containg the difference of total number of bytes for Current and
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+
+void RecorderGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if ( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if ( stMemInfo.uordblks > g_stRecorderMemInfo.uordblks )
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stRecorderMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stRecorderMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    RecorderGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+
+inline void RecorderGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stRecorderMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           RecorderExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ */
+
+void RecorderExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       if ( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stRecorderStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stRecorderStartTime.tv_usec;
+               sprintf(pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+#endif
+}
+
+/**
+ * @function           RecorderGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stRecorderStartTime
+ * @parameter          NA
+ * @return                     NA
+ *
+ */
+
+void RecorderGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stRecorderStartTime, NULL);
+#endif
+}
+
+
+/**
+* @function            CreateAudioRecorder
+* @description                 Creates a audio recorder
+* @parameter           NA
+* @return                      true if successful, otherwise false.
+*/
+bool CreateAudioRecorder()
+{
+       g_bFeatureNotSupported = false;
+       g_bMismatch = false;
+       g_bIsFeatureSupported = Recorder_Check_System_Info_Feature_Supported(MICROPHONE_FEATURE);
+       int nRet = recorder_create_audiorecorder(&g_pstRecorder);
+       if ( !g_bIsFeatureSupported )
+       {
+               if ( nRet == TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       g_bFeatureNotSupported = true;
+                       return true;
+               }
+               g_bMismatch = true;
+               return true;
+       }
+
+       if ( nRet != RECORDER_ERROR_NONE )
+       {
+               PRINT_API_ERROR_MSG(recorder_create_audiorecorder, nRet);
+#if DEBUG
+               FPRINTF("[Line: %d][%s] cannot create audio recorder\\n", __LINE__, API_NAMESPACE);
+#endif
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            CreateVideoRecorder
+* @description                 Creates a video recorder
+* @parameter           NA
+* @return                      true if successful, otherwise false.
+*/
+bool CreateVideoRecorder()
+{
+       g_bFeatureNotSupported = false;
+       g_bMismatch = false;
+       g_bIsFeatureSupported = Recorder_Check_System_Info_Feature_Supported(CAMERA_FEATURE);
+       int nRet = camera_create(CAMERA_DEVICE_CAMERA0, &g_pstCamera);
+       if ( !g_bIsFeatureSupported )
+       {
+               if ( nRet == TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       g_bFeatureNotSupported = true;
+                       return true;
+               }
+               g_bMismatch = true;
+               return true;
+       }
+
+       if ( nRet != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] cannot create camera although camera is supported\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       nRet = recorder_create_videorecorder(g_pstCamera, &g_pstRecorder);
+       
+       if ( !g_bIsFeatureSupported )
+       {
+               if ( nRet == TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       g_bFeatureNotSupported = true;
+                       return true;
+               }
+               g_bMismatch = true;
+               return true;
+       }
+       if ( nRet != RECORDER_ERROR_NONE)
+       {
+               PRINT_API_ERROR_MSG(recorder_create_videorecorder, nRet);
+               #if DEBUG
+                       FPRINTF("[Line: %d][%s] cannot create video recorder\\n", __LINE__, API_NAMESPACE);
+               #endif
+               return false;
+       }
+       
+       return true;
+}
+
+/**
+* @function            DestroyRecorderHandler
+* @description                 Destroys the recorder handler
+* @parameter           N/A
+* @return                      true if successful, otherwise false
+*/
+bool DestroyRecorderHandler(void)
+{
+       int nRet = recorder_destroy(g_pstRecorder);
+       if ( nRet != RECORDER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] recorder_destroy failed, error returned = %s\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            ReadyRecorderHandler
+* @description                 Gets the recorder prepared.
+* @parameter           N/A
+* @return                      true if successful, otherwise false.
+*/
+bool ReadyRecorderHandler(void)
+{
+       int nRet = recorder_set_audio_encoder(g_pstRecorder, RECORDER_AUDIO_CODEC_AMR);
+       if ( nRet != RECORDER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] recorder_set_audio_encoder failed, error returned = %s\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+               return false;
+       }
+       
+       GetFileName();
+       char* pchSetFilename = strdup(g_RecorderFile);
+       free(g_RecorderFile);
+       
+       nRet = recorder_set_filename(g_pstRecorder, pchSetFilename);
+       if ( nRet != RECORDER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] recorder_set_filename failed, error returned = %s\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+               return false;
+       }
+       
+       nRet = recorder_set_file_format(g_pstRecorder,RECORDER_FILE_FORMAT_AMR);
+       if ( nRet != RECORDER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] recorder_set_file_format failed, error returned = %s\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+               return false;
+       }
+
+       nRet =recorder_prepare(g_pstRecorder);
+       if ( nRet != RECORDER_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] recorder_prepare failed, error returned = %s\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+               return false;
+       }
+       
+       free(pchSetFilename);
+       return true;
+}
+
+/**
+ * @function           FreeMemory
+ * @description                Function to free the memory allocated
+ * @parameter          char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4 (pointer to allocated memory)
+ * @return                     NA
+ */
+void FreeMemory(char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4)
+{
+       if ( pszMem1 != NULL )
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if ( pszMem2 != NULL )
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if ( pszMem3 != NULL )
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+       if ( pszMem4 != NULL )
+       {
+               free(pszMem4);
+               pszMem4 = NULL;
+       }
+}
+
+/**
+* @function            GetFileName
+* @description         Function to get recorder file
+* @parameter           NA
+* @return                      NA
+*/ 
+void GetFileName(void)
+{
+       g_bStorageFound = false;
+       storage_foreach_device_supported(GetInternalMemoryIdCallBack, NULL);
+
+       RecorderWaitForAsync();
+
+       if ( g_bStorageFound == false )
+       {
+               FPRINTF("[Line: %d][%s] Internal Storage ID not found using storage id number 1\\n", __LINE__, API_NAMESPACE);
+               g_nStorageId = 1;
+       }
+
+       char *pszPath = NULL;
+       storage_get_directory(g_nStorageId, STORAGE_DIRECTORY_SOUNDS, &pszPath);
+       g_RecorderFile = (char *)malloc(strlen(pszPath) + strlen(FILENAME) + 1);
+       memset(g_RecorderFile, 0x00, (strlen(pszPath) + strlen(FILENAME) + 1));
+       strcpy(g_RecorderFile, pszPath);
+       strcat(g_RecorderFile, FILENAME);
+       FPRINTF("[Line: %d][%s] Output File Path is %s\\n", __LINE__, API_NAMESPACE, g_RecorderFile);
+}
+
+/**
+* @function            RecorderTimeoutFunction
+* @description         Called if some callback is not invoked for a particular Recorder Timeout
+* @parameter           gpointer data
+* @return                      gboolean
+*/
+gboolean RecorderTimeoutFunction(gpointer data)
+{
+       FPRINTF("[Line: %d][%s] Callback Recorder wait complete for 20 seconds. Timeout\\n", __LINE__, API_NAMESPACE);
+       ecore_main_loop_quit();
+       return FALSE;
+}
+
+/**
+* @function            RecorderWaitForAsync
+* @description         Called to wait
+* @parameter           NA
+* @return                      NA
+*/
+void RecorderWaitForAsync()
+{
+       g_timeout_add(TIMEOUT, RecorderTimeoutFunction, NULL);
+       ecore_main_loop_begin();
+}
+/** @} */
\ No newline at end of file
diff --git a/src/itc/recorder/ITs-recorder-common.h b/src/itc/recorder/ITs-recorder-common.h
new file mode 100755 (executable)
index 0000000..93d24cc
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_RECORDER_COMMON_H_
+#define _ITS_RECORDER_COMMON_H_
+
+#include "assert.h"
+#include "recorder.h"
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <storage.h>
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <system_info.h>
+
+/** @addtogroup itc-recorder
+*  @ingroup itc
+*  @{
+*/
+
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define API_NAMESPACE                          "Recorder_ITC"
+#define FILENAME                                       "/Recorder.file"
+#define TIMEOUT                                                20000
+#define SLEEP_TIME                                     5
+
+#define MICROPHONE_FEATURE                     "http://tizen.org/feature/microphone"
+#define CAMERA_FEATURE                         "http://tizen.org/feature/camera"
+
+FILE *g_fpLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n [Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
+}
+
+#define PRINT_API_ERROR_MSG(api, nRet) \
+       FPRINTF("\\n [Line : %d][%s][%s API Call Failed With Return Value: %d]\\n", __LINE__, API_NAMESPACE, #api, nRet);\
+
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if ( nRetVal == 0 )\
+       {\
+               FPRINTF("[Line : %d][%s] %s passed\\n", __LINE__, API_NAMESPACE , API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][%s] %s failed, error returned = %s\\n", __LINE__, API_NAMESPACE , API, RecorderGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if ( nMLogLen > 0 )\
+       {\
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d][%s] %s_MemoryLeakStatus - %s\\n", __LINE__, API_NAMESPACE , #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if ( strlen(speedLog) > 0 ) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d][%s] %s_TimeInMicrosec- %s\\n", __LINE__, API_NAMESPACE , #api, speedLog);\
+       }
+
+#define PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(api) \
+       FPRINTF("[Line : %d][%s] [%s API Call Failed] *****\\n", __LINE__, API_NAMESPACE , #api);
+
+#define PRINT_API_ERROR_IN_LOOP_MSG(api, nRet) \
+       FPRINTF("[Line : %d][%s] [%s API Call Failed With Return Value: %d] *****\\n", __LINE__, API_NAMESPACE, #api, nRet);
+
+void RecorderGetState(recorder_state_e RecordState);
+char* RecorderGetError(int nRet);
+void RecorderGetMemAllocation();
+void RecorderExecutionDelay(char* pszAPITime);
+void RecorderGetTimeOfDay();
+void RecorderGetMemStatus(char *pszAPIMemory);
+recorder_h g_pstRecorder;
+camera_h g_pstCamera;
+int gWidth;
+int gHeight;
+char *g_RecorderFile;
+int g_nStorageId;
+bool g_bStorageFound;
+bool g_bIsFeatureSupported;
+bool g_bMismatch;
+bool g_bFeatureNotSupported;
+bool g_bIsMicrophoneFeatureSupported;
+bool g_bIsCameraFeatureSupported;
+
+//Add helper function declarations here
+
+bool CreateAudioRecorder();
+bool CreateVideoRecorder();
+bool DestroyRecorderHandler();
+bool ReadyRecorderHandler();
+void FreeMemory(char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4);
+void GetFileName(void);
+gboolean RecorderTimeoutFunction(gpointer data);
+void RecorderWaitForAsync();
+bool Recorder_Check_System_Info_Feature_Supported(char* pszKey);
+char* Recorder_System_Info_GetError(int nRet);
+
+/** @} */
+#endif  //_ITS_RECORDER_COMMON_H_
diff --git a/src/itc/recorder/ITs-recorder.c b/src/itc/recorder/ITs-recorder.c
new file mode 100755 (executable)
index 0000000..7976497
--- /dev/null
@@ -0,0 +1,4400 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-recorder-common.h"
+
+/** @addtogroup itc-recorder
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Recorder
+
+bool g_bRecorderCreation;
+bool g_bRecorderPreviewStarted;
+bool g_bRecorderErrorCallback;
+bool g_bRecorderAudioStreamCallback;
+bool g_bRecorderInterruptCompletedCallback;
+bool g_bRecorderInterruptedCallback;
+bool g_bRecorderRecordingLimitReachedCallback;
+bool g_bRecorderRecordingStatusCallback;
+bool g_bRecorderStateChangedCallback;
+bool g_bRecorderSupportedFileFormatCallback;
+bool g_bRecorderSupportedVideoEncoderCallback;
+bool g_bRecorderSupportedAudioEncoderCallback;
+bool g_bRecorderSupportedVideoResolutionCallback;
+struct timeval g_stRecorderStartTime;
+struct mallinfo g_stRecorderMemInfo;
+
+/**
+* @function            ITs_recorder_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_recorder_startup(void)
+{
+       ecore_main_loop_glib_integrate();
+
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Recorder_p\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+/**
+* @function            ITs_recorder_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_recorder_cleanup(void)
+{
+       sleep(SLEEP_TIME);
+
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Recorder_p\\n", __LINE__, API_NAMESPACE);
+#endif
+       return;
+}
+
+/**
+* @function            RecorderInterruptedCallback
+* @description         callback function for capturing if recorder is interrupted according to a policy
+* @parameter           recorder_policy_e policy, recorder_state_e previous, recorder_state_e current, void *user_data
+* @return                      NA
+*/
+static void RecorderInterruptedCallback(recorder_policy_e policy, recorder_state_e previous, recorder_state_e current, void *user_data)
+{
+       g_bRecorderInterruptedCallback = true;
+#if DEBUG
+       FPRINTF("[Line : %d][%s] RecorderInterruptedCallback callback is called\\n", __LINE__, API_NAMESPACE);
+#endif
+       ecore_main_loop_quit();
+}
+
+/**
+* @function            RecorderErrorCallback
+* @description         callback function for capturing asynchronous operation error occurred
+* @parameter           recorder_error_e error, recorder_state_e current_state, void *user_data
+* @return                      NA
+*/
+static void RecorderErrorCallback(recorder_error_e error, recorder_state_e current_state, void *user_data)
+{
+       g_bRecorderErrorCallback = true;
+#if DEBUG
+       FPRINTF("[Line : %d][%s] RecorderErrorCallback callback is called\\n", __LINE__, API_NAMESPACE);
+#endif
+       ecore_main_loop_quit();
+}
+
+/**
+* @function            RecorderRecordingLimitReachedCallback
+* @description         callback function for capturing if reached recording limit
+* @parameter           recorder_recording_limit_type_e type, void *user_data
+* @return                      NA
+*/
+static void RecorderRecordingLimitReachedCallback(recorder_recording_limit_type_e type, void *user_data)
+{
+       g_bRecorderRecordingLimitReachedCallback = true;
+#if DEBUG
+       FPRINTF("[Line : %d][%s] RecorderRecordingLimitReachedCallback callback is called\\n", __LINE__, API_NAMESPACE);
+#endif
+       ecore_main_loop_quit();
+}
+
+/**
+* @function            RecorderRecordingStatusCallback
+* @description         callback function for capturing if recording information changes
+* @parameter           unsigned long long elapsed_time, unsigned long long file_size, void *user_data
+* @return                      NA
+*/
+static void RecorderRecordingStatusCallback(unsigned long long elapsed_time, unsigned long long file_size, void *user_data)
+{
+       g_bRecorderRecordingStatusCallback = true;
+#if DEBUG
+       FPRINTF("[Line : %d][%s] RecorderRecordingStatusCallback callback is called\\n", __LINE__, API_NAMESPACE);
+#endif
+       ecore_main_loop_quit();
+}
+
+/**
+* @function            RecorderStateChangedCallback
+* @description         callback function for capturing if the recorder state changes
+* @parameter           recorder_state_e previous, recorder_state_e current, bool by_policy, void *user_data
+* @return                      NA
+*/
+static void RecorderStateChangedCallback(recorder_state_e previous, recorder_state_e current, bool by_policy, void *user_data)
+{
+       g_bRecorderStateChangedCallback = true;
+#if DEBUG
+       FPRINTF("[Line : %d][%s] RecorderStateChangedCallback callback is called\\n", __LINE__, API_NAMESPACE);
+#endif
+       ecore_main_loop_quit();
+}
+
+/**
+* @function            RecorderAudioStreamCallback
+* @description         callback function for capturing audio stream data
+* @parameter           void *stream, int size, audio_sample_type_e format, int channel, unsigned int timestamp, void *user_data
+* @return                      NA
+*/
+static void RecorderAudioStreamCallback(void *stream, int size, audio_sample_type_e format, int channel, unsigned int timestamp, void *user_data)
+{
+       g_bRecorderAudioStreamCallback = true;
+#if DEBUG
+       FPRINTF("[Line : %d][%s] RecorderAudioStreamCallback callback is called\\n", __LINE__, API_NAMESPACE);
+#endif
+       ecore_main_loop_quit();
+}
+
+/**
+* @function            RecorderSupportedFileFormatCallback
+* @description         callback function for retrieving all supported file formats
+* @parameter           recorder_file_format_e format, void *user_data
+* @return                      NA
+*/
+static bool RecorderSupportedFileFormatCallback(recorder_file_format_e format, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] RecorderSupportedFileFormatCallback callback is called\\n", __LINE__, API_NAMESPACE);
+#endif
+       
+       g_bRecorderSupportedFileFormatCallback = true;
+       ecore_main_loop_quit();
+       
+       bool ret = true;
+       if ( user_data != NULL )
+       {
+               *( (recorder_file_format_e *)user_data) = format;
+               return false;
+       }
+       return ret;
+}
+
+/**
+* @function            RecorderSupportedAudioEncoderCallback
+* @description         callback function for retrieving all supported audio encoders
+* @parameter           recorder_audio_codec_e codec, void *user_data
+* @return                      NA
+*/
+static bool RecorderSupportedAudioEncoderCallback(recorder_audio_codec_e codec, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] RecorderSupportedAudioEncoderCallback callback is called\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bRecorderSupportedAudioEncoderCallback = true;
+       ecore_main_loop_quit();
+       
+       bool ret = true;
+       if ( user_data != NULL )
+       {
+               *( (recorder_audio_codec_e *)user_data) = codec;
+               return false;
+       }
+       return ret;
+}
+
+/**
+* @function            RecorderSupportedVideoEncoderCallback
+* @description         callback function for retrieving all supported video encoders
+* @parameter           recorder_video_codec_e codec, void *user_data
+* @return                      NA
+*/
+static bool RecorderSupportedVideoEncoderCallback(recorder_video_codec_e codec, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] RecorderSupportedVideoEncoderCallback callback is called\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bRecorderSupportedVideoEncoderCallback = true;
+       ecore_main_loop_quit();
+       
+       bool ret = true;
+       if ( user_data != NULL )
+       {
+               *( (recorder_video_codec_e *)user_data) = codec;
+               return false;
+       }
+       return ret;
+}
+
+/**
+* @function            RecorderSupportedVideoResolutioCallback
+* @description         callback function for retrieving all supported video resolutions
+* @parameter           int width, int height, void *user_data
+* @return                      NA
+*/
+static bool RecorderSupportedVideoResolutionCallback(int width, int height, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] RecorderSupportedVideoResolutionCallback callback is called\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bRecorderSupportedVideoResolutionCallback = true;
+       ecore_main_loop_quit();
+       
+       gWidth = width;
+       gHeight = height;
+       
+       return false;
+}
+
+/** @addtogroup itc-recorder-testcases
+*  @brief              Integration testcases for module recorder
+*  @ingroup    itc-recorder
+*  @{
+*/
+
+//& purpose: Creates the audio recorder
+//& type: auto
+/**
+* @testcase                    ITc_recorder_create_audiorecorder_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to create audio recorder and destroy it
+* @scenario                            Create Audio recorder\n
+*                                              Destroy recorder
+* @apicovered                  recorder_create_audiorecorder, recorder_destroy
+* @passcase                            If recorder gets created successfully
+* @failcase                    If recorder_create_audiorecorder or recorder_destroy fails
+* @precondition                        NA
+* @postcondition               The recorder state will be RECORDER_STATE_CREATED
+*/
+int ITc_recorder_create_audiorecorder_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszAvailMemLog = NULL;
+       char *pszCreateSpeedLog = NULL;
+       char *pszDestroySpeedLog = NULL;
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+       g_bIsMicrophoneFeatureSupported = Recorder_Check_System_Info_Feature_Supported(MICROPHONE_FEATURE);
+       g_bIsCameraFeatureSupported = Recorder_Check_System_Info_Feature_Supported(CAMERA_FEATURE);
+#if MEMORY_CHECK
+       pszAvailMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszCreateSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszDestroySpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_create_audiorecorder(&g_pstRecorder);
+               
+               RecorderExecutionDelay(pszCreateSpeedLog);
+               
+               if ( !g_bIsMicrophoneFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][%s] recorder_create_audiorecorder returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+                               nCreateFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][%s] recorder_create_audiorecorder API call correctly returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+                       }
+                       continue;
+               }
+               
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_create_audiorecorder failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nCreateFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_destroy(g_pstRecorder);
+               
+               RecorderExecutionDelay(pszDestroySpeedLog);
+               
+               if ( !g_bIsMicrophoneFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][%s] recorder_destroy returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+                               nDestroyFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][%s] recorder_destroy API call correctly returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+                       }
+                       continue;
+               }
+               
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_destroy failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nDestroyFailCount++;
+                       continue;
+               }
+               
+               RecorderGetMemStatus(pszAvailMemLog);
+       }
+       
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0)
+       {
+               FPRINTF("[Line : %d][%s] recorder_create_audiorecorder failed %d times, recorder_destroy failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nCreateFailCount, nDestroyFailCount, MAX_COUNT);
+               FreeMemory(pszAvailMemLog, pszCreateSpeedLog, pszDestroySpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_create_audiorecorder, pszCreateSpeedLog);
+       PRINT_SPEED_LOG(recorder_destroy, pszDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_create_audiorecorder, pszAvailMemLog);
+#endif
+
+       FreeMemory(pszAvailMemLog, pszCreateSpeedLog, pszDestroySpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Creates the video recorder
+//& type: auto
+/**
+* @testcase                    ITc_recorder_create_videorecorder_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to create video recorder and destroy it
+* @scenario                            Create Video recorder\n
+*                                              Destroy recorder
+* @apicovered                  recorder_create_videorecorder, recorder_destroy
+* @passcase                            If recorder gets created successfully
+* @failcase                    If recorder_create_videorecorder or recorder_destroy fails
+* @precondition                        NA
+* @postcondition               The recorder state will be RECORDER_STATE_CREATED
+*/
+int ITc_recorder_create_videorecorder_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszAvailMemLog = NULL;
+       char *pszCreateSpeedLog = NULL;
+       char *pszDestroySpeedLog = NULL;
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+       
+       g_bIsMicrophoneFeatureSupported = Recorder_Check_System_Info_Feature_Supported(MICROPHONE_FEATURE);
+       g_bIsCameraFeatureSupported = Recorder_Check_System_Info_Feature_Supported(CAMERA_FEATURE);
+       
+       
+#if MEMORY_CHECK
+       pszAvailMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszCreateSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszDestroySpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       nRet = camera_create(CAMERA_DEVICE_CAMERA0, &g_pstCamera);
+       if (!g_bIsCameraFeatureSupported)
+       {
+               if ( nRet == TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] camera_create API call correctly returned unsupported error for unsupported feature\\n", __LINE__, API_NAMESPACE);
+                       return 0;
+               }
+               FPRINTF("[Line : %d][%s] camera_create API call didn't return unsupported error for unsupported feature\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+       if ( nRet != RECORDER_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] cannot create camera\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_create_videorecorder(g_pstCamera, &g_pstRecorder);
+               
+               RecorderExecutionDelay(pszCreateSpeedLog);
+               
+               if ( !g_bIsMicrophoneFeatureSupported && !g_bIsCameraFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][%s] recorder_create_videorecorder returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+                               nCreateFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][%s] recorder_create_videorecorder API call correctly returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+                       }
+                       continue;
+               }
+               
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_create_videorecorder failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nCreateFailCount++;
+                       continue;
+               }
+               
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_destroy(g_pstRecorder);
+               
+               RecorderExecutionDelay(pszDestroySpeedLog);
+               
+               if ( !g_bIsMicrophoneFeatureSupported && !g_bIsCameraFeatureSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][%s] recorder_destroy returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+                               nDestroyFailCount++;
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d][%s] recorder_destroy API call correctly returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+                       }
+                       continue;
+               }
+               
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_destroy failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nDestroyFailCount++;
+                       continue;
+               }
+               
+               RecorderGetMemStatus(pszAvailMemLog);
+       }
+
+       nRet = camera_destroy(g_pstCamera);
+       if ( nRet != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] camera_destroy failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0)
+       {
+               FPRINTF("[Line : %d][%s] recorder_create_videorecorder failed %d times, recorder_destroy failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nCreateFailCount, nDestroyFailCount, MAX_COUNT);
+               FreeMemory(pszAvailMemLog, pszCreateSpeedLog, pszDestroySpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_create_videorecorder, pszCreateSpeedLog);
+       PRINT_SPEED_LOG(recorder_destroy, pszDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_create_videorecorder, pszAvailMemLog);
+#endif
+
+       FreeMemory(pszAvailMemLog, pszCreateSpeedLog, pszDestroySpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Prepare and unprepare the recorder
+//& type: auto
+/**
+* @testcase                    ITc_recorder_prepare_unprepare_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to prepare and unprepare recorder
+* @scenario                            Create audio recorder\n
+*                                              Prepares recorder\n
+*                                              Destroy recorder
+* @apicovered                  recorder_set_audio_encoder, recorder_set_file_format, recorder_prepare and recorder_unprepare
+* @passcase                            If recorder gets prepared successfully
+* @failcase                    If recorder does not get prepared successfully
+* @precondition                        The recorder state should be RECORDER_STATE_CREATED by recorder_create_videorecorder(), recorder_create_audiorecorder() or recorder_unprepare().
+* @postcondition               The recorder state will be RECORDER_STATE_READY. If recorder handle is created by recorder_create_videorecorder(), camera state will be changed to CAMERA_STATE_PREVIEW.
+*/
+int ITc_recorder_prepare_unprepare_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszPrepMemLog = NULL;
+       char *pszPrepSpeedLog = NULL;
+       char *pszUnprepSpeedLog = NULL;
+       int nAudioFailCount = 0;
+       int nFileFailCount = 0;
+       int nPrepFailCount = 0;
+       int nUnprepFailCount = 0;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszPrepMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszPrepSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnprepSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = recorder_set_audio_encoder(g_pstRecorder, RECORDER_AUDIO_CODEC_AMR);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_audio_encoder failed, error returned = %s\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+                       nAudioFailCount++;
+                       continue;
+               }
+               
+               nRet = recorder_set_file_format(g_pstRecorder, RECORDER_FILE_FORMAT_AMR);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_file_format failed, error returned = %s\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+                       nFileFailCount++;
+                       continue;
+               }
+               
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               //Target API
+               nRet = recorder_prepare(g_pstRecorder);
+               
+               RecorderExecutionDelay(pszPrepSpeedLog);
+               
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_prepare failed, error returned = %s\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+                       nPrepFailCount++;
+                       continue;
+               }
+               
+               RecorderGetTimeOfDay();
+               
+               //Target API
+               nRet = recorder_unprepare(g_pstRecorder);
+               
+               RecorderExecutionDelay(pszUnprepSpeedLog);
+               
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unprepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nUnprepFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszPrepMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nAudioFailCount > 0 || nFileFailCount > 0 || nPrepFailCount > 0 || nUnprepFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_audio_encoder failed %d times, recorder_set_file_format failed %d times, recorder_prepare failed %d times, recorder_unprep failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nAudioFailCount, nFileFailCount, nPrepFailCount, nUnprepFailCount, MAX_COUNT);
+               FreeMemory(pszPrepMemLog, pszPrepSpeedLog, pszUnprepSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_prepare, pszPrepSpeedLog);
+       PRINT_SPEED_LOG(recorder_unprepare, pszUnprepSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_prepare_unprepare, pszPrepMemLog);
+#endif
+
+       FreeMemory(pszPrepMemLog, pszPrepSpeedLog, pszUnprepSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Starts and cancels the recorder
+//& type: auto
+/**
+* @testcase                    ITc_recorder_start_cancel_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to start and cancel recorder
+* @scenario                            Create audio recorder\n
+*                                              Starts recorder\n
+*                                              Cancels it and then destroy it
+* @apicovered                  recorder_start, recorder_cancel, recorder_get_state and recorder_unprepare
+* @passcase                            If recorder gets started successfully
+* @failcase                    If recorder does not get started successfully
+* @precondition                        The recorder state must be RECORDER_STATE_READY by recorder_prepare() or RECORDER_STATE_PAUSED by recorder_pause()
+* @postcondition               The recorder state will be RECORDER_STATE_RECORDING
+*/
+int ITc_recorder_start_cancel_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszStartMemLog = NULL;
+       char *pszStartSpeedLog = NULL;
+       char *pszCancelSpeedLog = NULL;
+       int nReadyFailCount = 0;
+       int nStartFailCount = 0;
+       int nStateFailCount = 0;
+       int nMismatchCount = 0;
+       int nCancelFailCount = 0;
+       int nUnprepFailCount = 0;
+       recorder_state_e state;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszStartMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszStartSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszCancelSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( ReadyRecorderHandler() != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(ReadyRecorderHandler);
+                       nReadyFailCount++;
+                       continue;
+               }
+               
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_start(g_pstRecorder);
+               
+               RecorderExecutionDelay(pszStartSpeedLog);
+               
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nStartFailCount++;
+                       continue;
+               }
+
+               nRet = recorder_get_state(g_pstRecorder,&state);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_state failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nStateFailCount++;
+                       continue;
+               }
+               
+               RecorderGetState(state);
+               if ( state != RECORDER_STATE_RECORDING )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start_cancel mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_cancel(g_pstRecorder);
+               
+               RecorderExecutionDelay(pszCancelSpeedLog);
+               
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_cancel failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nCancelFailCount++;
+                       continue;
+               }
+
+               nRet = recorder_unprepare(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unprepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nUnprepFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszStartMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nReadyFailCount > 0 || nStartFailCount > 0 || nStateFailCount > 0 || nCancelFailCount > 0 || nUnprepFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_prepare failed %d times, recorder_start failed %d times, recorder_get_state failed %d times, recorder_cancel failed %d times, recorder_unprep failed %d times, recorder_start_cancel mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nReadyFailCount, nStartFailCount, nStateFailCount, nCancelFailCount, nUnprepFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszStartMemLog, pszStartSpeedLog, pszCancelSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_start, pszStartSpeedLog);
+       PRINT_SPEED_LOG(recorder_cancel, pszCancelSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_start_cancel, pszStartMemLog);
+#endif
+       
+       FreeMemory(pszStartMemLog, pszStartSpeedLog, pszCancelSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Starts and commit the recorder
+//& type: auto
+/**
+* @testcase                    ITc_recorder_start_commit_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to start and commit recorder
+* @scenario                            Create audio recorder\n
+*                                              Starts recorder\n
+*                                              Commits it and then destroy it
+* @apicovered                  recorder_start, recorder_commit, recorder_get_state, recorder_unprepare and recorder_cancel
+* @passcase                            If recorder gets commit successfully
+* @failcase                    If recorder does not get commit successfully
+* @precondition                        The recorder state must be RECORDER_STATE_READY by recorder_prepare() or RECORDER_STATE_PAUSED by recorder_pause()
+* @postcondition               The recorder state will be RECORDER_STATE_RECORDING
+*/
+int ITc_recorder_start_commit_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszCommitMemLog = NULL;
+       char *pszCommitSpeedLog = NULL;
+       int nReadyFailCount = 0;
+       int nStartFailCount = 0;
+       int nStateFailCount = 0;
+       int nMismatchCount = 0;
+       int nCommitFailCount = 0;
+       int nUnprepFailCount = 0;
+       recorder_state_e state;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszCommitMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszCommitSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( ReadyRecorderHandler() != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(ReadyRecorderHandler);
+                       nReadyFailCount++;
+                       continue;
+               }
+
+               nRet = recorder_start(g_pstRecorder);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+
+                       nStartFailCount++;
+                       continue;
+               }
+
+
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_commit(g_pstRecorder);
+               
+               RecorderExecutionDelay(pszCommitSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_commit failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nCommitFailCount++;
+                       continue;
+               }
+
+               nRet = recorder_get_state(g_pstRecorder,&state);
+               
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_state failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nStateFailCount++;
+                       continue;
+               }
+
+               RecorderGetState(state);
+               if (state!=RECORDER_STATE_READY)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start_commit mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               nRet = recorder_unprepare(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unprepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nUnprepFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszCommitMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nReadyFailCount > 0 || nStartFailCount > 0 || nStateFailCount > 0 ||nCommitFailCount || nUnprepFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_prepare failed %d times, recorder_start failed %d times, recorder_get_state failed %d times, recorder_commit failed %d times, recorder_unprep failed %d times, recorder_start_commit mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nReadyFailCount, nStartFailCount, nStateFailCount, nCommitFailCount, nUnprepFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszCommitMemLog, pszCommitSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_commit, pszCommitSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_commit, pszCommitMemLog);
+#endif
+
+       FreeMemory(pszCommitMemLog, pszCommitSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Gets the recorder's current state
+//& type: auto
+/**
+* @testcase                    ITc_recorder_get_state_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to get the recorder's current state
+* @scenario                            Create Audio recorder\n
+*                                              Gets the recorder's current state and destroy recorder
+* @apicovered                  recorder_get_state
+* @passcase                            if it gets the recorder's current state successfully
+* @failcase                    If recorder_get_state fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED by recorder_create() or recorder_unprepare()
+* @postcondition               NA
+*/
+int ITc_recorder_get_state_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszAvailMemLog = NULL;
+       char *pszAvailSpeedLog = NULL;
+       int nAvailFailCount = 0;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszAvailMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszAvailSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               recorder_state_e state;
+               
+               // Target API
+               nRet = recorder_get_state(g_pstRecorder,&state);
+               
+               RecorderGetState(state);
+               RecorderExecutionDelay(pszAvailSpeedLog);
+               
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_state_p failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nAvailFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszAvailMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nAvailFailCount > 0)
+       {
+               FPRINTF("[Line : %d][%s] recorder_get_state_p failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nAvailFailCount, MAX_COUNT);
+               FreeMemory(pszAvailMemLog, pszAvailSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_get_state, pszAvailSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_get_state, pszAvailMemLog);
+#endif
+
+       FreeMemory(pszAvailMemLog, pszAvailSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Pause the recorder
+//& type: auto
+/**
+* @testcase                    ITc_recorder_pause_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to pause the recorder
+* @scenario                            Create Audio recorder\n
+*                                              Gets the recorder's ready\n
+*                                              Starts the recorder\n
+*                                              Pause the recorder and then destroy recorder
+* @apicovered                  recorder_start, recorder_get_state, recorder_unprepare, recorder_pause and recorder_cancel
+* @passcase                            if it gets the recorder's paused successfully
+* @failcase                    If recorder_pause fails
+* @precondition                        The recorder state must be RECORDER_STATE_RECORDING
+* @postcondition               The recorder state will be RECORDER_STATE_PAUSED
+*/
+int ITc_recorder_pause_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszPauseMemLog = NULL;
+       char *pszPauseSpeedLog = NULL;
+       int nReadyFailCount = 0;
+       int nStartFailCount = 0;
+       int nPauseFailCount = 0;
+       int nMismatchCount = 0;
+       int nCancelFailCount = 0;
+       int nUnprepFailCount = 0;
+       recorder_state_e state;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszPauseMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszPauseSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( ReadyRecorderHandler() != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(ReadyRecorderHandler);
+                       nReadyFailCount++;
+                       continue;
+               }
+
+               nRet = recorder_start(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+
+                       nStartFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_pause(g_pstRecorder);
+               
+               RecorderExecutionDelay(pszPauseSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_pause failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+
+                       nPauseFailCount++;
+                       continue;
+               }
+               
+               recorder_get_state(g_pstRecorder,&state);
+               RecorderGetState(state);
+
+               if (state!=RECORDER_STATE_PAUSED)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_pause mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+
+               nRet = recorder_cancel(g_pstRecorder);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_cancel failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+
+                       nCancelFailCount++;
+                       continue;
+               }
+
+               nRet = recorder_unprepare(g_pstRecorder);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unprepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+
+                       nUnprepFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszPauseMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nReadyFailCount > 0 || nStartFailCount > 0 || nPauseFailCount || nCancelFailCount || nUnprepFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_prepare failed %d times, recorder_start failed %d times, recorder_pause failed %d times, recorder_cancel failed %d times, recorder_unprep failed %d times, recorder_pause mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nReadyFailCount, nStartFailCount, nPauseFailCount, nCancelFailCount, nUnprepFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszPauseMemLog, pszPauseSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_pause, pszPauseSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_pause, pszPauseMemLog);
+#endif
+
+       FreeMemory(pszPauseMemLog, pszPauseSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the file path to record
+//& type: auto
+/**
+* @testcase                    ITc_recorder_set_filename_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to Sets and Gets the file path to record
+* @scenario                            Create Audio recorder\n
+*                                              Sets the file path to record\n
+*                                              Gets the file path to record
+* @apicovered                  recorder_set_filename, recorder_get_filename
+* @passcase                            if it sets the file path to record successfully and gets it successfully
+* @failcase                    If recorder_set_filename or recorder_get_filename fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED by recorder_create() or recorder_unprepare()
+* @postcondition               NA
+*/
+int ITc_recorder_set_get_filename_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       char* pchGetFilename = NULL;
+       
+       GetFileName();
+       char* pchSetFilename = strdup(g_RecorderFile);
+       if (NULL == pchSetFilename)
+       {
+               FPRINTF("[Line : %d][%s]Memory Allocation Failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       free(g_RecorderFile);
+
+       if ( CreateAudioRecorder() == false )
+       {
+               free(pchSetFilename);
+               pchSetFilename = NULL;
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               free(pchSetFilename);
+               pchSetFilename = NULL;
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               free(pchSetFilename);
+               pchSetFilename = NULL;
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_set_filename(g_pstRecorder,pchSetFilename);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_filename failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_get_filename(g_pstRecorder,&pchGetFilename);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_filename failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+               if (pchSetFilename != NULL)
+               {
+                       if (strcmp(pchSetFilename, pchGetFilename) != 0)
+                       {
+                               FPRINTF("[Line : %d][%s] recorder_set_get_filename mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                               nMismatchCount++;
+                               continue;
+                       }
+               }
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+       
+       free(pchSetFilename);
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_filename failed %d times, recorder_get_filename failed %d times, recorder_set_get_filename mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_set_filename, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_get_filename, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_set_get_filename, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the number of the audio channel
+//& type: auto
+/**
+* @testcase                    ITc_recorder_attr_set_get_audio_channel_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to Sets and Gets the number of the audio channel
+* @scenario                            Create Audio recorder\n
+*                                              Sets the number of the audio channel\n
+*                                              Gets the number of the audio channel
+* @apicovered                  recorder_attr_set_audio_channel, recorder_attr_get_audio_channel
+* @passcase                            If it sets the number of the audio channel to record successfully and gets it successfully
+* @failcase                    If recorder_attr_set_audio_channel or recorder_attr_get_audio_channel fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_attr_set_get_audio_channel_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       int nChannelCount;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_set_audio_channel(g_pstRecorder,1);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_audio_channel failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_get_audio_channel(g_pstRecorder, &nChannelCount);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_get_audio_channel failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (nChannelCount != 1)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_get_audio_channel mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_attr_set_audio_channel failed %d times, recorder_attr_get_audio_channel failed %d times, recorder_attr_set_get_audio_channel mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_attr_set_audio_channel, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_attr_get_audio_channel, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_attr_set_get_audio_channel, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the audio device for recording
+//& type: auto
+/**
+* @testcase                    ITc_recorder_attr_set_get_audio_device_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to Sets and Gets the audio device for recording
+* @scenario                            Create Audio recorder\n
+*                                              Sets audio device for recording\n
+*                                              Gets audio device for recording
+* @apicovered                  recorder_attr_set_audio_device, recorder_attr_get_audio_device
+* @passcase                            If it sets the audio device to record successfully and gets it successfully
+* @failcase                    If recorder_attr_set_audio_device or recorder_attr_get_audio_device fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_attr_set_get_audio_device_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       recorder_audio_device_e device;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_set_audio_device(g_pstRecorder, RECORDER_AUDIO_DEVICE_MIC);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_audio_device failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_get_audio_device(g_pstRecorder,&device);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_get_audio_device failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (device != RECORDER_AUDIO_DEVICE_MIC)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_get_audio_device mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_attr_set_audio_channel failed %d times, recorder_attr_get_audio_channel failed %d times, recorder_attr_set_get_audio_channel mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_attr_set_audio_device, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_attr_get_audio_device, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_attr_set_get_audio_device, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the bitrate of audio encoder
+//& type: auto
+/**
+* @testcase                    ITc_recorder_attr_set_get_audio_encoder_bitrate_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to Sets and Gets the bitrate of audio encoder
+* @scenario                            Create Audio recorder\n
+*                                              Sets the bitrate of audio encoder\n
+*                                              Gets the bitrate of audio encoder
+* @apicovered                  recorder_attr_set_audio_encoder_bitrate, recorder_attr_get_audio_encoder_bitrate
+* @passcase                            If it sets and gets the bitrate of audio encoder successfully
+* @failcase                    If recorder_attr_set_audio_encoder_bitrate or recorder_attr_get_audio_encoder_bitrate fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_attr_set_get_audio_encoder_bitrate_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       int nBitrate;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_set_audio_encoder_bitrate(g_pstRecorder, 12200);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_audio_encoder_bitrate failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_get_audio_encoder_bitrate(g_pstRecorder, &nBitrate);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_get_audio_encoder_bitrate failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (nBitrate != 12200)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_get_audio_encoder_bitrate mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_attr_set_audio_encoder_bitrate failed %d times, recorder_attr_get_audio_encoder_bitrate failed %d times, recorder_attr_set_get_audio_encoder_bitrate mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_attr_set_audio_encoder_bitrate, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_attr_get_audio_encoder_bitrate, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_attr_set_get_audio_encoder_bitrate, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the sampling rate of audio stream
+//& type: auto
+/**
+* @testcase                    ITc_recorder_attr_set_get_audio_samplerate_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to Sets and Gets the sampling rate of audio stream
+* @scenario                            Create Audio recorder\n
+*                                              Sets the sampling rate of audio stream\n
+*                                              Gets the sampling rate of audio stream
+* @apicovered                  recorder_attr_set_audio_samplerate, recorder_attr_get_audio_samplerate
+* @passcase                            If it sets and gets the sampling rate of audio stream successfully
+* @failcase                    If recorder_attr_set_audio_samplerate or recorder_attr_get_audio_samplerate fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_attr_set_get_audio_samplerate_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       int nSamplerate;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_set_audio_samplerate(g_pstRecorder,100);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_audio_samplerate failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_get_audio_samplerate(g_pstRecorder, &nSamplerate);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_get_audio_samplerate failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (nSamplerate != 100)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_get_audio_samplerate mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_attr_set_audio_samplerate failed %d times, recorder_attr_get_audio_samplerate failed %d times, recorder_attr_set_get_audio_samplerate mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_attr_set_audio_samplerate, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_attr_get_audio_samplerate, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_attr_set_get_audio_samplerate, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the video orientation in a video meta-data tag
+//& type: auto
+/**
+* @testcase                    ITc_recorder_attr_set_get_orientation_tag_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to Sets and Gets the video orientation in a video meta-data tag
+* @scenario                            Create Video recorder\n
+*                                              Sets the video orientation in a video meta-data tag\n
+*                                              Gets the video orientation in a video meta-data tag
+* @apicovered                  recorder_attr_set_orientation_tag, recorder_attr_get_orientation_tag
+* @passcase                            If it sets and gets the video orientation in a video meta-data tag successfully
+* @failcase                    If recorder_attr_set_orientation_tag or recorder_attr_get_orientation_tag fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_attr_set_get_orientation_tag_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       recorder_rotation_e orientation;
+
+       if ( CreateVideoRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_videorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_videorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_set_orientation_tag(g_pstRecorder, RECORDER_ROTATION_90);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_orientation_tag failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_get_orientation_tag(g_pstRecorder,&orientation);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_get_orientation_tag failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (orientation != RECORDER_ROTATION_90)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_get_orientation_tag mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       nRet = camera_destroy(g_pstCamera);
+       if ( nRet != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] camera_destroy failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_attr_set_orientation_tag failed %d times, recorder_attr_get_orientation_tag failed %d times, recorder_attr_set_get_orientation_tag mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_attr_set_orientation_tag, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_attr_get_orientation_tag, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_attr_set_get_orientation_tag, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the recording motion rate
+//& type: auto
+/**
+* @testcase                    ITc_recorder_attr_set_get_recording_motion_rate_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to Sets and Gets the recording motion rate
+* @scenario                            Create Video recorder\n
+*                                              Sets the recording motion rate\n
+*                                              Gets the recording motion rate
+* @apicovered                  recorder_attr_set_recording_motion_rate, recorder_attr_get_recording_motion_rate
+* @passcase                            If it sets and gets the recording motion rate successfully
+* @failcase                    If recorder_attr_set_recording_motion_rate or recorder_attr_get_recording_motion_rate fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_attr_set_get_recording_motion_rate_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       double rate;
+
+       if ( CreateVideoRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_videorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_videorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_set_recording_motion_rate(g_pstRecorder,1);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_recording_motion_rate failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_get_recording_motion_rate(g_pstRecorder,&rate);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_get_recording_motion_rate failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (rate != 1)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_get_recording_motion_rate mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       nRet = camera_destroy(g_pstCamera);
+       if ( nRet != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] camera_destroy failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_attr_set_recording_motion_rate failed %d times, recorder_attr_get_recording_motion_rate failed %d times, recorder_attr_set_get_recording_motion_rate mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_attr_set_recording_motion_rate, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_attr_get_recording_motion_rate, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_attr_set_get_recording_motion_rate, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the  maximum size of recording file
+//& type: auto
+/**
+* @testcase                    ITc_recorder_attr_set_get_size_limit_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @description                 to Sets and Gets the maximum size of recording file
+* @scenario                            Create Video recorder\n
+*                                              Sets the  maximum size of recording file\n
+*                                              Gets the  maximum size of recording file
+* @apicovered                  recorder_attr_set_size_limit, recorder_attr_get_size_limit
+* @passcase                            If it sets and gets the  maximum size of recording file successfully
+* @failcase                    If recorder_attr_set_size_limit or recorder_attr_get_size_limit fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_attr_set_get_size_limit_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       int nKbyte;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_set_size_limit(g_pstRecorder,0);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_size_limit failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_get_size_limit(g_pstRecorder, &nKbyte);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_get_size_limit failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (nKbyte != 0)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_get_size_limit mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_attr_set_size_limit failed %d times, recorder_attr_get_size_limit failed %d times, recorder_attr_set_get_size_limit mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_attr_set_size_limit, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_attr_get_size_limit, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_attr_set_get_size_limit, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the  time limit of recording file
+//& type: auto
+/**
+* @testcase                    ITc_recorder_attr_set_get_time_limit_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Audio recorder\n
+*                                              Sets the time limit of recording file\n
+*                                              Gets the time limit of recording file
+* @description                 to Sets and Gets the time limit of recording file
+* @apicovered                  recorder_attr_set_time_limit, recorder_attr_get_time_limit
+* @passcase                            If it sets and gets the time limit of recording file successfully
+* @failcase                    If recorder_attr_set_time_limit or recorder_attr_get_time_limit fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_attr_set_get_time_limit_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       int nSecond;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_set_time_limit(g_pstRecorder,0);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_time_limit failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_get_time_limit(g_pstRecorder, &nSecond);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_get_time_limit failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (nSecond != 0)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_get_time_limit mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_attr_set_time_limit failed %d times, recorder_attr_get_time_limit failed %d times, recorder_attr_set_get_time_limit mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_attr_set_time_limit, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_attr_get_time_limit, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_attr_set_get_time_limit, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the bitrate of video encoder
+//& type: auto
+/**
+* @testcase                    ITc_recorder_attr_set_get_video_encoder_bitrate_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Video recorder\n
+*                                              Sets the bitrate of video encoder\n
+*                                              Gets the bitrate of video encoder
+* @description                 to Sets and Gets the bitrate of video encoder
+* @apicovered                  recorder_attr_set_video_encoder_bitrate, recorder_attr_get_video_encoder_bitrate
+* @passcase                            If it sets and gets the bitrate of video encoder successfully
+* @failcase                    If recorder_attr_set_video_encoder_bitrate or recorder_attr_set_video_encoder_bitrate fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_attr_set_get_video_encoder_bitrate_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       int nBitrate;
+
+       if ( CreateVideoRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_videorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_videorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_set_video_encoder_bitrate(g_pstRecorder,100);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_video_encoder_bitrate failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_get_video_encoder_bitrate(g_pstRecorder, &nBitrate);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_get_video_encoder_bitrate failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (nBitrate != 100)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_get_video_encoder_bitrate mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       nRet = camera_destroy(g_pstCamera);
+       if ( nRet != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] camera_destroy failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_attr_set_video_encoder_bitrate failed %d times, recorder_attr_get_video_encoder_bitrate failed %d times, recorder_attr_set_get_video_encoder_bitrate mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_attr_set_video_encoder_bitrate, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_attr_get_video_encoder_bitrate, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_attr_set_get_video_encoder_bitrate, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the audio codec for encoding audio stream
+//& type: auto
+/**
+* @testcase                    ITc_recorder_set_get_audio_encoder_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Audio recorder\n
+*                                              Sets the audio codec for encoding audio stream\n
+*                                              Gets the audio codec for encoding audio stream
+* @description                 to Sets and Gets the audio codec for encoding audio stream
+* @apicovered                  recorder_set_audio_encoder, recorder_get_audio_encoder
+* @passcase                            If it sets and gets the audio codec for encoding audio stream successfully
+* @failcase                    If recorder_set_audio_encoder or recorder_get_audio_encoder fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_set_get_audio_encoder_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       recorder_audio_codec_e codec, getcodec;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+       nRet = recorder_foreach_supported_audio_encoder(g_pstRecorder, RecorderSupportedAudioEncoderCallback, &codec);
+       if ( nRet != RECORDER_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] recorder_foreach_supported_audio_encoder failed, error returned = %s\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_set_audio_encoder(g_pstRecorder, codec);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_audio_encoder failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+
+               // Target API
+               nRet = recorder_get_audio_encoder(g_pstRecorder, &getcodec);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_audio_encoder failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (getcodec != codec)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_get_audio_encoder mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_audio_encoder failed %d times, recorder_get_audio_encoder failed %d times, recorder_set_get_audio_encoder mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_set_audio_encoder, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_get_audio_encoder, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_set_get_audio_encoder, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the video codec for encoding video stream
+//& type: auto
+/**
+* @testcase                    ITc_recorder_set_get_video_encoder_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Video recorder\n
+*                                              Sets the video codec for encoding video stream\n
+*                                              Gets the video codec for encoding video stream
+* @description                 to Sets and Gets the video codec for encoding video stream
+* @apicovered                  recorder_set_video_encoder, recorder_get_video_encoder, camera_destroy and recorder_get_video_encoder
+* @passcase                            If it sets and gets the video codec for encoding video stream successfully
+* @failcase                    If recorder_attr_set_video_encoder or recorder_attr_get_video_encoder fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_set_get_video_encoder_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       recorder_video_codec_e codec, getcodec;
+
+       if ( CreateVideoRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_videorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_videorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+       nRet = recorder_foreach_supported_video_encoder(g_pstRecorder, RecorderSupportedVideoEncoderCallback, &codec);
+       if ( nRet != RECORDER_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] recorder_foreach_supported_video_encoder failed, error returned = %s\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+               return 1;
+       }
+       
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_set_video_encoder(g_pstRecorder, codec);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_video_encoder failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_get_video_encoder(g_pstRecorder,&getcodec);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_video_encoder failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (getcodec != codec)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_get_video_encoder mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       nRet = camera_destroy(g_pstCamera);
+       if ( nRet != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] camera_destroy failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_video_encoder failed %d times, recorder_get_video_encoder failed %d times, recorder_set_get_video_encoder mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_set_video_encoder, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_get_video_encoder, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_set_get_video_encoder, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the resolution of video recording
+//& type: auto
+/**
+* @testcase                    ITc_recorder_set_get_video_resolution_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Video recorder\n
+*                                              Sets the resolution of video recording\n
+*                                              Gets the resolution of video recording
+* @description                 to Sets and Gets the resolution of video recording
+* @apicovered                  recorder_set_video_resolution, recorder_get_video_resolution
+* @passcase                            If it sets and gets the resolution of video recording successfully
+* @failcase                    If recorder_set_video_resolution or recorder_get_video_resolution fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_set_get_video_resolution_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       int nWidth,nHeight;
+
+       if ( CreateVideoRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_videorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_videorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               nRet = recorder_foreach_supported_video_resolution(g_pstRecorder, RecorderSupportedVideoResolutionCallback, NULL);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_foreach_supported_video_resolution failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               if ( !g_bRecorderSupportedVideoResolutionCallback )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_foreach_supported_video_resolution_cb failed on iteration = %d , error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+               }
+
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_set_video_resolution(g_pstRecorder, gWidth, gHeight);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_video_resolution failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               usleep(2000);
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_get_video_resolution(g_pstRecorder, &nWidth, &nHeight);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_video_resolution failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (nWidth != gWidth || nHeight != gHeight)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_get_video_resolution mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       nRet = camera_destroy(g_pstCamera);
+       if ( nRet != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] camera_destroy failed\n\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_video_resolution failed %d times, recorder_get_video_resolution failed %d times, recorder_set_get_video_resolution mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_set_video_resolution, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_get_video_resolution, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_set_get_video_resolution, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets and Gets the file format for recording media stream
+//& type: auto
+/**
+* @testcase                    ITc_recorder_set_get_file_format_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Video recorder\n
+*                                              Sets the file format for recording media stream\n
+*                                              Gets the file format for recording media stream
+* @description                 to Sets and Gets the file format for recording media stream
+* @apicovered                  recorder_set_file_format, recorder_get_file_format
+* @passcase                            If it sets and gets the file format for recording media stream successfully
+* @failcase                    If recorder_set_file_format or recorder_get_file_format fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_set_get_file_format_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetGetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nGetFailCount = 0;
+       int nMismatchCount = 0;
+       recorder_file_format_e format, getformat;
+
+       if ( CreateVideoRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_videorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_videorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       
+       nRet = recorder_foreach_supported_file_format(g_pstRecorder, RecorderSupportedFileFormatCallback, &format);
+       if ( nRet != RECORDER_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] recorder_foreach_supported_file_format failed, error returned = %s\\n", __LINE__, API_NAMESPACE, RecorderGetError(nRet));
+               return 1;
+       }
+               
+#if MEMORY_CHECK
+       pszSetGetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_set_file_format(g_pstRecorder, format);
+
+               RecorderExecutionDelay(pszSetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_file_format failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_get_file_format(g_pstRecorder,&getformat);
+
+               RecorderExecutionDelay(pszGetSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_file_format failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nGetFailCount++;
+                       continue;
+               }
+
+               if (format != getformat)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_get_file_format mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nMismatchCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetGetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       nRet = camera_destroy(g_pstCamera);
+       if ( nRet != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] camera_destroy failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_file_format failed %d times, recorder_get_file_format failed %d times, recorder_set_get_file_format mismatched %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_set_file_format, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_get_file_format, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_set_get_file_format, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Sets mute state of recorder and check if it is muted
+//& type: auto
+/**
+* @testcase                    ITc_recorder_attr_mute_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Audio recorder\n
+*                                              Sets mute state of recorder\n
+*                                              Check if it is muted
+* @description                 to Set mute state of recorder and check if it is muted
+* @apicovered                  recorder_attr_set_mute, recorder_attr_is_muted
+* @passcase                            If it Sets mute state of recorder and check if it is muted successfully
+* @failcase                    If recorder_attr_set_mute or recorder_attr_is_muted fails
+* @precondition                        The recorder state must be RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_attr_mute_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszMuteMemLog = NULL;
+       char *pszSetMuteSpeedLog = NULL;
+       char *pszIsMutedSpeedLog = NULL;
+       int nSetMuteFailCount = 0;
+       int nIsMutedFailCount = 0;
+       bool bValue;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszMuteMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetMuteSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszIsMutedSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_attr_set_mute(g_pstRecorder,true);
+
+               RecorderExecutionDelay(pszSetMuteSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_mute failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+
+                       nSetMuteFailCount++;
+                       continue;
+               }
+               
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               bValue=recorder_attr_is_muted(g_pstRecorder);
+
+               RecorderExecutionDelay(pszIsMutedSpeedLog);
+
+               if (bValue != true)
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_is_muted failed on iteration %d, error returned\\n", __LINE__, API_NAMESPACE, nLoopCount);
+
+                       nIsMutedFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszMuteMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+
+       if ( nSetMuteFailCount > 0 || nIsMutedFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_attr_set_mute failed %d times, recorder_attr_is_muted failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetMuteFailCount, nIsMutedFailCount, MAX_COUNT);
+               FreeMemory(pszMuteMemLog, pszSetMuteSpeedLog, pszIsMutedSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_attr_set_mute, pszSetMuteSpeedLog);
+       PRINT_SPEED_LOG(recorder_attr_is_muted, pszIsMutedSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_attr_mute, pszMuteMemLog);
+#endif
+
+       FreeMemory(pszMuteMemLog, pszSetMuteSpeedLog, pszIsMutedSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Gets the peak audio input level that was sampled since the last call to this function
+//& type: auto
+/**
+* @testcase                    ITc_recorder_get_audio_level_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Video recorder\n
+*                                              Gets the peak audio input level that was sampled since the last call to this function
+* @description                 to get the peak audio input level that was sampled since the last call to this function
+* @apicovered                  recorder_get_audio_level
+* @passcase                            If it gets the peak audio input level that was sampled since the last call to this function successfully
+* @failcase                    If recorder_get_audio_level fails
+* @precondition                        The recorder state must be RECORDER_STATE_RECORDING or RECORDER_STATE_PAUSED.
+* @postcondition               NA
+*/
+int ITc_recorder_get_audio_level_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszAudioMemLog = NULL;
+       char *pszAudioSpeedLog = NULL;
+       int nReadyFailCount = 0;
+       int nStartFailCount = 0;
+       int nAudioFailCount = 0;
+       int nCancelFailCount = 0;
+       int nUnprepFailCount = 0;
+       double dB;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszAudioMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK        
+       pszAudioSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( ReadyRecorderHandler() != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(ReadyRecorderHandler);
+                       nReadyFailCount++;
+                       continue;
+               }
+
+               nRet = recorder_start(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+
+                       nStartFailCount++;
+                       continue;
+               }
+               
+               RecorderGetMemAllocation();
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_get_audio_level(g_pstRecorder,&dB);
+               RecorderExecutionDelay(pszAudioSpeedLog);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_audio_level failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+
+                       nAudioFailCount++;
+                       continue;
+               }
+               
+               nRet = recorder_cancel(g_pstRecorder);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_cancel failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+
+                       nCancelFailCount++;
+                       continue;
+               }
+
+               nRet = recorder_unprepare(g_pstRecorder);
+
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unprepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+
+                       nUnprepFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszAudioMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nReadyFailCount > 0 || nStartFailCount > 0 || nAudioFailCount || nCancelFailCount || nUnprepFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_prepare failed %d times, recorder_start failed %d times, recorder_get_audio_level failed %d times, recorder_cancel failed %d times, recorder_unprep failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nReadyFailCount, nStartFailCount, nAudioFailCount, nCancelFailCount, nUnprepFailCount, MAX_COUNT);
+               FreeMemory(pszAudioMemLog, pszAudioSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_get_audio_level, pszAudioSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_get_audio_level, pszAudioMemLog);
+#endif
+
+       FreeMemory(pszAudioMemLog, pszAudioSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Registers and Unregisters a callback function to be called when recorder is interrupted according to a policy
+//& type: auto
+/**
+* @testcase                    ITc_recorder_set_unset_interrupted_cb_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Audio recorder\n
+*                                              Registers and Unregisters a callback function to be called when recorder is interrupted according to a policy
+* @description                 to Registers and Unregisters a callback function to be called when recorder is interrupted according to a policy
+* @apicovered                  recorder_set_interrupted_cb, recorder_unset_interrupted_cb
+* @passcase                            If it Registers and Unregisters a callback function to be called when recorder is interrupted according to a policy
+* @failcase                    If recorder_set_interrupted_cb or recorder_unset_interrupted_cb fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_recorder_set_unset_interrupted_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetUnsetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               
+               g_bRecorderInterruptedCallback = false;
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_set_interrupted_cb(g_pstRecorder, RecorderInterruptedCallback, NULL);
+               RecorderExecutionDelay(pszSetSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_interrupted_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               /** unable to generate required manual interruption for callback invocation, so ignoring callback hit check*/
+               
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_unset_interrupted_cb(g_pstRecorder);
+               RecorderExecutionDelay(pszUnsetSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unset_interrupted_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nUnsetFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetUnsetMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_interrupted_cb failed %d times, recorder_unset_interrupted_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nUnsetFailCount, MAX_COUNT);
+               FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_set_interrupted_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_unset_interrupted_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_set_unset_interrupted_cb, pszSetUnsetMemLog);
+#endif
+
+       FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Registers and Unregisters a callback function to be called when an asynchronous operation error occurred
+//& type: auto
+/**
+* @testcase                    ITc_recorder_set_unset_error_cb_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Audio recorder\n
+*                                              Registers and Unregisters a callback function to be called when an asynchronous operation error occurred
+* @description                 to Registers and Unregisters a callback function to be called when an asynchronous operation error occurred
+* @apicovered                  recorder_set_error_cb, recorder_unset_error_cb
+* @passcase                            If it Registers and Unregisters a callback function to be called when an asynchronous operation error occurred
+* @failcase                    If recorder_set_error_cb or recorder_unset_error_cb fails
+* @precondition                        NA
+* @postcondition               This function will invoke recorder_error_cb() when an asynchronous operation error occur.
+*/
+int ITc_recorder_set_unset_error_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetErrorMemLog = NULL;
+       char *pszSetErrorSpeedLog = NULL;
+       char *pszUnsetErrorSpeedLog = NULL;
+       int nSetErrorFailCount = 0;
+       int nUnsetErrorFailCount = 0;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetUnsetErrorMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetErrorSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetErrorSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               
+               g_bRecorderErrorCallback = false;
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_set_error_cb(g_pstRecorder, RecorderErrorCallback, NULL);
+               RecorderExecutionDelay(pszSetErrorSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_error_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetErrorFailCount++;
+                       continue;
+               }
+
+               /** unable to generate required error for callback invocation, so ignoring callback hit check*/
+
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_unset_error_cb(g_pstRecorder);
+               RecorderExecutionDelay(pszUnsetErrorSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unset_error_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nUnsetErrorFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetUnsetErrorMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetErrorFailCount > 0 || nUnsetErrorFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_error_cb failed %d times, recorder_unset_error_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetErrorFailCount, nUnsetErrorFailCount, MAX_COUNT);
+               FreeMemory(pszSetUnsetErrorMemLog, pszSetErrorSpeedLog, pszUnsetErrorSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_set_error_cb, pszSetErrorSpeedLog);
+       PRINT_SPEED_LOG(recorder_unset_error_cb, pszUnsetErrorSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_set_unset_error_cb, pszSetUnsetErrorMemLog);
+#endif
+
+       FreeMemory(pszSetUnsetErrorMemLog, pszSetErrorSpeedLog, pszUnsetErrorSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Registers and Unregisters a callback function to be called when reached recording limit
+//& type: auto
+/**
+* @testcase                    ITc_recorder_set_unset_recording_limit_reached_cb_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Audio recorder\n
+*                                              Registers and Unregisters a callback function to be called when reached recording limit
+* @description                 to Registers and Unregisters a callback function to be called when reached recording limit
+* @apicovered                  recorder_set_recording_limit_reached_cb, recorder_unset_recording_limit_reached_cb
+* @passcase                            If it Registers and Unregisters a callback function to be called when reached recording limit
+* @failcase                    If recorder_set_recording_limit_reached_cb or recorder_unset_recording_limit_reached_cb fails
+* @precondition                        NA
+* @postcondition               recorder_recording_limit_reached_cb() will be invoked
+*/
+int ITc_recorder_set_unset_recording_limit_reached_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       int nFailCount = 0;
+       recorder_state_e state;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetUnsetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( ReadyRecorderHandler() != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(ReadyRecorderHandler);
+                       FPRINTF("[Line : %d][%s] Initialize condition failed\\n", __LINE__, API_NAMESPACE);
+               }
+
+               RecorderGetMemAllocation();
+               
+               g_bRecorderRecordingLimitReachedCallback = false;
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_set_recording_limit_reached_cb(g_pstRecorder, RecorderRecordingLimitReachedCallback, NULL);
+               RecorderExecutionDelay(pszSetSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_recording_limit_reached_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               nRet = recorder_attr_set_time_limit(g_pstRecorder,3);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_attr_set_time_limit failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               
+               nRet = recorder_start(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               
+               nRet = recorder_get_state(g_pstRecorder,&state);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_state failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               RecorderGetState(state);
+               if ( state != RECORDER_STATE_RECORDING )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start_cancel mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               
+               RecorderWaitForAsync();
+               
+               if ( !g_bRecorderRecordingLimitReachedCallback )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_recording_limit_reached_cb failed on iteration = %d, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount++;
+               }
+               
+               nRet = recorder_cancel(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_cancel failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+               }
+               
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_unset_recording_limit_reached_cb(g_pstRecorder);
+               RecorderExecutionDelay(pszUnsetSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unset_recording_limit_reached_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nUnsetFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetUnsetMemLog);
+
+               nRet = recorder_unprepare(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unprepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+               }
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_recording_limit_reached_cb failed %d times, recorder_unset_recording_limit_reached_cb failed %d times,recorder_recording_limit_reached_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nUnsetFailCount,nFailCount, MAX_COUNT);
+               FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_set_recording_limit_reached_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_unset_recording_limit_reached_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_set_unset_recording_limit_reached_cb, pszSetUnsetMemLog);
+#endif
+
+       FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Registers and Unregisters a callback function to be called when the recording information changes
+//& type: auto
+/**
+* @testcase                    ITc_recorder_set_unset_recording_status_cb_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Audio recorder\n
+*                                              Registers and Unregisters a callback function to be called when the recording information changes
+* @description                 to Registers and Unregisters a callback function to be called when the recording information changes
+* @apicovered                  recorder_set_recording_status_cb, recorder_unset_recording_status_cb
+* @passcase                            If it Registers and Unregisters a callback function to be called when the recording information changes
+* @failcase                    If recorder_set_recording_status_cb or recorder_unset_recording_status_cb fails
+* @precondition                        NA
+* @postcondition               recorder_recording_status_cb() will be invoked
+*/
+int ITc_recorder_set_unset_recording_status_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       int nFailCount = 0;
+       recorder_state_e state;
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetUnsetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( ReadyRecorderHandler() != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(ReadyRecorderHandler);
+                       FPRINTF("[Line : %d][%s] Initialize condition failed\\n", __LINE__, API_NAMESPACE);
+               }
+               
+               RecorderGetMemAllocation();
+               
+               g_bRecorderRecordingStatusCallback = false;
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_set_recording_status_cb(g_pstRecorder, RecorderRecordingStatusCallback, NULL);
+               RecorderExecutionDelay(pszSetSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_recording_status_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               nRet = recorder_start(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               
+               nRet = recorder_get_state(g_pstRecorder,&state);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_state failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               RecorderGetState(state);
+               if ( state != RECORDER_STATE_RECORDING )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start_cancel mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+
+               RecorderWaitForAsync();
+
+               if ( !g_bRecorderRecordingStatusCallback )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_recording_status_cb failed on iteration = %d, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount++;
+               }
+               
+               nRet = recorder_cancel(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_cancel failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+               }
+               
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_unset_recording_status_cb(g_pstRecorder);
+               RecorderExecutionDelay(pszUnsetSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unset_recording_status_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nUnsetFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetUnsetMemLog);
+
+               nRet = recorder_unprepare(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unprepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+               }
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_recording_status_cb failed %d times, recorder_unset_recording_status_cb failed %d times,recorder_recording_status_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nUnsetFailCount,nFailCount, MAX_COUNT);
+               FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_set_recording_status_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_unset_recording_status_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_set_unset_recording_status_cb, pszSetUnsetMemLog);
+#endif
+
+       FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Registers and Unregisters a callback function to be called when the recorder state changes
+//& type: auto
+/**
+* @testcase                    ITc_recorder_set_unset_state_changed_cb_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Audio recorder\n
+*                                              Registers and Unregisters a callback function to be called when the recorder state changes
+* @description                 to Registers and Unregisters a callback function to be called when the recorder state changes
+* @apicovered                  recorder_set_state_changed_cb, recorder_unset_state_changed_cb
+* @passcase                            If it Registers and Unregisters a callback function to be called when the recorder state changes
+* @failcase                    If recorder_set_state_changed_cb or recorder_unset_state_changed_cb fails
+* @precondition                        NA
+* @postcondition               RECORDER_STATE_changed_cb() will be invoked
+*/
+int ITc_recorder_set_unset_state_changed_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       int nFailCount = 0;
+       recorder_state_e state;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetUnsetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( ReadyRecorderHandler() != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(ReadyRecorderHandler);
+                       FPRINTF("[Line : %d][%s] Initialize condition failed\\n", __LINE__, API_NAMESPACE);
+               }
+       
+               RecorderGetMemAllocation();
+               
+               g_bRecorderStateChangedCallback = false;
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_set_state_changed_cb(g_pstRecorder, RecorderStateChangedCallback, NULL);
+               RecorderExecutionDelay(pszSetSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_state_changed_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               nRet = recorder_start(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               
+               nRet = recorder_get_state(g_pstRecorder,&state);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_state failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               RecorderGetState(state);
+               if ( state != RECORDER_STATE_RECORDING )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start_cancel mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+
+               RecorderWaitForAsync();
+
+               if ( !g_bRecorderStateChangedCallback )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_state_changed_cb failed on iteration = %d, error returned = callback not invoked, time out\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount++;
+               }
+               
+               nRet = recorder_cancel(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_cancel failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+               }
+               
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_unset_state_changed_cb(g_pstRecorder);
+               RecorderExecutionDelay(pszUnsetSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unset_state_changed_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nUnsetFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetUnsetMemLog);
+                       
+               nRet = recorder_unprepare(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unprepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+               }
+       }
+       
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_state_changed_cb failed %d times, recorder_unset_state_changed_cb failed %d times,recorder_state_changed_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nUnsetFailCount,nFailCount, MAX_COUNT);
+               FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_set_state_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_unset_state_changed_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_set_unset_state_changed_cb, pszSetUnsetMemLog);
+#endif
+
+       FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Registers and Unregisters a callback function to be called when audio stream data is being delivered
+//& type: auto
+/**
+* @testcase                    ITc_recorder_set_unset_audio_stream_cb_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Audio recorder\n
+*                                              Registers and Unregisters a callback function to be called when audio stream data is being delivered
+* @description                 to Registers and Unregisters a callback function to be called when audio stream data is being delivered
+* @apicovered                  recorder_set_audio_stream_cb, recorder_unset_audio_stream_cb
+* @passcase                            If it Registers and Unregisters a callback function to be called when audio stream data is being delivered
+* @failcase                    If recorder_set_audio_stream_cb or recorder_unset_audio_stream_cb fails
+* @precondition                        The recorder state should be RECORDER_STATE_READY or RECORDER_STATE_CREATED
+* @postcondition               NA
+*/
+int ITc_recorder_set_unset_audio_stream_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       int nFailCount = 0;
+       recorder_state_e state;
+       
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszSetUnsetMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       pszUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               if ( ReadyRecorderHandler() != true )
+               {
+                       PRINT_API_ERROR_IN_LOOP_MSG_SINGLE(ReadyRecorderHandler);
+                       FPRINTF("[Line : %d][%s] Initialize condition failed\\n", __LINE__, API_NAMESPACE);
+               }
+               
+               RecorderGetMemAllocation();
+               
+               g_bRecorderAudioStreamCallback = false;
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_set_audio_stream_cb(g_pstRecorder, RecorderAudioStreamCallback, NULL);
+               RecorderExecutionDelay(pszSetSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_set_audio_stream_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+               
+               nRet = recorder_start(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               
+               nRet = recorder_get_state(g_pstRecorder,&state);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_get_state failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               RecorderGetState(state);
+               if ( state != RECORDER_STATE_RECORDING )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_start_cancel mismatched on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       continue;
+               }
+               
+               RecorderWaitForAsync();
+
+               if ( !g_bRecorderAudioStreamCallback )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_audio_stream_cb failed on iteration = %d , error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount++;
+               }
+               
+               nRet = recorder_cancel(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_cancel failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+               }
+               
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_unset_audio_stream_cb(g_pstRecorder);
+               RecorderExecutionDelay(pszUnsetSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unset_audio_stream_cb failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nUnsetFailCount++;
+                       continue;
+               }
+
+               RecorderGetMemStatus(pszSetUnsetMemLog);
+
+               nRet = recorder_unprepare(g_pstRecorder);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_unprepare failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+               }
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][%s] recorder_set_audio_stream_cb failed %d times, recorder_unset_audio_stream_cb failed %d times,recorder_audio_stream_cb failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nSetFailCount, nUnsetFailCount,nFailCount, MAX_COUNT);
+               FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_set_audio_stream_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(recorder_unset_audio_stream_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_set_unset_audio_stream_cb, pszSetUnsetMemLog);
+#endif
+
+       FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Retrieves all supported file formats by invoking a specific callback for each supported file format
+//& type: auto
+/**
+* @testcase                    ITc_recorder_foreach_supported_file_format_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Audio recorder\n
+*                                              Retrieves all supported file formats by invoking a specific callback for each supported file format
+* @description                 to Retrieve all supported file formats by invoking a specific callback for each supported file format
+* @apicovered                  recorder_foreach_supported_file_format
+* @passcase                            If it Retrieves all supported file formats by invoking a specific callback for each supported file format successfully
+* @failcase                    If recorder_foreach_supported_file_format fails
+* @precondition                        NA
+* @postcondition               recorder_supported_file_format_cb() will be invoked
+*/
+int ITc_recorder_foreach_supported_file_format_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszEffMemLog = NULL;
+       char *pszEffSpeedLog = NULL;
+       int nEffFailCount = 0;
+       int nFailCount = 0;
+       recorder_file_format_e format;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszEffMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszEffSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               
+               g_bRecorderSupportedFileFormatCallback = false;
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_foreach_supported_file_format(g_pstRecorder, RecorderSupportedFileFormatCallback, &format);
+               RecorderExecutionDelay(pszEffSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_foreach_supported_file_format failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nEffFailCount++;
+                       continue;
+               }
+               
+               RecorderWaitForAsync();
+
+               if ( !g_bRecorderSupportedFileFormatCallback )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_foreach_supported_file_format_cb failed on iteration = %d, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount ++;
+               }
+
+               RecorderGetMemStatus(pszEffMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nEffFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][%s] recorder_foreach_supported_file_format failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nEffFailCount, MAX_COUNT);
+               FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_foreach_supported_file_format, pszEffSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_foreach_supported_file_format, pszEffMemLog);
+#endif
+
+       FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Retrieves all supported audio encoders by invoking a specific callback for each supported audio encoder
+//& type: auto
+/**
+* @testcase                    ITc_recorder_foreach_supported_audio_encoder_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Audio recorder\n
+*                                              Retrieves all supported audio encoders by invoking a specific callback for each supported audio encoder
+* @description                 to Retrieve all supported audio encoders by invoking a specific callback for each supported audio encoder.
+* @apicovered                  recorder_foreach_supported_audio_encoder
+* @passcase                            If it Retrieves all supported audio encoders by invoking a specific callback for each supported audio encoder.
+* @failcase                    If recorder_foreach_supported_audio_encoder fails
+* @precondition                        NA
+* @postcondition               recorder_supported_audio_encoder_cb() will be invoked.
+*/
+int ITc_recorder_foreach_supported_audio_encoder_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszEffMemLog = NULL;
+       char *pszEffSpeedLog = NULL;
+       int nEffFailCount = 0;
+       int nFailCount = 0;
+       recorder_audio_codec_e codec;
+
+       if ( CreateAudioRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_audiorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_audiorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszEffMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszEffSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               
+               g_bRecorderSupportedAudioEncoderCallback = false;
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_foreach_supported_audio_encoder(g_pstRecorder, RecorderSupportedAudioEncoderCallback, &codec);
+               RecorderExecutionDelay(pszEffSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_foreach_supported_audio_encoder failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nEffFailCount++;
+                       continue;
+               }
+               
+               RecorderWaitForAsync();
+
+               if ( !g_bRecorderSupportedAudioEncoderCallback )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_foreach_supported_audio_encoder_cb failed on iteration = %d, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount ++;
+               }
+               
+               RecorderGetMemStatus(pszEffMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       if ( nEffFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][%s] recorder_foreach_supported_audio_encoder failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nEffFailCount, MAX_COUNT);
+               FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_foreach_supported_audio_encoder, pszEffSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_foreach_supported_audio_encoder, pszEffMemLog);
+#endif
+
+       FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Retrieves all supported video encoders by invoking a specific callback for each supported video encoder
+//& type: auto
+/**
+* @testcase                    ITc_recorder_foreach_supported_video_encoder_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Video recorder\n
+*                                              Retrieves all supported video encoders by invoking a specific callback for each supported video encoder
+* @description                 to Retrieves all supported video encoders by invoking a specific callback for each supported video encoder
+* @apicovered                  recorder_foreach_supported_video_encoder
+* @passcase                            If it Retrieves all supported video encoders by invoking a specific callback for each supported video encoder
+* @failcase                    If recorder_foreach_supported_video_encoder fails
+* @precondition                        NA
+* @postcondition               recorder_supported_video_encoder_cb() will be invoked.
+*/
+int ITc_recorder_foreach_supported_video_encoder_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszEffMemLog = NULL;
+       char *pszEffSpeedLog = NULL;
+       recorder_video_codec_e codec = -1;
+       int nEffFailCount = 0;
+       int nFailCount = 0;
+
+       if ( CreateVideoRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_videorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_videorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszEffMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszEffSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+               
+               g_bRecorderSupportedVideoEncoderCallback = false;
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_foreach_supported_video_encoder(g_pstRecorder, RecorderSupportedVideoEncoderCallback, &codec);
+               RecorderExecutionDelay(pszEffSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_foreach_supported_video_encoder failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nEffFailCount++;
+                       continue;
+               }
+               
+               RecorderWaitForAsync();
+
+               if ( !g_bRecorderSupportedVideoEncoderCallback )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_foreach_supported_video_encoder_cb failed on iteration = %d, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount ++;
+               }
+               
+               RecorderGetMemStatus(pszEffMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       nRet = camera_destroy(g_pstCamera);
+       if ( nRet != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] camera_destroy failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( nEffFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][%s] recorder_foreach_supported_video_encoder failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nEffFailCount, MAX_COUNT);
+               FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_foreach_supported_video_encoder, pszEffSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_foreach_supported_video_encoder, pszEffMemLog);
+#endif
+
+       FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Retrieves all supported video resolutions by invoking callback function once for each supported video resolution
+//& type: auto
+/**
+* @testcase                    ITc_recorder_foreach_supported_video_resolution_p
+* @since_tizen                         2.3.1
+* @type                                auto
+* @scenario                            Create Video recorder\n
+*                                              Retrieves all supported video resolutions by invoking callback function once for each supported video resolution
+* @description                 to Retrieve all supported video resolutions by invoking callback function once for each supported video resolution
+* @apicovered                  recorder_foreach_supported_video_resolution
+* @passcase                            If it Retrieves all supported video resolutions by invoking callback function once for each supported video resolution
+* @failcase                    If recorder_foreach_supported_video_resolution fails
+* @precondition                        NA
+* @postcondition               This function invokes recorder_supported_video_resolution_cb() repeatedly to retrieve each supported video resolution.
+*/
+int ITc_recorder_foreach_supported_video_resolution_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszEffMemLog = NULL;
+       char *pszEffSpeedLog = NULL;
+       int nEffFailCount = 0;
+       int nFailCount = 0;
+
+       if ( CreateVideoRecorder() == false )
+       {
+               return 1;
+       }
+       if ( g_bFeatureNotSupported )
+       {
+               FPRINTF("[Line : %d][%s][Not supported] system_info_get_platform_bool and recorder_create_videorecorder returned Unsupported feature capability for Recorder\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( g_bMismatch )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool and recorder_create_videorecorder returned different feature for Recorder so leaving test\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+#if MEMORY_CHECK
+       pszEffMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszEffSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               RecorderGetMemAllocation();
+
+               g_bRecorderSupportedVideoResolutionCallback = false;
+               RecorderGetTimeOfDay();
+               
+               // Target API
+               nRet = recorder_foreach_supported_video_resolution(g_pstRecorder, RecorderSupportedVideoResolutionCallback, NULL);
+               RecorderExecutionDelay(pszEffSpeedLog);
+               if ( nRet != RECORDER_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_foreach_supported_video_resolution failed on iteration %d, error returned = %s\\n", __LINE__, API_NAMESPACE, nLoopCount, RecorderGetError(nRet));
+                       nEffFailCount++;
+                       continue;
+               }
+               
+               RecorderWaitForAsync();
+
+               if ( !g_bRecorderSupportedVideoResolutionCallback )
+               {
+                       FPRINTF("[Line : %d][%s] recorder_foreach_supported_video_resolution_cb failed on iteration = %d, error returned = callback not invoked\\n", __LINE__, API_NAMESPACE, nLoopCount);
+                       nFailCount ++;
+               }
+               
+               RecorderGetMemStatus(pszEffMemLog);
+       }
+
+       if ( DestroyRecorderHandler() == false )
+       {
+               return 1;
+       }
+
+       nRet = camera_destroy(g_pstCamera);
+       if ( nRet != CAMERA_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] camera_destroy failed\n\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( nEffFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][%s] recorder_foreach_supported_video_resolution failed %d times out of %d times\\n", __LINE__, API_NAMESPACE, nEffFailCount, MAX_COUNT);
+               FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(recorder_foreach_supported_video_resolution, pszEffSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(recorder_foreach_supported_video_resolution, pszEffMemLog);
+#endif
+
+       FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+       return 0;
+}
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/recorder/tct-recorder-native.c b/src/itc/recorder/tct-recorder-native.c
new file mode 100755 (executable)
index 0000000..9213dbb
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-recorder-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/recorder/tct-recorder-native.h b/src/itc/recorder/tct-recorder-native.h
new file mode 100755 (executable)
index 0000000..bf44a25
--- /dev/null
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_RECORDER_NATIVE_H__
+#define __TCT_RECORDER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_recorder_startup(void);
+extern void ITs_recorder_cleanup(void);
+
+extern int ITc_recorder_create_audiorecorder_p(void);
+extern int ITc_recorder_create_videorecorder_p(void);
+extern int ITc_recorder_prepare_unprepare_p(void);
+extern int ITc_recorder_start_cancel_p(void);
+extern int ITc_recorder_start_commit_p(void);
+extern int ITc_recorder_get_state_p(void);
+extern int ITc_recorder_pause_p(void);
+extern int ITc_recorder_set_get_filename_p(void);
+extern int ITc_recorder_attr_set_get_audio_channel_p(void);
+extern int ITc_recorder_attr_set_get_audio_device_p(void);
+extern int ITc_recorder_attr_set_get_audio_encoder_bitrate_p(void);
+extern int ITc_recorder_attr_set_get_audio_samplerate_p(void);
+extern int ITc_recorder_attr_set_get_orientation_tag_p(void);
+extern int ITc_recorder_attr_set_get_recording_motion_rate_p(void);
+extern int ITc_recorder_attr_set_get_size_limit_p(void);
+extern int ITc_recorder_attr_set_get_time_limit_p(void);
+extern int ITc_recorder_attr_set_get_video_encoder_bitrate_p(void);
+extern int ITc_recorder_set_get_audio_encoder_p(void);
+extern int ITc_recorder_set_get_video_encoder_p(void);
+extern int ITc_recorder_set_get_video_resolution_p(void);
+extern int ITc_recorder_set_get_file_format_p(void);
+extern int ITc_recorder_attr_mute_p(void);
+extern int ITc_recorder_get_audio_level_p(void);
+extern int ITc_recorder_set_unset_interrupted_cb_p(void);
+extern int ITc_recorder_set_unset_error_cb_p(void);
+extern int ITc_recorder_set_unset_recording_limit_reached_cb_p(void);
+extern int ITc_recorder_set_unset_recording_status_cb_p(void);
+extern int ITc_recorder_set_unset_state_changed_cb_p(void);
+extern int ITc_recorder_set_unset_audio_stream_cb_p(void);
+extern int ITc_recorder_foreach_supported_file_format_p(void);
+extern int ITc_recorder_foreach_supported_audio_encoder_p(void);
+extern int ITc_recorder_foreach_supported_video_encoder_p(void);
+extern int ITc_recorder_foreach_supported_video_resolution_p(void);
+
+testcase tc_array[] = {
+    {"ITc_recorder_create_audiorecorder_p", ITc_recorder_create_audiorecorder_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_create_videorecorder_p", ITc_recorder_create_videorecorder_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_prepare_unprepare_p", ITc_recorder_prepare_unprepare_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_start_cancel_p", ITc_recorder_start_cancel_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_start_commit_p", ITc_recorder_start_commit_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_get_state_p", ITc_recorder_get_state_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_pause_p", ITc_recorder_pause_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_set_get_filename_p", ITc_recorder_set_get_filename_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_attr_set_get_audio_channel_p", ITc_recorder_attr_set_get_audio_channel_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_attr_set_get_audio_device_p", ITc_recorder_attr_set_get_audio_device_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_attr_set_get_audio_encoder_bitrate_p", ITc_recorder_attr_set_get_audio_encoder_bitrate_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_attr_set_get_audio_samplerate_p", ITc_recorder_attr_set_get_audio_samplerate_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_attr_set_get_orientation_tag_p", ITc_recorder_attr_set_get_orientation_tag_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_attr_set_get_recording_motion_rate_p", ITc_recorder_attr_set_get_recording_motion_rate_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_attr_set_get_size_limit_p", ITc_recorder_attr_set_get_size_limit_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_attr_set_get_time_limit_p", ITc_recorder_attr_set_get_time_limit_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_attr_set_get_video_encoder_bitrate_p", ITc_recorder_attr_set_get_video_encoder_bitrate_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_set_get_audio_encoder_p", ITc_recorder_set_get_audio_encoder_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_set_get_video_encoder_p", ITc_recorder_set_get_video_encoder_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_set_get_video_resolution_p", ITc_recorder_set_get_video_resolution_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_set_get_file_format_p", ITc_recorder_set_get_file_format_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_attr_mute_p", ITc_recorder_attr_mute_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_get_audio_level_p", ITc_recorder_get_audio_level_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_set_unset_interrupted_cb_p", ITc_recorder_set_unset_interrupted_cb_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_set_unset_error_cb_p", ITc_recorder_set_unset_error_cb_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_set_unset_recording_limit_reached_cb_p", ITc_recorder_set_unset_recording_limit_reached_cb_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_set_unset_recording_status_cb_p", ITc_recorder_set_unset_recording_status_cb_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_set_unset_state_changed_cb_p", ITc_recorder_set_unset_state_changed_cb_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_set_unset_audio_stream_cb_p", ITc_recorder_set_unset_audio_stream_cb_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_foreach_supported_file_format_p", ITc_recorder_foreach_supported_file_format_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_foreach_supported_audio_encoder_p", ITc_recorder_foreach_supported_audio_encoder_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_foreach_supported_video_encoder_p", ITc_recorder_foreach_supported_video_encoder_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {"ITc_recorder_foreach_supported_video_resolution_p", ITc_recorder_foreach_supported_video_resolution_p, ITs_recorder_startup, ITs_recorder_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_RECORDER_NATIVE_H__
diff --git a/src/itc/runtime-info/CMakeLists.txt b/src/itc/runtime-info/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..0c138d1
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "runtime-info")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-system-runtime-info")
+SET(TC_SOURCES
+       ITs-runtime-info-common.c
+       ITs-runtime-info.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-appfw-application
+       capi-system-info
+       glib-2.0
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/runtime-info/ITs-runtime-info-common.c b/src/itc/runtime-info/ITs-runtime-info-common.c
new file mode 100755 (executable)
index 0000000..73b7e6e
--- /dev/null
@@ -0,0 +1,274 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-runtime-info-common.h"
+
+/** @addtogroup itc-runtime-info
+*  @ingroup itc
+*  @{
+*/
+
+struct timeval g_stRuntime_InfoTime;
+struct mallinfo g_stRuntime_InfoMemInfo;
+
+
+/**
+ * @function           Runtime_InfoGetDataPath
+ * @description                Returns the application data path
+ * @parameter          pAppDataPath: application data path
+ * @return                     true if succeed else false
+ */
+bool Runtime_InfoGetDataPath(char* pAppDataPath)
+{
+       if ( NULL == pAppDataPath )
+       {
+               FPRINTF( "[Line : %d][Runtime_Info_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if ( NULL == pPath )
+       {
+               FPRINTF( "[Line : %d][Runtime_Info_ITc] Unable to get application data path; app_get_data_path returned null value \\n", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF( "[Line : %d][Runtime_Info_ITc] application data path returned = %s\\n", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+/**
+ * @function           Runtime_InfoAppendToAppDataPath
+ * @description                Appends the input string to application data path
+ * @parameter          pInputPath: path to append to data path; pFinalPath: final resultant path
+ * @return                     true if succeed else false
+ */
+bool Runtime_InfoAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if( (NULL == pInputPath) || (NULL == pFinalPath) )
+       {
+               FPRINTF( "[Line : %d][Runtime_Info_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if(false == Runtime_InfoGetDataPath(pAppDataPath))
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+       
+       FPRINTF( "[Line : %d][Runtime_Info_ITc] result path returned = %s\\n", __LINE__, pFinalPath);
+
+       return true;
+}
+
+/**
+ * @function           Runtime_InfoGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Runtime_InfoGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+       case RUNTIME_INFO_ERROR_NONE:                                   szErrorVal = "RUNTIME_INFO_ERROR_NONE";                                         break;
+       case RUNTIME_INFO_ERROR_INVALID_PARAMETER:              szErrorVal = "RUNTIME_INFO_ERROR_INVALID_PARAMETER";            break;
+       case RUNTIME_INFO_ERROR_OUT_OF_MEMORY:                  szErrorVal = "RUNTIME_INFO_ERROR_OUT_OF_MEMORY";                        break;
+       case RUNTIME_INFO_ERROR_IO_ERROR:                               szErrorVal = "RUNTIME_INFO_ERROR_IO_ERROR";                                     break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                           break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           Runtime_GetKeyString
+ * @description                Maps key type enums to string values
+ * @parameter          nRet : key type code returned
+ * @return                     key type string
+ */
+char* Runtime_GetKeyString(int nRet)
+{
+       char *szVal = NULL;
+       switch(nRet)
+       {
+               case RUNTIME_INFO_KEY_FLIGHT_MODE_ENABLED  : szVal = "RUNTIME_INFO_KEY_FLIGHT_MODE_ENABLED" ; break; 
+               case RUNTIME_INFO_KEY_WIFI_STATUS : szVal = "RUNTIME_INFO_KEY_WIFI_STATUS" ; break; 
+               case RUNTIME_INFO_KEY_BLUETOOTH_ENABLED : szVal = "RUNTIME_INFO_KEY_BLUETOOTH_ENABLED" ; break; 
+               case RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED : szVal = "RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED" ; break;
+               case RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED : szVal = "RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED" ; break;
+               case RUNTIME_INFO_KEY_USB_TETHERING_ENABLED : szVal = "RUNTIME_INFO_KEY_USB_TETHERING_ENABLED" ; break;
+               case RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED : szVal = "RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED" ; break;
+               case RUNTIME_INFO_KEY_LOCATION_ADVANCED_GPS_ENABLED : szVal = "RUNTIME_INFO_KEY_LOCATION_ADVANCED_GPS_ENABLED" ; break;
+               case RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED : szVal = "RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED" ; break;
+               case RUNTIME_INFO_KEY_PACKET_DATA_ENABLED : szVal = "RUNTIME_INFO_KEY_PACKET_DATA_ENABLED" ; break;
+               case RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED : szVal = "RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED" ; break;
+               case RUNTIME_INFO_KEY_SILENT_MODE_ENABLED : szVal = "RUNTIME_INFO_KEY_SILENT_MODE_ENABLED" ; break;
+               case RUNTIME_INFO_KEY_VIBRATION_ENABLED : szVal = "RUNTIME_INFO_KEY_VIBRATION_ENABLED" ; break;
+               case RUNTIME_INFO_KEY_24HOUR_CLOCK_FORMAT_ENABLED : szVal = "RUNTIME_INFO_KEY_24HOUR_CLOCK_FORMAT_ENABLED" ; break;
+               case RUNTIME_INFO_KEY_FIRST_DAY_OF_WEEK : szVal = "RUNTIME_INFO_KEY_FIRST_DAY_OF_WEEK" ; break;
+               case RUNTIME_INFO_KEY_LANGUAGE : szVal = "RUNTIME_INFO_KEY_LANGUAGE" ; break;
+               case RUNTIME_INFO_KEY_REGION : szVal = "RUNTIME_INFO_KEY_REGION" ; break;
+               case RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED : szVal = "RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED" ; break;
+               case RUNTIME_INFO_KEY_GPS_STATUS : szVal = "RUNTIME_INFO_KEY_GPS_STATUS" ; break;
+               case RUNTIME_INFO_KEY_BATTERY_IS_CHARGING : szVal = "RUNTIME_INFO_KEY_BATTERY_IS_CHARGING" ; break;
+               case RUNTIME_INFO_KEY_TV_OUT_CONNECTED : szVal = "RUNTIME_INFO_KEY_TV_OUT_CONNECTED" ; break;
+               case RUNTIME_INFO_KEY_AUDIO_JACK_STATUS : szVal = "RUNTIME_INFO_KEY_AUDIO_JACK_STATUS" ; break;
+               case RUNTIME_INFO_KEY_SLIDING_KEYBOARD_OPENED : szVal = "RUNTIME_INFO_KEY_SLIDING_KEYBOARD_OPENED" ; break;
+               case RUNTIME_INFO_KEY_USB_CONNECTED : szVal = "RUNTIME_INFO_KEY_USB_CONNECTED" ; break;
+               case RUNTIME_INFO_KEY_CHARGER_CONNECTED : szVal = "RUNTIME_INFO_KEY_CHARGER_CONNECTED" ; break;
+               case RUNTIME_INFO_KEY_VIBRATION_LEVEL_HAPTIC_FEEDBACK : szVal = "RUNTIME_INFO_KEY_VIBRATION_LEVEL_HAPTIC_FEEDBACK" ; break;
+               case RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED : szVal = "RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED" ; break;
+               default : szVal = "Undefined key type" ; break;
+       }
+       return szVal;
+}
+
+/**
+* @function                    Runtime_InfoGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void Runtime_InfoGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stRuntime_InfoMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stRuntime_InfoMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stRuntime_InfoMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    Runtime_InfoGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void Runtime_InfoGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stRuntime_InfoMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           Runtime_InfoExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void Runtime_InfoExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stRuntime_InfoTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stRuntime_InfoTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           Runtime_InfoGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stRuntime_InfoTime
+ * @parameter          NA
+ * @return                     NA
+ *
+ */ 
+void Runtime_InfoGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stRuntime_InfoTime, NULL);
+#endif
+}
+
+/**
+ * @function           runtime_info_CheckSystemInfoFeatureSupported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return             true if supported else false
+ */
+bool Runtime_info_CheckSystemInfoFeatureSupported(char* pszKey)
+{
+       if(NULL == pszKey)
+       {
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc] Null key value passed to function : runtime_info_CheckSystemInfoFeatureSupported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc] system_info_get_platform_bool returned (error = %d) for (key = %s)",__LINE__, nRetVal, pszKey);
+               return false;
+       }
+
+       if(false == bValue)
+       {
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc] system_info_get_platform_bool returned Supported status feature for (key = %s)",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/runtime-info/ITs-runtime-info-common.h b/src/itc/runtime-info/ITs-runtime-info-common.h
new file mode 100755 (executable)
index 0000000..a75fc38
--- /dev/null
@@ -0,0 +1,102 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_RUNTIME_INFO_COMMON_H_
+#define _ITS_RUNTIME_INFO_COMMON_H_
+
+#include "assert.h"
+#include "runtime_info.h"
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <app.h>
+#include <system_info.h>
+
+/** @addtogroup itc-runtime-info
+*  @ingroup itc
+*  @{
+*/
+
+#define TIMELOG                                                256
+#define MEMLOG                                         256
+#define WAIT_CALLBACK                          5
+#define MICROSECONDS_PER_SECOND                1000000
+#define LOG                                                    100
+#define PATH_LEN                                       1024
+
+FILE *g_fpLog;
+
+//Add helper function declarations here
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][Runtime_Info_ITc]Starting test : %s\n", __LINE__,__FUNCTION__);\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]%s passed\n", __LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]%s failed, error returned = %s \n", __LINE__, API, Runtime_InfoGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]%s_MemoryLeakStatus - %s\n", __LINE__, #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]%s_TimeInMicrosec- %s\n", __LINE__, #api, speedLog);\
+       }
+
+       
+char* Runtime_InfoGetError(int nRet);
+char* Runtime_GetKeyString(int nRet);
+void Runtime_InfoGetMemAllocation();
+void Runtime_InfoExecutionDelay(char* pszAPITime);
+void Runtime_InfoGetTimeOfDay();
+void Runtime_InfoGetMemStatus(char *pszAPIMemory);
+
+
+bool Runtime_InfoGetDataPath(char* pPath); // this function outputs tha application data path
+bool Runtime_InfoAppendToAppDataPath(char* pInputPath, char* pFinalPath); // this function appends the input string to app data path and outputs the final resultant path
+bool Runtime_info_CheckSystemInfoFeatureSupported(char* pszKey);
+
+/** @} */
+
+#endif  //_ITS_RUNTIME_INFO_COMMON_H_
diff --git a/src/itc/runtime-info/ITs-runtime-info.c b/src/itc/runtime-info/ITs-runtime-info.c
new file mode 100755 (executable)
index 0000000..37ae6a2
--- /dev/null
@@ -0,0 +1,437 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-runtime-info-common.h"
+
+/** @addtogroup itc-runtime-info
+*  @ingroup itc
+*  @{
+*/
+
+//& set: runtime-info
+
+/**
+* @function            ITs_runtime_info_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_runtime_info_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       return;
+}
+
+/**
+* @function            ITs_runtime_info_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_runtime_info_cleanup(void)
+{
+       return;
+}
+
+/**
+* @function            runtime_info_changed_callback
+* @description                 Callback function for any runtime-info event
+* @parameter[IN]       runtime_info_e
+*                      [IN]    void *user_data
+* @return                      NA
+*/ 
+void runtime_info_changed_callback(runtime_info_key_e key, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_changed_callback invoked, runtime-info key = %d", __LINE__, key);
+}
+
+/** @addtogroup itc-runtime-info-testcases
+*  @brief              Integration testcases for module runtime-info
+*  @ingroup    itc-runtime-info
+*  @{
+*/
+
+//& type: auto
+//& purpose: Gets bool value for any runtime-info key
+/**
+* @testcase                    ITc_runtime_info_get_value_bool_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets bool value for any runtime-info key
+* @scenario                            Gets bool value for a runtime-info key
+* @apicovered                  runtime_info_get_value_bool
+* @passcase                            When runtime_info_get_value_bool is successful and return valid data
+* @failcase                            If target API fails or return invalid value.
+* @precondition                        audio jack should be connected;Silent mode and auto rotation should be enabled. 
+* @postcondition               NA
+*/
+int ITc_runtime_info_get_value_bool_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       int nAPIFailCount = 0;
+       int nInvalidDataFailCount = 0;
+
+       runtime_info_key_e key_type[] = {RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED};
+
+       char* pKey = "http://tizen.org/feature/screen.auto_rotation";
+       bool bFeatureAutoRotationEnabled = Runtime_info_CheckSystemInfoFeatureSupported(pKey);
+
+       int enum_size = sizeof(key_type) / sizeof(key_type[0]);
+       int enum_counter = 0;
+
+       char szRuntimeInfoMemLog[MEMLOG * MAX_COUNT * enum_size];
+       char szRuntimeInfoSpeedLog[TIMELOG * MAX_COUNT * enum_size];
+       
+       memset(szRuntimeInfoMemLog, 0, MEMLOG * MAX_COUNT * enum_size);
+       memset(szRuntimeInfoSpeedLog, 0, TIMELOG * MAX_COUNT * enum_size);
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       bool bValue = false;
+                       runtime_info_key_e key = key_type[enum_counter];
+
+                       if(key == RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED)
+                       {
+                               if(bFeatureAutoRotationEnabled == false)
+                               {
+                                       FPRINTF("\\n[Line : %d][Runtime_Info_ITc]RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED is not supported.", __LINE__);
+                                       continue;
+                               }
+                       }
+
+                       //Target API
+                       Runtime_InfoGetMemAllocation();
+
+                       Runtime_InfoGetTimeOfDay();
+                       int nRetVal = runtime_info_get_value_bool(key, &bValue);
+                       Runtime_InfoExecutionDelay(szRuntimeInfoSpeedLog);
+
+                       Runtime_InfoGetMemStatus(szRuntimeInfoMemLog);
+
+                       if (nRetVal != RUNTIME_INFO_ERROR_NONE && nRetVal != RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_get_value_bool failed on iteration %d for key_type value = %s, error returned = %s ", __LINE__, nLoopCount, Runtime_GetKeyString(key_type[enum_counter]), Runtime_InfoGetError(nRetVal));
+                               nAPIFailCount++;
+                               continue;
+                       }
+
+                       if(true != bValue)
+                       {
+                               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_get_value_bool returned incorrect data; expected value = true, returned value = false on iteration %d for key_type value = %s", __LINE__, nLoopCount, Runtime_GetKeyString(key_type[enum_counter]));
+                               nInvalidDataFailCount++;
+                               continue;
+                       }
+
+                       FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_get_value_bool output value = true on iteration %d for key_type value = %s", __LINE__, nLoopCount, Runtime_GetKeyString(key_type[enum_counter]));
+               }
+       }
+       
+       if ( nAPIFailCount > 0 || nInvalidDataFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_get_value_bool failed %d times, Invalid Data returned = %d times out of %d times", __LINE__, nAPIFailCount, nInvalidDataFailCount, MAX_COUNT*enum_size);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(runtime_info_get_value_bool, szRuntimeInfoSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(runtime_info_get_value_bool, szRuntimeInfoMemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+//& type: auto
+//& purpose: Gets string value for any runtime-info key
+/**
+* @testcase                            ITc_runtime_info_get_value_string_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets int value for any runtime-info key
+* @scenario                            Gets int value for a runtime-info key
+* @apicovered                  runtime_info_get_value_int
+* @passcase                            When runtime_info_get_value_int is successful and return valid data
+* @failcase                            If target API fails or return invalid value
+* @precondition                        Audio jack should be connected
+* @postcondition               NA
+*/
+int ITc_runtime_info_get_value_string_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       int nAPIFailCount = 0;
+       int nInvalidDataFailCount = 0;
+
+       runtime_info_key_e key_type[] = { RUNTIME_INFO_KEY_LANGUAGE,
+                                                                       RUNTIME_INFO_KEY_REGION};
+
+       int enum_size = sizeof(key_type) / sizeof(key_type[0]);
+       int enum_counter = 0;
+
+       char szRuntimeInfoMemLog[MEMLOG * MAX_COUNT * enum_size];
+       char szRuntimeInfoSpeedLog[TIMELOG * MAX_COUNT * enum_size];
+       
+       memset(szRuntimeInfoMemLog, 0, MEMLOG * MAX_COUNT * enum_size);
+       memset(szRuntimeInfoSpeedLog, 0, TIMELOG * MAX_COUNT * enum_size);
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       char* pStr = NULL;
+                       runtime_info_key_e key = key_type[enum_counter];
+
+                       //Target API
+                       Runtime_InfoGetMemAllocation();
+
+                       Runtime_InfoGetTimeOfDay();
+                       int nRetVal = runtime_info_get_value_string(key, &pStr);
+                       Runtime_InfoExecutionDelay(szRuntimeInfoSpeedLog);
+
+                       Runtime_InfoGetMemStatus(szRuntimeInfoMemLog);
+
+                       if (nRetVal != RUNTIME_INFO_ERROR_NONE && nRetVal != RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_get_value_string failed on iteration %d for key_type value = %s, error returned = %s ", __LINE__, nLoopCount, Runtime_GetKeyString(key_type[enum_counter]), Runtime_InfoGetError(nRetVal));
+                               nAPIFailCount++;
+                               continue;
+                       }
+
+                       if(NULL == pStr)
+                       {
+                               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_get_value_string returned NULL data on iteration %d for key_type value = %s", __LINE__, nLoopCount, Runtime_GetKeyString(key_type[enum_counter]));
+                               nInvalidDataFailCount++;
+                               continue;
+                       }
+
+                       FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_get_value_string output value = %s on iteration %d for key_type value = %s", __LINE__, pStr, nLoopCount, Runtime_GetKeyString(key_type[enum_counter]));
+
+                       free(pStr);
+               }
+       }
+       
+       if ( nAPIFailCount > 0 || nInvalidDataFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_get_value_string failed %d times, NULL Data returned = %d times out of %d times", __LINE__, nAPIFailCount, nInvalidDataFailCount, MAX_COUNT*enum_size);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(runtime_info_get_value_string, szRuntimeInfoSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(runtime_info_get_value_string, szRuntimeInfoMemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+//& type: auto
+//& purpose: Gets int value for any runtime-info key
+/**
+* @testcase                    ITc_runtime_info_set_unset_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Sets and unsets changed callback for runtime-info key
+* @scenario                            Sets changed callback for runtime-info key
+*                                              Unsets changed callback for runtime-info key
+* @apicovered                  runtime_info_unset_changed_cb, runtime_info_set_changed_cb
+* @passcase                            When runtime_info_unset_changed_cb and runtime_info_set_changed_cb are successful
+* @failcase                            If target API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_runtime_info_get_value_int_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       int nAPIFailCount = 0;
+       int nInvalidDataFailCount = 0;
+       
+       runtime_info_key_e key_type[] = {RUNTIME_INFO_KEY_WIFI_STATUS};
+
+       char* pKey = "http://tizen.org/feature/network.wifi";
+       bool bFeatureAudioWifiEnabled = Runtime_info_CheckSystemInfoFeatureSupported(pKey);
+
+       int enum_size = sizeof(key_type) / sizeof(key_type[0]);
+       int enum_counter = 0;
+
+       char szRuntimeInfoMemLog[MEMLOG * MAX_COUNT * enum_size];
+       char szRuntimeInfoSpeedLog[TIMELOG * MAX_COUNT * enum_size];
+       
+       memset(szRuntimeInfoMemLog, 0, MEMLOG * MAX_COUNT * enum_size);
+       memset(szRuntimeInfoSpeedLog, 0, TIMELOG * MAX_COUNT * enum_size);
+       
+       for(enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       int nValue = -1;
+                       runtime_info_key_e key = key_type[enum_counter];
+
+                       if(key == RUNTIME_INFO_KEY_WIFI_STATUS)
+                       {
+                               if(bFeatureAudioWifiEnabled == false)
+                               {
+                                       FPRINTF("\\n[Line : %d][Runtime_Info_ITc]RUNTIME_INFO_KEY_AUDIO_WIFI_STATUS is not supported.", __LINE__);
+                                       continue;
+                               }
+                       }
+
+                       //Target API
+                       Runtime_InfoGetMemAllocation();
+
+                       Runtime_InfoGetTimeOfDay();
+                       int nRetVal = runtime_info_get_value_int(key, &nValue);
+                       Runtime_InfoExecutionDelay(szRuntimeInfoSpeedLog);
+
+                       Runtime_InfoGetMemStatus(szRuntimeInfoMemLog);
+
+                       if (nRetVal != RUNTIME_INFO_ERROR_NONE && nRetVal != RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+                       {
+                               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_get_value_int failed on iteration %d for key_type value = %s, error returned = %s ", __LINE__, nLoopCount, Runtime_GetKeyString(key_type[enum_counter]), Runtime_InfoGetError(nRetVal));
+                               nAPIFailCount++;
+                               continue;
+                       }
+
+                       FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_get_value_int output value = %d on iteration %d for key_type value = %s", __LINE__, nValue, nLoopCount, Runtime_GetKeyString(key_type[enum_counter]));
+               }
+       }
+       
+       if ( nAPIFailCount > 0 || nInvalidDataFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_get_value_int failed %d times, Invalid Data returned = %d times out of %d times", __LINE__, nAPIFailCount, nInvalidDataFailCount, MAX_COUNT*enum_size);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(runtime_info_get_value_int, szRuntimeInfoSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(runtime_info_get_value_int, szRuntimeInfoMemLog);
+#endif
+               return 0;
+       }
+}
+
+
+
+//& type: auto
+//& purpose: Sets and unsets changed callback for runtime-info key
+/**
+* @testcase                            ITc_runtime_info_set_unset_changed_cb_p
+* @since_tizen                 2.3
+* @type                                        auto
+* @description                         Sets and unsets changed callback for runtime-info key
+* @scenario                            Set changed callback for runtime-info key\n
+*                                                      Unset changed callback for runtime-info key
+* @apicovered                          runtime_info_unset_changed_cb, runtime_info_set_changed_cb                                              
+* @passcase                            When runtime_info_unset_changed_cb and  runtime_info_set_changed_cb are successfull.
+* @failcase                            If target api fails.
+* @precondition                        none
+* @postcondition                       none
+*/
+int ITc_runtime_info_set_unset_changed_cb_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char szRuntimeInfoSetUnsetMemLog[MEMLOG * MAX_COUNT];
+       char szRuntimeInfoSetSpeedLog[TIMELOG * MAX_COUNT];
+       char szRuntimeInfoUnsetSpeedLog[TIMELOG * MAX_COUNT];
+
+       memset(szRuntimeInfoSetUnsetMemLog, 0, MEMLOG * MAX_COUNT);
+       memset(szRuntimeInfoSetSpeedLog, 0, TIMELOG * MAX_COUNT);
+       memset(szRuntimeInfoUnsetSpeedLog, 0, TIMELOG * MAX_COUNT);
+
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+       runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_STATUS;
+       
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               //Target API
+               Runtime_InfoGetMemAllocation();
+               
+               Runtime_InfoGetTimeOfDay();
+               int nRetVal = runtime_info_set_changed_cb(key, runtime_info_changed_callback, NULL);
+               Runtime_InfoExecutionDelay(szRuntimeInfoSetSpeedLog);
+               
+               if(nRetVal != RUNTIME_INFO_ERROR_NONE && nRetVal != RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_set_changed_cb failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, Runtime_InfoGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               // Give some sleep between set and unset
+               usleep(2000);
+               
+               Runtime_InfoGetTimeOfDay();
+               nRetVal = runtime_info_unset_changed_cb(key);
+               Runtime_InfoExecutionDelay(szRuntimeInfoUnsetSpeedLog);
+               
+               Runtime_InfoGetMemStatus(szRuntimeInfoSetUnsetMemLog);
+               
+               if (nRetVal != RUNTIME_INFO_ERROR_NONE && nRetVal != RUNTIME_INFO_ERROR_NOT_SUPPORTED)
+               {
+                       FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_unset_changed_cb failed on iteration %d, error returned = %s ", __LINE__, nLoopCount, Runtime_InfoGetError(nRetVal));
+                       nUnsetFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][Runtime_Info_ITc]runtime_info_set_changed_cb failed %d times, runtime_info_unset_changed_cb failed %d times out of %d times", __LINE__, nSetFailCount, nUnsetFailCount, MAX_COUNT);
+               return 1;
+       }
+       else
+       {
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(runtime_info_set_changed_cb, szRuntimeInfoSetSpeedLog);
+               PRINT_SPEED_LOG(runtime_info_unset_changed_cb, szRuntimeInfoUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(runtime_info_set_unset_changed_cb, szRuntimeInfoSetUnsetMemLog);
+#endif
+               return 0;
+       }
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/runtime-info/tct-runtime-info-native.c b/src/itc/runtime-info/tct-runtime-info-native.c
new file mode 100755 (executable)
index 0000000..97cb2a0
--- /dev/null
@@ -0,0 +1,134 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-runtime-info-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/runtime-info/tct-runtime-info-native.h b/src/itc/runtime-info/tct-runtime-info-native.h
new file mode 100755 (executable)
index 0000000..b562cce
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_RUNTIME_INFO_NATIVE_H__
+#define __TCT_RUNTIME_INFO_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_runtime_info_startup(void);
+extern void ITs_runtime_info_cleanup(void);
+
+extern int ITc_runtime_info_get_value_bool_p(void);
+extern int ITc_runtime_info_get_value_string_p(void);
+extern int ITc_runtime_info_get_value_int_p(void);
+extern int ITc_runtime_info_set_unset_changed_cb_p(void);
+
+testcase tc_array[] = {
+    {"ITc_runtime_info_get_value_bool_p", ITc_runtime_info_get_value_bool_p, ITs_runtime_info_startup, ITs_runtime_info_cleanup},
+    {"ITc_runtime_info_get_value_string_p", ITc_runtime_info_get_value_string_p, ITs_runtime_info_startup, ITs_runtime_info_cleanup},
+    {"ITc_runtime_info_get_value_int_p", ITc_runtime_info_get_value_int_p, ITs_runtime_info_startup, ITs_runtime_info_cleanup},
+    {"ITc_runtime_info_set_unset_changed_cb_p", ITc_runtime_info_set_unset_changed_cb_p, ITs_runtime_info_startup, ITs_runtime_info_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_RUNTIME_INFO_NATIVE_H__
diff --git a/src/itc/sensor/CMakeLists.txt b/src/itc/sensor/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..16860a0
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "sensor")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-system-sensor")
+SET(TC_SOURCES
+       ITs-sensor-common.c
+       ITs-sensor.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-system-info
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/sensor/ITs-sensor-common.c b/src/itc/sensor/ITs-sensor-common.c
new file mode 100755 (executable)
index 0000000..c73f0e8
--- /dev/null
@@ -0,0 +1,272 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-sensor-common.h"
+
+/** @addtogroup itc-sensor
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stSensorsStartTime;
+extern struct mallinfo g_stSensorsMemInfo;
+/**
+* @function            SensorsGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* SensorsGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case SENSOR_ERROR_NONE:                                         szErrorVal = "SENSOR_ERROR_NONE";                                               break;
+       case SENSOR_ERROR_IO_ERROR:                             szErrorVal = "SENSOR_ERROR_IO_ERROR";                                   break;
+       case SENSOR_ERROR_INVALID_PARAMETER:            szErrorVal = "SENSOR_ERROR_INVALID_PARAMETER";                  break;
+       case SENSOR_ERROR_OUT_OF_MEMORY:                        szErrorVal = "SENSOR_ERROR_OUT_OF_MEMORY";                              break;
+       case SENSOR_ERROR_NOT_NEED_CALIBRATION:         szErrorVal = "SENSOR_ERROR_NOT_NEED_CALIBRATION";               break;
+       case SENSOR_ERROR_NOT_SUPPORTED:                        szErrorVal = "SENSOR_ERROR_NOT_SUPPORTED";                              break;
+       case SENSOR_ERROR_OPERATION_FAILED:             szErrorVal = "SENSOR_ERROR_OPERATION_FAILED";                   break;
+       case SENSOR_ERROR_PERMISSION_DENIED:            szErrorVal = "SENSOR_ERROR_PERMISSION_DENIED";                  break;
+       default :                                                                       szErrorVal = "Unknown error";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           SensorType
+ * @description                Maps error enums 
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* SensorType(sensor_type_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+               case SENSOR_ACCELEROMETER: szErrorVal = "SENSOR_ACCELEROMETER"; break; 
+               case SENSOR_GRAVITY: szErrorVal = "SENSOR_GRAVITY"; break; 
+               case SENSOR_LINEAR_ACCELERATION: szErrorVal = "SENSOR_LINEAR_ACCELERATION"; break; 
+               case SENSOR_MAGNETIC: szErrorVal = "SENSOR_MAGNETIC"; break; 
+               case SENSOR_ROTATION_VECTOR: szErrorVal = "SENSOR_ROTATION_VECTOR"; break; 
+               case SENSOR_ORIENTATION: szErrorVal = "SENSOR_ORIENTATION"; break; 
+               case SENSOR_GYROSCOPE: szErrorVal = "SENSOR_GYROSCOPE"; break; 
+               case SENSOR_LIGHT: szErrorVal = "SENSOR_LIGHT"; break; 
+               case SENSOR_PROXIMITY: szErrorVal = "SENSOR_PROXIMITY"; break; 
+               case SENSOR_PRESSURE: szErrorVal = "SENSOR_PRESSURE"; break; 
+               case SENSOR_ULTRAVIOLET: szErrorVal = "SENSOR_ULTRAVIOLET"; break; 
+               case SENSOR_TEMPERATURE: szErrorVal = "SENSOR_TEMPERATURE"; break; 
+               case SENSOR_HUMIDITY: szErrorVal = "SENSOR_HUMIDITY"; break; 
+               case SENSOR_LAST: szErrorVal = "SENSOR_LAST"; break; 
+               case SENSOR_CUSTOM: szErrorVal = "SENSOR_CUSTOM"; break;        
+               default : szErrorVal = "Unknown Error" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            SensorOption
+* @description         Maps sensor option enums 
+* @parameter           nSensorOption : sensor option
+* @return                      error string
+*/
+char* SensorOption(sensor_option_e nSensorOption)
+{
+       char *szErrorVal = NULL;
+       switch ( nSensorOption )
+       {
+       case SENSOR_OPTION_DEFAULT:                             szErrorVal = "SENSOR_OPTION_DEFAULT";                                   break;
+       case SENSOR_OPTION_ON_IN_SCREEN_OFF:            szErrorVal = "SENSOR_OPTION_ON_IN_SCREEN_OFF";                  break;
+       case SENSOR_OPTION_ON_IN_POWERSAVE_MODE:        szErrorVal = "SENSOR_OPTION_ON_IN_POWERSAVE_MODE";              break;
+       case SENSOR_OPTION_ALWAYS_ON:                           szErrorVal = "SENSOR_OPTION_ALWAYS_ON";                                 break;  
+       default :                                                                       szErrorVal = "Unknown Error";                                                   break;
+       }
+       return szErrorVal;
+}
+/**
+* @function                    SensorsGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void SensorsGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if ( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if ( stMemInfo.uordblks > g_stSensorsMemInfo.uordblks )
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stSensorsMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stSensorsMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    SensorsGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void SensorsGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stSensorsMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           SensorsExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void SensorsExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK        
+       if ( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stSensorsStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stSensorsStartTime.tv_usec;
+                       
+               sprintf(pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }               
+#endif
+}
+/**
+ * @function           SensorsFreeMemory
+ * @description                Function to free the memory allocated
+ * @parameter          pszMem1, pszMem2, pszMem3 [ pointers to allocated memory]
+ * @return                     NA
+ *
+ */ 
+void SensorsFreeMemory(char *pszMem1, char *pszMem2, char *pszMem3)
+{
+       if ( pszMem1 != NULL )
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if ( pszMem2 != NULL )
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if ( pszMem3 != NULL )
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+}
+
+/**
+ * @function           SensorsGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stSensorsStartTime
+ * @parameter          NA
+ * @return                     NA
+ *
+ */ 
+void SensorsGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stSensorsStartTime, NULL);
+#endif
+}
+
+/**
+ * @function           Sensor_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Sensor_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+               case SYSTEM_INFO_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Cannot find key in model config file " ; break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR  : szErrorVal = "Error - An input/output error occurred when read value from model config file " ; break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY   : szErrorVal = "Error - Out of memory  " ; break;
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+ * @function           Sensor_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Sensor_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] Null key value passed to function : Sensor_Check_System_Info_Feature_Supported\\n",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n",__LINE__, Sensor_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)\\n",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][sensor_ITC] system_info_get_platform_bool returned Supported status feature for (key = %s)\\n",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/sensor/ITs-sensor-common.h b/src/itc/sensor/ITs-sensor-common.h
new file mode 100755 (executable)
index 0000000..8c93e43
--- /dev/null
@@ -0,0 +1,123 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_SENSOR_COMMON_H_
+#define _ITS_SENSOR_COMMON_H_
+
+#include "assert.h"
+#include <sensor.h>
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <system_info.h>
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+/** @addtogroup itc-sensor
+*  @ingroup itc
+*  @{
+*/
+
+#define PATH_LEN                                       1024
+#define EXECUTE_MANUAL                         0
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define TIMEOUT_CB                                     2000
+#define MICROSECONDS_PER_SECOND                1000000
+
+FILE *g_fpLog;
+bool g_bSensorsCreation;
+struct timeval g_stSensorsStartTime;
+struct mallinfo g_stSensorsMemInfo;
+sensor_h g_pstSensorHandle;
+sensor_listener_h g_pstSensorListener;
+GMainLoop *g_pSensorMainLoop;
+
+typedef struct Sensor
+{
+       sensor_type_e eSensorType;
+       char szFeature[PATH_LEN];
+} SensorFeature;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][sensor_ITC] Starting test : %s\\n",__LINE__,__FUNCTION__);\
+}
+
+#define PRINT_RESULT(nRet, API) {\
+       if ( nRetVal == SENSOR_ERROR_NONE )\
+       {\
+               FPRINTF("[Line : %d][sensor_ITC] %s passed\\n",__LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][sensor_ITC] %s failed, error returned = %s \\n",__LINE__, API, SensorsGetError(nRet));\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if ( nMLogLen > 0 )\
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d][sensor_ITC] %s_MemoryLeakStatus - %s\\n",__LINE__, #api, memLog);\
+       }
+
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if ( strlen(speedLog) > 0 )\
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d][sensor_ITC] %s_TimeInMicrosec- %s\\n",__LINE__, #api, speedLog);\
+       }
+
+#define RUN_POLLING_LOOP {\
+       g_pSensorMainLoop = g_main_loop_new(NULL, false);\
+       nSensorTimeoutId = g_timeout_add(TIMEOUT_CB, SensorTimeout, g_pSensorMainLoop);\
+       g_main_loop_run(g_pSensorMainLoop);\
+       g_source_remove(nSensorTimeoutId);\
+       g_pSensorMainLoop = NULL;\
+}
+
+char* SensorOption(sensor_option_e nRet);
+char* SensorType(sensor_type_e nRet);
+char* SensorsGetError(int nRet);
+void SensorsGetMemAllocation();
+void SensorsExecutionDelay(char* pszAPITime);
+void SensorsGetTimeOfDay();
+void SensorsGetMemStatus(char *pszAPIMemory);
+void SensorsFreeMemory(char *pszMem1, char *pszMem2, char *pszMem3);
+bool Sensor_Check_System_Info_Feature_Supported(char* pszKey);
+char* Sensor_System_Info_GetError(int nRet);
+
+/** @} */
+#endif  //_ITS_SENSOR_COMMON_H_
diff --git a/src/itc/sensor/ITs-sensor.c b/src/itc/sensor/ITs-sensor.c
new file mode 100755 (executable)
index 0000000..54971ce
--- /dev/null
@@ -0,0 +1,3371 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-sensor-common.h"
+
+/** @addtogroup itc-sensor
+*  @ingroup itc
+*  @{
+*/
+
+bool g_bSensorEventCallback;
+bool g_bSensorAccuracyChangeCallback;
+
+sensor_type_e eSensorType[] = {
+       SENSOR_ACCELEROMETER,
+       SENSOR_GRAVITY,
+       SENSOR_LINEAR_ACCELERATION,
+       SENSOR_MAGNETIC,
+       SENSOR_ROTATION_VECTOR,
+       SENSOR_ORIENTATION,
+       SENSOR_GYROSCOPE,
+       SENSOR_LIGHT,
+       SENSOR_PROXIMITY,
+       SENSOR_PRESSURE,
+       SENSOR_ULTRAVIOLET,
+       SENSOR_TEMPERATURE,
+       SENSOR_HUMIDITY,
+       SENSOR_HRM,
+       SENSOR_HRM_LED_GREEN,
+       SENSOR_HRM_LED_IR,
+       SENSOR_HRM_LED_RED
+};
+
+int enum_size = sizeof(eSensorType) / sizeof(eSensorType[0]);
+int enum_counter;
+
+/**
+* @function            ITs_Sensors_startup
+* @description         Called before each test, creates Sensors 
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_sensor_listener_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       return;
+}
+
+/**
+* @function            ITs_Sensors_cleanup
+* @description         Called after each test, destroys Sensors 
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_sensor_listener_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][sensor_ITC] In Cleanup \\n",__LINE__);
+#endif
+       return;
+}
+
+/**
+* @function            SensorTimeout
+* @description         Called if some callback is not invoked for a particular SensorTimeout
+* @parameter           gpointer data
+* @return                      gboolean
+*/
+gboolean SensorTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(g_pSensorMainLoop);
+               g_main_loop_unref(g_pSensorMainLoop);
+               g_pSensorMainLoop = NULL;
+       }
+       FPRINTF("[Line : %d][sensor_ITC] Callback Time-out \\n", __LINE__);
+       return false;
+}
+
+/**
+* @function                    SensorEventCallback
+* @description         Called when sensor handle is interrupted.
+* @parameter[IN]       The sensor handle
+* @parameter[IN]       The event information
+* @parameter[IN]       The user data passed from the callback registration function                    
+* @return                      NA
+*/
+void SensorEventCallback(sensor_h g_stSensorHandle, sensor_event_s *peSensorEventCallback, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][sensor_ITC] SensorEventCallback is called \\n",__LINE__);
+#endif
+       g_bSensorEventCallback = true;
+
+       if ( g_pSensorMainLoop )
+       {
+               g_main_loop_quit(g_pSensorMainLoop);
+               g_main_loop_unref(g_pSensorMainLoop);
+               g_pSensorMainLoop = NULL;
+       }
+}
+
+/**
+* @function                    SensorAccuracyChangeCallback
+* @description         Called when sensor handle is interrupted.
+* @parameter[IN]       The sensor handle
+* @parameter[IN]       The time in milliseconds at which the event happened
+* @parameter[IN]       The accuracy of this data 
+* @parameter[IN]       The user data passed from the callback registration function                    
+* @return                      NA
+*/
+/*static void SensorAccuracyChangeCallback(sensor_h g_pstSensorHandle, unsigned long long ullTimeStamp, sensor_data_accuracy_e eSensorDataAccuracy, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][sensor_ITC] SensorAccuracyChangeCallback is called \\n",__LINE__);
+#endif
+       g_bSensorAccuracyChangeCallback = true;
+       
+       if ( g_pSensorMainLoop )
+       {
+               g_main_loop_quit(g_pSensorMainLoop);
+               g_main_loop_unref(g_pSensorMainLoop);
+               g_pSensorMainLoop = NULL;
+       }
+}*/
+
+/** @addtogroup itc-sensor-testcases
+*  @brief              Integration testcases for module sensor
+*  @ingroup    itc-sensor
+*  @{
+*/
+
+//& purpose: To check whether a given sensor type is available on a device
+//& type: auto
+/**
+* @testcase                    ITc_sensor_is_supported_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To check whether a given sensor type is available on a device
+* @scenario                            Get the sensor type\n
+*                                              Check whether it is supported in device or not
+* @apicovered                  sensor_is_supported
+* @passcase                            When sensor_is_supported is successful
+* @failcase                            If target API sensor_is_supported fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_sensor_is_supported_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_is_supported failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nFailCount++;
+                       }
+                       else if ( !bSupported )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_is_supported returned false for sensor %s\\n",__LINE__, SensorType(eSensorType[enum_counter]));
+                       }
+                       else
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_is_supported returned true for sensor %s\\n",__LINE__, SensorType(eSensorType[enum_counter]));
+#endif
+                       }
+               }
+       }       
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_is_supported failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_is_supported, pszAPI1SpeedLog);  
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_is_supported, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+
+//& purpose: To get a specific sensor handle
+//& type: auto 
+/**
+* @testcase                    ITc_sensor_get_default_sensor_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get a specific sensor handle
+* @scenario                            Get the sensor type\n
+*                                              Check whether it is supported in device or not\n
+*                                              Get the sensor handle if its supported
+* @apicovered                  sensor_get_default_sensor
+* @passcase                            When sensor_get_default_sensor is successful
+* @failcase                            If target API sensor_get_default_sensor fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_sensor_get_default_sensor_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+               {
+                       nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                               continue;
+                       }
+                       
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( bSupported )
+                       {
+                               if ( nRet != SENSOR_ERROR_NONE )
+                               {
+                                       FPRINTF("[Line : %d][sensor_ITC] sensor_get_default_sensor failed on iteration %d for supported sensor %s, error returned = %s\\n",
+                                               __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                                       nGetFailCount++;
+                               }
+                               if ( g_pstSensorHandle == NULL )
+                               {
+                                       FPRINTF("[Line : %d][sensor_ITC] sensor_get_default_sensor failed to create handle on iteration %d for sensor %s\\n",
+                                               __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]));
+                                       nGetFailCount++;
+                               }
+                       }
+                       else
+                       {
+                               if ( nRet != SENSOR_ERROR_NOT_SUPPORTED )
+                               {
+                                       FPRINTF("[Line : %d][sensor_ITC] sensor_get_default_sensor did not returned unsupported error on iteration %d for unsupported sensor %s, error returned = %s\\n",
+                                               __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                                       nGetFailCount++;
+                               }
+                       }
+               }
+       }       
+
+       if ( nGetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_get_default_sensor failed %d time out of %d times\\n",
+                       __LINE__, nGetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_get_default_sensor, pszAPI1SpeedLog);    
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_get_default_sensor, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get FIFO count of sensor
+//& type: auto
+/**
+* @testcase                    ITc_sensor_get_fifo_count_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get FIFO count of sensor
+* @scenario                            Create the sensor handle\n
+*                                              Get the FIFO count 
+* @apicovered                  sensor_get_fifo_count                           
+* @passcase                            When sensor_get_fifo_count is successful
+* @failcase                            If target API sensor_get_fifo_count fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_get_fifo_count_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       int nFifoCount = -1;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_get_fifo_count(g_pstSensorHandle, &nFifoCount);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_fifo_count failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       if ( nFifoCount < 0 )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_fifo_count returned unexpected value %d on iteration %d for sensor %s\\n",
+                                       __LINE__, nFifoCount, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nGetFailCount++;
+                       }
+               }
+       }
+       
+       if ( nGetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_get_fifo_count failed %d time out of %d times\\n",
+                       __LINE__, nGetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_get_fifo_count, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_get_fifo_count, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get maximum batch count of sensor.
+//& type: auto
+/**
+* @testcase                    ITc_sensor_get_max_batch_count_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get maximum batch count of sensor. 
+* @scenario                            Get the sensor handle\n
+*                                              Get the maximum batch count of sensor
+* @apicovered                  sensor_get_max_batch_count                      
+* @passcase                            When sensor_get_max_batch_count is successful
+* @failcase                            If target API sensor_get_max_batch_count fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_get_max_batch_count_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       int nMaxBatchCount = -1;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",      
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_get_max_batch_count(g_pstSensorHandle, &nMaxBatchCount);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_max_batch_count failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       if ( nMaxBatchCount < 0 )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_max_batch_count returned unexpected value %d on iteration %d for sensor %s\\n",
+                                       __LINE__, nMaxBatchCount, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nGetFailCount++;
+                       }
+               }
+       }
+       
+       if ( nGetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_get_max_batch_count failed %d time out of %d times\\n",
+                       __LINE__, nGetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_get_max_batch_count, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_get_max_batch_count, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get maximum range of sensor.
+//& type: auto
+/**
+* @testcase                    ITc_sensor_get_max_range_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get maximum range of sensor.
+* @scenario                            Get the sensor handle\n
+*                                              Get the maximum range
+* @apicovered                  sensor_get_max_range                            
+* @passcase                            When sensor_get_max_range is successful
+* @failcase                            If target API sensor_get_max_range fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_get_max_range_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       float fMaxRange = -1;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_get_max_range(g_pstSensorHandle, &fMaxRange);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_max_range failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       if ( fMaxRange < 0 )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_max_range returned unexpected value %f on iteration %d for sensor %s\\n",
+                                       __LINE__, fMaxRange, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nGetFailCount++;
+                       }
+               }
+       }
+       
+       if ( nGetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_get_max_range failed %d time out of %d times\\n",
+                       __LINE__, nGetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_get_max_range, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_get_max_range, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get minimum range of sensor.
+//& type: auto
+/**
+* @testcase                    ITc_sensor_get_min_range_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get minimum range of sensor.
+* @scenario                            Get the sensor handle\n
+*                                              Get minimum range of sensor. 
+* @apicovered                  sensor_get_min_range                            
+* @passcase                            When sensor_get_min_range is successful
+* @failcase                            If target API sensor_get_min_range fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_get_min_range_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       float fMinRange = -1;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_get_min_range(g_pstSensorHandle, &fMinRange);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_min_range failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nGetFailCount++;
+                               continue;
+                       }
+               }
+       }
+       
+       if ( nGetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_get_min_range failed %d time out of %d times\\n",
+                       __LINE__, nGetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_get_min_range, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_get_min_range, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get minimum interval of sensor.
+//& type: auto
+/**
+* @testcase                    ITc_sensor_get_min_interval_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get minimum interval of sensor.
+* @scenario                            Get the sensor handle\n
+*                                              Get minimum interval of sensor and check whether it is valid or not
+* @apicovered                  sensor_get_min_interval                         
+* @passcase                            When sensor_get_min_interval is successful
+* @failcase                            If target API sensor_get_min_interval fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_get_min_interval_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       int nMinInterval = -1;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_get_min_interval(g_pstSensorHandle, &nMinInterval);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_min_interval failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       if ( nMinInterval < 0 )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_min_interval returned unexpected value %d on iteration %d for sensor %s\\n",
+                                       __LINE__, nMinInterval, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nGetFailCount++;
+                       }
+               }
+       }
+       
+       if ( nGetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_get_min_interval failed %d time out of %d times\\n",
+                       __LINE__, nGetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_get_min_interval, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_get_min_interval, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get a name of sensor
+//& type: auto
+/**
+* @testcase                    ITc_sensor_get_name_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get a name of sensor
+* @scenario                            Get the sensor handle\n
+*                                              Get a name of sensor.
+* @apicovered                  sensor_get_name                         
+* @passcase                            When sensor_get_name is successful
+* @failcase                            If target API sensor_get_name fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_get_name_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       char *pszName = NULL;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_get_name(g_pstSensorHandle, &pszName);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_name failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       if ( pszName == NULL )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_name returned unexpected value %s on iteration %d for sensor %s\\n",
+                                       __LINE__, pszName, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nGetFailCount++;
+                       }
+               }
+       }
+       
+       if ( nGetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_get_name failed %d time out of %d times\\n",    
+                       __LINE__, nGetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_get_name, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_get_name, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get resolution of sensor
+//& type: auto
+/**
+* @testcase                    ITc_sensor_get_resolution_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get resolution of sensor
+* @scenario                            Get the sensor handle\n
+*                                              Get a resolution of sensor
+* @apicovered                  sensor_get_resolution                           
+* @passcase                            When sensor_get_resolution is successful
+* @failcase                            If target API sensor_get_resolution fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_get_resolution_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       float fResolution = -1;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_get_resolution(g_pstSensorHandle, &fResolution);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_resolution failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       if ( fResolution < 0 )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_resolution returned unexpected value %f on iteration %d for sensor %s\\n",
+                                       __LINE__, fResolution, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nGetFailCount++;
+                       }
+               }
+       }
+       
+       if ( nGetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_get_resolution failed %d time out of %d times\\n",
+                       __LINE__, nGetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_get_resolution, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_get_resolution, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To Get the sensor list
+//& type: auto
+/**
+* @testcase                    ITc_sensor_get_sensor_list_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To Get the sensor list
+* @scenario                            Get the sensor handle\n
+*                                              Get the sensor list
+* @apicovered                  sensor_get_sensor_list                          
+* @passcase                            When sensor_get_sensor_list is successful
+* @failcase                            If target API sensor_get_sensor_list fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_get_sensor_list_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       int nSensorCount = -1;
+       sensor_h *pstList;
+       SensorFeature stSensor[] =      {       
+                                                                       {SENSOR_ACCELEROMETER, "http://tizen.org/feature/sensor.accelerometer"},
+                                                                       {SENSOR_GRAVITY, "http://tizen.org/feature/sensor.gravity"},
+                                                                       {SENSOR_LINEAR_ACCELERATION, "http://tizen.org/feature/sensor.linear_acceleration"},
+                                                                       {SENSOR_MAGNETIC, "http://tizen.org/feature/sensor.magnetometer"},               
+                                                                       {SENSOR_ROTATION_VECTOR, "http://tizen.org/feature/sensor.rotation_vector"},
+                                                                       {SENSOR_ORIENTATION, "http://tizen.org/feature/sensor.tiltmeter"},
+                                                                       {SENSOR_GYROSCOPE, "http://tizen.org/feature/sensor.gyroscope"},
+                                                                       {SENSOR_LIGHT, "http://tizen.org/feature/sensor.photometer"},                   
+                                                                       {SENSOR_PROXIMITY, "http://tizen.org/feature/sensor.proximity"},
+                                                                       {SENSOR_PRESSURE, "http://tizen.org/feature/sensor.barometer"},
+                                                                       {SENSOR_ULTRAVIOLET, "http://tizen.org/feature/sensor.ultraviolet"},
+                                                                       {SENSOR_TEMPERATURE, "http://tizen.org/feature/sensor.temperature"},
+                                                                       {SENSOR_HUMIDITY, "http://tizen.org/feature/sensor.humidity"},
+                                                                       {SENSOR_HRM, "http://tizen.org/feature/sensor.heart_rate_monitor"},
+                                                                       {SENSOR_HRM_LED_GREEN, "http://tizen.org/feature/sensor.heart_rate_monitor.led_green"},
+                                                                       {SENSOR_HRM_LED_IR, "http://tizen.org/feature/sensor.heart_rate_monitor.led_ir"},
+                                                                       {SENSOR_HRM_LED_RED, "http://tizen.org/feature/sensor.heart_rate_monitor.led_red"}
+                                                               };      
+       int enum_size = sizeof(stSensor) / sizeof(stSensor[0]);
+       int enum_counter = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               bool bRet = Sensor_Check_System_Info_Feature_Supported(stSensor[enum_counter].szFeature);
+               if( false == bRet )
+               {
+                       FPRINTF("[Line : %d] [sensor_ITC] Required feature of sensor is not supported. So skipping enum %s\\n",
+                               __LINE__, SensorType(stSensor[enum_counter].eSensorType));
+                       continue;
+               }
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       // Target API
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       nRet = sensor_get_sensor_list(stSensor[enum_counter].eSensorType, &pstList, &nSensorCount);
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_sensor_list failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(stSensor[enum_counter].eSensorType), SensorsGetError(nRet));
+                               nFailCount++;
+                       }
+                       if ( pstList == NULL )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_sensor_list is unsuccessful as psList is NULL\\n",__LINE__);
+                               nFailCount++;
+                       }
+                       else
+                       {
+       #if DEBUG               
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_sensor_list is successful\\n",__LINE__);
+       #endif
+                       }
+               }
+       }
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_get_sensor_list failed %d time out of %d times\\n",
+                       __LINE__, nFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_get_sensor_list, pszAPI1SpeedLog);       
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_get_sensor_list, pszMemLog);
+#endif
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get the type of sensor.
+//& type: auto
+/**
+* @testcase                    ITc_sensor_get_type_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get the type of sensor.
+* @scenario                            Get the sensor handle\n
+*                                              Get the type of sensor and check whether its correct or not.
+* @apicovered                  sensor_get_type                         
+* @passcase                            When sensor_get_type is successful
+* @failcase                            If target API sensor_get_type fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+
+int ITc_sensor_get_type_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       sensor_type_e type = -1;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_get_type(g_pstSensorHandle, &type);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_type failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       if ( type < 0 )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_type returned unexpected value %d on iteration %d for sensor %s\\n",
+                                       __LINE__, type, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nGetFailCount++;
+                       }
+                       if ( type != eSensorType[enum_counter])
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_type returned mismatched value %s on iteration %d for sensor %s\\n",
+                                       __LINE__, SensorType(type), nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nGetFailCount++;
+                       }
+               }
+       }
+       
+       if ( nGetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_get_type failed %d time out of %d times\\n",
+                       __LINE__, nGetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_get_type, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_get_type, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get the vendor of the sensor
+//& type: auto
+/**
+* @testcase                    ITc_sensor_get_vendor_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get the vendor of the sensor
+* @scenario                            Get the sensor handle\n
+*                                              Get the vendor of the sensor
+* @apicovered                  sensor_get_vendor                               
+* @passcase                            When sensor_get_vendor is successful
+* @failcase                            If target API sensor_get_vendor fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_get_vendor_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       char *pszVendor = NULL;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_get_vendor(g_pstSensorHandle, &pszVendor);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_vendor failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       if ( pszVendor == NULL )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_get_vendor returned unexpected value %s on iteration %d for sensor %s\\n",
+                                       __LINE__, pszVendor, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nGetFailCount++;
+                       }
+               }
+       }
+       
+       if ( nGetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_get_vendor failed %d time out of %d times\\n",  
+                       __LINE__, nGetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_get_vendor, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_get_vendor, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To create and destroy the sensor listener
+//& type: auto
+/**
+* @testcase                    ITc_sensor_create_destroy_listener_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To create and destroy the sensor listener
+* @scenario                            Create the sensor handle\n
+*                                              Create the sensor listener\n
+*                                              Destroy the sensor listener
+* @apicovered                  sensor_create_listener, sensor_destroy_listener                                         
+* @passcase                            When sensor_create_listener and sensor_destroy_listener is successful
+* @failcase                            If target API sensor_create_listener or sensor_destroy_listener fails or any precondition API fails
+* @precondition                        Sensors handle must be created
+* @postcondition               Sensors handle must be released
+*/
+
+int ITc_sensor_create_destroy_listener_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_create_listener(g_pstSensorHandle, &g_pstSensorListener);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_create_listener failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nCreateFailCount++;
+                               continue;
+                       }
+                       if( g_pstSensorListener == NULL)
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_create_listener failed to create listener of sensor %s on iteration %d\\n",
+                                       __LINE__, SensorType(eSensorType[enum_counter]), nLoopCount);
+                               nCreateFailCount++;
+                               continue;
+                       }
+                       
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_destroy_listener(g_pstSensorListener);
+                       
+                       SensorsExecutionDelay(pszAPI2SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_destroy_listener failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nDestroyFailCount++;
+                       }
+               }
+       }
+       
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_create_listener failed %d time and sensor_destroy_listener failed %d time out of %d times\\n",
+                       __LINE__, nCreateFailCount, nDestroyFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, pszAPI2SpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_create_listener, pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(sensor_destroy_listener, pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_create_destroy_listener, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, pszAPI2SpeedLog);
+       return 0;
+}
+
+//& purpose: To change the interval at sensor measurements.
+//& type: auto
+/**
+* @testcase                    ITc_sensor_listener_set_interval_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To change the interval at sensor measurements.
+* @scenario                            Get the listener handle\n
+*                                              Change the interval at sensor measurements
+* @apicovered                  sensor_listener_set_interval                            
+* @passcase                            When sensor_listener_set_interval is successful
+* @failcase                            If target API sensor_listener_set_interval fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_listener_set_interval_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       bool bSupported = false;
+       unsigned int unInterval = 0;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               nRet = sensor_create_listener(g_pstSensorHandle, &g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if( g_pstSensorListener == NULL)
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed to create listener of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               nRet = sensor_listener_set_event_cb(g_pstSensorListener, unInterval, SensorEventCallback, NULL);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensors_ITC] Support API sensor_listener_set_event_cb failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       nRet = sensor_listener_start(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_start failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                               continue;
+                       }
+
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_listener_set_interval(g_pstSensorListener, unInterval);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_interval failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSetFailCount++;
+                       }
+
+                       nRet = sensor_listener_stop(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_stop failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                       }
+               }
+               
+               nRet = sensor_listener_unset_event_cb(g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensors_ITC] Support API sensor_listener_unset_event_cb failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+               
+               nRet = sensor_destroy_listener(g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_destroy_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_interval failed %d time out of %d times\\n",
+                       __LINE__, nSetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_listener_set_interval, pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_listener_set_interval, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//ITc_sensor_listener_set_max_batch_latency_p : comment this tc again. the api is not supported by current tizen's linux kerenl version. there is no way to test
+
+//& purpose: To change the maximum batch latency at sensor measurements.
+//& type: auto 
+/**
+ * @testcase                           ITc_sensor_listener_set_max_batch_latency_p
+ * @type                                       auto
+ * @description                                To change the maximum batch latency at sensor measurements.
+ * @scenario                           Get the listener handle\n
+                                                       Change the batch latency
+ * @apicovered                         sensor_listener_set_max_batch_latency                           
+ * @passcase                           When sensor_listener_set_max_batch_latency is successful
+ * @failcase                           If target API sensor_listener_set_max_batch_latency fails or any precondition API fails
+ * @precondition                       Sensors handle handle must be created
+ * @postcondition                      NA
+ */
+/*int ITc_sensor_listener_set_max_batch_latency_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       bool bSupported = false;
+       unsigned int unMaximumLatency = 0; 
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               nRet = sensor_create_listener(g_pstSensorHandle, &g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if( g_pstSensorListener == NULL)
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed to create listener of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+       
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_listener_set_max_batch_latency(g_pstSensorListener, unMaximumLatency);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_max_batch_latency failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSetFailCount++;
+                       }
+               }
+               
+               nRet = sensor_destroy_listener(g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_destroy_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_max_batch_latency failed %d time out of %d times\\n",
+                       __LINE__, nSetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_listener_set_max_batch_latency, pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_listener_set_max_batch_latency, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}*/
+
+//& purpose: To change the maximum batch latency at sensor measurements.
+//& type: auto
+/**
+* @testcase                    ITc_sensor_listener_set_option_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To change the maximum batch latency at sensor measurements.
+* @scenario                            Get the listener handle\n
+*                                              Change the batch latency
+* @apicovered                  sensor_listener_set_option                              
+* @passcase                            When sensor_listener_set_option is successful
+* @failcase                            If target API sensor_listener_set_option fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_listener_set_option_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       bool bSupported = false;
+       sensor_option_e eSensorOption[] = {SENSOR_OPTION_DEFAULT,                        
+                                                               SENSOR_OPTION_ON_IN_SCREEN_OFF, 
+                                                               SENSOR_OPTION_ON_IN_POWERSAVE_MODE,
+                                                               SENSOR_OPTION_ALWAYS_ON};
+       int enum2_size = sizeof(eSensorOption) / sizeof(eSensorOption[0]);
+       int enum2_counter = 0;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size * enum2_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size * enum2_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               nRet = sensor_create_listener(g_pstSensorHandle, &g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if( g_pstSensorListener == NULL)
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed to create listener of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+
+               for ( enum2_counter=0; enum2_counter<enum2_size; enum2_counter++)
+               {
+                       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+                       {
+                               SensorsGetMemAllocation();
+                               SensorsGetTimeOfDay();
+                               
+                               // Target API
+                               nRet = sensor_listener_set_option(g_pstSensorListener, eSensorOption[enum2_counter]);
+                               
+                               SensorsExecutionDelay(pszAPI1SpeedLog);
+                               SensorsGetMemStatus(pszMemLog);
+                               
+                               if ( nRet != SENSOR_ERROR_NONE )
+                               {
+                                       FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_option failed on iteration %d for sensor %s and option %s, error returned = %s\\n",
+                                               __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorOption(eSensorOption[enum2_counter]), SensorsGetError(nRet));
+                                       nSetFailCount++;
+                               }
+                       }
+               }
+               
+               nRet = sensor_destroy_listener(g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_destroy_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_option failed %d time out of %d times\\n",
+                       __LINE__, nSetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_listener_set_option, pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_listener_set_option, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To start and stop sensor server for the given listener
+//& type: auto
+/**
+* @testcase                    ITc_sensor_listener_start_stop_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To start and stop sensor server for the given listener
+* @scenario                            Start the sensor sever for sensor listener and sensor type
+*                                              Stop the sensor sever
+* @apicovered                  sensor_listener_start, sensor_listener_stop                                     
+* @passcase                            When sensor_listener_start and sensor_listener_stop is successful
+* @failcase                            If target API sensor_listener_start or sensor_listener_stop fails or any precondition API fails
+* @precondition                        Sensors handle must be created
+* @postcondition               Sensors handle must be released
+*/
+int ITc_sensor_listener_start_stop_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nStartFailCount = 0;
+       int nStopFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               nRet = sensor_create_listener(g_pstSensorHandle, &g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if( g_pstSensorListener == NULL)
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed to create listener of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+       
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_listener_start(g_pstSensorListener);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_start failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nStartFailCount++;
+                               continue;
+                       }
+                       
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_listener_stop(g_pstSensorListener);
+                       
+                       SensorsExecutionDelay(pszAPI2SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_stop failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nStopFailCount++;
+                       }
+               }
+               
+               nRet = sensor_destroy_listener(g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_destroy_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+       }
+       
+       if ( nStartFailCount > 0 || nStopFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_start failed %d time and sensor_listener_stop failed %d time out of %d times\\n",
+                       __LINE__, nStartFailCount, nStopFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, pszAPI2SpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_listener_start, pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(sensor_listener_stop, pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_listener_start_stop, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, pszAPI2SpeedLog);
+       return 0;
+}
+
+//& purpose: To get sensor data
+//& type: auto
+/**
+* @testcase                    ITc_sensor_listener_read_data_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get sensor data
+* @scenario                            Get the listener handle\n
+*                                              Get event information
+* @apicovered                  sensor_listener_read_data                               
+* @passcase                            When sensor_listener_read_data is successful
+* @failcase                            If target API sensor_listener_read_data fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_listener_read_data_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0, nSensorTimeoutId = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nReadFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       bool bSupported = false;
+       unsigned int unInterval = 10;
+       
+       sensor_event_s pstSensorEvent;
+       pstSensorEvent.accuracy = -1;
+       pstSensorEvent.timestamp = 0;
+       pstSensorEvent.value_count = -1;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               if ( SENSOR_PROXIMITY == eSensorType[enum_counter] )
+               {
+                       //PROXIMITY sensor is interrupt-based sensor. So is distinguished as manual test.
+                       continue;
+               }
+               
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               nRet = sensor_create_listener(g_pstSensorHandle, &g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if( g_pstSensorListener == NULL)
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed to create listener of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+       
+               nRet = sensor_listener_set_option(g_pstSensorListener, SENSOR_OPTION_ALWAYS_ON);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_set_option is failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               nRet = sensor_listener_set_event_cb(g_pstSensorListener, unInterval, SensorEventCallback, NULL);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensors_ITC] Support API sensor_listener_set_event_cb failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       nRet = sensor_listener_start(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_start failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                               continue;
+                       }
+
+                       RUN_POLLING_LOOP;
+
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_listener_read_data(g_pstSensorListener, &pstSensorEvent);
+                       
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_read_data failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nReadFailCount++;
+                       }
+                       else if ( pstSensorEvent.accuracy == -1 || pstSensorEvent.timestamp < 0 || pstSensorEvent.value_count < 0 )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_read_data is unsuccessful as pstSensorEvent given information is wrong that is accuracy = %d , timestamp = %llu, value_count = %d, values = %f\\n",__LINE__,pstSensorEvent.accuracy , pstSensorEvent.timestamp, pstSensorEvent.value_count ,*(pstSensorEvent.values));
+                               nReadFailCount++;
+                       }
+                       
+                       nRet = sensor_listener_stop(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_stop failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                       }
+               }
+               
+               nRet = sensor_listener_unset_event_cb(g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensors_ITC] Support API sensor_listener_unset_event_cb failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+               
+               nRet = sensor_listener_set_option(g_pstSensorListener, SENSOR_OPTION_DEFAULT);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_set_option is failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+               
+               nRet = sensor_destroy_listener(g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_destroy_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+       }
+       
+       if ( nReadFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_read_data failed %d time out of %d times\\n",
+                       __LINE__, nReadFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_listener_read_data, pszAPI1SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_listener_read_data, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To register and unregister a callback function to be invoked when an sensor event occurs.
+//& type: auto 
+/**
+* @testcase                    ITc_sensor_listener_set_unset_event_cb_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To register and un-register a callback function to be invoked when an sensor event occurs.
+* @scenario                            Get the handle to the Sensor\n
+*                                              Get the listener handle\n
+*                                              Register the callback function\n
+*                                              Check the user data received in callback function
+* @apicovered                  sensor_listener_set_event_cb,sensor_listener_unset_event_cb                             
+* @passcase                            When sensor_listener_set_event_cb or sensor_listener_unset_event_cb is successful
+* @failcase                            If target API sensor_listener_set_event_cb fails or callback or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_listener_set_unset_event_cb_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0, nSensorTimeoutId = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nSetFailCount = 0, nUnsetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       unsigned int unInterval = 10;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               if ( SENSOR_PROXIMITY == eSensorType[enum_counter] )
+               {
+                       //PROXIMITY sensor is interrupt-based sensor. So is distinguished as manual test.
+                       continue;
+               }
+               
+               g_pstSensorHandle = NULL;
+               bSupported = false;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               FPRINTF("[Line : %d][sensor_ITC] sensor %s returned bool value as = %s \\n", __LINE__, SensorType(eSensorType[enum_counter]), bSupported==true ? "true" : "false");
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               nRet = sensor_create_listener(g_pstSensorHandle, &g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if( g_pstSensorListener == NULL)
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed to create listener of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+       
+               nRet = sensor_listener_set_option(g_pstSensorListener, SENSOR_OPTION_ALWAYS_ON);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_set_option is failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       sensor_destroy_listener(g_pstSensorListener);
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       usleep(200);
+                       g_bSensorEventCallback = false;
+                       
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_listener_set_event_cb(g_pstSensorListener, unInterval, SensorEventCallback, NULL);
+               
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_event_cb failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSetFailCount++;
+                               continue;
+                       }
+                       
+                       nRet = sensor_listener_start(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_start failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                               sensor_listener_unset_event_cb(g_pstSensorListener);
+                               continue;
+                       }
+                       
+                       RUN_POLLING_LOOP;
+                       
+                       if ( !g_bSensorEventCallback )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_event_cb failed to invoke callback on iteration %d for sensor %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               sensor_listener_unset_event_cb(g_pstSensorListener);
+                               nSetFailCount++;
+                               continue;
+                       }
+                       
+                       nRet = sensor_listener_stop(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_stop failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                               sensor_listener_unset_event_cb(g_pstSensorListener);
+                               continue;
+                       }
+                       
+                       g_bSensorEventCallback = false;
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_listener_unset_event_cb(g_pstSensorListener);
+               
+                       SensorsExecutionDelay(pszAPI2SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_unset_event_cb failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nUnsetFailCount++;
+                               continue;
+                       }
+                       
+                       nRet = sensor_listener_start(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_start failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                               continue;
+                       }
+                       
+                       RUN_POLLING_LOOP;
+                       
+                       if ( g_bSensorEventCallback )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_unset_event_cb failed to stop callback invocation on iteration %d for sensor %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nUnsetFailCount++;
+                               continue;
+                       }
+                       
+                       nRet = sensor_listener_stop(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_stop failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                       }
+               }
+               
+               nRet = sensor_listener_set_option(g_pstSensorListener, SENSOR_OPTION_DEFAULT);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_set_option is failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+               
+               nRet = sensor_destroy_listener(g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_destroy_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_event_cb failed %d time and sensor_listener_unset_event_cb failed %d time out of %d times\\n",
+                       __LINE__, nSetFailCount, nUnsetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, pszAPI2SpeedLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_listener_set_event_cb, pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(sensor_listener_unset_event_cb, pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_listener_set_unset_event_cb, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, pszAPI2SpeedLog);
+       return 0;
+}
+
+//ITc_sensor_listener_set_unset_accuracy_cb_p cannot be tested in automated tc, should be done in TBT, toss it to Amlan
+
+//& purpose: To register and un-register a accuracy callback function to be invoked when the accuracy of a sensor has changed.
+//& type: auto
+/**
+ * @testcase                           ITc_sensor_listener_set_unset_accuracy_cb_p
+ * @type                                       auto
+ * @description                                To register and un-register a accuracy callback function to be invoked when the accuracy of a sensor has changed.
+ * @scenario                           --gets the handle to the Sensor\n
+                                                       -get the listener handle\n
+                                                       -The callback function to register \n
+                                                       -The user data is passed to callback function
+ * @apicovered                         sensor_listener_set_accuracy_cb,sensor_listener_unset_accuracy_cb                               
+ * @passcase                           When sensor_listener_set_accuracy_cb or sensor_listener_unset_accuracy_cb is successful.
+ * @failcase                           If target API sensor_listener_set_accuracy_cb fails or callback or any precondition API fails
+ * @precondition                       Sensor handle must be created
+ * @postcondition                      NA
+ */
+/*int ITc_sensor_listener_set_unset_accuracy_cb_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0, nSensorTimeoutId = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nSetFailCount = 0, nUnsetFailCount = 0;
+       int nSupportAPIFailCount = 0;
+       bool bSupported = false;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       
+       for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {
+               g_pstSensorHandle = NULL;
+               nRet = sensor_is_supported(eSensorType[enum_counter], &bSupported);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_is_supported failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( !bSupported )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] sensor %s is not supported on device\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       continue;
+               }
+               
+               nRet = sensor_get_default_sensor(eSensorType[enum_counter], &g_pstSensorHandle);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if ( g_pstSensorHandle == NULL )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_get_default_sensor failed to create handle of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               nRet = sensor_create_listener(g_pstSensorHandle, &g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               if( g_pstSensorListener == NULL)
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_create_listener failed to create listener of sensor %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+       
+               nRet = sensor_listener_set_option(g_pstSensorListener, SENSOR_OPTION_ALWAYS_ON);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_set_option is failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+                       continue;
+               }
+               
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       g_bSensorAccuracyChangeCallback = false;
+                       
+                       SensorsGetMemAllocation();
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_listener_set_accuracy_cb(g_pstSensorListener, SensorAccuracyChangeCallback, NULL);
+                       SensorsExecutionDelay(pszAPI1SpeedLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_accuracy_cb failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSetFailCount++;
+                               continue;
+                       }
+                       
+                       nRet = sensor_listener_start(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_start failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                               continue;
+                       }
+                       
+                       RUN_POLLING_LOOP;
+                       
+                       if ( !g_bSensorAccuracyChangeCallback )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_accuracy_cb failed to invoke callback on iteration %d for sensor %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nSetFailCount++;
+                       }
+                       
+                       nRet = sensor_listener_stop(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_stop failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                       }
+                       
+                       
+                       SensorsGetTimeOfDay();
+                       
+                       // Target API
+                       nRet = sensor_listener_unset_accuracy_cb(g_pstSensorListener);
+               
+                       SensorsExecutionDelay(pszAPI2SpeedLog);
+                       SensorsGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_unset_accuracy_cb failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nUnsetFailCount++;
+                               continue;
+                       }
+                       
+                       nRet = sensor_listener_start(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_start failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                               continue;
+                       }
+                       
+                       RUN_POLLING_LOOP;
+                       
+                       if ( g_bSensorAccuracyChangeCallback )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_unset_accuracy_cb failed to stop callback invocation on iteration %d for sensor %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]));
+                               nUnsetFailCount++;
+                       }
+                       
+                       nRet = sensor_listener_stop(g_pstSensorListener);
+                       if ( nRet != SENSOR_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_stop failed on iteration %d for sensor %s, error returned = %s\\n",
+                                       __LINE__, nLoopCount, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                               nSupportAPIFailCount++;
+                       }
+               }
+               
+               nRet = sensor_listener_set_option(g_pstSensorListener, SENSOR_OPTION_DEFAULT);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_listener_set_option is failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+               
+               nRet = sensor_destroy_listener(g_pstSensorListener);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][sensor_ITC] Support API sensor_destroy_listener failed for sensor %s, error returned = %s\\n",
+                               __LINE__, SensorType(eSensorType[enum_counter]), SensorsGetError(nRet));
+                       nSupportAPIFailCount++;
+               }
+       }
+       
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 || nSupportAPIFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][sensor_ITC] sensor_listener_set_accuracy_cb failed %d time and sensor_listener_unset_accuracy_cb failed %d time out of %d times\\n",
+                       __LINE__, nSetFailCount, nUnsetFailCount, MAX_COUNT * enum_size);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, pszAPI2SpeedLog);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_listener_set_accuracy_cb, pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(sensor_listener_unset_accuracy_cb, pszAPI2SpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_listener_set_unset_accuracy_cb, pszMemLog);
+#endif
+
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, pszAPI2SpeedLog);
+       return 0;
+}*/
+
+//& purpose: To compute the angle change between two rotation matrices. 
+//& type: auto
+/**
+* @testcase                    ITc_sensor_util_get_angle_change_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To compute the angle Change between two rotation matrices.
+* @scenario                            Set the current and previous rotation matrix\n
+*                                              Make an array to store the changes
+* @apicovered                  sensor_util_get_angle_change                            
+* @passcase                            When sensor_util_get_angle_Change is successful
+* @failcase                            If target API sensor_util_get_angle_Change fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_util_get_angle_change_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       float fCurrentR[] = {1, 1, 1, 1, 1, 1, 1, 1, 1};
+       float fPrevR[] = {1, 1, 1, 1, 1, 1, 1, 1, 1};
+       float fAngleChange[3];
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               SensorsGetMemAllocation();
+               SensorsGetTimeOfDay();
+               nRet = sensor_util_get_angle_change(fCurrentR, fPrevR,fAngleChange);
+               SensorsExecutionDelay(pszAPI1SpeedLog);
+               SensorsGetMemStatus(pszMemLog);
+               
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[sensor_ITC] sensor_util_get_angle_change is unsuccessful on iteration %d, error returned = %s\\n", nLoopCount, SensorsGetError(nRet));
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[sensor_ITC] sensor_util_get_angle_change is successful \\n");
+#endif
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[sensor_ITC] sensor_util_get_angle_change failed %d time out of %d times\\n", nFailCount, MAX_COUNT);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_util_get_angle_change, pszAPI1SpeedLog); 
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_util_get_angle_change, pszMemLog);
+#endif
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get the declination of the horizontal component of the magnetic field from true north in degrees
+//& type: auto
+/**
+* @testcase                    ITc_sensor_util_get_declination_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get the declination of the horizontal component of the magnetic field from true north in degrees 
+* @scenario                            Set the latitude longitude and altitude\n
+*                                              Get the declination 
+* @apicovered                  sensor_util_get_declination                             
+* @passcase                            When sensor_util_get_declination is successful
+* @failcase                            If target API sensor_util_get_declination fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_util_get_declination_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       float fLatitude = 5.23;
+       float fLongitude = 10.34;
+       float fAltitude = 15.65;
+       float fDeclination;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+       
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               SensorsGetMemAllocation();
+               SensorsGetTimeOfDay();
+               nRet = sensor_util_get_declination(fLatitude, fLongitude, fAltitude, &fDeclination);
+               SensorsExecutionDelay(pszAPI1SpeedLog);
+               SensorsGetMemStatus(pszMemLog);
+               
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[sensor_ITC] sensor_util_get_declination is unsuccessful on iteration %d, error returned = %s\\n", nLoopCount, SensorsGetError(nRet));
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[sensor_ITC] sensor_util_get_declination is successful\\n ");
+#endif
+               }       
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[sensor_ITC] sensor_util_get_declination failed %d time out of %d times\\n", nFailCount, MAX_COUNT);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_util_get_declination, pszAPI1SpeedLog);  
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_util_get_declination, pszMemLog);
+#endif
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To compute the device's orientation based on the rotation matrix
+//& type: auto
+/**
+* @testcase                    ITc_sensor_util_get_orientation_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To compute the device's orientation based on the rotation matrix
+* @scenario                            Set the rotation matrix in the array\n
+*                                              Create an array of 3 floats to hold the result
+* @apicovered                  sensor_util_get_orientation                             
+* @passcase                            When sensor_util_get_orientation is successful
+* @failcase                            If target API sensor_util_get_orientation fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_util_get_orientation_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       float fR[] = {1, 1, 1, 1, 1, 1, 1, 1, 1};
+       float fValues[3];
+                       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               SensorsGetMemAllocation();
+               SensorsGetTimeOfDay();
+               nRet = sensor_util_get_orientation(fR, fValues);
+               SensorsExecutionDelay(pszAPI1SpeedLog);
+               SensorsGetMemStatus(pszMemLog);
+               
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[sensor_ITC] sensor_util_get_orientation is unsuccessful on iteration %d, error returned = %s\\n", nLoopCount, SensorsGetError(nRet));
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[sensor_ITC] sensor_util_get_orientation is successful\\n");
+#endif
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[sensor_ITC] sensor_util_get_orientation failed %d time out of %d times\\n", nFailCount, MAX_COUNT);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_util_get_orientation, pszAPI1SpeedLog);  
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_util_get_orientation, pszMemLog);
+#endif
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To get Inclination matrix and Rotation matrix transforming a vector from the device coordinate to the world's coordinate.
+//& type: auto
+/**
+* @testcase                    ITc_sensor_util_get_rotation_matrix_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To get Inclination matrix and Rotation matrix transforming a vector from the device coordinate to the world's coordinate.
+* @scenario                            Set X, Y,and Z-axis gravity vector in the device co-ordinate\n
+*                                              Set X, Y,Z-axis geomagnetic vector in the device co-ordinate\n
+*                                              Create the array of 9 floats that represent rotation and inclination matrix
+* @apicovered                  sensor_util_get_rotation_matrix                         
+* @passcase                            When sensor_util_get_rotation_matrix is successful
+* @failcase                            If target API sensor_util_get_rotation_matrix fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_util_get_rotation_matrix_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       float fGxAxis = 5.22;
+       float fGyAxis = 0;
+       float fGzAxis = 0;
+       float fMxAxis = 0;
+       float fMyAxis = 0;
+       float fMzAXis = 12.22;
+       float fRotation[9];
+       float fInclination[9];
+                       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               SensorsGetMemAllocation();
+               SensorsGetTimeOfDay();
+               nRet = sensor_util_get_rotation_matrix(fGxAxis, fGyAxis, fGzAxis, fMxAxis, fMyAxis, fMzAXis, fRotation, fInclination);
+               SensorsExecutionDelay(pszAPI1SpeedLog);
+               SensorsGetMemStatus(pszMemLog);
+               
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[sensor_ITC] sensor_util_get_rotation_matrix is unsuccessful on iteration %d, error returned = %s\\n", nLoopCount, SensorsGetError(nRet));
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[sensor_ITC] sensor_util_get_rotation_matrix is successful\\n ");
+#endif
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[sensor_ITC] sensor_util_get_rotation_matrix failed %d time out of %d times\\n", nFailCount, MAX_COUNT);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_util_get_rotation_matrix, pszAPI1SpeedLog);      
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_util_get_rotation_matrix, pszMemLog);
+#endif
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To convert a rotation vector to a rotation matrix. 
+//& type: auto
+/**
+* @testcase                    ITc_sensor_util_get_rotation_matrix_from_vector_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To convert a rotation vector to a rotation matrix
+* @scenario                            Set X,Y,Z-axis rotation vector\n
+*                                              Set 9 elements array rotation matrix 
+* @apicovered                  sensor_util_get_rotation_matrix_from_vector                             
+* @passcase                            When sensor_util_get_rotation_matrix_from_vector is successful
+* @failcase                            If target API sensor_util_get_rotation_matrix_from_vector fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_util_get_rotation_matrix_from_vector_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       float fVxAxis = 5;
+       float fVyAxis = 12.24;
+       float fVzAxis = 13.26;
+       float fRotation[9];
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));    
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               SensorsGetMemAllocation();
+               SensorsGetTimeOfDay();
+               nRet = sensor_util_get_rotation_matrix_from_vector(fVxAxis, fVyAxis, fVzAxis, fRotation);
+               SensorsExecutionDelay(pszAPI1SpeedLog);
+               SensorsGetMemStatus(pszMemLog);
+               
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[sensor_ITC] sensor_util_get_rotation_matrix_from_vector is unsuccessful on iteration %d, error returned = %s\\n", nLoopCount, SensorsGetError(nRet));
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[sensor_ITC] sensor_util_get_rotation_matrix_from_vector is successful\\n ");
+#endif
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[sensor_ITC] sensor_util_get_rotation_matrix_from_vector failed %d time out of %d times\\n", nFailCount, MAX_COUNT);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_util_get_rotation_matrix_from_vector, pszAPI1SpeedLog);  
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_util_get_rotation_matrix_from_vector, pszMemLog);
+#endif
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To rotate the supplied rotation matrix so that it can be expressed in a different coordinate system
+//& type: auto
+/**
+* @testcase                    ITc_sensor_util_remap_coordinate_system_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To rotate the supplied rotation matrix so that it can be expressed in a different coordinate system.
+* @scenario                            Set the rotation matrix(3x3) which is to be transformed\n
+*                                              Set x and y axis of the device\n
+*                                              Set the transformed rotation matrix 
+* @apicovered                  sensor_util_remap_coordinate_system                             
+* @passcase                            When sensor_util_remap_coordinate_system is successful
+* @failcase                            If target API sensor_util_remap_coordinate_system fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_util_remap_coordinate_system_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       float fInR[] = {1, 1, 1, 1, 1, 1, 1, 1, 1};
+       float fOutR[9];
+       sensor_util_axis_e eSensorUtilAxisX = sensor_util_axis_x;
+       sensor_util_axis_e eSensorUtilAxisY = sensor_util_axis_minus_y;
+                       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));    
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               SensorsGetMemAllocation();
+               SensorsGetTimeOfDay();
+               nRet = sensor_util_remap_coordinate_system(fInR, eSensorUtilAxisX, eSensorUtilAxisY, fOutR);
+               SensorsExecutionDelay(pszAPI1SpeedLog);
+               SensorsGetMemStatus(pszMemLog);
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[sensor_ITC] sensor_util_remap_coordinate_system is unsuccessful on iteration %d, error returned = %s\\n", nLoopCount, SensorsGetError(nRet));
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[sensor_ITC] sensor_util_remap_coordinate_system is successful\\n ");
+#endif
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[sensor_ITC] sensor_util_remap_coordinate_system failed %d time out of %d times\\n", nFailCount, MAX_COUNT);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_util_remap_coordinate_system, pszAPI1SpeedLog);  
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_util_remap_coordinate_system, pszMemLog);
+#endif
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+
+//& purpose: To compute the geomagnetic inclination angle in radians from the inclination matrix
+//& type: auto
+/**
+* @testcase                    ITc_sensor_util_get_inclination_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To compute the geomagnetic inclination angle in radians from the inclination matrix 
+* @scenario                            Set the inclination matrix\n
+*                                              Get the inclination angle in radians
+* @apicovered                  sensor_util_get_inclination                             
+* @passcase                            When sensor_util_get_inclination is successful
+* @failcase                            If target API sensor_util_get_inclination fails or any precondition API fails
+* @precondition                        Sensor handle must be created
+* @postcondition               NA
+*/
+int ITc_sensor_util_get_inclination_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       float fI[] = {1, 1, 1, 1, 1, 1, 1, 1, 1};
+       float fInclination;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));    
+#endif
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               SensorsGetMemAllocation();
+               SensorsGetTimeOfDay();
+               nRet = sensor_util_get_inclination(fI, &fInclination);
+               SensorsExecutionDelay(pszAPI1SpeedLog);
+               SensorsGetMemStatus(pszMemLog);
+               
+               if ( nRet != SENSOR_ERROR_NONE )
+               {
+                       FPRINTF("[sensor_ITC] sensor_util_get_inclination is unsuccessful on iteration %d, error returned = %s\\n", nLoopCount, SensorsGetError(nRet));
+                       nFailCount++;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[sensor_ITC] sensor_util_get_inclination is successful\\n ");
+#endif
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("[sensor_ITC] sensor_util_get_inclination failed %d time out of %d times\\n", nFailCount, MAX_COUNT);
+               SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sensor_util_get_inclination, pszAPI1SpeedLog);  
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sensor_util_get_inclination, pszMemLog);
+#endif
+       SensorsFreeMemory(pszAPI1SpeedLog, pszMemLog, NULL);
+       return 0;
+}
+/** @} */ 
+/** @} */ 
\ No newline at end of file
diff --git a/src/itc/sensor/tct-sensor-native.c b/src/itc/sensor/tct-sensor-native.c
new file mode 100755 (executable)
index 0000000..82d7fae
--- /dev/null
@@ -0,0 +1,134 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-sensor-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/sensor/tct-sensor-native.h b/src/itc/sensor/tct-sensor-native.h
new file mode 100755 (executable)
index 0000000..ec9e7c7
--- /dev/null
@@ -0,0 +1,79 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SENSOR_NATIVE_H__
+#define __TCT_SENSOR_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_sensor_listener_startup(void);
+extern void ITs_sensor_listener_cleanup(void);
+
+extern int ITc_sensor_is_supported_p(void);
+extern int ITc_sensor_get_default_sensor_p(void);
+extern int ITc_sensor_get_fifo_count_p(void);
+extern int ITc_sensor_get_max_batch_count_p(void);
+extern int ITc_sensor_get_max_range_p(void);
+extern int ITc_sensor_get_min_range_p(void);
+extern int ITc_sensor_get_min_interval_p(void);
+extern int ITc_sensor_get_name_p(void);
+extern int ITc_sensor_get_resolution_p(void);
+extern int ITc_sensor_get_sensor_list_p(void);
+extern int ITc_sensor_get_type_p(void);
+extern int ITc_sensor_get_vendor_p(void);
+extern int ITc_sensor_create_destroy_listener_p(void);
+extern int ITc_sensor_listener_set_interval_p(void);
+extern int ITc_sensor_listener_set_option_p(void);
+extern int ITc_sensor_listener_start_stop_p(void);
+extern int ITc_sensor_listener_read_data_p(void);
+extern int ITc_sensor_listener_set_unset_event_cb_p(void);
+extern int ITc_sensor_util_get_angle_change_p(void);
+extern int ITc_sensor_util_get_declination_p(void);
+extern int ITc_sensor_util_get_orientation_p(void);
+extern int ITc_sensor_util_get_rotation_matrix_p(void);
+extern int ITc_sensor_util_get_rotation_matrix_from_vector_p(void);
+extern int ITc_sensor_util_remap_coordinate_system_p(void);
+extern int ITc_sensor_util_get_inclination_p(void);
+
+testcase tc_array[] = {
+    {"ITc_sensor_is_supported_p", ITc_sensor_is_supported_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_get_default_sensor_p", ITc_sensor_get_default_sensor_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_get_fifo_count_p", ITc_sensor_get_fifo_count_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_get_max_batch_count_p", ITc_sensor_get_max_batch_count_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_get_max_range_p", ITc_sensor_get_max_range_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_get_min_range_p", ITc_sensor_get_min_range_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_get_min_interval_p", ITc_sensor_get_min_interval_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_get_name_p", ITc_sensor_get_name_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_get_resolution_p", ITc_sensor_get_resolution_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_get_sensor_list_p", ITc_sensor_get_sensor_list_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_get_type_p", ITc_sensor_get_type_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_get_vendor_p", ITc_sensor_get_vendor_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_create_destroy_listener_p", ITc_sensor_create_destroy_listener_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_listener_set_interval_p", ITc_sensor_listener_set_interval_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_listener_set_option_p", ITc_sensor_listener_set_option_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_listener_start_stop_p", ITc_sensor_listener_start_stop_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_listener_read_data_p", ITc_sensor_listener_read_data_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_listener_set_unset_event_cb_p", ITc_sensor_listener_set_unset_event_cb_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_util_get_angle_change_p", ITc_sensor_util_get_angle_change_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_util_get_declination_p", ITc_sensor_util_get_declination_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_util_get_orientation_p", ITc_sensor_util_get_orientation_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_util_get_rotation_matrix_p", ITc_sensor_util_get_rotation_matrix_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_util_get_rotation_matrix_from_vector_p", ITc_sensor_util_get_rotation_matrix_from_vector_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_util_remap_coordinate_system_p", ITc_sensor_util_remap_coordinate_system_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {"ITc_sensor_util_get_inclination_p", ITc_sensor_util_get_inclination_p, ITs_sensor_listener_startup, ITs_sensor_listener_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SENSOR_NATIVE_H__
diff --git a/src/itc/smartcard/CMakeLists.txt b/src/itc/smartcard/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..e2ab63b
--- /dev/null
@@ -0,0 +1,39 @@
+SET(PKG_NAME "smartcard")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-network-smartcard")
+SET(TC_SOURCES
+       ITs-smartcard-common.c
+       ITs-smartcard.c
+       ITs-smartcard-service.c
+       ITs-smartcard-reader.c
+       ITs-smartcard-session.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/smartcard/ITs-smartcard-common.c b/src/itc/smartcard/ITs-smartcard-common.c
new file mode 100755 (executable)
index 0000000..42a6993
--- /dev/null
@@ -0,0 +1,111 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-smartcard-common.h"
+
+/** @addtogroup itc-smartcard
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function definitions here
+
+/**
+ * @function           SmartcardGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* SmartcardGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+               case SMARTCARD_ERROR_NONE:                                              szErrorVal = "SMARTCARD_ERROR_NONE";                            break;
+               case SMARTCARD_ERROR_GENERAL:                                   szErrorVal = "SMARTCARD_ERROR_GENERAL";                         break;
+               case SMARTCARD_ERROR_IO_ERROR:                                  szErrorVal = "SMARTCARD_ERROR_IO_ERROR";                        break;
+               case SMARTCARD_ERROR_NO_SUCH_ELEMENT:                   szErrorVal = "SMARTCARD_ERROR_NO_SUCH_ELEMENT";         break;
+               case SMARTCARD_ERROR_ILLEGAL_STATE:                             szErrorVal = "SMARTCARD_ERROR_ILLEGAL_STATE";           break;
+               case SMARTCARD_ERROR_INVALID_PARAMETER:                 szErrorVal = "SMARTCARD_ERROR_INVALID_PARAMETER";       break;
+               case SMARTCARD_ERROR_ILLEGAL_REFERENCE:                 szErrorVal = "SMARTCARD_ERROR_ILLEGAL_REFERENCE";       break;
+               case SMARTCARD_ERROR_OPERATION_NOT_SUPPORTED:   szErrorVal = "SMARTCARD_ERROR_OPERATION_NOT_SUPPORTED";break;
+               case SMARTCARD_ERROR_PERMISSION_DENIED:                 szErrorVal = "SMARTCARD_ERROR_PERMISSION_DENIED";       break;
+               case SMARTCARD_ERROR_CHANNEL_NOT_AVAILABLE:             szErrorVal = "SMARTCARD_ERROR_CHANNEL_NOT_AVAILABLE";break;
+               case SMARTCARD_ERROR_NOT_INITIALIZED:                   szErrorVal = "SMARTCARD_ERROR_NOT_INITIALIZED";         break;
+               case SMARTCARD_ERROR_NOT_SUPPORTED:                             szErrorVal = "SMARTCARD_ERROR_NOT_SUPPORTED";           break;
+               default:                                                                                szErrorVal = "Unknown Error";                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+ * @function           Smartcard_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ;key value
+ * @return                     true if supported else false
+ */
+bool Smartcard_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("[Line : %d][%s] Null key value passed to function : Smartcard_Check_System_Info_Feature_Supported\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       bool bValue = false;
+       int nRetVal = system_info_get_platform_bool(pszKey, &bValue);
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n", __LINE__, API_NAMESPACE, Smartcard_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool returned unsupported feature capability for (key = %s)\\n", __LINE__, API_NAMESPACE, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool returned supported status feature for (key = %s)\\n", __LINE__, API_NAMESPACE, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           Smartcard_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Smartcard_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            szErrorVal = "SYSTEM_INFO_ERROR_NONE";                  break;
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER";break;
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR";              break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY"; break;
+               default:                                                                        szErrorVal = "Unknown error";                                   break;
+       }
+
+       return szErrorVal;
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/smartcard/ITs-smartcard-common.h b/src/itc/smartcard/ITs-smartcard-common.h
new file mode 100755 (executable)
index 0000000..5240a16
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_SMARTCARD_COMMON_H_
+#define _ITS_SMARTCARD_COMMON_H_
+
+#include "assert.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <smartcard.h>
+#include <system_info.h>
+
+/** @addtogroup itc-smartcard
+*  @ingroup itc
+*  @{
+*/
+
+#define API_NAMESPACE          "SMARTCARD_ITC"
+#define SE_FEATURE                     "http://tizen.org/feature/network.secure_element"
+#define SE_UICC_FEATURE                "http://tizen.org/feature/network.secure_element.uicc"
+#define SE_ESE_FEATURE         "http://tizen.org/feature/network.secure_element.ese"
+
+//Add test package related includes here
+
+FILE *g_fpLog;
+
+bool g_bIsUICCSupported;
+bool g_bIsESESupported;
+bool g_bIsSmartcardSupported;
+bool g_bIsFeatureMismatched;
+bool g_bIsServiceInitialized;
+bool g_bIsReadersAvailable;
+
+//Add helper function declarations here
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
+}
+
+#define START_TEST_CHECK_INITIALIZE {\
+       START_TEST;\
+       if ( g_bIsFeatureMismatched ) {\
+               FPRINTF("[Line : %d][%s] Feature Mismatch Error\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+       if ( !g_bIsSmartcardSupported ) {\
+               FPRINTF("[Line : %d][%s] Feature Unsupported\\n", __LINE__, API_NAMESPACE);\
+               return 0;\
+       }\
+       if ( !g_bIsServiceInitialized ) {\
+               FPRINTF("[Line : %d][%s] Precondition Failed\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+}
+
+#define START_TEST_CHECK_READERS {\
+       START_TEST_CHECK_INITIALIZE;\
+       if ( !g_bIsReadersAvailable ) {\
+               FPRINTF("[Line : %d][%s] Precondition Failed\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+}
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+//Add helper function declarations here
+
+char* SmartcardGetError(int nRet);
+bool Smartcard_Check_System_Info_Feature_Supported(char* pszKey);
+char* Smartcard_System_Info_GetError(int nRet);
+
+/** @} */
+#endif  //_ITS_SMARTCARD_COMMON_H_
diff --git a/src/itc/smartcard/ITs-smartcard-reader.c b/src/itc/smartcard/ITs-smartcard-reader.c
new file mode 100755 (executable)
index 0000000..c518483
--- /dev/null
@@ -0,0 +1,278 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-smartcard-common.h"
+
+/** @addtogroup itc-smartcard
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Smartcard
+
+int* g_pnReaders;
+int g_nLength;
+
+/**
+ * @function           ITs_smartcard_reader_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_smartcard_reader_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Smartcard_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bIsUICCSupported = Smartcard_Check_System_Info_Feature_Supported(SE_UICC_FEATURE);
+       g_bIsESESupported = Smartcard_Check_System_Info_Feature_Supported(SE_ESE_FEATURE);
+       g_bIsSmartcardSupported = g_bIsUICCSupported || g_bIsESESupported;
+
+       g_bIsFeatureMismatched = false;
+       g_bIsServiceInitialized = false;
+       g_bIsReadersAvailable = false;
+       
+       int nRet = smartcard_initialize();
+       if ( !g_bIsSmartcardSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_initialize failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+                       g_bIsFeatureMismatched = true;
+               }
+               
+               FPRINTF("[Line : %d][%s] smartcard_initialize is unsupported\\n", __LINE__, API_NAMESPACE);
+               g_bIsFeatureMismatched = false;
+       }
+       else if ( nRet != SMARTCARD_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] smartcard_initialize failed, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+               g_bIsServiceInitialized = false;
+       }
+       else
+       {
+               g_bIsServiceInitialized = true;
+               
+               nRet = smartcard_get_readers(&g_pnReaders, &g_nLength);
+               if ( !g_bIsSmartcardSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][%s] smartcard_get_readers failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+                               g_bIsFeatureMismatched = true;
+                       }
+                       
+                       FPRINTF("[Line : %d][%s] smartcard_get_readers is unsupported\\n", __LINE__, API_NAMESPACE);
+                       g_bIsFeatureMismatched = false;
+               }
+               else if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_get_readers failed, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+                       g_bIsReadersAvailable = false;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_get_readers returned %d readers\\n", __LINE__, API_NAMESPACE, g_nLength);
+                       g_bIsReadersAvailable = true;
+               }
+       }
+       
+       return;
+}
+
+/**
+ * @function           ITs_smartcard_reader_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_smartcard_reader_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Smartcard_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       if ( g_pnReaders != NULL)
+       {
+               free(g_pnReaders);
+               g_pnReaders = NULL;
+       }
+       
+       int nRet = smartcard_deinitialize();
+       if ( !g_bIsSmartcardSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_deinitialize failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+               }
+               
+               FPRINTF("[Line : %d][%s] smartcard_deinitialize is unsupported\\n", __LINE__, API_NAMESPACE);
+       }
+       else if ( nRet != SMARTCARD_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] smartcard_deinitialize failed, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+       }
+       
+       return;
+}
+
+/** @addtogroup itc-smartcard-testcases
+*  @brief              Integration testcases for module smartcard
+*  @ingroup    itc-smartcard
+*  @{
+*/
+
+//& purpose Gets the name of the given reader
+//& type: auto
+/**
+* @testcase            ITc_smartcard_reader_get_name_p
+* @since_tizen         2.3.1
+* @type                        auto
+* @description         Gets the name of the given reader
+* @scenario                    Initialize smartcard service\n
+*                                      Get the list of available Secure Element readers\n
+*                                      Get the name of the given reader\n
+*                                      De-initialize smartcard service
+* @apicovered          smartcard_reader_get_name
+* @passcase                    If smartcard_reader_get_name and all supporting APIs are successful
+* @failcase                    If smartcard_reader_get_name or any supporting API is failed
+* @precondition                NA
+* @postcondition       NA
+*/
+int ITc_smartcard_reader_get_name_p(void)
+{
+       START_TEST_CHECK_READERS;
+
+       int nCounter;
+       for ( nCounter=0; nCounter<g_nLength; nCounter++ )
+       {
+               char* pszReaderName;
+               
+               // Target API
+               int nRet = smartcard_reader_get_name(g_pnReaders[nCounter], &pszReaderName);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_reader_get_name failed for reader %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter], SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               if ( NULL == pszReaderName )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_reader_get_name returned NULL for reader %d\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter]);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_reader_get_name returned %s for reader %d\\n", __LINE__, API_NAMESPACE, pszReaderName, g_pnReaders[nCounter]);
+               
+               free(pszReaderName);
+       }
+       
+       return 0;
+}
+
+//& purpose Checks if a Secure Element is present in the given reader
+//& type: auto
+/**
+* @testcase            ITc_smartcard_reader_is_secure_element_present_p
+* @since_tizen         2.3.1
+* @type                        auto
+* @description         Checks if a Secure Element is present in the given reader
+* @scenario                    Initialize smartcard service\n
+*                                      Get the list of available Secure Element readers\n
+*                                      Check if a Secure Element is present in the given reader\n
+*                                      De-initialize smartcard service
+* @apicovered          smartcard_reader_is_secure_element_present
+* @passcase                    If smartcard_reader_is_secure_element_present and all supporting APIs are successful
+* @failcase                    If smartcard_reader_is_secure_element_present or any supporting API is failed
+* @precondition                NA
+* @postcondition       NA
+*/
+int ITc_smartcard_reader_is_secure_element_present_p(void)
+{
+       START_TEST_CHECK_READERS;
+
+       int nCounter;
+       for ( nCounter=0; nCounter<g_nLength; nCounter++ )
+       {
+               bool bIsPresent = false;
+               
+               // Target API
+               int nRet = smartcard_reader_is_secure_element_present(g_pnReaders[nCounter], &bIsPresent);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_reader_is_secure_element_present failed for reader %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter], SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_reader_is_secure_element_present returned %s for reader %d\\n", __LINE__, API_NAMESPACE, (bIsPresent ? "True" : "False"), g_pnReaders[nCounter]);
+       }
+       
+       return 0;
+}
+
+//& purpose Open and close session to a Secure Element in the given reader
+//& type: auto
+/**
+* @testcase            ITc_smartcard_reader_open_close_session_p
+* @since_tizen         2.3.1
+* @type                        auto
+* @description         Open and close session to a Secure Element in the given reader
+* @scenario                    Initialize smartcard service\n
+*                                      Get the list of available Secure Element readers\n
+*                                      Open session to the Secure Element in a given reader\n
+*                                      Close the session to the given reader\n
+*                                      De-initialize smartcard service
+* @apicovered          smartcard_reader_open_session, smartcard_reader_close_sessions
+* @passcase                    If smartcard_reader_open_session, smartcard_reader_close_sessions and all supporting APIs are successful
+* @failcase                    If smartcard_reader_open_session, smartcard_reader_close_sessions or any supporting API is failed
+* @precondition                NA
+* @postcondition       NA
+*/
+int ITc_smartcard_reader_open_close_session_p(void)
+{
+       START_TEST_CHECK_READERS;
+
+       int nCounter;
+       for ( nCounter=0; nCounter<g_nLength; nCounter++ )
+       {
+               int nSession = false;
+               
+               // Target API
+               int nRet = smartcard_reader_open_session(g_pnReaders[nCounter], &nSession);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_reader_open_session failed for reader %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter], SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_reader_open_session returned %d for reader %d\\n", __LINE__, API_NAMESPACE, nSession, g_pnReaders[nCounter]);
+               
+               // Target API
+               nRet = smartcard_reader_close_sessions(g_pnReaders[nCounter]);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_reader_close_sessions failed for reader %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter], SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_reader_close_sessions passed for reader %d\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter]);
+       }
+       
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/smartcard/ITs-smartcard-service.c b/src/itc/smartcard/ITs-smartcard-service.c
new file mode 100755 (executable)
index 0000000..cc91ad8
--- /dev/null
@@ -0,0 +1,151 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-smartcard-common.h"
+
+/** @addtogroup itc-smartcard
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Smartcard
+
+/**
+ * @function           ITs_smartcard_service_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_smartcard_service_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Smartcard_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bIsUICCSupported = Smartcard_Check_System_Info_Feature_Supported(SE_UICC_FEATURE);
+       g_bIsESESupported = Smartcard_Check_System_Info_Feature_Supported(SE_ESE_FEATURE);
+       g_bIsSmartcardSupported = g_bIsUICCSupported || g_bIsESESupported;
+
+       g_bIsFeatureMismatched = false;
+       g_bIsServiceInitialized = false;
+       
+       int nRet = smartcard_initialize();
+       if ( !g_bIsSmartcardSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_initialize failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+                       g_bIsFeatureMismatched = true;
+               }
+               
+               FPRINTF("[Line : %d][%s] smartcard_initialize is unsupported\\n", __LINE__, API_NAMESPACE);
+               g_bIsFeatureMismatched = false;
+       }
+       else if ( nRet != SMARTCARD_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] smartcard_initialize failed, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+               g_bIsServiceInitialized = false;
+       }
+       else
+       {
+               g_bIsServiceInitialized = true;
+       }
+       
+       return;
+}
+
+/**
+ * @function           ITs_smartcard_service_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_smartcard_service_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Smartcard_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       int nRet = smartcard_deinitialize();
+       if ( !g_bIsSmartcardSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_deinitialize failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+               }
+               
+               FPRINTF("[Line : %d][%s] smartcard_deinitialize is unsupported\\n", __LINE__, API_NAMESPACE);
+       }
+       if ( nRet != SMARTCARD_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] smartcard_deinitialize failed, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+       }
+       return;
+}
+
+/** @addtogroup itc-smartcard-testcases
+*  @brief              Integration testcases for module smartcard
+*  @ingroup    itc-smartcard
+*  @{
+*/
+
+//& purpose Gets the list of available Secure Element readers
+//& type: auto
+/**
+* @testcase            ITc_smartcard_get_readers_p
+* @since_tizen         2.3.1
+* @type                        auto
+* @description         Gets the list of available Secure Element readers
+* @scenario                    Initialize smartcard service\n
+*                                      Get the list of available Secure Element readers\n
+*                                      De-initialize smartcard service
+* @apicovered          smartcard_get_readers
+* @passcase                    If smartcard_get_readers and all supporting APIs are successful
+* @failcase                    If smartcard_get_readers or any supporting API is failed
+* @precondition                NA
+* @postcondition       NA
+*/
+int ITc_smartcard_get_readers_p(void)
+{
+       START_TEST_CHECK_INITIALIZE;
+
+       int* pnReaders = NULL;
+       int nLength;
+       
+       // Target API
+       int nRet = smartcard_get_readers(&pnReaders, &nLength);
+       if ( nRet != SMARTCARD_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] smartcard_get_readers failed, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+               return 1;
+       }
+       FPRINTF("[Line : %d][%s] smartcard_get_readers returned %d readers\\n", __LINE__, API_NAMESPACE, nLength);
+       
+       if ( pnReaders != NULL )
+       {
+               free(pnReaders);
+               pnReaders = NULL;
+       }
+       
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/smartcard/ITs-smartcard-session.c b/src/itc/smartcard/ITs-smartcard-session.c
new file mode 100755 (executable)
index 0000000..f4575b7
--- /dev/null
@@ -0,0 +1,356 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-smartcard-common.h"
+
+/** @addtogroup itc-smartcard
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Smartcard
+
+int* g_pnReaders;
+int g_nLength;
+
+/**
+* @function            ITs_smartcard_session_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_smartcard_session_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Smartcard_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bIsUICCSupported = Smartcard_Check_System_Info_Feature_Supported(SE_UICC_FEATURE);
+       g_bIsESESupported = Smartcard_Check_System_Info_Feature_Supported(SE_ESE_FEATURE);
+       g_bIsSmartcardSupported = g_bIsUICCSupported || g_bIsESESupported;
+
+       g_bIsFeatureMismatched = false;
+       g_bIsServiceInitialized = false;
+       g_bIsReadersAvailable = false;
+
+       int nRet = smartcard_initialize();
+       if ( !g_bIsSmartcardSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_initialize failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+                       g_bIsFeatureMismatched = true;
+               }
+
+               FPRINTF("[Line : %d][%s] smartcard_initialize is unsupported\\n", __LINE__, API_NAMESPACE);
+               g_bIsFeatureMismatched = false;
+       }
+       else if ( nRet != SMARTCARD_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] smartcard_initialize failed, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+               g_bIsServiceInitialized = false;
+       }
+       else
+       {
+               g_bIsServiceInitialized = true;
+
+               nRet = smartcard_get_readers(&g_pnReaders, &g_nLength);
+               if ( !g_bIsSmartcardSupported )
+               {
+                       if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("[Line : %d][%s] smartcard_get_readers failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+                               g_bIsFeatureMismatched = true;
+                       }
+
+                       FPRINTF("[Line : %d][%s] smartcard_get_readers is unsupported\\n", __LINE__, API_NAMESPACE);
+                       g_bIsFeatureMismatched = false;
+               }
+               else if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_get_readers failed, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+                       g_bIsReadersAvailable = false;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_get_readers returned %d readers\\n", __LINE__, API_NAMESPACE, g_nLength);
+                       g_bIsReadersAvailable = true;
+               }
+       }
+
+       return;
+}
+
+/**
+* @function            ITs_smartcard_session_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_smartcard_session_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Smartcard_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       if ( g_pnReaders != NULL)
+       {
+               free(g_pnReaders);
+               g_pnReaders = NULL;
+       }
+
+       int nRet = smartcard_deinitialize();
+       if ( !g_bIsSmartcardSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_deinitialize failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+               }
+
+               FPRINTF("[Line : %d][%s] smartcard_deinitialize is unsupported\\n", __LINE__, API_NAMESPACE);
+       }
+       else if ( nRet != SMARTCARD_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] smartcard_deinitialize failed, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+       }
+
+       return;
+}
+
+/** @addtogroup itc-smartcard-testcases
+*  @brief              Integration testcases for module smartcard
+*  @ingroup    itc-smartcard
+*  @{
+*/
+
+//& purpose Checks if the given session is closed
+//& type: auto
+/**
+* @testcase            ITc_smartcard_session_is_closed_p
+* @since_tizen         2.3.1
+* @type                        auto
+* @description         Checks if the given session is closed
+* @scenario                    Initialize smartcard service\n
+*                                      Get the list of available Secure Element readers\n
+*                                      Open session to the Secure Element in a given reader\n
+*                                      Check if the given session is closed\n
+*                                      Close the session to the given reader\n
+*                                      Check if the given session is closed\n
+*                                      De-initialize smartcard service
+* @apicovered          smartcard_reader_open_session, smartcard_reader_close_sessions, smartcard_session_is_closed
+* @passcase                    If smartcard_session_is_closed and all supporting APIs are successful
+* @failcase                    If smartcard_session_is_closed or any supporting API is failed
+* @precondition                NA
+* @postcondition       NA
+*/
+int ITc_smartcard_session_is_closed_p(void)
+{
+       START_TEST_CHECK_READERS;
+
+       int nCounter;
+       for ( nCounter=0; nCounter<g_nLength; nCounter++ )
+       {
+               int nSession = false;
+
+               // Target API
+               int nRet = smartcard_reader_open_session(g_pnReaders[nCounter], &nSession);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_reader_open_session failed for reader %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter], SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_reader_open_session returned %d for reader %d\\n", __LINE__, API_NAMESPACE, nSession, g_pnReaders[nCounter]);
+
+               bool bIsClosed;
+
+               // Target API
+               nRet = smartcard_session_is_closed(nSession, &bIsClosed);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_session_is_closed failed for session %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, nSession, SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               if ( bIsClosed )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_session_is_closed incorrectly returned True for session %d\\n", __LINE__, API_NAMESPACE, nSession);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_session_is_closed correctly returned False for session %d\\n", __LINE__, API_NAMESPACE, nSession);
+
+               nRet = smartcard_reader_close_sessions(g_pnReaders[nCounter]);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_reader_close_sessions failed for reader %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter], SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_reader_close_sessions passed for reader %d\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter]);
+
+               // Target API
+               nRet = smartcard_session_is_closed(nSession, &bIsClosed);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_session_is_closed failed for session %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, nSession, SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               if ( !bIsClosed )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_session_is_closed incorrectly returned False for session %d\\n", __LINE__, API_NAMESPACE, nSession);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_session_is_closed correctly returned True for session %d\\n", __LINE__, API_NAMESPACE, nSession);
+       }
+
+       return 0;
+}
+
+//& purpose Gets the reader that provides the given session
+//& type: auto
+/**
+* @testcase            ITc_smartcard_session_get_reader_p
+* @since_tizen         2.3.1
+* @type                        auto
+* @description         Gets the reader that provides the given session
+* @scenario                    Initialize smartcard service\n
+*                                      Get the list of available Secure Element readers\n
+*                                      Open session to the Secure Element in a given reader\n
+*                                      Get the reader that provides the given session\n
+*                                      Close the session to the given reader\n
+*                                      De-initialize smartcard service
+* @apicovered          smartcard_reader_open_session, smartcard_session_get_reader, smartcard_reader_close_sessions
+* @passcase                    If smartcard_session_get_reader and all supporting APIs are successful
+* @failcase                    If smartcard_session_get_reader or any supporting API is failed
+* @precondition                NA
+* @postcondition       NA
+*/
+int ITc_smartcard_session_get_reader_p(void)
+{
+       START_TEST_CHECK_READERS;
+
+       int nCounter;
+       for ( nCounter=0; nCounter<g_nLength; nCounter++ )
+       {
+               int nSession = false;
+               int nRet = smartcard_reader_open_session(g_pnReaders[nCounter], &nSession);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_reader_open_session failed for reader %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter], SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_reader_open_session returned %d for reader %d\\n", __LINE__, API_NAMESPACE, nSession, g_pnReaders[nCounter]);
+
+               int nReader;
+
+               // Target API
+               nRet = smartcard_session_get_reader(nSession, &nReader);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_session_get_reader failed for session %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, nSession, SmartcardGetError(nRet), nRet);
+                       smartcard_reader_close_sessions(g_pnReaders[nCounter]);
+                       return 1;
+               }
+               if ( nReader != g_pnReaders[nCounter] )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_session_get_reader returned value %d mismatch with expected value %d for session %d\\n", __LINE__, API_NAMESPACE, nReader, g_pnReaders[nCounter], nSession);
+                       smartcard_reader_close_sessions(g_pnReaders[nCounter]);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_session_get_reader returned %d for session %d\\n", __LINE__, API_NAMESPACE, nReader, nSession);
+
+               nRet = smartcard_reader_close_sessions(g_pnReaders[nCounter]);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_reader_close_sessions failed for reader %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter], SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_reader_close_sessions passed for reader %d\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter]);
+       }
+
+       return 0;
+}
+
+//& purpose Gets the Answer to Reset(ATR) of a given Secure Element
+//& type: auto
+/**
+* @testcase            ITc_smartcard_session_get_atr_p
+* @since_tizen         2.3.1
+* @type                        auto
+* @description         Gets the Answer to Reset(ATR) of a given Secure Element
+* @scenario                    Initialize smartcard service\n
+*                                      Get the list of available Secure Element readers\n
+*                                      Open session to the Secure Element in a given reader\n
+*                                      Get the Answer to Reset(ATR) of this Secure Element\n
+*                                      Close the session to the given reader\n
+*                                      De-initialize smartcard service
+* @apicovered          smartcard_reader_open_session, smartcard_session_get_atr, smartcard_reader_close_sessions
+* @passcase                    If smartcard_session_get_atr and all supporting APIs are successful
+* @failcase                    If smartcard_session_get_atr or any supporting API is failed
+* @precondition                NA
+* @postcondition       NA
+*/
+int ITc_smartcard_session_get_atr_p(void)
+{
+       START_TEST_CHECK_READERS;
+
+       int nCounter;
+       for ( nCounter=0; nCounter<g_nLength; nCounter++ )
+       {
+               int nSession = false;
+               int nRet = smartcard_reader_open_session(g_pnReaders[nCounter], &nSession);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_reader_open_session failed for reader %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter], SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_reader_open_session returned %d for reader %d\\n", __LINE__, API_NAMESPACE, nSession, g_pnReaders[nCounter]);
+
+               unsigned char* pszAtr = NULL;
+               int nLength;
+
+               // Target API
+               nRet = smartcard_session_get_atr(nSession, &pszAtr, &nLength);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_session_get_atr failed for session %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, nSession, SmartcardGetError(nRet), nRet);
+                       smartcard_reader_close_sessions(g_pnReaders[nCounter]);
+                       return 1;
+               }
+
+               FPRINTF("[Line : %d][%s] smartcard_session_get_atr returned %s for session %d\\n", __LINE__, API_NAMESPACE, pszAtr, nSession);
+
+               if ( pszAtr != NULL )
+               {
+                       free(pszAtr);
+                       pszAtr = NULL;
+               }
+
+               nRet = smartcard_reader_close_sessions(g_pnReaders[nCounter]);
+               if ( nRet != SMARTCARD_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_reader_close_sessions failed for reader %d, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter], SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               FPRINTF("[Line : %d][%s] smartcard_reader_close_sessions passed for reader %d\\n", __LINE__, API_NAMESPACE, g_pnReaders[nCounter]);
+       }
+
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/smartcard/ITs-smartcard.c b/src/itc/smartcard/ITs-smartcard.c
new file mode 100755 (executable)
index 0000000..7fa8bc1
--- /dev/null
@@ -0,0 +1,130 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-smartcard-common.h"
+
+/** @addtogroup itc-smartcard
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Smartcard
+
+/**
+ * @function           ITs_smartcard_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_smartcard_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_Smartcard_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bIsUICCSupported = Smartcard_Check_System_Info_Feature_Supported(SE_UICC_FEATURE);
+       g_bIsESESupported = Smartcard_Check_System_Info_Feature_Supported(SE_ESE_FEATURE);
+       g_bIsSmartcardSupported = g_bIsUICCSupported || g_bIsESESupported;
+
+       return;
+}
+
+/**
+ * @function           ITs_smartcard_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_smartcard_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Smartcard_p\\n", __LINE__, API_NAMESPACE);
+#endif
+       return;
+}
+
+/** @addtogroup itc-smartcard-testcases
+*  @brief              Integration testcases for module smartcard
+*  @ingroup    itc-smartcard
+*  @{
+*/
+
+//& purpose Initializes and deinitializes smartcard service
+//& type: auto
+/**
+* @testcase            ITc_smartcard_initialize_deinitialize_p
+* @since_tizen         2.3.1
+* @type                        auto
+* @description         Initializes and deinitializes smartcard service
+* @scenario                    Initialize smartcard service\n
+*                                      De-initialize smartcard service
+* @apicovered          smartcard_initialize, smartcard_deinitialize
+* @passcase                    If initialization and deinitialization of service is successful
+* @failcase                    If failed to initialize or deinitialize the service
+* @precondition                NA
+* @postcondition       NA
+*/
+int ITc_smartcard_initialize_deinitialize_p(void)
+{
+       START_TEST;
+
+       // Target API
+       int nRet = smartcard_initialize();
+       if ( !g_bIsSmartcardSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_initialize failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               
+               FPRINTF("[Line : %d][%s] smartcard_initialize is unsupported\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( nRet != SMARTCARD_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] smartcard_initialize failed, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+               return 1;
+       }
+
+       // Target API
+       nRet = smartcard_deinitialize();
+       if ( !g_bIsSmartcardSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] smartcard_deinitialize failed to return TIZEN_ERROR_NOT_SUPPORTED for unsupported feature, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+                       return 1;
+               }
+               
+               FPRINTF("[Line : %d][%s] smartcard_deinitialize is unsupported\\n", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       if ( nRet != SMARTCARD_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] smartcard_deinitialize failed, error returned = %s (%d)\\n", __LINE__, API_NAMESPACE, SmartcardGetError(nRet), nRet);
+               return 1;
+       }
+
+       return 0;
+}
+
+/** @} */
+/** @} */
\ No newline at end of file
diff --git a/src/itc/smartcard/tct-smartcard-native.c b/src/itc/smartcard/tct-smartcard-native.c
new file mode 100755 (executable)
index 0000000..b02410b
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-smartcard-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/smartcard/tct-smartcard-native.h b/src/itc/smartcard/tct-smartcard-native.h
new file mode 100755 (executable)
index 0000000..415e9fd
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SMARTCARD_NATIVE_H__
+#define __TCT_SMARTCARD_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_smartcard_reader_startup(void);
+extern void ITs_smartcard_reader_cleanup(void);
+extern void ITs_smartcard_service_startup(void);
+extern void ITs_smartcard_service_cleanup(void);
+extern void ITs_smartcard_session_startup(void);
+extern void ITs_smartcard_session_cleanup(void);
+extern void ITs_smartcard_startup(void);
+extern void ITs_smartcard_cleanup(void);
+
+extern int ITc_smartcard_reader_get_name_p(void);
+extern int ITc_smartcard_reader_is_secure_element_present_p(void);
+extern int ITc_smartcard_reader_open_close_session_p(void);
+extern int ITc_smartcard_get_readers_p(void);
+extern int ITc_smartcard_session_is_closed_p(void);
+extern int ITc_smartcard_session_get_reader_p(void);
+extern int ITc_smartcard_session_get_atr_p(void);
+extern int ITc_smartcard_initialize_deinitialize_p(void);
+
+testcase tc_array[] = {
+    {"ITc_smartcard_reader_get_name_p", ITc_smartcard_reader_get_name_p, ITs_smartcard_reader_startup, ITs_smartcard_reader_cleanup},
+    {"ITc_smartcard_reader_is_secure_element_present_p", ITc_smartcard_reader_is_secure_element_present_p, ITs_smartcard_reader_startup, ITs_smartcard_reader_cleanup},
+    {"ITc_smartcard_reader_open_close_session_p", ITc_smartcard_reader_open_close_session_p, ITs_smartcard_reader_startup, ITs_smartcard_reader_cleanup},
+    {"ITc_smartcard_get_readers_p", ITc_smartcard_get_readers_p, ITs_smartcard_service_startup, ITs_smartcard_service_cleanup},
+    {"ITc_smartcard_session_is_closed_p", ITc_smartcard_session_is_closed_p, ITs_smartcard_session_startup, ITs_smartcard_session_cleanup},
+    {"ITc_smartcard_session_get_reader_p", ITc_smartcard_session_get_reader_p, ITs_smartcard_session_startup, ITs_smartcard_session_cleanup},
+    {"ITc_smartcard_session_get_atr_p", ITc_smartcard_session_get_atr_p, ITs_smartcard_session_startup, ITs_smartcard_session_cleanup},
+    {"ITc_smartcard_initialize_deinitialize_p", ITc_smartcard_initialize_deinitialize_p, ITs_smartcard_startup, ITs_smartcard_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SMARTCARD_NATIVE_H__
diff --git a/src/itc/sound-manager/CMakeLists.txt b/src/itc/sound-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..79fcdaf
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "sound-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-sound-manager")
+SET(TC_SOURCES
+       ITs-sound-manager-common.c
+       ITs-sound-manager.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-media-tone-player
+       capi-media-player
+       glib-2.0
+       bundle
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/sound-manager/ITs-sound-manager-common.c b/src/itc/sound-manager/ITs-sound-manager-common.c
new file mode 100755 (executable)
index 0000000..63080c2
--- /dev/null
@@ -0,0 +1,550 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-sound-manager-common.h"
+
+/** @addtogroup itc-sound-manager
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stSoundManagerStartTime;
+extern struct mallinfo g_stSoundManagerMemInfo;
+
+/**
+* @function            SoundManagerGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* SoundManagerGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case SOUND_MANAGER_ERROR_NONE:                                  szErrorVal = "SOUND_MANAGER_ERROR_NONE";                                        break;
+       case SOUND_MANAGER_ERROR_OUT_OF_MEMORY:                 szErrorVal = "SOUND_MANAGER_ERROR_OUT_OF_MEMORY";                       break;
+       case SOUND_MANAGER_ERROR_INVALID_PARAMETER:             szErrorVal = "SOUND_MANAGER_ERROR_INVALID_PARAMETER";           break;
+       case SOUND_MANAGER_ERROR_INVALID_OPERATION:             szErrorVal = "SOUND_MANAGER_ERROR_INVALID_OPERATION";           break;
+       case SOUND_MANAGER_ERROR_PERMISSION_DENIED:             szErrorVal = "SOUND_MANAGER_ERROR_PERMISSION_DENIED";           break;
+       case SOUND_MANAGER_ERROR_NOT_SUPPORTED:                 szErrorVal = "SOUND_MANAGER_ERROR_NOT_SUPPORTED";                       break;
+       case SOUND_MANAGER_ERROR_NO_DATA:                               szErrorVal = "SOUND_MANAGER_ERROR_NO_DATA";                                     break;
+       case SOUND_MANAGER_ERROR_NO_PLAYING_SOUND:              szErrorVal = "SOUND_MANAGER_ERROR_NO_PLAYING_SOUND";            break;
+       case SOUND_MANAGER_ERROR_INTERNAL:                              szErrorVal = "SOUND_MANAGER_ERROR_INTERNAL";                            break;
+       case SOUND_MANAGER_ERROR_POLICY:                                szErrorVal = "SOUND_MANAGER_ERROR_POLICY";                                      break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                           break;
+       }
+       return szErrorVal;
+}
+
+
+/**
+* @function            SoundManagerGetType
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* SoundManagerGetType(int nType)
+{
+       char *szTypeVal = NULL;
+
+       switch(nType)
+       {
+       case SOUND_DEVICE_BUILTIN_SPEAKER : szTypeVal = "Built-In Speaker" ; break; 
+       case SOUND_DEVICE_BUILTIN_RECEIVER : szTypeVal = "Built-In Receiver" ; break; 
+       case SOUND_DEVICE_BUILTIN_MIC : szTypeVal = "Built-In Mic" ; break; 
+       case SOUND_DEVICE_AUDIO_JACK : szTypeVal = "Audio Jack" ; break;
+       case SOUND_DEVICE_BLUETOOTH : szTypeVal = "Bluetooth" ; break;
+       case SOUND_DEVICE_HDMI : szTypeVal = "HDMI" ; break;
+       case SOUND_DEVICE_MIRRORING : szTypeVal = "Mirroring" ; break;
+       case SOUND_DEVICE_USB_AUDIO : szTypeVal = "USB Audio" ; break;
+       default : szTypeVal = "UNKNOWN" ; break;
+       }
+       return szTypeVal;
+}
+
+/**
+* @function            SoundManagerGetSoundType
+* @description         Maps SoundType enums to string values
+* @parameter           nRet : SoundType code returned
+* @return                      SoundType string
+*/
+char* SoundManagerGetSoundType(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case SOUND_TYPE_SYSTEM:                                 szErrorVal = "SOUND_TYPE_SYSTEM";                       break;
+       case SOUND_TYPE_NOTIFICATION:                   szErrorVal = "SOUND_TYPE_NOTIFICATION";         break;
+       case SOUND_TYPE_ALARM:                                  szErrorVal = "SOUND_TYPE_ALARM";                        break;
+       case SOUND_TYPE_RINGTONE:                               szErrorVal = "SOUND_TYPE_RINGTONE";                     break;
+       case SOUND_TYPE_MEDIA:                                  szErrorVal = "SOUND_TYPE_MEDIA";                        break;
+       case SOUND_TYPE_CALL:                                   szErrorVal = "SOUND_TYPE_CALL";                         break;
+       case SOUND_TYPE_VOIP:                                   szErrorVal = "SOUND_TYPE_VOIP";                         break;
+       case SOUND_TYPE_VOICE:                                  szErrorVal = "SOUND_TYPE_VOICE";                        break;
+       default:                                                                szErrorVal = "Unknown Type";                            break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           SoundManagerGetSoundSessionType
+ * @description                Maps SoundSessionType enums to string values
+ * @parameter          nRet : SoundSessionType code returned
+ * @return                     SoundSessionType string
+ */
+char* SoundManagerGetSoundSessionType(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SOUND_SESSION_TYPE_MEDIA : szErrorVal = "SOUND_SESSION_TYPE_MEDIA" ; break;
+               case SOUND_SESSION_TYPE_ALARM : szErrorVal = "SOUND_SESSION_TYPE_ALARM" ; break; 
+               case SOUND_SESSION_TYPE_EMERGENCY : szErrorVal = "SOUND_SESSION_TYPE_EMERGENCY" ; break;
+               case SOUND_SESSION_TYPE_NOTIFICATION : szErrorVal = "SOUND_SESSION_TYPE_NOTIFICATION" ; break;
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}
+
+
+/**
+ * @function           SoundManagerGetSoundSessionWatchType
+ * @description                Maps SoundSessionWatchType enums to string values
+ * @parameter          nRet : SoundSessionWatchType code returned
+ * @return                     SoundSessionWatchType string
+ */
+/*char* SoundManagerGetSoundSessionWatchType(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SOUND_SESSION_WATCH_TYPE_CALL : szErrorVal = "SOUND_SESSION_WATCH_TYPE_CALL" ; break; 
+               case SOUND_SESSION_WATCH_TYPE_VIDEO_CALL : szErrorVal = "SOUND_SESSION_WATCH_TYPE_VIDEO_CALL" ; break; 
+               case SOUND_SESSION_WATCH_TYPE_ALARM : szErrorVal = "SOUND_SESSION_WATCH_TYPE_ALARM" ; break; 
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}*/
+
+/**
+ * @function           SoundManagerGetSoundSessionWatchState
+ * @description                Maps SoundSessionWatchState enums to string values
+ * @parameter          nRet : SoundSessionWatchState code returned
+ * @return                     SoundSessionWatchState string
+ */
+/*char* SoundManagerGetSoundSessionWatchState(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SOUND_SESSION_WATCH_STATE_STOP : szErrorVal = "SOUND_SESSION_WATCH_STATE_STOP" ; break; 
+               case SOUND_SESSION_WATCH_STATE_START : szErrorVal = "SOUND_SESSION_WATCH_STATE_START" ; break; 
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}*/
+
+/**
+ * @function           SoundManagerGetSoundDeviceIn
+ * @description                Maps SoundDeviceIn enums to string values
+ * @parameter          nRet : SoundDeviceIn code returned
+ * @return                     SoundDeviceIn string
+ */
+/*char* SoundManagerGetSoundDeviceIn(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SOUND_DEVICE_IN_MIC : szErrorVal = "SOUND_DEVICE_IN_MIC" ; break; 
+               case SOUND_DEVICE_IN_WIRED_ACCESSORY : szErrorVal = "SOUND_DEVICE_IN_WIRED_ACCESSORY" ; break; 
+               case SOUND_DEVICE_IN_BT_SCO : szErrorVal = "SOUND_DEVICE_IN_BT_SCO" ; break; 
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}*/
+
+/**
+ * @function           SoundManagerGetSoundDeviceOut
+ * @description                Maps SoundDeviceOut enums to string values
+ * @parameter          nRet : SoundDeviceOut code returned
+ * @return                     SoundDeviceOut string
+ */
+/*char* SoundManagerGetSoundDeviceOut(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SOUND_DEVICE_OUT_SPEAKER : szErrorVal = "SOUND_DEVICE_OUT_SPEAKER" ; break;
+               case SOUND_DEVICE_OUT_RECEIVER : szErrorVal = "SOUND_DEVICE_OUT_RECEIVER" ; break;
+               case SOUND_DEVICE_OUT_WIRED_ACCESSORY : szErrorVal = "SOUND_DEVICE_OUT_WIRED_ACCESSORY" ; break; 
+               case SOUND_DEVICE_OUT_BT_A2DP : szErrorVal = "SOUND_DEVICE_OUT_BT_A2DP" ; break; 
+               case SOUND_DEVICE_OUT_DOCK : szErrorVal = "SOUND_DEVICE_OUT_DOCK" ; break; 
+               case SOUND_DEVICE_OUT_HDMI : szErrorVal = "SOUND_DEVICE_OUT_HDMI" ; break; 
+               case SOUND_DEVICE_OUT_MIRRORING : szErrorVal = "SOUND_DEVICE_OUT_MIRRORING" ; break; 
+               case SOUND_DEVICE_OUT_USB_AUDIO : szErrorVal = "SOUND_DEVICE_OUT_USB_AUDIO" ; break; 
+               case SOUND_DEVICE_OUT_MULTIMEDIA_DOCK : szErrorVal = "SOUND_DEVICE_OUT_MULTIMEDIA_DOCK" ; break; 
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}*/
+
+/**
+ * @function           SoundManagerGetSoundSessionCallType
+ * @description                Maps SoundSessionCallType enums to string values
+ * @parameter          nRet : SoundSessionCallType code returned
+ * @return                     SoundSessionCallType string
+ */
+/*char* SoundManagerGetSoundSessionCallType(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SOUND_CALL_SESSION_TYPE_CALL : szErrorVal = "SOUND_CALL_SESSION_TYPE_CALL" ; break; 
+               case SOUND_CALL_SESSION_TYPE_VOIP : szErrorVal = "SOUND_CALL_SESSION_TYPE_VOIP" ; break; 
+               //case SOUND_SESSION_TYPE_CALL : szErrorVal = "SOUND_SESSION_TYPE_CALL" ; break; 
+               //case SOUND_SESSION_TYPE_VOIP : szErrorVal = "SOUND_SESSION_TYPE_VOIP" ; break; 
+               //case SOUND_SESSION_TYPE_VIDEOCALL : szErrorVal = "SOUND_SESSION_TYPE_VIDEOCALL" ; break; 
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}*/
+
+/**
+ * @function           SoundManagerGetSoundSessionCallMode
+ * @description                Maps SoundSessionCallMode enums to string values
+ * @parameter          nRet : SoundSessionCallMode code returned
+ * @return                     SoundSessionCallMode string
+ */
+/*char* SoundManagerGetSoundSessionCallMode(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SOUND_CALL_SESSION_MODE_VOICE : szErrorVal = "SOUND_CALL_SESSION_MODE_VOICE" ; break; 
+               case SOUND_CALL_SESSION_MODE_RINGTONE : szErrorVal = "SOUND_CALL_SESSION_MODE_RINGTONE" ; break; 
+               case SOUND_CALL_SESSION_MODE_MEDIA : szErrorVal = "SOUND_CALL_SESSION_MODE_MEDIA" ; break; 
+               case SOUND_CALL_SESSION_MODE_VOICE_ANSWER_PLAY : szErrorVal = "SOUND_CALL_SESSION_MODE_VOICE_ANSWER_PLAY" ; break; 
+               case SOUND_CALL_SESSION_MODE_VOICE_ANSWER_REC : szErrorVal = "SOUND_CALL_SESSION_MODE_VOICE_ANSWER_REC" ; break; 
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}*/
+
+/**
+ * @function           SoundManagerGetSoundMultiSessionMode
+ * @description                Maps SoundMultiSessionMode enums to string values
+ * @parameter          nRet : SoundMultiSessionMode code returned
+ * @return                     SoundMultiSessionMode string
+ */
+/*char* SoundManagerGetSoundMultiSessionMode(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SOUND_MULTI_SESSION_MODE_INIT : szErrorVal = "SOUND_MULTI_SESSION_MODE_INIT" ; break; 
+               case SOUND_MULTI_SESSION_MODE_VR_NORMAL : szErrorVal = "SOUND_MULTI_SESSION_MODE_VR_NORMAL" ; break; 
+               case SOUND_MULTI_SESSION_MODE_VR_DRIVE : szErrorVal = "SOUND_MULTI_SESSION_MODE_VR_DRIVE" ; break; 
+               case SOUND_MULTI_SESSION_MODE_RECORD_STEREO : szErrorVal = "SOUND_MULTI_SESSION_MODE_RECORD_STEREO" ; break; 
+               case SOUND_MULTI_SESSION_MODE_RECORD_STEREO_FOR_INTERVIEW : szErrorVal = "SOUND_MULTI_SESSION_MODE_RECORD_STEREO_FOR_INTERVIEW" ; break; 
+               case SOUND_MULTI_SESSION_MODE_RECORD_STEREO_FOR_CONVERSATION : szErrorVal = "SOUND_MULTI_SESSION_MODE_RECORD_STEREO_FOR_CONVERSATION" ; break; 
+               case SOUND_MULTI_SESSION_MODE_RECORD_MONO : szErrorVal = "SOUND_MULTI_SESSION_MODE_RECORD_MONO" ; break;                
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}*/
+
+/**
+ * @function           SoundManagerGetSoundMultiSessionType
+ * @description                Maps SoundMultiSessionType enums to string values
+ * @parameter          nRet : SoundMultiSessionType code returned
+ * @return                     SoundMultiSessionType string
+ */
+/*char* SoundManagerGetSoundMultiSessionType(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SOUND_MULTI_SESSION_TYPE_VOICE_RECOGNITION : szErrorVal = "SOUND_MULTI_SESSION_TYPE_VOICE_RECOGNITION" ; break; 
+               case SOUND_MULTI_SESSION_TYPE_RECORD_AUDIO : szErrorVal = "SOUND_MULTI_SESSION_TYPE_RECORD_AUDIO" ; break; 
+               case SOUND_MULTI_SESSION_TYPE_RECORD_VIDEO : szErrorVal = "SOUND_MULTI_SESSION_TYPE_RECORD_VIDEO" ; break; 
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}*/
+
+/**
+ * @function           SoundManagerGetSoundMultiSessionOption
+ * @description                Maps SoundMultiSessionOption enums to string values
+ * @parameter          nRet : SoundMultiSessionOption code returned
+ * @return                     SoundMultiSessionOption string
+ */
+/*char* SoundManagerGetSoundMultiSessionOption(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SOUND_MULTI_SESSION_OPT_RESUME_OTHERS : szErrorVal = "SOUND_MULTI_SESSION_OPT_RESUME_OTHERS" ; break; 
+               case SOUND_MULTI_SESSION_OPT_MIX_WITH_OTHERS : szErrorVal = "SOUND_MULTI_SESSION_OPT_MIX_WITH_OTHERS" ; break; 
+               case SOUND_MULTI_SESSION_OPT_PAUSE_OTHERS : szErrorVal = "SOUND_MULTI_SESSION_OPT_PAUSE_OTHERS" ; break; 
+               case SOUND_MULTI_SESSION_OPT_RESET_OTHERS_RESUME_INFO : szErrorVal = "SOUND_MULTI_SESSION_OPT_RESET_OTHERS_RESUME_INFO" ; break; 
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}*/
+
+/**
+ * @function           SoundManagerGetSoundRoute
+ * @description                Maps SoundRoute enums to string values
+ * @parameter          nRet : SoundRoute code returned
+ * @return                     SoundRoute string
+ */
+/*char* SoundManagerGetSoundRoute(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SOUND_ROUTE_OUT_SPEAKER: szErrorVal = "SOUND_DEVICE_OUT_SPEAKER" ; break;  //Routing audio output to builtin device such as internal speaker.
+               case SOUND_ROUTE_OUT_RECEIVER: szErrorVal = "SOUND_DEVICE_OUT_RECEIVER" ; break;  //Routing audio output to builtin device such as internal receiver.
+               case SOUND_ROUTE_OUT_WIRED_ACCESSORY: szErrorVal = "SOUND_DEVICE_OUT_WIRED_ACCESSORY"; break; //Routing audio output to wired accessory such as headphone ; break;  headset break;  and so on.
+               case SOUND_ROUTE_OUT_DOCK: szErrorVal = "SOUND_DEVICE_OUT_DOCK" ; break;  //Routing audio output to DOCK
+               case SOUND_ROUTE_OUT_HDMI: szErrorVal = "SOUND_DEVICE_OUT_HDMI" ; break;  //Routing audio output to HDMI
+               case SOUND_ROUTE_OUT_MIRRORING: szErrorVal = "SOUND_DEVICE_OUT_MIRRORING" ; break;  //Routing audio output to MIRRORING
+               case SOUND_ROUTE_OUT_USB_AUDIO: szErrorVal = "SOUND_DEVICE_OUT_USB_AUDIO" ; break;  //Routing audio output to USB Audio
+               case SOUND_ROUTE_OUT_MULTIMEDIA_DOCK: szErrorVal = "SOUND_DEVICE_OUT_MULTIMEDIA_DOCK" ; break;  //Routing audio output to Multimedia DOCK
+               case SOUND_ROUTE_IN_MIC: szErrorVal = "SOUND_DEVICE_IN_MIC" ; break;  //Routing audio input to device builtin mic
+               case SOUND_ROUTE_IN_WIRED_ACCESSORY: szErrorVal = "SOUND_DEVICE_IN_WIRED_ACCESSORY" ; break;  //Routing audio input to wired accessory
+               case SOUND_ROUTE_IN_MIC_OUT_RECEIVER: szErrorVal = "SOUND_DEVICE_IN_MIC |SOUND_DEVICE_OUT_RECEIVER" ; break;  //Routing audio input to device builtin mic and routing audio output to builtin receiver
+               case SOUND_ROUTE_IN_MIC_OUT_SPEAKER: szErrorVal = "SOUND_DEVICE_IN_MIC |SOUND_DEVICE_OUT_SPEAKER"  ; break;  //Routing audio input to device builtin mic and routing audio output to builtin speaker
+               case SOUND_ROUTE_IN_MIC_OUT_HEADPHONE: szErrorVal = "SOUND_DEVICE_IN_MIC | SOUND_DEVICE_OUT_WIRED_ACCESSORY" ; break; //Routing audio input to device builtin mic and routing audio output to headphone
+               default : szErrorVal = "UNKNOWN" ; break;
+       }
+       return szErrorVal;
+}*/
+
+/**
+* @function                    SoundManagerGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void SoundManagerGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stSoundManagerMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stSoundManagerMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stSoundManagerMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    SoundManagerGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void SoundManagerGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stSoundManagerMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void SoundManagerExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stSoundManagerStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stSoundManagerStartTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           SystemGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stSoundManagerStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void SoundManagerGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stSoundManagerStartTime, NULL);
+#endif
+}
+
+/**
+ * @function           SoundManagerPlayTone
+ * @description                play tone
+ * @parameter          int
+ * @return                     int
+ *
+ */
+int SoundManagerPlayTone(int time)
+{
+       return tone_player_start(TONE_TYPE_DEFAULT, SOUND_TYPE_MEDIA,time, NULL);
+}
+
+/**
+ * @function           SoundManagerStartPlayer
+ * @description                start player
+ * @parameter          char*
+ * @return                     player_h
+ *
+ */
+player_h SoundManagerStartPlayer(char* pszUrl)
+{
+       player_h hPlayer;
+       int nRet = player_create(&hPlayer);
+       fprintf(fpLog,"[Line : %d][SoundManager_ITc]player_create ret =%s\n",__LINE__, ((nRet == 0)? "true" :"false"));
+       nRet = player_set_uri(hPlayer, pszUrl);
+       fprintf(fpLog,"[Line : %d][SoundManager_ITc]player_set_uri ret =%s , %s\n",__LINE__, ((nRet == 0)? "true" :"false") , pszUrl);
+       nRet = player_prepare(hPlayer);
+       fprintf(fpLog,"[Line : %d][SoundManager_ITc]player_prepare ret =%s\n",__LINE__, ((nRet == 0)? "true" :"false"));
+       nRet = player_start(hPlayer);
+       fprintf(fpLog,"[Line : %d][SoundManager_ITc]player_start ret =%s\n",__LINE__, ((nRet == 0)? "true" :"false"));
+
+       return hPlayer;
+}
+
+/**
+ * @function           SoundManagerStopPlayer
+ * @description                stop player
+ * @parameter          player_h
+ * @return                     int
+ *
+ */
+int SoundManagerStopPlayer(player_h hPlayer)
+{
+       int nRet = player_stop(hPlayer);
+       fprintf(fpLog,"[Line : %d][SoundManager_ITc]player_stop ret =%s\n",__LINE__, ((nRet == 0)? "true" :"false"));
+       nRet = player_unprepare(hPlayer);
+       fprintf(fpLog,"[Line : %d][SoundManager_ITc]player_unprepared ret =%s\n",__LINE__, ((nRet == 0)? "true" :"false"));
+       nRet = player_destroy(hPlayer);
+       fprintf(fpLog,"[Line : %d][SoundManager_ITc]player_destroy ret =%s\n",__LINE__, ((nRet == 0)? "true" :"false"));
+       return nRet;
+}
+
+/**
+ * @function           Sound_Manager_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Sound_Manager_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if(NULL == pszKey)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc] Null key value passed to function : Sound_Manager_Check_System_Info_Feature_Supported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc] system_info_get_platform_bool returned (error = %s) for (key = %s)",__LINE__, Sound_Manager_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if(false == bValue)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc] system_info_get_platform_bool returned Supported status feature for (key = %s)",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           Sound_Manager_System_Info_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* Sound_Manager_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Cannot find key in model config file " ; break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR  : szErrorVal = "Error - An input/output error occurred when read value from model config file " ; break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY   : szErrorVal = "Error - Out of memory  " ; break;
+                       
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/sound-manager/ITs-sound-manager-common.h b/src/itc/sound-manager/ITs-sound-manager-common.h
new file mode 100755 (executable)
index 0000000..7d44945
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_SOUND_MANAGER_COMMON_H_
+#define _ITS_SOUND_MANAGER_COMMON_H_
+
+/************************** Headers **********************************************/
+#include "assert.h"
+#include <malloc.h>
+#include <stdlib.h>
+#include <glib-2.0/glib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <sound_manager.h>
+#include <tone_player.h>
+#include <player.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <system_info.h>
+
+/** @addtogroup itc-sound-manager
+*  @ingroup itc
+*  @{
+*/
+
+FILE *fpLog;
+
+// Non-Functional Test Macros
+
+#define LOG                                                    100
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define FEATURE_MICROPHONE                     "http://tizen.org/feature/microphone"
+
+//helper function declarations here
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][SoundManager_ITc]Starting test : %s\\n",__LINE__,__FUNCTION__);\
+}
+
+#define FPRINTF(...) {\
+       fpLog = fopen(ERR_LOG,"a");\
+       fprintf (fpLog, __VA_ARGS__);\
+       fclose(fpLog);\
+}
+
+
+#define PRINT_SPEED_LOG(api, speedLog) {\
+       if(strlen(speedLog) > 0)\
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s_TimeInMicrosec- %s\\n",__LINE__, #api, speedLog);\
+       }\
+       free(speedLog);\
+       speedLog = NULL;\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog){\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d][SoundManager_ITc] %s_MemoryLeakStatus - %s\\n",__LINE__, #api, memLog);\
+       }\
+       free(memLog);\
+       memLog = NULL;\
+}
+
+#define PRINT_POST_RESULT(nRetVal, API) {\
+       if (nRetVal != SOUND_MANAGER_ERROR_NONE)\
+       {\
+               FPRINTF("[Line : %d][SoundManager_ITc] %s failed in post-condition, error returned = %s \\n",__LINE__, API, SoundManagerGetError(nRetVal));\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == SOUND_MANAGER_ERROR_NONE)\
+       {\
+               FPRINTF("[Line : %d][SoundManager_ITc] %s passed\\n",__LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][SoundManager_ITc] %s failed in pre-condition, error returned = %s \\n",__LINE__, API, SoundManagerGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+
+char* SoundManagerGetError(int nRet);
+char* SoundManagerGetSoundType(int nRet);
+char* SoundManagerGetSoundSessionType(int nRet);
+char* SoundManagerGetType(int nType);
+//char* SoundManagerGetSoundSessionWatchType(int nRet);
+//char* SoundManagerGetSoundSessionWatchState(int nRet);
+//char* SoundManagerGetSoundDeviceIn(int nRet);
+//char* SoundManagerGetSoundDeviceOut(int nRet);
+//char* SoundManagerGetSoundSessionCallType(int nRet);
+//char* SoundManagerGetSoundSessionCallMode(int nRet);
+//char* SoundManagerGetSoundMultiSessionMode(int nRet);
+//char* SoundManagerGetSoundMultiSessionType(int nRet);
+//char* SoundManagerGetSoundMultiSessionOption(int nRet);
+//char* SoundManagerGetSoundRoute(int nRet);
+
+void SoundManagerGetMemAllocation();
+void SoundManagerExecutionDelay(char* pszAPITime);
+void SoundManagerGetTimeOfDay();
+void SoundManagerGetMemStatus(char *pszAPIMemory);
+
+int SoundManagerPlayTone(int time);
+
+player_h SoundManagerStartPlayer(char* pszUrl);
+int SoundManagerStopPlayer(player_h hPlayer);
+
+bool Sound_Manager_Check_System_Info_Feature_Supported(char* pszKey);
+char* Sound_Manager_System_Info_GetError(int nRet);
+
+/** @} */
+#endif  //_ITS_SOUND_MANAGER_COMMON_H_
diff --git a/src/itc/sound-manager/ITs-sound-manager.c b/src/itc/sound-manager/ITs-sound-manager.c
new file mode 100755 (executable)
index 0000000..d105b37
--- /dev/null
@@ -0,0 +1,2555 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-sound-manager-common.h"
+/** @addtogroup itc-sound-manager
+*  @ingroup itc
+*  @{
+*/
+//& set: SoundManager
+struct timeval g_stSoundManagerStartTime;
+struct mallinfo g_stSoundManagerMemInfo;
+
+char* g_pszSoundAvailableRouteFromCallBack;
+char* g_pszSoundChangedRouteFromCallBack;
+char* g_pszDeviceIN ;
+char* g_pszDeviceOut;
+
+static GMainLoop *g_pMainLoop;
+static bool g_bCallbackResult = false;
+gboolean Timeout_Function(gpointer data);
+
+static bool g_bSupportedFeatureMicrophone = false;
+
+/**
+* @function            Timeout_Function
+* @description         callback function to terminate g_main loop
+* @parameter           data : user data sent to callback
+* @return                      NA
+*/
+gboolean Timeout_Function(gpointer data)
+{
+       g_main_loop_quit((GMainLoop *)data);
+       return false;
+}
+
+/**
+* @function            ITs_sound_manager_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_sound_manager_startup(void)
+{
+       struct stat buf;
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       g_bCallbackResult = false;
+
+       g_bSupportedFeatureMicrophone = Sound_Manager_Check_System_Info_Feature_Supported(FEATURE_MICROPHONE);
+       
+       return;
+}
+
+/**
+* @function            ITs_sound_manager_cleanup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_sound_manager_cleanup(void)
+{
+       g_pszSoundAvailableRouteFromCallBack = NULL;
+       g_pszSoundChangedRouteFromCallBack = NULL;
+       g_pszDeviceIN = NULL;
+       g_pszDeviceOut = NULL;
+       return;
+}
+
+/**
+* @function            test_sound_interrupted_cb
+* @description         callback function for interrupt
+* @parameter           code : interruption code, user_data : user data
+* @return                      NA
+*/
+static void test_sound_interrupted_cb(sound_session_interrupted_code_e code, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][SoundManager_ITc]Inside callback \"test_sound_interrupted_cb\"",__LINE__);
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+       FPRINTF("\\n[Line : %d][SoundManager_ITc]Outside from callback \"test_sound_interrupted_cb\" \\n",__LINE__);
+}
+
+/**
+* @function            test_sound_manager_volume_changed_cb
+* @description         callback function for volume change
+* @parameter           type : sound type, volume: volume, user_data : user data
+* @return                      NA
+*/
+static void test_sound_manager_volume_changed_cb(sound_type_e type, unsigned int volume, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][SoundManager_ITc]Inside callback \"test_sound_manager_volume_changed_cb\"",__LINE__);
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+       FPRINTF("\\n[Line : %d][SoundManager_ITc]Outside from callback \"test_sound_manager_volume_changed_cb\" \\n",__LINE__);
+}
+
+/**
+* @function            test_sound_manager_device_connected_cb
+* @description         callback function for volume change
+* @parameter           device : sound device, is_connected: connection state, user_data : user data
+* @return                      NA
+*/
+static void test_sound_manager_device_connected_cb(sound_device_h device, bool is_connected, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][SoundManager_ITc]Inside callback \"test_sound_manager_device_connected_cb\"",__LINE__);
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+       FPRINTF("\\n[Line : %d][SoundManager_ITc]Outside from callback \"test_sound_manager_device_connected_cb\" \\n",__LINE__);
+}
+
+/**
+* @function            test_sound_manager_info_changed_cb
+* @description         callback function for volume change
+* @parameter           device : sound device, changed_info: device change info, user_data : user data
+* @return                      NA
+*/
+static void test_sound_manager_info_changed_cb(sound_device_h device, sound_device_changed_info_e changed_info, void *user_data)
+{
+       FPRINTF("\\n[Line : %d][SoundManager_ITc]Inside callback \"test_sound_manager_info_changed_cb\"",__LINE__);
+       g_bCallbackResult = true;
+       if (g_pMainLoop)
+       {
+               g_main_loop_quit(g_pMainLoop);
+       }
+       FPRINTF("\\n[Line : %d][SoundManager_ITc]Outside from callback \"test_sound_manager_info_changed_cb\" \\n",__LINE__);
+}
+
+/** @addtogroup itc-sound-manager-testcases
+*  @brief              Integration testcases for module sound-manager
+*  @ingroup    itc-sound-manager
+*  @{
+*/
+
+//& purpose: To check get max volume level supported for a particular sound type
+//& type : auto
+/**
+* @testcase                    ITc_sound_manager_sound_manager_get_max_volume_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check get max volume level supported for a particular sound type
+* @scenario                            Call API to get maximum volume level
+* @apicovered                  sound_manager_get_max_volume
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_sound_manager_get_max_volume_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nEnumLoopCount = 0, nGetFailCount = 0, nResultSoundLevel = -1;
+       
+       char *pszGetSpeedLog = NULL;
+       char *pszGetMemLog = NULL;
+
+       sound_type_e eSoundType;
+       int arrSoundTypeValues[] = {SOUND_TYPE_SYSTEM , SOUND_TYPE_NOTIFICATION , SOUND_TYPE_ALARM , SOUND_TYPE_RINGTONE , SOUND_TYPE_MEDIA , SOUND_TYPE_CALL , SOUND_TYPE_VOIP ,  SOUND_TYPE_VOICE};
+       int nSoundTypeIteration = sizeof(arrSoundTypeValues) /sizeof(arrSoundTypeValues[0]) ;
+
+#if SPEED_CHECK
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundTypeIteration , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszGetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundTypeIteration, sizeof(char));
+#endif
+       for(nEnumLoopCount = 0 ; nEnumLoopCount < nSoundTypeIteration ; nEnumLoopCount++ )
+       {
+               eSoundType = arrSoundTypeValues[nEnumLoopCount];
+
+               nResultSoundLevel = -1 ;
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_get_max_volume(eSoundType, &nResultSoundLevel);
+                       SoundManagerExecutionDelay(pszGetSpeedLog);
+                       SoundManagerGetMemStatus(pszGetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_max_volume failed on iteration %d, error returned = %s \\n",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(nResultSoundLevel < 0)
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_max_volume failed on iteration %d, returned sound level = %d for sound level = %s \\n",__LINE__, nLoopCount, nResultSoundLevel , SoundManagerGetSoundType(eSoundType));
+                               nGetFailCount++;
+                       }
+               }
+       }
+
+       if ( nGetFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times, out of %d times\\n",__LINE__, "sound_manager_get_max_volume", nGetFailCount, (MAX_COUNT * nSoundTypeIteration));
+
+#if SPEED_CHECK
+               free(pszGetSpeedLog);
+               pszGetSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszGetMemLog);
+               pszGetMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_get_max_volume, pszGetSpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_get_max_volume, pszGetMemLog);
+#endif
+
+       return 0;
+}
+
+
+//& purpose: To check set/get volume level for a particular sound type
+//& type : auto
+/**
+* @testcase                    ITc_sound_manager_sound_manager_set_get_volume_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check set/get volume level for a particular sound type
+* @scenario                            Call API to set volume level and verify\n
+*                                              Call API to get volume level and verify\n
+*                                              check set volume level and get volume level
+* @apicovered                  sound_manager_set_volume, sound_manager_get_volume
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+*                                              If both volume level is equal
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+*                                              If both volume level is not equal
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_sound_manager_set_get_volume_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nSetFailCount = 0 , nGetFailCount = 0 , nEnumLoopCount = 0;
+       
+       char *pszGetSpeedLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetMemLog = NULL;
+       char *pszSetMemLog = NULL;
+
+       int nSetSoundLevel = 1 ;
+       int nFindSoundLevel = 0 ;
+       sound_type_e eSoundType;
+       int arrSoundTypeValues[] = {SOUND_TYPE_SYSTEM , SOUND_TYPE_NOTIFICATION , SOUND_TYPE_ALARM , SOUND_TYPE_RINGTONE , SOUND_TYPE_MEDIA , SOUND_TYPE_CALL , SOUND_TYPE_VOIP ,  SOUND_TYPE_VOICE};
+       int nSoundTypeIteration = sizeof(arrSoundTypeValues) /sizeof(arrSoundTypeValues[0]) ;
+
+#if SPEED_CHECK
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundTypeIteration, sizeof(char));
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundTypeIteration, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszGetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundTypeIteration, sizeof(char));
+       pszSetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundTypeIteration, sizeof(char));
+#endif
+
+       for(nEnumLoopCount = 0 ; nEnumLoopCount < nSoundTypeIteration ; nEnumLoopCount++ )
+       {
+               eSoundType = arrSoundTypeValues[nEnumLoopCount];
+               nSetSoundLevel = -1;
+               nRetVal = sound_manager_get_max_volume(eSoundType, &nSetSoundLevel);
+               if(nRetVal != SOUND_MANAGER_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_max_volume failed on iteration(enum) %d, error returned = %s ", __LINE__, nEnumLoopCount, SoundManagerGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]maximum volume level of %s : %d", __LINE__, SoundManagerGetSoundType(eSoundType), nSetSoundLevel);
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_set_volume(eSoundType , (nSetSoundLevel) );
+                       SoundManagerExecutionDelay(pszSetSpeedLog);
+                       SoundManagerGetMemStatus(pszSetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_volume failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_get_volume(eSoundType , &nFindSoundLevel);
+                       SoundManagerExecutionDelay(pszGetSpeedLog);
+                       SoundManagerGetMemStatus(pszGetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_volume failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(nFindSoundLevel != (nSetSoundLevel))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]After sound_manager_get_volume failed on iteration %d, returned sound level = %d and set sound level = %d",__LINE__, nLoopCount, nFindSoundLevel ,(nSetSoundLevel/2));
+                               nGetFailCount++;
+                       }
+
+               }
+       }
+
+
+       if ( nGetFailCount > 0 || nSetFailCount > 0 )
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times, %s failed %d times out of %d times\\n",__LINE__, "sound_manager_set_volume", nGetFailCount, "sound_manager_get_volume", nSetFailCount, (MAX_COUNT * nSoundTypeIteration));
+
+#if SPEED_CHECK
+                       free(pszGetSpeedLog);
+                       free(pszSetSpeedLog);
+                       pszGetSpeedLog = NULL;
+                       pszSetSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+                       free(pszGetMemLog);
+                       free(pszSetMemLog);
+                       pszGetMemLog = NULL;
+                       pszSetMemLog = NULL;
+#endif
+                       return 1;
+               }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_set_volume, pszSetSpeedLog);
+       PRINT_SPEED_LOG(sound_manager_get_volume, pszGetSpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_set_volume, pszSetMemLog);
+       PRINT_MEMORY_LOG(sound_manager_get_volume, pszGetMemLog);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check set/get session type
+//& type : auto
+/**
+* @testcase                    ITc_sound_manager_get_set_session_type_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check set/get session type
+* @scenario                            call api to set session type  and verify
+*                                              call api to get session type and verify
+*                                              check set session type value and get session type value
+* @apicovered                  sound_manager_set_session_type
+*                                              sound_manager_get_session_type
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_get_set_session_type_p(void)
+{
+       START_TEST;
+       
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nSetFailCount = 0 , nGetFailCount = 0 , nEnumLoopCount = 0;
+       
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       char *pszSetMemLog = NULL;
+       char *pszGetMemLog = NULL;
+
+       sound_session_type_e eSoundSessiontypeTesting ;
+       sound_session_type_e eSoundSessiontypeReturn ;
+       sound_session_type_e eSoundSessiontypeDefault ;
+
+       int arrSoundSessionTypeValues[] = {
+                       SOUND_SESSION_TYPE_MEDIA ,                      /**< Media type */
+                       SOUND_SESSION_TYPE_ALARM,                       /**< Alarm type */
+                       SOUND_SESSION_TYPE_NOTIFICATION,        /**< Notification type */
+                       SOUND_SESSION_TYPE_VOIP,                        /**< VOIP type */
+                       SOUND_SESSION_TYPE_EMERGENCY};
+       int nSoundSessonTypeIteration = sizeof(arrSoundSessionTypeValues) /sizeof(arrSoundSessionTypeValues[0]) ;
+
+       // To get default setting
+       nRetVal = sound_manager_get_session_type(&eSoundSessiontypeDefault);
+       PRINT_RESULT(nRetVal , "sound_manager_get_session_type");
+
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundSessonTypeIteration, sizeof(char));
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundSessonTypeIteration, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszSetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundSessonTypeIteration, sizeof(char));
+       pszGetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundSessonTypeIteration, sizeof(char));
+#endif
+
+       for (nEnumLoopCount = 0; nEnumLoopCount < nSoundSessonTypeIteration; nEnumLoopCount++)
+       {
+               eSoundSessiontypeTesting = arrSoundSessionTypeValues[nEnumLoopCount];
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_set_session_type(eSoundSessiontypeTesting);
+                       SoundManagerExecutionDelay(pszSetSpeedLog);
+                       SoundManagerGetMemStatus(pszSetMemLog);
+
+                       if( !g_bSupportedFeatureMicrophone )
+                       {
+                               if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+                               {
+                                       FPRINTF("\\n[Line : %d][SoundManager_ITc] sound_manager_set_session_type API call returned %s error for unsupported feature", __LINE__, SoundManagerGetError(nRetVal));
+                                       nSetFailCount++;
+                               }
+                               else
+                               {
+                                       FPRINTF("\\n[Line : %d][SoundManager_ITc] sound_manager_set_session_type API call correctly returned %s error for unsupported feature", __LINE__, SoundManagerGetError(nRetVal));
+                               }
+                               continue;
+                       }
+                       
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_session_type failed on iteration %d, error returned = %s \\n",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       sleep(1);
+
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_get_session_type(&eSoundSessiontypeReturn);
+                       SoundManagerExecutionDelay(pszGetSpeedLog);
+                       SoundManagerGetMemStatus(pszGetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_session_type failed on iteration %d, error returned = %s \\n",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(eSoundSessiontypeTesting != eSoundSessiontypeReturn)
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]After sound_manager_get_session_type, retrieved value verification failed on iteration %d, returned value = %s , set value = %s\\n",__LINE__, nLoopCount, SoundManagerGetSoundSessionType(eSoundSessiontypeReturn) , SoundManagerGetSoundSessionType(eSoundSessiontypeTesting));
+                               nGetFailCount++;
+                       }
+
+                       eSoundSessiontypeReturn = -1;
+               }
+       }
+
+       // set default session value
+       nRetVal = sound_manager_set_session_type(eSoundSessiontypeDefault);
+       PRINT_POST_RESULT(nRetVal , "sound_manager_set_session_type");
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times, %s failed %d times out of %d times\\n",__LINE__, "sound_manager_set_session_type", nSetFailCount, "sound_manager_get_session_type", nGetFailCount, (MAX_COUNT * nSoundSessonTypeIteration));
+
+#if SPEED_CHECK
+               free(pszSetSpeedLog);
+               free(pszGetSpeedLog);
+               pszSetSpeedLog = NULL;
+               pszGetSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszSetMemLog);
+               free(pszGetMemLog);
+               pszSetMemLog = NULL;
+               pszGetMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_set_session_type, pszSetSpeedLog);
+       PRINT_SPEED_LOG(sound_manager_get_session_type, pszGetSpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_set_session_type, pszSetMemLog);
+       PRINT_MEMORY_LOG(sound_manager_get_session_type, pszGetMemLog);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check register/unregister volume change callback
+//& type : auto
+/**
+* @testcase                    ITc_sound_manager_set_unset_volume_changed_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check register/unregister volume change callback
+* @scenario                            Call API to register callback and verify\n
+*                                              check response from call back\n
+*                                              Call API to unregister callback and verify\n
+*                                              check response from call back
+* @apicovered                  sound_manager_get_volume, sound_manager_get_max_volume, sound_manager_set_volume, sound_manager_set_volume_changed_cb, sound_manager_unset_volume_changed_cb
+* @passcase                            When APIs return SOUND_MANAGER_ERROR_NONE
+*                                              When response from callback on mute event
+* @failcase                            When APIs not return SOUND_MANAGER_ERROR_NONE
+*                                              When no response from callback
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_set_unset_volume_changed_cb_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nSetFailCount = 0 , nUnsetFailCount = 0;
+               int nTtimeoutId = 0;
+       g_pMainLoop = g_main_loop_new(NULL, false);
+
+       char *pszUnsetSpeedLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszSetMemLog = NULL;
+       char *pszUnsetMemLog = NULL;
+
+       sound_type_e eSoundType = SOUND_TYPE_RINGTONE;
+       int nMaxSoundLevel = 0;
+       int nFindSoundLevel = 0;
+
+       nRetVal = sound_manager_get_max_volume(eSoundType, &nMaxSoundLevel);
+       PRINT_RESULT(nRetVal , "sound_manager_get_max_volume");
+
+       nRetVal = sound_manager_get_volume(eSoundType , &nFindSoundLevel);
+       PRINT_RESULT(nRetVal , "sound_manager_get_volume");
+
+       //Check to set less than max value
+       if((nMaxSoundLevel-2) < nFindSoundLevel ){
+               nFindSoundLevel = 1;
+       }
+
+#if SPEED_CHECK
+       pszUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszSetMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       pszUnsetMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+
+               SoundManagerGetMemAllocation();
+               SoundManagerGetTimeOfDay();
+               nRetVal = sound_manager_set_volume_changed_cb(test_sound_manager_volume_changed_cb, NULL);
+               SoundManagerExecutionDelay(pszSetSpeedLog);
+               SoundManagerGetMemStatus(pszSetMemLog);
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_volume_changed_cb failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               nRetVal = sound_manager_set_volume(eSoundType , nFindSoundLevel++);
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_volume failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+               }
+
+               nTtimeoutId = g_timeout_add(2000, Timeout_Function, g_pMainLoop);
+               g_main_loop_run(g_pMainLoop);
+               g_source_remove(nTtimeoutId);
+               if(g_bCallbackResult == false )
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]After sound_manager_set_volume_changed_cb ,No response from callback on iteration %d  ",__LINE__, nLoopCount);
+                       nSetFailCount++;
+               }
+
+               SoundManagerGetMemAllocation();
+               SoundManagerGetTimeOfDay();
+               sound_manager_unset_volume_changed_cb();
+               SoundManagerExecutionDelay(pszUnsetSpeedLog);
+               SoundManagerGetMemStatus(pszUnsetMemLog);
+
+               g_bCallbackResult = false;
+               nRetVal = sound_manager_set_volume(eSoundType , nFindSoundLevel);
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_volume failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+               }
+
+               nTtimeoutId = g_timeout_add(2000, Timeout_Function, g_pMainLoop);
+               g_main_loop_run(g_pMainLoop);
+               g_source_remove(nTtimeoutId);
+               if(g_bCallbackResult == true )
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]After sound_manager_unset_volume_changed_cb ,Getting response from callback  on iteration %d  ",__LINE__, nLoopCount);
+                       nUnsetFailCount++;
+               }
+       }
+
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times, %s failed %d times out of %d times\\n",__LINE__, "sound_manager_set_volume_changed_cb", nSetFailCount, "sound_manager_unset_volume_changed_cb", nUnsetFailCount, MAX_COUNT);
+
+#if MEMORY_CHECK
+               free(pszSetMemLog);
+               free(pszUnsetMemLog);
+               pszSetMemLog = NULL;
+               pszUnsetMemLog = NULL;
+#endif
+
+#if SPEED_CHECK
+               free(pszSetSpeedLog);
+               free(pszUnsetSpeedLog);
+               pszSetSpeedLog = NULL;
+               pszUnsetSpeedLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_set_volume_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(sound_manager_unset_volume_changed_cb, pszUnsetSpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_set_volume_changed_cb, pszSetMemLog);
+       PRINT_MEMORY_LOG(sound_manager_unset_volume_changed_cb, pszUnsetMemLog);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check register/unregister of interrupted callback
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_set_unset_session_interrupted_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check registration of interrupted callback
+* @scenario                            call api to regsiter interrupted call back and verify
+*                                              unregister the interrupted callback and verify
+*                                              check set session type value and get session type value
+* @apicovered                  sound_manager_set_session_interrupted_cb
+*                                              sound_manager_unset_session_interrupted_cb
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_set_unset_session_interrupted_cb_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nSetFailCount = 0 , nUnsetFailCount = 0;
+       
+       char *pszInterruptionSetpeedLog = NULL;
+       char *pszInterruptionUnsetpeedLog = NULL;
+       char *pszInterruptionSetMemLog = NULL;
+       char *pszInterruptionUnsetMemLog = NULL;
+
+#if SPEED_CHECK
+       pszInterruptionSetpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszInterruptionUnsetpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszInterruptionSetMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+       pszInterruptionUnsetMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+       sound_session_interrupted_code_e eTestUserData = SOUND_SESSION_INTERRUPTED_BY_RESOURCE_CONFLICT;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               SoundManagerGetMemAllocation();
+               SoundManagerGetTimeOfDay();
+               nRetVal = sound_manager_set_session_interrupted_cb(test_sound_interrupted_cb, &eTestUserData);
+               SoundManagerExecutionDelay(pszInterruptionSetpeedLog);
+               SoundManagerGetMemStatus(pszInterruptionSetMemLog);
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_interrupted_cb failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               sleep(1);
+
+               SoundManagerGetMemAllocation();
+               SoundManagerGetTimeOfDay();
+               sound_manager_unset_session_interrupted_cb();
+               SoundManagerExecutionDelay(pszInterruptionUnsetpeedLog);
+               SoundManagerGetMemStatus(pszInterruptionUnsetMemLog);
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times, %s failed %d times out of %d times\\n",__LINE__, "sound_manager_set_interrupted_cb", nSetFailCount, "sound_manager_unset_interrupted_cb", nUnsetFailCount, MAX_COUNT);
+
+#if SPEED_CHECK
+               free(pszInterruptionSetpeedLog);
+               free(pszInterruptionUnsetpeedLog);
+               pszInterruptionSetpeedLog = NULL;
+               pszInterruptionUnsetpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszInterruptionSetMemLog);
+               free(pszInterruptionUnsetMemLog);
+               pszInterruptionSetMemLog = NULL;
+               pszInterruptionUnsetMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_set_interrupted_cb, pszInterruptionSetpeedLog);
+       PRINT_SPEED_LOG(sound_manager_unset_interrupted_cb, pszInterruptionUnsetpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_set_interrupted_cb, pszInterruptionSetMemLog);
+       PRINT_MEMORY_LOG(sound_manager_unset_interrupted_cb, pszInterruptionUnsetMemLog);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check set/get the option of media sound session
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_set_get_media_session_option_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check set/get the option of media sound session
+* @scenario                            set the option of media sound session and verify
+*                                              get the option of media sound session and verify
+*                                              Validate find values with set values
+* @apicovered                  sound_manager_set_media_session_option
+*                                              sound_manager_get_media_session_option
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_set_get_media_session_option_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nSetFailCount = 0 , nGetFailCount = 0 , nEnumStartCount = 0 , nEnumPlayCount = 0 ;
+       
+       char *pszInterruptionSetpeedLog = NULL;
+       char *pszInterruptionUnsetpeedLog = NULL;
+       char *pszInterruptionSetMemLog = NULL;
+       char *pszInterruptionUnsetMemLog = NULL;
+       sound_session_option_for_starting_e e_start_option ;
+       sound_session_option_for_during_play_e e_during_play_option ;
+
+       int nSoundSessionOptionForStartingValues[] = {
+                       SOUND_SESSION_OPTION_MIX_WITH_OTHERS_WHEN_START , /**< This session will be mixed with others when starting (default) */
+                       SOUND_SESSION_OPTION_PAUSE_OTHERS_WHEN_START,        /**< This session will interrupt other sessions when starting */
+       };
+       int nSoundSessionOptionForStartingCount = sizeof(nSoundSessionOptionForStartingValues) / sizeof(nSoundSessionOptionForStartingValues[0]);
+
+       int nSoundSessionOptionForDuringPlayValues [] = {
+                       SOUND_SESSION_OPTION_INTERRUPTIBLE_DURING_PLAY ,  /**< This session will be able to interrupted by other sessions during play (default) */
+                       SOUND_SESSION_OPTION_UNINTERRUPTIBLE_DURING_PLAY,    /**< This session will not be interrupted by other media sessions */
+       };
+       int nSoundSessionOptionForDuringPlayCount = sizeof(nSoundSessionOptionForDuringPlayValues)/sizeof(nSoundSessionOptionForDuringPlayValues[0]);
+
+       sound_session_option_for_starting_e e_find_start_option = -1 ;
+       sound_session_option_for_during_play_e e_find_during_play_option = - 1 ;
+
+       sound_session_type_e e_sound_type  = SOUND_SESSION_TYPE_MEDIA;
+       sound_session_type_e e_default_sound_type = -1;
+
+       nRetVal = sound_manager_get_session_type(&e_default_sound_type);
+       PRINT_RESULT(nRetVal , "sound_manager_get_session_type");
+
+       nRetVal = sound_manager_set_session_type(e_sound_type);
+       if( !g_bSupportedFeatureMicrophone )
+       {
+               if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc] sound_manager_set_session_type API call returned %s error for unsupported feature", __LINE__, SoundManagerGetError(nRetVal));
+                       return 1;
+               }
+               FPRINTF("\\n[Line : %d][SoundManager_ITc] sound_manager_set_session_type API call correctly returned %s error for unsupported feature", __LINE__, SoundManagerGetError(nRetVal));
+               return 0;
+       }
+
+#if SPEED_CHECK
+       pszInterruptionSetpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundSessionOptionForStartingCount * nSoundSessionOptionForDuringPlayCount, sizeof(char));
+       pszInterruptionUnsetpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundSessionOptionForStartingCount * nSoundSessionOptionForDuringPlayCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszInterruptionSetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundSessionOptionForStartingCount * nSoundSessionOptionForDuringPlayCount, sizeof(char));
+       pszInterruptionUnsetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundSessionOptionForStartingCount * nSoundSessionOptionForDuringPlayCount, sizeof(char));
+#endif
+
+       for(nEnumStartCount = 0 ; nEnumStartCount < nSoundSessionOptionForStartingCount ; nEnumStartCount++ )
+       {
+               e_start_option = nSoundSessionOptionForStartingValues[nEnumStartCount];
+
+               for(nEnumPlayCount = 0 ; nEnumPlayCount < nSoundSessionOptionForDuringPlayCount ; nEnumPlayCount++)
+               {
+                       e_during_play_option = nSoundSessionOptionForDuringPlayValues[nEnumPlayCount];
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               SoundManagerGetMemAllocation();
+                               SoundManagerGetTimeOfDay();
+                               nRetVal = sound_manager_set_media_session_option(e_start_option, e_during_play_option);
+                               SoundManagerExecutionDelay(pszInterruptionSetpeedLog);
+                               SoundManagerGetMemStatus(pszInterruptionSetMemLog);
+                               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                               {
+                                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_media_session_option failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                                       nSetFailCount++;
+                                       continue;
+                               }
+
+                               sleep(1);
+
+                               SoundManagerGetMemAllocation();
+                               SoundManagerGetTimeOfDay();
+                               nRetVal = sound_manager_get_media_session_option(&e_find_start_option , &e_find_during_play_option);
+                               SoundManagerExecutionDelay(pszInterruptionUnsetpeedLog);
+                               SoundManagerGetMemStatus(pszInterruptionUnsetMemLog);
+                               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                               {
+                                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_media_session_option failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                                       nGetFailCount++;
+                                       continue;
+                               }
+
+                               if((e_start_option != e_find_start_option)||(e_during_play_option != e_find_during_play_option))
+                               {
+                                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_media_session_option failed on iteration %d, error mismatch in returned value",__LINE__, nLoopCount);
+                               }
+                               e_find_start_option = -1 ;
+                               e_find_during_play_option = -1;
+                       }
+               }
+       }
+
+       nRetVal = sound_manager_set_session_type(e_default_sound_type);
+       PRINT_POST_RESULT(nRetVal , "sound_manager_set_session_type");
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 )
+       {
+
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times, %s failed %d times out of %d times\\n",__LINE__, "sound_manager_set_media_session_option", nSetFailCount, "sound_manager_get_media_session_option", nGetFailCount, ((MAX_COUNT * nSoundSessionOptionForStartingCount) * nSoundSessionOptionForDuringPlayCount));
+
+#if SPEED_CHECK
+               free(pszInterruptionSetpeedLog);
+               free(pszInterruptionUnsetpeedLog);
+               pszInterruptionSetpeedLog = NULL;
+               pszInterruptionUnsetpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszInterruptionSetMemLog);
+               free(pszInterruptionUnsetMemLog);
+               pszInterruptionSetMemLog = NULL;
+               pszInterruptionUnsetMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_set_media_session_option, pszInterruptionSetpeedLog);
+       PRINT_SPEED_LOG(sound_manager_get_media_session_option, pszInterruptionUnsetpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_set_media_session_option, pszInterruptionSetMemLog);
+       PRINT_MEMORY_LOG(sound_manager_get_media_session_option, pszInterruptionUnsetMemLog);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check set/get the resumption option of media sound session
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_set_get_media_session_resumption_option_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check set/get the option of media sound session
+* @scenario                            set the resumption option of media sound session and verify
+*                                              get the resumption option of media sound session and verify
+*                                              Validate find values with set values
+* @apicovered                  sound_manager_set_media_session_resumption_option
+*                                              sound_manager_get_media_session_resumption_option
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_set_get_media_session_resumption_option_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nSetFailCount = 0 , nUnsetFailCount = 0 , nEnumCount = 0;
+       
+       char *pszInterruptionSetpeedLog = NULL;
+       char *pszInterruptionUnsetpeedLog = NULL;
+       char *pszInterruptionSetMemLog = NULL;
+       char *pszInterruptionUnsetMemLog = NULL;
+
+       sound_session_option_for_resumption_e e_set_resumption_option ;
+
+       int arrSetResumptionOptionValues[] = {
+                       SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM ,             /**< This session will be resumed according to system policy (default) */
+                       SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM_OR_MEDIA_PAUSED, /**< This session will be resumed according to system policy and when the media session which interrupted this session is paused */
+       };
+       int nSetResumptionOptionCount = sizeof(arrSetResumptionOptionValues)/sizeof(arrSetResumptionOptionValues[0]);
+
+       sound_session_option_for_resumption_e e_find_resumption_option = -1 ;
+       sound_session_type_e e_sound_type  = SOUND_SESSION_TYPE_MEDIA;
+       sound_session_type_e e_default_sound_type = -1;
+
+       nRetVal = sound_manager_get_session_type(&e_default_sound_type);
+       PRINT_RESULT(nRetVal , "sound_manager_get_session_type");
+
+       nRetVal = sound_manager_set_session_type(e_sound_type);
+       if( !g_bSupportedFeatureMicrophone )
+       {
+               if ( nRetVal != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc] sound_manager_set_session_type API call returned %s error for unsupported feature", __LINE__, SoundManagerGetError(nRetVal));
+                       return 1;
+               }
+               FPRINTF("\\n[Line : %d][SoundManager_ITc] sound_manager_set_session_type API call correctly returned %s error for unsupported feature", __LINE__, SoundManagerGetError(nRetVal));
+               return 0;
+       }
+
+#if SPEED_CHECK
+       pszInterruptionSetpeedLog = calloc(TIMELOG * MAX_COUNT * nSetResumptionOptionCount, sizeof(char));
+       pszInterruptionUnsetpeedLog = calloc(TIMELOG * MAX_COUNT * nSetResumptionOptionCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszInterruptionSetMemLog = calloc(MEMLOG * MAX_COUNT * nSetResumptionOptionCount, sizeof(char));
+       pszInterruptionUnsetMemLog = calloc(MEMLOG * MAX_COUNT * nSetResumptionOptionCount, sizeof(char));
+#endif
+
+       for (nEnumCount = 0; nEnumCount < nSetResumptionOptionCount; nEnumCount++)
+       {
+               e_set_resumption_option = arrSetResumptionOptionValues[nEnumCount];
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_set_media_session_resumption_option(e_set_resumption_option);
+                       SoundManagerExecutionDelay(pszInterruptionSetpeedLog);
+                       SoundManagerGetMemStatus(pszInterruptionSetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_media_session_resumption_option failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       sleep(1);
+
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_get_media_session_resumption_option(&e_find_resumption_option);
+                       SoundManagerExecutionDelay(pszInterruptionUnsetpeedLog);
+                       SoundManagerGetMemStatus(pszInterruptionUnsetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_media_session_resumption_option failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nUnsetFailCount++;
+                               continue;
+                       }
+
+                       if((e_set_resumption_option != e_find_resumption_option))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_media_session_resumption_option failed on iteration %d, error mismatch in returned value",__LINE__, nLoopCount);
+                               nSetFailCount++;
+                       }
+               }
+       }
+
+
+       nRetVal = sound_manager_set_session_type(e_default_sound_type);
+       PRINT_POST_RESULT(nRetVal , "sound_manager_set_session_type");
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 )
+       {
+
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times, %s failed %d times out of %d times\\n",__LINE__, "sound_manager_set_media_session_resumption_option", nSetFailCount, "sound_manager_get_media_session_resumption_option", nUnsetFailCount, (MAX_COUNT * nSetResumptionOptionCount));
+
+#if SPEED_CHECK
+               free(pszInterruptionSetpeedLog);
+               free(pszInterruptionUnsetpeedLog);
+               pszInterruptionSetpeedLog = NULL;
+               pszInterruptionUnsetpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszInterruptionSetMemLog);
+               free(pszInterruptionUnsetMemLog);
+               pszInterruptionSetMemLog = NULL;
+               pszInterruptionUnsetMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_set_media_session_resumption_option, pszInterruptionSetpeedLog);
+       PRINT_SPEED_LOG(sound_manager_get_media_session_resumption_option, pszInterruptionUnsetpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_set_media_session_resumption_option, pszInterruptionSetMemLog);
+       PRINT_MEMORY_LOG(sound_manager_get_media_session_resumption_option, pszInterruptionUnsetMemLog);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check set/unset the type of the sound being currently played
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_set_unset_current_sound_type_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check set/get the type of the sound being currently played
+* @scenario                            set the type of the sound being currently played and verify\n
+*                                              Get the type of the sound being currently played and verify\n
+*                                              validate find values with set values\n
+*                                              unset the type of the sound being currently played and verify\n
+*                                              Get the type of the sound being currently played and verify\n
+*                                              validate find values with set values
+* @apicovered                  sound_manager_set_current_sound_type, sound_manager_unset_current_sound_type, sound_manager_get_current_sound_type
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_set_unset_current_sound_type_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nSetFailCount = 0 , nGetFailCount = 0 , nEnumCount = 0;
+       
+       char *pszInterruptionSetpeedLog = NULL;
+       char *pszInterruptionUnsetpeedLog = NULL;
+       char *pszInterruptionSetMemLog = NULL;
+       char *pszInterruptionUnsetMemLog = NULL;
+
+
+       sound_type_e e_set_sound_type = SOUND_TYPE_SYSTEM ;
+       int arrSoundTypeValue[] = {
+               SOUND_TYPE_SYSTEM,          /**< Sound type for system */
+               SOUND_TYPE_NOTIFICATION,    /**< Sound type for notifications */
+               SOUND_TYPE_ALARM,           /**< Sound type for alarm */
+               SOUND_TYPE_RINGTONE,        /**< @internal Sound type for ringtones */
+               SOUND_TYPE_MEDIA,           /**< Sound type for media */
+               SOUND_TYPE_CALL,            /**< @internal Sound type for call */
+               SOUND_TYPE_VOIP,            /**< @internal Sound type for voip */
+               SOUND_TYPE_VOICE,           /**< Sound type for voice */
+       };
+       int nSoundTypeCount = sizeof(arrSoundTypeValue) / sizeof(arrSoundTypeValue[0]);
+       sound_type_e e_find_sound_type = -1 ;
+
+#if SPEED_CHECK
+       pszInterruptionSetpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundTypeCount, sizeof(char));
+       pszInterruptionUnsetpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundTypeCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszInterruptionSetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundTypeCount, sizeof(char));
+       pszInterruptionUnsetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundTypeCount, sizeof(char));
+#endif
+
+       for (nEnumCount = 0; nEnumCount < nSoundTypeCount; nEnumCount++)
+       {
+               e_set_sound_type = arrSoundTypeValue[nEnumCount];
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_set_current_sound_type(e_set_sound_type);
+                       SoundManagerExecutionDelay(pszInterruptionSetpeedLog);
+                       SoundManagerGetMemStatus(pszInterruptionSetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_current_sound_type failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       nRetVal = sound_manager_get_current_sound_type(&e_find_sound_type);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_sound_type failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       }
+
+                       if((e_set_sound_type != e_find_sound_type))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_current_sound_type failed on iteration %d, error mismatch in returned value",__LINE__, nLoopCount);
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_unset_current_sound_type();
+                       SoundManagerExecutionDelay(pszInterruptionUnsetpeedLog);
+                       SoundManagerGetMemStatus(pszInterruptionUnsetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_unset_current_sound_type failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nGetFailCount++;
+                       }
+               }
+       }
+
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 )
+       {
+
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times, %s failed %d times out of %d times\\n",__LINE__, "sound_manager_set_current_sound_type", nSetFailCount, "sound_manager_unset_current_sound_type", nGetFailCount, (MAX_COUNT * nSoundTypeCount));
+
+#if SPEED_CHECK
+               free(pszInterruptionSetpeedLog);
+               free(pszInterruptionUnsetpeedLog);
+               pszInterruptionSetpeedLog = NULL;
+               pszInterruptionUnsetpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszInterruptionSetMemLog);
+               free(pszInterruptionUnsetMemLog);
+               pszInterruptionSetMemLog = NULL;
+               pszInterruptionUnsetMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_set_current_sound_type, pszInterruptionSetpeedLog);
+       PRINT_SPEED_LOG(sound_manager_unset_current_sound_type, pszInterruptionUnsetpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_set_current_sound_type, pszInterruptionSetMemLog);
+       PRINT_MEMORY_LOG(sound_manager_unset_current_sound_type, pszInterruptionUnsetMemLog);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To check get current sound type
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_set_unset_current_sound_type_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check set/get the type of the sound being currently played
+* @scenario                            set the type of the sound being currently played and verify\n
+*                                              Get the type of the sound being currently played and verify\n
+*                                              validate find values with set values\n
+*                                              unset the type of the sound being currently played and verify\n
+*                                              Get the type of the sound being currently played and verify\n
+*                                              validate find values with set values
+* @apicovered                  sound_manager_set_current_sound_type, sound_manager_unset_current_sound_type, sound_manager_get_current_sound_type
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_get_current_sound_type_p(void)
+{
+
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nSetFailCount = 0 , nEnumCount = 0;
+       
+       char *pszSpeedLog = NULL;
+       char *pszMemLog = NULL;
+
+       sound_type_e e_set_sound_type = SOUND_TYPE_SYSTEM ;
+       int arrSoundTypeValue[] = {
+               SOUND_TYPE_SYSTEM,          /**< Sound type for system */
+               SOUND_TYPE_NOTIFICATION,    /**< Sound type for notifications */
+               SOUND_TYPE_ALARM,           /**< Sound type for alarm */
+               SOUND_TYPE_RINGTONE,        /**< @internal Sound type for ringtones */
+               SOUND_TYPE_MEDIA,           /**< Sound type for media */
+               SOUND_TYPE_CALL,            /**< @internal Sound type for call */
+               SOUND_TYPE_VOIP,            /**< @internal Sound type for voip */
+               SOUND_TYPE_VOICE,           /**< Sound type for voice */
+       };
+       int nSoundTypeCount = sizeof(arrSoundTypeValue) / sizeof(arrSoundTypeValue[0]);
+       sound_type_e e_find_sound_type = -1 ;
+
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundTypeCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * nSoundTypeCount, sizeof(char));
+#endif
+
+       for (nEnumCount = 0; nEnumCount < nSoundTypeCount; nEnumCount++)
+       {
+               e_set_sound_type = arrSoundTypeValue[nEnumCount];
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       e_find_sound_type = -1;
+                       nRetVal = sound_manager_set_current_sound_type(e_set_sound_type);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_current_sound_type failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nSetFailCount++;
+                               continue;
+                       }
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_get_current_sound_type(&e_find_sound_type);
+                       SoundManagerExecutionDelay(pszSpeedLog);
+                       SoundManagerGetMemStatus(pszMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_sound_type failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       if((e_find_sound_type != e_set_sound_type))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_sound_type failed on iteration %d, error mismatch in returned value",__LINE__, nLoopCount);
+                               nSetFailCount++;
+                       }
+
+                       nRetVal = sound_manager_unset_current_sound_type();
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_unset_current_sound_type failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       }
+               }
+       }
+
+
+       if ( nSetFailCount > 0 )
+       {
+
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times,out of %d times\\n",__LINE__, "sound_manager_get_current_sound_type", nSetFailCount, (MAX_COUNT * nSoundTypeCount));
+
+#if SPEED_CHECK
+               free(pszSpeedLog);
+               pszSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszMemLog);
+               pszMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_set_current_sound_type, pszSpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_set_current_sound_type, pszMemLog);
+
+#endif
+
+       return 0;
+}
+
+//& purpose: To get the list of devices connected
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_get_current_device_list_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To get the list of devices connected
+* @scenario                            Get the list of devices connected
+* @apicovered                  sound_manager_get_current_device_list
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_get_current_device_list_p(void)
+{
+
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nGetFailCount = 0 , nEnumCount = 0;
+       
+       char *pszSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       
+       sound_device_list_h deviceList = NULL;
+       
+       sound_device_mask_e e_device_mask = SOUND_DEVICE_IO_DIRECTION_IN_MASK ;
+       int arrSoundDeviceMask[] = {
+               SOUND_DEVICE_IO_DIRECTION_IN_MASK,              /**< Mask for input devices */
+               SOUND_DEVICE_IO_DIRECTION_OUT_MASK,     /**< Mask for output devices */
+               SOUND_DEVICE_IO_DIRECTION_BOTH_MASK,    /**< Mask for input/output devices (both directions are available) */
+               SOUND_DEVICE_TYPE_INTERNAL_MASK,                /**< Mask for built-in devices */
+               SOUND_DEVICE_TYPE_EXTERNAL_MASK,                /**< Mask for external devices */
+               SOUND_DEVICE_STATE_DEACTIVATED_MASK,    /**< Mask for deactivated devices */
+               SOUND_DEVICE_STATE_ACTIVATED_MASK,              /**< Mask for activated devices */
+               SOUND_DEVICE_ALL_MASK                                   /**< Mask for all devices */
+       };
+       int nSoundDeviceMaskCount = sizeof(arrSoundDeviceMask) / sizeof(arrSoundDeviceMask[0]);
+       
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundDeviceMaskCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * nSoundDeviceMaskCount, sizeof(char));
+#endif
+
+       for (nEnumCount = 0; nEnumCount < nSoundDeviceMaskCount; nEnumCount++)
+       {
+               e_device_mask = arrSoundDeviceMask[nEnumCount];
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_get_current_device_list(e_device_mask, &deviceList);
+                       SoundManagerExecutionDelay(pszSpeedLog);
+                       SoundManagerGetMemStatus(pszMemLog);
+                       
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_device_list failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nGetFailCount++;
+                               continue;
+                       }
+                       if(deviceList == NULL)
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_device_list failed on iteration %d, device list returned is NULL ",__LINE__, nLoopCount);
+                               nGetFailCount++;
+                       }
+               }
+               deviceList = NULL;
+       }
+
+       if ( nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times,out of %d times\\n",__LINE__, "sound_manager_get_current_device_list", nGetFailCount, (MAX_COUNT * nSoundDeviceMaskCount));
+#if SPEED_CHECK
+               free(pszSpeedLog);
+               pszSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszMemLog);
+               pszMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_get_current_device_list, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_get_current_device_list, pszMemLog);
+#endif
+
+       return 0;
+}
+
+//& purpose: To get the next item of the device list
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_get_next_device_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To get the next item of the device list
+* @scenario                            Get the list of devices connected\n
+*                                              Get the next item of the device list
+* @apicovered                  sound_manager_get_current_device_list, sound_manager_get_next_device
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_get_next_device_p(void)
+{
+
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nGetFailCount = 0;
+       
+       char *pszSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       
+       sound_device_list_h deviceList = NULL;
+       sound_device_mask_e e_device_mask = SOUND_DEVICE_IO_DIRECTION_IN_MASK ;
+       sound_device_h hDevice = NULL;
+       
+       nRetVal = sound_manager_get_current_device_list(e_device_mask, &deviceList);
+       PRINT_RESULT(nRetVal , "sound_manager_get_current_device_list");
+       
+       if(deviceList == NULL)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_device_list failed in Precondition, device list returned is NULL ",__LINE__);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               SoundManagerGetMemAllocation();
+               SoundManagerGetTimeOfDay();
+               nRetVal = sound_manager_get_next_device(deviceList, &hDevice);
+               SoundManagerExecutionDelay(pszSpeedLog);
+               SoundManagerGetMemStatus(pszMemLog);
+               
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_next_device failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               if(hDevice == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_next_device failed on iteration %d, device handle returned is NULL ",__LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+
+       if ( nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times,out of %d times\\n",__LINE__, "sound_manager_get_next_device", nGetFailCount, MAX_COUNT);
+#if SPEED_CHECK
+               free(pszSpeedLog);
+               pszSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszMemLog);
+               pszMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_get_next_device, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_get_next_device, pszMemLog);
+#endif
+
+       return 0;
+}
+
+//& purpose: To get the previous item of the device list
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_get_prev_device_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To get the next item of the device list
+* @scenario                            Get the list of devices connected\n
+*                                              Get the previous item of the device list
+* @apicovered                  sound_manager_get_current_device_list, sound_manager_get_next_device, sound_manager_get_prev_device
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_get_prev_device_p(void)
+{
+
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nGetFailCount = 0;
+       
+       char *pszSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       
+       sound_device_list_h deviceList = NULL;
+       sound_device_mask_e e_device_mask = SOUND_DEVICE_ALL_MASK ;
+       sound_device_h hDevice = NULL;
+       
+       nRetVal = sound_manager_get_current_device_list(e_device_mask, &deviceList);
+       PRINT_RESULT(nRetVal , "sound_manager_get_current_device_list");
+
+       if(deviceList == NULL)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_device_list failed in Precondition, device list returned is NULL ",__LINE__);
+               return 1;
+       }
+       
+       //to come on root node a call is required
+       nRetVal = sound_manager_get_next_device(deviceList, &hDevice);
+       PRINT_RESULT(nRetVal , "sound_manager_get_next_device");
+       
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               hDevice = NULL;
+               nRetVal = sound_manager_get_next_device(deviceList, &hDevice);
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_next_device failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               
+               hDevice = NULL;
+               SoundManagerGetMemAllocation();
+               SoundManagerGetTimeOfDay();
+               nRetVal = sound_manager_get_prev_device(deviceList, &hDevice);
+               SoundManagerExecutionDelay(pszSpeedLog);
+               SoundManagerGetMemStatus(pszMemLog);
+               
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_prev_device failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               if(hDevice == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_prev_device failed on iteration %d, device handle returned is NULL ",__LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+
+       if ( nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times,out of %d times\\n",__LINE__, "sound_manager_get_prev_device", nGetFailCount, MAX_COUNT);
+#if SPEED_CHECK
+               free(pszSpeedLog);
+               pszSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszMemLog);
+               pszMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_get_prev_device, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_get_prev_device, pszMemLog);
+#endif
+
+       return 0;
+}
+
+//& purpose: To get the type of the device
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_get_device_type_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To get the type of the device
+* @scenario                            Get the list of devices connected\n
+*                                              Get the next item of the device list\n
+*                                              Get the type of the device
+* @apicovered                  sound_manager_get_current_device_list, sound_manager_get_next_device, sound_manager_get_device_type
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_get_device_type_p(void)
+{
+
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nGetFailCount = 0;
+       
+       char *pszSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       
+       sound_device_list_h deviceList = NULL;
+       sound_device_mask_e e_device_mask = SOUND_DEVICE_IO_DIRECTION_IN_MASK ;
+       sound_device_h hDevice = NULL;
+       sound_device_type_e eType = -1;
+       
+       nRetVal = sound_manager_get_current_device_list(e_device_mask, &deviceList);
+       PRINT_RESULT(nRetVal , "sound_manager_get_current_device_list");
+       
+       if(deviceList == NULL)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_device_list failed in Precondition, device list returned is NULL ",__LINE__);
+               return 1;
+       }
+       
+       nRetVal = sound_manager_get_next_device(deviceList, &hDevice);
+       PRINT_RESULT(nRetVal , "sound_manager_get_next_device");
+       
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               SoundManagerGetMemAllocation();
+               SoundManagerGetTimeOfDay();
+               nRetVal = sound_manager_get_device_type (hDevice, &eType);
+               SoundManagerExecutionDelay(pszSpeedLog);
+               SoundManagerGetMemStatus(pszMemLog);
+               
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_device_type failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               if( eType < SOUND_DEVICE_BUILTIN_SPEAKER || eType > SOUND_DEVICE_USB_AUDIO)
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_device_type failed on iteration %d, device type is invalid",__LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+
+       if ( nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times,out of %d times\\n",__LINE__, "sound_manager_get_device_type", nGetFailCount, MAX_COUNT);
+#if SPEED_CHECK
+               free(pszSpeedLog);
+               pszSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszMemLog);
+               pszMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_get_device_type, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_get_device_type, pszMemLog);
+#endif
+
+       return 0;
+}
+
+//& purpose: To get the io direction of the device
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_get_device_io_direction_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To get the type of the device
+* @scenario                            Get the list of devices connected\n
+*                                              Get the next item of the device list\n
+*                                              Get the io direction of the device
+* @apicovered                  sound_manager_get_current_device_list, sound_manager_get_next_device, sound_manager_get_device_io_direction
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_get_device_io_direction_p(void)
+{
+
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nGetFailCount = 0;
+       
+       char *pszSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       
+       sound_device_list_h deviceList = NULL;
+       sound_device_mask_e e_device_mask = SOUND_DEVICE_IO_DIRECTION_IN_MASK ;
+       sound_device_h hDevice = NULL;
+       sound_device_io_direction_e eIoDirection = -1;
+       
+       nRetVal = sound_manager_get_current_device_list(e_device_mask, &deviceList);
+       PRINT_RESULT(nRetVal , "sound_manager_get_current_device_list");
+       
+       if(deviceList == NULL)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_device_list failed in Precondition, device list returned is NULL ",__LINE__);
+               return 1;
+       }
+       
+       nRetVal = sound_manager_get_next_device(deviceList, &hDevice);
+       PRINT_RESULT(nRetVal , "sound_manager_get_next_device");
+       
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               SoundManagerGetMemAllocation();
+               SoundManagerGetTimeOfDay();
+               nRetVal = sound_manager_get_device_io_direction (hDevice, &eIoDirection);
+               SoundManagerExecutionDelay(pszSpeedLog);
+               SoundManagerGetMemStatus(pszMemLog);
+               
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_device_io_direction failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               if( eIoDirection < SOUND_DEVICE_IO_DIRECTION_IN || eIoDirection > SOUND_DEVICE_IO_DIRECTION_BOTH)
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_device_io_direction failed on iteration %d, sound device direction is invalid",__LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+
+       if ( nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times,out of %d times\\n",__LINE__, "sound_manager_get_device_io_direction", nGetFailCount, MAX_COUNT);
+#if SPEED_CHECK
+               free(pszSpeedLog);
+               pszSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszMemLog);
+               pszMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_get_device_io_direction, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_get_device_io_direction, pszMemLog);
+#endif
+
+       return 0;
+}
+
+//& purpose: To get the id of the device
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_get_device_id_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To get the type of the device
+* @scenario                            Get the list of devices connected\n
+*                                              Get the next item of the device list\n
+*                                              Get the id of the device
+* @apicovered                  sound_manager_get_current_device_list, sound_manager_get_next_device, sound_manager_get_device_id
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_get_device_id_p(void)
+{
+
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nGetFailCount = 0;
+       
+       char *pszSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       
+       sound_device_list_h deviceList = NULL;
+       sound_device_mask_e e_device_mask = SOUND_DEVICE_IO_DIRECTION_IN_MASK ;
+       sound_device_h hDevice = NULL;
+       int nId = -1;
+       
+       nRetVal = sound_manager_get_current_device_list(e_device_mask, &deviceList);
+       PRINT_RESULT(nRetVal , "sound_manager_get_current_device_list");
+       
+       if(deviceList == NULL)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_device_list failed in Precondition, device list returned is NULL ",__LINE__);
+               return 1;
+       }
+       
+       nRetVal = sound_manager_get_next_device(deviceList, &hDevice);
+       PRINT_RESULT(nRetVal , "sound_manager_get_next_device");
+       
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               SoundManagerGetMemAllocation();
+               SoundManagerGetTimeOfDay();
+               nRetVal = sound_manager_get_device_id(hDevice, &nId);
+               SoundManagerExecutionDelay(pszSpeedLog);
+               SoundManagerGetMemStatus(pszMemLog);
+               
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_device_id failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               if( nId == -1)
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_device_id failed on iteration %d, sound device id is invalid",__LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+
+       if ( nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times,out of %d times\\n",__LINE__, "sound_manager_get_device_id", nGetFailCount, MAX_COUNT);
+#if SPEED_CHECK
+               free(pszSpeedLog);
+               pszSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszMemLog);
+               pszMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_get_device_id, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_get_device_id, pszMemLog);
+#endif
+
+       return 0;
+}
+
+//& purpose: To get the name of the device
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_get_device_name_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To get the type of the device
+* @scenario                            Get the list of devices connected\n
+*                                              Get the next item of the device list\n
+*                                              Get the name of the device
+* @apicovered                  sound_manager_get_current_device_list, sound_manager_get_next_device, sound_manager_get_device_name
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_get_device_name_p(void)
+{
+
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nGetFailCount = 0;
+       
+       char *pszSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       
+       sound_device_list_h deviceList = NULL;
+       sound_device_mask_e e_device_mask = SOUND_DEVICE_IO_DIRECTION_IN_MASK ;
+       sound_device_h hDevice = NULL;
+       char *pszName = NULL;
+       
+       nRetVal = sound_manager_get_current_device_list(e_device_mask, &deviceList);
+       PRINT_RESULT(nRetVal , "sound_manager_get_current_device_list");
+       
+       if(deviceList == NULL)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_device_list failed in Precondition, device list returned is NULL ",__LINE__);
+               return 1;
+       }
+       
+       nRetVal = sound_manager_get_next_device(deviceList, &hDevice);
+       PRINT_RESULT(nRetVal , "sound_manager_get_next_device");
+       
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               SoundManagerGetMemAllocation();
+               SoundManagerGetTimeOfDay();
+               nRetVal = sound_manager_get_device_name(hDevice, &pszName);
+               SoundManagerExecutionDelay(pszSpeedLog);
+               SoundManagerGetMemStatus(pszMemLog);
+               
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_device_name failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               if( pszName == NULL)
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_device_name failed on iteration %d, sound device name is NULL",__LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+
+       if ( nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times,out of %d times\\n",__LINE__, "sound_manager_get_device_name", nGetFailCount, MAX_COUNT);
+#if SPEED_CHECK
+               free(pszSpeedLog);
+               pszSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszMemLog);
+               pszMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_get_device_name, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_get_device_name, pszMemLog);
+#endif
+
+       return 0;
+}
+
+//& purpose: To get the state of the device
+//& type: auto
+/**
+* @testcase                    ITc_sound_manager_get_device_state_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To get the type of the device
+* @scenario                            Get the list of devices connected\n
+*                                              Get the next item of the device list\n
+*                                              Get the state of the device
+* @apicovered                  sound_manager_get_current_device_list, sound_manager_get_next_device, sound_manager_get_device_state
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_get_device_state_p(void)
+{
+
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nGetFailCount = 0;
+       
+       char *pszSpeedLog = NULL;
+       char *pszMemLog = NULL;
+       
+       sound_device_list_h deviceList = NULL;
+       sound_device_mask_e e_device_mask = SOUND_DEVICE_IO_DIRECTION_IN_MASK ;
+       sound_device_h hDevice = NULL;
+       sound_device_state_e eState = -1;
+       
+       nRetVal = sound_manager_get_current_device_list(e_device_mask, &deviceList);
+       PRINT_RESULT(nRetVal , "sound_manager_get_current_device_list");
+       
+       if(deviceList == NULL)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_current_device_list failed in Precondition, device list returned is NULL ",__LINE__);
+               return 1;
+       }
+       
+       nRetVal = sound_manager_get_next_device(deviceList, &hDevice);
+       PRINT_RESULT(nRetVal , "sound_manager_get_next_device");
+       
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               SoundManagerGetMemAllocation();
+               SoundManagerGetTimeOfDay();
+               nRetVal = sound_manager_get_device_state(hDevice, &eState);
+               SoundManagerExecutionDelay(pszSpeedLog);
+               SoundManagerGetMemStatus(pszMemLog);
+               
+               if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_device_state failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                       nGetFailCount++;
+                       continue;
+               }
+               if( eState != SOUND_DEVICE_STATE_DEACTIVATED && eState != SOUND_DEVICE_STATE_ACTIVATED)
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_device_state failed on iteration %d, sound device state is invalid",__LINE__, nLoopCount);
+                       nGetFailCount++;
+               }
+       }
+
+       if ( nGetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times,out of %d times\\n",__LINE__, "sound_manager_get_device_state", nGetFailCount, MAX_COUNT);
+#if SPEED_CHECK
+               free(pszSpeedLog);
+               pszSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszMemLog);
+               pszMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_get_device_state, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_get_device_state, pszMemLog);
+#endif
+
+       return 0;
+}
+
+//& purpose: To check register/unregister a callback function to be invoked when the state of connection of a sound device is changed
+//& type : auto
+/**
+* @testcase                    ITc_sound_manager_set_unset_device_connected_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check register/unregister a callback function to be invoked when the state of connection of a sound device is changed
+* @scenario                            register a callback function on changing the connection state of sound device\n
+*                                              unregister a callback function on changing the connection state of sound device
+* @apicovered                  sound_manager_set_device_connected_cb, sound_manager_unset_device_connected_cb
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_set_unset_device_connected_cb_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nSetFailCount = 0 , nUnsetFailCount = 0 , nEnumLoopCount = 0;
+       
+       char *pszUnsetSpeedLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetMemLog = NULL;
+       char *pszSetMemLog = NULL;
+       
+       sound_device_mask_e e_device_mask = SOUND_DEVICE_IO_DIRECTION_IN_MASK ;
+       int arrSoundDeviceMask[] = {
+               SOUND_DEVICE_IO_DIRECTION_IN_MASK,              /**< Mask for input devices */
+               SOUND_DEVICE_IO_DIRECTION_OUT_MASK,     /**< Mask for output devices */
+               SOUND_DEVICE_IO_DIRECTION_BOTH_MASK,    /**< Mask for input/output devices (both directions are available) */
+               SOUND_DEVICE_TYPE_INTERNAL_MASK,                /**< Mask for built-in devices */
+               SOUND_DEVICE_TYPE_EXTERNAL_MASK,                /**< Mask for external devices */
+               SOUND_DEVICE_STATE_DEACTIVATED_MASK,    /**< Mask for deactivated devices */
+               SOUND_DEVICE_STATE_ACTIVATED_MASK,              /**< Mask for activated devices */
+               SOUND_DEVICE_ALL_MASK                                   /**< Mask for all devices */
+       };
+       int nSoundDeviceMaskCount = sizeof(arrSoundDeviceMask) / sizeof(arrSoundDeviceMask[0]);
+
+#if SPEED_CHECK
+       pszUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundDeviceMaskCount, sizeof(char));
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundDeviceMaskCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszUnsetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundDeviceMaskCount, sizeof(char));
+       pszSetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundDeviceMaskCount, sizeof(char));
+#endif
+
+       for(nEnumLoopCount = 0 ; nEnumLoopCount < nSoundDeviceMaskCount ; nEnumLoopCount++ )
+       {
+               e_device_mask = arrSoundDeviceMask[nEnumLoopCount];
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_set_device_connected_cb(e_device_mask, test_sound_manager_device_connected_cb, NULL);
+                       SoundManagerExecutionDelay(pszSetSpeedLog);
+                       SoundManagerGetMemStatus(pszSetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_device_connected_cb failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_unset_device_connected_cb();
+                       SoundManagerExecutionDelay(pszUnsetSpeedLog);
+                       SoundManagerGetMemStatus(pszUnsetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_unset_device_connected_cb failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nUnsetFailCount++;
+                       }
+               }
+       }
+
+       if (nSetFailCount > 0 ||  nUnsetFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times, %s failed %d times out of %d times\\n",__LINE__, "sound_manager_set_device_connected_cb", nSetFailCount, "sound_manager_unset_device_connected_cb", nUnsetFailCount, (MAX_COUNT * nSoundDeviceMaskCount));
+#if SPEED_CHECK
+               free(pszUnsetSpeedLog);
+               free(pszSetSpeedLog);
+               pszUnsetSpeedLog = NULL;
+               pszSetSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszUnsetMemLog);
+               free(pszSetMemLog);
+               pszUnsetMemLog = NULL;
+               pszSetMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_set_device_connected_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(sound_manager_unset_device_connected_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_set_device_connected_cb, pszSetMemLog);
+       PRINT_MEMORY_LOG(sound_manager_unset_device_connected_cb, pszUnsetMemLog);
+#endif
+       return 0;
+}
+
+//& purpose: To check register/unregister a callback function to be invoked when the information of a sound device is changed
+//& type : auto
+/**
+* @testcase                    ITc_sound_manager_set_unset_device_information_changed_cb_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check register/unregister a callback function to be invoked when the information of a sound device is changed
+* @scenario                            register a callback function on changing the information of sound device\n
+*                                              unregister a callback function on changing the information of sound device
+* @apicovered                  sound_manager_set_device_information_changed_cb, sound_manager_unset_device_information_changed_cb
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_set_unset_device_information_changed_cb_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nSetFailCount = 0 , nUnsetFailCount = 0 , nEnumLoopCount = 0;
+       
+       char *pszUnsetSpeedLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetMemLog = NULL;
+       char *pszSetMemLog = NULL;
+       
+       sound_device_mask_e e_device_mask = SOUND_DEVICE_IO_DIRECTION_IN_MASK ;
+       int arrSoundDeviceMask[] = {
+               SOUND_DEVICE_IO_DIRECTION_IN_MASK,              /**< Mask for input devices */
+               SOUND_DEVICE_IO_DIRECTION_OUT_MASK,     /**< Mask for output devices */
+               SOUND_DEVICE_IO_DIRECTION_BOTH_MASK,    /**< Mask for input/output devices (both directions are available) */
+               SOUND_DEVICE_TYPE_INTERNAL_MASK,                /**< Mask for built-in devices */
+               SOUND_DEVICE_TYPE_EXTERNAL_MASK,                /**< Mask for external devices */
+               SOUND_DEVICE_STATE_DEACTIVATED_MASK,    /**< Mask for deactivated devices */
+               SOUND_DEVICE_STATE_ACTIVATED_MASK,              /**< Mask for activated devices */
+               SOUND_DEVICE_ALL_MASK                                   /**< Mask for all devices */
+       };
+       int nSoundDeviceMaskCount = sizeof(arrSoundDeviceMask) / sizeof(arrSoundDeviceMask[0]);
+
+#if SPEED_CHECK
+       pszUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundDeviceMaskCount, sizeof(char));
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundDeviceMaskCount, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszUnsetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundDeviceMaskCount, sizeof(char));
+       pszSetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundDeviceMaskCount, sizeof(char));
+#endif
+
+       for(nEnumLoopCount = 0 ; nEnumLoopCount < nSoundDeviceMaskCount ; nEnumLoopCount++ )
+       {
+               e_device_mask = arrSoundDeviceMask[nEnumLoopCount];
+
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_set_device_information_changed_cb(e_device_mask, test_sound_manager_info_changed_cb, NULL);
+                       SoundManagerExecutionDelay(pszSetSpeedLog);
+                       SoundManagerGetMemStatus(pszSetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_device_information_changed_cb failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_unset_device_information_changed_cb();
+                       SoundManagerExecutionDelay(pszUnsetSpeedLog);
+                       SoundManagerGetMemStatus(pszUnsetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_unset_device_information_changed_cb failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nUnsetFailCount++;
+                       }
+               }
+       }
+
+       if (nSetFailCount > 0 ||  nUnsetFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times, %s failed %d times out of %d times\\n",__LINE__, "sound_manager_set_device_information_changed_cb", nSetFailCount, "sound_manager_unset_device_information_changed_cb", nUnsetFailCount, (MAX_COUNT * nSoundDeviceMaskCount));
+#if SPEED_CHECK
+               free(pszUnsetSpeedLog);
+               free(pszSetSpeedLog);
+               pszUnsetSpeedLog = NULL;
+               pszSetSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszUnsetMemLog);
+               free(pszSetMemLog);
+               pszUnsetMemLog = NULL;
+               pszSetMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_set_device_information_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(sound_manager_unset_device_information_changed_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_set_device_information_changed_cb, pszSetMemLog);
+       PRINT_MEMORY_LOG(sound_manager_unset_device_information_changed_cb, pszUnsetMemLog);
+#endif
+       return 0;
+}
+
+//& purpose: To check set/get the mode of the voip sound session
+//& type : auto
+/**
+* @testcase                    ITc_sound_manager_set_get_voip_session_mode_p
+* @since_tizen                         2.3
+* @type                                auto
+* @description                 To check set/get the mode of the voip sound session
+* @scenario                            call api to set mode of the voip sound session and verify
+*                                              call api to get mode of the voip sound session and verify
+*                                              check set voip sound session mode and get  voip sound session mode
+* @apicovered                  sound_manager_set_voip_session_mode
+*                                              sound_manager_get_voip_session_mode
+* @passcase                            When API return SOUND_MANAGER_ERROR_NONE
+*                                              If both set and get mode of the voip sound session are equal
+* @failcase                            When API not return SOUND_MANAGER_ERROR_NONE
+*                                              If both set and get mode of the voip sound session are unequal  
+* @precondition                        None
+* @postcondition               None
+*/
+int ITc_sound_manager_set_get_voip_session_mode_p(void)
+{
+       START_TEST;
+
+       // Initializing testing variable
+       int nRetVal = -1, nLoopCount = 0 , nSetFailCount = 0 , nGetFailCount = 0 , nEnumLoopCount = 0;
+       bool bAudioJackFlag = false;
+       bool bSpkrFlag = false;
+       bool bRecvrFlag = false;
+       
+       char *pszGetSpeedLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetMemLog = NULL;
+       char *pszSetMemLog = NULL;
+
+       sound_session_voip_mode_e eSetSessionMode;
+       sound_session_voip_mode_e eGetSessionMode;
+       sound_device_list_h deviceList = NULL;
+       sound_device_h hDevice = NULL;
+       sound_device_type_e eType = -1;
+       sound_device_state_e eState = SOUND_DEVICE_STATE_DEACTIVATED;
+       
+       int arrSoundSessionMode[] = {SOUND_SESSION_VOIP_MODE_RINGTONE , 
+                                                               SOUND_SESSION_VOIP_MODE_VOICE_WITH_BUILTIN_RECEIVER , 
+                                                               SOUND_SESSION_VOIP_MODE_VOICE_WITH_BUILTIN_SPEAKER , 
+                                                               SOUND_SESSION_VOIP_MODE_VOICE_WITH_AUDIO_JACK };
+                                                               
+       int nSoundSessionModeIterator = sizeof(arrSoundSessionMode) /sizeof(arrSoundSessionMode[0]) ;
+
+       nRetVal = sound_manager_set_session_type(SOUND_SESSION_TYPE_VOIP);
+       PRINT_RESULT(nRetVal , "sound_manager_set_session_type");
+
+       /* To check if audio jack is connected to the target device */
+       nRetVal = sound_manager_get_current_device_list( SOUND_DEVICE_IO_DIRECTION_BOTH_MASK|SOUND_DEVICE_IO_DIRECTION_OUT_MASK , &deviceList);
+       if (nRetVal == SOUND_MANAGER_ERROR_NONE && deviceList != NULL)
+       {
+               nRetVal = sound_manager_get_next_device(deviceList, &hDevice);
+               while(nRetVal == SOUND_MANAGER_ERROR_NONE && hDevice != NULL)
+               {
+                       sound_manager_get_device_type(hDevice, &eType);
+                       if ( (eType == SOUND_DEVICE_AUDIO_JACK) || (eType == SOUND_DEVICE_BUILTIN_SPEAKER) || (eType == SOUND_DEVICE_BUILTIN_RECEIVER))
+                       {
+                               sound_manager_get_device_state(hDevice, &eState);
+                               if (eState == SOUND_DEVICE_STATE_ACTIVATED)
+                               {
+                                       FPRINTF("\\n[Line : %d][SoundManager_ITc]%s is Activated on the target device",__LINE__, SoundManagerGetType(eType));
+                                       if(eType == SOUND_DEVICE_AUDIO_JACK)
+                                       {
+                                               bAudioJackFlag = true;          
+                                       }
+                                       if(eType == SOUND_DEVICE_BUILTIN_SPEAKER)
+                                       {
+                                               bSpkrFlag = true;               
+                                       }
+                                       if(eType == SOUND_DEVICE_BUILTIN_RECEIVER)
+                                       {
+                                               bRecvrFlag = true;              
+                                       }
+                               }
+                               else
+                               {
+                                       FPRINTF("\\n[Line : %d][SoundManager_ITc]%s is De-Activated on the target device",__LINE__, SoundManagerGetType(eType));
+                               }
+                       }
+                       hDevice = NULL;
+                       nRetVal = sound_manager_get_next_device(deviceList, &hDevice);
+               }
+       }
+       
+#if SPEED_CHECK
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundSessionModeIterator, sizeof(char));
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT * nSoundSessionModeIterator, sizeof(char));
+#endif
+
+#if MEMORY_CHECK
+       pszGetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundSessionModeIterator, sizeof(char));
+       pszSetMemLog = calloc(MEMLOG * MAX_COUNT * nSoundSessionModeIterator, sizeof(char));
+#endif
+
+       for(nEnumLoopCount = 0 ; nEnumLoopCount < nSoundSessionModeIterator ; nEnumLoopCount++ )
+       {
+               eSetSessionMode = arrSoundSessionMode[nEnumLoopCount];
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]Executing for sound_manager_set_voip_session_mode mode type = %d ",__LINE__, eSetSessionMode);
+               
+               if(eSetSessionMode == SOUND_SESSION_VOIP_MODE_VOICE_WITH_AUDIO_JACK && bAudioJackFlag == false)
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]Audio output device ear jack is not connected to the target device",__LINE__);
+                       continue;
+               }
+               if(eSetSessionMode == SOUND_SESSION_VOIP_MODE_VOICE_WITH_BUILTIN_RECEIVER && bRecvrFlag == false)
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]Built-In Receiver is de-activated on the target device\\n",__LINE__);
+                       continue;
+               }
+               if(eSetSessionMode == SOUND_SESSION_VOIP_MODE_VOICE_WITH_BUILTIN_SPEAKER && bSpkrFlag == false)
+               {
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]Built-In Speaker is de-activated on the target device\\n",__LINE__);
+                       continue;
+               }
+               
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_set_voip_session_mode(eSetSessionMode);
+                       SoundManagerExecutionDelay(pszSetSpeedLog);
+                       SoundManagerGetMemStatus(pszSetMemLog);
+                       FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_voip_session_mode mode type = %d",__LINE__, eSetSessionMode);
+                               
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_set_voip_session_mode failed on iteration %d, error returned = %s",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nSetFailCount++;
+                               continue;
+                       }
+
+                       SoundManagerGetMemAllocation();
+                       SoundManagerGetTimeOfDay();
+                       nRetVal = sound_manager_get_voip_session_mode(&eGetSessionMode);
+                       SoundManagerExecutionDelay(pszGetSpeedLog);
+                       SoundManagerGetMemStatus(pszGetMemLog);
+                       if((nRetVal != SOUND_MANAGER_ERROR_NONE))
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]sound_manager_get_voip_session_mode failed on iteration %d, error returned = %s",__LINE__, nLoopCount, SoundManagerGetError(nRetVal));
+                               nGetFailCount++;
+                               continue;
+                       }
+
+                       if(eSetSessionMode != eGetSessionMode)
+                       {
+                               FPRINTF("\\n[Line : %d][SoundManager_ITc]After sound_manager_get_voip_session_mode failed on iteration %d, returned voip session mode = %d and set voip session mode = %d",__LINE__, nLoopCount, eGetSessionMode ,eSetSessionMode);
+                               nGetFailCount++;
+                       }
+
+               }
+       }
+
+
+       if ( nGetFailCount > 0 || nSetFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][SoundManager_ITc]%s failed %d times, %s failed %d times out of %d times\\n",__LINE__, "sound_manager_set_voip_session_mode", nSetFailCount , "sound_manager_get_voip_session_mode", nGetFailCount, (MAX_COUNT * nSoundSessionModeIterator));
+
+#if SPEED_CHECK
+               free(pszGetSpeedLog);
+               free(pszSetSpeedLog);
+               pszGetSpeedLog = NULL;
+               pszSetSpeedLog = NULL;
+#endif
+
+#if MEMORY_CHECK
+               free(pszGetMemLog);
+               free(pszSetMemLog);
+               pszGetMemLog = NULL;
+               pszSetMemLog = NULL;
+#endif
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(sound_manager_set_voip_session_mode, pszSetSpeedLog);
+       PRINT_SPEED_LOG(sound_manager_get_voip_session_mode, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(sound_manager_set_voip_session_mode, pszSetMemLog);
+       PRINT_MEMORY_LOG(sound_manager_get_voip_session_mode, pszGetMemLog);
+#endif
+
+       return 0;
+}
+
+/** @} */ 
+/** @} */
\ No newline at end of file
diff --git a/src/itc/sound-manager/tct-sound-manager-native.c b/src/itc/sound-manager/tct-sound-manager-native.c
new file mode 100755 (executable)
index 0000000..0241ebb
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-sound-manager-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/sound-manager/tct-sound-manager-native.h b/src/itc/sound-manager/tct-sound-manager-native.h
new file mode 100755 (executable)
index 0000000..9600b56
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SOUND_MANAGER_NATIVE_H__
+#define __TCT_SOUND_MANAGER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_sound_manager_startup(void);
+extern void ITs_sound_manager_cleanup(void);
+
+extern int ITc_sound_manager_sound_manager_get_max_volume_p(void);
+extern int ITc_sound_manager_sound_manager_set_get_volume_p(void);
+extern int ITc_sound_manager_get_set_session_type_p(void);
+extern int ITc_sound_manager_set_unset_volume_changed_cb_p(void);
+extern int ITc_sound_manager_set_unset_session_interrupted_cb_p(void);
+extern int ITc_sound_manager_set_get_media_session_option_p(void);
+extern int ITc_sound_manager_set_get_media_session_resumption_option_p(void);
+extern int ITc_sound_manager_set_unset_current_sound_type_p(void);
+extern int ITc_sound_manager_get_current_sound_type_p(void);
+extern int ITc_sound_manager_get_current_device_list_p(void);
+extern int ITc_sound_manager_get_next_device_p(void);
+extern int ITc_sound_manager_get_prev_device_p(void);
+extern int ITc_sound_manager_get_device_type_p(void);
+extern int ITc_sound_manager_get_device_io_direction_p(void);
+extern int ITc_sound_manager_get_device_id_p(void);
+extern int ITc_sound_manager_get_device_name_p(void);
+extern int ITc_sound_manager_get_device_state_p(void);
+extern int ITc_sound_manager_set_unset_device_connected_cb_p(void);
+extern int ITc_sound_manager_set_unset_device_information_changed_cb_p(void);
+extern int ITc_sound_manager_set_get_voip_session_mode_p(void);
+
+testcase tc_array[] = {
+    {"ITc_sound_manager_sound_manager_get_max_volume_p", ITc_sound_manager_sound_manager_get_max_volume_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_sound_manager_set_get_volume_p", ITc_sound_manager_sound_manager_set_get_volume_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_get_set_session_type_p", ITc_sound_manager_get_set_session_type_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_set_unset_volume_changed_cb_p", ITc_sound_manager_set_unset_volume_changed_cb_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_set_unset_session_interrupted_cb_p", ITc_sound_manager_set_unset_session_interrupted_cb_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_set_get_media_session_option_p", ITc_sound_manager_set_get_media_session_option_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_set_get_media_session_resumption_option_p", ITc_sound_manager_set_get_media_session_resumption_option_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_set_unset_current_sound_type_p", ITc_sound_manager_set_unset_current_sound_type_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_get_current_sound_type_p", ITc_sound_manager_get_current_sound_type_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_get_current_device_list_p", ITc_sound_manager_get_current_device_list_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_get_next_device_p", ITc_sound_manager_get_next_device_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_get_prev_device_p", ITc_sound_manager_get_prev_device_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_get_device_type_p", ITc_sound_manager_get_device_type_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_get_device_io_direction_p", ITc_sound_manager_get_device_io_direction_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_get_device_id_p", ITc_sound_manager_get_device_id_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_get_device_name_p", ITc_sound_manager_get_device_name_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_get_device_state_p", ITc_sound_manager_get_device_state_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_set_unset_device_connected_cb_p", ITc_sound_manager_set_unset_device_connected_cb_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_set_unset_device_information_changed_cb_p", ITc_sound_manager_set_unset_device_information_changed_cb_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {"ITc_sound_manager_set_get_voip_session_mode_p", ITc_sound_manager_set_get_voip_session_mode_p, ITs_sound_manager_startup, ITs_sound_manager_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SOUND_MANAGER_NATIVE_H__
diff --git a/src/itc/stt/CMakeLists.txt b/src/itc/stt/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..eaaf3c8
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "stt")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "stt")
+SET(TC_SOURCES
+       ITs-stt-common.c
+       ITs-stt.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-appfw-application
+       capi-system-info
+       glib-2.0
+       ecore
+       elementary
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/stt/ITs-stt-common.c b/src/itc/stt/ITs-stt-common.c
new file mode 100755 (executable)
index 0000000..6f9d01d
--- /dev/null
@@ -0,0 +1,253 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-stt-common.h"
+
+/** @addtogroup itc-stt
+*  @ingroup itc
+*  @{
+*/
+//Add helper function definitions here
+
+/**
+* @function            SttGetError
+* @description         Maps stt_error_e enums to string values
+* @parameter           nError : error code returned
+* @return                      error string
+*/
+char* SttGetError(stt_error_e nError)
+{
+       char *szErrorVal = NULL;
+       switch ( nError )
+       {
+       case STT_ERROR_NONE:                                    szErrorVal = "STT_ERROR_NONE";                                  break;
+       case STT_ERROR_OUT_OF_MEMORY:                   szErrorVal = "STT_ERROR_OUT_OF_MEMORY";                 break;
+       case STT_ERROR_INVALID_PARAMETER:               szErrorVal = "STT_ERROR_INVALID_PARAMETER";             break;
+       case STT_ERROR_IO_ERROR:                                szErrorVal = "STT_ERROR_IO_ERROR";                              break;
+       case STT_ERROR_TIMED_OUT:                               szErrorVal = "STT_ERROR_TIMED_OUT";                             break;
+       case STT_ERROR_OPERATION_FAILED:                szErrorVal = "STT_ERROR_OPERATION_FAILED";              break;
+       case STT_ERROR_RECORDER_BUSY:                   szErrorVal = "STT_ERROR_RECORDER_BUSY";                 break;
+       case STT_ERROR_OUT_OF_NETWORK:                  szErrorVal = "STT_ERROR_OUT_OF_NETWORK";                break;
+       case STT_ERROR_INVALID_STATE:                   szErrorVal = "STT_ERROR_INVALID_STATE";                 break;
+       case STT_ERROR_INVALID_LANGUAGE:                szErrorVal = "STT_ERROR_INVALID_LANGUAGE";              break;
+       case STT_ERROR_ENGINE_NOT_FOUND:                szErrorVal = "STT_ERROR_ENGINE_NOT_FOUND";              break;
+       case STT_ERROR_NOT_SUPPORTED:                   szErrorVal = "STT_ERROR_NOT_SUPPORTED";                 break;
+       case STT_ERROR_NOT_SUPPORTED_FEATURE:   szErrorVal = "STT_ERROR_NOT_SUPPORTED_FEATURE"; break;
+       default:                                                                szErrorVal = "Undefined Error";                                 break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            SttGetOptionForSilenceDetection
+* @description         Maps stt_option_silence_detection_e enums to string values
+* @parameter           nOption : silent detection option
+* @return                      silent detection option string
+*/
+char* SttGetOptionForSilenceDetection(stt_option_silence_detection_e nOption)
+{
+       char *szOption = NULL;
+       switch ( nOption )
+       {
+       case STT_OPTION_SILENCE_DETECTION_FALSE:        szOption = "STT_OPTION_SILENCE_DETECTION_FALSE";        break;
+       case STT_OPTION_SILENCE_DETECTION_TRUE:         szOption = "STT_OPTION_SILENCE_DETECTION_TRUE";         break;
+       case STT_OPTION_SILENCE_DETECTION_AUTO:         szOption = "STT_OPTION_SILENCE_DETECTION_AUTO";         break;
+       default:                                                                        szOption = "Undefined Option";                                          break;
+       }
+
+       return szOption;
+}
+
+/**
+* @function            SttGetResultEvent
+* @description         Maps stt_result_event_e enums to string values
+* @parameter           nEvent : result event
+* @return                      result event string
+*/
+char* SttGetResultEvent(stt_result_event_e nEvent)
+{
+       char *szEvent = NULL;
+       switch ( nEvent )
+       {
+       case STT_RESULT_EVENT_FINAL_RESULT:             szEvent = "STT_RESULT_EVENT_FINAL_RESULT";              break;
+       case STT_RESULT_EVENT_PARTIAL_RESULT:   szEvent = "STT_RESULT_EVENT_PARTIAL_RESULT";    break;
+       case STT_RESULT_EVENT_ERROR:                    szEvent = "STT_RESULT_EVENT_ERROR";                             break;
+       default:                                                                szEvent = "Undefined Result Event";                             break;
+       }
+
+       return szEvent;
+}
+
+/**
+* @function            SttGetResultTimeEvent
+* @description         Maps stt_result_time_event_e enums to string values
+* @parameter           nRet : result time event
+* @return                      result time event string
+*/
+char* SttGetResultTimeEvent(stt_result_time_event_e nEvent)
+{
+       char *szEvent = NULL;
+       switch ( nEvent )
+       {
+       case STT_RESULT_TIME_EVENT_BEGINNING:   szEvent = "STT_RESULT_TIME_EVENT_BEGINNING";    break;  //Event when the token is beginning type
+       case STT_RESULT_TIME_EVENT_MIDDLE:              szEvent = "STT_RESULT_TIME_EVENT_MIDDLE";               break;  //Event when the token is middle type
+       case STT_RESULT_TIME_EVENT_END:                 szEvent = "STT_RESULT_TIME_EVENT_END";                  break;  //Event when the token is end type
+       default:                                                                szEvent = "Undefined Result Time Event";                break;
+       }
+
+       return szEvent;
+}
+
+/**
+* @function            SttGetState
+* @description         Maps stt_state_e enums to string values
+* @parameter           nState : state
+* @return                      state string
+*/
+char* SttGetState(stt_state_e nState)
+{
+       char *szState = NULL;
+       switch ( nState )
+       {
+       case STT_STATE_CREATED:         szState = "STT_STATE_CREATED";          break;
+       case STT_STATE_READY:           szState = "STT_STATE_READY";            break;
+       case STT_STATE_RECORDING:       szState = "STT_STATE_RECORDING";        break;
+       case STT_STATE_PROCESSING:      szState = "STT_STATE_PROCESSING";       break;
+       default:                                        szState = "Undefined State";            break;
+       }
+
+       return szState;
+}
+
+/**
+* @function            SttGetDataPath
+* @description         Returns the application data path
+* @parameter           pAppDataPath: application data path
+* @return                      true if succeed else false
+*/
+bool SttGetDataPath(char* pAppDataPath)
+{
+       if ( NULL == pAppDataPath )
+       {
+               FPRINTF("[Line : %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if ( NULL == pPath )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get application data path; app_get_data_path returned null value\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
+
+       return true;
+}
+
+/**
+* @function            SttAppendToAppDataPath
+* @description         Appends the input string to application data path
+* @parameter           pInputPath: path to append to data path; pFinalPath: final resultant path
+* @return                      true if succeed else false
+*/
+bool SttAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if ( (NULL == pInputPath) || (NULL == pFinalPath) )
+       {
+               FPRINTF("[Line : %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if ( false == SttGetDataPath(pAppDataPath) )
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+
+       FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
+
+       return true;
+}
+
+/**
+* @function            SttCheckSystemInfoFeatureSupported
+* @description         Check the supported feature for the given key value
+* @parameter           char* pszKey : key value, char* pszModuleName : module name
+* @return                      true if supported else false
+*/
+bool SttCheckSystemInfoFeatureSupported(char* pszKey, char* pszModuleName)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("[Line : %d][%s] Null key value passed to function : SttCheckSystemInfoFeatureSupported\\n", __LINE__, pszModuleName);
+               return false;
+       }
+
+       bool bValue = false;
+       int nRet = system_info_get_platform_bool (pszKey, &bValue);
+
+       if ( nRet != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n", __LINE__, pszModuleName, SttSystemInfoGetError(nRet), pszKey);
+               return false;
+       }
+
+       if ( bValue )
+       {
+               FPRINTF("[Line : %d][%s] Feature %s is supported\\n", __LINE__, pszModuleName, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Feature %s is not supported\\n", __LINE__, pszModuleName, pszKey);
+       }
+
+
+       return bValue;
+}
+
+/**
+* @function            SttSystemInfoGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* SttSystemInfoGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case SYSTEM_INFO_ERROR_NONE:                            szErrorVal = "SYSTEM_INFO_ERROR_NONE";                                  break;
+       case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER";             break;
+       case SYSTEM_INFO_ERROR_IO_ERROR:                        szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR";                              break;
+       case SYSTEM_INFO_ERROR_OUT_OF_MEMORY :          szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY";                 break;
+       default :                                                                       szErrorVal = "Unknown error";                                                   break;
+       }
+
+       return szErrorVal;
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/stt/ITs-stt-common.h b/src/itc/stt/ITs-stt-common.h
new file mode 100755 (executable)
index 0000000..514682f
--- /dev/null
@@ -0,0 +1,195 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_STT_COMMON_H_
+#define _ITS_STT_COMMON_H_
+
+//Add test package related includes here
+#include "assert.h"
+
+#include <stt.h>
+#include <app.h>
+#include <system_info.h>
+
+#include <glib.h>
+#include <glib-object.h>
+#include <malloc.h>
+#include <time.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+/** @addtogroup itc-stt
+*  @ingroup itc
+*  @{
+*/
+
+#define API_NAMESPACE                          "STT_ITC"
+#define PATH_LEN                                       1024
+#define START_SOUND                                    "start_sound.wav"
+#define STOP_SOUND                                     "stop_sound.wav"
+#define TIME_LIMIT                                     20
+
+#define MICROPHONE_FEATURE                     "http://tizen.org/feature/microphone"
+#define SPEECH_RECOGNITION_FEATURE     "http://tizen.org/feature/speech.recognition"
+
+bool g_bFeatureSupported;
+bool g_bFeatureMismatch;
+bool g_bFeatureNotSupported;
+
+FILE *g_fpLog;
+
+stt_h g_hStt;
+bool g_bSttCreation;
+bool g_bFeatureSupported;
+
+bool g_bDefaultLanguageChangedCallbackOccurred;
+char* g_szPreviousLanguage;
+char* g_szCurrentLanguage;
+
+bool g_bErrorCallbackOccurred;
+stt_error_e g_nErrorReason;
+
+bool g_bResultCallbackOccurred;
+stt_result_event_e g_nResultEvent;
+
+bool g_bResultTimeCallbackOccurred;
+stt_result_time_event_e g_nResultTimeEvent;
+
+bool g_bStateCallbackOccurred;
+stt_state_e g_nPreviousState;
+stt_state_e g_nCurrentState;
+
+bool g_bSupportedEngineCallbackOccured;
+
+bool g_bSupportedLanguageCallbackOccured;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
+       if ( g_bFeatureMismatch )\
+{\
+       return 1;\
+}\
+       if ( g_bFeatureNotSupported )\
+{\
+       return 0;\
+}\
+       if ( !g_bSttCreation )\
+{\
+       FPRINTF("[Line : %d][%s] Precondition of STT handle creation failed. So leaving test", __LINE__, API_NAMESPACE);\
+       return 1;\
+}\
+}
+
+#define PRINT_RESULT_CLEANUP(eCompare, eRetVal, API, Error, FreeResource) {\
+       if ( eRetVal == eCompare )\
+{\
+       if ( DEBUG )\
+{\
+       FPRINTF("[Line : %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+}\
+}\
+else \
+{\
+       FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+       FreeResource;\
+       return 1;\
+}\
+}
+
+#define PRINT_RESULT(eCompare, eRetVal, API, Error) {\
+       if ( eRetVal == eCompare )\
+{\
+       if ( DEBUG )\
+{\
+       FPRINTF("[Line : %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+}\
+}\
+       else \
+{\
+       FPRINTF("[Line : %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+       return 1;\
+}\
+}
+
+#define CHECK_HANDLE(Handle, API) {\
+       if ( Handle == NULL )\
+{\
+       FPRINTF("[Line : %d][%s] %s failed, error returned = Handle returned is NULL\\n", __LINE__, API_NAMESPACE, API);\
+       return 1;\
+}\
+}
+
+#define WAIT_FOR_CALLBACK(state) {\
+       time_t time1 = time(NULL);\
+       while(state != g_nCurrentState)\
+       {\
+               time_t time2 = time(NULL);\
+               int diff = (int)difftime(time2, time1);\
+               if ( diff > TIME_LIMIT )\
+               {\
+                       break;\
+               }\
+               ecore_main_loop_iterate();\
+       }\
+}\
+
+#define FREE_MEMORY(buffer) {\
+       if ( buffer != NULL )\
+{\
+       free(buffer);\
+       buffer = NULL;\
+}\
+}
+
+/******************************************************* HELPER FUNCTIONS**************************************************/
+
+// Maps stt_error_e enums to string values
+char* SttGetError(stt_error_e nError);
+
+// Maps stt_option_silence_detection_e enums to string values
+char* SttGetOptionForSilenceDetection(stt_option_silence_detection_e nOption);
+
+// Maps stt_result_event_e enums to string values
+char* SttGetResultEvent(stt_result_event_e nEvent);
+
+// Maps stt_result_time_event_e enums to string values
+char* SttGetResultTimeEvent(stt_result_time_event_e nEvent);
+
+// Maps stt_state_e enums to string values
+char* SttGetState(stt_state_e nState);
+
+// This function outputs the application data path
+bool SttGetDataPath(char* pPath);
+
+// This function appends the input string to app data path and outputs the final resultant path
+bool SttAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+
+bool SttCheckSystemInfoFeatureSupported(char* pszKey, char* pszModuleName);
+char* SttSystemInfoGetError(int nRet);
+
+/** @} */
+#endif  //_ITS_STT_COMMON_H_
diff --git a/src/itc/stt/ITs-stt.c b/src/itc/stt/ITs-stt.c
new file mode 100755 (executable)
index 0000000..35a910c
--- /dev/null
@@ -0,0 +1,2619 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-stt-common.h"
+#include <Ecore.h>
+#include <Elementary.h>
+
+/** @addtogroup itc-stt
+*  @ingroup itc
+*  @{
+*/
+//& set: Stt
+
+char* g_szSupportedLanguages[100];
+int g_nSupportedLanguageCount = 0;
+
+bool g_bCallbackParameterCheck;
+char* g_szSupportedEngineNames[100];
+char* g_szSupportedEngineIDs[100];
+int g_nSupportedEngineCount = 0;
+
+stt_result_time_event_e g_resultEvents[100];
+int g_nResultEventCount = 0;
+
+bool bCallbackResult = false;
+
+/**
+* @function            ITs_stt_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_stt_startup(void)
+{
+       elm_init(0, NULL);
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_STT_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bFeatureSupported = true;
+       g_bFeatureMismatch = false;
+       g_bFeatureNotSupported = false;
+
+       g_bFeatureSupported = SttCheckSystemInfoFeatureSupported(MICROPHONE_FEATURE, API_NAMESPACE) &&
+               SttCheckSystemInfoFeatureSupported(SPEECH_RECOGNITION_FEATURE, API_NAMESPACE);
+
+       //Create STT Handle
+       int nRet = stt_create(&g_hStt);
+
+       if ( !g_bFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][%s] stt_create returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+                       g_bFeatureMismatch = true;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][%s] stt_create correctly returned %s error for unsupported feature\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+                       g_bFeatureNotSupported = true;
+               }
+               return;
+       }
+
+       if ( nRet == STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] STT handle created successfully in precondition\\n", __LINE__, API_NAMESPACE);
+
+               //Check state after stt_create
+               stt_state_e nState;
+               nRet = stt_get_state(g_hStt, &nState);
+               if ( nRet != STT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] Support API stt_get_state failed, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+                       g_bSttCreation = false;
+               }
+               else if ( nState != STT_STATE_CREATED )
+               {
+                       FPRINTF("[Line : %d][%s] Support API stt_get_state returned invalid state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(nState));
+                       g_bSttCreation = false;
+               }
+               else
+               {
+                       g_bSttCreation = true;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to create STT handle in precondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               g_bSttCreation = false;
+       }               
+       return;
+}
+
+/**
+* @function            ITs_stt_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_stt_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_STT_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       //Destroy STT Handle
+       if ( g_bFeatureSupported && g_bSttCreation && g_hStt != NULL )
+       {
+               int nRet = stt_destroy(g_hStt);
+               if ( nRet == STT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] STT handle destroyed successfully in postcondition\\n", __LINE__, API_NAMESPACE);
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][%s] Unable to destroy SST handle in postcondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               }
+       }
+       elm_shutdown();
+       return;
+}
+
+/**
+* @function            stt_default_language_changed_callback
+* @description         Called when the default language is changed
+* @parameter           [in] stt The STT handle
+*                                      [in] previous_language A previous language
+*                                      [in] current_language A current language
+*                                      [in] user_data The user data passed from the callback registration function
+* @return                      None
+*/
+void stt_default_language_changed_callback(stt_h stt, const char *previous_language, const char *current_language, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] Reached stt_default_language_changed_callback\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bDefaultLanguageChangedCallbackOccurred = true;
+
+       if ( g_szPreviousLanguage == NULL )
+       {
+               g_szPreviousLanguage = (char *) malloc(256 * sizeof(char));
+       }
+       else
+       {
+               memset(g_szPreviousLanguage, 0, 256);
+       }
+       strcpy(g_szPreviousLanguage, previous_language);
+
+       if ( g_szCurrentLanguage == NULL )
+       {
+               g_szCurrentLanguage = (char *) malloc(256 * sizeof(char));
+       }
+       else
+       {
+               memset(g_szCurrentLanguage, 0, 256);
+       }
+       strcpy(g_szCurrentLanguage, current_language);
+}
+
+/**
+* @function            stt_error_callback
+* @description         Called when an error occurs
+* @parameter           [in] stt The STT handle
+*                                      [in] reason The error type (e.g. STT_ERROR_OUT_OF_NETWORK, STT_ERROR_IO_ERROR)
+*                                      [in] user_data The user data passed from the callback registration function
+* @precondition        An application registers this callback using stt_set_error_cb() to detect error
+* @return                      None
+*/
+void stt_error_callback(stt_h stt, stt_error_e reason, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] Reached stt_error_callback\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bErrorCallbackOccurred = true;
+
+       g_nErrorReason = reason;
+}
+
+/**
+* @function            stt_recognition_result_callback
+* @description         Called when STT gets the recognition result from the engine
+* @remarks                     After stt_stop() is called, silence is detected from recording, or partial result is occurred, this function is called
+* @parameter           [in] stt The STT handle
+*                                      [in] event The result event
+*                                      [in] data Result texts
+*                                      [in] data_count Result text count
+*                                      [in] msg Engine message (e.g. STT_RESULT_MESSAGE_NONE, STT_RESULT_MESSAGE_ERROR_TOO_SHORT)
+*                                      [in] user_data The user data passed from the callback registration function
+* @precondition        stt_stop() will invoke this callback if you register it using stt_set_result_cb()
+* @postcondition       If this function is called and event is STT_RESULT_EVENT_FINAL_RESULT, the STT state will be STT_STATE_READY
+* @return                      None
+*/
+void stt_recognition_result_callback(stt_h stt, stt_result_event_e event, const char **data, int data_count, const char *msg, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] Reached stt_recognition_result_callback\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bResultCallbackOccurred = true;
+       
+       if(stt == NULL)
+       {
+               FPRINTF("[Line : %d][%s] Handle is NULL in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if((event<STT_RESULT_EVENT_FINAL_RESULT) || (event>STT_RESULT_EVENT_ERROR))
+       {
+               FPRINTF("[Line : %d][%s] event is not valid in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if(data == NULL)
+       {
+               FPRINTF("[Line : %d][%s] data is NULL in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if(msg == NULL)
+       {
+               FPRINTF("[Line : %d][%s] msg is NULL in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if(data_count == -1)
+       {
+               FPRINTF("[Line : %d][%s] data count is invalid in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else
+       {
+               g_bCallbackParameterCheck = true;
+       }
+
+       g_nResultEvent = event;
+}
+
+/**
+* @function            stt_result_time_callback
+* @description         Called when STT get the result time stamp in free partial type
+* @parameter           [in] stt The STT handle
+*                                      [in] index The result index
+*                                      [in] event The token event
+*                                      [in] text The result text
+*                                      [in] start_time The start time of result text
+*                                      [in] end_time The end time of result text
+*                                      [in] user_data The user data passed from the foreach function
+* @precondition        stt_recognition_result_cb() should be called
+* @return                      true to continue with the next iteration of the loop , false to break out of the loop
+*/
+bool stt_result_time_callback(stt_h stt, int index, stt_result_time_event_e event, const char *text, long start_time, long end_time, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] Reached stt_result_time_callback\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bResultTimeCallbackOccurred = true;
+
+       g_resultEvents[g_nResultEventCount] = event;
+       g_nResultEventCount++;
+
+       return true;
+}
+
+/**
+* @function            stt_state_changed_callback
+* @description         Called when the state of STT is changed
+* @parameter           [in] stt The STT handle
+*                                      [in] previous A previous state
+*                                      [in] current A current state
+*                                      [in] user_data The user data passed from the callback registration function
+* @precondition        An application registers this callback using stt_set_state_changed_cb() to detect changing state
+* @return                      None
+*/
+void stt_state_changed_callback(stt_h stt, stt_state_e previous, stt_state_e current, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] Reached stt_state_changed_callback\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bStateCallbackOccurred = true;
+       
+       if(stt == NULL)
+       {
+               FPRINTF("[Line : %d][%s] Handle is NULL in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if((previous<STT_STATE_CREATED) || (previous>STT_STATE_PROCESSING))
+       {
+               FPRINTF("[Line : %d][%s] previous state is not valid in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if((current<STT_STATE_CREATED) || (current>STT_STATE_PROCESSING))
+       {
+               FPRINTF("[Line : %d][%s] current state is not valid in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else
+       {
+               g_bCallbackParameterCheck = true;
+       }
+
+       g_nPreviousState = previous;
+       g_nCurrentState = current;
+}
+
+/**
+* @function            stt_supported_engine_callback
+* @description         Called to retrieve the supported languages
+* @remarks                     The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.
+*                                      For example, "ko_KR" for Korean, "en_US" for American English
+* @parameter           [in] engine_id Engine id
+*                                      [in] engine_name Engine name
+*                                      [in] user_data User data passed from the stt_setting_foreach_supported_engines()
+* @precondition        stt_foreach_supported_engines() will invoke this callback
+* @return                      true to continue with the next iteration of the loop, false to break out of the loop 
+*/
+bool stt_supported_engine_callback(stt_h stt, const char *engine_id, const char *engine_name, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] Reached stt_supported_engine_callback\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bSupportedEngineCallbackOccured = true;
+       
+       if(stt == NULL)
+       {
+               FPRINTF("[Line : %d][%s] Handle is NULL in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if(engine_id == NULL)
+       {
+               FPRINTF("[Line : %d][%s] engine id is not valid in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+               return false;
+       }
+       else if(engine_name == NULL)
+       {
+               FPRINTF("[Line : %d][%s] engine name is not valid in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+               return false;
+       }
+       else
+       {
+               g_bCallbackParameterCheck = true;
+       }
+
+       if ( g_szSupportedEngineIDs[g_nSupportedEngineCount] == NULL )
+       {
+               g_szSupportedEngineIDs[g_nSupportedEngineCount] = (char *) malloc(256 * sizeof(char));
+       }
+       else
+       {
+               memset(g_szSupportedEngineIDs[g_nSupportedEngineCount], 0, 256);
+       }
+       if(engine_id != NULL)
+       strcpy(g_szSupportedEngineIDs[g_nSupportedEngineCount], engine_id);
+
+       if ( g_szSupportedEngineNames[g_nSupportedEngineCount] == NULL )
+       {
+               g_szSupportedEngineNames[g_nSupportedEngineCount] = (char *) malloc(256 * sizeof(char));
+       }
+       else
+       {
+               memset(g_szSupportedEngineNames[g_nSupportedEngineCount], 0, 256);
+       }
+       if(engine_name != NULL)
+       strcpy(g_szSupportedEngineNames[g_nSupportedEngineCount], engine_name);
+
+       g_nSupportedEngineCount++;
+
+       return true;
+}
+
+/**
+* @function            stt_supported_language_callback
+* @description         Called to retrieve the supported languages
+* @remarks                     The language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.
+*                                      For example, "ko_KR" for Korean, "en_US" for American English
+* @parameter           [in] stt The STT handle
+*                                      [in] language The language
+*                                      [in] user_data The user data passed from the foreach function
+* @precondition        stt_foreach_supported_languages() will invoke this callback
+* @return                      true to continue with the next iteration of the loop, false to break out of the loop 
+*/
+bool stt_supported_language_callback(stt_h stt, const char *language, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] Reached stt_supported_language_callback\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bSupportedLanguageCallbackOccured = true;
+       
+       if(stt == NULL)
+       {
+               FPRINTF("[Line : %d][%s] Handle is NULL in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if(language == NULL)
+       {
+               FPRINTF("[Line : %d][%s] language is not valid in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+               return false;
+       }
+       else
+       {
+               g_bCallbackParameterCheck = true;
+       }
+
+
+       if ( g_szSupportedLanguages[g_nSupportedLanguageCount] == NULL )
+       {
+               g_szSupportedLanguages[g_nSupportedLanguageCount] = (char *) malloc(256 * sizeof(char));
+       }
+       else
+       {
+               memset(g_szSupportedLanguages[g_nSupportedLanguageCount], 0, 256);
+       }
+       if(language != NULL)
+       strcpy(g_szSupportedLanguages[g_nSupportedLanguageCount], language);
+       g_nSupportedLanguageCount++;
+
+       return true;
+}
+
+/**
+* @function            stt_recognition_result_callback_check_detailed_result
+* @description         Called when STT gets the recognition result from the engine
+* @remarks                     After stt_stop() is called, silence is detected from recording, or partial result is occurred, this function is called
+* @parameter           [in] stt The STT handle
+*                                      [in] event The result event
+*                                      [in] data Result texts
+*                                      [in] data_count Result text count
+*                                      [in] msg Engine message (e.g. STT_RESULT_MESSAGE_NONE, STT_RESULT_MESSAGE_ERROR_TOO_SHORT)
+*                                      [in] user_data The user data passed from the callback registration function
+* @precondition        stt_stop() will invoke this callback if you register it using stt_set_result_cb()
+* @postcondition       If this function is called and event is STT_RESULT_EVENT_FINAL_RESULT, the STT state will be STT_STATE_READY
+* @return                      None
+*/
+void stt_recognition_result_callback_check_detailed_result(stt_h stt, stt_result_event_e event, const char **data, int data_count, const char *msg, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] Reached stt_recognition_result_callback_check_detailed_result\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       g_bResultCallbackOccurred = true;
+       
+       if(stt == NULL)
+       {
+               FPRINTF("[Line : %d][%s] Handle is NULL in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if((event<STT_RESULT_EVENT_FINAL_RESULT) || (event>STT_RESULT_EVENT_ERROR))
+       {
+               FPRINTF("[Line : %d][%s] event is not valid in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if(data == NULL)
+       {
+               FPRINTF("[Line : %d][%s] data is NULL in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if(msg == NULL)
+       {
+               FPRINTF("[Line : %d][%s] msg is NULL in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else if(data_count == -1)
+       {
+               FPRINTF("[Line : %d][%s] data count is invalid in callback function\\n", __LINE__, API_NAMESPACE);
+               g_bCallbackParameterCheck = false;
+       }
+       else
+       {
+               g_bCallbackParameterCheck = true;
+       }
+
+       //Target API
+       /**** Retrieve the time stamp of the current recognition result using the callback function ***/
+       int nRet = stt_foreach_detailed_result(g_hStt, stt_result_time_callback, NULL);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] stt_foreach_detailed_result failed, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               bCallbackResult = false;
+       }
+       else if ( !g_bResultTimeCallbackOccurred )
+       {
+               FPRINTF("[Line : %d][%s] stt_foreach_detailed_result failed to invoke stt_result_time_cb callback\\n", __LINE__, API_NAMESPACE);
+               bCallbackResult = false;
+       }
+       else if ( g_nResultEventCount == 0 )
+       {
+               FPRINTF("[Line : %d][%s] stt_foreach_detailed_result failed to get any result event in callback\\n", __LINE__, API_NAMESPACE);
+               bCallbackResult = false;
+       }
+       else if ( g_resultEvents[0] != STT_RESULT_TIME_EVENT_BEGINNING )
+       {
+               FPRINTF("[Line : %d][%s] stt_foreach_detailed_result invoked callback with invalid initial event %s, expected initial event = STT_RESULT_TIME_EVENT_BEGINNING\\n",
+                       __LINE__, API_NAMESPACE, SttGetResultTimeEvent(g_resultEvents[0]));
+               bCallbackResult = false;
+       }
+       else if ( g_resultEvents[g_nResultEventCount/2] != STT_RESULT_TIME_EVENT_MIDDLE )
+       {
+               FPRINTF("[Line : %d][%s] stt_foreach_detailed_result invoked callback with invalid middle event %s, expected middle event = STT_RESULT_TIME_EVENT_MIDDLE\\n",
+                       __LINE__, API_NAMESPACE, SttGetResultTimeEvent(g_resultEvents[g_nResultEventCount/2]));
+               bCallbackResult = false;
+       }
+       else if ( g_resultEvents[g_nResultEventCount - 1] != STT_RESULT_TIME_EVENT_END )
+       {
+               FPRINTF("[Line : %d][%s] stt_foreach_detailed_result invoked callback with invalid final event %s, expected final event = STT_RESULT_TIME_EVENT_END\\n",
+                       __LINE__, API_NAMESPACE, SttGetResultTimeEvent(g_resultEvents[g_nResultEventCount - 1]));
+               bCallbackResult = false;
+       }
+}
+
+/**
+* @function            initialize_setup_without_result_callback
+* @description         Connect the STT daemon to make STT_STATE_READY state
+* @parameter           None
+* @precondition        State is STT_STATE_CREATED
+* @postcondition       State will be STT_STATE_READY
+* @return                      None
+*/
+bool initialize_setup_without_result_callback()
+{
+       //Register a callback function to be called when STT state changes
+       g_bStateCallbackOccurred = false;
+       int nRet = stt_set_state_changed_cb(g_hStt, stt_state_changed_callback, NULL);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_set_state_changed_cb failed on precondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               return false;
+       }
+
+       //Connect the STT daemon asynchronously
+       nRet = stt_prepare(g_hStt);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_prepare failed on precondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               nRet = stt_unset_state_changed_cb(g_hStt);
+               if ( nRet != STT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] Support API stt_unset_state_changed_cb failed on postcondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               }
+               return false;
+       }
+
+       //Wait for the state change
+       WAIT_FOR_CALLBACK(STT_STATE_READY);
+       
+       //Check state after stt_prepare
+       stt_state_e nState;
+       nRet = stt_get_state(g_hStt, &nState);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_get_state failed on precondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               nRet = stt_unset_state_changed_cb(g_hStt);
+               if ( nRet != STT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] Support API stt_unset_state_changed_cb failed on postcondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               }
+               return false;
+       }
+       else if ( nState != STT_STATE_READY )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_get_state returned invalid state %s, expected state = STT_STATE_READY\\n", __LINE__, API_NAMESPACE, SttGetState(nState));
+               nRet = stt_unset_state_changed_cb(g_hStt);
+               if ( nRet != STT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] Support API stt_unset_state_changed_cb failed on postcondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               }
+               return false;
+       }       
+
+       g_bSupportedLanguageCallbackOccured = false;
+       g_nSupportedLanguageCount = 0;
+       nRet = stt_foreach_supported_languages(g_hStt, stt_supported_language_callback, NULL);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_foreach_supported_languages failed on precondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               nRet = stt_unset_state_changed_cb(g_hStt);
+               if ( nRet != STT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] Support API stt_unset_state_changed_cb failed on postcondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               }
+               return false;
+       }
+
+       return true;
+}
+
+/**
+* @function            initialize_setup_with_result_callback
+* @description         Register the result callback and connect the STT daemon to make STT_STATE_READY state
+* @parameter           None
+* @precondition        State is STT_STATE_CREATED
+* @postcondition       State will be STT_STATE_READY
+* @return                      None
+*/
+bool initialize_setup_with_result_callback()
+{
+       //Register a callback function to get the recognition result
+       g_bResultCallbackOccurred = false;
+       int nRet = stt_set_recognition_result_cb(g_hStt, stt_recognition_result_callback, NULL);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_set_recognition_result_cb failed on precondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               return false;
+       }
+
+       //Registers a callback function to be called when an error occurred
+       nRet = stt_set_error_cb(g_hStt, stt_error_callback, NULL);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_set_error_cb failed on precondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               return false;
+       }
+
+       if ( !initialize_setup_without_result_callback() )
+       {
+               return false;
+       }
+
+       return true;
+}
+
+/**
+* @function            deinitialize_setup_without_result_callback
+* @description         Disconnect the STT daemon to make STT_STATE_READY state
+* @parameter           None
+* @precondition        State is STT_STATE_READY
+* @postcondition       State will be STT_STATE_CREATED
+* @return                      None
+*/
+void deinitialize_setup_without_result_callback()
+{
+       //Disconnect the STT daemon asynchronously
+       int nRet = stt_unprepare(g_hStt);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] stt_unprepare failed on postcondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+       }
+
+       //Un-register the state callback function
+       nRet = stt_unset_state_changed_cb(g_hStt);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_unset_state_changed_cb failed on postcondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+       }
+}
+
+/**
+* @function            deinitialize_setup_with_result_callback
+* @description         Unregister the result callback and disconnect the STT daemon to make STT_STATE_READY state
+* @parameter           None
+* @precondition        State is STT_STATE_READY
+* @postcondition       State will be STT_STATE_CREATED
+* @return                      None
+*/
+void deinitialize_setup_with_result_callback()
+{
+       deinitialize_setup_without_result_callback();
+
+       //Unregister the error callback function
+       int nRet = stt_unset_error_cb(g_hStt);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_unset_error_cb failed on postcondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+       }
+
+       //Unregister the result callback function
+       nRet = stt_unset_recognition_result_cb(g_hStt);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_unset_recognition_result_cb failed on postcondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+       }
+}
+
+/** @addtogroup itc-stt-testcases
+*  @brief              Integration testcases for module stt
+*  @ingroup    itc-stt
+*  @{
+*/
+
+//& purpose Create and destroy an STT handle
+//& type: auto
+/**
+* @testcase                            ITc_stt_create_destroy_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Create and destroy an STT handle
+* @scenario                            Creates an STT handle\n
+*                                              Destroys an STT handle
+* @apicovered                  stt_create, stt_destroy, stt_get_state
+* @passcase                            If creates and destroys an STT handle
+* @failcase                            If fails to create and destroy the STT handle
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_create_destroy_p(void)
+{
+       START_TEST;
+       
+       stt_h hStt = NULL;
+
+       //Target API
+       /**** Create STT Handle ****/
+       int nRet = stt_create(&hStt);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_create", SttGetError(nRet));
+       CHECK_HANDLE(hStt, "stt_create");
+
+       //Postcondition of stt_create; Check state
+       stt_state_e nState;
+       nRet = stt_get_state(hStt, &nState);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_get_state", SttGetError(nRet), stt_destroy(hStt));
+       if ( nState != STT_STATE_CREATED )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_get_state returned invalid state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(nState));
+               stt_destroy(hStt);
+               return 1;;
+       }
+
+       //Target API
+       /**** Destroy STT Handle ****/
+       nRet = stt_destroy(hStt);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_destroy", SttGetError(nRet));
+       return 0;
+}
+
+//& purpose Connect & disconnect the daemon asynchronously
+//& type: auto
+/**
+* @testcase                            ITc_stt_prepare_unprepare_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Connect & disconnect the daemon asynchronously
+* @scenario                            Creates an STT handle\n
+*                                              Connect the daemon asynchronously\n
+*                                              Disconnect the daemon asynchronously\n
+*                                              Destroys an STT handle
+* @apicovered                  stt_set_state_changed_cb, stt_prepare, stt_unprepare, stt_unset_state_changed_cb
+* @passcase                            If connects and disconnects the STT daemon successfully
+* @failcase                            If fails to connect and disconnect the STT daemon
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_prepare_unprepare_p(void)
+{
+       START_TEST;
+       
+       //Register a callback function to be called when STT state changes
+       int nRet = stt_set_state_changed_cb(g_hStt, stt_state_changed_callback, NULL);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_set_state_changed_cb", SttGetError(nRet));
+
+       g_bStateCallbackOccurred = false;
+       g_bCallbackParameterCheck = false;
+
+       //Target API
+       /**** Connect the STT daemon asynchronously ****/
+       nRet = stt_prepare(g_hStt);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_prepare", SttGetError(nRet), stt_unset_state_changed_cb(g_hStt));
+
+       WAIT_FOR_CALLBACK(STT_STATE_READY);
+
+       if ( !g_bStateCallbackOccurred )
+       {
+               FPRINTF("[Line : %d][%s] stt_prepare failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if(!g_bCallbackParameterCheck)
+       {
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nPreviousState != STT_STATE_CREATED )
+       {
+               FPRINTF("[Line : %d][%s] stt_prepare invoked callback with invalid previous state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nCurrentState != STT_STATE_READY )  //This is precondition of stt_unprepare
+       {
+               FPRINTF("[Line : %d][%s] stt_prepare invoked callback with invalid current state %s, expected state = STT_STATE_READY\\n", __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+
+       g_bStateCallbackOccurred = false;
+
+       //Target API
+       /**** Disconnect the STT daemon asynchronously ****/
+       nRet = stt_unprepare(g_hStt);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_unprepare", SttGetError(nRet), stt_unset_state_changed_cb(g_hStt));
+
+       WAIT_FOR_CALLBACK(STT_STATE_CREATED);
+       
+       if ( !g_bStateCallbackOccurred )
+       {
+               FPRINTF("[Line : %d][%s] stt_unprepare failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nPreviousState != STT_STATE_READY )
+       {
+               FPRINTF("[Line : %d][%s] stt_unprepare invoked callback with invalid previous state %s, expected state = STT_STATE_READY\\n", __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nCurrentState != STT_STATE_CREATED )
+       {
+               FPRINTF("[Line : %d][%s] stt_unprepare invoked callback with invalid current state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+
+       nRet = stt_unset_state_changed_cb(g_hStt);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_unset_state_changed_cb", SttGetError(nRet));
+       return 0;
+}
+
+//& purpose Start recording and recognition asynchronously and then finish the recording and start recognition processing in engine asynchronously
+//& type: auto
+/**
+* @testcase                            ITc_stt_start_stop_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Start and then stop recording & recognition asynchronously
+* @scenario                            Creates an STT handle\n
+*                                              Connect the daemon asynchronously\n
+*                                              Start recording and recognition asynchronously\n
+*                                              Finish the recording and start recognition processing in engine asynchronously\n
+*                                              Disconnect the daemon asynchronously\n
+*                                              Destroys an STT handle
+* @apicovered                  stt_start, stt_stop
+* @passcase                            If starts and stops the recording successfully
+* @failcase                            If fails to start and stop the recording
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_start_stop_p(void)
+{
+       START_TEST;
+       
+       if ( !initialize_setup_with_result_callback() )
+       {
+               return 1;
+       }
+
+       const char* szRecognitionTypes[] = { STT_RECOGNITION_TYPE_FREE, STT_RECOGNITION_TYPE_FREE_PARTIAL };
+       int nRecognitionTypeCount = sizeof(szRecognitionTypes) / sizeof(szRecognitionTypes[0]);
+       int nLanguageCounter = 0, nTypeCounter = 0;
+
+       for ( nLanguageCounter=0; nLanguageCounter<g_nSupportedLanguageCount; nLanguageCounter++ )
+       {
+               for ( nTypeCounter=0; nTypeCounter<nRecognitionTypeCount; nTypeCounter++ )
+               {
+                       g_bStateCallbackOccurred = false;
+
+                       //Target API
+                       /**** Start recording and recognition asynchronously ****/
+                       int nRet = stt_start(g_hStt, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       WAIT_FOR_CALLBACK(STT_STATE_RECORDING);
+                       
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_READY )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_READY\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_RECORDING )      //This is precondition of stt_stop
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_RECORDING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       g_bStateCallbackOccurred = false;
+                       g_bResultCallbackOccurred = false;
+
+                       //Target API
+                       /**** Finish the recording and start recognition processing in engine asynchronously ****/
+                       nRet = stt_stop(g_hStt);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_stop failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       //Wait for the state change
+                       WAIT_FOR_CALLBACK(STT_STATE_PROCESSING);
+                       
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_stop failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_RECORDING )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_stop invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_RECORDING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_PROCESSING )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_stop invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_PROCESSING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       //Wait for the result to complete
+                       WAIT_FOR_CALLBACK(STT_STATE_READY);
+
+                       if ( !g_bResultCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_stop failed to invoke result callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nResultEvent == STT_RESULT_EVENT_ERROR )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_stop invoked result callback with invalid result %s for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, SttGetResultEvent(g_nResultEvent), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+               }
+       }
+
+       deinitialize_setup_with_result_callback();
+       return 0;
+}
+
+//& purpose Start recording and recognition asynchronously and then cancel recording
+//& type: auto
+/**
+* @testcase                            ITc_stt_start_cancel_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Start and then cancel recording & recognition asynchronously
+* @scenario                            Creates an STT handle\n
+*                                              Connect the daemon asynchronously\n
+*                                              Start recording and recognition asynchronously\n
+*                                              Cancel recording\n
+*                                              Disconnect the daemon asynchronously\n
+*                                              Destroys an STT handle
+* @apicovered                  stt_start, stt_cancel
+* @passcase                            If starts and cancels the recording successfully
+* @failcase                            If fails to start and cancel the recording
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_start_cancel_p(void)
+{
+       START_TEST;
+       
+       if ( !initialize_setup_with_result_callback() )
+       {
+               return 1;
+       }
+
+       const char* szRecognitionTypes[] = { STT_RECOGNITION_TYPE_FREE, STT_RECOGNITION_TYPE_FREE_PARTIAL };
+       int nRecognitionTypeCount = sizeof(szRecognitionTypes) / sizeof(szRecognitionTypes[0]);
+       int nLanguageCounter = 0, nTypeCounter = 0;
+
+       for ( nLanguageCounter=0; nLanguageCounter<g_nSupportedLanguageCount; nLanguageCounter++ )
+       {
+               for ( nTypeCounter=0; nTypeCounter<nRecognitionTypeCount; nTypeCounter++ )
+               {
+                       g_bStateCallbackOccurred = false;
+
+                       //Target API
+                       /**** Start recording and recognition asynchronously ****/
+                       int nRet = stt_start(g_hStt, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       WAIT_FOR_CALLBACK(STT_STATE_RECORDING);
+                       
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_READY )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_READY\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_RECORDING )      //This is precondition of stt_cancel
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_RECORDING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       g_bStateCallbackOccurred = false;
+
+                       //Target API
+                       /**** Cancel the recording and start recognition processing in engine asynchronously ****/
+                       nRet = stt_cancel(g_hStt);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_cancel failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       //Wait for the state change
+                       WAIT_FOR_CALLBACK(STT_STATE_READY);
+
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_cancel failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_RECORDING )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_cancel invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_RECORDING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_READY )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_cancel invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_READY\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+               }
+       }
+
+       deinitialize_setup_with_result_callback();
+       return 0;
+}
+
+//& purpose Start recording and recognition asynchronously, finish the recording and then cancel processing recognition
+//& type: auto
+/**
+* @testcase                            ITc_stt_start_stop_cancel_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Start, stop and then cancel recording & recognition asynchronously
+* @scenario                            Creates an STT handle\n
+*                                              Connect the daemon asynchronously\n
+*                                              Start recording and recognition asynchronously\n
+*                                              Finish the recording and start recognition processing in engine asynchronously\n
+*                                              Cancel recording\n
+*                                              Disconnect the daemon asynchronously\n
+*                                              Destroys an STT handle
+* @apicovered                  stt_start, stt_stop, stt_cancel
+* @passcase                            If starts and stops the recording and cancels the processing
+* @failcase                            If fails to start or stop the recording or fails to cancel the processing
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_start_stop_cancel_p(void)
+{
+       START_TEST;
+       
+       if ( !initialize_setup_with_result_callback() )
+       {
+               return 1;
+       }
+
+       const char* szRecognitionTypes[] = { STT_RECOGNITION_TYPE_FREE, STT_RECOGNITION_TYPE_FREE_PARTIAL };
+       int nRecognitionTypeCount = sizeof(szRecognitionTypes) / sizeof(szRecognitionTypes[0]);
+       int nLanguageCounter = 0, nTypeCounter = 0;
+
+       for ( nLanguageCounter=0; nLanguageCounter<g_nSupportedLanguageCount; nLanguageCounter++ )
+       {
+               for ( nTypeCounter=0; nTypeCounter<nRecognitionTypeCount; nTypeCounter++ )
+               {
+                       g_bStateCallbackOccurred = false;
+
+                       //Target API
+                       /**** Start recording and recognition asynchronously ****/
+                       int nRet = stt_start(g_hStt, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       WAIT_FOR_CALLBACK(STT_STATE_RECORDING);
+                       
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_READY )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_READY\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_RECORDING )      //This is precondition of stt_stop
+                       {
+                               FPRINTF("[Line : %d][%s] stt_start invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_RECORDING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       g_bStateCallbackOccurred = false;
+
+                       //Target API
+                       /**** Finish the recording and start recognition processing in engine asynchronously ****/
+                       nRet = stt_stop(g_hStt);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_stop failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       //Wait for the state change
+                       WAIT_FOR_CALLBACK(STT_STATE_PROCESSING);
+                       
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_stop failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_RECORDING )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_stop invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_RECORDING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_PROCESSING )     //This is precondition of stt_cancel
+                       {
+                               FPRINTF("[Line : %d][%s] stt_stop invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_PROCESSING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       g_bStateCallbackOccurred = false;
+
+                       //Target API
+                       /**** Cancel the recording and start recognition processing in engine asynchronously ****/
+                       nRet = stt_cancel(g_hStt);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_cancel failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       //Wait for the state change
+                       WAIT_FOR_CALLBACK(STT_STATE_READY);
+
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_cancel failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_PROCESSING )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_cancel invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_PROCESSING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_READY )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_cancel invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_READY\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+               }
+       }
+
+       deinitialize_setup_with_result_callback();
+       return 0;
+}
+
+//& purpose Get the current STT state
+//& type: auto
+/**
+* @testcase                            ITc_stt_get_state_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Get the current STT state
+* @scenario                            Creates an STT handle\n
+*                                              Get the current STT state\n
+*                                                      Destroys an STT handle
+* @apicovered                  stt_create, stt_get_state, stt_destroy
+* @passcase                            If gets the current STT state successfully
+* @failcase                            If fails to get the current STT state
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_get_state_p(void)
+{
+       START_TEST;
+       
+       stt_h stt;
+       stt_state_e nState;
+
+       //Create STT Handle
+       int nRet = stt_create(&stt);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_create", SttGetError(nRet));
+       CHECK_HANDLE(stt, "stt_create");
+
+       //Target API
+       /**** Get current STT state ****/
+       nRet = stt_get_state(stt, &nState);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_get_state", SttGetError(nRet), stt_destroy(stt));
+       if ( nState != STT_STATE_CREATED )
+       {
+               FPRINTF("[Line : %d][%s] stt_get_state returned invalid state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(nState));
+               stt_destroy(stt);
+               return 1;
+       }
+
+       //Destroy STT Handle
+       nRet = stt_destroy(stt);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_destroy", SttGetError(nRet));
+
+       return 0;
+}
+
+//& purpose Get the default language set by the user
+//& type: auto
+/**
+* @testcase                            ITc_stt_get_default_language_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Get the default language set by the user
+* @scenario                            Creates an STT handle\n
+*                                              Get the default language set by the user\n
+*                                                      Destroys an STT handle
+* @apicovered                  stt_get_default_language, stt_foreach_supported_languages
+* @passcase                            If gets the default language set by the user successfully
+* @failcase                            If fails to get the default language set by the user
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_get_default_language_p(void)
+{
+       START_TEST;
+       
+       g_bSupportedLanguageCallbackOccured = false;
+       g_nSupportedLanguageCount = 0;
+       g_bCallbackParameterCheck = false;
+
+       int nRet = stt_foreach_supported_languages(g_hStt, stt_supported_language_callback, NULL);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_foreach_supported_languages", SttGetError(nRet));
+
+       if ( !g_bSupportedLanguageCallbackOccured )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_foreach_supported_languages failed to invoke stt_supported_language_cb on precondition\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else if(!g_bCallbackParameterCheck)
+       {
+               return 1;
+       }
+       else if ( g_nSupportedLanguageCount == 0 )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_foreach_supported_languages returned no language on precondition\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char* lanugauge;
+
+       //Target API
+       /**** Get the default language set by the user ****/
+       nRet = stt_get_default_language(g_hStt, &lanugauge);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_get_default_language", SttGetError(nRet));
+
+       bool matching = false;
+       int nLanguageCounter;
+       for ( nLanguageCounter=0; nLanguageCounter<g_nSupportedLanguageCount; nLanguageCounter++ )
+       {
+               if ( strcmp(lanugauge, g_szSupportedLanguages[nLanguageCounter]) == 0 )
+               {
+                       FPRINTF("[Line : %d][%s] stt_get_default_language return value exists in supported language list\\n", __LINE__, API_NAMESPACE);
+                       matching = true;
+                       break;
+               }
+       }
+
+       //Free the language variable
+       FREE_MEMORY(lanugauge);
+
+       if ( !matching )
+       {
+               FPRINTF("[Line : %d][%s] stt_get_default_language return value doesn't exist in supported language list\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose Set & get the current engine id
+//& type: auto
+/**
+* @testcase                            ITc_stt_set_get_engine_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set & get the current engine id
+* @scenario                            Creates an STT handle\n
+*                                              Set the engine id\n
+*                                                      Get the current engine id\n
+*                                                      Destroys an STT handle
+* @apicovered                  stt_set_engine, stt_get_engine, stt_foreach_supported_engines
+* @passcase                            If sets & gets the current engine id successfully
+* @failcase                            If fails to set & get the current engine id
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_set_get_engine_p(void)
+{
+       START_TEST;
+       
+       g_bSupportedEngineCallbackOccured = false;
+       g_bCallbackParameterCheck = false;
+       g_nSupportedEngineCount = 0;
+
+       int nRet = stt_foreach_supported_engines(g_hStt, stt_supported_engine_callback, NULL);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_foreach_supported_engines", SttGetError(nRet));
+
+       if ( !g_bSupportedEngineCallbackOccured )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_foreach_supported_engines failed to invoke stt_supported_engineon precondition\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else if(!g_bCallbackParameterCheck)
+       {
+               return 1;
+       }
+       else if ( g_nSupportedEngineCount == 0 )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_foreach_supported_engines returned no engine on precondition\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       int nEngineCounter;
+       for ( nEngineCounter=0; nEngineCounter < g_nSupportedEngineCount; nEngineCounter++ )
+       {
+               //Target API
+               /**** Set the engine id ****/
+               nRet = stt_set_engine(g_hStt, g_szSupportedEngineIDs[nEngineCounter]);
+               PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_set_engine", SttGetError(nRet));
+
+               //Target API
+               /**** Get the current engine id ****/
+               char* pGetEngineId;
+               nRet = stt_get_engine(g_hStt, &pGetEngineId);
+               if ( nRet != STT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] stt_get_engine failed for engine id %s and engine name %s, error returned = %s\\n",
+                               __LINE__, API_NAMESPACE, g_szSupportedEngineIDs[nEngineCounter], g_szSupportedEngineNames[nEngineCounter], SttGetError(nRet));
+                       FREE_MEMORY(pGetEngineId);
+                       return 1;
+               }
+
+               if ( strcmp(pGetEngineId, g_szSupportedEngineIDs[nEngineCounter]) != 0 )
+               {
+                       FPRINTF("[Line : %d][%s] stt_get_engine return value %s mismatched with value %s set using stt_set_engine\\n",
+                               __LINE__, API_NAMESPACE, pGetEngineId, g_szSupportedEngineIDs[nEngineCounter]);
+                       FREE_MEMORY(pGetEngineId);
+                       return 1;
+               }
+
+               //Free the pGetEngineId variable
+               FREE_MEMORY(pGetEngineId);
+       }
+
+       return 0;
+}
+
+//& purpose Check whether the recognition type is supported
+//& type: auto
+/**
+* @testcase                            ITc_stt_is_recognition_type_supported_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Check whether the recognition type is supported
+* @scenario                            Creates an STT handle\n
+*                                                      Connect the daemon asynchronously\n
+*                                              Check whether the recognition type is supported\n
+*                                              Disconnect the daemon asynchronously\n
+*                                                      Destroys an STT handle
+* @apicovered                  stt_is_recognition_type_supported
+* @passcase                            If checks whether the recognition type is supported successfully
+* @failcase                            If fails to check whether the recognition type is supported
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_is_recognition_type_supported_p(void)
+{
+       START_TEST;
+       
+       if ( !initialize_setup_without_result_callback() )
+       {
+               return 1;
+       }
+
+       const char* szRecognitionTypes[] = { STT_RECOGNITION_TYPE_FREE, STT_RECOGNITION_TYPE_FREE_PARTIAL };
+       int nRecognitionTypeCount = sizeof(szRecognitionTypes) / sizeof(szRecognitionTypes[0]);
+       int nTypeCounter = 0;
+
+       for ( nTypeCounter=0; nTypeCounter<nRecognitionTypeCount; nTypeCounter++ )
+       {
+               bool bSupported;
+
+               //Target API
+               /**** Check whether the recognition type is supported ****/
+               int nRet = stt_is_recognition_type_supported(g_hStt, szRecognitionTypes[nTypeCounter], &bSupported);
+               if ( nRet != STT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] stt_is_recognition_type_supported failed for recognition type %s, error returned = %s\\n",
+                               __LINE__, API_NAMESPACE, szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                       deinitialize_setup_without_result_callback();
+                       return 1;
+               }
+               else if((bSupported != true) && (bSupported != false))
+               {
+                       FPRINTF("[Line : %d][%s] stt_is_recognition_type_supported failed for recognition type %s,output value is invalid\\n",
+                               __LINE__, API_NAMESPACE, szRecognitionTypes[nTypeCounter]);
+                       deinitialize_setup_without_result_callback();
+                       return 1;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][%s] stt_is_recognition_type_supported returned %s for recognition type %s\\n",
+                               __LINE__, API_NAMESPACE, (bSupported ? "true" : "false"), szRecognitionTypes[nTypeCounter]);
+#endif
+               }
+       }
+
+       deinitialize_setup_without_result_callback();
+       return 0;
+}
+
+//& purpose Get the microphone volume during recording
+//& type: auto
+/**
+* @testcase                            ITc_stt_get_recording_volume_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Get the microphone volume during recording
+* @scenario                            Creates an STT handle\n
+*                                              Connect the daemon asynchronously\n
+*                                              Start recording and recognition asynchronously\n
+*                                              Finish the recording and start recognition processing in engine asynchronously\n
+*                                                      Get the microphone volume during recording\n
+*                                              Disconnect the daemon asynchronously\n
+*                                              Destroys an STT handle\n
+*                                              Finish recording
+* @apicovered                  stt_start, stt_get_recording_volume, stt_cancel
+* @passcase                            If gets the microphone volume during recording successfully
+* @failcase                            If fails to get the microphone volume during recording
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_get_recording_volume_p(void)
+{
+       START_TEST;
+       
+       if ( !initialize_setup_with_result_callback() )
+       {
+               return 1;
+       }
+
+       const char* szRecognitionTypes[] = { STT_RECOGNITION_TYPE_FREE, STT_RECOGNITION_TYPE_FREE_PARTIAL };
+       int nRecognitionTypeCount = sizeof(szRecognitionTypes) / sizeof(szRecognitionTypes[0]);
+       int nLanguageCounter = 0, nTypeCounter = 0;
+       float fVolume = -1.0;
+
+       for ( nLanguageCounter=0; nLanguageCounter<g_nSupportedLanguageCount; nLanguageCounter++ )
+       {
+               for ( nTypeCounter=0; nTypeCounter<nRecognitionTypeCount; nTypeCounter++ )
+               {
+                       //Start recording and recognition asynchronously
+                       g_bStateCallbackOccurred = false;
+                       int nRet = stt_start(g_hStt, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       
+                       WAIT_FOR_CALLBACK(STT_STATE_RECORDING);
+                       
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_READY )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_READY\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_RECORDING )      //This is precondition of stt_get_recording_volume
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_RECORDING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       //Target API
+                       /**** Get the microphone volume during recording ****/
+                       nRet = stt_get_recording_volume(g_hStt, &fVolume);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_get_recording_volume failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+                       else if(fVolume == -1.0)
+                       {
+                               FPRINTF("[Line : %d][%s] stt_get_recording_volume failed for language %s and type %s, volume is invalid\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+
+                       //Cancel Recording
+                       nRet = stt_cancel(g_hStt);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_cancel failed in postcondition for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               deinitialize_setup_with_result_callback();
+                               return 1;
+                       }
+               }
+       }
+
+       deinitialize_setup_with_result_callback();
+       return 0;
+}
+
+//& purpose Set the silence detection
+//& type: auto
+/**
+* @testcase                            ITc_stt_set_silence_detection_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set the silence detection
+* @scenario                            Creates an STT handle\n
+*                                                      Connect the daemon asynchronously\n
+*                                              Set the silence detection\n
+*                                              Disconnect the daemon asynchronously\n
+*                                                      Destroys an STT handle
+* @apicovered                  stt_set_silence_detection
+* @passcase                            If sets the silence detection successfully
+* @failcase                            If fails to set the silence detection
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_set_silence_detection_p(void)
+{
+       START_TEST;
+       
+       if ( !initialize_setup_without_result_callback() )
+       {
+               return 1;
+       }
+
+       stt_option_silence_detection_e nDetectionOptions[] = { STT_OPTION_SILENCE_DETECTION_FALSE, STT_OPTION_SILENCE_DETECTION_TRUE, STT_OPTION_SILENCE_DETECTION_AUTO };
+       int nDetectionOptionCount = sizeof(nDetectionOptions) / sizeof(nDetectionOptions[0]);
+       int nDetectionOptionCounter = 0;
+
+       for ( nDetectionOptionCounter=0; nDetectionOptionCounter<nDetectionOptionCount; nDetectionOptionCounter++ )
+       {
+               //Target API
+               /**** Set the silence detection ****/
+               int nRet = stt_set_silence_detection(g_hStt, nDetectionOptions[nDetectionOptionCounter]);
+               if ( nRet != STT_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][%s] stt_set_silence_detection failed for option type %s, error returned = %s\\n",
+                               __LINE__, API_NAMESPACE, SttGetOptionForSilenceDetection(nDetectionOptions[nDetectionOptionCounter]), SttGetError(nRet));
+                       deinitialize_setup_without_result_callback();
+                       return 1;
+               }
+       }
+
+       deinitialize_setup_without_result_callback();
+       return 0;
+}
+
+//& purpose Set and unset the sound to start recording
+//& type: auto
+/**
+* @testcase                            ITc_stt_set_unset_start_sound_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set and unset the sound to start recording
+* @scenario                            Set the sound to start recording\n
+*                                              Unset the sound to start recording\n
+* @apicovered                  stt_set_start_sound, stt_unset_start_sound, stt_unprepare
+* @passcase                            If sets and unsets the sound to start recording successfully
+* @failcase                            If fails to set and unset the sound to start recording
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_set_unset_start_sound_p(void)
+{
+       START_TEST;
+       
+       //Get the application's data path
+       char pPath[PATH_LEN] = {0,};
+       if ( false == SttAppendToAppDataPath(START_SOUND, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       if ( !initialize_setup_with_result_callback() )
+       {
+               return 1;
+       }
+
+       //Target API
+       /**** Set the sound to start recording ***/
+       int nRet = stt_set_start_sound(g_hStt, pPath);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_set_start_sound", SttGetError(nRet), deinitialize_setup_with_result_callback());
+
+       //Target API
+       /**** Unset the sound to start recording ****/
+       nRet = stt_unset_start_sound(g_hStt);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_unset_start_sound", SttGetError(nRet), deinitialize_setup_with_result_callback());
+
+       deinitialize_setup_with_result_callback();
+       return 0;
+}
+
+//& purpose Set and unset the sound to stop recording
+//& type: auto
+/**
+* @testcase                            ITc_stt_set_unset_stop_sound_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Set and unset the sound to stop recording
+* @scenario                            Set the sound to stop recording\n
+*                                              Unset the sound to stop recording
+* @apicovered                  stt_set_stop_sound , stt_unset_stop_sound
+* @passcase                            If sets and unsets the sound to stop recording successfully
+* @failcase                            If fails to set and unset the sound to stop recording
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_set_unset_stop_sound_p(void)
+{
+       START_TEST;
+       
+       //Get the application's data path
+       char pPath[PATH_LEN] = {0,};
+       if ( false == SttAppendToAppDataPath(STOP_SOUND, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       if ( !initialize_setup_with_result_callback() )
+       {
+               return 1;
+       }
+
+       //Target API
+       /**** Set the sound to stop recording ***/
+       int nRet = stt_set_stop_sound(g_hStt, pPath);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_set_stop_sound", SttGetError(nRet), deinitialize_setup_with_result_callback());
+
+       //Target API
+       /**** Unset the sound to stop recording ****/
+       nRet = stt_unset_stop_sound(g_hStt);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_unset_stop_sound", SttGetError(nRet), deinitialize_setup_with_result_callback());
+
+       deinitialize_setup_with_result_callback();
+       return 0;
+}
+
+//& purposeRegister a callback function to be called when STT state changes and unregister it
+//& type: auto
+/**
+* @testcase                            ITc_stt_set_unset_state_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Register a callback function to be called when STT state changes and unregister it
+* @scenario                            Register a callback function to be called when STT state changes\n
+*                                              Unregister the callback function
+* @apicovered                  stt_prepare, stt_set_state_changed_cb, stt_unset_state_changed_cb, stt_unprepare
+* @passcase                            If registers and unregisters the callback function successfully and callback is invoked after stt_prepare and stt_unprepare
+* @failcase                            If fails to register and unregister the callback function or callback is not invoked after stt_prepare and stt_unprepare
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_set_unset_state_changed_cb_p(void)
+{
+       START_TEST;
+       
+       //Target API
+       /****Register a callback function to be called when STT state changes ***/
+       int nRet = stt_set_state_changed_cb(g_hStt, stt_state_changed_callback, NULL);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_set_state_changed_cb", SttGetError(nRet));
+
+       //Connect the STT daemon asynchronously to invoke callback
+       g_bStateCallbackOccurred = false;
+       nRet = stt_prepare(g_hStt);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_prepare", SttGetError(nRet), stt_unset_state_changed_cb(g_hStt));
+
+       WAIT_FOR_CALLBACK(STT_STATE_READY);
+
+       if ( !g_bStateCallbackOccurred )
+       {
+               FPRINTF("[Line : %d][%s] stt_set_state_changed_cb failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nPreviousState != STT_STATE_CREATED )
+       {
+               FPRINTF("[Line : %d][%s] stt_set_state_changed_cb invoked callback with invalid previous state %s, expected state = STT_STATE_CREATED\\n",
+                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nCurrentState != STT_STATE_READY )
+       {
+               FPRINTF("[Line : %d][%s] stt_set_state_changed_cb invoked callback with invalid current state %s, expected state = STT_STATE_READY\\n",
+                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+
+       //Disconnect the STT daemon asynchronously to check callback invoke for stt_unprepare
+       g_bStateCallbackOccurred = false;
+       nRet = stt_unprepare(g_hStt);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_unprepare", SttGetError(nRet), stt_unset_state_changed_cb(g_hStt));
+
+       WAIT_FOR_CALLBACK(STT_STATE_CREATED);
+
+       if ( !g_bStateCallbackOccurred )
+       {
+               FPRINTF("[Line : %d][%s] stt_unprepare failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nPreviousState != STT_STATE_READY )
+       {
+               FPRINTF("[Line : %d][%s] stt_unprepare invoked callback with invalid previous state %s, expected state = STT_STATE_READY\\n", __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nCurrentState != STT_STATE_CREATED )
+       {
+               FPRINTF("[Line : %d][%s] stt_unprepare invoked callback with invalid current state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       
+       //Target API
+       /**** Unregister the callback function ***/
+       nRet = stt_unset_state_changed_cb(g_hStt);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_unset_state_changed_cb", SttGetError(nRet));
+
+       return 0;
+}
+
+//& purposeRegister a callback function to get the recognition result and unregister it
+//& type: auto
+/**
+* @testcase                            ITc_stt_set_unset_recognition_result_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers a callback function to get the recognition result and unregister it
+* @scenario                            Register callback function to get the recognition result\n
+*                                              Unregister the callback function
+* @apicovered                  stt_set_recognition_result_cb, stt_unset_recognition_result_cb, stt_start
+* @passcase                            If registers and unregisters the callback function successfully
+* @failcase                            If fails to register and unregister the callback function
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_set_unset_recognition_result_cb_p(void)
+{
+       START_TEST;
+       
+       if ( !initialize_setup_without_result_callback() )
+       {
+               return 1;
+       }
+
+       const char* szRecognitionTypes[] = { STT_RECOGNITION_TYPE_FREE, STT_RECOGNITION_TYPE_FREE_PARTIAL };
+       int nRecognitionTypeCount = sizeof(szRecognitionTypes) / sizeof(szRecognitionTypes[0]);
+       int nLanguageCounter = 0, nTypeCounter = 0;
+
+       for ( nLanguageCounter=0; nLanguageCounter<g_nSupportedLanguageCount; nLanguageCounter++ )
+       {
+               for ( nTypeCounter=0; nTypeCounter<nRecognitionTypeCount; nTypeCounter++ )
+               {
+                       g_bStateCallbackOccurred = false;
+                       //Target API
+                       /**** Disconnect the STT daemon asynchronously ****/
+                       int nRet = stt_unprepare(g_hStt);
+                       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_unprepare", SttGetError(nRet), stt_unset_state_changed_cb(g_hStt));
+
+                       WAIT_FOR_CALLBACK(STT_STATE_CREATED);
+
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_unprepare failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_READY )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_unprepare invoked callback with invalid previous state %s, expected state = STT_STATE_READY\\n", __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_CREATED )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_unprepare invoked callback with invalid current state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+
+                       //Target API
+                       /****Register a callback function to get the recognition result ***/
+                       nRet = stt_set_recognition_result_cb(g_hStt, stt_recognition_result_callback, NULL);
+                       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_set_recognition_result_cb", SttGetError(nRet), deinitialize_setup_without_result_callback());
+
+                       g_bStateCallbackOccurred = false;
+                       //Target API
+                       /**** Connect the STT daemon asynchronously ****/
+                       nRet = stt_prepare(g_hStt);
+                       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_prepare", SttGetError(nRet), stt_unset_state_changed_cb(g_hStt));
+
+                       WAIT_FOR_CALLBACK(STT_STATE_READY);
+
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_prepare failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+                               stt_unprepare(g_hStt);
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+                       else if(!g_bCallbackParameterCheck)
+                       {
+                               stt_unprepare(g_hStt);
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_CREATED )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_prepare invoked callback with invalid previous state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+                               stt_unprepare(g_hStt);
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_READY )  //This is precondition of stt_unprepare
+                       {
+                               FPRINTF("[Line : %d][%s] stt_prepare invoked callback with invalid current state %s, expected state = STT_STATE_READY\\n", __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+                               stt_unprepare(g_hStt);
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+
+                       //Start recording and recognition asynchronously to invoke callback
+                       g_bStateCallbackOccurred = false;
+                       g_bCallbackParameterCheck = false;
+                       nRet = stt_start(g_hStt, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               stt_unset_recognition_result_cb(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+
+                       //Wait for the state change
+                       WAIT_FOR_CALLBACK(STT_STATE_RECORDING);
+                       
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               stt_unset_recognition_result_cb(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+                       else if ( !g_bCallbackParameterCheck )
+                       {
+                               stt_cancel(g_hStt);
+                               stt_unset_recognition_result_cb(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_READY )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_READY\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               stt_unset_recognition_result_cb(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_RECORDING )      //This is precondition of stt_stop
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_RECORDING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               stt_unset_recognition_result_cb(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+
+                       g_bStateCallbackOccurred = false;
+                       g_bResultCallbackOccurred = false;
+
+                       //Finish the recording and start recognition processing in engine asynchronously to invoke result callback
+                       nRet = stt_stop(g_hStt);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_stop failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               stt_unset_recognition_result_cb(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+
+                       //Wait for the state change
+                       WAIT_FOR_CALLBACK(STT_STATE_PROCESSING);
+
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_stop failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_unset_recognition_result_cb(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_RECORDING )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_stop invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_RECORDING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_unset_recognition_result_cb(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_PROCESSING )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_stop invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_PROCESSING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_unset_recognition_result_cb(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+
+                       //Wait for the result to complete
+                       WAIT_FOR_CALLBACK(STT_STATE_READY);
+
+                       if ( !g_bResultCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_set_recognition_result_cb failed to invoke result callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_unset_recognition_result_cb(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nResultEvent == STT_RESULT_EVENT_ERROR )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_set_recognition_result_cb invoked result callback with invalid result %s for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, SttGetResultEvent(g_nResultEvent), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_unset_recognition_result_cb(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+
+                       g_bStateCallbackOccurred = false;
+                       //Target API
+                       /**** Disconnect the STT daemon asynchronously ****/
+                       nRet = stt_unprepare(g_hStt);
+                       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_unprepare", SttGetError(nRet), stt_unset_state_changed_cb(g_hStt));
+
+                       WAIT_FOR_CALLBACK(STT_STATE_CREATED);
+
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_unprepare failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_READY )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_unprepare invoked callback with invalid previous state %s, expected state = STT_STATE_READY\\n", __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_CREATED )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_unprepare invoked callback with invalid current state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+
+                       //Target API
+                       /**** Unregister the callback function ***/
+                       nRet = stt_unset_recognition_result_cb(g_hStt);
+                       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_unset_recognition_result_cb", SttGetError(nRet), deinitialize_setup_without_result_callback());
+
+                       g_bStateCallbackOccurred = false;
+                       //Target API
+                       /**** Connect the STT daemon asynchronously ****/
+                       nRet = stt_prepare(g_hStt);
+                       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_prepare", SttGetError(nRet), stt_unset_state_changed_cb(g_hStt));
+
+                       WAIT_FOR_CALLBACK(STT_STATE_READY);
+
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_prepare failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+                               stt_unprepare(g_hStt);
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+                       else if(!g_bCallbackParameterCheck)
+                       {
+                               stt_unprepare(g_hStt);
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_CREATED )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_prepare invoked callback with invalid previous state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+                               stt_unprepare(g_hStt);
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_READY )  //This is precondition of stt_unprepare
+                       {
+                               FPRINTF("[Line : %d][%s] stt_prepare invoked callback with invalid current state %s, expected state = STT_STATE_READY\\n", __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+                               stt_unprepare(g_hStt);
+                               stt_unset_state_changed_cb(g_hStt);
+                               return 1;
+                       }
+
+                       //Start recording and recognition asynchronously to invoke callback
+                       g_bStateCallbackOccurred = false;
+                       nRet = stt_start(g_hStt, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+
+                       //Wait for the state change
+                       WAIT_FOR_CALLBACK(STT_STATE_RECORDING);
+                       
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_READY )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_READY\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_RECORDING )      //This is precondition of stt_stop
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_start invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_RECORDING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               stt_cancel(g_hStt);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+
+                       g_bStateCallbackOccurred = false;
+                       g_bResultCallbackOccurred = false;
+
+                       //Finish the recording and start recognition processing in engine asynchronously to invoke result callback
+                       nRet = stt_stop(g_hStt);
+                       if ( nRet != STT_ERROR_NONE )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_stop failed for language %s and type %s, error returned = %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter], SttGetError(nRet));
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+
+                       //Wait for the state change
+                       WAIT_FOR_CALLBACK(STT_STATE_PROCESSING);
+                       
+                       if ( !g_bStateCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_stop failed to invoke callback for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nPreviousState != STT_STATE_RECORDING )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_stop invoked callback with invalid previous state %s for language %s and type %s, expected state = STT_STATE_RECORDING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+                       else if ( g_nCurrentState != STT_STATE_PROCESSING )
+                       {
+                               FPRINTF("[Line : %d][%s] Support API stt_stop invoked callback with invalid current state %s for language %s and type %s, expected state = STT_STATE_PROCESSING\\n",
+                                       __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState), g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+
+                       //Wait for the result to complete
+                       WAIT_FOR_CALLBACK(STT_STATE_READY);
+
+                       if ( g_bResultCallbackOccurred )
+                       {
+                               FPRINTF("[Line : %d][%s] stt_unset_recognition_result_cb failed to stop result callback invocation for language %s and type %s\\n",
+                                       __LINE__, API_NAMESPACE, g_szSupportedLanguages[nLanguageCounter], szRecognitionTypes[nTypeCounter]);
+                               deinitialize_setup_without_result_callback();
+                               return 1;
+                       }
+               }
+       }
+
+       deinitialize_setup_without_result_callback();
+       return 0;
+}
+
+//& purposeRegister a callback function to detect the default language change and unregister it
+//& type: auto
+/**
+* @testcase                            ITc_stt_set_unset_default_language_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Register a callback function to detect the default language change and unregister it
+* @scenario                            Register a callback function to detect the default language change\n
+*                                              Unregister the callback function
+* @apicovered                  stt_set_default_language_changed_cb, stt_unset_default_language_changed_cb
+* @passcase                            If registers and unregisters the callback function successfully
+* @failcase                            If fails to register and unregister the callback function
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_set_unset_default_language_changed_cb_p(void)
+{
+       START_TEST;
+       
+       //Target API
+       /****Register a callback function to detect the default language change ***/
+       int nRet = stt_set_default_language_changed_cb(g_hStt, stt_default_language_changed_callback, NULL);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_set_default_language_changed_cb", SttGetError(nRet));
+
+       //Target API
+       /**** Unregister the callback function ***/
+       nRet = stt_unset_default_language_changed_cb(g_hStt);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_unset_default_language_changed_cb", SttGetError(nRet));
+
+       return 0;
+}
+
+//& purposeRegister a callback function to be called when an error occurred and then unregister the callback
+//& type: auto
+/**
+* @testcase                            ITc_stt_set_unset_error_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Register a callback function to be called when an error occurred and then unregister the callback
+* @scenario                            Register a callback function to be called when an error occurred\n
+*                                              Unregister the callback function
+* @apicovered                  stt_set_error_cb, stt_unset_error_cb
+* @passcase                            If registers and unregisters the callback function successfully
+* @failcase                            If fails to register and unregister the callback function
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_set_unset_error_cb_p(void)
+{
+       START_TEST;
+       
+       //Target API
+       /****Register a callback function to be called when an error occurred ***/
+       int nRet = stt_set_error_cb(g_hStt, stt_error_callback, NULL);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_set_error_cb", SttGetError(nRet));
+
+       //Target API
+       /**** Unregister the callback function ***/
+       nRet = stt_unset_error_cb(g_hStt);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_unset_error_cb", SttGetError(nRet));
+
+       return 0;
+}
+
+//& purpose Retrieve the time stamp of the current recognition result using the callback function
+//& type: auto
+/**
+* @testcase                            ITc_stt_foreach_detailed_result_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Retrieve the time stamp of the current recognition result using the callback function
+* @scenario                            Retrieve the time stamp of the current recognition result using the callback function
+* @apicovered                  stt_foreach_detailed_result
+* @passcase                            If retrieves the time stamp of the current recognition result using the callback function
+* @failcase                            If fails to retrieve the time stamp of the current recognition result using the callback function
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_foreach_detailed_result_p(void)
+{
+       START_TEST;
+       
+       if ( !initialize_setup_without_result_callback() )
+       {
+               return 1;
+       }
+
+       g_bStateCallbackOccurred = false;
+
+       //Target API
+       /**** Disconnect the STT daemon asynchronously ****/
+       int nRet = stt_unprepare(g_hStt);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_unprepare", SttGetError(nRet), stt_unset_state_changed_cb(g_hStt));
+
+       WAIT_FOR_CALLBACK(STT_STATE_CREATED);
+
+       if ( !g_bStateCallbackOccurred )
+       {
+               FPRINTF("[Line : %d][%s] stt_unprepare failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nPreviousState != STT_STATE_READY )
+       {
+               FPRINTF("[Line : %d][%s] stt_unprepare invoked callback with invalid previous state %s, expected state = STT_STATE_READY\\n", __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nCurrentState != STT_STATE_CREATED )
+       {
+               FPRINTF("[Line : %d][%s] stt_unprepare invoked callback with invalid current state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+
+       //Register a callback function to get the recognition result
+       nRet = stt_set_recognition_result_cb(g_hStt, stt_recognition_result_callback_check_detailed_result, NULL);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_set_recognition_result_cb failed on precondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+
+       g_bStateCallbackOccurred = false;
+       //Target API
+       /**** Connect the STT daemon asynchronously ****/
+       nRet = stt_prepare(g_hStt);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_prepare", SttGetError(nRet), stt_unset_state_changed_cb(g_hStt));
+
+       WAIT_FOR_CALLBACK(STT_STATE_READY);
+
+       if ( !g_bStateCallbackOccurred )
+       {
+               FPRINTF("[Line : %d][%s] stt_prepare failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if(!g_bCallbackParameterCheck)
+       {
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nPreviousState != STT_STATE_CREATED )
+       {
+               FPRINTF("[Line : %d][%s] stt_prepare invoked callback with invalid previous state %s, expected state = STT_STATE_CREATED\\n", __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+       else if ( g_nCurrentState != STT_STATE_READY )  //This is precondition of stt_unprepare
+       {
+               FPRINTF("[Line : %d][%s] stt_prepare invoked callback with invalid current state %s, expected state = STT_STATE_READY\\n", __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+               stt_unprepare(g_hStt);
+               stt_unset_state_changed_cb(g_hStt);
+               return 1;
+       }
+
+       //Start recording and recognition asynchronously to invoke callback
+       g_bStateCallbackOccurred = false;
+       g_bCallbackParameterCheck = false;
+       nRet = stt_start(g_hStt, "en_US", STT_RECOGNITION_TYPE_FREE);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_start failed on precondition, error returned = %s\\n", __LINE__, API_NAMESPACE,  SttGetError(nRet));
+               stt_unset_recognition_result_cb(g_hStt);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+
+       //Wait for the state change
+       WAIT_FOR_CALLBACK(STT_STATE_RECORDING);
+       
+       if ( !g_bStateCallbackOccurred )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_start failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+               stt_cancel(g_hStt);
+               stt_unset_recognition_result_cb(g_hStt);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+       else if ( !g_bCallbackParameterCheck )
+       {
+               stt_cancel(g_hStt);
+               stt_unset_recognition_result_cb(g_hStt);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+       else if ( g_nPreviousState != STT_STATE_READY )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_start invoked callback with invalid previous state %s, expected state = STT_STATE_READY\\n", __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+               stt_cancel(g_hStt);
+               stt_unset_recognition_result_cb(g_hStt);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+       else if ( g_nCurrentState != STT_STATE_RECORDING )      //This is precondition of stt_stop
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_start invoked callback with invalid current state %s, expected state = STT_STATE_RECORDING\\n", __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+               stt_cancel(g_hStt);
+               stt_unset_recognition_result_cb(g_hStt);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+
+       g_bStateCallbackOccurred = false;
+       g_bResultCallbackOccurred = false;
+
+       //Finish the recording and start recognition processing in engine asynchronously to invoke result callback
+       nRet = stt_stop(g_hStt);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_stop failed, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               stt_unset_recognition_result_cb(g_hStt);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+
+       //Wait for the state change
+       WAIT_FOR_CALLBACK(STT_STATE_PROCESSING);
+
+       if ( !g_bStateCallbackOccurred )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_stop failed to invoke callback\\n", __LINE__, API_NAMESPACE);
+               stt_unset_recognition_result_cb(g_hStt);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+       else if ( g_nPreviousState != STT_STATE_RECORDING )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_stop invoked callback with invalid previous state %s, expected state = STT_STATE_RECORDING\\n", __LINE__, API_NAMESPACE, SttGetState(g_nPreviousState));
+               stt_unset_recognition_result_cb(g_hStt);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+       else if ( g_nCurrentState != STT_STATE_PROCESSING )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_stop invoked callback with invalid current state %s, expected state = STT_STATE_PROCESSING\\n", __LINE__, API_NAMESPACE, SttGetState(g_nCurrentState));
+               stt_unset_recognition_result_cb(g_hStt);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+
+       //Wait for the result to complete
+       WAIT_FOR_CALLBACK(STT_STATE_READY);
+
+       if ( !g_bResultCallbackOccurred )
+       {
+               FPRINTF("[Line : %d][%s] stt_set_recognition_result_cb failed to invoke result callback\\n", __LINE__, API_NAMESPACE);
+               stt_unset_recognition_result_cb(g_hStt);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+       else if ( g_nResultEvent == STT_RESULT_EVENT_ERROR )
+       {
+               FPRINTF("[Line : %d][%s] stt_set_recognition_result_cb invoked result callback with invalid result %s\\n", __LINE__, API_NAMESPACE, SttGetResultEvent(g_nResultEvent));
+               stt_unset_recognition_result_cb(g_hStt);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+
+       //Unregister the callback function
+       nRet = stt_unset_recognition_result_cb(g_hStt);
+       if ( nRet != STT_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][%s] Support API stt_unset_recognition_result_cb failed on postcondition, error returned = %s\\n", __LINE__, API_NAMESPACE, SttGetError(nRet));
+               deinitialize_setup_without_result_callback();
+       }
+
+       deinitialize_setup_without_result_callback();
+       return 0;
+}
+
+//& purpose Retrieves supported engine information using a callback function
+//& type: auto
+/**
+* @testcase                            ITc_stt_foreach_supported_engines_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Retrieve supported engine information using a callback function
+* @scenario                            Retrieve supported  information using a callback function
+* @apicovered                  stt_foreach_supported_engines
+* @passcase                            If retrieves supported engine information using a callback function
+* @failcase                            If fails to retrieve supported engine information using a callback function
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_foreach_supported_engines_p(void)
+{
+       START_TEST;
+       
+       g_bSupportedEngineCallbackOccured = false;
+       g_nSupportedEngineCount = 0;
+       g_bCallbackParameterCheck = false;
+
+       //Target API
+       /**** Retrieve supported engine information using a callback function ***/
+       int nRet = stt_foreach_supported_engines(g_hStt, stt_supported_engine_callback, NULL);
+       PRINT_RESULT(STT_ERROR_NONE, nRet, "stt_foreach_supported_engines", SttGetError(nRet));
+
+       if ( !g_bSupportedEngineCallbackOccured )
+       {
+               FPRINTF("[Line : %d][%s] stt_foreach_supported_engines failed to invoke stt_supported_engine_cb\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else if ( !g_bCallbackParameterCheck )
+       {
+               return 1;
+       }
+       else if ( g_nSupportedEngineCount == 0 )
+       {
+               FPRINTF("[Line : %d][%s] stt_foreach_supported_engines returned no engine\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }       
+       return 0;
+}
+
+//& purpose Retrieve all supported languages of current engine using callback function
+//& type: auto
+/**
+* @testcase                            ITc_stt_foreach_supported_languages_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Retrieve all supported languages of current engine using callback function
+* @scenario                            Retrieve all supported languages of current engine using callback function
+* @apicovered                  stt_foreach_supported_languages
+* @passcase                            If retrieves all supported languages of current engine
+* @failcase                            If fails to retrieve all supported languages of current engine
+* @precondition                        NA
+* @postcondition               NA 
+*/
+int ITc_stt_foreach_supported_languages_p(void)
+{
+       START_TEST;
+       
+       if ( !initialize_setup_without_result_callback() )
+       {
+               return 1;
+       }
+
+       g_bSupportedLanguageCallbackOccured = false;
+       g_nSupportedLanguageCount = 0;
+       g_bCallbackParameterCheck = false;
+
+       //Target API
+       /**** Retrieve all supported languages of current engine using callback function ***/
+       int nRet = stt_foreach_supported_languages(g_hStt, stt_supported_language_callback, NULL);
+       PRINT_RESULT_CLEANUP(STT_ERROR_NONE, nRet, "stt_foreach_supported_engines", SttGetError(nRet), deinitialize_setup_without_result_callback());
+
+       if ( !g_bSupportedLanguageCallbackOccured )
+       {
+               FPRINTF("[Line : %d][%s] stt_foreach_supported_languages failed to invoke stt_supported_language_cb\\n", __LINE__, API_NAMESPACE);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+       else if ( !g_bCallbackParameterCheck )
+       {
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+       if ( g_nSupportedLanguageCount == 0 )
+       {
+               FPRINTF("[Line : %d][%s] stt_foreach_supported_languages returned no language\\n", __LINE__, API_NAMESPACE);
+               deinitialize_setup_without_result_callback();
+               return 1;
+       }
+
+       deinitialize_setup_without_result_callback();
+       return 0;
+}
+
+/** @} */ 
+/** @} */ 
\ No newline at end of file
diff --git a/src/itc/stt/start_sound.wav b/src/itc/stt/start_sound.wav
new file mode 100755 (executable)
index 0000000..99fc1c2
Binary files /dev/null and b/src/itc/stt/start_sound.wav differ
diff --git a/src/itc/stt/stop_sound.wav b/src/itc/stt/stop_sound.wav
new file mode 100755 (executable)
index 0000000..99fc1c2
Binary files /dev/null and b/src/itc/stt/stop_sound.wav differ
diff --git a/src/itc/stt/tct-stt-native.c b/src/itc/stt/tct-stt-native.c
new file mode 100755 (executable)
index 0000000..9cae557
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-stt-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/stt/tct-stt-native.h b/src/itc/stt/tct-stt-native.h
new file mode 100755 (executable)
index 0000000..79f2dae
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_STT_NATIVE_H__
+#define __TCT_STT_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_stt_startup(void);
+extern void ITs_stt_cleanup(void);
+
+extern int ITc_stt_create_destroy_p(void);
+extern int ITc_stt_prepare_unprepare_p(void);
+extern int ITc_stt_start_stop_p(void);
+extern int ITc_stt_start_cancel_p(void);
+extern int ITc_stt_start_stop_cancel_p(void);
+extern int ITc_stt_get_state_p(void);
+extern int ITc_stt_get_default_language_p(void);
+extern int ITc_stt_set_get_engine_p(void);
+extern int ITc_stt_is_recognition_type_supported_p(void);
+extern int ITc_stt_get_recording_volume_p(void);
+extern int ITc_stt_set_silence_detection_p(void);
+extern int ITc_stt_set_unset_start_sound_p(void);
+extern int ITc_stt_set_unset_stop_sound_p(void);
+extern int ITc_stt_set_unset_state_changed_cb_p(void);
+extern int ITc_stt_set_unset_recognition_result_cb_p(void);
+extern int ITc_stt_set_unset_default_language_changed_cb_p(void);
+extern int ITc_stt_set_unset_error_cb_p(void);
+extern int ITc_stt_foreach_detailed_result_p(void);
+extern int ITc_stt_foreach_supported_engines_p(void);
+extern int ITc_stt_foreach_supported_languages_p(void);
+
+testcase tc_array[] = {
+    {"ITc_stt_create_destroy_p", ITc_stt_create_destroy_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_prepare_unprepare_p", ITc_stt_prepare_unprepare_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_start_stop_p", ITc_stt_start_stop_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_start_cancel_p", ITc_stt_start_cancel_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_start_stop_cancel_p", ITc_stt_start_stop_cancel_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_get_state_p", ITc_stt_get_state_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_get_default_language_p", ITc_stt_get_default_language_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_set_get_engine_p", ITc_stt_set_get_engine_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_is_recognition_type_supported_p", ITc_stt_is_recognition_type_supported_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_get_recording_volume_p", ITc_stt_get_recording_volume_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_set_silence_detection_p", ITc_stt_set_silence_detection_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_set_unset_start_sound_p", ITc_stt_set_unset_start_sound_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_set_unset_stop_sound_p", ITc_stt_set_unset_stop_sound_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_set_unset_state_changed_cb_p", ITc_stt_set_unset_state_changed_cb_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_set_unset_recognition_result_cb_p", ITc_stt_set_unset_recognition_result_cb_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_set_unset_default_language_changed_cb_p", ITc_stt_set_unset_default_language_changed_cb_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_set_unset_error_cb_p", ITc_stt_set_unset_error_cb_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_foreach_detailed_result_p", ITc_stt_foreach_detailed_result_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_foreach_supported_engines_p", ITc_stt_foreach_supported_engines_p, ITs_stt_startup, ITs_stt_cleanup},
+    {"ITc_stt_foreach_supported_languages_p", ITc_stt_foreach_supported_languages_p, ITs_stt_startup, ITs_stt_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_STT_NATIVE_H__
diff --git a/src/itc/system-info/CMakeLists.txt b/src/itc/system-info/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..4cf399e
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "system-info")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-system-info")
+SET(TC_SOURCES
+       ITs-system-info-common.c
+       ITs-system-info.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/system-info/ITs-system-info-common.c b/src/itc/system-info/ITs-system-info-common.c
new file mode 100755 (executable)
index 0000000..0e4732e
--- /dev/null
@@ -0,0 +1,140 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-system-info-common.h"
+
+/** @addtogroup itc-system-info
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function definitions here
+
+extern struct timeval g_stSystem_infoStartTime;
+extern struct mallinfo g_stSystem_infoMemInfo;
+
+//Add helper function definitions here
+
+/**
+ * @function           db_util_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* system_info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case SYSTEM_INFO_ERROR_NONE :                           szErrorVal = "SYSTEM_INFO_ERROR_NONE";                                  break; 
+       case SYSTEM_INFO_ERROR_INVALID_PARAMETER :      szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER";             break; 
+       case SYSTEM_INFO_ERROR_IO_ERROR :                       szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR";                              break;
+       case SYSTEM_INFO_ERROR_OUT_OF_MEMORY :          szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY";                 break;
+       default :                                                                       szErrorVal = "Unknown error";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function                    db_util_GetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void system_info_GetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stSystem_infoMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stSystem_infoMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stSystem_infoMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+
+/**
+* @function                    db_util_GetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void system_info_GetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stSystem_infoMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           db_util_ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void system_info_ExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+               
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stSystem_infoStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stSystem_infoStartTime.tv_usec;
+               
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+               
+#endif
+}
+
+/**
+ * @function           db_util_GetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stMetadataExtractorStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void system_info_GetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stSystem_infoStartTime, NULL);
+#endif
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/system-info/ITs-system-info-common.h b/src/itc/system-info/ITs-system-info-common.h
new file mode 100755 (executable)
index 0000000..5c7dc11
--- /dev/null
@@ -0,0 +1,189 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_SYSTEM_INFO_COMMON_H_
+#define _ITS_SYSTEM_INFO_COMMON_H_
+
+#include "assert.h"
+#include <system_info.h>
+#include <system_info_internal.h>
+#include <stdio.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/** @addtogroup itc-system-info
+*  @ingroup itc
+*  @{
+*/
+
+#define ERR_LOG                                "/tmp/tclog"
+FILE *g_fpLog;
+
+//Add helper function declarations here
+
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+
+struct timeval g_stSystem_infoStartTime;
+struct mallinfo g_stSystem_infoMemInfo;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][system-info_ITc] Starting test : %s\n",__LINE__, __FUNCTION__);\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog){\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [system-info_ITc] %s_MemoryLeakStatus - %s\n", __LINE__, #api, memLog);\
+       }\
+}
+       
+#define PRINT_SPEED_LOG(api, szSpeedLog)\
+       if(strlen(szSpeedLog) > 0) \
+       {\
+               szSpeedLog[strlen(szSpeedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d] [system-info_ITc] %s_TimeInMicrosec- %s\n", __LINE__, #api, szSpeedLog);\
+       }\
+
+
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal != METADATA_EXTRACTOR_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][system-info_ITc] %s failed in pre-condition, error returned = %s \n", __LINE__, API, Metadata_ExtractorGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_POST_RESULT(nRetVal, API) {\
+       if (nRetVal != METADATA_EXTRACTOR_ERROR_NONE)\
+       {\
+               FPRINTF("\\n[Line : %d][system-info_ITc] %s failed in post-condition, error returned = %s \n", __LINE__, API, Metadata_ExtractorGetError(nRetVal));\
+       }\
+}
+
+#define VALIDATE_RESULT(nErrCount1, strApi) {\
+       if ( nErrCount1 > 0)\
+       {\
+               FPRINTF("\\n[Line : %d][system-info_ITc] %s failed %d times, out of %d times\n", __LINE__, strApi, nErrCount1, MAX_COUNT);\
+               return 1;\
+       }\
+       else\
+       {\
+               return 0;\
+       }\
+}
+
+#define VALIDATE_RESULT_PAIRAPI(nErrCount1, nErrCount2, strTargetApi1, strTargetApi2, szApi1, szApi2, szApi3) \
+       if ( nErrCount1 > 0 || nErrCount2 > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][system-info_ITc] %s failed %d times, %s failed %d times out of %d times\n", __LINE__, strTargetApi1, nErrCount1, strTargetApi2, nErrCount2, MAX_COUNT);\
+               if (szApi1 != NULL)\
+               {\
+                       free(szApi1);\
+                       szApi1 = NULL;\
+               }\
+               if (szApi2 != NULL)\
+               {\
+                       free(szApi2);\
+                       szApi2 = NULL;\
+               }\
+               if (szApi3 != NULL)\
+               {\
+                       free(szApi3);\
+                       szApi3 = NULL;\
+               }\
+               return 1;\
+       }\
+       
+#define VALIDATE_RESULT_API(nFailCount, strTargetApiName, ptrMem1, ptrMem2) \
+       if ( nFailCount > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][system-info_ITc] %s failed %d times out of %d times\n", __LINE__, strTargetApiName, nFailCount, MAX_COUNT);\
+               if (ptrMem1 != NULL)\
+               {\
+                       free(ptrMem1);\
+                       ptrMem1 = NULL;\
+               }\
+               if (ptrMem2 != NULL)\
+               {\
+                       free(ptrMem2);\
+                       ptrMem2 = NULL;\
+               }\
+               return 1;\
+       }\
+
+#define FREE_MEMORY_3ARGS(szApi1, szApi2, szApi3)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+       if (szApi3 != NULL)\
+       {\
+               free(szApi3);\
+               szApi3 = NULL;\
+       }\
+
+#define FREE_MEMORY_2ARGS(szApi1, szApi2)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if (szApi2 != NULL)\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+
+#define FREE(szApi1)\
+       if (szApi1 != NULL)\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+
+
+char* system_info_GetError(int nRet);
+void system_info_GetMemStatus(char *pszAPIMemory);
+inline void system_info_GetMemAllocation();
+void system_info_ExecutionDelay(char* pszAPITime);
+void system_info_GetTimeOfDay();
+
+/** @} */
+#endif  //_ITS_SYSTEM_INFO_COMMON_H_
diff --git a/src/itc/system-info/ITs-system-info.c b/src/itc/system-info/ITs-system-info.c
new file mode 100755 (executable)
index 0000000..3ff47ec
--- /dev/null
@@ -0,0 +1,318 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-system-info-common.h"
+
+/** @addtogroup itc-system-info
+*  @ingroup itc
+*  @{
+*/
+//& set: SystemInfo
+
+/**
+* @function            ITs_system_info_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_system_info_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       return;
+}
+
+/**
+* @function            ITs_system_info_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_system_info_cleanup(void)
+{
+       return;
+}
+
+/** @addtogroup itc-system-info-testcases
+*  @brief              Integration testcases for module system-info
+*  @ingroup    itc-system-info
+*  @{
+*/
+
+//& purpose: Gets a boolean value of the platform feature. 
+//& type: auto
+/**
+* @testcase                    ITc_system_info_get_platform_bool_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets a boolean value of the platform feature. 
+* @scenario                            Gets a boolean value of the platform feature
+* @apicovered                  system_info_get_platform_bool 
+* @passcase                            if system_info_get_platform_bool return 0
+* @failcase                            if system_info_get_platform_bool return non zero
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_system_info_get_platform_bool_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       const char *pszKey = "http://tizen.org/feature/camera";
+       bool bValue;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               system_info_GetMemAllocation();
+               system_info_GetTimeOfDay();
+               int nRetVal = system_info_get_platform_bool (pszKey,&bValue);//target api
+               system_info_ExecutionDelay(pszSpeedLog);
+               system_info_GetMemStatus(pszMemLog);
+
+               if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][system-info_ITc] system_info_get_platform_bool failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, system_info_GetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "system_info_get_platform_bool", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(system_info_get_platform_bool, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(system_info_get_platform_bool, pszMemLog);
+#endif
+       FREE_MEMORY_2ARGS(pszSpeedLog,pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Gets a string value of the platform feature. 
+//& type: auto
+/**
+* @testcase                    ITc_system_info_get_platform_double_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets a double value of the platform feature
+* @scenario                            Gets a double value of the platform feature
+* @apicovered                  system_info_get_platform_double
+* @passcase                            if system_info_get_platform_double return 0
+* @failcase                            if system_info_get_platform_double return non zero
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_system_info_get_platform_double_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       const char *pszKey = "http://tizen.org/feature/screen.height";
+       double dblValue;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               system_info_GetMemAllocation();
+               system_info_GetTimeOfDay();
+               int nRetVal = system_info_get_platform_double (pszKey,&dblValue);//target api
+               system_info_ExecutionDelay(pszSpeedLog);
+               system_info_GetMemStatus(pszMemLog);
+
+               if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+               {
+                       if(nRetVal != SYSTEM_INFO_ERROR_INVALID_PARAMETER)
+                       {
+                               FPRINTF("\\n[Line : %d][system-info_ITc] system_info_get_platform_double failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, system_info_GetError(nRetVal));
+                               nFailCount++;
+                               continue;
+                       }
+                       else
+                       {
+                               FPRINTF("\\n[Line : %d][system-info_ITc] system_info_get_platform_double skipped on iteration %d as no double key present in model-config file ",__LINE__, nLoopCount);
+                               continue;
+                       }
+               }
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "system_info_get_platform_double", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(system_info_get_platform_double, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(system_info_get_platform_double, pszMemLog);
+#endif
+       FREE_MEMORY_2ARGS(pszSpeedLog,pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Gets an integer value of the platform feature. 
+//& type: auto
+/**
+* @testcase                    ITc_system_info_get_platform_int_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets an integer value of the platform feature
+* @scenario                            Gets an integer value of the platform feature
+* @apicovered                  system_info_get_platform_int
+* @passcase                            if system_info_get_platform_int return 0
+* @failcase                            if system_info_get_platform_int return non zero
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_system_info_get_platform_int_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       const char *pszKey = "http://tizen.org/feature/multi_point_touch.point_count";
+       int nValue;
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               system_info_GetMemAllocation();
+               system_info_GetTimeOfDay();
+               int nRetVal = system_info_get_platform_int (pszKey,&nValue);//target api
+               system_info_ExecutionDelay(pszSpeedLog);
+               system_info_GetMemStatus(pszMemLog);
+
+               if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][system-info_ITc] system_info_get_platform_int failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, system_info_GetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "system_info_get_platform_int", pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(system_info_get_platform_int, pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(system_info_get_platform_int, pszMemLog);
+#endif
+       FREE_MEMORY_2ARGS(pszSpeedLog,pszMemLog);
+
+       return 0;
+}
+
+//& purpose: Gets a string value of the platform feature
+//& type: auto
+/**
+* @testcase                    ITc_system_info_get_platform_string_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets a string value of the platform feature
+* @scenario                            Gets a string value of the platform feature
+* @apicovered                  system_info_get_platform_string 
+* @passcase                            if system_info_get_platform_string return 0
+* @failcase                            if system_info_get_platform_string return non zero
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_system_info_get_platform_string_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSpeedLog = NULL;
+       int nFailCount = 0;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+       const char *pszKey = "http://tizen.org/system/model_name";
+       char *pszValue = NULL; 
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               system_info_GetMemAllocation();
+               system_info_GetTimeOfDay();
+               int nRetVal = system_info_get_platform_string(pszKey,&pszValue);//target api
+               system_info_ExecutionDelay(pszSpeedLog);
+               system_info_GetMemStatus(pszMemLog);
+
+               if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][system-info_ITc] system_info_get_platform_string failed on iteration %d, error returned = %s ",__LINE__, nLoopCount, system_info_GetError(nRetVal));
+                       nFailCount++;
+                       continue;
+               }
+               FREE(pszValue);
+       }
+
+       VALIDATE_RESULT_API(nFailCount, "system_info_get_platform_string" , pszMemLog,pszSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(system_info_get_platform_string , pszSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(system_info_get_platform_string , pszMemLog);
+#endif
+       FREE_MEMORY_2ARGS(pszSpeedLog,pszMemLog);
+
+       return 0;
+}
+
+/** @} */ 
+/** @} */ 
\ No newline at end of file
diff --git a/src/itc/system-info/system-info-xmlparser.c b/src/itc/system-info/system-info-xmlparser.c
new file mode 100755 (executable)
index 0000000..6fe838b
--- /dev/null
@@ -0,0 +1,210 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#pragma once
+
+
+char g_arrXMLText[200][200];
+int g_nCount;
+char *g_pDataTypeIn;
+
+
+void system_info_GetXMLValue(char *pTagNameIn,char *pDataTypeIn, char *pKeyOut, char *pValueOut);
+void system_info_GetXMLValueNext(char *pKeyOut, char *pValueOut);
+char* system_info_GetName(char *pStr);
+char* system_info_GetValue(char *pStr);
+char *system_info_Trim(char *str);
+
+
+
+bool system_info_ParseXML(char *pszPath)
+{
+       char line [128]; 
+
+       FILE *fp =  fopen(pszPath,"r");
+       if(fp == NULL)
+               return false;
+
+       int nCount = 0;
+       
+
+       while ( fgets ( line, sizeof line, fp ) != NULL ) 
+       {
+               char *pNewLine = system_info_Trim(line);
+               strcpy(&g_arrXMLText[nCount++][0], pNewLine);
+       }
+
+       /*char szKey[100];
+       char szValue[100];
+       system_info_GetXMLValue("custom","bool",szKey, szValue);
+
+       while(strcmp (szKey , "") != 0)
+       system_info_GetXMLValueNext(szKey, szValue);*/
+       
+       fclose(fp);
+       return true;
+}
+
+
+
+
+void system_info_GetXMLValue(char *pTagNameIn,char *pDataTypeIn,char *pKeyOut, char *pValueOut)
+{
+       if(system_info_ParseXML ("/etc/config/model-config.xml") == false)
+               return;
+
+       char szLine[200];
+       char szDataType[100];
+       const char ToeknKeyName[] = "name=";
+       const char ToeknKeyType[] = "type=";
+       const char ToeknValue[] = ">";
+       
+
+       char pszTag[100] ;
+       sprintf(pszTag, "<%s",pTagNameIn);
+       strcat(pszTag,">");
+       
+       bool bTagFound = false;
+       int i=0;
+       for(i=0;i<200;i++)
+       {
+               memset(szLine,0x0,200);
+               memset(szDataType,0x0,100);
+               strcpy(szLine,&g_arrXMLText[i][0]);;
+
+               if(strncmp(szLine,pszTag,strlen(pszTag)) == 0)
+               {
+                       bTagFound = true;
+               }
+               else if(bTagFound)
+               {
+                       char *szSubStr = strstr(szLine,ToeknKeyName);
+                       if(szSubStr == NULL)
+                               break;
+
+                       strcpy(pKeyOut, system_info_GetName(szSubStr));
+
+                       szSubStr = strstr(szLine,ToeknKeyType);
+                       if(szSubStr == NULL)
+                               break;
+
+                       strcpy(szDataType, system_info_GetName(szSubStr));
+
+                       if(strncmp(pDataTypeIn, szDataType, strlen(pDataTypeIn)) == 0)
+                       {
+                               szSubStr = strstr(szLine,ToeknValue);
+                               strcpy(pValueOut, system_info_GetValue(szSubStr));
+
+                               g_nCount = i+1;
+                               g_pDataTypeIn = pDataTypeIn;
+                               break;
+                       }
+                       else
+                       {
+                               strcpy(pKeyOut, "");
+                       }
+               }
+       }
+}
+
+void system_info_GetXMLValueNext(char *pKeyOut, char *pValueOut)
+{
+       char szLine[200];
+       char szDataType[100];
+       const char ToeknKeyName[] = "name=";
+       const char ToeknKeyType[] = "type=";
+       const char ToeknValue[] = ">";
+
+       while(g_nCount < 200)
+       {
+               memset(szLine,0x0,200);
+               memset(szDataType,0x0,100);
+               strcpy(szLine,&g_arrXMLText[g_nCount][0]);;
+
+               char *szSubStr = strstr(szLine,ToeknKeyName);
+
+               if(szSubStr == NULL)
+               {
+                       strcpy(pKeyOut, "");
+                       return;
+               }
+
+               strcpy(pKeyOut, system_info_GetName(szSubStr));
+
+               szSubStr = strstr(szLine,ToeknKeyType);
+
+               if(szSubStr == NULL)
+               {
+                       strcpy(pKeyOut, "");
+                       return;
+               }
+
+               strcpy(szDataType, system_info_GetName(szSubStr));
+               ++g_nCount;
+
+               if(strncmp(g_pDataTypeIn, szDataType, strlen(g_pDataTypeIn)) == 0)
+               {
+                       szSubStr = strstr(szLine,ToeknValue);
+                       strcpy(pValueOut, system_info_GetValue(szSubStr));
+
+                       break;
+               }
+               else
+               {
+                       strcpy(pKeyOut, "");
+               }
+       }
+}
+
+char* system_info_GetName(char *pStr)
+{
+       char szSubStr[200];
+       strcpy(szSubStr,pStr);
+
+       char *pToken = strtok(szSubStr,"\"");
+       pToken = strtok(NULL,"\"");
+       return pToken ;
+}
+
+char* system_info_GetValue(char *pStr)
+{
+       char szSubStr[200];
+       strcpy(szSubStr,pStr);
+
+       char *pToken = strtok(szSubStr,">");
+       pToken = strtok(pToken,"<");
+       return pToken ;
+}
+
+char *system_info_Trim(char *str)
+{
+  char *end;
+
+  // Trim leading space
+  while(isspace(*str)) str++;
+
+  if(*str == 0)  // All spaces?
+    return str;
+
+  // Trim trailing space
+  end = str + strlen(str) - 1;
+  while(end > str && isspace(*end)) end--;
+
+  // Write new null terminator
+  *(end+1) = 0;
+
+  return str;
+}
\ No newline at end of file
diff --git a/src/itc/system-info/tct-system-info-native.c b/src/itc/system-info/tct-system-info-native.c
new file mode 100755 (executable)
index 0000000..9ddb26f
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-system-info-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/system-info/tct-system-info-native.h b/src/itc/system-info/tct-system-info-native.h
new file mode 100755 (executable)
index 0000000..788239a
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SYSTEM_INFO_NATIVE_H__
+#define __TCT_SYSTEM_INFO_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_system_info_startup(void);
+extern void ITs_system_info_cleanup(void);
+
+extern int ITc_system_info_get_platform_bool_p(void);
+extern int ITc_system_info_get_platform_double_p(void);
+extern int ITc_system_info_get_platform_int_p(void);
+extern int ITc_system_info_get_platform_string_p(void);
+
+testcase tc_array[] = {
+    {"ITc_system_info_get_platform_bool_p", ITc_system_info_get_platform_bool_p, ITs_system_info_startup, ITs_system_info_cleanup},
+    {"ITc_system_info_get_platform_double_p", ITc_system_info_get_platform_double_p, ITs_system_info_startup, ITs_system_info_cleanup},
+    {"ITc_system_info_get_platform_int_p", ITc_system_info_get_platform_int_p, ITs_system_info_startup, ITs_system_info_cleanup},
+    {"ITc_system_info_get_platform_string_p", ITc_system_info_get_platform_string_p, ITs_system_info_startup, ITs_system_info_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SYSTEM_INFO_NATIVE_H__
diff --git a/src/itc/system-settings/CMakeLists.txt b/src/itc/system-settings/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..b44889e
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "system-settings")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-system-system-settings")
+SET(TC_SOURCES
+       ITs-system-settings-common.c
+       ITs-system-settings.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-appfw-application
+       bundle
+       glib-2.0
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/system-settings/ITs-system-settings-common.c b/src/itc/system-settings/ITs-system-settings-common.c
new file mode 100755 (executable)
index 0000000..b4b54b6
--- /dev/null
@@ -0,0 +1,245 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-system-settings-common.h"
+
+/** @addtogroup itc-system-settings
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function definitions here
+
+extern struct timeval g_stSystem_settingsStartTime;
+extern struct mallinfo g_stSystem_settingsMemInfo;
+
+//Add helper function definitions here
+
+/**
+ * @function           SystemSettingsGetDataPath
+ * @description                Returnes the application data path
+ * @parameter          pAppDataPath: application data path
+ * @return                     true if succeed else false
+ */
+bool SystemSettingsGetDataPath(char* pAppDataPath)
+{
+       if ( NULL == pAppDataPath )
+       {
+               FPRINTF("\\n[Line : %d][system-settings_ITc] Null Path provided; Check the input string", __LINE__);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if ( NULL == pPath )
+       {
+               FPRINTF("\\n[Line : %d][system-settings_ITc] Unable to get application data path; app_get_data_path returned null value", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF("\\n[Line : %d][system-settings_ITc] application data path returned = %s", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+/**
+ * @function           SystemSettingsAppendToAppDataPath
+ * @description                Appends the input string to application data path
+ * @parameter          pInputPath: path to append to data path; pFinalPath: final resultant path
+ * @return                     true if succeed else false
+ */
+bool SystemSettingsAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if ( NULL == pInputPath || NULL == pFinalPath )
+       {
+               FPRINTF("\\n[Line : %d][system-settings_ITc] Null Path provided; Check the input string", __LINE__);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if ( false == SystemSettingsGetDataPath(pAppDataPath) )
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+
+       FPRINTF("\\n[Line : %d][system-settings_ITc] result path returned = %s", __LINE__, pFinalPath);
+
+       return true;
+}
+
+/**
+ * @function           system_settings_GetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* system_settings_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case SYSTEM_SETTINGS_ERROR_NONE:                                szErrorVal = "SYSTEM_SETTINGS_ERROR_NONE";                              break;
+       case SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER:   szErrorVal = "SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER"; break;
+       case SYSTEM_SETTINGS_ERROR_IO_ERROR:                    szErrorVal = "SYSTEM_SETTINGS_ERROR_IO_ERROR";                  break;
+       default:                                                                                szErrorVal = "Unknown Error";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           system_settings_GetEnumSettingString
+ * @description                return string for settings key
+ * @parameter          nVal - enum value
+ * @return                     string
+ */
+char* system_settings_GetEnumSettingString(int nVal)
+{
+       char *pszText = NULL;
+       switch ( nVal )
+       {
+       case SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION:                             pszText = "SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION or SYSTEM_SETTINGS_KEY_MOTION_ENABLED";        break;
+               //case SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED:               pszText = "SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED";                  break;
+       case SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED:               pszText = "SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED";                break;
+       case SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR:              pszText = "SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR";               break;
+       case SYSTEM_SETTINGS_KEY_SOUND_LOCK:                                    pszText = "SYSTEM_SETTINGS_KEY_SOUND_LOCK";                                             break;
+       case SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE:                             pszText = "SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE";                              break;
+       case SYSTEM_SETTINGS_KEY_SOUND_TOUCH:                                   pszText = "SYSTEM_SETTINGS_KEY_SOUND_TOUCH";                                    break;
+       case SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO:  pszText = "SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO";   break;
+               //case SYSTEM_SETTINGS_KEY_LOCALE_UPDATE_AUTO:                  pszText = "SYSTEM_SETTINGS_KEY_LOCALE_UPDATE_AUTO";                             break;
+               //case SYSTEM_SETTINGS_KEY_MOTION_ENABLED:                              pszText = "SYSTEM_SETTINGS_KEY_MOTION_ENABLED";                                 break;
+       case SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION:             pszText = "SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION";              break;
+       case SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE:                   pszText = "SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE";                    break;
+       case SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE:                pszText = "SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE";                 break;
+       case SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN:                 pszText = "SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN";                  break;
+       case SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN:                 pszText = "SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN";                  break;
+       case SYSTEM_SETTINGS_KEY_FONT_TYPE:                                             pszText = "SYSTEM_SETTINGS_KEY_FONT_TYPE";                                              break;
+       case SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE:                  pszText = "SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE";                   break;
+       case SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP:                                pszText = "SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP";                                 break;
+       case SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE:                             pszText = "SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE";                              break;
+       case SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY:                                pszText = "SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY";                                 break;
+       case SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE:                               pszText = "SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE";                                break;
+       case SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE:                               pszText = "SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE";                                break;
+               //case SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_MODE:                 pszText = "SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_MODE";                    break;
+       case SYSTEM_SETTINGS_KEY_DEVICE_NAME:                                   pszText = "SYSTEM_SETTINGS_KEY_DEVICE_NAME";                                    break;
+       case SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION:                    pszText = "SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION";                             break;
+       case SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD:  pszText = "SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD";           break;
+       case SYSTEM_SETTINGS_KEY_FONT_SIZE:                                             pszText = "SYSTEM_SETTINGS_KEY_FONT_SIZE";                                              break;
+               //case SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY:                  pszText = "SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY";                             break;
+       case SYSTEM_SETTINGS_KEY_TIME_CHANGED:                                  pszText = "SYSTEM_SETTINGS_KEY_TIME_CHANGED";                                   break;
+       case SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME:                 pszText = "SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME";                  break;
+       case SYSTEM_SETTINGS_KEY_LOCK_STATE:                                    pszText = "SYSTEM_SETTINGS_KEY_LOCK_STATE";                                             break;
+       }       
+       return pszText;
+}
+
+/**
+* @function                    system_settings_GetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void system_settings_GetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if ( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+
+               stMemInfo = mallinfo();
+               pszLog = calloc(MEMLOG , sizeof(char));
+
+               if ( stMemInfo.uordblks > g_stSystem_settingsMemInfo.uordblks )
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stSystem_settingsMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stSystem_settingsMemInfo.uordblks - stMemInfo.uordblks);
+               }
+
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+
+#endif
+}
+
+/**
+* @function                    system_settings_GetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void system_settings_GetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stSystem_settingsMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           system_settings_ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void system_settings_ExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);             
+       ulldifference = ((stEnd.tv_sec -g_stSystem_settingsStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stSystem_settingsStartTime.tv_usec;
+
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+
+#endif
+}
+
+/**
+ * @function           system_settings_GetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stSystem_settingsStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void system_settings_GetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stSystem_settingsStartTime, NULL);
+#endif
+}
+
+/** @} */
diff --git a/src/itc/system-settings/ITs-system-settings-common.h b/src/itc/system-settings/ITs-system-settings-common.h
new file mode 100755 (executable)
index 0000000..af4ecab
--- /dev/null
@@ -0,0 +1,207 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_SYSTEM_SETTINGS_COMMON_H_
+#define _ITS_SYSTEM_SETTINGS_COMMON_H_
+
+
+#include "assert.h"
+#include <system_settings.h>
+#include <glib-2.0/glib.h>
+
+#include <stdio.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <app.h>
+
+/** @addtogroup itc-system-settings
+*  @ingroup itc
+*  @{
+*/
+
+#define ERR_LOG                                "/tmp/tclog"
+FILE *g_fpLog;
+
+//Add helper function declarations here
+#define PATH_LEN                                                       1024
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+
+#define CONFIG_LINE_LEN_MAX                    2048    //maximum key-value line length
+#define CONFIG_VALUE_LEN_MAX           1024    //maximum length of value 
+
+//#define IS_DEVICE !strcmp(ARCH_TYPE, "armv7l")
+
+struct timeval g_stSystem_settingsStartTime;
+struct mallinfo g_stSystem_settingsMemInfo;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][system-settings_ITc] ***** Starting test : %s", __LINE__, __FUNCTION__);\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog) {\
+       int nMLogLen = strlen(memLog);\
+       if ( nMLogLen > 0 )\
+       {\
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d][system-settings_ITc] %s_MemoryLeakStatus - %s", __LINE__, #api, memLog);\
+       }\
+}
+       
+#define PRINT_SPEED_LOG(api, speedLog) {\
+       if ( strlen(speedLog) > 0 )\
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][system-settings_ITc] %s_TimeInMicrosec- %s", __LINE__, #api, speedLog);\
+       }\
+}
+
+#define VALIDATE_RESULT(nEnumCnt, nErrCount1, strApi) {\
+       if ( nErrCount1 > 0)\
+       {\
+               FPRINTF("\\n[Line : %d][system-settings_ITc] %s failed %d times, out of %d times", __LINE__, strApi, nErrCount1, MAX_COUNT*nEnumCnt);\
+               return 1;\
+       }\
+       else\
+       {\
+               return 0;\
+       }\
+}
+
+#define VALIDATE_RESULT_PAIRAPI(nEnumCnt,nErrCount1, nErrCount2, strTargetApi1, strTargetApi2, szApi1, szApi2, szApi3) \
+       if ( nErrCount1 > 0 || nErrCount2 > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][system-settings_ITc] %s failed %d times, %s failed %d times out of %d times", __LINE__, strTargetApi1, nErrCount1, strTargetApi2, nErrCount2, MAX_COUNT*nEnumCnt);\
+               if ( szApi1 != NULL )\
+               {\
+                       free(szApi1);\
+                       szApi1 = NULL;\
+               }\
+               if ( szApi2 != NULL )\
+               {\
+                       free(szApi2);\
+                       szApi2 = NULL;\
+               }\
+               if ( szApi3 != NULL )\
+               {\
+                       free(szApi3);\
+                       szApi3 = NULL;\
+               }\
+               return 1;\
+       }\
+       
+#define VALIDATE_RESULT_API(nFailCount, strTargetApiName, ptrMem1, ptrMem2) \
+       if ( nFailCount > 0 )\
+       {\
+               FPRINTF("\\n[Line : %d][system-settings_ITc] %s failed %d times out of %d times", __LINE__, strTargetApiName, nFailCount, MAX_COUNT);\
+               if ( ptrMem1 != NULL )\
+               {\
+                       free(ptrMem1);\
+                       ptrMem1 = NULL;\
+               }\
+               if ( ptrMem2 != NULL )\
+               {\
+                       free(ptrMem2);\
+                       ptrMem2 = NULL;\
+               }\
+               return 1;\
+       }\
+
+#define FREE_MEMORY_3ARGS(szApi1, szApi2, szApi3)\
+       if ( szApi1 != NULL )\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if ( szApi2 != NULL )\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+       if ( szApi3 != NULL )\
+       {\
+               free(szApi3);\
+               szApi3 = NULL;\
+       }\
+
+#define FREE_MEMORY_2ARGS(szApi1, szApi2)\
+       if ( szApi1 != NULL )\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+       if ( szApi2 != NULL )\
+       {\
+               free(szApi2);\
+               szApi2 = NULL;\
+       }\
+
+#define FREE(szApi1)\
+       if ( szApi1 != NULL )\
+       {\
+               free(szApi1);\
+               szApi1 = NULL;\
+       }\
+
+#define CHECK_CALLBACK_STATUS(szApiName, nErrorCount) {\
+       int nTimeoutId = g_timeout_add(10000, TimeoutFunction, g_pMainLoop);\
+       g_main_loop_run(g_pMainLoop);\
+       g_source_remove(nTimeoutId);\
+       if ( g_bCallbackResult == false )\
+       {\
+               FPRINTF("\\n[Line : %d][system-settings_ITc] After %s, callback has not been invoked. Iteration %d", __LINE__, szApiName, nLoopCount);\
+               nErrorCount++;\
+               continue;\
+       }\
+       else if ( g_bCallbackResultValid == false )\
+       {\
+               FPRINTF("\\n[Line : %d][system-settings_ITc] After %s, callback has not been invoked but not a valid key. Iteration %d", __LINE__, szApiName, nLoopCount);\
+               nErrorCount++;\
+               continue;\
+       }\
+       else\
+       {\
+               g_bCallbackResult = false;\
+               g_bCallbackResultValid = false;\
+       }\
+}
+
+char* system_settings_GetError(int nRet);
+void system_settings_GetMemStatus(char *pszAPIMemory);
+inline void system_settings_GetMemAllocation();
+void system_settings_ExecutionDelay(char* pszAPITime);
+void system_settings_GetTimeOfDay();
+char* system_settings_GetEnumSettingString(int nVal);
+char* system_settings_GetEnumSettingString(int nVal);
+bool SystemSettingsGetDataPath(char* pAppDataPath);
+bool SystemSettingsAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+
+/** @} */
+#endif  //_ITS_SYSTEM_SETTINGS_COMMON_H_
diff --git a/src/itc/system-settings/ITs-system-settings.c b/src/itc/system-settings/ITs-system-settings.c
new file mode 100755 (executable)
index 0000000..efdc5c7
--- /dev/null
@@ -0,0 +1,434 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-system-settings-common.h"
+
+/** @addtogroup itc-system-settings
+*  @ingroup itc
+*  @{
+*/
+
+//& set: SystemSettings
+
+static GMainLoop *g_pMainLoop;
+gboolean TimeoutFunction(gpointer data);
+
+
+int g_nSysSett_ArrBool[]={ SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION,
+#if IS_DEVICE
+       SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED,
+#endif
+       SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED,
+       SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR,
+       //SYSTEM_SETTINGS_KEY_SOUND_LOCK,//GET
+       SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE//GET
+       //SYSTEM_SETTINGS_KEY_SOUND_TOUCH,//GET
+       //SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, //GET
+       //SYSTEM_SETTINGS_KEY_MOTION_ENABLED, //GET
+       //SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION, //GET
+       //SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE       //GET
+};
+
+int g_nSysSett_ArrString[]={ SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE,
+       //SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN,
+       //SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN,
+       //SYSTEM_SETTINGS_KEY_FONT_TYPE,
+       SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE, 
+       //SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP, 
+       SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE, //GET
+       SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, 
+       SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE,
+       SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE,
+       SYSTEM_SETTINGS_KEY_DEVICE_NAME, //GET
+       SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION
+       //SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD
+};
+
+int g_nSysSett_ArrInt[]={ SYSTEM_SETTINGS_KEY_FONT_SIZE,
+       SYSTEM_SETTINGS_KEY_LOCK_STATE,
+       //SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY, 
+       //SYSTEM_SETTINGS_KEY_TIME_CHANGED, 
+       //SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME
+};
+
+
+
+/**
+* @function                    TimeoutFunction
+* @description         Timeout funtion
+* @parameter[IN]       gpointer data - timeout data
+* @return                      boolean
+*/
+
+gboolean TimeoutFunction(gpointer data)
+{
+       g_main_loop_quit((GMainLoop *)data);
+       return false;
+}
+
+/**
+* @function            ITs_system_settings_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_system_settings_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       return;
+}
+
+/**
+* @function            ITs_system_settings_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_system_settings_cleanup(void)
+{
+       return;
+}
+
+/** @addtogroup itc-system-settings-testcases
+*  @brief              Integration testcases for module system-settings
+*  @ingroup    itc-system-settings
+*  @{
+*/
+
+//& purpose: Get the system settings value associated with the given key as a boolean. 
+//& type: auto
+/**
+* @testcase                    ITc_system_settings_get_value_bool_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Get the system settings value associated with the given key as a boolean
+* @scenario                            Get the system settings value associated with the given key as a boolean
+* @apicovered                  system_settings_get_value_bool
+* @passcase                            If system_settings_get_value_bool return 0
+* @failcase                            If system_settings_get_value_bool return non zero
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_system_settings_get_value_bool_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+
+       int nEnumSize = sizeof (g_nSysSett_ArrBool) / sizeof(int);
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT *nEnumSize , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT *nEnumSize, sizeof(char));
+#endif
+
+       system_settings_key_e key;
+       bool bGetValue;
+
+       int nIt = 0;
+       while ( nIt < nEnumSize )
+       {
+               key = g_nSysSett_ArrBool[nIt];
+
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       system_settings_GetMemAllocation();
+                       system_settings_GetTimeOfDay();
+                       nRetVal = system_settings_get_value_bool(key,&bGetValue);// Target APIs
+                       system_settings_ExecutionDelay(pszGetSpeedLog);
+                       system_settings_GetMemStatus(pszMemLog);
+
+                       if ( nRetVal != SYSTEM_SETTINGS_ERROR_NONE && nRetVal != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n[Line : %d][system-settings_ITc] system_settings_get_value_bool failed on iteration %d for enum %s, error returned = %s", __LINE__, nLoopCount, 
+                                       system_settings_GetEnumSettingString(key), system_settings_GetError(nRetVal));
+                               nGetFailCount++;
+                               continue;
+                       }
+               }
+               ++nIt;
+       }
+               
+       VALIDATE_RESULT(nEnumSize, nGetFailCount,"system_settings_get_value_bool");
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(system_settings_get_value_bool, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(system_settings_get_value_bool, pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog,pszGetSpeedLog);
+       return 0;
+}
+
+//& purpose: Get the system settings value associated with the given key as a string.
+//& type: auto
+/**
+* @testcase                    ITc_system_settings_get_value_string_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the system settings value associated with the given key as a string. 
+* @scenario                            Gets the system settings value associated with the given key as a string. 
+* @apicovered                  system_settings_get_value_string
+* @passcase                            If system_settings_get_value_string return 0
+* @failcase                            If system_settings_get_value_string return non zero
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_system_settings_get_value_string_p(void)
+{
+       START_TEST;
+
+       
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+
+       int nEnumSize = sizeof (g_nSysSett_ArrString) / sizeof(int);
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT *nEnumSize , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT *nEnumSize, sizeof(char));
+#endif
+
+       system_settings_key_e key;
+       char *pszGetPath = NULL;
+       
+       int nIt = 0;
+       while ( nIt < nEnumSize )
+       {
+               key = g_nSysSett_ArrString[nIt];
+
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       system_settings_GetMemAllocation();
+                       system_settings_GetTimeOfDay();
+                       nRetVal = system_settings_get_value_string(key,&pszGetPath);// Target APIs
+                       system_settings_ExecutionDelay(pszGetSpeedLog);
+                       system_settings_GetMemStatus(pszMemLog);
+
+                       if ( nRetVal != SYSTEM_SETTINGS_ERROR_NONE && nRetVal != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n[Line : %d][system-settings_ITc] system_settings_get_value_string failed on iteration %d for enum %s, error returned = %s", __LINE__, nLoopCount, 
+                                       system_settings_GetEnumSettingString(key), system_settings_GetError(nRetVal));
+                               nGetFailCount++;
+
+                       }
+               }
+               ++nIt;
+       }
+               
+       
+       VALIDATE_RESULT(nEnumSize, nGetFailCount, "system_settings_get_value_string");
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("system_settings_get_value_string", pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("system_settings_get_value_string", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszGetSpeedLog);
+       return 0;
+}
+
+//& purpose: Gets the system settings value associated with the given key as an integer 
+//& type: auto
+/**
+* @testcase                    ITc_system_settings_get_value_int_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets the system settings value associated with the given key as an integer
+* @scenario                            Gets the system settings value associated with the given key as an integer
+* @apicovered                  system_settings_get_value_int
+* @passcase                            If system_settings_get_value_int return 0
+* @failcase                            If system_settings_get_value_int return non zero
+* @precondition                        NA
+* @postcondition               NA
+*/
+
+int ITc_system_settings_get_value_int_p(void)
+{
+       START_TEST;
+
+       int nRetVal = -1, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       int nEnumSize = sizeof (g_nSysSett_ArrInt) / sizeof(int);
+
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT *nEnumSize , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszGetSpeedLog = calloc(TIMELOG * MAX_COUNT *nEnumSize, sizeof(char));
+#endif
+
+       system_settings_key_e key;
+       int nGetValue = 0;
+
+       int nIt = 0;
+       while ( nIt < nEnumSize )
+       {
+               key = g_nSysSett_ArrInt[nIt];
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       nGetValue = -1;
+                       system_settings_GetMemAllocation();
+                       system_settings_GetTimeOfDay();
+                       nRetVal = system_settings_get_value_int(key,&nGetValue);// Target APIs
+                       system_settings_ExecutionDelay(pszGetSpeedLog);
+                       system_settings_GetMemStatus(pszMemLog);
+
+                       if ( nRetVal != SYSTEM_SETTINGS_ERROR_NONE && nRetVal != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED )
+                       {
+                               FPRINTF("\\n[Line : %d][system-settings_ITc] system_settings_get_value_int failed on iteration %d for enum %s, error returned = %s ", __LINE__, nLoopCount, 
+                                       system_settings_GetEnumSettingString(key),system_settings_GetError(nRetVal));
+                               nGetFailCount++;
+                       }
+                       if ( nGetValue < 0 )
+                       {
+                               FPRINTF("\\n[Line : %d][system-settings_ITc] system_settings_get_value_int failed on iteration %d for enum %s, error returned = %s ", __LINE__, nLoopCount, 
+                                       system_settings_GetEnumSettingString(key),system_settings_GetError(nRetVal));
+                               nGetFailCount++;
+                       }
+               }
+               ++nIt;
+       }
+
+       VALIDATE_RESULT(nEnumSize, nGetFailCount, "system_settings_get_value_int");
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("system_settings_get_value_int", pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("system_settings_get_value_int", pszMemLog);
+#endif
+
+       FREE_MEMORY_2ARGS(pszMemLog, pszGetSpeedLog);
+       return 0;
+}
+
+/**
+* @function                    System_settings_changed_cb_p
+* @description         callback function, called when the system settings change
+* @parameter[IN]       system_settings_key_e key - key name for which settings are changes
+*                                      void *user_data - user data
+* @return                      NA
+*/
+
+void System_settings_changed_cb_p(system_settings_key_e key, void *user_data)
+{
+       /*without set, callback wil not hit*/ 
+       /*all setter in under non public api so we are not using in TCs*/
+}
+
+//& purpose: Registers and Unregister a change event callback for the given system settings key
+//& type: auto
+/**
+* @testcase                    ITc_system_settings_set_unset_changed_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Registers and Unregister a change event callback for the given system settings key 
+* @scenario                            Registers and Unregister a change event callback for the given system settings key
+* @apicovered                  system_settings_set_changed_cb, system_settings_unset_changed_cb
+* @passcase                            If system_settings_set_changed_cb and system_settings_unset_changed_cb return 0
+* @failcase                            If system_settings_set_changed_cb or system_settings_unset_changed_cb return non zero
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_system_settings_set_unset_changed_cb_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       
+#if MEMORY_CHECK
+       pszMemLog = calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszSetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSpeedLog = calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+       g_pMainLoop = g_main_loop_new(NULL, false);
+
+       system_settings_key_e key = SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION;
+       void *pvUserData = "User data";
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               system_settings_GetMemAllocation();
+               system_settings_GetTimeOfDay();
+               int nRetVal = system_settings_set_changed_cb (key,System_settings_changed_cb_p,pvUserData);//target api//register callback
+               system_settings_ExecutionDelay(pszSetSpeedLog);
+
+               if ( nRetVal != SYSTEM_SETTINGS_ERROR_NONE && nRetVal != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("\\n[Line : %d][system-settings_ITc] system_settings_set_changed_cb failed on iteration %d, error returned = %s", __LINE__, nLoopCount, system_settings_GetError(nRetVal));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               //Unregisters the callback function.
+               system_settings_GetTimeOfDay();
+               nRetVal = system_settings_unset_changed_cb (key);//target api//unregister callback
+               system_settings_ExecutionDelay(pszUnsetSpeedLog);
+               system_settings_GetMemStatus(pszMemLog);
+
+               if ( nRetVal != SYSTEM_SETTINGS_ERROR_NONE && nRetVal != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("\\n[Line : %d][system-settings_ITc] system_settings_unset_changed_cb failed on iteration %d, error returned = %s", __LINE__, nLoopCount, system_settings_GetError(nRetVal));
+                       nUnsetFailCount++;
+               }
+       }
+
+       VALIDATE_RESULT_PAIRAPI(1, nSetFailCount, nUnsetFailCount, "system_settings_set_changed_cb", "system_settings_unset_changed_cb", pszMemLog,pszSetSpeedLog,
+       pszUnsetSpeedLog);
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(system_settings_set_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(system_settings_unset_changed_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(system_settings_set_unset_changed_cb, pszMemLog);
+#endif
+       FREE_MEMORY_3ARGS(pszMemLog,pszSetSpeedLog,     pszUnsetSpeedLog);
+       return 0;
+}
+
+/** @} */ 
+/** @} */ 
\ No newline at end of file
diff --git a/src/itc/system-settings/tct-system-settings-native.c b/src/itc/system-settings/tct-system-settings-native.c
new file mode 100755 (executable)
index 0000000..4870f17
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-system-settings-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/system-settings/tct-system-settings-native.h b/src/itc/system-settings/tct-system-settings-native.h
new file mode 100755 (executable)
index 0000000..12a365f
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SYSTEM_SETTINGS_NATIVE_H__
+#define __TCT_SYSTEM_SETTINGS_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_system_settings_startup(void);
+extern void ITs_system_settings_cleanup(void);
+
+extern int ITc_system_settings_get_value_bool_p(void);
+extern int ITc_system_settings_get_value_string_p(void);
+extern int ITc_system_settings_get_value_int_p(void);
+extern int ITc_system_settings_set_unset_changed_cb_p(void);
+
+testcase tc_array[] = {
+    {"ITc_system_settings_get_value_bool_p", ITc_system_settings_get_value_bool_p, ITs_system_settings_startup, ITs_system_settings_cleanup},
+    {"ITc_system_settings_get_value_string_p", ITc_system_settings_get_value_string_p, ITs_system_settings_startup, ITs_system_settings_cleanup},
+    {"ITc_system_settings_get_value_int_p", ITc_system_settings_get_value_int_p, ITs_system_settings_startup, ITs_system_settings_cleanup},
+    {"ITc_system_settings_set_unset_changed_cb_p", ITc_system_settings_set_unset_changed_cb_p, ITs_system_settings_startup, ITs_system_settings_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SYSTEM_SETTINGS_NATIVE_H__
diff --git a/src/itc/tbm/CMakeLists.txt b/src/itc/tbm/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..243cd6b
--- /dev/null
@@ -0,0 +1,39 @@
+SET(PKG_NAME "tbm")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "libtbm")
+SET(TC_SOURCES
+       ITs-tbm-common.c
+       ITs-tbm.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       pthread-stubs
+       libdrm
+       x11
+       libdri2
+       bundle
+       capi-appfw-application
+       glib-2.0
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/tbm/ITs-tbm-common.c b/src/itc/tbm/ITs-tbm-common.c
new file mode 100755 (executable)
index 0000000..cbf9126
--- /dev/null
@@ -0,0 +1,313 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-tbm-common.h"
+
+/** @addtogroup itc-tbm
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stLibtbmStartTime;
+extern struct mallinfo g_stLibtbmMemInfo;
+//Add helper function definitions here
+
+/**
+ * @function           LibtbmGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stLibtbmStartTime
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void LibtbmGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stLibtbmStartTime, NULL);
+#endif
+}
+
+/**
+ * @function           LibtbmExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter          pszAPITime :String pointer containing the time difference
+ * @return                     NA
+ */
+void LibtbmExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK        
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec - g_stLibtbmStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stLibtbmStartTime.tv_usec;
+                       
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+#endif
+}
+
+/**
+* @function                    LibtbmGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter           pszAPIMemory :String pointer containing the difference of total number of bytes for Current and previous Memory Allocation.
+* @return                      NA
+*/
+void LibtbmGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stLibtbmMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stLibtbmMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stLibtbmMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }       
+#endif
+}
+
+/**
+ * @function           LibtbmGetMemAllocation
+ * @description                Gets the Memory state before API execution
+ * parameter           NA
+ * @return                     NA
+*/
+inline void LibtbmGetMemAllocation(void)
+{
+#if MEMORY_CHECK
+       g_stLibtbmMemInfo = mallinfo();
+#endif
+}
+
+
+/**
+ * @function           LibtbmAllocateMemory2
+ * @description                allocates memory for speed and memory check buffer for two API check scenario
+ * @parameter          pszMem, pszSpeed1, pszSpeed2 : pointers to allocated memory
+ * @return                     NA
+ */ 
+void LibtbmAllocateMemory2(char **pszMem, char **pszSpeed1, char **pszSpeed2)
+{
+#if MEMORY_CHECK       
+       *pszMem =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       *pszSpeed1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       *pszSpeed2 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+}
+
+/**
+* @function            LibtbmFreeMemory
+* @description         Function to free the memory allocated
+* @parameter           pszMem1, pszMem2, pszMem3, pszMem4 : pointers to allocated memory
+* @return                      NA
+*/
+void LibtbmFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+       if (pszMem4 != NULL)
+       {
+               free(pszMem4);
+               pszMem4 = NULL;
+       }
+}
+
+/**
+* @function            LibtbmGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char *LibtbmGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case TBM_SURFACE_ERROR_NONE:                            szErrorVal = "TBM_SURFACE_ERROR_NONE";                          break;
+       case TBM_SURFACE_ERROR_INVALID_PARAMETER:       szErrorVal = "TBM_SURFACE_ERROR_INVALID_PARAMETER";     break;
+       case TBM_SURFACE_ERROR_INVALID_OPERATION:       szErrorVal = "TBM_SURFACE_ERROR_INVALID_OPERATION";     break;
+       default:                                                                        szErrorVal = "Unknown Error";                                           break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           LibtbmAllocateMemory
+ * @description                allocates memory for speed and memory check buffer
+ * @parameter          pszMem, pszSpeed :pointers to allocated memory
+ * @return                     NA
+ */ 
+void LibtbmAllocateMemory(char **pszMem, char **pszSpeed)
+{
+#if MEMORY_CHECK       
+       *pszMem =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       *pszSpeed =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+}
+
+/**
+* @function            LibtbmCreateSurface
+* @description         Helper function to create tbm surface
+* @parameter           nFormat: The format of the surface
+* @return                      bool
+*/
+bool LibtbmCreateSurface(unsigned int nFormat)
+{
+       g_surface = tbm_surface_create(128,128,nFormat);
+       if ( g_surface != NULL )
+       {
+               #if DEBUG
+                       FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_create passed in LibtbmCreateSurface\\n", __LINE__);
+               #endif
+               return true;
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_create failed in LibtbmCreateSurface, for Format = %s\\n",__LINE__, LibtbmGetFormatType(nFormat));
+               return false;
+       }
+}
+
+/**
+* @function            LibtbmDestroySurface
+* @description         Helper function to destroy tbm surface
+* @parameter           NA
+* @return                      NA
+*/
+void LibtbmDestroySurface()
+{
+       int eRetValue = tbm_surface_destroy(g_surface);
+       if ( TBM_SURFACE_ERROR_NONE == eRetValue )
+       {
+               #if DEBUG
+                       FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_destroy passed in LibtbmDestroySurface\\n", __LINE__);                     
+               #endif
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_destroy failed in LibtbmDestroySurface, error = %s\\n",__LINE__, LibtbmGetError(eRetValue));
+       }
+}
+
+/**
+* @function            LibtbmGetFormatType
+* @description         Maps TBM format enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char *LibtbmGetFormatType(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case TBM_FORMAT_C8:                                     szErrorVal = "TBM_FORMAT_C8";                                   break;
+       case TBM_FORMAT_RGB332:                         szErrorVal = "TBM_FORMAT_RGB332";                               break;
+       case TBM_FORMAT_BGR233:                         szErrorVal = "TBM_FORMAT_BGR233";                               break;
+       case TBM_FORMAT_XRGB4444:                       szErrorVal = "TBM_FORMAT_XRGB4444";                             break;
+       case TBM_FORMAT_XBGR4444:                       szErrorVal = "TBM_FORMAT_XBGR4444";                             break;
+       case TBM_FORMAT_RGBX4444:                       szErrorVal = "TBM_FORMAT_RGBX4444";                             break;
+       case TBM_FORMAT_BGRX4444:                       szErrorVal = "TBM_FORMAT_BGRX4444";                             break;
+       case TBM_FORMAT_ARGB4444:                       szErrorVal = "TBM_FORMAT_ARGB4444";                             break;
+       case TBM_FORMAT_ABGR4444:                       szErrorVal = "TBM_FORMAT_ABGR4444";                             break;
+       case TBM_FORMAT_RGBA4444:                       szErrorVal = "TBM_FORMAT_RGBA4444";                             break;
+       case TBM_FORMAT_BGRA4444:                       szErrorVal = "TBM_FORMAT_BGRA4444";                             break;
+       case TBM_FORMAT_XRGB1555:                       szErrorVal = "TBM_FORMAT_XRGB1555";                             break;
+       case TBM_FORMAT_XBGR1555:                       szErrorVal = "TBM_FORMAT_XBGR1555";                             break;
+       case TBM_FORMAT_RGBX5551:                       szErrorVal = "TBM_FORMAT_RGBX5551";                             break;
+       case TBM_FORMAT_BGRX5551:                       szErrorVal = "TBM_FORMAT_BGRX5551";                             break;
+       case TBM_FORMAT_ARGB1555:                       szErrorVal = "TBM_FORMAT_ARGB1555";                             break;
+       case TBM_FORMAT_ABGR1555:                       szErrorVal = "TBM_FORMAT_ABGR1555";                             break;
+       case TBM_FORMAT_RGBA5551:                       szErrorVal = "TBM_FORMAT_RGBA5551";                             break;
+       case TBM_FORMAT_BGRA5551:                       szErrorVal = "TBM_FORMAT_BGRA5551";                             break;
+       case TBM_FORMAT_RGB565:                         szErrorVal = "TBM_FORMAT_RGB565";                               break;
+       case TBM_FORMAT_BGR565:                         szErrorVal = "TBM_FORMAT_BGR565";                               break;
+       case TBM_FORMAT_RGB888:                         szErrorVal = "TBM_FORMAT_RGB888";                               break;
+       case TBM_FORMAT_BGR888:                         szErrorVal = "TBM_FORMAT_BGR888";                               break;
+       case TBM_FORMAT_XRGB8888:                       szErrorVal = "TBM_FORMAT_XRGB8888";                             break;
+       case TBM_FORMAT_XBGR8888:                       szErrorVal = "TBM_FORMAT_XBGR8888";                             break;
+       case TBM_FORMAT_RGBX8888:                       szErrorVal = "TBM_FORMAT_RGBX8888";                             break;
+       case TBM_FORMAT_BGRX8888:                       szErrorVal = "TBM_FORMAT_BGRX8888";                             break;
+       case TBM_FORMAT_ARGB8888:                       szErrorVal = "TBM_FORMAT_ARGB8888";                             break;
+       case TBM_FORMAT_ABGR8888:                       szErrorVal = "TBM_FORMAT_ABGR8888";                             break;
+       case TBM_FORMAT_RGBA8888:                       szErrorVal = "TBM_FORMAT_RGBA8888";                             break;
+       case TBM_FORMAT_BGRA8888:                       szErrorVal = "TBM_FORMAT_BGRA8888";                             break;
+       case TBM_FORMAT_XRGB2101010:            szErrorVal = "TBM_FORMAT_XRGB2101010";                  break;
+       case TBM_FORMAT_XBGR2101010:            szErrorVal = "TBM_FORMAT_XBGR2101010";                  break;
+       case TBM_FORMAT_RGBX1010102:            szErrorVal = "TBM_FORMAT_RGBX1010102";                  break;
+       case TBM_FORMAT_BGRX1010102:            szErrorVal = "TBM_FORMAT_BGRX1010102";                  break;
+       case TBM_FORMAT_ARGB2101010:            szErrorVal = "TBM_FORMAT_ARGB2101010";                  break;
+       case TBM_FORMAT_ABGR2101010:            szErrorVal = "TBM_FORMAT_ABGR2101010";                  break;
+       case TBM_FORMAT_RGBA1010102:            szErrorVal = "TBM_FORMAT_RGBA1010102";                  break;
+       case TBM_FORMAT_BGRA1010102:            szErrorVal = "TBM_FORMAT_BGRA1010102";                  break;
+       case TBM_FORMAT_YUYV:                           szErrorVal = "TBM_FORMAT_YUYV";                                 break;
+       case TBM_FORMAT_YVYU:                           szErrorVal = "TBM_FORMAT_YVYU";                                 break;
+       case TBM_FORMAT_UYVY:                           szErrorVal = "TBM_FORMAT_UYVY";                                 break;
+       case TBM_FORMAT_VYUY:                           szErrorVal = "TBM_FORMAT_VYUY";                                 break;
+       case TBM_FORMAT_AYUV:                           szErrorVal = "TBM_FORMAT_AYUV";                                 break;
+       case TBM_FORMAT_NV12:                           szErrorVal = "TBM_FORMAT_NV12";                                 break;
+       case TBM_FORMAT_NV21:                           szErrorVal = "TBM_FORMAT_NV21";                                 break;
+       case TBM_FORMAT_NV16:                           szErrorVal = "TBM_FORMAT_NV16";                                 break;
+       case TBM_FORMAT_NV61:                           szErrorVal = "TBM_FORMAT_NV61";                                 break;
+       case TBM_FORMAT_YUV410:                         szErrorVal = "TBM_FORMAT_YUV410";                               break;
+       case TBM_FORMAT_YVU410:                         szErrorVal = "TBM_FORMAT_YVU410";                               break;
+       case TBM_FORMAT_YUV411:                         szErrorVal = "TBM_FORMAT_YUV411";                               break;
+       case TBM_FORMAT_YVU411:                         szErrorVal = "TBM_FORMAT_YVU411";                               break;
+       case TBM_FORMAT_YUV420:                         szErrorVal = "TBM_FORMAT_YUV420";                               break;
+       case TBM_FORMAT_YVU420:                         szErrorVal = "TBM_FORMAT_YVU420";                               break;
+       case TBM_FORMAT_YUV422:                         szErrorVal = "TBM_FORMAT_YUV422";                               break;
+       case TBM_FORMAT_YVU422:                         szErrorVal = "TBM_FORMAT_YVU422";                               break;
+       case TBM_FORMAT_YUV444:                         szErrorVal = "TBM_FORMAT_YUV444";                               break;
+       case TBM_FORMAT_YVU444:                         szErrorVal = "TBM_FORMAT_YVU444";                               break;
+       default:                                                        szErrorVal = "Unknown Format";                                  break;
+       }
+       return szErrorVal;
+}
+/** @} */
\ No newline at end of file
diff --git a/src/itc/tbm/ITs-tbm-common.h b/src/itc/tbm/ITs-tbm-common.h
new file mode 100755 (executable)
index 0000000..3428b27
--- /dev/null
@@ -0,0 +1,113 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_TBM_COMMON_H_
+#define _ITS_TBM_COMMON_H_
+
+#include "assert.h"
+#include <tbm_surface.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/** @addtogroup itc-tbm
+*  @ingroup itc
+*  @{
+*/
+
+#define LOG                                                    100
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000 
+
+FILE *g_fpLog;
+tbm_surface_h g_surface;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\nStarting test : %s\\n",__FUNCTION__);\
+       if ( !g_bLibtbmInit )\
+       {\
+               FPRINTF("\\n[Line : %d][tbm_ITC] Precondition of tbm Initialization failed\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == 0)\
+       {\
+               if (DEBUG)\
+               {\
+                       FPRINTF("\\n[Line : %d][tbm_ITC] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("\\n[Line : %d][tbm_ITC] %s failed, error returned = %s \\n", __LINE__, API, LibtbmGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_LOOP(nRetVal, API, nFailCount) {\
+       if (nRetVal != 0)\
+       {\
+               FPRINTF("\\n[Line : %d][tbm_ITC] %s failed on iteration %d, error returned = %s \\n", __LINE__, API, nLoopCount, LibtbmGetError(nRetVal));\
+               nFailCount++;\
+               continue;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog) {\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d][tbm_ITC] %s_MemoryLeakStatus : %s\\n",__LINE__, #api, memLog);\
+       }\
+}
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog) {\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][tbm_ITC] %s_TimeInMicrosec : %s\\n", __LINE__, #api, speedLog);\
+       }\
+}
+
+void LibtbmGetTimeOfDay();
+void LibtbmExecutionDelay(char* pszAPITime);
+void LibtbmGetMemStatus(char *pszAPIMemory);
+inline void LibtbmGetMemAllocation(void);
+void LibtbmAllocateMemory2(char **pszMem, char **pszSpeed1, char **pszSpeed2);
+void LibtbmFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4);
+char *LibtbmGetError(int nRet);
+void LibtbmAllocateMemory(char **pszMem, char **pszSpeed);
+bool LibtbmCreateSurface(unsigned int nFormat);
+void LibtbmDestroySurface();
+char *LibtbmGetFormatType(int nRet);
+/** @} */
+#endif  //_ITS_TBM_COMMON_H_
diff --git a/src/itc/tbm/ITs-tbm.c b/src/itc/tbm/ITs-tbm.c
new file mode 100755 (executable)
index 0000000..cb296e6
--- /dev/null
@@ -0,0 +1,625 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-tbm-common.h"
+
+/** @addtogroup itc-tbm
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Tbm
+
+struct timeval g_stLibtbmStartTime;
+struct mallinfo g_stLibtbmMemInfo;
+
+//unsigned int nTbmFormatArray[] = {TBM_FORMAT_XRGB8888, TBM_FORMAT_ARGB8888};
+unsigned int *nTbmFormatArray;
+unsigned int g_nTotalFormatCount;
+
+/**
+* @function            ITs_tbm_startup
+* @description         Called before each test, opens pre-defined app
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_tbm_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       
+       int nRet = -1;
+       FPRINTF("\\n[Line : %d][tbm_ITC] Starts\\n",__LINE__);
+       
+       nRet = tbm_surface_query_formats(&nTbmFormatArray, &g_nTotalFormatCount);
+       if(nRet != TBM_SURFACE_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][tbm_ITC] No supported TBM surface format\\n",__LINE__);
+       }
+       
+}
+
+/**
+* @function            ITs_tbm_cleanup
+* @description         Called after each test, terminates the app opened in startup
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_tbm_cleanup(void)
+{
+       free(nTbmFormatArray);
+       g_nTotalFormatCount = 0;
+       FPRINTF("\\n[Line : %d][tbm_ITC] Ends\\n", __LINE__);
+}
+
+/** @addtogroup itc-tbm-testcases
+*  @brief              Integration testcases for module tbm
+*  @ingroup    itc-tbm
+*  @{
+*/
+
+//& purpose: To create and destroy tbm_surface
+//& type: auto  
+/**
+ * @testcase                           ITc_tbm_surface_create_destroy_p
+ * @type                                       auto
+ * @description                                To create and destroy tbm_surface.
+ * @scenario                           Destroy the create tbm_surface\n
+                                                       Create tbm_surface\n
+                                                       Destroy the created tbm_surface\n
+                                                       Create the tbm_surface
+ * @apicovered                         tbm_surface_create, tbm_surface_destroy
+ * @passcase                           When tbm_surface_create and tbm_surface_destroy is successful
+ * @failcase                           If tbm_surface_create or tbm_surface_destroy fails
+ * @precondition                       Destroy the already created tbm_surface
+ * @postcondition                      Create the tbm_surface
+ * 
+ */
+int ITc_tbm_surface_create_destroy_p(void)
+{
+       int nLoopCount = 0, nRet = 0, nTbmFormatCount = 0;
+       char *pszLibtbmCreateSpeedLog = NULL;
+       char *pszLibtbmCreateDestroyMemLog = NULL;
+       char *pszLibtbmDestroySpeedLog = NULL;
+       int nLibtbmCreateFailCount = 0;
+       int nLibtbmDestroyFailCount = 0;
+       tbm_surface_h surface;
+       if(g_nTotalFormatCount == 0)
+       {
+               return 1;
+       }
+#if MEMORY_CHECK       
+       pszLibtbmCreateDestroyMemLog =  calloc(MEMLOG * MAX_COUNT * g_nTotalFormatCount , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszLibtbmCreateSpeedLog =  calloc(TIMELOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+       pszLibtbmDestroySpeedLog =  calloc(TIMELOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+#endif
+       for(nTbmFormatCount = 0; nTbmFormatCount<g_nTotalFormatCount; nTbmFormatCount++)
+       {
+               for(nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+               {
+                       LibtbmGetMemAllocation();
+                       LibtbmGetTimeOfDay();
+                       surface = tbm_surface_create(128,128,nTbmFormatArray[nTbmFormatCount]);
+                       LibtbmExecutionDelay(pszLibtbmCreateSpeedLog);
+                       if(surface == NULL)
+                       {
+                               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_create failed for tbm format value = %s on iteration = %d, error returned =  %d\\n", __LINE__,LibtbmGetFormatType(nTbmFormatArray[nTbmFormatCount]),nTbmFormatCount*MAX_COUNT+nLoopCount, get_last_result());
+                               nLibtbmCreateFailCount ++;
+                               continue;
+                       }
+                       LibtbmGetTimeOfDay();
+                       nRet = tbm_surface_destroy(surface);
+                       LibtbmExecutionDelay(pszLibtbmDestroySpeedLog);
+                       if(nRet != TBM_SURFACE_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_destroy failed on iteration = %d, error returned =  %s\\n",__LINE__, nTbmFormatCount*MAX_COUNT+nLoopCount, LibtbmGetError(nRet));
+                               nLibtbmDestroyFailCount++;
+                       }
+                       LibtbmGetMemStatus(pszLibtbmCreateDestroyMemLog);
+               }
+       }
+       if (nLibtbmCreateFailCount > 0 || nLibtbmDestroyFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_create failed %d times and tbm_surface_destroy failed %d times out of %d times",__LINE__, nLibtbmCreateFailCount, nLibtbmDestroyFailCount, MAX_COUNT*g_nTotalFormatCount);
+               LibtbmFreeMemory(pszLibtbmCreateSpeedLog, pszLibtbmDestroySpeedLog, pszLibtbmCreateDestroyMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tbm_surface_create, pszLibtbmCreateSpeedLog);
+       PRINT_SPEED_LOG(tbm_surface_destroy, pszLibtbmDestroySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tbm_surface_create_destroy, pszLibtbmCreateDestroyMemLog);
+#endif 
+       LibtbmFreeMemory(pszLibtbmCreateSpeedLog, pszLibtbmDestroySpeedLog, pszLibtbmCreateDestroyMemLog, NULL);
+       return 0;
+}
+
+
+//& purpose: map and unmap the tbm_surface according to access option
+//& type: auto  
+/**
+ * @testcase                           ITc_tbm_surface_map_unmap_p
+ * @type                                       auto
+ * @description                                map and unmap the tbm_surface according to access option.
+ * @scenario                           map the tbm_surface according to access option\n
+                                                       unmap the tbm_surface
+ * @apicovered                         tbm_surface_map, tbm_surface_unmap
+ * @passcase                           When tbm_surface_map and tbm_surface_unmap is successful
+ * @failcase                           If tbm_surface_map or tbm_surface_unmap fails
+ * @precondition                       tbm_surface should be created
+ * @postcondition                      tbm_surface should be destroyed
+ * 
+ */
+
+int ITc_tbm_surface_map_unmap_p(void)
+{
+       int nLoopCount = 0, nRet = 0, nTbmFormatCount = 0;
+       char *pszLibtbmMapSpeedLog = NULL;
+       char *pszLibtbmMapUnmapMemLog = NULL;
+       char *pszLibtbmUnmapSpeedLog = NULL;
+       int nLibtbmMapFailCount = 0;
+       int nLibtbmUnmapFailCount = 0;
+       tbm_surface_info_s info;
+       if(g_nTotalFormatCount == 0)
+       {
+               return 1;
+       }
+#if MEMORY_CHECK       
+       pszLibtbmMapUnmapMemLog =  calloc(MEMLOG * MAX_COUNT * g_nTotalFormatCount , sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszLibtbmMapSpeedLog =  calloc(TIMELOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+       pszLibtbmUnmapSpeedLog =  calloc(TIMELOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+#endif
+       for(nTbmFormatCount = 0; nTbmFormatCount<g_nTotalFormatCount; nTbmFormatCount++)
+       {
+               for(nLoopCount = 0;nLoopCount < MAX_COUNT;nLoopCount++)
+               {
+                       if(LibtbmCreateSurface(nTbmFormatArray[nTbmFormatCount]) == false)
+                       {
+                               continue;
+                       }
+                       LibtbmGetMemAllocation();
+                       LibtbmGetTimeOfDay();
+                       nRet = tbm_surface_map(g_surface,TBM_SURF_OPTION_WRITE|TBM_SURF_OPTION_READ, &info);
+                       LibtbmExecutionDelay(pszLibtbmMapSpeedLog);
+                       if(nRet != TBM_SURFACE_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_map failed for tbm format value = %s on iteration = %d, error returned =  %s\\n", __LINE__,LibtbmGetFormatType(nTbmFormatArray[nTbmFormatCount]),nTbmFormatCount*MAX_COUNT + nLoopCount, LibtbmGetError(nRet));
+                               nLibtbmMapFailCount ++;
+                               continue;
+                       }
+                       LibtbmGetTimeOfDay();
+                       nRet = tbm_surface_unmap(g_surface);
+                       LibtbmExecutionDelay(pszLibtbmUnmapSpeedLog);
+                       if(nRet != TBM_SURFACE_ERROR_NONE)
+                       {
+                               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_unmap failed on iteration = %d, error returned =  %s\\n", __LINE__,nTbmFormatCount*MAX_COUNT + nLoopCount, LibtbmGetError(nRet));
+                               nLibtbmUnmapFailCount++;
+                       }
+                       LibtbmGetMemStatus(pszLibtbmMapUnmapMemLog);
+                       LibtbmDestroySurface();
+               }
+       }
+       if (nLibtbmMapFailCount > 0 || nLibtbmUnmapFailCount > 0)
+       {
+               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_map failed %d times and tbm_surface_unmap failed %d times out of %d times", __LINE__, nLibtbmMapFailCount, nLibtbmUnmapFailCount, MAX_COUNT*g_nTotalFormatCount);
+               LibtbmFreeMemory(pszLibtbmMapSpeedLog, pszLibtbmUnmapSpeedLog, pszLibtbmMapUnmapMemLog, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tbm_surface_map, pszLibtbmMapSpeedLog);
+       PRINT_SPEED_LOG(tbm_surface_unmap, pszLibtbmUnmapSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tbm_surface_map_unmap, pszLibtbmMapUnmapMemLog);
+#endif 
+       LibtbmFreeMemory(pszLibtbmMapSpeedLog, pszLibtbmUnmapSpeedLog, pszLibtbmMapUnmapMemLog, NULL);
+       return 0;
+}
+
+
+//& purpose: Get the width of tbm_surface
+//& type: auto  
+/**
+ * @testcase                           ITc_tbm_surface_get_width_p
+ * @type                                       auto
+ * @description                                Get the width of tbm_surface.
+ * @scenario                           get the width of tbm_surface by using tbm_surface_get_width API.
+ * @apicovered                         tbm_surface_get_width
+ * @passcase                           When tbm_surface_get_width is successful
+ * @failcase                           If tbm_surface_get_width fails
+ * @precondition                       create tbm_surface
+ * @postcondition                      tbm_surface should be destroyed
+ * 
+ */
+int ITc_tbm_surface_get_width_p(void)
+{
+    int nLoopCount = 0, nTbmFormatCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       int nWidth = 0;
+       if(g_nTotalFormatCount == 0)
+       {
+               return 1;
+       }
+#if MEMORY_CHECK       
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+#endif
+       for(nTbmFormatCount = 0; nTbmFormatCount<g_nTotalFormatCount; nTbmFormatCount++)
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       if(LibtbmCreateSurface(nTbmFormatArray[nTbmFormatCount]) == false)
+                       {
+                               continue;
+                       }
+                       // Target API
+                       LibtbmGetMemAllocation();
+                       LibtbmGetTimeOfDay();
+                       nWidth = tbm_surface_get_width(g_surface);
+                       LibtbmExecutionDelay(pszAPI1SpeedLog);
+                       LibtbmGetMemStatus(pszMemLog);
+                       
+                       if ( nWidth == TBM_SURFACE_ERROR_INVALID_PARAMETER )
+                       {
+                               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_get_width is unsuccessful for tbm format value = %s on iteration = %d, error returned =  %s\\n",__LINE__, LibtbmGetFormatType(nTbmFormatArray[nTbmFormatCount]), nTbmFormatCount* MAX_COUNT+nLoopCount, LibtbmGetError(nWidth));
+                               nFailCount ++;
+                       }
+                       else
+                       {
+                               #if DEBUG
+                                       FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_get_width is successful with width value = %d\\n",__LINE__, nWidth);
+                               #endif
+                       }
+                       LibtbmDestroySurface();
+               }
+       }
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_get_width failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT*g_nTotalFormatCount);
+               LibtbmFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tbm_surface_get_width, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tbm_surface_get_width, pszMemLog);
+#endif
+
+       LibtbmFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL, NULL);
+       return 0;
+}
+
+
+//& purpose: Get the height of tbm_surface
+//& type: auto  
+/**
+ * @testcase                           ITc_tbm_surface_get_height_p
+ * @type                                       auto
+ * @description                                Get the height of tbm_surface.
+ * @scenario                           get the height of tbm_surface by using tbm_surface_get_height API.
+ * @apicovered                         tbm_surface_get_height
+ * @passcase                           When tbm_surface_get_height is successful
+ * @failcase                           If tbm_surface_get_height fails
+ * @precondition                       create tbm_surface
+ * @postcondition                      tbm_surface should be destroyed
+ * 
+ */
+int ITc_tbm_surface_get_height_p(void)
+{
+    int nLoopCount = 0, nTbmFormatCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       int nHeight = 0;
+       if(g_nTotalFormatCount == 0)
+       {
+               return 1;
+       }
+#if MEMORY_CHECK       
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+#endif
+       for(nTbmFormatCount = 0; nTbmFormatCount<g_nTotalFormatCount; nTbmFormatCount++)
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       if(LibtbmCreateSurface(nTbmFormatArray[nTbmFormatCount]) == false)
+                       {
+                               continue;
+                       }
+                       // Target API
+                       LibtbmGetMemAllocation();
+                       LibtbmGetTimeOfDay();
+                       nHeight = tbm_surface_get_height(g_surface);
+                       LibtbmExecutionDelay(pszAPI1SpeedLog);
+                       LibtbmGetMemStatus(pszMemLog);
+                       
+                       if ( nHeight == TBM_SURFACE_ERROR_INVALID_PARAMETER )
+                       {
+                               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_get_height is unsuccessful for tbm format value = %s on iteration = %d, error returned =  %s\\n",__LINE__, LibtbmGetFormatType(nTbmFormatArray[nTbmFormatCount]), nTbmFormatCount*MAX_COUNT+nLoopCount, LibtbmGetError(nHeight));
+                               nFailCount ++;
+                       }
+                       else
+                       {
+                               #if DEBUG
+                                       FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_get_height is successful with height value = %d\\n", __LINE__, nHeight);
+                               #endif
+                       }
+                       LibtbmDestroySurface();
+               }
+       }
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_get_height failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT*g_nTotalFormatCount);
+               LibtbmFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tbm_surface_get_height, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tbm_surface_get_height, pszMemLog);
+#endif
+
+       LibtbmFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Queries surface format list and number of format supported by the system
+//& type: auto  
+/**
+ * @testcase                           ITc_tbm_surface_query_formats_p
+ * @type                                       auto
+ * @description                                Queries surface format list and number of format supported by the system
+ * @scenario                           Call tbm_surface_query_formats to get formats and number of format.
+ * @apicovered                         tbm_surface_query_formats
+ * @passcase                           When tbm_surface_query_formats is successful
+ * @failcase                           If tbm_surface_query_formats fails
+ * @precondition                       NA
+ * @postcondition                      format must be freed.
+ * 
+ */
+int ITc_tbm_surface_query_formats_p(void)
+{
+    int nRet = 0, nLoopCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       unsigned int *formats;
+       unsigned int format_num;
+       int nCount = 0;
+       
+#if MEMORY_CHECK       
+       pszMemLog = calloc(MEMLOG * MAX_COUNT, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT, sizeof(char));
+#endif
+
+       for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+       {
+               // Target API
+               LibtbmGetMemAllocation();
+               LibtbmGetTimeOfDay();
+               nRet = tbm_surface_query_formats(&formats, &format_num);
+               if(nRet == TBM_SURFACE_ERROR_NONE)
+               {
+                       FPRINTF("\\n[Line : %d][tbm_ITC]Supported formats are : ", __LINE__);
+                       for(nCount = 0; nCount<format_num; nCount++)
+                       {
+                               FPRINTF("\\n%s\\n", LibtbmGetFormatType(formats[nCount]));
+                       }
+               }
+               
+               LibtbmExecutionDelay(pszAPI1SpeedLog);
+               LibtbmGetMemStatus(pszMemLog);
+               
+               if ( nRet != TBM_SURFACE_ERROR_NONE )
+               {
+                       FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_query_formats is unsuccessful on iteration = %d, error returned =  %s\\n",__LINE__, nLoopCount, LibtbmGetError(nRet));
+                       nFailCount ++;
+               }
+       }
+
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_query_formats failed %d time out of %d times\\n", __LINE__, nFailCount, MAX_COUNT);
+               LibtbmFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL, NULL);
+               free(formats);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tbm_surface_query_formats, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tbm_surface_query_formats, pszMemLog);
+#endif
+
+       LibtbmFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL, NULL);
+       free(formats);
+       return 0;
+}
+
+
+//& purpose: Get the information of tbm_surface
+//& type: auto  
+/**
+ * @testcase                           ITc_tbm_surface_get_info_p
+ * @type                                       auto
+ * @description                                Get the information of tbm_surface
+ * @scenario                           Get the tbm_surface info by using tbm_surface_get_info API
+ * @apicovered                         tbm_surface_get_info
+ * @passcase                           When tbm_surface_get_info is successful
+ * @failcase                           If tbm_surface_get_info fails
+ * @precondition                       tbm_surface should be created
+ * @postcondition                      Destroy the tbm_surface
+ * 
+ */
+int ITc_tbm_surface_get_info_p(void)
+{
+    int nRet = 0, nLoopCount = 0, nTbmFormatCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       tbm_surface_info_s info;
+       if(g_nTotalFormatCount == 0)
+       {
+               return 1;
+       }
+#if MEMORY_CHECK       
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+#endif
+       for(nTbmFormatCount = 0; nTbmFormatCount<g_nTotalFormatCount; nTbmFormatCount++)
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       if(LibtbmCreateSurface(nTbmFormatArray[nTbmFormatCount]) == false)
+                       {
+                               continue;
+                       }
+                       // Target API
+                       LibtbmGetMemAllocation();
+                       LibtbmGetTimeOfDay();
+                       nRet = tbm_surface_get_info(g_surface, &info);
+                       LibtbmExecutionDelay(pszAPI1SpeedLog);
+                       LibtbmGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != TBM_SURFACE_ERROR_NONE )
+                       {
+                               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_get_info is unsuccessful for tbm format value = %s on iteration = %d, error returned =  %s\\n",__LINE__,LibtbmGetFormatType(nTbmFormatArray[nTbmFormatCount]), nTbmFormatCount*MAX_COUNT+nLoopCount, LibtbmGetError(nRet));
+                               nFailCount ++;
+                       }
+                       LibtbmDestroySurface();
+               }
+       }
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_get_info failed %d time out of %d times\\n",__LINE__, nFailCount, MAX_COUNT*g_nTotalFormatCount);
+               LibtbmFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tbm_surface_get_info, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tbm_surface_get_info, pszMemLog);
+#endif
+
+       LibtbmFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL, NULL);
+       return 0;
+}
+
+
+//& purpose: Get the format of tbm_surface
+//& type: auto  
+/**
+ * @testcase                           ITc_tbm_surface_get_format_p
+ * @type                                       auto
+ * @description                                Get the format of the tbm_surface
+ * @scenario                           Get the format info by using tbm_surface_get_format API
+ * @apicovered                         tbm_surface_get_format
+ * @passcase                           When tbm_surface_get_format is successful
+ * @failcase                           If tbm_surface_get_format fails
+ * @precondition                       tbm_surface should be created
+ * @postcondition                      Destroy the tbm_surface
+ * 
+ */
+int ITc_tbm_surface_get_format_p(void)
+{
+    int nRet = 0, nLoopCount = 0, nTbmFormatCount = 0;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       int nFailCount = 0;
+       if(g_nTotalFormatCount == 0)
+       {
+               return 1;
+       }
+#if MEMORY_CHECK       
+       pszMemLog = calloc(MEMLOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog = calloc(TIMELOG * MAX_COUNT * g_nTotalFormatCount, sizeof(char));
+#endif
+       for(nTbmFormatCount = 0; nTbmFormatCount<g_nTotalFormatCount; nTbmFormatCount++)
+       {
+               for ( nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++ )
+               {
+                       if(LibtbmCreateSurface(nTbmFormatArray[nTbmFormatCount]) == false)
+                       {
+                               continue;
+                       }
+                       // Target API
+                       LibtbmGetMemAllocation();
+                       LibtbmGetTimeOfDay();
+                       nRet = tbm_surface_get_format(g_surface);
+                       LibtbmExecutionDelay(pszAPI1SpeedLog);
+                       LibtbmGetMemStatus(pszMemLog);
+                       
+                       if ( nRet != nTbmFormatArray[nTbmFormatCount])
+                       {
+                               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_get_format is unsuccessful for tbm format value = %s on iteration = %d, error returned =  %s\\n",__LINE__, LibtbmGetFormatType(nTbmFormatArray[nTbmFormatCount]), nTbmFormatCount*MAX_COUNT+nLoopCount, LibtbmGetError(nRet));
+                               nFailCount ++;
+                       }
+                       LibtbmDestroySurface();
+               }
+       }
+       if ( nFailCount > 0 )
+       {
+               FPRINTF("\\n[Line : %d][tbm_ITC] tbm_surface_get_format failed %d time out of %d times\\n",__LINE__, nFailCount, MAX_COUNT*g_nTotalFormatCount);
+               LibtbmFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL, NULL);
+               return 1;
+       }
+       
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tbm_surface_get_format, pszAPI1SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tbm_surface_get_format, pszMemLog);
+#endif
+
+       LibtbmFreeMemory(pszAPI1SpeedLog,pszMemLog, NULL, NULL);
+       return 0;
+}
+/** @} */ 
+/** @} */ 
\ No newline at end of file
diff --git a/src/itc/tbm/tct-tbm-native.c b/src/itc/tbm/tct-tbm-native.c
new file mode 100755 (executable)
index 0000000..8b3ed37
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-tbm-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/tbm/tct-tbm-native.h b/src/itc/tbm/tct-tbm-native.h
new file mode 100755 (executable)
index 0000000..9f441c9
--- /dev/null
@@ -0,0 +1,43 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_TBM_NATIVE_H__
+#define __TCT_TBM_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_tbm_startup(void);
+extern void ITs_tbm_cleanup(void);
+
+extern int ITc_tbm_surface_create_destroy_p(void);
+extern int ITc_tbm_surface_map_unmap_p(void);
+extern int ITc_tbm_surface_get_width_p(void);
+extern int ITc_tbm_surface_get_height_p(void);
+extern int ITc_tbm_surface_query_formats_p(void);
+extern int ITc_tbm_surface_get_info_p(void);
+extern int ITc_tbm_surface_get_format_p(void);
+
+testcase tc_array[] = {
+    {"ITc_tbm_surface_create_destroy_p", ITc_tbm_surface_create_destroy_p, ITs_tbm_startup, ITs_tbm_cleanup},
+    {"ITc_tbm_surface_map_unmap_p", ITc_tbm_surface_map_unmap_p, ITs_tbm_startup, ITs_tbm_cleanup},
+    {"ITc_tbm_surface_get_width_p", ITc_tbm_surface_get_width_p, ITs_tbm_startup, ITs_tbm_cleanup},
+    {"ITc_tbm_surface_get_height_p", ITc_tbm_surface_get_height_p, ITs_tbm_startup, ITs_tbm_cleanup},
+    {"ITc_tbm_surface_query_formats_p", ITc_tbm_surface_query_formats_p, ITs_tbm_startup, ITs_tbm_cleanup},
+    {"ITc_tbm_surface_get_info_p", ITc_tbm_surface_get_info_p, ITs_tbm_startup, ITs_tbm_cleanup},
+    {"ITc_tbm_surface_get_format_p", ITc_tbm_surface_get_format_p, ITs_tbm_startup, ITs_tbm_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_TBM_NATIVE_H__
diff --git a/src/itc/telephony/CMakeLists.txt b/src/itc/telephony/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..fdb976f
--- /dev/null
@@ -0,0 +1,37 @@
+SET(PKG_NAME "telephony")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-telephony")
+SET(TC_SOURCES
+       ITs-telephony-common.c
+       ITs-telephony.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       tapi
+       glib-2.0
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/telephony/ITs-telephony-common.c b/src/itc/telephony/ITs-telephony-common.c
new file mode 100755 (executable)
index 0000000..dd05108
--- /dev/null
@@ -0,0 +1,350 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-telephony-common.h"
+
+/** @addtogroup itc-telephony
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stTelephonyStartTime;
+extern struct mallinfo g_stTelephonyMemInfo;
+
+/**
+ * @function           TelephonyCheckSystemInfoFeatureSupported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool TelephonyCheckSystemInfoFeatureSupported(char* pszKey)
+{
+       if(NULL == pszKey)
+       {
+               FPRINTF("\\n[Line : %d][telephony_ITC] Null key value passed to function : TelephonyCheckSystemInfoFeatureSupported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if(nRetVal != SYSTEM_INFO_ERROR_NONE)
+       {
+               FPRINTF("\\n[Line : %d][telephony_ITC] system_info_get_platform_bool returned (error = %s) for (key = %s)",__LINE__, TelephonySystemInfoGetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if(false == bValue)
+       {
+               FPRINTF("\\n[Line : %d][telephony_ITC] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][telephony_ITC] system_info_get_platform_bool returned Supported status feature for (key = %s)",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+/**
+ * @function           TelephonySystemInfoGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* TelephonySystemInfoGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER  : szErrorVal = "Error - Cannot find key in model config file " ; break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR  : szErrorVal = "Error - An input/output error occurred when read value from model config file " ; break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY   : szErrorVal = "Error - Out of memory  " ; break;
+               default : szErrorVal = "Unknown error" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            TelephonyGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      State string
+*/
+char *TelephonyGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+               case TELEPHONY_ERROR_OUT_OF_MEMORY : szErrorVal = "TELEPHONY_ERROR_OUT_OF_MEMORY " ; break;
+               case TELEPHONY_ERROR_INVALID_PARAMETER : szErrorVal = "TELEPHONY_ERROR_INVALID_PARAMETER" ; break;
+               case TELEPHONY_ERROR_PERMISSION_DENIED : szErrorVal = "TELEPHONY_ERROR_PERMISSION_DENIED" ; break;
+               case TELEPHONY_ERROR_OPERATION_FAILED : szErrorVal = "TELEPHONY_ERROR_OPERATION_FAILED" ; break;
+               case TELEPHONY_ERROR_SIM_NOT_AVAILABLE : szErrorVal = "TELEPHONY_ERROR_SIM_NOT_AVAILABLE" ; break;
+               default : szErrorVal = "Unknown State" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            TelephonyGetServiceState
+* @description         Maps enums values to string values
+* @parameter           eRet : service state
+* @return                      State string
+*/
+char *TelephonyGetServiceState(telephony_network_service_state_e eRet)
+{
+       char *szErrorVal = NULL;
+       switch ( eRet )
+       {
+               case TELEPHONY_NETWORK_SERVICE_STATE_OUT_OF_SERVICE : szErrorVal = "TELEPHONY_NETWORK_SERVICE_STATE_OUT_OF_SERVICE" ; break;
+               case TELEPHONY_NETWORK_SERVICE_STATE_EMERGENCY_ONLY : szErrorVal = "TELEPHONY_NETWORK_SERVICE_STATE_EMERGENCY_ONLY" ; break;
+               default : szErrorVal = "Unknown State" ; break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            TelephonyGetCallState
+* @description         Maps enums values to string values
+* @parameter           eRet : service state
+* @return                      State string
+*/
+char *TelephonyGetCallState(telephony_call_state_e eRet)
+{
+       char *szErrorVal = NULL;
+       switch ( eRet )
+       {
+       case TELEPHONY_CALL_STATE_IDLE:                         szErrorVal = "TELEPHONY_CALL_STATE_IDLE";                               break;
+       case TELEPHONY_CALL_STATE_CONNECTING:           szErrorVal = "TELEPHONY_CALL_STATE_CONNECTING";                 break;
+       case TELEPHONY_CALL_STATE_CONNECTED:            szErrorVal = "TELEPHONY_CALL_STATE_CONNECTED";                  break;
+       default:                                                                        szErrorVal = "Unknown State";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            TelephonyGetSimState
+* @description         Maps enums values to string values
+* @parameter           eRet : sim state
+* @return                      State string
+*/
+char *TelephonyGetSimState(telephony_sim_state_e eRet)
+{
+       char *szErrorVal = NULL;
+       switch ( eRet )
+       {
+       case TELEPHONY_SIM_STATE_UNAVAILABLE:                   szErrorVal = "TELEPHONY_SIM_STATE_UNAVAILABLE";                 break;
+       case TELEPHONY_SIM_STATE_LOCKED:                                szErrorVal = "TELEPHONY_SIM_STATE_LOCKED";                              break;
+       case TELEPHONY_SIM_STATE_AVAILABLE:                             szErrorVal = "TELEPHONY_SIM_STATE_AVAILABLE";                   break;
+       case TELEPHONY_SIM_STATE_UNKNOWN:                               szErrorVal = "TELEPHONY_SIM_STATE_UNKNOWN";                             break;
+       default:                                                                                szErrorVal = "Unknown State";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            TelephonyGetRSSIValue
+* @description         Maps enums values to string values
+* @parameter           eRet : rssi state
+* @return                      string to rssi strength
+*/
+char *TelephonyGetRSSIValue(telephony_network_rssi_e eRet)
+{
+       char *szErrorVal = NULL;
+       switch ( eRet )
+       {
+       case TELEPHONY_NETWORK_RSSI_0:                          szErrorVal = "TELEPHONY_NETWORK_RSSI_0";                                break;
+       case TELEPHONY_NETWORK_RSSI_1:                          szErrorVal = "TELEPHONY_NETWORK_RSSI_1";                                break;
+       case TELEPHONY_NETWORK_RSSI_2:                          szErrorVal = "TELEPHONY_NETWORK_RSSI_2";                                break;
+       case TELEPHONY_NETWORK_RSSI_3:                          szErrorVal = "TELEPHONY_NETWORK_RSSI_3";                                break;
+       case TELEPHONY_NETWORK_RSSI_4:                          szErrorVal = "TELEPHONY_NETWORK_RSSI_4";                                break;
+       case TELEPHONY_NETWORK_RSSI_5:                          szErrorVal = "TELEPHONY_NETWORK_RSSI_5";                                break;
+       case TELEPHONY_NETWORK_RSSI_6:                          szErrorVal = "TELEPHONY_NETWORK_RSSI_6";                                break;
+       default:                                                                        szErrorVal = "Unknown Value";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            TelephonyGetNetworkType
+* @description         Maps enums values to string values
+* @parameter           eRet : network service type
+* @return                      string to network service type
+*/
+char *TelephonyGetNetworkType(telephony_network_type_e eRet)
+{
+       char *szErrorVal = NULL;
+       switch ( eRet )
+       {
+       case TELEPHONY_NETWORK_TYPE_UNKNOWN:                    szErrorVal = "TELEPHONY_NETWORK_TYPE_UNKNOWN";                  break;
+       case TELEPHONY_NETWORK_TYPE_GSM:                                szErrorVal = "TELEPHONY_NETWORK_TYPE_GSM";                              break;
+       case TELEPHONY_NETWORK_TYPE_GPRS:                               szErrorVal = "TELEPHONY_NETWORK_TYPE_GPRS";                             break;
+       case TELEPHONY_NETWORK_TYPE_EDGE:                               szErrorVal = "TELEPHONY_NETWORK_TYPE_EDGE";                             break;
+       case TELEPHONY_NETWORK_TYPE_UMTS:                               szErrorVal = "TELEPHONY_NETWORK_TYPE_UMTS";                             break;
+       case TELEPHONY_NETWORK_TYPE_HSDPA:                              szErrorVal = "TELEPHONY_NETWORK_TYPE_HSDPA";                    break;
+       case TELEPHONY_NETWORK_TYPE_LTE:                                szErrorVal = "TELEPHONY_NETWORK_TYPE_LTE";                              break;
+       default:                                                                                szErrorVal = "Unknown Type";                                                    break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function                    TelephonyGetMemStatus
+* @description         Returns the Memory Allocation state
+* @parameter           pszAPIMemory :String pointer containing the difference of total number of bytes for Current and previous Memory Allocation.
+* @return                      NA
+*/
+void TelephonyGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+
+               if(stMemInfo.uordblks > g_stTelephonyMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stTelephonyMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stTelephonyMemInfo.uordblks - stMemInfo.uordblks);
+               }
+
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+#endif
+}
+
+/**
+* @function                    TelephonyGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @parameter           NA
+* @return                      NA
+*/
+inline void TelephonyGetMemAllocation(void)
+{
+#if MEMORY_CHECK
+       g_stTelephonyMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           TelephonyExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter          pszAPITime :String pointer containing the time difference
+ * @return                     NA
+ *
+ */
+void TelephonyExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       if( pszAPITime != NULL )
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);
+               ulldifference = ((stEnd.tv_sec - g_stTelephonyStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stTelephonyStartTime.tv_usec;
+
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+#endif
+}
+
+/**
+ * @function           TelephonyGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stTelephonyStartTime
+ * @parameter          NA
+ * @return                     NA
+ */
+void TelephonyGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stTelephonyStartTime, NULL);
+#endif
+}
+
+
+/**
+ * @function           TelephonyFreeMemory
+ * @description                Function to free the memory allocated
+ * @parameter          pszMem1, pszMem2, pszMem3 : pointers to allocated memory
+ * @return                     NA
+ */
+void TelephonyFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+}
+
+/**
+ * @function           TelephonyAllocateMemory
+ * @description                allocates memory for speed and memory check buffer
+ * @parameter          pszMem, pszSpeed : pointers to allocated memory
+ * @return                     NA
+ */
+void TelephonyAllocateMemory(char **pszMem, char **pszSpeed)
+{
+#if MEMORY_CHECK
+       *pszMem =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       *pszSpeed =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+}
+
+/**
+ * @function           TelephonyAllocateMemory2
+ * @description                allocates memory for speed and memory check buffer for two API check scenario
+ * @parameter          pszMem, pszSpeed1, pszSpeed2 : pointers to allocated memory
+ * @return                     NA
+ */
+void TelephonyAllocateMemory2(char **pszMem, char **pszSpeed1, char **pszSpeed2)
+{
+#if MEMORY_CHECK
+       *pszMem =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       *pszSpeed1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       *pszSpeed2 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+}
+/** @} */
\ No newline at end of file
diff --git a/src/itc/telephony/ITs-telephony-common.h b/src/itc/telephony/ITs-telephony-common.h
new file mode 100755 (executable)
index 0000000..7f8474c
--- /dev/null
@@ -0,0 +1,151 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_TELEPHONY_COMMON_H_
+#define _ITS_TELEPHONY_COMMON_H_
+
+#include "assert.h"
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <telephony.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <system_info.h>
+
+/** @addtogroup itc-telephony
+*  @ingroup itc
+*  @{
+*/
+
+#define LOG                                                    100
+#define TIMELOG                                                10
+#define MEMLOG                                         10
+#define MICROSECONDS_PER_SECOND                1000000
+#define TIME_DELAY                                     20
+#define USLEEPDELAY                                    500000
+#define GMAINTIMEOUT                           2000
+
+#define TELEPHONY_FEATURE                              "http://tizen.org/feature/network.telephony"
+
+FILE *g_fpLog;
+
+//Add helper function declarations here
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d] Starting test : %s\\n",__LINE__, __FUNCTION__);\
+       if ( g_bTelephonySkipExecutionWithPass == true )\
+       {\
+               FPRINTF("[Line : %d] [telephony_ITC] telephony is not supported on the device, telephony_init returned TIZEN_ERROR_NOT_SUPPORTED, also feature http://tizen.org/feature/network.telephony value returned from model-config.xml is false \\n", __LINE__);\
+               return 0;\
+       }\
+       else if ( g_bTelephonySkipExecutionWithFail == true )\
+       {\
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_init did not return TIZEN_ERROR_NOT_SUPPORTED, while  feature http://tizen.org/feature/network.telephony value returned from model-config.xml is false \\n", __LINE__);\
+               return 1;\
+       }\
+       if ( !g_bTelephonyInit )\
+       {\
+               FPRINTF("[Line : %d] [telephony_ITC] Precondition of telephony failed\\n", __LINE__);\
+               return 1;\
+       }\
+       if(g_stTelephonyHandleList.handle[0] == NULL)\
+       {\
+               FPRINTF("[Line : %d] [telephony_ITC] telephony handle list is empty \\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT(eRetVal, API) {\
+       if (eRetVal == TELEPHONY_ERROR_NONE)\
+       {\
+               if (DEBUG)\
+               {\
+                       FPRINTF("[Line : %d] [telephony_ITC] %s passed\\n", __LINE__, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d] [telephony_ITC] %s failed, error returned = %s \\n", __LINE__, API, TelephonyGetError(eRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_LOOP(eRetVal, API, nFailCount) {\
+       if (eRetVal != TELEPHONY_ERROR_NONE)\
+       {\
+               FPRINTF("[Line : %d] [telephony_ITC] %s failed on iteration %d, error returned = %s \\n", __LINE__, API, nLoopCount, TelephonyGetError(eRetVal));\
+               ++nFailCount;\
+               continue;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog) {\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d] [telephony_ITC] %s_MemoryLeakStatus : %s\\n", __LINE__, #api, memLog);\
+       }\
+}
+
+
+#define PRINT_SPEED_LOG(api, speedLog) {\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d] [telephony_ITC] %s_TimeInMicrosec : %s\\n", __LINE__, #api, speedLog);\
+       }\
+}
+
+#define IS_FEATURE_SUPPORTED(feature_name, featureFlag)\
+       {\
+               if (!(TelephonyCheckSystemInfoFeatureSupported(feature_name)))\
+               {\
+                       featureFlag = false;\
+                       FPRINTF("\\n[Line : %d][telephony_ITC] %s feature is not supported \\n", __LINE__, feature_name);\
+               }\
+               else\
+               {\
+                       FPRINTF("\\n[Line : %d][telephony_ITC] %s feature is supported \\n", __LINE__, feature_name);\
+                       featureFlag = true;\
+               }\
+       }
+       
+void TelephonyFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3);
+void TelephonyAllocateMemory2(char **pszMem, char **pszSpeed1, char **pszSpeed2);
+void TelephonyAllocateMemory(char **pszMem, char **pszSpeed);
+char *TelephonyGetError(int nRet);
+void TelephonyGetMemAllocation(void);
+void TelephonyExecutionDelay(char* pszAPITime);
+void TelephonyGetTimeOfDay(void);
+void TelephonyGetMemStatus(char *pszAPIMemory);
+char *TelephonyGetServiceState(telephony_network_service_state_e eRet);
+char *TelephonyGetSimState(telephony_sim_state_e eRet);
+char *TelephonyGetCallState(telephony_call_state_e eRet);
+char *TelephonyGetRSSIValue(telephony_network_rssi_e eRet);
+char *TelephonyGetNetworkType(telephony_network_type_e eRet);
+bool TelephonyCheckSystemInfoFeatureSupported(char* pszKey);
+char* TelephonySystemInfoGetError(int nRet);
+/** @} */
+#endif  //_ITS_TELEPHONY_COMMON_H_
diff --git a/src/itc/telephony/ITs-telephony.c b/src/itc/telephony/ITs-telephony.c
new file mode 100755 (executable)
index 0000000..145792a
--- /dev/null
@@ -0,0 +1,1542 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-telephony-common.h"
+
+/** @addtogroup itc-telephony
+*  @ingroup itc
+*  @{
+*/
+//& set: Telephony
+
+struct timeval g_stTelephonyStartTime;
+struct mallinfo g_stTelephonyMemInfo;
+bool g_bTelephonyInit;
+telephony_handle_list_s g_stTelephonyHandleList = {0};
+bool g_bTelephonyIssupportedFeature = false;
+bool g_bTelephonySkipExecutionWithPass = false;
+bool g_bTelephonySkipExecutionWithFail = false;
+
+/**
+* @function            ITs_telephony_startup
+* @description         Called before each test, Acquire the list of available handles to use telephony API.
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_telephony_startup(void)
+{
+       g_bTelephonyInit = false;
+       g_bTelephonySkipExecutionWithPass = false;
+       g_bTelephonySkipExecutionWithFail = false;
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       IS_FEATURE_SUPPORTED(TELEPHONY_FEATURE, g_bTelephonyIssupportedFeature);
+
+       int nRet = telephony_init(&g_stTelephonyHandleList);
+
+       if ( (g_bTelephonyIssupportedFeature == false) && (nRet == TIZEN_ERROR_NOT_SUPPORTED) )
+       {
+               g_bTelephonySkipExecutionWithPass = true;
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_init returned TIZEN_ERROR_NOT_SUPPORTED, also feature http://tizen.org/feature/network.telephony value returned from model-config.xml is false \\n", __LINE__);
+               return;
+       }
+       else if ( (g_bTelephonyIssupportedFeature == false) && (nRet != TIZEN_ERROR_NOT_SUPPORTED))
+       {
+               g_bTelephonySkipExecutionWithFail = true;
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_init did not return TIZEN_ERROR_NOT_SUPPORTED, although feature http://tizen.org/feature/network.telephony value returned from model-config.xml is false \\n", __LINE__);
+               return;
+       }
+
+       else if ( nRet != TELEPHONY_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_init failed, error returned = %s \\n", __LINE__, TelephonyGetError(nRet));
+               g_bTelephonyInit = false;
+               return;
+       }
+       if ( g_stTelephonyHandleList.count <= 0 )
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_init failed, error returned = list returned is empty \\n", __LINE__);
+               g_bTelephonyInit = false;
+               return;
+       }
+#if DEBUG
+       FPRINTF("[Line : %d] [telephony_ITC] telephony_init successful in startup\\n", __LINE__);
+#endif
+       g_bTelephonyInit = true;
+}
+
+/**
+* @function            ITs_telephony_cleanup
+* @description         Called after each test, Deinitialize telephony handle list.
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_telephony_cleanup(void)
+{
+       if ( g_bTelephonyInit == true )
+       {
+               int nRet = telephony_deinit(&g_stTelephonyHandleList);
+               if (nRet != TELEPHONY_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_init failed, error returned = %s \\n", __LINE__, TelephonyGetError(nRet));
+                       return;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_deinit successful in cleanup\\n", __LINE__);
+#endif
+       }
+}
+
+/** @addtogroup itc-telephony-testcases
+*  @brief              Integration testcases for module telephony
+*  @ingroup    itc-telephony
+*  @{
+*/
+
+//& purpose: To acquire the list of available handles and Deinitialize telephony handle list
+//& type: auto
+/**
+* @testcase                    ITc_telephony_init_deinit_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To acquire the list of available handles and Deinitialize telephony handle list
+* @scenario                            acquire the list of available handles and verify output\n
+*                                              Deinitialize telephony handle list and verify output
+* @apicovered                  telephony_init, telephony_deinit
+* @passcase                            When telephony_init, telephony_deinit return success
+* @failcase                            When telephony_init or telephony_deinit return failure
+* @precondition                        telephony service should be initialized
+* @postcondition               NA
+*/
+int ITc_telephony_init_deinit_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRetVal = 0;
+       char *pszTelephonyMemLog = NULL;
+       char *pszTelephonyInitSpeedLog = NULL;
+       char *pszTelephonyDeinitSpeedLog = NULL;
+       int nInitFailCount = 0, nDeinitFailCount = 0;
+       telephony_handle_list_s stTelephonyHandleListLocal = {0};
+
+       TelephonyAllocateMemory2(&pszTelephonyMemLog, &pszTelephonyInitSpeedLog, &pszTelephonyDeinitSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               nRetVal = telephony_init(&stTelephonyHandleListLocal);
+               TelephonyExecutionDelay(pszTelephonyInitSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "telephony_init", nInitFailCount);
+               if (stTelephonyHandleListLocal.count <= 0)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_init failed on iteration %d, error returned = list returned is empty \\n", __LINE__, nLoopCount);
+                       ++nInitFailCount;
+                       continue;
+               }
+
+               TelephonyGetTimeOfDay();
+               nRetVal = telephony_deinit(&stTelephonyHandleListLocal);
+               TelephonyExecutionDelay(pszTelephonyDeinitSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "telephony_deinit", nDeinitFailCount);
+               TelephonyGetMemStatus(pszTelephonyMemLog);
+       }
+
+       if(nInitFailCount || nDeinitFailCount)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_init failed %d times, telephony_deinit failed %d times out of %d times\\n", __LINE__, nInitFailCount, nInitFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszTelephonyMemLog, pszTelephonyDeinitSpeedLog, pszTelephonyInitSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("telephony_init", pszTelephonyInitSpeedLog);
+       PRINT_SPEED_LOG("telephony_deinit", pszTelephonyDeinitSpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("telephony_init_deinit", pszTelephonyMemLog);
+#endif
+       TelephonyFreeMemory(pszTelephonyMemLog, pszTelephonyDeinitSpeedLog, pszTelephonyInitSpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the cell ID
+/**
+* @testcase                    ITc_telephony_network_get_cell_id_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the cell ID
+* @scenario                            get the cell ID
+* @apicovered                  telephony_network_get_cell_id
+* @passcase                            if telephony_network_get_cell_id returns success and cell id returned is not zero
+* @failcase                            if telephony_network_get_cell_id returns failure or cell id returned is zero
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE.
+* @postcondition               NA
+*/
+int ITc_telephony_network_get_cell_id_p(void)
+{
+       START_TEST;
+       int nLoopCount, nGetValue = 0, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       telephony_network_service_state_e eNetworkServiceState;
+
+       nRet = telephony_network_get_service_state(g_stTelephonyHandleList.handle[0], &eNetworkServiceState);
+       PRINT_RESULT(nRet, "telephony_network_get_service_state");
+       if(eNetworkServiceState != TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_service_state returned state = %s \\n", __LINE__, TelephonyGetServiceState(eNetworkServiceState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               nGetValue = 0;
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_network_get_cell_id(g_stTelephonyHandleList.handle[0], &nGetValue);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_network_get_cell_id", nGetFailCount);
+               if (nGetValue == 0)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_cell_id failed on iteration %d, error returned = cell id returned is zero \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [telephony_ITC] cell id returned = %d\\n", __LINE__,nGetValue);
+#endif
+               }
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_cell_id failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_network_get_cell_id, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_network_get_cell_id, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the LAC (Location Area Code) of current network
+/**
+* @testcase                    ITc_telephony_network_get_lac_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the LAC (Location Area Code) of current network
+* @scenario                            get the LAC (Location Area Code) of current network
+* @apicovered                  telephony_network_get_lac
+* @passcase                            if telephony_network_get_lac returns success and lac returned is not zero
+* @failcase                            if telephony_network_get_lac returns failure or lac returned is zero
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE.
+* @postcondition               NA
+*/
+int ITc_telephony_network_get_lac_p(void)
+{
+       START_TEST;
+       int nLoopCount, nGetValue = 0, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       telephony_network_service_state_e eNetworkServiceState;
+
+       nRet = telephony_network_get_service_state(g_stTelephonyHandleList.handle[0], &eNetworkServiceState);
+       PRINT_RESULT(nRet, "telephony_network_get_service_state");
+       if(eNetworkServiceState != TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_service_state returned state = %s \\n", __LINE__, TelephonyGetServiceState(eNetworkServiceState));
+               return 1;
+       }
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               nGetValue = 0;
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_network_get_lac(g_stTelephonyHandleList.handle[0], &nGetValue);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_network_get_lac", nGetFailCount);
+               if (nGetValue == 0)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_lac failed on iteration %d, error returned = lac returned is zero \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [telephony_ITC] lac returned = %d\\n", __LINE__,nGetValue);
+#endif
+               }
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_lac failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_network_get_lac, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_network_get_lac, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the RSSI (Received Signal Strength Indicator)
+/**
+* @testcase                    ITc_telephony_network_get_rssi_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the RSSI (Received Signal Strength Indicator)
+* @scenario                            get the RSSI (Received Signal Strength Indicator)
+* @apicovered                  telephony_network_get_rssi
+* @passcase                            if telephony_network_get_rssi returns success and lac returned is not zero
+* @failcase                            if telephony_network_get_rssi returns failure or lac returned is zero
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE.
+* @postcondition               NA
+*/
+int ITc_telephony_network_get_rssi_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       telephony_network_service_state_e eNetworkServiceState;
+       telephony_network_rssi_e eNetworkRSSI;
+
+       nRet = telephony_network_get_service_state(g_stTelephonyHandleList.handle[0], &eNetworkServiceState);
+       PRINT_RESULT(nRet, "telephony_network_get_service_state");
+       if(eNetworkServiceState != TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_service_state returned state = %s \\n", __LINE__, TelephonyGetServiceState(eNetworkServiceState));
+               return 1;
+       }
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_network_get_rssi(g_stTelephonyHandleList.handle[0], &eNetworkRSSI);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_network_get_rssi", nGetFailCount);
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] RSSI value returned = %s\\n", __LINE__,TelephonyGetRSSIValue(eNetworkRSSI));
+#endif
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_rssi failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_network_get_rssi, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_network_get_rssi, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the roaming status
+/**
+* @testcase                    ITc_telephony_network_get_roaming_status_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the roaming status
+* @scenario                            get the roaming status
+* @apicovered                  telephony_network_get_roaming_status
+* @passcase                            if telephony_network_get_roaming_status returns success
+* @failcase                            if telephony_network_get_roaming_status returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE.
+* @postcondition               NA
+*/
+int ITc_telephony_network_get_roaming_status_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       bool bIsRoaming = false;
+       telephony_network_service_state_e eNetworkServiceState;
+
+       nRet = telephony_network_get_service_state(g_stTelephonyHandleList.handle[0], &eNetworkServiceState);
+       PRINT_RESULT(nRet, "telephony_network_get_service_state");
+       if(eNetworkServiceState != TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_service_state returned state = %s \\n", __LINE__, TelephonyGetServiceState(eNetworkServiceState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_network_get_roaming_status(g_stTelephonyHandleList.handle[0], &bIsRoaming);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_network_get_roaming_status", nGetFailCount);
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] Network type state is = %s\\n", __LINE__,bIsRoaming == true ? "Roaming" : "Not Roaming");
+#endif
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_roaming_status failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_network_get_roaming_status, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_network_get_roaming_status, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the MCC (Mobile Country Code) of the current network
+/**
+* @testcase                    ITc_telephony_network_get_mcc_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the MCC (Mobile Country Code) of the current network
+* @scenario                            get the MCC (Mobile Country Code) of the current network
+* @apicovered                  telephony_network_get_mcc
+* @passcase                            if telephony_network_get_mcc returns success and mcc returned is not null
+* @failcase                            if telephony_network_get_mcc returns failure or mcc returned is null
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE.
+* @postcondition               NA
+*/
+int ITc_telephony_network_get_mcc_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszGetValue = NULL;
+       telephony_network_service_state_e eNetworkServiceState;
+
+       nRet = telephony_network_get_service_state(g_stTelephonyHandleList.handle[0], &eNetworkServiceState);
+       PRINT_RESULT(nRet, "telephony_network_get_service_state");
+       if(eNetworkServiceState != TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_service_state returned state = %s \\n", __LINE__, TelephonyGetServiceState(eNetworkServiceState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_network_get_mcc(g_stTelephonyHandleList.handle[0], &pszGetValue);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_network_get_mcc", nGetFailCount);
+               if (pszGetValue == NULL)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_mcc failed on iteration %d, error returned = mcc returned is NULL \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+               else
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [telephony_ITC] mcc returned = %s\\n", __LINE__,pszGetValue);
+#endif
+               }
+               free(pszGetValue);
+               pszGetValue = NULL;
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_mcc failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_network_get_mcc, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_network_get_mcc, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the MNC (Mobile Network Code) of the current network
+/**
+* @testcase                    ITc_telephony_network_get_mnc_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the MNC (Mobile Network Code) of the current network
+* @scenario                            get the MNC (Mobile Network Code) of the current network
+* @apicovered                  telephony_network_get_mnc
+* @passcase                            if telephony_network_get_mnc returns success and mnc returned is not null
+* @failcase                            if telephony_network_get_mnc returns failure or mnc returned is null
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE.
+* @postcondition               NA
+*/
+int ITc_telephony_network_get_mnc_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszGetValue = NULL;
+       telephony_network_service_state_e eNetworkServiceState;
+
+       nRet = telephony_network_get_service_state(g_stTelephonyHandleList.handle[0], &eNetworkServiceState);
+       PRINT_RESULT(nRet, "telephony_network_get_service_state");
+       if(eNetworkServiceState != TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_service_state returned state = %s \\n", __LINE__, TelephonyGetServiceState(eNetworkServiceState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_network_get_mnc(g_stTelephonyHandleList.handle[0], &pszGetValue);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_network_get_mnc", nGetFailCount);
+               if (pszGetValue == NULL)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_mnc failed on iteration %d, error returned = mnc returned is NULL \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] mnc returned = %s\\n", __LINE__,pszGetValue);
+#endif
+               free(pszGetValue);
+               pszGetValue = NULL;
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_mnc failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_network_get_mnc, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_network_get_mnc, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the current registered network
+/**
+* @testcase                    ITc_telephony_network_get_network_name_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the current registered network
+* @scenario                            get the current registered network
+* @apicovered                  telephony_network_get_network_name
+* @passcase                            if telephony_network_get_network_name returns success and current registered network name returned is not null
+* @failcase                            if telephony_network_get_network_name returns failure or current registered network name returned is null
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE.
+* @postcondition               NA
+*/
+int ITc_telephony_network_get_network_name_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszGetValue = NULL;
+       telephony_network_service_state_e eNetworkServiceState;
+
+       nRet = telephony_network_get_service_state(g_stTelephonyHandleList.handle[0], &eNetworkServiceState);
+       PRINT_RESULT(nRet, "telephony_network_get_service_state");
+       if(eNetworkServiceState != TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_service_state returned state = %s \\n", __LINE__, TelephonyGetServiceState(eNetworkServiceState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_network_get_network_name(g_stTelephonyHandleList.handle[0], &pszGetValue);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_network_get_network_name", nGetFailCount);
+               if (pszGetValue == NULL)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_network_name failed on iteration %d, error returned = mnc returned is NULL \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] network name returned = %s\\n", __LINE__,pszGetValue);
+#endif
+               free(pszGetValue);
+               pszGetValue = NULL;
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_network_name failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_network_get_network_name, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_network_get_network_name, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the service type of registered network
+/**
+* @testcase                    ITc_telephony_network_get_type_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the service type of registered network
+* @scenario                            get the service type of registered network
+* @apicovered                  telephony_network_get_type
+* @passcase                            if telephony_network_get_type returns success
+* @failcase                            if telephony_network_get_type returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE.
+* @postcondition               NA
+*/
+int ITc_telephony_network_get_type_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       telephony_network_type_e eNetworkInfoType;
+       telephony_network_service_state_e eNetworkServiceState;
+
+       nRet = telephony_network_get_service_state(g_stTelephonyHandleList.handle[0], &eNetworkServiceState);
+       PRINT_RESULT(nRet, "telephony_network_get_service_state");
+       if(eNetworkServiceState != TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_service_state returned state = %s \\n", __LINE__, TelephonyGetServiceState(eNetworkServiceState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_network_get_type(g_stTelephonyHandleList.handle[0], &eNetworkInfoType);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_network_get_type", nGetFailCount);
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] service type of registered network returned = %s\\n", __LINE__,TelephonyGetNetworkType(eNetworkInfoType));
+#endif
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_type failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_network_get_type, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_network_get_type, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the current network state of the telephony service.
+/**
+* @testcase                    ITc_telephony_network_get_service_state_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the current network state of the telephony service
+* @scenario                            get the current network state of the telephony service
+* @apicovered                  telephony_network_get_service_state
+* @passcase                            if telephony_network_get_service_state returns success
+* @failcase                            if telephony_network_get_service_state returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE.
+* @postcondition               NA
+*/
+int ITc_telephony_network_get_service_state_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       telephony_network_service_state_e eNetworkServiceState;
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_network_get_service_state(g_stTelephonyHandleList.handle[0], &eNetworkServiceState);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_network_get_service_state", nGetFailCount);
+               if(eNetworkServiceState != TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_service_state failed on iteration %d, returned state = %s \\n", __LINE__, nLoopCount, TelephonyGetServiceState(eNetworkServiceState));
+                       ++nGetFailCount;
+                       continue;
+               }
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_network_get_service_state failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_network_get_service_state, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_network_get_service_state, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the Integrated Circuit Card IDentification (ICC-ID).
+/**
+* @testcase                    ITc_telephony_sim_get_icc_id_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the Integrated Circuit Card IDentification (ICC-ID)
+* @scenario                            get the Integrated Circuit Card IDentification (ICC-ID)
+* @apicovered                  telephony_sim_get_icc_id
+* @passcase                            if telephony_sim_get_icc_id returns success
+* @failcase                            if telephony_sim_get_icc_id returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE and SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
+* @postcondition               NA
+*/
+int ITc_telephony_sim_get_icc_id_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszGetValue = NULL;
+       telephony_sim_state_e eSimState;
+
+       nRet = telephony_sim_get_state(g_stTelephonyHandleList.handle[0], &eSimState);
+       PRINT_RESULT(nRet, "telephony_sim_get_state");
+       if(eSimState != TELEPHONY_SIM_STATE_AVAILABLE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_state returned state = %s \\n", __LINE__, TelephonyGetSimState(eSimState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_sim_get_icc_id(g_stTelephonyHandleList.handle[0], &pszGetValue);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_sim_get_icc_id", nGetFailCount);
+               if (pszGetValue == NULL)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_icc_id failed on iteration %d, error returned = SIM ICC-ID returned is NULL \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] SIM ICC-ID returned = %s\\n", __LINE__,pszGetValue);
+#endif
+               free(pszGetValue);
+               pszGetValue = NULL;
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_icc_id failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_sim_get_icc_id, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_sim_get_icc_id, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the SIM Operator (MCC + MNC)
+/**
+* @testcase                    ITc_telephony_sim_get_operator_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the SIM Operator (MCC + MNC)
+* @scenario                            get the SIM Operator (MCC + MNC)
+* @apicovered                  telephony_sim_get_operator
+* @passcase                            if telephony_sim_get_operator returns success
+* @failcase                            if telephony_sim_get_operator returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE and SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
+* @postcondition               NA
+*/
+int ITc_telephony_sim_get_operator_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszGetValue = NULL;
+       telephony_sim_state_e eSimState;
+
+       nRet = telephony_sim_get_state(g_stTelephonyHandleList.handle[0], &eSimState);
+       PRINT_RESULT(nRet, "telephony_sim_get_state");
+       if(eSimState != TELEPHONY_SIM_STATE_AVAILABLE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_state returned state = %s \\n", __LINE__, TelephonyGetSimState(eSimState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_sim_get_operator(g_stTelephonyHandleList.handle[0], &pszGetValue);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_sim_get_operator", nGetFailCount);
+               if (pszGetValue == NULL)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_operator failed on iteration %d, error returned = SIM Operator returned is NULL \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] SIM Operator returned = %s\\n", __LINE__,pszGetValue);
+#endif
+               free(pszGetValue);
+               pszGetValue = NULL;
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_operator failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_sim_get_operator, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_sim_get_operator, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get Mobile Subscription Identification Number (MSIN) of SIM provider
+/**
+* @testcase                    ITc_telephony_sim_get_msin_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the Mobile Subscription Identification Number (MSIN) of SIM provider
+* @scenario                            get the Mobile Subscription Identification Number (MSIN) of SIM provider
+* @apicovered                  telephony_sim_get_msin
+* @passcase                            if telephony_sim_get_msin returns success
+* @failcase                            if telephony_sim_get_msin returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE and SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
+* @postcondition               NA
+*/
+int ITc_telephony_sim_get_msin_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszGetValue = NULL;
+       telephony_sim_state_e eSimState;
+
+       nRet = telephony_sim_get_state(g_stTelephonyHandleList.handle[0], &eSimState);
+       PRINT_RESULT(nRet, "telephony_sim_get_state");
+       if(eSimState != TELEPHONY_SIM_STATE_AVAILABLE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_state returned state = %s \\n", __LINE__, TelephonyGetSimState(eSimState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_sim_get_msin(g_stTelephonyHandleList.handle[0], &pszGetValue);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_sim_get_msin", nGetFailCount);
+               if (pszGetValue == NULL)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_msin failed on iteration %d, error returned = MSIN returned is NULL \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] MSIN returned = %s\\n", __LINE__,pszGetValue);
+#endif
+               free(pszGetValue);
+               pszGetValue = NULL;
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_msin failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_sim_get_msin, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_sim_get_msin, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the Service Provider Name (SPN) of SIM card.
+/**
+* @testcase                    ITc_telephony_sim_get_spn_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the Service Provider Name (SPN) of SIM card.
+* @scenario                            get the Service Provider Name (SPN) of SIM card.
+* @apicovered                  telephony_sim_get_spn
+* @passcase                            if telephony_sim_get_spn returns success
+* @failcase                            if telephony_sim_get_spn returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE and SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
+* @postcondition               NA
+*/
+int ITc_telephony_sim_get_spn_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszGetValue = NULL;
+       telephony_sim_state_e eSimState;
+
+       nRet = telephony_sim_get_state(g_stTelephonyHandleList.handle[0], &eSimState);
+       PRINT_RESULT(nRet, "telephony_sim_get_state");
+       if(eSimState != TELEPHONY_SIM_STATE_AVAILABLE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_state returned state = %s \\n", __LINE__, TelephonyGetSimState(eSimState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_sim_get_spn(g_stTelephonyHandleList.handle[0], &pszGetValue);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_sim_get_spn", nGetFailCount);
+               if (pszGetValue == NULL)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] SPN is NULL \\n", __LINE__, nLoopCount);
+                       continue;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] Sim has SPN Info \\n", __LINE__, nLoopCount);
+               }
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] SPN returned = %s\\n", __LINE__,pszGetValue);
+#endif
+               free(pszGetValue);
+               pszGetValue = NULL;
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_spn failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_sim_get_spn, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_sim_get_spn, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the SIM card subscriber number
+/**
+* @testcase                    ITc_telephony_sim_get_subscriber_number_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the SIM card subscriber number
+* @scenario                            get the SIM card subscriber number
+* @apicovered                  telephony_sim_get_subscriber_number
+* @passcase                            if telephony_sim_get_subscriber_number returns success
+* @failcase                            if telephony_sim_get_subscriber_number returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE and SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
+* @postcondition               NA
+*/
+int ITc_telephony_sim_get_subscriber_number_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszGetValue = NULL;
+       telephony_sim_state_e eSimState;
+
+       nRet = telephony_sim_get_state(g_stTelephonyHandleList.handle[0], &eSimState);
+       PRINT_RESULT(nRet, "telephony_sim_get_state");
+       if(eSimState != TELEPHONY_SIM_STATE_AVAILABLE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_state returned state = %s \\n", __LINE__, TelephonyGetSimState(eSimState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_sim_get_subscriber_number(g_stTelephonyHandleList.handle[0], &pszGetValue);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_sim_get_subscriber_number", nGetFailCount);
+               if (pszGetValue != NULL)
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [telephony_ITC] subscriber number returned = %s\\n", __LINE__,pszGetValue);
+#endif
+                       free(pszGetValue);
+                       pszGetValue = NULL;
+               }
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_subscriber_number failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_sim_get_subscriber_number, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_sim_get_subscriber_number, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+       return 0;
+}
+
+
+//& type: auto
+//& purpose: check if current SIM card is different from previous SIM card or not
+/**
+* @testcase                    ITc_telephony_sim_is_changed_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to check if current SIM card is different from previous SIM card or not
+* @scenario                            check if current SIM card is different from previous SIM card or not
+* @apicovered                  telephony_sim_is_changed
+* @passcase                            if telephony_sim_is_changed returns success
+* @failcase                            if telephony_sim_is_changed returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE and SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
+* @postcondition               NA
+*/
+int ITc_telephony_sim_is_changed_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       bool bIsChanged = false;
+       telephony_sim_state_e eSimState;
+
+       nRet = telephony_sim_get_state(g_stTelephonyHandleList.handle[0], &eSimState);
+       PRINT_RESULT(nRet, "telephony_sim_get_state");
+       if(eSimState != TELEPHONY_SIM_STATE_AVAILABLE)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_state returned state = %s \\n", __LINE__, TelephonyGetSimState(eSimState));
+               return 1;
+       }
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_sim_is_changed(g_stTelephonyHandleList.handle[0], &bIsChanged);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_sim_is_changed", nGetFailCount);
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] Network type state is = %s\\n", __LINE__,bIsChanged == true ? "Changed" : "Not Changed");
+#endif
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_is_changed failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_sim_is_changed, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_sim_is_changed, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the state of SIM.
+/**
+* @testcase                    ITc_telephony_sim_get_state_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the state of SIM.
+* @scenario                            get the state of SIM.
+* @apicovered                  telephony_sim_get_state
+* @passcase                            if telephony_sim_get_state returns success
+* @failcase                            if telephony_sim_get_state returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE and SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
+* @postcondition               NA
+*/
+int ITc_telephony_sim_get_state_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       telephony_sim_state_e eSimState;
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_sim_get_state(g_stTelephonyHandleList.handle[0], &eSimState);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_sim_get_state", nGetFailCount);
+               if(eSimState != TELEPHONY_SIM_STATE_AVAILABLE)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_state returned state = %s \\n", __LINE__, TelephonyGetSimState(eSimState));
+                       ++nGetFailCount;
+                       continue;
+               }
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_sim_get_state failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_sim_get_state, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_sim_get_state, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+///& type: auto
+//& purpose: Get the voice call state of telephony service
+/**
+* @testcase                    ITc_telephony_call_get_voice_call_state_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the voice call state of telephony service
+* @scenario                            get the voice call state of telephony service
+* @apicovered                  telephony_call_get_voice_call_state
+* @passcase                            if telephony_call_get_voice_call_state returns success
+* @failcase                            if telephony_call_get_voice_call_state returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE.
+* @postcondition               NA
+*/
+int ITc_telephony_call_get_voice_call_state_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       telephony_call_state_e eCallState;
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_call_get_voice_call_state(g_stTelephonyHandleList.handle[0], &eCallState);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_call_get_voice_call_state", nGetFailCount);
+               if ((eCallState < TELEPHONY_CALL_STATE_IDLE) || (eCallState > TELEPHONY_CALL_STATE_CONNECTED))
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_call_get_voice_call_state failed on iteration %d, call state returned = %s\\n", __LINE__,nLoopCount, TelephonyGetCallState(eCallState));
+                       ++nGetFailCount;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] call state is = %s\\n", __LINE__,TelephonyGetCallState(eCallState));
+#endif
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_call_get_voice_call_state failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_call_get_voice_call_state, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_call_get_voice_call_state, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the video call state of telephony service
+/**
+* @testcase                    ITc_telephony_call_get_video_call_state_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the video call state of telephony service
+* @scenario                            get the video call state of telephony service
+* @apicovered                  telephony_call_get_video_call_state
+* @passcase                            if telephony_call_get_video_call_state returns success
+* @failcase                            if telephony_call_get_video_call_state returns failure
+* @precondition                        working SIM card must be present in device, network service state of SIM must be TELEPHONY_NETWORK_SERVICE_STATE_IN_SERVICE.
+* @postcondition               NA
+*/
+int ITc_telephony_call_get_video_call_state_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       telephony_call_state_e eCallState;
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_call_get_video_call_state(g_stTelephonyHandleList.handle[0], &eCallState);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_call_get_video_call_state", nGetFailCount);
+               if ((eCallState < TELEPHONY_CALL_STATE_IDLE) || (eCallState > TELEPHONY_CALL_STATE_CONNECTED))
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_call_get_video_call_state failed on iteration %d, video call state returned = %s\\n", __LINE__,nLoopCount, TelephonyGetCallState(eCallState));
+                       ++nGetFailCount;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] video call state is = %s\\n", __LINE__,TelephonyGetCallState(eCallState));
+#endif
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_call_get_video_call_state failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_call_get_video_call_state, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_call_get_video_call_state, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: To set and unset a callback function to be invoked when the telephony state changes.
+//& type: auto
+/**
+* @testcase                    ITc_telephony_set_unset_noti_cb_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to set and unset a callback function to be invoked when the telephony state changes.
+* @scenario                            set a callback function to be invoked when the telephony state changes\n
+*                                              unset the callback function
+* @apicovered                  telephony_set_noti_cb, telephony_unset_noti_cb
+* @passcase                            When telephony_set_noti_cb, telephony_unset_noti_cb return success
+* @failcase                            When telephony_set_noti_cb or telephony_unset_noti_cb return failure
+* @precondition                        telephony service should be initialized
+* @postcondition               NA
+*/
+int ITc_telephony_set_unset_noti_cb_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRetVal = 0;
+       char *pszTelephonyMemLog = NULL;
+       char *pszTelephonySetSpeedLog = NULL;
+       char *pszTelephonyUnSetSpeedLog = NULL;
+       int nSetFailCount = 0, nUnsetFailCount = 0;
+
+       TelephonyAllocateMemory2(&pszTelephonyMemLog, &pszTelephonySetSpeedLog, &pszTelephonyUnSetSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               nRetVal = telephony_set_noti_cb(g_stTelephonyHandleList.handle[0], TELEPHONY_NOTI_VOICE_CALL_STATE, NULL, NULL);
+               TelephonyExecutionDelay(pszTelephonySetSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "telephony_set_noti_cb", nSetFailCount);
+
+               TelephonyGetTimeOfDay();
+               nRetVal = telephony_unset_noti_cb(g_stTelephonyHandleList.handle[0], TELEPHONY_NOTI_VOICE_CALL_STATE);
+               TelephonyExecutionDelay(pszTelephonyUnSetSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "telephony_unset_noti_cb", nUnsetFailCount);
+               TelephonyGetMemStatus(pszTelephonyMemLog);
+       }
+
+       if(nUnsetFailCount || nSetFailCount)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_set_noti_cb failed %d times telephony_unset_noti_cb failed %d times out of %d times\\n", __LINE__, nSetFailCount, nUnsetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszTelephonyMemLog, pszTelephonyUnSetSpeedLog, pszTelephonySetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("telephony_set_noti_cb", pszTelephonySetSpeedLog);
+       PRINT_SPEED_LOG("telephony_unset_noti_cb", pszTelephonyUnSetSpeedLog);
+
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("telephony_set_unset_noti_cb", pszTelephonyMemLog);
+#endif
+       TelephonyFreeMemory(pszTelephonyMemLog, pszTelephonyUnSetSpeedLog, pszTelephonySetSpeedLog);
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get the IMEI (International Mobile Station Equipment Identity) of a mobile phone
+/**
+* @testcase                    ITc_telephony_modem_get_imei_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 to get the IMEI (International Mobile Station Equipment Identity) of a mobile phone
+* @scenario                            get the IMEI (International Mobile Station Equipment Identity) of a mobile phone
+* @apicovered                  telephony_modem_get_imei
+* @passcase                            if telephony_modem_get_imei returns success and IMEI number is not NULL
+* @failcase                            if telephony_modem_get_imei returns failure or IMEI number is NULL
+* @precondition                        working SIM card must be present in device
+* @postcondition               NA
+*/
+int ITc_telephony_modem_get_imei_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRet = 0;
+       char *pszGetMemLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       int nGetFailCount = 0;
+       char *pszGetValue = NULL;
+
+       TelephonyAllocateMemory(&pszGetMemLog, &pszGetSpeedLog);
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TelephonyGetMemAllocation();
+               TelephonyGetTimeOfDay();
+               // Target API
+               nRet = telephony_modem_get_imei(g_stTelephonyHandleList.handle[0], &pszGetValue);
+               TelephonyExecutionDelay(pszGetSpeedLog);
+               PRINT_RESULT_LOOP(nRet, "telephony_modem_get_imei", nGetFailCount);
+               if (pszGetValue == NULL)
+               {
+                       FPRINTF("[Line : %d] [telephony_ITC] telephony_modem_get_imei failed on iteration %d, error returned = IMEI returned is NULL \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d] [telephony_ITC] IMEI returned = %s\\n", __LINE__,pszGetValue);
+#endif
+               free(pszGetValue);
+               pszGetValue = NULL;
+               TelephonyGetMemStatus(pszGetMemLog);
+       }
+
+       if (nGetFailCount > 0)
+       {
+               FPRINTF("[Line : %d] [telephony_ITC] telephony_modem_get_imei failed %d times out of %d times \\n", __LINE__, nGetFailCount, MAX_COUNT);
+               TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(telephony_modem_get_imei, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(telephony_modem_get_imei, pszGetMemLog);
+#endif
+       TelephonyFreeMemory(pszGetMemLog, pszGetSpeedLog, pszGetValue);
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/telephony/tct-telephony-native.c b/src/itc/telephony/tct-telephony-native.c
new file mode 100755 (executable)
index 0000000..c66ac46
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-telephony-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/telephony/tct-telephony-native.h b/src/itc/telephony/tct-telephony-native.h
new file mode 100755 (executable)
index 0000000..7d84702
--- /dev/null
@@ -0,0 +1,71 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_TELEPHONY_NATIVE_H__
+#define __TCT_TELEPHONY_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_telephony_startup(void);
+extern void ITs_telephony_cleanup(void);
+
+extern int ITc_telephony_init_deinit_p(void);
+extern int ITc_telephony_network_get_cell_id_p(void);
+extern int ITc_telephony_network_get_lac_p(void);
+extern int ITc_telephony_network_get_rssi_p(void);
+extern int ITc_telephony_network_get_roaming_status_p(void);
+extern int ITc_telephony_network_get_mcc_p(void);
+extern int ITc_telephony_network_get_mnc_p(void);
+extern int ITc_telephony_network_get_network_name_p(void);
+extern int ITc_telephony_network_get_type_p(void);
+extern int ITc_telephony_network_get_service_state_p(void);
+extern int ITc_telephony_sim_get_icc_id_p(void);
+extern int ITc_telephony_sim_get_operator_p(void);
+extern int ITc_telephony_sim_get_msin_p(void);
+extern int ITc_telephony_sim_get_spn_p(void);
+extern int ITc_telephony_sim_get_subscriber_number_p(void);
+extern int ITc_telephony_sim_is_changed_p(void);
+extern int ITc_telephony_sim_get_state_p(void);
+extern int ITc_telephony_call_get_voice_call_state_p(void);
+extern int ITc_telephony_call_get_video_call_state_p(void);
+extern int ITc_telephony_set_unset_noti_cb_p(void);
+extern int ITc_telephony_modem_get_imei_p(void);
+
+testcase tc_array[] = {
+    {"ITc_telephony_init_deinit_p", ITc_telephony_init_deinit_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_network_get_cell_id_p", ITc_telephony_network_get_cell_id_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_network_get_lac_p", ITc_telephony_network_get_lac_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_network_get_rssi_p", ITc_telephony_network_get_rssi_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_network_get_roaming_status_p", ITc_telephony_network_get_roaming_status_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_network_get_mcc_p", ITc_telephony_network_get_mcc_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_network_get_mnc_p", ITc_telephony_network_get_mnc_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_network_get_network_name_p", ITc_telephony_network_get_network_name_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_network_get_type_p", ITc_telephony_network_get_type_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_network_get_service_state_p", ITc_telephony_network_get_service_state_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_sim_get_icc_id_p", ITc_telephony_sim_get_icc_id_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_sim_get_operator_p", ITc_telephony_sim_get_operator_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_sim_get_msin_p", ITc_telephony_sim_get_msin_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_sim_get_spn_p", ITc_telephony_sim_get_spn_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_sim_get_subscriber_number_p", ITc_telephony_sim_get_subscriber_number_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_sim_is_changed_p", ITc_telephony_sim_is_changed_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_sim_get_state_p", ITc_telephony_sim_get_state_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_call_get_voice_call_state_p", ITc_telephony_call_get_voice_call_state_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_call_get_video_call_state_p", ITc_telephony_call_get_video_call_state_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_set_unset_noti_cb_p", ITc_telephony_set_unset_noti_cb_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {"ITc_telephony_modem_get_imei_p", ITc_telephony_modem_get_imei_p, ITs_telephony_startup, ITs_telephony_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_TELEPHONY_NATIVE_H__
diff --git a/src/itc/tone-player/CMakeLists.txt b/src/itc/tone-player/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..dfe9ebb
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "tone-player")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-tone-player")
+SET(TC_SOURCES
+       ITs-tone-player-common.c
+       ITs-tone-player.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/tone-player/ITs-tone-player-common.c b/src/itc/tone-player/ITs-tone-player-common.c
new file mode 100755 (executable)
index 0000000..5c569fd
--- /dev/null
@@ -0,0 +1,310 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-tone-player-common.h"
+
+/** @addtogroup itc-tone-player
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stTonePlayerStartTime;
+extern struct mallinfo g_stTonePlayerMemInfo;
+/**
+* @function            TonePlayerGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* TonePlayerGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case TONE_PLAYER_ERROR_NONE:                            szErrorVal = "TONE_PLAYER_ERROR_NONE";                                  break; 
+       case TONE_PLAYER_ERROR_INVALID_PARAMETER:       szErrorVal = "TONE_PLAYER_ERROR_INVALID_PARAMETER";             break; 
+       case TONE_PLAYER_ERROR_INVALID_OPERATION:       szErrorVal = "TONE_PLAYER_ERROR_INVALID_OPERATION";             break; 
+       default:                                                                        szErrorVal = "Unknown Error";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            ToneType
+* @description         Maps tone type enums 
+* @parameter           nRet : tone type returned
+* @return                      tone type string
+*/
+char* ToneType(tone_type_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case TONE_TYPE_DTMF_0:                                                          szErrorVal = "TONE_TYPE_DTMF_0";                                                break;
+       case TONE_TYPE_DTMF_1:                                                          szErrorVal = "TONE_TYPE_DTMF_1";                                                break;
+       case TONE_TYPE_DTMF_2:                                                          szErrorVal = "TONE_TYPE_DTMF_2";                                                break;
+       case TONE_TYPE_DTMF_3:                                                          szErrorVal = "TONE_TYPE_DTMF_3";                                                break;
+       case TONE_TYPE_DTMF_4:                                                          szErrorVal = "TONE_TYPE_DTMF_4";                                                break;
+       case TONE_TYPE_DTMF_5:                                                          szErrorVal = "TONE_TYPE_DTMF_5";                                                break;
+       case TONE_TYPE_DTMF_6:                                                          szErrorVal = "TONE_TYPE_DTMF_6";                                                break;
+       case TONE_TYPE_DTMF_7:                                                          szErrorVal = "TONE_TYPE_DTMF_7";                                                break;
+       case TONE_TYPE_DTMF_8:                                                          szErrorVal = "TONE_TYPE_DTMF_8";                                                break;
+       case TONE_TYPE_DTMF_9:                                                          szErrorVal = "TONE_TYPE_DTMF_9";                                                break;
+       case TONE_TYPE_DTMF_S:                                                          szErrorVal = "TONE_TYPE_DTMF_S";                                                break;
+       case TONE_TYPE_DTMF_P:                                                          szErrorVal = "TONE_TYPE_DTMF_P";                                                break;
+       case TONE_TYPE_DTMF_A:                                                          szErrorVal = "TONE_TYPE_DTMF_A";                                                break;
+       case TONE_TYPE_DTMF_B:                                                          szErrorVal = "TONE_TYPE_DTMF_B";                                                break;
+       case TONE_TYPE_DTMF_C:                                                          szErrorVal = "TONE_TYPE_DTMF_C";                                                break;
+       case TONE_TYPE_DTMF_D:                                                          szErrorVal = "TONE_TYPE_DTMF_D";                                                break;
+       case TONE_TYPE_SUP_DIAL:                                                        szErrorVal = "TONE_TYPE_SUP_DIAL";                                              break;
+       case TONE_TYPE_ANSI_DIAL:                                                       szErrorVal = "TONE_TYPE_ANSI_DIAL";                                             break;
+       case TONE_TYPE_JAPAN_DIAL:                                                      szErrorVal = "TONE_TYPE_JAPAN_DIAL";                                    break;
+       case TONE_TYPE_SUP_BUSY:                                                        szErrorVal = "TONE_TYPE_SUP_BUSY";                                              break;
+       case TONE_TYPE_ANSI_BUSY:                                                       szErrorVal = "TONE_TYPE_ANSI_BUSY";                                             break;
+       case TONE_TYPE_JAPAN_BUSY:                                                      szErrorVal = "TONE_TYPE_JAPAN_BUSY";                                    break;
+       case TONE_TYPE_SUP_CONGESTION:                                          szErrorVal = "TONE_TYPE_SUP_CONGESTION";                                break;
+       case TONE_TYPE_ANSI_CONGESTION:                                         szErrorVal = "TONE_TYPE_ANSI_CONGESTION";                               break;
+       case TONE_TYPE_SUP_RADIO_ACK:                                           szErrorVal = "TONE_TYPE_SUP_RADIO_ACK";                                 break;
+       case TONE_TYPE_JAPAN_RADIO_ACK:                                         szErrorVal = "TONE_TYPE_JAPAN_RADIO_ACK";                               break;
+       case TONE_TYPE_SUP_RADIO_NOTAVAIL:                                      szErrorVal = "TONE_TYPE_SUP_RADIO_NOTAVAIL";                    break;
+       case TONE_TYPE_SUP_ERROR:                                                       szErrorVal = "TONE_TYPE_SUP_ERROR";                                             break;
+       case TONE_TYPE_SUP_CALL_WAITING:                                        szErrorVal = "TONE_TYPE_SUP_CALL_WAITING";                              break;
+       case TONE_TYPE_ANSI_CALL_WAITING:                                       szErrorVal = "TONE_TYPE_ANSI_CALL_WAITING";                             break;
+       case TONE_TYPE_SUP_RINGTONE:                                            szErrorVal = "TONE_TYPE_SUP_RINGTONE";                                  break;
+       case TONE_TYPE_ANSI_RINGTONE:                                           szErrorVal = "TONE_TYPE_ANSI_RINGTONE";                                 break;
+       case TONE_TYPE_PROP_BEEP:                                                       szErrorVal = "TONE_TYPE_PROP_BEEP";                                             break;
+       case TONE_TYPE_PROP_ACK:                                                        szErrorVal = "TONE_TYPE_PROP_ACK";                                              break;
+       case TONE_TYPE_PROP_NACK:                                                       szErrorVal = "TONE_TYPE_PROP_NACK";                                             break;
+       case TONE_TYPE_PROP_PROMPT:                                                     szErrorVal = "TONE_TYPE_PROP_PROMPT";                                   break;
+       case TONE_TYPE_PROP_BEEP2:                                                      szErrorVal = "TONE_TYPE_PROP_BEEP2";                                    break;
+       case TONE_TYPE_SUP_INTERCEPT:                                           szErrorVal = "TONE_TYPE_SUP_INTERCEPT";                                 break;
+       case TONE_TYPE_SUP_INTERCEPT_ABBREV:                            szErrorVal = "TONE_TYPE_SUP_INTERCEPT_ABBREV";                  break;
+       case TONE_TYPE_SUP_CONGESTION_ABBREV:                           szErrorVal = "TONE_TYPE_SUP_CONGESTION_ABBREV";                 break;
+       case TONE_TYPE_SUP_CONFIRM:                                                     szErrorVal = "TONE_TYPE_SUP_CONFIRM";                                   break;
+       case TONE_TYPE_SUP_PIP:                                                         szErrorVal = "TONE_TYPE_SUP_PIP";                                               break;
+       case TONE_TYPE_CDMA_DIAL_TONE_LITE:                                     szErrorVal = "TONE_TYPE_CDMA_DIAL_TONE_LITE";                   break;
+       case TONE_TYPE_CDMA_NETWORK_USA_RINGBACK:                       szErrorVal = "TONE_TYPE_CDMA_NETWORK_USA_RINGBACK";             break;
+       case TONE_TYPE_CDMA_INTERCEPT:                                          szErrorVal = "TONE_TYPE_CDMA_INTERCEPT";                                break;
+       case TONE_TYPE_CDMA_ABBR_INTERCEPT:                                     szErrorVal = "TONE_TYPE_CDMA_ABBR_INTERCEPT";                   break;
+       case TONE_TYPE_CDMA_REORDER:                                            szErrorVal = "TONE_TYPE_CDMA_REORDER";                                  break;
+       case TONE_TYPE_CDMA_ABBR_REORDER:                                       szErrorVal = "TONE_TYPE_CDMA_ABBR_REORDER";                             break;
+       case TONE_TYPE_CDMA_NETWORK_BUSY:                                       szErrorVal = "TONE_TYPE_CDMA_NETWORK_BUSY";                             break;
+       case TONE_TYPE_CDMA_CONFIRM:                                            szErrorVal = "TONE_TYPE_CDMA_CONFIRM";                                  break;
+       case TONE_TYPE_CDMA_ANSWER:                                                     szErrorVal = "TONE_TYPE_CDMA_ANSWER";                                   break;
+       case TONE_TYPE_CDMA_NETWORK_CALLWAITING:                        szErrorVal = "TONE_TYPE_CDMA_NETWORK_CALLWAITING";              break;
+       case TONE_TYPE_CDMA_PIP:                                                        szErrorVal = "TONE_TYPE_CDMA_PIP";                                              break;
+       case TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_NORMAL:            szErrorVal = "TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_NORMAL";  break;
+       case TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP:        szErrorVal = "TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP";      break;
+       case TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_SP_PRI:            szErrorVal = "TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_SP_PRI";  break;
+       case TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT3:                      szErrorVal = "TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT3";    break;
+       case TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PING_RING:         szErrorVal = "TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PING_RING";       break;
+       case TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT5:                      szErrorVal = "TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT5";    break;
+       case TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT6:                      szErrorVal = "TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT6";    break;
+       case TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT7:                      szErrorVal = "TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT7";    break;
+       case TONE_TYPE_CDMA_HIGH_L:                                                     szErrorVal = "TONE_TYPE_CDMA_HIGH_L";                                   break;
+       case TONE_TYPE_CDMA_MED_L:                                                      szErrorVal = "TONE_TYPE_CDMA_MED_L";                                    break;
+       case TONE_TYPE_CDMA_LOW_L:                                                      szErrorVal = "TONE_TYPE_CDMA_LOW_L";                                    break;
+       case TONE_TYPE_CDMA_HIGH_SS:                                            szErrorVal = "TONE_TYPE_CDMA_HIGH_SS";                                  break;
+       case TONE_TYPE_CDMA_MED_SS:                                                     szErrorVal = "TONE_TYPE_CDMA_MED_SS";                                   break;
+       case TONE_TYPE_CDMA_LOW_SS:                                                     szErrorVal = "TONE_TYPE_CDMA_LOW_SS";                                   break;
+       case TONE_TYPE_CDMA_HIGH_SSL:                                           szErrorVal = "TONE_TYPE_CDMA_HIGH_SSL";                                 break;
+       case TONE_TYPE_CDMA_MED_SSL:                                            szErrorVal = "TONE_TYPE_CDMA_MED_SSL";                                  break;
+       case TONE_TYPE_CDMA_LOW_SSL:                                            szErrorVal = "TONE_TYPE_CDMA_LOW_SSL";                                  break;
+       case TONE_TYPE_CDMA_HIGH_SS_2:                                          szErrorVal = "TONE_TYPE_CDMA_HIGH_SS_2";                                break;
+       case TONE_TYPE_CDMA_MED_SS_2:                                           szErrorVal = "TONE_TYPE_CDMA_MED_SS_2";                                 break;
+       case TONE_TYPE_CDMA_LOW_SS_2:                                           szErrorVal = "TONE_TYPE_CDMA_LOW_SS_2";                                 break;
+       case TONE_TYPE_CDMA_HIGH_SLS:                                           szErrorVal = "TONE_TYPE_CDMA_HIGH_SLS";                                 break;
+       case TONE_TYPE_CDMA_MED_SLS:                                            szErrorVal = "TONE_TYPE_CDMA_MED_SLS";                                  break;
+       case TONE_TYPE_CDMA_LOW_SLS:                                            szErrorVal = "TONE_TYPE_CDMA_LOW_SLS";                                  break;
+       case TONE_TYPE_CDMA_HIGH_S_X4:                                          szErrorVal = "TONE_TYPE_CDMA_HIGH_S_X4";                                break;
+       case TONE_TYPE_CDMA_MED_S_X4:                                           szErrorVal = "TONE_TYPE_CDMA_MED_S_X4";                                 break;
+       case TONE_TYPE_CDMA_LOW_S_X4:                                           szErrorVal = "TONE_TYPE_CDMA_LOW_S_X4";                                 break;
+       case TONE_TYPE_CDMA_HIGH_PBX_L:                                         szErrorVal = "TONE_TYPE_CDMA_HIGH_PBX_L";                               break;
+       case TONE_TYPE_CDMA_MED_PBX_L:                                          szErrorVal = "TONE_TYPE_CDMA_MED_PBX_L";                                break;
+       case TONE_TYPE_CDMA_LOW_PBX_L:                                          szErrorVal = "TONE_TYPE_CDMA_LOW_PBX_L";                                break;
+       case TONE_TYPE_CDMA_HIGH_PBX_SS:                                        szErrorVal = "TONE_TYPE_CDMA_HIGH_PBX_SS";                              break;
+       case TONE_TYPE_CDMA_MED_PBX_SS:                                         szErrorVal = "TONE_TYPE_CDMA_MED_PBX_SS";                               break;
+       case TONE_TYPE_CDMA_LOW_PBX_SS:                                         szErrorVal = "TONE_TYPE_CDMA_LOW_PBX_SS";                               break;
+       case TONE_TYPE_CDMA_HIGH_PBX_SSL:                                       szErrorVal = "TONE_TYPE_CDMA_HIGH_PBX_SSL";                             break;
+       case TONE_TYPE_CDMA_MED_PBX_SSL:                                        szErrorVal = "TONE_TYPE_CDMA_MED_PBX_SSL";                              break;
+       case TONE_TYPE_CDMA_LOW_PBX_SSL:                                        szErrorVal = "TONE_TYPE_CDMA_LOW_PBX_SSL";                              break;
+       case TONE_TYPE_CDMA_HIGH_PBX_SLS:                                       szErrorVal = "TONE_TYPE_CDMA_HIGH_PBX_SLS";                             break;
+       case TONE_TYPE_CDMA_MED_PBX_SLS:                                        szErrorVal = "TONE_TYPE_CDMA_MED_PBX_SLS";                              break;
+       case TONE_TYPE_CDMA_LOW_PBX_SLS:                                        szErrorVal = "TONE_TYPE_CDMA_LOW_PBX_SLS";                              break;
+       case TONE_TYPE_CDMA_HIGH_PBX_S_X4:                                      szErrorVal = "TONE_TYPE_CDMA_HIGH_PBX_S_X4";                    break;
+       case TONE_TYPE_CDMA_MED_PBX_S_X4:                                       szErrorVal = "TONE_TYPE_CDMA_MED_PBX_S_X4";                             break;
+       case TONE_TYPE_CDMA_LOW_PBX_S_X4:                                       szErrorVal = "TONE_TYPE_CDMA_LOW_PBX_S_X4";                             break;
+       case TONE_TYPE_CDMA_ALERT_NETWORK_LITE:                         szErrorVal = "TONE_TYPE_CDMA_ALERT_NETWORK_LITE";               break;
+       case TONE_TYPE_CDMA_ALERT_AUTOREDIAL_LITE:                      szErrorVal = "TONE_TYPE_CDMA_ALERT_AUTOREDIAL_LITE";    break;
+       case TONE_TYPE_CDMA_ONE_MIN_BEEP:                                       szErrorVal = "TONE_TYPE_CDMA_ONE_MIN_BEEP";                             break;
+       case TONE_TYPE_CDMA_KEYPAD_VOLUME_KEY_LITE:                     szErrorVal = "TONE_TYPE_CDMA_KEYPAD_VOLUME_KEY_LITE";   break;
+       case TONE_TYPE_CDMA_PRESSHOLDKEY_LITE:                          szErrorVal = "TONE_TYPE_CDMA_PRESSHOLDKEY_LITE";                break;
+       case TONE_TYPE_CDMA_ALERT_INCALL_LITE:                          szErrorVal = "TONE_TYPE_CDMA_ALERT_INCALL_LITE";                break;
+       case TONE_TYPE_CDMA_EMERGENCY_RINGBACK:                         szErrorVal = "TONE_TYPE_CDMA_EMERGENCY_RINGBACK";               break;
+       case TONE_TYPE_CDMA_ALERT_CALL_GUARD:                           szErrorVal = "TONE_TYPE_CDMA_ALERT_CALL_GUARD";                 break;
+       case TONE_TYPE_CDMA_SOFT_ERROR_LITE:                            szErrorVal = "TONE_TYPE_CDMA_SOFT_ERROR_LITE";                  break;
+       case TONE_TYPE_CDMA_CALLDROP_LITE:                                      szErrorVal = "TONE_TYPE_CDMA_CALLDROP_LITE";                    break;
+       case TONE_TYPE_CDMA_NETWORK_BUSY_ONE_SHOT:                      szErrorVal = "TONE_TYPE_CDMA_NETWORK_BUSY_ONE_SHOT";    break;
+       case TONE_TYPE_CDMA_ABBR_ALERT:                                         szErrorVal = "TONE_TYPE_CDMA_ABBR_ALERT";                               break;
+       case TONE_TYPE_CDMA_SIGNAL_OFF:                                         szErrorVal = "TONE_TYPE_CDMA_SIGNAL_OFF";                               break;
+       case TONE_TYPE_USER_DEFINED_LOW_FRE:                            szErrorVal = "TONE_TYPE_USER_DEFINED_LOW_FRE";                  break;
+       case TONE_TYPE_USER_DEFINED_MED_FRE:                            szErrorVal = "TONE_TYPE_USER_DEFINED_MED_FRE";                  break;
+       case TONE_TYPE_USER_DEFINED_HIGH_FRE:                           szErrorVal = "TONE_TYPE_USER_DEFINED_HIGH_FRE";                 break;   
+       default:                                                                                        szErrorVal = "Unknown Error";                                                   break;
+       }       
+       return szErrorVal;
+} 
+
+
+/**
+* @function            SoundType
+* @description         Maps error enums 
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* SoundType(sound_type_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case SOUND_TYPE_SYSTEM:                 szErrorVal = "SOUND_TYPE_SYSTEM";               break;
+       case SOUND_TYPE_NOTIFICATION:   szErrorVal = "SOUND_TYPE_NOTIFICATION"; break;
+       case SOUND_TYPE_ALARM:                  szErrorVal = "SOUND_TYPE_ALARM";                break;
+       case SOUND_TYPE_RINGTONE:               szErrorVal = "SOUND_TYPE_RINGTONE";             break;
+       case SOUND_TYPE_MEDIA:                  szErrorVal = "SOUND_TYPE_MEDIA";                break;
+       case SOUND_TYPE_CALL:                   szErrorVal = "SOUND_TYPE_CALL";                 break;
+       case SOUND_TYPE_VOIP:                   szErrorVal = "SOUND_TYPE_VOIP";                 break;
+       default:                                                szErrorVal = "Unknown Error";                   break;
+       }
+       return szErrorVal;
+}
+                                                  
+/**                                                
+* @function                    TonePlayerGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter           pszAPIMemory :String pointer containing the difference of total number of bytes for Current and previous Memory Allocation.
+* @return                      NA
+*/
+void TonePlayerGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stTonePlayerMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stTonePlayerMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stTonePlayerMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    TonePlayerGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @parameter           NA
+* @return                      NA
+*/
+inline void TonePlayerGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stTonePlayerMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           TonePlayerExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter          pszAPITime :String pointer containing the time difference
+ * @return                     NA
+ *
+ */
+void TonePlayerExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK        
+       if (pszAPITime != NULL)
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stTonePlayerStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stTonePlayerStartTime.tv_usec;
+                       
+               sprintf(pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }               
+#endif
+}
+/**
+ * @function           TonePlayerFreeMemory
+ * @description                Function to free the memory allocated
+ * @parameter          pszMem1, pszMem2, pszMem3 : pointers to allocated memory 
+ * @return                     NA
+ *
+ */ 
+void TonePlayerFreeMemory(char *pszMem1, char *pszMem2, char *pszMem3)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+
+}
+
+/**
+ * @function           TonePlayerGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stTonePlayerStartTime
+ * @parameter          NA
+ * @return                 NA
+ *
+ */ 
+void TonePlayerGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stTonePlayerStartTime, NULL);
+#endif
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/tone-player/ITs-tone-player-common.h b/src/itc/tone-player/ITs-tone-player-common.h
new file mode 100755 (executable)
index 0000000..4305a58
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_TONE_PLAYER_COMMON_H_
+#define _ITS_TONE_PLAYER_COMMON_H_
+
+#include "assert.h"
+#include <tone_player.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+/** @addtogroup itc-tone-player
+*  @ingroup itc
+*  @{
+*/
+
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+FILE *g_fpLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][tone-player_ITC] Starting test : %s\\n",__LINE__,__FUNCTION__);\
+       }
+
+#define PRINT_RESULT(nRet, API) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF("[Line : %d][tone-player_ITC]%s passed\\n",__LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d][tone-player_ITC]%s failed, error returned = %s \\n",__LINE__, API, TonePlayerGetError(nRet));\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d][tone-player_ITC]%s_MemoryLeakStatus - %s\\n",__LINE__, #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d][tone-player_ITC]%s_TimeInMicrosec- %s\\n",__LINE__, #api, speedLog);\
+       }
+char* SoundType(sound_type_e nRet);
+char* ToneType(tone_type_e nRet);
+char* TonePlayerGetError(int nRet);
+void TonePlayerGetMemAllocation();
+void TonePlayerExecutionDelay(char* pszAPITime);
+void TonePlayerGetTimeOfDay();
+void TonePlayerGetMemStatus(char *pszAPIMemory);
+void TonePlayerFreeMemory(char *pszMem1, char *pszMem2, char *pszMem3);
+
+/** @} */
+#endif //_ITS_TONE_PLAYER_COMMON_H_
diff --git a/src/itc/tone-player/ITs-tone-player.c b/src/itc/tone-player/ITs-tone-player.c
new file mode 100755 (executable)
index 0000000..f41e2d5
--- /dev/null
@@ -0,0 +1,274 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-tone-player-common.h"
+
+/** @addtogroup itc-tone-player
+*  @ingroup itc
+*  @{
+*/
+
+struct timeval g_stTonePlayerStartTime;
+struct mallinfo g_stTonePlayerMemInfo;
+
+//& set: TonePlayer
+/**
+* @function            ITs_tone_player_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_tone_player_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][tone-player_ITC]  In startup \\n",__LINE__);
+#endif
+       return;
+}
+
+/**
+* @function            ITs_tone_player_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_tone_player_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][tone-player_ITC] In Cleanup \\n",__LINE__);
+#endif
+       return;
+}
+
+/** @addtogroup itc-tone-player-testcases
+*  @brief              Integration testcases for module tone-player
+*  @ingroup    itc-tone-player
+*  @{
+*/
+
+//& purpose: To start and stop playing a tone
+//& type: auto 
+/**
+* @testcase                    ITc_tone_player_start_stop_p
+* @since_tizen                         2.3
+* @type                                        auto
+* @description                 To start and stop playing a tone
+* @scenario                            Start the tone playing \n
+*                                              Stop the tone playing
+* @apicovered                  tone_player_start, tone_player_stop                                     
+* @passcase                            When tone_player_start and tone_player_stop is successful.
+* @failcase                            If target api tone_player_start or tone_player_stop fails or any precondition api fails.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_tone_player_start_stop_p(void)
+{
+       START_TEST;
+       int nRet, nLoopCount = 0, nId;
+       int nStartFailCount = 0;
+       int nStopFailCount = 0;
+       int nDurationMs = 1000;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       tone_type_e eToneType[] = {TONE_TYPE_DEFAULT,
+               TONE_TYPE_DTMF_0,
+               TONE_TYPE_DTMF_1,
+               TONE_TYPE_DTMF_2,
+               TONE_TYPE_DTMF_3,
+               TONE_TYPE_DTMF_4,
+               TONE_TYPE_DTMF_5};
+               // TONE_TYPE_DTMF_6,
+               // TONE_TYPE_DTMF_7,
+               // TONE_TYPE_DTMF_8,
+               // TONE_TYPE_DTMF_9,
+               // TONE_TYPE_DTMF_S,
+               // TONE_TYPE_DTMF_P,
+               // TONE_TYPE_DTMF_A,
+               // TONE_TYPE_DTMF_B,
+               // TONE_TYPE_DTMF_C,
+               // TONE_TYPE_DTMF_D,
+               // TONE_TYPE_SUP_DIAL,
+               // TONE_TYPE_ANSI_DIAL,
+               // TONE_TYPE_JAPAN_DIAL,
+               // TONE_TYPE_SUP_BUSY,
+               // TONE_TYPE_ANSI_BUSY,
+               // TONE_TYPE_JAPAN_BUSY,
+               // TONE_TYPE_SUP_CONGESTION,
+               // TONE_TYPE_ANSI_CONGESTION,
+               // TONE_TYPE_SUP_RADIO_ACK,
+               // TONE_TYPE_JAPAN_RADIO_ACK,
+               // TONE_TYPE_SUP_RADIO_NOTAVAIL,
+               // TONE_TYPE_SUP_ERROR,
+               // TONE_TYPE_SUP_CALL_WAITING,
+               // TONE_TYPE_ANSI_CALL_WAITING,
+               // TONE_TYPE_SUP_RINGTONE,
+               // TONE_TYPE_ANSI_RINGTONE,
+               // TONE_TYPE_PROP_BEEP,
+               // TONE_TYPE_PROP_ACK,
+               // TONE_TYPE_PROP_NACK,
+               // TONE_TYPE_PROP_PROMPT,
+               // TONE_TYPE_PROP_BEEP2,
+               // TONE_TYPE_SUP_INTERCEPT,
+               // TONE_TYPE_SUP_INTERCEPT_ABBREV,
+               // TONE_TYPE_SUP_CONGESTION_ABBREV,
+               // TONE_TYPE_SUP_CONFIRM,
+               // TONE_TYPE_SUP_PIP,
+               // TONE_TYPE_CDMA_DIAL_TONE_LITE,
+               // TONE_TYPE_CDMA_NETWORK_USA_RINGBACK,
+               // TONE_TYPE_CDMA_INTERCEPT,
+               // TONE_TYPE_CDMA_ABBR_INTERCEPT,
+               // TONE_TYPE_CDMA_REORDER,
+               // TONE_TYPE_CDMA_ABBR_REORDER,
+               // TONE_TYPE_CDMA_NETWORK_BUSY,
+               // TONE_TYPE_CDMA_CONFIRM,
+               // TONE_TYPE_CDMA_ANSWER,
+               // TONE_TYPE_CDMA_NETWORK_CALLWAITING,
+               // TONE_TYPE_CDMA_PIP,
+               // TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_NORMAL,
+               // TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP,
+               // TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_SP_PRI,
+               // TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT3,
+               // TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PING_RING,
+               // TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT5,
+               // TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT6,
+               // TONE_TYPE_CDMA_CALL_SIGNAL_ISDN_PAT7,
+               // TONE_TYPE_CDMA_HIGH_L,
+               // TONE_TYPE_CDMA_MED_L,
+               // TONE_TYPE_CDMA_LOW_L,
+               // TONE_TYPE_CDMA_HIGH_SS,
+               // TONE_TYPE_CDMA_MED_SS,
+               // TONE_TYPE_CDMA_LOW_SS,
+               // TONE_TYPE_CDMA_HIGH_SSL,
+               // TONE_TYPE_CDMA_MED_SSL,
+               // TONE_TYPE_CDMA_LOW_SSL,
+               // TONE_TYPE_CDMA_HIGH_SS_2,
+               // TONE_TYPE_CDMA_MED_SS_2,
+               // TONE_TYPE_CDMA_LOW_SS_2,
+               // TONE_TYPE_CDMA_HIGH_SLS,
+               // TONE_TYPE_CDMA_MED_SLS,
+               // TONE_TYPE_CDMA_LOW_SLS,
+               // TONE_TYPE_CDMA_HIGH_S_X4,
+               // TONE_TYPE_CDMA_MED_S_X4,
+               // TONE_TYPE_CDMA_LOW_S_X4,
+               // TONE_TYPE_CDMA_HIGH_PBX_L,
+               // TONE_TYPE_CDMA_MED_PBX_L,
+               // TONE_TYPE_CDMA_LOW_PBX_L,
+               // TONE_TYPE_CDMA_HIGH_PBX_SS,
+               // TONE_TYPE_CDMA_MED_PBX_SS,
+               // TONE_TYPE_CDMA_LOW_PBX_SS,
+               // TONE_TYPE_CDMA_HIGH_PBX_SSL,
+               // TONE_TYPE_CDMA_MED_PBX_SSL,
+               // TONE_TYPE_CDMA_LOW_PBX_SSL,
+               // TONE_TYPE_CDMA_HIGH_PBX_SLS,
+               // TONE_TYPE_CDMA_MED_PBX_SLS,
+               // TONE_TYPE_CDMA_LOW_PBX_SLS,
+               // TONE_TYPE_CDMA_HIGH_PBX_S_X4,
+               // TONE_TYPE_CDMA_MED_PBX_S_X4,
+               // TONE_TYPE_CDMA_LOW_PBX_S_X4,
+               // TONE_TYPE_CDMA_ALERT_NETWORK_LITE,
+               // TONE_TYPE_CDMA_ALERT_AUTOREDIAL_LITE,
+               // TONE_TYPE_CDMA_ONE_MIN_BEEP,
+               // TONE_TYPE_CDMA_KEYPAD_VOLUME_KEY_LITE,
+               // TONE_TYPE_CDMA_PRESSHOLDKEY_LITE,
+               // TONE_TYPE_CDMA_ALERT_INCALL_LITE,
+               // TONE_TYPE_CDMA_EMERGENCY_RINGBACK,
+               // TONE_TYPE_CDMA_ALERT_CALL_GUARD,
+               // TONE_TYPE_CDMA_SOFT_ERROR_LITE,
+               // TONE_TYPE_CDMA_CALLDROP_LITE,
+               // TONE_TYPE_CDMA_NETWORK_BUSY_ONE_SHOT,
+               // TONE_TYPE_CDMA_ABBR_ALERT,
+               // TONE_TYPE_CDMA_SIGNAL_OFF,
+               // TONE_TYPE_USER_DEFINED_LOW_FRE,
+               // TONE_TYPE_USER_DEFINED_MED_FRE,
+               // TONE_TYPE_USER_DEFINED_HIGH_FRE};
+
+       sound_type_e eSoundType[] = {SOUND_TYPE_SYSTEM,
+               SOUND_TYPE_NOTIFICATION,
+               SOUND_TYPE_ALARM,
+               SOUND_TYPE_RINGTONE,
+               SOUND_TYPE_MEDIA};
+       // SOUND_TYPE_CALL,
+       // SOUND_TYPE_VOIP
+       int enum_size1 = sizeof(eToneType) / sizeof(eToneType[0]);
+       int enum_counter1 = 0;
+       int enum_size2 = sizeof(eSoundType) / sizeof(eSoundType[0]);
+       int enum_counter2 = 0;
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT * enum_size1 * enum_size2, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * enum_size1 * enum_size2, sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size1 * enum_size2, sizeof(char));
+#endif
+       for ( enum_counter1=0; enum_counter1<enum_size1; enum_counter1++)
+       {
+               for ( enum_counter2=0; enum_counter2<enum_size2; enum_counter2++)
+               {
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               // Target API
+                               TonePlayerGetMemAllocation();
+                               TonePlayerGetTimeOfDay();
+                               nRet = tone_player_start(eToneType[enum_counter1], eSoundType[enum_counter2], nDurationMs, &nId);
+                               TonePlayerExecutionDelay(pszAPI1SpeedLog);
+                                               
+                               if(nRet != 0 )
+                               { 
+                               
+                                       FPRINTF("\\n[line : %d][tone-player_ITC] tone_player_start is unsuccessful on iteration = %d , error returned =  %s and enum error for ToneType = %s and enom error for SoundType = %s\\n",__LINE__, nLoopCount, TonePlayerGetError(nRet), ToneType(eToneType[enum_counter1]), SoundType(eSoundType[enum_counter2]));
+                                       nStartFailCount ++;
+                                       continue;
+                               }
+                               TonePlayerGetTimeOfDay();
+                               nRet = tone_player_stop(nId);
+                               TonePlayerExecutionDelay(pszAPI2SpeedLog);
+                               TonePlayerGetMemStatus(pszMemLog);
+                               if (nRet != 0)
+                               {
+                                       FPRINTF("\\n[line : %d][tone-player_ITC] tone_player_stop failed on iteration = %d , error returned =  %s\\n",__LINE__, nLoopCount, TonePlayerGetError(nRet));
+                                       nStopFailCount ++;
+                               }       
+                       }
+               }
+       }
+       
+       if ( nStartFailCount > 0 || nStopFailCount > 0)
+       {
+               FPRINTF("[Line : %d][tone-player_ITC] tone_player_start failed %d and tone_player_stop failed %d time out of %d times\\n",__LINE__, nStartFailCount, nStopFailCount, MAX_COUNT * enum_size1 * enum_size2);
+               TonePlayerFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tone_player_start , pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(tone_player_stop, pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tone_player_start_stop , pszMemLog);
+#endif
+       TonePlayerFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+       return 0;
+}
+
+/** @} */ 
+/** @} */ 
\ No newline at end of file
diff --git a/src/itc/tone-player/tct-tone-player-native.c b/src/itc/tone-player/tct-tone-player-native.c
new file mode 100755 (executable)
index 0000000..a7158f0
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-tone-player-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/tone-player/tct-tone-player-native.h b/src/itc/tone-player/tct-tone-player-native.h
new file mode 100755 (executable)
index 0000000..8f2b020
--- /dev/null
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_TONE_PLAYER_NATIVE_H__
+#define __TCT_TONE_PLAYER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_tone_player_startup(void);
+extern void ITs_tone_player_cleanup(void);
+
+extern int ITc_tone_player_start_stop_p(void);
+
+testcase tc_array[] = {
+    {"ITc_tone_player_start_stop_p", ITc_tone_player_start_stop_p, ITs_tone_player_startup, ITs_tone_player_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_TONE_PLAYER_NATIVE_H__
diff --git a/src/itc/tts/CMakeLists.txt b/src/itc/tts/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..d71cf70
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "tts")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "tts")
+SET(TC_SOURCES
+       ITs-tts-common.c
+       ITs-tts.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       bundle
+       ecore
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/itc/tts/ITs-tts-common.c b/src/itc/tts/ITs-tts-common.c
new file mode 100755 (executable)
index 0000000..139041a
--- /dev/null
@@ -0,0 +1,414 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-tts-common.h"
+
+/** @addtogroup itc-tts
+*  @ingroup itc
+*  @{
+*/
+
+/**
+* @function            TtsGetState
+* @description         Maps error enums to string values and print Tts State Code
+* @parameter           Tts state
+* @return                      N/A
+*/
+void TtsGetState(tts_state_e TtsState)
+{
+       switch(TtsState)
+       {
+               case TTS_STATE_CREATED  :
+               FPRINTF("[Line : %d] [tts_ITC] TTS_STATE_CREATED \\n", __LINE__);
+               break;
+
+               case TTS_STATE_READY :
+               FPRINTF("[Line : %d] [tts_ITC] TTS_STATE_READY \\n", __LINE__);
+               break;
+
+               case TTS_STATE_PLAYING :
+               FPRINTF("[Line : %d] [tts_ITC] TTS_STATE_PLAYING \\n", __LINE__);
+               break;
+
+               case TTS_STATE_PAUSED :
+               FPRINTF("[Line : %d] [tts_ITC] TTS_STATE_PAUSED \\n", __LINE__);
+               break;
+
+               default :
+               FPRINTF("[Line : %d] [tts_ITC]  Unknown State \\n", __LINE__);
+               break;
+       }
+}
+
+/**
+* @function            TtsGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* TtsGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+       case TTS_ERROR_NONE : szErrorVal = "TTS_ERROR_NONE" ; break;
+       case TTS_ERROR_INVALID_PARAMETER : szErrorVal = "TTS_ERROR_INVALID_PARAMETER" ; break;
+       case TTS_ERROR_OUT_OF_MEMORY  : szErrorVal = "TTS_ERROR_OUT_OF_MEMORY" ; break;
+       case TTS_ERROR_INVALID_STATE : szErrorVal = "TTS_ERROR_INVALID_STATE" ; break;
+       case TTS_ERROR_IO_ERROR  : szErrorVal = "TTS_ERROR_IO_ERROR" ; break;
+       case TTS_ERROR_OUT_OF_NETWORK  : szErrorVal = "TTS_ERROR_OUT_OF_NETWORK" ; break;
+       case TTS_ERROR_INVALID_VOICE  : szErrorVal = "TTS_ERROR_INVALID_VOICE" ; break;
+       case TTS_ERROR_ENGINE_NOT_FOUND  : szErrorVal = "TTS_ERROR_ENGINE_NOT_FOUND" ; break;
+       case TTS_ERROR_TIMED_OUT   : szErrorVal = "TTS_ERROR_TIMED_OUT" ; break;
+       case TTS_ERROR_OPERATION_FAILED   : szErrorVal = "TTS_ERROR_OPERATION_FAILED" ; break;
+       case TTS_ERROR_AUDIO_POLICY_BLOCKED   : szErrorVal = "TTS_ERROR_AUDIO_POLICY_BLOCKED" ; break;
+       default : szErrorVal = "TTS_ERROR_UNKNOWN" ; break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function                    TtsGetMemStatus
+* @description         Returns the Memory Allocation state
+* @parameter[OUT]      pszAPIMemory [String pointer containg the difference of total number of bytes for Current and
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void TtsGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+
+               if(stMemInfo.uordblks > g_stTtsMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stTtsMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stTtsMemInfo.uordblks - stMemInfo.uordblks);
+               }
+
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+
+#endif
+}
+
+/**
+* @function                    TtsGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void TtsGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stTtsMemInfo = mallinfo();
+#endif
+}
+
+/**
+* @function            TtsExecutionDelay
+* @description         Returns a log for a code-block of statements execution delay
+* @parameter[OUT]      pszAPITime [String poniter containg the time difference]
+* @return                      NA
+*/
+void TtsExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+       if (pszAPITime != NULL)
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);
+               ulldifference = ((stEnd.tv_sec -g_stTtsStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stTtsStartTime.tv_usec;
+               sprintf (pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }
+#endif
+}
+
+/**
+* @function            TtsGetTimeOfDay
+* @description         Get time prior to target api call & set it to g_stTtsStartTime
+* @parameter           NA
+* @return                      NA
+*/
+void TtsGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stTtsStartTime, NULL);
+#endif
+}
+
+/**
+* @function            FreeMemory
+* @description         Function to free the memory allocated
+* @parameter           char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4 (pointer to allocated memory)
+* @return                      NA
+*/
+void FreeMemory(char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2!= NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+       if (pszMem4 != NULL)
+       {
+               free(pszMem4);
+               pszMem4 = NULL;
+       }
+}
+
+/**
+* @function                    UixTtsPrintAPIErrorMSG
+* @description                 Prints Error API Error message
+* @parameter[IN]       pszAPI[API name]
+*                       [IN]           nRet[API return value]
+* @return                              NA
+*/
+void UixTtsPrintAPIErrorMSG(char *pszAPI, int nRet)
+{
+       FPRINTF("[Line : %d] [tts_ITC][%s API Call Failed With Return Value: %d][error is: %s]\\n", __LINE__, pszAPI, nRet, TtsGetError(nRet));
+}
+
+/**
+* @function            TtsTimeoutFunction
+* @description         Called if some callback is not invoked for a particular Tts Timeout
+* @parameter           gpointer data
+* @return                      gboolean
+*/
+gboolean TtsTimeoutFunction(gpointer data)
+{
+    FPRINTF( "\\n [Line : %d] [player_ITC] Callback Tts wait complete for 20 seconds. Timeout\\n",__LINE__);
+    ecore_main_loop_quit();
+    return FALSE;
+}
+
+/**
+* @function            TtsWaitForAsync
+* @description         Called to wait
+* @parameter           NA
+* @return                      NA
+*/
+void TtsWaitForAsync()
+{
+    g_timeout_add(TIMEOUT, TtsTimeoutFunction, NULL);
+    ecore_main_loop_begin();
+}
+
+/**
+* @function            TtsSetStateChangedCallBacks
+* @description         Called to set state changed callback
+* @parameter           StateChange
+* @return                      int
+*/
+int TtsSetStateChangedCallBacks(tts_state_changed_cb StateChange)
+{
+       int nRet = tts_set_state_changed_cb(g_pstTts, StateChange, NULL);
+       if(nRet != TTS_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [tts_ITC] tts_set_state_changed_cb failed, error returned = %s \\n", __LINE__, TtsGetError(nRet));
+               return 1;
+       }
+       return 0;
+}
+
+/**
+* @function            TtsUnSetStateChangedCallBacks
+* @description         Called to unset state changed callback
+* @parameter           NA
+* @return                      NA
+*/
+void TtsUnSetStateChangedCallBacks(void)
+{
+       FPRINTF("[Line : %d] [tts_ITC] tts_unset_state_changed_cb is called\\n", __LINE__);
+       tts_unset_state_changed_cb(g_pstTts);
+}
+
+/**
+* @function            TtsSetUtteranceCallBacks
+* @description         Called to set utterance callbacks
+* @parameter           StartCallBack, CompleteCallBack
+* @return                      int
+*/
+int TtsSetUtteranceCallBacks(tts_utterance_started_cb StartCallBack, tts_utterance_completed_cb CompleteCallBack)
+{
+       int nRet =  tts_set_utterance_started_cb(g_pstTts, StartCallBack, NULL);
+       if(nRet < 0)
+       {
+               UixTtsPrintAPIErrorMSG("tts_set_utterance_started_cb",nRet);
+               return 1;
+       }
+
+       nRet =  tts_set_utterance_completed_cb(g_pstTts, CompleteCallBack, NULL);
+       if(nRet < 0)
+       {
+               UixTtsPrintAPIErrorMSG("tts_set_utterance_completed_cb",nRet);
+               return 1;
+       }
+       return 0;
+}
+
+/**
+* @function            TtsUnSetUtteranceCallBacks
+* @description         Called to unset utterance callbacks
+* @parameter           NA
+* @return                      NA
+*/
+void TtsUnSetUtteranceCallBacks(void)
+{
+       tts_unset_utterance_started_cb(g_pstTts);
+       tts_unset_utterance_completed_cb(g_pstTts);
+}
+
+/**
+* @function            TtsPrepare
+* @description         Called to prepare tts
+* @parameter           StateChange
+* @return                      bool
+*/
+bool TtsPrepare(tts_state_changed_cb StateChange)
+{
+       if(1 == TtsSetStateChangedCallBacks(StateChange))
+       {
+               return false;
+       }
+       
+       int nRet = tts_set_mode(g_pstTts, TTS_MODE_DEFAULT);
+       if(nRet < 0)
+       {
+               UixTtsPrintAPIErrorMSG("tts_set_mode", nRet);
+               return false;
+       }
+
+       nRet=tts_prepare(g_pstTts);
+       if(nRet != TTS_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_prepare failed, error returned = %s \\n", __LINE__, TtsGetError(nRet));
+               return false;
+       }
+       TtsWaitForAsync();
+       if (!g_bTtsStateChangedCallback)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_set_state_changed_cb failed, error returned = callback not invoked\\n", __LINE__);
+               return false;
+       }
+       else if(g_eCurrent_state != TTS_STATE_READY)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_set_state_changed_cb failed, error returned = state not set\\n", __LINE__);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            TtsUnPrepare
+* @description         Called to unprepare tts
+* @parameter           NA
+* @return                      NA
+*/
+
+void TtsUnPrepare(void)
+{
+       tts_stop(g_pstTts);
+       tts_unprepare(g_pstTts);
+       TtsUnSetStateChangedCallBacks();
+}
+
+/**
+* @function            Tts_Check_System_Info_Feature_Supported
+* @description         Check the supported feature for the given key value
+* @parameter           char* pszKey ; key value
+* @return                      true if supported else false
+*/
+bool Tts_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("\\n[Line : %d][tts_ITC] Null key value passed to function : Tts_Check_System_Info_Feature_Supported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool(pszKey, &bValue);
+
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][tts_ITC] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n",__LINE__, Tts_System_Info_GetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("\\n[Line : %d][tts_ITC] system_info_get_platform_bool returned unsupported feature capability for (key = %s)\\n", __LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][tts_ITC] system_info_get_platform_bool returned supported status feature for (key = %s)\\n", __LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+* @function            Tts_System_Info_GetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* Tts_System_Info_GetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case SYSTEM_INFO_ERROR_NONE:                            szErrorVal = "SYSTEM_INFO_ERROR_NONE";                          break; 
+               case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       szErrorVal = "SYSTEM_INFO_ERROR_INVALID_PARAMETER";     break; 
+               case SYSTEM_INFO_ERROR_IO_ERROR:                        szErrorVal = "SYSTEM_INFO_ERROR_IO_ERROR";                      break;
+               case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           szErrorVal = "SYSTEM_INFO_ERROR_OUT_OF_MEMORY";         break;
+               default:                                                                        szErrorVal = "Unknown error";                                           break;
+       }
+
+       return szErrorVal;
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/tts/ITs-tts-common.h b/src/itc/tts/ITs-tts-common.h
new file mode 100755 (executable)
index 0000000..ecbdf2c
--- /dev/null
@@ -0,0 +1,136 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_TTS_COMMON_H_
+#define _ITS_TTS_COMMON_H_
+
+#include "assert.h"
+#include <stdio.h>
+#include <tts.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <Ecore.h>
+#include <system_info.h>
+
+/** @addtogroup itc-tts
+*  @ingroup itc
+*  @{
+*/
+
+#define TIMEOUT_CB                                     5000
+#define INPUT_TEXT                                     "1 2 3 4 5 6 7 8 9"
+#define SLEEP_TIME                                     5
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define TIMEOUT                                                20000
+#define MICROSECONDS_PER_SECOND                1000000
+
+/**********************************************************Golbal variables************************************************/
+tts_h g_pstTts;
+int g_nUixUttIdCmp;
+int g_nUixUttId;
+const char* g_pszUixLanguage;
+tts_state_e g_eCurrent_state;
+int g_eUixVoiceType;
+struct timeval g_stTtsStartTime;
+struct mallinfo g_stTtsMemInfo;
+FILE *g_fpLog;
+bool g_bTtsCreation;
+bool g_bTtsSupportedVoiceCallback;
+bool g_bTtsStateChangedCallback;
+bool g_bTtsDefaultVoiceChangedCallback;
+bool g_bTtsErrorCallback;
+bool g_bTtsUtteranceCompletedCallback;
+bool g_bTtsUtteranceStartedCallback;
+
+
+#define SPEECH_SYNTHESIS_FEATURE       "http://tizen.org/feature/speech.synthesis"
+
+bool g_bFeatureSupported;
+bool g_bFeatureMismatch;
+bool g_bFeatureNotSupported;
+
+#define FPRINTF(...) {\
+               g_fpLog = fopen(ERR_LOG,"a");\
+               fprintf(g_fpLog, __VA_ARGS__);\
+               fclose(g_fpLog);\
+               }
+
+
+#define START_TEST {\
+       FPRINTF("[Line : %d] [tts_ITC]  Starting test : %s\\n", __LINE__, __FUNCTION__);\
+       if ( g_bFeatureMismatch )\
+       {\
+               return 1;\
+       }\
+       if ( g_bFeatureNotSupported )\
+       {\
+               return 0;\
+       }\
+       if ( !g_bTtsCreation )\
+       {\
+               FPRINTF("[Line : %d] [tts_ITC] Precondition of tts create failed so leaving test\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF( "[Line : %d][tts_ITC] %s_MemoryLeakStatus - %s\\n", __LINE__ , #api, memLog);\
+       }
+
+
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF( "[Line : %d][tts_ITC] %s_TimeInMicrosec- %s\\n", __LINE__ , #api, speedLog);\
+       }
+
+/*******************************************************HELPER FUNCTIONS**************************************************/
+void TtsGetState(tts_state_e TtsState);
+char* TtsGetError(int nRet);
+void TtsGetMemAllocation();
+void TtsExecutionDelay(char* pszAPITime);
+void TtsGetTimeOfDay();
+void TtsGetMemStatus(char *pszAPIMemory);
+void FreeMemory(char *pszMem1, char *pszMem2,char *pszMem3,char *pszMem4);
+void UixTtsPrintAPIErrorMSG(char *pszAPI, int nRet);
+gboolean TtsTimeoutFunction(gpointer data);
+void TtsWaitForAsync();
+int TtsSetStateChangedCallBacks(tts_state_changed_cb StateChange);
+void TtsUnSetStateChangedCallBacks(void);
+int TtsSetUtteranceCallBacks(tts_utterance_started_cb StartCallBack, tts_utterance_completed_cb CompleteCallBack);
+void TtsUnSetUtteranceCallBacks(void);
+bool TtsPrepare(tts_state_changed_cb StateChange);
+void TtsUnPrepare(void);
+
+bool Tts_Check_System_Info_Feature_Supported(char* pszKey);
+char* Tts_System_Info_GetError(int nRet);
+
+/** @} */
+#endif  //_ITS_TTS_COMMON_H_
diff --git a/src/itc/tts/ITs-tts.c b/src/itc/tts/ITs-tts.c
new file mode 100755 (executable)
index 0000000..7f08beb
--- /dev/null
@@ -0,0 +1,1646 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-tts-common.h"
+
+/** @addtogroup itc-tts
+*  @ingroup itc
+*  @{
+*/
+
+/**
+* @function            ITs_tts_startup
+* @description         Called before each test, created tts handle
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_tts_startup(void)
+{
+       ecore_main_loop_glib_integrate();
+
+       g_bTtsCreation = false;
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line: %d][ITs_tts_startup] TEST SUIT start-up: ITs_TTS_p\\n", __LINE__);
+#endif
+
+       g_bFeatureSupported = true;
+       g_bFeatureMismatch = false;
+       g_bFeatureNotSupported = false;
+       g_bFeatureSupported = Tts_Check_System_Info_Feature_Supported(SPEECH_SYNTHESIS_FEATURE);
+
+       int nRet = tts_create(&g_pstTts);
+
+       if ( !g_bFeatureSupported )
+       {
+               if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_create returned %s error for unsupported feature\\n", __LINE__, TtsGetError(nRet));
+                       g_bFeatureMismatch = true;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_create correctly returned TIZEN_ERROR_NOT_SUPPORTED for unsupported feature\\n", __LINE__);
+                       g_bFeatureNotSupported = true;
+               }
+               return;
+       }
+       
+       sleep(2);
+       if ( nRet != TTS_ERROR_NONE )
+       {
+          FPRINTF("[Line : %d] [tts_ITC] Unable to create tts, error returned = %s \\n", __LINE__, TtsGetError(nRet));
+       }
+       else
+       {
+          FPRINTF("[Line : %d] [tts_ITC] Tts created successfully \\n", __LINE__);
+          g_bTtsCreation = true;
+       }
+       return;
+}
+/**
+ * @function           ITs_tts_cleanup
+ * @description                Called after each test, destroys tts handle
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_tts_cleanup(void)
+{
+       if ( g_bTtsCreation )
+       {
+               int nRet = tts_destroy(g_pstTts);
+               sleep(2);
+               if ( nRet != TTS_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d] [tts_ITC] tts_destroy failed, error returned = %s \\n", __LINE__, TtsGetError(nRet));
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [tts_ITC] Tts was not created \\n", __LINE__);
+       }
+
+       sleep(SLEEP_TIME);
+       return;
+}
+
+/***************************************************************CallBack Start************************************/
+
+/**
+* @function                    TtsSupportedVoiceCallback
+* @description          Callback function which is invoked once for each supported voices
+* @parameter[in]               tts, the error type
+*                      [in]            language
+*                      [in]            voice_type
+*                      [in]            user_data       The user data passed
+* @return                              true or false
+*/
+static bool TtsSupportedVoiceCallback(tts_h tts, const char *language, int voice_type, void *user_data)
+{
+       g_bTtsSupportedVoiceCallback = true;
+       #if DEBUG
+               FPRINTF("[Line : %d] [tts_ITC] Language: %s, Voice type: %d \\n", __LINE__, language, voice_type);
+       #endif
+       ecore_main_loop_quit();
+       return false;
+}
+
+/**
+ * @function                                   TtsUtteranceStartedCallback
+ * @description                                callback is called by the tts_foreach_supported_voices API
+ * @parameter[in]                              tts, the tts handler
+ *                     [in]                            previous, previous state
+ *                     [in]                            current, current state
+ *                     [in]                            user_data       The user data passed
+ * @return                                             true or false
+ *
+ */
+static void TtsUtteranceStartedCallback(tts_h tts, int utt_id, void *user_data)
+{
+       g_bTtsUtteranceStartedCallback = true;
+       g_nUixUttId = utt_id;
+       #if DEBUG
+               FPRINTF("[Line : %d] [tts_ITC] func_tts_utterance_started_cb is called. \\n", __LINE__);
+               FPRINTF("[Line : %d] [tts_ITC] utterance ID is: %d \\n", __LINE__, utt_id);
+       #endif
+       return;
+}
+
+/**
+* @function                                    TtsUtteranceCompletedCallback
+* @description                                         callback is called by the  tts_set_utterance_completed_cb() API
+* @parameter[in]                               tts, the tts handler
+*                      [in]                            previous, previous state
+*                      [in]                            current, current state
+*                      [in]                            user_data       The user data passed
+* @return                                              true or false
+*/
+static void TtsUtteranceCompletedCallback(tts_h tts, int utt_id, void *user_data)
+{
+       g_bTtsUtteranceCompletedCallback = true;
+       g_nUixUttIdCmp = utt_id;
+       #if DEBUG
+               FPRINTF("[Line : %d] [tts_ITC] func_tts_utterance_completed_cb is called. \\n", __LINE__);
+               FPRINTF("[Line : %d] [tts_ITC] utterance ID: %d, is completed. \\n", __LINE__, utt_id);
+       #endif
+
+       ecore_main_loop_quit();
+       return;
+}
+
+/**
+* @function                                    func_tts_state_changed_cb
+* @description                                         callback is called by the tts_foreach_supported_voices API
+* @parameter[in]                               tts, the tts handler
+*                      [in]                            previous, previous state
+*                      [in]                            current, current state
+*                      [in]                            user_data       The user data passed
+* @return                                              true or false
+*/
+static void TtsStateChangedCallback(tts_h tts, tts_state_e previous, tts_state_e current, void *user_data)
+{
+       g_bTtsStateChangedCallback = true;
+       g_eCurrent_state = current;
+       #if DEBUG
+               FPRINTF("[Line : %d] [tts_ITC] func_tts_state_changed_cb is called. \\n", __LINE__);
+               FPRINTF("[Line : %d] [tts_ITC] previous state is: %d, current state is: %d \\n", __LINE__, previous, current);
+       #endif
+
+       ecore_main_loop_quit();
+       return;
+}
+
+/**
+* @function                                    func_tts_set_error_cb
+* @description                                         callback is called by the tts_foreach_supported_voices API
+* @parameter[in]                               tts, the error type
+*                      [in]                            language
+*                      [in]                            voice_type
+*                      [in]                            user_data       The user data passed
+* @return                                              true or false
+*/
+static void TtsErrorCallback(tts_h tts, int utt_id, tts_error_e reason, void *user_data)
+{
+       g_bTtsErrorCallback = true;
+       #if DEBUG
+               FPRINTF("[Line : %d] func_tts_set_error_cb callback is called. \\n", __LINE__);
+       #endif
+       ecore_main_loop_quit();
+       return;
+}
+
+/**
+* @function                                    func_tts_default_voice_change_cb
+* @description                                         callback is called by the tts_set_default_voice_changed_cb API
+* @parameter[in]                               tts The TTS handle
+*                      [in]                            previous_language The previous language
+*                      [in]                            previous_voice_type The previous voice type
+*                      [in]                            current_language The current language
+*                      [in]                            current_voice_type The current voice type
+*                      [in]                            user_data The user data passed from the callback registration function
+*/
+static void TtsDefaultVoiceChangedCallback(tts_h tts, const char *previous_language, int previous_voice_type, const char *current_language, int current_voice_type, void *user_data)
+{
+       g_bTtsDefaultVoiceChangedCallback = true;
+       g_pszUixLanguage = current_language;
+       g_eUixVoiceType  = current_voice_type;
+       #if DEBUG
+               FPRINTF("[Line : %d] func_tts_default_voice_change_cb callback is called. \\n", __LINE__);
+               FPRINTF("[Line : %d] Current Language: %s , Voice type:%d \\n", __LINE__,current_language, current_voice_type);
+       #endif
+       ecore_main_loop_quit();
+       return;
+}
+
+/***************************************************************CallBack End************************************/
+
+/** @addtogroup itc-tts-testcases
+*  @brief              Integration testcases for module tts
+*  @ingroup    itc-tts
+*  @{
+*/
+
+//& purpose: create and destroy tts
+//& type : auto
+/**
+* @testcase                            ITc_tts_create_destroy_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         create and destroy tts
+* @scenario                                    Create tts\n
+*                                                      destroy tts
+* @apicovered                          tts_create, tts_destroy
+* @passcase                                    When it can create and destroy tts.
+* @failcase                                    When it can not create and destroy tts.
+* @precondition                                NA
+* @postcondition                       NA
+*/
+int ITc_tts_create_destroy_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszAvailMemLog   = NULL;
+       char *pszCreateSpeedLog = NULL;
+       char *pszDestroySpeedLog = NULL;
+       int nCreateFailCount = 0;
+       int nDestroyFailCount = 0;
+
+       nRet = tts_destroy(g_pstTts);
+       sleep(2);
+       if ( nRet != TTS_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_destroy failed, error returned = %s \\n", __LINE__, TtsGetError(nRet));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszAvailMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszCreateSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszDestroySpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet= tts_create(&g_pstTts);
+               sleep(2);
+               TtsExecutionDelay(pszCreateSpeedLog);
+               if(nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC]  tts_create failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nCreateFailCount++;
+                       continue;
+               }
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet = tts_destroy(g_pstTts);
+               sleep(2);
+               TtsExecutionDelay(pszDestroySpeedLog);
+               if ( nRet != TTS_ERROR_NONE )
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_destroy failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nDestroyFailCount++;
+                       continue;
+               }
+
+               TtsGetMemStatus(pszAvailMemLog);
+       }
+
+       tts_create(&g_pstTts);
+       sleep(2);
+
+       if(nRet != TTS_ERROR_NONE)
+       {
+                       FPRINTF("[Line : %d][tts_ITC]  tts_create failed, error returned = %s \\n", __LINE__, TtsGetError(nRet));
+                       return 1;
+       }
+
+       if ( nCreateFailCount > 0 || nDestroyFailCount > 0)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_create failed %d times, tts_destroy failed %d times out of %d times \\n", __LINE__, nCreateFailCount, nDestroyFailCount, MAX_COUNT);
+               FreeMemory(pszAvailMemLog, pszCreateSpeedLog, pszDestroySpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_create, pszCreateSpeedLog);
+       PRINT_SPEED_LOG(tts_destroy, pszDestroySpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_create, pszAvailMemLog);
+#endif
+
+       FreeMemory(pszAvailMemLog, pszCreateSpeedLog, pszDestroySpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To set and get the tts mode.
+/**
+* @testcase                            ITc_tts_set_get_mode_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @scenario                                    create a tts handler\n
+*                                                      set different mode\n
+*                                                      get that mode\n
+*                                                      match those values\n
+*                                                      destroy that handler
+* @apicovered                          tts_set_mode, tts_get_mode
+* @passcase                                    if API is successful
+* @failcase                                    if API is not successful
+* @precondition                                The state should be TTS_STATE_CREATED.
+* @postcondition                       NA
+*/
+int ITc_tts_set_get_mode_p(void)
+{
+       START_TEST;
+       int nRet = 0, nSetFailCount = 0, nGetFailCount = 0, nLoopCounter = 0, nMismatchCount = 0;
+       char *pszSetGetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszGetSpeedLog = NULL;
+       tts_mode_e eGetMode;
+
+#if MEMORY_CHECK
+       pszSetGetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog  =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszGetSpeedLog  =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for(nLoopCounter = 0; nLoopCounter < MAX_COUNT; nLoopCounter++)
+       {
+               TtsGetMemAllocation();
+
+               TtsGetTimeOfDay();
+               //Target API
+               nRet = tts_set_mode(g_pstTts, TTS_MODE_NOTIFICATION);
+               TtsExecutionDelay(pszSetSpeedLog);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_set_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCounter, TtsGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               TtsGetTimeOfDay();
+               //Target API
+               nRet = tts_get_mode(g_pstTts, &eGetMode);
+               TtsExecutionDelay(pszGetSpeedLog);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_get_mode failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCounter, TtsGetError(nRet));
+                       nGetFailCount++;
+               }
+               else if(eGetMode != TTS_MODE_NOTIFICATION)
+               {
+                       nMismatchCount++;
+                       FPRINTF("[Line : %d][tts_ITC] tts_set_get_mode mismatched on iteration %d, error returned = %s \\n", __LINE__, nLoopCounter, TtsGetError(nRet));
+               }
+
+               TtsGetMemStatus(pszSetGetMemLog);
+       }
+
+
+       if ( nSetFailCount > 0 || nGetFailCount > 0 || nMismatchCount > 0 )
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_set_mode failed %d times, tts_get_mode failed %d times, tts_set_get_mode mismatched %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_set_mode, pszSetSpeedLog);
+       PRINT_SPEED_LOG(tts_get_mode, pszGetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_set_get_mode, pszSetGetMemLog);
+#endif
+
+       FreeMemory(pszSetGetMemLog, pszSetSpeedLog, pszGetSpeedLog, NULL);
+       return 0;
+
+}
+
+//& type: auto
+//& purpose: To get the dafault voice
+/**
+* @testcase                            ITc_tts_get_default_voice_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @scenario                                    create a tts handler\n
+*                                                      get the default voice set by the user\n
+*                                                      destroy that handler
+* @apicovered                          tts_get_default_voice
+* @passcase                                    if API is successful
+* @failcase                                    if API is not successful
+* @precondition                                NA
+* @postcondition                       NA
+*/
+
+int ITc_tts_get_default_voice_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszEffMemLog   = NULL;
+       char *pszEffSpeedLog = NULL;
+       int nEffFailCount = 0;
+       int nFailCount = 0;
+       int eGetvoicetype;
+       char* pszGetLanguage = NULL;
+
+#if MEMORY_CHECK
+               pszEffMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszEffSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+
+               TtsGetTimeOfDay();
+               //Target API
+               nRet =  tts_get_default_voice(g_pstTts, &pszGetLanguage, &eGetvoicetype);
+               TtsExecutionDelay(pszEffSpeedLog);
+               if (nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_get_default_voice failed %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nEffFailCount++;
+                       continue;
+               }
+               else if(pszGetLanguage == NULL)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_get_default_voice API fails because get language is NULL \\n", __LINE__);
+                       nFailCount++;
+               }
+               if(pszGetLanguage)
+               {
+                       free(pszGetLanguage);
+                       pszGetLanguage = NULL;
+               }
+
+               TtsGetMemStatus(pszEffMemLog);
+       }
+       if ( nEffFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_get_default_voice failed %d times, tts_get_default_voice API fails because get language %d times out of %d times\\n", __LINE__, nEffFailCount, nFailCount, MAX_COUNT);
+               FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_get_default_voice, pszEffSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_get_default_voice, pszEffMemLog);
+#endif
+       FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the current state a tts handler
+/**
+* @testcase                            ITc_tts_get_state_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @scenario                                    create a tts handler\n
+*                                                      get the state of the tts\n
+*                                                      match the state and check that it is in TTS_STATE_CREATED state\n
+*                                                      destroy that handler
+* @apicovered                          tts_get_state
+* @passcase                                    if API is successful
+* @failcase                                    if API is not successful
+* @precondition                                NA
+* @postcondition                       NA
+*/
+
+int ITc_tts_get_state_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszEffMemLog   = NULL;
+       char *pszEffSpeedLog = NULL;
+       int nEffFailCount = 0;
+       int nFailCount = 0;
+       tts_state_e state;
+
+#if MEMORY_CHECK
+       pszEffMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszEffSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+               TtsGetTimeOfDay();
+
+               //Target API
+               nRet =  tts_get_state(g_pstTts, &state);
+
+               TtsExecutionDelay(pszEffSpeedLog);
+               if (nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_get_state failed %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nEffFailCount++;
+                       continue;
+               }
+               if( state != TTS_STATE_CREATED)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] get state is not matched \\n", __LINE__);
+                       nFailCount++;
+               }
+
+               TtsGetMemStatus(pszEffMemLog);
+       }
+
+       if ( nEffFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_get_state failed %d times, get state is not matched %d times out of %d times\\n", __LINE__, nEffFailCount, nFailCount, MAX_COUNT);
+               FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_get_state, pszEffSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_get_state, pszEffMemLog);
+#endif
+       FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: Prepare and unprepare the tts.
+//& type: auto
+/**
+* @testcase                            ITc_tts_prepare_unprepare_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         to prepare and unprepare tts
+* @scenario                                    Create audio tts\n
+*                                                      Prepares tts\n
+*                                                      Destroy tts
+* @apicovered                          tts_prepare, tts_unprepare
+* @passcase                                    If tts gets prepared successfully
+* @failcase                            If tts does not get prepared successfully
+* @precondition                                The tts state should be TTS_STATE_CREATED by tts_create(), tts_create() or tts_unprepare().
+* @postcondition                       The tts state will be TTS_STATE_READY. If tts handle is created by tts_create_videotts(), camera state will be changed to CAMERA_STATE_PREVIEW.
+*/
+
+int ITc_tts_prepare_unprepare_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszPrepMemLog = NULL;
+       char *pszPrepSpeedLog = NULL;
+       char *pszUnprepSpeedLog = NULL;
+       int nPrepFailCount = 0;
+       int nUnprepFailCount = 0;
+
+       if(TtsSetStateChangedCallBacks(TtsStateChangedCallback) == 1)
+       {
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszPrepMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszPrepSpeedLog  =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnprepSpeedLog  =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+
+               g_bTtsStateChangedCallback = false;
+               TtsGetTimeOfDay();
+               //Target API
+               nRet=tts_prepare(g_pstTts);
+               TtsExecutionDelay(pszPrepSpeedLog);
+               if(nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_prepare failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nPrepFailCount++;
+                       continue;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_prepare passed on iteration %d \n\\n", __LINE__, nLoopCount);
+               }
+
+               TtsWaitForAsync();
+
+               if (!g_bTtsStateChangedCallback)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_set_state_changed_cb failed on iteration = %d , error returned = callback not invoked\\n \\n", __LINE__, nLoopCount);
+                       nPrepFailCount++;
+                       continue;
+               }
+
+               g_bTtsStateChangedCallback = false;
+               TtsGetTimeOfDay();
+               //Target API
+               nRet=tts_unprepare(g_pstTts);
+               TtsExecutionDelay(pszUnprepSpeedLog);
+               if(nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_unprepare failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+
+                       nUnprepFailCount++;
+               }
+               else
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_unprepare passed on iteration %d \n\\n", __LINE__, nLoopCount);
+               }
+
+               TtsWaitForAsync();
+
+               if (!g_bTtsStateChangedCallback)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_set_state_changed_cb failed on iteration = %d , error returned = callback not invoked\\n \\n", __LINE__, nLoopCount);
+                       nUnprepFailCount++;
+                       continue;
+               }
+
+               TtsGetMemStatus(pszPrepMemLog);
+       }
+
+       TtsUnSetStateChangedCallBacks();
+
+       if ( nPrepFailCount > 0 || nUnprepFailCount > 0  )
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_prepare failed %d times, tts_unprep failed %d times out of %d times\\n", __LINE__, nPrepFailCount, nUnprepFailCount, MAX_COUNT);
+               FreeMemory(pszPrepMemLog, pszPrepSpeedLog, pszUnprepSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_prepare, pszPrepSpeedLog);
+       PRINT_SPEED_LOG(tts_unprepare, pszUnprepSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_prepare_unprepare, pszPrepMemLog);
+#endif
+
+       FreeMemory(pszPrepMemLog, pszPrepSpeedLog, pszUnprepSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To register a callback function for state change
+/**
+* @testcase                            ITc_tts_setunset_state_changed_cb_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @scenario                                    create a tts handler\n
+*                                                      register a state change callback function\n
+*                                                      prepare for the tts\n
+*                                                      check the state changed callback\n
+*                                                      unprepare the tts\n
+*                                                      unregister the state change callback\n
+*                                                      destroy that handler
+* @apicovered                          tts_prepare, tts_unprepare, tts_set_state_changed_cb, tts_unset_state_changed_cb
+* @passcase                                    if API is successful
+* @failcase                                    if API is not successful
+* @precondition
+* @postcondition                       NA
+*/
+
+int ITc_tts_setunset_state_changed_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet =  tts_set_state_changed_cb(g_pstTts, TtsStateChangedCallback, NULL);
+               TtsExecutionDelay(pszSetSpeedLog);
+               if (nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_set_state_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               g_bTtsStateChangedCallback = false;
+               nRet=tts_prepare(g_pstTts);
+               if(nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_prepare failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       continue;
+               }
+               TtsWaitForAsync();
+               if (!g_bTtsStateChangedCallback)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_state_changed_cb failed on iteration = %d , error returned = callback not invoked, time out  \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+
+               g_bTtsStateChangedCallback = false ;
+               nRet=tts_unprepare(g_pstTts);
+               if(nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_unprepare failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       continue;
+               }
+               TtsWaitForAsync();
+               if (!g_bTtsStateChangedCallback)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_state_changed_cb failed on iteration = %d , error returned = callback not invoked, time out  \\n", __LINE__, nLoopCount);
+                       nFailCount++;
+               }
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet =  tts_unset_state_changed_cb(g_pstTts);
+               TtsExecutionDelay(pszUnsetSpeedLog);
+               if (nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_unset_state_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nUnsetFailCount++;
+                       continue;
+               }
+
+               TtsGetMemStatus(pszSetUnsetMemLog);
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_set_state_changed_cb failed %d times, tts_unset_state_changed_cb failed %d times,tts_state_changed_cb failed %d times out of %d times\\n", __LINE__, nSetFailCount, nUnsetFailCount,nFailCount, MAX_COUNT);
+               FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_set_state_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(tts_unset_state_changed_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_setunset_state_changed_cb, pszSetUnsetMemLog);
+#endif
+
+       FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: to get max text count of the current engine
+/**
+* @testcase                            ITc_tts_get_max_text_size_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @scenario                                    create a tts handler and prepare for the tts\n
+*                                                      add text to the queue\n
+*                                                      get the max text count of the current engine\n
+*                                                      unprepare the tts\n
+*                                                      destroy that handler
+* @apicovered                          tts_get_max_text_size
+* @passcase                                    if API is successful
+* @failcase                                    if API is not successful
+* @precondition
+* @postcondition                       NA
+*/
+
+int ITc_tts_get_max_text_size_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszEffMemLog   = NULL;
+       char *pszEffSpeedLog = NULL;
+       int nEffFailCount = 0;
+       int nFailCount = 0;
+       unsigned int nGetTextCount = 0;
+
+       if(TtsPrepare(TtsStateChangedCallback) == false)
+       {
+               return 1;
+       }
+
+#if MEMORY_CHECK
+               pszEffMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+               pszEffSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet =  tts_get_max_text_size(g_pstTts, &nGetTextCount);
+               TtsExecutionDelay(pszEffSpeedLog);
+               if (nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_get_max_text_size failed %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nEffFailCount++;
+                       continue;
+               }
+               else if(nGetTextCount <= 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_get_max_text_size API fails because get count does not change \\n", __LINE__);
+                       nFailCount++;
+               }
+
+               TtsGetMemStatus(pszEffMemLog);
+       }
+
+       TtsUnPrepare();
+
+       if ( nEffFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_get_max_text_size failed %d times, tts_get_max_text_size API fails because get count does not change mismatched %d times out of %d times\\n", __LINE__, nEffFailCount, nFailCount, MAX_COUNT);
+               FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+               PRINT_SPEED_LOG(tts_get_max_text_size, pszEffSpeedLog);
+#endif
+#if MEMORY_CHECK
+               PRINT_MEMORY_LOG(tts_get_max_text_size, pszEffMemLog);
+#endif
+               FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+               return 0;
+}
+
+//& type: auto
+//& purpose: to get max text count of the current engine
+/**
+* @testcase                            ITc_tts_get_speed_range_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @scenario                                    create a tts handler and prepare for the tts\n
+*                                                      get the max text count of the current engine\n
+*                                                      unprepare the tts\n
+*                                                      destroy that handler
+* @apicovered                          tts_unprepare, tts_get_speed_range
+* @passcase                                    if API is successful
+* @failcase                                    if API is not successful
+* @precondition
+* @postcondition                       NA
+*/
+
+int ITc_tts_get_speed_range_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszEffMemLog   = NULL;
+       char *pszEffSpeedLog = NULL;
+       int nEffFailCount = 0;
+       int nFailCount = 0;
+       int nMin =-1;
+       int nNormal =-1;
+       int nMax =-1;
+       if(TtsPrepare(TtsStateChangedCallback) == false)
+       {
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszEffMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszEffSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet =  tts_get_speed_range(g_pstTts, &nMin, &nNormal, &nMax);
+               TtsExecutionDelay(pszEffSpeedLog);
+               if (nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_get_speed_range failed %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nEffFailCount++;
+                       continue;
+               }
+               else if(nMin < 0 || nNormal < 0 || nMax < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_get_speed_range API fails because nMin or nNormal or nMax does not change \\n", __LINE__);
+                       nFailCount++;
+               }
+
+               TtsGetMemStatus(pszEffMemLog);
+       }
+
+       TtsUnPrepare();
+
+       if ( nEffFailCount > 0 || nFailCount > 0)
+       {
+                       FPRINTF("[Line : %d][tts_ITC] tts_get_speed_range failed %d times, tts_get_speed_range API fails because get count does not change mismatched %d times out of %d times\\n", __LINE__, nEffFailCount, nFailCount, MAX_COUNT);
+                       FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+                       return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_get_speed_range, pszEffSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_get_speed_range, pszEffMemLog);
+#endif
+       FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+       return 0;
+}
+
+//& purpose: play playback
+//& type : auto
+/**
+* @testcase                            ITc_tts_add_text_play_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         start playback
+* @scenario                                    Initialize tts handle\n
+*                                                      play tts\n
+*                                                      destroy the handler
+* @apicovered                          tts_add_text, tts_play
+* @passcase                                    When API pass
+* @failcase                                    When API fails
+* @precondition                                the tts state should be TTS_STATE_PLAYING
+* @postcondition                       NA
+*/
+int ITc_tts_add_test_play_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszPlayMemLog   = NULL;
+       char *pszTextSpeedLog = NULL;
+       char *pszPlaySpeedLog = NULL;
+       int nTextFailCount = 0;
+       int nPlayFailCount = 0;
+       int nGetUtteranceId;
+       int eGetvoicetype;
+       char* pszGetLanguage = NULL;
+
+       if(TtsSetUtteranceCallBacks(TtsUtteranceStartedCallback, TtsUtteranceCompletedCallback) == 1)
+       {
+               return 1;
+       }
+       if(TtsPrepare(TtsStateChangedCallback) == false)
+       {
+               return 1;
+       }
+
+       nRet = tts_get_default_voice(g_pstTts, &pszGetLanguage, &eGetvoicetype);
+       if(nRet < 0)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_get_default_voice API fails with return value: %d, error code is: %s \\n", __LINE__,nRet, TtsGetError(nRet));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszPlayMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszTextSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszPlaySpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));;
+#endif
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet = tts_add_text(g_pstTts, INPUT_TEXT, pszGetLanguage, eGetvoicetype, TTS_SPEED_AUTO , &nGetUtteranceId);
+               TtsExecutionDelay(pszTextSpeedLog);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_add_text API fails with return value: %d, error code is: %s \\n", __LINE__, nRet, TtsGetError(nRet));
+                       nTextFailCount++;
+                       continue;
+               }
+
+               g_bTtsUtteranceStartedCallback = false;
+               g_bTtsUtteranceCompletedCallback = false;
+               TtsGetTimeOfDay();
+               // Target API
+               nRet = tts_play(g_pstTts);
+               TtsExecutionDelay(pszPlaySpeedLog);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_play API fails with return value: %d, error code is: %s \\n", __LINE__, nRet, TtsGetError(nRet));
+                       nPlayFailCount++;
+                       continue;
+               }
+               TtsWaitForAsync();
+               TtsWaitForAsync();
+               if((g_bTtsUtteranceStartedCallback == false) || (g_bTtsUtteranceCompletedCallback == false))
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_play API fails with return value: %d, error code is: CallBack not invoked \\n", __LINE__, nRet);
+                       nPlayFailCount++;
+                       continue;
+               }
+
+               TtsGetMemStatus(pszPlayMemLog);
+       }
+
+       TtsUnPrepare();
+       TtsUnSetUtteranceCallBacks();
+
+       if ( nTextFailCount > 0 || nPlayFailCount > 0)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_add_text failed %d times, tts_play failed %d times out of %d times\\n", __LINE__, nTextFailCount, nPlayFailCount, MAX_COUNT);
+               FreeMemory(pszTextSpeedLog, pszPlaySpeedLog, pszPlayMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_add_text, pszTextSpeedLog);
+       PRINT_SPEED_LOG(tts_play, pszPlaySpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_play, pszPlayMemLog);
+#endif
+       FreeMemory(pszTextSpeedLog, pszPlaySpeedLog, pszPlayMemLog, NULL);
+       return 0;
+}
+
+//& purpose: pause stop playback
+//& type : auto
+/**
+* @testcase                            ITc_tts_pause_stop_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @description                         pause stop playback
+* @scenario                                    Initialize tts handle\n
+*                                                      pause tts\n
+*                                                      stop tts\n
+*                                                      destroy the handler
+* @apicovered                          tts_pause, tts_stop
+* @passcase                                    When API pass
+* @failcase                                    When API fails
+* @precondition                                the tts state should be TTS_STATE_READY
+* @postcondition                       NA
+*/
+int ITc_tts_pause_stop_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszPauseMemLog   = NULL;
+       char *pszPauseSpeedLog = NULL;
+       char *pszStopSpeedLog = NULL;
+       int nTextFailCount = 0;
+       int nPlayFailCount = 0;
+       int nPauseFailCount = 0;
+       int nStopFailCount = 0;
+       int nGetUtteranceId;
+       int eGetvoicetype;
+       char* pszGetLanguage = NULL;
+
+       if(TtsSetUtteranceCallBacks(TtsUtteranceStartedCallback, TtsUtteranceCompletedCallback) == 1)
+       {
+               return 1;
+       }
+       if(TtsPrepare(TtsStateChangedCallback) == false)
+       {
+               return 1;
+       }
+
+       nRet = tts_get_default_voice(g_pstTts, &pszGetLanguage, &eGetvoicetype);
+       if(nRet < 0)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_get_default_voice API fails with return value: %d, error code is: %s \\n", __LINE__,nRet, TtsGetError(nRet));
+               return 1;
+       }
+
+#if MEMORY_CHECK
+       pszPauseMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszPauseSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszStopSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));;
+#endif
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+
+               nRet = tts_add_text(g_pstTts, INPUT_TEXT, pszGetLanguage, eGetvoicetype, TTS_SPEED_AUTO , &nGetUtteranceId);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_add_text API fails with return value: %d, error code is: %s \\n", __LINE__, nRet, TtsGetError(nRet));
+                       nTextFailCount++;
+                       continue;
+               }
+
+               g_bTtsUtteranceStartedCallback = false;
+               g_bTtsUtteranceCompletedCallback = false;
+               nRet = tts_play(g_pstTts);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_play API fails with return value: %d, error code is: %s \\n", __LINE__, nRet, TtsGetError(nRet));
+                       nPlayFailCount++;
+                       continue;
+               }
+               TtsWaitForAsync();
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet = tts_pause(g_pstTts);
+               TtsExecutionDelay(pszPauseSpeedLog);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_pause API fails with return value: %d, error code is: %s \\n", __LINE__, nRet, TtsGetError(nRet));
+                       nPauseFailCount++;
+                       continue;
+               }
+               TtsWaitForAsync();
+               if(g_bTtsUtteranceCompletedCallback == true)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_pause API fails with return value: %d, error code is: CallBack was invoked even after pause\\n", __LINE__, nRet);
+                       nPauseFailCount++;
+                       continue;
+               }
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet = tts_stop(g_pstTts);
+               TtsExecutionDelay(pszStopSpeedLog);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_stop API fails with return value: %d, error code is: %s \\n", __LINE__, nRet, TtsGetError(nRet));
+                       nStopFailCount++;
+                       continue;
+               }
+               TtsWaitForAsync();
+
+               TtsGetMemStatus(pszPauseMemLog);
+       }
+
+       TtsUnPrepare();
+       TtsUnSetUtteranceCallBacks();
+
+       if ( nTextFailCount > 0 || nPlayFailCount > 0 || nPauseFailCount > 0 || nStopFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_pause failed %d times, tts_stop failed %d times out of %d times\\n", __LINE__, nPauseFailCount, nStopFailCount, MAX_COUNT);
+               FreeMemory(pszPauseSpeedLog, pszStopSpeedLog, pszPauseMemLog, NULL);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_pause, pszPauseSpeedLog);
+       PRINT_SPEED_LOG(tts_stop, pszStopSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_pause_stop, pszPauseMemLog);
+#endif
+       FreeMemory(pszPauseSpeedLog, pszStopSpeedLog, pszPauseMemLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To register a callback function to detect utterance started and completed
+/**
+* @testcase                            ITc_tts_setunset_utterance_started_completed_cb_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @scenario                                    create a tts handler and register all the callbacks\n
+*                                                      prepare the tts\n
+*                                                      get the dafult language and voice type\n
+*                                                      add text to queue for voice data\n
+*                                                      play the text\n
+*                                                      Check whether the utterance callback is called\n
+*                                                      Stop the text\n
+*                                                      unset the callbacks and destroy handlers
+* @apicovered                          tts_set_utterance_started_cb,tts_get_default_voice,tts_unset_utterance_started_cb, tts_set_utterance_completed_cb, tts_unset_utterance_completed_cb
+* @passcase                                    if API is successful
+* @failcase                                    if API is not successful
+* @precondition                                The state should be TTS_STATE_CREATED
+* @postcondition                       NA
+*/
+
+int ITc_tts_setunset_utterance_started_completed_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       int nSetStartedFailCount = 0, nUnsetStartedFailCount = 0;
+       int nSetCompletedFailCount = 0, nUnsetCompletedFailCount = 0;
+       int nOtherFailCount = 0;
+       int nGetUtteranceId;
+       int eGetvoicetype;
+       char *pszSetUnsetMemLog = NULL;
+       char *pszSetStartedSpeedLog = NULL;
+       char *pszUnsetStartedSpeedLog = NULL;
+       char *pszSetCompletedSpeedLog = NULL;
+       char *pszUnsetCompletedSpeedLog = NULL;
+       char *pszGetLanguage = NULL;
+       
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetStartedSpeedLog  =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetStartedSpeedLog  =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszSetCompletedSpeedLog  =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetCompletedSpeedLog  =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif 
+       
+       for(nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+       
+               TtsGetTimeOfDay();
+               // Target API
+               nRet =  tts_set_utterance_started_cb(g_pstTts, TtsUtteranceStartedCallback, NULL);
+               TtsExecutionDelay(pszSetStartedSpeedLog);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_set_utterance_started_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nSetStartedFailCount++;
+                       continue;
+               }
+       
+               TtsGetTimeOfDay();
+               // Target API
+               nRet =  tts_set_utterance_completed_cb(g_pstTts, TtsUtteranceCompletedCallback, NULL);
+               TtsExecutionDelay(pszSetCompletedSpeedLog);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_set_utterance_completed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nSetCompletedFailCount++;
+                       continue;
+               }
+       
+               if(TtsPrepare(TtsStateChangedCallback) == false)
+               {
+                       nOtherFailCount++;
+                       continue;
+               }
+               nRet = tts_get_default_voice(g_pstTts, &pszGetLanguage, &eGetvoicetype);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_get_default_voice API fails with return value: %d on iteration %d, error code is: %s \\n", __LINE__, nRet, nLoopCount, TtsGetError(nRet));
+                       nOtherFailCount++;
+                       continue;
+               }
+               nRet = tts_add_text(g_pstTts, INPUT_TEXT, pszGetLanguage, eGetvoicetype, TTS_SPEED_AUTO, &nGetUtteranceId);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_add_text API fails with return value: %d, error code is: %s \\n", __LINE__, nRet, TtsGetError(nRet));
+                       nOtherFailCount++;
+                       continue;
+               }
+               g_bTtsUtteranceStartedCallback = false;
+               g_bTtsUtteranceCompletedCallback = false;
+               nRet = tts_play(g_pstTts);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_play API fails with return value: %d, error code is: %s \\n", __LINE__, nRet, TtsGetError(nRet));
+                       nOtherFailCount++;
+                       continue;
+               }
+               TtsWaitForAsync();
+               TtsWaitForAsync();
+               if((g_bTtsUtteranceStartedCallback == false) || (g_bTtsUtteranceCompletedCallback == false))
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_play API fails with return value: %d, error code is: CallBack not invoked \\n", __LINE__, nRet);
+                       nOtherFailCount++;
+                       continue;
+               }
+               TtsUnPrepare();
+               
+               TtsGetTimeOfDay();
+               // Target API
+               nRet = tts_unset_utterance_started_cb(g_pstTts);
+               TtsExecutionDelay(pszUnsetStartedSpeedLog);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_unset_utterance_started_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nUnsetStartedFailCount++;
+                       continue;
+               }
+               
+               TtsGetTimeOfDay();
+               // Target API
+               nRet = tts_unset_utterance_completed_cb(g_pstTts);
+               TtsExecutionDelay(pszUnsetCompletedSpeedLog);
+               if(nRet < 0)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_unset_utterance_completed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nUnsetCompletedFailCount++;
+                       continue;
+               }
+               
+               TtsGetMemStatus(pszSetUnsetMemLog);
+       }
+
+       if ( nSetStartedFailCount > 0 || nSetCompletedFailCount > 0 || nUnsetStartedFailCount > 0 || nUnsetCompletedFailCount > 0 || nOtherFailCount > 0)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_set_utterance_started_cb failed %d times, tts_unset_utterance_started_cb failed %d times out of %d times\\n", __LINE__, nSetStartedFailCount, nUnsetStartedFailCount, MAX_COUNT);
+               FPRINTF("[Line : %d][tts_ITC] tts_set_utterance_completed_cb failed %d times, tts_unset_utterance_completed_cb failed %d times out of %d times\\n", __LINE__, nSetCompletedFailCount, nUnsetCompletedFailCount, MAX_COUNT);
+               FPRINTF("[Line : %d][tts_ITC] Other API failed %d times out of %d times\\n", __LINE__, nOtherFailCount, MAX_COUNT);
+               FreeMemory(pszSetStartedSpeedLog, pszUnsetStartedSpeedLog, pszSetCompletedSpeedLog, pszUnsetCompletedSpeedLog);
+               FreeMemory(pszSetUnsetMemLog, NULL, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_set_utterance_started_cb, pszSetStartedSpeedLog);
+       PRINT_SPEED_LOG(tts_unset_utterance_started_cb, pszUnsetStartedSpeedLog);
+       PRINT_SPEED_LOG(tts_set_utterance_completed_cb, pszSetCompletedSpeedLog);
+       PRINT_SPEED_LOG(tts_unset_utterance_completed_cb, pszUnsetCompletedSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_setunset_utterance_started_completed_cb, pszSetUnsetMemLog);
+#endif
+
+       FreeMemory(pszSetStartedSpeedLog, pszUnsetStartedSpeedLog, pszSetCompletedSpeedLog, pszUnsetCompletedSpeedLog);
+       FreeMemory(pszSetUnsetMemLog, NULL, NULL, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To register a callback function to detect errors.
+/**
+* @testcase                            ITc_tts_setunset_error_cb_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @scenario                                    create a tts handler\n
+*                                                      register a error change callback function\n
+*                                                      play the tts to invoke an error\n
+*                                                      check the error detect callback callback\n
+*                                                      unregister the error change callback\n
+*                                                      destroy that handler
+* @apicovered                          tts_set_error_cb, tts_unset_error_cb
+* @passcase                                    if API is successful
+* @failcase                                    if API is not successful
+* @precondition                                the state should be TTS_STATE_CREATED.
+* @postcondition                       NA
+*/
+
+int ITc_tts_setunset_error_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetErrorMemLog   = NULL;
+       char *pszSetErrorSpeedLog = NULL;
+       char *pszUnsetErrorSpeedLog = NULL;
+       int nSetErrorFailCount = 0;
+       int nUnsetErrorFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetErrorMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetErrorSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetErrorSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet =  tts_set_error_cb(g_pstTts, TtsErrorCallback, NULL);
+               TtsExecutionDelay(pszSetErrorSpeedLog);
+               if (nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_set_error_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nSetErrorFailCount++;
+                       continue;
+               }
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet =  tts_unset_error_cb(g_pstTts);
+               TtsExecutionDelay(pszUnsetErrorSpeedLog);
+               if (nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_unset_error_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nUnsetErrorFailCount++;
+                       continue;
+               }
+
+               TtsGetMemStatus(pszSetUnsetErrorMemLog);
+       }
+
+       if ( nSetErrorFailCount > 0 || nUnsetErrorFailCount > 0 )
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_set_error_cb failed %d times, tts_unset_error_cb failed %d times out of %d times\\n", __LINE__, nSetErrorFailCount, nUnsetErrorFailCount, MAX_COUNT);
+               FreeMemory(pszSetUnsetErrorMemLog, pszSetErrorSpeedLog, pszUnsetErrorSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_set_error_cb, pszSetErrorSpeedLog);
+       PRINT_SPEED_LOG(tts_unset_error_cb, pszUnsetErrorSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_setunset_error_cb, pszSetUnsetErrorMemLog);
+#endif
+
+       FreeMemory(pszSetUnsetErrorMemLog, pszSetErrorSpeedLog, pszUnsetErrorSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To register a callback function to detect default voice change.
+/**
+* @testcase                            ITc_tts_setunset_default_voice_changed_cb_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @scenario                                    create a tts handler\n
+*                                                      get the dafault voice\n
+*                                                      register a default voice change callback function\n
+*                                                      change the dafault voice from device\n
+*                                                      check whether the dafault voice callback invoked or not\n
+*                                                      unregister the default voice change callback\n
+*                                                      destroy that handler
+* @apicovered                          tts_set_default_voice_changed_cb, tts_unset_default_voice_changed_cb
+* @passcase                                    if API is successful
+* @failcase                                    if API is not successful
+* @precondition                                The state should be TTS_STATE_CREATED.
+* @postcondition                       NA
+*/
+
+int ITc_tts_setunset_default_voice_changed_cb_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszSetUnsetMemLog   = NULL;
+       char *pszSetSpeedLog = NULL;
+       char *pszUnsetSpeedLog = NULL;
+       int nSetFailCount = 0;
+       int nUnsetFailCount = 0;
+
+#if MEMORY_CHECK
+       pszSetUnsetMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszSetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       pszUnsetSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+               
+               TtsGetTimeOfDay();
+               // Target API
+               nRet = tts_set_default_voice_changed_cb (g_pstTts, TtsDefaultVoiceChangedCallback, NULL);
+               TtsExecutionDelay(pszSetSpeedLog);
+               if (nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_set_default_voice_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nSetFailCount++;
+                       continue;
+               }
+
+               TtsGetTimeOfDay();
+               // Target API
+               nRet =  tts_unset_default_voice_changed_cb(g_pstTts);
+               TtsExecutionDelay(pszUnsetSpeedLog);
+               if (nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_unset_state_changed_cb failed on iteration %d,  error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nUnsetFailCount++;
+                       continue;
+               }
+
+               TtsGetMemStatus(pszSetUnsetMemLog);
+       }
+
+       if ( nSetFailCount > 0 || nUnsetFailCount > 0)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_set_default_voice_changed_cb failed %d times, tts_unset_default_voice_changed_cb failed %d times out of %d times\\n", __LINE__, nSetFailCount, nUnsetFailCount, MAX_COUNT);
+               FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_set_default_voice_changed_cb, pszSetSpeedLog);
+       PRINT_SPEED_LOG(tts_unset_default_voice_changed_cb, pszUnsetSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_setunset_default_voice_changed_cb, pszSetUnsetMemLog);
+#endif
+
+       FreeMemory(pszSetUnsetMemLog, pszSetSpeedLog, pszUnsetSpeedLog, NULL);
+       return 0;
+}
+
+//& type: auto
+//& purpose: To get the list of supported voices.
+/**
+* @testcase                            ITc_tts_foreach_supported_voices_p
+* @since_tizen                                 2.3
+* @type                                        auto
+* @scenario                                    create a tts handler\n
+*                                                      tts_foreach_supported_voices\n
+*                                                      check whether the callback is called or not\n
+*                                                      destroy that handler
+* @apicovered                          tts_foreach_supported_voices
+* @passcase                                    if API is successful
+* @failcase                                    if API is not successful
+* @precondition                                tts_foreach_supported_voices() will invoke this callback function.
+* @postcondition                       NA
+*/
+
+int ITc_tts_foreach_supported_voices_p(void)
+{
+       START_TEST;
+       int nRet = -1, nLoopCount = 0;
+       char *pszEffMemLog   = NULL;
+       char *pszEffSpeedLog = NULL;
+       int nEffFailCount = 0;
+       int nFailCount = 0;
+
+#if MEMORY_CHECK
+       pszEffMemLog =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+
+#if SPEED_CHECK
+       pszEffSpeedLog =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               TtsGetMemAllocation();
+
+               g_bTtsSupportedVoiceCallback = false;
+               TtsGetTimeOfDay();
+               // Target API
+               nRet =  tts_foreach_supported_voices(g_pstTts, TtsSupportedVoiceCallback, NULL);
+               TtsExecutionDelay(pszEffSpeedLog);
+               if (nRet != TTS_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_foreach_supported_voices failed %d, error returned = %s \\n", __LINE__, nLoopCount, TtsGetError(nRet));
+                       nEffFailCount++;
+                       continue;
+               }
+               TtsWaitForAsync();
+               if (!g_bTtsSupportedVoiceCallback)
+               {
+                       FPRINTF("[Line : %d][tts_ITC] tts_foreach_supported_voices failed on iteration = %d , error returned = callback not invoked\\n", __LINE__, nLoopCount);
+                       nFailCount ++;
+               }
+
+               TtsGetMemStatus(pszEffMemLog);
+       }
+
+       if ( nEffFailCount > 0 || nFailCount > 0)
+       {
+               FPRINTF("[Line : %d][tts_ITC] tts_foreach_supported_voices failed %d times out of %d times\\n", __LINE__, nEffFailCount, MAX_COUNT);
+               FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(tts_foreach_supported_voices, pszEffSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(tts_foreach_supported_voices, pszEffMemLog);
+#endif
+       FreeMemory(pszEffMemLog, pszEffSpeedLog, NULL, NULL);
+       return 0;
+}
+
+/** @} */ 
+/** @} */ 
diff --git a/src/itc/tts/tct-tts-native.c b/src/itc/tts/tct-tts-native.c
new file mode 100755 (executable)
index 0000000..93985dd
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-tts-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/tts/tct-tts-native.h b/src/itc/tts/tct-tts-native.h
new file mode 100755 (executable)
index 0000000..642e49f
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_TTS_NATIVE_H__
+#define __TCT_TTS_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_tts_startup(void);
+extern void ITs_tts_cleanup(void);
+
+extern int ITc_tts_create_destroy_p(void);
+extern int ITc_tts_set_get_mode_p(void);
+extern int ITc_tts_get_default_voice_p(void);
+extern int ITc_tts_get_state_p(void);
+extern int ITc_tts_prepare_unprepare_p(void);
+extern int ITc_tts_setunset_state_changed_cb_p(void);
+extern int ITc_tts_get_max_text_size_p(void);
+extern int ITc_tts_get_speed_range_p(void);
+extern int ITc_tts_add_test_play_p(void);
+extern int ITc_tts_pause_stop_p(void);
+extern int ITc_tts_setunset_utterance_started_completed_cb_p(void);
+extern int ITc_tts_setunset_error_cb_p(void);
+extern int ITc_tts_setunset_default_voice_changed_cb_p(void);
+extern int ITc_tts_foreach_supported_voices_p(void);
+
+testcase tc_array[] = {
+    {"ITc_tts_create_destroy_p", ITc_tts_create_destroy_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_set_get_mode_p", ITc_tts_set_get_mode_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_get_default_voice_p", ITc_tts_get_default_voice_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_get_state_p", ITc_tts_get_state_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_prepare_unprepare_p", ITc_tts_prepare_unprepare_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_setunset_state_changed_cb_p", ITc_tts_setunset_state_changed_cb_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_get_max_text_size_p", ITc_tts_get_max_text_size_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_get_speed_range_p", ITc_tts_get_speed_range_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_add_test_play_p", ITc_tts_add_test_play_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_pause_stop_p", ITc_tts_pause_stop_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_setunset_utterance_started_completed_cb_p", ITc_tts_setunset_utterance_started_completed_cb_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_setunset_error_cb_p", ITc_tts_setunset_error_cb_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_setunset_default_voice_changed_cb_p", ITc_tts_setunset_default_voice_changed_cb_p, ITs_tts_startup, ITs_tts_cleanup},
+    {"ITc_tts_foreach_supported_voices_p", ITc_tts_foreach_supported_voices_p, ITs_tts_startup, ITs_tts_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_TTS_NATIVE_H__
diff --git a/src/itc/wav-player/CMakeLists.txt b/src/itc/wav-player/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..3216ec5
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "wav-player")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-media-wav-player")
+SET(TC_SOURCES
+       ITs-wav-player-common.c
+       ITs-wav-player.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-appfw-application
+       glib-2.0
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/wav-player/ITs-wav-player-common.c b/src/itc/wav-player/ITs-wav-player-common.c
new file mode 100755 (executable)
index 0000000..c9a19aa
--- /dev/null
@@ -0,0 +1,247 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-wav-player-common.h"
+
+/** @addtogroup itc-wav-player
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function definitions here
+
+extern struct timeval g_stWavPlayerStartTime;
+extern struct mallinfo g_stWavPlayerMemInfo;
+
+/**
+* @function            WavPlayerGetError
+* @description         Maps error enums to string values
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* WavPlayerGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case WAV_PLAYER_ERROR_NONE:                                             szErrorVal = "WAV_PLAYER_ERROR_NONE";                                   break; 
+       case WAV_PLAYER_ERROR_INVALID_PARAMETER:                szErrorVal = "WAV_PLAYER_ERROR_INVALID_PARAMETER";              break; 
+       case WAV_PLAYER_ERROR_INVALID_OPERATION:                szErrorVal = "WAV_PLAYER_ERROR_INVALID_OPERATION";              break; 
+       case WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED:             szErrorVal = "WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED";   break; 
+       default:                                                                                szErrorVal = "Unknown Error";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            WavPlayerGetDataPath
+* @description         Returnes the application data path
+* @parameter           pAppDataPath: application data path
+* @return                      true if succeed else false
+*/
+bool WavPlayerGetDataPath(char* pAppDataPath)
+{
+       if(NULL == pAppDataPath)
+       {
+               FPRINTF( "[Line : %d] [wav-player_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if(NULL == pPath)
+       {
+               FPRINTF( "[Line : %d] [wav-player_ITc] Unable to get application data path; app_get_data_path returned null value \\n", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF( "[Line : %d] [wav-player_ITc] application data path returned = %s\\n", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+/**
+* @function            WavPlayerAppendToAppDataPath
+* @description         Appends the input string to application data path
+* @parameter           pInputPath: path to append to data path; pFinalPath: final resultant path
+* @return                      true if succeed else false
+*/
+bool WavPlayerAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if( (NULL == pInputPath) || (NULL == pFinalPath) )
+       {
+               FPRINTF( "[Line : %d] [wav-player_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if(false == WavPlayerGetDataPath(pAppDataPath))
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+       
+       FPRINTF( "[Line : %d] [wav-player_ITc] result path returned = %s\\n", __LINE__, pFinalPath);
+
+       return true;
+}
+
+/**
+* @function            SoundType
+* @description         Maps error enums 
+* @parameter           nRet : error code returned
+* @return                      error string
+*/
+char* SoundType(sound_type_e nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case SOUND_TYPE_SYSTEM:                         szErrorVal = "SOUND_TYPE_SYSTEM";                       break; 
+       case SOUND_TYPE_NOTIFICATION:           szErrorVal = "SOUND_TYPE_NOTIFICATION";         break; 
+       case SOUND_TYPE_ALARM:                          szErrorVal = "SOUND_TYPE_ALARM";                        break; 
+       case SOUND_TYPE_RINGTONE:                       szErrorVal = "SOUND_TYPE_RINGTONE";             break; 
+       case SOUND_TYPE_MEDIA:                          szErrorVal = "SOUND_TYPE_MEDIA";                        break; 
+       case SOUND_TYPE_CALL:                           szErrorVal = "SOUND_TYPE_CALL";                         break; 
+       case SOUND_TYPE_VOIP:                           szErrorVal = "SOUND_TYPE_VOIP";                         break;          
+       default:                                                        szErrorVal = "Unknown Error";                           break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function                    WavPlayerGetMemStatus
+* @description         Returns the Memory Allocation state 
+* @parameter[OUT]      pszAPIMemory [String pointer containing the difference of total number of bytes for Current and 
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void WavPlayerGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK       
+
+       if( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+                       
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+                       
+               if(stMemInfo.uordblks > g_stWavPlayerMemInfo.uordblks)
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stWavPlayerMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stWavPlayerMemInfo.uordblks - stMemInfo.uordblks);
+               }
+               
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+       
+#endif
+}
+
+/**
+* @function                    WavPlayerGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void WavPlayerGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stWavPlayerMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           WavPlayerExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String pointer containing the time difference]
+ * @return                     NA
+ *
+ */
+void WavPlayerExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK        
+       if (pszAPITime != NULL)
+       {
+               char* pszLogTime;
+               struct timeval stEnd;
+               unsigned long long ulldifference = 0;
+                       
+               pszLogTime = calloc(TIMELOG , sizeof(char));
+               gettimeofday(&stEnd, NULL);             
+               ulldifference = ((stEnd.tv_sec -g_stWavPlayerStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stWavPlayerStartTime.tv_usec;
+                       
+               sprintf( pszLogTime, "%llu,", ulldifference);
+               strcat(pszAPITime, pszLogTime);
+               free(pszLogTime);
+       }               
+#endif
+}
+/**
+ * @function           WavplayerFreeMemory
+ * @description                Function to free the memory allocated
+ * @parameter          pszMem1, pszMem2, pszMem3 [ pointers to allocated memory]
+ * @return                     NA
+ *
+ */ 
+void WavplayerFreeMemory(char *pszMem1, char *pszMem2, char *pszMem3)
+{
+       if (pszMem1 != NULL)
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if (pszMem2 != NULL)
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if (pszMem3 != NULL)
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+
+}
+
+/**
+ * @function           WavPlayerGetTimeOfDay
+ * @description                Get time prior to target api call & set it to g_stWavPlayerStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */ 
+void WavPlayerGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stWavPlayerStartTime, NULL);
+#endif
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/wav-player/ITs-wav-player-common.h b/src/itc/wav-player/ITs-wav-player-common.h
new file mode 100755 (executable)
index 0000000..9ebd857
--- /dev/null
@@ -0,0 +1,98 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_WAV_PLAYER_COMMON_H_
+#define _ITS_WAV_PLAYER_COMMON_H_
+
+#include "assert.h"
+#include <wav_player.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <app.h>
+
+/** @addtogroup itc-wav-player
+*  @ingroup itc
+*  @{
+*/
+
+#define PATH_LEN                    1024
+#define LOG                                                    100
+#define WIDTH                                          16
+#define HEIGHT                                         9
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define TESTFILE                    "WavPlayerTest.wav"
+FILE *g_fpLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d][wav-player_ITC] Starting test : %s\\n",__LINE__,__FUNCTION__);\
+\
+}
+
+#define PRINT_RESULT(nRet, API) {\
+       if (nRetVal == 0)\
+       {\
+               FPRINTF("\\n[Line : %d][wav-player_ITC]%s passed\\n",__LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("\\n[Line : %d][wav-player_ITC]%s failed, error returned = %s \\n",__LINE__, API, WavPlayerGetError(nRet));\
+               return 1;\
+       }\
+}
+
+#define PRINT_MEMORY_LOG(api, memLog)\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("\\n[Line : %d][wav-player_ITC]%s_MemoryLeakStatus - %s\\n",__LINE__, #api, memLog);\
+       }
+       
+               
+#define PRINT_SPEED_LOG(api, speedLog)\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("\\n[Line : %d][wav-player_ITC]%s_TimeInMicrosec- %s\\n",__LINE__, #api, speedLog);\
+       }
+char* SoundType(sound_type_e nRet);
+char* WavPlayerGetError(int nRet);
+void WavPlayerGetMemAllocation();
+void WavPlayerExecutionDelay(char* pszAPITime);
+void WavPlayerGetTimeOfDay();
+void WavPlayerGetMemStatus(char *pszAPIMemory);
+void WavplayerFreeMemory(char *pszMem1, char *pszMem2, char *pszMem3);
+bool WavPlayerGetDataPath(char* pPath); 
+bool WavPlayerAppendToAppDataPath(char* pInputPath, char* pFinalPath);
+
+/** @} */
+#endif  //_ITS_WAV_PLAYER_COMMON_H_
diff --git a/src/itc/wav-player/ITs-wav-player.c b/src/itc/wav-player/ITs-wav-player.c
new file mode 100755 (executable)
index 0000000..d9608f8
--- /dev/null
@@ -0,0 +1,192 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-wav-player-common.h"
+
+/** @addtogroup itc-wav-player
+*  @ingroup itc
+*  @{
+*/
+
+
+//& set: WavPlayer
+
+struct timeval g_stWavPlayerStartTime;
+struct mallinfo g_stWavPlayerMemInfo;
+bool g_bWavPlayerPlaybackCompletedCallback;
+
+/**
+* @function            ITs_wav_player_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_wav_player_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d][wav-player_ITC]  In startup \\n",__LINE__);
+#endif
+
+       return;
+}
+
+/**
+* @function            ITs_wav_player_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_wav_player_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][wav-player_ITC] In Cleanup \\n",__LINE__);
+#endif
+       return; 
+}
+
+/**
+* @function                            WavPlayerPlaybackCompletedCallback
+* @description                 To Call when transcoding is finished just before storing in the file. 
+* @parameter   [IN]    Wav Player ID 
+* @parameter   [IN]    The user data passed from the callback registration function                    
+* @return                              NA
+*/
+void WavPlayerPlaybackCompletedCallback(int nId, void *user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][wav-player_ITC] WavPlayerPlaybackCompletedCallback is called \\n",__LINE__);
+#endif
+g_bWavPlayerPlaybackCompletedCallback = true;
+
+}
+
+/** @addtogroup itc-wav-player-testcases
+*  @brief              Integration testcases for module wav-player
+*  @ingroup    itc-wav-player
+*  @{
+*/
+
+//& purpose: To start and stop playing a wav
+//& type: auto 
+/**
+* @testcase                    ITc_wav_player_start_stop_p
+* @type                                auto
+* @since_tizen                         2.3
+* @description                 To start and stop playing a wav
+* @scenario                            Start the wav playing \n
+*                       Stop the wav playing
+* @apicovered                  wav_player_start, wav_player_stop                                       
+* @passcase                            When wav_player_start and wav_player_stop  is successful.
+* @failcase                            If target api wav_player_start or wav_player_stop  fails or any precondition api fails.
+* @precondition                        We have to provide sleep according to length of the wav player file.
+* @postcondition               NA
+*/
+int ITc_wav_player_start_stop_p(void)
+{
+       START_TEST;
+    int nRet, nLoopCount = 0;
+       int nId = -1;
+       char *pszMemLog = NULL;
+       char *pszAPI1SpeedLog = NULL;
+       char *pszAPI2SpeedLog = NULL;
+       int nStartFailCount = 0;
+       int nStopFailCount = 0;
+       sound_type_e eSoundType[] = {SOUND_TYPE_SYSTEM,
+                                                                SOUND_TYPE_NOTIFICATION, 
+                                                                SOUND_TYPE_ALARM , 
+                                                                SOUND_TYPE_RINGTONE ,
+                                                                SOUND_TYPE_MEDIA };
+                                                                // SOUND_TYPE_CALL , 
+                                                                // SOUND_TYPE_VOIP
+       int enum_size = sizeof(eSoundType) / sizeof(eSoundType[0]);
+       int enum_counter = 0;
+#if MEMORY_CHECK       
+       pszMemLog =  calloc(MEMLOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszAPI1SpeedLog =  calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+       pszAPI2SpeedLog = calloc(TIMELOG * MAX_COUNT * enum_size, sizeof(char));
+#endif
+       char pPath[PATH_LEN] = {0,};
+       if(false == WavPlayerAppendToAppDataPath(TESTFILE, pPath))
+       {
+               FPRINTF( "[Line : %d] [wav-player_ITC] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+    for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
+       {       
+                for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       // Target API
+                       g_bWavPlayerPlaybackCompletedCallback = false;
+                       WavPlayerGetMemAllocation();
+                       WavPlayerGetTimeOfDay();
+                       nRet = wav_player_start(pPath, eSoundType[enum_counter], WavPlayerPlaybackCompletedCallback, NULL, &nId);
+                       WavPlayerExecutionDelay(pszAPI1SpeedLog);
+                       
+                       if(nRet != 0 )
+                       { 
+                       
+                               FPRINTF("\\n[line : %d][wav-player_ITC] wav_player_start is unsuccessful on iteration = %d , error returned =  %s and enum error for SoundType = %s\\n",__LINE__, nLoopCount, WavPlayerGetError(nRet), SoundType(eSoundType[enum_counter]));
+                               nStartFailCount ++;
+                               continue;
+                       }
+                       
+                       WavPlayerGetTimeOfDay();
+                       nRet = wav_player_stop(nId);
+                       WavPlayerExecutionDelay(pszAPI2SpeedLog);
+                       WavPlayerGetMemStatus(pszMemLog);
+                       if (nRet != 0)
+                       {
+                               FPRINTF("\\n[line : %d][wav-player_ITC] wav_player_stop  failed on iteration = %d , error returned =  %s\\n",__LINE__, nLoopCount, WavPlayerGetError(nRet));
+                               nStopFailCount ++;
+                       }       
+                       usleep(5000000);
+                       if (!g_bWavPlayerPlaybackCompletedCallback)
+                       {
+                               FPRINTF("\\n[line : %d][wav-player_ITC] wav_player_start failed on iteration = %d , error returned = callback not invoked \\n",__LINE__, nLoopCount);
+                               nStartFailCount ++;
+                       }
+                       
+               }
+       }
+       
+       if ( nStartFailCount > 0 || nStopFailCount > 0)
+       {
+               FPRINTF("[Line : %d][wav-player_ITC] wav_player_start or wav_player_stop failed %d and %d time out of %d times\\n",__LINE__, nStartFailCount,  nStopFailCount, MAX_COUNT * enum_size);
+               WavplayerFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+               return 1;
+       }
+#if SPEED_CHECK
+       PRINT_SPEED_LOG(wav_player_start , pszAPI1SpeedLog);
+       PRINT_SPEED_LOG(wav_player_stop, pszAPI2SpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG(wav_player_start_stop , pszMemLog);
+#endif
+       WavplayerFreeMemory(pszAPI1SpeedLog,pszMemLog,pszAPI2SpeedLog);
+       return 0;
+}
+
+/** @} */ 
+/** @} */ 
\ No newline at end of file
diff --git a/src/itc/wav-player/WavPlayerTest.wav b/src/itc/wav-player/WavPlayerTest.wav
new file mode 100755 (executable)
index 0000000..99fc1c2
Binary files /dev/null and b/src/itc/wav-player/WavPlayerTest.wav differ
diff --git a/src/itc/wav-player/tct-wav-player-native.c b/src/itc/wav-player/tct-wav-player-native.c
new file mode 100755 (executable)
index 0000000..deb1a05
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-wav-player-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/wav-player/tct-wav-player-native.h b/src/itc/wav-player/tct-wav-player-native.h
new file mode 100755 (executable)
index 0000000..4684aac
--- /dev/null
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_WAV_PLAYER_NATIVE_H__
+#define __TCT_WAV_PLAYER_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_wav_player_startup(void);
+extern void ITs_wav_player_cleanup(void);
+
+extern int ITc_wav_player_start_stop_p(void);
+
+testcase tc_array[] = {
+    {"ITc_wav_player_start_stop_p", ITc_wav_player_start_stop_p, ITs_wav_player_startup, ITs_wav_player_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_WAV_PLAYER_NATIVE_H__
diff --git a/src/itc/webkit2/CMakeLists.txt b/src/itc/webkit2/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..73f95c5
--- /dev/null
@@ -0,0 +1,44 @@
+SET(PKG_NAME "webkit2")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "ewebkit2")
+SET(TC_SOURCES
+       ITs-webkit2-common.c
+       ITs-webkit2.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       ecore-evas
+       ecore
+       edje
+       eina
+       elementary
+       ewebkit2
+       glib-2.0
+       gobject-2.0
+       x11
+       capi-appfw-application
+       capi-system-info
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/webkit2/ITs-webkit2-common.c b/src/itc/webkit2/ITs-webkit2-common.c
new file mode 100755 (executable)
index 0000000..5a40aa6
--- /dev/null
@@ -0,0 +1,384 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-webkit2-common.h"
+
+/** @addtogroup itc-webkit2
+*  @ingroup itc
+*  @{
+*/
+
+/**
+ * @function           Webkit_EFLCheck_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool Webkit_EFLCheck_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("[Line : %d][WEBKIT2_ITC] Null key value passed to function : Webkit_EFLCheck_System_Info_Feature_Supported\\n",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool(pszKey, &bValue);
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d][WEBKIT2_ITC] system_info_get_platform_bool failed for (key = %s)\\n",__LINE__, pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("[Line : %d][WEBKIT2_ITC] system_info_get_platform_bool returned unsupported feature capability for (key = %s)\\n", __LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line : %d][WEBKIT2_ITC] system_info_get_platform_bool returned supported status feature for (key = %s)\\n", __LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+Ecore_Timer* Webkit_EFL_ContextMenu_Move_Timer = 0;
+Evas_Point Webkit_EFL_ContextMenu_Long_Press_Point = {100, 100};       //sample value {100,100}
+
+
+/**
+* @function            Webkit_EFLGetDataPath
+* @description         Returns the application data path
+* @parameter           pAppDataPath: application data path
+* @return                      true if succeed else false
+*/
+bool Webkit_EFLGetDataPath(char* pAppDataPath)
+{
+       if ( NULL == pAppDataPath )
+       {
+               FPRINTF("[Line : %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if ( NULL == pPath )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get application data path; app_get_data_path returned null value\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+       FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
+       return true;
+}
+
+/**
+* @function            Webkit_EFLAppendToAppDataPath
+* @description         Appends the input string to application data path
+* @parameter           pInputPath: path to append to data path; pFinalPath: final resultant path
+* @return                      true if succeed else false
+*/
+bool Webkit_EFLAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if ( NULL == pInputPath || NULL == pFinalPath )
+       {
+               FPRINTF("[Line : %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLGetDataPath(pAppDataPath) )
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+
+       return true;
+}
+
+/**
+* @function            Webkit_EFLAppendToDataPathWithFileFormat
+* @description         Appends the input string to application data path with file extension in the prefix 
+* @parameter           pInputPath: path to append to data path; pFinalPath: final resultant path
+* @return                      true if succeed else false
+*/
+bool Webkit_EFLAppendToDataPathWithFileFormat(char* pInputPath, char* pFinalPath)
+{
+       if ( NULL == pInputPath || NULL == pFinalPath )
+       {
+               FPRINTF("[Line : %d][%s] Null Path provided; Check the input string\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       char pFileAppDataPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToAppDataPath(pInputPath, pFileAppDataPath) )
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, "file://"); //file prefix appended
+       strcat(pFinalPath, pFileAppDataPath);
+
+       FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
+
+       return true;
+}
+
+/**
+* @function                    Webkit_EFLCreateWebKitView
+* @description         Creates WebKit View
+* @parameter           none
+* @return                      true if success else false
+*/
+bool Webkit_EFLCreateWebKitView()
+{
+       ewk_init();
+       elm_init(0, NULL);
+
+       elm_config_preferred_engine_set(PREFERRED_ENGINE);
+
+       objWebkit_EFL_view.window = elm_win_add(NULL, VIEW_WINDOW_NAME, ELM_WIN_BASIC);
+       if ( NULL == objWebkit_EFL_view.window )
+       {
+               FPRINTF("[Line : %d][%s] elm_win_add returns NULL value\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       elm_win_title_set(objWebkit_EFL_view.window, VIEW_WINDOW_NAME);
+       objWebkit_EFL_view.evas = evas_object_evas_get(objWebkit_EFL_view.window);
+       if ( NULL == objWebkit_EFL_view.evas )
+       {
+               FPRINTF("[Line : %d][%s] evas_object_evas_get returns NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_del(objWebkit_EFL_view.window);
+               return false;
+       }
+
+       objWebkit_EFL_view.background = evas_object_rectangle_add(objWebkit_EFL_view.evas);
+       if ( NULL == objWebkit_EFL_view.background )
+       {
+               FPRINTF("[Line : %d][%s] evas_object_rectangle_add returns NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_del(objWebkit_EFL_view.window);
+               return false;
+       }
+
+       evas_object_name_set(objWebkit_EFL_view.background, VIEW_BKG_NAME);
+       evas_object_color_set(objWebkit_EFL_view.background, 255, 0, 255, 255);
+       evas_object_move(objWebkit_EFL_view.background, 0, 0);
+       evas_object_resize(objWebkit_EFL_view.background, DEFAULT_WIDTH_OF_WINDOW, DEFAULT_HEIGHT_OF_WINDOW);
+       evas_object_layer_set(objWebkit_EFL_view.background, EVAS_LAYER_MIN);
+
+       objWebkit_EFL_view.webview = ewk_view_add(objWebkit_EFL_view.evas);
+       if ( NULL == objWebkit_EFL_view.webview )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_add returns NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_del(objWebkit_EFL_view.window);
+               return false;
+       }
+
+       evas_object_move(objWebkit_EFL_view.webview, WEBVIEW_MOVE, WEBVIEW_MOVE);
+       evas_object_resize(objWebkit_EFL_view.webview, DEFAULT_WIDTH_OF_WINDOW-WEBVIEW_RANGE, DEFAULT_HEIGHT_OF_WINDOW-WEBVIEW_RANGE);
+
+       FPRINTF("[Line : %d][%s] WebkitView created successfully\\n", __LINE__, API_NAMESPACE);
+
+       return true;
+}
+
+/**
+* @function                    Webkit_EFLDestroyWebKitView
+* @description         Destroys WebKit View
+* @parameter           none
+* @return                      none
+*/
+void Webkit_EFLDestroyWebKitView()
+{
+       if ( objWebkit_EFL_view.webview )
+       {
+               evas_object_del(objWebkit_EFL_view.webview);
+       }
+
+       if ( objWebkit_EFL_view.window )
+       {
+               evas_object_del(objWebkit_EFL_view.window);
+       }
+
+       elm_shutdown();
+}
+
+/**
+* @function                    Webkit_EFL_ContextMenu_Move_Timer_Stop
+* @description         Remove the callback
+* @parameter           void* data
+* @return                      Eina_Bool
+*/
+void Webkit_EFL_ContextMenu_Move_Timer_Stop()
+{
+       if ( Webkit_EFL_ContextMenu_Move_Timer )
+       {
+               ecore_timer_del(Webkit_EFL_ContextMenu_Move_Timer);
+               Webkit_EFL_ContextMenu_Move_Timer = 0;
+       }
+
+       evas_event_feed_mouse_up(objWebkit_EFL_view.evas, 1, EVAS_BUTTON_NONE, ecore_time_get(), 0);
+}
+
+/**
+* @function                    Webkit_EFL_ContextMenu_Move_Timer_Callback
+* @description         Callback function
+* @parameter           void* data
+* @return                      Eina_Bool
+*/
+Eina_Bool Webkit_EFL_ContextMenu_Move_Timer_Callback(void* data)
+{
+       evas_event_feed_mouse_move(objWebkit_EFL_view.evas, Webkit_EFL_ContextMenu_Long_Press_Point.x, Webkit_EFL_ContextMenu_Long_Press_Point.y, ecore_time_get(), 0);
+       return ECORE_CALLBACK_RENEW;
+}
+
+/**
+* @function                    Webkit_EFL_ContextMenu_Feed_Mouse_Move
+* @description         Add timer callback
+* @parameter           none
+* @return                      none
+*/
+void Webkit_EFL_ContextMenu_Feed_Mouse_Move()
+{
+       Webkit_EFL_ContextMenu_Move_Timer = ecore_timer_add(0.2, Webkit_EFL_ContextMenu_Move_Timer_Callback, NULL);
+}
+
+/**
+* @function                    Webkit_EFL_ContextMenu_Long_Press_Event_Generate
+* @description         Generate Long Press event
+* @parameter           none
+* @return                      none
+*/
+void Webkit_EFL_ContextMenu_Long_Press_Event_Generate()
+{
+       evas_event_feed_mouse_move(objWebkit_EFL_view.evas, Webkit_EFL_ContextMenu_Long_Press_Point.x, Webkit_EFL_ContextMenu_Long_Press_Point.y, ecore_time_get(), 0);
+       evas_event_feed_mouse_down(objWebkit_EFL_view.evas, 1, EVAS_BUTTON_NONE, ecore_time_get(), 0);
+       Webkit_EFL_ContextMenu_Feed_Mouse_Move();
+}
+
+/**
+* @function                    Webkit_EFL_ContextMenu_Load_Finished
+* @description         Load Finished Callback event
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_ContextMenu_Load_Finished(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_ContextMenu_Load_Finished success\\n", __LINE__, API_NAMESPACE);
+       Webkit_EFL_ContextMenu_Long_Press_Event_Generate();
+}
+
+/**
+* @function                    Webkit_EFL_ContextMenu_Load_Error
+* @description         Error Loading Callback event
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_ContextMenu_Load_Error(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_ContextMenu_Load_Error occurs\\n", __LINE__, API_NAMESPACE);
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFLCreateContextMenuView
+* @description         Creates Context Menu View
+* @parameter           none
+* @return                      true if success else false
+*/
+bool Webkit_EFLCreateContextMenuView()
+{
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(CONTEXT_MENU_PATH, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return false;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_ContextMenu_Load_Finished, 0);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_ContextMenu_Load_Error, 0);
+
+       Eina_Bool bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath);
+       if ( EINA_TRUE != bResult )
+       {
+               Webkit_EFLDestroyWebKitView();
+               return false;
+       }
+
+       evas_object_show(objWebkit_EFL_view.background);
+       evas_object_show(objWebkit_EFL_view.webview);
+       evas_object_show(objWebkit_EFL_view.window);
+
+       FPRINTF("[Line : %d][%s] Webkit Context Menu View created successfully\\n", __LINE__, API_NAMESPACE);
+       return true;
+}
+
+/**
+* @function                    Webkit_EFLDestroyContextMenuView
+* @description         destroy efl context menu
+* @parameter[OUT]      none
+* @return                      NA
+*/
+void Webkit_EFLDestroyContextMenuView()
+{
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_ContextMenu_Load_Finished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_ContextMenu_Load_Error);
+
+       if ( Webkit_EFL_ContextMenu_Move_Timer )
+       {
+               ecore_timer_del(Webkit_EFL_ContextMenu_Move_Timer);
+               Webkit_EFL_ContextMenu_Move_Timer = 0;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+}
+
+/**
+* @function                    Webkit_EFL_main_loop_begin
+* @description         Ecore Main Loop starts
+* @parameter[OUT]      none
+* @return                      NA
+*/
+void Webkit_EFL_main_loop_begin()
+{
+       ecore_main_loop_begin();
+}
+
+
+/**
+* @function                    Webkit_EFL_main_loop_quit
+* @description         Ecore Main Loop quits
+* @parameter[OUT]      none
+* @return                      NA
+*/
+void Webkit_EFL_main_loop_quit()
+{
+       ecore_main_loop_quit();
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/webkit2/ITs-webkit2-common.h b/src/itc/webkit2/ITs-webkit2-common.h
new file mode 100755 (executable)
index 0000000..e36c41a
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_WEBKIT_EFL_COMMON_H_
+#define _ITS_WEBKIT_EFL_COMMON_H_
+
+#include "assert.h"
+#include <Ecore_Evas.h>
+#include <Ecore.h>
+#include <Evas.h>
+#include <Edje.h>
+#include <Eina.h>
+#include <Elementary.h>
+#include <EWebKit.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <system_info.h>
+#include "ewk_context.h"
+#include "ewk_cookie_manager.h"
+#include "ewk_main.h"
+#include "ewk_policy_decision.h"
+#include "ewk_settings.h"
+#include "ewk_view.h"
+#include <unistd.h>
+#include <app.h>
+
+/** @addtogroup itc-webkit2
+*  @ingroup itc
+*  @{
+*/
+
+#define WAIT_CALLBACK                                  5
+#define MICROSECONDS_PER_SECOND                        1000000
+#define LOG                                                            100
+#define VIEW_WINDOW_NAME                               "WEBKIT-EFL-WINDOW"
+#define VIEW_BKG_NAME                                  "view"
+#define PREFERRED_ENGINE                               "opengl_x11"
+#define DEFAULT_WIDTH_OF_WINDOW                        480
+#define DEFAULT_HEIGHT_OF_WINDOW               800
+#define WEBVIEW_MOVE                                   10
+#define WEBVIEW_RANGE                                  20
+#define INITIALIZE_FAIL                                        1
+#define SAMPLE_HTML_FILE                               "webkit2_files/resources/common/sample.html"
+#define SAMPLE_HTML_FILE1                              "webkit2_files/resources/common/sample_1.html"
+#define SAMPLE_HTML_FILE2                              "webkit2_files/resources/common/sample_2.html"
+#define CONTEXT_MENU_PATH                              "webkit2_files/resources/ewk_context_menu/index.html"
+#define SAMPLE_HTML_FILE_TITLE                 "Testing Sample Page"
+#define INVALID_FILE_PATH                              "webkit2_files/resources/common/InvalidFile.html"
+#define POLICY_DECISION_URL                            "http://www.google.com"
+#define RESPONSE_STATUS_CODE_SUCCESS   200
+#define SET_DEFAULT_ENCODING                   "utf-8"
+#define SET_DEFAULT_FONT_SIZE                  10
+#define SET_USER_AGENT                                 "Mozilla/5.0 (Unknown; Linux armv7l **TEST*TEST**) AppleWebKit/534.16+ (KHTML, like Gecko) Version/5.0 Safari/534.16+"
+#define TEST_JS_SCRIPT                                 "document.getElementById('getParaContent').innerHTML"
+#define TIMEOUT_VALUE                                  7.0f
+#define SCALE_FACTOR_VALUE                             2.0
+#define X_CENTRE                                               5
+#define Y_CENTRE                                               5
+#define SET_CONTENT                                            "This is test content page"
+#define SAMPLE_HTML_FILE_VIEW                  "webkit2_files/resources/ewk_view/sample.html"
+#define SAMPLE_FILE_VIEW_TEXT_FIND     "webkit2_files/resources/ewk_view/text_find.html"
+#define SCROLL_BY_X                                            2
+#define SCROLL_BY_Y                                            7
+#define PATH_LEN                                               1024
+#define LAUNCH_URL                                             "https://www.tizen.org"
+#define API_NAMESPACE                                  "WEBKIT2_ITC"
+#define WIFI_FEATURE                                   "http://tizen.org/feature/network.wifi"
+#define TELEPHONY_FEATURE                              "http://tizen.org/feature/network.telephony"
+#define ETHERNET_FEATURE                               "http://tizen.org/feature/network.ethernet"
+
+//Add helper function declarations here
+
+bool Webkit_EFLCheck_System_Info_Feature_Supported(char* pszKey);
+
+FILE *g_fpLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][%s] Starting test : %s \\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
+}
+
+struct WebKit_EFL_ewk_View{
+       Evas_Object* window;
+       Evas* evas;
+       Evas_Object* background;
+       Evas_Object* webview;
+       Evas_Smart*  evas_smart_class;
+};
+
+struct WebKit_EFL_ewk_View objWebkit_EFL_view;
+
+
+bool Webkit_EFLCreateWebKitView();
+void Webkit_EFLDestroyWebKitView();
+bool Webkit_EFLCreateContextMenuView();
+void Webkit_EFLDestroyContextMenuView();
+void Webkit_EFL_main_loop_begin();
+void Webkit_EFL_main_loop_quit();
+void Webkit_EFL_ContextMenu_Move_Timer_Stop();
+bool Webkit_EFLGetDataPath(char* pPath); // this function outputs tha application data path
+bool Webkit_EFLAppendToAppDataPath(char* pInputPath, char* pFinalPath); // this function appends the input string to app data path and outputs the final resultant path
+bool Webkit_EFLAppendToDataPathWithFileFormat(char* pInputPath, char* pFinalPath); // this function appends the input string to app data path with file extension in the prefix and outputs the final resultant path
+
+/** @} */
+#endif  //_ITS_WEBKIT_EFL_COMMON_H_
diff --git a/src/itc/webkit2/ITs-webkit2.c b/src/itc/webkit2/ITs-webkit2.c
new file mode 100755 (executable)
index 0000000..330da7e
--- /dev/null
@@ -0,0 +1,5989 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-webkit2-common.h"
+
+/** @addtogroup itc-webkit2
+*  @ingroup itc
+*  @{
+*/
+
+int g_nFail_ewk_policy_decision_cookie_get = INITIALIZE_FAIL;
+int g_nFail_ewk_policy_decision_url_get = INITIALIZE_FAIL;
+int g_nFail_ewk_policy_decision_scheme_get = INITIALIZE_FAIL;
+int g_nFail_ewk_policy_decision_host_get = INITIALIZE_FAIL;
+int g_nFail_ewk_policy_decision_http_method_get = INITIALIZE_FAIL;
+int g_nFail_ewk_policy_decision_use = INITIALIZE_FAIL;
+int g_nFail_ewk_policy_decision_ignore = INITIALIZE_FAIL;
+int g_nFail_ewk_policy_decision_type_get = INITIALIZE_FAIL;
+int g_nFail_ewk_policy_decision_navigation_type_get = INITIALIZE_FAIL;
+int g_nFail_ewk_policy_decision_response_mime_get = INITIALIZE_FAIL;
+int g_nFail_ewk_policy_decision_response_headers_get = INITIALIZE_FAIL;
+int g_nFail_ewk_policy_decision_response_status_code_get = INITIALIZE_FAIL;
+
+//& set: WebkitEfl
+
+bool g_bWebkit_EFL_LoadSuccess = false;
+bool g_bWebkit_EFL_ScriptExecuted = false;
+
+/**
+* @function            Webkit_EFL_LoadError
+* @description         Callback function to get webkit load error info
+* @parameter           data : user data, webview : evas object, event_info : event information
+* @return                      NA
+*/
+static void Webkit_EFL_LoadError(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_LoadError occurs\\n", __LINE__, API_NAMESPACE);
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function            Webkit_EFL_LoadFinished
+* @description         Callback function to get webkit load finish info
+* @parameter           data : user data, eObject : evas object, dataFinished : event information
+* @return                      NA
+*/
+static void Webkit_EFL_LoadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_LoadFinished Success\\n", __LINE__, API_NAMESPACE);
+       g_bWebkit_EFL_LoadSuccess = true;
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function            Webkit_EFL_LoadProgress
+* @description         Callback function to get load progress info
+* @parameter           data : user data, eObject : evas object, dataFinished : event information
+* @return                      NA
+*/
+static void Webkit_EFL_LoadProgress(void* data, Evas_Object* eObject, void* dataFinished)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_LoadProgress Invoked\\n", __LINE__, API_NAMESPACE);
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function            Webkit_EFL_LoadStarted
+* @description         Callback function to get load started info
+* @parameter           data : user data, eObject : evas object, dataFinished : event information
+* @return                      NA
+*/
+static void Webkit_EFL_LoadStarted(void* data, Evas_Object* eObject, void* dataFinished)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_LoadStarted Invoked\\n", __LINE__, API_NAMESPACE);
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function            Webkit_EFL_FrameRendered
+* @description         Callback function to get frame rendered info
+* @parameter           data : user data, eObject : evas object, dataFinished : event information
+* @return                      NA
+*/
+static void Webkit_EFL_FrameRendered(void* data, Evas_Object* eObject, void* dataFinished)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_FrameRendered Invoked\\n", __LINE__, API_NAMESPACE);
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function            Webkit_EFL_onTextFound
+* @description         Callback function to get webkit on text found info
+* @parameter           userData : user data, webview : evas object, eventInfo : event information
+* @return                      NA
+*/
+static void Webkit_EFL_onTextFound(void* userData, Evas_Object* webview, void* eventInfo)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_onTextFound Invoked\\n", __LINE__, API_NAMESPACE);
+       int* result = (int*)userData;
+       int* matchCount = (int*)eventInfo;
+       *result = *matchCount;
+}
+
+/**
+* @function            Webkit_EFL_LoopQuit
+* @description         Callback function for exiting ecore main loop
+* @parameter           data : user data
+* @return                      bool
+*/
+static Eina_Bool Webkit_EFL_LoopQuit(void* data)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_LoopQuit Invoked\\n", __LINE__, API_NAMESPACE);
+       Webkit_EFL_main_loop_quit();
+       return EINA_FALSE;
+}
+
+/**
+* @function            Webkit_EFL_ScriptExecutionFinished
+* @description         Callback function for script_execute
+* @parameter           webview : evas object, result_value : result, data : user data
+* @return                      NA
+*/
+static void Webkit_EFL_ScriptExecutionFinished(Evas_Object* webview, const char* result_value, void* data)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_ScriptExecutionFinished Invoked\\n", __LINE__, API_NAMESPACE);
+
+       if ( result_value )
+       {
+               FPRINTF("[Line : %d][%s] Webkit_EFL_ScriptExecutionFinished : Result Value = %s\\n", __LINE__, API_NAMESPACE, result_value);
+       }
+
+       g_bWebkit_EFL_ScriptExecuted = true;
+
+       Webkit_EFL_main_loop_quit();
+}
+
+
+/**
+* @function                    Webkit_EFL_GetAcceptPolicyCallback
+* @description         Accept policy Cookie Manager callback
+* @parameter           Ewk_Cookie_Accept_Policy policy, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_GetAcceptPolicyCallback(Ewk_Cookie_Accept_Policy policy, void* event_info)
+{
+       Ewk_Cookie_Accept_Policy* pRetPolicy = (Ewk_Cookie_Accept_Policy*)event_info;
+       *pRetPolicy = policy;
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_LoadFinished
+* @description         Accept policy Cookie Manager callback for Loading Finished
+* @parameter           void *data, Evas_Object *webview, void *arg
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_LoadFinished(void *data, Evas_Object *webview, void *arg)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback_LoadFinished success\\n", __LINE__, API_NAMESPACE);
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_LoadError
+* @description         Accept policy Cookie Manager callback for Loading Error
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_LoadError(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback_LoadError occurs\\n", __LINE__, API_NAMESPACE);
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_cookie_get
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_cookie_get(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_cookie_get invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_cookie_get = 0;
+       if ( pPolicyDecision )
+       {
+               const char* pValue = NULL;
+               //Target API
+               pValue = ewk_policy_decision_cookie_get(pPolicyDecision);
+               if ( NULL == pValue )
+               {
+                       g_nFail_ewk_policy_decision_cookie_get++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_cookie_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_cookie_get = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_url_get
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_url_get(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_url_get invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_url_get = 0;
+       if ( pPolicyDecision )
+       {
+               const char* pValue = NULL;
+               //Target API
+               pValue = ewk_policy_decision_url_get(pPolicyDecision);
+               if ( NULL == pValue )
+               {
+                       g_nFail_ewk_policy_decision_url_get++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_url_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_url_get = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_scheme_get
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_scheme_get(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_scheme_get invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_scheme_get = 0;
+       if ( pPolicyDecision )
+       {
+               const char* pValue = NULL;
+               //Target API
+               pValue = ewk_policy_decision_scheme_get(pPolicyDecision);
+               if ( NULL == pValue )
+               {
+                       g_nFail_ewk_policy_decision_scheme_get++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_scheme_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_scheme_get = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_host_get
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_host_get(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_host_get invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_host_get = 0;
+       if ( pPolicyDecision )
+       {
+               const char* pValue = NULL;
+
+               //Target API
+               pValue = ewk_policy_decision_host_get(pPolicyDecision);
+               if ( NULL == pValue )
+               {
+                       g_nFail_ewk_policy_decision_host_get++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_host_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }               
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_host_get = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_http_method_get
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_http_method_get(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_http_method_get invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_http_method_get = 0;
+       if ( pPolicyDecision )
+       {               
+               const char* pValue = NULL;
+
+               //Target API
+               pValue = ewk_policy_decision_http_method_get(pPolicyDecision);
+               if ( NULL == pValue )
+               {
+                       g_nFail_ewk_policy_decision_http_method_get++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_http_method_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_http_method_get = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_use
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_use(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_use invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_use = 0;
+       if ( pPolicyDecision )
+       {
+               Eina_Bool bResult = EINA_FALSE;
+               //Target API
+               bResult = ewk_policy_decision_use(pPolicyDecision);
+               if ( EINA_TRUE != bResult )
+               {
+                       g_nFail_ewk_policy_decision_use++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_use returned false error value\\n", __LINE__, API_NAMESPACE);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_use = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_ignore
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_ignore(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_ignore invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_ignore = 0;
+       if ( pPolicyDecision )
+       {               
+               Eina_Bool bResult = EINA_FALSE;
+               //Target API
+               bResult = ewk_policy_decision_ignore(pPolicyDecision);
+               if ( EINA_TRUE != bResult )
+               {
+                       g_nFail_ewk_policy_decision_ignore++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_ignore returned false error value\\n", __LINE__, API_NAMESPACE);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_ignore = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_type_get
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_type_get(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_type_get invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_type_get = 0;
+       if ( pPolicyDecision )
+       {
+               Ewk_Policy_Decision_Type eDecisionType = EWK_POLICY_DECISION_USE;
+               //Target API
+               eDecisionType = ewk_policy_decision_type_get(pPolicyDecision);
+               if ( (eDecisionType != EWK_POLICY_DECISION_USE) && (eDecisionType != EWK_POLICY_DECISION_DOWNLOAD) && (eDecisionType != EWK_POLICY_DECISION_IGNORE) )
+               {
+                       g_nFail_ewk_policy_decision_type_get++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_type_get returned wrong value\\n", __LINE__, API_NAMESPACE);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_type_get = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_navigation_type_get
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_navigation_type_get(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_navigation_type_get invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_navigation_type_get = 0;
+       if ( pPolicyDecision )
+       {
+               Ewk_Policy_Navigation_Type eDecisionType = EWK_POLICY_NAVIGATION_TYPE_LINK_CLICKED;
+               //Target API
+               eDecisionType = ewk_policy_decision_navigation_type_get(pPolicyDecision);
+               if ( (eDecisionType != EWK_POLICY_NAVIGATION_TYPE_LINK_CLICKED) && (eDecisionType != EWK_POLICY_NAVIGATION_TYPE_FORM_SUBMITTED) && \
+                       (eDecisionType != EWK_POLICY_NAVIGATION_TYPE_BACK_FORWARD) && (eDecisionType != EWK_POLICY_NAVIGATION_TYPE_RELOAD) &&  \
+                       (eDecisionType != EWK_POLICY_NAVIGATION_TYPE_FORM_RESUBMITTED) && (eDecisionType != EWK_POLICY_NAVIGATION_TYPE_OTHER) )
+               {
+                       g_nFail_ewk_policy_decision_navigation_type_get++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_navigation_type_get returned wrong value\\n", __LINE__, API_NAMESPACE);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_navigation_type_get = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_response_mime_get
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_response_mime_get(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_response_mime_get invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_response_mime_get = 0;
+       if ( pPolicyDecision )
+       {
+               const char* pValue = NULL;
+
+               //Target API
+               pValue = ewk_policy_decision_response_mime_get(pPolicyDecision);
+               if ( NULL == pValue )
+               {
+                       g_nFail_ewk_policy_decision_response_mime_get++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_response_mime_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_response_mime_get = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_response_headers_get
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_response_headers_get(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_response_headers_get invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_response_headers_get = 0;
+       if ( pPolicyDecision )
+       {
+               const Eina_Hash* pValue = NULL;
+               //Target API
+               pValue = ewk_policy_decision_response_headers_get(pPolicyDecision);
+               if ( NULL == pValue )
+               {
+                       g_nFail_ewk_policy_decision_response_headers_get++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_response_headers_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_response_headers_get = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+/**
+* @function                    Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_response_status_code_get
+* @description         Policy Decision callback
+* @parameter           void* data, Evas_Object* webview, void* event_info
+* @return                      none
+*/
+void Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_response_status_code_get(void* data, Evas_Object* webview, void* event_info)
+{
+       FPRINTF("[Line : %d][%s] Webkit_EFL_PolicyDecision_Callback for ewk_policy_decision_response_status_code_get invoked\\n", __LINE__, API_NAMESPACE);
+       Ewk_Policy_Decision* pPolicyDecision = (Ewk_Policy_Decision*)event_info;
+       g_nFail_ewk_policy_decision_response_status_code_get = 0;
+       if ( pPolicyDecision )
+       {
+               int nValue = 0;
+               //Target API
+               nValue = ewk_policy_decision_response_status_code_get(pPolicyDecision);
+               if ( RESPONSE_STATUS_CODE_SUCCESS != nValue )
+               {
+                       g_nFail_ewk_policy_decision_response_status_code_get++;
+                       FPRINTF("[Line : %d][%s] ewk_policy_decision_response_status_code_get returned incorrect status value; expected value = %d, returned value = %d\\n", __LINE__, API_NAMESPACE, RESPONSE_STATUS_CODE_SUCCESS, nValue);
+                       Webkit_EFL_main_loop_quit();
+                       return;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Policy Decision\\n", __LINE__, API_NAMESPACE);
+               g_nFail_ewk_policy_decision_response_status_code_get = INITIALIZE_FAIL;
+       }
+       Webkit_EFL_main_loop_quit();
+}
+
+
+/**
+* @function            ITs_webkit_efl_startup
+* @description         Called before each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_webkit_efl_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line: %d][%s] TEST SUIT start-up: ITs_Webkit2_p\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       return;
+}
+
+/**
+* @function            ITs_webkit_efl_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/ 
+void ITs_webkit_efl_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line: %d][%s] TEST SUIT clean-up: ITs_Webkit2_p\\n", __LINE__, API_NAMESPACE);
+#endif
+       return;
+}
+
+/** @addtogroup itc-webkit2-testcases
+*  @brief              Integration testcases for module webkit2   
+*  @ingroup    itc-webkit2
+*  @{
+*/
+
+//& type: auto
+//& purpose: Initialise webkit instance
+/**
+* @testcase                    ITc_webkit_efl_ewk_init_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Initialise webkit instance
+* @scenario                            Initialise/Increases reference count of webkit instance\n
+*                                              Destroy/Decreases reference count of webkit instance
+* @apicovered                  ewk_init, ewk_shutdown
+* @passcase                            When ewk_init returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_webkit_efl_ewk_init_p(void)
+{
+       START_TEST;
+
+       //Target API
+       int nRetValInit = ewk_init();
+       if ( nRetValInit <= 0 )
+       {
+               FPRINTF("[Line : %d][%s] ewk_init failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       int nRetValShutDown = ewk_shutdown();
+       if ( nRetValShutDown != (nRetValInit-1) )       // reference count should decrease by 1
+       {
+               FPRINTF("[Line : %d][%s] ewk_shutdown failed, webkit instance reference count = %d on initialisation and %d on shutdown \\n", __LINE__, API_NAMESPACE, nRetValInit, nRetValShutDown);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Shutdown webkit instance.
+/**
+* @testcase                    ITc_webkit_efl_ewk_shutdown_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Shutdown webkit instance
+* @scenario                            Initialise/Increases reference count of webkit instance\n
+*                                              Destroy/Decreases reference count of webkit instance
+* @apicovered                  ewk_init, ewk_shutdown
+* @passcase                            When ewk_shutdown returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_webkit_efl_ewk_shutdown_p(void)
+{
+       START_TEST;
+       int nRetValInit = ewk_init();
+       if ( nRetValInit <= 0 )
+       {
+               FPRINTF("[Line : %d][%s] ewk_init failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       //Target API
+       int nRetValShutDown = ewk_shutdown();
+       if (nRetValShutDown != (nRetValInit-1) )        // reference count should decrease by 1
+       {
+               FPRINTF("[Line : %d][%s] ewk_shutdown failed, webkit instance reference count = %d on initialisation and %d on shutdown \\n", __LINE__, API_NAMESPACE, nRetValInit, nRetValShutDown);
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the current item in the BackForward list
+/**
+* @testcase                    ITc_ewk_back_forward_list_current_item_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns the current item in the BackForward list
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Retrieves the BackForwardList item
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_current_item_get
+* @passcase                            When ewk_back_forward_list_current_item_get returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_current_item_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Ewk_Back_Forward_List_Item* pListItem = NULL;
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       pListItem = ewk_back_forward_list_current_item_get(pList);
+       if ( NULL == pListItem )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_current_item_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the previous item in the BackForward list
+/**
+* @testcase                    ITc_ewk_back_forward_list_previous_item_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns the previous item in the BackForward list
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Retrieves the BackForwardList item
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_previous_item_get
+* @passcase                            When ewk_back_forward_list_previous_item_get returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_previous_item_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath1[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE1, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath1);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Ewk_Back_Forward_List_Item* pListItem = NULL;
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       pListItem = ewk_back_forward_list_previous_item_get(pList);
+       if ( NULL == pListItem )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_previous_item_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the next item in the BackForward list
+/**
+* @testcase                    ITc_ewk_back_forward_list_next_item_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns the next item in the BackForward list
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Retrieves the BackForwardList item
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_next_item_get
+* @passcase                            When ewk_back_forward_list_next_item_get returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_next_item_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath1[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE1, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath1);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( EINA_TRUE != ewk_view_back(objWebkit_EFL_view.webview) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_back returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       Ewk_Back_Forward_List_Item* pListItem = NULL;
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       pListItem = ewk_back_forward_list_next_item_get(pList);
+       if ( NULL == pListItem )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_next_item_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the count of items in the BackForward list
+/**
+* @testcase                    ITc_ewk_back_forward_list_count_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns the count of items in the BackForward list
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Retrieves the BackForwardList item count
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_count
+* @passcase                            When ewk_back_forward_list_count returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_count_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath1[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE1, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath1);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       int nListCount = 0;
+       int nActualCnt = 2;//the compare value is '2' because two times url set is done.
+
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       nListCount = ewk_back_forward_list_count(pList);
+       if ( nListCount != nActualCnt )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_count returned incorrect value; expected count = %d, count received = %d\\n", __LINE__, API_NAMESPACE, nActualCnt, nListCount);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the item in regard to index position in the BackForward list
+/**
+* @testcase                    ITc_ewk_back_forward_list_item_at_index_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns the item in regard to index position in the BackForward list
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Retrieves the BackForwardList item
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_item_at_index_get
+* @passcase                            When ewk_back_forward_list_item_at_index_get returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_item_at_index_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath1[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE1, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath1);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Ewk_Back_Forward_List_Item* pListItem = NULL;
+       const Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       pListItem = ewk_back_forward_list_item_at_index_get(pList, -1);
+       if ( NULL == pListItem )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_item_at_index_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       const char* pURL = ewk_back_forward_list_item_url_get(pListItem);
+       if ( NULL == pURL )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_item_url_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( 0 != strcmp(pPath, pURL) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_item_url_get returned different value; expected value = %s, received value = %s\\n", __LINE__, API_NAMESPACE, pPath, pURL);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Copies the BackForward list from back items
+/**
+* @testcase                    ITc_ewk_back_forward_list_n_back_items_copy_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Copies the BackForward list from back items
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Copies the BackForwardList item
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_n_back_items_copy
+* @passcase                            When ewk_back_forward_list_n_back_items_copy returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_n_back_items_copy_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath1[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE1, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath2[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE2, pPath2) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath1);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath2) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath2);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       int nCount = 3; //the value is '3' because two times url set is done.
+       Eina_List* pCopyBackList = NULL;
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API    
+       pCopyBackList = ewk_back_forward_list_n_back_items_copy(pList, nCount - 1);
+       if ( NULL == pCopyBackList )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_n_back_items_copy returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       int nCopyCount = eina_list_count(pCopyBackList);
+       if ( (nCount - 1) != nCopyCount )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_n_back_items_copy output incorrect count value; Expected count = %d, Received count = %d\\n", __LINE__, API_NAMESPACE, nCount - 1, nCopyCount);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Copies the BackForward list from forward items
+/**
+* @testcase                    ITc_ewk_back_forward_list_n_forward_items_copy_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Copies the BackForward list from forward items
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Copies the BackForwardList item
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_n_forward_items_copy
+* @passcase                            When ewk_back_forward_list_n_forward_items_copy returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_n_forward_items_copy_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath1[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE1, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath2[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE2, pPath2) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath1);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath2) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath2);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( EINA_TRUE != ewk_view_back(objWebkit_EFL_view.webview) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_back returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( EINA_TRUE != ewk_view_back(objWebkit_EFL_view.webview) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_back returned error on successive ewk_view_back API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       int nCount = 1; //the value is '1' because one copy is done.
+       Eina_List* pCopyBackList = NULL;
+
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API    
+       pCopyBackList = ewk_back_forward_list_n_forward_items_copy(pList, nCount);
+       if ( NULL == pCopyBackList )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_n_forward_items_copy returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       int nCopyCount = eina_list_count(pCopyBackList);
+       if ( nCount != nCopyCount )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_n_forward_items_copy output incorrect count value; Expected count = %d, Received count = %d\\n", __LINE__, API_NAMESPACE, nCount, nCopyCount);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Increases the reference count of the item in the BackForward list
+/**
+* @testcase                    ITc_ewk_back_forward_list_item_ref_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Increases the reference count of the item in the BackForward list
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Retrieves the BackForwardList item
+*                                              References and dereference the BackForwardList item
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_current_item_get, ewk_back_forward_list_item_ref, ewk_back_forward_list_item_unref
+* @passcase                            When ewk_back_forward_list_item_ref returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_item_ref_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Ewk_Back_Forward_List_Item* pListItem = NULL;
+       Ewk_Back_Forward_List_Item* pRefItem = NULL;
+
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       pListItem = ewk_back_forward_list_current_item_get(pList);
+       if ( NULL == pListItem )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get current item from ewk_back_forward_list_current_item_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       pRefItem = ewk_back_forward_list_item_ref(pListItem);
+       if ( NULL == pRefItem )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_item_ref returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       ewk_back_forward_list_item_unref(pRefItem);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Decreases the reference count of the item in the BackForward list
+/**
+* @testcase                    ITc_ewk_back_forward_list_item_unref_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Decreases the reference count of the item in the BackForward list
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Retrieves the BackForwardList item\n
+*                                              References and dereference the BackForwardList item
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_current_item_get, ewk_back_forward_list_item_ref, ewk_back_forward_list_item_unref
+* @passcase                            When ewk_back_forward_list_item_unref executes properly
+* @failcase                            If target API didn't execute properly
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_item_unref_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Ewk_Back_Forward_List_Item* pListItem = NULL;
+       Ewk_Back_Forward_List_Item* pRefItem = NULL;
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       pListItem = ewk_back_forward_list_current_item_get(pList);
+       if ( NULL == pListItem )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get current item from ewk_back_forward_list_current_item_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       pRefItem = ewk_back_forward_list_item_ref(pListItem);
+       if ( NULL == pRefItem )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_item_ref returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       ewk_back_forward_list_item_unref(pRefItem);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the URL of the BackForward list item
+/**
+* @testcase                    ITc_ewk_back_forward_list_item_url_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the URL of the BackForward list item
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Retrieves the BackForwardList item\n
+*                                              Get the value from the BackForwardList item
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_current_item_get, ewk_back_forward_list_item_url_get
+* @passcase                            When ewk_back_forward_list_item_url_get returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_item_url_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Ewk_Back_Forward_List_Item* pListItem = NULL;
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       pListItem = ewk_back_forward_list_current_item_get(pList);
+       if ( NULL == pListItem )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get current item from ewk_back_forward_list_current_item_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API    
+       const char* pItemValue = ewk_back_forward_list_item_url_get(pListItem);
+       if ( NULL == pItemValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_item_url_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( 0 != strcmp(pPath, pItemValue) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_item_url_get returned incorrect value; Expected value = %s, Returned value = %s\\n", __LINE__, API_NAMESPACE, pPath, pItemValue);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the original URL of the BackForward list item
+/**
+* @testcase                    ITc_ewk_back_forward_list_item_original_url_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the original URL of the BackForward list item
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Retrieves the BackForwardList item\n
+*                                              Get the value from the BackForwardList item
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_current_item_get, ewk_back_forward_list_item_original_url_get
+* @passcase                            When ewk_back_forward_list_item_original_url_get returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_item_original_url_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Ewk_Back_Forward_List_Item* pListItem = NULL;
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       pListItem = ewk_back_forward_list_current_item_get(pList);
+       if ( NULL == pListItem )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get current item from ewk_back_forward_list_current_item_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API    
+       const char* pItemValue = ewk_back_forward_list_item_original_url_get(pListItem);
+       if ( NULL == pItemValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_item_original_url_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( 0 != strcmp(pPath, pItemValue) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_item_original_url_get returned incorrect value; Expected value = %s, Returned value = %s\\n", __LINE__, API_NAMESPACE, pPath, pItemValue);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the title of the BackForward list item
+/**
+* @testcase                    ITc_ewk_back_forward_list_item_title_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the title of the BackForward list item
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the BackForward List\n
+*                                              Retrieves the BackForwardList item\n
+*                                              Get the value from the BackForwardList item
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_back_forward_list_current_item_get, ewk_back_forward_list_item_title_get
+* @passcase                            When ewk_back_forward_list_item_title_get returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_back_forward_list_item_title_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Ewk_Back_Forward_List_Item* pListItem = NULL;
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       pListItem = ewk_back_forward_list_current_item_get(pList);
+       if ( NULL == pListItem )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get current item from ewk_back_forward_list_current_item_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       const char* pItemValue = ewk_back_forward_list_item_title_get(pListItem);
+       if ( NULL == pItemValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_item_title_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( 0 != strcmp(SAMPLE_HTML_FILE_TITLE, pItemValue) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_back_forward_list_item_title_get returned incorrect value; Expected value = %s, Returned value = %s\\n", __LINE__, API_NAMESPACE, SAMPLE_HTML_FILE_TITLE, pItemValue);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Request to set cache model
+/**
+* @testcase                    ITc_ewk_context_cache_model_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Request to set cache model
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_context_cache_model_set to set\n
+*                                              Call ewk_context_cache_model_get to get the value\n
+*                                              Validate the get value\n\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_context_cache_model_set, ewk_context_cache_model_get
+* @passcase                            When ewk_context_cache_model_set able to set the value properly
+* @failcase                            If target API fails or set value not fetched during get operation.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_context_cache_model_set_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Cache_Model eValueSet = EWK_CACHE_MODEL_DOCUMENT_VIEWER;
+       Eina_Bool bResult = EINA_FALSE;
+
+       //Target API
+       bResult = ewk_context_cache_model_set(ewk_view_context_get(objWebkit_EFL_view.webview), eValueSet);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_context_cache_model_set returned error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Ewk_Cache_Model eValueGet = ewk_context_cache_model_get(ewk_view_context_get(objWebkit_EFL_view.webview));
+       if ( eValueSet !=  eValueGet )
+       {
+               FPRINTF("[Line : %d][%s] ewk_context_cache_model_get returned incorrect value; Expected Value = %d, Returned Value = %d\\n", __LINE__, API_NAMESPACE, eValueSet, eValueGet);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Request to get cache model
+/**
+* @testcase                    ITc_ewk_context_cache_model_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Request to get cache model
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_context_cache_model_set to set\n
+*                                              Call ewk_context_cache_model_get to get the value\n
+*                                              Validate the get value\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_context_cache_model_set, ewk_context_cache_model_get
+* @passcase                            When ewk_context_cache_model_get able to get the value properly
+* @failcase                            If target API fails or set value not fetched during get operation.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_context_cache_model_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Cache_Model eValueSet = EWK_CACHE_MODEL_DOCUMENT_VIEWER;
+       Eina_Bool bResult = EINA_FALSE;
+       bResult = ewk_context_cache_model_set(ewk_view_context_get(objWebkit_EFL_view.webview), eValueSet);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_context_cache_model_set returned error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Ewk_Cache_Model eValueGet = EWK_CACHE_MODEL_DOCUMENT_BROWSER;
+       //Target API
+       eValueGet = ewk_context_cache_model_get(ewk_view_context_get(objWebkit_EFL_view.webview));
+       if ( eValueSet !=  eValueGet )
+       {
+               FPRINTF("[Line : %d][%s] ewk_context_cache_model_get returned incorrect value; Expected Value = %d, Returned Value = %d\\n", __LINE__, API_NAMESPACE, eValueSet, eValueGet);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the cookie manager instance for this context
+/**
+* @testcase                    ITc_ewk_context_cookie_manager_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the cookie manager instance for this context
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_context_cookie_manager_get to get the value\n
+*                                              Validate the get value\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_context_cookie_manager_get
+* @passcase                            When ewk_context_cookie_manager_get able to get the value properly
+* @failcase                            If target API fetches invalid value during get operation
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_context_cookie_manager_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Cookie_Manager* eValueGet = NULL;
+       //Target API
+       eValueGet = ewk_context_cookie_manager_get(ewk_view_context_get(objWebkit_EFL_view.webview));
+       if ( NULL ==  eValueGet )
+       {
+               FPRINTF("[Line : %d][%s] ewk_context_cookie_manager_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Clears HTTP caches in the local storage
+/**
+* @testcase                    ITc_ewk_context_resource_cache_clear_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Clears HTTP caches in the local storage
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_context_resource_cache_clear\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_context_resource_cache_clear
+* @passcase                            When ewk_context_resource_cache_clear behaves properly
+* @failcase                            If target API didn't behave properly
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_context_resource_cache_clear_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       //Target API
+       ewk_context_resource_cache_clear(ewk_view_context_get(objWebkit_EFL_view.webview));
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set policy\n as the cookie acceptance policy for manager
+/**
+* @testcase                    ITc_ewk_cookie_manager_accept_policy_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Set policy\n as the cookie acceptance policy for manager
+* @scenario                            Create Webkit View\n
+*                                              Set policy\n\n
+*                                              Check policy in callback\n
+*                                              compare the value\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_cookie_manager_accept_policy_set
+* @passcase                            When ewk_cookie_manager_accept_policy_set behaves properly and set the value
+* @failcase                            If target API fails unable to set value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_cookie_manager_accept_policy_set_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Cookie_Manager* pCookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(objWebkit_EFL_view.webview));
+       if ( NULL == pCookieManager )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get cookie manager from ewk_context_cookie_manager_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       ewk_cookie_manager_accept_policy_set(pCookieManager, EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
+       Ewk_Cookie_Accept_Policy policy = EWK_COOKIE_ACCEPT_POLICY_NEVER;
+       ewk_cookie_manager_accept_policy_async_get(pCookieManager, Webkit_EFL_GetAcceptPolicyCallback, &policy);
+       Webkit_EFL_main_loop_begin();
+
+       if ( policy != EWK_COOKIE_ACCEPT_POLICY_ALWAYS )
+       {
+               FPRINTF("[Line : %d][%s] ewk_cookie_manager_accept_policy_set return incorrect policy; expected = %d, return = %d\\n", __LINE__, API_NAMESPACE, EWK_COOKIE_ACCEPT_POLICY_ALWAYS, policy);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get policy for the cookie acceptance policy manager
+/**
+* @testcase                    ITc_ewk_cookie_manager_accept_policy_async_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Get policy for the cookie acceptance policy manager
+* @scenario                            Create Webkit View\n
+*                                              Set policy\n
+*                                              Check policy in callback\n
+*                                              compare the value\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_cookie_manager_accept_policy_async_get
+* @passcase                            When ewk_cookie_manager_accept_policy_async_get behaves properly and get the value
+* @failcase                            If target API fails unable to get value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_cookie_manager_accept_policy_async_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Cookie_Manager* pCookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(objWebkit_EFL_view.webview));
+       if ( NULL == pCookieManager )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get cookie manager from ewk_context_cookie_manager_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       ewk_cookie_manager_accept_policy_set(pCookieManager, EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
+       Ewk_Cookie_Accept_Policy policy = EWK_COOKIE_ACCEPT_POLICY_NEVER;
+
+       //Target API
+       ewk_cookie_manager_accept_policy_async_get(pCookieManager, Webkit_EFL_GetAcceptPolicyCallback, &policy);
+       Webkit_EFL_main_loop_begin();
+       if ( policy != EWK_COOKIE_ACCEPT_POLICY_ALWAYS )
+       {
+               FPRINTF("[Line : %d][%s] ewk_cookie_manager_accept_policy_async_get return incorrect policy; expected = %d, return = %d\\n", __LINE__, API_NAMESPACE, EWK_COOKIE_ACCEPT_POLICY_ALWAYS, policy);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Deletes all the cookies of a manager
+/**
+* @testcase                    ITc_ewk_cookie_manager_cookies_clear_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Deletes all the cookies of a manager
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Clear the cookies\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_cookie_manager_cookies_clear
+* @passcase                            When ewk_cookie_manager_cookies_clear behaves properly
+* @failcase                            If target API didn't behave properly
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_cookie_manager_cookies_clear_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Cookie_Manager* pCookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(objWebkit_EFL_view.webview));
+       if ( NULL == pCookieManager )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get cookie manager from ewk_context_cookie_manager_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       ewk_cookie_manager_cookies_clear(pCookieManager);
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns cookie from policy decision object
+/**
+* @testcase                    ITc_ewk_policy_decision_cookie_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns cookie from policy decision object
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_cookie_get in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_cookie_get
+* @passcase                            When ewk_policy_decision_cookie_get return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_cookie_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,navigation,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_cookie_get, NULL);
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, POLICY_DECISION_URL) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_cookie_get > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns URL from policy decision object
+/**
+* @testcase                    ITc_ewk_policy_decision_url_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns URL from policy decision object
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_url_get in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_url_get
+* @passcase                            When ewk_policy_decision_url_get return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_url_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,navigation,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_url_get, NULL);
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, POLICY_DECISION_URL) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_url_get > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns Scheme from policy decision object
+/**
+* @testcase                    ITc_ewk_policy_decision_scheme_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns Scheme from policy decision object
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_scheme_get in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_scheme_get
+* @passcase                            When ewk_policy_decision_scheme_get return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_scheme_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,navigation,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_scheme_get, NULL);
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, POLICY_DECISION_URL) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_scheme_get > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns Host from policy decision object
+/**
+* @testcase                    ITc_ewk_policy_decision_host_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns Host from policy decision object
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_host_get in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_host_get
+* @passcase                            When ewk_policy_decision_host_get return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_host_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,navigation,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_host_get, NULL);
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, POLICY_DECISION_URL) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_host_get > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns HTTP Method from policy decision object
+/**
+* @testcase                    ITc_ewk_policy_decision_http_method_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns HTTP Method from policy decision object
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_http_method_get in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_http_method_get
+* @passcase                            When ewk_policy_decision_http_method_get return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_http_method_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,navigation,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_http_method_get, NULL);
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, POLICY_DECISION_URL) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_http_method_get > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Accepts the action which triggers decision
+/**
+* @testcase                    ITc_ewk_policy_decision_use_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Accepts the action which triggers decision
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_use in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_use
+* @passcase                            When ewk_policy_decision_use return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_use_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,navigation,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_use, NULL);
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, POLICY_DECISION_URL) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_use > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Ignores the action which triggers decision
+/**
+* @testcase                    ITc_ewk_policy_decision_ignore_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Ignores the action which triggers decision
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_ignore in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_ignore
+* @passcase                            When ewk_policy_decision_ignore return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_ignore_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,navigation,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_ignore, NULL);
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, POLICY_DECISION_URL) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_ignore > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns a policy type from Policy Decision object
+/**
+* @testcase                    ITc_ewk_policy_decision_type_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns a policy type from Policy Decision object
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_type_get in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_type_get
+* @passcase                            When ewk_policy_decision_type_get return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_type_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,navigation,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_type_get, NULL);
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, POLICY_DECISION_URL) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_type_get > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns a navigation type from Policy Decision object
+/**
+* @testcase                    ITc_ewk_policy_decision_navigation_type_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns a navigation type from Policy Decision object
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_navigation_type_get in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_navigation_type_get
+* @passcase                            When ewk_policy_decision_navigation_type_get return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_navigation_type_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,navigation,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_navigation_type_get, NULL);
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, POLICY_DECISION_URL) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,navigation,decide", NULL);
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_navigation_type_get > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns mime type for response data from policy decision object
+/**
+* @testcase                    ITc_ewk_policy_decision_response_mime_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns mime type for response data from policy decision object
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_response_mime_get in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_response_mime_get
+* @passcase                            When ewk_policy_decision_response_mime_get return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_response_mime_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,response,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_response_mime_get, NULL);
+
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,response,decide", NULL);
+
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,response,decide", NULL);
+
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_response_mime_get > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns HTTP headers for response data from policy decision object
+/**
+* @testcase                    ITc_ewk_policy_decision_response_headers_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns HTTP headers for response data from policy decision object
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_response_headers_get in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_response_headers_get
+* @passcase                            When ewk_policy_decision_response_headers_get return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_response_headers_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,response,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_response_headers_get, NULL);
+
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,response,decide", NULL);
+
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,response,decide", NULL);
+
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_response_headers_get > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns HTTP status code for response data from policy decision object
+/**
+* @testcase                    ITc_ewk_policy_decision_response_status_code_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns HTTP status code for response data from policy decision object
+* @scenario                            Create Webkit View\n
+*                                              Call ewk_policy_decision_response_status_code_get in callback\n
+*                                              Destroy webkit view
+* @apicovered                  ewk_policy_decision_response_status_code_get
+* @passcase                            When ewk_policy_decision_response_status_code_get return correct value
+* @failcase                            If target API didn't return correct value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_policy_decision_response_status_code_get_p(void)
+{
+       START_TEST;
+       
+       bool bTelFeatureSupported = Webkit_EFLCheck_System_Info_Feature_Supported(TELEPHONY_FEATURE);
+       bool bWifiFeatureSupported = Webkit_EFLCheck_System_Info_Feature_Supported(WIFI_FEATURE);
+       bool bEthFeatureSupported = Webkit_EFLCheck_System_Info_Feature_Supported(ETHERNET_FEATURE);
+       if ( !bTelFeatureSupported && !bWifiFeatureSupported && !bEthFeatureSupported)
+       {
+               FPRINTF("\\n[Line : %d][%s] Network is not working. Skipping Test", __LINE__, API_NAMESPACE);
+               return 0;
+       }
+       
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview,"policy,response,decide", Webkit_EFL_PolicyDecision_Callback_GetPolicy_ewk_policy_decision_response_status_code_get, NULL);
+
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, LAUNCH_URL) )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set Policy Decision URL through ewk_view_url_set API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,response,decide", NULL);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_PolicyDecision_Callback_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_PolicyDecision_Callback_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "policy,response,decide", NULL);
+
+       Webkit_EFLDestroyWebKitView();
+       if ( g_nFail_ewk_policy_decision_response_status_code_get > 0 )
+       {
+               return 1;
+       }
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set javascript execution
+/**
+* @testcase                    ITc_ewk_settings_javascript_enabled_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Set javascript execution
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_settings_javascript_enabled_set, ewk_settings_javascript_enabled_get
+* @passcase                            When ewk_settings_javascript_enabled_set behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_settings_javascript_enabled_set_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Settings* pViewSettings = ewk_view_settings_get(objWebkit_EFL_view.webview);
+       if ( NULL == pViewSettings )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get View Settings from ewk_view_settings_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       Eina_Bool bResultGet = EINA_FALSE;
+       //Target API
+       bResultSet = ewk_settings_javascript_enabled_set(pViewSettings, EINA_TRUE);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_javascript_enabled_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       bResultGet = ewk_settings_javascript_enabled_get(pViewSettings);
+       if ( bResultGet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_javascript_enabled_get returned wrong value; expected = EINA_TRUE, returned = EINA_FALSE\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns javascript executable status
+/**
+* @testcase                    ITc_ewk_settings_javascript_enabled_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns javascript executable status
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_settings_javascript_enabled_set, ewk_settings_javascript_enabled_get
+* @passcase                            When ewk_settings_javascript_enabled_get behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_settings_javascript_enabled_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Settings* pViewSettings = ewk_view_settings_get(objWebkit_EFL_view.webview);
+       if ( NULL == pViewSettings )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get View Settings from ewk_view_settings_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       Eina_Bool bResultGet = EINA_FALSE;
+       bResultSet = ewk_settings_javascript_enabled_set(pViewSettings, EINA_TRUE);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_javascript_enabled_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       bResultGet = ewk_settings_javascript_enabled_get(pViewSettings);
+       if ( bResultGet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_javascript_enabled_get returned wrong value; expected = EINA_TRUE, returned = EINA_FALSE\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set auto-loading of images
+/**
+* @testcase                    ITc_ewk_settings_loads_images_automatically_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Set auto-loading of images
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_settings_loads_images_automatically_set, ewk_settings_loads_images_automatically_get
+* @passcase                            When ewk_settings_loads_images_automatically_set behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_settings_loads_images_automatically_set_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Settings* pViewSettings = ewk_view_settings_get(objWebkit_EFL_view.webview);
+       if ( NULL == pViewSettings )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get View Settings from ewk_view_settings_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+
+               return 1;
+       }
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       Eina_Bool bResultGet = EINA_FALSE;
+
+       //Target API    
+       bResultSet = ewk_settings_loads_images_automatically_set(pViewSettings, EINA_TRUE);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_loads_images_automatically_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       bResultGet = ewk_settings_loads_images_automatically_get(pViewSettings);
+       if ( bResultGet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_loads_images_automatically_get returned wrong value; expected = EINA_TRUE, returned = EINA_FALSE\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns auto-loading of images status
+/**
+* @testcase                    ITc_ewk_settings_loads_images_automatically_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns auto-loading of images status
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_settings_loads_images_automatically_set, ewk_settings_loads_images_automatically_get
+* @passcase                            When ewk_settings_loads_images_automatically_get behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_settings_loads_images_automatically_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Settings* pViewSettings = ewk_view_settings_get(objWebkit_EFL_view.webview);
+       if ( NULL == pViewSettings )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get View Settings from ewk_view_settings_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       Eina_Bool bResultGet = EINA_FALSE;
+       bResultSet = ewk_settings_loads_images_automatically_set(pViewSettings, EINA_TRUE);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_loads_images_automatically_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       bResultGet = ewk_settings_loads_images_automatically_get(pViewSettings);
+       if ( bResultGet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_loads_images_automatically_get returned wrong value; expected = EINA_TRUE, returned = EINA_FALSE\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets default text encoding name
+/**
+* @testcase                    ITc_ewk_settings_default_text_encoding_name_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Sets default text encoding name
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_settings_default_text_encoding_name_set, ewk_settings_default_text_encoding_name_get
+* @passcase                            When ewk_settings_default_text_encoding_name_set behaves properly and set value equals to value received.
+* @failcase                            If target API fails or value mismatch occurs.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_settings_default_text_encoding_name_set_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Settings* pViewSettings = ewk_view_settings_get(objWebkit_EFL_view.webview);
+       if ( NULL == pViewSettings )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get View Settings from ewk_view_settings_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       const char* pValue = NULL;
+
+       //Target API
+       bResultSet = ewk_settings_default_text_encoding_name_set(pViewSettings, SET_DEFAULT_ENCODING);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_default_text_encoding_name_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       pValue = ewk_settings_default_text_encoding_name_get(pViewSettings);
+       if ( NULL == pValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_default_text_encoding_name_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( 0 != strcmp(SET_DEFAULT_ENCODING, pValue) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_default_text_encoding_name_get returned wrong value; expected = %s, returned = %s\\n", __LINE__, API_NAMESPACE, SET_DEFAULT_ENCODING, pValue);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets default text encoding name
+/**
+* @testcase                    ITc_ewk_settings_default_text_encoding_name_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets default text encoding name
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_settings_default_text_encoding_name_set, ewk_settings_default_text_encoding_name_get
+* @passcase                            When ewk_settings_default_text_encoding_name_get behaves properly and set value equals to value received.
+* @failcase                            If target API fails or value mismatch occurs.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_settings_default_text_encoding_name_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Settings* pViewSettings = ewk_view_settings_get(objWebkit_EFL_view.webview);
+       if ( NULL == pViewSettings )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get View Settings from ewk_view_settings_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       const char* pValue = NULL;
+       bResultSet = ewk_settings_default_text_encoding_name_set(pViewSettings, SET_DEFAULT_ENCODING);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_default_text_encoding_name_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       pValue = ewk_settings_default_text_encoding_name_get(pViewSettings);
+       if ( NULL == pValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_default_text_encoding_name_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( 0 != strcmp(SET_DEFAULT_ENCODING, pValue) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_default_text_encoding_name_get returned wrong value; expected = %s, returned = %s\\n", __LINE__, API_NAMESPACE, SET_DEFAULT_ENCODING, pValue);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets default font size
+/**
+* @testcase                    ITc_ewk_settings_default_font_size_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Sets default font size
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_settings_default_font_size_set, ewk_settings_default_font_size_get
+* @passcase                            When ewk_settings_default_font_size_set behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_settings_default_font_size_set_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Settings* pViewSettings = ewk_view_settings_get(objWebkit_EFL_view.webview);
+       if ( NULL == pViewSettings )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get View Settings from ewk_view_settings_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       int nValue = 0;
+       //Target API
+       bResultSet = ewk_settings_default_font_size_set(pViewSettings, SET_DEFAULT_FONT_SIZE);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_default_font_size_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       nValue = ewk_settings_default_font_size_get(pViewSettings);
+       if ( SET_DEFAULT_FONT_SIZE != nValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_default_font_size_get returned wrong value; expected = %d, returned = %d\\n", __LINE__, API_NAMESPACE, SET_DEFAULT_FONT_SIZE, nValue);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets default font size
+/**
+* @testcase                    ITc_ewk_settings_default_font_size_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets default font size
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_settings_default_font_size_set, ewk_settings_default_font_size_get
+* @passcase                            When ewk_settings_default_font_size_get behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_settings_default_font_size_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Settings* pViewSettings = ewk_view_settings_get(objWebkit_EFL_view.webview);
+       if ( NULL == pViewSettings )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get View Settings from ewk_view_settings_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       int nValue = 0;
+
+       bResultSet = ewk_settings_default_font_size_set(pViewSettings, SET_DEFAULT_FONT_SIZE);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_default_font_size_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       nValue = ewk_settings_default_font_size_get(pViewSettings);
+       if ( SET_DEFAULT_FONT_SIZE != nValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_default_font_size_get returned wrong value; expected = %d, returned = %d\\n", __LINE__, API_NAMESPACE, SET_DEFAULT_FONT_SIZE, nValue);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set Scripts ability to open windows
+/**
+* @testcase                    ITc_ewk_settings_scripts_can_open_windows_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Set Scripts ability to open windows
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_settings_scripts_can_open_windows_set, ewk_settings_scripts_can_open_windows_get
+* @passcase                            When ewk_settings_scripts_can_open_windows_set behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_settings_scripts_can_open_windows_set_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Settings* pViewSettings = ewk_view_settings_get(objWebkit_EFL_view.webview);
+       if ( NULL == pViewSettings )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get View Settings from ewk_view_settings_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       Eina_Bool bResultGet = EINA_FALSE;
+
+       //Target API
+       bResultSet = ewk_settings_scripts_can_open_windows_set(pViewSettings, EINA_TRUE);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_scripts_can_open_windows_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       bResultGet = ewk_settings_scripts_can_open_windows_get(pViewSettings);
+       if ( bResultGet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_scripts_can_open_windows_get returned wrong value; expected = EINA_TRUE, returned = EINA_FALSE\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Get Scripts ability to open windows
+/**
+* @testcase                    ITc_ewk_settings_scripts_can_open_windows_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Get Scripts ability to open windows
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_settings_scripts_can_open_windows_set, ewk_settings_scripts_can_open_windows_get
+* @passcase                            When ewk_settings_scripts_can_open_windows_get behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_settings_scripts_can_open_windows_get_p(void)
+{      START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Ewk_Settings* pViewSettings = ewk_view_settings_get(objWebkit_EFL_view.webview);
+       if ( NULL == pViewSettings )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get View Settings from ewk_view_settings_get API call\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+
+       Eina_Bool bResultSet = ewk_settings_scripts_can_open_windows_set(pViewSettings, EINA_TRUE);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_scripts_can_open_windows_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       Eina_Bool bResultGet = ewk_settings_scripts_can_open_windows_get(pViewSettings);
+       if ( bResultGet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_settings_scripts_can_open_windows_get returned wrong value; expected = EINA_TRUE, returned = EINA_FALSE\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Creates a new webkit EFL view object
+/**
+* @testcase                    ITc_ewk_view_add_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Creates a new webkit EFL view object
+* @scenario                            Create Webkit View\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_add
+* @passcase                            When ewk_view_add behaves properly and returns correct value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_add_p(void)
+{
+       START_TEST;
+       g_type_init();
+       elm_init(0, NULL);
+
+       Evas_Object* pWindow = elm_win_add(NULL, "TC Launcher", ELM_WIN_BASIC);
+       if ( NULL == pWindow )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get window from elm_win_add API call\\n", __LINE__, API_NAMESPACE);
+               elm_shutdown();
+               return 1;
+       }
+
+       elm_win_title_set(pWindow, "TC Launcher");
+       Evas* pEvas = evas_object_evas_get(pWindow);
+       if ( NULL == pEvas )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get evas from evas_object_evas_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_del(pWindow);
+               elm_shutdown();
+               return 1;
+       }
+
+       Evas_Object* pWebView = NULL;
+       //Target API
+       pWebView = ewk_view_add(pEvas);
+       if ( NULL == pWebView )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_add returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_del(pWindow);
+               elm_shutdown();
+               return 1;
+       }
+
+       evas_object_del(pWindow);
+       elm_shutdown();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets Ewk context of the view
+/**
+* @testcase                    ITc_ewk_view_context_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets Ewk context of the view
+* @scenario                            Create Webkit View\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_context_get
+* @passcase                            When ewk_view_context_get behaves properly and returns correct value
+* @failcase                            If target API fails or return incorrect value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_context_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get window from elm_win_add API call\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       Ewk_Context* pValue = NULL;
+       //Target API
+       pValue = ewk_view_context_get(objWebkit_EFL_view.webview);
+       if ( NULL == pValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_context_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Returns the current URL string of the view object
+/**
+* @testcase                    ITc_ewk_view_url_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Returns the current URL string of the view object
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the URL\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_url_get
+* @passcase                            When ewk_view_url_get returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_url_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       const char* pURL = NULL;
+       //Target API    
+       pURL = ewk_view_url_get(objWebkit_EFL_view.webview);
+       if ( NULL == pURL )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( 0 != strcmp(pURL, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_get returned wrong value; expected = %s, returned = %s\\n", __LINE__, API_NAMESPACE, pPath, pURL);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Asked to set the URL string to the view object
+/**
+* @testcase                    ITc_ewk_view_url_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Asked to set the URL string to the view object
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Retrieves the URL\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_url_get
+* @passcase                            When ewk_view_url_set returns success and set value equals the get value
+* @failcase                            If target API fails or not set the URL properly
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_url_set_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       Eina_Bool bResult = EINA_FALSE;
+       const char* pURL = NULL;
+       //Target API
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error status on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       pURL = ewk_view_url_get(objWebkit_EFL_view.webview);
+       if ( NULL == pURL )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( 0 != strcmp(pURL, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_get returned wrong value; expected = %s, returned = %s\\n", __LINE__, API_NAMESPACE, pPath, pURL);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Reload the current view document
+/**
+* @testcase                    ITc_ewk_view_reload_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Reload the current view document
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Reload the view\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_reload
+* @passcase                            When ewk_view_reload returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_reload_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResult = EINA_FALSE;
+       //Target API
+       bResult = ewk_view_reload(objWebkit_EFL_view.webview);
+       if ( bResult != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_reload returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Asks the main frame to stop loading
+/**
+* @testcase                    ITc_ewk_view_stop_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Asks the main frame to stop loading
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Stop loading the view\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_stop
+* @passcase                            When ewk_view_stop returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_stop_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResult = EINA_FALSE;
+       //Target API
+       bResult = ewk_view_stop(objWebkit_EFL_view.webview);
+       if ( bResult != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_stop returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets Ewk settings of the view
+/**
+* @testcase                    ITc_ewk_view_settings_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets Ewk settings of the view
+* @scenario                            Create Webkit View\n
+*                                              Call API to get value\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_settings_get
+* @passcase                            When ewk_view_settings_get behaves properly and returns correct value
+* @failcase                            If target API fails or return incorrect value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_settings_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get window from elm_win_add API call\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       Ewk_Settings* pValue = NULL;
+       //Target API
+       pValue = ewk_view_settings_get(objWebkit_EFL_view.webview);
+       if ( NULL == pValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_settings_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Asks the main frame to navigate back in history
+/**
+* @testcase                    ITc_ewk_view_back_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Asks the main frame to navigate back in history
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Call target API\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_back
+* @passcase                            When ewk_view_back returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_back_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath1[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE1, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+
+       Eina_Bool bResult = EINA_FALSE;
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error value for %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath1);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error value for %s\\n", __LINE__, API_NAMESPACE, pPath1);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+
+       bResult = ewk_view_back(objWebkit_EFL_view.webview);
+       if ( bResult != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_back returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Asks the main frame to navigate forward in history
+/**
+* @testcase                    ITc_ewk_view_forward_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Asks the main frame to navigate forward in history
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Navigate back and Call target API\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_back, ewk_view_forward
+* @passcase                            When ewk_view_forward returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_forward_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath1[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE1, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+
+       Eina_Bool bResult = EINA_FALSE;
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error value for %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath1);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error value for %s\\n", __LINE__, API_NAMESPACE, pPath1);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( EINA_TRUE != ewk_view_back(objWebkit_EFL_view.webview) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_back returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       //Target API
+       bResult = ewk_view_forward(objWebkit_EFL_view.webview);
+       Webkit_EFL_main_loop_begin();
+
+       if ( bResult != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_forward returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Checks whether the main frame can navigate back one item in history
+/**
+* @testcase                    ITc_ewk_view_back_possible_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Checks whether the main frame can navigate back one item in history
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Call target API\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_back_possible
+* @passcase                            When ewk_view_back_possible returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_back_possible_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath1[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE1, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+
+       Eina_Bool bResult = EINA_FALSE;
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error value for %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath1);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error value for %s\\n", __LINE__, API_NAMESPACE, pPath1);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       bResult = ewk_view_back_possible(objWebkit_EFL_view.webview);
+       if ( bResult != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_back_possible returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Checks whether the main frame can navigate forward one item in history
+/**
+* @testcase                    ITc_ewk_view_forward_possible_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Checks whether the main frame can navigate forward one item in history
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Navigate back and Call target API\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_back, ewk_view_forward_possible
+* @passcase                            When ewk_view_forward_possible returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_forward_possible_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       char pPath1[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE1, pPath1) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       Eina_Bool bResult = EINA_FALSE;
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error value for %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath1);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error value for %s\\n", __LINE__, API_NAMESPACE, pPath1);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( EINA_TRUE != ewk_view_back(objWebkit_EFL_view.webview) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_back returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       //Target API    
+       bResult = ewk_view_forward_possible(objWebkit_EFL_view.webview);
+       if ( bResult != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_forward_possible returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Clears the back forward list of a page
+/**
+* @testcase                    ITc_ewk_view_back_forward_list_clear_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Clears the back forward list of a page
+* @scenario                            Create Webkit View\n
+*                                              Set Content\n
+*                                              Call the API\n
+*                                              Retrieves the BackForward List and validate\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get, ewk_view_back_forward_list_clear
+* @passcase                            When ewk_view_back_forward_list_clear clears the page.
+* @failcase                            If after target API call, the mainframe still allows the item selection.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_back_forward_list_clear_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       Ewk_Back_Forward_List_Item* pListItem = NULL;
+
+       Eina_Bool bResult = EINA_FALSE;
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error value for %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       ewk_view_back_forward_list_clear(objWebkit_EFL_view.webview);
+       Ewk_Back_Forward_List* pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       pListItem = ewk_back_forward_list_previous_item_get(pList);
+       if ( NULL != pListItem )
+       {
+               FPRINTF("[Line : %d][%s]Faile : Still Able to get previous item after ewk_view_back_forward_list_clear API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       pListItem = ewk_back_forward_list_next_item_get(pList);
+       if ( NULL != pListItem )
+       {
+               FPRINTF("[Line : %d][%s]Faile : Still Able to get next item after ewk_view_back_forward_list_clear API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the back forward list associated with this view
+/**
+* @testcase                    ITc_ewk_view_back_forward_list_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the back forward list associated with this view
+* @scenario                            Create Webkit View\n
+*                                              Set Content\n
+*                                              Call the API\n
+*                                              Retrieves the BackForward List and validate\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_back_forward_list_get
+* @passcase                            When ewk_view_back_forward_list_get returns proper value
+* @failcase                            If after target API returns invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_back_forward_list_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       Ewk_Back_Forward_List* pList = NULL;
+       Eina_Bool bResult = EINA_FALSE;
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error value for %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       pList = ewk_view_back_forward_list_get(objWebkit_EFL_view.webview);
+       if ( NULL == pList )
+       {
+               FPRINTF("[Line : %d][%s] Unable to get Ewk_Back_Forward_List list from ewk_view_back_forward_list_get API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the current title of the main frame
+/**
+* @testcase                    ITc_ewk_view_title_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the current title of the main frame
+* @scenario                            Create Webkit View\n
+*                                              Set Content\n
+*                                              Call the API\n
+*                                              Retrieves the value and validate\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_title_get
+* @passcase                            When ewk_view_title_get returns proper value
+* @failcase                            If after target API returns invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_title_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+
+       const char* pValue = NULL;
+       Eina_Bool bResult = EINA_FALSE;
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned load error value for %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       pValue = ewk_view_title_get(objWebkit_EFL_view.webview);
+       if ( NULL == pValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_title_get API call return NULL value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( 0 != strcmp(SAMPLE_HTML_FILE_TITLE, pValue) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_title_get returned wrong value; expected = %s, returned = %s\\n", __LINE__, API_NAMESPACE, SAMPLE_HTML_FILE_TITLE, pValue);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the progress status for loading in the main frame
+/**
+* @testcase                    ITc_ewk_view_load_progress_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the progress status for loading in the main frame
+* @scenario                            Create Webkit View\n
+*                                              Set Content\n
+*                                              Call the API\n
+*                                              Retrieves the value and validate\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_load_progress_get
+* @passcase                            When ewk_view_load_progress_get returns proper value
+* @failcase                            If after target API returns invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_load_progress_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,progress", Webkit_EFL_LoadProgress, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       double dValue = 0.0;
+       double dProgressComplete = 1.0;
+
+       Eina_Bool bResult = EINA_FALSE;
+       bResult = ewk_view_url_set(objWebkit_EFL_view.webview, pPath);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       //Target API    
+       dValue = ewk_view_load_progress_get(objWebkit_EFL_view.webview);
+       if ( dValue > dProgressComplete || dValue < 0.0 )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_load_progress_get returned wrong value = %f\\n", __LINE__, API_NAMESPACE, dValue);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Set the user agent of the page
+/**
+* @testcase                    ITc_ewk_view_user_agent_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Set the user agent of the page
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_user_agent_set, ewk_view_user_agent_get
+* @passcase                            When ewk_view_user_agent_set behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_user_agent_set_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       const char* pValue = NULL;
+
+       //Target API
+       bResultSet = ewk_view_user_agent_set(objWebkit_EFL_view.webview, SET_USER_AGENT);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_user_agent_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       pValue = ewk_view_user_agent_get(objWebkit_EFL_view.webview);
+       if ( NULL == pValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_user_agent_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( 0 != strcmp(SET_USER_AGENT, pValue) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_user_agent_get returned wrong value; expected = %s, returned = %s\\n", __LINE__, API_NAMESPACE, SET_USER_AGENT, pValue);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets user agent string
+/**
+* @testcase                    ITc_ewk_view_user_agent_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets user agent string
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_user_agent_set, ewk_view_user_agent_get
+* @passcase                            When ewk_view_user_agent_get behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_user_agent_get_p(void)
+{
+       START_TEST;
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       const char* pValue = NULL;
+
+       bResultSet = ewk_view_user_agent_set(objWebkit_EFL_view.webview, SET_USER_AGENT);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_user_agent_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       pValue = ewk_view_user_agent_get(objWebkit_EFL_view.webview);
+       if ( NULL == pValue )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_user_agent_get returned NULL value\\n", __LINE__, API_NAMESPACE);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( 0 != strcmp(SET_USER_AGENT, pValue) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_user_agent_get returned wrong value; expected = %s, returned = %s\\n", __LINE__, API_NAMESPACE, SET_USER_AGENT, pValue);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the last known content size
+/**
+* @testcase                    ITc_ewk_view_contents_size_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the last known content size
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Call the target API\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_contents_size_get
+* @passcase                            When ewk_view_contents_size_get returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_contents_size_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       // Use Webkit_EFL_LoadFinished with callback, cause we need the same result
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "contents,size,changed", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "contents,size,changed", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "contents,size,changed", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResult = EINA_FALSE;
+       Evas_Coord nWidth = 0;
+       Evas_Coord nHeight = 0;
+
+       //Target API
+       bResult = ewk_view_contents_size_get(objWebkit_EFL_view.webview, &nWidth, &nHeight);
+       if ( bResult != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_contents_size_get API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "contents,size,changed", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( (nWidth <= 0) || (nHeight <= 0) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_contents_size_get returned incorrect value (width = %d, height = %d)\\n", __LINE__, API_NAMESPACE, (int)nWidth, (int)nHeight);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "contents,size,changed", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "contents,size,changed", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Requests the execution of given script
+/**
+* @testcase                    ITc_ewk_view_script_execute_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Requests the execution of given script
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Call the target API\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_script_execute
+* @passcase                            When ewk_view_script_execute gets able to execute it properly
+* @failcase                            If target API fails or callback not hit.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_script_execute_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Eina_Bool bResult = EINA_FALSE;
+       //Target API
+       bResult = ewk_view_script_execute(objWebkit_EFL_view.webview, TEST_JS_SCRIPT, Webkit_EFL_ScriptExecutionFinished, NULL);
+       if ( bResult != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_script_execute API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_ScriptExecuted = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_ScriptExecuted )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_script_execute callback not invoked\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scales the current page, centred at the given point
+/**
+* @testcase                    ITc_ewk_view_scale_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Scales the current page, centred at the given point
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_scale_set, ewk_view_scale_get
+* @passcase                            When ewk_view_scale_set behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_scale_set_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       ecore_timer_add(TIMEOUT_VALUE, Webkit_EFL_LoopQuit, 0);
+       Webkit_EFL_main_loop_begin();
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       double dScaleFactor = SCALE_FACTOR_VALUE;
+       double dScaleFactorGet = 0.0;
+       Evas_Coord centerX = X_CENTRE;
+       Evas_Coord centerY = Y_CENTRE;
+
+       //Target API
+       bResultSet = ewk_view_scale_set(objWebkit_EFL_view.webview, dScaleFactor, centerX, centerY);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scale_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       dScaleFactorGet = ewk_view_scale_get(objWebkit_EFL_view.webview);
+       if ( dScaleFactor != dScaleFactorGet )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scale_get returned wrong value; expected = %f, returned = %f\\n", __LINE__, API_NAMESPACE, dScaleFactor, dScaleFactorGet);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets scale factor for the page
+/**
+* @testcase                    ITc_ewk_view_scale_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets scale factor for the page
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_scale_set, ewk_view_scale_get
+* @passcase                            When ewk_view_scale_get behaves properly and set value equals to value received
+* @failcase                            If target API fails or value mismatch occurs
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_scale_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       ecore_timer_add(TIMEOUT_VALUE, Webkit_EFL_LoopQuit, 0);
+       Webkit_EFL_main_loop_begin();
+
+       Eina_Bool bResultSet = EINA_FALSE;
+       double dScaleFactor = SCALE_FACTOR_VALUE;
+       double dScaleFactorGet = 0.0;
+       Evas_Coord centerX = X_CENTRE;
+       Evas_Coord centerY = Y_CENTRE;
+
+       bResultSet = ewk_view_scale_set(objWebkit_EFL_view.webview, dScaleFactor, centerX, centerY);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scale_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+
+       dScaleFactorGet = ewk_view_scale_get(objWebkit_EFL_view.webview);
+       if ( dScaleFactor != dScaleFactorGet )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scale_get returned wrong value; expected = %f, returned = %f\\n", __LINE__, API_NAMESPACE, dScaleFactor, dScaleFactorGet);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Exits the fullscreen mode
+/**
+* @testcase                    ITc_ewk_view_fullscreen_exit_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Exits the fullscreen mode
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Call the target API\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_fullscreen_exit
+* @passcase                            When ewk_view_fullscreen_exit returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_fullscreen_exit_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       ewk_view_fullscreen_exit(objWebkit_EFL_view.webview);
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Suspends the operation associated with the view object
+/**
+* @testcase                    ITc_ewk_view_suspend_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Suspends the operation associated with the view object
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Call the API\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_suspend
+* @passcase                            When ewk_view_suspend behaves properly
+* @failcase                            If target API didn't behave properly
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_suspend_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,progress", Webkit_EFL_LoadProgress, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,progress", Webkit_EFL_LoadProgress);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       //Target API
+       ewk_view_suspend(objWebkit_EFL_view.webview);
+       ewk_view_resume(objWebkit_EFL_view.webview);
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,progress", Webkit_EFL_LoadProgress);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Resumes the operation associated with the view object after it gets suspended
+/**
+* @testcase                    ITc_ewk_view_resume_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Resumes the operation associated with the view object after it gets suspended
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Call the API\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_suspend, ewk_view_resume
+* @passcase                            When ewk_view_resume behaves properly
+* @failcase                            If target API didn't behave properly
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_resume_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,started", Webkit_EFL_LoadStarted, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,started", Webkit_EFL_LoadStarted);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       ewk_view_suspend(objWebkit_EFL_view.webview);
+       //Target API
+       ewk_view_resume(objWebkit_EFL_view.webview);
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,started", Webkit_EFL_LoadStarted);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Requests loading of the given request data
+/**
+* @testcase                    ITc_ewk_view_url_request_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Requests loading of the given request data
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_request_set
+* @passcase                            When ewk_view_url_request_set returns success and callback invoked properly
+* @failcase                            If target API fails or callback not invoked properly
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_url_request_set_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       Eina_Bool bResult = EINA_FALSE;
+       //Target API
+       bResult = ewk_view_url_request_set(objWebkit_EFL_view.webview, pPath, EWK_HTTP_METHOD_GET, NULL, NULL);
+       if ( EINA_TRUE != bResult )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_request_set returned false error value on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       Webkit_EFL_main_loop_begin();
+
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_request_set returned load error status on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Scrolls the webpage of view
+/**
+* @testcase                    ITc_ewk_view_scroll_by_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Scrolls the webpage of view
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_scroll_by, ewk_view_scale_set, ewk_view_scroll_set, ewk_view_scroll_pos_get
+* @passcase                            When ewk_view_scroll_by behaves properly and set value equals to value received.
+* @failcase                            If target API fails or value mismatch occurs.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_scroll_by_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE_VIEW, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered, NULL);
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       ecore_timer_add(TIMEOUT_VALUE, Webkit_EFL_LoopQuit, 0);
+       Webkit_EFL_main_loop_begin();
+       Eina_Bool bResultSet = EINA_FALSE;
+       int nPosX = 0;
+       int nPosY = 0;
+
+       bResultSet = ewk_view_scale_set(objWebkit_EFL_view.webview, SCALE_FACTOR_VALUE, 0, 0);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scale_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       bResultSet = ewk_view_scroll_set(objWebkit_EFL_view.webview, 0, 0);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scroll_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       ewk_view_scroll_by(objWebkit_EFL_view.webview, SCROLL_BY_X, SCROLL_BY_Y);
+       bResultSet = ewk_view_scroll_pos_get(objWebkit_EFL_view.webview, &nPosX, &nPosY);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scroll_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( nPosX != SCROLL_BY_X || nPosY != SCROLL_BY_Y )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scale_get returned wrong value; expected = (%d,%d), returned = (%d,%d)\\n", __LINE__, API_NAMESPACE, SCROLL_BY_X, SCROLL_BY_Y, nPosX, nPosY);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Gets the current scroll position of the view
+/**
+* @testcase                    ITc_ewk_view_scroll_pos_get_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Gets the current scroll position of the view
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_scale_set, ewk_view_scroll_set, ewk_view_scroll_pos_get
+* @passcase                            When ewk_view_scroll_pos_get behaves properly and set value equals to value received.
+* @failcase                            If target API fails or value mismatch occurs.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_scroll_pos_get_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE_VIEW, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered, NULL);
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       ecore_timer_add(TIMEOUT_VALUE, Webkit_EFL_LoopQuit, 0);
+       Webkit_EFL_main_loop_begin();
+       Eina_Bool bResultSet = EINA_FALSE;
+       int nPosX = 0;
+       int nPosY = 0;
+
+       bResultSet = ewk_view_scale_set(objWebkit_EFL_view.webview, SCALE_FACTOR_VALUE, 0, 0);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scale_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       bResultSet = ewk_view_scroll_set(objWebkit_EFL_view.webview, SCROLL_BY_X, SCROLL_BY_Y);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scroll_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       bResultSet = ewk_view_scroll_pos_get(objWebkit_EFL_view.webview, &nPosX, &nPosY);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scroll_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( nPosX != SCROLL_BY_X || nPosY != SCROLL_BY_Y )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scale_get returned wrong value; expected = (%d,%d), returned = (%d,%d)\\n", __LINE__, API_NAMESPACE, SCROLL_BY_X, SCROLL_BY_Y, nPosX, nPosY);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Sets an absolute scroll position of the view
+/**
+* @testcase                    ITc_ewk_view_scroll_set_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Sets an absolute scroll position of the view
+* @scenario                            Create Webkit View\n
+*                                              Set Value\n
+*                                              Retrieve value\n
+*                                              Validate the set and get values\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_scale_set, ewk_view_scroll_set, ewk_view_scroll_pos_get
+* @passcase                            When ewk_view_scroll_set behaves properly and set value equals to value received.
+* @failcase                            If target API fails or value mismatch occurs.
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_scroll_set_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_HTML_FILE_VIEW, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered, NULL);
+
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       ecore_timer_add(TIMEOUT_VALUE, Webkit_EFL_LoopQuit, 0);
+       Webkit_EFL_main_loop_begin();
+       Eina_Bool bResultSet = EINA_FALSE;
+       int nPosX = 0;
+       int nPosY = 0;
+
+       bResultSet = ewk_view_scale_set(objWebkit_EFL_view.webview, SCALE_FACTOR_VALUE, 0, 0);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scale_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       //Target API
+       bResultSet = ewk_view_scroll_set(objWebkit_EFL_view.webview, SCROLL_BY_X, SCROLL_BY_Y);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scroll_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       bResultSet = ewk_view_scroll_pos_get(objWebkit_EFL_view.webview, &nPosX, &nPosY);
+       if ( bResultSet != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scroll_set API call returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       if ( nPosX != SCROLL_BY_X || nPosY != SCROLL_BY_Y )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_scale_get returned wrong value; expected = (%d,%d), returned = (%d,%d)\\n", __LINE__, API_NAMESPACE, SCROLL_BY_X, SCROLL_BY_Y, nPosX, nPosY);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "frame,rendered", Webkit_EFL_FrameRendered);
+
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+//& type: auto
+//& purpose: Searches and highlights the given string in the document
+/**
+* @testcase                    ITc_ewk_view_text_find_p
+* @since_tizen                 2.3.1
+* @type                                auto
+* @description                 Searches and highlights the given string in the document
+* @scenario                            Create Webkit View\n
+*                                              Set URL\n
+*                                              Check Set URL result in callback\n
+*                                              Call the target API\n
+*                                              Destroy Webkit View
+* @apicovered                  ewk_view_url_set, ewk_view_text_find
+* @passcase                            When ewk_view_text_find returns valid value
+* @failcase                            If target API fails or return invalid value
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_ewk_view_text_find_p(void)
+{
+       START_TEST;
+       char pPath[PATH_LEN] = {0,};
+       if ( false == Webkit_EFLAppendToDataPathWithFileFormat(SAMPLE_FILE_VIEW_TEXT_FIND, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] unable to get the app data path\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       if ( false == Webkit_EFLCreateWebKitView() )
+       {
+               return 1;
+       }
+
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished, NULL);
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError, NULL);
+       g_bWebkit_EFL_LoadSuccess = false;
+       if ( EINA_TRUE != ewk_view_url_set(objWebkit_EFL_view.webview, pPath) )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_url_set returned error on API call\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       Webkit_EFL_main_loop_begin();
+       if ( false == g_bWebkit_EFL_LoadSuccess )
+       {
+               FPRINTF("[Line : %d][%s] Unable to set view URL; Load error occurs  with file : %s\\n", __LINE__, API_NAMESPACE, pPath);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+       int nMatchCount = -1;
+       evas_object_smart_callback_add(objWebkit_EFL_view.webview, "text,found", Webkit_EFL_onTextFound, &nMatchCount);
+
+       Eina_Bool bResult = EINA_FALSE;
+       int nActualCount = 3;//apple appeared 3 times in the string
+
+       //Target API
+       bResult = ewk_view_text_find(objWebkit_EFL_view.webview, "apple", EWK_FIND_OPTIONS_SHOW_OVERLAY, 100);
+       if ( bResult != EINA_TRUE )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_text_find returned false error value\\n", __LINE__, API_NAMESPACE);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "text,found", Webkit_EFL_onTextFound);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+       while ( nMatchCount < 0 ){
+               ecore_main_loop_iterate();      
+       }
+
+       if ( nMatchCount != nActualCount )
+       {
+               FPRINTF("[Line : %d][%s] ewk_view_text_find returned incorrect count value = %d\\n", __LINE__, API_NAMESPACE, nMatchCount);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+               evas_object_smart_callback_del(objWebkit_EFL_view.webview, "text,found", Webkit_EFL_onTextFound);
+               Webkit_EFLDestroyWebKitView();
+               return 1;
+       }
+
+
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "text,found", Webkit_EFL_onTextFound);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,finished", Webkit_EFL_LoadFinished);
+       evas_object_smart_callback_del(objWebkit_EFL_view.webview, "load,error", Webkit_EFL_LoadError);
+       Webkit_EFLDestroyWebKitView();
+       return 0;
+}
+
+/** @} */ 
+/** @} */ 
diff --git a/src/itc/webkit2/resources/common/sample.html b/src/itc/webkit2/resources/common/sample.html
new file mode 100755 (executable)
index 0000000..c0d2184
--- /dev/null
@@ -0,0 +1,13 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Testing Sample Page</title>
+</head>
+<body>
+    <h1>Sample HTML</h1>
+    <p>This is sample html page to be used in test suite when loading of a page is required.</p>
+    <p id="getParaContent">test content</p>
+</body>
+</html>
diff --git a/src/itc/webkit2/resources/common/sample_1.html b/src/itc/webkit2/resources/common/sample_1.html
new file mode 100755 (executable)
index 0000000..3060915
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Testing Sample Page 1</title>
+</head>
+<body>
+    <h1>Sample1 HTML 1</h1>
+</body>
+</html>
diff --git a/src/itc/webkit2/resources/common/sample_2.html b/src/itc/webkit2/resources/common/sample_2.html
new file mode 100755 (executable)
index 0000000..79ca46e
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Testing Sample Page 2</title>
+</head>
+<body>
+    <h1>Sample1 HTML 2</h1>
+</body>
+</html>
diff --git a/src/itc/webkit2/resources/ewk_context_menu/index.html b/src/itc/webkit2/resources/ewk_context_menu/index.html
new file mode 100755 (executable)
index 0000000..737717a
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Context Menu Page</title>
+<body>
+  <a href="http://www.webkit.org" id="foo" >
+    <img src="webkit.png" width="200" height="200" alt="Context Menu Image Link Item"/>
+  </a>
+</body>
+</html>
diff --git a/src/itc/webkit2/resources/ewk_context_menu/webkit.png b/src/itc/webkit2/resources/ewk_context_menu/webkit.png
new file mode 100755 (executable)
index 0000000..7857352
Binary files /dev/null and b/src/itc/webkit2/resources/ewk_context_menu/webkit.png differ
diff --git a/src/itc/webkit2/resources/ewk_view/sample.html b/src/itc/webkit2/resources/ewk_view/sample.html
new file mode 100755 (executable)
index 0000000..3b43645
--- /dev/null
@@ -0,0 +1,62 @@
+<meta name="viewport" content="width=850">
+<html>
+<body>
+<div>
+Recent political upheavals and extremist-backed violence in the West Asian region, particularly in Syria and Iraq in the aftermath of the Arab Spring, have further complicated and aggravated the situation for the already dwindling Arab Christian community
+<p>
+The problems of the Christian community in West Asia are very complex. The recent political upheavals in the region, particularly in Syria and Iraq in the aftermath of the Arab Spring, have further complicated and aggravated the situation for the already dwindling community. Iraq is home to the world\92s ancient Arab Christian communities and had a sizeable Christian population of nearly 1.2 million prior to the American invasion in 2003. Ironically, after the occupation of Iraq by American-led allied forces, the rise in attacks on churches and Christian institutions by extremist groups has become unprecedented. The American invasion has aggravated the perception of Christians being the agents of the United States. According to church sources, the Christian community in Iraq has now been reduced to a population of 4,50,000. This is largely due to the absence of a democratic and secular political system.
+</p>
+ISIS threat
+<br>
+<p>
+Presently, the strengthening of Islamic militant groups, particularly the ascendancy of the al-Qaeda-inspired Islamic State of Iraq and the Levant (ISIS) has led to the mass exodus of the Christian community from Iraq. Ever since the establishment of the Islamic State, ISIS has stepped up its attacks against the Shiite, Christian and Yazidi communities. Mosul, which is the stronghold of ISIS, is one of the ancient Christian cities in the region and is believed to be the birthplace of the Biblical prophet Jonah. Ironically, since the beginning of June, ISIS militants have torched hundreds of Shia tombs and churches including the tomb of Jonah. Hundreds of Christians and Shiites have been killed and women raped by extremist forces; nuns have been kidnapped from monasteries. Last month, ISIS issued an ultimatum to the Christian community \97 either convert to Islam, pay a religious tax or \93jizya,\94 or die.
+</p>
+<p>
+The ISIS declaration states that \93we offered them three choices: Islam, the dhimma contract \97 involving the payment of jizya: if they refuse they have nothing but the sword.\94 Moreover, Christian houses, buildings and shops have been marked with the Arabic letter \93N\94 as it stands for \93Nazarene,\94 the Koranic word for Christians. At the same time, Shiite homes have been marked with the letter \93R\94 which means \93rwadish\94 (rejecters). This ultimatum has led to the mass exodus of the Christian population to the Kurdish cities of Dohuk and Irbil, which has invariably ended the centuries-old peaceful coexistence among communities and the fraying of the secular fabric of Iraqi society. Incongruously, ISIS has reiterated that there is no space for Christians in the Islamic State. Mosul, which had a sizeable Christian population of 60,000, has now been reduced to a few families. Iraq was one of the peaceful havens of Christian communities and has sent numerous bishops and patriarchs to various orthodox sects.
+</p>
+During my field research in West Asia, the common response of Iraqi nuns and priests of Bethlehem was: \93We were very safe in Iraq under Saddam Hussein but the American occupation has made our position very horrible.\94
+<div>
+In his recent appeal to the Iraqi community, the Chaldean Patriarch of Baghdad pointed out that \93Christian and Muslim blood has been mixed as it was shed in the defence of their rights and lands. Together they built a civilization, cities and a heritage.\94
+</div>
+The situation is not as different in Syria, as ISIS first experimented with its fatwa to \93convert, pay tax or die\94 in the Syrian city of Raqqa. Like Iraq, Syria is another West Asian country where Christians have lived peacefully for centuries. The al-Qaeda-oriented anti-regime rebels have attacked the Christian community mercilessly in many parts of Syria; hundreds of Christian properties and churches have been razed to the ground. In Syria, Christians have been accused of being the supporters of Syrian President Bashar al-Assad by extremists who have kidnapped two bishops belonging to the Syrian Orthodox Church and the Greek Orthodox Church. Their whereabouts are still unknown. Furthermore, most Christian cities like Aleppo, Homs and Ma\92loula have fallen into rebel hands which has further intensified the persecution of the community.
+
+Deep roots, ancient denominations
+
+West Asia is the birthplace of Christianity and home to some of the world\92s most ancient Christian denominations \97 the Maronite Church, Greek Orthodox, Chaldean, Nestorian, Syrian Orthodox, Coptic, Assyrian Orthodox, Syrian Catholic and so on. The Arab Christians are one of the main victims of the volatile and unstable political situation in West Asia. The colonial \93God trick\94 of nation-state creation and the carving out of modern Arab states have made Arab Christians victims of a potent combination of colonial and ethno-religious geopolitics. Arabic-speaking Christians have been marginalised in the region due to various socio-political and historical developments like Islamisation, extremism, massive migration, poverty and terrorism.
+
+The Arab Christian community has always boasted of a deep literary, cultural, spiritual and historical heritage and tradition. Today, it faces the threat of oblivion, with its rights getting trampled. The Christians were never lonely travellers in the Arab street. They have traditionally been connected with major socio-political movements like Pan Arabism, Ba'athism, Communism and the various West Asian liberation movements, including the Palestine Movement. The Christian community is an educated group with most of its members engaged in business and professional jobs, mainly because of its proximity to Christian missionaries, largely from Europe.
+
+At present, the community is trying hard to prove its nationalism and allegiance to the West Asian movements as it is very difficult to identify itself with Islamic groups. A recent study shows that a majority of people in the community are planning to migrate to western nations out of a sense of fear and a lack of \93belonging.\94 The conflict over reclaiming space and the Arab Christian identity in the region, especially in Syria, Palestine, Egypt and Iraq is therefore an issue of contemporary relevance in West Asian geopolitics and deserves a detailed examination for policy implications and peace negotiations here.
+
+The Christians of Palestine/Israel were in the forefront of the Palestine movement and many paid for it with life and limb in the struggle. The Arab Christians are also victims of five decades of Israeli occupation, with the boundary wall between Israel and Palestine greatly affecting the Christian community living on both sides of the divide. Spitting at clergies by orthodox Jews, especially Yeshiva students, is a recurrent phenomenon in Israel. Many a Jerusalem clergy has been subjected to abuse of this kind.
+
+Policies of the West
+
+The ever-increasing clout of Evangelical Christians of the West and their unqualified support for Israel has in recent years drowned out the voices of Arab Christians in West Asia, who are now subject to suppression by multiple forces. While Arab Christians are fighting Israel\92s repressive measures, paradoxically, the white American churches in the U.S. are propagating the idea of a \93Biblical Israel\94 and directly supporting the Israeli occupation of Palestine. The notion of a Biblical Israel was coined by the American Episcopal Church in the 1970s and it also had the indirect support of the U.S. administration to justify enormous financial support to Israel. The conservative Christians in the U.S., particularly the Republican supporters, believe that the unequivocal support for Israel fulfils a Biblical injunction to protect the Jewish State. It is an insular and strategic philosophy to justify the occupation of Israel through the lens of the Bible, and American tele-evangelists often lay stress on this aspect. Hence, the parochial approach of western Christian groups further aggravates the volatile atmosphere for the Christian community back in West Asia.
+
+The wayward interference of the West and the Israeli occupation of Palestine are the most important reasons for the terminal decline of Christian life and livelihood in the region. The West, with its short-term military gestures and quest for immediate pay-offs, has deepened the divide between the two communities which once lived peacefully in the region.
+
+The unprecedented attacks on Arab Christians have resulted in the mass exodus of the community with thousands now having taken refuge in the Scandinavian, Latin American and European countries. The narrow policies of the West with hidden political interests have damaged the progressive and secular fabric of West Asian society to a great extent. The ancient Christian community is fast becoming extinct. If this trend continues, Christians will haveRecent political upheavals and extremist-backed violence in the West Asian region, particularly in Syria and Iraq in the aftermath of the Arab Spring, have further complicated and aggravated the situation for the already dwindling Arab Christian community
+
+The problems of the Christian community in West Asia are very complex. The recent political upheavals in the region, particularly in Syria and Iraq in the aftermath of the Arab Spring, have further complicated and aggravated the situation for the already dwindling community. Iraq is home to the world\92s ancient Arab Christian communities and had a sizeable Christian population of nearly 1.2 million prior to the American invasion in 2003. Ironically, after the occupation of Iraq by American-led allied forces, the rise in attacks on churches and Christian institutions by extremist groups has become unprecedented. The American invasion has aggravated the perception of Christians being the agents of the United States. According to church sources, the Christian community in Iraq has now been reduced to a population of 4,50,000. This is largely due to the absence of a democratic and secular political system.
+
+ISIS threat
+
+Presently, the strengthening of Islamic militant groups, particularly the ascendancy of the al-Qaeda-inspired Islamic State of Iraq and the Levant (ISIS) has led to the mass exodus of the Christian community from Iraq. Ever since the establishment of the Islamic State, ISIS has stepped up its attacks against the Shiite, Christian and Yazidi communities. Mosul, which is the stronghold of ISIS, is one of the ancient Christian cities in the region and is believed to be the birthplace of the Biblical prophet Jonah. Ironically, since the beginning of June, ISIS militants have torched hundreds of Shia tombs and churches including the tomb of Jonah. Hundreds of Christians and Shiites have been killed and women raped by extremist forces; nuns have been kidnapped from monasteries. Last month, ISIS issued an ultimatum to the Christian community \97 either convert to Islam, pay a religious tax or \93jizya,\94 or die.
+
+The ISIS declaration states that \93we offered them three choices: Islam, the dhimma contract \97 involving the payment of jizya: if they refuse they have nothing but the sword.\94 Moreover, Christian houses, buildings and shops have been marked with the Arabic letter \93N\94 as it stands for \93Nazarene,\94 the Koranic word for Christians. At the same time, Shiite homes have been marked with the letter \93R\94 which means \93rwadish\94 (rejecters). This ultimatum has led to the mass exodus of the Christian population to the Kurdish cities of Dohuk and Irbil, which has invariably ended the centuries-old peaceful coexistence among communities and the fraying of the secular fabric of Iraqi society. Incongruously, ISIS has reiterated that there is no space for Christians in the Islamic State. Mosul, which had a sizeable Christian population of 60,000, has now been reduced to a few families. Iraq was one of the peaceful havens of Christian communities and has sent numerous bishops and patriarchs to various orthodox sects.
+
+During my field research in West Asia, the common response of Iraqi nuns and priests of Bethlehem was: \93We were very safe in Iraq under Saddam Hussein but the American occupation has made our position very horrible.\94
+
+In his recent appeal to the Iraqi community, the Chaldean Patriarch of Baghdad pointed out that \93Christian and Muslim blood has been mixed as it was shed in the defence of their rights and lands. Together they built a civilization, cities and a heritage.\94
+
+The situation is not as different in Syria, as ISIS first experimented with its fatwa to \93convert, pay tax or die\94 in the Syrian city of Raqqa. Like Iraq, Syria is another West Asian country where Christians have lived peacefully for centuries. The al-Qaeda-oriented anti-regime rebels have attacked the Christian community mercilessly in many parts of Syria; hundreds of Christian properties and churches have been razed to the ground. In Syria, Christians have been accused of being the supporters of Syrian President Bashar al-Assad by extremists who have kidnapped two bishops belonging to the Syrian Orthodox Church and the Greek Orthodox Church. Their whereabouts are still unknown. Furthermore, most Christian cities like Aleppo, Homs and Ma\92loula have fallen into rebel hands which has further intensified the persecution of the community.
+
+Deep roots, ancient denominations
+
+West Asia is the birthplace of Christianity and home to some of the world\92s most ancient Christian denominations \97 the Maronite Church, Greek Orthodox, Chaldean, Nestorian, Syrian Orthodox, Coptic, Assyrian Orthodox, Syrian Catholic and so on. The Arab Christians are one of the main victims of the volatile and unstable political situation in West Asia. The colonial \93God trick\94 of nation-state creation and the carving out of modern Arab states have made Arab Christians victims of a potent combination of colonial and ethno-religious geopolitics. Arabic-speaking Christians have been marginalised in the region due to various socio-political and historical developments like Islamisation, extremism, massive migration, poverty and terrorism.
+
+The Arab Christian community has always boasted of a deep literary, cultural, spiritual and historical heritage and tradition. Today, it faces the threat of oblivion, with its rights getting trampled. The Christians were never lonely travellers in the Arab street. They have traditionally been connected with major socio-political movements like Pan Arabism, Ba'athism, Communism and the various West Asian liberation movements, including the Palestine Movement. The Christian community is an educated group with most of its members engaged in business and professional jobs, mainly because of its proximity to Christian missionaries, largely from Europe.
+</div>
+</body>
+</html>
diff --git a/src/itc/webkit2/resources/ewk_view/text_find.html b/src/itc/webkit2/resources/ewk_view/text_find.html
new file mode 100755 (executable)
index 0000000..1a0965c
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<body>
+apple apple apple banana banana coconut
+</body>
diff --git a/src/itc/webkit2/tct-webkit2-native.c b/src/itc/webkit2/tct-webkit2-native.c
new file mode 100755 (executable)
index 0000000..372fa03
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-webkit2-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/webkit2/tct-webkit2-native.h b/src/itc/webkit2/tct-webkit2-native.h
new file mode 100755 (executable)
index 0000000..ee08720
--- /dev/null
@@ -0,0 +1,173 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_WEBKIT2_NATIVE_H__
+#define __TCT_WEBKIT2_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_webkit_efl_startup(void);
+extern void ITs_webkit_efl_cleanup(void);
+
+extern int ITc_webkit_efl_ewk_init_p(void);
+extern int ITc_webkit_efl_ewk_shutdown_p(void);
+extern int ITc_ewk_back_forward_list_current_item_get_p(void);
+extern int ITc_ewk_back_forward_list_previous_item_get_p(void);
+extern int ITc_ewk_back_forward_list_next_item_get_p(void);
+extern int ITc_ewk_back_forward_list_count_p(void);
+extern int ITc_ewk_back_forward_list_item_at_index_get_p(void);
+extern int ITc_ewk_back_forward_list_n_back_items_copy_p(void);
+extern int ITc_ewk_back_forward_list_n_forward_items_copy_p(void);
+extern int ITc_ewk_back_forward_list_item_ref_p(void);
+extern int ITc_ewk_back_forward_list_item_unref_p(void);
+extern int ITc_ewk_back_forward_list_item_url_get_p(void);
+extern int ITc_ewk_back_forward_list_item_original_url_get_p(void);
+extern int ITc_ewk_back_forward_list_item_title_get_p(void);
+extern int ITc_ewk_context_cache_model_set_p(void);
+extern int ITc_ewk_context_cache_model_get_p(void);
+extern int ITc_ewk_context_cookie_manager_get_p(void);
+extern int ITc_ewk_context_resource_cache_clear_p(void);
+extern int ITc_ewk_cookie_manager_accept_policy_set_p(void);
+extern int ITc_ewk_cookie_manager_accept_policy_async_get_p(void);
+extern int ITc_ewk_cookie_manager_cookies_clear_p(void);
+extern int ITc_ewk_policy_decision_cookie_get_p(void);
+extern int ITc_ewk_policy_decision_url_get_p(void);
+extern int ITc_ewk_policy_decision_scheme_get_p(void);
+extern int ITc_ewk_policy_decision_host_get_p(void);
+extern int ITc_ewk_policy_decision_http_method_get_p(void);
+extern int ITc_ewk_policy_decision_use_p(void);
+extern int ITc_ewk_policy_decision_ignore_p(void);
+extern int ITc_ewk_policy_decision_type_get_p(void);
+extern int ITc_ewk_policy_decision_navigation_type_get_p(void);
+extern int ITc_ewk_policy_decision_response_mime_get_p(void);
+extern int ITc_ewk_policy_decision_response_headers_get_p(void);
+extern int ITc_ewk_policy_decision_response_status_code_get_p(void);
+extern int ITc_ewk_settings_javascript_enabled_set_p(void);
+extern int ITc_ewk_settings_javascript_enabled_get_p(void);
+extern int ITc_ewk_settings_loads_images_automatically_set_p(void);
+extern int ITc_ewk_settings_loads_images_automatically_get_p(void);
+extern int ITc_ewk_settings_default_text_encoding_name_set_p(void);
+extern int ITc_ewk_settings_default_text_encoding_name_get_p(void);
+extern int ITc_ewk_settings_default_font_size_set_p(void);
+extern int ITc_ewk_settings_default_font_size_get_p(void);
+extern int ITc_ewk_settings_scripts_can_open_windows_set_p(void);
+extern int ITc_ewk_settings_scripts_can_open_windows_get_p(void);
+extern int ITc_ewk_view_add_p(void);
+extern int ITc_ewk_view_context_get_p(void);
+extern int ITc_ewk_view_url_get_p(void);
+extern int ITc_ewk_view_url_set_p(void);
+extern int ITc_ewk_view_reload_p(void);
+extern int ITc_ewk_view_stop_p(void);
+extern int ITc_ewk_view_settings_get_p(void);
+extern int ITc_ewk_view_back_p(void);
+extern int ITc_ewk_view_forward_p(void);
+extern int ITc_ewk_view_back_possible_p(void);
+extern int ITc_ewk_view_forward_possible_p(void);
+extern int ITc_ewk_view_back_forward_list_clear_p(void);
+extern int ITc_ewk_view_back_forward_list_get_p(void);
+extern int ITc_ewk_view_title_get_p(void);
+extern int ITc_ewk_view_load_progress_get_p(void);
+extern int ITc_ewk_view_user_agent_set_p(void);
+extern int ITc_ewk_view_user_agent_get_p(void);
+extern int ITc_ewk_view_contents_size_get_p(void);
+extern int ITc_ewk_view_script_execute_p(void);
+extern int ITc_ewk_view_scale_set_p(void);
+extern int ITc_ewk_view_scale_get_p(void);
+extern int ITc_ewk_view_fullscreen_exit_p(void);
+extern int ITc_ewk_view_suspend_p(void);
+extern int ITc_ewk_view_resume_p(void);
+extern int ITc_ewk_view_url_request_set_p(void);
+extern int ITc_ewk_view_scroll_by_p(void);
+extern int ITc_ewk_view_scroll_pos_get_p(void);
+extern int ITc_ewk_view_scroll_set_p(void);
+extern int ITc_ewk_view_text_find_p(void);
+
+testcase tc_array[] = {
+    {"ITc_webkit_efl_ewk_init_p", ITc_webkit_efl_ewk_init_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_webkit_efl_ewk_shutdown_p", ITc_webkit_efl_ewk_shutdown_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_current_item_get_p", ITc_ewk_back_forward_list_current_item_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_previous_item_get_p", ITc_ewk_back_forward_list_previous_item_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_next_item_get_p", ITc_ewk_back_forward_list_next_item_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_count_p", ITc_ewk_back_forward_list_count_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_item_at_index_get_p", ITc_ewk_back_forward_list_item_at_index_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_n_back_items_copy_p", ITc_ewk_back_forward_list_n_back_items_copy_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_n_forward_items_copy_p", ITc_ewk_back_forward_list_n_forward_items_copy_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_item_ref_p", ITc_ewk_back_forward_list_item_ref_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_item_unref_p", ITc_ewk_back_forward_list_item_unref_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_item_url_get_p", ITc_ewk_back_forward_list_item_url_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_item_original_url_get_p", ITc_ewk_back_forward_list_item_original_url_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_back_forward_list_item_title_get_p", ITc_ewk_back_forward_list_item_title_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_context_cache_model_set_p", ITc_ewk_context_cache_model_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_context_cache_model_get_p", ITc_ewk_context_cache_model_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_context_cookie_manager_get_p", ITc_ewk_context_cookie_manager_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_context_resource_cache_clear_p", ITc_ewk_context_resource_cache_clear_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_cookie_manager_accept_policy_set_p", ITc_ewk_cookie_manager_accept_policy_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_cookie_manager_accept_policy_async_get_p", ITc_ewk_cookie_manager_accept_policy_async_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_cookie_manager_cookies_clear_p", ITc_ewk_cookie_manager_cookies_clear_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_cookie_get_p", ITc_ewk_policy_decision_cookie_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_url_get_p", ITc_ewk_policy_decision_url_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_scheme_get_p", ITc_ewk_policy_decision_scheme_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_host_get_p", ITc_ewk_policy_decision_host_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_http_method_get_p", ITc_ewk_policy_decision_http_method_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_use_p", ITc_ewk_policy_decision_use_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_ignore_p", ITc_ewk_policy_decision_ignore_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_type_get_p", ITc_ewk_policy_decision_type_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_navigation_type_get_p", ITc_ewk_policy_decision_navigation_type_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_response_mime_get_p", ITc_ewk_policy_decision_response_mime_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_response_headers_get_p", ITc_ewk_policy_decision_response_headers_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_policy_decision_response_status_code_get_p", ITc_ewk_policy_decision_response_status_code_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_settings_javascript_enabled_set_p", ITc_ewk_settings_javascript_enabled_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_settings_javascript_enabled_get_p", ITc_ewk_settings_javascript_enabled_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_settings_loads_images_automatically_set_p", ITc_ewk_settings_loads_images_automatically_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_settings_loads_images_automatically_get_p", ITc_ewk_settings_loads_images_automatically_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_settings_default_text_encoding_name_set_p", ITc_ewk_settings_default_text_encoding_name_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_settings_default_text_encoding_name_get_p", ITc_ewk_settings_default_text_encoding_name_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_settings_default_font_size_set_p", ITc_ewk_settings_default_font_size_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_settings_default_font_size_get_p", ITc_ewk_settings_default_font_size_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_settings_scripts_can_open_windows_set_p", ITc_ewk_settings_scripts_can_open_windows_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_settings_scripts_can_open_windows_get_p", ITc_ewk_settings_scripts_can_open_windows_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_add_p", ITc_ewk_view_add_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_context_get_p", ITc_ewk_view_context_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_url_get_p", ITc_ewk_view_url_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_url_set_p", ITc_ewk_view_url_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_reload_p", ITc_ewk_view_reload_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_stop_p", ITc_ewk_view_stop_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_settings_get_p", ITc_ewk_view_settings_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_back_p", ITc_ewk_view_back_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_forward_p", ITc_ewk_view_forward_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_back_possible_p", ITc_ewk_view_back_possible_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_forward_possible_p", ITc_ewk_view_forward_possible_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_back_forward_list_clear_p", ITc_ewk_view_back_forward_list_clear_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_back_forward_list_get_p", ITc_ewk_view_back_forward_list_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_title_get_p", ITc_ewk_view_title_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_load_progress_get_p", ITc_ewk_view_load_progress_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_user_agent_set_p", ITc_ewk_view_user_agent_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_user_agent_get_p", ITc_ewk_view_user_agent_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_contents_size_get_p", ITc_ewk_view_contents_size_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_script_execute_p", ITc_ewk_view_script_execute_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_scale_set_p", ITc_ewk_view_scale_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_scale_get_p", ITc_ewk_view_scale_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_fullscreen_exit_p", ITc_ewk_view_fullscreen_exit_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_suspend_p", ITc_ewk_view_suspend_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_resume_p", ITc_ewk_view_resume_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_url_request_set_p", ITc_ewk_view_url_request_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_scroll_by_p", ITc_ewk_view_scroll_by_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_scroll_pos_get_p", ITc_ewk_view_scroll_pos_get_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_scroll_set_p", ITc_ewk_view_scroll_set_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {"ITc_ewk_view_text_find_p", ITc_ewk_view_text_find_p, ITs_webkit_efl_startup, ITs_webkit_efl_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_WEBKIT2_NATIVE_H__
diff --git a/src/itc/widget-viewer-evas/CMakeLists.txt b/src/itc/widget-viewer-evas/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..d20f09f
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "widget-viewer-evas")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "widget_viewer_evas")
+SET(TC_SOURCES
+       ITs-widget-viewer-evas-common.c
+       ITs-widget-viewer-evas.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB} dlog capi-base-common icu-i18n vconf
+       bundle
+       widget_service
+       elementary
+       capi-appfw-application
+       capi-system-info
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/widget-viewer-evas/ITs-widget-viewer-evas-common.c b/src/itc/widget-viewer-evas/ITs-widget-viewer-evas-common.c
new file mode 100755 (executable)
index 0000000..512177c
--- /dev/null
@@ -0,0 +1,230 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-widget-viewer-evas-common.h"
+
+/** @addtogroup itc-widget_viewer-evas
+*  @ingroup itc
+*  @{
+*/
+
+/**
+ * @function           WidgetServiceGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet: error code returned
+ * @return                     error string
+ */
+char* WidgetViewerGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case WIDGET_ERROR_INVALID_PARAMETER:            szErrorVal = "WIDGET_ERROR_INVALID_PARAMETER";                  break;
+               case WIDGET_ERROR_OUT_OF_MEMORY:                        szErrorVal = "WIDGET_ERROR_OUT_OF_MEMORY";                              break;
+               case WIDGET_ERROR_RESOURCE_BUSY:                        szErrorVal = "WIDGET_ERROR_RESOURCE_BUSY";                              break;
+               case WIDGET_ERROR_PERMISSION_DENIED:            szErrorVal = "WIDGET_ERROR_PERMISSION_DENIED";                  break;
+               case WIDGET_ERROR_CANCELED:                                     szErrorVal = "WIDGET_ERROR_CANCELED";                                   break;
+               case WIDGET_ERROR_IO_ERROR:                                     szErrorVal = "WIDGET_ERROR_IO_ERROR";                                   break;
+               case WIDGET_ERROR_TIMED_OUT:                            szErrorVal = "WIDGET_ERROR_TIMED_OUT";                                  break;
+               case WIDGET_ERROR_NOT_SUPPORTED:                        szErrorVal = "WIDGET_ERROR_NOT_SUPPORTED";                              break;
+               case WIDGET_ERROR_FILE_NO_SPACE_ON_DEVICE:      szErrorVal = "WIDGET_ERROR_FILE_NO_SPACE_ON_DEVICE";    break;
+               case WIDGET_ERROR_FAULT:                                        szErrorVal = "WIDGET_ERROR_FAULT";                                              break;
+               case WIDGET_ERROR_ALREADY_EXIST:                        szErrorVal = "WIDGET_ERROR_ALREADY_EXIST";                              break;
+               case WIDGET_ERROR_ALREADY_STARTED:                      szErrorVal = "WIDGET_ERROR_ALREADY_STARTED";                    break;
+               case WIDGET_ERROR_NOT_EXIST:                            szErrorVal = "WIDGET_ERROR_NOT_EXIST";                                  break;
+               case WIDGET_ERROR_DISABLED:                                     szErrorVal = "WIDGET_ERROR_DISABLED";                                   break;
+               default:                                                                        szErrorVal = "Unknown Error";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           WidgetServiceTimeout
+ * @description                Called if some callback is not invoked for a particular timeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */
+gboolean WidgetViewerTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               pMainLoop = NULL;
+       }
+       FPRINTF("[Line: %d][%s] Callback Timeout\\n", __LINE__, API_NAMESPACE);
+       return false;
+}
+
+/**
+ * @function           WidgetViewerGetWidgetId
+ * @description                widget_viewer_evas_get_widget_id api is called in this function.
+ * @parameter          Evas_Object *widget
+ * @return                     NA
+ */
+void WidgetViewerGetWidgetId(Evas_Object *widget)
+{
+       g_pWidgetID = widget_viewer_evas_get_widget_id(widget);
+}
+
+/**
+ * @function           WidgetViewerFeedMouseUpEvent
+ * @description                widget_viewer_evas_feed_mouse_up_event api is called in this function.
+ * @parameter          Evas_Object *widget
+ * @return                     NA
+ */
+void WidgetViewerFeedMouseUpEvent(Evas_Object *widget)
+{
+       Evas *e;
+
+       e = evas_object_evas_get(widget);
+       evas_event_feed_mouse_down(e, 1, EVAS_BUTTON_NONE, 0, NULL);
+
+       g_nRet = widget_viewer_evas_feed_mouse_up_event(widget);
+}
+
+/**
+ * @function           WidgetViewerTcFreeze
+ * @description                widget_viewer_evas_freeze_visibility api is called in this function.
+ * @parameter          Evas_Object *widget
+ * @return                     NA
+ */
+void WidgetViewerTcFreeze(Evas_Object *widget)
+{
+       g_nRet = widget_viewer_evas_freeze_visibility(widget, WIDGET_VISIBILITY_STATUS_SHOW_FIXED);
+}
+
+/**
+ * @function           WidgetViewerGetTitleString
+ * @description                widget_viewer_evas_get_title_string api is called in this function.
+ * @parameter          Evas_Object *widget
+ * @return                     NA
+ */
+void WidgetViewerGetTitleString(Evas_Object *widget)
+{
+       g_pTitleString = widget_viewer_evas_get_title_string(widget);
+}
+
+/**
+ * @function           WidgetViewerPause
+ * @description                widget_viewer_evas_pause_widget api is called in this function.
+ * @parameter          Evas_Object *widget
+ * @return                     NA
+ */
+void WidgetViewerPause(Evas_Object *widget)
+{
+       g_nRet = widget_viewer_evas_pause_widget(widget);
+}
+
+/**
+ * @function           WidgetViewerResume
+ * @description                widget_viewer_evas_resume_widget api is called in this function.
+ * @parameter          Evas_Object *widget
+ * @return                     NA
+ */
+void WidgetViewerResume(Evas_Object *widget)
+{
+       g_nRet = widget_viewer_evas_resume_widget(widget);
+}
+
+/**
+ * @function           WidgetViewerThaw
+ * @description                widget_viewer_evas_thaw_visibility api is called in this function.
+ * @parameter          Evas_Object *widget
+ * @return                     NA
+ */
+void WidgetViewerThaw(Evas_Object *widget)
+{
+       g_nRet = widget_viewer_evas_thaw_visibility(widget);
+}
+
+/**
+ * @function           WidgetViewerGetContent
+ * @description                widget_viewer_evas_get_content_info api is called in this function.
+ * @parameter          Evas_Object *widget
+ * @return                     NA
+ */
+void WidgetViewerGetContent(Evas_Object *widget)
+{
+       g_pContentString = widget_viewer_evas_get_content_info(widget);
+}
+
+/**
+ * @function           WidgetViewerActivate
+ * @description                widget_viewer_evas_activate_faulted_widget api is called in this function.
+ * @parameter          Evas_Object *widget
+ * @return                     NA
+ */
+void WidgetViewerActivate(Evas_Object *widget)
+{
+       widget_viewer_evas_activate_faulted_widget(widget);
+       /* No returns */
+}
+
+/**
+ * @function           WidgetViewerAsyncRetCallback
+ * @description                This function is called from Widget_Create_CB callback. Validates the parameters values.
+ * @parameter          test_case_cb cb, widget_evas_event_info *info
+ * @return                     1 (true) or 0 (false)
+ */
+int WidgetViewerAsyncRetCallback(test_case_cb cb, struct widget_evas_event_info *info)
+{
+       if ( (info == NULL) || (info->error != WIDGET_ERROR_NONE) || (info->widget_app_id == NULL) || (info->event != WIDGET_EVENT_CREATED) )
+       {
+               FPRINTF("[Line: %d][%s] WidgetViewerAsyncRetCallback failed \\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       return 0;
+}
+
+/**
+ * @function           Widget_Viewer_Evas_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey; key value
+ * @return                     true if supported else false
+ */
+bool Widget_Viewer_Evas_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("\\n[Line: %d] Null key value passed to function: Widget_Viewer_Evas_Check_System_Info_Feature_Supported", __LINE__);
+               return false;
+       }
+
+       bool bValue = false;
+       int nRetVal = system_info_get_platform_bool(pszKey, &bValue);
+
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line: %d] system_info_get_platform_bool returned (error = %s) for (key = %s)", __LINE__, WidgetViewerGetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("\\n[Line: %d] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)", __LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line: %d] system_info_get_platform_bool returned Supported status feature for (key = %s)", __LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+/** @} */
diff --git a/src/itc/widget-viewer-evas/ITs-widget-viewer-evas-common.h b/src/itc/widget-viewer-evas/ITs-widget-viewer-evas-common.h
new file mode 100755 (executable)
index 0000000..a8f4b4f
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_WIDGET_VIEWER_EVAS_COMMON_H_
+#define _ITS_WIDGET_VIEWER_EVAS_COMMON_H_
+
+#include "assert.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <glib.h>
+#include <app.h>
+#include "widget_service.h"
+#include "widget_errno.h"
+#include <Evas.h>
+#include <Ecore_Evas.h>
+#include <Edje.h>
+#include <Elementary.h>
+#include <system_info.h>
+
+#include "widget_viewer_evas.h"
+
+/** @addtogroup itc-widget_viewer-evas
+* @ingroup             itc
+* @{
+*/
+
+#define API_NAMESPACE                          "WIDGET_SERVICE_ITC"
+#define TIMEOUT_CB                                     30000
+#define PATH_LEN                                       1024
+#define GMAINTIMEOUT                           30000           //30 seconds
+#define SAMPLE_PKGNAME                         "org.tizen.sample"
+#define SAMPLE_WIDGET                          SAMPLE_PKGNAME
+#define WIDGET_VIEWER_EVAS_FEATURE     "http://tizen.org/feature/shell.appwidget"
+
+#define START_TEST {\
+       FPRINTF("Starting test: %s\\n",__FUNCTION__);\
+       if ( g_bSkipExecutionWithPass )\
+       {\
+               FPRINTF("[Line: %d][%s] Feature http://tizen.org/feature/shell.appwidget is not supported so skipping test\\n", __LINE__, API_NAMESPACE);\
+               return 0;\
+       }\
+       if ( g_bSkipExecutionWithFail )\
+       {\
+               FPRINTF("[Line: %d][%s] Feature http://tizen.org/feature/shell.appwidget is not supported but API not returned WIDGET_ERROR_NOT_SUPPORTED\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+       if ( !g_bWidgetCreation )\
+       {\
+               FPRINTF("[Line: %d][%s] Precondition of Widget-Viewer create failed so leaving test\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+}
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG, "a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define PRINT_RESULT(eCompare, eRetVal, API, Error) {\
+       if ( eRetVal == eCompare )\
+{\
+       if ( DEBUG )\
+{\
+       FPRINTF("[Line: %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+}\
+}\
+       else \
+{\
+       FPRINTF("[Line: %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+       return 1;\
+}\
+}
+
+#define RUN_POLLING_LOOP {\
+       if ( g_bWidgetViewerCBFlag == false )\
+       {\
+               g_loop = g_main_loop_new(NULL, false);\
+               nTimeoutId = g_timeout_add(TIMEOUT_CB, WidgetViewerTimeout, g_loop);\
+               g_main_loop_run(g_loop);\
+               g_source_remove(nTimeoutId);\
+               g_loop = NULL;\
+       }\
+}
+
+FILE *g_fpLog;
+GMainLoop *g_loop;
+const char *g_pWidgetID;
+const char *g_pTitleString;
+const char *g_pContentString;
+int g_nRet;
+typedef int (*test_case_cb)(Evas_Object *widget);
+
+char *WidgetViewerGetError(int nRet);
+gboolean WidgetViewerTimeout(gpointer data);
+void WidgetViewerGetWidgetId(Evas_Object *widget);
+void WidgetViewerFeedMouseUpEvent(Evas_Object *widget);
+void WidgetViewerTcFreeze(Evas_Object *widget);
+void WidgetViewerGetTitleString(Evas_Object *widget);
+void WidgetViewerPause(Evas_Object *widget);
+void WidgetViewerResume(Evas_Object *widget);
+void WidgetViewerThaw(Evas_Object *widget);
+void WidgetViewerGetContent(Evas_Object *widget);
+void WidgetViewerActivate(Evas_Object *widget);
+int WidgetViewerAsyncRetCallback(test_case_cb cb, struct widget_evas_event_info *info);
+bool Widget_Viewer_Evas_Check_System_Info_Feature_Supported(char* pszKey);
+
+/** @} */
+#endif  //_ITS_WIDGET_VIEWER_EVAS_COMMON_H_
diff --git a/src/itc/widget-viewer-evas/ITs-widget-viewer-evas.c b/src/itc/widget-viewer-evas/ITs-widget-viewer-evas.c
new file mode 100755 (executable)
index 0000000..a90328d
--- /dev/null
@@ -0,0 +1,1074 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-widget-viewer-evas-common.h"
+
+/** @addtogroup itc-widget_viewer-evas
+*  @ingroup itc
+*  @{
+*/
+
+//& set: WidgetViewer-evas
+Evas_Object *g_win = NULL;
+
+bool g_bWidgetCreation = false;
+bool g_bWidgetViewerCBFlag = false;
+bool g_bSkipExecutionWithPass = false;
+bool g_bSkipExecutionWithFail = false;
+bool g_bWidgetViewerEvasReadFeatureStatusDone = false;
+bool g_bWidgetFeatureSupported = false;
+
+/**
+ * @brief Callback funtion
+ */
+static void widget_create_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       FPRINTF("[Line: %d][%s] widget_create_cb called. \\n", __LINE__, API_NAMESPACE);
+       struct widget_evas_event_info *info = event_info;
+       test_case_cb cb = data;
+       int nRet;
+
+       nRet = WidgetViewerAsyncRetCallback(cb, info);
+       if ( !nRet && cb )
+       {
+               int w;
+               int h;
+               cb(obj);
+
+               nRet = widget_service_get_size(WIDGET_SIZE_TYPE_4x4, &w, &h);
+               if ( nRet == WIDGET_ERROR_NONE )
+               {
+                       evas_object_resize(obj, w, h);
+                       evas_object_color_set(obj, 255, 255, 255, 255); /* Just for the line-coverage */
+                       evas_object_hide(obj);
+                       evas_object_show(obj);
+               }
+       }
+
+       if ( g_loop )
+       {
+               g_main_loop_quit(g_loop);
+       }
+}
+
+/**
+ * @function           ITs_widget_viewer_evas_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_widget_viewer_evas_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       if ( false == g_bWidgetViewerEvasReadFeatureStatusDone )
+       {
+               g_bWidgetFeatureSupported = Widget_Viewer_Evas_Check_System_Info_Feature_Supported(WIDGET_VIEWER_EVAS_FEATURE);
+               g_bWidgetViewerEvasReadFeatureStatusDone = true;
+       }
+
+       elm_init(0, NULL);
+       elm_config_preferred_engine_set("opengl_x11");
+       g_win = elm_win_add(NULL, "ITC WIN", ELM_WIN_BASIC);
+
+       int nRet = widget_viewer_evas_init(g_win);
+       if ( !g_bWidgetFeatureSupported )
+       {
+               if ( nRet == WIDGET_ERROR_NOT_SUPPORTED )
+               {
+                       g_bSkipExecutionWithPass = true;
+                       return;
+               }
+
+               g_bSkipExecutionWithFail = true;
+               return;
+       }
+
+       if ( nRet != WIDGET_ERROR_NONE )
+       {
+               g_bWidgetCreation = false;
+       }
+       else
+       {
+               g_bWidgetCreation = true;
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_init success\\n", __LINE__, API_NAMESPACE);
+       }
+       return;
+}
+
+/**
+ * @function           ITs_widget_viewer_evas_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_widget_viewer_evas_cleanup(void)
+{
+       if ( g_win )
+       {
+               evas_object_del(g_win);
+       }
+       elm_shutdown();
+
+       if ( g_bWidgetCreation == true )
+       {
+               int nRet;
+               nRet = widget_viewer_evas_fini();
+               if ( nRet == WIDGET_ERROR_NONE )
+               {
+                       g_bWidgetCreation = false;
+                       FPRINTF("[Line: %d][%s] widget_viewer_evas_fini success\\n", __LINE__, API_NAMESPACE);
+               }
+       }
+       return;
+}
+
+
+/** @addtogroup        itc-widget_viewer-evas-testcases
+* @brief               Integration testcases for module widget_viewer-evas
+* @ingroup             itc-widget_viewer-evas
+* @{
+*/
+
+//& purpose: widget viewer evas get widget id
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_get_widget_id_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer get widget id
+* @scenario                            get widget id
+* @apicovered                  widget_viewer_evas_get_widget_id
+* @passcase                            When widget_viewer_evas_get_widget_id is successful
+* @failcase                            If target API widget_viewer_evas_get_widget_id fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_get_widget_id_p(void)
+{
+       START_TEST;
+
+       Evas_Object *widget;
+       int w, h;
+       int nTimeoutId = 0;
+
+       widget = widget_viewer_evas_add_widget(g_win, SAMPLE_PKGNAME, NULL, 0.0f);
+       if ( widget == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_add_widget failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       g_pWidgetID = NULL;
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_create_cb, WidgetViewerGetWidgetId);
+
+       int ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       if ( ret != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_size failed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       RUN_POLLING_LOOP;
+
+       if ( g_pWidgetID == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_get_widget_id failed. \\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_get_widget_id passed, id is: %s\\n", __LINE__, API_NAMESPACE, g_pWidgetID);
+       }
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+       return 0;
+}
+
+//& purpose: widget viewer evas get period
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_get_period_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function get period
+* @scenario                            get period
+* @apicovered                  widget_viewer_evas_get_period
+* @passcase                            When widget_viewer_evas_get_period is successful
+* @failcase                            If target API widget_viewer_evas_get_period fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_get_period_p(void)
+{
+       START_TEST;
+       double period = 0.0;
+
+       period = widget_viewer_evas_get_period(g_win);
+       FPRINTF("[Line: %d][%s] widget_viewer_evas_get_period = [%f]\\n", __LINE__, API_NAMESPACE, period);
+       return 0;
+}
+
+//& purpose: widget viewer evas is visibility frozen
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_is_visibility_frozen_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas is visibility frozen
+* @scenario                            is visibility frozen
+* @apicovered                  widget_viewer_evas_is_visibility_frozen
+* @passcase                            When widget_viewer_evas_is_visibility_frozen is successful
+* @failcase                            If target API widget_viewer_evas_is_visibility_frozen fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_is_visibility_frozen_p(void)
+{
+       START_TEST;
+       bool bIsVisibilityFrozen = false;
+
+       bIsVisibilityFrozen = widget_viewer_evas_is_visibility_frozen(g_win);
+
+       FPRINTF("[Line: %d][%s] widget_viewer_evas_is_visibility_frozen = [%d]\\n", __LINE__, API_NAMESPACE, bIsVisibilityFrozen);
+
+       return 0;
+}
+
+
+//& purpose: widget viewer evas is widget
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_is_widget_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas is widget
+* @scenario                            is widget
+* @apicovered                  widget_viewer_evas_is_widget
+* @passcase                            When widget_viewer_evas_is_widget is successful
+* @failcase                            If target API widget_viewer_evas_is_widget fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_is_widget_p(void)
+{
+       START_TEST;
+       bool bIswidget = false;
+
+       bIswidget = widget_viewer_evas_is_widget(g_win);
+
+       FPRINTF("[Line: %d][%s] widget_viewer_evas_is_widget = [%d]\\n", __LINE__, API_NAMESPACE, bIswidget);
+
+       return 0;
+}
+
+//& purpose: widget viewer evas is faulted
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_is_faulted_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas is faulted
+* @scenario                            is faulted
+* @apicovered                  widget_viewer_evas_is_faulted
+* @passcase                            When widget_viewer_evas_is_faulted is successful
+* @failcase                            If target API widget_viewer_evas_is_faulted fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_is_faulted_p(void)
+{
+       START_TEST;
+       bool bIsFaulted = false;
+
+       bIsFaulted = widget_viewer_evas_is_faulted(g_win);
+
+       FPRINTF("[Line: %d][%s] widget_viewer_evas_is_faulted = [%d]\\n", __LINE__, API_NAMESPACE, bIsFaulted);
+       return 0;
+}
+
+
+//& purpose: widget viewer evas notify resumed status of viewer
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_notify_resumed_status_of_viewer_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas notify resumed status of viewer
+* @scenario                            notify resumed status of viewer
+* @apicovered                  widget_viewer_evas_notify_resumed_status_of_viewer
+* @passcase                            When widget_viewer_evas_notify_resumed_status_of_viewer is successful
+* @failcase                            If target API widget_viewer_evas_notify_resumed_status_of_viewer fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_notify_resumed_status_of_viewer_p(void)
+{
+       START_TEST;
+       int nRet;
+
+       nRet = widget_viewer_evas_notify_resumed_status_of_viewer();
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_viewer_evas_notify_resumed_status_of_viewer", WidgetViewerGetError(nRet));
+
+       FPRINTF("[Line: %d][%s] widget_viewer_evas_notify_resumed_status_of_viewer \\n", __LINE__, API_NAMESPACE);
+       return 0;
+}
+
+//& purpose: widget viewer evas notify paused status of viewer
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_notify_paused_status_of_viewer_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas notify paused status of viewer
+* @scenario                            notify paused status of viewer
+* @apicovered                  widget_viewer_evas_notify_paused_status_of_viewer
+* @passcase                            When widget_viewer_evas_notify_paused_status_of_viewer is successful
+* @failcase                            If target API widget_viewer_evas_notify_paused_status_of_viewer fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_notify_paused_status_of_viewer_p(void)
+{
+       START_TEST;
+       int nRet;
+
+       nRet = widget_viewer_evas_notify_paused_status_of_viewer();
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_viewer_evas_notify_paused_status_of_viewer", WidgetViewerGetError(nRet));
+
+       FPRINTF("[Line: %d][%s] widget_viewer_evas_notify_paused_status_of_viewer \\n", __LINE__, API_NAMESPACE);
+
+       return 0;
+}
+
+//& purpose: widget viewer evas pause widget
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_pause_widget_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas pause widget
+* @scenario                            pause widget
+* @apicovered                  widget_viewer_evas_pause_widget
+* @passcase                            When widget_viewer_evas_pause_widget is successful
+* @failcase                            If target API widget_viewer_evas_pause_widget fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_pause_widget_p(void)
+{
+       START_TEST;
+       Evas_Object *widget;
+       int w, h;
+       int nTimeoutId = 0;
+
+       widget = widget_viewer_evas_add_widget(g_win, SAMPLE_PKGNAME, NULL, 0.0f);
+       if ( widget == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_add_widget failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       g_nRet = -1;
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_create_cb, WidgetViewerPause);
+
+       int ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       if ( ret != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_size failed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       RUN_POLLING_LOOP;
+
+       if ( g_nRet != 0 )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_pause_widget failed. \\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_pause_widget passed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+       return 0;
+}
+
+
+//& purpose: widget viewer evas resume widget
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_resume_widget_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas resume widget
+* @scenario                            resume widget
+* @apicovered                  widget_viewer_evas_resume_widget
+* @passcase                            When widget_viewer_evas_resume_widget is successful
+* @failcase                            If target API widget_viewer_evas_resume_widget fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_resume_widget_p(void)
+{
+       START_TEST;
+       Evas_Object *widget;
+       int w, h;
+       int nTimeoutId = 0;
+
+       widget = widget_viewer_evas_add_widget(g_win, SAMPLE_PKGNAME, NULL, 0.0f);
+       if ( widget == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_add_widget failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       g_nRet = -1;
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_create_cb, WidgetViewerResume);
+
+       int ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       if ( ret != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_size failed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       RUN_POLLING_LOOP;
+
+       if ( (g_nRet != WIDGET_ERROR_ALREADY_EXIST) && (g_nRet != WIDGET_ERROR_NONE) )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_resume_widget failed. \\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_resume_widget passed.\\n", __LINE__, API_NAMESPACE);
+       }
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+       return 0;
+}
+
+//& purpose: widget viewer evas feed mouse up event
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_feed_mouse_up_event_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas feed mouse up event
+* @scenario                            feed mouse up event
+* @apicovered                  widget_viewer_evas_feed_mouse_up_event
+* @passcase                            When widget_viewer_evas_feed_mouse_up_event is successful
+* @failcase                            If target API widget_viewer_evas_feed_mouse_up_event fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_feed_mouse_up_event_p(void)
+{
+       START_TEST;
+       Evas_Object *widget;
+       int w, h;
+       int nTimeoutId = 0;
+
+       widget = widget_viewer_evas_add_widget(g_win, SAMPLE_PKGNAME, NULL, 0.0f);
+       if ( widget == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_add_widget failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       g_nRet = -1;
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_create_cb, WidgetViewerFeedMouseUpEvent);
+
+       int ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       if ( ret != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_size failed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       RUN_POLLING_LOOP;
+
+       if ( g_nRet != 0 )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_feed_mouse_up_event failed. \\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_feed_mouse_up_event passed\\n", __LINE__, API_NAMESPACE );
+       }
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+       return 0;
+}
+
+
+//& purpose: widget viewer evas thaw visibility
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_thaw_visibility_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas thaw visibility
+* @scenario                            thaw visibility
+* @apicovered                  widget_viewer_evas_thaw_visibility
+* @passcase                            When widget_viewer_evas_thaw_visibility is successful
+* @failcase                            If target API widget_viewer_evas_thaw_visibility fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_thaw_visibility_p(void)
+{
+       START_TEST;
+       Evas_Object *widget;
+       int w, h;
+       int nTimeoutId = 0;
+
+       widget = widget_viewer_evas_add_widget(g_win, SAMPLE_PKGNAME, NULL, 0.0f);
+       if ( widget == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_add_widget failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       g_nRet = -1;
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_create_cb, WidgetViewerThaw);
+
+       int ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       if ( ret != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_size failed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       RUN_POLLING_LOOP;
+
+       if ( g_nRet != 0 )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_thaw_visibility failed. \\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_thaw_visibility passed.\\n", __LINE__, API_NAMESPACE);
+       }
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+       return 0;
+}
+
+//& purpose: widget viewer evas get title string
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_get_title_string_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas get title string
+* @scenario                            get title string
+* @apicovered                  widget_viewer_evas_get_title_string
+* @passcase                            When widget_viewer_evas_get_title_string is successful
+* @failcase                            If target API widget_viewer_evas_get_title_string fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_get_title_string_p(void)
+{
+       START_TEST;
+
+       Evas_Object *widget;
+       int w, h;
+       int nTimeoutId = 0;
+
+       widget = widget_viewer_evas_add_widget(g_win, SAMPLE_PKGNAME, NULL, 0.0f);
+       if ( widget == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_add_widget failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       g_pTitleString = NULL;
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_create_cb, WidgetViewerGetTitleString);
+
+       int ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       if ( ret != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_size failed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       RUN_POLLING_LOOP;
+
+       if ( g_pTitleString == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_get_title_string failed. \\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_get_title_string passed, Title is: %s\\n", __LINE__, API_NAMESPACE, g_pTitleString);
+       }
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+       return 0;
+}
+
+
+//& purpose: widget viewer evas freeze visibility
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_freeze_visibility_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas freeze visibility
+* @scenario                            freeze visibility
+* @apicovered                  widget_viewer_evas_freeze_visibility
+* @passcase                            When widget_viewer_evas_freeze_visibility is successful
+* @failcase                            If target API widget_viewer_evas_freeze_visibility fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_freeze_visibility_p(void)
+{
+       START_TEST;
+       Evas_Object *widget;
+       int w, h;
+       int nTimeoutId = 0;
+
+       widget = widget_viewer_evas_add_widget(g_win, SAMPLE_PKGNAME, NULL, 0.0f);
+       if ( widget == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_add_widget failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       g_nRet = -1;
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_create_cb, WidgetViewerTcFreeze);
+
+       int ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       if ( ret != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_size failed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       RUN_POLLING_LOOP;
+
+       if ( g_nRet != 0 )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_freeze_visibility failed. \\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_freeze_visibility passed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+       return 0;
+}
+
+//& purpose: widget viewer evas set option
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_set_option_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas set option
+* @scenario                            set option
+* @apicovered                  widget_viewer_evas_set_option
+* @passcase                            When widget_viewer_evas_set_option is successful
+* @failcase                            If target API widget_viewer_evas_set_option fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_set_option_p(void)
+{
+       START_TEST;
+       int nRet;
+       widget_evas_conf_e eWidgetEvasConf = WIDGET_VIEWER_EVAS_EASY_MODE;
+       int value = 1; /**< Easy mode on/off. 1: on, 0: off */
+
+       nRet = widget_viewer_evas_set_option(eWidgetEvasConf, value);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_viewer_evas_set_option", WidgetViewerGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: Notifies the orientation of the viewer to all providers
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_notify_orientation_of_viewer_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Notifies the orientation of the viewer to all providers
+* @scenario                            orientation of viewer
+* @apicovered                  widget_viewer_evas_notify_orientation_of_viewer
+* @passcase                            When widget_viewer_evas_notify_orientation_of_viewer is successful
+* @failcase                            If target API widget_viewer_evas_notify_orientation_of_viewer fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_notify_orientation_of_viewer_p(void)
+{
+       START_TEST;
+       int nRet;
+       int nOrientation = 0;
+
+       nRet = widget_viewer_evas_notify_orientation_of_viewer(nOrientation);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_viewer_evas_notify_orientation_of_viewer", WidgetViewerGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: widget viewer evas cancel click event
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_cancel_click_event_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas cancel click event
+* @scenario                            cancel click event
+* @apicovered                  widget_viewer_evas_cancel_click_event
+* @passcase                            When widget_viewer_evas_cancel_click_event is successful
+* @failcase                            If target API widget_viewer_evas_cancel_click_event fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_cancel_click_event_p(void)
+{
+       START_TEST;
+
+       widget_viewer_evas_cancel_click_event(g_win);
+       return 0;
+}
+
+
+//& purpose: Before delete a widget, set the deletion mode
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_set_permanent_delete_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Before delete a widget, set the deletion mode
+* @scenario                            set the deletion mode
+* @apicovered                  widget_viewer_evas_set_permanent_delete
+* @passcase                            When widget_viewer_evas_set_permanent_delete is successful
+* @failcase                            If target API widget_viewer_evas_set_permanent_delete fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_set_permanent_delete_p(void)
+{
+       START_TEST;
+       /*second param: flag Pass 1 if you delete this widget instance permanently,
+       or pass 0 if you want to keep it and it will be re-created soon.*/
+
+       widget_viewer_evas_set_permanent_delete(g_win, 1);
+       return 0;
+}
+
+//& purpose: widget viewer evas disable preview
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_disable_preview_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas disable preview
+* @scenario                            disable preview
+* @apicovered                  widget_viewer_evas_disable_preview
+* @passcase                            When widget_viewer_evas_disable_preview is successful
+* @failcase                            If target API widget_viewer_evas_disable_preview fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_disable_preview_p(void)
+{
+       START_TEST;
+
+       widget_viewer_evas_disable_preview(g_win);
+       return 0;
+}
+
+//& purpose: widget viewer evas overlay text
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_disable_overlay_text_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas overlay text
+* @scenario                            overlay text
+* @apicovered                  widget_viewer_evas_disable_overlay_text
+* @passcase                            When widget_viewer_evas_disable_overlay_text is successful
+* @failcase                            If target API widget_viewer_evas_disable_overlay_text fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_disable_overlay_text_p(void)
+{
+       START_TEST;
+
+       widget_viewer_evas_disable_overlay_text(g_win);
+       return 0;
+}
+
+//& purpose: widget viewer evas disable loading
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_disable_loading_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas disable loading
+* @scenario                            disable loading
+* @apicovered                  widget_viewer_evas_disable_loading
+* @passcase                            When widget_viewer_evas_disable_loading is successful
+* @failcase                            If target API widget_viewer_evas_disable_loading fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_disable_loading_p(void)
+{
+       START_TEST;
+
+       widget_viewer_evas_disable_loading(g_win);
+       return 0;
+}
+
+//& purpose: widget viewer evas add widget
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_add_widget_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function add widget
+* @scenario                            add widget
+* @apicovered                  widget_viewer_evas_add_widget
+* @passcase                            When widget_viewer_evas_add_widget is successful
+* @failcase                            If target API widget_viewer_evas_add_widget fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_add_widget_p(void)
+{
+       START_TEST;
+       Evas_Object *widget;
+
+       widget = widget_viewer_evas_add_widget(g_win, SAMPLE_PKGNAME, NULL, 0.0f);
+       if ( widget == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_add_widget failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+       return 0;
+}
+
+//& purpose: Gets content string of widget
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_get_content_info_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Gets content string of widget
+* @scenario                            get content string of widget
+* @apicovered                  widget_viewer_evas_add_widget, evas_object_smart_callback_add, widget_service_get_size and widget_viewer_evas_get_content_info
+* @passcase                            When widget_viewer_evas_get_content_info is successful
+* @failcase                            If target API widget_viewer_evas_get_content_info fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_get_content_info_p(void)
+{
+       START_TEST;
+
+       Evas_Object *widget;
+       int w, h;
+       int nTimeoutId = 0;
+
+       widget = widget_viewer_evas_add_widget(g_win, SAMPLE_PKGNAME, NULL, 0.0f);
+       if ( widget == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_add_widget failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       g_pContentString = NULL;
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_create_cb, WidgetViewerGetContent);
+
+       int ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       if ( ret != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_size failed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       RUN_POLLING_LOOP;
+
+       if ( g_pContentString == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_get_content_info failed. \\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_get_content_info passed, content is: %s\\n", __LINE__, API_NAMESPACE, g_pContentString);
+       }
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+       return 0;
+}
+
+
+
+//& purpose: Activate a widget in faulted state
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_activate_faulted_widget_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Activate a widget in faulted state
+* @scenario                            get content string of widget
+* @apicovered                  widget_viewer_evas_add_widget, evas_object_smart_callback_add, widget_service_get_size and widget_viewer_evas_activate_faulted_widget
+* @passcase                            if target api widget_viewer_evas_activate_faulted_widget does not crash
+* @failcase                            if target api widget_viewer_evas_activate_faulted_widget crashed
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_viewer_evas_activate_faulted_widget_p(void)
+{
+       START_TEST;
+
+       Evas_Object *widget;
+       int w, h;
+       int nTimeoutId = 0;
+
+       widget = widget_viewer_evas_add_widget(g_win, SAMPLE_PKGNAME, NULL, 0.0f);
+       if ( widget == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_add_widget failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       g_pContentString = NULL;
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, widget_create_cb, WidgetViewerActivate);
+
+       int ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       if ( ret != WIDGET_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_size failed\\n", __LINE__, API_NAMESPACE);
+       }
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       RUN_POLLING_LOOP;
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+       return 0;
+}
+
+
+#if 0
+
+//& purpose: widget viewer evas get content string
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_get_content_string_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function get content string
+* @scenario                            get content string
+* @apicovered                  widget_viewer_evas_get_content_string
+* @passcase                            When widget_viewer_evas_get_content_string is successful
+* @failcase                            If target API widget_viewer_evas_get_content_string fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+//int ITc_widget_viewer_evas_get_content_string_p(void)
+{
+       START_TEST;
+       const char *pContentString = NULL;
+
+       pContentString = widget_viewer_evas_get_content_string(g_win);
+       if ( pContentString == NULL )
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_get_content_string failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] widget_viewer_evas_get_content_string id = [%s]\\n", __LINE__, API_NAMESPACE,pContentString);
+       }
+       return 0;
+}
+
+
+//& purpose: widget viewer evas activate
+//& type: auto
+/**
+* @testcase                    ITc_widget_viewer_evas_activate_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 widget viewer evas activate
+* @scenario                            viewer evas activate
+* @apicovered                  widget_viewer_evas_activate
+* @passcase                            When widget_viewer_evas_activate is successful
+* @failcase                            If target API widget_viewer_evas_activate fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+//int ITc_widget_viewer_evas_activate_p(void)
+{
+       START_TEST;
+
+       widget_viewer_evas_activate(g_win);
+       return 0;
+}
+#endif
+
+/** @} */
+/** @} */ 
\ No newline at end of file
diff --git a/src/itc/widget-viewer-evas/res/org.tizen.sample-1.0.0-arm.tpk b/src/itc/widget-viewer-evas/res/org.tizen.sample-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..809d3fc
Binary files /dev/null and b/src/itc/widget-viewer-evas/res/org.tizen.sample-1.0.0-arm.tpk differ
diff --git a/src/itc/widget-viewer-evas/res/org.tizen.sample-1.0.0-i386.tpk b/src/itc/widget-viewer-evas/res/org.tizen.sample-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..903ce42
Binary files /dev/null and b/src/itc/widget-viewer-evas/res/org.tizen.sample-1.0.0-i386.tpk differ
diff --git a/src/itc/widget-viewer-evas/res/org.tizen.sample.crash-1.0.0-arm.tpk b/src/itc/widget-viewer-evas/res/org.tizen.sample.crash-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..0fd307e
Binary files /dev/null and b/src/itc/widget-viewer-evas/res/org.tizen.sample.crash-1.0.0-arm.tpk differ
diff --git a/src/itc/widget-viewer-evas/res/org.tizen.sample.crash-1.0.0-i386.tpk b/src/itc/widget-viewer-evas/res/org.tizen.sample.crash-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..b57aa7d
Binary files /dev/null and b/src/itc/widget-viewer-evas/res/org.tizen.sample.crash-1.0.0-i386.tpk differ
diff --git a/src/itc/widget-viewer-evas/tct-widget-viewer-evas-native.c b/src/itc/widget-viewer-evas/tct-widget-viewer-evas-native.c
new file mode 100755 (executable)
index 0000000..63e69fb
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-widget-viewer-evas-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/widget-viewer-evas/tct-widget-viewer-evas-native.h b/src/itc/widget-viewer-evas/tct-widget-viewer-evas-native.h
new file mode 100755 (executable)
index 0000000..09db07c
--- /dev/null
@@ -0,0 +1,75 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_WIDGET_VIEWER_EVAS_NATIVE_H__
+#define __TCT_WIDGET_VIEWER_EVAS_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_widget_viewer_evas_startup(void);
+extern void ITs_widget_viewer_evas_cleanup(void);
+
+extern int ITc_widget_viewer_evas_get_widget_id_p(void);
+extern int ITc_widget_viewer_evas_get_period_p(void);
+extern int ITc_widget_viewer_evas_is_visibility_frozen_p(void);
+extern int ITc_widget_viewer_evas_is_widget_p(void);
+extern int ITc_widget_viewer_evas_is_faulted_p(void);
+extern int ITc_widget_viewer_evas_notify_resumed_status_of_viewer_p(void);
+extern int ITc_widget_viewer_evas_notify_paused_status_of_viewer_p(void);
+extern int ITc_widget_viewer_evas_pause_widget_p(void);
+extern int ITc_widget_viewer_evas_resume_widget_p(void);
+extern int ITc_widget_viewer_evas_feed_mouse_up_event_p(void);
+extern int ITc_widget_viewer_evas_thaw_visibility_p(void);
+extern int ITc_widget_viewer_evas_get_title_string_p(void);
+extern int ITc_widget_viewer_evas_freeze_visibility_p(void);
+extern int ITc_widget_viewer_evas_set_option_p(void);
+extern int ITc_widget_viewer_evas_notify_orientation_of_viewer_p(void);
+extern int ITc_widget_viewer_evas_cancel_click_event_p(void);
+extern int ITc_widget_viewer_evas_set_permanent_delete_p(void);
+extern int ITc_widget_viewer_evas_disable_preview_p(void);
+extern int ITc_widget_viewer_evas_disable_overlay_text_p(void);
+extern int ITc_widget_viewer_evas_disable_loading_p(void);
+extern int ITc_widget_viewer_evas_add_widget_p(void);
+extern int ITc_widget_viewer_evas_get_content_info_p(void);
+extern int ITc_widget_viewer_evas_activate_faulted_widget_p(void);
+
+testcase tc_array[] = {
+    {"ITc_widget_viewer_evas_get_widget_id_p", ITc_widget_viewer_evas_get_widget_id_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_get_period_p", ITc_widget_viewer_evas_get_period_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_is_visibility_frozen_p", ITc_widget_viewer_evas_is_visibility_frozen_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_is_widget_p", ITc_widget_viewer_evas_is_widget_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_is_faulted_p", ITc_widget_viewer_evas_is_faulted_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_notify_resumed_status_of_viewer_p", ITc_widget_viewer_evas_notify_resumed_status_of_viewer_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_notify_paused_status_of_viewer_p", ITc_widget_viewer_evas_notify_paused_status_of_viewer_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_pause_widget_p", ITc_widget_viewer_evas_pause_widget_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_resume_widget_p", ITc_widget_viewer_evas_resume_widget_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_feed_mouse_up_event_p", ITc_widget_viewer_evas_feed_mouse_up_event_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_thaw_visibility_p", ITc_widget_viewer_evas_thaw_visibility_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_get_title_string_p", ITc_widget_viewer_evas_get_title_string_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_freeze_visibility_p", ITc_widget_viewer_evas_freeze_visibility_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_set_option_p", ITc_widget_viewer_evas_set_option_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_notify_orientation_of_viewer_p", ITc_widget_viewer_evas_notify_orientation_of_viewer_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_cancel_click_event_p", ITc_widget_viewer_evas_cancel_click_event_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_set_permanent_delete_p", ITc_widget_viewer_evas_set_permanent_delete_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_disable_preview_p", ITc_widget_viewer_evas_disable_preview_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_disable_overlay_text_p", ITc_widget_viewer_evas_disable_overlay_text_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_disable_loading_p", ITc_widget_viewer_evas_disable_loading_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_add_widget_p", ITc_widget_viewer_evas_add_widget_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_get_content_info_p", ITc_widget_viewer_evas_get_content_info_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {"ITc_widget_viewer_evas_activate_faulted_widget_p", ITc_widget_viewer_evas_activate_faulted_widget_p, ITs_widget_viewer_evas_startup, ITs_widget_viewer_evas_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_WIDGET_VIEWER_EVAS_NATIVE_H__
diff --git a/src/itc/widget_service/CMakeLists.txt b/src/itc/widget_service/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..5814b70
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "widget_service")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "widget_service capi-appfw-application    bundle  glib-2.0        capi-system-info        elementary      widget_viewer_evas  dlog")
+SET(TC_SOURCES
+       ITs-widget_service-common.c
+       ITs-widget_service.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-appfw-application
+       bundle
+       glib-2.0
+       capi-system-info
+       elementary
+       widget_viewer_evas
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/widget_service/ITs-widget_service-common.c b/src/itc/widget_service/ITs-widget_service-common.c
new file mode 100755 (executable)
index 0000000..61b6a15
--- /dev/null
@@ -0,0 +1,238 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-widget_service-common.h"
+
+/** @addtogroup itc-widget_service
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function definitions here
+
+/**
+ * @function           WidgetServiceGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet: error code returned
+ * @return                     error string
+ */
+char* WidgetServiceGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch(nRet)
+       {
+               case WIDGET_ERROR_INVALID_PARAMETER:            szErrorVal = "WIDGET_ERROR_INVALID_PARAMETER";                  break;
+               case WIDGET_ERROR_OUT_OF_MEMORY:                        szErrorVal = "WIDGET_ERROR_OUT_OF_MEMORY";                              break;
+               case WIDGET_ERROR_RESOURCE_BUSY:                        szErrorVal = "WIDGET_ERROR_RESOURCE_BUSY";                              break;
+               case WIDGET_ERROR_PERMISSION_DENIED:            szErrorVal = "WIDGET_ERROR_PERMISSION_DENIED";                  break;
+               case WIDGET_ERROR_CANCELED:                                     szErrorVal = "WIDGET_ERROR_CANCELED";                                   break;
+               case WIDGET_ERROR_IO_ERROR:                                     szErrorVal = "WIDGET_ERROR_IO_ERROR";                                   break;
+               case WIDGET_ERROR_TIMED_OUT:                            szErrorVal = "WIDGET_ERROR_TIMED_OUT";                                  break;
+               case WIDGET_ERROR_NOT_SUPPORTED:                        szErrorVal = "WIDGET_ERROR_NOT_SUPPORTED";                              break;
+               case WIDGET_ERROR_FILE_NO_SPACE_ON_DEVICE:      szErrorVal = "WIDGET_ERROR_FILE_NO_SPACE_ON_DEVICE";    break;
+               case WIDGET_ERROR_FAULT:                                        szErrorVal = "WIDGET_ERROR_FAULT";                                              break;
+               case WIDGET_ERROR_ALREADY_EXIST:                        szErrorVal = "WIDGET_ERROR_ALREADY_EXIST";                              break;
+               case WIDGET_ERROR_ALREADY_STARTED:                      szErrorVal = "WIDGET_ERROR_ALREADY_STARTED";                    break;
+               case WIDGET_ERROR_NOT_EXIST:                            szErrorVal = "WIDGET_ERROR_NOT_EXIST";                                  break;
+               case WIDGET_ERROR_DISABLED:                                     szErrorVal = "WIDGET_ERROR_DISABLED";                                   break;
+               default:                                                                        szErrorVal = "Unknown Error";                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+ * @function           WidgetServiceTimeout
+ * @description                Called if some callback is not invoked for a particular timeout
+ * @parameter          gpointer data
+ * @return                     gboolean
+ */
+gboolean WidgetServiceTimeout(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               pMainLoop = NULL;
+       }
+       FPRINTF("[Line: %d][%s] Callback Timeout\\n", __LINE__, API_NAMESPACE);
+       return false;
+}
+
+/**
+ * @function           CheckWidget
+ * @description                This function is called from Widget_Create_CB callback. Validates the parameters values.
+ * @parameter          TestCaseCallBack cb, widget_evas_event_info *info
+ * @return                     1 (true) or 0 (false)
+ */
+int CheckWidget(struct widget_evas_event_info *info)
+{
+       if ( (info == NULL) || (info->error != WIDGET_ERROR_NONE) || (info->widget_app_id == NULL) || (info->event != WIDGET_EVENT_CREATED) )
+       {
+               FPRINTF("[Line: %d][%s] CheckWidget failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       return 0;
+}
+
+/**
+* @function            GetWidgetInstanceList
+* @description         Widget instance list Callback
+* @parameter           widget_id: widget id , widget_lifecycle_event_e: lifecycle event, widget_instance_id: widget instance id, user_data:The user data passed from the for each function
+* @return                      int value
+*/
+int GetWidgetInstanceList(TestCaseCallBack data)
+{
+       FPRINTF("[Line: %d][%s] GetWidgetInstanceList Called\\n", __LINE__, API_NAMESPACE);
+       TestCaseCallBack TestCallBack = data;
+
+       int nRet = WIDGET_ERROR_NONE;
+       nRet = widget_service_get_widget_instance_list(TESTPACKAGE, TestCallBack, TESTSTRING);
+       PRINT_RESULT_CLEANUP(WIDGET_ERROR_NONE, nRet, "widget_service_get_widget_instance_list", WidgetServiceGetError(nRet), g_bWidgetServiceCBFlag = false; g_main_loop_quit(g_loop); g_loop = NULL;);
+
+       return 0;
+}
+
+/**
+ * @function           WidgetCreatedCallBack
+ * @description                Called when widget is created
+ * @parameter          void *data, Evas_Object *obj, void *event_info
+ * @return                     NA
+ */
+static void WidgetCreatedCallBack(void *data, Evas_Object *obj, void *event_info)
+{
+       FPRINTF("[Line: %d][%s] WidgetCreatedCallBack called.\\n", __LINE__, API_NAMESPACE);
+       struct widget_evas_event_info *info = event_info;
+       int nRet = -1;
+       TestCaseCallBack TestCallBack = data;
+
+       nRet = CheckWidget(info);
+       if ( (TestCallBack != NULL) && (nRet == 0) )
+       {
+               GetWidgetInstanceList(TestCallBack);
+       }
+       else
+       {
+               g_bWidgetServiceCBFlag = false;
+               if ( g_loop != NULL )
+               {
+                       g_main_loop_quit(g_loop);
+                       g_loop = NULL;
+               }
+       }
+}
+
+/**
+ * @function           AddSampleWidget
+ * @description                Called to add widget
+ * @parameter          NA
+ * @return                     NA
+ */
+bool AddSampleWidget(TestCaseCallBack TestCallBack)
+{
+       int nWidth = 0, nHeight = 0;
+       int nRet = -1;
+       int nTimeoutId = 0;
+       g_bWidgetServiceCBFlag = false;
+
+       elm_config_accel_preference_set("3d");
+
+       g_hWindow = elm_win_add(NULL, TESTNAME, ELM_WIN_BASIC);
+       CHECK_HANDLE(g_hWindow, "elm_win_util_standard_add");
+       evas_object_show(g_hWindow);
+
+       nRet = widget_viewer_evas_init(g_hWindow);
+       PRINT_RESULT_CLEANUP(WIDGET_ERROR_NONE, nRet, "widget_viewer_evas_init", WidgetServiceGetError(nRet), DeleteWidget());
+
+       g_hWidget = widget_viewer_evas_add_widget(g_hWindow, TESTPACKAGE, NULL, 0.0f);
+       CHECK_HANDLE_CLEANUP(g_hWidget, "elm_win_add", DeleteWidget());
+
+       evas_object_smart_callback_add(g_hWidget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, WidgetCreatedCallBack, TestCallBack);
+
+       nRet = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &nWidth, &nHeight);
+       PRINT_RESULT_CLEANUP(WIDGET_ERROR_NONE, nRet, "widget_service_get_size", WidgetServiceGetError(nRet), DeleteWidget());
+       evas_object_resize(g_hWidget, nWidth, nHeight);
+       evas_object_show(g_hWidget);
+
+       RUN_POLLING_LOOP;
+       if ( !g_bWidgetServiceCBFlag )
+       {
+               FPRINTF("[Line: %d][%s] WidgetCreatedCallBack callback failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       DeleteWidget();
+       return 0;
+}
+
+/**
+ * @function           DeleteWidget
+ * @description                Called to delete widget
+ * @parameter          NA
+ * @return                     NA
+ */
+void DeleteWidget(void)
+{
+       widget_viewer_evas_fini();
+       if ( g_hWidget )
+       {
+               evas_object_del(g_hWidget);
+               g_hWidget = NULL;
+       }
+       if ( g_hWindow )
+       {
+               evas_object_del(g_hWindow);
+               g_hWindow = NULL;
+       }
+}
+
+/**
+ * @function           Widget_Service_Check_System_Info_Feature_Supported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey; key value
+ * @return                     true if supported else false
+ */
+bool Widget_Service_Check_System_Info_Feature_Supported(char* pszKey)
+{
+       if ( NULL == pszKey )
+       {
+               FPRINTF("[Line: %d][%s] Null key value passed to function: Widget_Service_Check_System_Info_Feature_Supported\\n", __LINE__, API_NAMESPACE);
+               return false;
+       }
+
+       bool bValue = false;
+       int nRetVal = system_info_get_platform_bool(pszKey, &bValue);
+
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("[Line: %d][%s] system_info_get_platform_bool returned (error = %s) for (key = %s)\\n", __LINE__, API_NAMESPACE, WidgetServiceGetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( false == bValue )
+       {
+               FPRINTF("[Line: %d][%s] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)\\n", __LINE__, API_NAMESPACE, pszKey);
+       }
+       else
+       {
+               FPRINTF("[Line: %d][%s] system_info_get_platform_bool returned Supported status feature for (key = %s)\\n", __LINE__, API_NAMESPACE, pszKey);
+       }
+
+       return bValue;
+}
+
+/** @} */
\ No newline at end of file
diff --git a/src/itc/widget_service/ITs-widget_service-common.h b/src/itc/widget_service/ITs-widget_service-common.h
new file mode 100755 (executable)
index 0000000..73a5b8d
--- /dev/null
@@ -0,0 +1,193 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_WIDGET_SERVICE_COMMON_H_
+#define _ITS_WIDGET_SERVICE_COMMON_H_
+
+//Add test package related includes here
+#include <glib.h>
+#include <Elementary.h>
+#include <widget_service.h>
+#include <widget_errno.h>
+#include <widget_service_internal.h>
+#include <widget_viewer_evas.h>
+#include <bundle.h>
+#include <system_info.h>
+
+/** @addtogroup itc-widget_sevice
+*  @ingroup itc
+*  @{
+*/
+
+//Add helper function includes here
+typedef int (*TestCaseCallBack)(const char *widget_id, const char *instance_id, void *data);
+
+#define API_NAMESPACE                          "WIDGET_SERVICE_ITC"
+#define TIMEOUT_CB                                     30000
+#define PATH_LEN                                       1024
+#define LANGUAGE                                       "en-us"
+#define TESTSTRING                                     "Test"
+#define TESTPACKAGE                                    "org.tizen.testwidget"
+#define TESTNAME                                       "testwidget"
+#define WIDGET_SERVICE_FEATURE         "http://tizen.org/feature/shell.appwidget"
+
+FILE *g_fpLog;
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG, "a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define PRINT_RESULT(eCompare, eRetVal, API, Error) {\
+       if ( eRetVal == eCompare )\
+{\
+       if ( DEBUG )\
+{\
+       FPRINTF("[Line: %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+}\
+}\
+       else \
+{\
+       FPRINTF("[Line: %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+       return 1;\
+}\
+}
+
+#define PRINT_RESULT_CLEANUP(eCompare, eRetVal, API, Error, FreeResource) {\
+       if ( eRetVal == eCompare )\
+{\
+       if ( DEBUG )\
+{\
+       FPRINTF("[Line: %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+}\
+}\
+else \
+{\
+       FPRINTF("[Line: %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+       FreeResource;\
+       return 1;\
+}\
+}
+
+#define CHECK_HANDLE(Handle, API) {\
+       if ( Handle == NULL )\
+{\
+       FPRINTF("[Line: %d][%s] %s failed, error returned = Handle returned is NULL\\n", __LINE__, API_NAMESPACE, API);\
+       return 1;\
+}\
+}
+
+#define FREE_MEMORY(buffer) {\
+       if ( buffer != NULL )\
+{\
+       free(buffer);\
+       buffer = NULL;\
+}\
+}
+
+#define START_TEST {\
+       FPRINTF("[Line: %d][%s] Starting test: %s\\n",  __LINE__, API_NAMESPACE,__FUNCTION__);\
+       if ( g_bSkipExecutionWithPass )\
+       {\
+               FPRINTF("[Line: %d][%s] Feature http://tizen.org/feature/shell.appwidget is not supported so skipping test\\n", __LINE__, API_NAMESPACE);\
+               return 0;\
+       }\
+       if ( g_bSkipExecutionWithFail )\
+       {\
+               FPRINTF("[Line: %d][%s] Feature http://tizen.org/feature/shell.appwidget is not supported but API not returned WIDGET_ERROR_NOT_SUPPORTED\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+       if ( !g_bWidgetCreation )\
+       {\
+               FPRINTF("[Line: %d][%s] Precondition of Widget-Service create failed so leaving test\\n", __LINE__, API_NAMESPACE);\
+               return 1;\
+       }\
+}
+
+#define RUN_POLLING_LOOP {\
+       if ( g_bWidgetServiceCBFlag == false )\
+       {\
+               g_loop = g_main_loop_new(NULL, false);\
+               nTimeoutId = g_timeout_add(TIMEOUT_CB, WidgetServiceTimeout, g_loop);\
+               g_main_loop_run(g_loop);\
+               g_source_remove(nTimeoutId);\
+               g_loop = NULL;\
+       }\
+}
+
+#define CHECK_HANDLE_CLEANUP(Handle, API, FreeResource) {\
+       if ( Handle == NULL )\
+       {\
+               FPRINTF("[Line: %d][%s] %s failed, error returned = Handle returned is NULL\\n", __LINE__, API_NAMESPACE, API);\
+               FreeResource;\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULTNONE(eCompare, eRetVal, API, Error) {\
+       if ( eRetVal == eCompare )\
+       {\
+               if ( DEBUG )\
+               {\
+                       FPRINTF("[Line: %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+               }\
+       }\
+       else \
+       {\
+               FPRINTF("[Line: %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, Error, eRetVal);\
+               return;\
+       }\
+}
+
+#define VERDICTLASTRESULT(API) {\
+       g_nRet = get_last_result();\
+       if ( (g_nRet == WIDGET_ERROR_NONE) || (g_nRet == WIDGET_ERROR_NOT_EXIST) )\
+       {\
+               if ( DEBUG )\
+               {\
+                       FPRINTF("[Line: %d][%s] %s passed\\n", __LINE__, API_NAMESPACE, API);\
+               }\
+               return 0;\
+       }\
+       else \
+       {\
+               FPRINTF("[Line: %d][%s] %s failed, error returned = %s [%d]\\n", __LINE__, API_NAMESPACE, API, WidgetServiceGetError(g_nRet), g_nRet);\
+               return 1;\
+       }\
+}
+
+//Add global variables here
+int g_nRet;
+GMainLoop *g_loop;
+bool g_bWidgetServiceCBFlag;
+bool g_bWidgetCreation;
+char g_szPkgid[PATH_LEN];
+char g_szWidgetid[PATH_LEN];
+char g_szInstanceId[PATH_LEN];
+Evas_Object *g_hWindow;
+Evas_Object *g_hWidget;
+
+//Add helper function declarations here
+char *WidgetServiceGetError(int nRet);
+gboolean WidgetServiceTimeout(gpointer data);
+bool AddSampleWidget(TestCaseCallBack TestCallBack);
+int CheckWidget(struct widget_evas_event_info *info);
+int GetWidgetInstanceList(TestCaseCallBack data);
+void DeleteWidget(void);
+bool Widget_Service_Check_System_Info_Feature_Supported(char* pszKey);
+
+/** @} */
+#endif  //_ITS_WIDGET_SERVICE_COMMON_H_
diff --git a/src/itc/widget_service/ITs-widget_service.c b/src/itc/widget_service/ITs-widget_service.c
new file mode 100755 (executable)
index 0000000..7d7e814
--- /dev/null
@@ -0,0 +1,838 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-widget_service-common.h"
+
+//& set: Widget_service
+
+/** @addtogroup itc-widget_service
+*  @ingroup itc
+*  @{
+*/
+bool g_bSkipExecutionWithPass = false;
+bool g_bSkipExecutionWithFail = false;
+bool g_bWidgetServiceReadFeatureStatusDone = false;
+bool g_bWidgetFeatureSupported = false;
+
+/*******************************************************************CallBack Start*******************************************************************/
+
+/**
+* @function            WidgetListCB
+* @description         Widget List Callback
+* @parameter           pkgid: package id , widgetid: widget id, data:The user data passed from the for each function
+* @return                      int value
+*/
+static int WidgetListCB(const char *pkgid, const char *widgetid, int is_prime, void *data)
+{
+       FPRINTF("[Line: %d][%s] In WidgetListCB\\n", __LINE__, API_NAMESPACE);
+       if ( (data == NULL) || (strcmp(data, TESTSTRING) != 0) )
+       {
+               g_bWidgetServiceCBFlag = false;
+               FPRINTF("[Line: %d][%s] Invalid data passed to callback\\n", __LINE__, API_NAMESPACE);
+               if ( g_loop != NULL )
+               {
+                       g_main_loop_quit(g_loop);
+                       g_loop = NULL;
+               }
+               return -1;
+       }
+
+       if ( strcmp(pkgid, TESTPACKAGE) == 0 )
+       {
+               g_bWidgetServiceCBFlag = true;
+               FPRINTF("[Line: %d][%s] In WidgetListCB\\n", __LINE__, API_NAMESPACE);
+
+               strcpy(g_szPkgid,pkgid);
+               strcpy(g_szWidgetid,widgetid);
+               FPRINTF("[Line: %d][%s] PkgId is %s and WidgetId is %s\\n", __LINE__, API_NAMESPACE, g_szPkgid, g_szWidgetid);
+
+               if ( g_loop != NULL )
+               {
+                       g_main_loop_quit(g_loop);
+                       g_loop = NULL;
+               }
+
+               return -1;//-1 to break out of loop else continue
+       }
+       else
+       {
+               return WIDGET_ERROR_NONE;
+       }
+}
+
+/**
+* @function            WidgetListByPkgIdCB
+* @description         Widget List Callback
+* @parameter           widget_id: widget id , is_prime: sent as 1 if the widget is a default widget, data: user data
+* @return                      int value
+*/
+static int WidgetListByPkgIdCB(const char *widget_id, int is_prime, void *data)
+{
+       g_bWidgetServiceCBFlag = true;
+       FPRINTF("[Line: %d][%s] In WidgetListByPkgIdCB\\n", __LINE__, API_NAMESPACE);
+
+       if ( (data == NULL) || (strcmp(data, TESTSTRING) != 0) )
+       {
+               g_bWidgetServiceCBFlag = false;
+               FPRINTF("[Line: %d][%s] Invalid data passed to callback\\n", __LINE__, API_NAMESPACE);
+               if ( g_loop != NULL )
+               {
+                       g_main_loop_quit(g_loop);
+                       g_loop = NULL;
+               }
+               return -1;
+       }
+
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+
+       return -1;//-1 to break out of loop else continue
+}
+
+/**
+* @function            WidgetLifecycleEventCB
+* @description         Widget instance list Callback
+* @parameter           widget_id: widget id , widget_lifecycle_event_e: lifecycle event, widget_instance_id: widget instance id, user_data:The user data passed from the for each function
+* @return                      int value
+*/
+static int WidgetLifecycleEventCB(const char *widget_id, widget_lifecycle_event_e lifecycle_event, const char *widget_instance_id, void *data)
+{
+       g_bWidgetServiceCBFlag = true;
+       FPRINTF("[Line: %d][%s] In WidgetLifecycleEventCB\\n", __LINE__, API_NAMESPACE);
+
+       if ( (data == NULL) || (strcmp(data, TESTSTRING) != 0) )
+       {
+               g_bWidgetServiceCBFlag = false;
+               FPRINTF("[Line: %d][%s] Invalid data passed to callback\\n", __LINE__, API_NAMESPACE);
+               if ( g_loop != NULL )
+               {
+                       g_main_loop_quit(g_loop);
+                       g_loop = NULL;
+               }
+               return 0;
+       }
+
+       if ( g_loop != NULL )
+       {
+               g_main_loop_quit(g_loop);
+               g_loop = NULL;
+       }
+
+       return 0;//false to break out of loop else continue
+}
+
+/********************************************************************CallBack End********************************************************************/
+
+/**
+ * @function           ITs_widget_service_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_widget_service_startup(void)
+{
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       if ( false == g_bWidgetServiceReadFeatureStatusDone )
+       {
+               g_bWidgetFeatureSupported = Widget_Service_Check_System_Info_Feature_Supported(WIDGET_SERVICE_FEATURE);
+               g_bWidgetServiceReadFeatureStatusDone = true;
+       }
+
+       int nTimeoutId = 0;
+       g_bWidgetCreation = false;
+       g_bWidgetServiceCBFlag = false;
+
+       int nRet = widget_service_get_widget_list(WidgetListCB, TESTSTRING);
+       if ( !g_bWidgetFeatureSupported )
+       {
+               if ( nRet == WIDGET_ERROR_NOT_SUPPORTED )
+               {
+                       g_bSkipExecutionWithPass = true;
+                       return;
+               }
+
+               g_bSkipExecutionWithFail = true;
+               return;
+       }
+       if ( nRet < 0 )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_widget_list fails, error returned = %s[%d]\\n", __LINE__, API_NAMESPACE, WidgetServiceGetError(nRet), nRet);
+               return;
+       }
+
+       RUN_POLLING_LOOP;
+       if ( !g_bWidgetServiceCBFlag )
+       {
+               FPRINTF("[Line: %d][%s] WidgetListCB callback failed\\n", __LINE__, API_NAMESPACE);
+               return;
+       }
+
+       g_bWidgetCreation = true;
+       return;
+}
+
+/**
+ * @function           ITs_widget_service_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */
+void ITs_widget_service_cleanup(void)
+{
+       return;
+}
+
+/** @addtogroup itc-widget_service-testcases
+*  @brief              Integration testcases for module widget_service
+*  @ingroup    itc-widget_service
+*  @{
+*/
+
+//& purpose: Get widget size
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_size_type_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function requests get widget size
+* @scenario                            Get widget size
+* @apicovered                  widget_service_get_size, widget_service_get_size_type
+* @passcase                            When widget_service_get_size_type is successful
+* @failcase                            If target API widget_service_get_size_type fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_size_type_p(void)
+{
+       START_TEST;
+       widget_size_type_e eWidgetSizeType;
+       int nWidth = 0, nHeight = 0;
+
+       int nRet = widget_service_get_size(WIDGET_SIZE_TYPE_1x1, &nWidth, &nHeight);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_service_get_size", WidgetServiceGetError(nRet));
+
+       nRet = widget_service_get_size_type(nWidth, nHeight, &eWidgetSizeType);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_service_get_size_type", WidgetServiceGetError(nRet));
+
+       if ( eWidgetSizeType != WIDGET_SIZE_TYPE_1x1 )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_size_type failed, returned eWidgetSizeType = %d\\n", __LINE__, API_NAMESPACE, eWidgetSizeType);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: Get widget size
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_size_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function requests get widget size
+* @scenario                            Get widget size
+* @apicovered                  widget_service_get_size
+* @passcase                            When widget_service_get_size is successful
+* @failcase                            If target API widget_service_get_size fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_size_p(void)
+{
+       START_TEST;
+       int nWidth = 0, nHeight = 0;
+
+       int nRet = widget_service_get_size(WIDGET_SIZE_TYPE_1x1, &nWidth, &nHeight);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_service_get_size", WidgetServiceGetError(nRet));
+
+       if ( ( nWidth < 0 ) || ( nHeight < 0 ) )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_size failed, returned nWidth = %d, nHeight = %d\\n", __LINE__, API_NAMESPACE, nWidth, nHeight);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: Get widget list
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_widget_list_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function requests get widget list
+* @scenario                            Get widget list
+* @apicovered                  widget_service_get_widget_list
+* @passcase                            When widget_service_get_widget_list is successful
+* @failcase                            If target API widget_service_get_widget_list fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_widget_list_p(void)
+{
+       START_TEST;
+       int nTimeoutId = 0;
+       g_bWidgetServiceCBFlag = false;
+
+       int nRet = widget_service_get_widget_list(WidgetListCB, TESTSTRING);
+       if ( nRet < 0 )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_widget_list fails, error returned = %s[%d]\\n", __LINE__, API_NAMESPACE, WidgetServiceGetError(nRet), nRet);
+               return 1;
+       }
+
+       RUN_POLLING_LOOP;
+       if ( !g_bWidgetServiceCBFlag )
+       {
+               FPRINTF("[Line: %d][%s] WidgetListCB callback failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: Get widget app id
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_main_app_id_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function requests get widget app id
+* @scenario                            Get widget app id
+* @apicovered                  widget_service_get_main_app_id
+* @passcase                            When widget_service_get_main_app_id is successful
+* @failcase                            If target API widget_service_get_main_app_id fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_main_app_id_p(void)
+{
+       START_TEST;
+       char *pszAppId = NULL;
+
+       pszAppId = widget_service_get_main_app_id(g_szWidgetid);
+       if ( pszAppId == NULL )
+       {
+               VERDICTLASTRESULT("widget_service_get_main_app_id");
+       }
+
+       FREE_MEMORY(pszAppId);
+       return 0;
+}
+
+//& purpose: widget service get widget name
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_name_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function get widget name
+* @scenario                            get widget name
+* @apicovered                  widget_service_get_name
+* @passcase                            When widget_service_get_name is successful
+* @failcase                            If target API widget_service_get_name fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_name_p(void)
+{
+       START_TEST;
+       char *pWidgetName = NULL;
+
+       pWidgetName = widget_service_get_name(g_szWidgetid, LANGUAGE);
+       if ( pWidgetName == NULL )
+       {
+               VERDICTLASTRESULT("widget_service_get_name");
+       }
+
+       FREE_MEMORY(pWidgetName);
+       return 0;
+}
+
+//& purpose: widget service get widget pkgid
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_package_id_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function get widget pkgid
+* @scenario                            get widget pkgid
+* @apicovered                  widget_service_get_package_id
+* @passcase                            When widget_service_get_package_id is successful
+* @failcase                            If target API widget_service_get_package_id fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_package_id_p(void)
+{
+       START_TEST;
+       char *pPackageId = NULL;
+
+       pPackageId = widget_service_get_package_id(g_szWidgetid);
+       if ( (pPackageId == NULL) || (strcmp(g_szPkgid, pPackageId) != 0) )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_package_id failed, pPackageId is not correct\\n", __LINE__, API_NAMESPACE);
+               FREE_MEMORY(pPackageId);
+               return 1;
+       }
+
+       FREE_MEMORY(pPackageId);
+       return 0;
+}
+
+//& purpose: Get widget widget id
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_widget_id_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function requests get widget id
+* @scenario                            Get widget id
+* @apicovered                  widget_service_get_widget_id
+* @passcase                            When widget_service_get_widget_id is successful
+* @failcase                            If target API widget_service_get_widget_id fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_widget_id_p(void)
+{
+       START_TEST;
+       char *pWidgetId = NULL;
+
+       pWidgetId = widget_service_get_widget_id(g_szPkgid);
+       if ( (pWidgetId == NULL) || (strcmp(g_szWidgetid, pWidgetId) != 0) )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_widget_id failed, pWidgetId is not correct\\n", __LINE__, API_NAMESPACE);
+               FREE_MEMORY(pWidgetId);
+               return 1;
+       }
+
+       FREE_MEMORY(pWidgetId);
+       return 0;
+}
+
+//& purpose: widget service get widget list by pkgid
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_widget_list_by_pkgid_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function get widget list by pkgid
+* @scenario                            get widget list by pkgid
+* @apicovered                  widget_service_get_widget_list_by_pkgid
+* @passcase                            When widget_service_get_widget_list_by_pkgid is successful
+* @failcase                            If target API widget_service_get_widget_list_by_pkgid fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_widget_list_by_pkgid_p(void)
+{
+       START_TEST;
+       int nTimeoutId = 0;
+
+       g_bWidgetServiceCBFlag = false;
+       int nRet = widget_service_get_widget_list_by_pkgid(g_szPkgid, WidgetListByPkgIdCB, TESTSTRING);
+       if ( nRet < 0 )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_widget_list_by_pkgid failed, error returned = %s[%d]\\n", __LINE__, API_NAMESPACE, WidgetServiceGetError(nRet), nRet);
+               return 1;
+       }
+
+       RUN_POLLING_LOOP;
+
+       if ( !g_bWidgetServiceCBFlag )
+       {
+               FPRINTF("[Line: %d][%s] WidgetListByPkgIdCB callback failed\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: widget service get category
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_category_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function get widget category
+* @scenario                            get widget category
+* @apicovered                  widget_service_get_category
+* @passcase                            When widget_service_get_category is successful
+* @failcase                            If target API widget_service_get_category fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_category_p(void)
+{
+       START_TEST;
+       char *pCategory = NULL;
+
+       pCategory = widget_service_get_category(g_szWidgetid);
+       if ( pCategory == NULL )
+       {
+               VERDICTLASTRESULT("widget_service_get_category");
+       }
+
+       FREE_MEMORY(pCategory);
+       return 0;
+}
+
+//& purpose: widget service get supported sizes
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_supported_sizes_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function get widget supported sizes
+* @scenario                            get widget supported sizes
+* @apicovered                  widget_service_get_supported_sizes
+* @passcase                            When widget_service_get_supported_sizes is successful
+* @failcase                            If target API widget_service_get_supported_sizes fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_supported_sizes_p(void)
+{
+       START_TEST;
+       int nCnt = INT_MAX;
+       int *pWidth = NULL, *pHeight = NULL;
+
+       int nRet = widget_service_get_supported_sizes(g_szWidgetid, &nCnt, &pWidth, &pHeight);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_service_get_supported_sizes", WidgetServiceGetError(nRet));
+       if ( (pWidth == NULL) || (pHeight == NULL) || (nCnt < 0) )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_supported_sizes failed, no of supported sizes returned = %d\\n", __LINE__, API_NAMESPACE, nCnt);
+               FREE_MEMORY(pWidth);
+               FREE_MEMORY(pHeight);
+               return 1;
+       }
+
+       FREE_MEMORY(pWidth);
+       FREE_MEMORY(pHeight);
+       return 0;
+}
+
+//& purpose: widget service get supported types
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_supported_size_types_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function get widget supported types
+* @scenario                            get widget supported types
+* @apicovered                  widget_service_get_supported_size_types
+* @passcase                            When widget_service_get_supported_size_types is successful
+* @failcase                            If target API widget_service_get_supported_size_types fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_supported_size_types_p(void)
+{
+       START_TEST;
+       int nCnt = INT_MAX;
+       int *pTypes = NULL;
+
+       int nRet = widget_service_get_supported_size_types(g_szWidgetid, &nCnt, &pTypes);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_service_get_supported_size_types", WidgetServiceGetError(nRet));
+
+       if ( nCnt < 0 )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_supported_size_types failed, no of supported sizes types returned = %d\\n", __LINE__, API_NAMESPACE, nCnt);
+               FREE_MEMORY(pTypes);
+               return 1;
+       }
+
+       FREE_MEMORY(pTypes);
+       return 0;
+}
+
+//& purpose: widget service get app id of setup app
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_app_id_of_setup_app_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function get app id of setup app
+* @scenario                            get app id of setup app
+* @apicovered                  widget_service_get_app_id_of_setup_app
+* @passcase                            When widget_service_get_app_id_of_setup_app is successful
+* @failcase                            If target API widget_service_get_app_id_of_setup_app fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_app_id_of_setup_app_p(void)
+{
+       START_TEST;
+       char *pAppIdOfSetup = NULL;
+
+       pAppIdOfSetup = widget_service_get_app_id_of_setup_app(g_szWidgetid);
+       if ( pAppIdOfSetup == NULL )
+       {
+               VERDICTLASTRESULT("widget_service_get_app_id_of_setup_app");
+       }
+
+       FREE_MEMORY(pAppIdOfSetup);
+       return 0;
+}
+
+//& purpose: Get widget icon
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_icon_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function requests get widget icon
+* @scenario                            Get widget icon
+* @apicovered                  widget_service_get_icon
+* @passcase                            When widget_service_get_icon is successful
+* @failcase                            If target API widget_service_get_icon fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_icon_p(void)
+{
+       START_TEST;
+       char *pIcon = NULL;
+
+       pIcon = widget_service_get_icon(g_szPkgid, LANGUAGE);
+       if ( pIcon == NULL )
+       {
+               VERDICTLASTRESULT("widget_service_get_icon");
+       }
+
+       FREE_MEMORY(pIcon);
+       return 0;
+}
+
+//& purpose: widget service get preview image path
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_preview_image_path_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function get widget preview image path
+* @scenario                            get widget preview image path
+* @apicovered                  widget_service_get_preview_image_path
+* @passcase                            When widget_service_get_preview_image_path is successful
+* @failcase                            If target API widget_service_get_preview_image_path fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_preview_image_path_p(void)
+{
+       START_TEST;
+       char *pImagePath = NULL;
+       int *pTypes = NULL;
+       int nCnt = INT_MAX;
+
+       int nRet = widget_service_get_supported_size_types(g_szWidgetid, &nCnt, &pTypes);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_service_get_supported_size_types", WidgetServiceGetError(nRet));
+       if ( (nCnt < 0) || (pTypes == NULL) )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_supported_size_types failed, no of supported sizes types returned = %d\\n", __LINE__, API_NAMESPACE, nCnt);
+               FREE_MEMORY(pTypes);
+               return 1;
+       }
+
+       pImagePath = widget_service_get_preview_image_path(g_szWidgetid, *pTypes);
+       if ( pImagePath == NULL )
+       {
+               FREE_MEMORY(pTypes);
+               VERDICTLASTRESULT("widget_service_get_preview_image_path");
+       }
+
+       FREE_MEMORY(pTypes);
+       FREE_MEMORY(pImagePath);
+       return 0;
+}
+
+//& purpose: Test widget_service_get_nodisplay
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_nodisplay_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 Test widget_service_get_nodisplay
+* @scenario                            Call widget_service_get_nodisplay
+* @apicovered                  widget_service_get_nodisplay
+* @passcase                            When widget_service_get_nodisplay is successful
+* @failcase                            If target API widget_service_get_nodisplay fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_nodisplay_p(void)
+{
+       START_TEST;
+       int nDisplay = -1;
+
+       nDisplay = widget_service_get_nodisplay(g_szWidgetid);
+       if ( nDisplay < 0 )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_nodisplay failed, nDisplay is less then 0\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       return 0;
+}
+
+//& purpose: check if widget need mouse event
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_need_of_mouse_event_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function check if widget need mouse event
+* @scenario                            check if widget need mouse event
+* @apicovered                  widget_service_get_need_of_mouse_event
+* @passcase                            When widget_service_get_need_of_mouse_event is successful
+* @failcase                            If target API widget_service_get_need_of_mouse_event fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_need_of_mouse_event_p(void)
+{
+       START_TEST;
+       bool bNeedMouseMvent = false;
+       int *pTypes = NULL;
+       int nCnt = INT_MAX;
+
+       int nRet = widget_service_get_supported_size_types(g_szWidgetid, &nCnt, &pTypes);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_service_get_supported_size_types", WidgetServiceGetError(nRet));
+       if ( (nCnt < 0) || (pTypes == NULL) )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_supported_size_types failed, no of supported sizes types returned = %d\\n", __LINE__, API_NAMESPACE, nCnt);
+               FREE_MEMORY(pTypes);
+               return 1;
+       }
+
+       nRet = widget_service_get_need_of_mouse_event(g_szPkgid, *pTypes, &bNeedMouseMvent);
+       PRINT_RESULT_CLEANUP(WIDGET_ERROR_NONE, nRet, "widget_service_get_need_of_mouse_event", WidgetServiceGetError(nRet), FREE_MEMORY(pTypes));
+
+       FREE_MEMORY(pTypes);
+       return 0;
+}
+
+//& purpose: check if widget need frame
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_need_of_frame_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function check if widget need frame
+* @scenario                            check if widget need frame
+* @apicovered                  widget_service_get_need_of_frame
+* @passcase                            When widget_service_get_need_of_frame is successful
+* @failcase                            If target API widget_service_get_need_of_frame fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_need_of_frame_p(void)
+{
+       START_TEST;
+       bool bNeedOfFrame = false;
+       int *pTypes = NULL;
+       int nCnt = INT_MAX;
+
+       int nRet = widget_service_get_supported_size_types(g_szWidgetid, &nCnt, &pTypes);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_service_get_supported_size_types", WidgetServiceGetError(nRet));
+       if ( (nCnt < 0) || (pTypes == NULL) )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_supported_size_types failed, no of supported sizes types returned = %d\\n", __LINE__, API_NAMESPACE, nCnt);
+               FREE_MEMORY(pTypes);
+               return 1;
+       }
+
+       nRet = widget_service_get_need_of_frame(g_szPkgid, *pTypes, &bNeedOfFrame);
+       PRINT_RESULT_CLEANUP(WIDGET_ERROR_NONE, nRet, "widget_service_get_need_of_frame", WidgetServiceGetError(nRet), FREE_MEMORY(pTypes));
+
+       FREE_MEMORY(pTypes);
+       return 0;
+}
+
+//& purpose: check if widget need of touch effect
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_get_need_of_touch_effect_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function check if widget need of touch effect
+* @scenario                            check if widget need of touch effect
+* @apicovered                  widget_service_get_need_of_touch_effect
+* @passcase                            When widget_service_get_need_of_touch_effect is successful
+* @failcase                            If target API widget_service_get_need_of_touch_effect fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_get_need_of_touch_effect_p(void)
+{
+       START_TEST;
+       bool bNeedOfTouchEvent = false;
+       int *pTypes = NULL;
+       int nCnt = INT_MAX;
+
+       int nRet = widget_service_get_supported_size_types(g_szWidgetid, &nCnt, &pTypes);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_service_get_supported_size_types", WidgetServiceGetError(nRet));
+       if ( (nCnt < 0) || (pTypes == NULL) )
+       {
+               FPRINTF("[Line: %d][%s] widget_service_get_supported_size_types failed, no of supported sizes types returned = %d\\n", __LINE__, API_NAMESPACE, nCnt);
+               FREE_MEMORY(pTypes);
+               return 1;
+       }
+
+       nRet = widget_service_get_need_of_touch_effect(g_szPkgid, *pTypes, &bNeedOfTouchEvent);
+       PRINT_RESULT_CLEANUP(WIDGET_ERROR_NONE, nRet, "widget_service_get_need_of_touch_effect", WidgetServiceGetError(nRet), FREE_MEMORY(pTypes));
+
+       FREE_MEMORY(pTypes);
+       return 0;
+}
+
+//& purpose: widget service set/unset lifecycle event cb
+//& type: auto
+/**
+* @testcase                    ITc_widget_service_set_unset_lifecycle_event_cb_p
+* @since_tizen                 2.3
+* @type                                auto
+* @description                 This function set/unset lifecycle event cb
+* @scenario                            set/unset lifecycle event cb
+* @apicovered                  widget_service_set_lifecycle_event_cb, widget_service_unset_lifecycle_event_cb
+* @passcase                            When widget_service_set_lifecycle_event_cb ,widget_service_unset_lifecycle_event_cb is successful
+* @failcase                            If target API widget_service_set_lifecycle_event_cb, widget_service_unset_lifecycle_event_cb fails or any precondition API fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_widget_service_set_unset_lifecycle_event_cb_p(void)
+{
+       START_TEST;
+
+       int nRet = widget_service_set_lifecycle_event_cb(g_szWidgetid, WidgetLifecycleEventCB, TESTSTRING);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_service_set_lifecycle_event_cb", WidgetServiceGetError(nRet));
+
+       nRet = widget_service_unset_lifecycle_event_cb(g_szWidgetid, NULL);
+       PRINT_RESULT(WIDGET_ERROR_NONE, nRet, "widget_service_unset_lifecycle_event_cb", WidgetServiceGetError(nRet));
+
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/widget_service/org.tizen.testwidget-1.0.0-arm.tpk b/src/itc/widget_service/org.tizen.testwidget-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..7ea3e79
Binary files /dev/null and b/src/itc/widget_service/org.tizen.testwidget-1.0.0-arm.tpk differ
diff --git a/src/itc/widget_service/org.tizen.testwidget-1.0.0-i386.tpk b/src/itc/widget_service/org.tizen.testwidget-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..8fb923a
Binary files /dev/null and b/src/itc/widget_service/org.tizen.testwidget-1.0.0-i386.tpk differ
diff --git a/src/itc/widget_service/tct-widget_service-native.c b/src/itc/widget_service/tct-widget_service-native.c
new file mode 100755 (executable)
index 0000000..0562b3f
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-widget_service-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/widget_service/tct-widget_service-native.h b/src/itc/widget_service/tct-widget_service-native.h
new file mode 100755 (executable)
index 0000000..93af213
--- /dev/null
@@ -0,0 +1,67 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_WIDGET_SERVICE_NATIVE_H__
+#define __TCT_WIDGET_SERVICE_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_widget_service_startup(void);
+extern void ITs_widget_service_cleanup(void);
+
+extern int ITc_widget_service_get_size_type_p(void);
+extern int ITc_widget_service_get_size_p(void);
+extern int ITc_widget_service_get_widget_list_p(void);
+extern int ITc_widget_service_get_main_app_id_p(void);
+extern int ITc_widget_service_get_name_p(void);
+extern int ITc_widget_service_get_package_id_p(void);
+extern int ITc_widget_service_get_widget_id_p(void);
+extern int ITc_widget_service_get_widget_list_by_pkgid_p(void);
+extern int ITc_widget_service_get_category_p(void);
+extern int ITc_widget_service_get_supported_sizes_p(void);
+extern int ITc_widget_service_get_supported_size_types_p(void);
+extern int ITc_widget_service_get_app_id_of_setup_app_p(void);
+extern int ITc_widget_service_get_icon_p(void);
+extern int ITc_widget_service_get_preview_image_path_p(void);
+extern int ITc_widget_service_get_nodisplay_p(void);
+extern int ITc_widget_service_get_need_of_mouse_event_p(void);
+extern int ITc_widget_service_get_need_of_frame_p(void);
+extern int ITc_widget_service_get_need_of_touch_effect_p(void);
+extern int ITc_widget_service_set_unset_lifecycle_event_cb_p(void);
+
+testcase tc_array[] = {
+    {"ITc_widget_service_get_size_type_p", ITc_widget_service_get_size_type_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_size_p", ITc_widget_service_get_size_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_widget_list_p", ITc_widget_service_get_widget_list_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_main_app_id_p", ITc_widget_service_get_main_app_id_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_name_p", ITc_widget_service_get_name_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_package_id_p", ITc_widget_service_get_package_id_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_widget_id_p", ITc_widget_service_get_widget_id_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_widget_list_by_pkgid_p", ITc_widget_service_get_widget_list_by_pkgid_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_category_p", ITc_widget_service_get_category_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_supported_sizes_p", ITc_widget_service_get_supported_sizes_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_supported_size_types_p", ITc_widget_service_get_supported_size_types_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_app_id_of_setup_app_p", ITc_widget_service_get_app_id_of_setup_app_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_icon_p", ITc_widget_service_get_icon_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_preview_image_path_p", ITc_widget_service_get_preview_image_path_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_nodisplay_p", ITc_widget_service_get_nodisplay_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_need_of_mouse_event_p", ITc_widget_service_get_need_of_mouse_event_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_need_of_frame_p", ITc_widget_service_get_need_of_frame_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_get_need_of_touch_effect_p", ITc_widget_service_get_need_of_touch_effect_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {"ITc_widget_service_set_unset_lifecycle_event_cb_p", ITc_widget_service_set_unset_lifecycle_event_cb_p, ITs_widget_service_startup, ITs_widget_service_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_WIDGET_SERVICE_NATIVE_H__
diff --git a/src/itc/wifi/CMakeLists.txt b/src/itc/wifi/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..b8681fe
--- /dev/null
@@ -0,0 +1,37 @@
+SET(PKG_NAME "wifi")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-network-wifi")
+SET(TC_SOURCES
+       ITs-wifi-common.c
+       ITs-wifi.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       glib-2.0
+       gobject-2.0
+       capi-appfw-application
+       capi-system-info
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/itc/wifi/ITs-wifi-common.c b/src/itc/wifi/ITs-wifi-common.c
new file mode 100755 (executable)
index 0000000..1a983e0
--- /dev/null
@@ -0,0 +1,530 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-wifi-common.h"
+
+/** @addtogroup itc-wifi
+*  @ingroup itc
+*  @{
+*/
+
+extern struct timeval g_stWifiStartTime;
+extern struct mallinfo g_stWifiMemInfo;
+
+/**
+ * @function           WifiCheckSystemInfoFeatureSupported
+ * @description                Check the supported feature for the given key value
+ * @parameter          char* pszKey ; key value
+ * @return                     true if supported else false
+ */
+bool WifiCheckSystemInfoFeatureSupported(char* pszKey)
+{
+       if ( pszKey == NULL )
+       {
+               FPRINTF("\\n[Line : %d][Wifi_ITc] Null key value passed to function : WifiCheckSystemInfoFeatureSupported",__LINE__);
+               return false;
+       }
+
+       bool bValue = false; 
+       int nRetVal = system_info_get_platform_bool (pszKey, &bValue);
+
+       if ( nRetVal != SYSTEM_INFO_ERROR_NONE )
+       {
+               FPRINTF("\\n[Line : %d][Wifi_ITc] system_info_get_platform_bool returned (error = %s) for (key = %s)",__LINE__, WifiSystemInfoGetError(nRetVal), pszKey);
+               return false;
+       }
+
+       if ( bValue == false )
+       {
+               FPRINTF("\\n[Line : %d][Wifi_ITc] system_info_get_platform_bool returned Unsupported feature capability for (key = %s)",__LINE__, pszKey);
+       }
+       else
+       {
+               FPRINTF("\\n[Line : %d][Wifi_ITc] system_info_get_platform_bool returned Supported status feature for (key = %s)",__LINE__, pszKey);
+       }
+
+       return bValue;
+}
+
+
+/**
+ * @function           WifiSystemInfoGetError
+ * @description                Maps error enums to string values
+ * @parameter          nRet : error code returned
+ * @return                     error string
+ */
+char* WifiSystemInfoGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+
+       switch ( nRet )
+       {
+       case WIFI_ERROR_NONE   : szErrorVal = "Successful  " ; break; 
+       case WIFI_ERROR_INVALID_PARAMETER  : szErrorVal = "WIFI_ERROR_INVALID_PARAMETER" ; break; 
+       case WIFI_ERROR_OUT_OF_MEMORY : szErrorVal = "WIFI_ERROR_OUT_OF_MEMORY" ; break;
+       case WIFI_ERROR_INVALID_OPERATION   : szErrorVal = "WIFI_ERROR_INVALID_OPERATION" ; break;
+       case WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED   : szErrorVal = "WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED" ; break;
+       case WIFI_ERROR_OPERATION_FAILED   : szErrorVal = "WIFI_ERROR_OPERATION_FAILED" ; break;
+       case WIFI_ERROR_NO_CONNECTION   : szErrorVal = "WIFI_ERROR_NO_CONNECTION" ; break;
+       case WIFI_ERROR_NOW_IN_PROGRESS   : szErrorVal = "WIFI_ERROR_NOW_IN_PROGRESS" ; break;
+       case WIFI_ERROR_ALREADY_EXISTS   : szErrorVal = "WIFI_ERROR_ALREADY_EXISTS" ; break;
+       case WIFI_ERROR_OPERATION_ABORTED   : szErrorVal = "WIFI_ERROR_OPERATION_ABORTED" ; break;
+       case WIFI_ERROR_DHCP_FAILED   : szErrorVal = "WIFI_ERROR_DHCP_FAILED" ; break;
+       case WIFI_ERROR_INVALID_KEY   : szErrorVal = "WIFI_ERROR_INVALID_KEY" ; break;
+       case WIFI_ERROR_NO_REPLY   : szErrorVal = "WIFI_ERROR_NO_REPLY" ; break;
+       case WIFI_ERROR_SECURITY_RESTRICTED   : szErrorVal = "WIFI_ERROR_SECURITY_RESTRICTED" ; break;
+       case WIFI_ERROR_PERMISSION_DENIED   : szErrorVal = "WIFI_ERROR_PERMISSION_DENIED" ; break;
+       case TIZEN_ERROR_NOT_SUPPORTED   : szErrorVal = "TIZEN_ERROR_NOT_SUPPORTED" ; break;
+               default : szErrorVal = "Unknown error" ; break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            WifiGetDataPath
+* @description         Returnes the application data path
+* @parameter           pAppDataPath: application data path
+* @return                      true if succeed else false
+*/
+bool WifiGetDataPath(char* pAppDataPath)
+{
+       if ( pAppDataPath == NULL )
+       {
+               FPRINTF( "[Line : %d][wifi_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       memset(pAppDataPath, 0, PATH_LEN);
+
+       char* pPath = NULL;
+       pPath = app_get_data_path();
+       if ( pPath == NULL )
+       {
+               FPRINTF( "[Line : %d][wifi_ITc] Unable to get application data path; app_get_data_path returned null value \\n", __LINE__);
+               return false;
+       }
+
+       strcpy(pAppDataPath, pPath);
+
+       FPRINTF( "[Line : %d][wifi_ITc] application data path returned = %s\\n", __LINE__, pAppDataPath);
+
+       return true;
+}
+
+/**
+* @function            WifiAppendToAppDataPath
+* @description         Appends the input string to application data path
+* @parameter           pInputPath: path to append to data path;pFinalPath: final resultant path
+* @return                      true if succeed else false
+*/
+bool WifiAppendToAppDataPath(char* pInputPath, char* pFinalPath)
+{
+       if ( pInputPath == NULL || pFinalPath == NULL )
+       {
+               FPRINTF( "[Line : %d][wifi_ITc] Null Path provided; Check the input string\\n", __LINE__);
+               return false;
+       }
+
+       char pAppDataPath[PATH_LEN] = {0,};
+       if ( false == WifiGetDataPath(pAppDataPath) )
+       {
+               return false;
+       }
+
+       memset(pFinalPath, 0, PATH_LEN);
+       strcpy(pFinalPath, pAppDataPath);
+       strcat(pFinalPath, pInputPath);
+
+       FPRINTF( "[Line : %d][wifi_ITc] result path returned = %s\\n", __LINE__, pFinalPath);
+
+       return true;
+}
+
+/**
+* @function            WifiGetError
+* @description         Display the details error information
+* @parameter[IN]       nResult (return value of wifi api)
+*                      [IN]    pszApi (wifi api name)
+* @return                      NA
+*
+*/
+char* WifiGetError(int nRet)
+{
+       char *szErrorVal = NULL;
+       switch ( nRet )
+       {
+       case WIFI_ERROR_NONE:                                                           szErrorVal = "WIFI_ERROR_NONE";                                                                 break;/**< Successful */
+       case WIFI_ERROR_INVALID_PARAMETER:                                      szErrorVal = "WIFI_ERROR_INVALID_PARAMETER";                                    break;/**< Invalid parameter */
+       case WIFI_ERROR_OUT_OF_MEMORY:                                          szErrorVal = "WIFI_ERROR_OUT_OF_MEMORY";                                                break;/**< Out of memory error */
+       case WIFI_ERROR_INVALID_OPERATION:                                      szErrorVal = "WIFI_ERROR_INVALID_OPERATION";                                    break;/**< Invalid operation */
+       case WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED:           szErrorVal = "WIFI_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED";                 break;/**< Address family not supported */
+       case WIFI_ERROR_OPERATION_FAILED:                                       szErrorVal = "WIFI_ERROR_OPERATION_FAILED";                                             break;/**< Operation failed */
+       case WIFI_ERROR_NO_CONNECTION:                                          szErrorVal = "WIFI_ERROR_NO_CONNECTION";                                                break;/**< There is no connected AP */
+       case WIFI_ERROR_NOW_IN_PROGRESS:                                        szErrorVal = "WIFI_ERROR_NOW_IN_PROGRESS";                                              break;/** Now in progress */
+       case WIFI_ERROR_ALREADY_EXISTS:                                         szErrorVal = "WIFI_ERROR_ALREADY_EXISTS";                                               break;/**< Already exists */
+       case WIFI_ERROR_OPERATION_ABORTED:                                      szErrorVal = "WIFI_ERROR_OPERATION_ABORTED";                                    break;/**< Operation is aborted */
+       case WIFI_ERROR_DHCP_FAILED:                                            szErrorVal = "WIFI_ERROR_DHCP_FAILED";                                                  break;/**< DHCP failed */
+       case WIFI_ERROR_INVALID_KEY:                                            szErrorVal = "WIFI_ERROR_INVALID_KEY";                                                  break;/**< Invalid key */
+       case WIFI_ERROR_NO_REPLY:                                                       szErrorVal = "WIFI_ERROR_NO_REPLY";                                                             break;/**< No reply */
+       case WIFI_ERROR_SECURITY_RESTRICTED:                            szErrorVal = "WIFI_ERROR_SECURITY_RESTRICTED";                                  break;/**< Restricted by security system policy */
+       default:                                                                                        szErrorVal = "Unknown Error";                                                                   break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            WiFiAddressFamilyType
+* @description         Maps enum value to string value
+* @parameter           eRet: enum value
+* @return                      enum string
+*/
+char* WiFiAddressFamilyType(wifi_address_family_e eRet)
+{
+       char *szErrorVal = NULL;
+       switch ( eRet )
+       {
+       case WIFI_ADDRESS_FAMILY_IPV4:                  szErrorVal = "WIFI_ADDRESS_FAMILY_IPV4";                break;
+       case WIFI_ADDRESS_FAMILY_IPV6:                  szErrorVal = "WIFI_ADDRESS_FAMILY_IPV6";                break;
+       default:                                                                szErrorVal = "Unknown Address Family";                  break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            WiFiProxyType
+* @description         Maps enum value to string value
+* @parameter           eRet: enum value
+* @return                      enum string
+*/
+char* WiFiProxyType(wifi_proxy_type_e eRet)
+{
+       char *szErrorVal = NULL;
+       switch ( eRet )
+       {
+       case WIFI_PROXY_TYPE_DIRECT:                    szErrorVal = "WIFI_PROXY_TYPE_DIRECT";          break;
+       case WIFI_PROXY_TYPE_AUTO:                              szErrorVal = "WIFI_PROXY_TYPE_AUTO";            break;
+       case WIFI_PROXY_TYPE_MANUAL:                    szErrorVal = "WIFI_PROXY_TYPE_MANUAL";          break;
+       default:                                                                szErrorVal = "Unknown Type";                            break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function            WiFiEAPType
+* @description         Maps enum value to string value
+* @parameter           eRet: enum value
+* @return                      enum string
+*/
+char* WiFiEAPType(wifi_eap_type_e eRet)
+{
+       char *szErrorVal = NULL;
+       switch ( eRet )
+       {
+       case WIFI_EAP_TYPE_PEAP:                        szErrorVal = "WIFI_EAP_TYPE_PEAP";                      break;
+       case WIFI_EAP_TYPE_TLS:                         szErrorVal = "WIFI_EAP_TYPE_TLS";                       break;
+       case WIFI_EAP_TYPE_TTLS:                        szErrorVal = "WIFI_EAP_TYPE_TTLS";                      break;
+       case WIFI_EAP_TYPE_SIM:                         szErrorVal = "WIFI_EAP_TYPE_SIM";                       break;
+       case WIFI_EAP_TYPE_AKA:                         szErrorVal = "WIFI_EAP_TYPE_AKA";                       break;
+       default:                                                        szErrorVal = "Unknown Type";                            break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            WiFiEAPAuthType
+* @description         Maps enum value to string value
+* @parameter           eRet: enum value
+* @return                      enum string
+*/
+char* WiFiEAPAuthType(wifi_eap_auth_type_e eRet)
+{
+       char *szErrorVal = NULL;
+       switch ( eRet )
+       {
+       case WIFI_EAP_AUTH_TYPE_NONE:                   szErrorVal = "WIFI_EAP_AUTH_TYPE_NONE";                 break;
+       case WIFI_EAP_AUTH_TYPE_PAP:                    szErrorVal = "WIFI_EAP_AUTH_TYPE_PAP";                  break;
+       case WIFI_EAP_AUTH_TYPE_MSCHAP:                 szErrorVal = "WIFI_EAP_AUTH_TYPE_MSCHAP";               break;
+       case WIFI_EAP_AUTH_TYPE_MSCHAPV2:               szErrorVal = "WIFI_EAP_AUTH_TYPE_MSCHAPV2";             break;
+       case WIFI_EAP_AUTH_TYPE_MD5:                    szErrorVal = "WIFI_EAP_AUTH_TYPE_MD5";                  break;
+       case WIFI_EAP_AUTH_TYPE_GTC:                    szErrorVal = "WIFI_EAP_AUTH_TYPE_GTC";                  break;
+       default:                                                                szErrorVal = "Unknown Type";                                    break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            WiFiIPConfigType
+* @description         Maps enum value to string value
+* @parameter           eRet: enum value
+* @return                      enum string
+*/
+char* WiFiIPConfigType(wifi_ip_config_type_e eRet)
+{
+       char *szErrorVal = NULL;
+       switch ( eRet )
+       {
+       case WIFI_IP_CONFIG_TYPE_NONE:                  szErrorVal = "WIFI_IP_CONFIG_TYPE_NONE";                        break;
+       case WIFI_IP_CONFIG_TYPE_STATIC:                szErrorVal = "WIFI_IP_CONFIG_TYPE_STATIC";                      break;
+       case WIFI_IP_CONFIG_TYPE_DYNAMIC:               szErrorVal = "WIFI_IP_CONFIG_TYPE_DYNAMIC";                     break;
+       case WIFI_IP_CONFIG_TYPE_AUTO:                  szErrorVal = "WIFI_IP_CONFIG_TYPE_AUTO";                        break;
+       case WIFI_IP_CONFIG_TYPE_FIXED:                 szErrorVal = "WIFI_IP_CONFIG_TYPE_FIXED";                       break;
+       default:                                                                szErrorVal = "Unknown Type";                                            break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function            WifiGetConnectionState
+* @description         Display the details of connection state
+* @parameter[IN]       eRet (connection state)
+* @return                      connection state string
+*
+*/
+char* WifiGetConnectionState(wifi_connection_state_e eRet)
+{
+       char *szErrorVal = NULL;
+       switch ( eRet )
+       {
+       case WIFI_CONNECTION_STATE_DISCONNECTED:                        szErrorVal = "WIFI_CONNECTION_STATE_DISCONNECTED";                      break;/**< Successful */
+       case WIFI_CONNECTION_STATE_ASSOCIATION:                         szErrorVal = "WIFI_CONNECTION_STATE_ASSOCIATION";                       break;/**< Invalid parameter */
+       case WIFI_CONNECTION_STATE_CONFIGURATION:                       szErrorVal = "WIFI_CONNECTION_STATE_CONFIGURATION";                     break;/**< Out of memory error */
+       case WIFI_CONNECTION_STATE_CONNECTED:                           szErrorVal = "WIFI_CONNECTION_STATE_CONNECTED";                         break;/**< Invalid operation */
+       default:                                                                                        szErrorVal = "Unknown State";                                                           break;
+       }
+       return szErrorVal;
+}
+
+/**
+* @function                    WifiGetMemStatus
+* @description         Returns the Memory Allocation state
+* @parameter[OUT]      pszAPIMemory [String poniter containg the difference of total number of bytes for Current and
+*                                      Previous Memory Allocation.]
+* @return                      NA
+*/
+void WifiGetMemStatus(char *pszAPIMemory)
+{
+#if MEMORY_CHECK
+
+       if ( pszAPIMemory != NULL )
+       {
+               struct mallinfo stMemInfo;
+               int nMemDifference;
+               char *pszLog;
+
+               stMemInfo = mallinfo();
+               pszLog= calloc(MEMLOG , sizeof(char));
+
+               if ( stMemInfo.uordblks > g_stWifiMemInfo.uordblks )
+               {
+                       nMemDifference = (stMemInfo.uordblks - g_stWifiMemInfo.uordblks);
+               }
+               else
+               {
+                       nMemDifference = (g_stWifiMemInfo.uordblks - stMemInfo.uordblks);
+               }
+
+               sprintf(pszLog, "%d,", nMemDifference);
+               strcat(pszAPIMemory, pszLog);
+               free(pszLog);
+       }
+
+#endif
+}
+
+/**
+* @function                    WifiGetMemAllocation
+* @description         Gets the Memory state before API execution
+* @return                      NA
+*/
+inline void WifiGetMemAllocation()
+{
+#if MEMORY_CHECK
+       g_stWifiMemInfo = mallinfo();
+#endif
+}
+
+/**
+ * @function           ExecutionDelay
+ * @description        Returns a log for a code-block of statements execution delay
+ * @parameter[OUT]     pszAPITime [String poniter containg the time difference]
+ * @return                     NA
+ *
+ */
+void WifiExecutionDelay(char* pszAPITime)
+{
+#if SPEED_CHECK
+
+       char* pszLogTime;
+       struct timeval stEnd;
+       unsigned long long ulldifference = 0;
+
+       pszLogTime = calloc(TIMELOG , sizeof(char));
+       gettimeofday(&stEnd, NULL);
+       ulldifference = ((stEnd.tv_sec -g_stWifiStartTime.tv_sec)* MICROSECONDS_PER_SECOND + stEnd.tv_usec) - g_stWifiStartTime.tv_usec;
+
+       sprintf (pszLogTime, "%llu,", ulldifference);
+       strcat(pszAPITime, pszLogTime);
+       free(pszLogTime);
+
+#endif
+}
+
+/**
+ * @function           SystemGetTimeOfDay
+ * @description                Get time perior to target api call & set it to g_stWifiStartTime
+ * @parameter          NA
+ * @return             NA
+ *
+ */
+void WifiGetTimeOfDay()
+{
+#if SPEED_CHECK
+       gettimeofday(&g_stWifiStartTime, NULL);
+#endif
+}
+
+
+/**
+* @function            WifiFreeMemory
+* @description         Function to free the memory allocated
+* @parameter           pszMem1, pszMem2, pszMem3, pszMem4 [ pointers to allocated memory]
+* @return                      NA
+*/
+void WifiFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3)
+{
+       if ( pszMem1 != NULL )
+       {
+               free(pszMem1);
+               pszMem1 = NULL;
+       }
+       if ( pszMem2 != NULL )
+       {
+               free(pszMem2);
+               pszMem2 = NULL;
+       }
+       if ( pszMem3 != NULL )
+       {
+               free(pszMem3);
+               pszMem3 = NULL;
+       }
+}
+
+/**
+ * @function           WifiAllocateMemory
+ * @description                allocates memory for speed and memory check buffer
+ * @parameter          pszMem, pszSpeed [ pointers to allocated memory ]
+ * @return                     NA
+ */
+void WifiAllocateMemory(char **pszMem, char **pszSpeed)
+{
+#if MEMORY_CHECK
+       *pszMem =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       *pszSpeed =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+}
+
+/**
+ * @function           WifiAllocateMemory2
+ * @description                allocates memory for speed and memory check buffer for two API check scenario
+ * @parameter          pszMem, pszSpeed1, pszSpeed2 [ pointers to allocated memory ]
+ * @return                     NA
+ */
+void WifiAllocateMemory2(char **pszMem, char **pszSpeed1, char **pszSpeed2)
+{
+#if MEMORY_CHECK
+       *pszMem =  calloc(MEMLOG * MAX_COUNT , sizeof(char));
+#endif
+#if SPEED_CHECK
+       *pszSpeed1 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+       *pszSpeed2 =  calloc(TIMELOG * MAX_COUNT , sizeof(char));
+#endif
+}
+
+/**
+ * @function           GetValueFromConfigFile
+ * @description                gets the corresponding value for a key from config file
+ * @parameter          pstrKeyString : Key, pstrValue : Value
+ * @return                     true for success, false for failure
+ */
+bool GetValueFromConfigFile(char* pstrKeyString, char* pstrValue)
+{
+       if ( pstrKeyString == NULL )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] The key string provided to fetch config file value is null\\n", __LINE__);
+               return false;
+       }
+
+
+       FILE* pfilePtr = fopen(CONFIGFILE_PATH, "r");
+       if ( pfilePtr == NULL )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Unable to open configuration file : %s\\n", __LINE__, CONFIGFILE_PATH);
+               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);
+                       if ( pszKey == NULL )
+                       {
+                               fclose(pfilePtr);
+                               return false;
+                       }
+                       pszValue = strtok(NULL, pszDelim);
+
+                       if ( 0 == strcmp(pszKey, pstrKeyString) )
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d] [wifi_ITC] [Key = %s; Config value = %s]\\n", __LINE__, pszKey, pszValue);
+#endif
+                               break;
+                       }
+
+                       pszKey = NULL;
+                       pszValue = NULL;
+               }
+       }
+
+       fclose(pfilePtr);
+       if ( pszValue == NULL )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] [Key = %s; Unable to retrieve config value for this key. Check key at config file location : %s]\\n", __LINE__, pstrKeyString, CONFIGFILE_PATH);
+               return false;
+       }
+
+       if ( strlen(pszValue) >= CONFIG_VALUE_LEN_MAX )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] [Key = %s; Config Value should be less than %d characters in length]\\n", __LINE__, pszKey, CONFIG_VALUE_LEN_MAX);
+               return false;
+       }
+
+       memset(pstrValue, 0, CONFIG_VALUE_LEN_MAX);
+       strcpy(pstrValue, pszValue);
+       return true;
+}
+
+/** @}*/
diff --git a/src/itc/wifi/ITs-wifi-common.h b/src/itc/wifi/ITs-wifi-common.h
new file mode 100755 (executable)
index 0000000..9b32a18
--- /dev/null
@@ -0,0 +1,153 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_WIFI_COMMON_H_
+#define _ITS_WIFI_COMMON_H_
+
+/************************** Headers **********************************************/
+#include "assert.h"
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <wifi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <app.h>
+#include <system_info.h>
+
+/** @addtogroup itc-wifi
+*  @ingroup itc
+*  @{
+*/
+
+// Non-Functional Test Macros
+
+#define LOG                                                    100
+#define TIMELOG                                                20
+#define MEMLOG                                         20
+#define MICROSECONDS_PER_SECOND                1000000
+#define GMAINTIMEOUT                           10000           //10 seconds
+#define CERTIFICATION_PATH                     "cert.crt"
+#define KEYFILE                                                "testing.pem"
+#define SLEEPTIME                                      8
+#define CONFIG_LINE_LEN_MAX                    2048
+#define CONFIG_VALUE_LEN_MAX           1024
+#define PATH_LEN                                       1024
+
+FILE *g_fpLog;
+//helper function declarations here
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+#define START_TEST {\
+       FPRINTF("\\n[Line : %d] [wifi_ITC] Starting test : %s", __LINE__,__FUNCTION__);\
+       if (g_bWifiMismatch)\
+       {\
+               FPRINTF("[Line : %d][wifi_ITC] Feature support as returned by WifiCheckSystemInfoFeatureSupported() and error code as returned by wifi_initialize() mismatched, Leaving test ", __LINE__);\
+               return 1;\
+       }\
+       else if (g_bWifiNotSupported)\
+       {\
+               FPRINTF("\\n[Line : %d] [wifi_ITC] wifi feature not supported, Leaving test ", __LINE__);\
+               return 0;\
+       }\
+       if ( !g_bWifiInit )\
+       {\
+               FPRINTF("[Line : %d] [wifi_ITC] Precondition of wifi failed\\n", __LINE__);\
+               return 1;\
+       }\
+}
+
+
+#define PRINT_MEMORY_LOG(api, memLog) {\
+       int nMLogLen = strlen(memLog);\
+       if(nMLogLen > 0) \
+       {  \
+               memLog[nMLogLen-1] = '\0';\
+               FPRINTF("[Line : %d] [wifi_ITC] %s_MemoryLeakStatus : %s\\n", __LINE__, #api, memLog);\
+       }\
+}
+
+#define PRINT_SPEED_LOG(api, speedLog) {\
+       if(strlen(speedLog) > 0) \
+       {\
+               speedLog[strlen(speedLog)-1] = '\0';\
+               FPRINTF("[Line : %d] [wifi_ITC] %s_TimeInMicrosec : %s\\n", __LINE__, #api, speedLog);\
+       }\
+}
+
+#define PRINT_RESULT(nRetVal, API) {\
+       if (nRetVal == WIFI_ERROR_NONE)\
+       {\
+               FPRINTF("[Line : %d] [wifi_ITC] %s passed\\n", __LINE__, API);\
+       }\
+       else \
+       {\
+               FPRINTF("[Line : %d] [wifi_ITC] %s failed in pre-condition, error returned = %s \\n", __LINE__, API, WifiGetError(nRetVal));\
+               return 1;\
+       }\
+}
+
+#define PRINT_RESULT_LOOP(eRetVal, API, nFailCount) {\
+       if (eRetVal != WIFI_ERROR_NONE)\
+       {\
+               FPRINTF("[Line : %d] [wifi_ITC] %s failed on iteration %d, error returned = %s \\n", __LINE__, API, nLoopCount, WifiGetError(eRetVal));\
+               ++nFailCount;\
+               continue;\
+       }\
+}
+
+#define RUN_POLLING_LOOP {\
+       g_pMainLoop = g_main_loop_new(NULL, false);\
+       nWifiTimeoutId = g_timeout_add(GMAINTIMEOUT, WifiCallbackTimeout, g_pMainLoop);\
+       g_main_loop_run(g_pMainLoop);\
+       g_source_remove(nWifiTimeoutId);\
+       g_pMainLoop = NULL;\
+       }
+
+gboolean WifiCallbackTimeout(gpointer data);
+void WifiGetTimeOfDay();
+void WifiGetMemAllocation();
+void WifiExecutionDelay(char* pszAPITime);
+void WifiGetMemStatus(char *pszAPIMemory);
+
+char* WifiGetError(int nRet);
+void WifiFreeMemory(char *pszMem1, char *pszMem2,char *pszMem3);
+void WifiAllocateMemory2(char **pszMem, char **pszSpeed1, char **pszSpeed2);
+void WifiAllocateMemory(char **pszMem, char **pszSpeed);
+char* WiFiAddressFamilyType(wifi_address_family_e eRet);
+char* WiFiIPConfigType(wifi_ip_config_type_e eRet);
+char* WiFiProxyType(wifi_proxy_type_e eRet);
+char* WiFiEAPType(wifi_eap_type_e eRet);
+char* WiFiEAPAuthType(wifi_eap_auth_type_e eRet);
+char* WifiGetConnectionState(wifi_connection_state_e eRet);
+bool GetValueFromConfigFile(char* pstrKeyString, char* pstrValue);
+bool WifiCheckSystemInfoFeatureSupported(char* pszKey);
+char* WifiSystemInfoGetError(int nRet);
+bool WifiGetDataPath(char* pPath); // this function outputs tha application data path
+bool WifiAppendToAppDataPath(char* pInputPath, char* pFinalPath); // this function appends the input string to app data path and outputs the final resultant path
+
+/** @}*/
+
+#endif  //_ITS_WIFI_COMMON_H_
diff --git a/src/itc/wifi/ITs-wifi.c b/src/itc/wifi/ITs-wifi.c
new file mode 100755 (executable)
index 0000000..92d441e
--- /dev/null
@@ -0,0 +1,5757 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-wifi-common.h"
+
+/** @addtogroup itc-wifi
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Wifi
+
+struct timeval g_stWifiStartTime;
+struct mallinfo g_stWifiMemInfo;
+
+static GMainLoop *g_pMainLoop;
+static bool g_bCheckCb = false;
+static bool g_bForEachCb = false;
+bool g_bWifiInit;
+bool g_bWifiInitialization = false;
+wifi_ap_h g_pWifiAPHandle = NULL;
+wifi_ap_h g_pEapWifiAPHandle = NULL;
+wifi_ap_h g_pWpsPublicWifiAPHandle = NULL;
+void* WifiCreateEventLoop(void* pArg);
+void WifiActivatedCallback(wifi_error_e result, void* user_data);
+void WifiDeActivatedCallback(wifi_error_e result, void* user_data);
+void WifiDeviceStateChangeCallback(wifi_device_state_e state, void* user_data);
+void WifiConnectionStateChangeCallback(wifi_connection_state_e state, wifi_ap_h ap, void* user_data);
+void WifiScanRequestCallback(wifi_error_e error_code, void* user_data);
+void WifiBackgroundScanCallback(wifi_error_e error_code, void* user_data);
+bool WifiPreCondition();
+char *g_pszESSID = NULL;
+bool g_bWifiIssupportedFeature = false;
+bool g_bWifiNotSupported = false;
+bool g_bWifiMismatch = false;
+
+/**
+* @function            ITs_wifi_startup
+* @description         Called before each test, initialise and activate wifi
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_wifi_startup(void)
+{
+       g_bWifiInit = false;
+       bool bIsActive = false;
+       int nWifiTimeoutId = -1;
+
+       struct stat stBuff;
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+       
+       char* pKey = "http://tizen.org/feature/network.wifi";
+       g_bWifiIssupportedFeature = WifiCheckSystemInfoFeatureSupported(pKey);
+       
+       int nRetVal = wifi_initialize();
+
+       g_bWifiInitialization = false;
+
+       if ( false == g_bWifiIssupportedFeature) 
+       {
+               if (nRetVal != TIZEN_ERROR_NOT_SUPPORTED) 
+               {
+                       g_bWifiMismatch = true;
+               }
+               else 
+               {
+                       g_bWifiNotSupported = true;
+               }
+               return;
+       }
+
+       if(nRetVal == WIFI_ERROR_NONE)
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_initialize passed\\n", __LINE__);
+#endif
+
+               g_bWifiInitialization = true;
+               nRetVal = wifi_is_activated(&bIsActive);
+               if (bIsActive == true)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi already activated, no need to activate again \\n", __LINE__);
+                       g_bWifiInit = true;
+                       return;
+               }
+
+               g_bCheckCb = false;
+               nRetVal = wifi_activate(WifiActivatedCallback, NULL);
+
+               // wifi_activate is an asynchronous api, activation will happen in other thread so waiting
+               RUN_POLLING_LOOP;
+
+               if ( g_bCheckCb ) // NO checking for return value as activate can return busy state
+               {
+                       g_bWifiInit = true;
+#if DEBUG
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_activate passed on startup\\n", __LINE__);
+#endif
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_activate failed on startup, error returned = callback not invoked, Returned value = %s \\n", __LINE__, WifiGetError(nRetVal));
+                       wifi_deinitialize();
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_initialize failed on startup, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+       }
+}
+
+/**
+* @function            ITs_wifi_cleanup
+* @description         Called after each test, deactivate and deinitialise wifi
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_wifi_cleanup(void)
+{
+       int nRetVal = 0;
+       if ( g_bWifiInit )
+       {
+               int nWifiTimeoutId = -1;
+               if (g_pWifiAPHandle != NULL)
+               {
+                       nRetVal = wifi_ap_destroy(g_pWifiAPHandle);
+                       if(nRetVal != WIFI_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+                       }
+                       g_pWifiAPHandle = NULL;
+               }
+
+               if (g_pEapWifiAPHandle != NULL)
+               {
+                       nRetVal = wifi_ap_destroy(g_pEapWifiAPHandle);
+                       if(nRetVal != WIFI_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+                       }
+                       g_pEapWifiAPHandle = NULL;
+               }
+
+               if (g_pWpsPublicWifiAPHandle != NULL)
+               {
+                       nRetVal = wifi_ap_destroy(g_pWpsPublicWifiAPHandle);
+                       if(nRetVal != WIFI_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+                       }
+                       g_pWpsPublicWifiAPHandle = NULL;
+               }
+
+               bool bIsActivate = false;
+               nRetVal = wifi_is_activated(&bIsActivate);
+               if(bIsActivate == true)
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_is_activated passed on cleanup\\n", __LINE__);
+#endif
+                       g_bCheckCb = false;
+                       nRetVal = wifi_deactivate(WifiDeActivatedCallback,NULL);
+                       RUN_POLLING_LOOP;
+
+                       if(nRetVal == WIFI_ERROR_NONE)
+                       {
+                               if (g_bCheckCb)
+                               {
+#if DEBUG
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate passed on cleanup\\n", __LINE__);
+#endif
+                               }
+                               else
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate failed on cleanup, error returned = callback not invoked \\n", __LINE__);
+                               }
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate failed on cleanup, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+                       }
+               }
+
+               nRetVal = wifi_deinitialize();
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_deinitialize passed\\n", __LINE__);
+#endif
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_deinitialize failed on cleanup, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+               }
+
+               if(g_pszESSID != NULL)
+               {
+                       free(g_pszESSID);
+                       g_pszESSID = NULL;
+               }
+       }
+
+       if(g_bWifiInitialization)
+       {
+               nRetVal = wifi_deinitialize();
+               if ( nRetVal == WIFI_ERROR_NONE )
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d][wifi_ITC] wifi_deinitialize passed\\n", __LINE__);
+#endif
+               }
+               else 
+               {
+                       FPRINTF("[Line : %d][wifi_ITC] wifi_deinitialize failed on cleanup, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+               }
+       }
+}
+
+/**
+* @function            WifiCallbackTimeout
+* @description         callback function to terminate g_main loop
+* @parameter           data : user data sent to callback
+* @return                      NA
+*/
+gboolean WifiCallbackTimeout(gpointer data)
+{
+       GMainLoop* pMainLoop = (GMainLoop *)data;
+       if ( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               g_main_loop_unref(pMainLoop);
+               pMainLoop = NULL;
+       }
+       return false;
+}
+
+/**
+ * @function           WifiCreateEventLoop
+ * @description                Create Event Loop to support callbacks
+ * @parameter          pArg : handle to g_main loop
+ * @return                     NA
+ */
+void* WifiCreateEventLoop(void* pArg)
+{
+       g_type_init();
+       g_pMainLoop = g_main_loop_new(NULL, FALSE);
+
+       int nTimeoutId = g_timeout_add(GMAINTIMEOUT, WifiCallbackTimeout, g_pMainLoop);
+       g_main_loop_run(g_pMainLoop); //blocking call
+       g_source_remove(nTimeoutId);
+       return NULL;
+}
+
+/**
+* @function            WifiActivatedCallback
+* @description         callback function for capturing wifi activate event
+* @parameter           result : result, user_data : user data sent to callback
+* @return                      NA
+*/
+void WifiActivatedCallback(wifi_error_e result, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC]called callback WifiActivatedCallback \\n", __LINE__);
+#endif
+       g_bCheckCb = true;
+       if ( g_pMainLoop )
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_main_loop_unref(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+
+       if ( result == WIFI_ERROR_NONE )
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Wi-Fi Activation Succeeded\\n", __LINE__);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Wi-Fi Activation Failed! error : %s\\n", __LINE__, WifiGetError(result));
+       }
+}
+
+/**
+* @function            WifiDeActivatedCallback
+* @description         callback function for capturing wifi activate event
+* @parameter           result : result, user_data : user data sent to callback
+* @return                      NA
+*/
+void WifiDeActivatedCallback(wifi_error_e result, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC]called callback WifiDeActivatedCallback \\n", __LINE__);
+#endif
+       g_bCheckCb = true;
+       if ( g_pMainLoop )
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_main_loop_unref(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+       if ( result == WIFI_ERROR_NONE )
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Wi-Fi Deactivation Succeeded \\n", __LINE__);
+#endif
+       }
+       else
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Wi-Fi Deactivation Failed! error : %s \\n", __LINE__, WifiGetError(result));
+#endif
+       }
+}
+
+/**
+* @function            WifiBackgroundScanCallback
+* @description         callback function for capturing background scan event
+* @parameter           result : error_code, user_data : user data sent to callback
+* @return                      NA
+*/
+void WifiBackgroundScanCallback(wifi_error_e error_code, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC] called callback WifiBackgroundScanCallback \\n", __LINE__);
+#endif
+       g_bCheckCb = true;
+       if ( g_pMainLoop )
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_main_loop_unref(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC] Background Scan Completed, error code : %s\\n", __LINE__, WifiGetError(error_code));
+#endif
+}
+
+/**
+* @function            WifiScanRequestCallback
+* @description         callback function for capturing scan event
+* @parameter           result : error_code, user_data : user data sent to callback
+* @return                      NA
+*/
+void WifiScanRequestCallback(wifi_error_e error_code, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC]called callback WifiScanRequestCallback \\n", __LINE__);
+#endif
+       g_bCheckCb = true;
+       if ( g_pMainLoop )
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_main_loop_unref(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+}
+
+/**
+* @function            WifiConnectionStateCallback
+* @description         callback function for capturing connection state
+* @parameter           result : wifi_connection_state_e, user_data : user data sent to callback
+* @return                      NA
+*/
+void WifiConnectionStateChangeCallback(wifi_connection_state_e state, wifi_ap_h ap, void* user_data)
+{
+       int nRetVal = 0;
+       char *pszAccessPoint = NULL;
+
+       g_bCheckCb = true;
+       if ( g_pMainLoop )
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_main_loop_unref(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC] called callback WifiConnectionStateChangeCallback \\n", __LINE__);
+       FPRINTF("[Line : %d] [wifi_ITC] Connection state changed callback \\n", __LINE__);
+#endif
+
+#if DEBUG
+       switch (state)
+       {
+               case WIFI_CONNECTION_STATE_CONNECTED:
+                       FPRINTF("[Line : %d] [wifi_ITC] state : Connected \\n", __LINE__);
+                       break;
+               case WIFI_CONNECTION_STATE_ASSOCIATION:
+                       FPRINTF("[Line : %d] [wifi_ITC] state : Association \\n", __LINE__);
+                       break;
+               case WIFI_CONNECTION_STATE_CONFIGURATION:
+                       FPRINTF("[Line : %d] [wifi_ITC] state : Configuration \\n", __LINE__);
+                       break;
+               case WIFI_CONNECTION_STATE_DISCONNECTED:
+                       FPRINTF("[Line : %d] [wifi_ITC] state : Disconnected \\n", __LINE__);
+                       break;
+               default:
+                       FPRINTF("[Line : %d] [wifi_ITC] state : Unknown \\n", __LINE__);
+                       break;
+       }
+#endif
+
+       nRetVal = wifi_ap_get_essid(ap, &pszAccessPoint);
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Fail to get AP essid, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+#endif
+       }
+       else
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] AP name : %s\\n", __LINE__, pszAccessPoint);
+#endif
+               if(pszAccessPoint != NULL)
+               {
+                       free(pszAccessPoint);
+                       pszAccessPoint = NULL;
+               }
+       }
+}
+
+/**
+* @function            WifiDeviceStateChangeCallback
+* @description         callback function for capturing device state
+* @parameter           result : wifi_device_state_e, user_data : user data sent to callback
+* @return                      NA
+*/
+void WifiDeviceStateChangeCallback(wifi_device_state_e state, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC]called callback WifiDeviceStateChangeCallback \\n", __LINE__);
+       FPRINTF("[Line : %d] [wifi_ITC] Device state changed callback \\n", __LINE__);
+#endif
+       g_bCheckCb = true;
+       if ( g_pMainLoop )
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_main_loop_unref(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+       if (state == WIFI_DEVICE_STATE_ACTIVATED)
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] state : Activated\\n", __LINE__);
+#endif
+       }
+       else
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] state : Deactivated\\n", __LINE__);
+#endif
+       }
+}
+
+/**
+* @function            WifiFoundAPCallback
+* @description         Called when access point is found repeatedly
+* @parameter           pHandle : wifi AP handle, user_data : user data sent to callback
+* @return                      bool
+*/
+bool WifiFoundAPCallback(wifi_ap_h pHandle, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC]called callback WifiFoundAPCallback \\n", __LINE__);
+#endif
+       g_bForEachCb = true;
+       if(pHandle != NULL)
+       {
+               if(g_pszESSID != NULL)
+               {
+                       free(g_pszESSID);
+                       g_pszESSID = NULL;
+               }
+               char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+               int nRet = wifi_ap_get_essid(pHandle, &g_pszESSID);
+               if (nRet == WIFI_ERROR_NONE)
+               {
+                       if (g_pszESSID != NULL)
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d] [wifi_ITC] Access Point name in scanned list = %s \\n", __LINE__, g_pszESSID);
+#endif
+                               if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+                               {
+                       #if DEBUG
+                                       FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+                       #endif
+                               }
+                               else
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+                                       return false;
+                               }
+
+
+                               size_t nAPLength = strlen(szValue);
+                               if (strncmp(g_pszESSID, szValue, nAPLength) == 0)
+                               {
+                                       nRet = wifi_ap_clone(&g_pWifiAPHandle, pHandle);
+                                       if ((nRet == WIFI_ERROR_NONE) && (g_pWifiAPHandle != NULL))
+                                       {
+                                               g_bCheckCb = true;
+                                               if (g_pMainLoop)
+                                               {
+                                                       g_main_loop_quit(g_pMainLoop);
+                                                       g_main_loop_unref(g_pMainLoop);
+                                                       g_pMainLoop = NULL;
+                                               }
+                                               return false;
+                                       }
+                               }
+                       }
+               }
+       }
+       return true;
+}
+
+/**
+ * @function           WifiFoundEapAPCallback
+ * @description                Called when access point is found repeatedly.
+ * @parameter          pHandle : wifi AP handle, user_data : user data sent to callback
+ * @return                     bool
+ */
+bool WifiFoundEapAPCallback(wifi_ap_h pHandle, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC]called callback WifiFoundAPCallback \\n", __LINE__);
+#endif
+       g_bForEachCb = true;
+       if(pHandle != NULL)
+       {
+               if(g_pszESSID != NULL)
+               {
+                       free(g_pszESSID);
+                       g_pszESSID = NULL;
+               }
+
+               char szValueEAP[CONFIG_VALUE_LEN_MAX] = {0,};
+               int nRet = wifi_ap_get_essid(pHandle, &g_pszESSID);
+               if ( nRet == WIFI_ERROR_NONE )
+               {
+                       if ( g_pszESSID != NULL )
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d] [wifi_ITC] Access Point name in scanned list = %s \\n", __LINE__, g_pszESSID);
+#endif
+                               if(true == GetValueFromConfigFile("WIFI_EAPACCESSPOINTNAME", szValueEAP))
+                               {
+                       #if DEBUG
+                                       FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValueEAP);
+                       #endif
+                               }
+                               else
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+                                       return false;
+                               }
+
+                               int nAPLength = strlen(szValueEAP);
+                               if ( strncmp(g_pszESSID, szValueEAP, nAPLength) == 0 )
+                               {
+                                       nRet = wifi_ap_clone(&g_pEapWifiAPHandle, pHandle);
+                                       if ((nRet == WIFI_ERROR_NONE) && (g_pEapWifiAPHandle != NULL))
+                                       {
+                                               g_bCheckCb = true;
+                                               if ( g_pMainLoop )
+                                               {
+                                                       g_main_loop_quit(g_pMainLoop);
+                                                       g_main_loop_unref(g_pMainLoop);
+                                                       g_pMainLoop = NULL;
+                                               }
+                                               return false;
+                                       }
+                               }
+                       }
+               }
+       }
+       return true;
+}
+
+/**
+* @function            WifiFoundWPSPublicAPCallback
+* @description         Called when access point is found repeatedly
+* @parameter           pHandle : wifi AP handle, user_data : user data sent to callback
+* @return                      bool
+*/
+bool WifiFoundWPSPublicAPCallback(wifi_ap_h pHandle, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC]called callback WifiFoundAPCallback \\n", __LINE__);
+#endif
+       g_bForEachCb = true;
+       if ( pHandle != NULL )
+       {
+               if(g_pszESSID != NULL)
+               {
+                       free(g_pszESSID);
+                       g_pszESSID = NULL;
+               }
+
+               char szValueWpsName[CONFIG_VALUE_LEN_MAX] = {0,};
+               int nRet = wifi_ap_get_essid(pHandle, &g_pszESSID);
+               if ( nRet == WIFI_ERROR_NONE )
+               {
+                       if ( g_pszESSID != NULL )
+                       {
+#if DEBUG
+                               FPRINTF("[Line : %d] [wifi_ITC] Access Point name in scanned list = %s \\n", __LINE__, g_pszESSID);
+#endif
+                               if ( true == GetValueFromConfigFile("WIFI_WPSPUBLICACCESSPOINTNAME", szValueWpsName) )
+                               {
+                       #if DEBUG
+                                       FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValueWpsName);
+                       #endif
+                               }
+                               else
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+                                       return false;
+                               }
+
+                               int nAPLength = strlen(szValueWpsName);
+                               if ( strncmp(g_pszESSID, szValueWpsName, nAPLength) == 0 )
+                               {
+                                       nRet = wifi_ap_clone(&g_pWpsPublicWifiAPHandle, pHandle);
+                                       if ((nRet == WIFI_ERROR_NONE) && (g_pWpsPublicWifiAPHandle != NULL))
+                                       {
+                                               g_bCheckCb = true;
+                                               if ( g_pMainLoop )
+                                               {
+                                                       g_main_loop_quit(g_pMainLoop);
+                                                       g_main_loop_unref(g_pMainLoop);
+                                                       g_pMainLoop = NULL;
+                                               }
+                                               return false;
+                                       }
+                               }
+                       }
+               }
+       }
+       return true;
+}
+
+/**
+* @function            WifiRssiLevelChangesCallback
+* @description         Called when the RSSI of connected Wi-Fi is changed
+* @parameter           rssi_level : rssi level, user_data : user data sent to callback
+* @return                      NA
+*/
+void WifiRssiLevelChangesCallback(wifi_rssi_level_e rssi_level, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC] called callback WifiRssiLevelChangesCallback \\n", __LINE__);
+#endif
+       g_bCheckCb = true;
+       if ( g_pMainLoop )
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_main_loop_unref(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+}
+
+/**
+* @function            WifiConnectedCallback
+* @description         callback function called when wifi connected
+* @parameter           result : result, user_data : user data sent to callback
+* @return                      NA
+*/
+void WifiConnectedCallback(wifi_error_e result, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC] called callback WifiConnectedCallback \\n", __LINE__);
+#endif
+       g_bCheckCb = true;
+       if ( g_pMainLoop )
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_main_loop_unref(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+
+       if (result == WIFI_ERROR_NONE || result == WIFI_ERROR_ALREADY_EXISTS)
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Wi-Fi Connected Succeeded\\n", __LINE__);
+#endif
+       }
+       else
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Wi-Fi Connected Failed! error : %s\\n", __LINE__, WifiGetError(result));
+#endif
+       }
+}
+
+/**
+* @function            WiFiDisconnectCallabck
+* @description         callback function called when wifi connected
+* @parameter           result : result, user_data : user data sent to callback
+* @return                      NA
+*/
+void WiFiDisconnectCallabck(wifi_error_e result, void* user_data)
+{
+#if DEBUG
+       FPRINTF("[Line : %d] [wifi_ITC] called callback WiFiDisconnectCallabck \\n", __LINE__);
+#endif
+       g_bCheckCb = true;
+       if ( g_pMainLoop )
+       {
+               g_main_loop_quit(g_pMainLoop);
+               g_main_loop_unref(g_pMainLoop);
+               g_pMainLoop = NULL;
+       }
+
+       if ( result == WIFI_ERROR_NONE )
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Wi-Fi disconnect Succeeded\\n", __LINE__);
+#endif
+       }
+       else
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Wi-Fi disconnect Failed! error : %s \\n", __LINE__, WifiGetError(result));
+#endif
+       }
+}
+
+/**
+* @function            WifiPreConnectCondition
+* @description         to scan and find the AP
+* @parameter           NA
+* @return                      true for success or false for failure
+*/
+bool WifiPreConnectCondition()
+{
+       /** If device is already connected to an access point, next time the AP name does not appear in the scanned list
+       so we will have to disconnect it first and then scan.
+       But as we are not sure if it will be connected/disconnected at this point we will call disconnect here
+       and ignore the return type */
+
+       int nWifiTimeoutId = -1;
+       wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       RUN_POLLING_LOOP;
+
+       g_bCheckCb = false;
+       int nRet = wifi_scan(WifiScanRequestCallback, NULL);
+       RUN_POLLING_LOOP;
+       if ( nRet != WIFI_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed, error returned = %s \\n", __LINE__, WifiGetError(nRet));
+               return false;
+       }
+
+       if ( !g_bCheckCb )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed inside WifiPreConnectCondition, error returned = callback function not invoked\\n", __LINE__);
+               return false;
+       }
+
+       g_bForEachCb = false;
+       g_bCheckCb = false;
+       nRet = wifi_foreach_found_aps(WifiFoundAPCallback, NULL);
+       RUN_POLLING_LOOP;
+       if ( nRet != WIFI_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_foreach_found_aps failed, error returned = %s \\n", __LINE__, WifiGetError(nRet));
+               return false;
+       }
+
+       if ( !g_bForEachCb )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_foreach_found_aps failed inside WifiPreConnectCondition, error returned = callback function not invoked \\n", __LINE__);
+               return false;
+       }
+       
+       if ( !g_bCheckCb )
+       {
+               FPRINTF("[Line : %d][wifi_ITC] wifi_foreach_found_aps failed inside WifiPreConnectCondition, error returned = Access Point not found in the scanned list\\n", __LINE__);
+               return false;
+       }
+       return true;
+}
+
+/**
+* @function            WifiPreConnectConditionForEAP
+* @description         to scan and find the AP
+* @parameter           NA
+* @return                      true for success or false for failure
+*/
+bool WifiPreConnectConditionForEAP()
+{
+       /** If device is already connected to an access point, next time the AP name does not appear in the scanned list
+       so we will have to disconnect it first and then scan.
+       But as we are not sure if it will be connected/disconnected at this point we will call disconnect here
+       and ignore the return type */
+
+       int nWifiTimeoutId = -1;
+       wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       RUN_POLLING_LOOP;
+
+       g_bCheckCb = false;
+       int nRet = wifi_scan(WifiScanRequestCallback, NULL);
+       RUN_POLLING_LOOP;
+
+       if ( nRet != WIFI_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed, error returned = %s \\n", __LINE__, WifiGetError(nRet));
+               return false;
+       }
+
+       if(!g_bCheckCb)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed inside WifiPreConnectConditionForEAP, error returned = callback function not invoked\\n", __LINE__);
+               return false;
+       }
+
+       g_bForEachCb = false;
+       g_bCheckCb = false;
+       nRet = wifi_foreach_found_aps(WifiFoundEapAPCallback, NULL);
+       RUN_POLLING_LOOP;
+
+       if ( nRet != WIFI_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_foreach_found_aps failed, error returned = %s \\n", __LINE__, WifiGetError(nRet));
+               return false;
+       }
+
+       if(!g_bForEachCb)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_foreach_found_aps failed inside WifiPreConnectConditionForEAP, error returned = callback function not invoked \\n", __LINE__);
+               return false;
+       }
+
+       if ( !g_bCheckCb )
+       {
+               FPRINTF("[Line : %d][wifi_ITC] WiFi EAP given as input not found in the scanned list\\n", __LINE__);
+               return false;
+       }
+
+       return true;
+}
+
+/**
+* @function            WifiPreConnectConditionForWPSPublic
+* @description         to scan and find the AP
+* @parameter           NA
+* @return                      true for success or false for failure
+*/
+bool WifiPreConnectConditionForWPSPublic()
+{
+       /** If device is already connected to an access point, next time the AP name does not appear in the scanned list
+       so we will have to disconnect it first and then scan.
+       But as we are not sure if it will be connected/disconnected at this point we will call disconnect here
+       and ignore the return type */
+
+       int nWifiTimeoutId = -1;
+       wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+
+       g_bCheckCb = false;
+       int nRet = wifi_scan(WifiScanRequestCallback, NULL);
+       RUN_POLLING_LOOP;
+       if ( nRet != WIFI_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed, error returned = %s \\n", __LINE__, WifiGetError(nRet));
+               return false;
+       }
+
+       if ( !g_bCheckCb )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed inside WifiPreConnectConditionForWPSPublic, error returned = callback function not invoked\\n", __LINE__);
+               return false;
+       }
+
+       g_bForEachCb = false;
+       g_bCheckCb = false;
+       nRet = wifi_foreach_found_aps(WifiFoundWPSPublicAPCallback, NULL);
+       RUN_POLLING_LOOP;
+       if ( nRet != WIFI_ERROR_NONE )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_foreach_found_aps failed, error returned = %s \\n", __LINE__, WifiGetError(nRet));
+               return false;
+       }
+
+       if ( !g_bForEachCb )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_foreach_found_aps failed inside WifiPreConnectConditionForWPSPublic, error returned = callback function not invoked \\n", __LINE__);
+               return false;
+       }
+       
+       if ( !g_bCheckCb )
+       {
+               FPRINTF("[Line : %d][wifi_ITC] WiFi WPS Public AccessPoint given as input not found in the scanned list\\n", __LINE__);
+               return false;
+       }
+
+       return true;
+}
+
+/** @addtogroup itc-wifi-testcases
+*  @brief              Integration testcases for module wifi
+*  @ingroup    itc-wifi
+*  @{
+*/
+
+//& purpose: To check initialization/de-initialization of wifi
+//& type : auto
+/**
+* @testcase                    ITc_wifi_initialize_deinitialize_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                  To check initialization/de-initialization of wifi
+* @scenario                            deinitialize Wi-Fi and verify output\n
+*                                              initialise Wi-Fi and verify output\n
+*                                              deinitialize Wi-Fi and verify output\n
+*                                              initialise Wi-Fi and verify output
+* @apicovered                  wifi_initialize, wifi_deinitialize
+* @passcase                            When wifi_deinitialize, wifi_initialize return success
+* @failcase                            When wifi_deinitialize or wifi_initialize return failure
+* @precondition                        wifi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_initialize_deinitialize_p(void)
+{
+       START_TEST;
+       int nLoopCount, nRetVal = 0;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiInitSpeedLog = NULL;
+       char *pszWifiDeinitSpeedLog = NULL;
+       int nWifiInitFailCount = 0, nWifiDeinitFailCount = 0;
+
+       nRetVal = wifi_deinitialize();
+       PRINT_RESULT(nRetVal, "wifi_deinitialize");
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiInitSpeedLog, &pszWifiDeinitSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sleep(SLEEPTIME);
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_initialize();
+               WifiExecutionDelay(pszWifiInitSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_initialize", nWifiInitFailCount);
+
+               sleep(SLEEPTIME);
+               WifiGetTimeOfDay();
+               nRetVal = wifi_deinitialize();
+               WifiExecutionDelay(pszWifiDeinitSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_deinitialize", nWifiDeinitFailCount);
+               WifiGetMemStatus(pszWifiMemLog);
+       }
+
+       nRetVal = wifi_initialize();
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_initialize failed after loop, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+       }
+
+       sleep(SLEEPTIME);
+       if(nWifiInitFailCount || nWifiDeinitFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_initialize failed %d times and wifi_deinitialize failed %d times out of %d times\\n", __LINE__, nWifiInitFailCount, nWifiDeinitFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiDeinitSpeedLog, pszWifiInitSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_initialize", pszWifiInitSpeedLog);
+       PRINT_SPEED_LOG("wifi_deinitialize", pszWifiDeinitSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_initialize_deinitialize", pszWifiMemLog);
+#endif
+       WifiFreeMemory(pszWifiMemLog, pszWifiDeinitSpeedLog, pszWifiInitSpeedLog);
+       return 0;
+}
+
+//& purpose: To check activation/deactivation of wifi
+//& type : auto
+/**
+* @testcase                    ITc_wifi_activate_deactivate_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check initialization/de-initialization of wifi
+* @scenario                            deactivate Wi-Fi and verify output\n
+*                                              activate Wi-Fi and verify output\n
+*                                              deactivate Wi-Fi and verify output\n
+*                                              activate Wi-Fi and verify output
+* @apicovered                  wifi_is_activated, wifi_deactivate, wifi_activate
+* @passcase                            When wifi_activate, wifi_deactivate return success
+* @failcase                            When wifi_activate or wifi_deactivate return failure
+* @precondition                        wifi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_activate_deactivate_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiActivateSpeedLog = NULL;
+       char *pszWifiDeactivateSpeedLog = NULL;
+       int nWifiActivateFailCount = 0, nWifiDeactivateFailCount = 0;
+       int nWifiTimeoutId = -1;
+       bool bIsActive = false;
+
+       /** As we have already activated in startup and here target is activated, so deactivating first*/
+       nRetVal = wifi_is_activated(&bIsActive);
+       if (bIsActive == true)
+       {
+               g_bCheckCb = false;
+               nRetVal = wifi_deactivate(WifiDeActivatedCallback , NULL);
+               RUN_POLLING_LOOP;
+
+               if (g_bCheckCb)
+               {
+#if DEBUG
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate passed \\n", __LINE__);
+#endif
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate failed, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+                       return 1;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi is already deactivated \\n", __LINE__);
+       }
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiActivateSpeedLog, &pszWifiDeactivateSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCheckCb = false;
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_activate(WifiActivatedCallback , NULL);
+               WifiExecutionDelay(pszWifiActivateSpeedLog);
+               RUN_POLLING_LOOP;
+
+               PRINT_RESULT_LOOP(nRetVal, "wifi_activate", nWifiActivateFailCount);
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_activate failed on iteration %d, error returned = callback function not invoked\\n", __LINE__, nLoopCount);
+                       ++nWifiActivateFailCount;
+                       wifi_deactivate(WifiDeActivatedCallback , NULL);
+                       continue;
+               }
+
+               g_bCheckCb = false;
+               WifiGetTimeOfDay();
+               nRetVal = wifi_deactivate(WifiDeActivatedCallback , NULL);
+               WifiExecutionDelay(pszWifiDeactivateSpeedLog);
+               RUN_POLLING_LOOP;
+
+               PRINT_RESULT_LOOP(nRetVal, "wifi_deactivate", nWifiDeactivateFailCount);
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate failed on iteration %d, error returned = callback function not invoked\\n", __LINE__, nLoopCount);
+                       ++nWifiDeactivateFailCount;
+                       continue;
+               }
+               WifiGetMemStatus(pszWifiMemLog);
+       }
+
+       /** As deactivation takes place in cleanup, which is common for all test cases activate wifi again
+       but will not consider its result to determine pass or failure */
+       nRetVal = wifi_is_activated(&bIsActive);
+       if (bIsActive == false)
+       {
+               g_bCheckCb = false;
+               nRetVal = wifi_activate(WifiActivatedCallback , NULL);
+               RUN_POLLING_LOOP;
+
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (!g_bCheckCb)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_activate failed after loop, error returned = callback function not invoked\\n", __LINE__);
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_activate failed after loop, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+               }
+       }
+
+       if(nWifiActivateFailCount || nWifiDeactivateFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_activate failed %d times and wifi_deactivate failed %d times out of %d times\\n", __LINE__, nWifiActivateFailCount, nWifiDeactivateFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiActivateSpeedLog, pszWifiDeactivateSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_activate", pszWifiActivateSpeedLog);
+       PRINT_SPEED_LOG("wifi_deactivate", pszWifiDeactivateSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_activate_deactivate", pszWifiMemLog);
+#endif
+       WifiFreeMemory(pszWifiMemLog, pszWifiActivateSpeedLog, pszWifiDeactivateSpeedLog);
+       return 0;
+}
+
+//& purpose: Check whether Wi-Fi is activated
+//& type : auto
+/**
+* @testcase                    ITc_wifi_is_activated_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Check whether Wi-Fi is activated
+* @scenario                            call API to check whether wifi is activated and verify output
+* @apicovered                  wifi_is_activated
+* @passcase                            When wifi_is_activated return success and output must be true
+* @failcase                            When wifi_is_activated return failure or output return false
+* @precondition                        wifi should be initialized and activated
+* @postcondition               none
+*/
+int ITc_wifi_is_activated_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       bool bIsActive = false;
+
+       WifiAllocateMemory(&pszWifiMemLog , &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sleep(SLEEPTIME);
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_is_activated(&bIsActive);
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_is_activated", nWifiFailCount);
+
+               if(!bIsActive)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_is_activated failed on iteration %d, returned wifi activate state = false \\n", __LINE__, nLoopCount);
+                       ++nWifiFailCount;
+                       continue;
+               }
+       }
+
+       if ( nWifiFailCount )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_is_activated failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog , NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_is_activated", pszWifiSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_is_activated", pszWifiMemLog);
+#endif
+       WifiFreeMemory(pszWifiMemLog , pszWifiSpeedLog , NULL);
+       return 0;
+}
+
+//& purpose: To create and destroy the handle of access point
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_create_destroy_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check initialization/de-initialization of Wi-Fi
+* @scenario                            creates the handle of access point\n
+*                                              check that handle for null\n
+*                                              destroys the handle of access point\n
+* @apicovered                  wifi_ap_create, wifi_ap_destroy
+* @passcase                            When wifi_ap_create, wifi_ap_destroy return success
+* @failcase                            When wifi_activate or wifi_ap_destroy return failure
+* @precondition                        Wi-Fi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_create_destroy_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nWifiAPCreateFailCount = 0, nWifiAPDestroyFailCount = 0;
+       wifi_ap_h pWifiAccessPointHandle = NULL;
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLogAPI1, &pszWifiSpeedLogAPI2);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sleep(SLEEPTIME);
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_create(szValue, &pWifiAccessPointHandle);
+               WifiExecutionDelay(pszWifiSpeedLogAPI1);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_create", nWifiAPCreateFailCount);
+
+               if(!pWifiAccessPointHandle)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_create failed on iteration %d, returned access point handle is null \\n", __LINE__, nLoopCount);
+                       ++nWifiAPCreateFailCount;
+                       continue;
+               }
+
+               sleep(SLEEPTIME);
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_destroy(pWifiAccessPointHandle);
+               WifiExecutionDelay(pszWifiSpeedLogAPI2);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_destroy", nWifiAPDestroyFailCount);
+       }
+
+       if(nWifiAPDestroyFailCount || nWifiAPCreateFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_create failed %d times and wifi_ap_destroy failed %d times out of %d times\\n", __LINE__, nWifiAPCreateFailCount, nWifiAPDestroyFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_create", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_destroy", pszWifiSpeedLogAPI2);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_create_destroy", pszWifiMemLog);
+#endif
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check cloning of the handle of access point
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_clone_destroy_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check cloning of the handle of access point
+* @scenario                            creates the handle of access point\n
+*                                              creates clone of the handle of access point\n
+*                                              check that clone handle for null\n
+*                                              destroys the cloned handle of access point\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_clone, wifi_ap_destroy, wifi_ap_create
+* @passcase                            When wifi_ap_create, wifi_ap_destroy, wifi_ap_create returns success
+* @failcase                            When wifi_activate or wifi_ap_destroy or wifi_ap_create return failure
+* @precondition                        Wi-Fi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_clone_destroy_p(void)
+{
+       START_TEST;
+
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nWifiAPCloneFailCount = 0, nWifiAPDestroyFailCount = 0;
+
+       wifi_ap_h pWifiAccessPointHandle = NULL;
+       wifi_ap_h pWifiCloneAccessPointHandle = NULL;
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_create(szValue, &pWifiAccessPointHandle);
+       PRINT_RESULT(nRetVal , "wifi_ap_create");
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLogAPI1, &pszWifiSpeedLogAPI2);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sleep(SLEEPTIME);
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_clone(&pWifiCloneAccessPointHandle, pWifiAccessPointHandle);
+               WifiExecutionDelay(pszWifiSpeedLogAPI1);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_clone", nWifiAPCloneFailCount);
+
+               if(!pWifiCloneAccessPointHandle)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_clone failed on iteration %d, returned cloned access point handle is null \\n", __LINE__, nLoopCount);
+                       ++nWifiAPCloneFailCount;
+                       continue;
+               }
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_destroy(pWifiCloneAccessPointHandle);
+               WifiExecutionDelay(pszWifiSpeedLogAPI2);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_destroy", nWifiAPDestroyFailCount);
+               sleep(SLEEPTIME);
+       }
+
+       nRetVal = wifi_ap_destroy(pWifiAccessPointHandle);
+       if(nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed after loop, error returned = %s \\n", __LINE__,WifiGetError(nRetVal));
+       }
+
+       if(nWifiAPDestroyFailCount || nWifiAPCloneFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_clone_destroy failed %d times and wifi_ap_destroy failed %d times out of %d times\\n", __LINE__, nWifiAPCloneFailCount, nWifiAPDestroyFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_clone", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_destroy", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_clone_destroy", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: gets the connection state of Wifi
+//& type : auto
+/**
+* @testcase                    ITc_wifi_get_connection_state_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 gets the connection state of Wifi
+* @scenario                            gets the connection state of Wifi
+* @apicovered                  wifi_get_connection_state
+* @passcase                            When wifi_get_connection_state return success
+* @failcase                            When wifi_get_connection_state return failure
+* @precondition                        wifi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_get_connection_state_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       wifi_connection_state_e eWifiConnectionState;
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_get_connection_state(&eWifiConnectionState); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_get_connection_state", nWifiFailCount);
+               if((eWifiConnectionState < WIFI_CONNECTION_STATE_DISCONNECTED) || (eWifiConnectionState > WIFI_CONNECTION_STATE_CONNECTED))
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_get_connection_state failed on iteration %d, state returned = %s\\n", __LINE__,nLoopCount, WifiGetConnectionState(eWifiConnectionState));
+                       ++nWifiFailCount;
+                       continue;
+               }
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_get_connection_state returns = %s\\n", __LINE__,WifiGetConnectionState(eWifiConnectionState));
+#endif
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_get_connection_state failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_get_connection_state", pszWifiSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_get_connection_state", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: To check set and get dns address
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_dns_address_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check cloning of the handle of access point
+* @scenario                            creates the handle of access point\n
+*                                              set dns address\n
+*                                              get dns address\n
+*                                              compare set and get dns address\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_dns_address, wifi_ap_get_dns_address, wifi_ap_destroy, wifi_ap_create
+* @passcase                            When wifi_ap_set_dns_address, wifi_ap_get_dns_address and supporting apis returns success
+* @failcase                            When wifi_ap_set_dns_address or wifi_ap_get_dns_address or supporting apis return failure
+* @precondition                        Wi-Fi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_dns_address_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       char *pszDnsAddress = "10.0.0.111";
+       char *pszFindDnsAddress = NULL;
+       //wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4, WIFI_ADDRESS_FAMILY_IPV6}; // For future use when IPV6 will be supported
+       wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4 };
+       wifi_ap_h pWifiAccessPointHandle = NULL;
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_create(szValue, &pWifiAccessPointHandle);
+       PRINT_RESULT(nRetVal , "wifi_ap_create");
+
+       int nEnumFamilySize = sizeof(eAddressFamily) / sizeof(eAddressFamily[0]);
+       int nEnumFamilyCounter = 0;
+
+#if MEMORY_CHECK
+       pszWifiMemLog =  calloc(MEMLOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszWifiSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+       pszWifiSpeedLogAPI2 =  calloc(TIMELOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+#endif
+
+       for (nEnumFamilyCounter = 0; nEnumFamilyCounter < nEnumFamilySize;  nEnumFamilyCounter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       WifiGetMemAllocation();
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_set_dns_address(pWifiAccessPointHandle, 1, eAddressFamily[nEnumFamilyCounter], pszDnsAddress);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI1);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_dns_address", nSetFailCount);
+
+
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_get_dns_address(pWifiAccessPointHandle, 1, eAddressFamily[nEnumFamilyCounter], &pszFindDnsAddress);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI2);
+                       WifiGetMemStatus(pszWifiMemLog);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_dns_address", nGetFailCount);
+
+                       if(pszFindDnsAddress == NULL)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_dns_address failed for Family type = %s,            error returned = Get DNS is NULL \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]));
+                               ++nGetFailCount;
+                               continue;
+                       }
+                       if(eAddressFamily[nEnumFamilyCounter] == WIFI_ADDRESS_FAMILY_IPV6)
+                       {
+                               if((strcmp("0.0.0.0" , pszFindDnsAddress) != 0)) //DNS is set to 0.0.0.0 in case of IPV6 family as per documentation
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_dns_address failed for Family type = %s                     mismatch in DNS address. Set DNS = 0.0.0.0, Get DNS = %s \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]), pszFindDnsAddress);
+                                       ++nMismatchCount;
+                                       continue;
+                               }
+                       }
+                       else
+                       {
+                               if(strcmp(pszDnsAddress , pszFindDnsAddress) != 0)
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_dns_address failed for Family type = %s                     mismatch in DNS address. Set DNS = %s, Get DNS = %s \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]), pszDnsAddress, pszFindDnsAddress);
+                                       ++nMismatchCount;
+                                       continue;
+                               }
+                       }
+
+                       if(pszFindDnsAddress != NULL)
+                       {
+                               free(pszFindDnsAddress);
+                               pszFindDnsAddress = NULL;
+                       }
+               }
+       }
+
+       if(pszFindDnsAddress != NULL)  // In case last iteration continues and exist the loop without freeing the memory
+       {
+               free(pszFindDnsAddress);
+               pszFindDnsAddress = NULL;
+       }
+
+       nRetVal = wifi_ap_destroy(pWifiAccessPointHandle);
+       if(nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed after loop, error returned = %s \\n", __LINE__,WifiGetError(nRetVal));
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_dns_address failed %d times, wifi_ap_get_dns_address failed %d times and value mismatched %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_dns_address", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_dns_address", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_dns_address", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the type of EAP phase2 authentication of Wi-Fi
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_eap_auth_type_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check cloning of the handle of access point
+* @scenario                            creates the handle of access point\n
+*                                              set the type of EAP phase2 authentication of Wi-Fi\n
+*                                              get the type of EAP phase2 authentication of Wi-Fi\n
+*                                              compare find EAP phase2 authentication and set EAP phase2 authentication\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_eap_auth_type, wifi_ap_get_eap_auth_type
+* @passcase                            When wifi_ap_set_eap_auth_type, wifi_ap_get_eap_auth_type and supporting apis returns success
+* @failcase                            When wifi_ap_set_eap_auth_type or wifi_ap_get_eap_auth_type or supporting apis return failure
+* @precondition                        Wi-Fi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_eap_auth_type_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       wifi_eap_auth_type_e eSetEAPAuthType = WIFI_EAP_AUTH_TYPE_NONE;
+       wifi_eap_auth_type_e eFindEAPAuthType;
+
+       if(!WifiPreConnectConditionForEAP())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pEapWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLogAPI1, &pszWifiSpeedLogAPI2);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_set_eap_auth_type(g_pEapWifiAPHandle, eSetEAPAuthType);
+               WifiExecutionDelay(pszWifiSpeedLogAPI1);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_eap_auth_type", nSetFailCount);
+
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_eap_auth_type(g_pEapWifiAPHandle, &eFindEAPAuthType);
+               WifiExecutionDelay(pszWifiSpeedLogAPI2);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_eap_auth_type", nGetFailCount);
+
+               if(eSetEAPAuthType != eFindEAPAuthType)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_auth_type failed on iteration %d, mismatch in EAP phase2        authentication type. Set = %s, Get = %s \\n", __LINE__, nLoopCount, WiFiEAPAuthType(eSetEAPAuthType), WiFiEAPAuthType(eFindEAPAuthType));
+                       ++nMismatchCount;
+                       continue;
+               }
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_eap_auth_type failed %d times, wifi_ap_get_eap_auth_type failed %d times and value mismatched %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_eap_auth_type", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_eap_auth_type", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_eap_auth_type", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the EAP type of Wi-Fi
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_eap_type_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To set/get the EAP type of Wi-Fi
+* @scenario                            creates the handle of access point\n
+*                                              set EAP type of Wi-Fi\n
+*                                              get EAP type of Wi-Fi\n
+*                                              compare find EAP type and set EAP type\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_eap_type, wifi_ap_get_eap_type
+* @passcase                            When wifi_ap_set_eap_type, wifi_ap_get_eap_type and supporting apis returns success
+* @failcase                            When wifi_ap_set_eap_type or wifi_ap_get_eap_type or supporting apis return failure
+* @precondition                        Wi-Fi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_eap_type_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       wifi_eap_type_e eSetEAPType = WIFI_EAP_TYPE_TLS;
+       wifi_eap_type_e eFindEAPType = -1;
+
+       if(!WifiPreConnectConditionForEAP())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pEapWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLogAPI1, &pszWifiSpeedLogAPI2);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_set_eap_type(g_pEapWifiAPHandle, eSetEAPType);
+               WifiExecutionDelay(pszWifiSpeedLogAPI1);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_eap_type", nSetFailCount);
+
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_eap_type(g_pEapWifiAPHandle, &eFindEAPType);
+               WifiExecutionDelay(pszWifiSpeedLogAPI2);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_eap_type", nGetFailCount);
+
+               if(eSetEAPType != eFindEAPType)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_type failed on iteration %d, mismatch in EAP phase2 authentication type. Set = %s, Get = %s \\n", __LINE__, nLoopCount, WiFiEAPType(eSetEAPType), WiFiEAPType(eFindEAPType));
+                       ++nMismatchCount;
+                       continue;
+               }
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_eap_type failed %d times, wifi_ap_get_eap_type failed %d times and value mismatched %d times out of %d times\\n", __LINE__, nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_eap_type", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_eap_type", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_eap_type", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the CA Certificate of EAP
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_eap_ca_cert_file_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To set/get the EAP type of Wi-Fi
+* @scenario                            creates the handle of access point\n
+*                                              set the EAP type of Wi-Fi\n
+*                                              set path of CA Certificate of EAP\n
+*                                              get path of CA Certificate of EAP\n
+*                                              compare find path and set path of certificate\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_eap_ca_cert_file, wifi_ap_get_eap_ca_cert_file, wifi_ap_set_eap_type
+* @passcase                            When wifi_ap_set_eap_ca_cert_file, wifi_ap_get_eap_ca_cert_file and supporting apis returns success
+* @failcase                            When wifi_ap_set_eap_ca_cert_file or wifi_ap_get_eap_ca_cert_file or supporting apis return failure
+* @precondition                        Wi-Fi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_eap_ca_cert_file_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+       char *pszFindCertPath = NULL;
+
+       char pszCertPath[PATH_LEN] = {0,};
+       if(false == WifiAppendToAppDataPath(CERTIFICATION_PATH, pszCertPath))
+       {
+               FPRINTF( "[Line : %d][wifi_ITC] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+
+       wifi_eap_type_e eSetEAPType = WIFI_EAP_TYPE_TLS;
+
+       if(!WifiPreConnectConditionForEAP())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pEapWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_set_eap_type(g_pEapWifiAPHandle, eSetEAPType);
+       PRINT_RESULT(nRetVal , "wifi_ap_set_eap_type");
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLogAPI1, &pszWifiSpeedLogAPI2);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_set_eap_ca_cert_file(g_pEapWifiAPHandle, pszCertPath);
+               WifiExecutionDelay(pszWifiSpeedLogAPI1);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_eap_ca_cert_file", nSetFailCount);
+
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_eap_ca_cert_file(g_pEapWifiAPHandle, &pszFindCertPath);
+               WifiExecutionDelay(pszWifiSpeedLogAPI2);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_eap_ca_cert_file", nGetFailCount);
+
+               if(pszFindCertPath == NULL)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_ca_cert_file failed on iteration %d, error returned = get certificate path is NULL \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+
+               if((strcmp(pszCertPath , pszFindCertPath)) != 0)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_ca_cert_file failed on iteration %d, mismatch in certificate path. Set = %s, Get = %s \\n", __LINE__, nLoopCount, pszCertPath, pszFindCertPath);
+                       ++nMismatchCount;
+                       continue;
+               }
+
+               if(pszFindCertPath != NULL)
+               {
+                       free(pszFindCertPath);
+                       pszFindCertPath = NULL;
+               }
+       }
+
+       if(pszFindCertPath != NULL)
+       {
+               free(pszFindCertPath);
+               pszFindCertPath = NULL;
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_eap_ca_cert_file failed %d times, wifi_ap_get_eap_ca_cert_file failed %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_eap_ca_cert_file", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_eap_ca_cert_file", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_eap_ca_cert_file", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the CA Certificate of EAP(client)
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_eap_client_cert_file_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To set/get the EAP type of Wi-Fi()
+* @scenario                            creates the handle of access point\n
+*                                              set the EAP type of Wi-Fi\n
+*                                              set path of CA Certificate of EAP(client)\n
+*                                              get path of CA Certificate of EAP(client)\n
+*                                              compare find path and set path of certificate\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_eap_client_cert_file, wifi_ap_get_eap_client_cert_file, wifi_ap_set_eap_type
+* @passcase                            When wifi_ap_set_eap_client_cert_file, wifi_ap_get_eap_client_cert_file and supporting apis returns success
+* @failcase                            When wifi_ap_set_eap_client_cert_file or wifi_ap_get_eap_client_cert_file or supporting apis return failure
+* @precondition                        Wi-Fi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_eap_client_cert_file_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+       char *pszFindCertPath = NULL;
+       wifi_eap_type_e eSetEAPType = WIFI_EAP_TYPE_TLS;
+
+       char pszCertPath[PATH_LEN] = {0,};
+       if(false == WifiAppendToAppDataPath(CERTIFICATION_PATH, pszCertPath))
+       {
+               FPRINTF( "[Line : %d][wifi_ITC] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+
+       if(!WifiPreConnectConditionForEAP())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pEapWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+
+       nRetVal = wifi_ap_set_eap_type(g_pEapWifiAPHandle, eSetEAPType);
+       PRINT_RESULT(nRetVal , "wifi_ap_set_eap_type");
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLogAPI1, &pszWifiSpeedLogAPI2);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_set_eap_client_cert_file(g_pEapWifiAPHandle, pszCertPath);
+               WifiExecutionDelay(pszWifiSpeedLogAPI1);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_eap_client_cert_file", nSetFailCount);
+
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_eap_client_cert_file(g_pEapWifiAPHandle, &pszFindCertPath);
+               WifiExecutionDelay(pszWifiSpeedLogAPI2);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_eap_client_cert_file", nGetFailCount);
+
+               if(pszFindCertPath == NULL)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_client_cert_file failed on iteration %d, error returned = get certificate path is NULL \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+
+               if((strcmp(pszCertPath , pszFindCertPath)) != 0)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_client_cert_file failed on iteration %d, mismatch in certificate path. Set = %s, Get = %s \\n", __LINE__, nLoopCount, pszCertPath , pszFindCertPath);
+                       ++nMismatchCount;
+                       continue;
+               }
+
+               if(pszFindCertPath != NULL)
+               {
+                       free(pszFindCertPath);
+                       pszFindCertPath = NULL;
+               }
+       }
+
+       if(pszFindCertPath != NULL)
+       {
+               free(pszFindCertPath);
+               pszFindCertPath = NULL;
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_eap_client_cert_file failed %d times, wifi_ap_get_eap_client_cert_file failed %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_eap_client_cert_file", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_eap_client_cert_file", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_eap_client_cert_file", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the private key information of EAP
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_eap_private_key_info_file_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To set/get the private key information of EAP
+* @scenario                            creates the handle of access point\n
+*                                              set the EAP type of Wi-Fi\n
+*                                              set path of private key information of EAP\n
+*                                              get path of private key information of EAP\n
+*                                              compare find key path and set key path of certificate\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_eap_private_key_info, wifi_ap_get_eap_private_key_file, wifi_ap_set_eap_type, wifi_ap_destroy
+* @passcase                            When wifi_ap_set_eap_private_key_info, wifi_ap_get_eap_private_key_file and supporting apis returns success
+* @failcase                            When wifi_ap_set_eap_private_key_info or wifi_ap_get_eap_private_key_file or supporting apis returns failure
+* @precondition                        Wi-Fi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_eap_private_key_info_file_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       char *pszPassword = "1234";
+       char *pszFindKeyPath = NULL;
+       char *pstrGetDefaultPath = NULL;
+       wifi_eap_type_e eSetEAPType = WIFI_EAP_TYPE_TLS;
+
+       char pszKeyPath[PATH_LEN] = {0,};
+       if(false == WifiAppendToAppDataPath(KEYFILE, pszKeyPath))
+       {
+               FPRINTF( "[Line : %d][wifi_ITC] unable to get the app data path\\n", __LINE__);
+               return 1;
+       }
+
+       if(!WifiPreConnectConditionForEAP())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pEapWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+
+       nRetVal = wifi_ap_set_eap_type(g_pEapWifiAPHandle, eSetEAPType);
+       PRINT_RESULT(nRetVal , "wifi_ap_set_eap_type");
+
+       nRetVal  = wifi_ap_get_eap_private_key_file(g_pEapWifiAPHandle, &pstrGetDefaultPath);
+       PRINT_RESULT(nRetVal , "wifi_ap_get_eap_private_key_file");
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLogAPI1, &pszWifiSpeedLogAPI2);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_set_eap_private_key_info(g_pEapWifiAPHandle, pszKeyPath , pszPassword);
+               WifiExecutionDelay(pszWifiSpeedLogAPI1);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_eap_private_key_info", nSetFailCount);
+
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_eap_private_key_file(g_pEapWifiAPHandle, &pszFindKeyPath);
+               WifiExecutionDelay(pszWifiSpeedLogAPI2);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_eap_private_key_file", nGetFailCount);
+
+               if(pszFindKeyPath == NULL)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_private_key_file failed on iteration %d, error returned = key path is NULL \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+
+               if((strcmp(pszKeyPath , pszFindKeyPath)) != 0)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_private_key_file failed on iteration %d, mismatch in key file path. Set = %s, Get = %s \\n", __LINE__, nLoopCount, pszKeyPath , pszFindKeyPath);
+                       ++nMismatchCount;
+                       continue;
+               }
+
+               if(pszFindKeyPath != NULL)
+               {
+                       free(pszFindKeyPath);
+                       pszFindKeyPath = NULL;
+               }
+       }
+
+       nRetVal  = wifi_ap_set_eap_private_key_info(g_pEapWifiAPHandle, pstrGetDefaultPath , NULL);
+       PRINT_RESULT(nRetVal , "wifi_ap_get_eap_private_key_file");
+
+
+       if(pstrGetDefaultPath != NULL)
+       {
+               free(pstrGetDefaultPath);
+               pstrGetDefaultPath = NULL;
+       }
+       if(pszFindKeyPath != NULL)
+       {
+               free(pszFindKeyPath);
+               pszFindKeyPath = NULL;
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_eap_private_key_info failed %d times, wifi_ap_get_eap_private_key_file %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_eap_private_key_info", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_eap_private_key_file", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_eap_private_key_info_file", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the passphrase of EAP
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_eap_passphrase_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check set and get the passphrase of EAP
+* @scenario                            creates the handle of access point\n
+*                                              set the EAP type of Wi-Fi\n
+*                                              set passphrase user and password of EAP\n
+*                                              get passphrase user and password protection of EAP\n
+*                                              compare find user and set user passphrase and verify password protection\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_eap_passphrase, wifi_ap_get_eap_passphrase, wifi_ap_set_eap_type
+* @passcase                            When wifi_ap_set_eap_passphrase, wifi_ap_get_eap_passphrase and supporting apis returns success
+* @failcase                            When wifi_ap_set_eap_passphrase or wifi_ap_get_eap_passphrase or supporting apis returns failure
+* @precondition                        Wi-Fi should be initialized and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_eap_passphrase_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       char *pszUser = "user";
+       char *pszPassword = "1234";
+       char *pszFindUser = NULL;
+       bool bIsPasswordEnabled = false;
+
+       wifi_eap_type_e eSetEAPType = WIFI_EAP_TYPE_TTLS;
+
+       if(!WifiPreConnectConditionForEAP())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pEapWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+
+       nRetVal = wifi_ap_set_eap_type(g_pEapWifiAPHandle, eSetEAPType);
+       PRINT_RESULT(nRetVal , "wifi_ap_set_eap_type");
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLogAPI1, &pszWifiSpeedLogAPI2);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_set_eap_passphrase(g_pEapWifiAPHandle, pszUser , pszPassword);
+               WifiExecutionDelay(pszWifiSpeedLogAPI1);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_eap_passphrase", nSetFailCount);
+
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_eap_passphrase(g_pEapWifiAPHandle, &pszFindUser , &bIsPasswordEnabled);
+               WifiExecutionDelay(pszWifiSpeedLogAPI2);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_eap_passphrase", nGetFailCount);
+
+               if (pszFindUser == NULL)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_passphrase failed on iteration %d, error return = User returned is NULL \\n", __LINE__, nLoopCount);
+                       ++nGetFailCount;
+                       continue;
+               }
+
+#if DEBUG
+               if(!bIsPasswordEnabled)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_passphrase return = password is not set \\n", __LINE__);
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_passphrase return = password is set \\n", __LINE__);
+               }
+#endif
+
+               if(strcmp(pszUser , pszFindUser) != 0)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_eap_passphrase failed on iteration %d, mismatch in username. Set = %s, Get = %s \\n", __LINE__, nLoopCount, pszUser, pszFindUser);
+                       ++nMismatchCount;
+                       continue;
+               }
+
+               if(pszFindUser != NULL)
+               {
+                       free(pszFindUser);
+                       pszFindUser = NULL;
+               }
+       }
+
+       if(pszFindUser != NULL)
+       {
+               free(pszFindUser);
+               pszFindUser = NULL;
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_eap_passphrase failed %d times, wifi_ap_get_eap_passphrase failed %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_eap_passphrase", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_eap_passphrase", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_eap_passphrase", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the encryption type of Wi-Fi
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_encryption_type_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check set and get the encryption type of Wi-Fi
+* @scenario                            creates the handle of access point\n
+*                                              set encryption type of Wi-Fi\n
+*                                              get encryption type of Wi-Fi\n
+*                                              compare get encryption type and set encryption type\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_encryption_type, wifi_ap_get_encryption_type
+* @passcase                            When wifi_ap_set_encryption_type, wifi_ap_get_encryption_type and supporting apis returns success
+* @failcase                            When wifi_ap_set_encryption_type or wifi_ap_get_encryption_type or supporting apis returns failure
+* @precondition                        Wi-Fi should be initialized and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_encryption_type_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       wifi_encryption_type_e eSetEncryptionType = WIFI_ENCRYPTION_TYPE_NONE;
+       wifi_encryption_type_e eFindEncryptionType = -1;
+
+       /*char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }*/
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLogAPI1, &pszWifiSpeedLogAPI2);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_set_encryption_type(g_pWifiAPHandle, eSetEncryptionType);
+               WifiExecutionDelay(pszWifiSpeedLogAPI1);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_encryption_type", nSetFailCount);
+
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_encryption_type(g_pWifiAPHandle, &eFindEncryptionType);
+               WifiExecutionDelay(pszWifiSpeedLogAPI2);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_encryption_type", nGetFailCount);
+
+               if(eFindEncryptionType != eSetEncryptionType)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_encryption_type failed on iteration %d, mismatch in encryption type \\n", __LINE__, nLoopCount);
+                       ++nMismatchCount;
+                       continue;
+               }
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_encryption_type failed %d times, wifi_ap_get_encryption_type failed %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_encryption_type", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_encryption_type", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_encryption_type", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the proxy type
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_proxy_type_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check set and get the proxy type
+* @scenario                            creates the handle of access point\n
+*                                              set proxy type\n
+*                                              get proxy type\n
+*                                              compare get proxy type and set proxy type\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_proxy_type, wifi_ap_get_proxy_type, wifi_ap_destroy, wifi_ap_create
+* @passcase                            When wifi_ap_set_proxy_type, wifi_ap_get_proxy_type and supporting apis returns success
+* @failcase                            When wifi_ap_set_proxy_type or wifi_ap_get_encryption_type or supporting apis returns failure
+* @precondition                        Wi-Fi should be initialized and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_proxy_type_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       wifi_proxy_type_e eSetProxyType[] = { WIFI_PROXY_TYPE_DIRECT, WIFI_PROXY_TYPE_AUTO, WIFI_PROXY_TYPE_MANUAL } ;
+       wifi_proxy_type_e eFindProxyType = -1;
+       wifi_ap_h pWifiAccessPointHandle = NULL;
+
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_create(szValue, &pWifiAccessPointHandle);
+       PRINT_RESULT(nRetVal , "wifi_ap_create");
+
+       int nEnumProxySize = sizeof(eSetProxyType) / sizeof(eSetProxyType[0]);
+       int nEnumProxyCounter = 0;
+
+
+#if MEMORY_CHECK
+       pszWifiMemLog =  calloc(MEMLOG * MAX_COUNT * nEnumProxySize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszWifiSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nEnumProxySize, sizeof(char));
+       pszWifiSpeedLogAPI2 =  calloc(TIMELOG * MAX_COUNT * nEnumProxySize, sizeof(char));
+#endif
+
+
+       for (nEnumProxyCounter = 0; nEnumProxyCounter < nEnumProxySize;  nEnumProxyCounter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       WifiGetMemAllocation();
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_set_proxy_type(pWifiAccessPointHandle, eSetProxyType[nEnumProxyCounter]);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI1);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_proxy_type", nSetFailCount);
+
+
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_get_proxy_type(pWifiAccessPointHandle, &eFindProxyType);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI2);
+                       WifiGetMemStatus(pszWifiMemLog);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_proxy_type", nGetFailCount);
+
+                       if(eFindProxyType != eSetProxyType[nEnumProxyCounter])
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_proxy_type failed for proxy type = %s                       mismatch in proxy type. Set proxy type = %s, Get proxy type                     = %s \\n", __LINE__, WiFiProxyType(eSetProxyType[nEnumProxyCounter]), WiFiProxyType(eSetProxyType[nEnumProxyCounter]), WiFiProxyType(eFindProxyType));
+                               ++nMismatchCount;
+                               continue;
+                       }
+               }
+       }
+
+       nRetVal = wifi_ap_destroy(pWifiAccessPointHandle);
+       if(nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed after loop, error returned = %s \\n", __LINE__,WifiGetError(nRetVal));
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_proxy_type failed %d times, wifi_ap_get_proxy_type failed %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT * nEnumProxySize);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_proxy_type", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_proxy_type", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_proxy_type", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the security mode of Wi-Fi
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_security_type_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check set and get the encryption type of Wi-Fi
+* @scenario                            creates the handle of access point\n
+*                                              set security mode of Wi-Fi\n
+*                                              get security mode of Wi-Fi\n
+*                                              compare get security mode and set security mode type\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_security_type, wifi_ap_get_security_type, wifi_ap_destroy, wifi_ap_create
+* @passcase                            When wifi_ap_set_security_type, wifi_ap_get_security_type and supporting apis returns success
+* @failcase                            When wifi_ap_set_security_type or wifi_ap_get_security_type or supporting apis returns failure
+* @precondition                        Wi-Fi should be initialized and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_security_type_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       wifi_security_type_e eSetSecurityType = WIFI_SECURITY_TYPE_WEP;
+       wifi_security_type_e eFindSecurityType = -1;
+       wifi_ap_h pWifiAccessPointHandle = NULL;
+
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_create(szValue, &pWifiAccessPointHandle);
+       PRINT_RESULT(nRetVal , "wifi_ap_create");
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLogAPI1, &pszWifiSpeedLogAPI2);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_set_security_type(pWifiAccessPointHandle, eSetSecurityType);
+               WifiExecutionDelay(pszWifiSpeedLogAPI1);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_security_type", nSetFailCount);
+
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_security_type(pWifiAccessPointHandle, &eFindSecurityType);
+               WifiExecutionDelay(pszWifiSpeedLogAPI2);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_security_type", nGetFailCount);
+
+               if(eFindSecurityType != eSetSecurityType)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_security_type failed on iteration %d, mismatch in encryption type \\n", __LINE__, nLoopCount);
+                       ++nMismatchCount;
+                       continue;
+               }
+       }
+
+       nRetVal = wifi_ap_destroy(pWifiAccessPointHandle);
+       if(nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed after loop, error returned = %s \\n", __LINE__,WifiGetError(nRetVal));
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_security_type failed %d times, wifi_ap_set_security_type failed %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_security_type", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_set_security_type", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_security_type", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the config type of IP
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_ip_config_type_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check set and get the encryption type of Wi-Fi
+* @scenario                            creates the handle of access point\n
+*                                              set config type of IP\n
+*                                              get config type of IP\n
+*                                              compare get config type and set config type\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_ip_config_type, wifi_ap_get_ip_config_type, wifi_ap_destroy, wifi_ap_create
+* @passcase                            When wifi_ap_set_ip_config_type, wifi_ap_get_ip_config_type and supporting apis returns success
+* @failcase                            When wifi_ap_set_ip_config_type or wifi_ap_get_ip_config_type or supporting apis returns failure
+* @precondition                        Wi-Fi should be initialized and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_ip_config_type_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       wifi_ap_h pWifiAccessPointHandle = NULL;
+       //wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4, WIFI_ADDRESS_FAMILY_IPV6}; // For future use when IPV6 will be supported
+       wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4 };
+       wifi_ip_config_type_e eSetIpConfigType[] = {    WIFI_IP_CONFIG_TYPE_NONE,
+                                                                                                       WIFI_IP_CONFIG_TYPE_STATIC,
+                                                                                                       WIFI_IP_CONFIG_TYPE_DYNAMIC,
+                                                                                                       WIFI_IP_CONFIG_TYPE_AUTO,
+                                                                                                       WIFI_IP_CONFIG_TYPE_FIXED };
+       wifi_ip_config_type_e eFindIpConfigType = -1 ;
+       int nEnumSize = sizeof(eSetIpConfigType) / sizeof(eSetIpConfigType[0]);
+       int nEnumFamilySize = sizeof(eAddressFamily) / sizeof(eAddressFamily[0]);
+       int nEnumCounter = 0, nEnumFamilyCounter = 0;
+
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_create(szValue, &pWifiAccessPointHandle);
+       PRINT_RESULT(nRetVal , "wifi_ap_create");
+
+#if MEMORY_CHECK
+       pszWifiMemLog =  calloc(MEMLOG * MAX_COUNT * nEnumSize * nEnumFamilySize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszWifiSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nEnumSize * nEnumFamilySize, sizeof(char));
+       pszWifiSpeedLogAPI2 =  calloc(TIMELOG * MAX_COUNT * nEnumSize * nEnumFamilySize, sizeof(char));
+#endif
+
+       for (nEnumFamilyCounter = 0; nEnumFamilyCounter < nEnumFamilySize;  nEnumFamilyCounter++)
+       {
+               for (nEnumCounter = 0; nEnumCounter < nEnumSize;  nEnumCounter++)
+               {
+                       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+                       {
+                               WifiGetMemAllocation();
+                               WifiGetTimeOfDay();
+                               nRetVal = wifi_ap_set_ip_config_type(pWifiAccessPointHandle, eAddressFamily[nEnumFamilyCounter] ,eSetIpConfigType[nEnumCounter]);
+                               WifiExecutionDelay(pszWifiSpeedLogAPI1);
+                               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_ip_config_type", nSetFailCount);
+
+                               WifiGetTimeOfDay();
+                               nRetVal = wifi_ap_get_ip_config_type(pWifiAccessPointHandle, eAddressFamily[nEnumFamilyCounter] ,&eFindIpConfigType);
+                               WifiExecutionDelay(pszWifiSpeedLogAPI2);
+                               WifiGetMemStatus(pszWifiMemLog);
+                               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_security_type", nGetFailCount);
+
+                               if(eFindIpConfigType != eSetIpConfigType[nEnumCounter])
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_security_type failed as set and get values are not same                     for Family type = %s. Set value = %s ,                  Get value = %s \\n", __LINE__,WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]),WiFiIPConfigType(eSetIpConfigType[nEnumCounter]),WiFiIPConfigType(eFindIpConfigType));
+                                       ++nMismatchCount;
+                                       continue;
+                               }
+                       }
+               }
+       }
+
+       nRetVal = wifi_ap_destroy(pWifiAccessPointHandle);
+       if(nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed after loop, error returned = %s \\n", __LINE__,WifiGetError(nRetVal));
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_ip_config_type failed %d times, wifi_ap_get_ip_config_type failed %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*nEnumFamilySize*nEnumSize);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_ip_config_type", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_ip_config_type", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_ip_config_type", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the IP address
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_ip_address_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check set and get the encryption type of Wi-Fi
+* @scenario                            creates the handle of access point\n
+*                                              set IP address\n
+*                                              get IP address\n
+*                                              compare get IP address and set IP address\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_ip_address, wifi_ap_get_ip_address, wifi_ap_destroy, wifi_ap_create
+* @passcase                            When wifi_ap_set_ip_address, wifi_ap_get_ip_address and supporting apis returns success
+* @failcase                            When wifi_ap_set_ip_address or wifi_ap_get_ip_address or supporting apis returns failure
+* @precondition                        Wi-Fi should be initialized and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_ip_address_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       wifi_ap_h pWifiAccessPointHandle = NULL;
+       //wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4, WIFI_ADDRESS_FAMILY_IPV6}; // For future use when IPV6 will be supported
+       wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4 };
+       char* pszSetIpAddress = "10.0.0.3";
+       char* pszFindIpAddress = NULL;
+
+       int nEnumFamilySize = sizeof(eAddressFamily) / sizeof(eAddressFamily[0]);
+       int nEnumFamilyCounter = 0;
+
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_create(szValue, &pWifiAccessPointHandle);
+       PRINT_RESULT(nRetVal , "wifi_ap_create");
+
+#if MEMORY_CHECK
+       pszWifiMemLog =  calloc(MEMLOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszWifiSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+       pszWifiSpeedLogAPI2 =  calloc(TIMELOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+#endif
+
+       for (nEnumFamilyCounter = 0; nEnumFamilyCounter < nEnumFamilySize;  nEnumFamilyCounter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       WifiGetMemAllocation();
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_set_ip_address(pWifiAccessPointHandle, eAddressFamily[nEnumFamilyCounter],pszSetIpAddress);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI1);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_ip_address", nSetFailCount);
+
+
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_get_ip_address(pWifiAccessPointHandle, eAddressFamily[nEnumFamilyCounter],&pszFindIpAddress);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI2);
+                       WifiGetMemStatus(pszWifiMemLog);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_ip_address", nGetFailCount);
+                       if (pszFindIpAddress == NULL)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_ip_address failed for Family type = %s,             error returned = Get IP is NULL \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]));
+                               ++nGetFailCount;
+                               continue;
+                       }
+
+                       if(eAddressFamily[nEnumFamilyCounter] == WIFI_ADDRESS_FAMILY_IPV6)
+                       {
+                               if((strcmp("0.0.0.0" , pszFindIpAddress) != 0)) //IP is set to 0.0.0.0 in case of IPV6 family as per documentation
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_ip_address failed for Family type = %s                      mismatch in ip address. Set IP = 0.0.0.0, Get IP = %s \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]), pszFindIpAddress);
+                                       ++nMismatchCount;
+                                       continue;
+                               }
+                       }
+                       else
+                       {
+                               if((strcmp(pszSetIpAddress , pszFindIpAddress) != 0))
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_ip_address failed for Family type = %s                      mismatch in ip address. Set IP = %s, Get IP = %s \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]), pszSetIpAddress, pszFindIpAddress);
+                                       ++nMismatchCount;
+                                       continue;
+                               }
+                       }
+
+                       if(pszFindIpAddress != NULL)
+                       {
+                               free(pszFindIpAddress);
+                               pszFindIpAddress = NULL;
+                       }
+               }
+       }
+
+       if(pszFindIpAddress != NULL) // In case last iteration continues and exist the loop without freeing the memory
+       {
+               free(pszFindIpAddress);
+               pszFindIpAddress = NULL;
+       }
+
+       nRetVal = wifi_ap_destroy(pWifiAccessPointHandle);
+       if(nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed after loop, error returned = %s \\n", __LINE__,WifiGetError(nRetVal));
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_ip_address failed %d times, wifi_ap_get_ip_address failed %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT*nEnumFamilySize);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_ip_address", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_ip_address", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_ip_address", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the gateway address
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_gateway_address_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check set and get the gateway address
+* @scenario                            creates the handle of access point\n
+*                                              set gateway address\n
+*                                              get gateway address\n
+*                                              compare get gateway address and set gateway address\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_gateway_address, wifi_ap_get_gateway_address, wifi_ap_destroy, wifi_ap_create
+* @passcase                            When wifi_ap_set_gateway_address, wifi_ap_get_gateway_address and supporting apis returns success
+* @failcase                            When wifi_ap_set_gateway_address or wifi_ap_get_gateway_address or supporting apis returns failure
+* @precondition                        Wi-Fi should be initialized and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_gateway_address_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       wifi_ap_h pWifiAccessPointHandle = NULL;
+       //wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4, WIFI_ADDRESS_FAMILY_IPV6}; // For future use when IPV6 will be supported
+       wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4 };
+       char* pszSetGateway = "10.0.0.1";
+       char* pszFindGateway = NULL;
+
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_create(szValue, &pWifiAccessPointHandle);
+       PRINT_RESULT(nRetVal , "wifi_ap_create");
+
+       int nEnumFamilySize = sizeof(eAddressFamily) / sizeof(eAddressFamily[0]);
+       int nEnumFamilyCounter = 0;
+
+
+#if MEMORY_CHECK
+       pszWifiMemLog =  calloc(MEMLOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszWifiSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+       pszWifiSpeedLogAPI2 =  calloc(TIMELOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+#endif
+
+       for (nEnumFamilyCounter = 0; nEnumFamilyCounter < nEnumFamilySize;  nEnumFamilyCounter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       WifiGetMemAllocation();
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_set_gateway_address(pWifiAccessPointHandle, eAddressFamily[nEnumFamilyCounter] ,pszSetGateway);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI1);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_gateway_address", nSetFailCount);
+
+
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_get_gateway_address(pWifiAccessPointHandle, eAddressFamily[nEnumFamilyCounter] ,&pszFindGateway);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI2);
+                       WifiGetMemStatus(pszWifiMemLog);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_gateway_address", nGetFailCount);
+
+                       if (pszFindGateway == NULL)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_gateway_address failed for Family type = %s,                error returned = Get Gateway is NULL \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]));
+                               ++nGetFailCount;
+                               continue;
+                       }
+
+                       if(eAddressFamily[nEnumFamilyCounter] == WIFI_ADDRESS_FAMILY_IPV6)
+                       {
+                               if((strcmp("0.0.0.0" , pszFindGateway) != 0)) //Gateway is set to 0.0.0.0 in case of IPV6 family as per documentation
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_gateway_address failed for Family type = %s                         mismatch in gateway. Set Gateway = 0.0.0.0, Get Gateway = %s \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]), pszFindGateway);
+                                       ++nMismatchCount;
+                                       continue;
+                               }
+                       }
+                       else
+                       {
+                               if((strcmp(pszSetGateway , pszFindGateway) != 0))
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_gateway_address failed for Family type = %s                         mismatch in gateway. Set Gateway = %s, Get Gateway = %s \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]), pszSetGateway, pszFindGateway);
+                                       ++nMismatchCount;
+                                       continue;
+                               }
+                       }
+
+                       if(pszFindGateway != NULL)
+                       {
+                               free(pszFindGateway);
+                               pszFindGateway = NULL;
+                       }
+               }
+       }
+
+       if(pszFindGateway != NULL)  // In case last iteration continues and exist the loop without freeing the memory
+       {
+               free(pszFindGateway);
+               pszFindGateway = NULL;
+       }
+
+       nRetVal = wifi_ap_destroy(pWifiAccessPointHandle);
+       if(nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed after loop, error returned = %s \\n", __LINE__,WifiGetError(nRetVal));
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_gateway_address failed %d times, wifi_ap_get_gateway_address failed %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT * nEnumFamilySize);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_gateway_address", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_gateway_address", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_gateway_address", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the subnet mask
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_subnet_mask_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check set and get the gateway address
+* @scenario                            creates the handle of access point\n
+*                                              set subnet mask\n
+*                                              get subnet mask\n
+*                                              compare get subnet mask and set subnet mask\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_subnet_mask, wifi_ap_get_subnet_mask, wifi_ap_destroy, wifi_ap_create
+* @passcase                            When wifi_ap_set_subnet_mask, wifi_ap_get_subnet_mask and supporting apis returns success
+* @failcase                            When wifi_ap_set_subnet_mask or wifi_ap_get_subnet_mask or supporting apis returns failure
+* @precondition                        Wi-Fi should be initialized and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_subnet_mask_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       wifi_ap_h pWifiAccessPointHandle = NULL;
+       //wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4, WIFI_ADDRESS_FAMILY_IPV6}; // For future use when IPV6 will be supported
+       wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4 };
+       char* pszSetSubnetMask = "255.255.225.0";
+       char* pszFindSubnetMask = NULL;
+
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_create(szValue, &pWifiAccessPointHandle);
+       PRINT_RESULT(nRetVal , "wifi_ap_create");
+
+       int nEnumFamilySize = sizeof(eAddressFamily) / sizeof(eAddressFamily[0]);
+       int nEnumFamilyCounter = 0;
+
+#if MEMORY_CHECK
+       pszWifiMemLog =  calloc(MEMLOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszWifiSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+       pszWifiSpeedLogAPI2 =  calloc(TIMELOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+#endif
+
+       for (nEnumFamilyCounter = 0; nEnumFamilyCounter < nEnumFamilySize;  nEnumFamilyCounter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       WifiGetMemAllocation();
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_set_subnet_mask(pWifiAccessPointHandle, eAddressFamily[nEnumFamilyCounter] ,pszSetSubnetMask);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI1);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_subnet_mask", nSetFailCount);
+
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_get_subnet_mask(pWifiAccessPointHandle, eAddressFamily[nEnumFamilyCounter] ,&pszFindSubnetMask);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI2);
+                       WifiGetMemStatus(pszWifiMemLog);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_subnet_mask", nGetFailCount);
+
+                       if (pszFindSubnetMask == NULL)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_subnet_mask failed for Family type = %s,            error returned = Get SubnetMask is NULL \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]));
+                               ++nGetFailCount;
+                               continue;
+                       }
+
+                       if(eAddressFamily[nEnumFamilyCounter] == WIFI_ADDRESS_FAMILY_IPV6)
+                       {
+                               if((strcmp("0.0.0.0" , pszFindSubnetMask) != 0)) //Subnet mask is set to 0.0.0.0 in case of IPV6 family as per documentation
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_subnet_mask failed for Family type = %s                     mismatch in ip address. Set SubnetMask = 0.0.0.0, Get SubnetMask = %s \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]), pszFindSubnetMask);
+                                       ++nMismatchCount;
+                                       continue;
+                               }
+                       }
+                       else
+                       {
+                               if((strcmp(pszSetSubnetMask , pszFindSubnetMask) != 0))
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_subnet_mask failed for Family type = %s                     mismatch in ip address. Set SubnetMask = %s, Get SubnetMask = %s \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]), pszSetSubnetMask, pszFindSubnetMask);
+                                       ++nMismatchCount;
+                                       continue;
+                               }
+                       }
+
+                       if(pszFindSubnetMask != NULL)
+                       {
+                               free(pszFindSubnetMask);
+                               pszFindSubnetMask = NULL;
+                       }
+               }
+       }
+
+       if(pszFindSubnetMask != NULL) // In case last iteration continues and exist the loop without freeing the memory
+       {
+               free(pszFindSubnetMask);
+               pszFindSubnetMask = NULL;
+       }
+
+       nRetVal = wifi_ap_destroy(pWifiAccessPointHandle);
+       if(nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed after loop, error returned = %s \\n", __LINE__,WifiGetError(nRetVal));
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_subnet_mask failed %d times, wifi_ap_get_subnet_mask failed %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT * nEnumFamilySize);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_subnet_mask", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_subnet_mask", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_subnet_mask", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check set and get the proxy address
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_get_proxy_address_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check set and get the gateway address
+* @scenario                            creates the handle of access point\n
+*                                              set proxy address\n
+*                                              get proxy address\n
+*                                              compare get proxy address and set proxy address\n
+*                                              destroys the handle of access point
+* @apicovered                  wifi_ap_set_proxy_address, wifi_ap_get_proxy_address, wifi_ap_destroy, wifi_ap_create
+* @passcase                            When wifi_ap_set_proxy_address, wifi_ap_get_proxy_address and supporting apis returns success
+* @failcase                            When wifi_ap_set_proxy_address or wifi_ap_get_proxy_address or supporting apis returns failure
+* @precondition                        Wi-Fi should be initialized and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_get_proxy_address_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLogAPI1 = NULL;
+       char *pszWifiSpeedLogAPI2 = NULL;
+       int nSetFailCount = 0, nGetFailCount = 0, nMismatchCount = 0;
+
+       wifi_ap_h pWifiAccessPointHandle = NULL;
+       //wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4, WIFI_ADDRESS_FAMILY_IPV6}; // For future use when IPV6 will be supported
+       wifi_address_family_e eAddressFamily[] = { WIFI_ADDRESS_FAMILY_IPV4 };
+       char* pszSetProxyAddress = "192.168.128.99:8080";
+       char* pszFindProxyAddress = NULL;
+
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_create(szValue, &pWifiAccessPointHandle);
+       PRINT_RESULT(nRetVal , "wifi_ap_create");
+
+       int nEnumFamilySize = sizeof(eAddressFamily) / sizeof(eAddressFamily[0]);
+       int nEnumFamilyCounter = 0;
+
+
+#if MEMORY_CHECK
+       pszWifiMemLog =  calloc(MEMLOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+#endif
+#if SPEED_CHECK
+       pszWifiSpeedLogAPI1 =  calloc(TIMELOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+       pszWifiSpeedLogAPI2 =  calloc(TIMELOG * MAX_COUNT * nEnumFamilySize, sizeof(char));
+#endif
+
+       for (nEnumFamilyCounter = 0; nEnumFamilyCounter < nEnumFamilySize;  nEnumFamilyCounter++)
+       {
+               for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+               {
+                       WifiGetMemAllocation();
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_set_proxy_address(pWifiAccessPointHandle, eAddressFamily[nEnumFamilyCounter] ,pszSetProxyAddress);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI1);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_proxy_address", nSetFailCount);
+
+
+                       WifiGetTimeOfDay();
+                       nRetVal = wifi_ap_get_proxy_address(pWifiAccessPointHandle, eAddressFamily[nEnumFamilyCounter] ,&pszFindProxyAddress);
+                       WifiExecutionDelay(pszWifiSpeedLogAPI2);
+                       WifiGetMemStatus(pszWifiMemLog);
+                       PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_proxy_address", nGetFailCount);
+
+                       if (pszFindProxyAddress == NULL)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_proxy_address failed for Family type = %s,          error returned = Get ProxyAddress is NULL \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]));
+                               ++nGetFailCount;
+                               continue;
+                       }
+
+                       if((strcmp(pszSetProxyAddress , pszFindProxyAddress) != 0))
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_proxy_address failed for Family type = %s                   mismatch in proxy address. Set proxy address = %s, Get proxy address = %s \\n", __LINE__, WiFiAddressFamilyType(eAddressFamily[nEnumFamilyCounter]), pszSetProxyAddress, pszFindProxyAddress);
+                               ++nMismatchCount;
+                               continue;
+                       }
+
+
+                       if(pszFindProxyAddress != NULL)
+                       {
+                               free(pszFindProxyAddress);
+                               pszFindProxyAddress = NULL;
+                       }
+               }
+       }
+
+       if(pszFindProxyAddress != NULL) // In case last iteration continues and exist the loop without freeing the memory
+       {
+               free(pszFindProxyAddress);
+               pszFindProxyAddress = NULL;
+       }
+
+       nRetVal = wifi_ap_destroy(pWifiAccessPointHandle);
+       if(nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed after loop, error returned = %s \\n", __LINE__,WifiGetError(nRetVal));
+       }
+
+       if(nSetFailCount || nGetFailCount || nMismatchCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_proxy_address failed %d times, wifi_ap_get_proxy_address failed %d times and value mismatched %d times out of %d times\\n", __LINE__,  nSetFailCount, nGetFailCount, nMismatchCount, MAX_COUNT * nEnumFamilySize);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_proxy_address", pszWifiSpeedLogAPI1);
+       PRINT_SPEED_LOG("wifi_ap_get_proxy_address", pszWifiSpeedLogAPI2);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_get_proxy_address", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLogAPI1, pszWifiSpeedLogAPI2);
+       return 0;
+}
+
+//& purpose: To check register and unregister the callback called for background scan
+//& type : auto
+/**
+* @testcase                    ITc_wifi_set_unset_background_scan_cb_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check register/unregister the callback called when the background scan is finished
+* @scenario                            register the callback called for background scan\n
+*                                              start scan\n
+*                                              check callback response\n
+*                                              unregister the callback called for background scan\n
+*                                              start scan\n
+*                                              check callback response
+* @apicovered                  wifi_set_background_scan_cb, wifi_unset_background_scan_cb, wifi_scan
+* @passcase                            When wifi_set_background_scan_cb, wifi_unset_background_scan_cb and supporting apis return success
+* @failcase                            When wifi_set_background_scan_cb or wifi_unset_background_scan_cb anf supporting apis return failure
+* @precondition                        wifi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_set_unset_background_scan_cb_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSetSpeedLog = NULL;
+       char *pszWifiUnsetSpeedLog = NULL;
+       int nWifiTimeoutId = -1;
+       int nSetFailCount = 0, nUnsetFailCount = 0, nCallbackSetFailCount = 0, nScanFailCount = 0;
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSetSpeedLog, &pszWifiUnsetSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_set_background_scan_cb(WifiBackgroundScanCallback , NULL);
+               WifiExecutionDelay(pszWifiSetSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_set_background_scan_cb", nSetFailCount);
+
+               g_bCheckCb = false;
+               nRetVal = wifi_scan(WifiScanRequestCallback, NULL);
+               RUN_POLLING_LOOP;
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (!g_bCheckCb)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                               nCallbackSetFailCount++;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, WifiGetError(nRetVal));
+                       nScanFailCount++;
+               }
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_unset_background_scan_cb();
+               WifiExecutionDelay(pszWifiUnsetSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_unset_background_scan_cb", nUnsetFailCount);
+               g_bCheckCb = false;
+               WifiGetMemStatus(pszWifiMemLog);
+       }
+
+       if(nSetFailCount || nUnsetFailCount || nCallbackSetFailCount || nScanFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_set_background_scan_cb failed %d times, wifi_unset_background_scan_cb failed %d times, Scan failed %d times, Callback failed %d times out of %d times\\n", __LINE__, nSetFailCount, nUnsetFailCount, nScanFailCount, nCallbackSetFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSetSpeedLog, pszWifiUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_set_background_scan_cb", pszWifiSetSpeedLog);
+       PRINT_SPEED_LOG("wifi_unset_background_scan_cb", pszWifiUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_set_unset_background_scan_cb", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSetSpeedLog, pszWifiUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: To check register and unregister the callback called for connection state
+//& type : auto
+/**
+* @testcase                    ITc_wifi_set_unset_connection_state_changed_cb_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check register/unregister the callback called when the connection state is changed
+* @scenario                            register callback called for connection state\n
+*                                              deactivate Wi-Fi\n
+*                                              check callback response\n
+*                                              unregister the callback called for connection state\n
+*                                              activate Wi-Fi\n
+*                                              check callback response
+* @apicovered                  wifi_deactivate, wifi_set_connection_state_changed_cb, wifi_unset_connection_state_changed_cb
+* @passcase                            When wifi_set_connection_state_changed_cb, wifi_unset_connection_state_changed_cb and supporting apis return success
+* @failcase                            When wifi_set_connection_state_changed_cb or wifi_unset_connection_state_changed_cb anf supporting apis return failure
+* @precondition                        wifi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_set_unset_connection_state_changed_cb_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSetSpeedLog = NULL;
+       char *pszWifiUnsetSpeedLog = NULL;
+       int nSetFailCount = 0, nUnsetFailCount = 0, nCallbackFailCount = 0, nDeactivateFailCount = 0;
+       int nWifiTimeoutId = -1;
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSetSpeedLog, &pszWifiUnsetSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_set_connection_state_changed_cb(WifiConnectionStateChangeCallback , NULL);
+               WifiExecutionDelay(pszWifiSetSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_set_background_scan_cb", nSetFailCount);
+
+               g_bCheckCb = false;
+               nRetVal = wifi_deactivate(WifiDeActivatedCallback , NULL);
+               RUN_POLLING_LOOP;
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (!g_bCheckCb)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                               nCallbackFailCount++;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, WifiGetError(nRetVal));
+                       nDeactivateFailCount++;
+               }
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_unset_connection_state_changed_cb();
+               WifiExecutionDelay(pszWifiUnsetSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               if(nRetVal != WIFI_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_unset_connection_state_changed_cb failed on iteration %d, error returned %s \\n", __LINE__, nLoopCount , WifiGetError(nRetVal));
+                       nUnsetFailCount++;
+               }
+       }
+
+       if(nSetFailCount || nUnsetFailCount || nCallbackFailCount || nDeactivateFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_set_connection_state_changed_cb failed %d times, wifi_unset_connection_state_changed_cb failed %d times, Callback did not invoke %d times, deactivate failed %d times out of %d times\\n", __LINE__, nSetFailCount, nUnsetFailCount, nCallbackFailCount, nDeactivateFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSetSpeedLog, pszWifiUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_set_connection_state_changed_cb", pszWifiSetSpeedLog);
+       PRINT_SPEED_LOG("wifi_unset_connection_state_changed_cb", pszWifiUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_set_unset_connection_state_changed_cb", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSetSpeedLog, pszWifiUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: To check register and unregister the callback called for device state
+//& type : auto
+/**
+* @testcase                    ITc_wifi_set_unset_device_state_changed_cb_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check register/unregister the callback called when the device state is changed
+* @scenario                            register the callback for device state\n
+*                                              deactivate Wi-Fi\n
+*                                              check callback response\n
+*                                              unregister the callback for device state\n
+*                                              activate Wi-Fi\n
+*                                              check callback response
+* @apicovered                  wifi_deactivate, wifi_set_device_state_changed_cb, wifi_unset_device_state_changed_cb
+* @passcase                            When wifi_set_device_state_changed_cb, wifi_unset_device_state_changed_cb and supporting apis return success
+* @failcase                            When wifi_set_device_state_changed_cb or wifi_unset_device_state_changed_cb anf supporting apis return failure
+* @precondition                        wifi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_set_unset_device_state_changed_cb_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSetSpeedLog = NULL;
+       char *pszWifiUnsetSpeedLog = NULL;
+       int nSetFailCount = 0, nUnsetFailCount = 0, nCallbackFailCount = 0, nDeactivateFailCount = 0;
+       int nWifiTimeoutId = -1;
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSetSpeedLog, &pszWifiUnsetSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_set_device_state_changed_cb(WifiDeviceStateChangeCallback , NULL);
+               WifiExecutionDelay(pszWifiSetSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_set_device_state_changed_cb", nSetFailCount);
+
+               g_bCheckCb = false;
+               nRetVal = wifi_deactivate(WifiDeActivatedCallback , NULL);
+               RUN_POLLING_LOOP;
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (!g_bCheckCb)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate failed on iteration %d, error returned = callback not invoked\\n", __LINE__, nLoopCount);
+                               nCallbackFailCount++;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, WifiGetError(nRetVal));
+                       nDeactivateFailCount++;
+               }
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_unset_device_state_changed_cb();
+               WifiExecutionDelay(pszWifiUnsetSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               if(nRetVal != WIFI_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_unset_device_state_changed_cb failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount , WifiGetError(nRetVal));
+                       nUnsetFailCount++;
+               }
+       }
+
+       if(nSetFailCount || nUnsetFailCount || nCallbackFailCount || nDeactivateFailCount)
+
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_set_device_state_changed_cb failed %d times, wifi_unset_device_state_changed_cb failed %d times,  Callback did not invoke %d times, deactivate failed %d times out of %d times\\n", __LINE__, nSetFailCount, nUnsetFailCount, nCallbackFailCount, nDeactivateFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSetSpeedLog, pszWifiUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_set_device_state_changed_cb", pszWifiSetSpeedLog);
+       PRINT_SPEED_LOG("wifi_unset_device_state_changed_cb", pszWifiUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_set_unset_device_state_changed_cb", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSetSpeedLog, pszWifiUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: connect and disconnect the access point asynchronously
+//& type : auto
+/**
+* @testcase                    ITc_wifi_connect_disconnect_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 connect and disconnect the access point asynchronously
+* @scenario                            connect and verify output\n
+*                                              disconnect and verify output
+* @apicovered                  wifi_ap_set_passphrase, wifi_connect, wifi_disconnect
+* @passcase                            When wifi_connect, wifi_disconnect return success
+* @failcase                            When wifi_connect or wifi_disconnect return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_connect_disconnect_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       char *pszWifiDisconnectSpeedLog = NULL;
+       int nWifiTimeoutId = -1;
+       int nConnectFailCount = 0, nDisconnectFailCount = 0;
+       char* pstrPassphrase = NULL;
+       pstrPassphrase = calloc(1024, sizeof(char));
+
+       //precondition
+       //Creates the access point handle.
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               free(pstrPassphrase);
+               pstrPassphrase = NULL;
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               free(pstrPassphrase);
+               pstrPassphrase = NULL;
+               return 1;
+       }
+
+       if(true == GetValueFromConfigFile("WIFI_ACCESSPOINTPIN", pstrPassphrase))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] WIFI_ACCESSPOINTPIN Values Received = %s \\n", __LINE__, pstrPassphrase);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               free(pstrPassphrase);
+               pstrPassphrase = NULL;
+               return 1;
+       }
+
+       nRetVal = wifi_ap_set_passphrase(g_pWifiAPHandle, pstrPassphrase);
+       PRINT_RESULT(nRetVal , "wifi_ap_set_passphrase");
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLog, &pszWifiDisconnectSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCheckCb = false;
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);//target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               RUN_POLLING_LOOP;
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (g_bCheckCb)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect was successful, connected callback invoked on iteration %d \\n", __LINE__, nLoopCount);
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect returned no error but connected callback not invoked on iteration %d \\n", __LINE__, nLoopCount);
+                               nConnectFailCount++;
+                               continue;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, WifiGetError(nRetVal));
+                       nConnectFailCount++;
+                       continue;
+               }
+
+               g_bCheckCb = false;
+               WifiGetTimeOfDay();
+               nRetVal = wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+               WifiExecutionDelay(pszWifiDisconnectSpeedLog);
+
+               RUN_POLLING_LOOP;
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (!g_bCheckCb)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                               nDisconnectFailCount++;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, WifiGetError(nRetVal));
+                       nDisconnectFailCount++;
+               }
+
+               WifiGetMemStatus(pszWifiMemLog);
+       }
+
+       if(pstrPassphrase != NULL)
+       {
+               free(pstrPassphrase);
+               pstrPassphrase = NULL;
+       }
+
+       if(nConnectFailCount || nDisconnectFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed %d times, wifi_disconnect failed %d times out of %d times\\n", __LINE__, nConnectFailCount, nDisconnectFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, pszWifiDisconnectSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_connect", pszWifiSpeedLog);
+       PRINT_SPEED_LOG("wifi_disconnect", pszWifiDisconnectSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_connect_disconnect", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, pszWifiDisconnectSpeedLog);
+       return 0;
+}
+
+//& purpose: Gets the handle of the connected access point
+//& type : auto
+/**
+* @testcase                    ITc_wifi_get_connected_ap_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets the handle of the connected access point
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              connect to the AP\n
+*                                              find connected state\n
+* @apicovered                  wifi_connect, wifi_ap_destroy, wifi_disconnect, wifi_get_connected_ap
+* @passcase                            When wifi_get_connected_ap return success
+* @failcase                            When wifi_get_connected_ap return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_get_connected_ap_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       wifi_ap_h pApHandle = NULL;
+       int nWifiTimeoutId = -1;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+               return 1;
+       }
+
+       if(!g_bCheckCb)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed , error returned = callback function not invoked\\n", __LINE__);
+               wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_get_connected_ap(&pApHandle); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_get_connected_ap", nWifiFailCount);
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+
+       }
+       else
+       {
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = callback function not invoked\\n", __LINE__);
+               }
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_get_connected_ap failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_get_connected_ap", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_get_connected_ap", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Gets the result of the scan
+//& type : auto
+/**
+* @testcase                    ITc_wifi_foreach_found_aps_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets the result of the scan
+* @scenario                            scan for access points\n
+*                                              check scan result
+* @apicovered                  wifi_foreach_found_aps, wifi_scan
+* @passcase                            When wifi_foreach_found_aps, wifi_ap_create return success
+* @failcase                            When wifi_foreach_found_aps or wifi_ap_create return failure
+* @precondition                        wifi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_foreach_found_aps_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiTimeoutId = -1;
+       int nScanFailCount = 0, nFailCount = 0;
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCheckCb = false;
+               nRetVal = wifi_scan(WifiScanRequestCallback, NULL);
+               RUN_POLLING_LOOP;
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (g_bCheckCb)
+                       {
+                               g_bForEachCb = false;
+                               WifiGetMemAllocation();
+                               WifiGetTimeOfDay();
+                               nRetVal = wifi_foreach_found_aps(WifiFoundAPCallback, NULL);//target api
+                               WifiExecutionDelay(pszWifiSpeedLog);
+                               WifiGetMemStatus(pszWifiMemLog);
+
+                               RUN_POLLING_LOOP;
+                               if (nRetVal != WIFI_ERROR_NONE)
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_foreach_found_aps failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, WifiGetError(nRetVal));
+                                       nFailCount++;
+                               }
+                               else
+                               {
+                                       if ( !g_bForEachCb )
+                                       {
+                                               FPRINTF("[Line : %d] [wifi_ITC] wifi_foreach_found_aps failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                                               nFailCount++;
+                                       }
+                               }
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                               nScanFailCount++;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+                       nScanFailCount++;
+                       continue;
+               }
+       }
+
+
+       if(nScanFailCount || nFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_foreach_found_aps failed %d times, wifi_scan failed %d times out of %d times\\n", __LINE__, nFailCount, nScanFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_foreach_found_aps", pszWifiSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_foreach_found_aps", pszWifiMemLog);
+#endif
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+
+       return 0;
+}
+
+//& purpose: Starts scan asynchronously
+//& type : auto
+/**
+* @testcase                    ITc_wifi_scan_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Starts scan asynchronously
+* @scenario                            scan for access points
+* @apicovered                  wifi_scan
+* @passcase                            When wifi_scan return success
+* @failcase                            When wifi_scan return failure
+* @precondition                        wifi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_scan_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       int nWifiTimeoutId = -1;
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCheckCb = false;
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_scan(WifiConnectedCallback, NULL); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+
+               RUN_POLLING_LOOP;
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (!g_bCheckCb)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                               nWifiFailCount++;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, WifiGetError(nRetVal));
+                       nWifiFailCount++;
+               }
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_scan", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_scan", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Creates the hidden access point handle
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_hidden_create_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Creates the hidden access point handle
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              create hidden\n
+*                                              destroy
+* @apicovered                  wifi_ap_hidden_create, wifi_ap_destroy
+* @passcase                            When wifi_ap_hidden_create return success
+* @failcase                            When wifi_ap_hidden_create return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_ap_hidden_create_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiCreateFailCount = 0, nDestroyFailCount = 0;
+       wifi_ap_h pAPHandle = NULL;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCheckCb = false;
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_hidden_create(szValue, &pAPHandle); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_hidden_create", nWifiCreateFailCount);
+
+               nRetVal = wifi_ap_destroy(pAPHandle);
+               if(nRetVal != WIFI_ERROR_NONE)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_destroy failed, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+                       ++nDestroyFailCount;
+               }
+               pAPHandle = NULL;
+       }
+
+       if(nWifiCreateFailCount || nDestroyFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_hidden_create failed %d times, wifi_ap_destroy failed %d times out of %d times\\n", __LINE__, nWifiCreateFailCount, nDestroyFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_hidden_create", pszWifiSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_hidden_create", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Indicates whether the access point is favorite or not
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_is_favorite_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Indicates whether the access point is favourite or not
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              check if AP is favorite
+* @apicovered                  wifi_ap_is_favorite
+* @passcase                            When wifi_ap_is_favorite return success
+* @failcase                            When wifi_ap_is_favorite return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_ap_is_favorite_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       bool bFavorite ;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCheckCb = false;
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_is_favorite(g_pWifiAPHandle,&bFavorite);//target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_is_favorite", nWifiFailCount);
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_is_favorite returns = %s\\n", __LINE__,bFavorite == true ? "favourite" : "Not favourite");
+#endif
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_is_favorite failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_is_favorite", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_is_favorite", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Indicates whether the access point requires passphrase or not
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_is_passphrase_required_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Indicates whether the access point is favourite or not
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              check if AP requires passphrase
+* @apicovered                  wifi_scan, wifi_foreach_found_aps, wifi_ap_is_passphrase_required
+* @passcase                            When wifi_ap_is_passphrase_required return success
+* @failcase                            When wifi_ap_is_passphrase_required return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_ap_is_passphrase_required_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       int nWifiTimeoutId = -1;
+       bool bRequired  ;
+
+       g_bCheckCb = false;
+       nRetVal = wifi_scan(WifiScanRequestCallback, NULL);
+       RUN_POLLING_LOOP;
+       if(nRetVal == WIFI_ERROR_NONE)
+       {
+               if (g_bCheckCb)
+               {
+                       g_bCheckCb = false;
+                       nRetVal = wifi_foreach_found_aps(WifiFoundAPCallback, NULL);//target api
+                       RUN_POLLING_LOOP;
+                       if (nRetVal != WIFI_ERROR_NONE)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_foreach_found_aps failed, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+                               return 1;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed, error returned = callback not invoked \\n", __LINE__);
+                       return 1;
+               }
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_scan failed, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+               return 1;
+       }
+
+       if (!g_pWifiAPHandle)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_clone failed \\n", __LINE__);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_is_passphrase_required(g_pWifiAPHandle,&bRequired);//target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_is_passphrase_required returns = %s\\n", __LINE__,bRequired == true ? "Required" : "Not required");
+#endif
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_is_passphrase_required", nWifiFailCount);
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_is_passphrase_required failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_is_passphrase_required", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_is_passphrase_required", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+// WPS TCs moved to manual testing
+//& purpose: Indicates whether the WPS(Wi-Fi Protected Setup) is supported or not
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_is_wps_supported_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Indicates whether the WPS(Wi-Fi Protected Setup) is supported or not
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              check if AP supports wps
+* @apicovered                  wifi_ap_is_wps_supported
+* @passcase                            When wifi_ap_is_wps_supported return success
+* @failcase                            When wifi_ap_is_wps_supported return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_ap_is_wps_supported_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       bool bSupported   ;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_is_wps_supported(g_pWifiAPHandle,&bSupported);//target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_is_wps_supported", nWifiFailCount);
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_is_wps_supported returns = %s\\n", __LINE__,bSupported == true ? "supported" : "Not supported");
+#endif
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_is_wps_supported failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_is_wps_supported", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_is_wps_supported", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Refresh the access point information
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_refresh_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Refresh the access point information
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              refresh AP
+* @apicovered                  wifi_ap_refresh
+* @passcase                            When wifi_ap_refresh return success
+* @failcase                            When wifi_ap_refresh return failure
+* @precondition                        wifi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_refresh_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_refresh(g_pWifiAPHandle);//target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_refresh", nWifiFailCount);
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_refresh failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_refresh", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_refresh", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Gets BSSID (Basic Service Set Identifier).
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_get_bssid_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets BSSID (Basic Service Set Identifier)
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              get bssid
+* @apicovered                  wifi_connect, wifi_disconnect, wifi_ap_get_bssid
+* @passcase                            When wifi_ap_get_bssid return success
+* @failcase                            When wifi_ap_get_bssid return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_ap_get_bssid_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       char *pszBssid  = NULL;
+       int nWifiTimeoutId = -1;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+               return 1;
+       }
+
+       if(!g_bCheckCb)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed , error returned = callback function not invoked\\n", __LINE__);
+               wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sleep(SLEEPTIME);
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_bssid(g_pWifiAPHandle, &pszBssid);  //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_bssid", nWifiFailCount);
+               if(pszBssid == NULL)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_bssid failed on iteration %d, error returned = BSSID returned is NULL\\n", __LINE__, nLoopCount);
+                       ++nWifiFailCount;
+                       continue;
+               }
+               free(pszBssid);
+               pszBssid = NULL;
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+       }
+       else
+       {
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = callback function not invoked\\n", __LINE__);
+               }
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_bssid failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_get_bssid", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_get_bssid", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Gets the connection state
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_get_connection_state_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets the connection state
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              get connection state
+* @apicovered                  wifi_connect, wifi_disconnect, wifi_ap_get_connection_state
+* @passcase                            When wifi_ap_get_connection_state return success
+* @failcase                            When wifi_ap_get_connection_state return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_ap_get_connection_state_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       int nWifiTimeoutId = -1;
+       wifi_connection_state_e  state;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+               return 1;
+       }
+
+       if(!g_bCheckCb)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed , error returned = callback function not invoked\\n", __LINE__);
+               wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sleep(SLEEPTIME);
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_connection_state(g_pWifiAPHandle, &state); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_connection_state", nWifiFailCount);
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       RUN_POLLING_LOOP;
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+       }
+       else
+       {
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop , error returned = callback function not invoked\\n", __LINE__);
+               }
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_connection_state failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_get_connection_state", pszWifiSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_get_connection_state", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Gets ESSID (Extended Service Set Identifier)
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_get_essid_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets ESSID (Extended Service Set Identifier)
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              get essid
+* @apicovered                  wifi_connect, wifi_disconnect, wifi_ap_get_essid
+* @passcase                            When wifi_ap_get_essid return success
+* @failcase                            When wifi_ap_get_essid return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_ap_get_essid_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       char *pszEssid  = NULL;
+       int nWifiTimeoutId = -1;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+               return 1;
+       }
+
+       if(!g_bCheckCb)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed , error returned = callback function not invoked\\n", __LINE__);
+               wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_essid(g_pWifiAPHandle, &pszEssid); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_essid", nWifiFailCount);
+               if(pszEssid == NULL)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_essid failed on iteration %d, error returned = ESSID returned is NULL\\n", __LINE__, nLoopCount);
+                       ++nWifiFailCount;
+                       continue;
+               }
+               free(pszEssid);
+               pszEssid = NULL;
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+       }
+       else
+       {
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = callback function not invoked\\n", __LINE__);
+               }
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_essid failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_get_essid", pszWifiSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_get_essid", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+
+       return 0;
+}
+
+//& purpose: Gets the frequency band (MHz)
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_get_frequency_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets the frequency band (MHz)
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              get frequency
+* @apicovered                  wifi_connect, wifi_ap_get_frequency, wifi_disconnect
+* @passcase                            When wifi_ap_get_frequency return success
+* @failcase                            When wifi_ap_get_frequency return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_ap_get_frequency_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       int nFrequency = 0;
+       int nWifiTimeoutId = -1;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+               return 1;
+       }
+
+       if(!g_bCheckCb)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed, error returned = callback function not invoked\\n", __LINE__);
+               wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sleep(SLEEPTIME);
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_frequency(g_pWifiAPHandle,&nFrequency); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_frequency", nWifiFailCount);
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+       }
+       else
+       {
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop , error returned = callback function not invoked\\n", __LINE__);
+               }
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_frequency failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_get_frequency", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_get_frequency", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Gets the max speed (Mbps)
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_get_max_speed_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets the max speed (Mbps)
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              connect to the AP
+* @apicovered                  wifi_connect, wifi_ap_get_max_speed, wifi_disconnect
+* @passcase                            When wifi_ap_get_max_speed return success
+* @failcase                            When wifi_ap_get_max_speed return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_ap_get_max_speed_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       int nMaxSpeed = 0;
+       int nWifiTimeoutId = -1;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+               return 1;
+       }
+
+       if(!g_bCheckCb)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed , error returned = callback function not invoked\\n", __LINE__);
+               wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sleep(SLEEPTIME);
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_max_speed(g_pWifiAPHandle,&nMaxSpeed); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_max_speed", nWifiFailCount);
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+       }
+       else
+       {
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = callback function not invoked\\n", __LINE__);
+               }
+       }
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_max_speed failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_get_max_speed", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_get_max_speed", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Gets the RSSI
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_get_rssi_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets the RSSI.
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              get the RSSI
+* @apicovered                  wifi_connect, wifi_ap_get_rssi, wifi_disconnect
+* @passcase                            When wifi_ap_get_rssi return success
+* @failcase                            When wifi_ap_get_rssi return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_ap_get_rssi_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       int nRssi = 0;
+       int nWifiTimeoutId = -1;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+               return 1;
+       }
+
+       if(!g_bCheckCb)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed, error returned = callback function not invoked\\n", __LINE__);
+               wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_get_rssi(g_pWifiAPHandle,&nRssi); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_get_rssi", nWifiFailCount);
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+       }
+       else
+       {
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop , error returned = callback function not invoked\\n", __LINE__);
+               }
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_get_rssi failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_get_rssi", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_get_rssi", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Gets the local MAC address
+//& type : auto
+/**
+* @testcase                    ITc_wifi_get_mac_address_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets the local MAC address
+* @scenario                            Gets the local MAC address
+* @apicovered                  wifi_get_mac_address
+* @passcase                            When wifi_get_mac_address return success
+* @failcase                            When wifi_get_mac_address return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_get_mac_address_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       char *pszMacAdd = NULL;
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_get_mac_address(&pszMacAdd); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_get_mac_address", nWifiFailCount);
+
+               if(pszMacAdd == NULL)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_get_mac_address failed on iteration %d, error returned = mac address returned is NULL\\n", __LINE__, nLoopCount);
+                       ++nWifiFailCount;
+                       continue;
+               }
+               free(pszMacAdd);
+               pszMacAdd = NULL;
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_get_mac_address failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_get_mac_address", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_get_mac_address", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose : Register and unregister callback called when the RSSI of connected Wi-Fi is changed
+//& type : auto
+/**
+* @testcase                    ITc_wifi_set_unset_rssi_level_changed_cb_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Registers callback called when the RSSI of connected Wi-Fi is changed
+* @scenario                            set the rssi level changed call back\n
+*                                              unset the rssi level changed call back
+* @apicovered                  wifi_set_rssi_level_changed_cb, wifi_unset_rssi_level_changed_cb
+* @passcase                            When wifi_set_rssi_level_changed_cb, wifi_unset_rssi_level_changed_cb return success and all supporting APIs pass
+* @failcase                            When wifi_set_rssi_level_changed_cb or wifi_unset_rssi_level_changed_cb return failure or any supporting APIs fail
+* @precondition                        wifi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_set_unset_rssi_level_changed_cb_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       char *pszWifiUnsetSpeedLog = NULL;
+       int nWifiSetFailCount = 0, nWifiUnsetFailCount = 0;
+       int nWifiTimeoutId = -1;
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLog, &pszWifiUnsetSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCheckCb = false;
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_set_rssi_level_changed_cb(WifiRssiLevelChangesCallback, NULL); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               RUN_POLLING_LOOP;
+
+               PRINT_RESULT_LOOP(nRetVal, "wifi_set_rssi_level_changed_cb", nWifiSetFailCount);
+
+               if(!g_bCheckCb)
+               {
+                       nWifiSetFailCount++;
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_set_rssi_level_changed_cb failed on iteration %d, error returned = callback function not invoked\\n", __LINE__, nLoopCount);
+                       wifi_unset_rssi_level_changed_cb();
+                       continue;
+               }
+
+               WifiGetTimeOfDay();
+               nRetVal = wifi_unset_rssi_level_changed_cb();
+               WifiExecutionDelay(pszWifiUnsetSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_unset_rssi_level_changed_cb", nWifiUnsetFailCount);
+               WifiGetMemStatus(pszWifiMemLog);
+       }
+
+       if(nWifiSetFailCount || nWifiUnsetFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_set_rssi_level_changed_cb failed %d timesand wifi_unset_rssi_level_changed_cb failed %d times out of %d times\\n", __LINE__, nWifiSetFailCount, nWifiUnsetFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, pszWifiUnsetSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_set_rssi_level_changed_cb", pszWifiSpeedLog);
+       PRINT_SPEED_LOG("wifi_unset_rssi_level_changed_cb", pszWifiUnsetSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_set_unset_rssi_level_changed_cb", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, pszWifiUnsetSpeedLog);
+       return 0;
+}
+
+//& purpose: Check whether access point is pass point or not
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_is_passpoint_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Check whether access point is pass point or not
+* @scenario                            call API to check whether wifi is activated
+* @apicovered                  wifi_connect, wifi_ap_is_passpoint, wifi_disconnect
+* @passcase                            When wifi_ap_is_passpoint return success
+* @failcase                            When wifi_ap_is_passpoint return failure
+* @precondition                        wifi should be initialized and activated
+* @postcondition               none
+*/
+int ITc_wifi_ap_is_passpoint_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       bool bIsPasspoint = false;
+       int nWifiTimeoutId = -1;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_connect(g_pWifiAPHandle, WifiConnectedCallback, NULL);
+       RUN_POLLING_LOOP;
+
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+               return 1;
+       }
+
+       if(!g_bCheckCb)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed , error returned = callback function not invoked\\n", __LINE__);
+               wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog , &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sleep(SLEEPTIME);
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_is_passpoint(g_pWifiAPHandle, &bIsPasspoint);
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_is_passpoint", nWifiFailCount);
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_is_passpoint returned = %s on loop count %d \\n", __LINE__, bIsPasspoint == true ? "true" : "false", nLoopCount);
+#endif
+       }
+
+       g_bCheckCb = false;
+       nRetVal = wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop, error returned = %s\\n", __LINE__, WifiGetError(nRetVal));
+       }
+       else
+       {
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed after loop , error returned = callback function not invoked\\n", __LINE__);
+               }
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_is_passpoint failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog , NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_is_passpoint", pszWifiSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_is_passpoint", pszWifiMemLog);
+#endif
+       WifiFreeMemory(pszWifiMemLog , pszWifiSpeedLog , NULL);
+       return 0;
+}
+
+//& purpose: To activate and deactivate Wi-Fi asynchronously and displays Wi-Fi picker (popup) when Wi-Fi is not automatically connected
+//& type : auto
+/**
+* @testcase                    ITc_wifi_activate_with_wifi_picker_tested_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 To check initialization/de-initialization of wifi
+* @scenario                            deactivate Wi-Fi and verify output\n
+*                                              activate Wi-Fi and verify output\n
+*                                              deactivate Wi-Fi and verify output\n
+*                                              activate Wi-Fi and verify output
+* @apicovered                  wifi_is_activated, wifi_deactivate, wifi_activate, wifi_activate_with_wifi_picker_tested
+* @passcase                            When wifi_activate_with_wifi_picker_tested, wifi_deactivate return success
+* @failcase                            When wifi_activate_with_wifi_picker_tested or wifi_deactivate return failure
+* @precondition                        wifi should be initialised and activated
+* @postcondition               none
+*/
+int ITc_wifi_activate_with_wifi_picker_tested_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiActivateSpeedLog = NULL;
+       int nWifiActivateFailCount = 0, nWifiDeactivateFailCount = 0;
+       int nWifiTimeoutId = -1;
+       bool bIsActive = false;
+
+       /** As we have already activated in startup and here target is activated, so deactivating first*/
+       nRetVal = wifi_is_activated(&bIsActive);
+       if(nRetVal == WIFI_ERROR_NONE)
+       {
+               if (bIsActive == true)
+               {
+                       g_bCheckCb = false;
+                       nRetVal = wifi_deactivate(WifiDeActivatedCallback , NULL);
+                       RUN_POLLING_LOOP;
+                       if (g_bCheckCb)
+                       {
+       #if DEBUG
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate passed \\n", __LINE__);
+       #endif
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate failed, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+                               return 1;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi is already deactivated \\n", __LINE__);
+               }
+       }
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiActivateSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCheckCb = false;
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_activate_with_wifi_picker_tested(WifiActivatedCallback , NULL);
+               WifiExecutionDelay(pszWifiActivateSpeedLog);
+               RUN_POLLING_LOOP;
+
+               PRINT_RESULT_LOOP(nRetVal, "wifi_activate_with_wifi_picker_tested", nWifiActivateFailCount);
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_activate_with_wifi_picker_tested failed on iteration %d, error returned = callback function not invoked\\n", __LINE__, nLoopCount);
+                       ++nWifiActivateFailCount;
+                       wifi_deactivate(WifiDeActivatedCallback , NULL);
+                       continue;
+               }
+
+               g_bCheckCb = false;
+               nRetVal = wifi_deactivate(WifiDeActivatedCallback , NULL);
+               RUN_POLLING_LOOP;
+               PRINT_RESULT_LOOP(nRetVal, "wifi_deactivate", nWifiDeactivateFailCount);
+               if(!g_bCheckCb)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_deactivate failed on iteration %d, error returned = callback function not invoked\\n", __LINE__, nLoopCount);
+                       ++nWifiDeactivateFailCount;
+                       continue;
+               }
+               WifiGetMemStatus(pszWifiMemLog);
+       }
+
+       /** As deactivation takes place in cleanup, which is common for all test cases activate wifi again
+       but will not consider its result to determine pass or failure */
+
+       nRetVal = wifi_is_activated(&bIsActive);
+       if(nRetVal == WIFI_ERROR_NONE)
+       {
+               if (bIsActive == false)
+               {
+                       g_bCheckCb = false;
+                       nRetVal = wifi_activate(WifiActivatedCallback , NULL);
+                       RUN_POLLING_LOOP;
+
+                       if(nRetVal == WIFI_ERROR_NONE)
+                       {
+                               if (!g_bCheckCb)
+                               {
+                                       FPRINTF("[Line : %d] [wifi_ITC] wifi_activate failed after loop, error returned = callback function not invoked\\n", __LINE__);
+                               }
+                       }
+                       else
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_activate failed after loop, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+                       }
+               }
+       }
+
+       if(nWifiActivateFailCount || nWifiDeactivateFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_activate_with_wifi_picker_tested failed %d times and wifi_deactivate failed %d times out of %d times\\n", __LINE__, nWifiActivateFailCount, nWifiDeactivateFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiActivateSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_activate_with_wifi_picker_tested", pszWifiActivateSpeedLog);
+#endif
+
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_activate_with_wifi_picker_tested", pszWifiMemLog);
+#endif
+       WifiFreeMemory(pszWifiMemLog, pszWifiActivateSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: Deletes the information of stored access point and disconnects it when it connected
+//& type : auto
+/**
+* @testcase                    ITc_wifi_forget_ap_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Deletes the information of stored access point and disconnects it when it connected\n
+*                                              If an AP is connected, then connection information will be stored\n
+*                                              This information is used when a connection to that AP is established automatically
+* @scenario                            scan AP list\n
+*                                              from scanned list get handle of concerned AP\n
+*                                              forget AP
+* @apicovered                  wifi_forget_ap
+* @passcase                            When wifi_forget_ap return success
+* @failcase                            When wifi_forget_ap return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_forget_ap_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               sleep(SLEEPTIME);
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_forget_ap(g_pWifiAPHandle); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_forget_ap", nWifiFailCount);
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_forget_ap failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_forget_ap", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_forget_ap", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose:Sets the passphrase
+//& type : auto
+/**
+* @testcase                    ITc_wifi_ap_set_passphrase_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Sets the passphrase
+* @scenario                            create AP\n
+*                                              sets passphrase\n
+*                                              destroy AP
+* @apicovered                  wifi_ap_is_passphrase_required, wifi_ap_set_passphrase
+* @passcase                            When wifi_ap_set_passphrase return success
+* @failcase                            When wifi_ap_set_passphrase return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_ap_set_passphrase_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       char *pszPassphrase  =  NULL;
+       pszPassphrase = calloc(1024, sizeof(char));
+       if ( pszPassphrase == NULL )
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] calloc failed, pass phrase is null\\n", __LINE__);
+               return 1;
+       }
+       //precondition
+       //Creates the access point handle.
+       char szValue[CONFIG_VALUE_LEN_MAX] = {0,};
+       if(true == GetValueFromConfigFile("WIFI_WPSACCESSPOINTNAME", szValue))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] WIFI_WPSACCESSPOINTNAME Values Received = %s \\n", __LINE__, szValue);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               free(pszPassphrase);
+               pszPassphrase = NULL;
+               return 1;
+       }
+
+       if(true == GetValueFromConfigFile("WIFI_ACCESSPOINTPIN", pszPassphrase))
+       {
+#if DEBUG
+               FPRINTF("[Line : %d] [wifi_ITC] WIFI_ACCESSPOINTPIN Values Received = %s \\n", __LINE__, pszPassphrase);
+#endif
+       }
+       else
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] GetValueFromConfigFile returned error \\n", __LINE__);
+               free(pszPassphrase);
+               pszPassphrase = NULL;
+               return 1;
+       }
+
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               free(pszPassphrase);
+               pszPassphrase = NULL;
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               free(pszPassphrase);
+               pszPassphrase = NULL;
+               return 1;
+       }
+
+       bool b_isPassphraseRequired = false;
+       wifi_ap_is_passphrase_required(g_pWifiAPHandle , &b_isPassphraseRequired);
+       if(!b_isPassphraseRequired)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_is_passphrase_required returned false \\n", __LINE__);
+               free(pszPassphrase);
+               pszPassphrase = NULL;
+               return 1;
+       }
+
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_ap_set_passphrase(g_pWifiAPHandle, pszPassphrase); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_ap_set_passphrase", nWifiFailCount);
+       }
+
+       if(pszPassphrase != NULL){
+               free(pszPassphrase);
+               pszPassphrase = NULL;
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_set_passphrase failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_ap_set_passphrase", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_ap_set_passphrase", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: connect and disconnect the access point with WPS PBC asynchronously.
+//& type : auto
+/**
+ * @testcase                           ITc_wifi_connect_by_wps_pbc_disconnect_p
+ * @type                                       auto
+ * @description                                connect and disconnect the access point with WPS PBC asynchronously.
+ * @scenario                           scan ap list
+ *                                                     from scanned list get handle of concerned AP
+ *                                                     connect to the AP
+ *                                                     disconnect
+ * @apicovered                         wifi_connect_by_wps_pbc, wifi_disconnect
+ * @passcase                           When wifi_connect_by_wps_pbc, wifi_disconnect return success
+ * @failcase                           When wifi_connect_by_wps_pbc or wifi_disconnect return failure
+ * @precondition                       wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME. AP must be WPS supported
+ * @postcondition                      NA
+ *
+ */
+/*int ITc_wifi_connect_by_wps_pin_disconnet_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       char *pszWifiDisconnectSpeedLog = NULL;
+       int nWifiTimeoutId = -1;
+       int nConnectFailCount = 0, nDisconnectFailCount = 0;
+       bool bIsSupported = false;
+
+       //precondition
+       //Creates the access point handle.
+       if(!WifiPreConnectCondition())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_is_wps_supported(g_pWifiAPHandle, &bIsSupported);
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_is_wps_supported failed , error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+               return 1;
+       }
+
+       if (!bIsSupported)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point mentioned does not support wps \\n", __LINE__);
+               return 1;
+       }
+
+       nRetVal = wifi_ap_refresh(g_pWifiAPHandle);
+       if (nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_ap_refresh failed , error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+               return 1;
+       }
+
+       char *szValue = "1234567";
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLog, &pszWifiDisconnectSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCheckCb = false;
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_connect_by_wps_pin(g_pWifiAPHandle, szValue, WifiConnectedCallback, NULL);//target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_connect_by_wps_pin", nConnectFailCount);
+
+               RUN_POLLING_LOOP;
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (!g_bCheckCb)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                               nConnectFailCount++;
+                               continue;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, WifiGetError(nRetVal));
+                       nConnectFailCount++;
+                       continue;
+               }
+
+               g_bCheckCb = false;
+               WifiGetTimeOfDay();
+               nRetVal = wifi_disconnect(g_pWifiAPHandle, WiFiDisconnectCallabck, NULL);
+               WifiExecutionDelay(pszWifiDisconnectSpeedLog);
+
+               RUN_POLLING_LOOP;
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (!g_bCheckCb)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                               nDisconnectFailCount++;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, WifiGetError(nRetVal));
+                       nDisconnectFailCount++;
+               }
+
+               WifiGetMemStatus(pszWifiMemLog);
+       }
+
+       if(nConnectFailCount || nDisconnectFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect_by_wps_pin failed %d times, wifi_disconnect failed %d times out of %d times\\n", __LINE__, nConnectFailCount, nDisconnectFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, pszWifiDisconnectSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_connect_by_wps_pin", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_connect_by_wps_pin", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}*/
+
+//& purpose: Gets the name of the network interface
+//& type : auto
+/**
+* @testcase                    ITc_wifi_get_network_interface_name_p
+* @type                                auto
+* @since_tizen                 2.3
+* @description                 Gets the name of the network interface
+* @scenario                            Gets the name of network interface
+* @apicovered                  wifi_get_network_interface_name
+* @passcase                            When wifi_get_network_interface_name return success
+* @failcase                            When wifi_get_network_interface_name return failure
+* @precondition                        wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME
+* @postcondition               none
+*/
+int ITc_wifi_get_network_interface_name_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       int nWifiFailCount = 0;
+       char* pszName ;
+
+       sleep(2);
+       WifiAllocateMemory(&pszWifiMemLog, &pszWifiSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_get_network_interface_name(&pszName); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+               WifiGetMemStatus(pszWifiMemLog);
+               PRINT_RESULT_LOOP(nRetVal, "wifi_get_network_interface_name", nWifiFailCount);
+
+               if(pszName == NULL)
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_get_network_interface_name failed on iteration %d, error returned = interface name returned is NULL\\n", __LINE__, nLoopCount);
+                       ++nWifiFailCount;
+                       continue;
+               }
+               free(pszName);
+               pszName = NULL;
+       }
+
+       if(nWifiFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_get_network_interface_name failed %d times out of %d times\\n", __LINE__, nWifiFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_get_network_interface_name", pszWifiSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_get_network_interface_name", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, NULL);
+       return 0;
+}
+
+//& purpose: connect and disconnect the access point asynchronously.
+//& type : auto
+/**
+ * @testcase                           ITc_wifi_connect_disconnect_p
+ * @type                                       auto
+ * @description                                connect and disconnect the access point asynchronously.
+ * @scenario                           Connect and verify output
+ *                                                     Disconnect and verify output
+ * @apicovered                         wifi_connect, wifi_disconnect
+ * @passcase                           When wifi_connect, wifi_disconnect return success
+ * @failcase                           When wifi_connect or wifi_disconnect return failure
+ * @precondition                       wifi should be initialised and activated, access point name of AP should be updated in the header file with macro ACCESSPOINTNAME.
+ * @postcondition                      NA
+ *
+ */
+/*int ITc_wifi_connect_by_wps_pbc_disconnect_p(void)
+{
+       START_TEST;
+       int nLoopCount = 0 , nRetVal = -1;
+       char *pszWifiMemLog = NULL;
+       char *pszWifiSpeedLog = NULL;
+       char *pszWifiDisconnectSpeedLog = NULL;
+       int nWifiTimeoutId = -1;
+       int nConnectFailCount = 0, nDisconnectFailCount = 0;
+
+       //precondition
+       //Creates the access point handle.
+       if(!WifiPreConnectConditionForWPSPublic())
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] WifiPreConnectCondition failed \\n", __LINE__);
+               return 1;
+       }
+
+       if(g_pWpsPublicWifiAPHandle == NULL)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] Access Point is not found in scanned list \\n", __LINE__);
+               return 1;
+       }
+
+       WifiAllocateMemory2(&pszWifiMemLog, &pszWifiSpeedLog, &pszWifiDisconnectSpeedLog);
+
+       for (nLoopCount = 0; nLoopCount < MAX_COUNT; nLoopCount++)
+       {
+               g_bCheckCb = false;
+               WifiGetMemAllocation();
+               WifiGetTimeOfDay();
+               nRetVal = wifi_connect_by_wps_pbc(g_pWpsPublicWifiAPHandle, WifiConnectedCallback, NULL); //target api
+               WifiExecutionDelay(pszWifiSpeedLog);
+
+               RUN_POLLING_LOOP;
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (!g_bCheckCb)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                               nConnectFailCount++;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_connect failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, WifiGetError(nRetVal));
+                       nConnectFailCount++;
+               }
+
+               g_bCheckCb = false;
+               WifiGetTimeOfDay();
+               nRetVal = wifi_disconnect(g_pWpsPublicWifiAPHandle, WiFiDisconnectCallabck, NULL);
+               WifiExecutionDelay(pszWifiDisconnectSpeedLog);
+
+               RUN_POLLING_LOOP;
+               if(nRetVal == WIFI_ERROR_NONE)
+               {
+                       if (!g_bCheckCb)
+                       {
+                               FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed on iteration %d, error returned = callback not invoked \\n", __LINE__, nLoopCount);
+                               nDisconnectFailCount++;
+                       }
+               }
+               else
+               {
+                       FPRINTF("[Line : %d] [wifi_ITC] wifi_disconnect failed on iteration %d, error returned = %s \\n", __LINE__, nLoopCount, WifiGetError(nRetVal));
+                       nDisconnectFailCount++;
+               }
+
+               WifiGetMemStatus(pszWifiMemLog);
+       }
+
+
+       // To forget open wps connection
+       nRetVal = wifi_forget_ap(g_pWpsPublicWifiAPHandle);
+       if(nRetVal != WIFI_ERROR_NONE)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_forget_ap failed on postcondition, error returned = %s \\n", __LINE__, WifiGetError(nRetVal));
+       }
+
+       if(nConnectFailCount || nDisconnectFailCount)
+       {
+               FPRINTF("[Line : %d] [wifi_ITC] wifi_connect_by_wps_pbc failed %d times, wifi_disconnect failed %d times out of %d times\\n", __LINE__, nConnectFailCount, nDisconnectFailCount, MAX_COUNT);
+               WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, pszWifiDisconnectSpeedLog);
+               return 1;
+       }
+
+#if SPEED_CHECK
+       PRINT_SPEED_LOG("wifi_connect_by_wps_pbc", pszWifiSpeedLog);
+       PRINT_SPEED_LOG("wifi_disconnect", pszWifiDisconnectSpeedLog);
+#endif
+#if MEMORY_CHECK
+       PRINT_MEMORY_LOG("wifi_connect_by_wps_pbc_disconnect", pszWifiMemLog);
+#endif
+
+       WifiFreeMemory(pszWifiMemLog, pszWifiSpeedLog, pszWifiDisconnectSpeedLog);
+       return 0;
+}*/
+
+/** @}*/ 
+/** @}*/ 
diff --git a/src/itc/wifi/cert.crt b/src/itc/wifi/cert.crt
new file mode 100755 (executable)
index 0000000..ea93fc2
--- /dev/null
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDTjCCAregAwIBAgIEIEZ8hjANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwI5
+MTELMAkGA1UECBMCVVAxDjAMBgNVBAcTBU5vaWRhMQwwCgYDVQQKEwNTUkkxDDAK
+BgNVBAsTA1NSSTEMMAoGA1UEAxMDU1JJMSUwIwYJKoZIhvcNAQkBFhZyYWtlc2gu
+c25yQHNhbXN1bmcuY29tMB4XDTEzMDIyNzA1NTgzMFoXDTE1MDIyNzA1NTgzMFow
+ezELMAkGA1UEBhMCOTExCzAJBgNVBAgTAlVQMQ4wDAYDVQQHEwVOb2lkYTEMMAoG
+A1UEChMDU1JJMQwwCgYDVQQLEwNTUkkxDDAKBgNVBAMTA1NSSTElMCMGCSqGSIb3
+DQEJARYWcmFrZXNoLnNuckBzYW1zdW5nLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOB
+jQAwgYkCgYEAxH8AY+Y2almTUo3qdc6XNzmKt3ibGxy1U10rBVd3KFMsWq7S5cr8
+HW4LKMcsxdq/pqYw4BIYrWb+AEQTaVL2M9WXbg14vcor+z+uOJrgJMpxRfFeELT2
+jk0axAnCDzye+yTePJ27QWS/VCmHO5f1uoVn10VbnHQejF7YXvCsa3kCAwEAAaOB
+3jCB2zAdBgNVHQ4EFgQUOFhUMpM2c6OZ9gD3jdNJpQWiLCAwgagGA1UdIwSBoDCB
+nYAUOFhUMpM2c6OZ9gD3jdNJpQWiLCChf6R9MHsxCzAJBgNVBAYTAjkxMQswCQYD
+VQQIEwJVUDEOMAwGA1UEBxMFTm9pZGExDDAKBgNVBAoTA1NSSTEMMAoGA1UECxMD
+U1JJMQwwCgYDVQQDEwNTUkkxJTAjBgkqhkiG9w0BCQEWFnJha2VzaC5zbnJAc2Ft
+c3VuZy5jb22CBCBGfIYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOB
+gQBoyxIlYEdPRqL5B4sT2tGr2/uk3cZwX8P8xw4qh2EY6I2UzIRK+ZECJjTo9mss
+u+xQerTwItwIbpNZgvmFjURsmLTwyFAB5ZqW8PpZ6j+o75JkohSBgrlD3+CXUztw
+XXDul9uGkjWrFlfO38zI2St7J6YtChQZLsBfPOzecpvPdg==
+-----END CERTIFICATE-----
diff --git a/src/itc/wifi/tct-wifi-native.c b/src/itc/wifi/tct-wifi-native.c
new file mode 100755 (executable)
index 0000000..4fd9597
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-wifi-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/src/itc/wifi/tct-wifi-native.h b/src/itc/wifi/tct-wifi-native.h
new file mode 100755 (executable)
index 0000000..968e5b1
--- /dev/null
@@ -0,0 +1,121 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_WIFI_NATIVE_H__
+#define __TCT_WIFI_NATIVE_H__
+
+#include "testcase.h"
+
+extern void ITs_wifi_startup(void);
+extern void ITs_wifi_cleanup(void);
+
+extern int ITc_wifi_initialize_deinitialize_p(void);
+extern int ITc_wifi_activate_deactivate_p(void);
+extern int ITc_wifi_is_activated_p(void);
+extern int ITc_wifi_ap_create_destroy_p(void);
+extern int ITc_wifi_ap_clone_destroy_p(void);
+extern int ITc_wifi_get_connection_state_p(void);
+extern int ITc_wifi_ap_set_get_dns_address_p(void);
+extern int ITc_wifi_ap_set_get_eap_auth_type_p(void);
+extern int ITc_wifi_ap_set_get_eap_type_p(void);
+extern int ITc_wifi_ap_set_get_eap_ca_cert_file_p(void);
+extern int ITc_wifi_ap_set_get_eap_client_cert_file_p(void);
+extern int ITc_wifi_ap_set_get_eap_private_key_info_file_p(void);
+extern int ITc_wifi_ap_set_get_eap_passphrase_p(void);
+extern int ITc_wifi_ap_set_get_encryption_type_p(void);
+extern int ITc_wifi_ap_set_get_proxy_type_p(void);
+extern int ITc_wifi_ap_set_get_security_type_p(void);
+extern int ITc_wifi_ap_set_get_ip_config_type_p(void);
+extern int ITc_wifi_ap_set_get_ip_address_p(void);
+extern int ITc_wifi_ap_set_get_gateway_address_p(void);
+extern int ITc_wifi_ap_set_get_subnet_mask_p(void);
+extern int ITc_wifi_ap_set_get_proxy_address_p(void);
+extern int ITc_wifi_set_unset_background_scan_cb_p(void);
+extern int ITc_wifi_set_unset_connection_state_changed_cb_p(void);
+extern int ITc_wifi_set_unset_device_state_changed_cb_p(void);
+extern int ITc_wifi_connect_disconnect_p(void);
+extern int ITc_wifi_get_connected_ap_p(void);
+extern int ITc_wifi_foreach_found_aps_p(void);
+extern int ITc_wifi_scan_p(void);
+extern int ITc_wifi_ap_hidden_create_p(void);
+extern int ITc_wifi_ap_is_favorite_p(void);
+extern int ITc_wifi_ap_is_passphrase_required_p(void);
+extern int ITc_wifi_ap_is_wps_supported_p(void);
+extern int ITc_wifi_ap_refresh_p(void);
+extern int ITc_wifi_ap_get_bssid_p(void);
+extern int ITc_wifi_ap_get_connection_state_p(void);
+extern int ITc_wifi_ap_get_essid_p(void);
+extern int ITc_wifi_ap_get_frequency_p(void);
+extern int ITc_wifi_ap_get_max_speed_p(void);
+extern int ITc_wifi_ap_get_rssi_p(void);
+extern int ITc_wifi_get_mac_address_p(void);
+extern int ITc_wifi_set_unset_rssi_level_changed_cb_p(void);
+extern int ITc_wifi_ap_is_passpoint_p(void);
+extern int ITc_wifi_activate_with_wifi_picker_tested_p(void);
+extern int ITc_wifi_forget_ap_p(void);
+extern int ITc_wifi_ap_set_passphrase_p(void);
+extern int ITc_wifi_get_network_interface_name_p(void);
+
+testcase tc_array[] = {
+    {"ITc_wifi_initialize_deinitialize_p", ITc_wifi_initialize_deinitialize_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_activate_deactivate_p", ITc_wifi_activate_deactivate_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_is_activated_p", ITc_wifi_is_activated_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_create_destroy_p", ITc_wifi_ap_create_destroy_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_clone_destroy_p", ITc_wifi_ap_clone_destroy_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_get_connection_state_p", ITc_wifi_get_connection_state_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_dns_address_p", ITc_wifi_ap_set_get_dns_address_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_eap_auth_type_p", ITc_wifi_ap_set_get_eap_auth_type_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_eap_type_p", ITc_wifi_ap_set_get_eap_type_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_eap_ca_cert_file_p", ITc_wifi_ap_set_get_eap_ca_cert_file_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_eap_client_cert_file_p", ITc_wifi_ap_set_get_eap_client_cert_file_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_eap_private_key_info_file_p", ITc_wifi_ap_set_get_eap_private_key_info_file_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_eap_passphrase_p", ITc_wifi_ap_set_get_eap_passphrase_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_encryption_type_p", ITc_wifi_ap_set_get_encryption_type_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_proxy_type_p", ITc_wifi_ap_set_get_proxy_type_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_security_type_p", ITc_wifi_ap_set_get_security_type_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_ip_config_type_p", ITc_wifi_ap_set_get_ip_config_type_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_ip_address_p", ITc_wifi_ap_set_get_ip_address_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_gateway_address_p", ITc_wifi_ap_set_get_gateway_address_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_subnet_mask_p", ITc_wifi_ap_set_get_subnet_mask_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_get_proxy_address_p", ITc_wifi_ap_set_get_proxy_address_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_set_unset_background_scan_cb_p", ITc_wifi_set_unset_background_scan_cb_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_set_unset_connection_state_changed_cb_p", ITc_wifi_set_unset_connection_state_changed_cb_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_set_unset_device_state_changed_cb_p", ITc_wifi_set_unset_device_state_changed_cb_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_connect_disconnect_p", ITc_wifi_connect_disconnect_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_get_connected_ap_p", ITc_wifi_get_connected_ap_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_foreach_found_aps_p", ITc_wifi_foreach_found_aps_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_scan_p", ITc_wifi_scan_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_hidden_create_p", ITc_wifi_ap_hidden_create_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_is_favorite_p", ITc_wifi_ap_is_favorite_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_is_passphrase_required_p", ITc_wifi_ap_is_passphrase_required_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_is_wps_supported_p", ITc_wifi_ap_is_wps_supported_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_refresh_p", ITc_wifi_ap_refresh_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_get_bssid_p", ITc_wifi_ap_get_bssid_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_get_connection_state_p", ITc_wifi_ap_get_connection_state_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_get_essid_p", ITc_wifi_ap_get_essid_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_get_frequency_p", ITc_wifi_ap_get_frequency_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_get_max_speed_p", ITc_wifi_ap_get_max_speed_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_get_rssi_p", ITc_wifi_ap_get_rssi_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_get_mac_address_p", ITc_wifi_get_mac_address_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_set_unset_rssi_level_changed_cb_p", ITc_wifi_set_unset_rssi_level_changed_cb_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_is_passpoint_p", ITc_wifi_ap_is_passpoint_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_activate_with_wifi_picker_tested_p", ITc_wifi_activate_with_wifi_picker_tested_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_forget_ap_p", ITc_wifi_forget_ap_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_ap_set_passphrase_p", ITc_wifi_ap_set_passphrase_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {"ITc_wifi_get_network_interface_name_p", ITc_wifi_get_network_interface_name_p, ITs_wifi_startup, ITs_wifi_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_WIFI_NATIVE_H__
diff --git a/src/itc/wifi/testing.pem b/src/itc/wifi/testing.pem
new file mode 100755 (executable)
index 0000000..0823d68
--- /dev/null
@@ -0,0 +1,11 @@
+-----BEGIN CERTIFICATE-----
+MIIBmTCCAQICCQDLvQnRtFqyCjANBgkqhkiG9w0BAQUFADARMQ8wDQYDVQQDEwZ1
+YnVudHUwHhcNMTMwODE0MTIxMDIxWhcNMjMwODEyMTIxMDIxWjARMQ8wDQYDVQQD
+EwZ1YnVudHUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMbt2ZuyUSQTq5ho
+wRfqkvaqsMEXnNPVtVeUg+HChvIEcSpeXCBVAryxe1sWNLNrM7BhyBr1MJVSM9cj
+KX63PB0X9KuCoirMSzZ4eTRWB3dh2Mqa+ncfanXTUknWiMKZJwbkyEQK+M4q7mYE
+wvwfxy03ra5Hevm1+seP6ISjFhajAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAfBgy
+0do/0Uk6USpfLigBNJYsHTccbOHK3T6xOhng0E9l4bxMCJ53pXlYhKhv9gJC/ger
+AON8uKC2/Vg1xJq4pbroIqEyvCm5lzx97q/pnNuRIbVLPE557ZQ61Aoa/t3SOes8
++xEiqgieOA0/aqEX6l8VfJ+TySovYklxvJvI+T4=
+-----END CERTIFICATE-----
diff --git a/src/utc/app-manager/CMakeLists.txt b/src/utc/app-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..69a82d1
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "app-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-appfw-app-manager")
+SET(TC_SOURCES
+       utc-app-manager.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-appfw-application
+       glib-2.0
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/app-manager/public.list b/src/utc/app-manager/public.list
new file mode 100755 (executable)
index 0000000..0347c86
--- /dev/null
@@ -0,0 +1,45 @@
+app_context_clone
+app_context_destroy
+app_context_get_app_id
+app_context_get_package
+app_context_get_pid
+app_context_is_equal
+app_context_is_terminated
+app_info_clone
+app_info_create
+app_info_destroy
+app_info_filter_add_bool
+app_info_filter_add_string
+app_info_filter_count_appinfo
+app_info_filter_create
+app_info_filter_destroy
+app_info_filter_foreach_appinfo
+app_info_foreach_metadata
+app_info_get_app_id
+app_info_get_exec
+app_info_get_icon
+app_info_get_label
+app_info_get_localed_label
+app_info_get_package
+app_info_get_type
+app_info_is_enabled
+app_info_is_equal
+app_info_is_nodisplay
+app_info_is_onboot
+app_info_is_preload
+app_info_metadata_filter_add
+app_info_metadata_filter_create
+app_info_metadata_filter_destroy
+app_info_metadata_filter_foreach
+app_manager_foreach_app_context
+app_manager_foreach_app_info
+app_manager_get_app_context
+app_manager_get_app_id
+app_manager_get_app_info
+app_manager_get_external_shared_data_path
+app_manager_get_shared_data_path
+app_manager_get_shared_resource_path
+app_manager_get_shared_trusted_path
+app_manager_is_running
+app_manager_resume_app
+
diff --git a/src/utc/app-manager/res/org.tizen.helloworld-1.0.0-arm.tpk b/src/utc/app-manager/res/org.tizen.helloworld-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..4ff7e82
Binary files /dev/null and b/src/utc/app-manager/res/org.tizen.helloworld-1.0.0-arm.tpk differ
diff --git a/src/utc/app-manager/res/org.tizen.helloworld-1.0.0-i386.tpk b/src/utc/app-manager/res/org.tizen.helloworld-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..1da0b57
Binary files /dev/null and b/src/utc/app-manager/res/org.tizen.helloworld-1.0.0-i386.tpk differ
diff --git a/src/utc/app-manager/tct-app-manager-core.c b/src/utc/app-manager/tct-app-manager-core.c
new file mode 100755 (executable)
index 0000000..2b011b8
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-app-manager-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/app-manager/tct-app-manager-core.h b/src/utc/app-manager/tct-app-manager-core.h
new file mode 100755 (executable)
index 0000000..4b8c291
--- /dev/null
@@ -0,0 +1,245 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_APP_MANAGER_CORE_H__
+#define __TCT_APP_MANAGER_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_app_manager_startup(void);
+extern void utc_app_manager_cleanup(void);
+
+extern int utc_app_manager_app_context_clone_p(void);
+extern int utc_app_manager_app_context_clone_n(void);
+extern int utc_app_manager_app_context_destroy_p(void);
+extern int utc_app_manager_app_context_destroy_n(void);
+extern int utc_app_manager_app_context_get_app_id_p(void);
+extern int utc_app_manager_app_context_get_app_id_n(void);
+extern int utc_app_manager_app_context_get_package_p(void);
+extern int utc_app_manager_app_context_get_package_n(void);
+extern int utc_app_manager_app_context_get_pid_p(void);
+extern int utc_app_manager_app_context_get_pid_n(void);
+extern int utc_app_manager_app_context_is_equal_p(void);
+extern int utc_app_manager_app_context_is_equal_n(void);
+extern int utc_app_manager_app_context_is_terminated_p(void);
+extern int utc_app_manager_app_context_is_terminated_n(void);
+extern int utc_app_manager_get_external_shared_data_path_p(void);
+extern int utc_app_manager_get_external_shared_data_path_n1(void);
+extern int utc_app_manager_get_external_shared_data_path_n2(void);
+extern int utc_app_manager_get_external_shared_data_path_n3(void);
+extern int utc_app_manager_get_shared_data_path_p(void);
+extern int utc_app_manager_get_shared_data_path_n1(void);
+extern int utc_app_manager_get_shared_data_path_n2(void);
+extern int utc_app_manager_get_shared_data_path_n3(void);
+extern int utc_app_manager_get_shared_resource_path_p(void);
+extern int utc_app_manager_get_shared_resource_path_n1(void);
+extern int utc_app_manager_get_shared_resource_path_n2(void);
+extern int utc_app_manager_get_shared_resource_path_n3(void);
+extern int utc_app_manager_get_shared_trusted_path_p(void);
+extern int utc_app_manager_get_shared_trusted_path_n1(void);
+extern int utc_app_manager_get_shared_trusted_path_n2(void);
+extern int utc_app_manager_get_shared_trusted_path_n3(void);
+extern int utc_app_info_app_info_clone_p(void);
+extern int utc_app_info_app_info_clone_n(void);
+extern int utc_app_info_metadata_filter_add_p(void);
+extern int utc_app_info_metadata_filter_add_n(void);
+extern int utc_app_info_app_info_destroy_p(void);
+extern int utc_app_info_app_info_destroy_n(void);
+extern int utc_app_info_app_info_create_p(void);
+extern int utc_app_info_app_info_create_n(void);
+extern int utc_app_info_get_app_id_p(void);
+extern int utc_app_info_get_app_id_n(void);
+extern int utc_app_info_get_icon_p(void);
+extern int utc_app_info_get_icon_n(void);
+extern int utc_app_info_get_label_p(void);
+extern int utc_app_info_get_label_n(void);
+extern int utc_app_info_get_package_p(void);
+extern int utc_app_info_get_package_n(void);
+extern int utc_app_info_get_type_p(void);
+extern int utc_app_info_get_type_n(void);
+extern int utc_app_info_foreach_metadata_p(void);
+extern int utc_app_info_foreach_metadata_n(void);
+extern int utc_app_info_is_nodisplay_p(void);
+extern int utc_app_info_is_nodisplay_n(void);
+extern int utc_app_info_is_equal_p(void);
+extern int utc_app_info_is_equal_n(void);
+extern int utc_app_info_is_enabled_p(void);
+extern int utc_app_info_is_enabled_n(void);
+extern int utc_app_info_filter_destroy_p1(void);
+extern int utc_app_info_filter_destroy_p2(void);
+extern int utc_app_info_filter_create_p1(void);
+extern int utc_app_info_filter_create_p2(void);
+extern int utc_app_info_filter_create_n(void);
+extern int utc_app_info_filter_destroy_n(void);
+extern int utc_app_info_filter_add_bool_p(void);
+extern int utc_app_info_filter_add_bool_n1(void);
+extern int utc_app_info_filter_add_bool_n2(void);
+extern int utc_app_info_filter_add_bool_n3(void);
+extern int utc_app_info_filter_add_string_p(void);
+extern int utc_app_info_filter_add_string_n1(void);
+extern int utc_app_info_filter_add_string_n2(void);
+extern int utc_app_info_filter_add_string_n3(void);
+extern int utc_app_info_filter_foreach_appinfo_p1(void);
+extern int utc_app_info_filter_foreach_appinfo_p2(void);
+extern int utc_app_info_filter_foreach_appinfo_n1(void);
+extern int utc_app_info_filter_foreach_appinfo_n2(void);
+extern int utc_app_info_metadata_filter_create_p1(void);
+extern int utc_app_info_metadata_filter_create_p2(void);
+extern int utc_app_info_metadata_filter_create_n(void);
+extern int utc_app_info_metadata_filter_destroy_p1(void);
+extern int utc_app_info_metadata_filter_destroy_p2(void);
+extern int utc_app_info_metadata_filter_destroy_n(void);
+extern int utc_app_info_metadata_filter_foreach_p1(void);
+extern int utc_app_info_metadata_filter_foreach_p2(void);
+extern int utc_app_info_metadata_filter_foreach_n1(void);
+extern int utc_app_info_metadata_filter_foreach_n2(void);
+extern int utc_app_manager_is_running_p(void);
+extern int utc_app_manager_is_running_n(void);
+extern int utc_app_manager_foreach_app_context_p(void);
+extern int utc_app_manager_foreach_app_context_n(void);
+extern int utc_app_manager_foreach_app_info_p(void);
+extern int utc_app_manager_foreach_app_info_n(void);
+extern int utc_app_manager_get_app_id_n(void);
+extern int utc_app_manager_get_app_id_p(void);
+extern int utc_app_manager_resume_app_p(void);
+extern int utc_app_manager_resume_app_n(void);
+extern int utc_app_manager_get_app_context_p(void);
+extern int utc_app_manager_get_app_context_n(void);
+extern int utc_app_manager_get_app_info_p(void);
+extern int utc_app_manager_get_app_info_n(void);
+extern int utc_app_info_filter_count_appinfo_p(void);
+extern int utc_app_info_filter_count_appinfo_n(void);
+extern int utc_app_info_get_exec_p(void);
+extern int utc_app_info_get_exec_n(void);
+extern int utc_app_info_get_localed_label_p(void);
+extern int utc_app_info_get_localed_label_n(void);
+extern int utc_app_info_is_onboot_p(void);
+extern int utc_app_info_is_onboot_n(void);
+extern int utc_app_info_is_preload_p(void);
+extern int utc_app_info_is_preload_n(void);
+
+testcase tc_array[] = {
+    {"utc_app_manager_app_context_clone_p", utc_app_manager_app_context_clone_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_clone_n", utc_app_manager_app_context_clone_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_destroy_p", utc_app_manager_app_context_destroy_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_destroy_n", utc_app_manager_app_context_destroy_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_get_app_id_p", utc_app_manager_app_context_get_app_id_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_get_app_id_n", utc_app_manager_app_context_get_app_id_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_get_package_p", utc_app_manager_app_context_get_package_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_get_package_n", utc_app_manager_app_context_get_package_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_get_pid_p", utc_app_manager_app_context_get_pid_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_get_pid_n", utc_app_manager_app_context_get_pid_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_is_equal_p", utc_app_manager_app_context_is_equal_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_is_equal_n", utc_app_manager_app_context_is_equal_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_is_terminated_p", utc_app_manager_app_context_is_terminated_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_app_context_is_terminated_n", utc_app_manager_app_context_is_terminated_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_external_shared_data_path_p", utc_app_manager_get_external_shared_data_path_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_external_shared_data_path_n1", utc_app_manager_get_external_shared_data_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_external_shared_data_path_n2", utc_app_manager_get_external_shared_data_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_external_shared_data_path_n3", utc_app_manager_get_external_shared_data_path_n3, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_data_path_p", utc_app_manager_get_shared_data_path_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_data_path_n1", utc_app_manager_get_shared_data_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_data_path_n2", utc_app_manager_get_shared_data_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_data_path_n3", utc_app_manager_get_shared_data_path_n3, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_resource_path_p", utc_app_manager_get_shared_resource_path_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_resource_path_n1", utc_app_manager_get_shared_resource_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_resource_path_n2", utc_app_manager_get_shared_resource_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_resource_path_n3", utc_app_manager_get_shared_resource_path_n3, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_trusted_path_p", utc_app_manager_get_shared_trusted_path_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_trusted_path_n1", utc_app_manager_get_shared_trusted_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_trusted_path_n2", utc_app_manager_get_shared_trusted_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_trusted_path_n3", utc_app_manager_get_shared_trusted_path_n3, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_app_info_clone_p", utc_app_info_app_info_clone_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_app_info_clone_n", utc_app_info_app_info_clone_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_add_p", utc_app_info_metadata_filter_add_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_add_n", utc_app_info_metadata_filter_add_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_app_info_destroy_p", utc_app_info_app_info_destroy_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_app_info_destroy_n", utc_app_info_app_info_destroy_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_app_info_create_p", utc_app_info_app_info_create_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_app_info_create_n", utc_app_info_app_info_create_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_app_id_p", utc_app_info_get_app_id_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_app_id_n", utc_app_info_get_app_id_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_icon_p", utc_app_info_get_icon_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_icon_n", utc_app_info_get_icon_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_label_p", utc_app_info_get_label_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_label_n", utc_app_info_get_label_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_package_p", utc_app_info_get_package_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_package_n", utc_app_info_get_package_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_type_p", utc_app_info_get_type_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_type_n", utc_app_info_get_type_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_foreach_metadata_p", utc_app_info_foreach_metadata_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_foreach_metadata_n", utc_app_info_foreach_metadata_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_is_nodisplay_p", utc_app_info_is_nodisplay_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_is_nodisplay_n", utc_app_info_is_nodisplay_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_is_equal_p", utc_app_info_is_equal_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_is_equal_n", utc_app_info_is_equal_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_is_enabled_p", utc_app_info_is_enabled_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_is_enabled_n", utc_app_info_is_enabled_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_destroy_p1", utc_app_info_filter_destroy_p1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_destroy_p2", utc_app_info_filter_destroy_p2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_create_p1", utc_app_info_filter_create_p1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_create_p2", utc_app_info_filter_create_p2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_create_n", utc_app_info_filter_create_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_destroy_n", utc_app_info_filter_destroy_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_add_bool_p", utc_app_info_filter_add_bool_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_add_bool_n1", utc_app_info_filter_add_bool_n1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_add_bool_n2", utc_app_info_filter_add_bool_n2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_add_bool_n3", utc_app_info_filter_add_bool_n3, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_add_string_p", utc_app_info_filter_add_string_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_add_string_n1", utc_app_info_filter_add_string_n1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_add_string_n2", utc_app_info_filter_add_string_n2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_add_string_n3", utc_app_info_filter_add_string_n3, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_foreach_appinfo_p1", utc_app_info_filter_foreach_appinfo_p1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_foreach_appinfo_p2", utc_app_info_filter_foreach_appinfo_p2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_foreach_appinfo_n1", utc_app_info_filter_foreach_appinfo_n1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_foreach_appinfo_n2", utc_app_info_filter_foreach_appinfo_n2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_create_p1", utc_app_info_metadata_filter_create_p1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_create_p2", utc_app_info_metadata_filter_create_p2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_create_n", utc_app_info_metadata_filter_create_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_destroy_p1", utc_app_info_metadata_filter_destroy_p1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_destroy_p2", utc_app_info_metadata_filter_destroy_p2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_destroy_n", utc_app_info_metadata_filter_destroy_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_foreach_p1", utc_app_info_metadata_filter_foreach_p1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_foreach_p2", utc_app_info_metadata_filter_foreach_p2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_foreach_n1", utc_app_info_metadata_filter_foreach_n1, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_metadata_filter_foreach_n2", utc_app_info_metadata_filter_foreach_n2, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_is_running_p", utc_app_manager_is_running_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_is_running_n", utc_app_manager_is_running_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_foreach_app_context_p", utc_app_manager_foreach_app_context_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_foreach_app_context_n", utc_app_manager_foreach_app_context_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_foreach_app_info_p", utc_app_manager_foreach_app_info_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_foreach_app_info_n", utc_app_manager_foreach_app_info_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_app_id_n", utc_app_manager_get_app_id_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_app_id_p", utc_app_manager_get_app_id_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_resume_app_p", utc_app_manager_resume_app_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_resume_app_n", utc_app_manager_resume_app_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_app_context_p", utc_app_manager_get_app_context_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_app_context_n", utc_app_manager_get_app_context_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_app_info_p", utc_app_manager_get_app_info_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_app_info_n", utc_app_manager_get_app_info_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_count_appinfo_p", utc_app_info_filter_count_appinfo_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_filter_count_appinfo_n", utc_app_info_filter_count_appinfo_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_exec_p", utc_app_info_get_exec_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_exec_n", utc_app_info_get_exec_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_localed_label_p", utc_app_info_get_localed_label_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_get_localed_label_n", utc_app_info_get_localed_label_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_is_onboot_p", utc_app_info_is_onboot_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_is_onboot_n", utc_app_info_is_onboot_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_is_preload_p", utc_app_info_is_preload_p, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_info_is_preload_n", utc_app_info_is_preload_n, utc_app_manager_startup, utc_app_manager_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_APP_MANAGER_CORE_H__
diff --git a/src/utc/app-manager/utc-app-manager.c b/src/utc/app-manager/utc-app-manager.c
new file mode 100755 (executable)
index 0000000..8d1a47e
--- /dev/null
@@ -0,0 +1,1583 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <app_manager.h>
+#include <app_context.h>
+#include <app_info.h>
+#include <stdbool.h>
+#include <string.h>
+#include <app.h>
+#include <glib.h>
+
+static app_context_h app_context = NULL;
+#define TEST_APPID "org.tizen.helloworld"
+static GMainLoop *g_mainloop = NULL;
+
+static gboolean timeout_func(gpointer data)
+{
+    fprintf(stderr, "Timeout! Test case may fail!\n");
+    g_main_loop_quit((GMainLoop *) data);
+    return G_SOURCE_REMOVE;
+}
+
+static void wait_for_async()
+{
+    int timeout_id = 0;
+    g_mainloop = g_main_loop_new(NULL, FALSE);
+
+    timeout_id = g_timeout_add(10000, timeout_func, g_mainloop);
+    g_main_loop_run(g_mainloop);
+}
+
+
+static void reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
+{
+    if(result == APP_CONTROL_RESULT_SUCCEEDED)
+        fprintf(stderr, "org.tizen.helloworld was Launched!!");
+    else
+        fprintf(stderr, "Failed to launch org.tizen.helloworld!!");
+
+    g_main_loop_quit(g_mainloop);
+}
+
+void utc_app_manager_startup(void)
+{
+    bool running = false;
+    app_control_h request;
+    int ret = APP_ERROR_NONE;
+    
+    app_manager_is_running(TEST_APPID, &running);
+    if(!running) {
+        app_control_create(&request);
+        if(!request) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "app_control_create() failed (code: %d)\n", ret);
+            return;
+        }
+
+        ret = app_control_set_app_id(request, TEST_APPID);
+        if(ret != APP_ERROR_NONE) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "app_control_set_app_id() failed (code: %d)\n", ret);
+            return;
+        }
+        
+        ret = app_control_send_launch_request(request, reply_cb, NULL);
+        if(ret != APP_ERROR_NONE) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "app_control_send_launch_request() failed (code: %d)\n", ret);
+            return;
+        }
+        wait_for_async();
+    }
+}
+
+void utc_app_manager_cleanup(void)
+{
+    if(app_context) {
+        app_context_destroy(app_context);
+    }
+}
+
+static bool metadata_cb(const char *key, const char *value, void *user_data)
+{
+    return true;
+}
+
+static bool filter_cb(app_info_h app_info, void *user_data)
+{
+    return true;
+}
+
+int utc_app_manager_app_context_clone_p(void)
+{
+    int ret = 0;
+    app_context_h app_context_cloned = NULL;
+
+    ret = app_manager_get_app_context(TEST_APPID, &app_context);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_context_clone(&app_context_cloned, app_context);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    if(app_context_cloned) {
+        app_context_destroy(app_context_cloned);
+    }
+
+    return 0;
+}
+
+int utc_app_manager_app_context_clone_n(void)
+{
+    int ret = 0;
+    app_context_h app_context_cloned = NULL;
+
+    ret = app_context_clone(&app_context_cloned, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_app_context_destroy_p(void)
+{
+    int ret = 0;
+
+    ret = app_manager_get_app_context(TEST_APPID, &app_context);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_context_destroy(app_context);
+    app_context = NULL;
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_app_context_destroy_n(void)
+{
+    int ret = 0;
+
+    ret = app_context_destroy(NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_app_context_get_app_id_p(void)
+{
+    int ret = 0;
+
+    ret = app_manager_get_app_context(TEST_APPID, &app_context);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    char *app_id;
+
+    ret = app_context_get_app_id(app_context, &app_id);
+    free(app_id);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_app_context_get_app_id_n(void)
+{
+    int ret = 0;
+    char *app_id;
+
+    ret = app_context_get_app_id(NULL, &app_id);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_app_context_get_package_p(void)
+{
+    int ret = 0;
+
+    ret = app_manager_get_app_context(TEST_APPID, &app_context);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    char *package;
+
+    ret = app_context_get_package(app_context, &package);
+    free(package);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_app_context_get_package_n(void)
+{
+    int ret = 0;
+    char *package;
+
+    ret = app_context_get_package(NULL, &package);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_app_context_get_pid_p(void)
+{
+    int ret = 0;
+
+    ret = app_manager_get_app_context(TEST_APPID, &app_context);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    int pid = 0;
+
+    ret = app_context_get_pid(app_context, &pid);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_app_context_get_pid_n(void)
+{
+    int ret = 0;
+    int pid = 0;
+
+    ret = app_context_get_pid(NULL, &pid);
+    assert_neq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_app_context_is_equal_p(void)
+{
+    int ret = 0;
+    app_context_h app_context2 = NULL;
+    bool equal = false;
+
+    ret = app_manager_get_app_context(TEST_APPID, &app_context);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_manager_get_app_context(TEST_APPID, &app_context2);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_context_is_equal(app_context, app_context2, &equal);
+    assert(equal==true);
+
+    ret = app_context_destroy(app_context2);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_app_context_is_equal_n(void)
+{
+    int ret = app_context_is_equal(NULL, NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_app_context_is_terminated_p(void)
+{
+    int ret = 0;
+
+    ret = app_manager_get_app_context(TEST_APPID, &app_context);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    bool terminated = false;
+
+    ret = app_context_is_terminated(app_context, &terminated);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_app_manager_app_context_is_terminated_n(void)
+{
+    int ret = 0;
+    bool terminated = false;
+
+    ret = app_context_is_terminated(NULL, &terminated);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_get_external_shared_data_path_p(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_external_shared_data_path(TEST_APPID, &path);
+    free(path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_get_external_shared_data_path_n1(void)
+{
+    int ret = 0;
+
+    ret = app_manager_get_external_shared_data_path(TEST_APPID, NULL);
+
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_manager_get_external_shared_data_path_n2(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_external_shared_data_path(NULL, &path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_manager_get_external_shared_data_path_n3(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_external_shared_data_path("no.such.app", &path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_NO_SUCH_APP);
+
+    return 0;
+}
+
+int utc_app_manager_get_shared_data_path_p(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_shared_data_path(TEST_APPID, &path);
+    free(path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+int utc_app_manager_get_shared_data_path_n1(void)
+{
+    int ret = 0;
+
+    ret = app_manager_get_shared_data_path(TEST_APPID, NULL);
+
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_manager_get_shared_data_path_n2(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_shared_data_path(NULL, &path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_manager_get_shared_data_path_n3(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_shared_data_path("no.such.app", &path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_NO_SUCH_APP);
+
+    return 0;
+}
+
+int utc_app_manager_get_shared_resource_path_p(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_shared_resource_path(TEST_APPID, &path);
+    free(path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_get_shared_resource_path_n1(void)
+{
+    int ret = 0;
+
+    ret = app_manager_get_shared_resource_path(TEST_APPID, NULL);
+
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_manager_get_shared_resource_path_n2(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_shared_resource_path(NULL, &path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_manager_get_shared_resource_path_n3(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_shared_resource_path("no.such.app", &path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_NO_SUCH_APP);
+
+    return 0;
+}
+
+int utc_app_manager_get_shared_trusted_path_p(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_shared_trusted_path(TEST_APPID, &path);
+    free(path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_get_shared_trusted_path_n1(void)
+{
+    int ret = 0;
+
+    ret = app_manager_get_shared_trusted_path(TEST_APPID, NULL);
+
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_manager_get_shared_trusted_path_n2(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_shared_trusted_path(NULL, &path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_manager_get_shared_trusted_path_n3(void)
+{
+    int ret = 0;
+    char *path;
+
+    ret = app_manager_get_shared_trusted_path("no.such.app", &path);
+
+    assert_eq(ret, APP_MANAGER_ERROR_NO_SUCH_APP);
+
+    return 0;
+}
+
+int utc_app_info_app_info_clone_p(void)
+{
+    app_info_h clone = NULL;
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h app_info = NULL;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_clone(&clone, app_info);
+    app_info_destroy(app_info);
+    app_info_destroy(clone);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_app_info_clone_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_clone(NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_metadata_filter_add_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_metadata_filter_h filter = NULL;
+    char *key = "Test key";
+    char *value = "Test value";
+
+    ret = app_info_metadata_filter_create(&filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_metadata_filter_add(filter, key, value);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    app_info_metadata_filter_destroy(filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_metadata_filter_add_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_metadata_filter_add(NULL, NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_app_info_destroy_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h app_info = NULL;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_destroy(app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_app_info_destroy_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_destroy(NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_app_info_create_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h app_info = NULL;
+
+    ret = app_info_create(TEST_APPID, &app_info);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_destroy(app_info);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_app_info_create_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_create(NULL, NULL);
+
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_app_info_get_app_id_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    char *app_id = NULL;
+    app_info_h app_info = NULL;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_get_app_id(app_info, &app_id);
+    app_info_destroy(app_info);
+    free(app_id);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_get_app_id_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_get_app_id(NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_get_icon_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    char *path = NULL;
+    app_info_h app_info = NULL;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_get_icon(app_info, &path);
+    app_info_destroy(app_info);
+    free(path);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_get_icon_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_get_icon(NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_get_label_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h app_info = NULL;
+    char *label = NULL;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_get_label(app_info, &label);
+    app_info_destroy(app_info);
+    free(label);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_get_label_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_get_label(NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_get_package_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    char *package = NULL;
+    app_info_h app_info = NULL;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_get_package(app_info, &package);
+    app_info_destroy(app_info);
+    free(package);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_get_package_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_get_package(NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_get_type_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    char *type = NULL;
+    app_info_h app_info = NULL;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_get_type(app_info, &type);
+    app_info_destroy(app_info);
+    free(type);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_get_type_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_get_type(NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_foreach_metadata_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h app_info = NULL;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_foreach_metadata(app_info, metadata_cb, NULL);
+    app_info_destroy(app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+    return 0;
+}
+
+int utc_app_info_foreach_metadata_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_foreach_metadata(NULL, NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_is_nodisplay_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h app_info = NULL;
+    bool nodisplay = false;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_is_nodisplay(app_info, &nodisplay);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    app_info_destroy(app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_is_nodisplay_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_is_nodisplay(NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_is_equal_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h lhs,rhs;
+    bool equal = false;
+
+    ret = app_manager_get_app_info(TEST_APPID, &lhs);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_manager_get_app_info(TEST_APPID, &rhs);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_is_equal(lhs,rhs,&equal);
+    app_info_destroy(rhs);
+    app_info_destroy(lhs);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_is_equal_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    bool equal = false;
+
+    ret = app_info_is_equal(NULL, NULL, &equal);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_is_enabled_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h app_info;
+    bool enabled = false;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_is_enabled(app_info,&enabled);
+    app_info_destroy(app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_is_enabled_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    bool enabled;
+
+    ret = app_info_is_enabled(NULL, &enabled);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_filter_destroy_p1(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_filter_h filter = NULL;
+
+    ret = app_info_filter_create(&filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_destroy(filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_filter_destroy_p2(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_filter_h filter = NULL;
+
+    ret = app_info_filter_create(&filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_add_string(filter, PACKAGE_INFO_PROP_APP_TYPE, "capp");
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_destroy(filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_filter_create_p1(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_filter_h filter = NULL;
+
+    ret = app_info_filter_create(&filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_destroy(filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_filter_create_p2(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_filter_h filter = NULL;
+
+    ret = app_info_filter_create(&filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_add_string(filter, PACKAGE_INFO_PROP_APP_TYPE, "capp");
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_destroy(filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_filter_create_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_filter_create(NULL);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_info_filter_destroy_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_filter_destroy(NULL);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_info_filter_add_bool_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_filter_h filter = NULL;
+
+    ret = app_info_filter_create(&filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_add_bool(filter, PACKAGE_INFO_PROP_APP_NODISPLAY, true);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_destroy(filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_filter_add_bool_n1(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_filter_add_bool(NULL, NULL, NULL);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_filter_add_bool_n2(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    app_info_filter_h filter = NULL;
+    ret = app_info_filter_add_bool(filter, PACKAGE_INFO_PROP_APP_NODISPLAY, true);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_filter_add_bool_n3(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_filter_h filter = NULL;
+    const char *property = "Invalid property";
+    bool value = false;
+
+    ret = app_info_filter_create(&filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_add_bool(filter, property, value);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_filter_add_string_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_filter_h filter = NULL;
+
+    ret = app_info_filter_create(&filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_add_string(filter, PACKAGE_INFO_PROP_APP_TYPE, "capp");
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_destroy(filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_filter_add_string_n1(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_filter_add_string(NULL, NULL, NULL);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_filter_add_string_n2(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    app_info_filter_h filter = NULL;
+    ret = app_info_filter_add_string(filter, PACKAGE_INFO_PROP_APP_TYPE, "capp");
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_filter_add_string_n3(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_filter_h filter = NULL;
+    const char *property = "Invalid property";
+    const char *value = "Value";
+
+    ret = app_info_filter_create(&filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_add_string(filter, property, value);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/*
+TODO: See comments for app_info_metadata_filter_foreach
+*/
+int utc_app_info_filter_foreach_appinfo_p1(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_filter_h filter = NULL;
+
+    ret = app_info_filter_create(&filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_add_bool(filter, PACKAGE_INFO_PROP_APP_NODISPLAY, false);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_foreach_appinfo(filter, filter_cb, NULL);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_destroy(filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_filter_foreach_appinfo_p2(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_filter_h filter = NULL;
+
+    ret = app_info_filter_create(&filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_add_string(filter, PACKAGE_INFO_PROP_APP_TYPE, "capp");
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_foreach_appinfo(filter, filter_cb, NULL);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_destroy(filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_filter_foreach_appinfo_n1(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_filter_foreach_appinfo(NULL, NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_filter_foreach_appinfo_n2(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_filter_foreach_appinfo(NULL, filter_cb, NULL);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_metadata_filter_create_p1(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_metadata_filter_h filter = NULL;
+
+    ret = app_info_metadata_filter_create(&filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_metadata_filter_destroy(filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_metadata_filter_create_p2(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    char *mkey = "http://developer.tizen.org/metadata/disablescreenread";
+    char *mvalue = "shared/res/720x1280/Splash_Tizen_resolution_720x1280_landscape.p";
+
+    app_info_metadata_filter_h filter = NULL;
+
+    ret = app_info_metadata_filter_create(&filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_metadata_filter_add(filter, mkey, mvalue);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_metadata_filter_destroy(filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_metadata_filter_create_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_metadata_filter_create(NULL);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_metadata_filter_destroy_p1(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_metadata_filter_h filter = NULL;
+
+    ret = app_info_metadata_filter_create(&filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    app_info_metadata_filter_destroy(filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_metadata_filter_destroy_p2(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    const char *mkey = "http://developer.tizen.org/metadata/disablescreenread";
+    const char *mvalue = "shared/res/720x1280/Splash_Tizen_resolution_720x1280_landscape.p";
+
+    app_info_metadata_filter_h filter;
+
+    ret = app_info_metadata_filter_create(&filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_metadata_filter_add(filter, mkey, mvalue);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_metadata_filter_destroy(filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_metadata_filter_destroy_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_metadata_filter_destroy(NULL);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/*
+TODO: No criteria added to the filter, this is probably the cause of failing.
+It's not clear what criteria will be always met
+We need such criteria to make sure that the callback is called,
+so that the test is more extensive.
+
+Similar issues for app_info_filter_foreach_appinfo.
+*/
+int utc_app_info_metadata_filter_foreach_p1(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    const char *mkey = "http://developer.tizen.org/metadata/mode/emergency";
+
+    app_info_metadata_filter_h filter = NULL;
+
+    ret = app_info_metadata_filter_create(&filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_metadata_filter_add(filter, mkey, NULL);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_metadata_filter_foreach(filter, filter_cb, NULL);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    app_info_metadata_filter_destroy(filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_metadata_filter_foreach_p2(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    const char *mkey = "http://developer.tizen.org/metadata/disablescreenread";
+    const char *mvalue = "shared/res/720x1280/Splash_Tizen_resolution_720x1280_landscape.p";
+
+    app_info_metadata_filter_h filter;
+
+    ret = app_info_metadata_filter_create(&filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_metadata_filter_add(filter, mkey, mvalue);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_metadata_filter_foreach(filter, filter_cb, NULL);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_metadata_filter_destroy(filter);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_metadata_filter_foreach_n1(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_metadata_filter_foreach(NULL, filter_cb, NULL);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_metadata_filter_foreach_n2(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_info_metadata_filter_foreach(NULL, NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+static bool app_context_cb(app_context_h app_context, void * user_data)
+{
+    return true;
+}
+
+static bool app_info_cb(app_info_h app_info, void * user_data)
+{
+    return true;
+}
+
+int utc_app_manager_is_running_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    bool is_running = false;
+
+    ret = app_manager_is_running(TEST_APPID, &is_running);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_is_running_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_manager_is_running(NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_foreach_app_context_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_manager_foreach_app_context(app_context_cb, NULL);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_app_manager_foreach_app_context_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_manager_foreach_app_context(NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_foreach_app_info_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_manager_foreach_app_info(app_info_cb, NULL);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_foreach_app_info_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_manager_foreach_app_info(NULL, NULL);
+
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+    return 0;
+}
+
+int utc_app_manager_get_app_id_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    char *appid;
+    ret = app_manager_get_app_id(0, &appid);
+    assert_neq(ret, APP_MANAGER_ERROR_NONE);
+    return 0;
+}
+
+int utc_app_manager_get_app_id_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    pid_t pid;
+    char *appid;
+    app_context_h app_context;
+
+    ret = app_get_id(&appid);
+    assert_eq(ret,APP_ERROR_NONE);
+
+    ret = app_manager_get_app_context(appid, &app_context);
+    free(appid);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_context_get_pid(app_context, &pid);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_manager_get_app_id(pid, &appid);
+    free(appid);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_resume_app_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_context_h app_context = NULL;
+
+    ret = app_manager_get_app_context(TEST_APPID, &app_context);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_manager_resume_app(app_context);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_resume_app_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_manager_resume_app(NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_get_app_context_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_context_h app_context = NULL;
+
+    ret = app_manager_get_app_context(TEST_APPID, &app_context);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_get_app_context_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_manager_get_app_context(NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_get_app_info_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h app_info = NULL;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_destroy(app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_manager_get_app_info_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+
+    ret = app_manager_get_app_info(NULL, NULL);
+    assert_neq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/*
+ * Add TCs from Here
+ */
+
+void cb_for_app_manager_unset_app_context_event_cb(app_info_h app_info, app_info_event_e event, void * user_data)
+{
+    return;
+}
+
+int utc_app_info_filter_count_appinfo_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    int count = 0;
+    app_info_filter_h filter = NULL;
+
+    ret = app_info_filter_create(&filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+    assert(filter);
+
+    ret = app_info_filter_add_string(filter, PACKAGE_INFO_PROP_APP_TYPE, "capp");
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_count_appinfo(filter, &count);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_filter_destroy(filter);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_filter_count_appinfo_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    int *count = NULL;
+
+    ret = app_info_filter_count_appinfo(NULL, count);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_get_exec_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    char *exec = NULL;
+    app_info_h app_info = NULL;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+    assert(app_info);
+
+    ret = app_info_get_exec(app_info, &exec);
+    app_info_destroy(app_info);
+    free(exec);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_get_exec_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    char *exec = NULL;
+
+    ret = app_info_get_exec(NULL, &exec);
+    free(exec);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_get_localed_label_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h app_info = NULL;
+    char *app_id = "app_id";
+    const char *locale = "locale";
+    char *label = NULL;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_get_app_id(app_info, &app_id);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    ret = app_info_get_localed_label(app_id, locale, &label);
+    app_info_destroy(app_info);
+    free(label);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_get_localed_label_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    const char *locale = "locale";
+    char *label = NULL;
+
+    ret = app_info_get_localed_label(NULL, locale, &label);
+    free(label);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_is_onboot_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h app_info = NULL;
+    bool onboot = false;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+    assert(app_info);
+
+    ret = app_info_is_onboot(app_info, &onboot);
+    app_info_destroy(app_info);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_is_onboot_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    bool onboot = false;
+
+    ret = app_info_is_onboot(NULL, &onboot);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_info_is_preload_p(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    app_info_h app_info = NULL;
+    bool preload = false;
+
+    ret = app_manager_get_app_info(TEST_APPID, &app_info);
+    assert_eq(ret,APP_MANAGER_ERROR_NONE);
+    assert(app_info);
+
+    ret = app_info_is_preload(app_info, &preload);
+    app_info_destroy(app_info);
+    assert_eq(ret, APP_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_info_is_preload_n(void)
+{
+    int ret = APP_MANAGER_ERROR_NONE;
+    bool preload = false;
+
+    ret = app_info_is_preload(NULL, &preload);
+    assert_eq(ret, APP_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
diff --git a/src/utc/appcore-agent/CMakeLists.txt b/src/utc/appcore-agent/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..4ab263b
--- /dev/null
@@ -0,0 +1,32 @@
+SET(PKG_NAME "appcore-agent")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-appfw-service-application")
+SET(TC_SOURCES
+       utc-appcore-agent.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/appcore-agent/public.list b/src/utc/appcore-agent/public.list
new file mode 100755 (executable)
index 0000000..bbce166
--- /dev/null
@@ -0,0 +1,5 @@
+service_app_exit
+service_app_main
+service_app_add_event_handler
+service_app_remove_event_handler
+
diff --git a/src/utc/appcore-agent/tct-appcore-agent-core.c b/src/utc/appcore-agent/tct-appcore-agent-core.c
new file mode 100755 (executable)
index 0000000..29f4a29
--- /dev/null
@@ -0,0 +1,126 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-appcore-agent-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+                       
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/appcore-agent/tct-appcore-agent-core.h b/src/utc/appcore-agent/tct-appcore-agent-core.h
new file mode 100755 (executable)
index 0000000..c8cd3dc
--- /dev/null
@@ -0,0 +1,45 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_APPCORE_AGENT_CORE_H__
+#define __TCT_APPCORE_AGENT_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_appcore_agent_startup(void);
+extern void utc_appcore_agent_cleanup(void);
+
+extern int utc_appcore_agent_service_app_main_p(void);
+extern int utc_appcore_agent_service_app_main_n1(void);
+extern int utc_appcore_agent_service_app_main_n2(void);
+extern int utc_appcore_agent_service_app_main_n3(void);
+extern int utc_appcore_agent_service_app_add_event_handler_p(void);
+extern int utc_appcore_agent_service_app_add_event_handler_n(void);
+extern int utc_appcore_agent_service_app_remove_event_handler_p(void);
+extern int utc_appcore_agent_service_app_remove_event_handler_n(void);
+
+testcase tc_array[] = {
+    {"utc_appcore_agent_service_app_main_p", utc_appcore_agent_service_app_main_p, utc_appcore_agent_startup, utc_appcore_agent_cleanup},
+    {"utc_appcore_agent_service_app_main_n1", utc_appcore_agent_service_app_main_n1, utc_appcore_agent_startup, utc_appcore_agent_cleanup},
+    {"utc_appcore_agent_service_app_main_n2", utc_appcore_agent_service_app_main_n2, utc_appcore_agent_startup, utc_appcore_agent_cleanup},
+    {"utc_appcore_agent_service_app_main_n3", utc_appcore_agent_service_app_main_n3, utc_appcore_agent_startup, utc_appcore_agent_cleanup},
+    {"utc_appcore_agent_service_app_add_event_handler_p", utc_appcore_agent_service_app_add_event_handler_p, utc_appcore_agent_startup, utc_appcore_agent_cleanup},
+    {"utc_appcore_agent_service_app_add_event_handler_n", utc_appcore_agent_service_app_add_event_handler_n, utc_appcore_agent_startup, utc_appcore_agent_cleanup},
+    {"utc_appcore_agent_service_app_remove_event_handler_p", utc_appcore_agent_service_app_remove_event_handler_p, utc_appcore_agent_startup, utc_appcore_agent_cleanup},
+    {"utc_appcore_agent_service_app_remove_event_handler_n", utc_appcore_agent_service_app_remove_event_handler_n, utc_appcore_agent_startup, utc_appcore_agent_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_APPCORE_AGENT_CORE_H__
diff --git a/src/utc/appcore-agent/utc-appcore-agent.c b/src/utc/appcore-agent/utc-appcore-agent.c
new file mode 100755 (executable)
index 0000000..d1caf73
--- /dev/null
@@ -0,0 +1,188 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <service_app.h>
+
+static void handler(int sig)
+{
+    service_app_exit();
+}
+
+void utc_appcore_agent_startup(void)
+{
+    alarm(4);
+}
+
+void utc_appcore_agent_cleanup(void)
+{
+    alarm(0);
+}
+
+static bool _service_app_create(void *user_data)
+{
+    return true;
+}
+
+static void _service_app_terminate(void *user_data)
+{
+}
+
+static void _service_app_control(app_control_h app_control, void *user_data)
+{
+}
+
+static void _service_app_low_memory(void *user_data)
+{
+}
+
+static void _service_app_low_battery(void *user_data)
+{
+}
+
+int utc_appcore_agent_service_app_main_p(void)
+{
+    int ret = APP_ERROR_NONE;
+    service_app_lifecycle_callback_s ops;
+    int argc = 1;
+    char **argv;
+    argv = malloc(1 * sizeof(char *));
+    assert_neq(argv, NULL);
+
+    argv[0] = "service_app";
+
+    memset(&ops, 0x0, sizeof(service_app_lifecycle_callback_s));
+
+    signal(SIGALRM, (void *)handler);
+
+    ops.create = _service_app_create;
+    ops.app_control = _service_app_control;
+    ops.terminate = _service_app_terminate;
+
+    ret = service_app_main(argc, argv, &ops, NULL);
+
+    free(argv);
+    assert_eq(ret, APP_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_appcore_agent_service_app_main_n1(void)
+{
+    int ret;
+    char *argv[] = {"test", "argv"};
+    service_app_lifecycle_callback_s ops;
+
+    ops.create = (service_app_create_cb)_service_app_create;
+
+    ret = service_app_main(0, argv, &ops, NULL);
+    assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_appcore_agent_service_app_main_n2(void)
+{
+    int ret;
+    int argc = 2;
+    service_app_lifecycle_callback_s ops;
+
+    ops.create = (service_app_create_cb)_service_app_create;
+
+    ret = service_app_main(argc, NULL, &ops, NULL);
+    assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_appcore_agent_service_app_main_n3(void)
+{
+    int ret;
+    int argc = 2;
+    char *argv[] = {"test", "argv"};
+    service_app_lifecycle_callback_s ops;
+
+    ret = service_app_main(argc, argv, NULL, NULL);
+    assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+    ops.create = NULL;
+    ret = service_app_main(argc, argv, &ops, NULL);
+    assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static void event_callback(void *event, void *data)
+{
+}
+
+int utc_appcore_agent_service_app_add_event_handler_p(void)
+{
+    int ret;
+    app_event_handler_h handler;
+
+    ret = service_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
+    assert_eq(ret, APP_ERROR_NONE);
+
+    ret = service_app_remove_event_handler(handler);
+    assert_eq(ret, APP_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_appcore_agent_service_app_add_event_handler_n(void)
+{
+    int ret;
+    app_event_handler_h handler;
+
+    ret = service_app_add_event_handler(NULL, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
+    assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+    ret = service_app_add_event_handler(&handler, -1, (app_event_cb)event_callback, NULL);
+    assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+    ret = service_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, NULL, NULL);
+    assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_appcore_agent_service_app_remove_event_handler_p(void)
+{
+    int ret;
+    app_event_handler_h handler;
+
+    ret = service_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
+    assert_eq(ret, APP_ERROR_NONE);
+
+    ret = service_app_remove_event_handler(handler);
+    assert_eq(ret, APP_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_appcore_agent_service_app_remove_event_handler_n(void)
+{
+    int ret;
+
+    ret = service_app_remove_event_handler(NULL);
+    assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/appcore-watch/CMakeLists.txt b/src/utc/appcore-watch/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..b561865
--- /dev/null
@@ -0,0 +1,32 @@
+SET(PKG_NAME "appcore-watch")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-appfw-watch-application elementary")
+SET(TC_SOURCES
+       utc-appcore-watch.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/appcore-watch/public.list b/src/utc/appcore-watch/public.list
new file mode 100755 (executable)
index 0000000..b72dbf5
--- /dev/null
@@ -0,0 +1,19 @@
+watch_app_add_event_handler
+watch_app_remove_event_handler
+watch_app_main
+watch_app_exit
+watch_time_get_current_time
+watch_time_delete
+watch_time_get_year
+watch_time_get_month
+watch_time_get_day
+watch_time_get_day_of_week
+watch_time_get_hour
+watch_time_get_hour24
+watch_time_get_minute
+watch_time_get_second
+watch_time_get_millisecond
+watch_time_get_utc_time
+watch_time_get_utc_timestamp
+watch_time_get_time_zone
+
diff --git a/src/utc/appcore-watch/tct-appcore-watch-core.c b/src/utc/appcore-watch/tct-appcore-watch-core.c
new file mode 100755 (executable)
index 0000000..cd2b739
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-appcore-watch-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/appcore-watch/tct-appcore-watch-core.h b/src/utc/appcore-watch/tct-appcore-watch-core.h
new file mode 100755 (executable)
index 0000000..82ca485
--- /dev/null
@@ -0,0 +1,103 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_APPCORE_WATCH_CORE_H__
+#define __TCT_APPCORE_WATCH_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_appcore_watch_startup(void);
+extern void utc_appcore_watch_cleanup(void);
+
+extern int utc_appcore_watch_watch_app_main_n1(void);
+extern int utc_appcore_watch_watch_app_main_n2(void);
+extern int utc_appcore_watch_watch_app_main_n3(void);
+extern int utc_appcore_watch_watch_app_add_event_handler_p(void);
+extern int utc_appcore_watch_watch_app_add_event_handler_n(void);
+extern int utc_appcore_watch_watch_app_remove_event_handler_p(void);
+extern int utc_appcore_watch_watch_app_remove_event_handler_n(void);
+extern int utc_appcore_watch_watch_time_get_current_time_p(void);
+extern int utc_appcore_watch_watch_time_get_current_time_n(void);
+extern int utc_appcore_watch_watch_time_delete_p(void);
+extern int utc_appcore_watch_watch_time_delete_n(void);
+extern int utc_appcore_watch_watch_time_get_year_p(void);
+extern int utc_appcore_watch_watch_time_get_year_n(void);
+extern int utc_appcore_watch_watch_time_get_month_p(void);
+extern int utc_appcore_watch_watch_time_get_month_n(void);
+extern int utc_appcore_watch_watch_time_get_day_p(void);
+extern int utc_appcore_watch_watch_time_get_day_n(void);
+extern int utc_appcore_watch_watch_time_get_day_of_week_p(void);
+extern int utc_appcore_watch_watch_time_get_day_of_week_n(void);
+extern int utc_appcore_watch_watch_time_get_hour_p(void);
+extern int utc_appcore_watch_watch_time_get_hour_n(void);
+extern int utc_appcore_watch_watch_time_get_hour24_p(void);
+extern int utc_appcore_watch_watch_time_get_hour24_n(void);
+extern int utc_appcore_watch_watch_time_get_minute_p(void);
+extern int utc_appcore_watch_watch_time_get_minute_n(void);
+extern int utc_appcore_watch_watch_time_get_second_p(void);
+extern int utc_appcore_watch_watch_time_get_second_n(void);
+extern int utc_appcore_watch_watch_time_get_millisecond_p(void);
+extern int utc_appcore_watch_watch_time_get_millisecond_n(void);
+extern int utc_appcore_watch_watch_time_get_utc_time_p(void);
+extern int utc_appcore_watch_watch_time_get_utc_time_n1(void);
+extern int utc_appcore_watch_watch_time_get_utc_time_n2(void);
+extern int utc_appcore_watch_watch_time_get_utc_timestamp_p(void);
+extern int utc_appcore_watch_watch_time_get_utc_timestamp_n(void);
+extern int utc_appcore_watch_watch_time_get_time_zone_p(void);
+extern int utc_appcore_watch_watch_time_get_time_zone_n1(void);
+extern int utc_appcore_watch_watch_time_get_time_zone_n2(void);
+
+testcase tc_array[] = {
+    {"utc_appcore_watch_watch_app_main_n1", utc_appcore_watch_watch_app_main_n1, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_app_main_n2", utc_appcore_watch_watch_app_main_n2, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_app_main_n3", utc_appcore_watch_watch_app_main_n3, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_app_add_event_handler_p", utc_appcore_watch_watch_app_add_event_handler_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_app_add_event_handler_n", utc_appcore_watch_watch_app_add_event_handler_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_app_remove_event_handler_p", utc_appcore_watch_watch_app_remove_event_handler_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_app_remove_event_handler_n", utc_appcore_watch_watch_app_remove_event_handler_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_current_time_p", utc_appcore_watch_watch_time_get_current_time_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_current_time_n", utc_appcore_watch_watch_time_get_current_time_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_delete_p", utc_appcore_watch_watch_time_delete_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_delete_n", utc_appcore_watch_watch_time_delete_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_year_p", utc_appcore_watch_watch_time_get_year_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_year_n", utc_appcore_watch_watch_time_get_year_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_month_p", utc_appcore_watch_watch_time_get_month_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_month_n", utc_appcore_watch_watch_time_get_month_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_day_p", utc_appcore_watch_watch_time_get_day_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_day_n", utc_appcore_watch_watch_time_get_day_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_day_of_week_p", utc_appcore_watch_watch_time_get_day_of_week_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_day_of_week_n", utc_appcore_watch_watch_time_get_day_of_week_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_hour_p", utc_appcore_watch_watch_time_get_hour_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_hour_n", utc_appcore_watch_watch_time_get_hour_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_hour24_p", utc_appcore_watch_watch_time_get_hour24_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_hour24_n", utc_appcore_watch_watch_time_get_hour24_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_minute_p", utc_appcore_watch_watch_time_get_minute_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_minute_n", utc_appcore_watch_watch_time_get_minute_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_second_p", utc_appcore_watch_watch_time_get_second_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_second_n", utc_appcore_watch_watch_time_get_second_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_millisecond_p", utc_appcore_watch_watch_time_get_millisecond_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_millisecond_n", utc_appcore_watch_watch_time_get_millisecond_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_utc_time_p", utc_appcore_watch_watch_time_get_utc_time_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_utc_time_n1", utc_appcore_watch_watch_time_get_utc_time_n1, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_utc_time_n2", utc_appcore_watch_watch_time_get_utc_time_n2, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_utc_timestamp_p", utc_appcore_watch_watch_time_get_utc_timestamp_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_utc_timestamp_n", utc_appcore_watch_watch_time_get_utc_timestamp_n, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_time_zone_p", utc_appcore_watch_watch_time_get_time_zone_p, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_time_zone_n1", utc_appcore_watch_watch_time_get_time_zone_n1, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {"utc_appcore_watch_watch_time_get_time_zone_n2", utc_appcore_watch_watch_time_get_time_zone_n2, utc_appcore_watch_startup, utc_appcore_watch_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_APPCORE_WATCH_CORE_H__
diff --git a/src/utc/appcore-watch/utc-appcore-watch.c b/src/utc/appcore-watch/utc-appcore-watch.c
new file mode 100755 (executable)
index 0000000..0e338ba
--- /dev/null
@@ -0,0 +1,563 @@
+//
+// Copyright (c) 2015 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <watch_app.h>
+#include <Evas.h>
+#define TIMEZONE_BUFFER_MAX 1024
+
+static void handler(int sig)
+{
+    watch_app_exit();
+}
+
+void utc_appcore_watch_startup(void)
+{
+    alarm(4);
+}
+
+void utc_appcore_watch_cleanup(void)
+{
+    alarm(0);
+}
+
+static bool _app_create(int width, int height, void *user_data)
+{
+           return true;
+}
+
+static void _app_terminate(void *user_data)
+{
+}
+
+static void _app_control(app_control_h app_control, void *user_data)
+{
+}
+
+static void _app_pause(void *user_data)
+{
+}
+
+static void _app_resume(void *user_data)
+{
+}
+
+static void _app_time_tick(void *user_data)
+{
+}
+
+static void _app_ambient_tick(void *user_data)
+{
+}
+
+static void _app_ambient_changed(void *user_data)
+{
+}
+
+int utc_appcore_watch_watch_app_main_n1(void)
+{
+       int ret;
+       char *argv[] = {"test", "argv"};
+       watch_app_lifecycle_callback_s ops;
+
+       ops.create = (watch_app_create_cb)_app_create;
+
+       ret = watch_app_main(0, argv, &ops, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_app_main_n2(void)
+{
+       int ret;
+       int argc = 2;
+       watch_app_lifecycle_callback_s ops;
+
+       ops.create = (watch_app_create_cb)_app_create;
+
+       ret = watch_app_main(argc, NULL, &ops, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_appcore_watch_watch_app_main_n3(void)
+{
+       int ret;
+       int argc = 2;
+       char *argv[] = {"test", "argv"};
+       watch_app_lifecycle_callback_s ops;
+
+       ret = watch_app_main(argc, argv, NULL, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       ops.create = NULL;
+       ret = watch_app_main(argc, argv, &ops, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static void event_callback(void *event, void *data)
+{
+}
+
+int utc_appcore_watch_watch_app_add_event_handler_p(void)
+{
+       int ret;
+       app_event_handler_h handler;
+
+       ret = watch_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_app_remove_event_handler(handler);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_app_add_event_handler_n(void)
+{
+       int ret;
+       app_event_handler_h handler;
+
+       ret = watch_app_add_event_handler(NULL, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       ret = watch_app_add_event_handler(&handler, -1, (app_event_cb)event_callback, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       ret = watch_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, NULL, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_app_remove_event_handler_p(void)
+{
+       int ret;
+       app_event_handler_h handler;
+
+       ret = watch_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_app_remove_event_handler(handler);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_app_remove_event_handler_n(void)
+{
+       int ret;
+
+       ret = watch_app_remove_event_handler(NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_appcore_watch_watch_time_get_current_time_p(void)
+{
+       int ret;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_current_time_n(void)
+{
+       int ret;
+
+       ret = watch_time_get_current_time(NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_delete_p(void)
+{
+       int ret;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_delete(watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_delete_n(void)
+{
+       int ret;
+
+       ret = watch_time_delete(NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_year_p(void)
+{
+       int ret, year;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_year(watch_time, &year);
+       assert_eq(ret, APP_ERROR_NONE);
+
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_year_n(void)
+{
+       int ret, year;
+
+       ret = watch_time_get_year(NULL, &year);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_month_p(void)
+{
+       int ret, month;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_month(watch_time, &month);
+       assert_eq(ret, APP_ERROR_NONE);
+
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_month_n(void)
+{
+       int ret, month;
+
+       ret = watch_time_get_month(NULL, &month);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_day_p(void)
+{
+       int ret, day;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_day(watch_time, &day);
+       assert_eq(ret, APP_ERROR_NONE);
+
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_day_n(void)
+{
+       int ret, day;
+
+       ret = watch_time_get_day(NULL, &day);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_day_of_week_p(void)
+{
+       int ret, day_of_week;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_day_of_week(watch_time, &day_of_week);
+       assert_eq(ret, APP_ERROR_NONE);
+
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_day_of_week_n(void)
+{
+       int ret, day_of_week;
+
+       ret = watch_time_get_day_of_week(NULL, &day_of_week);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_hour_p(void)
+{
+       int ret, hour;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_hour(watch_time, &hour);
+       assert_eq(ret, APP_ERROR_NONE);
+
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_hour_n(void)
+{
+       int ret, hour;
+
+       ret = watch_time_get_hour(NULL, &hour);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_hour24_p(void)
+{
+       int ret, hour24;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_hour24(watch_time, &hour24);
+       assert_eq(ret, APP_ERROR_NONE);
+
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_hour24_n(void)
+{
+       int ret, hour24;
+
+       ret = watch_time_get_hour24(NULL, &hour24);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_minute_p(void)
+{
+       int ret, minute;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_minute(watch_time, &minute);
+       assert_eq(ret, APP_ERROR_NONE);
+
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_minute_n(void)
+{
+       int ret, minute;
+
+       ret = watch_time_get_minute(NULL, &minute);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_second_p(void)
+{
+       int ret, second;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_second(watch_time, &second);
+       assert_eq(ret, APP_ERROR_NONE);
+
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_second_n(void)
+{
+       int ret, second;
+
+       ret = watch_time_get_second(NULL, &second);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_millisecond_p(void)
+{
+       int ret, millisecond;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_millisecond(watch_time, &millisecond);
+       assert_eq(ret, APP_ERROR_NONE);
+
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_millisecond_n(void)
+{
+       int ret, millisecond;
+
+       ret = watch_time_get_millisecond(NULL, &millisecond);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_utc_time_p(void)
+{
+       int ret1, ret2;
+       struct tm *utc_time = calloc(1, sizeof(struct tm));
+       watch_time_h watch_time = {0,};
+
+       ret1 = watch_time_get_current_time(&watch_time);
+
+       ret2 = watch_time_get_utc_time(watch_time, utc_time);
+
+       free(utc_time);
+       assert_eq(ret1, APP_ERROR_NONE);
+       assert_eq(ret2, APP_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_utc_time_n1(void)
+{
+       int ret;
+       struct tm *utc_time = calloc(1, sizeof(struct tm));
+
+       ret = watch_time_get_utc_time(NULL, utc_time);
+
+       free(utc_time);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_utc_time_n2(void)
+{
+       int ret;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_utc_time(watch_time, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_utc_timestamp_p(void)
+{
+       int ret1, ret2;
+       time_t *time_stamp = calloc(1, sizeof(time_t));
+       watch_time_h watch_time = {0,};
+
+       ret1 = watch_time_get_current_time(&watch_time);
+
+       ret2 = watch_time_get_utc_timestamp(watch_time, time_stamp);
+
+       free(time_stamp);
+       assert_eq(ret1, APP_ERROR_NONE);
+       assert_eq(ret2, APP_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_utc_timestamp_n(void)
+{
+       int ret;
+       time_t *time_stamp = calloc(1, sizeof(time_t));
+
+       ret = watch_time_get_utc_timestamp(NULL, time_stamp);
+
+       free(time_stamp);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_time_zone_p(void)
+{
+       int ret;
+       char timezone[TIMEZONE_BUFFER_MAX] = {0,};
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_time_zone(watch_time, &timezone);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_time_zone_n1(void)
+{
+       int ret;
+       char timezone[TIMEZONE_BUFFER_MAX] = {0,};
+
+       ret = watch_time_get_time_zone(NULL, &timezone);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_watch_watch_time_get_time_zone_n2(void)
+{
+       int ret;
+       watch_time_h watch_time = {0,};
+
+       ret = watch_time_get_current_time(&watch_time);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = watch_time_get_time_zone(watch_time, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
diff --git a/src/utc/appcore-widget/CMakeLists.txt b/src/utc/appcore-widget/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..fbf6c68
--- /dev/null
@@ -0,0 +1,32 @@
+SET(PKG_NAME "appcore-widget")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-appfw-widget-application elementary widget_viewer widget_viewer_evas")
+SET(TC_SOURCES
+       utc-appcore-widget.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/appcore-widget/public.list b/src/utc/appcore-widget/public.list
new file mode 100755 (executable)
index 0000000..8e5223e
--- /dev/null
@@ -0,0 +1,15 @@
+widget_app_main
+widget_app_exit
+widget_app_terminate_context
+widget_app_foreach_context
+widget_app_add_event_handler
+widget_app_remove_event_handler
+widget_app_get_id
+widget_app_class_create
+widget_app_context_set_tag
+widget_app_context_get_tag
+widget_app_context_set_content_info
+widget_app_context_set_title
+widget_app_get_elm_win
+
+
diff --git a/src/utc/appcore-widget/tct-appcore-widget-core.c b/src/utc/appcore-widget/tct-appcore-widget-core.c
new file mode 100755 (executable)
index 0000000..6247509
--- /dev/null
@@ -0,0 +1,139 @@
+//
+// Copyright (c) 2015 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-appcore-widget-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <widget_app.h>
+#include <dlog.h>
+
+static char *func_name = NULL;
+
+int run_testcases(void)
+{
+       int result = -1;
+       int i;
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( func_name && !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               printf("\\file open failed\n");
+                               return -1;
+                       }
+                       fprintf(fres, "%d", result);
+                       fclose(fres);
+                       return result;
+               }
+       }
+       return 2;
+}
+
+static widget_class_h widget_app_create(void *user_data)
+{
+       run_testcases();
+
+       return NULL;
+}
+
+static int check_func_name(int argc, char **argv)
+{
+       gsize byte_size;
+       const gchar *encoded_byte;
+       guchar *byte = NULL;
+       const size_t sz_byte_len = sizeof(size_t);
+       const size_t sz_type = sizeof(int);
+       const size_t sz_keysize = sizeof(size_t);
+       const size_t sz_size = sizeof(size_t);
+
+       if ( argc > 2 )
+       {
+               encoded_byte = argv[3];
+               byte = g_base64_decode(encoded_byte, &byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte);
+               byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte);
+               byte += sz_size;
+               void *val = (void *)byte;
+               byte += size;
+
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+                {
+                        return -1;
+                }
+       
+
+               if ( func_name )
+               {
+                       if ( !strcmp(func_name, "utc_appcore_widget_widget_app_main_p")
+                               || !strcmp(func_name, "utc_appcore_widget_widget_app_main_n1")
+                               || !strcmp(func_name, "utc_appcore_widget_widget_app_main_n2")
+                               || !strcmp(func_name, "utc_appcore_widget_widget_app_main_n3")
+                               || !strcmp(func_name, "utc_appcore_widget_widget_app_exit_p") )
+                       {
+                               return 1;
+                       }
+               }
+       }
+
+       return 0;
+}
+
+int main(int argc, char *argv[])
+{
+       widget_app_lifecycle_callback_s event_callback = {0,};
+
+       if ( check_func_name(argc, argv) )
+       {
+               run_testcases();
+       }
+       else
+       {
+               event_callback.create = widget_app_create;
+               widget_app_main(argc, argv, &event_callback, NULL);
+       }
+
+       if (func_name)
+       {
+               free(func_name);
+       }
+       return 0;
+}
diff --git a/src/utc/appcore-widget/tct-appcore-widget-core.h b/src/utc/appcore-widget/tct-appcore-widget-core.h
new file mode 100755 (executable)
index 0000000..b1401b1
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_APPCORE_WIDGET_CORE_H__
+#define __TCT_APPCORE_WIDGET_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_appcore_widget_startup(void);
+extern void utc_appcore_widget_cleanup(void);
+
+extern int utc_appcore_widget_widget_app_main_p(void);
+extern int utc_appcore_widget_widget_app_main_n1(void);
+extern int utc_appcore_widget_widget_app_main_n2(void);
+extern int utc_appcore_widget_widget_app_main_n3(void);
+extern int utc_appcore_widget_widget_app_add_event_handler_p(void);
+extern int utc_appcore_widget_widget_app_add_event_handler_n(void);
+extern int utc_appcore_widget_widget_app_remove_event_handler_p(void);
+extern int utc_appcore_widget_widget_app_remove_event_handler_n(void);
+extern int utc_appcore_widget_widget_app_class_create_p(void);
+extern int utc_appcore_widget_widget_app_exit_p(void);
+extern int utc_appcore_widget_widget_app_terminate_context_n(void);
+extern int utc_appcore_widget_widget_app_foreach_context_p(void);
+extern int utc_appcore_widget_widget_app_foreach_context_n(void);
+extern int utc_appcore_widget_widget_app_get_id_n(void);
+extern int utc_appcore_widget_widget_app_context_set_tag_n(void);
+extern int utc_appcore_widget_widget_app_context_get_tag_n1(void);
+extern int utc_appcore_widget_widget_app_context_get_tag_n2(void);
+extern int utc_appcore_widget_widget_app_context_set_content_info_n(void);
+extern int utc_appcore_widget_widget_app_context_set_title_n(void);
+extern int utc_appcore_widget_widget_app_get_elm_win_n(void);
+
+testcase tc_array[] = {
+    {"utc_appcore_widget_widget_app_main_p", utc_appcore_widget_widget_app_main_p, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_main_n1", utc_appcore_widget_widget_app_main_n1, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_main_n2", utc_appcore_widget_widget_app_main_n2, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_main_n3", utc_appcore_widget_widget_app_main_n3, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_add_event_handler_p", utc_appcore_widget_widget_app_add_event_handler_p, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_add_event_handler_n", utc_appcore_widget_widget_app_add_event_handler_n, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_remove_event_handler_p", utc_appcore_widget_widget_app_remove_event_handler_p, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_remove_event_handler_n", utc_appcore_widget_widget_app_remove_event_handler_n, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_class_create_p", utc_appcore_widget_widget_app_class_create_p, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_exit_p", utc_appcore_widget_widget_app_exit_p, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_terminate_context_n", utc_appcore_widget_widget_app_terminate_context_n, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_foreach_context_p", utc_appcore_widget_widget_app_foreach_context_p, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_foreach_context_n", utc_appcore_widget_widget_app_foreach_context_n, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_get_id_n", utc_appcore_widget_widget_app_get_id_n, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_context_set_tag_n", utc_appcore_widget_widget_app_context_set_tag_n, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_context_get_tag_n1", utc_appcore_widget_widget_app_context_get_tag_n1, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_context_get_tag_n2", utc_appcore_widget_widget_app_context_get_tag_n2, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_context_set_content_info_n", utc_appcore_widget_widget_app_context_set_content_info_n, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_context_set_title_n", utc_appcore_widget_widget_app_context_set_title_n, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {"utc_appcore_widget_widget_app_get_elm_win_n", utc_appcore_widget_widget_app_get_elm_win_n, utc_appcore_widget_startup, utc_appcore_widget_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_APPCORE_WIDGET_CORE_H__
diff --git a/src/utc/appcore-widget/utc-appcore-widget.c b/src/utc/appcore-widget/utc-appcore-widget.c
new file mode 100755 (executable)
index 0000000..5423c94
--- /dev/null
@@ -0,0 +1,378 @@
+//
+// Copyright (c) 2015 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <widget_app.h>
+#include <widget_app_efl.h>
+#include <Evas.h>
+#include <glib.h>
+#include <widget_viewer.h>
+#include <widget_viewer_evas.h>
+#include <Elementary.h>
+
+static void handler(int sig)
+{
+       widget_app_exit();
+}
+
+void utc_appcore_widget_startup(void)
+{
+       alarm(4);
+}
+
+void utc_appcore_widget_cleanup(void)
+{
+       alarm(0);
+}
+
+static int widget_obj_create(widget_context_h context, bundle *content, int w,
+                             int h, void *user_data)
+{
+       widget_app_exit();
+       return 0;
+}
+
+static int widget_obj_destroy(widget_context_h context,
+                              widget_app_destroy_type_e reason, bundle *content, void *user_data)
+{
+       return 0;
+}
+
+static int widget_obj_pause(widget_context_h context, void *user_data)
+{
+       return 0;
+}
+
+static int widget_obj_resume(widget_context_h context, void *user_data)
+{
+       return 0;
+}
+
+static int widget_obj_update(widget_context_h context, bundle *content,
+                             int force, void *user_data)
+{
+       return 0;
+}
+
+static int widget_obj_resize(widget_context_h context, int w, int h, void *user_data)
+{
+       return 0;
+}
+
+static widget_class_h _app_create(void *user_data)
+{
+       widget_instance_lifecycle_callback_s ops = {
+               .create = widget_obj_create,
+               .destroy = widget_obj_destroy,
+               .pause = widget_obj_pause,
+               .resume = widget_obj_resume,
+               .update = widget_obj_update,
+               .resize = widget_obj_resize,
+       };
+
+       return widget_app_class_create(ops, user_data);
+}
+
+static void _app_terminate(void *user_data)
+{
+}
+
+int utc_appcore_widget_widget_app_main_p(void)
+{
+       int ret = WIDGET_ERROR_NONE;
+       widget_app_lifecycle_callback_s callback = {0,};
+       int argc = 1;
+       char **argv;
+       argv = malloc(1 * sizeof(char *));
+       assert_neq(argv, NULL);
+
+       argv[0] = "widget_app";
+
+       signal(SIGALRM, (void *)handler);
+
+       callback.create = _app_create;
+       callback.terminate = _app_terminate;
+
+       ret = widget_app_main(argc, argv, &callback, NULL);
+
+       free(argv);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_main_n1(void)
+{
+       int ret;
+       char *argv[] = {"test", "argv"};
+       widget_app_lifecycle_callback_s ops;
+
+       ops.create = (widget_app_create_cb)_app_create;
+
+       ret = widget_app_main(0, argv, &ops, NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_main_n2(void)
+{
+       int ret;
+       int argc = 2;
+       widget_app_lifecycle_callback_s ops;
+
+       ops.create = (widget_app_create_cb)_app_create;
+
+       ret = widget_app_main(argc, NULL, &ops, NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_appcore_widget_widget_app_main_n3(void)
+{
+       int ret;
+       int argc = 2;
+       char *argv[] = {"test", "argv"};
+       widget_app_lifecycle_callback_s ops;
+
+       ret = widget_app_main(argc, argv, NULL, NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       ops.create = NULL;
+       ret = widget_app_main(argc, argv, &ops, NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static void event_callback(void *event, void *data)
+{
+}
+
+int utc_appcore_widget_widget_app_add_event_handler_p(void)
+{
+       int ret;
+       app_event_handler_h handler;
+
+       ret = widget_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY,
+                                          (app_event_cb)event_callback, NULL);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_app_remove_event_handler(handler);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_add_event_handler_n(void)
+{
+       int ret;
+       app_event_handler_h handler;
+
+       ret = widget_app_add_event_handler(NULL, APP_EVENT_LOW_MEMORY,
+                                          (app_event_cb)event_callback, NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       ret = widget_app_add_event_handler(&handler, -1, (app_event_cb)event_callback,
+                                          NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       ret = widget_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, NULL, NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_remove_event_handler_p(void)
+{
+       int ret;
+       app_event_handler_h handler;
+
+       ret = widget_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY,
+                                          (app_event_cb)event_callback, NULL);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_app_remove_event_handler(handler);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_remove_event_handler_n(void)
+{
+       int ret;
+
+       ret = widget_app_remove_event_handler(NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_class_create_p(void)
+{
+       widget_instance_lifecycle_callback_s ops = {
+               .create = widget_obj_create,
+               .destroy = widget_obj_destroy,
+               .pause = widget_obj_pause,
+               .resume = widget_obj_resume,
+               .update = widget_obj_update,
+               .resize = widget_obj_resize,
+       };
+
+       widget_class_h  ch;
+
+       ch = widget_app_class_create(ops, NULL);
+       assert_eq(get_last_result(), WIDGET_ERROR_NONE);
+       return 0;
+}
+
+static gboolean __widget_app_exit(gpointer user_data)
+{
+       widget_app_exit();
+       return FALSE;
+}
+
+static widget_class_h _app_create_and_exit(void *user_data)
+{
+       widget_instance_lifecycle_callback_s ops = {
+               .create = widget_obj_create,
+               .destroy = widget_obj_destroy,
+               .pause = widget_obj_pause,
+               .resume = widget_obj_resume,
+               .update = widget_obj_update,
+               .resize = widget_obj_resize,
+       };
+
+       g_idle_add(__widget_app_exit, NULL);
+       return widget_app_class_create(ops, user_data);
+}
+
+int utc_appcore_widget_widget_app_exit_p(void)
+{
+       int ret = WIDGET_ERROR_NONE;
+       widget_app_lifecycle_callback_s callback = {0,};
+       int argc = 1;
+       char **argv;
+       argv = malloc(1 * sizeof(char *));
+       assert_neq(argv, NULL);
+
+       argv[0] = "widget_app";
+
+       callback.create = _app_create_and_exit;
+       callback.terminate = NULL;
+
+       ret = widget_app_main(argc, argv, &callback, NULL);
+
+       free(argv);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_terminate_context_n(void)
+{
+       int ret = widget_app_terminate_context(NULL);
+
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+static bool __foreach_cb(widget_context_h context, void *data)
+{
+       return true;
+}
+
+int utc_appcore_widget_widget_app_foreach_context_p(void)
+{
+       int ret = widget_app_foreach_context(__foreach_cb, NULL);
+
+       assert_eq(ret, WIDGET_ERROR_NONE);
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_foreach_context_n(void)
+{
+       int ret = widget_app_foreach_context(NULL, NULL);
+
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_get_id_n(void)
+{
+       const char* id = widget_app_get_id(NULL);
+
+       assert_eq(get_last_result(), WIDGET_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_context_set_tag_n(void)
+{
+       int ret = widget_app_context_set_tag(NULL, NULL);
+
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_context_get_tag_n1(void)
+{
+       void *tag;
+       int ret = widget_app_context_get_tag(NULL, &tag);
+
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_context_get_tag_n2(void)
+{
+       widget_context_h h;
+       char buf[10];
+
+       h = (widget_context_h) &buf[0];
+       int ret = widget_app_context_get_tag(h, NULL);
+
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_context_set_content_info_n(void)
+{
+       int ret = widget_app_context_set_content_info(NULL, NULL);
+
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_context_set_title_n(void)
+{
+       int ret = widget_app_context_set_title(NULL, "test");
+
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_appcore_widget_widget_app_get_elm_win_n(void)
+{
+       Evas_Object *win;
+
+       int ret = widget_app_get_elm_win(NULL, &win);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+
diff --git a/src/utc/application/CMakeLists.txt b/src/utc/application/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..4eae3f0
--- /dev/null
@@ -0,0 +1,40 @@
+SET(PKG_NAME "application")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-appfw-application")
+SET(TC_SOURCES
+       utc_app.c
+       utc_i18n.c
+       utc_preference.c
+       utc_app_control.c
+       utc_alarm.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       gobject-2.0
+       capi-appfw-preference
+       capi-appfw-alarm
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/application/platform.list b/src/utc/application/platform.list
new file mode 100755 (executable)
index 0000000..b513810
--- /dev/null
@@ -0,0 +1,8 @@
+app_get_preinitialized_background
+app_get_preinitialized_conformant
+app_get_preinitialized_window
+app_set_reclaiming_system_cache_on_pause
+service_get_window
+service_request_transient_app
+service_set_window
+service_to_bundle
\ No newline at end of file
diff --git a/src/utc/application/public.list b/src/utc/application/public.list
new file mode 100755 (executable)
index 0000000..66daa79
--- /dev/null
@@ -0,0 +1,75 @@
+alarm_cancel
+alarm_cancel_all
+alarm_foreach_registered_alarm
+alarm_get_app_control
+alarm_get_current_time
+alarm_get_scheduled_date
+alarm_get_scheduled_period
+alarm_get_scheduled_recurrence_week_flag
+alarm_schedule_after_delay
+alarm_schedule_at_date
+alarm_schedule_with_recurrence_week_flag
+app_control_add_extra_data
+app_control_add_extra_data_array
+app_control_clone
+app_control_create
+app_control_destroy
+app_control_foreach_app_matched
+app_control_foreach_extra_data
+app_control_get_app_id
+app_control_get_caller
+app_control_get_category
+app_control_get_extra_data
+app_control_get_extra_data_array
+app_control_get_mime
+app_control_get_operation
+app_control_get_uri
+app_control_is_extra_data_array
+app_control_is_reply_requested
+app_control_remove_extra_data
+app_control_reply_to_launch_request
+app_control_send_launch_request
+app_control_send_terminate_request
+app_control_set_app_id
+app_control_set_category
+app_control_set_mime
+app_control_set_operation
+app_control_set_uri
+app_get_cache_path
+app_get_data_path
+app_get_device_orientation
+app_get_external_cache_path
+app_get_external_data_path
+app_get_external_shared_data_path
+app_get_id
+app_get_name
+app_get_resource_path
+app_get_shared_data_path
+app_get_shared_resource_path
+app_get_shared_trusted_path
+app_get_version
+ui_app_main
+ui_app_exit
+ui_app_add_event_handler
+ui_app_remove_event_handler
+app_event_get_low_memory_status
+app_event_get_low_battery_status
+app_event_get_language
+app_event_get_region_format
+app_event_get_device_orientation
+i18n_get_text
+preference_foreach_item
+preference_get_boolean
+preference_get_double
+preference_get_int
+preference_get_string
+preference_is_existing
+preference_remove
+preference_remove_all
+preference_set_boolean
+preference_set_changed_cb
+preference_set_double
+preference_set_int
+preference_set_string
+preference_unset_changed_cb
+
diff --git a/src/utc/application/res/org.tizen.helloworld-1.0.0-arm.tpk b/src/utc/application/res/org.tizen.helloworld-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..4ff7e82
Binary files /dev/null and b/src/utc/application/res/org.tizen.helloworld-1.0.0-arm.tpk differ
diff --git a/src/utc/application/res/org.tizen.helloworld-1.0.0-i386.tpk b/src/utc/application/res/org.tizen.helloworld-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..1da0b57
Binary files /dev/null and b/src/utc/application/res/org.tizen.helloworld-1.0.0-i386.tpk differ
diff --git a/src/utc/application/tct-application-core.c b/src/utc/application/tct-application-core.c
new file mode 100755 (executable)
index 0000000..8961817
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-application-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/application/tct-application-core.h b/src/utc/application/tct-application-core.h
new file mode 100755 (executable)
index 0000000..457ae5c
--- /dev/null
@@ -0,0 +1,403 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_APPLICATION_CORE_H__
+#define __TCT_APPLICATION_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_preference_startup(void);
+extern void utc_preference_cleanup(void);
+extern void utc_alarm_startup(void);
+extern void utc_alarm_cleanup(void);
+
+extern int utc_app_get_name_p(void);
+extern int utc_app_get_name_n(void);
+extern int utc_app_get_version_p(void);
+extern int utc_app_get_version_n(void);
+extern int utc_app_get_device_orientation_p(void);
+extern int utc_app_get_id_p(void);
+extern int utc_app_get_id_n(void);
+extern int utc_application_app_get_cache_path_p(void);
+extern int utc_application_app_get_data_path_p(void);
+extern int utc_application_app_get_resource_path_p(void);
+extern int utc_application_app_get_external_cache_path_p(void);
+extern int utc_application_app_get_external_data_path_p(void);
+extern int utc_application_app_get_external_shared_data_path_p(void);
+extern int utc_application_app_get_shared_data_path_p(void);
+extern int utc_application_app_get_shared_resource_path_p(void);
+extern int utc_application_app_get_shared_trusted_path_p(void);
+extern int utc_application_app_event_get_low_memory_status_n(void);
+extern int utc_application_app_event_get_low_battery_status_n(void);
+extern int utc_application_app_event_get_language_n(void);
+extern int utc_application_app_event_get_device_orientation_n(void);
+extern int utc_application_app_event_get_region_format_n(void);
+extern int utc_ui_app_main_n1(void);
+extern int utc_ui_app_main_n2(void);
+extern int utc_ui_app_add_event_handler_p(void);
+extern int utc_ui_app_add_event_handler_n(void);
+extern int utc_ui_app_remove_event_handler_p(void);
+extern int utc_ui_app_remove_event_handler_n(void);
+extern int utc_i18n_get_text_p(void);
+extern int utc_i18n_get_text_n(void);
+extern int utc_preference_set_int_p(void);
+extern int utc_preference_set_int_n(void);
+extern int utc_preference_set_double_p(void);
+extern int utc_preference_set_double_n(void);
+extern int utc_preference_set_string_p(void);
+extern int utc_preference_set_string_n(void);
+extern int utc_preference_set_boolean_p(void);
+extern int utc_preference_set_boolean_n(void);
+extern int utc_preference_get_int_p(void);
+extern int utc_preference_get_int_n1(void);
+extern int utc_preference_get_int_n2(void);
+extern int utc_preference_get_int_n3(void);
+extern int utc_preference_get_double_p(void);
+extern int utc_preference_get_double_n1(void);
+extern int utc_preference_get_double_n2(void);
+extern int utc_preference_get_double_n3(void);
+extern int utc_preference_get_string_p(void);
+extern int utc_preference_get_string_n1(void);
+extern int utc_preference_get_string_n2(void);
+extern int utc_preference_get_string_n3(void);
+extern int utc_preference_get_boolean_p(void);
+extern int utc_preference_get_boolean_n1(void);
+extern int utc_preference_get_boolean_n2(void);
+extern int utc_preference_get_boolean_n3(void);
+extern int utc_preference_remove_p(void);
+extern int utc_preference_remove_n1(void);
+extern int utc_preference_remove_n2(void);
+extern int utc_preference_remove_all_p(void);
+extern int utc_preference_is_existing_p1(void);
+extern int utc_preference_is_existing_p2(void);
+extern int utc_preference_is_existing_n1(void);
+extern int utc_preference_is_existing_n2(void);
+extern int utc_preference_set_changed_cb_p1(void);
+extern int utc_preference_set_changed_cb_p2(void);
+extern int utc_preference_set_changed_cb_n1(void);
+extern int utc_preference_set_changed_cb_n2(void);
+extern int utc_preference_set_changed_cb_n3(void);
+extern int utc_preference_unset_changed_cb_p1(void);
+extern int utc_preference_unset_changed_cb_n1(void);
+extern int utc_preference_unset_changed_cb_n2(void);
+extern int utc_preference_foreach_item_p(void);
+extern int utc_preference_foreach_item_n(void);
+extern int utc_app_control_create_p(void);
+extern int utc_app_control_create_n(void);
+extern int utc_app_control_destroy_p(void);
+extern int utc_app_control_destroy_n(void);
+extern int utc_app_control_set_operation_p1(void);
+extern int utc_app_control_set_operation_p2(void);
+extern int utc_app_control_set_operation_n(void);
+extern int utc_app_control_get_operation_p(void);
+extern int utc_app_control_get_operation_n1(void);
+extern int utc_app_control_get_operation_n2(void);
+extern int utc_app_control_get_operation_n3(void);
+extern int utc_app_control_set_uri_p1(void);
+extern int utc_app_control_set_uri_p2(void);
+extern int utc_app_control_set_uri_n(void);
+extern int utc_app_control_get_uri_p(void);
+extern int utc_app_control_get_uri_n1(void);
+extern int utc_app_control_get_uri_n2(void);
+extern int utc_app_control_get_uri_n3(void);
+extern int utc_app_control_set_mime_p1(void);
+extern int utc_app_control_set_mime_p2(void);
+extern int utc_app_control_set_mime_n(void);
+extern int utc_app_control_get_mime_p(void);
+extern int utc_app_control_get_mime_n1(void);
+extern int utc_app_control_get_mime_n2(void);
+extern int utc_app_control_get_mime_n3(void);
+extern int utc_app_control_set_app_id_p1(void);
+extern int utc_app_control_set_app_id_p2(void);
+extern int utc_app_control_set_app_id_n1(void);
+extern int utc_app_control_set_app_id_n2(void);
+extern int utc_app_control_get_app_id_p(void);
+extern int utc_app_control_get_app_id_n1(void);
+extern int utc_app_control_get_app_id_n2(void);
+extern int utc_app_control_get_app_id_n3(void);
+extern int utc_app_control_set_category_p1(void);
+extern int utc_app_control_set_category_p2(void);
+extern int utc_app_control_set_category_n1(void);
+extern int utc_app_control_set_category_n2(void);
+extern int utc_app_control_get_category_p(void);
+extern int utc_app_control_get_category_n1(void);
+extern int utc_app_control_get_category_n2(void);
+extern int utc_app_control_get_category_n3(void);
+extern int utc_app_control_add_extra_data_p(void);
+extern int utc_app_control_add_extra_data_n1(void);
+extern int utc_app_control_add_extra_data_n2(void);
+extern int utc_app_control_remove_extra_data_p(void);
+extern int utc_app_control_remove_extra_data_n1(void);
+extern int utc_app_control_remove_extra_data_n2(void);
+extern int utc_app_control_remove_extra_data_n3(void);
+extern int utc_app_control_get_extra_data_p(void);
+extern int utc_app_control_get_extra_data_n1(void);
+extern int utc_app_control_get_extra_data_n2(void);
+extern int utc_app_control_get_extra_data_n3(void);
+extern int utc_app_control_get_extra_data_n4(void);
+extern int utc_app_control_foreach_extra_data_p(void);
+extern int utc_app_control_foreach_extra_data_n1(void);
+extern int utc_app_control_foreach_extra_data_n2(void);
+extern int utc_app_control_clone_p(void);
+extern int utc_app_control_clone_n1(void);
+extern int utc_app_control_clone_n2(void);
+extern int utc_app_control_send_launch_request_p1(void);
+extern int utc_app_control_send_launch_request_p2(void);
+extern int utc_app_control_send_launch_request_p3(void);
+extern int utc_app_control_send_launch_request_n1(void);
+extern int utc_app_control_send_launch_request_n2(void);
+extern int utc_app_control_reply_to_launch_request_n1(void);
+extern int utc_app_control_reply_to_launch_request_n2(void);
+extern int utc_app_control_reply_to_launch_request_n3(void);
+extern int utc_app_control_foreach_app_matched_p(void);
+extern int utc_app_control_foreach_app_matched_n1(void);
+extern int utc_app_control_foreach_app_matched_n2(void);
+extern int utc_app_control_add_extra_data_array_p(void);
+extern int utc_app_control_add_extra_data_array_n1(void);
+extern int utc_app_control_add_extra_data_array_n2(void);
+extern int utc_app_control_add_extra_data_array_n3(void);
+extern int utc_app_control_get_extra_data_array_p(void);
+extern int utc_app_control_get_extra_data_array_n1(void);
+extern int utc_app_control_get_extra_data_array_n2(void);
+extern int utc_app_control_get_extra_data_array_n3(void);
+extern int utc_app_control_get_extra_data_array_n4(void);
+extern int utc_app_control_get_extra_data_array_n5(void);
+extern int utc_app_control_is_extra_data_array_p1(void);
+extern int utc_app_control_is_extra_data_array_p2(void);
+extern int utc_app_control_is_extra_data_array_n1(void);
+extern int utc_app_control_is_extra_data_array_n2(void);
+extern int utc_app_control_is_extra_data_array_n3(void);
+extern int utc_app_control_is_reply_requested_n1(void);
+extern int utc_app_control_is_reply_requested_n2(void);
+extern int utc_app_control_is_reply_requested_n3(void);
+extern int utc_app_control_is_reply_requested_n4(void);
+extern int utc_app_control_get_caller_n1(void);
+extern int utc_app_control_get_caller_n2(void);
+extern int utc_app_control_get_caller_n3(void);
+extern int utc_app_control_send_terminate_request_p(void);
+extern int utc_app_control_send_terminate_request_n(void);
+extern int utc_alarm_schedule_after_delay_p(void);
+extern int utc_alarm_schedule_after_delay_n(void);
+extern int utc_alarm_cancel_p(void);
+extern int utc_alarm_cancel_n(void);
+extern int utc_alarm_cancel_all_p(void);
+extern int utc_alarm_foreach_registered_alarm_p(void);
+extern int utc_alarm_foreach_registered_alarm_n(void);
+extern int utc_alarm_get_scheduled_date_p(void);
+extern int utc_alarm_get_scheduled_date_n(void);
+extern int utc_alarm_get_scheduled_period_p(void);
+extern int utc_alarm_get_scheduled_period_n(void);
+extern int utc_alarm_schedule_at_date_p(void);
+extern int utc_alarm_schedule_at_date_n(void);
+extern int utc_alarm_schedule_with_recurrence_week_flag_p(void);
+extern int utc_alarm_schedule_with_recurrence_week_flag_n(void);
+extern int utc_alarm_get_scheduled_recurrence_week_flag_p(void);
+extern int utc_alarm_get_scheduled_recurrence_week_flag_n(void);
+extern int utc_alarm_get_current_time_p(void);
+extern int utc_alarm_get_current_time_n(void);
+extern int utc_alarm_get_app_control_p(void);
+extern int utc_alarm_get_app_control_n(void);
+
+testcase tc_array[] = {
+    {"utc_app_get_name_p", utc_app_get_name_p, NULL, NULL},
+    {"utc_app_get_name_n", utc_app_get_name_n, NULL, NULL},
+    {"utc_app_get_version_p", utc_app_get_version_p, NULL, NULL},
+    {"utc_app_get_version_n", utc_app_get_version_n, NULL, NULL},
+    {"utc_app_get_device_orientation_p", utc_app_get_device_orientation_p, NULL, NULL},
+    {"utc_app_get_id_p", utc_app_get_id_p, NULL, NULL},
+    {"utc_app_get_id_n", utc_app_get_id_n, NULL, NULL},
+    {"utc_application_app_get_cache_path_p", utc_application_app_get_cache_path_p, NULL, NULL},
+    {"utc_application_app_get_data_path_p", utc_application_app_get_data_path_p, NULL, NULL},
+    {"utc_application_app_get_resource_path_p", utc_application_app_get_resource_path_p, NULL, NULL},
+    {"utc_application_app_get_external_cache_path_p", utc_application_app_get_external_cache_path_p, NULL, NULL},
+    {"utc_application_app_get_external_data_path_p", utc_application_app_get_external_data_path_p, NULL, NULL},
+    {"utc_application_app_get_external_shared_data_path_p", utc_application_app_get_external_shared_data_path_p, NULL, NULL},
+    {"utc_application_app_get_shared_data_path_p", utc_application_app_get_shared_data_path_p, NULL, NULL},
+    {"utc_application_app_get_shared_resource_path_p", utc_application_app_get_shared_resource_path_p, NULL, NULL},
+    {"utc_application_app_get_shared_trusted_path_p", utc_application_app_get_shared_trusted_path_p, NULL, NULL},
+    {"utc_application_app_event_get_low_memory_status_n", utc_application_app_event_get_low_memory_status_n, NULL, NULL},
+    {"utc_application_app_event_get_low_battery_status_n", utc_application_app_event_get_low_battery_status_n, NULL, NULL},
+    {"utc_application_app_event_get_language_n", utc_application_app_event_get_language_n, NULL, NULL},
+    {"utc_application_app_event_get_device_orientation_n", utc_application_app_event_get_device_orientation_n, NULL, NULL},
+    {"utc_application_app_event_get_region_format_n", utc_application_app_event_get_region_format_n, NULL, NULL},
+    {"utc_ui_app_main_n1", utc_ui_app_main_n1, NULL, NULL},
+    {"utc_ui_app_main_n2", utc_ui_app_main_n2, NULL, NULL},
+    {"utc_ui_app_add_event_handler_p", utc_ui_app_add_event_handler_p, NULL, NULL},
+    {"utc_ui_app_add_event_handler_n", utc_ui_app_add_event_handler_n, NULL, NULL},
+    {"utc_ui_app_remove_event_handler_p", utc_ui_app_remove_event_handler_p, NULL, NULL},
+    {"utc_ui_app_remove_event_handler_n", utc_ui_app_remove_event_handler_n, NULL, NULL},
+    {"utc_i18n_get_text_p", utc_i18n_get_text_p, NULL, NULL},
+    {"utc_i18n_get_text_n", utc_i18n_get_text_n, NULL, NULL},
+    {"utc_preference_set_int_p", utc_preference_set_int_p, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_int_n", utc_preference_set_int_n, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_double_p", utc_preference_set_double_p, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_double_n", utc_preference_set_double_n, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_string_p", utc_preference_set_string_p, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_string_n", utc_preference_set_string_n, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_boolean_p", utc_preference_set_boolean_p, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_boolean_n", utc_preference_set_boolean_n, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_int_p", utc_preference_get_int_p, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_int_n1", utc_preference_get_int_n1, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_int_n2", utc_preference_get_int_n2, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_int_n3", utc_preference_get_int_n3, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_double_p", utc_preference_get_double_p, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_double_n1", utc_preference_get_double_n1, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_double_n2", utc_preference_get_double_n2, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_double_n3", utc_preference_get_double_n3, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_string_p", utc_preference_get_string_p, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_string_n1", utc_preference_get_string_n1, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_string_n2", utc_preference_get_string_n2, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_string_n3", utc_preference_get_string_n3, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_boolean_p", utc_preference_get_boolean_p, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_boolean_n1", utc_preference_get_boolean_n1, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_boolean_n2", utc_preference_get_boolean_n2, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_get_boolean_n3", utc_preference_get_boolean_n3, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_remove_p", utc_preference_remove_p, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_remove_n1", utc_preference_remove_n1, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_remove_n2", utc_preference_remove_n2, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_remove_all_p", utc_preference_remove_all_p, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_is_existing_p1", utc_preference_is_existing_p1, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_is_existing_p2", utc_preference_is_existing_p2, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_is_existing_n1", utc_preference_is_existing_n1, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_is_existing_n2", utc_preference_is_existing_n2, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_changed_cb_p1", utc_preference_set_changed_cb_p1, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_changed_cb_p2", utc_preference_set_changed_cb_p2, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_changed_cb_n1", utc_preference_set_changed_cb_n1, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_changed_cb_n2", utc_preference_set_changed_cb_n2, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_set_changed_cb_n3", utc_preference_set_changed_cb_n3, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_unset_changed_cb_p1", utc_preference_unset_changed_cb_p1, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_unset_changed_cb_n1", utc_preference_unset_changed_cb_n1, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_unset_changed_cb_n2", utc_preference_unset_changed_cb_n2, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_foreach_item_p", utc_preference_foreach_item_p, utc_preference_startup, utc_preference_cleanup},
+    {"utc_preference_foreach_item_n", utc_preference_foreach_item_n, utc_preference_startup, utc_preference_cleanup},
+    {"utc_app_control_create_p", utc_app_control_create_p, NULL, NULL},
+    {"utc_app_control_create_n", utc_app_control_create_n, NULL, NULL},
+    {"utc_app_control_destroy_p", utc_app_control_destroy_p, NULL, NULL},
+    {"utc_app_control_destroy_n", utc_app_control_destroy_n, NULL, NULL},
+    {"utc_app_control_set_operation_p1", utc_app_control_set_operation_p1, NULL, NULL},
+    {"utc_app_control_set_operation_p2", utc_app_control_set_operation_p2, NULL, NULL},
+    {"utc_app_control_set_operation_n", utc_app_control_set_operation_n, NULL, NULL},
+    {"utc_app_control_get_operation_p", utc_app_control_get_operation_p, NULL, NULL},
+    {"utc_app_control_get_operation_n1", utc_app_control_get_operation_n1, NULL, NULL},
+    {"utc_app_control_get_operation_n2", utc_app_control_get_operation_n2, NULL, NULL},
+    {"utc_app_control_get_operation_n3", utc_app_control_get_operation_n3, NULL, NULL},
+    {"utc_app_control_set_uri_p1", utc_app_control_set_uri_p1, NULL, NULL},
+    {"utc_app_control_set_uri_p2", utc_app_control_set_uri_p2, NULL, NULL},
+    {"utc_app_control_set_uri_n", utc_app_control_set_uri_n, NULL, NULL},
+    {"utc_app_control_get_uri_p", utc_app_control_get_uri_p, NULL, NULL},
+    {"utc_app_control_get_uri_n1", utc_app_control_get_uri_n1, NULL, NULL},
+    {"utc_app_control_get_uri_n2", utc_app_control_get_uri_n2, NULL, NULL},
+    {"utc_app_control_get_uri_n3", utc_app_control_get_uri_n3, NULL, NULL},
+    {"utc_app_control_set_mime_p1", utc_app_control_set_mime_p1, NULL, NULL},
+    {"utc_app_control_set_mime_p2", utc_app_control_set_mime_p2, NULL, NULL},
+    {"utc_app_control_set_mime_n", utc_app_control_set_mime_n, NULL, NULL},
+    {"utc_app_control_get_mime_p", utc_app_control_get_mime_p, NULL, NULL},
+    {"utc_app_control_get_mime_n1", utc_app_control_get_mime_n1, NULL, NULL},
+    {"utc_app_control_get_mime_n2", utc_app_control_get_mime_n2, NULL, NULL},
+    {"utc_app_control_get_mime_n3", utc_app_control_get_mime_n3, NULL, NULL},
+    {"utc_app_control_set_app_id_p1", utc_app_control_set_app_id_p1, NULL, NULL},
+    {"utc_app_control_set_app_id_p2", utc_app_control_set_app_id_p2, NULL, NULL},
+    {"utc_app_control_set_app_id_n1", utc_app_control_set_app_id_n1, NULL, NULL},
+    {"utc_app_control_set_app_id_n2", utc_app_control_set_app_id_n2, NULL, NULL},
+    {"utc_app_control_get_app_id_p", utc_app_control_get_app_id_p, NULL, NULL},
+    {"utc_app_control_get_app_id_n1", utc_app_control_get_app_id_n1, NULL, NULL},
+    {"utc_app_control_get_app_id_n2", utc_app_control_get_app_id_n2, NULL, NULL},
+    {"utc_app_control_get_app_id_n3", utc_app_control_get_app_id_n3, NULL, NULL},
+    {"utc_app_control_set_category_p1", utc_app_control_set_category_p1, NULL, NULL},
+    {"utc_app_control_set_category_p2", utc_app_control_set_category_p2, NULL, NULL},
+    {"utc_app_control_set_category_n1", utc_app_control_set_category_n1, NULL, NULL},
+    {"utc_app_control_set_category_n2", utc_app_control_set_category_n2, NULL, NULL},
+    {"utc_app_control_get_category_p", utc_app_control_get_category_p, NULL, NULL},
+    {"utc_app_control_get_category_n1", utc_app_control_get_category_n1, NULL, NULL},
+    {"utc_app_control_get_category_n2", utc_app_control_get_category_n2, NULL, NULL},
+    {"utc_app_control_get_category_n3", utc_app_control_get_category_n3, NULL, NULL},
+    {"utc_app_control_add_extra_data_p", utc_app_control_add_extra_data_p, NULL, NULL},
+    {"utc_app_control_add_extra_data_n1", utc_app_control_add_extra_data_n1, NULL, NULL},
+    {"utc_app_control_add_extra_data_n2", utc_app_control_add_extra_data_n2, NULL, NULL},
+    {"utc_app_control_remove_extra_data_p", utc_app_control_remove_extra_data_p, NULL, NULL},
+    {"utc_app_control_remove_extra_data_n1", utc_app_control_remove_extra_data_n1, NULL, NULL},
+    {"utc_app_control_remove_extra_data_n2", utc_app_control_remove_extra_data_n2, NULL, NULL},
+    {"utc_app_control_remove_extra_data_n3", utc_app_control_remove_extra_data_n3, NULL, NULL},
+    {"utc_app_control_get_extra_data_p", utc_app_control_get_extra_data_p, NULL, NULL},
+    {"utc_app_control_get_extra_data_n1", utc_app_control_get_extra_data_n1, NULL, NULL},
+    {"utc_app_control_get_extra_data_n2", utc_app_control_get_extra_data_n2, NULL, NULL},
+    {"utc_app_control_get_extra_data_n3", utc_app_control_get_extra_data_n3, NULL, NULL},
+    {"utc_app_control_get_extra_data_n4", utc_app_control_get_extra_data_n4, NULL, NULL},
+    {"utc_app_control_foreach_extra_data_p", utc_app_control_foreach_extra_data_p, NULL, NULL},
+    {"utc_app_control_foreach_extra_data_n1", utc_app_control_foreach_extra_data_n1, NULL, NULL},
+    {"utc_app_control_foreach_extra_data_n2", utc_app_control_foreach_extra_data_n2, NULL, NULL},
+    {"utc_app_control_clone_p", utc_app_control_clone_p, NULL, NULL},
+    {"utc_app_control_clone_n1", utc_app_control_clone_n1, NULL, NULL},
+    {"utc_app_control_clone_n2", utc_app_control_clone_n2, NULL, NULL},
+    {"utc_app_control_send_launch_request_p1", utc_app_control_send_launch_request_p1, NULL, NULL},
+    {"utc_app_control_send_launch_request_p2", utc_app_control_send_launch_request_p2, NULL, NULL},
+    {"utc_app_control_send_launch_request_p3", utc_app_control_send_launch_request_p3, NULL, NULL},
+    {"utc_app_control_send_launch_request_n1", utc_app_control_send_launch_request_n1, NULL, NULL},
+    {"utc_app_control_send_launch_request_n2", utc_app_control_send_launch_request_n2, NULL, NULL},
+    {"utc_app_control_reply_to_launch_request_n1", utc_app_control_reply_to_launch_request_n1, NULL, NULL},
+    {"utc_app_control_reply_to_launch_request_n2", utc_app_control_reply_to_launch_request_n2, NULL, NULL},
+    {"utc_app_control_reply_to_launch_request_n3", utc_app_control_reply_to_launch_request_n3, NULL, NULL},
+    {"utc_app_control_foreach_app_matched_p", utc_app_control_foreach_app_matched_p, NULL, NULL},
+    {"utc_app_control_foreach_app_matched_n1", utc_app_control_foreach_app_matched_n1, NULL, NULL},
+    {"utc_app_control_foreach_app_matched_n2", utc_app_control_foreach_app_matched_n2, NULL, NULL},
+    {"utc_app_control_add_extra_data_array_p", utc_app_control_add_extra_data_array_p, NULL, NULL},
+    {"utc_app_control_add_extra_data_array_n1", utc_app_control_add_extra_data_array_n1, NULL, NULL},
+    {"utc_app_control_add_extra_data_array_n2", utc_app_control_add_extra_data_array_n2, NULL, NULL},
+    {"utc_app_control_add_extra_data_array_n3", utc_app_control_add_extra_data_array_n3, NULL, NULL},
+    {"utc_app_control_get_extra_data_array_p", utc_app_control_get_extra_data_array_p, NULL, NULL},
+    {"utc_app_control_get_extra_data_array_n1", utc_app_control_get_extra_data_array_n1, NULL, NULL},
+    {"utc_app_control_get_extra_data_array_n2", utc_app_control_get_extra_data_array_n2, NULL, NULL},
+    {"utc_app_control_get_extra_data_array_n3", utc_app_control_get_extra_data_array_n3, NULL, NULL},
+    {"utc_app_control_get_extra_data_array_n4", utc_app_control_get_extra_data_array_n4, NULL, NULL},
+    {"utc_app_control_get_extra_data_array_n5", utc_app_control_get_extra_data_array_n5, NULL, NULL},
+    {"utc_app_control_is_extra_data_array_p1", utc_app_control_is_extra_data_array_p1, NULL, NULL},
+    {"utc_app_control_is_extra_data_array_p2", utc_app_control_is_extra_data_array_p2, NULL, NULL},
+    {"utc_app_control_is_extra_data_array_n1", utc_app_control_is_extra_data_array_n1, NULL, NULL},
+    {"utc_app_control_is_extra_data_array_n2", utc_app_control_is_extra_data_array_n2, NULL, NULL},
+    {"utc_app_control_is_extra_data_array_n3", utc_app_control_is_extra_data_array_n3, NULL, NULL},
+    {"utc_app_control_is_reply_requested_n1", utc_app_control_is_reply_requested_n1, NULL, NULL},
+    {"utc_app_control_is_reply_requested_n2", utc_app_control_is_reply_requested_n2, NULL, NULL},
+    {"utc_app_control_is_reply_requested_n3", utc_app_control_is_reply_requested_n3, NULL, NULL},
+    {"utc_app_control_is_reply_requested_n4", utc_app_control_is_reply_requested_n4, NULL, NULL},
+    {"utc_app_control_get_caller_n1", utc_app_control_get_caller_n1, NULL, NULL},
+    {"utc_app_control_get_caller_n2", utc_app_control_get_caller_n2, NULL, NULL},
+    {"utc_app_control_get_caller_n3", utc_app_control_get_caller_n3, NULL, NULL},
+    {"utc_app_control_send_terminate_request_p", utc_app_control_send_terminate_request_p, NULL, NULL},
+    {"utc_app_control_send_terminate_request_n", utc_app_control_send_terminate_request_n, NULL, NULL},
+    {"utc_alarm_schedule_after_delay_p", utc_alarm_schedule_after_delay_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_after_delay_n", utc_alarm_schedule_after_delay_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_cancel_p", utc_alarm_cancel_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_cancel_n", utc_alarm_cancel_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_cancel_all_p", utc_alarm_cancel_all_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_foreach_registered_alarm_p", utc_alarm_foreach_registered_alarm_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_foreach_registered_alarm_n", utc_alarm_foreach_registered_alarm_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_scheduled_date_p", utc_alarm_get_scheduled_date_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_scheduled_date_n", utc_alarm_get_scheduled_date_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_scheduled_period_p", utc_alarm_get_scheduled_period_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_scheduled_period_n", utc_alarm_get_scheduled_period_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_at_date_p", utc_alarm_schedule_at_date_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_at_date_n", utc_alarm_schedule_at_date_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_with_recurrence_week_flag_p", utc_alarm_schedule_with_recurrence_week_flag_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_schedule_with_recurrence_week_flag_n", utc_alarm_schedule_with_recurrence_week_flag_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_scheduled_recurrence_week_flag_p", utc_alarm_get_scheduled_recurrence_week_flag_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_scheduled_recurrence_week_flag_n", utc_alarm_get_scheduled_recurrence_week_flag_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_current_time_p", utc_alarm_get_current_time_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_current_time_n", utc_alarm_get_current_time_n, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_app_control_p", utc_alarm_get_app_control_p, utc_alarm_startup, utc_alarm_cleanup},
+    {"utc_alarm_get_app_control_n", utc_alarm_get_app_control_n, utc_alarm_startup, utc_alarm_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_APPLICATION_CORE_H__
diff --git a/src/utc/application/utc_alarm.c b/src/utc/application/utc_alarm.c
new file mode 100755 (executable)
index 0000000..7f1752e
--- /dev/null
@@ -0,0 +1,580 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <glib-object.h>
+#include <string.h>
+#include <app_alarm.h>
+#include <app.h>
+
+static bool passed = true;
+static int tid;
+static char *package = NULL;
+
+void utc_alarm_startup(void)
+{
+       g_type_init();
+       package = NULL;
+}
+
+void utc_alarm_cleanup(void)
+{
+       if (package != NULL) {
+               free(package);
+       }
+}
+
+static bool foreach_alarm_cb(int alarm, void *user_data)
+{
+       if (alarm != tid) {
+               passed = false;
+       }
+
+       return true;
+}
+
+/**
+ * @brief Positive test case of alarm_schedule_after_delay()
+ */
+int utc_alarm_schedule_after_delay_p(void)
+{
+       app_control_h app_control;
+       int tid;
+       int ret = ALARM_ERROR_NONE;
+       int delay = 1;
+       int period = 1;
+       const char *app_id = "org.tizen.helloworld";
+
+       ret = app_control_create(&app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(app_control, app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = alarm_schedule_after_delay(app_control, delay, period, &tid);
+
+       app_control_destroy(app_control);
+       alarm_cancel_all();
+
+       assert_eq(ret, ALARM_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of alarm_schedule_after_delay()
+ */
+int utc_alarm_schedule_after_delay_n(void)
+{
+       app_control_h app_control;
+       int ret = ALARM_ERROR_NONE;
+       const char *app_id = "org.tizen.helloworld";
+       int delay = 1;
+       int period = 1;
+
+       ret = app_control_create(&app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(app_control, app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = alarm_schedule_after_delay(app_control, delay, period, NULL);
+
+       app_control_destroy(app_control);
+       alarm_cancel_all();
+
+       assert_eq(ret, ALARM_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+/**
+ * @brief Positive test case of alarm_cancel()
+ */
+int utc_alarm_cancel_p(void)
+{
+       app_control_h app_control;
+       int ret = ALARM_ERROR_NONE;
+       int ret1 = ALARM_ERROR_NONE;
+       int ret2 = ALARM_ERROR_NONE;
+       int tid;
+       int delay = 1;
+       int period = 1;
+       const char *app_id = "org.tizen.helloworld";
+
+       ret = app_control_create(&app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(app_control, app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret1 = alarm_schedule_after_delay(app_control, delay, period, &tid);
+       ret2 = alarm_cancel(tid);
+
+       app_control_destroy(app_control);
+       alarm_cancel_all();
+
+       assert_eq(ret1, ALARM_ERROR_NONE);
+       assert_eq(ret2, ALARM_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of alarm_cancel()
+ */
+// TODO: This should probably check for ALARM_ERROR_INVALID_PARAMETER
+// (docs don't mention this error)
+int utc_alarm_cancel_n(void)
+{
+       int ret = ALARM_ERROR_NONE;
+
+       ret = alarm_cancel(0);
+
+       assert_neq(ret, ALARM_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of alarm_cancel_all()
+ */
+int utc_alarm_cancel_all_p(void)
+{
+       int ret = ALARM_ERROR_NONE;
+
+       ret = alarm_cancel_all();
+
+       assert_eq(ret, ALARM_ERROR_NONE);
+
+       return 0;
+}
+
+
+/**
+ * @brief Positive test case of alarm_foreach_registered_alarm()
+ */
+int utc_alarm_foreach_registered_alarm_p(void)
+{
+       int ret = ALARM_ERROR_NONE;
+       app_control_h app_control;
+       int delay = 1;
+       int period = 5;
+       const char *app_id = "org.tizen.helloworld";
+
+       ret = app_control_create(&app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(app_control, app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       alarm_schedule_after_delay(app_control, delay, period, &tid);
+
+       passed = true;
+       ret = alarm_foreach_registered_alarm(foreach_alarm_cb, NULL);
+
+       app_control_destroy(app_control);
+       alarm_cancel_all();
+
+       assert_eq(ret, ALARM_ERROR_NONE);
+       assert_eq(passed, true);
+
+       return 0;
+}
+
+
+/**
+ * @brief Negative test case of alarm_foreach_registered_alarm()
+ */
+int utc_alarm_foreach_registered_alarm_n(void)
+{
+       int ret = ALARM_ERROR_NONE;
+
+       ret = alarm_foreach_registered_alarm(NULL, NULL);
+
+       assert_eq(ret, ALARM_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+/**
+ * @brief Positive test case of alarm_get_scheduled_date()
+ */
+int utc_alarm_get_scheduled_date_p(void)
+{
+       struct tm date;
+       app_control_h app_control;
+       int ret = ALARM_ERROR_NONE;
+       int tid;
+       int delay = 1;
+       int period = 5;
+       const char *app_id = "org.tizen.helloworld";
+
+       ret = app_control_create(&app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(app_control, app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       alarm_schedule_after_delay(app_control, delay, period, &tid);
+
+       ret = alarm_get_scheduled_date(tid, &date);
+
+       app_control_destroy(app_control);
+       alarm_cancel_all();
+
+       assert_eq(ret, ALARM_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of alarm_get_scheduled_date()
+ */
+int utc_alarm_get_scheduled_date_n(void)
+{
+       int ret = ALARM_ERROR_NONE;
+
+       ret = alarm_get_scheduled_date(-1, NULL);
+
+       assert_eq(ret, ALARM_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+/**
+ * @brief Positive test case of alarm_get_period()
+ */
+int utc_alarm_get_scheduled_period_p(void)
+{
+       app_control_h app_control;
+       int ret = ALARM_ERROR_NONE;
+       int period1 = 1;
+       int period2 = 0;
+       int delay = 1;
+       int tid;
+       const char *app_id = "org.tizen.helloworld";
+
+       ret = app_control_create(&app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(app_control, app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       alarm_schedule_after_delay(app_control, delay, period1, &tid);
+
+       ret = alarm_get_scheduled_period(tid, &period2);
+
+       app_control_destroy(app_control);
+       alarm_cancel_all();
+
+       assert_eq(ret, ALARM_ERROR_NONE);
+       assert_eq(period1, period2);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of alarm_get_scheduled_period()
+ */
+int utc_alarm_get_scheduled_period_n(void)
+{
+       int ret = ALARM_ERROR_NONE;
+       int period = 0;
+
+       ret = alarm_get_scheduled_period(0, &period);
+
+       assert_eq(ret, ALARM_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of alarm_schedule_at_date()
+ */
+int utc_alarm_schedule_at_date_p(void)
+{
+       struct tm date;
+       time_t now;
+       app_control_h app_control;
+       int tid;
+       int period = 2;
+       const char *app_id = "org.tizen.helloworld";
+
+       int ret = ALARM_ERROR_NONE;
+
+       time(&now);
+       localtime_r(&now, &date);
+       date.tm_sec += 3;
+
+       ret = app_control_create(&app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(app_control, app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = alarm_schedule_at_date(app_control, &date, period, &tid);
+
+       app_control_destroy(app_control);
+       alarm_cancel_all();
+
+       assert_eq(ret, ALARM_ERROR_NONE);
+
+       return 0;
+}
+
+
+/**
+ * @brief Negative test case of alarm_schedule_at_date()
+ */
+int utc_alarm_schedule_at_date_n(void)
+{
+       int ret = ALARM_ERROR_NONE;
+       app_control_h app_control;
+       const char *app_id = "org.tizen.helloworld";
+       int period = 1;
+
+
+       ret = app_control_create(&app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(app_control, app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = alarm_schedule_at_date(app_control, NULL, period, &tid);
+
+       app_control_destroy(app_control);
+       alarm_cancel_all();
+
+       assert_eq(ret, ALARM_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of alarm_schedule_at_date()
+ */
+int utc_alarm_schedule_with_recurrence_week_flag_p(void)
+{
+       struct tm date;
+       time_t now;
+       app_control_h app_control;
+       int tid;
+       const char *app_id = "org.tizen.helloworld";
+       int ret = ALARM_ERROR_NONE;
+
+       time(&now);
+       localtime_r(&now, &date);
+       date.tm_sec += 3;
+
+       ret = app_control_create(&app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(app_control, app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = alarm_schedule_with_recurrence_week_flag(app_control, &date, ALARM_WEEK_FLAG_MONDAY, &tid);
+
+       app_control_destroy(app_control);
+       alarm_cancel_all();
+
+       assert_eq(ret, ALARM_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_alarm_schedule_with_recurrence_week_flag_n(void)
+{
+       struct tm date;
+       time_t now;
+
+       int ret = ALARM_ERROR_NONE;
+
+       time(&now);
+       localtime_r(&now, &date);
+       date.tm_sec += 3;
+
+       ret = alarm_schedule_with_recurrence_week_flag(NULL, &date, ALARM_WEEK_FLAG_MONDAY, &tid);
+
+       alarm_cancel_all();
+
+       assert_eq(ret, ALARM_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+/**
+ * @brief Negative test case of alarm_schedule_at_date()
+ */
+int utc_alarm_get_scheduled_recurrence_week_flag_p(void)
+{
+       struct tm date;
+       time_t now;
+       app_control_h app_control;
+       int tid;
+       int week_flag = 0;
+       const char *app_id = "org.tizen.helloworld";
+       int ret = ALARM_ERROR_NONE;
+
+       time(&now);
+       localtime_r(&now, &date);
+       date.tm_sec += 3;
+
+       ret = app_control_create(&app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(app_control, app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = alarm_schedule_with_recurrence_week_flag(app_control, &date, ALARM_WEEK_FLAG_MONDAY, &tid);
+       assert_eq(ret, ALARM_ERROR_NONE);
+
+       ret = alarm_get_scheduled_recurrence_week_flag(tid, &week_flag);
+       assert_eq(ret, ALARM_ERROR_NONE);
+
+       ret = app_control_destroy(app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = alarm_cancel_all();
+       assert_eq(ret, ALARM_ERROR_NONE);
+
+       assert_eq(week_flag, ALARM_WEEK_FLAG_MONDAY);
+
+       return 0;
+}
+
+int utc_alarm_get_scheduled_recurrence_week_flag_n(void)
+{
+       int ret = ALARM_ERROR_NONE;
+
+       ret = alarm_get_scheduled_recurrence_week_flag(0, NULL);
+
+       alarm_cancel_all();
+
+       assert_eq(ret, ALARM_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_alarm_get_current_time_p(void)
+{
+       struct tm date;
+       int ret = ALARM_ERROR_NONE;
+
+       ret = alarm_get_current_time(&date);
+
+       assert_eq(ret, ALARM_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_alarm_get_current_time_n(void)
+{
+       int ret = ALARM_ERROR_NONE;
+
+       ret = alarm_get_current_time(NULL);
+
+       assert_eq(ret, ALARM_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_alarm_get_app_control_p(void)
+{
+       app_control_h app_control;
+       app_control_h app_control_return;
+
+       int ret = ALARM_ERROR_NONE;
+       int ret1 = ALARM_ERROR_NONE;
+       int ret2 = APP_CONTROL_ERROR_NONE;
+       int tid;
+       int period = 0;
+       int delay = 3;
+       char *package;
+       const char *app_id = "org.tizen.helloworld";
+
+       ret = app_control_create(&app_control);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(app_control, app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = alarm_schedule_after_delay(app_control, delay, period, &tid);
+       assert_eq(ret, ALARM_ERROR_NONE);
+
+       ret1 = alarm_get_app_control(tid, &app_control_return);
+       ret2 = app_control_get_app_id(app_control_return, &package);
+
+       app_control_destroy(app_control);
+       app_control_destroy(app_control_return);
+       alarm_cancel_all();
+
+       assert_eq(ret1, ALARM_ERROR_NONE);
+       assert_eq(ret2, APP_CONTROL_ERROR_NONE);
+       assert(!strcmp(package, app_id));
+
+       free(package);
+
+       return 0;
+}
+
+int utc_alarm_get_app_control_n(void)
+{
+       int ret = ALARM_ERROR_NONE;
+
+       ret = alarm_get_app_control(0, NULL);
+
+       assert_eq(ret, ALARM_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
diff --git a/src/utc/application/utc_app.c b/src/utc/application/utc_app.c
new file mode 100755 (executable)
index 0000000..6195e95
--- /dev/null
@@ -0,0 +1,386 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <app.h>
+
+
+//& set: ApplicationMain
+static int main_loop_flag = 0;
+
+int utc_app_get_name_p(void)
+{
+    int ret = APP_ERROR_NONE;
+    char *name = NULL;
+
+    ret = app_get_name(&name);
+    assert_neq(name, NULL);
+    free(name);
+
+    assert_eq(ret, APP_ERROR_NONE);
+    return 0;
+}
+
+int utc_app_get_name_n(void)
+{
+    int ret = APP_ERROR_NONE;
+
+    ret = app_get_name(NULL);
+
+    assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_get_version_p(void)
+{
+    int ret = APP_ERROR_NONE;
+    char *version = NULL;
+
+    ret = app_get_version(&version);
+    assert_neq(version, NULL);
+    free(version);
+
+    assert_eq(ret, APP_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_app_get_version_n(void)
+{
+    int ret = APP_ERROR_NONE;
+
+    ret = app_get_version(NULL);
+
+    assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_get_device_orientation_p(void)
+{
+    app_device_orientation_e orientation = APP_DEVICE_ORIENTATION_0 - 1;
+
+    orientation = app_get_device_orientation();
+
+    assert(orientation == APP_DEVICE_ORIENTATION_0 ||
+           orientation == APP_DEVICE_ORIENTATION_90 ||
+           orientation == APP_DEVICE_ORIENTATION_180 ||
+           orientation == APP_DEVICE_ORIENTATION_270);
+
+    return 0;
+}
+
+int utc_app_get_id_p(void)
+{
+    int ret = APP_ERROR_NONE;
+    char *id = NULL;
+
+    ret = app_get_id(&id);
+    assert_neq(id, NULL);
+    free(id);
+
+    assert_eq(ret, APP_ERROR_NONE);
+    return 0;
+}
+
+int utc_app_get_id_n(void)
+{
+    int ret = APP_ERROR_NONE;
+
+    ret = app_get_id(NULL);
+
+    assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+static bool _app_create(void *user_data)
+{
+    main_loop_flag = 1;
+    return true;
+}
+
+static void _app_pause(void *user_data)
+{
+}
+
+static void _app_resume(void *user_data)
+{
+}
+
+static void _app_terminate(void *user_data)
+{
+    main_loop_flag = 0;
+}
+
+static void _app_control(app_control_h app_control, void *user_data)
+{
+}
+
+int utc_application_app_get_cache_path_p(void)
+{
+       char *path = app_get_cache_path();
+       assert(path);
+       free(path);
+
+       return 0;
+}
+
+int utc_application_app_get_data_path_p(void)
+{
+       char *path = app_get_data_path();
+       assert(path);
+       free(path);
+
+       return 0;
+}
+
+int utc_application_app_get_resource_path_p(void)
+{
+       char *path = app_get_resource_path();
+       assert(path);
+       free(path);
+
+       return 0;
+}
+
+int utc_application_app_get_external_cache_path_p(void)
+{
+       char *path = app_get_external_cache_path();
+       assert(path);
+       free(path);
+
+       return 0;
+}
+
+int utc_application_app_get_external_data_path_p(void)
+{
+       char *path = app_get_external_data_path();
+       assert(path);
+       free(path);
+
+       return 0;
+}
+
+int utc_application_app_get_external_shared_data_path_p(void)
+{
+       char *path = app_get_external_shared_data_path();
+       assert(path);
+       free(path);
+
+       return 0;
+}
+
+int utc_application_app_get_shared_data_path_p(void)
+{
+       char *path = app_get_shared_data_path();
+       assert(path);
+       free(path);
+
+       return 0;
+}
+
+int utc_application_app_get_shared_resource_path_p(void)
+{
+       char *path = app_get_shared_resource_path();
+       assert(path);
+       free(path);
+
+       return 0;
+}
+
+int utc_application_app_get_shared_trusted_path_p(void)
+{
+       char *path = app_get_shared_trusted_path();
+       assert(path);
+       free(path);
+
+       return 0;
+}
+
+int utc_application_app_event_get_low_memory_status_n(void)
+{
+       int ret;
+       app_event_low_memory_status_e status;
+       app_event_info_h info = NULL;
+
+       ret = app_event_get_low_memory_status(NULL, &status);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       ret = app_event_get_low_memory_status(info, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_application_app_event_get_low_battery_status_n(void)
+{
+       int ret;
+       app_event_low_battery_status_e status;
+       app_event_info_h info = NULL;
+
+       ret = app_event_get_low_battery_status(NULL, &status);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       ret = app_event_get_low_battery_status(info, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_application_app_event_get_language_n(void)
+{
+       int ret;
+       char *lang;
+       app_event_info_h info = NULL;
+
+       ret = app_event_get_language(NULL, &lang);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       ret = app_event_get_language(info, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_application_app_event_get_device_orientation_n(void)
+{
+       int ret;
+       app_device_orientation_e orient;
+       app_event_info_h info = NULL;
+
+       ret = app_event_get_device_orientation(NULL, &orient);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       ret = app_event_get_device_orientation(info, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+
+
+
+}
+
+int utc_application_app_event_get_region_format_n(void)
+{
+       int ret;
+       char *region;
+       app_event_info_h info = NULL;
+
+       ret = app_event_get_region_format(NULL, &region);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       ret = app_event_get_region_format(info, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_ui_app_main_n1(void)
+{
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       int argc = 0;
+       char **argv;
+       argv = malloc(4 * sizeof(char *));
+       assert(argv);
+       argv[0] = "package";
+       argv[1] = "appid";
+       argv[2] = "exec";
+       argv[4] = NULL;
+
+       int ret = APP_ERROR_NONE;
+
+       event_callback.create = _app_create;
+       event_callback.app_control = _app_control;
+       event_callback.terminate = _app_terminate;
+       event_callback.pause = _app_pause;
+       event_callback.resume = _app_resume;
+
+       ret = ui_app_main(argc, argv, &event_callback, NULL);
+
+       free(argv);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_ui_app_main_n2(void)
+{
+       int ret = APP_ERROR_NONE;
+
+       ret = ui_app_main(0, NULL, NULL, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static void event_callback(void *event, void *data)
+{
+}
+
+int utc_ui_app_add_event_handler_p(void)
+{
+       int ret;
+       app_event_handler_h handler;
+
+       ret = ui_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = ui_app_remove_event_handler(handler);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_ui_app_add_event_handler_n(void)
+{
+       int ret;
+       app_event_handler_h handler;
+
+       ret = ui_app_add_event_handler(NULL, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       ret = ui_app_add_event_handler(&handler, -1, (app_event_cb)event_callback, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       ret = ui_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, NULL, NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_ui_app_remove_event_handler_p(void)
+{
+       int ret;
+       app_event_handler_h handler;
+
+       ret = ui_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, (app_event_cb)event_callback, NULL);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       ret = ui_app_remove_event_handler(handler);
+       assert_eq(ret, APP_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_ui_app_remove_event_handler_n(void)
+{
+       int ret;
+
+       ret = ui_app_remove_event_handler(NULL);
+       assert_eq(ret, APP_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
diff --git a/src/utc/application/utc_app_control.c b/src/utc/application/utc_app_control.c
new file mode 100755 (executable)
index 0000000..e8e9cdc
--- /dev/null
@@ -0,0 +1,1922 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <app.h>
+
+//& set: ApplicationService
+
+int utc_app_control_create_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    return 0;
+}
+
+int utc_app_control_create_n(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    ret = app_control_create(NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_app_control_destroy_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_app_control_destroy_n(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    ret = app_control_destroy(NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_app_control_set_operation_p1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *input_value = "INPUT_VALUE";
+    char *output_value = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_operation(app_control, input_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_operation(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output_value, NULL);
+    assert(!strcmp(output_value, input_value));
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_set_operation_p2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *input_value = "INPUT_VALUE";
+    char *output_value = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_operation(app_control, input_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_operation(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output_value, NULL);
+    assert(!strcmp(output_value, input_value));
+
+    ret = app_control_set_operation(app_control, NULL);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_operation(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(output_value, NULL);
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_set_operation_n(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *input_value = "INPUT_VALUE";
+
+    ret = app_control_set_operation(NULL, input_value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_operation_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *output_value;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_operation(app_control, &output_value);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(output_value, NULL);
+    return 0;
+}
+
+int utc_app_control_get_operation_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *output_value;
+
+    ret = app_control_get_operation(NULL, &output_value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_operation_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_operation(app_control, NULL);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_operation_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    app_control_create(&app_control);
+
+    ret = app_control_get_operation(NULL, NULL);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_app_control_set_uri_p1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *input_value = "INPUT_VALUE";
+    char *output_value = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_uri(app_control, input_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_uri(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output_value, NULL);
+    assert(!strcmp(output_value, input_value));
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_set_uri_p2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *input_value = "INPUT_VALUE";
+    char *output_value = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_uri(app_control, input_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_uri(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output_value, NULL);
+    assert(!strcmp(output_value, input_value));
+
+    ret = app_control_set_uri(app_control, NULL);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_uri(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(output_value, NULL);
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_set_uri_n(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *output_value = NULL;
+
+    ret = app_control_get_uri(NULL, &output_value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_control_get_uri_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *output_value;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_uri(app_control, &output_value);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(output_value, NULL);
+    return 0;
+}
+
+int utc_app_control_get_uri_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *output_value;
+
+    ret = app_control_get_uri(NULL, &output_value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_uri_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    app_control_create(&app_control);
+
+    ret = app_control_get_uri(app_control, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    app_control_destroy(app_control);
+    return 0;
+}
+
+int utc_app_control_get_uri_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    app_control_create(&app_control);
+
+    ret = app_control_get_uri(NULL, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+
+    app_control_destroy(app_control);
+    return 0;
+}
+
+int utc_app_control_set_mime_p1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *input_value = "INPUT_VALUE";
+    char *output_value = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_mime(app_control, input_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_mime(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output_value, NULL);
+    assert(!strcmp(output_value, input_value));
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_set_mime_p2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *input_value = "INPUT_VALUE";
+    char *output_value = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_mime(app_control, input_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_mime(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output_value, NULL);
+    assert(!strcmp(output_value, input_value));
+
+    ret = app_control_set_mime(app_control, NULL);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_mime(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(output_value, NULL);
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_set_mime_n(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *input_value = "INPUT_VALUE";
+
+    ret = app_control_set_mime(NULL, input_value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_mime_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *output_value;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_mime(app_control, &output_value);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(output_value, NULL);
+    return 0;
+}
+
+int utc_app_control_get_mime_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *output_value;
+
+    ret = app_control_get_mime(NULL, &output_value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_mime_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    app_control_create(&app_control);
+    ret = app_control_get_mime(app_control, NULL);
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_mime_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    app_control_create(&app_control);
+
+    ret = app_control_get_mime(NULL, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+
+    app_control_destroy(app_control);
+    return 0;
+}
+
+int utc_app_control_set_app_id_p1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *input_value = "INPUT_VALUE";
+    char *output_value = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_app_id(app_control, input_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_app_id(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output_value, NULL);
+    assert(!strcmp(output_value, input_value));
+
+    free(output_value);
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_set_app_id_p2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *input_value = "INPUT_VALUE";
+    char *output_value = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_app_id(app_control, input_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_app_id(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output_value, NULL);
+    assert(!strcmp(output_value, input_value));
+
+    ret = app_control_set_app_id(app_control, NULL);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_app_id(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(output_value, NULL);
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_set_app_id_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    ret = app_control_set_app_id(NULL, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_set_app_id_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *input_value = "INPUT_VALUE";
+
+    ret = app_control_set_app_id(NULL, input_value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_app_id_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *output_value;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_app_id(app_control, &output_value);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(output_value, NULL);
+    return 0;
+}
+
+int utc_app_control_get_app_id_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *output_value;
+
+    ret = app_control_get_app_id(NULL, &output_value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_app_id_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    app_control_create(&app_control);
+
+    ret = app_control_get_app_id(app_control, NULL);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_app_id_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    app_control_create(&app_control);
+
+    ret = app_control_get_app_id(NULL, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+
+    app_control_destroy(app_control);
+    return 0;
+}
+
+int utc_app_control_set_category_p1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *input_value = "INPUT_VALUE";
+    char *output_value = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_category(app_control, input_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_category(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output_value, NULL);
+    assert(!strcmp(output_value, input_value));
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_set_category_p2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *input_value = "INPUT_VALUE";
+    char *output_value = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_category(app_control, input_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_category(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output_value, NULL);
+    assert(!strcmp(output_value, input_value));
+
+    ret = app_control_set_category(app_control, NULL);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_category(app_control, &output_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert(output_value == NULL);
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_set_category_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    ret = app_control_set_category(NULL, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_set_category_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *input_value = "INPUT_VALUE";
+
+    ret = app_control_set_category(NULL, input_value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_category_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *output_value;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_category(app_control, &output_value);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(output_value, NULL);
+    return 0;
+}
+
+int utc_app_control_get_category_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *output_value;
+
+    ret = app_control_get_category(NULL, &output_value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_category_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_category(app_control, NULL);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_category_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_category(NULL, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+
+    app_control_destroy(app_control);
+    return 0;
+}
+
+int utc_app_control_add_extra_data_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *key1 = "EXTRA_KEY1";
+    char *value1 = "EXTRA_VALUE1";
+    char *key2 = "EXTRA_KEY2";
+    char *value2 = "EXTRA_VALUE2";
+    char *output1 = NULL;
+    char *output2 = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_add_extra_data(app_control, key1, value1);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data(app_control, key1, &output1);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output1, NULL);
+    assert(!strcmp(output1, value1));
+    free(output1);
+
+    ret = app_control_add_extra_data(app_control, key2, value2);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data(app_control, key1, &output1);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output1, NULL);
+    assert(!strcmp(output1, value1));
+    free(output1);
+
+    ret = app_control_get_extra_data(app_control, key2, &output2);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output2, NULL);
+    assert(!strcmp(output2, value2));
+    free(output2);
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_add_extra_data_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    int ret1 = APP_CONTROL_ERROR_NONE;
+    int ret2 = APP_CONTROL_ERROR_NONE;
+    int ret3 = APP_CONTROL_ERROR_NONE;
+    int ret4 = APP_CONTROL_ERROR_NONE;
+    char *key = "EXTRA_KEY";
+    char *value = "EXTRA_VALUE";
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    // key : null
+    ret1 = app_control_add_extra_data(app_control, NULL, value);
+
+    // key : zero-length
+    ret2 = app_control_add_extra_data(app_control, "", value);
+
+    // value : null
+    ret3 = app_control_add_extra_data(app_control, key, NULL);
+
+    // value : zero-length
+    ret4 = app_control_add_extra_data(app_control, key, "");
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret1, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    assert_eq(ret2, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    assert_eq(ret3, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    assert_eq(ret4, APP_CONTROL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_app_control_add_extra_data_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *key = "EXTRA_KEY";
+    char *value = "EXTRA_VALUE";
+
+    ret = app_control_add_extra_data(NULL, key, value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_remove_extra_data_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *key = "EXTRA_KEY";
+    char *value = "EXTRA_VALUE";
+    char *output = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_add_extra_data(app_control, key, value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data(app_control, key, &output);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(output, NULL);
+    assert(!strcmp(output, value));
+    free(output);
+
+    ret = app_control_remove_extra_data(app_control, key);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    output = NULL;
+    ret = app_control_get_extra_data(app_control, key, &output);
+    assert_eq(ret, APP_CONTROL_ERROR_KEY_NOT_FOUND);
+    assert_eq(output, NULL);
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_remove_extra_data_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *key = "EXTRA_KEY";
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_remove_extra_data(app_control, key);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_KEY_NOT_FOUND);
+    return 0;
+}
+
+int utc_app_control_remove_extra_data_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *key = "EXTRA_KEY";
+
+    ret = app_control_remove_extra_data(NULL, key);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_remove_extra_data_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_remove_extra_data(app_control, NULL);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_extra_data_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *key = "EXTRA_KEY";
+    char *value = "EXTRA_VALUE";
+    char *ret_value = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_add_extra_data(app_control, key, value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data(app_control, key, &ret_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert(!strcmp(ret_value, value));
+    free(ret_value);
+
+    app_control_destroy(app_control);
+
+    return 0;
+}
+
+int utc_app_control_get_extra_data_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *key = "EXTRA_KEY";
+    char *ret_value;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data(app_control, key, &ret_value);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_KEY_NOT_FOUND);
+    return 0;
+}
+
+int utc_app_control_get_extra_data_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *key = "EXTRA_KEY";
+    char *ret_value;
+
+    ret = app_control_get_extra_data(NULL, key, &ret_value);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_extra_data_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    char *ret_value;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data(app_control, NULL, &ret_value);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_extra_data_n4(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    char *key = "EXTRA_KEY";
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data(app_control, key, NULL);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+#define NUM_EXTRA_DATA 32
+
+bool app_control_extra_data(app_control_h app_control, const char *key, void *user_data)
+{
+    bool *passed = (bool*)user_data;
+    char *value;
+
+    app_control_get_extra_data(app_control, key, &value);
+
+    if (!strcmp(key, value)) {
+        int index = atoi(key);
+        passed[index] = true;
+    }
+
+    return true;
+}
+
+int utc_app_control_foreach_extra_data_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    int i;
+    bool passed[NUM_EXTRA_DATA] = {0, };
+    int num_passed = 0;
+    char buf[32] = {0, };
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    for (i=0; i<NUM_EXTRA_DATA; i++) {
+        snprintf(buf, sizeof(buf), "%d", i);
+        ret = app_control_add_extra_data(app_control, buf, buf);
+        assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    }
+
+    ret = app_control_foreach_extra_data(app_control, app_control_extra_data, &passed);
+
+    for (i=0; i<NUM_EXTRA_DATA; i++) {
+        if (passed[i] == true) {
+            num_passed++;
+        }
+    }
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(num_passed, NUM_EXTRA_DATA);
+
+    return 0;
+}
+
+int utc_app_control_foreach_extra_data_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_foreach_extra_data(app_control, NULL, NULL);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_foreach_extra_data_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    ret = app_control_foreach_extra_data(NULL, app_control_extra_data, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_clone_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    char *operation = "OPERATION_VALUE";
+    char *operation_clone;
+
+    char *uri = "URI_VALUE";
+    char *uri_clone;
+
+    char *mime = "MIME_VALUE";
+    char *mime_clone;
+
+    char *app_id = "APP_ID_VALUE";
+    char *app_id_clone;
+
+    char *extra_key = "EXTRA_KEY";
+
+    char *extra_value = "EXTRA_VALUE";
+    char *extra_value_clone;
+
+    app_control_h app_control;
+    app_control_h app_control_cloned;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    ret = app_control_set_operation(app_control, operation);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    ret = app_control_set_uri(app_control, uri);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    ret = app_control_set_mime(app_control, mime);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    ret = app_control_set_app_id(app_control, app_id);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    ret = app_control_add_extra_data(app_control, extra_key, extra_value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_clone(&app_control_cloned, app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_operation(app_control_cloned, &operation_clone);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    ret = app_control_get_uri(app_control_cloned, &uri_clone);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    ret = app_control_get_mime(app_control_cloned, &mime_clone);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    ret = app_control_get_app_id(app_control_cloned, &app_id_clone);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    ret = app_control_get_extra_data(app_control_cloned, extra_key, &extra_value_clone);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    ret = app_control_destroy(app_control_cloned);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    assert(!strcmp(operation, operation_clone));
+    free(operation_clone);
+
+    assert(!strcmp(uri, uri_clone));
+    free(uri_clone);
+
+    assert(!strcmp(mime, mime_clone));
+    free(mime_clone);
+
+    assert(!strcmp(app_id, app_id_clone));
+    free(app_id_clone);
+
+    assert(!strcmp(extra_value, extra_value_clone));
+    free(extra_value_clone);
+
+    return 0;
+}
+
+int utc_app_control_clone_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control_cloned;
+
+    ret = app_control_clone(&app_control_cloned, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_clone_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_clone(NULL, app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+void dts_app_control_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
+{
+}
+
+int utc_app_control_send_launch_request_p1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *app_id = "org.tizen.helloworld";
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_app_id(app_control, app_id);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    // explicit launch without reply callback
+    ret = app_control_send_launch_request(app_control, NULL, NULL);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    return 0;
+}
+
+int utc_app_control_send_launch_request_p2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *app_id = "org.tizen.helloworld";
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_app_id(app_control, app_id);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    // explicit launch with reply callback
+    ret = app_control_send_launch_request(app_control, dts_app_control_reply_cb, NULL);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    return 0;
+}
+
+int utc_app_control_send_launch_request_p3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *app_id = "org.tizen.helloworld";
+    const char *mime = "type/custom";
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_mime(app_control, mime);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_app_id(app_control, app_id);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_send_launch_request(app_control, dts_app_control_reply_cb, NULL);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    return 0;
+}
+
+int utc_app_control_send_launch_request_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    ret = app_control_send_launch_request(NULL, NULL, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_send_launch_request_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_send_launch_request(app_control, NULL, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_APP_NOT_FOUND);
+
+    app_control_destroy(app_control);
+    return 0;
+}
+
+int utc_app_control_reply_to_launch_request_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h request;
+
+    ret = app_control_create(&request);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_reply_to_launch_request(NULL, request, APP_CONTROL_RESULT_CANCELED);
+
+    app_control_destroy(request);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_reply_to_launch_request_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h reply;
+
+    ret = app_control_create(&reply);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_reply_to_launch_request(reply, NULL, APP_CONTROL_RESULT_CANCELED);
+
+    app_control_destroy(reply);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_reply_to_launch_request_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h reply;
+    app_control_h request;
+
+    ret = app_control_create(&reply);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_create(&request);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_reply_to_launch_request(reply, request, APP_CONTROL_RESULT_FAILED);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+
+    app_control_destroy(reply);
+    app_control_destroy(request);
+    return 0;
+}
+
+bool dts_app_control_app_matched_cb(app_control_h app_control, const char *package, void *user_data)
+{
+    return true;
+}
+
+int utc_app_control_foreach_app_matched_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    app_control_set_operation(app_control, APP_CONTROL_OPERATION_VIEW);
+
+    ret = app_control_foreach_app_matched(app_control, dts_app_control_app_matched_cb, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    app_control_destroy(app_control);
+    return 0;
+}
+
+int utc_app_control_foreach_app_matched_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    ret = app_control_foreach_app_matched(NULL, dts_app_control_app_matched_cb, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_foreach_app_matched_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_foreach_app_matched(app_control, NULL, NULL);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_add_extra_data_array_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *array_key1 = "array_key1";
+    const char *array_value1[] = {"array_value1_1", "array_value2_1", "array_value3_1", "array_value4_1"};
+    int array_length1 = 4;
+
+    const char *array_key2 = "array_key2";
+    const char *array_value2[] = {"array_value1_2", "array_value2_2", "array_value3_2"};
+    int array_length2 = 3;
+
+    char **out_array = NULL;
+    int out_length = -1;
+    int i;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+
+    ret = app_control_add_extra_data_array(app_control, array_key1, array_value1, array_length1);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data_array(app_control, array_key1, &out_array, &out_length);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(out_array, NULL);
+    assert_eq(out_length, array_length1);
+
+    for (i = 0; i < out_length; i ++) {
+        assert(!strcmp(out_array[i], array_value1[i]));
+        free(out_array[i]);
+    }
+
+    free(out_array);
+    out_array = NULL;
+
+
+    out_length = -1;
+    ret = app_control_add_extra_data_array(app_control, array_key2, array_value2, array_length2);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data_array(app_control, array_key2, &out_array, &out_length);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(out_array, NULL);
+    assert_eq(out_length, array_length2);
+
+    for (i = 0; i < out_length; i ++) {
+        assert(!strcmp(out_array[i], array_value2[i]));
+        free(out_array[i]);
+    }
+
+    free(out_array);
+
+
+    app_control_destroy(app_control);
+    return 0;
+}
+
+int utc_app_control_add_extra_data_array_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char* array_value[] = {"array_value1", "array_value2", "array_value3", "array_value4"};
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_add_extra_data_array(app_control, NULL, array_value, 4);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    app_control_destroy(app_control);
+    return 0;
+}
+
+
+int utc_app_control_add_extra_data_array_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *array_key = "array_key";
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_add_extra_data_array(app_control, array_key, NULL, 4);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    app_control_destroy(app_control);
+    return 0;
+}
+
+int utc_app_control_add_extra_data_array_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *array_key = "array_key";
+    const char *array_value[] = {"array_value1", "array_value2", "array_value3", "array_value4"};
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_add_extra_data_array(app_control, array_key, array_value, -1);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    app_control_destroy(app_control);
+    return 0;
+}
+
+int utc_app_control_get_extra_data_array_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *array_key = "array_key";
+    const char *array_value[] = {"array_value1", "array_value2", "array_value3", "array_value4"};
+    int array_length = 4;
+
+    char **out_array = NULL;
+    int out_length = -1;
+    int i;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_add_extra_data_array(app_control, array_key, array_value, array_length);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data_array(app_control, array_key, &out_array, &out_length);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_neq(out_array, NULL);
+    assert_eq(out_length, array_length);
+
+    for (i = 0; i < out_length; i ++) {
+        assert(!strcmp(out_array[i], array_value[i]));
+        free(out_array[i]);
+    }
+
+    free(out_array);
+
+    app_control_destroy(app_control);
+
+    assert_eq(out_length, array_length);
+    return 0;
+}
+
+int utc_app_control_get_extra_data_array_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *array_key = "array_key";
+    char **out_array;
+    int out_length = -1;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data_array(app_control, array_key, &out_array, &out_length);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_KEY_NOT_FOUND);
+    return 0;
+}
+
+int utc_app_control_get_extra_data_array_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *array_key = "array_key";
+    const char *array_value[] = {"array_value1", "array_value2", "array_value3", "array_value4"};
+    int array_length = 4;
+    char **out_array = NULL;
+    int out_length = -1;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    app_control_add_extra_data_array(app_control, array_key, array_value, array_length);
+
+    ret = app_control_get_extra_data_array(NULL, array_key, &out_array, &out_length);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_extra_data_array_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *array_key = "array_key";
+    const char *array_value[] = {"array_value1", "array_value2", "array_value3", "array_value4"};
+    int array_length = 4;
+    char **out_array = NULL;
+    int out_length = -1;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    app_control_add_extra_data_array(app_control, array_key, array_value, array_length);
+
+    ret = app_control_get_extra_data_array(app_control, NULL, &out_array, &out_length);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_extra_data_array_n4(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *array_key = "array_key";
+    const char *array_value[] = {"array_value1", "array_value2", "array_value3", "array_value4"};
+    int array_length = 4;
+    int out_length = -1;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_add_extra_data_array(app_control, array_key, array_value, array_length);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data_array(app_control, array_key, NULL, &out_length);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_extra_data_array_n5(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *array_key = "array_key";
+    const char *array_value[] = {"array_value1", "array_value2", "array_value3", "array_value4"};
+    int array_length = 4;
+    char **out_array = NULL;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_add_extra_data_array(app_control, array_key, array_value, array_length);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_extra_data_array(app_control, array_key, &out_array, NULL);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_is_extra_data_array_p1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *array_key = "array_key";
+    const char* array_value[] = {"array_value1", "array_value2", "array_value3", "array_value4"};
+    int array_length = 4;
+    bool is_array;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_add_extra_data_array(app_control, array_key, array_value, array_length);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_is_extra_data_array(app_control, array_key, &is_array);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(is_array, true);
+
+    return 0;
+}
+
+int utc_app_control_is_extra_data_array_p2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    char *key = "EXTRA_KEY";
+    char *value = "EXTRA_VALUE";
+
+    bool is_array;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_add_extra_data(app_control, key, value);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_is_extra_data_array(app_control, key, &is_array);
+
+    app_control_destroy(app_control);
+
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    assert_eq(is_array, false);
+
+    return 0;
+}
+
+int utc_app_control_is_extra_data_array_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *key = "key";
+
+    bool is_array;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_is_extra_data_array(NULL, key, &is_array);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_is_extra_data_array_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    bool is_array;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_is_extra_data_array(app_control, NULL, &is_array);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_is_extra_data_array_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    const char *key = "key";
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_is_extra_data_array(app_control, key, NULL);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int dts_app_control_host_res_fn(void *data)
+{
+       return 0;
+}
+
+int utc_app_control_is_reply_requested_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+    bool requested;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_is_reply_requested(app_control, &requested);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_app_control_is_reply_requested_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_is_reply_requested(app_control, NULL);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_app_control_is_reply_requested_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    bool requested = false;
+
+    ret = app_control_is_reply_requested(NULL, &requested);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_is_reply_requested_n4(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    ret = app_control_is_reply_requested(NULL, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_caller_n1(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_get_caller(app_control, NULL);
+
+    app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_app_control_get_caller_n2(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    char *caller = NULL;
+
+    ret = app_control_get_caller(NULL, &caller);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_get_caller_n3(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    ret = app_control_get_caller(NULL, NULL);
+
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_app_control_send_terminate_request_p(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+    const char *app_id = "org.tizen.helloworld";
+
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_set_app_id(app_control, app_id);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    // explicit launch without reply callback
+    ret = app_control_send_launch_request(app_control, NULL, NULL);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    ret = app_control_send_terminate_request(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_app_control_send_terminate_request_n(void)
+{
+    int ret = APP_CONTROL_ERROR_NONE;
+
+    ret = app_control_send_terminate_request(NULL);
+    assert_eq(ret, APP_CONTROL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
diff --git a/src/utc/application/utc_i18n.c b/src/utc/application/utc_i18n.c
new file mode 100755 (executable)
index 0000000..f891056
--- /dev/null
@@ -0,0 +1,52 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+
+#include <string.h>
+
+#include <app.h>
+
+//& set: ApplicationI18n
+
+/**
+ * @brief Positive test case of utc_i18n_get_test()
+ */
+int utc_i18n_get_text_p(void)
+{
+       const char *msg_id = "HELLO";
+       char *msg;
+
+       msg = i18n_get_text(msg_id);
+
+       assert(!strcmp(msg_id, msg));
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of utc_i18n_get_test()
+ */
+
+int utc_i18n_get_text_n(void)
+{
+       char *msg;
+
+       msg = i18n_get_text(NULL);
+
+       assert_eq(msg, NULL);
+
+       return 0;
+}
diff --git a/src/utc/application/utc_preference.c b/src/utc/application/utc_preference.c
new file mode 100755 (executable)
index 0000000..5461013
--- /dev/null
@@ -0,0 +1,809 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <glib.h>
+#include <string.h>
+#include <app_preference.h>
+#include <app.h>
+//& set: ApplicationPreference
+
+static bool foreach_item_passed = true;
+static bool preference_changed_passed = true;
+static bool preference_changed_unset_passed = true;
+static bool preference_changed_no_action_passed = true;
+
+static int foreach_item_int = 5;
+static const char *foreach_item_string = "foreach_item_string";
+
+void utc_preference_startup(void)
+{
+    preference_remove_all();
+}
+
+void utc_preference_cleanup(void)
+{
+    preference_remove_all();
+}
+
+
+int utc_preference_set_int_p(void)
+{
+    int ret;
+
+    const char *key = "preference_key";
+    int value = 1;
+    int output = 0;
+
+    ret = preference_set_int(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_int(key, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(output, value);
+
+    return 0;
+}
+
+int utc_preference_set_int_n(void)
+{
+    int ret;
+    int value = 1;
+
+    ret = preference_set_int(NULL, value);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_set_double_p(void)
+{
+    const char *key = "preference_key";
+
+    int ret;
+
+    double value = 1.0;
+    double output = 0.0;
+
+    ret = preference_set_double(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_double(key, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(output, value);
+
+    return 0;
+}
+
+int utc_preference_set_double_n(void)
+{
+    int ret;
+    double value = 1.0;
+
+    ret = preference_set_double(NULL, value);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_set_string_p(void)
+{
+    const char *key = "preference_key";
+    char *value = "value";
+    char *output = NULL;
+
+    int ret;
+
+    ret = preference_set_string(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_string(key, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_neq(output, NULL);
+    assert(!strcmp(output, value));
+
+    free(output);
+
+    return 0;
+}
+
+int utc_preference_set_string_n(void)
+{
+    int ret;
+    char *value = "value";
+
+    ret = preference_set_string(NULL, value);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_set_boolean_p(void)
+{
+    const char *key = "preference_key";
+    bool value = true;
+    bool output = false;
+
+    int ret;
+
+    ret = preference_set_boolean(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_boolean(key, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(output, value);
+
+    return 0;
+}
+
+int utc_preference_set_boolean_n(void)
+{
+    int ret;
+
+    ret = preference_set_boolean(NULL, true);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_preference_get_int_p(void)
+{
+    int ret;
+
+    const char *key = "get_key";
+    int value = 1;
+    int output = 0;
+
+    ret = preference_set_int(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_int(key, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(output, value);
+
+    return 0;
+}
+
+int utc_preference_get_int_n1(void)
+{
+    const char *key = "key";
+    int value = 1;
+
+    int ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_set_int(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_int(key, NULL);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_get_int_n2(void)
+{
+    int output = -1;
+
+    int ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_get_int(NULL, &output);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_get_int_n3(void)
+{
+    const char *key = "key";
+    int output = -1;
+
+    int ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_get_int(key, &output);
+
+    assert_neq(ret, PREFERENCE_ERROR_NONE);
+    return 0;
+}
+
+int utc_preference_get_double_p(void)
+{
+    const char *key = "get_key";
+
+    int ret;
+
+    double value = 1.0;
+    double output = 0.0;
+
+    ret = preference_set_double(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_double(key, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(output, value);
+
+    return 0;
+}
+
+int utc_preference_get_double_n1(void)
+{
+    const char *key = "key";
+    double value = 1;
+
+    double ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_set_double(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_double(key, NULL);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_get_double_n2(void)
+{
+    double output = -1;
+
+    double ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_get_double(NULL, &output);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_get_double_n3(void)
+{
+    const char *key = "key";
+    double output = -1;
+
+    double ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_get_double(key, &output);
+
+    assert_neq(ret, PREFERENCE_ERROR_NONE);
+    return 0;
+}
+
+int utc_preference_get_string_p(void)
+{
+    const char *key = "get_key";
+    char *value = "value";
+    char *output = NULL;
+
+    int ret;
+
+    ret = preference_set_string(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_string(key, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_neq(output, NULL);
+    assert(!strcmp(output, value));
+
+    free(output);
+
+    return 0;
+}
+
+int utc_preference_get_string_n1(void)
+{
+    const char *key = "key";
+    char *value = "value";
+
+    int ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_set_string(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_string(key, NULL);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_get_string_n2(void)
+{
+    char *output = NULL;
+
+    int ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_get_string(NULL, &output);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_get_string_n3(void)
+{
+    const char *key = "key";
+    char *output = NULL;
+
+    int ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_get_string(key, &output);
+
+    assert_neq(ret, PREFERENCE_ERROR_NONE);
+    return 0;
+}
+
+int utc_preference_get_boolean_p(void)
+{
+    const char *key = "get_key";
+    bool value = true;
+    bool output = false;
+
+    int ret;
+
+    ret = preference_set_boolean(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_boolean(key, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(output, value);
+
+    return 0;
+}
+
+int utc_preference_get_boolean_n1(void)
+{
+    const char *key = "key";
+    bool value = true;
+
+    int ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_set_boolean(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_boolean(key, NULL);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_get_boolean_n2(void)
+{
+    bool output = true;
+
+    int ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_get_boolean(NULL, &output);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_get_boolean_n3(void)
+{
+    const char *key = "key";
+    bool output = true;
+
+    int ret = PREFERENCE_ERROR_NONE;
+
+    ret = preference_get_boolean(key, &output);
+
+    assert_neq(ret, PREFERENCE_ERROR_NONE);
+    return 0;
+}
+
+int utc_preference_remove_p(void)
+{
+    const char *key = "key";
+    int value = 1;
+    int output = -1;
+
+    int ret;
+
+    ret = preference_set_int(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_int(key, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(output, value);
+
+    ret = preference_remove(key);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_int(key, &output);
+    assert_neq(ret, PREFERENCE_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_preference_remove_n1(void)
+{
+    int ret;
+
+    ret = preference_remove(NULL);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_remove_n2(void)
+{
+    const char *key = "key";
+
+    int ret;
+
+    ret = preference_remove(key);
+
+    assert_neq(ret, PREFERENCE_ERROR_NONE);
+    return 0;
+}
+
+int utc_preference_remove_all_p(void)
+{
+    const char *key1 = "key1";
+    int value1 = 1;
+    const char *key2 = "key2";
+    int value2 = 2;
+    int output;
+
+    int ret;
+
+    ret = preference_set_int(key1, value1);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_int(key1, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(output, value1);
+
+    ret = preference_set_int(key2, value2);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_int(key2, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(output, value2);
+
+
+    ret = preference_remove_all();
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+
+    ret = preference_get_int(key1, &output);
+    assert_neq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_int(key2, &output);
+    assert_neq(ret, PREFERENCE_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_preference_is_existing_p1(void)
+{
+    const char *key = "key";
+    int value = 1;
+    int output;
+
+    bool exists = false;
+
+    int ret;
+
+    ret = preference_set_int(key, value);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_get_int(key, &output);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(output, value);
+
+    ret = preference_is_existing(key, &exists);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(exists, true);
+
+    return 0;
+}
+
+int utc_preference_is_existing_p2(void)
+{
+    const char *key1 = "key1";
+    const char *key2 = "key2";
+
+    bool exists = true;
+
+    int ret;
+
+    ret = preference_is_existing(key1, &exists);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(exists, false);
+
+    ret = preference_is_existing(key2, &exists);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+    assert_eq(exists, false);
+
+    return 0;
+}
+
+int utc_preference_is_existing_n1(void)
+{
+    bool exists;
+
+    int ret;
+
+    ret = preference_is_existing(NULL, &exists);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_is_existing_n2(void)
+{
+    int ret;
+
+    ret = preference_is_existing("key", NULL);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+static GMainLoop *g_mainloop = NULL;
+
+static gboolean timeout_function(gpointer data)
+{
+    if(g_mainloop)
+        g_main_loop_quit((GMainLoop *) data);
+
+    return FALSE;
+}
+
+static void wait_for_async()
+{
+    int timeout_id = 0;
+    g_mainloop = g_main_loop_new(NULL, FALSE);
+
+    timeout_id = g_timeout_add(5000, timeout_function, g_mainloop);
+    g_main_loop_run(g_mainloop);
+    g_source_remove(timeout_id);
+}
+
+static void pref_changed_cb(const char *key, void *user_data)
+{
+    int *count;
+    int value = 0;
+    int ret = PREFERENCE_ERROR_NONE;
+
+    if (user_data == NULL) {
+        preference_changed_passed = false;
+        return;
+    }
+
+    count = (int *) user_data;
+    if (*count == 1) {
+        ret = preference_get_int(key, &value);
+        if (ret != PREFERENCE_ERROR_NONE) {
+            preference_changed_passed = false;
+        }
+        if (value == 2)
+            preference_changed_passed = true;
+    }
+}
+
+int utc_preference_set_changed_cb_p1(void)
+{
+    int ret = 0;
+
+    const char *key1 = "key1";
+    int value1 = 1;
+    int value2 = 2;
+    int count1 = 1;
+
+    preference_changed_passed = false;
+
+    ret = preference_set_int(key1, value1);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_set_changed_cb(key1, pref_changed_cb, &count1);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_set_int(key1, value2);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    wait_for_async();
+
+    assert_eq(preference_changed_passed, true);
+
+    return 0;
+}
+
+static void pref_changed_no_action_cb(const char *key, void *user_data)
+{
+    preference_changed_no_action_passed = false;
+}
+
+int utc_preference_set_changed_cb_p2(void)
+{
+    int ret;
+
+    const char *key1 = "key1";
+    int value1 = 1;
+    int count1 = 0;
+
+    preference_changed_no_action_passed = true;
+
+    ret = preference_set_int(key1, value1);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_set_changed_cb(key1, pref_changed_no_action_cb, &count1);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_remove(key1);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    assert_eq(preference_changed_no_action_passed, true);
+
+    return 0;
+}
+
+int utc_preference_set_changed_cb_n1(void)
+{
+    int ret;
+
+    ret = preference_set_changed_cb(NULL, pref_changed_cb, NULL);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_set_changed_cb_n2(void)
+{
+    int ret;
+    const char *key = "key";
+
+    ret = preference_set_changed_cb(key, NULL, NULL);
+
+    assert_neq(ret, PREFERENCE_ERROR_NONE);
+    return 0;
+}
+
+int utc_preference_set_changed_cb_n3(void)
+{
+    int ret;
+    const char *key = "key";
+
+    ret = preference_set_changed_cb(key, pref_changed_cb, NULL);
+
+    assert_neq(ret, PREFERENCE_ERROR_NONE);
+    return 0;
+}
+
+static void pref_changed_unset_cb(const char *key, void *user_data)
+{
+    preference_changed_unset_passed = false;
+}
+
+int utc_preference_unset_changed_cb_p1(void)
+{
+    int ret;
+
+    const char *key1 = "key1";
+    int value1 = 1;
+    int value2 = 2;
+
+    preference_changed_unset_passed = true;
+
+    ret = preference_set_int(key1, value1);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_set_changed_cb(key1, pref_changed_unset_cb, NULL);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_unset_changed_cb(key1);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_set_int(key1, value2);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    assert_eq(preference_changed_unset_passed, true);
+
+    return 0;
+}
+
+int utc_preference_unset_changed_cb_n1(void)
+{
+    int ret;
+
+    ret = preference_unset_changed_cb(NULL);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_preference_unset_changed_cb_n2(void)
+{
+    int ret;
+    const char *key = "key";
+
+    ret = preference_unset_changed_cb(key);
+
+    assert_neq(ret, PREFERENCE_ERROR_NONE);
+    return 0;
+}
+
+static bool pref_item_cb(const char *key,void *user_data)
+{
+       //Headers and Docs are not consistient, CB should be  pref_item_cb(const char *key,void * value,void *user_data)
+       //Can't define if void * represents user_data or value because test is failing on  preference_set_int()
+       int value1 = -1;
+    char *value2 = NULL;
+    int *count;
+    const char *key1 = "key1";
+    const char *key2 = "key2";
+
+    if (!strcmp(key, key1)) {
+       ///value1 = *((int*) value);
+       preference_get_int(key1,&value1);
+        if (value1 != foreach_item_int) {
+            foreach_item_passed = false;
+        }
+    }
+    else if (!strcmp(key, key2)) {
+        //value2 = (char *) value;
+       preference_get_string(key2,&value2);
+        if (strcmp(value2, foreach_item_string)) {
+           foreach_item_passed = false;
+        }
+        free(value2);
+    }
+    else {
+        foreach_item_passed = false;
+    }
+
+    if (user_data == NULL) {
+        foreach_item_passed = false;
+       return false;
+    }
+    count = (int *) user_data;
+    (*count)++;
+
+    return true;
+}
+
+int utc_preference_foreach_item_p(void)
+{
+    const char *key1 = "key1";
+    const char *key2 = "key2";
+    int value1 = foreach_item_int;
+    const char *value2 = foreach_item_string;
+    int count = 0;
+
+    foreach_item_passed = true;
+
+    int ret;
+
+    ret = preference_set_int(key1, value1);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_set_string(key2, value2);
+    assert_eq(ret, PREFERENCE_ERROR_NONE);
+
+    ret = preference_foreach_item(pref_item_cb, &count);
+
+    assert_eq(foreach_item_passed, true);
+    assert_eq(count, 2);
+
+    return 0;
+}
+
+int utc_preference_foreach_item_n(void)
+{
+    int ret;
+
+    ret = preference_foreach_item(NULL, NULL);
+
+    assert_eq(ret, PREFERENCE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
diff --git a/src/utc/audio-io/CMakeLists.txt b/src/utc/audio-io/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..20d02da
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "audio-io")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-media-audio-io")
+SET(TC_SOURCES
+       utc-media-audio-input.c
+       utc-media-audio-output.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       storage
+       glib-2.0
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/audio-io/prod_platform.list b/src/utc/audio-io/prod_platform.list
new file mode 100755 (executable)
index 0000000..8ed40de
--- /dev/null
@@ -0,0 +1,3 @@
+audio_in_create_ex
+audio_in_get_latency
+audio_out_get_latency
diff --git a/src/utc/audio-io/public.list b/src/utc/audio-io/public.list
new file mode 100755 (executable)
index 0000000..f0a2c19
--- /dev/null
@@ -0,0 +1,32 @@
+audio_in_create
+audio_in_create_loopback
+audio_in_destroy
+audio_in_drop
+audio_in_get_buffer_size
+audio_in_get_channel
+audio_in_get_sample_rate
+audio_in_get_sample_type
+audio_in_ignore_session
+audio_in_peek
+audio_in_prepare
+audio_in_read
+audio_in_set_interrupted_cb
+audio_in_set_stream_cb
+audio_in_unprepare
+audio_in_unset_interrupted_cb
+audio_in_unset_stream_cb
+audio_out_create
+audio_out_destroy
+audio_out_get_buffer_size
+audio_out_get_channel
+audio_out_get_sample_rate
+audio_out_get_sample_type
+audio_out_get_sound_type
+audio_out_ignore_session
+audio_out_prepare
+audio_out_set_interrupted_cb
+audio_out_set_stream_cb
+audio_out_unprepare
+audio_out_unset_interrupted_cb
+audio_out_unset_stream_cb
+audio_out_write
diff --git a/src/utc/audio-io/res/tct-tizen-tests_audio_default.mp3 b/src/utc/audio-io/res/tct-tizen-tests_audio_default.mp3
new file mode 100755 (executable)
index 0000000..c41d536
Binary files /dev/null and b/src/utc/audio-io/res/tct-tizen-tests_audio_default.mp3 differ
diff --git a/src/utc/audio-io/tct-audio-io-core.c b/src/utc/audio-io/tct-audio-io-core.c
new file mode 100755 (executable)
index 0000000..41941f4
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-audio-io-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/audio-io/tct-audio-io-core.h b/src/utc/audio-io/tct-audio-io-core.h
new file mode 100755 (executable)
index 0000000..8c652cd
--- /dev/null
@@ -0,0 +1,163 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_AUDIO_IO_CORE_H__
+#define __TCT_AUDIO_IO_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_media_audio_in_startup(void);
+extern void utc_media_audio_in_cleanup(void);
+extern void utc_media_audio_out_startup(void);
+extern void utc_media_audio_out_cleanup(void);
+
+extern int utc_media_audio_in_create_p(void);
+extern int utc_media_audio_in_create_n(void);
+extern int utc_media_audio_in_create_loopback_p(void);
+extern int utc_media_audio_in_create_loopback_n(void);
+extern int utc_media_audio_in_destroy_p(void);
+extern int utc_media_audio_in_destroy_n(void);
+extern int utc_media_audio_in_read_p(void);
+extern int utc_media_audio_in_read_n(void);
+extern int utc_media_audio_in_get_buffer_size_p(void);
+extern int utc_media_audio_in_get_buffer_size_n(void);
+extern int utc_media_audio_in_get_sample_rate_p(void);
+extern int utc_media_audio_in_get_sample_rate_n(void);
+extern int utc_media_audio_in_get_channel_p(void);
+extern int utc_media_audio_in_get_channel_n(void);
+extern int utc_media_audio_in_get_sample_type_p(void);
+extern int utc_media_audio_in_get_sample_type_n(void);
+extern int utc_media_audio_in_ignore_session_p(void);
+extern int utc_media_audio_in_ignore_session_n(void);
+extern int utc_media_audio_in_prepare_p(void);
+extern int utc_media_audio_in_prepare_n(void);
+extern int utc_media_audio_in_set_interrupted_cb_p(void);
+extern int utc_media_audio_in_set_interrupted_cb_n(void);
+extern int utc_media_audio_in_unprepare_p(void);
+extern int utc_media_audio_in_unprepare_n(void);
+extern int utc_media_audio_in_unset_interrupted_cb_p(void);
+extern int utc_media_audio_in_unset_interrupted_cb_n(void);
+extern int utc_media_audio_in_set_stream_cb_p(void);
+extern int utc_media_audio_in_set_stream_cb_n(void);
+extern int utc_media_audio_in_unset_stream_cb_p(void);
+extern int utc_media_audio_in_unset_stream_cb_n(void);
+extern int utc_media_audio_in_peek_p(void);
+extern int utc_media_audio_in_peek_n1(void);
+extern int utc_media_audio_in_peek_n2(void);
+extern int utc_media_audio_in_peek_n3(void);
+extern int utc_media_audio_in_drop_p(void);
+extern int utc_media_audio_in_drop_n(void);
+extern int utc_media_audio_out_create_p(void);
+extern int utc_media_audio_out_create_n(void);
+extern int utc_media_audio_out_destroy_p(void);
+extern int utc_media_audio_out_destroy_n(void);
+extern int utc_media_audio_out_write_p(void);
+extern int utc_media_audio_out_write_n(void);
+extern int utc_media_audio_out_get_buffer_size_p(void);
+extern int utc_media_audio_out_get_buffer_size_n(void);
+extern int utc_media_audio_out_get_sample_rate_p(void);
+extern int utc_media_audio_out_get_sample_rate_n(void);
+extern int utc_media_audio_out_get_channel_p(void);
+extern int utc_media_audio_out_get_channel_n(void);
+extern int utc_media_audio_out_get_sample_type_p(void);
+extern int utc_media_audio_out_get_sample_type_n(void);
+extern int utc_media_audio_out_get_sound_type_p(void);
+extern int utc_media_audio_out_get_sound_type_n(void);
+extern int utc_media_audio_out_ignore_session_p(void);
+extern int utc_media_audio_out_ignore_session_n(void);
+extern int utc_media_audio_out_prepare_p(void);
+extern int utc_media_audio_out_prepare_n(void);
+extern int utc_media_audio_out_set_interrupted_cb_p(void);
+extern int utc_media_audio_out_set_interrupted_cb_n(void);
+extern int utc_media_audio_out_unprepare_p(void);
+extern int utc_media_audio_out_unprepare_n(void);
+extern int utc_media_audio_out_unset_interrupted_cb_p(void);
+extern int utc_media_audio_out_unset_interrupted_cb_n(void);
+extern int utc_media_audio_out_set_stream_cb_p(void);
+extern int utc_media_audio_out_set_stream_cb_n(void);
+extern int utc_media_audio_out_unset_stream_cb_p(void);
+extern int utc_media_audio_out_unset_stream_cb_n(void);
+
+testcase tc_array[] = {
+    {"utc_media_audio_in_create_p", utc_media_audio_in_create_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_create_n", utc_media_audio_in_create_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_create_loopback_p", utc_media_audio_in_create_loopback_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_create_loopback_n", utc_media_audio_in_create_loopback_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_destroy_p", utc_media_audio_in_destroy_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_destroy_n", utc_media_audio_in_destroy_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_read_p", utc_media_audio_in_read_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_read_n", utc_media_audio_in_read_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_get_buffer_size_p", utc_media_audio_in_get_buffer_size_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_get_buffer_size_n", utc_media_audio_in_get_buffer_size_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_get_sample_rate_p", utc_media_audio_in_get_sample_rate_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_get_sample_rate_n", utc_media_audio_in_get_sample_rate_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_get_channel_p", utc_media_audio_in_get_channel_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_get_channel_n", utc_media_audio_in_get_channel_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_get_sample_type_p", utc_media_audio_in_get_sample_type_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_get_sample_type_n", utc_media_audio_in_get_sample_type_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_ignore_session_p", utc_media_audio_in_ignore_session_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_ignore_session_n", utc_media_audio_in_ignore_session_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_prepare_p", utc_media_audio_in_prepare_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_prepare_n", utc_media_audio_in_prepare_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_set_interrupted_cb_p", utc_media_audio_in_set_interrupted_cb_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_set_interrupted_cb_n", utc_media_audio_in_set_interrupted_cb_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_unprepare_p", utc_media_audio_in_unprepare_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_unprepare_n", utc_media_audio_in_unprepare_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_unset_interrupted_cb_p", utc_media_audio_in_unset_interrupted_cb_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_unset_interrupted_cb_n", utc_media_audio_in_unset_interrupted_cb_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_set_stream_cb_p", utc_media_audio_in_set_stream_cb_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_set_stream_cb_n", utc_media_audio_in_set_stream_cb_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_unset_stream_cb_p", utc_media_audio_in_unset_stream_cb_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_unset_stream_cb_n", utc_media_audio_in_unset_stream_cb_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_peek_p", utc_media_audio_in_peek_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_peek_n1", utc_media_audio_in_peek_n1, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_peek_n2", utc_media_audio_in_peek_n2, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_peek_n3", utc_media_audio_in_peek_n3, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_drop_p", utc_media_audio_in_drop_p, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_in_drop_n", utc_media_audio_in_drop_n, utc_media_audio_in_startup, utc_media_audio_in_cleanup},
+    {"utc_media_audio_out_create_p", utc_media_audio_out_create_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_create_n", utc_media_audio_out_create_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_destroy_p", utc_media_audio_out_destroy_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_destroy_n", utc_media_audio_out_destroy_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_write_p", utc_media_audio_out_write_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_write_n", utc_media_audio_out_write_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_get_buffer_size_p", utc_media_audio_out_get_buffer_size_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_get_buffer_size_n", utc_media_audio_out_get_buffer_size_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_get_sample_rate_p", utc_media_audio_out_get_sample_rate_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_get_sample_rate_n", utc_media_audio_out_get_sample_rate_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_get_channel_p", utc_media_audio_out_get_channel_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_get_channel_n", utc_media_audio_out_get_channel_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_get_sample_type_p", utc_media_audio_out_get_sample_type_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_get_sample_type_n", utc_media_audio_out_get_sample_type_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_get_sound_type_p", utc_media_audio_out_get_sound_type_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_get_sound_type_n", utc_media_audio_out_get_sound_type_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_ignore_session_p", utc_media_audio_out_ignore_session_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_ignore_session_n", utc_media_audio_out_ignore_session_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_prepare_p", utc_media_audio_out_prepare_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_prepare_n", utc_media_audio_out_prepare_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_set_interrupted_cb_p", utc_media_audio_out_set_interrupted_cb_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_set_interrupted_cb_n", utc_media_audio_out_set_interrupted_cb_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_unprepare_p", utc_media_audio_out_unprepare_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_unprepare_n", utc_media_audio_out_unprepare_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_unset_interrupted_cb_p", utc_media_audio_out_unset_interrupted_cb_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_unset_interrupted_cb_n", utc_media_audio_out_unset_interrupted_cb_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_set_stream_cb_p", utc_media_audio_out_set_stream_cb_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_set_stream_cb_n", utc_media_audio_out_set_stream_cb_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_unset_stream_cb_p", utc_media_audio_out_unset_stream_cb_p, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {"utc_media_audio_out_unset_stream_cb_n", utc_media_audio_out_unset_stream_cb_n, utc_media_audio_out_startup, utc_media_audio_out_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_AUDIO_IO_CORE_H__
diff --git a/src/utc/audio-io/utc-media-audio-input.c b/src/utc/audio-io/utc-media-audio-input.c
new file mode 100755 (executable)
index 0000000..2e60163
--- /dev/null
@@ -0,0 +1,891 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "assert.h"
+#include <media/audio_io.h>
+#include <pthread.h>
+#include <system_info.h>
+
+//& set: Audio Input
+#define SAMPLE_RATE_1 44100
+#define SAMPLE_RATE_2 48100
+static bool supported = false;
+
+
+void utc_media_audio_in_startup(void)
+{
+    supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/microphone", &supported);
+}
+
+void utc_media_audio_in_cleanup(void)
+{
+}
+
+int utc_media_audio_in_create_p(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    }
+    else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    audio_in_destroy(input);
+    return 0;
+}
+
+int utc_media_audio_in_create_n(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_2, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE, &input);
+
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    }  else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+    return 0;
+}
+
+int utc_media_audio_in_create_loopback_p(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create_loopback(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    audio_in_destroy(input);
+    return 0;
+}
+
+int utc_media_audio_in_create_loopback_n(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create_loopback(SAMPLE_RATE_2, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE, &input);
+
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_audio_in_destroy_p(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE, &input);
+
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_destroy(input);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_destroy_n(void)
+{
+    int ret;
+
+    ret = audio_in_destroy(NULL);
+
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+   }  else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+   }
+
+    return 0;
+}
+
+int utc_media_audio_in_read_p(void)
+{
+    int ret, size;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE, &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {    
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_prepare(input);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_in_get_buffer_size(input, &size);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    char *buffer = NULL;
+    buffer = malloc(size);
+
+    ret = audio_in_read(input, (void*)buffer, size);
+
+    if(buffer){
+        free (buffer);
+    }
+
+    audio_in_destroy(input);
+
+    assert_gt (ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_read_n(void)
+{
+    int ret, size;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE, &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {    
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_prepare(input);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_in_get_buffer_size(input, &size);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    char *buffer = NULL;
+
+    ret = audio_in_read(input, (void*)buffer, 0);
+
+    audio_in_destroy(input);
+
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_audio_in_get_buffer_size_p(void)
+{
+    int ret, size;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_get_buffer_size(input, &size);
+
+    audio_in_destroy(input);
+
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_get_buffer_size_n(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_get_buffer_size(input, NULL);
+
+    audio_in_destroy(input);
+
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+
+}
+
+int utc_media_audio_in_get_sample_rate_p(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+    int sample_rate;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {    
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_get_sample_rate(input, &sample_rate);
+
+    audio_in_destroy(input);
+
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_get_sample_rate_n(void)
+{
+    int ret, sample_rate;
+    audio_in_h input = NULL;
+
+    ret = audio_in_get_sample_rate(input, &sample_rate);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_audio_in_get_channel_p(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+    audio_channel_e channel;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {    
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_get_channel(input, &channel);
+
+    audio_in_destroy(input);
+
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_get_channel_n(void)
+{
+    int ret;
+    audio_channel_e channel;
+    audio_in_h input = NULL;
+
+    ret = audio_in_get_channel(input, &channel);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {   
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_audio_in_get_sample_type_p(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+    audio_sample_type_e type;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_get_sample_type(input, &type);
+
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_in_destroy(input);
+
+    return 0;
+}
+
+int utc_media_audio_in_get_sample_type_n(void)
+{
+    int ret;
+    audio_sample_type_e type;
+    audio_in_h input = NULL;
+
+    ret = audio_in_get_sample_type(input, &type);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_audio_in_ignore_session_p(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_ignore_session(input);
+
+    audio_in_destroy(input);
+
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_ignore_session_n(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_ignore_session(input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_audio_in_prepare_p(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_prepare(input);
+
+    audio_in_destroy(input);
+
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_prepare_n(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+    ret = audio_in_prepare(input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+static void audio_io_interrupted_cb_func(audio_io_interrupted_code_e code, void* user_data)
+{
+}
+
+int utc_media_audio_in_set_interrupted_cb_p(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_set_interrupted_cb(input, audio_io_interrupted_cb_func, NULL);
+
+    audio_in_destroy(input);
+
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_set_interrupted_cb_n(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_set_interrupted_cb(input, audio_io_interrupted_cb_func, NULL);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_audio_in_unprepare_p(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+    
+    ret = audio_in_prepare(input);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    ret = audio_in_unprepare(input);
+
+    audio_in_destroy(input);
+
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_unprepare_n(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+    
+    ret = audio_in_unprepare(input);
+    
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_audio_in_unset_interrupted_cb_p(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_set_interrupted_cb(input, audio_io_interrupted_cb_func, NULL);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_in_unset_interrupted_cb(input);
+
+    audio_in_destroy(input);
+
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_unset_interrupted_cb_n(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_unset_interrupted_cb(input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+typedef struct _thread_data_s
+{
+    pthread_mutex_t* mutex;
+    pthread_cond_t*  cond;
+    int              callback_ret;
+    int              peek_ret;
+    int              drop_ret;
+}   thread_data_s;
+
+void audio_in_stream_cb_func(audio_in_h handle, size_t nbytes, void *userdata)
+{
+    thread_data_s* td = (thread_data_s*)userdata;
+    if (td == NULL)
+    {
+        return;
+    }
+
+    pthread_mutex_lock(td->mutex);
+    td->callback_ret = AUDIO_IO_ERROR_NONE;
+    pthread_cond_signal(td->cond);
+    pthread_mutex_unlock(td->mutex);
+}
+
+int utc_media_audio_in_set_stream_cb_p(void)
+{
+    int ret;
+    audio_in_h      input = NULL;
+    pthread_cond_t  cond  = PTHREAD_COND_INITIALIZER;
+    pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+    pthread_mutex_init(&mutex, NULL);
+    pthread_cond_init(&cond, NULL);
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    thread_data_s td;
+    td.mutex        = &mutex;
+    td.cond         = &cond;
+    td.callback_ret = -1;
+
+    ret = audio_in_set_stream_cb(input, audio_in_stream_cb_func, &td);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_in_prepare(input);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    pthread_mutex_lock(&mutex);
+    pthread_cond_wait(&cond, &mutex);
+    pthread_mutex_unlock(&mutex);
+
+    audio_in_destroy(input);
+    pthread_mutex_destroy(&mutex);
+    pthread_cond_destroy(&cond);
+
+    assert_eq(td.callback_ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_set_stream_cb_n(void)
+{
+    int ret;
+
+    audio_in_h input = NULL;
+
+    ret = audio_in_set_stream_cb(input, audio_in_stream_cb_func, NULL);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_audio_in_unset_stream_cb_p(void)
+{
+    int ret;
+
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_set_stream_cb(input, audio_in_stream_cb_func, NULL);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    assert(input);
+    ret = audio_in_unset_stream_cb(input);
+
+    audio_in_destroy(input);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_unset_stream_cb_n(void)
+{
+    int ret;
+
+    audio_in_h input = NULL;
+
+    ret = audio_in_unset_stream_cb(input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+void audio_in_stream_cb_func_peek_drop(audio_in_h handle, size_t nbytes, void *userdata)
+{
+    thread_data_s* td = (thread_data_s*)userdata;
+    if (td == NULL)
+    {
+        return;
+    }
+
+    int   len        = nbytes;
+    char* peeked_ptr = NULL;
+
+    pthread_mutex_lock(td->mutex);
+
+    td->peek_ret = audio_in_peek(handle, &peeked_ptr, &len);
+    td->drop_ret = audio_in_drop(handle);
+
+    pthread_cond_signal(td->cond);
+    pthread_mutex_unlock(td->mutex);
+}
+
+int utc_media_audio_in_peek_p(void)
+{
+    int ret;
+    audio_in_h      input = NULL;
+    pthread_cond_t  cond  = PTHREAD_COND_INITIALIZER;
+    pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+    pthread_mutex_init(&mutex, NULL);
+    pthread_cond_init(&cond, NULL);
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    thread_data_s td;
+    td.mutex    = &mutex;
+    td.cond     = &cond;
+    td.peek_ret = -1;
+    td.drop_ret = -1;
+
+    ret = audio_in_set_stream_cb(input, audio_in_stream_cb_func_peek_drop, &td);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_in_prepare(input);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    pthread_mutex_lock(&mutex);
+    pthread_cond_wait(&cond, &mutex);
+    pthread_mutex_unlock(&mutex);
+
+    audio_in_destroy(input);
+    pthread_mutex_destroy(&mutex);
+    pthread_cond_destroy(&cond);
+
+    assert_eq(td.peek_ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_peek_n1(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    char* buf = NULL;
+    int   len = 0;
+
+    // NULL pointer
+    ret = audio_in_peek(input, buf, len);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_audio_in_peek_n2(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_set_stream_cb(input, audio_in_stream_cb_func_peek_drop, NULL);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_in_prepare(input);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    char** buf        = NULL; // invalid out-parameter type (use char* buf)
+    int*   len        = NULL; // invalid out-parameter type (use int len)
+
+    ret = audio_in_peek(input, buf, len); // This is same code as "ret = audio_in_peek(input, NULL, NULL);"
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    audio_in_destroy(input);
+
+    return 0;
+}
+
+int utc_media_audio_in_peek_n3(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+    int len = 1024;
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    ret = audio_in_set_stream_cb(input, audio_in_stream_cb_func_peek_drop, NULL);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_in_prepare(input);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    char* buf = malloc(sizeof(char)*len);
+    char* origin_buf = (int)buf;
+
+    // memory leak
+    ret = audio_in_peek(input, &buf, &len);
+
+    audio_in_destroy(input);
+
+    if (buf == origin_buf) {
+        free(origin_buf);
+        return 1;
+    }
+    free(origin_buf);
+
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_drop_p(void)
+{
+    int ret;
+    audio_in_h      input = NULL;
+    pthread_cond_t  cond  = PTHREAD_COND_INITIALIZER;
+    pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+    pthread_mutex_init(&mutex, NULL);
+    pthread_cond_init(&cond, NULL);
+
+    ret = audio_in_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , &input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+        return 0;
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    }
+
+    thread_data_s td;
+    td.mutex    = &mutex;
+    td.cond     = &cond;
+    td.peek_ret = -1;
+    td.drop_ret = -1;
+
+    ret = audio_in_set_stream_cb(input, audio_in_stream_cb_func_peek_drop, &td);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_in_prepare(input);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    pthread_mutex_lock(&mutex);
+    pthread_cond_wait(&cond, &mutex);
+    pthread_mutex_unlock(&mutex);
+
+    audio_in_destroy(input);
+    pthread_mutex_destroy(&mutex);
+    pthread_cond_destroy(&cond);
+
+    assert_eq(td.peek_ret, AUDIO_IO_ERROR_NONE);
+    assert_eq(td.drop_ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_in_drop_n(void)
+{
+    int ret;
+    audio_in_h input = NULL;
+
+    // NULL pointer
+    ret = audio_in_drop(input);
+    if(!supported) {
+        assert_eq(ret, AUDIO_IO_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
diff --git a/src/utc/audio-io/utc-media-audio-output.c b/src/utc/audio-io/utc-media-audio-output.c
new file mode 100755 (executable)
index 0000000..5ea49f9
--- /dev/null
@@ -0,0 +1,571 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media/audio_io.h>
+#include <pthread.h>
+#include <storage.h>
+#include <string.h>
+
+static char *AUDIO_PATH = NULL;
+static char *AUDIO_FILE = "tct-tizen-tests_audio_default.mp3";
+#define SAMPLE_RATE_1 44100
+#define SAMPLE_RATE_2 48100
+
+//& set: Audio Output
+
+static bool audio_out_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) {
+        AUDIO_PATH = (char*)malloc(strlen(path) + strlen(AUDIO_FILE) + 6);
+        snprintf(AUDIO_PATH, strlen(path) + strlen(AUDIO_FILE) + 6, "%s/res/%s", path, AUDIO_FILE);
+        return false;
+    }
+
+    return true;
+}
+
+void utc_media_audio_out_startup(void)
+{
+    if(storage_foreach_device_supported(audio_out_storage_supported_cb, NULL) != STORAGE_ERROR_NONE) {        
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+    }
+}
+
+
+void utc_media_audio_out_cleanup(void)
+{
+    if(AUDIO_PATH)
+        free(AUDIO_PATH);
+}
+
+int utc_media_audio_out_create_p(void)
+{
+    int ret;
+    audio_out_h output = NULL;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM, &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+    return 0;
+}
+
+int utc_media_audio_out_create_n(void)
+{
+    int ret;
+    audio_out_h output = NULL;
+
+    ret = audio_out_create(SAMPLE_RATE_2, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE, SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_audio_out_destroy_p(void)
+{
+    int ret;
+    audio_out_h output;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE, SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_destroy(output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_out_destroy_n(void)
+{
+    int ret;
+
+    ret = audio_out_destroy(NULL);
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_audio_out_write_p(void)
+{
+    int ret, size;
+    audio_out_h output;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE, SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_prepare(output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_get_buffer_size(output, &size);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    FILE *fp = NULL;
+    fp = fopen(AUDIO_PATH,"r");
+
+    assert(fp);
+
+    int read;
+    char *buffer = NULL;
+    buffer = malloc(size);
+    if (buffer == NULL) {
+        fclose(fp);
+        return 1;
+    }
+    read = fread(buffer, size, sizeof(char), fp);
+
+    if (read <= 0) {
+        read = size;
+        memset(buffer, 0, size);
+    }
+    ret = audio_out_write(output, (void*)buffer, read);
+
+    if (buffer)
+        free(buffer);
+    fclose(fp);
+
+    audio_out_destroy(output);
+
+    assert_gt(ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_out_write_n(void)
+{
+    int ret, size;
+    audio_out_h output;
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE, SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_prepare(output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_get_buffer_size(output, &size);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_write(output, NULL, 0);
+    audio_out_destroy(output);
+
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_audio_out_get_buffer_size_p(void)
+{
+    int ret, size;
+    audio_out_h output;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM, &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_get_buffer_size(output, &size);
+
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+    return 0;
+}
+
+int utc_media_audio_out_get_buffer_size_n(void)
+{
+    int ret;
+    audio_out_h output;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM, &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_get_buffer_size(output, NULL);
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    audio_out_destroy(output);
+
+    return 0;
+}
+
+int utc_media_audio_out_get_sample_rate_p(void)
+{
+    int ret;
+    audio_out_h output;
+    int sample_rate;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_get_sample_rate(output, &sample_rate);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+    return 0;
+}
+
+int utc_media_audio_out_get_sample_rate_n(void)
+{
+    int ret, sample_rate;
+    audio_out_h output = NULL;
+
+    ret = audio_out_get_sample_rate(output, &sample_rate);
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_audio_out_get_channel_p(void)
+{
+    int ret;
+    audio_out_h output;
+    audio_channel_e channel;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_get_channel(output, &channel);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+    return 0;
+}
+
+int utc_media_audio_out_get_channel_n(void)
+{
+    int ret;
+    audio_channel_e channel;
+    audio_out_h output = NULL;
+
+    ret = audio_out_get_channel(output, &channel);
+
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_audio_out_get_sample_type_p(void)
+{
+    int ret;
+    audio_out_h output;
+    audio_sample_type_e type;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_get_sample_type(output, &type);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+    return 0;
+}
+
+int utc_media_audio_out_get_sample_type_n(void)
+{
+    int ret;
+    audio_sample_type_e type;
+    audio_out_h output = NULL;
+
+    ret = audio_out_get_sample_type(output, &type);
+
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_audio_out_get_sound_type_p(void)
+{
+    int ret;
+    audio_out_h output;
+    sound_type_e type;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_get_sound_type(output, &type);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+    return 0;
+}
+
+int utc_media_audio_out_get_sound_type_n(void)
+{
+    int ret;
+    sound_type_e type;
+    audio_out_h output = NULL;
+
+    ret = audio_out_get_sound_type(output, &type);
+
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_audio_out_ignore_session_p(void)
+{
+    int ret;
+    audio_out_h output;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_ignore_session(output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+    return 0;
+}
+
+
+int utc_media_audio_out_ignore_session_n(void)
+{
+    int ret;
+    audio_out_h output = NULL;
+
+    ret = audio_out_ignore_session(output);
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_out_prepare_p(void)
+{
+    int ret;
+    audio_out_h output;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_prepare(output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+    return 0;
+
+}
+
+
+int utc_media_audio_out_prepare_n(void)
+{
+    int ret;
+    audio_out_h output = NULL;
+
+    ret = audio_out_prepare(output);
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static void audio_io_interrupted_cb_func(audio_io_interrupted_code_e code, void* user_data)
+{
+}
+
+int utc_media_audio_out_set_interrupted_cb_p(void)
+{
+    int ret;
+    audio_out_h output;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_set_interrupted_cb(output, audio_io_interrupted_cb_func, NULL);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+    return 0;
+}
+
+
+int utc_media_audio_out_set_interrupted_cb_n(void)
+{
+    int ret;
+    audio_out_h output = NULL;
+
+    ret = audio_out_set_interrupted_cb(output, audio_io_interrupted_cb_func, NULL);
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_out_unprepare_p(void)
+{
+    int ret;
+    audio_out_h output;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    ret = audio_out_prepare(output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+    ret = audio_out_unprepare(output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+    return 0;
+}
+
+
+int utc_media_audio_out_unprepare_n(void)
+{
+    int ret;
+    audio_out_h output = NULL;
+
+    ret = audio_out_unprepare(output);
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_out_unset_interrupted_cb_p(void)
+{
+    int ret;
+    audio_out_h output;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_STEREO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM , &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_unset_interrupted_cb(output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+    return 0;
+}
+
+
+int utc_media_audio_out_unset_interrupted_cb_n(void)
+{
+    int ret;
+    audio_out_h output = NULL;
+
+    ret = audio_out_unset_interrupted_cb(output);
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+typedef struct _thread_data_s
+{
+    pthread_mutex_t* mutex;
+    pthread_cond_t*  cond;
+    int              callback_ret;
+}   thread_data_s;
+
+void audio_out_stream_cb_func(audio_out_h handle, size_t nbytes, void *userdata)
+{
+    thread_data_s* td = (thread_data_s*)userdata;
+    if (td == NULL)
+    {
+        return;
+    }
+
+    pthread_mutex_lock(td->mutex);
+    td->callback_ret = AUDIO_IO_ERROR_NONE;
+    pthread_cond_signal(td->cond);
+    pthread_mutex_unlock(td->mutex);
+}
+
+int utc_media_audio_out_set_stream_cb_p(void)
+{
+    int ret;
+    audio_out_h     output = NULL;
+    pthread_cond_t  cond   = PTHREAD_COND_INITIALIZER;
+    pthread_mutex_t mutex  = PTHREAD_MUTEX_INITIALIZER;
+
+    pthread_mutex_init(&mutex, NULL);
+    pthread_cond_init(&cond, NULL);
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO, AUDIO_SAMPLE_TYPE_S16_LE, SOUND_TYPE_SYSTEM, &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    thread_data_s td;
+    td.mutex        = &mutex;
+    td.cond         = &cond;
+    td.callback_ret = -1;
+
+    ret = audio_out_set_stream_cb(output, audio_out_stream_cb_func, &td);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_prepare(output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    pthread_mutex_lock(&mutex);
+    pthread_cond_wait(&cond, &mutex);
+    assert_eq(td.callback_ret, AUDIO_IO_ERROR_NONE);
+    pthread_mutex_unlock(&mutex);
+
+    audio_out_destroy(output);
+    pthread_mutex_destroy(&mutex);
+    pthread_cond_destroy(&cond);
+
+    assert_eq(td.callback_ret, AUDIO_IO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_out_set_stream_cb_n(void)
+{
+    int ret;
+
+    audio_out_h output = NULL;
+
+    ret = audio_out_set_stream_cb(output, audio_out_stream_cb_func, NULL);
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_audio_out_unset_stream_cb_p(void)
+{
+    int ret;
+
+    audio_out_h output = NULL;
+
+    ret = audio_out_create(SAMPLE_RATE_1, AUDIO_CHANNEL_MONO ,AUDIO_SAMPLE_TYPE_S16_LE , SOUND_TYPE_SYSTEM, &output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    ret = audio_out_set_stream_cb(output, audio_out_stream_cb_func, NULL);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    assert(output);
+    ret = audio_out_unset_stream_cb(output);
+    assert_eq(ret, AUDIO_IO_ERROR_NONE);
+
+    audio_out_destroy(output);
+
+
+    return 0;
+}
+
+int utc_media_audio_out_unset_stream_cb_n(void)
+{
+    int ret;
+
+    audio_out_h output = NULL;
+
+    ret = audio_out_unset_stream_cb(output);
+    assert_eq(ret, AUDIO_IO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/badge/CMakeLists.txt b/src/utc/badge/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..aaaa850
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "badge")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "badge")
+SET(TC_SOURCES
+       utc-badge.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/badge/platform.list b/src/utc/badge/platform.list
new file mode 100755 (executable)
index 0000000..637b2bc
--- /dev/null
@@ -0,0 +1,7 @@
+badge_add_deffered_task
+badge_del_deffered_task
+badge_foreach_existed
+badge_is_existing
+badge_is_service_ready
+badge_register_changed_cb
+badge_unregister_changed_cb
diff --git a/src/utc/badge/public.list b/src/utc/badge/public.list
new file mode 100755 (executable)
index 0000000..3fd77f1
--- /dev/null
@@ -0,0 +1,7 @@
+badge_get_count
+badge_get_display
+badge_new
+badge_remove
+badge_set_count
+badge_set_display
+
diff --git a/src/utc/badge/tct-badge-core.c b/src/utc/badge/tct-badge-core.c
new file mode 100755 (executable)
index 0000000..cd5f6de
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-badge-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/badge/tct-badge-core.h b/src/utc/badge/tct-badge-core.h
new file mode 100755 (executable)
index 0000000..de8936a
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_BADGE_CORE_H__
+#define __TCT_BADGE_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_badge_setting_startup(void);
+extern void utc_badge_setting_cleanup(void);
+
+extern int utc_badge_remove_n(void);
+extern int utc_badge_remove_p(void);
+extern int utc_badge_set_count_n(void);
+extern int utc_badge_set_count_p(void);
+extern int utc_badge_get_count_n(void);
+extern int utc_badge_get_count_n2(void);
+extern int utc_badge_get_count_p(void);
+extern int utc_badge_set_display_n(void);
+extern int utc_badge_set_display_p(void);
+extern int utc_badge_get_display_n(void);
+extern int utc_badge_get_display_n2(void);
+extern int utc_badge_get_display_p(void);
+extern int utc_badge_new_n(void);
+extern int utc_badge_new_p(void);
+
+testcase tc_array[] = {
+    {"utc_badge_remove_n", utc_badge_remove_n, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_remove_p", utc_badge_remove_p, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_set_count_n", utc_badge_set_count_n, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_set_count_p", utc_badge_set_count_p, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_get_count_n", utc_badge_get_count_n, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_get_count_n2", utc_badge_get_count_n2, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_get_count_p", utc_badge_get_count_p, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_set_display_n", utc_badge_set_display_n, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_set_display_p", utc_badge_set_display_p, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_get_display_n", utc_badge_get_display_n, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_get_display_n2", utc_badge_get_display_n2, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_get_display_p", utc_badge_get_display_p, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_new_n", utc_badge_new_n, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {"utc_badge_new_p", utc_badge_new_p, utc_badge_setting_startup, utc_badge_setting_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_BADGE_CORE_H__
diff --git a/src/utc/badge/utc-badge.c b/src/utc/badge/utc-badge.c
new file mode 100755 (executable)
index 0000000..308bda2
--- /dev/null
@@ -0,0 +1,297 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <libintl.h>
+
+#include <badge.h>
+
+#include "assert.h"
+
+//& set: utc-badge
+
+#define TEST_PKG "core.badge-tests"
+#define TEST_COUNT 1
+
+int foreach_executed;
+
+static void _badge_foreach_cb(const char *pkgname, unsigned int count,
+        void *data)
+{
+    foreach_executed = 1;
+}
+
+static void _badge_changed_cb(unsigned int action, const char *pkgname,
+            unsigned int count, void *data) {
+
+}
+
+static void _badge_changed_cb2(unsigned int action, const char *pkgname,
+            unsigned int count, void *data) {
+
+}
+
+static void _deferred_job_cb(void *data)
+{
+}
+
+void utc_badge_setting_startup(void)
+{
+    badge_remove(TEST_PKG);
+}
+
+void utc_badge_setting_cleanup(void)
+{
+    badge_remove(TEST_PKG);
+}
+
+/**
+ * @brief Negative test case of badge_remove()
+ */
+int utc_badge_remove_n(void)
+{
+    int ret;
+
+    ret = badge_remove(NULL);
+
+    assert_eq(ret, BADGE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of badge_remove()
+ */
+int utc_badge_remove_p(void)
+{
+    int ret;
+
+    ret = badge_new(TEST_PKG);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_remove(TEST_PKG);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of badge_set_count() - NULL package
+ */
+int utc_badge_set_count_n(void)
+{
+    int ret;
+
+    ret = badge_set_count(NULL, 0);
+
+    assert_eq(ret, BADGE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of badge_set_count()
+ */
+int utc_badge_set_count_p(void)
+{
+    int ret;
+
+    ret = badge_new(TEST_PKG);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_set_count(TEST_PKG, TEST_COUNT);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    return 0;
+}
+
+
+/**
+ * @brief Negative test case of badge_get_count() - all argument NULL
+ */
+int utc_badge_get_count_n(void)
+{
+    int ret;
+
+    ret = badge_get_count(NULL, NULL);
+
+    assert_eq(ret, BADGE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of badge_get_count() - value pointer NULL
+ */
+int utc_badge_get_count_n2(void)
+{
+    int ret;
+
+    ret = badge_new(TEST_PKG);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_set_count(TEST_PKG, TEST_COUNT);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_get_count(TEST_PKG, NULL);    
+    assert_eq(ret, BADGE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of badge_get_count()
+ */
+int utc_badge_get_count_p(void)
+{
+    int ret;
+    unsigned int count = 0;
+
+    ret = badge_new(TEST_PKG);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_set_count(TEST_PKG, TEST_COUNT);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_get_count(TEST_PKG, &count);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    assert_eq(count, 1);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of badge_set_display()
+ */
+int utc_badge_set_display_n(void)
+{
+    int ret;
+
+    ret = badge_set_display(NULL, 0);
+
+    assert_eq(ret, BADGE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of badge_set_display()
+ */
+int utc_badge_set_display_p(void)
+{
+    int ret;
+
+    ret = badge_new(TEST_PKG);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_set_display(TEST_PKG, TEST_COUNT);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of badge_get_display() - all arguments NULL
+ */
+int utc_badge_get_display_n(void)
+{
+    int ret;
+
+    ret = badge_get_display(NULL, NULL);
+
+    assert_eq(ret, BADGE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of badge_get_display() - value pointer NULL
+ */
+int utc_badge_get_display_n2(void)
+{
+    int ret;
+
+    ret = badge_new(TEST_PKG);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_set_display(TEST_PKG, TEST_COUNT);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_get_display(TEST_PKG, NULL);
+    assert_eq(ret, BADGE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of badge_get_display()
+ */
+int utc_badge_get_display_p(void)
+{
+    int ret;
+    unsigned int count = 0;
+
+    ret = badge_new(TEST_PKG);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_set_display(TEST_PKG, TEST_COUNT);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_get_display(TEST_PKG, &count);
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    assert_eq(count, TEST_COUNT);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of badge_new()
+ */
+int utc_badge_new_n(void)
+{
+    int ret;
+
+    ret = badge_new(TEST_PKG);
+
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    ret = badge_new(TEST_PKG);
+
+    assert_eq(ret, BADGE_ERROR_ALREADY_EXIST);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of badge_new()
+ */
+int utc_badge_new_p(void)
+{
+    int ret;
+    bool exists;
+
+    ret = badge_new(TEST_PKG);
+
+    assert_eq(ret, BADGE_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/base-utils/CMakeLists.txt b/src/utc/base-utils/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..96010e7
--- /dev/null
@@ -0,0 +1,49 @@
+SET(PKG_NAME "base-utils")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-base-utils-i18n")
+SET(TC_SOURCES
+       utc-capi-base-utils-ucalendar.c
+       utc-capi-base-utils-udate.c
+       utc-capi-base-utils-udatepg.c
+       utc-capi-base-utils-uenumeration.c
+       utc-capi-base-utils-ulocale.c
+       utc-capi-base-utils-unumber.c
+       utc-capi-base-utils-uset.c
+       utc-capi-base-utils-timezone.c
+       utc-capi-base-utils-ubrk.c
+       utc-capi-base-utils-uchar.c
+       utc-capi-base-utils-ucollator.c
+       utc-capi-base-utils-unormalization.c
+       utc-capi-base-utils-usearch.c
+       utc-capi-base-utils-ustring.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       bundle
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+MESSAGE("EXEC ${EXEC_NAME}")
+MESSAGE("BIN_DIR ${BIN_DIR}")
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/base-utils/public.list b/src/utc/base-utils/public.list
new file mode 100755 (executable)
index 0000000..9d62c57
--- /dev/null
@@ -0,0 +1,331 @@
+i18n_timezone_clone
+i18n_timezone_count_equivalent_ids
+i18n_timezone_create
+i18n_timezone_create_default
+i18n_timezone_create_gmt
+i18n_timezone_create_unknown
+i18n_timezone_destroy
+i18n_timezone_foreach_timezone_id
+i18n_timezone_foreach_timezone_id_by_country
+i18n_timezone_foreach_timezone_id_by_region
+i18n_timezone_foreach_timezone_id_with_offset
+i18n_timezone_get_display_name
+i18n_timezone_get_display_name_with_locale
+i18n_timezone_get_display_name_with_type
+i18n_timezone_get_display_name_with_type_locale
+i18n_timezone_get_dst_savings
+i18n_timezone_get_equivalent_id
+i18n_timezone_get_id
+i18n_timezone_get_offset_with_date
+i18n_timezone_get_raw_offset
+i18n_timezone_get_region
+i18n_timezone_get_tzdata_version
+i18n_timezone_has_same_rule
+i18n_timezone_in_daylight_time
+i18n_timezone_set_default
+i18n_timezone_set_id
+i18n_timezone_set_raw_offset
+i18n_timezone_use_daylight_time
+i18n_ubrk_count_available
+i18n_ubrk_create
+i18n_ubrk_create_rules
+i18n_ubrk_current
+i18n_ubrk_destroy
+i18n_ubrk_first
+i18n_ubrk_following
+i18n_ubrk_get_available
+i18n_ubrk_get_locale_by_type
+i18n_ubrk_get_rule_status
+i18n_ubrk_get_rule_status_vec
+i18n_ubrk_is_boundary
+i18n_ubrk_last
+i18n_ubrk_next
+i18n_ubrk_preceding
+i18n_ubrk_previous
+i18n_ubrk_safe_clone
+i18n_ubrk_set_text
+i18n_ucalendar_add
+i18n_ucalendar_clear
+i18n_ucalendar_clear_field
+i18n_ucalendar_clone
+i18n_ucalendar_count_available
+i18n_ucalendar_country_timezones_create
+i18n_ucalendar_create
+i18n_ucalendar_destroy
+i18n_ucalendar_get
+i18n_ucalendar_get_attribute
+i18n_ucalendar_get_available
+i18n_ucalendar_get_canonical_timezone_id
+i18n_ucalendar_get_day_of_week_type
+i18n_ucalendar_get_default_timezone
+i18n_ucalendar_get_field_difference
+i18n_ucalendar_get_gregorian_change
+i18n_ucalendar_get_keyword_values_for_locale
+i18n_ucalendar_get_limit
+i18n_ucalendar_get_locale_by_type
+i18n_ucalendar_get_milliseconds
+i18n_ucalendar_get_now
+i18n_ucalendar_get_timezone_displayname
+i18n_ucalendar_get_timezone_id
+i18n_ucalendar_get_timezone_transition_date
+i18n_ucalendar_get_type
+i18n_ucalendar_get_tz_data_version
+i18n_ucalendar_get_weekend_transition
+i18n_ucalendar_is_equivalent_to
+i18n_ucalendar_is_in_daylight_time
+i18n_ucalendar_is_set
+i18n_ucalendar_is_weekend
+i18n_ucalendar_roll
+i18n_ucalendar_set
+i18n_ucalendar_set_attribute
+i18n_ucalendar_set_date
+i18n_ucalendar_set_date_time
+i18n_ucalendar_set_default_timezone
+i18n_ucalendar_set_gregorian_change
+i18n_ucalendar_set_milliseconds
+i18n_ucalendar_set_timezone
+i18n_ucalendar_timezone_id_enumeration_create
+i18n_ucalendar_timezones_create
+i18n_uchar_get_int_property_value
+i18n_uchar_get_ublock_code
+i18n_ucollator_create
+i18n_ucollator_destroy
+i18n_ucollator_equal
+i18n_ucollator_set_attribute
+i18n_ucollator_set_strength
+i18n_ucollator_str_collator
+i18n_udate_apply_pattern
+i18n_udate_clone
+i18n_udate_count_available
+i18n_udate_count_symbols
+i18n_udate_create
+i18n_udate_destroy
+i18n_udate_format_date
+i18n_udate_get_2digit_year_start
+i18n_udate_get_available
+i18n_udate_get_calendar
+i18n_udate_get_locale_by_type
+i18n_udate_get_number_format
+i18n_udate_get_symbols
+i18n_udate_is_lenient
+i18n_udate_parse
+i18n_udate_parse_calendar
+i18n_udate_set_2digit_year_start
+i18n_udate_set_calendar
+i18n_udate_set_context
+i18n_udate_set_lenient
+i18n_udate_set_number_format
+i18n_udate_set_symbols
+i18n_udate_to_calendar_date_field
+i18n_udate_to_pattern
+i18n_udatepg_add_pattern
+i18n_udatepg_base_skeletons_create
+i18n_udatepg_clone
+i18n_udatepg_create
+i18n_udatepg_create_empty
+i18n_udatepg_destroy
+i18n_udatepg_get_append_item_format
+i18n_udatepg_get_append_item_name
+i18n_udatepg_get_base_skeleton
+i18n_udatepg_get_best_pattern
+i18n_udatepg_get_best_pattern_with_options
+i18n_udatepg_get_date_time_format
+i18n_udatepg_get_decimal
+i18n_udatepg_get_pattern_for_skeleton
+i18n_udatepg_get_skeleton
+i18n_udatepg_replace_field_types
+i18n_udatepg_replace_field_types_with_options
+i18n_udatepg_set_append_item_format
+i18n_udatepg_set_append_item_name
+i18n_udatepg_set_date_time_format
+i18n_udatepg_set_decimal
+i18n_udatepg_skeletons_create
+i18n_uenumeration_char_strings_enumeration_create
+i18n_uenumeration_count
+i18n_uenumeration_destroy
+i18n_uenumeration_next
+i18n_uenumeration_reset
+i18n_uenumeration_uchar_strings_enumeration_create
+i18n_uenumeration_unext
+i18n_ulocale_add_likely_subtags
+i18n_ulocale_canonicalize
+i18n_ulocale_count_available
+i18n_ulocale_for_language_tag
+i18n_ulocale_get_available
+i18n_ulocale_get_base_name
+i18n_ulocale_get_character_orientation
+i18n_ulocale_get_country
+i18n_ulocale_get_default
+i18n_ulocale_get_display_country
+i18n_ulocale_get_display_keyword
+i18n_ulocale_get_display_keyword_value
+i18n_ulocale_get_display_language
+i18n_ulocale_get_display_name
+i18n_ulocale_get_display_script
+i18n_ulocale_get_display_variant
+i18n_ulocale_get_iso3_country
+i18n_ulocale_get_iso3_language
+i18n_ulocale_get_iso_countries
+i18n_ulocale_get_iso_languages
+i18n_ulocale_get_keyword_value
+i18n_ulocale_get_language
+i18n_ulocale_get_lcid
+i18n_ulocale_get_line_orientation
+i18n_ulocale_get_locale_for_lcid
+i18n_ulocale_get_name
+i18n_ulocale_get_parent
+i18n_ulocale_get_script
+i18n_ulocale_get_variant
+i18n_ulocale_keywords_create
+i18n_ulocale_minimize_subtags
+i18n_ulocale_set_default
+i18n_ulocale_set_keyword_value
+i18n_ulocale_to_language_tag
+i18n_unormalization_get_instance
+i18n_unormalization_normalize
+i18n_unumber_apply_pattern
+i18n_unumber_clone
+i18n_unumber_count_available
+i18n_unumber_create
+i18n_unumber_destroy
+i18n_unumber_format
+i18n_unumber_format_decimal
+i18n_unumber_format_double
+i18n_unumber_format_double_currency
+i18n_unumber_format_int64
+i18n_unumber_get_attribute
+i18n_unumber_get_available
+i18n_unumber_get_double_attribute
+i18n_unumber_get_locale_by_type
+i18n_unumber_get_symbol
+i18n_unumber_get_text_attribute
+i18n_unumber_parse
+i18n_unumber_parse_decimal
+i18n_unumber_parse_double
+i18n_unumber_parse_double_currency
+i18n_unumber_parse_int64
+i18n_unumber_set_attribute
+i18n_unumber_set_double_attribute
+i18n_unumber_set_symbol
+i18n_unumber_set_text_attribute
+i18n_unumber_to_pattern
+i18n_usearch_create_new
+i18n_usearch_destroy
+i18n_usearch_first
+i18n_usearch_get_collator
+i18n_usearch_get_matched_text
+i18n_uset_add
+i18n_uset_add_all
+i18n_uset_add_all_code_points
+i18n_uset_add_range
+i18n_uset_add_string
+i18n_uset_apply_int_property_value
+i18n_uset_apply_pattern
+i18n_uset_apply_property_alias
+i18n_uset_char_at
+i18n_uset_clear
+i18n_uset_clone
+i18n_uset_clone_as_thawed
+i18n_uset_compact
+i18n_uset_complement
+i18n_uset_complement_all
+i18n_uset_contains
+i18n_uset_contains_all
+i18n_uset_contains_all_code_points
+i18n_uset_contains_none
+i18n_uset_contains_range
+i18n_uset_contains_some
+i18n_uset_contains_string
+i18n_uset_create
+i18n_uset_create_empty
+i18n_uset_create_pattern
+i18n_uset_create_pattern_options
+i18n_uset_destroy
+i18n_uset_destroy_over
+i18n_uset_equals
+i18n_uset_freeze
+i18n_uset_get_item
+i18n_uset_get_item_count
+i18n_uset_get_serialized_range
+i18n_uset_get_serialized_range_count
+i18n_uset_get_serialized_set
+i18n_uset_index_of
+i18n_uset_is_empty
+i18n_uset_is_frozen
+i18n_uset_remove
+i18n_uset_remove_all
+i18n_uset_remove_all_strings
+i18n_uset_remove_range
+i18n_uset_remove_string
+i18n_uset_resembles_pattern
+i18n_uset_retain
+i18n_uset_retain_all
+i18n_uset_serialize
+i18n_uset_serialized_contains
+i18n_uset_set
+i18n_uset_set_serialized_to_one
+i18n_uset_size
+i18n_uset_span
+i18n_uset_span_back
+i18n_uset_span_back_utf8
+i18n_uset_span_utf8
+i18n_uset_to_pattern
+i18n_ustring_case_compare
+i18n_ustring_case_compare_n
+i18n_ustring_case_compare_with_length
+i18n_ustring_cat
+i18n_ustring_cat_n
+i18n_ustring_char
+i18n_ustring_char32
+i18n_ustring_compare
+i18n_ustring_compare_binary_order
+i18n_ustring_compare_code_point_order
+i18n_ustring_compare_n
+i18n_ustring_compare_n_code_point_order
+i18n_ustring_copy
+i18n_ustring_copy_au
+i18n_ustring_copy_au_n
+i18n_ustring_copy_n
+i18n_ustring_copy_ua
+i18n_ustring_copy_ua_n
+i18n_ustring_count_char32
+i18n_ustring_cspn
+i18n_ustring_find_first
+i18n_ustring_find_last
+i18n_ustring_fold_case
+i18n_ustring_from_UTF32
+i18n_ustring_from_UTF32_with_sub
+i18n_ustring_from_UTF8
+i18n_ustring_from_UTF8_lenient
+i18n_ustring_from_UTF8_with_sub
+i18n_ustring_from_WCS
+i18n_ustring_get_length
+i18n_ustring_has_more_char32_than
+i18n_ustring_mem_case_compare
+i18n_ustring_mem_char
+i18n_ustring_mem_char32
+i18n_ustring_mem_compare
+i18n_ustring_mem_compare_code_point_order
+i18n_ustring_mem_copy
+i18n_ustring_mem_move
+i18n_ustring_mem_r_char
+i18n_ustring_mem_r_char32
+i18n_ustring_mem_set
+i18n_ustring_pbrk
+i18n_ustring_r_char
+i18n_ustring_r_char32
+i18n_ustring_r_string
+i18n_ustring_spn
+i18n_ustring_string
+i18n_ustring_to_UTF32
+i18n_ustring_to_UTF32_with_sub
+i18n_ustring_to_UTF8
+i18n_ustring_to_UTF8_with_sub
+i18n_ustring_to_WCS
+i18n_ustring_to_lower
+i18n_ustring_to_title
+i18n_ustring_to_title_new
+i18n_ustring_to_upper
+i18n_ustring_tokenizer_r
+i18n_ustring_unescape
+i18n_ustring_unescape_at
diff --git a/src/utc/base-utils/tct-base-utils-core.c b/src/utc/base-utils/tct-base-utils-core.c
new file mode 100755 (executable)
index 0000000..1f9ce08
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-base-utils-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/base-utils/tct-base-utils-core.h b/src/utc/base-utils/tct-base-utils-core.h
new file mode 100755 (executable)
index 0000000..362891b
--- /dev/null
@@ -0,0 +1,1345 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_BASE_UTILS_CORE_H__
+#define __TCT_BASE_UTILS_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_capi_base_utils_string_startup(void);
+extern void utc_capi_base_utils_string_cleanup(void);
+extern void utc_capi_base_utils_timezone_startup(void);
+extern void utc_capi_base_utils_timezone_cleanup(void);
+extern void utc_capi_base_utils_ubrk_startup(void);
+extern void utc_capi_base_utils_ubrk_cleanup(void);
+extern void utc_capi_base_utils_ucalendar_startup(void);
+extern void utc_capi_base_utils_ucalendar_cleanup(void);
+extern void utc_capi_base_utils_uchar_startup(void);
+extern void utc_capi_base_utils_uchar_cleanup(void);
+extern void utc_capi_base_utils_ucollator_startup(void);
+extern void utc_capi_base_utils_ucollator_cleanup(void);
+extern void utc_capi_base_utils_udatepg_startup(void);
+extern void utc_capi_base_utils_udatepg_cleanup(void);
+extern void utc_capi_base_utils_udate_startup(void);
+extern void utc_capi_base_utils_udate_cleanup(void);
+extern void utc_capi_base_utils_uenumeration_startup(void);
+extern void utc_capi_base_utils_uenumeration_cleanup(void);
+extern void utc_capi_base_utils_ulocale_startup(void);
+extern void utc_capi_base_utils_ulocale_cleanup(void);
+extern void utc_capi_base_utils_unormalization_startup(void);
+extern void utc_capi_base_utils_unormalization_cleanup(void);
+extern void utc_capi_base_utils_unumber_startup(void);
+extern void utc_capi_base_utils_unumber_cleanup(void);
+extern void utc_capi_base_utils_usearch_startup(void);
+extern void utc_capi_base_utils_usearch_cleanup(void);
+extern void utc_capi_base_utils_uset_startup(void);
+extern void utc_capi_base_utils_uset_cleanup(void);
+
+extern int utc_capi_base_utils_i18n_ustring_get_length_p(void);
+extern int utc_capi_base_utils_i18n_ustring_get_length_n(void);
+extern int utc_capi_base_utils_i18n_ustring_count_char32_p(void);
+extern int utc_capi_base_utils_i18n_ustring_count_char32_n(void);
+extern int utc_capi_base_utils_i18n_ustring_has_more_char32_than_p(void);
+extern int utc_capi_base_utils_i18n_ustring_has_more_char32_than_n(void);
+extern int utc_capi_base_utils_i18n_ustring_cat_p(void);
+extern int utc_capi_base_utils_i18n_ustring_cat_n(void);
+extern int utc_capi_base_utils_i18n_ustring_cat_n_p(void);
+extern int utc_capi_base_utils_i18n_ustring_cat_n_n(void);
+extern int utc_capi_base_utils_i18n_ustring_string_p(void);
+extern int utc_capi_base_utils_i18n_ustring_string_n(void);
+extern int utc_capi_base_utils_i18n_ustring_find_first_p(void);
+extern int utc_capi_base_utils_i18n_ustring_find_first_n(void);
+extern int utc_capi_base_utils_i18n_ustring_char_p(void);
+extern int utc_capi_base_utils_i18n_ustring_char_n(void);
+extern int utc_capi_base_utils_i18n_ustring_char32_p(void);
+extern int utc_capi_base_utils_i18n_ustring_char32_n(void);
+extern int utc_capi_base_utils_i18n_ustring_r_string_p(void);
+extern int utc_capi_base_utils_i18n_ustring_r_string_n(void);
+extern int utc_capi_base_utils_i18n_ustring_find_last_p(void);
+extern int utc_capi_base_utils_i18n_ustring_find_last_n(void);
+extern int utc_capi_base_utils_i18n_ustring_r_char_p(void);
+extern int utc_capi_base_utils_i18n_ustring_r_char_n(void);
+extern int utc_capi_base_utils_i18n_ustring_r_char32_p(void);
+extern int utc_capi_base_utils_i18n_ustring_r_char32_n(void);
+extern int utc_capi_base_utils_i18n_ustring_pbrk_p(void);
+extern int utc_capi_base_utils_i18n_ustring_pbrk_n(void);
+extern int utc_capi_base_utils_i18n_ustring_cspn_p(void);
+extern int utc_capi_base_utils_i18n_ustring_cspn_n(void);
+extern int utc_capi_base_utils_i18n_ustring_spn_p(void);
+extern int utc_capi_base_utils_i18n_ustring_spn_n(void);
+extern int utc_capi_base_utils_i18n_ustring_tokenizer_r_p(void);
+extern int utc_capi_base_utils_i18n_ustring_tokenizer_r_n(void);
+extern int utc_capi_base_utils_i18n_ustring_compare_p(void);
+extern int utc_capi_base_utils_i18n_ustring_compare_n(void);
+extern int utc_capi_base_utils_i18n_ustring_compare_code_point_order_p(void);
+extern int utc_capi_base_utils_i18n_ustring_compare_code_point_order_n(void);
+extern int utc_capi_base_utils_i18n_ustring_compare_binary_order_p(void);
+extern int utc_capi_base_utils_i18n_ustring_compare_binary_order_n(void);
+extern int utc_capi_base_utils_i18n_ustring_case_compare_with_length_p(void);
+extern int utc_capi_base_utils_i18n_ustring_case_compare_with_length_n(void);
+extern int utc_capi_base_utils_i18n_ustring_compare_n_p(void);
+extern int utc_capi_base_utils_i18n_ustring_compare_n_n(void);
+extern int utc_capi_base_utils_i18n_ustring_compare_n_code_point_order_p(void);
+extern int utc_capi_base_utils_i18n_ustring_compare_n_code_point_order_n(void);
+extern int utc_capi_base_utils_i18n_ustring_case_compare_p(void);
+extern int utc_capi_base_utils_i18n_ustring_case_compare_n(void);
+extern int utc_capi_base_utils_i18n_ustring_case_compare_n_p(void);
+extern int utc_capi_base_utils_i18n_ustring_case_compare_n_n(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_case_compare_p(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_case_compare_n(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_au_p(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_au_n(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_au_n_p(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_au_n_n(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_p(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_n(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_n_p(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_n_n(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_ua_p(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_ua_n(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_ua_n_p(void);
+extern int utc_capi_base_utils_i18n_ustring_copy_ua_n_n(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_copy_p(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_copy_n(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_move_p(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_move_n(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_set_p(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_set_n(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_compare_p(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_compare_n(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_compare_code_point_order_p(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_compare_code_point_order_n(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_char_p(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_char_n(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_char32_p(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_char32_n(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_r_char_p(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_r_char_n(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_r_char32_p(void);
+extern int utc_capi_base_utils_i18n_ustring_mem_r_char32_n(void);
+extern int utc_capi_base_utils_i18n_ustring_unescape_p(void);
+extern int utc_capi_base_utils_i18n_ustring_unescape_n(void);
+extern int utc_capi_base_utils_i18n_ustring_unescape_at_p(void);
+extern int utc_capi_base_utils_i18n_ustring_unescape_at_n(void);
+extern int utc_capi_base_utils_i18n_ustring_to_upper_p(void);
+extern int utc_capi_base_utils_i18n_ustring_to_upper_n(void);
+extern int utc_capi_base_utils_i18n_ustring_to_lower_p(void);
+extern int utc_capi_base_utils_i18n_ustring_to_lower_n(void);
+extern int utc_capi_base_utils_i18n_ustring_to_title_new_p(void);
+extern int utc_capi_base_utils_i18n_ustring_to_title_new_n(void);
+extern int utc_capi_base_utils_i18n_ustring_fold_case_p(void);
+extern int utc_capi_base_utils_i18n_ustring_fold_case_n(void);
+extern int utc_capi_base_utils_i18n_ustring_to_WCS_p(void);
+extern int utc_capi_base_utils_i18n_ustring_to_WCS_n(void);
+extern int utc_capi_base_utils_i18n_ustring_from_WCS_p(void);
+extern int utc_capi_base_utils_i18n_ustring_from_WCS_n(void);
+extern int utc_capi_base_utils_i18n_ustring_to_UTF8_p(void);
+extern int utc_capi_base_utils_i18n_ustring_to_UTF8_n(void);
+extern int utc_capi_base_utils_i18n_ustring_from_UTF8_p(void);
+extern int utc_capi_base_utils_i18n_ustring_from_UTF8_n(void);
+extern int utc_capi_base_utils_i18n_ustring_to_UTF8_with_sub_p(void);
+extern int utc_capi_base_utils_i18n_ustring_to_UTF8_with_sub_n(void);
+extern int utc_capi_base_utils_i18n_ustring_from_UTF8_with_sub_p(void);
+extern int utc_capi_base_utils_i18n_ustring_from_UTF8_with_sub_n(void);
+extern int utc_capi_base_utils_i18n_ustring_from_UTF8_lenient_p(void);
+extern int utc_capi_base_utils_i18n_ustring_from_UTF8_lenient_n(void);
+extern int utc_capi_base_utils_i18n_ustring_to_UTF32_p(void);
+extern int utc_capi_base_utils_i18n_ustring_to_UTF32_n(void);
+extern int utc_capi_base_utils_i18n_ustring_from_UTF32_p(void);
+extern int utc_capi_base_utils_i18n_ustring_from_UTF32_n(void);
+extern int utc_capi_base_utils_i18n_ustring_to_UTF32_with_sub_p(void);
+extern int utc_capi_base_utils_i18n_ustring_to_UTF32_with_sub_n(void);
+extern int utc_capi_base_utils_i18n_ustring_from_UTF32_with_sub_p(void);
+extern int utc_capi_base_utils_i18n_ustring_from_UTF32_with_sub_n(void);
+extern int utc_capi_base_utils_i18n_timezone_create_unknown_p(void);
+extern int utc_capi_base_utils_i18n_timezone_create_unknown_n(void);
+extern int utc_capi_base_utils_i18n_timezone_create_gmt_p(void);
+extern int utc_capi_base_utils_i18n_timezone_create_gmt_n(void);
+extern int utc_capi_base_utils_i18n_timezone_create_p(void);
+extern int utc_capi_base_utils_i18n_timezone_create_n(void);
+extern int utc_capi_base_utils_i18n_timezone_destroy_p(void);
+extern int utc_capi_base_utils_i18n_timezone_destroy_n(void);
+extern int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_region_p(void);
+extern int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_region_n(void);
+extern int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_p(void);
+extern int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_n(void);
+extern int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_with_offset_p(void);
+extern int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_with_offset_n(void);
+extern int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_country_p(void);
+extern int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_country_n(void);
+extern int utc_capi_base_utils_i18n_timezone_count_equivalent_ids_p(void);
+extern int utc_capi_base_utils_i18n_timezone_count_equivalent_ids_n(void);
+extern int utc_capi_base_utils_i18n_timezone_get_equivalent_id_p(void);
+extern int utc_capi_base_utils_i18n_timezone_get_equivalent_id_n(void);
+extern int utc_capi_base_utils_i18n_timezone_create_default_p(void);
+extern int utc_capi_base_utils_i18n_timezone_create_default_n(void);
+extern int utc_capi_base_utils_i18n_timezone_set_default_p(void);
+extern int utc_capi_base_utils_i18n_timezone_set_default_n(void);
+extern int utc_capi_base_utils_i18n_timezone_get_tzdata_version_p(void);
+extern int utc_capi_base_utils_i18n_timezone_get_region_p(void);
+extern int utc_capi_base_utils_i18n_timezone_get_region_n(void);
+extern int utc_capi_base_utils_i18n_timezone_get_offset_with_date_p(void);
+extern int utc_capi_base_utils_i18n_timezone_get_offset_with_date_n(void);
+extern int utc_capi_base_utils_i18n_timezone_set_raw_offset_p(void);
+extern int utc_capi_base_utils_i18n_timezone_set_raw_offset_n(void);
+extern int utc_capi_base_utils_i18n_timezone_get_raw_offset_p(void);
+extern int utc_capi_base_utils_i18n_timezone_get_raw_offset_n(void);
+extern int utc_capi_base_utils_i18n_timezone_get_id_p(void);
+extern int utc_capi_base_utils_i18n_timezone_get_id_n(void);
+extern int utc_capi_base_utils_i18n_timezone_set_id_p(void);
+extern int utc_capi_base_utils_i18n_timezone_set_id_n(void);
+extern int utc_capi_base_utils_i18n_timezone_get_display_name_p(void);
+extern int utc_capi_base_utils_i18n_timezone_get_display_name_n(void);
+extern int utc_capi_base_utils_i18n_timezone_get_display_name_with_locale_p(void);
+extern int utc_capi_base_utils_i18n_timezone_get_display_name_with_locale_n(void);
+extern int utc_capi_base_utils_i18n_timezone_get_display_name_with_type_p(void);
+extern int utc_capi_base_utils_i18n_timezone_get_display_name_with_type_n(void);
+extern int utc_capi_base_utils_i18n_timezone_get_display_name_with_type_locale_p(void);
+extern int utc_capi_base_utils_i18n_timezone_get_display_name_with_type_locale_n(void);
+extern int utc_capi_base_utils_i18n_timezone_use_daylight_time_p(void);
+extern int utc_capi_base_utils_i18n_timezone_use_daylight_time_n(void);
+extern int utc_capi_base_utils_i18n_timezone_has_same_rule_p(void);
+extern int utc_capi_base_utils_i18n_timezone_has_same_rule_n(void);
+extern int utc_capi_base_utils_i18n_timezone_clone_p(void);
+extern int utc_capi_base_utils_i18n_timezone_clone_n(void);
+extern int utc_capi_base_utils_i18n_timezone_get_dst_savings_p(void);
+extern int utc_capi_base_utils_i18n_timezone_get_dst_savings_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_create_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_create_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_create_rules_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_create_rules_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_safe_clone_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_safe_clone_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_destroy_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_destroy_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_set_text_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_set_text_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_current_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_current_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_next_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_next_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_previous_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_previous_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_first_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_first_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_last_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_last_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_preceding_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_preceding_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_following_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_following_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_get_available_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_get_available_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_count_available_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_is_boundary_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_is_boundary_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_get_rule_status_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_get_rule_status_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_get_rule_status_vec_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_get_rule_status_vec_n(void);
+extern int utc_capi_base_utils_i18n_ubrk_get_locale_by_type_p(void);
+extern int utc_capi_base_utils_i18n_ubrk_get_locale_by_type_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_default_timezone_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_default_timezone_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_now_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_now_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_create_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_create_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_destroy_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_destroy_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_clone_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_clone_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_timezone_displayname_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_timezone_displayname_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_is_in_daylight_time_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_is_in_daylight_time_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_attribute_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_attribute_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_attribute_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_attribute_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_milliseconds_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_milliseconds_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_milliseconds_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_milliseconds_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_date_time_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_date_time_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_is_equivalent_to_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_is_equivalent_to_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_add_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_add_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_field_difference_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_field_difference_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_timezone_id_enumeration_create_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_timezone_id_enumeration_create_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_timezones_create_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_timezones_create_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_country_timezones_create_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_country_timezones_create_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_default_timezone_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_default_timezone_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_timezone_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_timezone_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_timezone_id_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_timezone_id_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_gregorian_change_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_gregorian_change_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_gregorian_change_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_gregorian_change_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_available_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_available_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_count_available_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_date_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_set_date_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_roll_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_roll_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_is_set_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_is_set_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_clear_field_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_clear_field_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_clear_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_clear_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_limit_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_limit_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_locale_by_type_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_locale_by_type_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_tz_data_version_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_canonical_timezone_id_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_canonical_timezone_id_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_type_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_type_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_keyword_values_for_locale_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_keyword_values_for_locale_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_day_of_week_type_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_day_of_week_type_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_weekend_transition_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_weekend_transition_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_is_weekend_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_is_weekend_n(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_timezone_transition_date_p(void);
+extern int utc_capi_base_utils_i18n_ucalendar_get_timezone_transition_date_n(void);
+extern int utc_capi_base_utils_i18n_uchar_get_int_property_value_p(void);
+extern int utc_capi_base_utils_i18n_uchar_get_int_property_value_n(void);
+extern int utc_capi_base_utils_i18n_uchar_get_ublock_code_p(void);
+extern int utc_capi_base_utils_i18n_uchar_get_ublock_code_n(void);
+extern int utc_capi_base_utils_i18n_ucollator_create_p(void);
+extern int utc_capi_base_utils_i18n_ucollator_create_n(void);
+extern int utc_capi_base_utils_i18n_ucollator_destroy_p(void);
+extern int utc_capi_base_utils_i18n_ucollator_destroy_n(void);
+extern int utc_capi_base_utils_i18n_ucollator_str_collator_p(void);
+extern int utc_capi_base_utils_i18n_ucollator_str_collator_n(void);
+extern int utc_capi_base_utils_i18n_ucollator_equal_p(void);
+extern int utc_capi_base_utils_i18n_ucollator_equal_n(void);
+extern int utc_capi_base_utils_i18n_ucollator_set_strength_p(void);
+extern int utc_capi_base_utils_i18n_ucollator_set_strength_n(void);
+extern int utc_capi_base_utils_i18n_ucollator_set_attribute_p(void);
+extern int utc_capi_base_utils_i18n_ucollator_set_attribute_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_create_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_create_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_destroy_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_destroy_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_best_pattern_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_best_pattern_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_create_empty_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_create_empty_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_clone_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_clone_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_best_pattern_with_options_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_best_pattern_with_options_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_skeleton_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_skeleton_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_base_skeleton_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_base_skeleton_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_add_pattern_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_add_pattern_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_set_append_item_format_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_set_append_item_format_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_append_item_format_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_append_item_format_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_set_append_item_name_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_set_append_item_name_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_append_item_name_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_append_item_name_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_set_date_time_format_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_set_date_time_format_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_date_time_format_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_date_time_format_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_set_decimal_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_set_decimal_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_decimal_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_decimal_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_replace_field_types_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_replace_field_types_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_replace_field_types_with_options_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_replace_field_types_with_options_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_skeletons_create_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_skeletons_create_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_base_skeletons_create_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_base_skeletons_create_n(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_pattern_for_skeleton_p(void);
+extern int utc_capi_base_utils_i18n_udatepg_get_pattern_for_skeleton_n(void);
+extern int utc_capi_base_utils_i18n_udate_create_p(void);
+extern int utc_capi_base_utils_i18n_udate_create_n(void);
+extern int utc_capi_base_utils_i18n_udate_destroy_p(void);
+extern int utc_capi_base_utils_i18n_udate_destroy_n(void);
+extern int utc_capi_base_utils_i18n_udate_format_date_p(void);
+extern int utc_capi_base_utils_i18n_udate_format_date_n(void);
+extern int utc_capi_base_utils_i18n_udate_to_calendar_date_field_p(void);
+extern int utc_capi_base_utils_i18n_udate_to_calendar_date_field_n(void);
+extern int utc_capi_base_utils_i18n_udate_clone_p(void);
+extern int utc_capi_base_utils_i18n_udate_clone_n(void);
+extern int utc_capi_base_utils_i18n_udate_parse_p(void);
+extern int utc_capi_base_utils_i18n_udate_parse_n(void);
+extern int utc_capi_base_utils_i18n_udate_parse_calendar_p(void);
+extern int utc_capi_base_utils_i18n_udate_parse_calendar_n(void);
+extern int utc_capi_base_utils_i18n_udate_is_lenient_p(void);
+extern int utc_capi_base_utils_i18n_udate_is_lenient_n(void);
+extern int utc_capi_base_utils_i18n_udate_set_lenient_p(void);
+extern int utc_capi_base_utils_i18n_udate_set_lenient_n(void);
+extern int utc_capi_base_utils_i18n_udate_get_calendar_p(void);
+extern int utc_capi_base_utils_i18n_udate_get_calendar_n(void);
+extern int utc_capi_base_utils_i18n_udate_set_calendar_p(void);
+extern int utc_capi_base_utils_i18n_udate_set_calendar_n(void);
+extern int utc_capi_base_utils_i18n_udate_get_number_format_p(void);
+extern int utc_capi_base_utils_i18n_udate_get_number_format_n(void);
+extern int utc_capi_base_utils_i18n_udate_set_number_format_p(void);
+extern int utc_capi_base_utils_i18n_udate_set_number_format_n(void);
+extern int utc_capi_base_utils_i18n_udate_get_available_p(void);
+extern int utc_capi_base_utils_i18n_udate_get_available_n(void);
+extern int utc_capi_base_utils_i18n_udate_count_available_p(void);
+extern int utc_capi_base_utils_i18n_udate_get_2digit_year_start_p(void);
+extern int utc_capi_base_utils_i18n_udate_get_2digit_year_start_n(void);
+extern int utc_capi_base_utils_i18n_udate_set_2digit_year_start_p(void);
+extern int utc_capi_base_utils_i18n_udate_set_2digit_year_start_n(void);
+extern int utc_capi_base_utils_i18n_udate_to_pattern_p(void);
+extern int utc_capi_base_utils_i18n_udate_to_pattern_n(void);
+extern int utc_capi_base_utils_i18n_udate_apply_pattern_p(void);
+extern int utc_capi_base_utils_i18n_udate_apply_pattern_n(void);
+extern int utc_capi_base_utils_i18n_udate_get_symbols_p(void);
+extern int utc_capi_base_utils_i18n_udate_get_symbols_n(void);
+extern int utc_capi_base_utils_i18n_udate_count_symbols_p(void);
+extern int utc_capi_base_utils_i18n_udate_count_symbols_n(void);
+extern int utc_capi_base_utils_i18n_udate_set_symbols_p(void);
+extern int utc_capi_base_utils_i18n_udate_set_symbols_n(void);
+extern int utc_capi_base_utils_i18n_udate_get_locale_by_type_p(void);
+extern int utc_capi_base_utils_i18n_udate_get_locale_by_type_n(void);
+extern int utc_capi_base_utils_i18n_udate_set_context_p(void);
+extern int utc_capi_base_utils_i18n_udate_set_context_n(void);
+extern int utc_capi_base_utils_i18n_uenumeration_destroy_p(void);
+extern int utc_capi_base_utils_i18n_uenumeration_destroy_n(void);
+extern int utc_capi_base_utils_i18n_uenumeration_count_p(void);
+extern int utc_capi_base_utils_i18n_uenumeration_count_n(void);
+extern int utc_capi_base_utils_i18n_uenumeration_unext_p(void);
+extern int utc_capi_base_utils_i18n_uenumeration_unext_n(void);
+extern int utc_capi_base_utils_i18n_uenumeration_next_p(void);
+extern int utc_capi_base_utils_i18n_uenumeration_next_n(void);
+extern int utc_capi_base_utils_i18n_uenumeration_reset_p(void);
+extern int utc_capi_base_utils_i18n_uenumeration_reset_n(void);
+extern int utc_capi_base_utils_i18n_uenumeration_uchar_strings_enumeration_create_p(void);
+extern int utc_capi_base_utils_i18n_uenumeration_uchar_strings_enumeration_create_n(void);
+extern int utc_capi_base_utils_i18n_uenumeration_char_strings_enumeration_create_p(void);
+extern int utc_capi_base_utils_i18n_uenumeration_char_strings_enumeration_create_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_script_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_script_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_variant_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_variant_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_name_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_name_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_canonicalize_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_canonicalize_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_iso3_language_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_iso3_country_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_lcid_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_language_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_language_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_script_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_script_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_country_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_country_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_variant_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_variant_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_keyword_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_keyword_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_keyword_value_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_keyword_value_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_iso_languages_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_iso_countries_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_parent_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_parent_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_base_name_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_base_name_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_keywords_create_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_keywords_create_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_keyword_value_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_keyword_value_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_set_keyword_value_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_set_keyword_value_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_character_orientation_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_character_orientation_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_line_orientation_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_line_orientation_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_locale_for_lcid_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_locale_for_lcid_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_add_likely_subtags_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_add_likely_subtags_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_minimize_subtags_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_minimize_subtags_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_for_language_tag_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_for_language_tag_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_to_language_tag_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_to_language_tag_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_default_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_default_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_set_default_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_language_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_language_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_country_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_country_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_name_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_display_name_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_available_p(void);
+extern int utc_capi_base_utils_i18n_ulocale_get_available_n(void);
+extern int utc_capi_base_utils_i18n_ulocale_count_available_p(void);
+extern int utc_capi_base_utils_i18n_unormalization_normalize_p(void);
+extern int utc_capi_base_utils_i18n_unormalization_normalize_n(void);
+extern int utc_capi_base_utils_i18n_unormalization_get_instance_p(void);
+extern int utc_capi_base_utils_i18n_unormalization_get_instance_n(void);
+extern int utc_capi_base_utils_i18n_unumber_create_p(void);
+extern int utc_capi_base_utils_i18n_unumber_create_n(void);
+extern int utc_capi_base_utils_i18n_unumber_destroy_p(void);
+extern int utc_capi_base_utils_i18n_unumber_destroy_n(void);
+extern int utc_capi_base_utils_i18n_unumber_get_symbol_p(void);
+extern int utc_capi_base_utils_i18n_unumber_get_symbol_n(void);
+extern int utc_capi_base_utils_i18n_unumber_clone_p(void);
+extern int utc_capi_base_utils_i18n_unumber_clone_n(void);
+extern int utc_capi_base_utils_i18n_unumber_format_p(void);
+extern int utc_capi_base_i18n_unumber_format_n(void);
+extern int utc_capi_base_utils_i18n_unumber_format_int64_p(void);
+extern int utc_capi_base_utils_i18n_unumber_format_int64_n(void);
+extern int utc_capi_base_utils_i18n_unumber_format_double_p(void);
+extern int utc_capi_base_utils_i18n_unumber_format_double_n(void);
+extern int utc_capi_base_utils_i18n_unumber_format_decimal_p(void);
+extern int utc_capi_base_utils_i18n_unumber_format_decimal_n(void);
+extern int utc_capi_base_utils_i18n_unumber_format_double_currency_p(void);
+extern int utc_capi_base_utils_i18n_unumber_format_double_currency_n(void);
+extern int utc_capi_base_utils_i18n_unumber_parse_p(void);
+extern int utc_capi_base_utils_i18n_unumber_parse_n(void);
+extern int utc_capi_base_utils_i18n_unumber_parse_int64_p(void);
+extern int utc_capi_base_utils_i18n_unumber_parse_int64_n(void);
+extern int utc_capi_base_utils_i18n_unumber_parse_double_p(void);
+extern int utc_capi_base_utils_i18n_unumber_parse_double_n(void);
+extern int utc_capi_base_utils_i18n_unumber_parse_decimal_p(void);
+extern int utc_capi_base_utils_i18n_unumber_parse_decimal_n(void);
+extern int utc_capi_base_utils_i18n_unumber_parse_double_currency_p(void);
+extern int utc_capi_base_utils_i18n_unumber_parse_double_currency_n(void);
+extern int utc_capi_base_utils_i18n_unumber_apply_pattern_p(void);
+extern int utc_capi_base_utils_i18n_unumber_apply_pattern_n(void);
+extern int utc_capi_base_utils_i18n_unumber_get_available_p(void);
+extern int utc_capi_base_utils_i18n_unumber_get_available_n(void);
+extern int utc_capi_base_utils_i18n_unumber_count_available_p(void);
+extern int utc_capi_base_utils_i18n_unumber_get_attribute_p(void);
+extern int utc_capi_base_utils_i18n_unumber_get_attribute_n(void);
+extern int utc_capi_base_utils_i18n_unumber_set_attribute_p(void);
+extern int utc_capi_base_utils_i18n_unumber_set_attribute_n(void);
+extern int utc_capi_base_utils_i18n_unumber_get_double_attribute_p(void);
+extern int utc_capi_base_utils_i18n_unumber_get_double_attribute_n(void);
+extern int utc_capi_base_utils_i18n_unumber_set_double_attribute_p(void);
+extern int utc_capi_base_utils_i18n_unumber_set_double_attribute_n(void);
+extern int utc_capi_base_utils_i18n_unumber_get_text_attribute_p(void);
+extern int utc_capi_base_utils_i18n_unumber_get_text_attribute_n(void);
+extern int utc_capi_base_utils_i18n_unumber_set_text_attribute_p(void);
+extern int utc_capi_base_utils_i18n_unumber_set_text_attribute_n(void);
+extern int utc_capi_base_utils_i18n_unumber_to_pattern_p(void);
+extern int utc_capi_base_utils_i18n_unumber_to_pattern_n(void);
+extern int utc_capi_base_utils_i18n_unumber_set_symbol_p(void);
+extern int utc_capi_base_utils_i18n_unumber_set_symbol_n(void);
+extern int utc_capi_base_utils_i18n_unumber_get_locale_by_type_p(void);
+extern int utc_capi_base_utils_i18n_unumber_get_locale_by_type_n(void);
+extern int utc_capi_base_utils_i18n_usearch_create_new_p(void);
+extern int utc_capi_base_utils_i18n_usearch_create_new_n(void);
+extern int utc_capi_base_utils_i18n_usearch_destroy_p(void);
+extern int utc_capi_base_utils_i18n_usearch_destroy_n(void);
+extern int utc_capi_base_utils_i18n_usearch_get_matched_text_p(void);
+extern int utc_capi_base_utils_i18n_usearch_get_matched_text_n(void);
+extern int utc_capi_base_utils_i18n_usearch_get_collator_p(void);
+extern int utc_capi_base_utils_i18n_usearch_get_collator_n(void);
+extern int utc_capi_base_utils_i18n_usearch_first_p(void);
+extern int utc_capi_base_utils_i18n_usearch_first_n(void);
+extern int utc_capi_base_utils_i18n_uset_create_empty_p(void);
+extern int utc_capi_base_utils_i18n_uset_create_empty_n(void);
+extern int utc_capi_base_utils_i18n_uset_create_p(void);
+extern int utc_capi_base_utils_i18n_uset_create_n(void);
+extern int utc_capi_base_utils_i18n_uset_create_pattern_p(void);
+extern int utc_capi_base_utils_i18n_uset_create_pattern_n(void);
+extern int utc_capi_base_utils_i18n_uset_create_pattern_options_p(void);
+extern int utc_capi_base_utils_i18n_uset_create_pattern_options_n(void);
+extern int utc_capi_base_utils_i18n_uset_destroy_p(void);
+extern int utc_capi_base_utils_i18n_uset_destroy_n(void);
+extern int utc_capi_base_utils_i18n_uset_clone_p(void);
+extern int utc_capi_base_utils_i18n_uset_clone_n(void);
+extern int utc_capi_base_utils_i18n_uset_is_frozen_p(void);
+extern int utc_capi_base_utils_i18n_uset_is_frozen_n(void);
+extern int utc_capi_base_utils_i18n_uset_freeze_p(void);
+extern int utc_capi_base_utils_i18n_uset_freeze_n(void);
+extern int utc_capi_base_utils_i18n_uset_clone_as_thawed_p(void);
+extern int utc_capi_base_utils_i18n_uset_clone_as_thawed_n(void);
+extern int utc_capi_base_utils_i18n_uset_set_p(void);
+extern int utc_capi_base_utils_i18n_uset_set_n(void);
+extern int utc_capi_base_utils_i18n_uset_apply_pattern_p(void);
+extern int utc_capi_base_utils_i18n_uset_apply_pattern_n(void);
+extern int utc_capi_base_utils_i18n_uset_apply_int_property_value_p(void);
+extern int utc_capi_base_utils_i18n_uset_apply_int_property_value_n(void);
+extern int utc_capi_base_utils_i18n_uset_apply_property_alias_p(void);
+extern int utc_capi_base_utils_i18n_uset_apply_property_alias_n(void);
+extern int utc_capi_base_utils_i18n_uset_resembles_pattern_p(void);
+extern int utc_capi_base_utils_i18n_uset_resembles_pattern_n(void);
+extern int utc_capi_base_utils_i18n_uset_to_pattern_p(void);
+extern int utc_capi_base_utils_i18n_uset_to_pattern_n(void);
+extern int utc_capi_base_utils_i18n_uset_add_p(void);
+extern int utc_capi_base_utils_i18n_uset_add_n(void);
+extern int utc_capi_base_utils_i18n_uset_add_all_p(void);
+extern int utc_capi_base_utils_i18n_uset_add_all_n(void);
+extern int utc_capi_base_utils_i18n_uset_add_range_p(void);
+extern int utc_capi_base_utils_i18n_uset_add_range_n(void);
+extern int utc_capi_base_utils_i18n_uset_add_string_p(void);
+extern int utc_capi_base_utils_i18n_uset_add_string_n(void);
+extern int utc_capi_base_utils_i18n_uset_add_all_code_points_p(void);
+extern int utc_capi_base_utils_i18n_uset_add_all_code_points_n(void);
+extern int utc_capi_base_utils_i18n_uset_remove_p(void);
+extern int utc_capi_base_utils_i18n_uset_remove_n(void);
+extern int utc_capi_base_utils_i18n_uset_remove_range_p(void);
+extern int utc_capi_base_utils_i18n_uset_remove_range_n(void);
+extern int utc_capi_base_utils_i18n_uset_remove_string_p(void);
+extern int utc_capi_base_utils_i18n_uset_remove_string_n(void);
+extern int utc_capi_base_utils_i18n_uset_remove_all_p(void);
+extern int utc_capi_base_utils_i18n_uset_remove_all_n(void);
+extern int utc_capi_base_utils_i18n_uset_retain_p(void);
+extern int utc_capi_base_utils_i18n_uset_retain_n(void);
+extern int utc_capi_base_utils_i18n_uset_retain_all_p(void);
+extern int utc_capi_base_utils_i18n_uset_retain_all_n(void);
+extern int utc_capi_base_utils_i18n_uset_compact_p(void);
+extern int utc_capi_base_utils_i18n_uset_compact_n(void);
+extern int utc_capi_base_utils_i18n_uset_complement_p(void);
+extern int utc_capi_base_utils_i18n_uset_complement_n(void);
+extern int utc_capi_base_utils_i18n_uset_complement_all_p(void);
+extern int utc_capi_base_utils_i18n_uset_complement_all_n(void);
+extern int utc_capi_base_utils_i18n_uset_clear_p(void);
+extern int utc_capi_base_utils_i18n_uset_clear_n(void);
+extern int utc_capi_base_utils_i18n_uset_destroy_over_p(void);
+extern int utc_capi_base_utils_i18n_uset_destroy_over_n(void);
+extern int utc_capi_base_utils_i18n_uset_remove_all_strings_p(void);
+extern int utc_capi_base_utils_i18n_uset_remove_all_strings_n(void);
+extern int utc_capi_base_utils_i18n_uset_is_empty_p(void);
+extern int utc_capi_base_utils_i18n_uset_is_empty_n(void);
+extern int utc_capi_base_utils_i18n_uset_contains_p(void);
+extern int utc_capi_base_utils_i18n_uset_contains_n(void);
+extern int utc_capi_base_utils_i18n_uset_contains_range_p(void);
+extern int utc_capi_base_utils_i18n_uset_contains_range_n(void);
+extern int utc_capi_base_utils_i18n_uset_contains_string_p(void);
+extern int utc_capi_base_utils_i18n_uset_contains_string_n(void);
+extern int utc_capi_base_utils_i18n_uset_index_of_p(void);
+extern int utc_capi_base_utils_i18n_uset_index_of_n(void);
+extern int utc_capi_base_utils_i18n_uset_char_at_p(void);
+extern int utc_capi_base_utils_i18n_uset_char_at_n(void);
+extern int utc_capi_base_utils_i18n_uset_size_p(void);
+extern int utc_capi_base_utils_i18n_uset_size_n(void);
+extern int utc_capi_base_utils_i18n_uset_get_item_count_p(void);
+extern int utc_capi_base_utils_i18n_uset_get_item_count_n(void);
+extern int utc_capi_base_utils_i18n_uset_get_item_p(void);
+extern int utc_capi_base_utils_i18n_uset_get_item_n(void);
+extern int utc_capi_base_utils_i18n_uset_contains_all_p(void);
+extern int utc_capi_base_utils_i18n_uset_contains_all_n(void);
+extern int utc_capi_base_utils_i18n_uset_contains_all_code_points_p(void);
+extern int utc_capi_base_utils_i18n_uset_contains_all_code_points_n(void);
+extern int utc_capi_base_utils_i18n_uset_contains_none_p(void);
+extern int utc_capi_base_utils_i18n_uset_contains_none_n(void);
+extern int utc_capi_base_utils_i18n_uset_contains_some_p(void);
+extern int utc_capi_base_utils_i18n_uset_contains_some_n(void);
+extern int utc_capi_base_utils_i18n_uset_span_p(void);
+extern int utc_capi_base_utils_i18n_uset_span_n(void);
+extern int utc_capi_base_utils_i18n_uset_span_back_p(void);
+extern int utc_capi_base_utils_i18n_uset_span_back_n(void);
+extern int utc_capi_base_utils_i18n_uset_span_utf8_p(void);
+extern int utc_capi_base_utils_i18n_uset_span_utf8_n(void);
+extern int utc_capi_base_utils_i18n_uset_span_back_utf8_p(void);
+extern int utc_capi_base_utils_i18n_uset_span_back_utf8_n(void);
+extern int utc_capi_base_utils_i18n_uset_equals_p(void);
+extern int utc_capi_base_utils_i18n_uset_equals_n(void);
+extern int utc_capi_base_utils_i18n_uset_serialize_p(void);
+extern int utc_capi_base_utils_i18n_uset_serialize_n(void);
+extern int utc_capi_base_utils_i18n_uset_get_serialized_set_p(void);
+extern int utc_capi_base_utils_i18n_uset_get_serialized_set_n(void);
+extern int utc_capi_base_utils_i18n_uset_set_serialized_to_one_p(void);
+extern int utc_capi_base_utils_i18n_uset_set_serialized_to_one_n(void);
+extern int utc_capi_base_utils_i18n_uset_serialized_contains_p(void);
+extern int utc_capi_base_utils_i18n_uset_serialized_contains_n(void);
+extern int utc_capi_base_utils_i18n_uset_get_serialized_range_count_p(void);
+extern int utc_capi_base_utils_i18n_uset_get_serialized_range_count_n(void);
+extern int utc_capi_base_utils_i18n_uset_get_serialized_range_p(void);
+extern int utc_capi_base_utils_i18n_uset_get_serialized_range_n(void);
+
+testcase tc_array[] = {
+    {"utc_capi_base_utils_i18n_ustring_get_length_p", utc_capi_base_utils_i18n_ustring_get_length_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_get_length_n", utc_capi_base_utils_i18n_ustring_get_length_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_count_char32_p", utc_capi_base_utils_i18n_ustring_count_char32_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_count_char32_n", utc_capi_base_utils_i18n_ustring_count_char32_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_has_more_char32_than_p", utc_capi_base_utils_i18n_ustring_has_more_char32_than_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_has_more_char32_than_n", utc_capi_base_utils_i18n_ustring_has_more_char32_than_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_cat_p", utc_capi_base_utils_i18n_ustring_cat_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_cat_n", utc_capi_base_utils_i18n_ustring_cat_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_cat_n_p", utc_capi_base_utils_i18n_ustring_cat_n_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_cat_n_n", utc_capi_base_utils_i18n_ustring_cat_n_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_string_p", utc_capi_base_utils_i18n_ustring_string_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_string_n", utc_capi_base_utils_i18n_ustring_string_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_find_first_p", utc_capi_base_utils_i18n_ustring_find_first_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_find_first_n", utc_capi_base_utils_i18n_ustring_find_first_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_char_p", utc_capi_base_utils_i18n_ustring_char_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_char_n", utc_capi_base_utils_i18n_ustring_char_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_char32_p", utc_capi_base_utils_i18n_ustring_char32_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_char32_n", utc_capi_base_utils_i18n_ustring_char32_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_r_string_p", utc_capi_base_utils_i18n_ustring_r_string_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_r_string_n", utc_capi_base_utils_i18n_ustring_r_string_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_find_last_p", utc_capi_base_utils_i18n_ustring_find_last_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_find_last_n", utc_capi_base_utils_i18n_ustring_find_last_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_r_char_p", utc_capi_base_utils_i18n_ustring_r_char_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_r_char_n", utc_capi_base_utils_i18n_ustring_r_char_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_r_char32_p", utc_capi_base_utils_i18n_ustring_r_char32_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_r_char32_n", utc_capi_base_utils_i18n_ustring_r_char32_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_pbrk_p", utc_capi_base_utils_i18n_ustring_pbrk_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_pbrk_n", utc_capi_base_utils_i18n_ustring_pbrk_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_cspn_p", utc_capi_base_utils_i18n_ustring_cspn_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_cspn_n", utc_capi_base_utils_i18n_ustring_cspn_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_spn_p", utc_capi_base_utils_i18n_ustring_spn_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_spn_n", utc_capi_base_utils_i18n_ustring_spn_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_tokenizer_r_p", utc_capi_base_utils_i18n_ustring_tokenizer_r_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_tokenizer_r_n", utc_capi_base_utils_i18n_ustring_tokenizer_r_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_compare_p", utc_capi_base_utils_i18n_ustring_compare_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_compare_n", utc_capi_base_utils_i18n_ustring_compare_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_compare_code_point_order_p", utc_capi_base_utils_i18n_ustring_compare_code_point_order_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_compare_code_point_order_n", utc_capi_base_utils_i18n_ustring_compare_code_point_order_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_compare_binary_order_p", utc_capi_base_utils_i18n_ustring_compare_binary_order_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_compare_binary_order_n", utc_capi_base_utils_i18n_ustring_compare_binary_order_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_case_compare_with_length_p", utc_capi_base_utils_i18n_ustring_case_compare_with_length_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_case_compare_with_length_n", utc_capi_base_utils_i18n_ustring_case_compare_with_length_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_compare_n_p", utc_capi_base_utils_i18n_ustring_compare_n_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_compare_n_n", utc_capi_base_utils_i18n_ustring_compare_n_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_compare_n_code_point_order_p", utc_capi_base_utils_i18n_ustring_compare_n_code_point_order_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_compare_n_code_point_order_n", utc_capi_base_utils_i18n_ustring_compare_n_code_point_order_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_case_compare_p", utc_capi_base_utils_i18n_ustring_case_compare_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_case_compare_n", utc_capi_base_utils_i18n_ustring_case_compare_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_case_compare_n_p", utc_capi_base_utils_i18n_ustring_case_compare_n_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_case_compare_n_n", utc_capi_base_utils_i18n_ustring_case_compare_n_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_case_compare_p", utc_capi_base_utils_i18n_ustring_mem_case_compare_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_case_compare_n", utc_capi_base_utils_i18n_ustring_mem_case_compare_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_au_p", utc_capi_base_utils_i18n_ustring_copy_au_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_au_n", utc_capi_base_utils_i18n_ustring_copy_au_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_au_n_p", utc_capi_base_utils_i18n_ustring_copy_au_n_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_au_n_n", utc_capi_base_utils_i18n_ustring_copy_au_n_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_p", utc_capi_base_utils_i18n_ustring_copy_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_n", utc_capi_base_utils_i18n_ustring_copy_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_n_p", utc_capi_base_utils_i18n_ustring_copy_n_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_n_n", utc_capi_base_utils_i18n_ustring_copy_n_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_ua_p", utc_capi_base_utils_i18n_ustring_copy_ua_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_ua_n", utc_capi_base_utils_i18n_ustring_copy_ua_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_ua_n_p", utc_capi_base_utils_i18n_ustring_copy_ua_n_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_copy_ua_n_n", utc_capi_base_utils_i18n_ustring_copy_ua_n_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_copy_p", utc_capi_base_utils_i18n_ustring_mem_copy_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_copy_n", utc_capi_base_utils_i18n_ustring_mem_copy_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_move_p", utc_capi_base_utils_i18n_ustring_mem_move_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_move_n", utc_capi_base_utils_i18n_ustring_mem_move_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_set_p", utc_capi_base_utils_i18n_ustring_mem_set_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_set_n", utc_capi_base_utils_i18n_ustring_mem_set_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_compare_p", utc_capi_base_utils_i18n_ustring_mem_compare_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_compare_n", utc_capi_base_utils_i18n_ustring_mem_compare_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_compare_code_point_order_p", utc_capi_base_utils_i18n_ustring_mem_compare_code_point_order_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_compare_code_point_order_n", utc_capi_base_utils_i18n_ustring_mem_compare_code_point_order_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_char_p", utc_capi_base_utils_i18n_ustring_mem_char_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_char_n", utc_capi_base_utils_i18n_ustring_mem_char_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_char32_p", utc_capi_base_utils_i18n_ustring_mem_char32_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_char32_n", utc_capi_base_utils_i18n_ustring_mem_char32_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_r_char_p", utc_capi_base_utils_i18n_ustring_mem_r_char_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_r_char_n", utc_capi_base_utils_i18n_ustring_mem_r_char_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_r_char32_p", utc_capi_base_utils_i18n_ustring_mem_r_char32_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_mem_r_char32_n", utc_capi_base_utils_i18n_ustring_mem_r_char32_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_unescape_p", utc_capi_base_utils_i18n_ustring_unescape_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_unescape_n", utc_capi_base_utils_i18n_ustring_unescape_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_unescape_at_p", utc_capi_base_utils_i18n_ustring_unescape_at_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_unescape_at_n", utc_capi_base_utils_i18n_ustring_unescape_at_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_upper_p", utc_capi_base_utils_i18n_ustring_to_upper_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_upper_n", utc_capi_base_utils_i18n_ustring_to_upper_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_lower_p", utc_capi_base_utils_i18n_ustring_to_lower_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_lower_n", utc_capi_base_utils_i18n_ustring_to_lower_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_title_new_p", utc_capi_base_utils_i18n_ustring_to_title_new_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_title_new_n", utc_capi_base_utils_i18n_ustring_to_title_new_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_fold_case_p", utc_capi_base_utils_i18n_ustring_fold_case_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_fold_case_n", utc_capi_base_utils_i18n_ustring_fold_case_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_WCS_p", utc_capi_base_utils_i18n_ustring_to_WCS_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_WCS_n", utc_capi_base_utils_i18n_ustring_to_WCS_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_WCS_p", utc_capi_base_utils_i18n_ustring_from_WCS_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_WCS_n", utc_capi_base_utils_i18n_ustring_from_WCS_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_UTF8_p", utc_capi_base_utils_i18n_ustring_to_UTF8_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_UTF8_n", utc_capi_base_utils_i18n_ustring_to_UTF8_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_UTF8_p", utc_capi_base_utils_i18n_ustring_from_UTF8_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_UTF8_n", utc_capi_base_utils_i18n_ustring_from_UTF8_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_UTF8_with_sub_p", utc_capi_base_utils_i18n_ustring_to_UTF8_with_sub_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_UTF8_with_sub_n", utc_capi_base_utils_i18n_ustring_to_UTF8_with_sub_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_UTF8_with_sub_p", utc_capi_base_utils_i18n_ustring_from_UTF8_with_sub_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_UTF8_with_sub_n", utc_capi_base_utils_i18n_ustring_from_UTF8_with_sub_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_UTF8_lenient_p", utc_capi_base_utils_i18n_ustring_from_UTF8_lenient_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_UTF8_lenient_n", utc_capi_base_utils_i18n_ustring_from_UTF8_lenient_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_UTF32_p", utc_capi_base_utils_i18n_ustring_to_UTF32_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_UTF32_n", utc_capi_base_utils_i18n_ustring_to_UTF32_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_UTF32_p", utc_capi_base_utils_i18n_ustring_from_UTF32_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_UTF32_n", utc_capi_base_utils_i18n_ustring_from_UTF32_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_UTF32_with_sub_p", utc_capi_base_utils_i18n_ustring_to_UTF32_with_sub_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_to_UTF32_with_sub_n", utc_capi_base_utils_i18n_ustring_to_UTF32_with_sub_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_UTF32_with_sub_p", utc_capi_base_utils_i18n_ustring_from_UTF32_with_sub_p, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_ustring_from_UTF32_with_sub_n", utc_capi_base_utils_i18n_ustring_from_UTF32_with_sub_n, utc_capi_base_utils_string_startup, utc_capi_base_utils_string_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_create_unknown_p", utc_capi_base_utils_i18n_timezone_create_unknown_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_create_unknown_n", utc_capi_base_utils_i18n_timezone_create_unknown_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_create_gmt_p", utc_capi_base_utils_i18n_timezone_create_gmt_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_create_gmt_n", utc_capi_base_utils_i18n_timezone_create_gmt_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_create_p", utc_capi_base_utils_i18n_timezone_create_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_create_n", utc_capi_base_utils_i18n_timezone_create_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_destroy_p", utc_capi_base_utils_i18n_timezone_destroy_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_destroy_n", utc_capi_base_utils_i18n_timezone_destroy_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_region_p", utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_region_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_region_n", utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_region_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_foreach_timezone_id_p", utc_capi_base_utils_i18n_timezone_foreach_timezone_id_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_foreach_timezone_id_n", utc_capi_base_utils_i18n_timezone_foreach_timezone_id_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_foreach_timezone_id_with_offset_p", utc_capi_base_utils_i18n_timezone_foreach_timezone_id_with_offset_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_foreach_timezone_id_with_offset_n", utc_capi_base_utils_i18n_timezone_foreach_timezone_id_with_offset_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_country_p", utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_country_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_country_n", utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_country_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_count_equivalent_ids_p", utc_capi_base_utils_i18n_timezone_count_equivalent_ids_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_count_equivalent_ids_n", utc_capi_base_utils_i18n_timezone_count_equivalent_ids_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_equivalent_id_p", utc_capi_base_utils_i18n_timezone_get_equivalent_id_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_equivalent_id_n", utc_capi_base_utils_i18n_timezone_get_equivalent_id_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_create_default_p", utc_capi_base_utils_i18n_timezone_create_default_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_create_default_n", utc_capi_base_utils_i18n_timezone_create_default_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_set_default_p", utc_capi_base_utils_i18n_timezone_set_default_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_set_default_n", utc_capi_base_utils_i18n_timezone_set_default_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_tzdata_version_p", utc_capi_base_utils_i18n_timezone_get_tzdata_version_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_region_p", utc_capi_base_utils_i18n_timezone_get_region_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_region_n", utc_capi_base_utils_i18n_timezone_get_region_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_offset_with_date_p", utc_capi_base_utils_i18n_timezone_get_offset_with_date_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_offset_with_date_n", utc_capi_base_utils_i18n_timezone_get_offset_with_date_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_set_raw_offset_p", utc_capi_base_utils_i18n_timezone_set_raw_offset_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_set_raw_offset_n", utc_capi_base_utils_i18n_timezone_set_raw_offset_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_raw_offset_p", utc_capi_base_utils_i18n_timezone_get_raw_offset_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_raw_offset_n", utc_capi_base_utils_i18n_timezone_get_raw_offset_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_id_p", utc_capi_base_utils_i18n_timezone_get_id_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_id_n", utc_capi_base_utils_i18n_timezone_get_id_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_set_id_p", utc_capi_base_utils_i18n_timezone_set_id_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_set_id_n", utc_capi_base_utils_i18n_timezone_set_id_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_display_name_p", utc_capi_base_utils_i18n_timezone_get_display_name_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_display_name_n", utc_capi_base_utils_i18n_timezone_get_display_name_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_display_name_with_locale_p", utc_capi_base_utils_i18n_timezone_get_display_name_with_locale_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_display_name_with_locale_n", utc_capi_base_utils_i18n_timezone_get_display_name_with_locale_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_display_name_with_type_p", utc_capi_base_utils_i18n_timezone_get_display_name_with_type_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_display_name_with_type_n", utc_capi_base_utils_i18n_timezone_get_display_name_with_type_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_display_name_with_type_locale_p", utc_capi_base_utils_i18n_timezone_get_display_name_with_type_locale_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_display_name_with_type_locale_n", utc_capi_base_utils_i18n_timezone_get_display_name_with_type_locale_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_use_daylight_time_p", utc_capi_base_utils_i18n_timezone_use_daylight_time_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_use_daylight_time_n", utc_capi_base_utils_i18n_timezone_use_daylight_time_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_has_same_rule_p", utc_capi_base_utils_i18n_timezone_has_same_rule_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_has_same_rule_n", utc_capi_base_utils_i18n_timezone_has_same_rule_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_clone_p", utc_capi_base_utils_i18n_timezone_clone_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_clone_n", utc_capi_base_utils_i18n_timezone_clone_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_dst_savings_p", utc_capi_base_utils_i18n_timezone_get_dst_savings_p, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_timezone_get_dst_savings_n", utc_capi_base_utils_i18n_timezone_get_dst_savings_n, utc_capi_base_utils_timezone_startup, utc_capi_base_utils_timezone_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_create_p", utc_capi_base_utils_i18n_ubrk_create_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_create_n", utc_capi_base_utils_i18n_ubrk_create_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_create_rules_p", utc_capi_base_utils_i18n_ubrk_create_rules_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_create_rules_n", utc_capi_base_utils_i18n_ubrk_create_rules_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_safe_clone_p", utc_capi_base_utils_i18n_ubrk_safe_clone_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_safe_clone_n", utc_capi_base_utils_i18n_ubrk_safe_clone_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_destroy_p", utc_capi_base_utils_i18n_ubrk_destroy_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_destroy_n", utc_capi_base_utils_i18n_ubrk_destroy_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_set_text_p", utc_capi_base_utils_i18n_ubrk_set_text_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_set_text_n", utc_capi_base_utils_i18n_ubrk_set_text_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_current_p", utc_capi_base_utils_i18n_ubrk_current_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_current_n", utc_capi_base_utils_i18n_ubrk_current_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_next_p", utc_capi_base_utils_i18n_ubrk_next_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_next_n", utc_capi_base_utils_i18n_ubrk_next_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_previous_p", utc_capi_base_utils_i18n_ubrk_previous_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_previous_n", utc_capi_base_utils_i18n_ubrk_previous_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_first_p", utc_capi_base_utils_i18n_ubrk_first_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_first_n", utc_capi_base_utils_i18n_ubrk_first_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_last_p", utc_capi_base_utils_i18n_ubrk_last_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_last_n", utc_capi_base_utils_i18n_ubrk_last_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_preceding_p", utc_capi_base_utils_i18n_ubrk_preceding_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_preceding_n", utc_capi_base_utils_i18n_ubrk_preceding_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_following_p", utc_capi_base_utils_i18n_ubrk_following_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_following_n", utc_capi_base_utils_i18n_ubrk_following_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_get_available_p", utc_capi_base_utils_i18n_ubrk_get_available_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_get_available_n", utc_capi_base_utils_i18n_ubrk_get_available_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_count_available_p", utc_capi_base_utils_i18n_ubrk_count_available_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_is_boundary_p", utc_capi_base_utils_i18n_ubrk_is_boundary_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_is_boundary_n", utc_capi_base_utils_i18n_ubrk_is_boundary_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_get_rule_status_p", utc_capi_base_utils_i18n_ubrk_get_rule_status_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_get_rule_status_n", utc_capi_base_utils_i18n_ubrk_get_rule_status_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_get_rule_status_vec_p", utc_capi_base_utils_i18n_ubrk_get_rule_status_vec_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_get_rule_status_vec_n", utc_capi_base_utils_i18n_ubrk_get_rule_status_vec_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_get_locale_by_type_p", utc_capi_base_utils_i18n_ubrk_get_locale_by_type_p, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ubrk_get_locale_by_type_n", utc_capi_base_utils_i18n_ubrk_get_locale_by_type_n, utc_capi_base_utils_ubrk_startup, utc_capi_base_utils_ubrk_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_default_timezone_p", utc_capi_base_utils_i18n_ucalendar_set_default_timezone_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_default_timezone_n", utc_capi_base_utils_i18n_ucalendar_set_default_timezone_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_now_p", utc_capi_base_utils_i18n_ucalendar_get_now_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_now_n", utc_capi_base_utils_i18n_ucalendar_get_now_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_create_p", utc_capi_base_utils_i18n_ucalendar_create_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_create_n", utc_capi_base_utils_i18n_ucalendar_create_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_destroy_p", utc_capi_base_utils_i18n_ucalendar_destroy_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_destroy_n", utc_capi_base_utils_i18n_ucalendar_destroy_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_clone_p", utc_capi_base_utils_i18n_ucalendar_clone_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_clone_n", utc_capi_base_utils_i18n_ucalendar_clone_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_timezone_displayname_p", utc_capi_base_utils_i18n_ucalendar_get_timezone_displayname_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_timezone_displayname_n", utc_capi_base_utils_i18n_ucalendar_get_timezone_displayname_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_is_in_daylight_time_p", utc_capi_base_utils_i18n_ucalendar_is_in_daylight_time_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_is_in_daylight_time_n", utc_capi_base_utils_i18n_ucalendar_is_in_daylight_time_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_p", utc_capi_base_utils_i18n_ucalendar_set_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_n", utc_capi_base_utils_i18n_ucalendar_set_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_attribute_p", utc_capi_base_utils_i18n_ucalendar_set_attribute_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_attribute_n", utc_capi_base_utils_i18n_ucalendar_set_attribute_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_attribute_p", utc_capi_base_utils_i18n_ucalendar_get_attribute_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_attribute_n", utc_capi_base_utils_i18n_ucalendar_get_attribute_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_milliseconds_p", utc_capi_base_utils_i18n_ucalendar_get_milliseconds_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_milliseconds_n", utc_capi_base_utils_i18n_ucalendar_get_milliseconds_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_milliseconds_p", utc_capi_base_utils_i18n_ucalendar_set_milliseconds_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_milliseconds_n", utc_capi_base_utils_i18n_ucalendar_set_milliseconds_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_date_time_p", utc_capi_base_utils_i18n_ucalendar_set_date_time_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_date_time_n", utc_capi_base_utils_i18n_ucalendar_set_date_time_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_is_equivalent_to_p", utc_capi_base_utils_i18n_ucalendar_is_equivalent_to_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_is_equivalent_to_n", utc_capi_base_utils_i18n_ucalendar_is_equivalent_to_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_add_p", utc_capi_base_utils_i18n_ucalendar_add_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_add_n", utc_capi_base_utils_i18n_ucalendar_add_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_p", utc_capi_base_utils_i18n_ucalendar_get_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_n", utc_capi_base_utils_i18n_ucalendar_get_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_field_difference_p", utc_capi_base_utils_i18n_ucalendar_get_field_difference_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_field_difference_n", utc_capi_base_utils_i18n_ucalendar_get_field_difference_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_timezone_id_enumeration_create_p", utc_capi_base_utils_i18n_ucalendar_timezone_id_enumeration_create_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_timezone_id_enumeration_create_n", utc_capi_base_utils_i18n_ucalendar_timezone_id_enumeration_create_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_timezones_create_p", utc_capi_base_utils_i18n_ucalendar_timezones_create_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_timezones_create_n", utc_capi_base_utils_i18n_ucalendar_timezones_create_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_country_timezones_create_p", utc_capi_base_utils_i18n_ucalendar_country_timezones_create_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_country_timezones_create_n", utc_capi_base_utils_i18n_ucalendar_country_timezones_create_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_default_timezone_p", utc_capi_base_utils_i18n_ucalendar_get_default_timezone_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_default_timezone_n", utc_capi_base_utils_i18n_ucalendar_get_default_timezone_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_timezone_p", utc_capi_base_utils_i18n_ucalendar_set_timezone_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_timezone_n", utc_capi_base_utils_i18n_ucalendar_set_timezone_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_timezone_id_p", utc_capi_base_utils_i18n_ucalendar_get_timezone_id_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_timezone_id_n", utc_capi_base_utils_i18n_ucalendar_get_timezone_id_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_gregorian_change_p", utc_capi_base_utils_i18n_ucalendar_set_gregorian_change_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_gregorian_change_n", utc_capi_base_utils_i18n_ucalendar_set_gregorian_change_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_gregorian_change_p", utc_capi_base_utils_i18n_ucalendar_get_gregorian_change_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_gregorian_change_n", utc_capi_base_utils_i18n_ucalendar_get_gregorian_change_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_available_p", utc_capi_base_utils_i18n_ucalendar_get_available_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_available_n", utc_capi_base_utils_i18n_ucalendar_get_available_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_count_available_p", utc_capi_base_utils_i18n_ucalendar_count_available_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_date_p", utc_capi_base_utils_i18n_ucalendar_set_date_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_set_date_n", utc_capi_base_utils_i18n_ucalendar_set_date_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_roll_p", utc_capi_base_utils_i18n_ucalendar_roll_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_roll_n", utc_capi_base_utils_i18n_ucalendar_roll_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_is_set_p", utc_capi_base_utils_i18n_ucalendar_is_set_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_is_set_n", utc_capi_base_utils_i18n_ucalendar_is_set_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_clear_field_p", utc_capi_base_utils_i18n_ucalendar_clear_field_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_clear_field_n", utc_capi_base_utils_i18n_ucalendar_clear_field_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_clear_p", utc_capi_base_utils_i18n_ucalendar_clear_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_clear_n", utc_capi_base_utils_i18n_ucalendar_clear_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_limit_p", utc_capi_base_utils_i18n_ucalendar_get_limit_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_limit_n", utc_capi_base_utils_i18n_ucalendar_get_limit_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_locale_by_type_p", utc_capi_base_utils_i18n_ucalendar_get_locale_by_type_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_locale_by_type_n", utc_capi_base_utils_i18n_ucalendar_get_locale_by_type_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_tz_data_version_p", utc_capi_base_utils_i18n_ucalendar_get_tz_data_version_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_canonical_timezone_id_p", utc_capi_base_utils_i18n_ucalendar_get_canonical_timezone_id_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_canonical_timezone_id_n", utc_capi_base_utils_i18n_ucalendar_get_canonical_timezone_id_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_type_p", utc_capi_base_utils_i18n_ucalendar_get_type_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_type_n", utc_capi_base_utils_i18n_ucalendar_get_type_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_keyword_values_for_locale_p", utc_capi_base_utils_i18n_ucalendar_get_keyword_values_for_locale_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_keyword_values_for_locale_n", utc_capi_base_utils_i18n_ucalendar_get_keyword_values_for_locale_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_day_of_week_type_p", utc_capi_base_utils_i18n_ucalendar_get_day_of_week_type_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_day_of_week_type_n", utc_capi_base_utils_i18n_ucalendar_get_day_of_week_type_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_weekend_transition_p", utc_capi_base_utils_i18n_ucalendar_get_weekend_transition_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_weekend_transition_n", utc_capi_base_utils_i18n_ucalendar_get_weekend_transition_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_is_weekend_p", utc_capi_base_utils_i18n_ucalendar_is_weekend_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_is_weekend_n", utc_capi_base_utils_i18n_ucalendar_is_weekend_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_timezone_transition_date_p", utc_capi_base_utils_i18n_ucalendar_get_timezone_transition_date_p, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_ucalendar_get_timezone_transition_date_n", utc_capi_base_utils_i18n_ucalendar_get_timezone_transition_date_n, utc_capi_base_utils_ucalendar_startup, utc_capi_base_utils_ucalendar_cleanup},
+    {"utc_capi_base_utils_i18n_uchar_get_int_property_value_p", utc_capi_base_utils_i18n_uchar_get_int_property_value_p, utc_capi_base_utils_uchar_startup, utc_capi_base_utils_uchar_cleanup},
+    {"utc_capi_base_utils_i18n_uchar_get_int_property_value_n", utc_capi_base_utils_i18n_uchar_get_int_property_value_n, utc_capi_base_utils_uchar_startup, utc_capi_base_utils_uchar_cleanup},
+    {"utc_capi_base_utils_i18n_uchar_get_ublock_code_p", utc_capi_base_utils_i18n_uchar_get_ublock_code_p, utc_capi_base_utils_uchar_startup, utc_capi_base_utils_uchar_cleanup},
+    {"utc_capi_base_utils_i18n_uchar_get_ublock_code_n", utc_capi_base_utils_i18n_uchar_get_ublock_code_n, utc_capi_base_utils_uchar_startup, utc_capi_base_utils_uchar_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_create_p", utc_capi_base_utils_i18n_ucollator_create_p, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_create_n", utc_capi_base_utils_i18n_ucollator_create_n, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_destroy_p", utc_capi_base_utils_i18n_ucollator_destroy_p, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_destroy_n", utc_capi_base_utils_i18n_ucollator_destroy_n, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_str_collator_p", utc_capi_base_utils_i18n_ucollator_str_collator_p, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_str_collator_n", utc_capi_base_utils_i18n_ucollator_str_collator_n, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_equal_p", utc_capi_base_utils_i18n_ucollator_equal_p, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_equal_n", utc_capi_base_utils_i18n_ucollator_equal_n, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_set_strength_p", utc_capi_base_utils_i18n_ucollator_set_strength_p, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_set_strength_n", utc_capi_base_utils_i18n_ucollator_set_strength_n, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_set_attribute_p", utc_capi_base_utils_i18n_ucollator_set_attribute_p, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_ucollator_set_attribute_n", utc_capi_base_utils_i18n_ucollator_set_attribute_n, utc_capi_base_utils_ucollator_startup, utc_capi_base_utils_ucollator_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_create_p", utc_capi_base_utils_i18n_udatepg_create_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_create_n", utc_capi_base_utils_i18n_udatepg_create_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_destroy_p", utc_capi_base_utils_i18n_udatepg_destroy_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_destroy_n", utc_capi_base_utils_i18n_udatepg_destroy_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_best_pattern_p", utc_capi_base_utils_i18n_udatepg_get_best_pattern_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_best_pattern_n", utc_capi_base_utils_i18n_udatepg_get_best_pattern_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_create_empty_p", utc_capi_base_utils_i18n_udatepg_create_empty_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_create_empty_n", utc_capi_base_utils_i18n_udatepg_create_empty_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_clone_p", utc_capi_base_utils_i18n_udatepg_clone_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_clone_n", utc_capi_base_utils_i18n_udatepg_clone_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_best_pattern_with_options_p", utc_capi_base_utils_i18n_udatepg_get_best_pattern_with_options_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_best_pattern_with_options_n", utc_capi_base_utils_i18n_udatepg_get_best_pattern_with_options_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_skeleton_p", utc_capi_base_utils_i18n_udatepg_get_skeleton_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_skeleton_n", utc_capi_base_utils_i18n_udatepg_get_skeleton_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_base_skeleton_p", utc_capi_base_utils_i18n_udatepg_get_base_skeleton_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_base_skeleton_n", utc_capi_base_utils_i18n_udatepg_get_base_skeleton_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_add_pattern_p", utc_capi_base_utils_i18n_udatepg_add_pattern_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_add_pattern_n", utc_capi_base_utils_i18n_udatepg_add_pattern_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_set_append_item_format_p", utc_capi_base_utils_i18n_udatepg_set_append_item_format_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_set_append_item_format_n", utc_capi_base_utils_i18n_udatepg_set_append_item_format_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_append_item_format_p", utc_capi_base_utils_i18n_udatepg_get_append_item_format_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_append_item_format_n", utc_capi_base_utils_i18n_udatepg_get_append_item_format_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_set_append_item_name_p", utc_capi_base_utils_i18n_udatepg_set_append_item_name_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_set_append_item_name_n", utc_capi_base_utils_i18n_udatepg_set_append_item_name_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_append_item_name_p", utc_capi_base_utils_i18n_udatepg_get_append_item_name_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_append_item_name_n", utc_capi_base_utils_i18n_udatepg_get_append_item_name_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_set_date_time_format_p", utc_capi_base_utils_i18n_udatepg_set_date_time_format_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_set_date_time_format_n", utc_capi_base_utils_i18n_udatepg_set_date_time_format_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_date_time_format_p", utc_capi_base_utils_i18n_udatepg_get_date_time_format_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_date_time_format_n", utc_capi_base_utils_i18n_udatepg_get_date_time_format_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_set_decimal_p", utc_capi_base_utils_i18n_udatepg_set_decimal_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_set_decimal_n", utc_capi_base_utils_i18n_udatepg_set_decimal_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_decimal_p", utc_capi_base_utils_i18n_udatepg_get_decimal_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_decimal_n", utc_capi_base_utils_i18n_udatepg_get_decimal_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_replace_field_types_p", utc_capi_base_utils_i18n_udatepg_replace_field_types_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_replace_field_types_n", utc_capi_base_utils_i18n_udatepg_replace_field_types_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_replace_field_types_with_options_p", utc_capi_base_utils_i18n_udatepg_replace_field_types_with_options_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_replace_field_types_with_options_n", utc_capi_base_utils_i18n_udatepg_replace_field_types_with_options_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_skeletons_create_p", utc_capi_base_utils_i18n_udatepg_skeletons_create_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_skeletons_create_n", utc_capi_base_utils_i18n_udatepg_skeletons_create_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_base_skeletons_create_p", utc_capi_base_utils_i18n_udatepg_base_skeletons_create_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_base_skeletons_create_n", utc_capi_base_utils_i18n_udatepg_base_skeletons_create_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_pattern_for_skeleton_p", utc_capi_base_utils_i18n_udatepg_get_pattern_for_skeleton_p, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udatepg_get_pattern_for_skeleton_n", utc_capi_base_utils_i18n_udatepg_get_pattern_for_skeleton_n, utc_capi_base_utils_udatepg_startup, utc_capi_base_utils_udatepg_cleanup},
+    {"utc_capi_base_utils_i18n_udate_create_p", utc_capi_base_utils_i18n_udate_create_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_create_n", utc_capi_base_utils_i18n_udate_create_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_destroy_p", utc_capi_base_utils_i18n_udate_destroy_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_destroy_n", utc_capi_base_utils_i18n_udate_destroy_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_format_date_p", utc_capi_base_utils_i18n_udate_format_date_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_format_date_n", utc_capi_base_utils_i18n_udate_format_date_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_to_calendar_date_field_p", utc_capi_base_utils_i18n_udate_to_calendar_date_field_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_to_calendar_date_field_n", utc_capi_base_utils_i18n_udate_to_calendar_date_field_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_clone_p", utc_capi_base_utils_i18n_udate_clone_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_clone_n", utc_capi_base_utils_i18n_udate_clone_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_parse_p", utc_capi_base_utils_i18n_udate_parse_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_parse_n", utc_capi_base_utils_i18n_udate_parse_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_parse_calendar_p", utc_capi_base_utils_i18n_udate_parse_calendar_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_parse_calendar_n", utc_capi_base_utils_i18n_udate_parse_calendar_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_is_lenient_p", utc_capi_base_utils_i18n_udate_is_lenient_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_is_lenient_n", utc_capi_base_utils_i18n_udate_is_lenient_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_lenient_p", utc_capi_base_utils_i18n_udate_set_lenient_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_lenient_n", utc_capi_base_utils_i18n_udate_set_lenient_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_calendar_p", utc_capi_base_utils_i18n_udate_get_calendar_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_calendar_n", utc_capi_base_utils_i18n_udate_get_calendar_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_calendar_p", utc_capi_base_utils_i18n_udate_set_calendar_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_calendar_n", utc_capi_base_utils_i18n_udate_set_calendar_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_number_format_p", utc_capi_base_utils_i18n_udate_get_number_format_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_number_format_n", utc_capi_base_utils_i18n_udate_get_number_format_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_number_format_p", utc_capi_base_utils_i18n_udate_set_number_format_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_number_format_n", utc_capi_base_utils_i18n_udate_set_number_format_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_available_p", utc_capi_base_utils_i18n_udate_get_available_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_available_n", utc_capi_base_utils_i18n_udate_get_available_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_count_available_p", utc_capi_base_utils_i18n_udate_count_available_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_2digit_year_start_p", utc_capi_base_utils_i18n_udate_get_2digit_year_start_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_2digit_year_start_n", utc_capi_base_utils_i18n_udate_get_2digit_year_start_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_2digit_year_start_p", utc_capi_base_utils_i18n_udate_set_2digit_year_start_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_2digit_year_start_n", utc_capi_base_utils_i18n_udate_set_2digit_year_start_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_to_pattern_p", utc_capi_base_utils_i18n_udate_to_pattern_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_to_pattern_n", utc_capi_base_utils_i18n_udate_to_pattern_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_apply_pattern_p", utc_capi_base_utils_i18n_udate_apply_pattern_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_apply_pattern_n", utc_capi_base_utils_i18n_udate_apply_pattern_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_symbols_p", utc_capi_base_utils_i18n_udate_get_symbols_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_symbols_n", utc_capi_base_utils_i18n_udate_get_symbols_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_count_symbols_p", utc_capi_base_utils_i18n_udate_count_symbols_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_count_symbols_n", utc_capi_base_utils_i18n_udate_count_symbols_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_symbols_p", utc_capi_base_utils_i18n_udate_set_symbols_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_symbols_n", utc_capi_base_utils_i18n_udate_set_symbols_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_locale_by_type_p", utc_capi_base_utils_i18n_udate_get_locale_by_type_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_get_locale_by_type_n", utc_capi_base_utils_i18n_udate_get_locale_by_type_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_context_p", utc_capi_base_utils_i18n_udate_set_context_p, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_udate_set_context_n", utc_capi_base_utils_i18n_udate_set_context_n, utc_capi_base_utils_udate_startup, utc_capi_base_utils_udate_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_destroy_p", utc_capi_base_utils_i18n_uenumeration_destroy_p, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_destroy_n", utc_capi_base_utils_i18n_uenumeration_destroy_n, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_count_p", utc_capi_base_utils_i18n_uenumeration_count_p, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_count_n", utc_capi_base_utils_i18n_uenumeration_count_n, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_unext_p", utc_capi_base_utils_i18n_uenumeration_unext_p, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_unext_n", utc_capi_base_utils_i18n_uenumeration_unext_n, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_next_p", utc_capi_base_utils_i18n_uenumeration_next_p, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_next_n", utc_capi_base_utils_i18n_uenumeration_next_n, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_reset_p", utc_capi_base_utils_i18n_uenumeration_reset_p, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_reset_n", utc_capi_base_utils_i18n_uenumeration_reset_n, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_uchar_strings_enumeration_create_p", utc_capi_base_utils_i18n_uenumeration_uchar_strings_enumeration_create_p, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_uchar_strings_enumeration_create_n", utc_capi_base_utils_i18n_uenumeration_uchar_strings_enumeration_create_n, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_char_strings_enumeration_create_p", utc_capi_base_utils_i18n_uenumeration_char_strings_enumeration_create_p, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_uenumeration_char_strings_enumeration_create_n", utc_capi_base_utils_i18n_uenumeration_char_strings_enumeration_create_n, utc_capi_base_utils_uenumeration_startup, utc_capi_base_utils_uenumeration_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_script_p", utc_capi_base_utils_i18n_ulocale_get_script_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_script_n", utc_capi_base_utils_i18n_ulocale_get_script_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_variant_p", utc_capi_base_utils_i18n_ulocale_get_variant_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_variant_n", utc_capi_base_utils_i18n_ulocale_get_variant_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_name_p", utc_capi_base_utils_i18n_ulocale_get_name_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_name_n", utc_capi_base_utils_i18n_ulocale_get_name_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_canonicalize_p", utc_capi_base_utils_i18n_ulocale_canonicalize_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_canonicalize_n", utc_capi_base_utils_i18n_ulocale_canonicalize_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_iso3_language_p", utc_capi_base_utils_i18n_ulocale_get_iso3_language_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_iso3_country_p", utc_capi_base_utils_i18n_ulocale_get_iso3_country_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_lcid_p", utc_capi_base_utils_i18n_ulocale_get_lcid_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_language_p", utc_capi_base_utils_i18n_ulocale_get_display_language_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_language_n", utc_capi_base_utils_i18n_ulocale_get_display_language_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_script_p", utc_capi_base_utils_i18n_ulocale_get_display_script_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_script_n", utc_capi_base_utils_i18n_ulocale_get_display_script_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_country_p", utc_capi_base_utils_i18n_ulocale_get_display_country_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_country_n", utc_capi_base_utils_i18n_ulocale_get_display_country_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_variant_p", utc_capi_base_utils_i18n_ulocale_get_display_variant_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_variant_n", utc_capi_base_utils_i18n_ulocale_get_display_variant_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_keyword_p", utc_capi_base_utils_i18n_ulocale_get_display_keyword_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_keyword_n", utc_capi_base_utils_i18n_ulocale_get_display_keyword_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_keyword_value_p", utc_capi_base_utils_i18n_ulocale_get_display_keyword_value_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_keyword_value_n", utc_capi_base_utils_i18n_ulocale_get_display_keyword_value_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_iso_languages_p", utc_capi_base_utils_i18n_ulocale_get_iso_languages_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_iso_countries_p", utc_capi_base_utils_i18n_ulocale_get_iso_countries_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_parent_p", utc_capi_base_utils_i18n_ulocale_get_parent_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_parent_n", utc_capi_base_utils_i18n_ulocale_get_parent_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_base_name_p", utc_capi_base_utils_i18n_ulocale_get_base_name_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_base_name_n", utc_capi_base_utils_i18n_ulocale_get_base_name_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_keywords_create_p", utc_capi_base_utils_i18n_ulocale_keywords_create_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_keywords_create_n", utc_capi_base_utils_i18n_ulocale_keywords_create_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_keyword_value_p", utc_capi_base_utils_i18n_ulocale_get_keyword_value_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_keyword_value_n", utc_capi_base_utils_i18n_ulocale_get_keyword_value_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_set_keyword_value_p", utc_capi_base_utils_i18n_ulocale_set_keyword_value_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_set_keyword_value_n", utc_capi_base_utils_i18n_ulocale_set_keyword_value_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_character_orientation_p", utc_capi_base_utils_i18n_ulocale_get_character_orientation_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_character_orientation_n", utc_capi_base_utils_i18n_ulocale_get_character_orientation_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_line_orientation_p", utc_capi_base_utils_i18n_ulocale_get_line_orientation_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_line_orientation_n", utc_capi_base_utils_i18n_ulocale_get_line_orientation_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_locale_for_lcid_p", utc_capi_base_utils_i18n_ulocale_get_locale_for_lcid_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_locale_for_lcid_n", utc_capi_base_utils_i18n_ulocale_get_locale_for_lcid_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_add_likely_subtags_p", utc_capi_base_utils_i18n_ulocale_add_likely_subtags_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_add_likely_subtags_n", utc_capi_base_utils_i18n_ulocale_add_likely_subtags_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_minimize_subtags_p", utc_capi_base_utils_i18n_ulocale_minimize_subtags_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_minimize_subtags_n", utc_capi_base_utils_i18n_ulocale_minimize_subtags_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_for_language_tag_p", utc_capi_base_utils_i18n_ulocale_for_language_tag_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_for_language_tag_n", utc_capi_base_utils_i18n_ulocale_for_language_tag_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_to_language_tag_p", utc_capi_base_utils_i18n_ulocale_to_language_tag_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_to_language_tag_n", utc_capi_base_utils_i18n_ulocale_to_language_tag_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_default_p", utc_capi_base_utils_i18n_ulocale_get_default_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_default_n", utc_capi_base_utils_i18n_ulocale_get_default_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_set_default_p", utc_capi_base_utils_i18n_ulocale_set_default_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_language_p", utc_capi_base_utils_i18n_ulocale_get_language_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_language_n", utc_capi_base_utils_i18n_ulocale_get_language_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_country_p", utc_capi_base_utils_i18n_ulocale_get_country_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_country_n", utc_capi_base_utils_i18n_ulocale_get_country_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_name_p", utc_capi_base_utils_i18n_ulocale_get_display_name_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_display_name_n", utc_capi_base_utils_i18n_ulocale_get_display_name_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_available_p", utc_capi_base_utils_i18n_ulocale_get_available_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_get_available_n", utc_capi_base_utils_i18n_ulocale_get_available_n, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_ulocale_count_available_p", utc_capi_base_utils_i18n_ulocale_count_available_p, utc_capi_base_utils_ulocale_startup, utc_capi_base_utils_ulocale_cleanup},
+    {"utc_capi_base_utils_i18n_unormalization_normalize_p", utc_capi_base_utils_i18n_unormalization_normalize_p, utc_capi_base_utils_unormalization_startup, utc_capi_base_utils_unormalization_cleanup},
+    {"utc_capi_base_utils_i18n_unormalization_normalize_n", utc_capi_base_utils_i18n_unormalization_normalize_n, utc_capi_base_utils_unormalization_startup, utc_capi_base_utils_unormalization_cleanup},
+    {"utc_capi_base_utils_i18n_unormalization_get_instance_p", utc_capi_base_utils_i18n_unormalization_get_instance_p, utc_capi_base_utils_unormalization_startup, utc_capi_base_utils_unormalization_cleanup},
+    {"utc_capi_base_utils_i18n_unormalization_get_instance_n", utc_capi_base_utils_i18n_unormalization_get_instance_n, utc_capi_base_utils_unormalization_startup, utc_capi_base_utils_unormalization_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_create_p", utc_capi_base_utils_i18n_unumber_create_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_create_n", utc_capi_base_utils_i18n_unumber_create_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_destroy_p", utc_capi_base_utils_i18n_unumber_destroy_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_destroy_n", utc_capi_base_utils_i18n_unumber_destroy_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_symbol_p", utc_capi_base_utils_i18n_unumber_get_symbol_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_symbol_n", utc_capi_base_utils_i18n_unumber_get_symbol_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_clone_p", utc_capi_base_utils_i18n_unumber_clone_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_clone_n", utc_capi_base_utils_i18n_unumber_clone_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_format_p", utc_capi_base_utils_i18n_unumber_format_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_i18n_unumber_format_n", utc_capi_base_i18n_unumber_format_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_format_int64_p", utc_capi_base_utils_i18n_unumber_format_int64_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_format_int64_n", utc_capi_base_utils_i18n_unumber_format_int64_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_format_double_p", utc_capi_base_utils_i18n_unumber_format_double_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_format_double_n", utc_capi_base_utils_i18n_unumber_format_double_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_format_decimal_p", utc_capi_base_utils_i18n_unumber_format_decimal_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_format_decimal_n", utc_capi_base_utils_i18n_unumber_format_decimal_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_format_double_currency_p", utc_capi_base_utils_i18n_unumber_format_double_currency_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_format_double_currency_n", utc_capi_base_utils_i18n_unumber_format_double_currency_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_parse_p", utc_capi_base_utils_i18n_unumber_parse_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_parse_n", utc_capi_base_utils_i18n_unumber_parse_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_parse_int64_p", utc_capi_base_utils_i18n_unumber_parse_int64_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_parse_int64_n", utc_capi_base_utils_i18n_unumber_parse_int64_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_parse_double_p", utc_capi_base_utils_i18n_unumber_parse_double_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_parse_double_n", utc_capi_base_utils_i18n_unumber_parse_double_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_parse_decimal_p", utc_capi_base_utils_i18n_unumber_parse_decimal_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_parse_decimal_n", utc_capi_base_utils_i18n_unumber_parse_decimal_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_parse_double_currency_p", utc_capi_base_utils_i18n_unumber_parse_double_currency_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_parse_double_currency_n", utc_capi_base_utils_i18n_unumber_parse_double_currency_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_apply_pattern_p", utc_capi_base_utils_i18n_unumber_apply_pattern_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_apply_pattern_n", utc_capi_base_utils_i18n_unumber_apply_pattern_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_available_p", utc_capi_base_utils_i18n_unumber_get_available_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_available_n", utc_capi_base_utils_i18n_unumber_get_available_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_count_available_p", utc_capi_base_utils_i18n_unumber_count_available_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_attribute_p", utc_capi_base_utils_i18n_unumber_get_attribute_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_attribute_n", utc_capi_base_utils_i18n_unumber_get_attribute_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_set_attribute_p", utc_capi_base_utils_i18n_unumber_set_attribute_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_set_attribute_n", utc_capi_base_utils_i18n_unumber_set_attribute_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_double_attribute_p", utc_capi_base_utils_i18n_unumber_get_double_attribute_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_double_attribute_n", utc_capi_base_utils_i18n_unumber_get_double_attribute_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_set_double_attribute_p", utc_capi_base_utils_i18n_unumber_set_double_attribute_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_set_double_attribute_n", utc_capi_base_utils_i18n_unumber_set_double_attribute_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_text_attribute_p", utc_capi_base_utils_i18n_unumber_get_text_attribute_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_text_attribute_n", utc_capi_base_utils_i18n_unumber_get_text_attribute_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_set_text_attribute_p", utc_capi_base_utils_i18n_unumber_set_text_attribute_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_set_text_attribute_n", utc_capi_base_utils_i18n_unumber_set_text_attribute_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_to_pattern_p", utc_capi_base_utils_i18n_unumber_to_pattern_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_to_pattern_n", utc_capi_base_utils_i18n_unumber_to_pattern_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_set_symbol_p", utc_capi_base_utils_i18n_unumber_set_symbol_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_set_symbol_n", utc_capi_base_utils_i18n_unumber_set_symbol_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_locale_by_type_p", utc_capi_base_utils_i18n_unumber_get_locale_by_type_p, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_unumber_get_locale_by_type_n", utc_capi_base_utils_i18n_unumber_get_locale_by_type_n, utc_capi_base_utils_unumber_startup, utc_capi_base_utils_unumber_cleanup},
+    {"utc_capi_base_utils_i18n_usearch_create_new_p", utc_capi_base_utils_i18n_usearch_create_new_p, utc_capi_base_utils_usearch_startup, utc_capi_base_utils_usearch_cleanup},
+    {"utc_capi_base_utils_i18n_usearch_create_new_n", utc_capi_base_utils_i18n_usearch_create_new_n, utc_capi_base_utils_usearch_startup, utc_capi_base_utils_usearch_cleanup},
+    {"utc_capi_base_utils_i18n_usearch_destroy_p", utc_capi_base_utils_i18n_usearch_destroy_p, utc_capi_base_utils_usearch_startup, utc_capi_base_utils_usearch_cleanup},
+    {"utc_capi_base_utils_i18n_usearch_destroy_n", utc_capi_base_utils_i18n_usearch_destroy_n, utc_capi_base_utils_usearch_startup, utc_capi_base_utils_usearch_cleanup},
+    {"utc_capi_base_utils_i18n_usearch_get_matched_text_p", utc_capi_base_utils_i18n_usearch_get_matched_text_p, utc_capi_base_utils_usearch_startup, utc_capi_base_utils_usearch_cleanup},
+    {"utc_capi_base_utils_i18n_usearch_get_matched_text_n", utc_capi_base_utils_i18n_usearch_get_matched_text_n, utc_capi_base_utils_usearch_startup, utc_capi_base_utils_usearch_cleanup},
+    {"utc_capi_base_utils_i18n_usearch_get_collator_p", utc_capi_base_utils_i18n_usearch_get_collator_p, utc_capi_base_utils_usearch_startup, utc_capi_base_utils_usearch_cleanup},
+    {"utc_capi_base_utils_i18n_usearch_get_collator_n", utc_capi_base_utils_i18n_usearch_get_collator_n, utc_capi_base_utils_usearch_startup, utc_capi_base_utils_usearch_cleanup},
+    {"utc_capi_base_utils_i18n_usearch_first_p", utc_capi_base_utils_i18n_usearch_first_p, utc_capi_base_utils_usearch_startup, utc_capi_base_utils_usearch_cleanup},
+    {"utc_capi_base_utils_i18n_usearch_first_n", utc_capi_base_utils_i18n_usearch_first_n, utc_capi_base_utils_usearch_startup, utc_capi_base_utils_usearch_cleanup},
+    {"utc_capi_base_utils_i18n_uset_create_empty_p", utc_capi_base_utils_i18n_uset_create_empty_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_create_empty_n", utc_capi_base_utils_i18n_uset_create_empty_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_create_p", utc_capi_base_utils_i18n_uset_create_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_create_n", utc_capi_base_utils_i18n_uset_create_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_create_pattern_p", utc_capi_base_utils_i18n_uset_create_pattern_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_create_pattern_n", utc_capi_base_utils_i18n_uset_create_pattern_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_create_pattern_options_p", utc_capi_base_utils_i18n_uset_create_pattern_options_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_create_pattern_options_n", utc_capi_base_utils_i18n_uset_create_pattern_options_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_destroy_p", utc_capi_base_utils_i18n_uset_destroy_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_destroy_n", utc_capi_base_utils_i18n_uset_destroy_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_clone_p", utc_capi_base_utils_i18n_uset_clone_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_clone_n", utc_capi_base_utils_i18n_uset_clone_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_is_frozen_p", utc_capi_base_utils_i18n_uset_is_frozen_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_is_frozen_n", utc_capi_base_utils_i18n_uset_is_frozen_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_freeze_p", utc_capi_base_utils_i18n_uset_freeze_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_freeze_n", utc_capi_base_utils_i18n_uset_freeze_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_clone_as_thawed_p", utc_capi_base_utils_i18n_uset_clone_as_thawed_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_clone_as_thawed_n", utc_capi_base_utils_i18n_uset_clone_as_thawed_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_set_p", utc_capi_base_utils_i18n_uset_set_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_set_n", utc_capi_base_utils_i18n_uset_set_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_apply_pattern_p", utc_capi_base_utils_i18n_uset_apply_pattern_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_apply_pattern_n", utc_capi_base_utils_i18n_uset_apply_pattern_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_apply_int_property_value_p", utc_capi_base_utils_i18n_uset_apply_int_property_value_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_apply_int_property_value_n", utc_capi_base_utils_i18n_uset_apply_int_property_value_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_apply_property_alias_p", utc_capi_base_utils_i18n_uset_apply_property_alias_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_apply_property_alias_n", utc_capi_base_utils_i18n_uset_apply_property_alias_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_resembles_pattern_p", utc_capi_base_utils_i18n_uset_resembles_pattern_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_resembles_pattern_n", utc_capi_base_utils_i18n_uset_resembles_pattern_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_to_pattern_p", utc_capi_base_utils_i18n_uset_to_pattern_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_to_pattern_n", utc_capi_base_utils_i18n_uset_to_pattern_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_add_p", utc_capi_base_utils_i18n_uset_add_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_add_n", utc_capi_base_utils_i18n_uset_add_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_add_all_p", utc_capi_base_utils_i18n_uset_add_all_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_add_all_n", utc_capi_base_utils_i18n_uset_add_all_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_add_range_p", utc_capi_base_utils_i18n_uset_add_range_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_add_range_n", utc_capi_base_utils_i18n_uset_add_range_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_add_string_p", utc_capi_base_utils_i18n_uset_add_string_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_add_string_n", utc_capi_base_utils_i18n_uset_add_string_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_add_all_code_points_p", utc_capi_base_utils_i18n_uset_add_all_code_points_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_add_all_code_points_n", utc_capi_base_utils_i18n_uset_add_all_code_points_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_remove_p", utc_capi_base_utils_i18n_uset_remove_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_remove_n", utc_capi_base_utils_i18n_uset_remove_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_remove_range_p", utc_capi_base_utils_i18n_uset_remove_range_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_remove_range_n", utc_capi_base_utils_i18n_uset_remove_range_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_remove_string_p", utc_capi_base_utils_i18n_uset_remove_string_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_remove_string_n", utc_capi_base_utils_i18n_uset_remove_string_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_remove_all_p", utc_capi_base_utils_i18n_uset_remove_all_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_remove_all_n", utc_capi_base_utils_i18n_uset_remove_all_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_retain_p", utc_capi_base_utils_i18n_uset_retain_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_retain_n", utc_capi_base_utils_i18n_uset_retain_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_retain_all_p", utc_capi_base_utils_i18n_uset_retain_all_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_retain_all_n", utc_capi_base_utils_i18n_uset_retain_all_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_compact_p", utc_capi_base_utils_i18n_uset_compact_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_compact_n", utc_capi_base_utils_i18n_uset_compact_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_complement_p", utc_capi_base_utils_i18n_uset_complement_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_complement_n", utc_capi_base_utils_i18n_uset_complement_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_complement_all_p", utc_capi_base_utils_i18n_uset_complement_all_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_complement_all_n", utc_capi_base_utils_i18n_uset_complement_all_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_clear_p", utc_capi_base_utils_i18n_uset_clear_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_clear_n", utc_capi_base_utils_i18n_uset_clear_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_destroy_over_p", utc_capi_base_utils_i18n_uset_destroy_over_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_destroy_over_n", utc_capi_base_utils_i18n_uset_destroy_over_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_remove_all_strings_p", utc_capi_base_utils_i18n_uset_remove_all_strings_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_remove_all_strings_n", utc_capi_base_utils_i18n_uset_remove_all_strings_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_is_empty_p", utc_capi_base_utils_i18n_uset_is_empty_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_is_empty_n", utc_capi_base_utils_i18n_uset_is_empty_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_p", utc_capi_base_utils_i18n_uset_contains_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_n", utc_capi_base_utils_i18n_uset_contains_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_range_p", utc_capi_base_utils_i18n_uset_contains_range_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_range_n", utc_capi_base_utils_i18n_uset_contains_range_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_string_p", utc_capi_base_utils_i18n_uset_contains_string_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_string_n", utc_capi_base_utils_i18n_uset_contains_string_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_index_of_p", utc_capi_base_utils_i18n_uset_index_of_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_index_of_n", utc_capi_base_utils_i18n_uset_index_of_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_char_at_p", utc_capi_base_utils_i18n_uset_char_at_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_char_at_n", utc_capi_base_utils_i18n_uset_char_at_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_size_p", utc_capi_base_utils_i18n_uset_size_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_size_n", utc_capi_base_utils_i18n_uset_size_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_get_item_count_p", utc_capi_base_utils_i18n_uset_get_item_count_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_get_item_count_n", utc_capi_base_utils_i18n_uset_get_item_count_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_get_item_p", utc_capi_base_utils_i18n_uset_get_item_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_get_item_n", utc_capi_base_utils_i18n_uset_get_item_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_all_p", utc_capi_base_utils_i18n_uset_contains_all_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_all_n", utc_capi_base_utils_i18n_uset_contains_all_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_all_code_points_p", utc_capi_base_utils_i18n_uset_contains_all_code_points_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_all_code_points_n", utc_capi_base_utils_i18n_uset_contains_all_code_points_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_none_p", utc_capi_base_utils_i18n_uset_contains_none_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_none_n", utc_capi_base_utils_i18n_uset_contains_none_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_some_p", utc_capi_base_utils_i18n_uset_contains_some_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_contains_some_n", utc_capi_base_utils_i18n_uset_contains_some_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_span_p", utc_capi_base_utils_i18n_uset_span_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_span_n", utc_capi_base_utils_i18n_uset_span_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_span_back_p", utc_capi_base_utils_i18n_uset_span_back_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_span_back_n", utc_capi_base_utils_i18n_uset_span_back_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_span_utf8_p", utc_capi_base_utils_i18n_uset_span_utf8_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_span_utf8_n", utc_capi_base_utils_i18n_uset_span_utf8_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_span_back_utf8_p", utc_capi_base_utils_i18n_uset_span_back_utf8_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_span_back_utf8_n", utc_capi_base_utils_i18n_uset_span_back_utf8_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_equals_p", utc_capi_base_utils_i18n_uset_equals_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_equals_n", utc_capi_base_utils_i18n_uset_equals_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_serialize_p", utc_capi_base_utils_i18n_uset_serialize_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_serialize_n", utc_capi_base_utils_i18n_uset_serialize_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_get_serialized_set_p", utc_capi_base_utils_i18n_uset_get_serialized_set_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_get_serialized_set_n", utc_capi_base_utils_i18n_uset_get_serialized_set_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_set_serialized_to_one_p", utc_capi_base_utils_i18n_uset_set_serialized_to_one_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_set_serialized_to_one_n", utc_capi_base_utils_i18n_uset_set_serialized_to_one_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_serialized_contains_p", utc_capi_base_utils_i18n_uset_serialized_contains_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_serialized_contains_n", utc_capi_base_utils_i18n_uset_serialized_contains_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_get_serialized_range_count_p", utc_capi_base_utils_i18n_uset_get_serialized_range_count_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_get_serialized_range_count_n", utc_capi_base_utils_i18n_uset_get_serialized_range_count_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_get_serialized_range_p", utc_capi_base_utils_i18n_uset_get_serialized_range_p, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {"utc_capi_base_utils_i18n_uset_get_serialized_range_n", utc_capi_base_utils_i18n_uset_get_serialized_range_n, utc_capi_base_utils_uset_startup, utc_capi_base_utils_uset_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_BASE_UTILS_CORE_H__
diff --git a/src/utc/base-utils/utc-capi-base-utils-timezone.c b/src/utc/base-utils/utc-capi-base-utils-timezone.c
new file mode 100755 (executable)
index 0000000..c09130d
--- /dev/null
@@ -0,0 +1,670 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <utils_i18n.h>
+#include <string.h>
+
+
+void utc_capi_base_utils_timezone_startup(void)
+{
+
+
+}
+
+void utc_capi_base_utils_timezone_cleanup(void)
+{
+
+
+}
+
+int utc_capi_base_utils_i18n_timezone_create_unknown_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+
+    ret = i18n_timezone_create_unknown(&timezone);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_create_unknown_n(void)
+{
+    int ret = 0;
+
+    ret = i18n_timezone_create_unknown(NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_create_gmt_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+
+    ret = i18n_timezone_create_gmt(&timezone);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_create_gmt_n(void)
+{
+   int ret = 0;
+
+    ret = i18n_timezone_create_gmt(NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_create_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+
+    ret = i18n_timezone_create(&timezone, "Europe/London");
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_create_n(void)
+{
+    int ret = 0;
+
+    ret = i18n_timezone_create(NULL, "2100");
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_destroy_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    i18n_timezone_create_gmt(&timezone);
+
+    ret = i18n_timezone_destroy(timezone);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_destroy_n(void)
+{
+    int ret = 0;
+
+    ret = i18n_timezone_destroy(NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+bool timezone_cb(const char *timezone_id, void *user_data)
+{
+    printf( "timezone_id : %s", timezone_id);
+    return false;
+}
+
+int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_region_p(void)
+{
+    int ret = I18N_ERROR_NONE;
+
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_timezone_foreach_timezone_id_by_region(I18N_UCALENDAR_ZONE_TYPE_ANY, "US", NULL, timezone_cb, NULL);
+
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_region_n(void)
+{
+    int ret = -1;
+
+    const char *region = "PST";
+    int32_t raw_offset = 5*60*60*1000;
+
+    ret = i18n_timezone_foreach_timezone_id_by_region(I18N_UCALENDAR_ZONE_TYPE_ANY, region, &raw_offset, NULL, NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_p(void)
+{
+    int ret = -1;
+    ret = i18n_timezone_foreach_timezone_id(timezone_cb, NULL);
+
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_n(void)
+{
+    int ret = i18n_timezone_foreach_timezone_id(NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_with_offset_p(void)
+{
+    int ret = -1;
+    int32_t raw_offset = 3600000;
+    ret = i18n_timezone_foreach_timezone_id_with_offset(raw_offset, timezone_cb, NULL);
+
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_with_offset_n(void)
+{
+    int ret = i18n_timezone_foreach_timezone_id_with_offset(-1, NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_country_p(void)
+{
+    int ret = -1;
+    ret = i18n_timezone_foreach_timezone_id_by_country(NULL, timezone_cb, NULL);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_foreach_timezone_id_by_country_n(void)
+{
+    int ret = 0;
+    ret = i18n_timezone_foreach_timezone_id_by_country(NULL, NULL, NULL);
+
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_count_equivalent_ids_p(void)
+{
+    int ret = -1;
+    const char *timezone_id = "Europe/London";
+    int32_t count;
+    ret = i18n_timezone_count_equivalent_ids(timezone_id, &count);
+
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_count_equivalent_ids_n(void)
+{
+    int ret = 0;
+    int32_t count;
+    ret = i18n_timezone_count_equivalent_ids(NULL, &count);
+
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_equivalent_id_p(void)
+{
+    int ret = I18N_ERROR_NONE;
+    const char *timezone_id = "PST";
+    int32_t index = 0;
+    char *equivalent_timezone_id;
+
+    ret = i18n_timezone_get_equivalent_id(timezone_id, index, &equivalent_timezone_id);
+
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_equivalent_id_n(void)
+{
+    int ret = 0;
+    int32_t index = 0;
+    char *equivalent_timezone_id;
+    ret = i18n_timezone_get_equivalent_id(NULL, index, &equivalent_timezone_id);
+
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_create_default_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+
+    ret = i18n_timezone_create_default(&timezone);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_create_default_n(void)
+{
+    int ret = 0;
+
+    ret = i18n_timezone_create_default(NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_set_default_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    i18n_timezone_create_default(&timezone);
+
+    ret = i18n_timezone_set_default(timezone);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_set_default_n(void)
+{
+    int ret = 0;
+
+    ret = i18n_timezone_set_default(NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_tzdata_version_p(void)
+{
+    int ret = -1;
+
+    const char* tzdata_version = i18n_timezone_get_tzdata_version();
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(tzdata_version, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_region_p(void)
+{
+    int ret = -1;
+    const char *timezone_id = "Europe/London";
+    char region[64];
+    int32_t region_capacity = 64;
+    int32_t region_len;
+
+    ret = i18n_timezone_get_region(timezone_id, region, &region_len, region_capacity);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_region_n(void)
+{
+    int ret = 0;
+    char region[64];
+    int32_t region_capacity = 64;
+    int32_t region_len;
+
+    ret = i18n_timezone_get_region(NULL, region, &region_len, region_capacity);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_offset_with_date_p(void)
+{
+    int ret = 0;
+    i18n_timezone_h london = NULL;
+    i18n_timezone_create(&london, "GMT+1:00");
+    i18n_udate udate;
+    i18n_ubool local = false;
+    int32_t raw_offset = 0;
+    int32_t dst_offset = 0;
+
+    i18n_ucalendar_get_now(&udate);
+
+    ret = i18n_timezone_get_offset_with_date(london, udate, local, &raw_offset, &dst_offset);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_offset_with_date_n(void)
+{
+    int ret = 0;
+    i18n_udate udate;
+    i18n_ubool local = true;
+    int32_t raw_offset;
+    int32_t dst_offset;
+
+    i18n_ucalendar_get_now(&udate);
+
+    ret = i18n_timezone_get_offset_with_date(NULL, udate, local, &raw_offset, &dst_offset);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_set_raw_offset_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    int32_t offset_milliseconds = 3600000;
+
+    i18n_timezone_create_default(&timezone);
+    ret = i18n_timezone_set_raw_offset(timezone, offset_milliseconds);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_set_raw_offset_n(void)
+{
+    int ret = 0;
+    int32_t offset_milliseconds = 3600000;
+
+    ret = i18n_timezone_set_raw_offset(NULL, offset_milliseconds);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_raw_offset_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    int32_t offset_milliseconds;
+
+    i18n_timezone_create_default(&timezone);
+    ret = i18n_timezone_get_raw_offset(timezone, &offset_milliseconds);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_raw_offset_n(void)
+{
+    int ret = 0;
+    int32_t offset_milliseconds;
+
+    ret = i18n_timezone_get_raw_offset(NULL, &offset_milliseconds);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_id_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    char *timezone_id;
+
+    i18n_timezone_create_default(&timezone);
+    ret = i18n_timezone_get_id(timezone, &timezone_id);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_id_n(void)
+{
+    int ret = -1;
+    char *timezone_id;
+
+    ret = i18n_timezone_get_id(NULL, &timezone_id);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_set_id_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    const char *timezone_id = "Europe/London";
+
+    i18n_timezone_create_default(&timezone);
+    ret = i18n_timezone_set_id(timezone, timezone_id);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_set_id_n(void)
+{
+    int ret = 0;
+    const char *timezone_id = "2100";
+
+    ret = i18n_timezone_set_id(NULL, timezone_id);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_display_name_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    char *displayname;
+
+    i18n_timezone_create_default(&timezone);
+    ret = i18n_timezone_get_display_name(timezone, &displayname);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_display_name_n(void)
+{
+    int ret = 0;
+    char *displayname;
+
+    ret = i18n_timezone_get_display_name(NULL, &displayname);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_display_name_with_locale_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    const char *language = "en";
+    const char *country = "US";
+    char *displayname;
+
+    i18n_timezone_create_default(&timezone);
+    ret = i18n_timezone_get_display_name_with_locale(timezone, language, country,  &displayname);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_display_name_with_locale_n(void)
+{
+    int ret = 0;
+    const char *language = "en";
+    const char *country = "US";
+    char *displayname;
+
+    ret = i18n_timezone_get_display_name_with_locale(NULL, language, country,  &displayname);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_display_name_with_type_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    i18n_ubool daylight = true;
+    char *displayname;
+
+    i18n_timezone_create_default(&timezone);
+    ret = i18n_timezone_get_display_name_with_type(timezone, daylight, I18N_TIMEZONE_DISPLAY_TYPE_LONG,  &displayname);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_display_name_with_type_n(void)
+{
+    int ret = 0;
+    i18n_ubool daylight = true;
+    i18n_timezone_display_type_e style = I18N_TIMEZONE_DISPLAY_TYPE_LONG;
+    char *displayname;
+
+    ret = i18n_timezone_get_display_name_with_type(NULL, daylight, style,  &displayname);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_display_name_with_type_locale_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    i18n_ubool daylight = true;
+    i18n_timezone_display_type_e style = I18N_TIMEZONE_DISPLAY_TYPE_LONG;
+    const char *language = "en";
+    const char *country = "US";
+    char *displayname;
+
+    i18n_timezone_create_default(&timezone);
+    ret = i18n_timezone_get_display_name_with_type_locale(timezone, daylight, style, language, country,  &displayname);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_display_name_with_type_locale_n(void)
+{
+    int ret = -1;
+    i18n_ubool daylight = true;
+    i18n_timezone_display_type_e style = I18N_TIMEZONE_DISPLAY_TYPE_LONG;
+    const char *language = "en";
+    const char *country = "US";
+    char *displayname;
+
+    ret = i18n_timezone_get_display_name_with_type_locale(NULL, daylight, style, language, country,  &displayname);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_use_daylight_time_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    i18n_ubool daylight_time;
+
+    i18n_timezone_create_default(&timezone);
+    ret = i18n_timezone_use_daylight_time(timezone, &daylight_time);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_use_daylight_time_n(void)
+{
+    int ret = 0;
+    i18n_ubool daylight_time;
+
+    ret = i18n_timezone_use_daylight_time(NULL, &daylight_time);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_has_same_rule_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    i18n_timezone_h other;
+    i18n_ubool same_rule;
+
+    i18n_timezone_create_default(&timezone);
+    i18n_timezone_create_default(&other);
+    ret = i18n_timezone_has_same_rule(timezone, other, &same_rule);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_has_same_rule_n(void)
+{
+    int ret = 0;
+    i18n_timezone_h other;
+    i18n_ubool same_rule;
+
+    i18n_timezone_create_default(&other);
+    ret = i18n_timezone_has_same_rule(NULL, other, &same_rule);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_clone_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    i18n_timezone_h clone;
+
+    i18n_timezone_create_default(&timezone);
+    ret = i18n_timezone_clone(timezone, &clone);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_clone_n(void)
+{
+    int ret = 0;
+    i18n_timezone_h clone;
+
+    ret = i18n_timezone_clone(NULL, &clone);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_dst_savings_p(void)
+{
+    int ret = -1;
+    i18n_timezone_h timezone;
+    int32_t dst_saving;
+
+    i18n_timezone_create_default(&timezone);
+    ret = i18n_timezone_get_dst_savings(timezone, &dst_saving);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_timezone_get_dst_savings_n(void)
+{
+    int ret = -1;
+    int32_t dst_saving;
+
+    ret = i18n_timezone_get_dst_savings(NULL, &dst_saving);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/base-utils/utc-capi-base-utils-ubrk.c b/src/utc/base-utils/utc-capi-base-utils-ubrk.c
new file mode 100755 (executable)
index 0000000..43b7222
--- /dev/null
@@ -0,0 +1,545 @@
+#include "assert.h"
+#include <utils_i18n.h>
+#include <string.h>
+
+#define STR_LEN 64
+static i18n_error_code_e ret = I18N_ERROR_NONE;
+static i18n_ubreak_iterator_h ubrk = NULL;
+static i18n_uchar *_text = NULL;
+
+void utc_capi_base_utils_ubrk_startup(void)
+{
+    const char *locale = I18N_ULOCALE_US;
+    char *text = "text to be iterated";
+
+    _text = (i18n_uchar*)calloc(strlen(text) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_text, text);
+    ret = i18n_ubrk_create(I18N_UBRK_WORD, locale, _text, strlen(text), &ubrk);
+}
+
+void utc_capi_base_utils_ubrk_cleanup(void)
+{
+    if(NULL != ubrk){
+        i18n_ubrk_destroy(ubrk);
+    }
+
+    free(_text);
+}
+
+int utc_capi_base_utils_i18n_ubrk_create_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(ubrk, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_create_n(void)
+{
+    ret = i18n_ubrk_create (-1, NULL, (const i18n_uchar*)"text to be iterated", 24, NULL);
+
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_create_rules_p(void)
+{
+    i18n_uchar *_rules = NULL;
+    char rules[]  = "#  This is a rule comment on line 1\n"
+                                      "[:L:];      # this rule is OK.\n"
+                                      "abcdefg);  # Error, mismatched parens\n";
+
+    char *text = "text ";
+
+    _rules = (i18n_uchar*)calloc(strlen(rules) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_rules, rules);
+
+    free(_text);
+    _text = (i18n_uchar*)calloc(strlen(text) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_text, text);
+
+    i18n_ubreak_iterator_h break_iter;
+    ret = i18n_ubrk_create_rules (_rules, 4, _text, -1, &break_iter, NULL);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_create_rules_n(void)
+{
+    i18n_uparse_error_s* parse_err = NULL;
+    int32_t rules_length = -1;
+
+    ret = i18n_ubrk_create_rules (NULL, rules_length, NULL, 0,NULL , parse_err);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_safe_clone_p(void)
+{
+    assert_neq(ubrk, NULL);
+
+    int32_t p_buffer_size = I18N_U_BRK_SAFECLONE_BUFFERSIZE;
+    i18n_ubreak_iterator_h break_iter_clone = NULL;
+    ret = i18n_ubrk_safe_clone(ubrk, NULL, &p_buffer_size, &break_iter_clone);
+
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_safe_clone_n(void)
+{
+    int bufferSize = 64;
+
+    ret = i18n_ubrk_safe_clone (NULL, NULL, &bufferSize, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_destroy_p(void)
+{
+    assert_neq(ubrk, NULL);
+
+    ret = i18n_ubrk_destroy(ubrk);
+    ubrk = NULL;
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_destroy_n(void)
+{
+    ret = i18n_ubrk_destroy(NULL);
+
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_set_text_p(void)
+{
+    assert_neq(ubrk, NULL);
+    char *text = "text to be iterated";
+    free(_text);
+    _text = (i18n_uchar*)calloc(strlen(text) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_text, text);
+
+    ret = i18n_ubrk_set_text (ubrk, _text, strlen(text));
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_set_text_n(void)
+{
+    assert_neq(ubrk, NULL);
+    char *text = "text to be iterated";
+    free(_text);
+    _text = (i18n_uchar*)calloc(strlen(text) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_text, text);
+
+    ret = i18n_ubrk_set_text (ubrk, _text, -1);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_current_p(void)
+{
+    assert_neq(ubrk, NULL);
+
+    int32_t current = i18n_ubrk_current(ubrk);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(current, 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_current_n(void)
+{
+    i18n_ubrk_current(NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_next_p(void)
+{
+    assert_neq(ubrk, NULL);
+
+    int32_t next = i18n_ubrk_next(ubrk);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(next, 4);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_next_n(void)
+{
+    i18n_ubrk_next(NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_previous_p(void)
+{
+    assert_neq(ubrk, NULL);
+
+    int32_t next = i18n_ubrk_next(ubrk);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(next, 4);
+
+    int32_t previous = i18n_ubrk_previous(ubrk);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(previous, 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_previous_n(void)
+{
+    i18n_ubrk_previous(NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_first_p(void)
+{
+    assert_neq(ubrk, NULL);
+
+    int32_t start = i18n_ubrk_first(ubrk);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(start, 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_first_n(void)
+{
+    assert_neq(ubrk, NULL);
+    i18n_ubrk_first(NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_last_p(void)
+{
+    assert_neq(ubrk, NULL);
+
+    int32_t last = i18n_ubrk_last(ubrk);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(last, 19);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_last_n(void)
+{
+    assert_neq(ubrk, NULL);
+    i18n_ubrk_last(NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_preceding_p(void)
+{
+    assert_neq(ubrk, NULL);
+    int32_t offset = 5;
+
+    int32_t preceding = i18n_ubrk_preceding(ubrk, offset);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(preceding, 4);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_preceding_n(void)
+{
+    int32_t offset = 5;
+
+    i18n_ubrk_preceding(NULL, offset);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_following_p(void)
+{
+    assert_neq(ubrk, NULL);
+    int32_t offset = 4;
+
+    int32_t following = i18n_ubrk_following(ubrk, offset);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(following, 5);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_following_n(void)
+{
+    int32_t offset = 5;
+
+    i18n_ubrk_following(NULL, offset);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_get_available_p(void)
+{
+    int32_t index = 0;
+    const char *locale = i18n_ubrk_get_available(index);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(locale, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_get_available_n(void)
+{
+    int32_t index = -1;
+    i18n_ubrk_get_available(index);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_count_available_p(void)
+{
+    int32_t count_available = i18n_ubrk_count_available();
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_geq(count_available,0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_is_boundary_p(void)
+{
+    assert_neq(ubrk, NULL);
+    int32_t offset = 5;
+
+    i18n_ubool is_boundary = i18n_ubrk_is_boundary(ubrk, offset);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(is_boundary, 1);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_is_boundary_n(void)
+{
+    int32_t offset = 5;
+
+    i18n_ubrk_is_boundary(NULL, offset);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_get_rule_status_p(void)
+{
+    assert_neq(ubrk, NULL);
+    i18n_ubrk_get_rule_status(ubrk);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_get_rule_status_n(void)
+{
+    i18n_ubrk_get_rule_status(NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_get_rule_status_vec_p(void)
+{
+    assert_neq(ubrk, NULL);
+
+    #define RULE_STRING_LENGTH 200
+    i18n_uchar rules[RULE_STRING_LENGTH];
+
+    i18n_ustring_copy_ua_n(rules, "[A-N]{100}; \n"
+                                  "[a-w]{200}; \n"
+                                  "[\\p{L}]{300}; \n"
+                                  "[\\p{N}]{400}; \n"
+                                  "[0-5]{500}; \n"
+                                  "!.*;\n", RULE_STRING_LENGTH);
+
+    #define TEST_STRING_LENGTH 25
+    i18n_uchar testString[TEST_STRING_LENGTH];
+
+    i18n_ustring_copy_ua_n(testString, "ABC", TEST_STRING_LENGTH);
+
+    ret = i18n_ubrk_create_rules(rules, -1, testString, -1, &ubrk, NULL);
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(ubrk, NULL);
+
+    int32_t pos = i18n_ubrk_next(ubrk);
+    assert_eq(pos, 1);
+
+    int32_t capacity = 64;
+    int32_t fill_in_vec[capacity];
+    memset(fill_in_vec, -1, sizeof(fill_in_vec));
+
+    int32_t rules_number = i18n_ubrk_get_rule_status_vec(ubrk, fill_in_vec, capacity);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(rules_number, 2);
+    assert_eq(fill_in_vec[0], 100);
+    assert_eq(fill_in_vec[1], 300);
+    assert_eq(fill_in_vec[2], -1);
+
+    return 0;
+}
+
+
+int utc_capi_base_utils_i18n_ubrk_get_rule_status_vec_n(void)
+{
+    // Check invalid parameter error.
+    i18n_error_code_e ret = I18N_ERROR_NONE;
+    int32_t capacity = 64;
+    int32_t fill_in_vec[capacity];
+
+    i18n_ubrk_get_rule_status_vec (NULL, fill_in_vec, capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    // Check buffer overflow error.
+    #define RULE_STRING_LENGTH 200
+    i18n_uchar rules[RULE_STRING_LENGTH];
+
+    i18n_ustring_copy_ua_n(rules, "[A-N]{100}; \n"
+                                  "[a-w]{200}; \n"
+                                  "[\\p{L}]{300}; \n"
+                                  "[\\p{N}]{400}; \n"
+                                  "[0-5]{500}; \n"
+                                  "!.*;\n", RULE_STRING_LENGTH);
+
+    #define TEST_STRING_LENGTH 25
+    i18n_uchar testString[TEST_STRING_LENGTH];
+
+    i18n_ustring_copy_ua_n(testString, "ABC", TEST_STRING_LENGTH);
+
+    ret = i18n_ubrk_create_rules(rules, -1, testString, -1, &ubrk, NULL);
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(ubrk, NULL);
+
+    int32_t pos = i18n_ubrk_next(ubrk);
+    assert_eq(pos, 1);
+
+    int32_t rules_number = i18n_ubrk_get_rule_status_vec(ubrk, fill_in_vec, 0);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_BUFFER_OVERFLOW);
+    assert_eq(rules_number, 2);
+
+    return 0;
+}
+
+/**
+ * Compare two locale IDs.  If they are equal, return 0.  If `string'
+ * starts with `prefix' plus an additional element, that is, string ==
+ * prefix + '_' + x, then return 1.  Otherwise return a value < 0.
+ */
+static int _loccmp(const char *string, const char *prefix) {
+    if(NULL ==  string || NULL == prefix) {
+        return -3;
+    }
+
+    /* 'root' is less than everything */
+    if(strcmp(prefix, "root") == 0) {
+        return (strcmp(string, "root") == 0) ? 0 : 1;
+    }
+
+    int32_t string_len = (int32_t)strlen(string);
+    int32_t prefix_len = (int32_t)strlen(prefix);
+
+    int32_t compare = strncmp(string, prefix, prefix_len);
+    if(compare) return -1;
+    if(string_len == prefix_len) return 0;
+    if(string[prefix_len] == '_') return 1;
+    return -2; // false match, e.g. "en_USX" compared with "en_US"
+}
+
+int utc_capi_base_utils_i18n_ubrk_get_locale_by_type_p(void)
+{
+    assert_neq(ubrk, NULL);
+
+    const char *locale = "ar_KW_ABDALI";
+    char *text = "text to be iterated";
+    free(_text);
+    _text = (i18n_uchar*)calloc(strlen(text) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_text, text);
+    ret = i18n_ubrk_create(I18N_UBRK_WORD, locale, _text, strlen(text), &ubrk);
+    assert_neq(ubrk, NULL);
+
+    const char *actual = i18n_ubrk_get_locale_by_type(ubrk, I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    const char *valid = i18n_ubrk_get_locale_by_type(ubrk, I18N_ULOCALE_DATA_LOCALE_TYPE_VALID_LOCALE);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    /*
+     * We want the valid locale to be strictly ">" than the requested locale,
+     * and the valid locale to be >= than the actual locale.
+     */
+    assert_gt(_loccmp(locale, valid), 0);
+    assert_geq(_loccmp(valid, actual), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ubrk_get_locale_by_type_n(void)
+{
+    i18n_error_code_e ret = I18N_ERROR_NONE;
+
+    i18n_ubrk_get_locale_by_type (NULL, I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/base-utils/utc-capi-base-utils-ucalendar.c b/src/utc/base-utils/utc-capi-base-utils-ucalendar.c
new file mode 100755 (executable)
index 0000000..4f35e36
--- /dev/null
@@ -0,0 +1,882 @@
+#include "assert.h"
+#include <utils_i18n.h>
+#include <string.h>
+
+#define I18N_RESULT_LEN  100
+
+static i18n_ucalendar_h g_cal = NULL;
+static int ret = I18N_ERROR_NONE;
+
+void utc_capi_base_utils_ucalendar_startup(void)
+{
+    ret = i18n_ucalendar_create(NULL, -1, I18N_ULOCALE_US, I18N_UCALENDAR_DEFAULT, &g_cal);
+    i18n_ucalendar_set_date_time(g_cal, 2000, 1, 1, 1, 1, 1);
+}
+
+void utc_capi_base_utils_ucalendar_cleanup(void)
+{
+    i18n_ucalendar_destroy(g_cal);
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_default_timezone_p(void)
+{
+    char *tzid = "Etc/GMT";
+    i18n_uchar *_tzid = NULL;
+    _tzid = (i18n_uchar*)calloc(strlen(tzid) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_tzid, tzid);
+
+    ret = i18n_ucalendar_set_default_timezone(_tzid);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_default_timezone_n(void)
+{
+    ret = i18n_ucalendar_set_default_timezone(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_now_p(void)
+{
+    i18n_udate date;
+    int ret = i18n_ucalendar_get_now(&date);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_now_n(void)
+{
+    int ret = i18n_ucalendar_get_now(NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_create_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_create_n(void)
+{
+    ret = i18n_ucalendar_create(NULL, -1, I18N_ULOCALE_US, I18N_UCALENDAR_DEFAULT, NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_destroy_p(void)
+{
+    i18n_ucalendar_h cal = NULL;
+
+    ret = i18n_ucalendar_create(0, -1, I18N_ULOCALE_US, I18N_UCALENDAR_DEFAULT, &cal);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_ucalendar_destroy(cal);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_destroy_n(void)
+{
+    ret = i18n_ucalendar_destroy(NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_clone_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_ucalendar_h identical_to_cal = NULL;
+
+    ret = i18n_ucalendar_clone(g_cal, &identical_to_cal);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_ucalendar_destroy(identical_to_cal);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_clone_n(void)
+{
+    i18n_ucalendar_h identical_to_cal= NULL;
+
+    ret = i18n_ucalendar_clone(NULL, &identical_to_cal);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_timezone_displayname_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_uchar result[I18N_RESULT_LEN];
+    int buf_size_needed = 0;
+
+    ret = i18n_ucalendar_get_timezone_displayname(g_cal, I18N_UCALENDAR_STANDARD, I18N_ULOCALE_US, result, I18N_RESULT_LEN, &buf_size_needed);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_timezone_displayname_n(void)
+{
+    int buf_size_needed = 0;
+
+    ret = i18n_ucalendar_get_timezone_displayname(NULL, -1, NULL, NULL, -1, &buf_size_needed);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_is_in_daylight_time_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_ubool is_in = false;
+
+    ret = i18n_ucalendar_is_in_daylight_time(g_cal, &is_in);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_is_in_daylight_time_n(void)
+{
+    ret = i18n_ucalendar_is_in_daylight_time(NULL, NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    ret = i18n_ucalendar_set(g_cal, I18N_UCALENDAR_YEAR, 2014);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_n(void)
+{
+    ret = i18n_ucalendar_set(NULL, I18N_UCALENDAR_YEAR, 2014);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_attribute_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    ret = i18n_ucalendar_set_attribute(g_cal, I18N_UCALENDAR_FIRST_DAY_OF_WEEK, 1);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_attribute_n(void)
+{
+    ret = i18n_ucalendar_set_attribute(NULL, -1, -1);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_attribute_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    int val = 0;
+
+    ret = i18n_ucalendar_get_attribute(g_cal, I18N_UCALENDAR_FIRST_DAY_OF_WEEK, &val);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_attribute_n(void)
+{
+    int val = 0;
+
+    ret = i18n_ucalendar_get_attribute(NULL, I18N_UCALENDAR_FIRST_DAY_OF_WEEK, &val);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_milliseconds_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_udate date;
+
+    ret = i18n_ucalendar_get_milliseconds(g_cal, &date);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_milliseconds_n(void)
+{
+    ret = i18n_ucalendar_get_milliseconds(NULL, NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_milliseconds_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    ret = i18n_ucalendar_set_milliseconds(g_cal, 1000000000.0);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_milliseconds_n(void)
+{
+    ret = i18n_ucalendar_set_milliseconds(NULL, -99999999.0);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_date_time_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    ret = i18n_ucalendar_set_date_time(g_cal, 1988, 1, 3, 11, 44, 21);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_date_time_n(void)
+{
+    ret = i18n_ucalendar_set_date_time(NULL, -1, -1, -1, -1, -1, -1);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_is_equivalent_to_p(void)
+{
+    i18n_ucalendar_h cal1 = NULL, cal2 = NULL;
+    i18n_ubool equiv = false;
+
+    ret = i18n_ucalendar_create(0, -1, I18N_ULOCALE_US, I18N_UCALENDAR_DEFAULT, &cal1);
+    assert_eq(ret, I18N_ERROR_NONE);
+    ret = i18n_ucalendar_create(0, -1, I18N_ULOCALE_US, I18N_UCALENDAR_DEFAULT, &cal2);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_ucalendar_set_date_time(cal1, 2000, 1, 2, 3, 4, 5);
+    assert_eq(ret, I18N_ERROR_NONE);
+    ret = i18n_ucalendar_set_date_time(cal2, 2000, 1, 2, 3, 4, 5);
+    assert_eq(ret, I18N_ERROR_NONE);
+    ret = i18n_ucalendar_is_equivalent_to(cal1, cal2, &equiv);
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(equiv, true);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_is_equivalent_to_n(void)
+{
+    ret = i18n_ucalendar_is_equivalent_to(NULL, NULL, NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_add_p(void)
+{
+    ret = i18n_ucalendar_add(g_cal, I18N_UCALENDAR_YEAR, 10);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_add_n(void)
+{
+    ret = i18n_ucalendar_add(NULL, -1, -1);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    int val = -1;
+
+    ret = i18n_ucalendar_get(g_cal, I18N_UCALENDAR_YEAR, &val);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_n(void)
+{
+    ret = i18n_ucalendar_get(NULL, -1, NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_field_difference_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_udate target = 1000000.0;
+
+    i18n_error_code_e status = I18N_ERROR_NONE;
+    i18n_ucalendar_get_field_difference(g_cal, target, I18N_UCALENDAR_DATE, &status);
+    assert_eq( status, I18N_ERROR_NONE );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_field_difference_n(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_udate target = 0;
+
+    i18n_error_code_e status = I18N_ERROR_NONE;
+    i18n_ucalendar_get_field_difference(NULL, target, I18N_UCALENDAR_DATE, &status);
+    assert_eq( status, I18N_ERROR_INVALID_PARAMETER );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_timezone_id_enumeration_create_p(void)
+{
+    i18n_uenumeration_h enumeration = NULL;
+
+    ret = i18n_ucalendar_timezone_id_enumeration_create(I18N_UCALENDAR_ZONE_TYPE_ANY, "KR", NULL, &enumeration);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_timezone_id_enumeration_create_n(void)
+{
+    ret = i18n_ucalendar_timezone_id_enumeration_create(I18N_UCALENDAR_ZONE_TYPE_ANY, "WRONGCOUNTRYCODE", NULL, NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_timezones_create_p(void)
+{
+    i18n_uenumeration_h enumeration = NULL;
+    ret = i18n_ucalendar_timezones_create(&enumeration);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_timezones_create_n(void)
+{
+    ret = i18n_ucalendar_timezones_create(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_country_timezones_create_p(void)
+{
+    i18n_uenumeration_h enumeration;
+    ret = i18n_ucalendar_country_timezones_create ("KR", &enumeration);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_country_timezones_create_n(void)
+{
+    ret = i18n_ucalendar_country_timezones_create ("KR", NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_default_timezone_p(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    i18n_ucalendar_get_default_timezone (result, result_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_default_timezone_n(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = -1;
+
+    i18n_ucalendar_get_default_timezone (result, result_capacity);
+    ret = get_last_result();
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_timezone_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    int length = i18n_ucalendar_get_timezone_id(g_cal,result,result_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_ucalendar_set_timezone(g_cal, 0, length);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_timezone_n(void)
+{
+    ret = i18n_ucalendar_set_timezone(NULL, 0, -1);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_timezone_id_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    i18n_ucalendar_get_timezone_id(g_cal,result,result_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_timezone_id_n(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = -1;
+
+    i18n_ucalendar_get_timezone_id(NULL,result,result_capacity);
+    ret = get_last_result();
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_gregorian_change_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    ret = i18n_ucalendar_set_gregorian_change(g_cal, 1000);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_gregorian_change_n(void)
+{
+    ret = i18n_ucalendar_set_gregorian_change(NULL, 1000);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_gregorian_change_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+    i18n_udate date;
+    ret = i18n_ucalendar_get_gregorian_change (g_cal, &date);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_gregorian_change_n(void)
+{
+    ret = i18n_ucalendar_get_gregorian_change (NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_available_p(void)
+{
+    i18n_ucalendar_get_available(0);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_available_n(void)
+{
+    i18n_ucalendar_get_available(-1);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_count_available_p(void)
+{
+    int available_no;
+    available_no = i18n_ucalendar_count_available();
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_geq(available_no, 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_date_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    ret = i18n_ucalendar_set_date (g_cal, 2014,11, 11);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_set_date_n(void)
+{
+    ret = i18n_ucalendar_set_date (NULL, 2014,11, 11);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_capi_base_utils_i18n_ucalendar_roll_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    ret = i18n_ucalendar_roll (g_cal, I18N_UCALENDAR_DATE, 2);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_roll_n(void)
+{
+    ret = i18n_ucalendar_roll (NULL, I18N_UCALENDAR_DATE, 2);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_is_set_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_ucalendar_is_set(g_cal, I18N_UCALENDAR_HOUR);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_is_set_n(void)
+{
+    i18n_ucalendar_is_set(NULL, I18N_UCALENDAR_HOUR);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_clear_field_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    ret = i18n_ucalendar_clear_field(g_cal, I18N_UCALENDAR_HOUR);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_clear_field_n(void)
+{
+    ret = i18n_ucalendar_clear_field(NULL, I18N_UCALENDAR_HOUR);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_clear_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    ret = i18n_ucalendar_clear(g_cal);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_clear_n(void)
+{
+    ret = i18n_ucalendar_clear(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_limit_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_ucalendar_get_limit (g_cal, I18N_UCALENDAR_DATE,I18N_UCALENDAR_MINIMUM);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_limit_n(void)
+{
+    i18n_ucalendar_get_limit (NULL, I18N_UCALENDAR_DATE,I18N_UCALENDAR_MINIMUM);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_locale_by_type_p(void)
+{
+    i18n_ucalendar_h cal;
+
+    ret = i18n_ucalendar_create(NULL, -1, I18N_ULOCALE_US, I18N_UCALENDAR_DEFAULT, &cal);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_ucalendar_get_locale_by_type(cal, I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_locale_by_type_n(void)
+{
+    i18n_ucalendar_get_locale_by_type(NULL, I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE);
+    ret = get_last_result();
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_tz_data_version_p(void)
+{
+    const char *version;
+    version = i18n_ucalendar_get_tz_data_version();
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(version, NULL);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_canonical_timezone_id_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_uchar timezone[64] = {0,};
+    int timezone_capacity = 64;
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+    i18n_ubool is_system_id;
+
+    int timezone_id_length = i18n_ucalendar_get_timezone_id(g_cal,timezone,timezone_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_ucalendar_get_canonical_timezone_id (timezone, timezone_id_length, result, result_capacity, &is_system_id);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_canonical_timezone_id_n(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+    i18n_ubool is_system_id;
+
+    i18n_ucalendar_get_canonical_timezone_id (NULL, -2, result, result_capacity, &is_system_id);
+    ret = get_last_result();
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_type_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_ucalendar_get_type (g_cal);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_type_n(void)
+{
+    i18n_ucalendar_get_type (NULL);
+    ret = get_last_result();
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_keyword_values_for_locale_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    const char *key = i18n_ucalendar_get_type (g_cal);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    const char *locale = i18n_ucalendar_get_available(1);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uenumeration_h enumeration;
+
+    ret = i18n_ucalendar_get_keyword_values_for_locale (key, locale, 0, &enumeration);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_keyword_values_for_locale_n(void)
+{
+    ret = i18n_ucalendar_get_keyword_values_for_locale (NULL, NULL, 0, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_day_of_week_type_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+    i18n_ucalendar_weekday_type_e weekday_type;
+    ret = i18n_ucalendar_get_day_of_week_type (g_cal, I18N_UCALENDAR_MONDAY, &weekday_type);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_day_of_week_type_n(void)
+{
+    ret = i18n_ucalendar_get_day_of_week_type(NULL, I18N_UCALENDAR_MONDAY, NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_weekend_transition_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_ucalendar_get_weekend_transition (g_cal, I18N_UCALENDAR_SATURDAY);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_weekend_transition_n(void)
+{
+    i18n_ucalendar_get_weekend_transition (NULL, I18N_UCALENDAR_MONDAY);
+    ret = get_last_result();
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_is_weekend_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    ret = i18n_ucalendar_clear(g_cal);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    // Set date to the non-weekend date e.g. Fri 16:34 12 June 2015
+    i18n_ucalendar_set_date_time(g_cal, 2015, I18N_UCALENDAR_JUNE, 12, 16, 34, 00);
+
+    i18n_udate date;
+    ret = i18n_ucalendar_get_milliseconds(g_cal, &date);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_ubool is_weekend = i18n_ucalendar_is_weekend(g_cal, date);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(is_weekend, 0) // Check whether false was returned.
+
+    ret = i18n_ucalendar_clear(g_cal);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    // Set date to the weekend date e.g. Sat 16:34 13 June 2015
+    i18n_ucalendar_set_date_time(g_cal, 2015, I18N_UCALENDAR_JUNE, 13, 16, 34, 00);
+
+    ret = i18n_ucalendar_get_milliseconds(g_cal, &date);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    is_weekend = i18n_ucalendar_is_weekend(g_cal, date);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(is_weekend, 1) // Check whether true was returned.
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_is_weekend_n(void)
+{
+    i18n_udate date = 0.0;
+
+    i18n_ucalendar_is_weekend (NULL, date);
+    ret = get_last_result();
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_timezone_transition_date_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_cal, NULL);
+
+    i18n_udate transition;
+
+    i18n_ucalendar_get_timezone_transition_date (g_cal, I18N_UCALENDAR_TZ_TRANSITION_NEXT,&transition);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucalendar_get_timezone_transition_date_n(void)
+{
+    i18n_udate transition;
+
+    i18n_ucalendar_get_timezone_transition_date (NULL, 5,&transition);
+    ret = get_last_result();
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/base-utils/utc-capi-base-utils-uchar.c b/src/utc/base-utils/utc-capi-base-utils-uchar.c
new file mode 100755 (executable)
index 0000000..afff5fb
--- /dev/null
@@ -0,0 +1,58 @@
+#include "assert.h"
+#include <string.h>
+#include <utils_i18n.h>
+
+//& set: capi-base-utils-uchar
+
+void utc_capi_base_utils_uchar_startup(void)
+{
+}
+void utc_capi_base_utils_uchar_cleanup(void)
+{
+}
+
+int utc_capi_base_utils_i18n_uchar_get_int_property_value_p(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_uchar32 c = 0xA;
+    i18n_uchar_uproperty_e which = I18N_UCHAR_ASCII_HEX_DIGIT;
+    int property_val = 0;
+
+    ret = i18n_uchar_get_int_property_value( c, which, &property_val );
+    assert_eq( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uchar_get_int_property_value_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_uchar_uproperty_e which = I18N_UCHAR_ASCII_HEX_DIGIT;
+
+    ret = i18n_uchar_get_int_property_value ( 0, which, NULL );
+    assert_neq( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uchar_get_ublock_code_p(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_uchar32 c = 0xA;
+    i18n_uchar_ublock_code_e block_val = I18N_UCHAR_UBLOCK_NO_BLOCK;
+
+    ret = i18n_uchar_get_ublock_code( c, &block_val);
+    assert_eq( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uchar_get_ublock_code_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+
+    ret = i18n_uchar_get_ublock_code( -1, NULL );
+    assert_neq( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
diff --git a/src/utc/base-utils/utc-capi-base-utils-ucollator.c b/src/utc/base-utils/utc-capi-base-utils-ucollator.c
new file mode 100755 (executable)
index 0000000..197fde8
--- /dev/null
@@ -0,0 +1,156 @@
+#include "assert.h"
+#include <utils_i18n.h>
+#include <string.h>
+
+#define STR_LEN        64
+
+i18n_ucollator_h g_coll = NULL;
+i18n_uchar g_ustr[STR_LEN] = { 0, };
+i18n_uchar g_target[STR_LEN] = { 0, };
+int g_str_len = -1;
+char *g_astr = "Test String";
+static int ret;
+void utc_capi_base_utils_ucollator_startup(void)
+{
+       i18n_ustring_copy_ua_n( g_ustr, g_astr, strlen(g_astr) );
+       i18n_ustring_copy_ua_n( g_target, g_astr, strlen(g_astr) );
+       g_str_len = i18n_ustring_get_length(g_ustr);
+
+    ret = i18n_ucollator_create("en_US", &g_coll );
+}
+
+void utc_capi_base_utils_ucollator_cleanup(void)
+{
+    i18n_ucollator_destroy( g_coll );
+}
+
+int utc_capi_base_utils_i18n_ucollator_create_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(g_coll, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucollator_create_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+
+    ret = i18n_ucollator_create( "en_US", NULL );
+    assert_eq( ret, I18N_ERROR_INVALID_PARAMETER );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucollator_destroy_p(void)
+{
+    int ret = I18N_ERROR_NONE;
+    char *loc = "en_US";
+
+    ret = i18n_ucollator_destroy( g_coll );
+    assert_eq( ret, I18N_ERROR_NONE );
+
+    ret = i18n_ucollator_create( loc, &g_coll );
+    assert_eq( ret, I18N_ERROR_NONE );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucollator_destroy_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+
+    ret = i18n_ucollator_destroy( NULL );
+    assert_neq( ret, I18N_ERROR_NONE );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucollator_str_collator_p(void)
+{
+       int ret = I18N_ERROR_NONE;
+    i18n_ucollator_result_e result = I18N_UCOLLATOR_EQUAL;
+
+    ret = i18n_ucollator_str_collator( g_coll, g_ustr, g_str_len, g_target, g_str_len, &result );
+    assert_eq( ret, I18N_ERROR_NONE );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucollator_str_collator_n(void)
+{
+       int ret = I18N_ERROR_NONE;
+    i18n_ucollator_result_e result = I18N_UCOLLATOR_EQUAL;
+
+    ret = i18n_ucollator_str_collator( NULL, NULL, -1, NULL, -1, &result );
+    assert_neq( ret, I18N_ERROR_NONE );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucollator_equal_p(void)
+{
+       int ret = I18N_ERROR_NONE;
+       i18n_ubool equal = false;
+
+    ret = i18n_ucollator_equal( g_coll, g_ustr, g_str_len, g_target, g_str_len, &equal );
+    assert_eq( ret, I18N_ERROR_NONE );
+       assert_eq( equal, true );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucollator_equal_n(void)
+{
+       int ret = I18N_ERROR_NONE;
+
+    ret = i18n_ucollator_equal( NULL, NULL, -1, NULL, -1, NULL);
+    assert_neq( ret, I18N_ERROR_NONE );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucollator_set_strength_p(void)
+{
+       int ret = I18N_ERROR_NONE;
+    i18n_ucollator_strength_e strength = I18N_UCOLLATOR_DEFAULT;
+
+    ret = i18n_ucollator_set_strength( g_coll, strength );
+    assert_eq( ret, I18N_ERROR_NONE );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucollator_set_strength_n(void)
+{
+       int ret = I18N_ERROR_NONE;
+    i18n_ucollator_strength_e strength = I18N_UCOLLATOR_DEFAULT;
+
+    ret = i18n_ucollator_set_strength( NULL, strength );
+    assert_neq( ret, I18N_ERROR_NONE );
+
+    ret = i18n_ucollator_set_strength( NULL, -1 );
+    assert_neq( ret, I18N_ERROR_NONE );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucollator_set_attribute_p(void)
+{
+       int ret = I18N_ERROR_NONE;
+    i18n_ucollator_attribute_e attr = I18N_UCOLLATOR_STRENGTH;
+    i18n_ucollator_attribute_value_e val = I18N_UCOLLATOR_DEFAULT;
+
+    ret = i18n_ucollator_set_attribute( g_coll, attr, val );
+    assert_eq( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ucollator_set_attribute_n(void)
+{
+       int ret = I18N_ERROR_NONE;
+    i18n_ucollator_attribute_e attr = I18N_UCOLLATOR_STRENGTH;
+    i18n_ucollator_attribute_value_e val = I18N_UCOLLATOR_DEFAULT;
+
+    ret = i18n_ucollator_set_attribute( NULL, attr, val );
+    assert_neq( ret, I18N_ERROR_NONE );
+
+    ret = i18n_ucollator_set_attribute( NULL, -1, -1 );
+    assert_neq( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
diff --git a/src/utc/base-utils/utc-capi-base-utils-udate.c b/src/utc/base-utils/utc-capi-base-utils-udate.c
new file mode 100755 (executable)
index 0000000..756cdf6
--- /dev/null
@@ -0,0 +1,644 @@
+#include "assert.h"
+#include <string.h>
+#include <utils_i18n.h>
+
+//& set: capi-base-utils-udate
+static i18n_udate_format_h format = NULL;
+static int ret;
+
+void utc_capi_base_utils_udate_startup(void)
+{
+    i18n_udate_format_style_e time_style = I18N_UDATE_DEFAULT, date_style = I18N_UDATE_DEFAULT;
+    const char *locale = "en_US";
+    const i18n_uchar *tz_id = 0; // use the default timezone
+    int32_t tz_id_length = 0;
+    const i18n_uchar *pattern = NULL;
+    int32_t pattern_length = 0;
+
+    ret = i18n_udate_create(time_style, date_style, locale, tz_id, tz_id_length, pattern, pattern_length, &format);
+    if (ret != I18N_ERROR_NONE)
+    {
+        fprintf( stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf( stderr, "i18n_uenumeration_open_uchar_strings_enumeration ( code : %d )\n", ret );
+    }
+}
+
+void utc_capi_base_utils_udate_cleanup(void)
+{
+    i18n_udate_destroy(format);
+    format = NULL;
+}
+
+int utc_capi_base_utils_i18n_udate_create_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(format, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_create_n(void)
+{
+    i18n_udate_format_style_e time_style = I18N_UDATE_DEFAULT, date_style = I18N_UDATE_DEFAULT;
+    const char *locale = "en_US";
+    const i18n_uchar *tz_id = 0; // use the default timezone
+    int32_t tz_id_length = 0;
+    const i18n_uchar *pattern = NULL;
+    int32_t pattern_length = 0;
+
+    ret = i18n_udate_create(time_style, date_style, locale, tz_id, tz_id_length, pattern, pattern_length, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_destroy_p(void)
+{
+    i18n_udate_format_h dfmt = NULL;
+    int ret = -1;
+
+    ret = i18n_udate_create(I18N_UDATE_DEFAULT, I18N_UDATE_DEFAULT, NULL, NULL, -1, NULL, -1, &dfmt);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_udate_destroy(dfmt);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_destroy_n(void)
+{
+    int ret = 0;
+
+    ret = i18n_udate_destroy(NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_format_date_p(void)
+{
+    i18n_udate date = 1000000.0;
+    i18n_uchar *str;
+    int len = 0;
+    int buf_size_needed = -1;
+    int ret = -1;
+
+    ret = i18n_udate_format_date(format, date, NULL, len, NULL, &buf_size_needed);
+    len = buf_size_needed;
+    if (ret == I18N_ERROR_BUFFER_OVERFLOW)
+    {
+        ret = I18N_ERROR_NONE;
+        str = (i18n_uchar*)malloc(sizeof(i18n_uchar) * (len+1));
+        ret = i18n_udate_format_date(format, date, str, len+1, NULL, &buf_size_needed);
+    }
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_format_date_n(void)
+{
+    int ret = 0;
+
+    ret = i18n_udate_format_date(NULL, -1, NULL, -1, NULL, NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_capi_base_utils_i18n_udate_to_calendar_date_field_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate_format_field_e field = I18N_UDATE_FORMAT_ERA_FIELD;
+
+    i18n_ucalendar_date_fields_e calendar_field;
+    result = i18n_udate_to_calendar_date_field(field, &calendar_field);
+    assert_eq(calendar_field, I18N_UCALENDAR_ERA);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_to_calendar_date_field_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate_format_field_e field = I18N_UDATE_FORMAT_ERA_FIELD;
+
+    result = i18n_udate_to_calendar_date_field(field, NULL);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_clone_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate_format_h clone = NULL;
+
+    result = i18n_udate_clone(format, &clone);
+    assert_eq(result, I18N_ERROR_NONE);
+    assert_neq(clone, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_clone_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate_format_h clone = NULL;
+
+    result = i18n_udate_clone(NULL, NULL);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+    assert_eq(clone, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_parse_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_uchar text[24] = {0,};
+    int32_t text_length = -1;
+    int32_t parse_pos = 0;
+    i18n_udate parsed_date;
+
+    result = i18n_udate_parse(format, i18n_ustring_copy_ua(text, "Jan 1, 1970, 9:00:00 AM"), text_length, &parse_pos, &parsed_date);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_parse_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_uchar text[24] = {0,};
+    int32_t text_length = -1;
+    int32_t parse_pos = 0;
+
+    result = i18n_udate_parse(NULL, i18n_ustring_copy_ua(text, "Jan 1, 1970, 9:00:00 AM"), text_length, &parse_pos, NULL);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_parse_calendar_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ucalendar_h ucal = NULL;
+    i18n_uchar timezone_id[24] = {0,};
+    int32_t len = -1;
+    const char *locale;
+    result = i18n_ulocale_get_default(&locale);
+    assert_eq(result, I18N_ERROR_NONE);
+    i18n_ucalendar_type_e type = I18N_UCALENDAR_DEFAULT;
+
+    result = i18n_ucalendar_create(i18n_ustring_copy_ua(timezone_id, "Asia/Seoul"), len, locale, type, &ucal);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    i18n_uchar text[24] = {0,};
+    int32_t text_length = -1;
+    int32_t parse_pos = 0;
+
+    result = i18n_udate_parse_calendar(format, ucal, i18n_ustring_copy_ua(text, "Jan 1, 1970, 9:00:00 AM"), text_length, &parse_pos);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    i18n_ucalendar_destroy(ucal);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_parse_calendar_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ucalendar_h ucal = NULL;
+    i18n_uchar timezone_id[24] = {0,};
+    int32_t len = -1;
+    const char *locale;
+    result = i18n_ulocale_get_default(&locale);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    i18n_ucalendar_type_e type = I18N_UCALENDAR_DEFAULT;
+
+    result = i18n_ucalendar_create(i18n_ustring_copy_ua(timezone_id, "Asia/Seoul"), len, locale, type, &ucal);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    int32_t text_length = -1;
+    int32_t parse_pos = 0;
+
+    result = i18n_udate_parse_calendar(format, ucal, NULL, text_length, &parse_pos);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    i18n_ucalendar_destroy(ucal);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_is_lenient_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+
+    i18n_udate_is_lenient(format);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_is_lenient_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+
+    i18n_udate_is_lenient(NULL);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_lenient_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+
+    result = i18n_udate_set_lenient(format, true);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_lenient_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+
+    result = i18n_udate_set_lenient(NULL, true);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_calendar_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ucalendar_h calendar = NULL;
+
+    result = i18n_udate_get_calendar(format, &calendar);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_calendar_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ucalendar_h calendar = NULL;
+
+    result = i18n_udate_get_calendar(NULL, &calendar);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_calendar_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ucalendar_h calendar = NULL;
+
+    result = i18n_udate_get_calendar(format, &calendar);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    result = i18n_udate_set_calendar(format, calendar);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_calendar_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ucalendar_h calendar = NULL;
+
+    result = i18n_udate_get_calendar(format, &calendar);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    result = i18n_udate_set_calendar(NULL, calendar);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_number_format_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_unumber_format_h number_format = NULL;
+
+    result = i18n_udate_get_number_format(format, &number_format);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_number_format_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_unumber_format_h number_format = NULL;
+
+    result = i18n_udate_get_number_format(NULL, &number_format);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_number_format_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_unumber_format_h number_format = NULL;
+
+    result = i18n_udate_get_number_format(format, &number_format);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    result = i18n_udate_set_number_format(format, number_format);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_number_format_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_unumber_format_h number_format = NULL;
+
+    result = i18n_udate_get_number_format(format, &number_format);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    result = i18n_udate_set_number_format(NULL, number_format);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_available_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    int32_t locale_index = 1;
+
+    i18n_udate_get_available(locale_index);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_available_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    int32_t locale_index = -1;
+
+    i18n_udate_get_available(locale_index);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_count_available_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    int32_t count;
+
+    count = i18n_udate_count_available();
+    assert_geq(count, 0);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_2digit_year_start_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate year;
+    result = i18n_udate_get_2digit_year_start(format, &year);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_2digit_year_start_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+
+    result = i18n_udate_get_2digit_year_start(NULL, NULL);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_2digit_year_start_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate date = 0;
+
+    result = i18n_udate_get_2digit_year_start(format, &date);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    result = i18n_udate_set_2digit_year_start(format, date);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_2digit_year_start_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate date = 0;
+
+    result = i18n_udate_get_2digit_year_start(format, &date);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    result = i18n_udate_set_2digit_year_start(NULL, date);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_to_pattern_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ubool localized = true;
+    i18n_uchar buffer[32] = {0,};
+    int32_t buffer_size = sizeof(buffer)/sizeof(buffer[0]);
+
+    i18n_udate_to_pattern(format, localized, buffer, buffer_size);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_to_pattern_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ubool localized = true;
+    i18n_uchar buffer[32] = {0,};
+    int32_t buffer_size = sizeof(buffer)/sizeof(buffer[0]);
+
+    i18n_udate_to_pattern(NULL, localized, buffer, buffer_size);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_apply_pattern_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ubool localized = true;
+    const char *pattern = "MMM d, y,";
+    i18n_uchar buffer[32] = {0,};
+    int32_t pattern_length = -1;
+
+    result = i18n_udate_apply_pattern(format, localized, i18n_ustring_copy_ua(buffer, pattern), pattern_length);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_apply_pattern_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ubool localized = true;
+    const char *pattern = "MMM d, y,";
+    i18n_uchar buffer[32] = {0,};
+    int32_t pattern_length = -1;
+
+    result = i18n_udate_apply_pattern(NULL, localized, i18n_ustring_copy_ua(buffer, pattern), pattern_length);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_symbols_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate_format_symbol_type_e type = I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS;
+    int32_t symbol_index = 0;
+    i18n_uchar buffer[32] = {0,};
+    int32_t buffer_size = sizeof(buffer)/sizeof(buffer[0]);
+
+    i18n_udate_get_symbols(format, type, symbol_index, buffer, buffer_size);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_symbols_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate_format_symbol_type_e type = I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS;
+    int32_t symbol_index = 0;
+    i18n_uchar buffer[32] = {0,};
+    int32_t buffer_size = sizeof(buffer)/sizeof(buffer[0]);
+
+    i18n_udate_get_symbols(NULL, type, symbol_index, buffer, buffer_size);
+    result = get_last_result();
+    assert_neq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_count_symbols_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate_format_symbol_type_e type = I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS;
+
+    i18n_udate_count_symbols(format, type);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_count_symbols_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate_format_symbol_type_e type = I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS;
+
+    i18n_udate_count_symbols(NULL, type);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_symbols_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate_format_symbol_type_e type = I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS;
+    int32_t symbol_index = 0;
+    const char *symbol = "tizenary";
+    i18n_uchar buffer[32] = {0,};
+    int32_t buffer_size = sizeof(buffer)/sizeof(buffer[0]);
+
+    result = i18n_udate_set_symbols(format, type, symbol_index, i18n_ustring_copy_ua(buffer, symbol), buffer_size);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_symbols_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udate_format_symbol_type_e type = I18N_UDATE_FORMAT_SYMBOL_TYPE_MONTHS;
+    int32_t symbol_index = 0;
+    const char *symbol = "tizenary";
+    i18n_uchar buffer[32] = {0,};
+
+    result = i18n_udate_set_symbols(NULL, type, symbol_index, i18n_ustring_copy_ua(buffer, symbol), -1);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_locale_by_type_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ulocale_data_locale_type_e type = I18N_ULOCALE_DATA_LOCALE_TYPE_VALID_LOCALE;
+
+    i18n_udate_get_locale_by_type(format, type);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_get_locale_by_type_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_ulocale_data_locale_type_e type = I18N_ULOCALE_DATA_LOCALE_TYPE_VALID_LOCALE;
+
+    i18n_udate_get_locale_by_type(NULL, type);
+    result = get_last_result();
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_context_p(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udisplay_context_e value = I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE;
+
+    result = i18n_udate_set_context(format, value);
+    assert_eq(result, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udate_set_context_n(void)
+{
+    i18n_error_code_e result = I18N_ERROR_NONE;
+    i18n_udisplay_context_e value = I18N_UDISPLAY_CONTEXT_CAPITALIZATION_FOR_STANDALONE;
+
+    result = i18n_udate_set_context(NULL, value);
+    assert_eq(result, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/base-utils/utc-capi-base-utils-udatepg.c b/src/utc/base-utils/utc-capi-base-utils-udatepg.c
new file mode 100755 (executable)
index 0000000..ace47e5
--- /dev/null
@@ -0,0 +1,588 @@
+#include "assert.h"
+#include <string.h>
+#include <utils_i18n.h>
+
+static i18n_udatepg_h dtpg = NULL;
+static int ret = I18N_ERROR_NONE;
+
+#define I18N_ret_LEN         100
+#define SKELETON_LEN            6
+#define BEST_PATTERN_CAPACITY   12
+
+void utc_capi_base_utils_udatepg_startup(void)
+{
+    ret = i18n_udatepg_create(I18N_ULOCALE_US, &dtpg);
+}
+
+void utc_capi_base_utils_udatepg_cleanup(void)
+{
+    i18n_udatepg_destroy(dtpg);
+}
+
+int utc_capi_base_utils_i18n_udatepg_create_p(void)
+{
+    assert_neq(dtpg, NULL);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_create_n(void)
+{
+    ret = i18n_udatepg_create(I18N_ULOCALE_US, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_destroy_p(void)
+{
+    i18n_udatepg_h dtpg = NULL;
+    i18n_udatepg_create(I18N_ULOCALE_US, &dtpg);
+    assert_neq(dtpg, NULL);
+    ret = i18n_udatepg_destroy(dtpg);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_destroy_n(void)
+{
+    ret = i18n_udatepg_destroy(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_best_pattern_p(void)
+{
+    assert_neq(dtpg, NULL);
+    const char *a_skeleton = "MMMdd";
+    i18n_uchar skeleton[SKELETON_LEN] = { 0, };
+    i18n_uchar best_pattern[I18N_ret_LEN] = { 0, };
+    int skeleton_len;
+    int best_pattern_len;
+    int capacity;
+
+    i18n_ustring_copy_ua(skeleton, a_skeleton);
+    skeleton_len = i18n_ustring_get_length(skeleton);
+    capacity = (int)(sizeof(best_pattern)/sizeof(best_pattern[0]));
+
+    ret = i18n_udatepg_get_best_pattern(dtpg, skeleton, skeleton_len, best_pattern,
+        capacity, &best_pattern_len);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_best_pattern_n(void)
+{
+    i18n_uchar *skeleton = NULL;
+    i18n_uchar *best_pattern = NULL;
+    int best_pattern_len = -1;
+
+    ret = i18n_udatepg_get_best_pattern(NULL, skeleton, SKELETON_LEN, best_pattern,
+        BEST_PATTERN_CAPACITY, &best_pattern_len);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_create_empty_p(void)
+{
+    i18n_udatepg_destroy(dtpg);
+
+    ret = i18n_udatepg_create_empty(&dtpg);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_create_empty_n(void)
+{
+    ret = i18n_udatepg_create_empty(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_clone_p(void)
+{
+    i18n_udatepg_h dtpg_clone = NULL;
+
+    ret = i18n_udatepg_clone(dtpg, &dtpg_clone);
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(dtpg_clone, NULL);
+    i18n_udatepg_destroy(dtpg_clone);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_clone_n(void)
+{
+    i18n_udatepg_h dtpg_c = NULL;
+
+    ret = i18n_udatepg_clone(NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    assert_eq(dtpg_c, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_best_pattern_with_options_p(void)
+{
+    const char *skeleton = "yyyyMMMdd";
+    i18n_uchar buffer[24] = {0,};
+    int length = strlen(skeleton);
+    i18n_udatepg_date_time_pattern_match_options_e options = I18N_UDATEPG_MATCH_NO_OPTIONS;
+    i18n_uchar best_pattern[24] = {0,};
+    int capacity = sizeof(best_pattern)/sizeof(best_pattern[0]);
+
+    i18n_udatepg_get_best_pattern_with_options(dtpg, i18n_ustring_copy_ua(buffer, skeleton),
+        length, options, best_pattern, capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_best_pattern_with_options_n(void)
+{
+    int length = 1;
+    i18n_udatepg_date_time_pattern_match_options_e options = I18N_UDATEPG_MATCH_NO_OPTIONS;
+    i18n_uchar best_pattern[24] = {0,};
+    int capacity = sizeof(best_pattern)/sizeof(best_pattern[0]);
+
+    i18n_udatepg_get_best_pattern_with_options(dtpg, NULL, length, options, best_pattern, capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_skeleton_p(void)
+{
+    const char *skeleton = "yyyyMMMdd";
+    i18n_uchar buffer[24] = {0,};
+    int capacity_buffer = sizeof(buffer)/sizeof(buffer[0]);
+    int length = strlen(skeleton);
+    i18n_uchar best_pattern[24] = {0,};
+    int capacity_best_pattern = sizeof(best_pattern)/sizeof(best_pattern[0]);
+    int32_t best_pattern_len = -1;
+
+    ret = i18n_udatepg_get_best_pattern(dtpg, i18n_ustring_copy_ua(buffer, skeleton), length, best_pattern, capacity_best_pattern, &best_pattern_len);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_udatepg_get_skeleton(dtpg, best_pattern, i18n_ustring_get_length(best_pattern), buffer, capacity_buffer);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_skeleton_n(void)
+{
+    i18n_uchar buffer[24] = {0,};
+    int capacity_buffer = sizeof(buffer)/sizeof(buffer[0]);
+    int length = 1;
+
+    i18n_udatepg_get_skeleton(dtpg, NULL, length, buffer, capacity_buffer);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_base_skeleton_p(void)
+{
+    const char *skeleton = "yyyyMMMdd";
+    i18n_uchar buffer[24] = {0,};
+    int capacity_buffer = sizeof(buffer)/sizeof(buffer[0]);
+    int length = strlen(skeleton);
+    i18n_uchar best_pattern[24] = {0,};
+    int capacity_best_pattern = sizeof(best_pattern)/sizeof(best_pattern[0]);
+    int32_t best_pattern_len = -1;
+
+    i18n_udatepg_get_best_pattern(dtpg, i18n_ustring_copy_ua(buffer, skeleton), length, best_pattern, capacity_best_pattern, &best_pattern_len);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_udatepg_get_base_skeleton(dtpg, best_pattern, i18n_ustring_get_length(best_pattern), buffer, capacity_buffer);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_base_skeleton_n(void)
+{
+    i18n_uchar buffer[24] = {0,};
+    int capacity_buffer = sizeof(buffer)/sizeof(buffer[0]);
+    i18n_uchar *best_pattern = NULL;
+    int length = 1;
+
+    i18n_udatepg_get_base_skeleton(dtpg, best_pattern, length, buffer, capacity_buffer);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_add_pattern_p(void)
+{
+    const char* src = "yyyy/MM/dd";
+    i18n_uchar pattern[24] = {0,};
+    int32_t pattern_length = strlen(src);
+    i18n_ubool override = false;
+    i18n_uchar conflicting_pattern[24] = {0,};
+    int32_t capacity = sizeof(conflicting_pattern)/sizeof(conflicting_pattern[0]);
+    i18n_udatepg_date_time_pattern_conflict_e conflict_status;
+
+    i18n_udatepg_add_pattern(dtpg, i18n_ustring_copy_ua(pattern, src), pattern_length, override, conflicting_pattern, capacity, &conflict_status);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_add_pattern_n(void)
+{
+    int32_t pattern_length = 1;
+    i18n_ubool override = false;
+    i18n_uchar conflicting_pattern[24] = {0,};
+    int32_t capacity = sizeof(conflicting_pattern)/sizeof(conflicting_pattern[0]);
+    int32_t confliction_pattern_length = 0;
+
+    confliction_pattern_length = i18n_udatepg_add_pattern(dtpg, NULL, pattern_length, override, conflicting_pattern, capacity, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    assert_eq(confliction_pattern_length, -1);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_set_append_item_format_p(void)
+{
+    i18n_udatepg_date_time_pattern_field_e field = I18N_UDATEPG_ERA_FIELD;
+    const char *src = "{1}{2}{0}";
+    i18n_uchar value[24] = {0,};
+    int32_t length = strlen(src);
+
+    ret = i18n_udatepg_set_append_item_format(dtpg, field, i18n_ustring_copy_ua(value, src), length);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_set_append_item_format_n(void)
+{
+    i18n_udatepg_date_time_pattern_field_e field = I18N_UDATEPG_ERA_FIELD;
+    const char *src = "{1}{2}{0}";
+    i18n_uchar value[24] = {0,};
+    int32_t length = strlen(src);
+
+    ret = i18n_udatepg_set_append_item_format(NULL, field, i18n_ustring_copy_ua(value, src), length);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_append_item_format_p(void)
+{
+    i18n_udatepg_date_time_pattern_field_e field = I18N_UDATEPG_ERA_FIELD;
+    int32_t pattern_length;
+
+    const i18n_uchar *format = i18n_udatepg_get_append_item_format(dtpg, field, &pattern_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(format, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_append_item_format_n(void)
+{
+    i18n_udatepg_date_time_pattern_field_e field = I18N_UDATEPG_ERA_FIELD;
+
+    int32_t pattern_length = 0;
+
+    i18n_udatepg_get_append_item_format(NULL, field, &pattern_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_set_append_item_name_p(void)
+{
+    i18n_udatepg_date_time_pattern_field_e field = I18N_UDATEPG_ERA_FIELD;
+    const char *src = "tizen";
+    i18n_uchar value[24] = {0,};
+    int32_t length = strlen(src);
+
+    ret = i18n_udatepg_set_append_item_name(dtpg, field, value, length);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_set_append_item_name_n(void)
+{
+    i18n_udatepg_date_time_pattern_field_e field = I18N_UDATEPG_ERA_FIELD;
+    i18n_uchar value[24] = {0,};
+    int32_t length = -1;
+
+    ret = i18n_udatepg_set_append_item_name(NULL, field, value, length);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_append_item_name_p(void)
+{
+    i18n_udatepg_date_time_pattern_field_e field = I18N_UDATEPG_ERA_FIELD;
+    const i18n_uchar *value;
+    int32_t length;
+
+    value = i18n_udatepg_get_append_item_name(dtpg, field, &length);
+    ret = get_last_result();
+    assert_neq(value, NULL);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_append_item_name_n(void)
+{
+    i18n_udatepg_date_time_pattern_field_e field = I18N_UDATEPG_ERA_FIELD;
+
+    int32_t pattern_length = 0;
+
+    i18n_udatepg_get_append_item_name(NULL, field, &pattern_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_set_date_time_format_p(void)
+{
+    const char *src = "{1} {0}";
+    i18n_uchar date_time_format[16] = {0,};
+    int32_t length = strlen(src);
+
+    ret = i18n_udatepg_set_date_time_format(dtpg, i18n_ustring_copy_ua(date_time_format, src), length);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_set_date_time_format_n(void)
+{
+    const char *src = "{1} {0}";
+    i18n_uchar date_time_format[16] = {0,};
+    int32_t length = strlen(src);
+
+    ret = i18n_udatepg_set_date_time_format(NULL, i18n_ustring_copy_ua(date_time_format, src), length);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_date_time_format_p(void)
+{
+    int32_t pattern_length = 0;
+
+    i18n_udatepg_get_date_time_format(dtpg, &pattern_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_date_time_format_n(void)
+{
+    int32_t pattern_length = 0;
+
+    i18n_udatepg_get_date_time_format(NULL, &pattern_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_set_decimal_p(void)
+{
+    const char *src = ",";
+    i18n_uchar decimal;
+    int32_t length = strlen(src);
+
+    ret = i18n_udatepg_set_decimal(dtpg, i18n_ustring_copy_ua(&decimal, src), length);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_set_decimal_n(void)
+{
+    const char *src = ",";
+    i18n_uchar *decimal = NULL;
+    int32_t length = strlen(src);
+
+    ret = i18n_udatepg_set_decimal(NULL, i18n_ustring_copy_ua(decimal, src), length);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_decimal_p(void)
+{
+    int32_t pttern_length = 0;
+
+    i18n_udatepg_get_decimal(dtpg, &pttern_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_decimal_n(void)
+{
+    int32_t pttern_length = 0;
+
+    i18n_udatepg_get_decimal(NULL, &pttern_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_replace_field_types_p(void)
+{
+    const char *src_for_pattern = "d-M H:m";
+    i18n_uchar pattern[32] = {0,};
+    int32_t pattern_length = strlen(src_for_pattern);
+    const char *src_for_skeleton = "MMMMddhhmm";
+    i18n_uchar skeleton[32] = {0,};
+    int32_t skeleton_length = strlen(src_for_skeleton);
+    i18n_uchar dest[32] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_udatepg_replace_field_types(dtpg, pattern, pattern_length, skeleton, skeleton_length, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_replace_field_types_n(void)
+{
+    int32_t pattern_length = 1;
+    const char *src_for_skeleton = "MMMMddhhmm";
+    i18n_uchar skeleton[32] = {0,};
+    int32_t skeleton_length = strlen(src_for_skeleton);
+    i18n_uchar dest[32] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_udatepg_replace_field_types(dtpg, NULL, pattern_length, skeleton, skeleton_length, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_replace_field_types_with_options_p(void)
+{
+    const char *src_for_pattern = "d-M H:m";
+    i18n_uchar pattern[32] = {0,};
+    int32_t pattern_length = strlen(src_for_pattern);
+    const char *src_for_skeleton = "MMMMddhhmm";
+    i18n_uchar skeleton[32] = {0,};
+    int32_t skeleton_length = strlen(src_for_skeleton);
+    i18n_udatepg_date_time_pattern_match_options_e options = I18N_UDATEPG_MATCH_NO_OPTIONS;
+    i18n_uchar dest[32] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_udatepg_replace_field_types_with_options(dtpg, pattern, pattern_length, skeleton, skeleton_length, options, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_replace_field_types_with_options_n(void)
+{
+    int32_t pattern_length = 1;
+    const char *src_for_skeleton = "MMMMddhhmm";
+    i18n_uchar skeleton[32] = {0,};
+    int32_t skeleton_length = strlen(src_for_skeleton);
+    i18n_udatepg_date_time_pattern_match_options_e options = I18N_UDATEPG_MATCH_NO_OPTIONS;
+    i18n_uchar dest[32] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_udatepg_replace_field_types_with_options(dtpg, NULL, pattern_length, skeleton, skeleton_length, options, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_skeletons_create_p(void)
+{
+    i18n_uenumeration_h enumeration = NULL;
+    ret = i18n_udatepg_skeletons_create(dtpg, &enumeration);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_skeletons_create_n(void)
+{
+
+    ret = i18n_udatepg_skeletons_create(NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_base_skeletons_create_p(void)
+{
+    i18n_uenumeration_h enumeration = NULL;
+    ret = i18n_udatepg_base_skeletons_create(dtpg, &enumeration);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_base_skeletons_create_n(void)
+{
+
+    ret = i18n_udatepg_base_skeletons_create(NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_pattern_for_skeleton_p(void)
+{
+    const char *src = "yMd";
+    i18n_uchar skeleton[8] = {0,};
+    int32_t skeleton_length = strlen(src);
+    int32_t pattern_length = 0;
+
+    i18n_udatepg_get_pattern_for_skeleton(dtpg, i18n_ustring_copy_ua(skeleton, src), skeleton_length, &pattern_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_udatepg_get_pattern_for_skeleton_n(void)
+{
+    const char *src = "yMd";
+    i18n_uchar skeleton[8] = {0,};
+    int32_t skeleton_length = strlen(src);
+    int32_t pattern_length = 0;
+
+    i18n_udatepg_get_pattern_for_skeleton(NULL, i18n_ustring_copy_ua(skeleton, src), skeleton_length, &pattern_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/base-utils/utc-capi-base-utils-uenumeration.c b/src/utc/base-utils/utc-capi-base-utils-uenumeration.c
new file mode 100755 (executable)
index 0000000..ffe5f2b
--- /dev/null
@@ -0,0 +1,183 @@
+#include "assert.h"
+#include <utils_i18n.h>
+
+//& set: capi-base-utils-uenumeration
+
+static const i18n_uchar ustring_1[] = { 't', 0 }, ustring_2[] = { 'i', 0 }, ustring_3[] = { 'z', 0 }, ustring_4[] = { 'e', 0 }, ustring_5[] = { 'n', 0 };
+static const i18n_uchar* ustrings[] = { ustring_1, ustring_2, ustring_3, ustring_4, ustring_5 };
+static i18n_uenumeration_h uenum = NULL;
+
+void utc_capi_base_utils_uenumeration_startup(void)
+{
+    int status = i18n_uenumeration_uchar_strings_enumeration_create(ustrings, sizeof(ustrings)/sizeof(ustrings[0]), &uenum);
+    if (status != I18N_ERROR_NONE)
+    {
+        fprintf( stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf( stderr, "i18n_uenumeration_uchar_strings_enumeration_create ( code : %d )\n", status );
+    }
+}
+
+void utc_capi_base_utils_uenumeration_cleanup(void)
+{
+    int status = i18n_uenumeration_destroy(uenum);
+    uenum = NULL;
+
+    if (status != I18N_ERROR_NONE)
+    {
+        fprintf( stderr, "Cleanup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf( stderr, "i18n_uenumeration_destroy ( code : %d )\n", status );
+    }
+}
+
+int utc_capi_base_utils_i18n_uenumeration_destroy_p(void)
+{
+    int status = i18n_uenumeration_destroy(uenum);
+    uenum = NULL;
+
+    assert_eq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_destroy_n(void)
+{
+    int status = i18n_uenumeration_destroy(NULL);
+    assert_neq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_count_p(void)
+{
+    i18n_uenumeration_count(uenum);
+
+    i18n_error_code_e status = get_last_result();
+    assert_eq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_count_n(void)
+{
+    i18n_uenumeration_count(NULL);
+
+    i18n_error_code_e status = get_last_result();
+    assert_neq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_unext_p(void)
+{
+    int32_t result_length = 0;
+
+    i18n_uenumeration_unext(uenum, &result_length);
+
+    i18n_error_code_e status = get_last_result();
+    assert_eq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_unext_n(void)
+{
+    int32_t result_length = 0;
+
+    i18n_uenumeration_unext(NULL, &result_length);
+
+    i18n_error_code_e status = get_last_result();
+    assert_neq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_next_p(void)
+{
+    int32_t result_length = 0;
+
+    i18n_uenumeration_next(uenum, &result_length);
+
+    i18n_error_code_e status = get_last_result();
+    assert_eq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_next_n(void)
+{
+    int32_t result_length = 0;
+
+    i18n_uenumeration_next(NULL, &result_length);
+
+    i18n_error_code_e status = get_last_result();
+    assert_neq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_reset_p(void)
+{
+    int status = i18n_uenumeration_reset(uenum);
+    assert_eq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_reset_n(void)
+{
+    int status = i18n_uenumeration_reset(NULL);
+    assert_neq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_uchar_strings_enumeration_create_p(void)
+{
+    const i18n_uchar ustring_1[] = { 't', 0 }, ustring_2[] = { 'e', 0 }, ustring_3[] = { 's', 0 }, ustring_4[] = { 't', 0 };
+    const i18n_uchar* ustrings[] = { ustring_1, ustring_2, ustring_3, ustring_4 };
+
+    i18n_uenumeration_h local_uenum;
+    int status = i18n_uenumeration_uchar_strings_enumeration_create(ustrings, sizeof(ustrings)/sizeof(ustrings[0]), &local_uenum);
+    assert_eq(status, I18N_ERROR_NONE);
+
+    i18n_uenumeration_destroy(local_uenum);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_uchar_strings_enumeration_create_n(void)
+{
+    const i18n_uchar ustring_1[] = { 't', 0 }, ustring_2[] = { 'e', 0 }, ustring_3[] = { 's', 0 }, ustring_4[] = { 't', 0 };
+    const i18n_uchar* ustrings[] = { ustring_1, ustring_2, ustring_3, ustring_4 };
+
+    int status = i18n_uenumeration_uchar_strings_enumeration_create(ustrings, -1, NULL);
+    assert_neq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_char_strings_enumeration_create_p(void)
+{
+    const char string_1[] = { 't', 0 }, string_2[] = { 'e', 0 }, string_3[] = { 's', 0 }, string_4[] = { 't', 0 };
+    const char* strings[] = { string_1, string_2, string_3, string_4 };
+
+    i18n_uenumeration_h local_uenum;
+    int status = i18n_uenumeration_char_strings_enumeration_create(strings, sizeof(strings)/sizeof(strings[0]), &local_uenum);
+
+    assert_eq(status, I18N_ERROR_NONE);
+
+    i18n_uenumeration_destroy(local_uenum);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uenumeration_char_strings_enumeration_create_n(void)
+{
+    const char string_1[] = { 't', 0 }, string_2[] = { 'e', 0 }, string_3[] = { 's', 0 }, string_4[] = { 't', 0 };
+    const char* strings[] = { string_1, string_2, string_3, string_4 };
+
+    int status = i18n_uenumeration_char_strings_enumeration_create(strings, -1, NULL);
+    assert_neq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/base-utils/utc-capi-base-utils-ulocale.c b/src/utc/base-utils/utc-capi-base-utils-ulocale.c
new file mode 100755 (executable)
index 0000000..d7e5b59
--- /dev/null
@@ -0,0 +1,838 @@
+#include "assert.h"
+#include <string.h>
+#include <utils_i18n.h>
+
+//& set: capi-base-utils-ulocale
+
+#define I18N_LANG_CAPACITY      12
+#define SKELETON_LEN            6
+#define BEST_PATTERN_CAPACITY   12
+#define I18N_RESULT_LEN         100
+
+static i18n_error_code_e ret = I18N_ERROR_NONE;
+
+void utc_capi_base_utils_ulocale_startup(void)
+{
+}
+
+void utc_capi_base_utils_ulocale_cleanup(void)
+{
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_script_p(void)
+{
+    const char *locale_id = "en_US";
+    char script[12] = {0,};
+    int32_t script_capacity = sizeof(script)/sizeof(script[0]);
+
+    i18n_ulocale_get_script(locale_id, script, script_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_script_n(void)
+{
+    const char *locale_id = "en_US";
+    char script[12] = {0,};
+    int32_t script_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_get_script(locale_id, script, script_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_variant_p(void)
+{
+    const char *locale_id = "en_US";
+    char variant[12] = {0,};
+    int32_t variant_capacity = sizeof(variant)/sizeof(variant[0]);
+
+    i18n_ulocale_get_variant(locale_id, variant, variant_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_variant_n(void)
+{
+    const char *locale_id = "en_US";
+    char variant[12] = {0,};
+    int32_t variant_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_get_variant(locale_id, variant, variant_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_name_p(void)
+{
+    const char *locale_id = "en_US";
+    char name[24] = {0,};
+    int32_t name_capacity = sizeof(name)/sizeof(name[0]);
+
+    i18n_ulocale_get_name(locale_id, name, name_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_name_n(void)
+{
+    const char *locale_id = "en_US";
+    char name[4] = {0,};  // buffer overflow
+    int32_t name_capacity = sizeof(name)/sizeof(name[0]);
+
+    i18n_ulocale_get_name(locale_id, name, name_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_BUFFER_OVERFLOW);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_canonicalize_p(void)
+{
+    const char *locale_id = "en_US";
+    char name[12] = {0,};
+    int32_t name_capacity = sizeof(name)/sizeof(name[0]);
+
+    i18n_ulocale_canonicalize(locale_id, name, name_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_canonicalize_n(void)
+{
+    const char *locale_id = "en_US";
+    char name[4] = {0,};  // buffer overflow
+    int32_t name_capacity = sizeof(name)/sizeof(name[0]);
+
+    i18n_ulocale_canonicalize(locale_id, name, name_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_BUFFER_OVERFLOW);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_iso3_language_p(void)
+{
+    const char *locale_id = "en_US";
+
+    const char *iso_language = i18n_ulocale_get_iso3_language(locale_id);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(strcmp(iso_language, "eng"), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_iso3_country_p(void)
+{
+    const char *locale_id = "en_US";
+
+    const char *iso_country = i18n_ulocale_get_iso3_country(locale_id);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_eq(strcmp(iso_country, "USA"), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_lcid_p(void)
+{
+    const char *locale_id = "en_US";
+
+    i18n_ulocale_get_lcid(locale_id);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_language_p(void)
+{
+    const char *locale_id = "en_US";
+    const char *display_locale = "en_US";
+    i18n_uchar language[12] = {0,};
+    int32_t language_capacity = sizeof(language)/sizeof(language[0]);
+
+    i18n_ulocale_get_display_language(locale_id, display_locale, language, language_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_language_n(void)
+{
+    const char *locale_id = "en_US";
+    const char *display_locale = "en_US";
+    i18n_uchar language[12] = {0,};
+    int32_t language_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_get_display_language(locale_id, display_locale, language, language_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_script_p(void)
+{
+    const char *locale_id = "en_US";
+    const char *display_locale = "en_US";
+    i18n_uchar script[24] = {0,};
+    int32_t script_capacity = sizeof(script)/sizeof(script[0]);
+
+
+    i18n_ulocale_get_display_script(locale_id, display_locale, script, script_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_script_n(void)
+{
+    const char *locale_id = "en_US";
+    const char *display_locale = "en_US";
+    i18n_uchar script[12] = {0,};
+    int32_t script_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_get_display_script(locale_id, display_locale, script, script_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_country_p(void)
+{
+    const char *locale_id = "en_US";
+    const char *display_locale = "en_US";
+    i18n_uchar country[64] = {0,};
+    int32_t country_capacity = sizeof(country)/sizeof(country[0]);
+
+    i18n_ulocale_get_display_country(locale_id, display_locale, country, country_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_country_n(void)
+{
+    const char *locale_id = "en_US";
+    const char *display_locale = "en_US";
+    i18n_uchar country[12] = {0,};
+    int32_t country_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_get_display_country(locale_id, display_locale, country, country_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_variant_p(void)
+{
+    const char *locale_id = "en_US";
+    const char *display_locale = "en_US";
+    i18n_uchar variant[12] = {0,};
+    int32_t variant_capacity = sizeof(variant)/sizeof(variant[0]);
+
+    i18n_ulocale_get_display_variant(locale_id, display_locale, variant, variant_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_variant_n(void)
+{
+    const char *locale_id = "en_US";
+    const char *display_locale = "en_US";
+    i18n_uchar variant[12] = {0,};
+    int32_t variant_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_get_display_variant(locale_id, display_locale, variant, variant_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_keyword_p(void)
+{
+    const char *keyword = "currency";
+    const char *display_locale = "en_US";
+    i18n_uchar dest[12] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_ulocale_get_display_keyword(keyword, display_locale, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_keyword_n(void)
+{
+    const char *keyword = "currency";
+    const char *display_locale = "en_US";
+    i18n_uchar dest[12] = {0,};
+    int32_t dest_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_get_display_keyword(keyword, display_locale, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_keyword_value_p(void)
+{
+    const char *locale_id = "en_US@currency=USD";
+    const char *keyword = "currency";
+    const char *display_locale = "en_US";
+    i18n_uchar dest[12] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_ulocale_get_display_keyword_value(locale_id, keyword, display_locale, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_keyword_value_n(void)
+{
+    const char *locale_id = "en_US@currency=USD";
+    const char *keyword = "currency";
+    const char *display_locale = "en_US";
+    i18n_uchar dest[12] = {0,};
+    int32_t dest_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_get_display_keyword_value(locale_id, keyword, display_locale, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_iso_languages_p(void)
+{
+    const char *const *languages = i18n_ulocale_get_iso_languages();
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(languages, NULL);
+
+    while(*languages != NULL)
+    {
+        const char *language_code = *languages;
+
+        int code_len = strlen(language_code);
+
+        assert_leq(code_len, 3);
+
+        int i;
+        for(i=0; i<code_len; i++)
+        {
+            assert_geq(language_code[i], 'a');
+            assert_leq(language_code[i], 'z');
+        }
+
+        languages++;
+    }
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_iso_countries_p(void)
+{
+    const char *const *countries = i18n_ulocale_get_iso_countries();
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(countries, NULL);
+
+    while(*countries != NULL)
+    {
+        const char *country_code = *countries;
+        assert_eq(strlen(country_code), 2);
+        assert_geq(country_code[0], 'A');
+        assert_leq(country_code[1], 'Z');
+        countries++;
+    }
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_parent_p(void)
+{
+    const char *locale_id = "en_US";
+    char parent[12] = {0,};
+    int32_t parent_capacity = sizeof(parent)/sizeof(parent[0]);
+
+    i18n_ulocale_get_parent(locale_id, parent, parent_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_parent_n(void)
+{
+    const char *locale_id = "en_US";
+    char parent[12] = {0,};
+    int32_t parent_capacity = -1;  // invalid parameter - capacity cannot be negative value
+
+    i18n_ulocale_get_parent(locale_id, parent, parent_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    parent_capacity = 1;  /* invalid parameter - from 0 to 9 (buffer overflow error) -
+                             the capacity is lower than the number of characters between the beginning of the locale_id string and the last underscore found in that string.*/
+    i18n_ulocale_get_parent(locale_id, parent, parent_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_BUFFER_OVERFLOW);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_base_name_p(void)
+{
+    const char *locale_id = "en_US@currency=USD;president=WHO";
+    char name[24] = {0,};
+    int32_t name_capacity = sizeof(name)/sizeof(name[0]);
+
+    i18n_ulocale_get_base_name(locale_id, name, name_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_base_name_n(void)
+{
+    const char *locale_id = "en_US@currency=USD;president=WHO";
+    char name[4] = {0,};  // buffer overflow
+    int32_t name_capacity = sizeof(name)/sizeof(name[0]);
+
+    i18n_ulocale_get_base_name(locale_id, name, name_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_BUFFER_OVERFLOW);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_keywords_create_p(void)
+{
+    const char *locale_id = "en_US@currency=USD;president=WHO";
+
+    i18n_uenumeration_h keywords = NULL;
+    ret = i18n_ulocale_keywords_create(locale_id, &keywords);
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(keywords, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_keywords_create_n(void)
+{
+    ret = i18n_ulocale_keywords_create(NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_keyword_value_p(void)
+{
+    const char *locale_id = "en_US@currency=USD";
+    const char *keyword_name = "currency";
+    char buffer[12] = {0,};
+    int32_t buffer_capacity = sizeof(buffer)/sizeof(buffer[0]);
+
+    i18n_ulocale_get_keyword_value(locale_id, keyword_name, buffer, buffer_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_keyword_value_n(void)
+{
+    const char *locale_id = "en_US@currency=USD";
+    const char *keyword_name = "currency";
+    char buffer[12] = {0,};
+    int32_t buffer_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_get_keyword_value(locale_id, keyword_name, buffer, buffer_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_set_keyword_value_p(void)
+{
+    const char *keyword_name = "currency";
+    const char *keyword_value = "USD";
+    char buffer[24] = {0,};
+    int32_t buffer_capacity = sizeof(buffer)/sizeof(buffer[0]);
+
+    i18n_ulocale_set_keyword_value(keyword_name, keyword_value, buffer, buffer_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_set_keyword_value_n(void)
+{
+    const char *keyword_name = "currency";
+    const char *keyword_value = "USD";
+    char buffer[12] = {0,};
+    int32_t buffer_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_set_keyword_value(keyword_name, keyword_value, buffer, buffer_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_character_orientation_p(void)
+{
+    const char *locale_id = "en_US@currency=USD";
+
+    i18n_ulocale_layout_type_e layout_type;
+    ret = i18n_ulocale_get_character_orientation(locale_id, &layout_type);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_character_orientation_n(void)
+{
+    ret = i18n_ulocale_get_character_orientation(NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_line_orientation_p(void)
+{
+    const char *locale_id = "en_US@currency=USD";
+
+    i18n_ulocale_layout_type_e layout_type;
+
+    ret = i18n_ulocale_get_line_orientation(locale_id, &layout_type);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_line_orientation_n(void)
+{
+    ret = i18n_ulocale_get_line_orientation(NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_locale_for_lcid_p(void)
+{
+    const char *locale_id = "en_US";
+    char locale[12] = {0,};
+    int32_t locale_capacity = sizeof(locale)/sizeof(locale[0]);
+
+    uint32_t lcid = i18n_ulocale_get_lcid(locale_id);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_ulocale_get_locale_for_lcid(lcid, locale, locale_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_locale_for_lcid_n(void)
+{
+    const char *locale_id = "en_US";
+    char locale[12] = {0,};
+    int32_t locale_capacity = -1;  // invalid parameter
+
+    uint32_t lcid = i18n_ulocale_get_lcid(locale_id);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_ulocale_get_locale_for_lcid(lcid, locale, locale_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_add_likely_subtags_p(void)
+{
+    const char *locale_id = "en_US";
+    char maximized_locale_id[24] = {0,};
+    int32_t maximized_locale_id_capacity = sizeof(maximized_locale_id)/sizeof(maximized_locale_id[0]);
+
+    i18n_ulocale_add_likely_subtags(locale_id, maximized_locale_id, maximized_locale_id_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_add_likely_subtags_n(void)
+{
+    const char *locale_id = "en_US";
+    char maximized_locale_id[24] = {0,};
+    int32_t maximized_locale_id_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_add_likely_subtags(locale_id, maximized_locale_id, maximized_locale_id_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_minimize_subtags_p(void)
+{
+    const char *locale_id = "en_US";
+    char minimized_locale_id[24] = {0,};
+    int32_t minimized_locale_id_capacity = sizeof(minimized_locale_id)/sizeof(minimized_locale_id[0]);
+
+    i18n_ulocale_minimize_subtags(locale_id, minimized_locale_id, minimized_locale_id_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_minimize_subtags_n(void)
+{
+    const char *locale_id = "en_US";
+    char minimized_locale_id[24] = {0,};
+    int32_t minimized_locale_id_capacity = -1;  // invalid parameter
+
+    i18n_ulocale_minimize_subtags(locale_id, minimized_locale_id, minimized_locale_id_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_for_language_tag_p(void)
+{
+    const char *langtag = "en";
+    char locale_id[24] = {0,};
+    int32_t locale_id_capacity = sizeof(locale_id)/sizeof(locale_id[0]);
+    int32_t parsed_length;
+
+    i18n_ulocale_for_language_tag(langtag, locale_id, locale_id_capacity, &parsed_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_for_language_tag_n(void)
+{
+    const char *langtag = "en";
+    char locale_id[24] = {0,};
+    int32_t locale_id_capacity = -1;  // invalid parameter
+    int32_t parsed_length;
+
+    i18n_ulocale_for_language_tag(langtag, locale_id, locale_id_capacity, &parsed_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_to_language_tag_p(void)
+{
+    const char *locale_id = "en_US";
+    char langtag[24] = {0,};
+    int32_t langtag_capacity = sizeof(langtag)/sizeof(langtag[0]);
+    i18n_ubool strict = true;
+
+    i18n_ulocale_to_language_tag(locale_id, langtag, langtag_capacity, strict);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_to_language_tag_n(void)
+{
+    const char *locale_id = "en_US";
+    char langtag[24] = {0,};
+    int32_t langtag_capacity = -1;  // invalid parameter
+    i18n_ubool strict = true;
+
+    i18n_ulocale_to_language_tag(locale_id, langtag, langtag_capacity, strict);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_capi_base_utils_i18n_ulocale_get_default_p(void)
+{
+    int ret = 0;
+    const char *loc = NULL;
+
+    ret = i18n_ulocale_get_default( &loc );
+    assert_eq( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_default_n(void)
+{
+    int ret = 0;
+
+    ret = i18n_ulocale_get_default( NULL );
+    assert_eq( ret, I18N_ERROR_INVALID_PARAMETER );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_set_default_p(void)
+{
+    int ret = 0;
+    char *i18n_id = NULL;
+
+    ret = i18n_ulocale_set_default( i18n_id );
+    assert_eq( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_language_p(void)
+{
+    int ret = 0;
+    const char *loc = NULL;
+    char language[ I18N_LANG_CAPACITY ] = {0, };
+    int buf_size_language = 0;
+
+    ret = i18n_ulocale_get_default( &loc );
+    assert_eq( ret, I18N_ERROR_NONE );
+
+    ret = i18n_ulocale_get_language( loc, language, I18N_LANG_CAPACITY, &buf_size_language );
+    assert_eq( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_language_n(void)
+{
+    int ret = 0;
+
+    ret = i18n_ulocale_get_language( NULL, NULL, -1, NULL);
+    assert_neq( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_country_p(void)
+{
+    int ret = 0;
+    int error = 0;
+    const char *loc = NULL;
+    char country[64] = {0, };
+
+    ret = i18n_ulocale_get_default( &loc );
+    assert_eq( ret, I18N_ERROR_NONE );
+
+    i18n_ulocale_get_country( loc, country, 64, &error);
+    assert_eq( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_country_n(void)
+{
+    int error = 0;
+    char country[64] = {0, };
+
+    i18n_ulocale_get_country( NULL, country, -1, &error);
+    assert_neq( error, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_name_p(void)
+{
+    int ret = 0;
+    char *i18n_id = NULL;
+    char *in_i18n_id = NULL;
+    i18n_uchar result_w[I18N_RESULT_LEN] = { 0, };
+    int max_result_size = I18N_RESULT_LEN;
+    int buf_size_display_name;
+
+    ret = i18n_ulocale_get_display_name( i18n_id, in_i18n_id, result_w, max_result_size, &buf_size_display_name);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_display_name_n(void)
+{
+    int ret = 0;
+    char *i18n_id = NULL;
+    char *in_i18n_id = NULL;
+    i18n_uchar result_w[I18N_RESULT_LEN] = { 0, };
+
+    ret = i18n_ulocale_get_display_name( i18n_id, in_i18n_id, result_w, -1, NULL);
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_available_p(void)
+{
+    const char *result = i18n_ulocale_get_available(0);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(result, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_get_available_n(void)
+{
+    i18n_ulocale_get_available(-1);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ulocale_count_available_p(void)
+{
+    int32_t result = -1;
+    result = i18n_ulocale_count_available();
+    assert_gt( result , -1 );
+
+    return 0;
+}
diff --git a/src/utc/base-utils/utc-capi-base-utils-unormalization.c b/src/utc/base-utils/utc-capi-base-utils-unormalization.c
new file mode 100755 (executable)
index 0000000..1eccd06
--- /dev/null
@@ -0,0 +1,78 @@
+#include "assert.h"
+#include <string.h>
+#include <utils_i18n.h>
+
+#define STR_LEN        64
+
+static const i18n_uchar g_const_ustr[STR_LEN] = { 0, };
+static int g_str_len = -1;
+
+//& set: capi-base-utils-unormalization
+
+void utc_capi_base_utils_unormalization_startup(void)
+{
+}
+
+void utc_capi_base_utils_unormalization_cleanup(void)
+{
+}
+
+int utc_capi_base_utils_i18n_unormalization_normalize_p(void)
+{
+       int ret = I18N_ERROR_NONE;
+    char *package_name = NULL;
+    char *name = "nfkc";
+    i18n_unormalization_mode_e mode = I18N_UNORMALIZATION_DECOMPOSE;
+    i18n_unormalizer_h normalizer2 = NULL;
+    i18n_uchar dest[STR_LEN] = {0, };
+    int capacity = STR_LEN;
+    int len_deststr = 0;
+
+    ret = i18n_unormalization_get_instance( package_name, name, mode, &normalizer2 );
+    assert_eq( ret, I18N_ERROR_NONE );
+       assert_neq( normalizer2, NULL );
+
+    ret = i18n_unormalization_normalize( normalizer2, g_const_ustr, g_str_len, dest, capacity, &len_deststr );
+    assert_eq( ret, I18N_ERROR_NONE );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unormalization_normalize_n(void)
+{
+       int ret = I18N_ERROR_NONE;
+    i18n_uchar dest[4] = {0, };
+    int capacity = 0;
+    int len_deststr = 0;
+
+    ret = i18n_unormalization_normalize( NULL, NULL, -1, dest, capacity, &len_deststr );
+    assert_neq( ret, I18N_ERROR_NONE );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unormalization_get_instance_p(void)
+{
+       int ret = I18N_ERROR_NONE;
+    char *package_name = NULL;
+    char *name = "nfkc";
+    i18n_unormalization_mode_e mode = I18N_UNORMALIZATION_DECOMPOSE;
+    i18n_unormalizer_h normalizer2 = NULL;
+
+    ret = i18n_unormalization_get_instance( package_name, name, mode, &normalizer2 );
+    assert_eq( ret, I18N_ERROR_NONE );
+       assert_neq( normalizer2, NULL );
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unormalization_get_instance_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+    char *package_name = NULL;
+    char *name = 0;
+    i18n_unormalization_mode_e mode = I18N_UNORMALIZATION_DECOMPOSE;
+    i18n_unormalizer_h normalizer2 = NULL;
+
+    ret = i18n_unormalization_get_instance( package_name, name, mode, &normalizer2 );
+    assert_neq( ret, I18N_ERROR_NONE );
+    return 0;
+}
+
diff --git a/src/utc/base-utils/utc-capi-base-utils-unumber.c b/src/utc/base-utils/utc-capi-base-utils-unumber.c
new file mode 100755 (executable)
index 0000000..3140efc
--- /dev/null
@@ -0,0 +1,661 @@
+#include "assert.h"
+#include <string.h>
+#include <utils_i18n.h>
+
+#define STR_LEN 64
+
+static int ret = I18N_ERROR_NONE;
+static i18n_unumber_format_h num_format = NULL;
+
+void utc_capi_base_utils_unumber_startup(void)
+{
+    i18n_uchar *pattern = NULL;
+    int pattern_length = 8;
+    ret = i18n_unumber_create(I18N_UNUMBER_DECIMAL, pattern, pattern_length, "en_US", NULL, &num_format);
+}
+
+void utc_capi_base_utils_unumber_cleanup(void)
+{
+    if(NULL != num_format){
+        i18n_unumber_destroy(num_format);
+    }
+}
+
+int utc_capi_base_utils_i18n_unumber_create_p(void)
+{
+    assert_neq(num_format, NULL);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_create_n(void)
+{
+    int ret = 0;
+    i18n_uchar *pattern = NULL;
+
+    ret = i18n_unumber_create(I18N_UNUMBER_DIGIT_SYMBOL, pattern, -1, NULL, NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_destroy_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    ret = i18n_unumber_destroy(num_format);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    num_format = NULL;
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_destroy_n(void)
+{
+    int ret = 0;
+
+    ret = i18n_unumber_destroy(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_symbol_p(void)
+{
+    int ret = 0;
+    i18n_unumber_format_h num_format;
+    i18n_uchar u_buffer[64];
+    i18n_uchar *pattern = NULL;
+    int buf_len;
+
+    ret = i18n_unumber_create(I18N_UNUMBER_CURRENCY, pattern, -1, "en_US", NULL, &num_format);
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    ret = i18n_unumber_get_symbol(num_format, I18N_UNUMBER_CURRENCY_SYMBOL, u_buffer, 64, &buf_len);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_unumber_destroy(num_format);
+    assert_geq(buf_len, 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_symbol_n(void)
+{
+    int ret = 0;
+    int len_symbol = 0;
+
+    ret = i18n_unumber_get_symbol(NULL, I18N_UNUMBER_DIGIT_SYMBOL, NULL, 12, &len_symbol);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_clone_p(void)
+{
+    i18n_unumber_format_h num_format_clone;
+
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    ret = i18n_unumber_clone(num_format, &num_format_clone);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_unumber_destroy(num_format_clone);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_clone_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+    ret = i18n_unumber_clone(NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_format_p(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_error_code_e status = I18N_ERROR_NONE;
+    i18n_unumber_format(num_format, 1994, result, result_capacity, NULL, &status);
+    assert_eq(status, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_i18n_unumber_format_n(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    i18n_error_code_e status = I18N_ERROR_NONE;
+    i18n_unumber_format(NULL, 1994, result, result_capacity, NULL, &status);
+    assert_eq(status, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_format_int64_p(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_unumber_format_int64(num_format, 1994,  result, result_capacity, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_format_int64_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    i18n_unumber_format_int64(NULL, 1994,  result, result_capacity, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_format_double_p(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_unumber_format_double(num_format, 2014.0, result, result_capacity, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_format_double_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    i18n_unumber_format_double(NULL, 2014.0, result, result_capacity, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_format_decimal_p(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_unumber_format_decimal (num_format, "2014.0", 5,  result, result_capacity, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_format_decimal_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    i18n_unumber_format_decimal(NULL, "2014.0", 5,  result, result_capacity, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_format_double_currency_p(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+    char *currency = "KRW";
+    i18n_uchar *_currency = NULL;
+    _currency = (i18n_uchar*)calloc(strlen(currency) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_currency, currency);
+
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_unumber_format_double_currency (num_format, 2014.0, _currency, result, result_capacity, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_format_double_currency_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    i18n_unumber_format_double_currency (NULL, 2014.0, NULL, result, result_capacity, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_parse_p(void)
+{
+    i18n_uchar *_text = NULL;
+    char *text = "232310";
+    _text = (i18n_uchar*)calloc(strlen(text) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_text, text);
+
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_unumber_parse (num_format, _text, 16, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_parse_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+
+    i18n_unumber_parse (NULL, NULL, 16, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_parse_int64_p(void)
+{
+    i18n_uchar *_text = NULL;
+    char *text = "0982523554243";
+    _text = (i18n_uchar*)calloc(strlen(text) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_text, text);
+
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_unumber_parse_int64 (num_format, _text, 16, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_parse_int64_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+
+    i18n_unumber_parse_int64 (NULL, NULL, 16, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_capi_base_utils_i18n_unumber_parse_double_p(void)
+{
+    i18n_uchar parse_double[]= { 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33,
+                        0x32, 0x31, 0x30, 0x2E, 0x31, 0x32, 0x33, 0 };
+
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_unumber_parse_double (num_format, parse_double, 16,NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_parse_double_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+
+    i18n_unumber_parse_double (NULL, NULL, 16,NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_capi_base_utils_i18n_unumber_parse_decimal_p(void)
+{
+    char result[64] = {0,};
+    int result_capacity = 64;
+    i18n_uchar *_text = NULL;
+    char *text = "12345678.1234";
+    _text = (i18n_uchar*)calloc(strlen(text) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_text, text);
+
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_unumber_parse_decimal (num_format,_text, 16, NULL, result, result_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_parse_decimal_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+    char result[64] = {0,};
+    int result_capacity = 64;
+
+    i18n_unumber_parse_decimal (NULL, NULL, 16, NULL, result, result_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_parse_double_currency_p(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_uchar *pattern = NULL;
+    i18n_uchar currency[64] = {0,};
+    i18n_unumber_format_h num_format;
+    i18n_uchar _text[] = {0x0024,0x0031,0x0032,0x002E,0x0030,0x0030,0};
+
+    ret = i18n_unumber_create(I18N_UNUMBER_CURRENCY, pattern, -1, "en_US", NULL, &num_format);
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_unumber_parse_double_currency (num_format, _text, 16, NULL,  currency);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_unumber_destroy(num_format);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_parse_double_currency_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_uchar currency[64] = {0,};
+
+    i18n_unumber_parse_double_currency (NULL, NULL, 16, NULL,  currency);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_apply_pattern_p(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_unumber_format_h num_format;
+    i18n_uchar pattern1[4] = {'#', ',', '#', '#'};
+    int length1 = 4;
+    i18n_uchar pattern2[8] = {'#', ',', '#', '#', ',', '#', '#', '#'};
+    int length2 = 8;
+
+    ret = i18n_unumber_create(I18N_UNUMBER_DECIMAL, pattern1, length1, "en_US", NULL, &num_format);
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    ret = i18n_unumber_apply_pattern(num_format, true, pattern2, length2, NULL);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_unumber_destroy(num_format);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_apply_pattern_n(void)
+{
+    ret = i18n_unumber_apply_pattern(NULL, true, NULL, -1, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_available_p(void)
+{
+    i18n_unumber_get_available(0);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_available_n(void)
+{
+    i18n_unumber_get_available(-1);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_count_available_p(void)
+{
+    int no_locales = i18n_unumber_count_available();
+    assert_geq(no_locales, 0);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_attribute_p(void)
+{
+    i18n_unumber_get_attribute(num_format, I18N_UNUMBER_PARSE_INT_ONLY);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_attribute_n(void)
+{
+
+    i18n_unumber_get_attribute(NULL, I18N_UNUMBER_PARSE_INT_ONLY);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_set_attribute_p(void)
+{
+    ret = i18n_unumber_set_attribute(num_format, I18N_UNUMBER_PARSE_INT_ONLY, 0);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_set_attribute_n(void)
+{
+    ret = i18n_unumber_set_attribute(NULL, I18N_UNUMBER_PARSE_INT_ONLY, 0);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_double_attribute_p(void)
+{
+    i18n_unumber_get_double_attribute(num_format, I18N_UNUMBER_ROUNDING_INCREMENT);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_double_attribute_n(void)
+{
+    i18n_unumber_get_double_attribute(NULL, I18N_UNUMBER_ROUNDING_INCREMENT);
+
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_capi_base_utils_i18n_unumber_set_double_attribute_p(void)
+{
+    ret = i18n_unumber_set_double_attribute(num_format, I18N_UNUMBER_ROUNDING_INCREMENT, 0.0);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_set_double_attribute_n(void)
+{
+    ret = i18n_unumber_set_double_attribute(NULL, I18N_UNUMBER_ROUNDING_INCREMENT, 0.0);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_text_attribute_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    i18n_unumber_get_text_attribute(num_format, I18N_UNUMBER_CURRENCY_CODE, result, result_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_text_attribute_n(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    i18n_unumber_get_text_attribute(NULL, I18N_UNUMBER_CURRENCY_CODE, result, result_capacity);
+    ret = get_last_result();
+    assert_neq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_set_text_attribute_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_uchar new_value[64] = {0,};
+
+    ret = i18n_unumber_set_text_attribute(num_format, I18N_UNUMBER_CURRENCY_CODE, new_value, 8);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_set_text_attribute_n(void)
+{
+    i18n_uchar new_value[64] = {0,};
+
+    ret = i18n_unumber_set_text_attribute(NULL, I18N_UNUMBER_CURRENCY_CODE, new_value, 8);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_to_pattern_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_uchar result[64] = {0,};
+    int result_length = 64;
+
+    i18n_unumber_to_pattern (num_format, 0, result, result_length);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_to_pattern_n(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    i18n_unumber_to_pattern (NULL, 0, result, result_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_set_symbol_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    ret = i18n_unumber_set_symbol (num_format, I18N_UNUMBER_CURRENCY_SYMBOL, result, result_capacity);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_set_symbol_n(void)
+{
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+
+    ret = i18n_unumber_set_symbol (NULL, I18N_UNUMBER_CURRENCY_SYMBOL, result, result_capacity);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_locale_by_type_p(void)
+{
+    assert_eq(ret, I18N_ERROR_NONE);
+    assert_neq(num_format, NULL);
+
+    i18n_unumber_get_locale_by_type(num_format, I18N_ULOCALE_DATA_LOCALE_TYPE_VALID_LOCALE);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_unumber_destroy(num_format);
+    num_format = NULL;
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_unumber_get_locale_by_type_n(void)
+{
+    i18n_unumber_get_locale_by_type(NULL, I18N_ULOCALE_DATA_LOCALE_TYPE_ACTUAL_LOCALE);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
diff --git a/src/utc/base-utils/utc-capi-base-utils-usearch.c b/src/utc/base-utils/utc-capi-base-utils-usearch.c
new file mode 100755 (executable)
index 0000000..c970244
--- /dev/null
@@ -0,0 +1,146 @@
+#include "assert.h"
+#include <string.h>
+#include <utils_i18n.h>
+
+//& set: capi-base-utils-usearch
+static i18n_usearch_h search;
+static int ret = I18N_ERROR_NONE;
+
+void utc_capi_base_utils_usearch_startup(void)
+{
+    const i18n_uchar pattern[] = {'i', 0x0};
+    int32_t patternlength = -1;
+    const i18n_uchar text[] = {'t', 'i', 'z', 'e', 'n', 0x0};
+    int32_t textlength = -1;
+    const char *locale = "en_US";
+    i18n_ubreak_iterator_h breakiter = NULL;
+
+    ret = i18n_usearch_create_new(pattern, patternlength, text, textlength, locale, breakiter, &search);
+}
+void utc_capi_base_utils_usearch_cleanup(void)
+{
+    i18n_usearch_destroy(search);
+}
+
+int utc_capi_base_utils_i18n_usearch_create_new_p(void)
+{
+    static i18n_usearch_h search_h;
+    const i18n_uchar pattern[] = {'i', 0x0};
+    int32_t pattern_length = -1;
+    const i18n_uchar text[] = {'t', 'i', 'z', 'e', 'n', 0x0};
+    int32_t text_length = -1;
+    const char *locale = "en_US";
+    i18n_ubreak_iterator_s *break_iter = NULL;
+
+    ret = i18n_usearch_create_new(pattern, pattern_length, text, text_length, locale, break_iter, &search_h);
+
+    i18n_usearch_destroy(search_h);
+    assert_eq(ret, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_usearch_create_new_n(void)
+{
+    const i18n_uchar *pattern = NULL;
+    int32_t pattern_length = -10;
+    const i18n_uchar *text = NULL;
+    int32_t text_length = -10;
+    const char *locale = "en_US";
+    i18n_ubreak_iterator_s *break_iter = NULL;
+
+    ret = i18n_usearch_create_new(pattern, pattern_length, text, text_length, locale, break_iter, NULL);
+
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_capi_base_utils_i18n_usearch_destroy_p(void)
+{
+    assert_neq(search, NULL);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    int ret = i18n_usearch_destroy(search);
+    search = NULL;
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_usearch_destroy_n(void)
+{
+    int ret = i18n_usearch_destroy(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_usearch_get_matched_text_p(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_uchar result[64] = {0,};
+    int result_capacity = 64;
+    int len_matched_text;
+
+    ret = i18n_usearch_get_matched_text ( search, result, result_capacity, &len_matched_text );
+    assert_eq ( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_usearch_get_matched_text_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_uchar result[64] = {0,};
+    int result_capacity = -1;
+    int len_matched_text;
+
+    ret = i18n_usearch_get_matched_text ( NULL , result, result_capacity, &len_matched_text );
+    assert_neq ( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_usearch_get_collator_p(void)
+{
+    int ret = I18N_ERROR_NONE;
+    i18n_ucollator_h collator;
+
+    ret = i18n_usearch_get_collator ( search, &collator );
+    assert_eq ( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_usearch_get_collator_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+
+    ret = i18n_usearch_get_collator ( NULL, NULL );
+    assert_neq ( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_usearch_first_p(void)
+{
+    int ret = I18N_ERROR_NONE;
+    int index_first;
+
+    ret = i18n_usearch_first ( search, &index_first );
+    assert_eq ( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_usearch_first_n(void)
+{
+    int ret = I18N_ERROR_NONE;
+
+    ret = i18n_usearch_first ( NULL, NULL );
+    assert_neq ( ret, I18N_ERROR_NONE );
+
+    return 0;
+}
+
diff --git a/src/utc/base-utils/utc-capi-base-utils-uset.c b/src/utc/base-utils/utc-capi-base-utils-uset.c
new file mode 100755 (executable)
index 0000000..d345b01
--- /dev/null
@@ -0,0 +1,1358 @@
+#include "assert.h"
+#include <string.h>
+#include <utils_i18n.h>
+
+//& set: capi-base-utils-uset
+static i18n_uset_h uset = NULL;
+static i18n_error_code_e ret = I18N_ERROR_NONE;
+static i18n_uchar32 start = 0x41;
+static i18n_uchar32 end = 0x50;
+
+void utc_capi_base_utils_uset_startup(void)
+{
+    ret = i18n_uset_create(start, end, &uset);
+}
+
+void utc_capi_base_utils_uset_cleanup(void)
+{
+    i18n_uset_destroy(uset);
+}
+
+int utc_capi_base_utils_i18n_uset_create_empty_p(void)
+{
+    i18n_uset_h uset = NULL;
+
+    ret = i18n_uset_create_empty(&uset);
+    assert_eq(ret, I18N_ERROR_NONE);
+    i18n_uset_destroy(uset);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_create_empty_n(void)
+{
+    ret = i18n_uset_create_empty(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_create_p(void)
+{
+    assert_neq(uset, NULL);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_create_n(void)
+{
+    ret = i18n_uset_create(start, end, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_create_pattern_p(void)
+{
+    char *pattern = "[:Hyphen:]";
+    i18n_uchar *_pattern = NULL;
+    _pattern = (i18n_uchar*) calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_pattern, pattern);
+
+    ret = i18n_uset_create_pattern (_pattern, 10, &uset);
+    free(_pattern);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_create_pattern_n(void)
+{
+    char *pattern = "[:Hyphen:]";
+    i18n_uchar *_pattern = NULL;
+    _pattern = (i18n_uchar*) calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_pattern, pattern);
+
+    ret = i18n_uset_create_pattern(_pattern, -10, NULL);
+    free(_pattern);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_create_pattern_options_p(void)
+{
+    char *pattern = "[:Hyphen:]";
+    i18n_uchar *_pattern = NULL;
+    _pattern = (i18n_uchar*) calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_pattern, pattern);
+
+    ret = i18n_uset_create_pattern_options(_pattern, 10, I18N_USET_IGNORE_SPACE, &uset);
+    free(_pattern);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_create_pattern_options_n(void)
+{
+    char *pattern = "[:Hyphen:]";
+    i18n_uchar *_pattern = NULL;
+    _pattern = (i18n_uchar*)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(_pattern, pattern);
+
+    ret = i18n_uset_create_pattern_options(_pattern, -10, I18N_USET_IGNORE_SPACE, NULL);
+    free(_pattern);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_destroy_p(void)
+{
+    ret = i18n_uset_destroy(uset);
+    assert_eq(ret, I18N_ERROR_NONE);
+    uset = NULL;
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_destroy_n(void)
+{
+    ret = i18n_uset_destroy(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_clone_p(void)
+{
+    assert_neq(uset, NULL);
+    i18n_uset_h uset_c = NULL;
+
+    ret = i18n_uset_clone(uset, &uset_c);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_destroy(uset_c);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_clone_n(void)
+{
+    ret = i18n_uset_clone(NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_is_frozen_p(void)
+{
+    assert_neq(uset, NULL);
+    i18n_uset_is_frozen(uset);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_is_frozen_n(void)
+{
+    i18n_uset_is_frozen(NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_freeze_p(void)
+{
+    assert_neq(uset, NULL);
+    ret = i18n_uset_freeze(uset);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_freeze_n(void)
+{
+    ret = i18n_uset_freeze(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_clone_as_thawed_p(void)
+{
+    assert_neq(uset, NULL);
+    i18n_uset_h uset_c = NULL;
+
+    ret = i18n_uset_clone_as_thawed(uset, &uset_c);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_destroy(uset_c);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_clone_as_thawed_n(void)
+{
+    ret = i18n_uset_clone_as_thawed(NULL, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_set_p(void)
+{
+    assert_neq(uset, NULL);
+
+    ret = i18n_uset_set(uset, start, end);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_set_n(void)
+{
+    ret = i18n_uset_set(NULL, start, end);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_apply_pattern_p(void)
+{
+    assert_neq(uset, NULL);
+    const char *pattern = "[:Hyphen:]";
+    i18n_uchar *upattern = NULL;
+
+    upattern = (i18n_uchar*) calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(upattern, pattern);
+
+    i18n_uset_apply_pattern(uset, upattern, -1, 1);
+    ret = get_last_result();
+    free(upattern);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_apply_pattern_n(void)
+{
+    const char *pattern = "[:Hyphen:]";
+    i18n_uchar *upattern = NULL;
+
+    upattern = (i18n_uchar*) calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(upattern, pattern);
+
+    i18n_uset_apply_pattern(NULL, upattern, -1, I18N_USET_IGNORE_SPACE);
+    ret = get_last_result();
+    free(upattern);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_apply_int_property_value_p(void)
+{
+    i18n_uchar_uproperty_e prop = I18N_UCHAR_NUMERIC_TYPE;
+    int32_t value = 10;
+
+    ret = i18n_uset_apply_int_property_value(uset, prop, value);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return ret;
+}
+
+int utc_capi_base_utils_i18n_uset_apply_int_property_value_n(void)
+{
+    i18n_uchar_uproperty_e prop = I18N_UCHAR_ALPHABETIC;
+    int32_t value = (int32_t) false;
+
+    ret = i18n_uset_apply_int_property_value(NULL, prop, value);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_apply_property_alias_p(void)
+{
+    const i18n_uchar prop[] = {0x6C, 0x62, 0x0}; /* "lb" */
+    int32_t prop_length = 3;
+    const i18n_uchar value[] = {0x53, 0x50, 0x0}; /* "SP" */
+    int32_t value_length = 3;
+
+    ret = i18n_uset_apply_property_alias(uset, prop, prop_length, value, value_length);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_apply_property_alias_n(void)
+{
+    const i18n_uchar prop[] = {0x6C, 0x62, 0x0}; /* "lb" */
+    int32_t prop_length = -1;
+    const i18n_uchar value[] = {0x53, 0x50, 0x0}; /* "SP" */
+    int32_t value_length = -1;
+
+    ret = i18n_uset_apply_property_alias(NULL, prop, prop_length, value, value_length);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_resembles_pattern_p(void)
+{
+    char *pattern = "[:NewPattern:]";
+    i18n_uchar *upattern = NULL;
+    int32_t upattern_length = -1;
+    int32_t pos = 0;
+
+    upattern = (i18n_uchar*) calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
+    i18n_ustring_copy_ua(upattern, pattern);
+    i18n_uset_resembles_pattern(upattern, upattern_length, pos);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_resembles_pattern_n(void)
+{
+    int32_t upattern_length = -1;
+    int32_t pos = 0;
+
+    i18n_uset_resembles_pattern(NULL, upattern_length, pos);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_to_pattern_p(void)
+{
+    i18n_uchar res[12] = {0,};
+    int32_t res_capacity = sizeof(res)/sizeof(res[0]);
+    i18n_ubool escape_unprintable = true;
+
+    i18n_uset_to_pattern(uset, res, res_capacity, escape_unprintable);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_to_pattern_n(void)
+{
+    i18n_uset_to_pattern(NULL, NULL, 0, 1);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_add_p(void)
+{
+    i18n_uchar32 c = 0x61;
+
+    ret = i18n_uset_add(uset, c);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_add_n(void)
+{
+    i18n_uchar32 c = 0x61;
+
+    ret = i18n_uset_add(NULL, c);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_add_all_p(void)
+{
+    i18n_uset_h uset_add = NULL;
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_create(start, end, &uset_add);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_uset_add_all(uset, uset_add);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_destroy(uset_add);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_add_all_n(void)
+{
+    i18n_uset_h uset_add = NULL;
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_create(start, end, &uset_add);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_uset_add_all(NULL, uset_add);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    i18n_uset_destroy(uset_add);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_add_range_p(void)
+{
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_add_range(uset, start, end);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_add_range_n(void)
+{
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_add_range(NULL, start, end);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_add_string_p(void)
+{
+    const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+    int32_t str_len = -1;
+
+    ret = i18n_uset_add_string(uset, str, str_len);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_add_string_n(void)
+{
+    const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+    int32_t str_len = -1;
+
+    ret = i18n_uset_add_string(NULL, str, str_len);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_add_all_code_points_p(void)
+{
+    const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+    int32_t str_len = -1;
+
+    ret = i18n_uset_add_all_code_points(uset, str, str_len);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_add_all_code_points_n(void)
+{
+    const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+    int32_t str_len = -1;
+
+    ret = i18n_uset_add_all_code_points(NULL, str, str_len);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_remove_p(void)
+{
+    i18n_uchar32 c = 0x51;
+
+    ret = i18n_uset_remove(uset, c);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_remove_n(void)
+{
+    i18n_uchar32 c = 0x51;
+
+    ret = i18n_uset_remove(NULL, c);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_remove_range_p(void)
+{
+    i18n_uchar32 start = 0x41;
+    i18n_uchar32 end = 0x45;
+
+    ret = i18n_uset_remove_range(uset, start, end);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_remove_range_n(void)
+{
+    i18n_uchar32 start = 0x41;
+    i18n_uchar32 end = 0x45;
+
+    ret = i18n_uset_remove_range(NULL, start, end);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_remove_string_p(void)
+{
+    const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+    int32_t str_len = -1;
+
+    ret = i18n_uset_add_string(uset, str, str_len);
+    assert_eq(ret, I18N_ERROR_NONE);
+    ret = i18n_uset_remove_string(uset, str, str_len);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_remove_string_n(void)
+{
+    const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+    int32_t str_len = -1;
+
+    ret = i18n_uset_remove_string(NULL, str, str_len);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_remove_all_p(void)
+{
+    i18n_uset_h uset_rv = NULL;
+    i18n_uchar32 start = 0x45;
+    i18n_uchar32 end = 0x50;
+
+    ret = i18n_uset_create(start, end, &uset_rv);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_uset_remove_all(uset, uset_rv);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_destroy(uset_rv);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_remove_all_n(void)
+{
+    i18n_uset_h uset_rv = NULL;
+    i18n_uchar32 start = 0x45;
+    i18n_uchar32 end = 0x50;
+
+    ret = i18n_uset_create(start, end, &uset_rv);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_uset_remove_all(NULL, uset_rv);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    i18n_uset_destroy(uset_rv);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_retain_p(void)
+{
+    i18n_uchar32 start = 0x41;
+    i18n_uchar32 end = 0x42;
+
+    ret = i18n_uset_retain(uset, start, end);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_retain_n(void)
+{
+    i18n_uchar32 start = 0x41;
+    i18n_uchar32 end = 0x42;
+
+    ret = i18n_uset_retain(NULL, start, end);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_retain_all_p(void)
+{
+    i18n_uset_h uset_ret = NULL;
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_create(start, end, &uset_ret);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_uset_retain_all(uset, uset_ret);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_destroy(uset_ret);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_retain_all_n(void)
+{
+    i18n_uset_h uset_ret = NULL;
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_create(start, end, &uset_ret);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_uset_retain_all(NULL, uset_ret);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    i18n_uset_destroy(uset_ret);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_compact_p(void)
+{
+    ret = i18n_uset_compact(uset);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_compact_n(void)
+{
+    ret = i18n_uset_compact(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_complement_p(void)
+{
+    ret = i18n_uset_complement(uset);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_complement_n(void)
+{
+    ret = i18n_uset_complement(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_complement_all_p(void)
+{
+    i18n_uset_h uset_com = NULL;
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_create(start, end, &uset_com);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_uset_complement_all(uset, uset_com);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_destroy(uset_com);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_complement_all_n(void)
+{
+    i18n_uset_h uset_com = NULL;
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_create(start, end, &uset_com);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    ret = i18n_uset_complement_all(NULL, uset_com);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    i18n_uset_destroy(uset_com);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_clear_p(void)
+{
+    ret = i18n_uset_clear(uset);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_clear_n(void)
+{
+    ret = i18n_uset_clear(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_destroy_over_p(void)
+{
+    int32_t attributes = 0;
+
+    ret = i18n_uset_destroy_over(uset, attributes);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_destroy_over_n(void)
+{
+    int32_t attributes = 0;
+
+    ret = i18n_uset_destroy_over(NULL, attributes);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_remove_all_strings_p(void)
+{
+    ret = i18n_uset_remove_all_strings(uset);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_remove_all_strings_n(void)
+{
+    ret = i18n_uset_remove_all_strings(NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_is_empty_p(void)
+{
+    i18n_uset_is_empty(uset);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_is_empty_n(void)
+{
+    i18n_uset_is_empty(NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_p(void)
+{
+    i18n_uchar32 c = 1;
+
+    i18n_uset_contains(uset, c);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_n(void)
+{
+    i18n_uchar32 c = 1;
+
+    i18n_uset_contains(NULL, c);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_range_p(void)
+{
+    i18n_uchar32 start = 0x41;
+    i18n_uchar32 end = 0x51;
+
+    i18n_uset_contains_range(uset, start, end);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_range_n(void)
+{
+    i18n_uchar32 start = 0x41;
+    i18n_uchar32 end = 0x51;
+
+    i18n_uset_contains_range(NULL, start, end);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_string_p(void)
+{
+    const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+    int32_t str_len = -1;
+
+    ret = i18n_uset_add_string(uset, str, str_len);
+    assert_eq(ret, I18N_ERROR_NONE);
+    i18n_uset_contains_string(uset, str, str_len);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_string_n(void)
+{
+    const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+    int32_t str_len = -1;
+
+    i18n_uset_contains_string(NULL, str, str_len);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_index_of_p(void)
+{
+    i18n_uchar32 c = 0x41;
+
+    i18n_uset_index_of(uset, c);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_index_of_n(void)
+{
+    i18n_uchar32 c = 0x41;
+
+    i18n_uset_index_of(NULL, c);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_char_at_p(void)
+{
+    int32_t char_index = 0;
+
+    i18n_uset_char_at(uset, char_index);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_char_at_n(void)
+{
+    int32_t char_index = 0;
+
+    i18n_uset_char_at(NULL, char_index);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_size_p(void)
+{
+    i18n_uset_size(uset);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_size_n(void)
+{
+    i18n_uset_size(NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_get_item_count_p(void)
+{
+    i18n_uset_get_item_count(uset);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_get_item_count_n(void)
+{
+    i18n_uset_get_item_count(NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_get_item_p(void)
+{
+    i18n_uchar32 start = 0;
+    i18n_uchar32 end = 0;
+    i18n_uchar str[12] = {0,};
+    int32_t str_capacity = sizeof(str)/sizeof(str[0]);
+
+    i18n_uset_get_item (uset, 0, &start, &end, str, str_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_get_item_n(void)
+{
+    i18n_uchar32 start = 0;
+    i18n_uchar32 end = 0;
+    i18n_uchar str[12] = {0,};
+    int32_t str_capacity = sizeof(str)/sizeof(str[0]);
+
+    i18n_uset_get_item (NULL, 0, &start, &end, str, str_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_all_p(void)
+{
+    i18n_uset_h uset2 = NULL;
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_create(start, end, &uset2);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_contains_all(uset, uset2);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_destroy(uset2);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_all_n(void)
+{
+    i18n_uset_contains_all(uset, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_all_code_points_p(void)
+{
+    const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+    int32_t str_len = -1;
+
+    i18n_uset_contains_all_code_points(uset, str, str_len);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_all_code_points_n(void)
+{
+    const i18n_uchar str[] = {'m', 'a', 'r', 'k', '\0'};
+    int32_t str_len = -1;
+
+    i18n_uset_contains_all_code_points(NULL, str, str_len);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_none_p(void)
+{
+    i18n_uset_h uset2 = NULL;
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_create(start, end, &uset2);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_contains_none(uset, uset2);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_destroy(uset2);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_none_n(void)
+{
+    i18n_uset_contains_none(uset, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_some_p(void)
+{
+    i18n_uset_h uset2 = NULL;
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_create(start, end, &uset2);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_contains_some(uset, uset2);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_destroy(uset2);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_contains_some_n(void)
+{
+    i18n_uset_contains_some(uset, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_span_p(void)
+{
+    const i18n_uchar s[] = {'q', 'w', 'e', 'r', '\0'};
+    int32_t length = -1;
+    i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
+
+    i18n_uset_span(uset, s, length, span_condition);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_span_n(void)
+{
+    const i18n_uchar s[] = {'q', 'w', 'e', 'r', '\0'};
+    int32_t length = -1;
+    i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
+
+    i18n_uset_span(NULL, s, length, span_condition);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_span_back_p(void)
+{
+    const i18n_uchar s[] = {'q', 'w', 'e', 'r', '\0'};
+    int32_t length = -1;
+    i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
+
+    i18n_uset_span_back(uset, s, length, span_condition);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_span_back_n(void)
+{
+    const i18n_uchar s[] = {'q', 'w', 'e', 'r', '\0'};
+    int32_t length = -1;
+    i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
+
+    i18n_uset_span_back(NULL, s, length, span_condition);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_span_utf8_p(void)
+{
+    const char *s = "qwer";
+    int32_t length = -1;
+    i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
+
+    i18n_uset_span_utf8 (uset, s, length, span_condition);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_span_utf8_n(void)
+{
+    const char *s = "qwer";
+    int32_t length = -1;
+    i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
+
+    i18n_uset_span_utf8 (NULL, s, length, span_condition);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_span_back_utf8_p(void)
+{
+    const char *s = "qwer";
+    int32_t length = -1;
+    i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
+
+    i18n_uset_span_back_utf8 (uset, s, length, span_condition);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_span_back_utf8_n(void)
+{
+    const char *s = "qwer";
+    int32_t length = -1;
+    i18n_uset_span_condition_e span_condition = I18N_USET_SPAN_NOT_CONTAINED;
+
+    i18n_uset_span_back_utf8 (NULL, s, length, span_condition);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_equals_p(void)
+{
+    i18n_uset_h uset2 = NULL;
+    i18n_uchar32 start = 0x51;
+    i18n_uchar32 end = 0x60;
+
+    ret = i18n_uset_create(start, end, &uset2);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_equals(uset, uset2);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_destroy(uset2);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_equals_n(void)
+{
+    i18n_uset_equals(uset, NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_serialize_p(void)
+{
+    uint16_t dest[48] = {0, 1, 2, 0};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_uset_serialize(uset, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_serialize_n(void)
+{
+    uint16_t dest[48] = {0, 1, 2, 0};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_uset_serialize(NULL, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_get_serialized_set_p(void)
+{
+    uint16_t dest[48] = {0, 1, 2, 0};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_uset_serialize(uset, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_userialized_set_s fill_set;
+
+    i18n_uset_get_serialized_set(dest, dest_capacity, &fill_set);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_get_serialized_set_n(void)
+{
+    int32_t dest_capacity = 5;
+    i18n_userialized_set_s fill_set;
+
+    i18n_uset_get_serialized_set(NULL, dest_capacity, &fill_set);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_set_serialized_to_one_p(void)
+{
+    i18n_uchar32 c = 0x41;
+    i18n_userialized_set_s fill_set;
+
+    ret =  i18n_uset_set_serialized_to_one(c, &fill_set);
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_set_serialized_to_one_n(void)
+{
+    i18n_uchar32 c = 0x41;
+
+    ret =  i18n_uset_set_serialized_to_one(c, NULL);
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_serialized_contains_p(void)
+{
+    uint16_t dest[48] = {0, 1, 2, 0};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_uset_serialize(uset, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_userialized_set_s fill_set;
+
+    i18n_uset_get_serialized_set(dest, dest_capacity, &fill_set);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uchar32 c = 0x41;
+
+    i18n_uset_serialized_contains(&fill_set, c);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_serialized_contains_n(void)
+{
+    i18n_uchar32 c = 0x41;
+
+    i18n_uset_serialized_contains(NULL, c);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_get_serialized_range_count_p(void)
+{
+    uint16_t dest[48] = {0, 1, 2, 0};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_uset_serialize(uset, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_userialized_set_s fill_set;
+
+    i18n_uset_get_serialized_set(dest, dest_capacity, &fill_set);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_uset_get_serialized_range_count (&fill_set);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_get_serialized_range_count_n(void)
+{
+    i18n_uset_get_serialized_range_count (NULL);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_get_serialized_range_p(void)
+{
+    uint16_t dest[48] = {0, 1, 2, 0};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+
+    i18n_uset_serialize(uset, dest, dest_capacity);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    i18n_userialized_set_s fill_set;
+
+    i18n_uset_get_serialized_set(dest, dest_capacity, &fill_set);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    int32_t range_index = 0;
+    i18n_uchar32 p_start = 0;
+    i18n_uchar32 p_end = 0;
+
+    i18n_uset_get_serialized_range(&fill_set, range_index, &p_start, &p_end);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_uset_get_serialized_range_n(void)
+{
+    int32_t range_index = 0;
+    i18n_uchar32 p_start = 0;
+    i18n_uchar32 p_end = 0;
+
+    i18n_uset_get_serialized_range(NULL, range_index, &p_start, &p_end);
+    ret = get_last_result();
+    assert_eq(ret, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
diff --git a/src/utc/base-utils/utc-capi-base-utils-ustring.c b/src/utc/base-utils/utc-capi-base-utils-ustring.c
new file mode 100755 (executable)
index 0000000..d686cbd
--- /dev/null
@@ -0,0 +1,1762 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <utils_i18n.h>
+#include <string.h>
+
+#define STR_LEN 64
+
+//& set: capi-base-utils-string
+
+static i18n_uchar g_ustr[STR_LEN] = { 0, };
+static const i18n_uchar g_const_ustr[STR_LEN] = { 0, };
+static i18n_uchar g_target[STR_LEN] = { 0, };
+static int g_str_len = -1;
+static char *g_astr = "Test String";
+
+static i18n_uchar g_pattern_target[STR_LEN];
+static i18n_uchar g_pattern[16];
+
+void utc_capi_base_utils_string_startup(void)
+{
+       char *tgtstr = "The quick brown fox jumped over the lazy fox";
+       char *patstr = "fox";
+       i18n_ustring_copy_ua(g_pattern_target, tgtstr);
+       i18n_ustring_copy_ua(g_pattern, patstr);
+
+       i18n_ustring_copy_ua_n( g_ustr, g_astr, strlen(g_astr) );
+       i18n_ustring_copy_ua_n( g_target, g_astr, strlen(g_astr) );
+       g_str_len = i18n_ustring_get_length(g_ustr);
+}
+
+void utc_capi_base_utils_string_cleanup(void)
+{
+}
+
+int utc_capi_base_utils_i18n_ustring_get_length_p(void)
+{
+    const i18n_uchar ustring[] = {'T', 'I', 'Z', 'E', 'N', '\0'};
+
+    int32_t length = i18n_ustring_get_length(ustring);
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+    assert_eq(length, 5);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_get_length_n(void)
+{
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_get_length(NULL);
+    err_code = get_last_result();
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_count_char32_p(void)
+{
+    int32_t len = 16;
+    int32_t num_of_code_points;
+
+    num_of_code_points = i18n_ustring_count_char32 ( g_ustr, len );
+    assert_eq ( num_of_code_points, 16 );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_count_char32_n(void)
+{
+    int32_t len = 16;
+
+    i18n_ustring_count_char32 ( NULL, len );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_has_more_char32_than_p(void)
+{
+    int32_t len = -1;
+    int32_t number = 100;
+    i18n_ubool result = false;
+
+    result = i18n_ustring_has_more_char32_than ( g_const_ustr, len, number);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+    assert_eq ( result, false );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_has_more_char32_than_n(void)
+{
+    int32_t len = -1;
+    int32_t number = 100;
+
+    i18n_ustring_has_more_char32_than ( NULL, len, number);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_cat_p(void)
+{
+    char *string = "tizen";
+    i18n_uchar src[64] = {0, };
+    i18n_uchar dest[64] = {0, };
+    int32_t result = 0;
+
+    // copy string to src
+    i18n_ustring_copy_ua_n(src, string, strlen(string));
+
+    // cat src to dest
+    i18n_ustring_cat(dest, (const i18n_uchar *)src);
+
+    // compare dest with src
+    result = i18n_ustring_compare((const i18n_uchar *)src, (const i18n_uchar *)dest);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    assert_eq(result, 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_cat_n(void)
+{
+    i18n_ustring_cat(NULL, NULL);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_cat_n_p(void)
+{
+    char *string = "tizen";
+    i18n_uchar src[64] = {0, };
+    i18n_uchar dest[64] = {0, };
+    int32_t result = 0;
+
+    // copy string to src
+    i18n_ustring_copy_ua_n(src, string, strlen(string));
+
+    // cat src to dest
+    i18n_ustring_cat_n(dest, (const i18n_uchar *)src, sizeof(dest)/sizeof(dest[0]));
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+
+    // compare dest with src
+    result = i18n_ustring_compare((const i18n_uchar *)src, (const i18n_uchar *)dest);
+
+    assert_eq(result, 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_cat_n_n(void)
+{
+    i18n_ustring_cat_n(NULL, NULL, 0);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_string_p(void)
+{
+    const i18n_uchar str[64] = {0, };
+    const i18n_uchar sub_str[64] = {0, };
+    i18n_uchar *ptr = NULL;
+
+    ptr = i18n_ustring_string ( str, sub_str );
+    assert_eq ( ptr, str);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_string_n(void)
+{
+    const i18n_uchar sub_str[64] = {0, };
+
+    i18n_ustring_string ( NULL, sub_str );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_find_first_p(void)
+{
+    char *string = "tizen";
+    i18n_uchar ustring[64] = {0, };
+    char *sub_string = "a";
+    i18n_uchar sub_ustring[64] = {0, };
+    i18n_uchar *result = NULL;
+
+    // copy string to src
+    i18n_ustring_copy_ua_n(ustring, string, strlen(string));
+    i18n_ustring_copy_ua_n(sub_ustring, sub_string, strlen(sub_string));
+
+    // find first occurrence
+    result = i18n_ustring_find_first(ustring,
+                            i18n_ustring_get_length((const i18n_uchar *)ustring),
+                            sub_ustring,
+                            i18n_ustring_get_length((const i18n_uchar *)sub_ustring)
+                            );
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    assert_eq(result, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_find_first_n(void)
+{
+    i18n_uchar sub_ustring[64] = {0, };
+    i18n_uchar *result = NULL;
+
+    result = i18n_ustring_find_first(NULL, 0, sub_ustring,
+                            i18n_ustring_get_length((const i18n_uchar *)sub_ustring)
+                            );
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+    assert_eq(result, NULL);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_char_p(void)
+{
+    const i18n_uchar string[4] = {0x0041, 0x0042, 0x0043, 0x0000}; // A, B, C, NUL
+    i18n_uchar code_point = 0x0044; // D
+    i18n_uchar *result = NULL;
+
+    result = i18n_ustring_char(string, code_point);
+    assert_eq(result, NULL);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_char_n(void)
+{
+    i18n_uchar code_point = 0x0044; // D
+
+    i18n_ustring_char(NULL, code_point);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_char32_p(void)
+{
+    const i18n_uchar string[4] = {0x0041, 0x0042, 0x0043, 0x0000}; // A, B, C, NUL
+    i18n_uchar32 code_point = 0x00000044; // D
+    i18n_uchar *result = NULL;
+
+    result = i18n_ustring_char32(string, code_point);
+    assert_eq(result, NULL);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_char32_n(void)
+{
+    i18n_uchar32 code_point = 0x00000044; // D
+
+    i18n_ustring_char32(NULL, code_point);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_r_string_p(void)
+{
+    const i18n_uchar str[64] = {0, };
+    const i18n_uchar sub_str[64] = {0, };
+    i18n_uchar *ptr = NULL;
+
+    ptr = i18n_ustring_r_string ( str, sub_str );
+    assert_eq ( ptr, str );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_r_string_n(void)
+{
+    const i18n_uchar sub_str[64] = {0, };
+    i18n_uchar *ptr = NULL;
+
+    ptr = i18n_ustring_r_string ( NULL, sub_str );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+    assert_eq ( ptr, NULL );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_find_last_p(void)
+{
+    const i18n_uchar str[64] = {0, };
+    const i18n_uchar sub_str[64] = {0, };
+    i18n_uchar *ptr = NULL;
+
+    ptr = i18n_ustring_find_last ( str, -1, sub_str, -1 );
+    assert_eq ( ptr, str );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_find_last_n(void)
+{
+    const i18n_uchar str[64] = {0, };
+    const i18n_uchar sub_str[64] = {0, };
+    i18n_uchar *ptr = NULL;
+
+    ptr = i18n_ustring_find_last ( str, -2, sub_str, -1 );
+    assert_eq ( ptr, NULL );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_r_char_p(void)
+{
+    const i18n_uchar string[4] = {0x0041, 0x0042, 0x0043, 0x0000}; // A, B, C, NULL
+    i18n_uchar code_point = 0x0042; // B
+
+    i18n_uchar *last = i18n_ustring_r_char(string, code_point);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+    assert_eq(last, string+1);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_r_char_n(void)
+{
+    i18n_uchar code_point = 0x0044; // D
+
+    i18n_ustring_r_char(NULL, code_point);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_r_char32_p(void)
+{
+    const i18n_uchar string[4] = {0x0041, 0x0042, 0x0043, 0x0000}; // A, B, C, NUL
+    i18n_uchar32 code_point = 0x00000044; // D
+    i18n_uchar *result = NULL;
+
+    result = i18n_ustring_r_char32(string, code_point);
+    assert_eq(result, NULL);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_r_char32_n(void)
+{
+    i18n_uchar32 code_point = 0x00000044; // D
+
+    i18n_ustring_r_char32(NULL, code_point);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_pbrk_p(void)
+{
+    char *string = "a,b,c";
+    i18n_uchar ustring[64] = {0, };
+    char *match_set = ",";
+    i18n_uchar umatch_set[64] = {0, };
+    i18n_uchar *result = NULL;
+
+    // copy string to src
+    i18n_ustring_copy_ua_n(ustring, string, strlen(string));
+    i18n_ustring_copy_ua_n(umatch_set, match_set, strlen(match_set));
+
+    result = i18n_ustring_pbrk((const i18n_uchar *)ustring, (const i18n_uchar *)umatch_set); // return the address of umatch_set[3]
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    assert_eq(result,
+              i18n_ustring_find_first(ustring,
+                                      i18n_ustring_get_length(ustring),
+                                      umatch_set,
+                                      i18n_ustring_get_length(umatch_set)
+                                      )
+             );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_pbrk_n(void)
+{
+    i18n_ustring_pbrk(NULL, NULL);
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_cspn_p(void)
+{
+    const i18n_uchar str[64] = {0, };
+    const i18n_uchar match_set[64] = {0, };
+    int32_t num;
+
+    num = i18n_ustring_cspn ( str, match_set );
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+    assert_eq ( num, 0 );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_cspn_n(void)
+{
+    const i18n_uchar match_set[64] = {0, };
+
+    i18n_ustring_cspn ( NULL, match_set );
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_spn_p(void)
+{
+    const i18n_uchar str[64] = {0, };
+    const i18n_uchar match_set[64] = {0, };
+    int32_t num;
+
+    num = i18n_ustring_spn ( str, match_set );
+    assert_eq ( num, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_spn_n(void)
+{
+    const i18n_uchar match_set[64] = {0, };
+
+    i18n_ustring_spn ( NULL, match_set );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_tokenizer_r_p(void)
+{
+    i18n_uchar string[6] = {0x0041, 0x002C, 0x0043, 0x002C, 0x0045, 0x0000}; // A, B, C NUL
+    const i18n_uchar delimeiter[2] = {0x002C, 0x0000}; // , NUL
+    i18n_uchar *save_state = NULL;
+    i18n_uchar *result = NULL;
+
+    result = i18n_ustring_tokenizer_r(string, delimeiter, &save_state);
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    assert_eq(result, string);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_tokenizer_r_n(void)
+{
+    i18n_ustring_tokenizer_r(NULL, NULL, NULL);
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_compare_p(void)
+{
+    int result;
+
+    result = i18n_ustring_compare ( g_ustr, g_target );
+       assert_eq ( result, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_compare_n(void)
+{
+    i18n_ustring_compare ( NULL, g_target );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_compare_code_point_order_p(void)
+{
+    i18n_uchar str1[64] = {0, };
+    i18n_uchar str2[64] = {0, };
+    int result;
+
+    result = i18n_ustring_compare_code_point_order ( str1, str2 );
+       assert_eq ( result, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_compare_code_point_order_n(void)
+{
+    i18n_uchar str2[64] = {0, };
+
+    i18n_ustring_compare_code_point_order ( NULL, str2 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_compare_binary_order_p(void)
+{
+    const i18n_uchar str1[64] = {0, };
+    const i18n_uchar str2[64] = {0, };
+    i18n_ubool code_pointer_order = false;
+    int result;
+
+    result = i18n_ustring_compare_binary_order( str1, -1, str2, -1, code_pointer_order );
+       assert_eq ( result, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_compare_binary_order_n(void)
+{
+    const i18n_uchar str2[64] = {0, };
+    i18n_ubool code_pointer_order = false;
+
+    i18n_ustring_compare_binary_order( NULL, -1, str2, -1, code_pointer_order );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_case_compare_with_length_p(void)
+{
+    const i18n_uchar str1[64] = {0, };
+    const i18n_uchar str2[64] = {0, };
+    int result;
+
+    result = i18n_ustring_compare_binary_order( str1, -1, str2, -1, I18N_U_FOLD_CASE_DEFAULT );
+       assert_eq ( result, 0 );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_case_compare_with_length_n(void)
+{
+    const i18n_uchar str1[64] = {0, };
+    i18n_error_code_e err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_compare_binary_order( str1, -1, NULL, -1, I18N_U_FOLD_CASE_DEFAULT );
+    err_code = get_last_result();
+    assert_neq(err_code, I18N_ERROR_NONE);
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_compare_n_p(void)
+{
+    const i18n_uchar str1[64] = {0, };
+    const i18n_uchar str2[64] = {0, };
+    int n = 32;
+    int result;
+
+    result = i18n_ustring_compare_n( str1, str2, n );
+       assert_eq ( result, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_compare_n_n(void)
+{
+    const i18n_uchar str2[64] = {0, };
+    int n = 32;
+
+    i18n_ustring_compare_n( NULL, str2, n );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_compare_n_code_point_order_p(void)
+{
+    const i18n_uchar str1[64] = {0, };
+    const i18n_uchar str2[64] = {0, };
+    int n = 32;
+    int result;
+
+    result = i18n_ustring_compare_n_code_point_order( str1, str2, n );
+       assert_eq ( result, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_compare_n_code_point_order_n(void)
+{
+    const i18n_uchar str2[64] = {0, };
+    int n = 32;
+
+    i18n_ustring_compare_n_code_point_order( NULL, str2, n );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_case_compare_p(void)
+{
+    const i18n_uchar str1[64] = {0, };
+    const i18n_uchar str2[64] = {0, };
+    uint32_t option = I18N_U_FOLD_CASE_DEFAULT;
+    int result;
+
+    result = i18n_ustring_case_compare( str1, str2, option );
+       assert_eq ( result, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_case_compare_n(void)
+{
+    const i18n_uchar str2[64] = {0, };
+    uint32_t option = I18N_U_FOLD_CASE_DEFAULT;
+
+    i18n_ustring_case_compare( NULL, str2, option );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_case_compare_n_p(void)
+{
+    const i18n_uchar str1[64] = {0, };
+    const i18n_uchar str2[64] = {0, };
+    int n = 32;
+    uint32_t option = I18N_U_FOLD_CASE_DEFAULT;
+    int result;
+
+    result = i18n_ustring_case_compare_n( str1, str2, n, option );
+       assert_eq ( result, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_case_compare_n_n(void)
+{
+    const i18n_uchar str2[64] = {0, };
+    int n = 32;
+    uint32_t option = I18N_U_FOLD_CASE_DEFAULT;
+
+    i18n_ustring_case_compare_n( NULL, str2, n, option );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_case_compare_p(void)
+{
+    const i18n_uchar str1[64] = {0, };
+    const i18n_uchar str2[64] = {0, };
+    int n = 32;
+    uint32_t option = I18N_U_FOLD_CASE_DEFAULT;
+    int result;
+
+    result = i18n_ustring_mem_case_compare ( str1, str2, n, option );
+       assert_eq ( result, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_case_compare_n(void)
+{
+    const i18n_uchar str2[64] = {0, };
+    int n = 32;
+    uint32_t option = I18N_U_FOLD_CASE_DEFAULT;
+
+    i18n_ustring_mem_case_compare ( NULL, str2, n, option );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_copy_au_p(void)
+{
+    char dest[STR_LEN] = { 0, };
+    char *ptr = NULL;
+
+    ptr = i18n_ustring_copy_au(dest, g_ustr);
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    assert_eq(ptr, dest);
+    assert_eq(strcmp(dest, g_astr), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_copy_au_n(void)
+{
+    i18n_ustring_copy_au ( NULL, g_ustr );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_copy_au_n_p(void)
+{
+    char dest[STR_LEN] = { 0, };
+    char *ptr = NULL;
+
+    ptr = i18n_ustring_copy_au_n ( dest, g_ustr, g_str_len );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    assert_eq ( ptr, dest );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_copy_au_n_n(void)
+{
+    i18n_ustring_copy_au_n ( NULL, g_ustr, g_str_len );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_copy_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+
+    i18n_ustring_copy ( dest, g_ustr );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    assert_eq ( i18n_ustring_compare( dest, g_ustr ), 0 );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_copy_n(void)
+{
+    i18n_ustring_copy ( NULL, g_ustr );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_copy_n_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+
+    i18n_ustring_copy_n ( dest, g_ustr, g_str_len );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+       assert_eq ( i18n_ustring_compare( dest, g_ustr ), 0 );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_copy_n_n(void)
+{
+    i18n_ustring_copy_n ( NULL, g_ustr, g_str_len );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_copy_ua_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    i18n_uchar *ptr = NULL;
+
+    ptr = i18n_ustring_copy_ua(dest, g_astr);
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+    assert_eq(ptr, dest);
+    assert_eq(memcmp(g_ustr, dest, g_str_len*sizeof(i18n_uchar)), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_copy_ua_n(void)
+{
+    i18n_ustring_copy_ua ( NULL, g_astr );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+int utc_capi_base_utils_i18n_ustring_copy_ua_n_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    i18n_uchar *ptr = NULL;
+
+    ptr = i18n_ustring_copy_ua_n ( dest, g_astr, g_str_len );
+    assert_eq ( ptr, dest );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_copy_ua_n_n(void)
+{
+    i18n_ustring_copy_ua_n ( NULL, g_astr, g_str_len );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_copy_p(void)
+{
+    char *string = "tizen";
+    i18n_uchar src[64] = {0, };
+    i18n_uchar dest[64] = {0, };
+    int32_t result = 0;
+
+    // copy string to src
+    i18n_ustring_copy_ua_n(src, string, strlen(string));
+
+    // cat src to dest
+    i18n_ustring_mem_copy(dest, (const i18n_uchar *)src, i18n_ustring_get_length(src));
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    // compare dest with src
+    result = i18n_ustring_mem_compare((const i18n_uchar *)src, (const i18n_uchar *)dest, i18n_ustring_get_length(src));
+
+    assert_eq(result, 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_copy_n(void)
+{
+    i18n_uchar src[64] = {0, };
+    i18n_uchar dest[64] = {0, };
+
+    // cat src to dest
+    i18n_ustring_mem_copy(dest, NULL, i18n_ustring_get_length(src));
+
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_move_p(void)
+{
+    i18n_uchar dest[64] = {0, };
+    const i18n_uchar src[64] = {0, };
+       int32_t count = 32;
+    i18n_uchar *ptr = NULL;
+
+    ptr = i18n_ustring_mem_move ( dest, src, count );
+    assert_eq ( ptr, dest );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_move_n(void)
+{
+    const i18n_uchar src[64] = {0, };
+       int32_t count = 32;
+
+    i18n_ustring_mem_move ( NULL, src, count );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_set_p(void)
+{
+    i18n_uchar dest[64] = {0, };
+    const i18n_uchar c = '0';
+       int32_t count = 32;
+    i18n_uchar *ptr = NULL;
+
+    ptr = i18n_ustring_mem_set ( dest, c, count );
+    assert_eq ( ptr, dest );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_set_n(void)
+{
+    const i18n_uchar c = '0';
+       int32_t count = 32;
+
+    i18n_ustring_mem_set ( NULL, c, count );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_compare_p(void)
+{
+    const i18n_uchar buf1[64] = {0, };
+    const i18n_uchar buf2[64] = {0, };
+       int32_t count = 32;
+    int32_t result = -1;
+
+    result = i18n_ustring_mem_compare ( buf1, buf2, count );
+    assert_eq ( result, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_compare_n(void)
+{
+    const i18n_uchar buf2[64] = {0, };
+       int32_t count = 32;
+
+    i18n_ustring_mem_compare ( NULL, buf2, count );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_compare_code_point_order_p(void)
+{
+    const i18n_uchar s1[64] = {0, };
+    const i18n_uchar s2[64] = {0, };
+       int32_t count = 32;
+    int32_t result = -1;
+
+    result = i18n_ustring_mem_compare_code_point_order ( s1, s2, count );
+    assert_eq ( result, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_compare_code_point_order_n(void)
+{
+    const i18n_uchar s2[64] = {0, };
+       int32_t count = 32;
+
+    i18n_ustring_mem_compare_code_point_order ( NULL, s2, count );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_char_p(void)
+{
+    const i18n_uchar ustring[64] = {'T', 'I', 'Z', 'E', 'N', '\0'};
+    i18n_uchar code_point = 'O';
+    i18n_uchar *result = NULL;
+
+    result = i18n_ustring_mem_char(ustring, code_point, i18n_ustring_get_length(ustring));
+    assert_eq(result, NULL);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_char_n(void)
+{
+    i18n_uchar code_point = 'O';
+
+    i18n_ustring_mem_char(NULL, code_point, 0);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_char32_p(void)
+{
+    const i18n_uchar ustring[64] = {'T', 'I', 'Z', 'E', 'N', '\0'};
+    i18n_uchar32 code_point = 'O';
+    i18n_uchar *result = NULL;
+
+    result = i18n_ustring_mem_char32(ustring, code_point, i18n_ustring_get_length(ustring));
+    assert_eq(result, NULL);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_char32_n(void)
+{
+    i18n_uchar32 code_point = 'O';
+
+    i18n_ustring_mem_char32(NULL, code_point, 0);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_r_char_p(void)
+{
+    const i18n_uchar ustring[64] = {'T', 'I', 'Z', 'E', 'N', '\0'};
+    i18n_uchar code_point = 'O';
+    i18n_uchar *result = NULL;
+
+    result = i18n_ustring_mem_r_char(ustring, code_point, i18n_ustring_get_length(ustring));
+    assert_eq(result, NULL);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_r_char_n(void)
+{
+    i18n_uchar code_point = 'O';
+
+    i18n_ustring_mem_r_char(NULL, code_point, 0);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_r_char32_p(void)
+{
+    const i18n_uchar ustring[64] = {'T', 'I', 'Z', 'E', 'N', '\0'};
+    i18n_uchar32 code_point = 'O';
+    i18n_uchar *result = NULL;
+
+    result = i18n_ustring_mem_r_char32(ustring, code_point, i18n_ustring_get_length(ustring));
+    assert_eq(result, NULL);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_mem_r_char32_n(void)
+{
+    i18n_uchar32 code_point = 'O';
+
+    i18n_ustring_mem_r_char32(NULL, code_point, 0);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_unescape_p(void)
+{
+    const char src[64] = {0, };
+    i18n_uchar dest[64] = {0, };
+    int32_t dest_capacity = 64;
+    int32_t length;
+
+    length = i18n_ustring_unescape ( src, dest, dest_capacity );
+    assert_eq ( length, 0 );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_unescape_n(void)
+{
+    i18n_uchar dest[64] = {0, };
+    int32_t dest_capacity = 64;
+
+    i18n_ustring_unescape ( NULL, dest, dest_capacity );
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static i18n_uchar
+char_at(int32_t offset, void *context)
+{
+    i18n_uchar dest[1] = {0, };
+    i18n_ustring_copy_ua_n(dest, context + offset, 1);
+    return dest[0];
+}
+
+int utc_capi_base_utils_i18n_ustring_unescape_at_p(void)
+{
+    const char *src = "\a";
+    int32_t offset = 0;
+    i18n_uchar32 character;
+
+    character = i18n_ustring_unescape_at(char_at, &offset, strlen(src), (void *)src);
+    assert_neq(character, 0xFFFFFFFF);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_unescape_at_n(void)
+{
+    const char *src = "\a";
+    int32_t offset = 0;
+
+    i18n_ustring_unescape_at(NULL, &offset, 0, (void *)src);
+    int err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_upper_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    const i18n_uchar src[] = {'t','i','z','e','n','\0'};
+    const char *locale = I18N_ULOCALE_US;
+    i18n_error_code_e err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_to_upper(dest, dest_capacity, src, i18n_ustring_get_length(src), locale, &err_code);
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    const i18n_uchar upper[] = {'T','I','Z','E','N','\0'};
+    assert_eq(memcmp(upper, dest, i18n_ustring_get_length(src)*sizeof(src[0])),0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_upper_n(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    int32_t dest_capacity = -1; // Illegal argument
+    const char *locale = I18N_ULOCALE_US;
+    i18n_error_code_e err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_to_upper(dest, dest_capacity, NULL, -10000, locale, &err_code);
+
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_lower_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    const i18n_uchar src[] = {'T','I','Z','E','N','\0'};
+    const char *locale = I18N_ULOCALE_US;
+    i18n_error_code_e err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_to_lower(dest, dest_capacity, src, i18n_ustring_get_length(src), locale, &err_code);
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    const i18n_uchar lower[] = {'t','i','z','e','n','\0'};
+    assert_eq(memcmp(lower, dest, i18n_ustring_get_length(src)*sizeof(src[0])),0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_lower_n(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    int32_t dest_capacity = -1; // Illegal argument
+    const char *locale = I18N_ULOCALE_US;
+    i18n_error_code_e err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_to_lower(dest, dest_capacity, NULL, -10000, locale, &err_code);
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_title_new_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    i18n_uchar src[] = {'T','I','Z','E','N','\0'};
+    const char *locale = I18N_ULOCALE_US;
+    i18n_error_code_e err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_to_title_new(dest, dest_capacity, src, i18n_ustring_get_length(src), NULL, locale);
+    err_code = get_last_result();
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    const i18n_uchar title[] = {'T','i','z','e','n','\0'};
+    assert_eq(memcmp(title, dest, i18n_ustring_get_length(src)*sizeof(src[0])),0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_title_new_n(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    int32_t dest_capacity = -1; // Illegal argument
+    const char *locale = I18N_ULOCALE_US;
+    i18n_error_code_e err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_to_title_new(dest, dest_capacity, NULL, -10000, NULL, locale);
+    err_code = get_last_result();
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+
+
+int utc_capi_base_utils_i18n_ustring_fold_case_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    i18n_uchar src[] = {0x61, 0x42, 0x130, 0x49, 0x131, 0x3d0, 0xdf, 0xfb03, 0xd93f, 0xdfff, '\0'};
+
+    i18n_error_code_e err_code = I18N_ERROR_NONE;
+
+    int32_t length = i18n_ustring_fold_case(dest,
+                           dest_capacity,
+                           src,
+                           i18n_ustring_get_length(src),
+                           I18N_U_FOLD_CASE_DEFAULT,
+                           &err_code);
+
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    static const i18n_uchar foldedDefault[] = {0x61, 0x62, 0x69, 0x307, 0x69,  0x131, 0x3b2, 0x73, 0x73, 0x66, 0x66, 0x69, 0xd93f, 0xdfff};
+    assert_eq(memcmp(foldedDefault, dest, length*sizeof(i18n_uchar)),0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_fold_case_n(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    int32_t dest_capacity = -1; // Illegal argument
+    i18n_error_code_e err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_fold_case(dest,
+                           dest_capacity,
+                           NULL,
+                           -10000,
+                           I18N_U_FOLD_CASE_DEFAULT,
+                           &err_code);
+
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_WCS_p(void)
+{
+    wchar_t dest[STR_LEN] = {0, };
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    int32_t dest_len = 0;
+    const i18n_uchar src[] = {'T', 'I', 'Z', 'E', 'N', '\0'};
+    int32_t src_len = i18n_ustring_get_length(src);
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_to_WCS(dest, dest_capacity, &dest_len, src, src_len, &err_code);
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    i18n_uchar from_dest[STR_LEN] = {0, };
+    int32_t from_dest_capacity = sizeof(from_dest)/sizeof(from_dest[0]);
+    int32_t from_dest_len = 0;
+    i18n_ustring_from_WCS(from_dest, from_dest_capacity, &from_dest_len, dest, dest_len, &err_code);
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    int i;
+    for(i=0; i<src_len; i++)
+    {
+        assert_eq(from_dest[i], src[i]);
+    }
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_WCS_n(void)
+{
+    wchar_t dest[STR_LEN] = {0, };
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    int32_t dest_len = 0;
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_to_WCS(dest, dest_capacity, &dest_len, NULL, -10000, &err_code);
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_WCS_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0, };
+    int dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    int32_t dest_len = 0; // out
+    const wchar_t src[STR_LEN] = {'T', 'I', 'Z', 'E', 'N', '\0'};
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_from_WCS(dest, dest_capacity, &dest_len, src, -1, &err_code);
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    wchar_t to_dest[STR_LEN] = {0, };
+    int32_t to_dest_capacity = sizeof(to_dest)/sizeof(to_dest[0]);
+    int32_t to_dest_len = 0;
+    i18n_ustring_to_WCS(to_dest, to_dest_capacity, &to_dest_len, dest, dest_len, &err_code);
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    int i;
+    for(i=0; i<to_dest_len; i++)
+    {
+        assert_eq(to_dest[i], src[i]);
+    }
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_WCS_n(void)
+{
+    i18n_uchar dest[STR_LEN] = {0, };
+    int dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    int32_t dest_len = 0; // out
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_from_WCS(dest, dest_capacity, &dest_len, NULL, -1000, &err_code);
+
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_UTF8_p(void)
+{
+    int err = I18N_ERROR_NONE;
+    char dest[STR_LEN] = {0, };
+    int32_t dest_capacity = STR_LEN;
+    int32_t dest_len = -1;
+    i18n_uchar src[STR_LEN] = {0,};
+    i18n_ustring_copy_ua_n(src, "TIZEN", strlen("TIZEN")); // 0054 0049 005A 0045 004E - "TIZEN" in UTF16 encoding
+    int32_t src_len = -1;
+
+    i18n_ustring_to_UTF8( dest, dest_capacity, &dest_len, src, src_len, &err );
+    assert_eq( err, I18N_ERROR_NONE );
+
+    const uint8_t test_utf8[] = { 0x54, 0x49, 0x5A, 0x45, 0x4E, 0 }; // "TIZEN" in UTF8 encoding
+    assert_eq(strncmp((const char *)test_utf8, dest, dest_len+1), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_UTF8_n(void)
+{
+    int err = I18N_ERROR_NONE;
+    char dest[STR_LEN] = {0, };
+    int32_t dest_capacity = STR_LEN;
+    int32_t dest_len = -1;
+
+    i18n_ustring_to_UTF8 ( dest, dest_capacity, &dest_len, NULL, -1, &err );
+    assert_neq ( err, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_UTF8_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    int32_t dest_len = 0;
+    const char *src = "TIZEN";
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_from_UTF8(dest, dest_capacity, &dest_len, src, strlen(src), &err_code);
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    i18n_uchar test_utf16[STR_LEN] = {0,};
+    i18n_ustring_copy_ua_n(test_utf16, "TIZEN", strlen("TIZEN")); // 0054 0049 005A 0045 004E - "TIZEN" in UTF16 encoding
+    assert_eq(memcmp(test_utf16, dest, (dest_len+1)*sizeof(dest[0])), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_UTF8_n(void)
+{
+    i18n_uchar dest[STR_LEN] = {0,};
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    int32_t dest_len = 0;
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_from_UTF8(dest, dest_capacity, &dest_len, NULL, -10000, &err_code);
+
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_UTF8_with_sub_p(void)
+{
+    int err = I18N_ERROR_NONE;
+    char dest[STR_LEN] = {0, };
+    int32_t dest_capacity = STR_LEN;
+    int32_t dest_len = 0;
+    i18n_uchar src[STR_LEN] = {0,};
+    i18n_ustring_copy_ua_n(src, "TIZEN", strlen("TIZEN")); // 0054 0049 005A 0045 004E - "TIZEN" in UTF16 encoding
+    int32_t src_len = -1;
+    i18n_uchar32 sub_char = 0xFFFD;
+    int32_t num_substitutions = 0;
+
+    i18n_ustring_to_UTF8_with_sub( dest, dest_capacity, &dest_len, src, src_len, sub_char, &num_substitutions, &err );
+    assert_eq( err, I18N_ERROR_NONE );
+
+    const uint8_t test_utf8[] = { 0x54, 0x49, 0x5A, 0x45, 0x4E, 0 }; // "TIZEN" in UTF8 encoding
+    assert_eq(strncmp((const char *)test_utf8, dest, dest_len+1), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_UTF8_with_sub_n(void)
+{
+    int err = I18N_ERROR_NONE;
+    char dest[STR_LEN] = {0, };
+    int32_t dest_capacity = STR_LEN;
+    int32_t dest_len = 0;
+    int32_t src_len = STR_LEN;
+    i18n_uchar32 sub_char = '0';
+    int32_t num_substitutions = 0;
+
+    i18n_ustring_to_UTF8_with_sub ( dest, dest_capacity, &dest_len, NULL, src_len, sub_char, &num_substitutions, &err );
+    assert_eq ( err, I18N_ERROR_INVALID_PARAMETER );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_UTF8_with_sub_p(void)
+{
+    int err = I18N_ERROR_NONE;
+    i18n_uchar dest[STR_LEN] = {0, };
+    int32_t dest_capacity = STR_LEN;
+    int32_t dest_len = 0;
+    const char src[STR_LEN] = "TIZEN";
+    int32_t src_len = -1;
+    i18n_uchar32 sub_char = 0xFFFD;
+    int32_t num_substitutions = 0;
+
+    i18n_ustring_from_UTF8_with_sub ( dest, dest_capacity, &dest_len, src, src_len, sub_char, &num_substitutions, &err);
+    assert_eq ( err, I18N_ERROR_NONE );
+
+    i18n_uchar test_utf16[STR_LEN] = {0,};
+    i18n_ustring_copy_ua_n(test_utf16, "TIZEN", strlen("TIZEN")); // 0054 0049 005A 0045 004E - "TIZEN" in UTF16 encoding
+    assert_eq(memcmp(test_utf16, dest, (dest_len+1)*sizeof(dest[0])), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_UTF8_with_sub_n(void)
+{
+    int err = I18N_ERROR_NONE;
+    i18n_uchar dest[STR_LEN] = {0, };
+    int32_t dest_capacity = STR_LEN;
+    int32_t dest_len = 0;
+    int32_t src_len = STR_LEN;
+    i18n_uchar32 sub_char = '0';
+    int32_t num_substitutions = 0;
+
+    i18n_ustring_from_UTF8_with_sub ( dest, dest_capacity, &dest_len, NULL, src_len, sub_char, &num_substitutions, &err);
+    assert_eq ( err, I18N_ERROR_INVALID_PARAMETER );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_UTF8_lenient_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0, };
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    int32_t dest_len = 0;
+    const char *src = "TIZEN";
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_from_UTF8_lenient(dest, dest_capacity, &dest_len, src, strlen(src), &err_code);
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    i18n_uchar test_utf16[STR_LEN] = {0,};
+    i18n_ustring_copy_ua_n(test_utf16, "TIZEN", strlen("TIZEN")); // 0054 0049 005A 0045 004E - "TIZEN" in UTF16 encoding
+    assert_eq(memcmp(test_utf16, dest, (dest_len+1)*sizeof(dest[0])), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_UTF8_lenient_n(void)
+{
+    i18n_uchar dest[STR_LEN] = {0, };
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    int32_t dest_len = 0;
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_from_UTF8_lenient(dest, dest_capacity, &dest_len, NULL, -10000, &err_code);
+
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_UTF32_p(void)
+{
+    int err = I18N_ERROR_NONE;
+    i18n_uchar32 dest[STR_LEN] = {0, };
+    int32_t dest_capacity = STR_LEN;
+    int32_t dest_len = 0;
+    i18n_uchar src[STR_LEN] = {0, };
+    i18n_ustring_copy_ua_n(src, "TIZEN", strlen("TIZEN")); // 0054 0049 005A 0045 004E - "TIZEN" in UTF16 encoding
+    int32_t src_len = -1;
+
+    i18n_ustring_to_UTF32 ( dest, dest_capacity, &dest_len, src, src_len, &err );
+    assert_eq ( err, I18N_ERROR_NONE );
+
+    const uint32_t result_utf32[] = { 0x00000054, 0x00000049, 0x0000005A, 0x00000045, 0x0000004E, 0 }; // "TIZEN" in UTF32 encoding
+    assert_eq(memcmp(result_utf32, dest, (dest_len+1)*sizeof(dest[0])), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_UTF32_n(void)
+{
+    int err = I18N_ERROR_NONE;
+    i18n_uchar32 dest[STR_LEN] = {0, };
+    int32_t dest_capacity = STR_LEN;
+    int32_t dest_len = 0;
+
+    i18n_ustring_to_UTF32(dest, dest_capacity, &dest_len, NULL, -1, &err);
+    assert_neq ( err, I18N_ERROR_NONE );
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_UTF32_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0, };
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    int32_t dest_len = 0;
+    const i18n_uchar32 src[] = {'T', 'I', 'Z', 'E', 'N', '\0'};
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_from_UTF32(dest,
+                            dest_capacity,
+                            &dest_len,
+                            src,
+                            -1,
+                            &err_code);
+
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    i18n_uchar test_utf16[STR_LEN] = {0,};
+    i18n_ustring_copy_ua_n(test_utf16, "TIZEN", strlen("TIZEN")); // 0054 0049 005A 0045 004E - "TIZEN" in UTF16 encoding
+    assert_eq(memcmp(test_utf16, dest, (dest_len+1)*sizeof(dest[0])), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_UTF32_n(void)
+{
+    i18n_uchar dest[STR_LEN] = {0, };
+    int32_t dest_capacity = -1; // Illegal argument
+    int32_t dest_len = 0; // out
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_from_UTF32(dest,
+                            dest_capacity,
+                            &dest_len,
+                            NULL,
+                            -10000,
+                            &err_code);
+
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_UTF32_with_sub_p(void)
+{
+    i18n_uchar32 dest[STR_LEN] = {0, };
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    int32_t dest_len = 0; // out
+    const i18n_uchar src[] = {'T', 'I', 'Z', 'E', 'N', '\0'};
+    i18n_uchar32 sub_char = 0xFFFD;
+    int32_t num_substitutions = 0;
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_to_UTF32_with_sub(dest,
+                                     dest_capacity,
+                                     &dest_len,
+                                     src,
+                                     i18n_ustring_get_length(src),
+                                     sub_char,
+                                     &num_substitutions,
+                                     &err_code);
+
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    const uint32_t result_utf32[] = { 0x00000054, 0x00000049, 0x0000005A, 0x00000045, 0x0000004E, 0 }; // "TIZEN" in UTF32 encoding
+    assert_eq(memcmp(result_utf32, dest, (dest_len+1)*sizeof(dest[0])), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_to_UTF32_with_sub_n(void)
+{
+    i18n_uchar32 dest[STR_LEN] = {0, };
+    int32_t dest_capacity = -1; // Illegal argument
+    int32_t dest_len = 0; // out
+    i18n_uchar32 sub_char = 0xFFFD;
+    int32_t num_substitutions = 0;
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_to_UTF32_with_sub(dest,
+                                   dest_capacity,
+                                   &dest_len,
+                                   NULL,
+                                   -10000,
+                                   sub_char,
+                                   &num_substitutions,
+                                   &err_code);
+
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_UTF32_with_sub_p(void)
+{
+    i18n_uchar dest[STR_LEN] = {0, };
+    int32_t dest_capacity = sizeof(dest)/sizeof(dest[0]);
+    int32_t dest_len = 0; // out
+    const i18n_uchar32 src[] = {'T', 'I', 'Z', 'E', 'N', '\0'};
+    i18n_uchar32 sub_char = 0xFFFD;
+    int32_t num_substitutions = 0;
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_from_UTF32_with_sub(dest,
+                                     dest_capacity,
+                                     &dest_len,
+                                     src,
+                                     -1,
+                                     sub_char,
+                                     &num_substitutions,
+                                     &err_code);
+
+    assert_eq(err_code, I18N_ERROR_NONE);
+
+    i18n_uchar test_utf16[STR_LEN] = {0,};
+    i18n_ustring_copy_ua_n(test_utf16, "TIZEN", strlen("TIZEN")); // 0054 0049 005A 0045 004E - "TIZEN" in UTF16 encoding
+    assert_eq(memcmp(test_utf16, dest, (dest_len+1)*sizeof(dest[0])), 0);
+
+    return 0;
+}
+
+int utc_capi_base_utils_i18n_ustring_from_UTF32_with_sub_n(void)
+{
+    i18n_uchar dest[STR_LEN] = {0, };
+    int32_t dest_capacity = -1; // Illegal argument
+    int32_t dest_len = 0; // out
+    i18n_uchar32 sub_char = 0xFFFD;
+    int32_t num_substitutions = 0;
+    int err_code = I18N_ERROR_NONE;
+
+    i18n_ustring_from_UTF32_with_sub(dest,
+                                     dest_capacity,
+                                     &dest_len,
+                                     NULL,
+                                     -10000,
+                                     sub_char,
+                                     &num_substitutions,
+                                     &err_code);
+
+    assert_neq(err_code, I18N_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/bluetooth/CMakeLists.txt b/src/utc/bluetooth/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..5872557
--- /dev/null
@@ -0,0 +1,56 @@
+SET(PKG_NAME "bluetooth")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-network-bluetooth")
+SET(TC_SOURCES
+utc_bluetooth_adapter_negative.c
+utc_bluetooth_adapter_positive.c
+utc_bluetooth_audio_negative.c
+utc_bluetooth_audio_positive.c
+utc_bluetooth_common_positive.c
+utc_bluetooth_device_discovery_negative.c
+utc_bluetooth_device_discovery_positive.c
+utc_bluetooth_device_negative.c
+utc_bluetooth_device_positive.c
+utc_bluetooth_gatt_negative.c
+utc_bluetooth_gatt_positive.c
+utc_bluetooth_hdp_negative.c
+utc_bluetooth_hdp_positive.c
+utc_bluetooth_hid_negative.c
+utc_bluetooth_hid_positive.c
+utc_bluetooth_opp_client_negative.c
+utc_bluetooth_opp_client_positive.c
+utc_bluetooth_opp_server_negative.c
+utc_bluetooth_opp_server_positive.c
+utc_bluetooth_service_search_negative.c
+utc_bluetooth_service_search_positive.c
+utc_bluetooth_socket_negative.c
+utc_bluetooth_socket_positive.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/bluetooth/platform.list b/src/utc/bluetooth/platform.list
new file mode 100755 (executable)
index 0000000..ca3612a
--- /dev/null
@@ -0,0 +1,65 @@
+bt_adapter_add_white_list
+bt_adapter_clear_white_list
+bt_adapter_get_connectable
+bt_adapter_get_le_state
+bt_adapter_le_disable
+bt_adapter_le_enable
+bt_adapter_remove_white_list
+bt_adapter_set_connectable
+bt_adapter_set_connectable_changed_cb
+bt_adapter_set_le_state_changed_cb
+bt_adapter_unset_connectable_changed_cb
+bt_adapter_unset_le_state_changed_cb
+bt_ag_close_sco
+bt_ag_get_speaker_gain
+bt_ag_is_nrec_enabled
+bt_ag_is_sco_opened
+bt_ag_notify_call_event
+bt_ag_notify_call_list
+bt_ag_notify_speaker_gain
+bt_ag_notify_voice_recognition_state
+bt_ag_open_sco
+bt_ag_set_call_handling_event_cb
+bt_ag_set_dtmf_transmitted_cb
+bt_ag_set_microphone_gain_changed_cb
+bt_ag_set_multi_call_handling_event_cb
+bt_ag_set_sco_state_changed_cb
+bt_ag_set_speaker_gain_changed_cb
+bt_ag_unset_call_handling_event_cb
+bt_ag_unset_dtmf_transmitted_cb
+bt_ag_unset_microphone_gain_changed_cb
+bt_ag_unset_multi_call_handling_event_cb
+bt_ag_unset_sco_state_changed_cb
+bt_ag_unset_speaker_gain_changed_cb
+bt_avrcp_set_equalizer_state_changed_cb
+bt_avrcp_set_repeat_mode_changed_cb
+bt_avrcp_set_scan_mode_changed_cb
+bt_avrcp_set_shuffle_mode_changed_cb
+bt_avrcp_target_deinitialize
+bt_avrcp_target_initialize
+bt_avrcp_target_notify_equalizer_state
+bt_avrcp_target_notify_player_state
+bt_avrcp_target_notify_position
+bt_avrcp_target_notify_repeat_mode
+bt_avrcp_target_notify_scan_mode
+bt_avrcp_target_notify_shuffle_mode
+bt_avrcp_target_notify_track
+bt_avrcp_unset_equalizer_state_changed_cb
+bt_avrcp_unset_repeat_mode_changed_cb
+bt_avrcp_unset_scan_mode_changed_cb
+bt_avrcp_unset_shuffle_mode_changed_cb
+bt_call_list_add
+bt_call_list_create
+bt_call_list_destroy
+bt_call_list_reset
+bt_device_cancel_service_search
+bt_nap_activate
+bt_nap_deactivate
+bt_nap_disconnect
+bt_nap_disconnect_all
+bt_nap_set_connection_state_changed_cb
+bt_nap_unset_connection_state_changed_cb
+bt_panu_connect
+bt_panu_disconnect
+bt_panu_set_connection_state_changed_cb
+bt_panu_unset_connection_state_changed_cb
\ No newline at end of file
diff --git a/src/utc/bluetooth/prod_platform.list b/src/utc/bluetooth/prod_platform.list
new file mode 100755 (executable)
index 0000000..58addff
--- /dev/null
@@ -0,0 +1,18 @@
+bt_a2dp_set_content_protection
+bt_adapter_get_advertising_manufacturer_data
+bt_adapter_get_scan_resp_manufacturer_data
+bt_adapter_set_advertising_manufacturer_data
+bt_adapter_set_advertising_manufacturer_data_changed_cb
+bt_adapter_set_scan_parameter
+bt_adapter_set_scan_resp_manufacturer_data
+bt_adapter_set_scan_resp_manufacturer_data_changed_cb
+bt_adapter_unset_advertising_manufacturer_data_changed_cb
+bt_adapter_unset_scan_resp_manufacturer_data_changed_cb
+bt_ag_is_wbs_mode
+bt_ag_notify_vendor_cmd
+bt_ag_set_vendor_cmd_cb
+bt_ag_unset_vendor_cmd_cb
+bt_device_get_rssi_strength
+bt_device_le_disable_rssi_monitor
+bt_device_le_enable_rssi_monitor
+bt_device_unset_rssi_alert_cb
\ No newline at end of file
diff --git a/src/utc/bluetooth/public.list b/src/utc/bluetooth/public.list
new file mode 100755 (executable)
index 0000000..944eb03
--- /dev/null
@@ -0,0 +1,121 @@
+bt_adapter_foreach_bonded_device
+bt_adapter_free_device_info
+bt_adapter_get_address
+bt_adapter_get_bonded_device_info
+bt_adapter_get_local_oob_data
+bt_adapter_get_name
+bt_adapter_get_state
+bt_adapter_get_visibility
+bt_adapter_is_discovering
+bt_adapter_is_service_used
+bt_adapter_le_add_advertising_data
+bt_adapter_le_clear_advertising_data
+bt_adapter_le_create_advertiser
+bt_adapter_le_destroy_advertiser
+bt_adapter_le_is_discovering
+bt_adapter_le_remove_advertising_data
+bt_adapter_le_set_device_discovery_state_changed_cb
+bt_adapter_le_start_advertising
+bt_adapter_le_start_device_discovery
+bt_adapter_le_stop_advertising
+bt_adapter_le_stop_device_discovery
+bt_adapter_le_unset_device_discovery_state_changed_cb
+bt_adapter_remove_remote_oob_data
+bt_adapter_set_device_discovery_state_changed_cb
+bt_adapter_set_name
+bt_adapter_set_name_changed_cb
+bt_adapter_set_remote_oob_data
+bt_adapter_set_state_changed_cb
+bt_adapter_set_visibility_duration_changed_cb
+bt_adapter_set_visibility_mode_changed_cb
+bt_adapter_start_device_discovery
+bt_adapter_stop_device_discovery
+bt_adapter_unset_device_discovery_state_changed_cb
+bt_adapter_unset_name_changed_cb
+bt_adapter_unset_state_changed_cb
+bt_adapter_unset_visibility_duration_changed_cb
+bt_adapter_unset_visibility_mode_changed_cb
+bt_audio_connect
+bt_audio_deinitialize
+bt_audio_disconnect
+bt_audio_initialize
+bt_audio_set_connection_state_changed_cb
+bt_audio_unset_connection_state_changed_cb
+bt_deinitialize
+bt_device_cancel_bonding
+bt_device_create_bond
+bt_device_destroy_bond
+bt_device_foreach_connected_profiles
+bt_device_get_service_mask_from_uuid_list
+bt_device_is_profile_connected
+bt_device_set_alias
+bt_device_set_authorization
+bt_device_set_authorization_changed_cb
+bt_device_set_bond_created_cb
+bt_device_set_bond_destroyed_cb
+bt_device_set_connection_state_changed_cb
+bt_device_set_service_searched_cb
+bt_device_start_service_search
+bt_device_unset_authorization_changed_cb
+bt_device_unset_bond_created_cb
+bt_device_unset_bond_destroyed_cb
+bt_device_unset_connection_state_changed_cb
+bt_device_unset_service_searched_cb
+bt_gatt_clone_attribute_handle
+bt_gatt_connect
+bt_gatt_destroy_attribute_handle
+bt_gatt_disconnect
+bt_gatt_discover_characteristic_descriptor
+bt_gatt_discover_characteristics
+bt_gatt_foreach_included_services
+bt_gatt_foreach_primary_services
+bt_gatt_get_characteristic_declaration
+bt_gatt_get_service_uuid
+bt_gatt_read_characteristic_value
+bt_gatt_set_characteristic_changed_cb
+bt_gatt_set_characteristic_value
+bt_gatt_set_characteristic_value_request
+bt_gatt_set_connection_state_changed_cb
+bt_gatt_unset_characteristic_changed_cb
+bt_gatt_unset_connection_state_changed_cb
+bt_gatt_unwatch_characteristic_changes
+bt_gatt_watch_characteristic_changes
+bt_hdp_connect_to_source
+bt_hdp_disconnect
+bt_hdp_register_sink_app
+bt_hdp_send_data
+bt_hdp_set_connection_state_changed_cb
+bt_hdp_set_data_received_cb
+bt_hdp_unregister_sink_app
+bt_hdp_unset_connection_state_changed_cb
+bt_hdp_unset_data_received_cb
+bt_hid_host_connect
+bt_hid_host_deinitialize
+bt_hid_host_disconnect
+bt_hid_host_initialize
+bt_initialize
+bt_opp_client_add_file
+bt_opp_client_cancel_push
+bt_opp_client_clear_files
+bt_opp_client_deinitialize
+bt_opp_client_initialize
+bt_opp_client_push_files
+bt_opp_server_accept
+bt_opp_server_cancel_transfer
+bt_opp_server_deinitialize
+bt_opp_server_initialize_by_connection_request
+bt_opp_server_reject
+bt_opp_server_set_destination
+bt_socket_connect_rfcomm
+bt_socket_create_rfcomm
+bt_socket_destroy_rfcomm
+bt_socket_disconnect_rfcomm
+bt_socket_listen_and_accept_rfcomm
+bt_socket_send_data
+bt_socket_set_connection_requested_cb
+bt_socket_set_connection_state_changed_cb
+bt_socket_set_data_received_cb
+bt_socket_unset_connection_requested_cb
+bt_socket_unset_connection_state_changed_cb
+bt_socket_unset_data_received_cb
+
diff --git a/src/utc/bluetooth/tct-bluetooth-core.c b/src/utc/bluetooth/tct-bluetooth-core.c
new file mode 100755 (executable)
index 0000000..98195e4
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-bluetooth-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/bluetooth/tct-bluetooth-core.h b/src/utc/bluetooth/tct-bluetooth-core.h
new file mode 100755 (executable)
index 0000000..f74adc9
--- /dev/null
@@ -0,0 +1,609 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_BLUETOOTH_CORE_H__
+#define __TCT_BLUETOOTH_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_bluetooth_adapter_negative_startup(void);
+extern void utc_bluetooth_adapter_negative_cleanup(void);
+extern void utc_bluetooth_adapter_positive_startup(void);
+extern void utc_bluetooth_adapter_positive_cleanup(void);
+extern void utc_bluetooth_bt_audio_negative_startup(void);
+extern void utc_bluetooth_bt_audio_negative_cleanup(void);
+extern void utc_bluetooth_audio_positive_startup(void);
+extern void utc_bluetooth_audio_positive_cleanup(void);
+extern void utc_bluetooth_common_startup(void);
+extern void utc_bluetooth_common_cleanup(void);
+extern void utc_bluetooth_device_discovery_negative_startup(void);
+extern void utc_bluetooth_device_discovery_negative_cleanup(void);
+extern void utc_bluetooth_device_discovery_positive_startup(void);
+extern void utc_bluetooth_device_discovery_positive_cleanup(void);
+extern void utc_bluetooth_device_negative_startup(void);
+extern void utc_bluetooth_device_negative_cleanup(void);
+extern void utc_bluetooth_device_positive_startup(void);
+extern void utc_bluetooth_device_positive_cleanup(void);
+extern void utc_bluetooth_gatt_negative_startup(void);
+extern void utc_bluetooth_gatt_negative_cleanup(void);
+extern void utc_bluetooth_gatt_positive_startup(void);
+extern void utc_bluetooth_gatt_positive_cleanup(void);
+extern void utc_bluetooth_hdp_negative_startup(void);
+extern void utc_bluetooth_hdp_negative_cleanup(void);
+extern void utc_bluetooth_hdp_positive_startup(void);
+extern void utc_bluetooth_hdp_positive_cleanup(void);
+extern void utc_bluetooth_hid_negative_startup(void);
+extern void utc_bluetooth_hid_negative_cleanup(void);
+extern void utc_bluetooth_hid_positive_startup(void);
+extern void utc_bluetooth_hid_positive_cleanup(void);
+extern void utc_bluetooth_opp_client_negative_startup(void);
+extern void utc_bluetooth_opp_client_negative_cleanup(void);
+extern void utc_bluetooth_opp_client_positive_startup(void);
+extern void utc_bluetooth_opp_client_positive_cleanup(void);
+extern void utc_bluetooth_bt_opp_server_negative_startup(void);
+extern void utc_bluetooth_bt_opp_server_negative_cleanup(void);
+extern void utc_bluetooth_opp_server_positive_startup(void);
+extern void utc_bluetooth_opp_server_positive_cleanup(void);
+extern void utc_bluetooth_service_search_negative_startup(void);
+extern void utc_bluetooth_service_search_negative_cleanup(void);
+extern void utc_bluetooth_service_search_positive_startup(void);
+extern void utc_bluetooth_service_search_positive_cleanup(void);
+extern void utc_bluetooth_socket_negative_startup(void);
+extern void utc_bluetooth_socket_negative_cleanup(void);
+extern void utc_bluetooth_bt_socket_positive_startup(void);
+extern void utc_bluetooth_bt_socket_positive_cleanup(void);
+
+extern int utc_bluetooth_bt_deinitialize_n(void);
+extern int utc_bluetooth_bt_adapter_set_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_adapter_set_state_changed_cb_n1(void);
+extern int utc_bluetooth_bt_adapter_set_name_changed_cb_n(void);
+extern int utc_bluetooth_bt_adapter_set_name_changed_cb_n1(void);
+extern int utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_n(void);
+extern int utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_n1(void);
+extern int utc_bluetooth_bt_adapter_get_state_n(void);
+extern int utc_bluetooth_bt_adapter_get_state_n1(void);
+extern int utc_bluetooth_bt_adapter_get_address_n(void);
+extern int utc_bluetooth_bt_adapter_get_address_n1(void);
+extern int utc_bluetooth_bt_adapter_get_name_n(void);
+extern int utc_bluetooth_bt_adapter_get_name_n1(void);
+extern int utc_bluetooth_bt_adapter_get_visibility_n(void);
+extern int utc_bluetooth_bt_adapter_get_visibility_n1(void);
+extern int utc_bluetooth_bt_adapter_set_name_n(void);
+extern int utc_bluetooth_bt_adapter_set_name_n1(void);
+extern int utc_bluetooth_bt_adapter_unset_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_adapter_unset_name_changed_cb_n(void);
+extern int utc_bluetooth_bt_adapter_unset_visibility_mode_changed_cb_n(void);
+extern int utc_bluetooth_bt_adapter_get_local_oob_data_n(void);
+extern int utc_bluetooth_bt_adapter_is_service_used_n(void);
+extern int utc_bluetooth_bt_adapter_set_visibility_duration_changed_cb_n(void);
+extern int utc_bluetooth_bt_adapter_le_create_advertiser_n(void);
+extern int utc_bluetooth_bt_adapter_le_destroy_advertiser_n(void);
+extern int utc_bluetooth_bt_adapter_le_stop_advertising_n(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_data_n(void);
+extern int utc_bluetooth_bt_adapter_le_clear_advertising_data_n(void);
+extern int utc_bluetooth_bt_adapter_le_remove_advertising_data_n(void);
+extern int utc_bluetooth_bt_adapter_unset_visibility_duration_changed_cb_n(void);
+extern int utc_bluetooth_bt_adapter_get_bonded_device_info_n(void);
+extern int utc_bluetooth_bt_adapter_free_device_info_n(void);
+extern int utc_bluetooth_bt_adapter_set_remote_oob_data_n(void);
+extern int utc_bluetooth_bt_adapter_remove_remote_oob_data_n(void);
+extern int utc_bluetooth_bt_adapter_le_start_scan_n(void);
+extern int utc_bluetooth_bt_adapter_le_stop_scan_n(void);
+extern int utc_bluetooth_bt_adapter_le_get_scan_result_service_uuids_n(void);
+extern int utc_bluetooth_bt_adapter_le_get_scan_result_device_name_n(void);
+extern int utc_bluetooth_bt_adapter_le_get_scan_result_tx_power_level_n(void);
+extern int utc_bluetooth_bt_adapter_le_get_scan_result_service_solicitation_uuids_n(void);
+extern int utc_bluetooth_bt_adapter_le_get_scan_result_service_data_list_n(void);
+extern int utc_bluetooth_bt_adapter_le_free_service_data_list_n(void);
+extern int utc_bluetooth_bt_adapter_le_get_scan_result_appearance_n(void);
+extern int utc_bluetooth_bt_adapter_le_get_scan_result_manufacturer_data_n(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_n(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_n(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_service_data_n(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_appearance_n(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_n(void);
+extern int utc_bluetooth_bt_adapter_le_set_advertising_device_name_n(void);
+extern int utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_n(void);
+extern int utc_bluetooth_bt_adapter_le_start_advertising_new_n(void);
+extern int utc_bluetooth_bt_adapter_le_set_advertising_mode_n(void);
+extern int utc_bluetooth_bt_adapter_le_set_advertising_connectable_n(void);
+extern int utc_bluetooth_bt_adapter_set_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_adapter_set_name_changed_cb_p(void);
+extern int utc_bluetooth_bt_adapter_set_name_changed_cb_p1(void);
+extern int utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_p(void);
+extern int utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_p1(void);
+extern int utc_bluetooth_bt_adapter_get_state_p(void);
+extern int utc_bluetooth_bt_adapter_get_address_p(void);
+extern int utc_bluetooth_bt_adapter_get_name_p(void);
+extern int utc_bluetooth_bt_adapter_get_visibility_p(void);
+extern int utc_bluetooth_bt_adapter_set_name_p(void);
+extern int utc_bluetooth_bt_adapter_unset_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_adapter_unset_name_changed_cb_p(void);
+extern int utc_bluetooth_bt_adapter_unset_visibility_mode_changed_cb_p(void);
+extern int utc_bluetooth_bt_adapter_get_local_oob_data_p(void);
+extern int utc_bluetooth_bt_adapter_is_service_used_p(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_data_p(void);
+extern int utc_bluetooth_bt_adapter_le_clear_advertising_data_p(void);
+extern int utc_bluetooth_bt_adapter_le_remove_advertising_data_p(void);
+extern int utc_bluetooth_bt_adapter_set_visibility_duration_changed_cb_p(void);
+extern int utc_bluetooth_bt_adapter_le_create_advertiser_p(void);
+extern int utc_bluetooth_bt_adapter_le_destroy_advertiser_p(void);
+extern int utc_bluetooth_bt_adapter_unset_visibility_duration_changed_cb_p(void);
+extern int utc_bluetooth_bt_adapter_le_start_scan_p(void);
+extern int utc_bluetooth_bt_adapter_le_stop_scan_p(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_p(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_p(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_service_data_p(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_appearance_p(void);
+extern int utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_p(void);
+extern int utc_bluetooth_bt_adapter_le_set_advertising_device_name_p(void);
+extern int utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_p(void);
+extern int utc_bluetooth_bt_adapter_le_start_advertising_new_p(void);
+extern int utc_bluetooth_bt_adapter_le_set_advertising_mode_p(void);
+extern int utc_bluetooth_bt_adapter_le_set_advertising_connectable_p(void);
+extern int utc_bluetooth_bt_audio_connect_n(void);
+extern int utc_bluetooth_bt_audio_disconnect_n(void);
+extern int utc_bluetooth_bt_audio_set_connection_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_audio_set_connection_state_changed_cb_n1(void);
+extern int utc_bluetooth_bt_audio_deinitialize_n(void);
+extern int utc_bluetooth_bt_audio_initialize_n(void);
+extern int utc_bluetooth_bt_audio_unset_connection_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_audio_initialize_p(void);
+extern int utc_bluetooth_bt_audio_set_connection_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_audio_unset_connection_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_audio_deinitialize_p(void);
+extern int utc_bluetooth_bt_initialize_p(void);
+extern int utc_bluetooth_bt_deinitialize_p(void);
+extern int utc_bluetooth_bt_adapter_stop_device_discovery_n1(void);
+extern int utc_bluetooth_bt_adapter_unset_device_discovery_state_changed_cb_n1(void);
+extern int utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_n1(void);
+extern int utc_bluetooth_bt_adapter_start_device_discovery_n1(void);
+extern int utc_bluetooth_bt_adapter_is_discovering_n1(void);
+extern int utc_bluetooth_bt_adapter_is_discovering_n2(void);
+extern int utc_bluetooth_bt_adapter_is_discovering_p(void);
+extern int utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_adapter_start_device_discovery_p(void);
+extern int utc_bluetooth_bt_adapter_unset_device_discovery_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_adapter_stop_device_discovery_p(void);
+extern int utc_bluetooth_bt_device_set_bond_created_cb_n(void);
+extern int utc_bluetooth_bt_device_set_bonded_cb_n1(void);
+extern int utc_bluetooth_bt_device_set_bond_destroyed_cb_n(void);
+extern int utc_bluetooth_bt_device_set_authorization_changed_cb_n(void);
+extern int utc_bluetooth_bt_device_set_authorization_changed_cb_n1(void);
+extern int utc_bluetooth_bt_device_unset_bond_created_cb_n(void);
+extern int utc_bluetooth_bt_device_unset_bond_destroyed_cb_n(void);
+extern int utc_bluetooth_bt_device_unset_authorization_changed_cb_n(void);
+extern int utc_bluetooth_bt_device_create_bond_n(void);
+extern int utc_bluetooth_bt_device_create_bond_n1(void);
+extern int utc_bluetooth_bt_device_cancel_bonding_n(void);
+extern int utc_bluetooth_bt_device_destroy_bond_n(void);
+extern int utc_bluetooth_bt_adapter_foreach_bonded_device_n1(void);
+extern int utc_bluetooth_bt_adapter_foreach_bonded_device_n2(void);
+extern int utc_bluetooth_bt_device_set_alias_n(void);
+extern int utc_bluetooth_bt_device_set_alias_n2(void);
+extern int utc_bluetooth_bt_device_set_authorization_n(void);
+extern int utc_bluetooth_bt_device_set_authorization_n2(void);
+extern int utc_bluetooth_bt_device_get_service_mask_from_uuid_list_n(void);
+extern int utc_bluetooth_bt_device_is_profile_connected_n(void);
+extern int utc_bluetooth_bt_device_set_connection_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_device_unset_connection_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_device_foreach_connected_profiles_n(void);
+extern int utc_bluetooth_bt_device_set_bond_created_cb_p(void);
+extern int utc_bluetooth_bt_device_set_bond_destroyed_cb_p(void);
+extern int utc_bluetooth_bt_device_set_authorization_changed_cb_p(void);
+extern int utc_bluetooth_bt_device_get_service_mask_from_uuid_list_p(void);
+extern int utc_bluetooth_bt_device_is_profile_connected_p(void);
+extern int utc_bluetooth_bt_device_unset_bond_created_cb_p(void);
+extern int utc_bluetooth_bt_adapter_foreach_bonded_device_p(void);
+extern int utc_bluetooth_bt_device_unset_bond_destroyed_cb_p(void);
+extern int utc_bluetooth_bt_device_unset_authorization_changed_cb_p(void);
+extern int utc_bluetooth_bt_device_set_connection_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_device_unset_connection_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_gatt_connect_n(void);
+extern int utc_bluetooth_bt_gatt_disconnect_n(void);
+extern int utc_bluetooth_bt_gatt_connect_n1(void);
+extern int utc_bluetooth_bt_gatt_disconnect_n1(void);
+extern int utc_bluetooth_bt_gatt_set_connection_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_gatt_unset_connection_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_gatt_get_value_n(void);
+extern int utc_bluetooth_bt_gatt_get_int_value_n(void);
+extern int utc_bluetooth_bt_gatt_get_float_value_n(void);
+extern int utc_bluetooth_bt_gatt_set_value_n(void);
+extern int utc_bluetooth_bt_gatt_set_int_value_n(void);
+extern int utc_bluetooth_bt_gatt_set_float_value_n(void);
+extern int utc_bluetooth_bt_gatt_get_uuid_n(void);
+extern int utc_bluetooth_bt_gatt_get_type_n(void);
+extern int utc_bluetooth_bt_gatt_service_get_client_n(void);
+extern int utc_bluetooth_bt_gatt_service_get_characteristic_n(void);
+extern int utc_bluetooth_bt_gatt_service_foreach_characteristics_n(void);
+extern int utc_bluetooth_bt_gatt_service_get_included_service_n(void);
+extern int utc_bluetooth_bt_gatt_service_foreach_included_services_n(void);
+extern int utc_bluetooth_bt_gatt_characteristic_get_service_n(void);
+extern int utc_bluetooth_bt_gatt_characteristic_get_properties_n(void);
+extern int utc_bluetooth_bt_gatt_characteristic_set_properties_n(void);
+extern int utc_bluetooth_bt_gatt_characteristic_get_write_type_n(void);
+extern int utc_bluetooth_bt_gatt_characteristic_set_write_type_n(void);
+extern int utc_bluetooth_bt_gatt_characteristic_get_descriptor_n(void);
+extern int utc_bluetooth_bt_gatt_characteristic_foreach_descriptors_n(void);
+extern int utc_bluetooth_bt_gatt_descriptor_get_characteristic_n(void);
+extern int utc_bluetooth_bt_gatt_client_create_n(void);
+extern int utc_bluetooth_bt_gatt_client_destroy_n(void);
+extern int utc_bluetooth_bt_gatt_client_get_remote_address_n(void);
+extern int utc_bluetooth_bt_gatt_client_read_value_n(void);
+extern int utc_bluetooth_bt_gatt_client_write_value_n(void);
+extern int utc_bluetooth_bt_gatt_client_set_characteristic_value_changed_cb_n(void);
+extern int utc_bluetooth_bt_gatt_client_unset_characteristic_value_changed_cb_n(void);
+extern int utc_bluetooth_bt_gatt_client_get_service_n(void);
+extern int utc_bluetooth_bt_gatt_client_foreach_services_n(void);
+extern int utc_bluetooth_bt_gatt_set_connection_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_gatt_unset_connection_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_hdp_set_data_received_cb_n(void);
+extern int utc_bluetooth_bt_hdp_set_data_received_cb_n1(void);
+extern int utc_bluetooth_bt_hdp_set_connection_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_hdp_set_connection_state_changed_cb_n1(void);
+extern int utc_bluetooth_bt_hdp_disconnect_n(void);
+extern int utc_bluetooth_bt_hdp_connect_to_source_n(void);
+extern int utc_bluetooth_bt_hdp_connect_to_source_n2(void);
+extern int utc_bluetooth_bt_hdp_register_sink_app_n(void);
+extern int utc_bluetooth_bt_hdp_unregister_sink_app_n(void);
+extern int utc_bluetooth_bt_hdp_unregister_sink_app_n1(void);
+extern int utc_bluetooth_bt_hdp_send_data_n(void);
+extern int utc_bluetooth_bt_hdp_unset_connection_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_hdp_unset_data_received_cb_n(void);
+extern int utc_bluetooth_bt_hdp_set_data_received_cb_p(void);
+extern int utc_bluetooth_bt_hdp_unset_data_received_cb_p(void);
+extern int utc_bluetooth_bt_hdp_set_connection_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_hdp_unset_connection_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_hdp_unregister_sink_app_p(void);
+extern int utc_bluetooth_bt_hdp_register_sink_app_p(void);
+extern int utc_bluetooth_bt_hid_host_initialize_n(void);
+extern int utc_bluetooth_bt_hid_host_initialize_n1(void);
+extern int utc_bluetooth_bt_hid_host_connect_n(void);
+extern int utc_bluetooth_bt_hid_host_disconnect_n(void);
+extern int utc_bluetooth_bt_hid_host_deinitialize_n(void);
+extern int utc_bluetooth_bt_hid_host_initialize_p(void);
+extern int utc_bluetooth_bt_hid_host_deinitialize_p(void);
+extern int utc_bluetooth_bt_opp_client_initialize_n(void);
+extern int utc_bluetooth_bt_opp_client_deinitialize_n(void);
+extern int utc_bluetooth_bt_opp_client_add_file_n(void);
+extern int utc_bluetooth_bt_opp_client_add_file_n1(void);
+extern int utc_bluetooth_bt_opp_client_clear_files_n(void);
+extern int utc_bluetooth_bt_opp_client_push_files_n(void);
+extern int utc_bluetooth_bt_opp_client_cancel_push_n(void);
+extern int utc_bluetooth_bt_opp_client_initialize_p(void);
+extern int utc_bluetooth_bt_opp_client_deinitialize_p(void);
+extern int utc_bluetooth_bt_opp_client_clear_files_p(void);
+extern int utc_bluetooth_bt_opp_server_accept_n(void);
+extern int utc_bluetooth_bt_opp_server_accept_n1(void);
+extern int utc_bluetooth_bt_opp_server_accept_n2(void);
+extern int utc_bluetooth_bt_opp_server_reject_n(void);
+extern int utc_bluetooth_bt_opp_server_reject_n1(void);
+extern int utc_bluetooth_bt_opp_server_set_destination_n(void);
+extern int utc_bluetooth_bt_opp_server_set_destination_n1(void);
+extern int utc_bluetooth_bt_opp_server_set_destination_n2(void);
+extern int utc_bluetooth_bt_opp_server_initialize_by_connection_request_n(void);
+extern int utc_bluetooth_bt_opp_server_initialize_by_connection_request_n1(void);
+extern int utc_bluetooth_bt_opp_server_deinitialize_n(void);
+extern int utc_bluetooth_bt_opp_server_deinitialize_n1(void);
+extern int utc_bluetooth_bt_opp_server_cancel_transfer_n(void);
+extern int utc_bluetooth_bt_opp_server_cancel_transfer_n1(void);
+extern int utc_bluetooth_bt_opp_server_initialize_by_connection_request_p(void);
+extern int utc_bluetooth_bt_opp_server_deinitialize_p(void);
+extern int utc_bluetooth_bt_opp_server_set_destination_p(void);
+extern int utc_bluetooth_bt_device_set_service_searched_cb_n(void);
+extern int utc_bluetooth_service_search_set_cb_n1(void);
+extern int utc_bluetooth_bt_device_unset_service_searched_cb_n(void);
+extern int utc_bluetooth_bt_device_start_service_search_n(void);
+extern int utc_bluetooth_bt_device_set_service_searched_cb_p(void);
+extern int utc_bluetooth_bt_device_unset_service_searched_cb_p(void);
+extern int utc_bluetooth_bt_socket_set_data_received_cb_n(void);
+extern int utc_bluetooth_bt_socket_set_data_received_cb_n1(void);
+extern int utc_bluetooth_bt_socket_set_connection_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_socket_set_connection_state_changed_cb_n1(void);
+extern int utc_bluetooth_bt_socket_unset_data_received_cb_n(void);
+extern int utc_bluetooth_bt_socket_unset_connection_state_changed_cb_n(void);
+extern int utc_bluetooth_bt_socket_create_rfcomm_n(void);
+extern int utc_bluetooth_bt_socket_create_rfcomm_n1(void);
+extern int utc_bluetooth_bt_socket_destroy_rfcomm_n(void);
+extern int utc_bluetooth_bt_socket_listen_and_accept_rfcomm_n(void);
+extern int utc_bluetooth_bt_socket_connect_rfcomm_n(void);
+extern int utc_bluetooth_bt_socket_disconnect_rfcomm_n(void);
+extern int utc_bluetooth_bt_socket_send_data_n(void);
+extern int utc_bluetooth_bt_socket_set_connection_requested_cb_n(void);
+extern int utc_bluetooth_bt_socket_unset_connection_requested_cb_n(void);
+extern int utc_bluetooth_bt_socket_set_data_received_cb_p(void);
+extern int utc_bluetooth_bt_socket_set_connection_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_socket_create_rfcomm_p(void);
+extern int utc_bluetooth_bt_socket_listen_and_accept_rfcomm_p(void);
+extern int utc_bluetooth_bt_socket_destroy_rfcomm_p(void);
+extern int utc_bluetooth_bt_socket_unset_data_received_cb_p(void);
+extern int utc_bluetooth_bt_socket_unset_connection_state_changed_cb_p(void);
+extern int utc_bluetooth_bt_socket_set_connection_requested_cb_p(void);
+extern int utc_bluetooth_bt_socket_unset_connection_requested_cb_p(void);
+
+testcase tc_array[] = {
+    {"utc_bluetooth_bt_deinitialize_n", utc_bluetooth_bt_deinitialize_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_state_changed_cb_n", utc_bluetooth_bt_adapter_set_state_changed_cb_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_state_changed_cb_n1", utc_bluetooth_bt_adapter_set_state_changed_cb_n1, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_name_changed_cb_n", utc_bluetooth_bt_adapter_set_name_changed_cb_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_name_changed_cb_n1", utc_bluetooth_bt_adapter_set_name_changed_cb_n1, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_n", utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_n1", utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_n1, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_get_state_n", utc_bluetooth_bt_adapter_get_state_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_get_state_n1", utc_bluetooth_bt_adapter_get_state_n1, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_get_address_n", utc_bluetooth_bt_adapter_get_address_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_get_address_n1", utc_bluetooth_bt_adapter_get_address_n1, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_get_name_n", utc_bluetooth_bt_adapter_get_name_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_get_name_n1", utc_bluetooth_bt_adapter_get_name_n1, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_get_visibility_n", utc_bluetooth_bt_adapter_get_visibility_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_get_visibility_n1", utc_bluetooth_bt_adapter_get_visibility_n1, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_name_n", utc_bluetooth_bt_adapter_set_name_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_name_n1", utc_bluetooth_bt_adapter_set_name_n1, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_unset_state_changed_cb_n", utc_bluetooth_bt_adapter_unset_state_changed_cb_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_unset_name_changed_cb_n", utc_bluetooth_bt_adapter_unset_name_changed_cb_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_unset_visibility_mode_changed_cb_n", utc_bluetooth_bt_adapter_unset_visibility_mode_changed_cb_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_get_local_oob_data_n", utc_bluetooth_bt_adapter_get_local_oob_data_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_is_service_used_n", utc_bluetooth_bt_adapter_is_service_used_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_visibility_duration_changed_cb_n", utc_bluetooth_bt_adapter_set_visibility_duration_changed_cb_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_create_advertiser_n", utc_bluetooth_bt_adapter_le_create_advertiser_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_destroy_advertiser_n", utc_bluetooth_bt_adapter_le_destroy_advertiser_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_stop_advertising_n", utc_bluetooth_bt_adapter_le_stop_advertising_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_data_n", utc_bluetooth_bt_adapter_le_add_advertising_data_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_clear_advertising_data_n", utc_bluetooth_bt_adapter_le_clear_advertising_data_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_remove_advertising_data_n", utc_bluetooth_bt_adapter_le_remove_advertising_data_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_unset_visibility_duration_changed_cb_n", utc_bluetooth_bt_adapter_unset_visibility_duration_changed_cb_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_get_bonded_device_info_n", utc_bluetooth_bt_adapter_get_bonded_device_info_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_free_device_info_n", utc_bluetooth_bt_adapter_free_device_info_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_remote_oob_data_n", utc_bluetooth_bt_adapter_set_remote_oob_data_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_remove_remote_oob_data_n", utc_bluetooth_bt_adapter_remove_remote_oob_data_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_start_scan_n", utc_bluetooth_bt_adapter_le_start_scan_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_stop_scan_n", utc_bluetooth_bt_adapter_le_stop_scan_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_get_scan_result_service_uuids_n", utc_bluetooth_bt_adapter_le_get_scan_result_service_uuids_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_get_scan_result_device_name_n", utc_bluetooth_bt_adapter_le_get_scan_result_device_name_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_get_scan_result_tx_power_level_n", utc_bluetooth_bt_adapter_le_get_scan_result_tx_power_level_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_get_scan_result_service_solicitation_uuids_n", utc_bluetooth_bt_adapter_le_get_scan_result_service_solicitation_uuids_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_get_scan_result_service_data_list_n", utc_bluetooth_bt_adapter_le_get_scan_result_service_data_list_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_free_service_data_list_n", utc_bluetooth_bt_adapter_le_free_service_data_list_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_get_scan_result_appearance_n", utc_bluetooth_bt_adapter_le_get_scan_result_appearance_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_get_scan_result_manufacturer_data_n", utc_bluetooth_bt_adapter_le_get_scan_result_manufacturer_data_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_n", utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_n", utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_service_data_n", utc_bluetooth_bt_adapter_le_add_advertising_service_data_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_appearance_n", utc_bluetooth_bt_adapter_le_add_advertising_appearance_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_n", utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_set_advertising_device_name_n", utc_bluetooth_bt_adapter_le_set_advertising_device_name_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_n", utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_start_advertising_new_n", utc_bluetooth_bt_adapter_le_start_advertising_new_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_set_advertising_mode_n", utc_bluetooth_bt_adapter_le_set_advertising_mode_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_le_set_advertising_connectable_n", utc_bluetooth_bt_adapter_le_set_advertising_connectable_n, utc_bluetooth_adapter_negative_startup, utc_bluetooth_adapter_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_state_changed_cb_p", utc_bluetooth_bt_adapter_set_state_changed_cb_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_set_name_changed_cb_p", utc_bluetooth_bt_adapter_set_name_changed_cb_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_set_name_changed_cb_p1", utc_bluetooth_bt_adapter_set_name_changed_cb_p1, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_p", utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_p1", utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_p1, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_get_state_p", utc_bluetooth_bt_adapter_get_state_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_get_address_p", utc_bluetooth_bt_adapter_get_address_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_get_name_p", utc_bluetooth_bt_adapter_get_name_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_get_visibility_p", utc_bluetooth_bt_adapter_get_visibility_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_set_name_p", utc_bluetooth_bt_adapter_set_name_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_unset_state_changed_cb_p", utc_bluetooth_bt_adapter_unset_state_changed_cb_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_unset_name_changed_cb_p", utc_bluetooth_bt_adapter_unset_name_changed_cb_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_unset_visibility_mode_changed_cb_p", utc_bluetooth_bt_adapter_unset_visibility_mode_changed_cb_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_get_local_oob_data_p", utc_bluetooth_bt_adapter_get_local_oob_data_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_is_service_used_p", utc_bluetooth_bt_adapter_is_service_used_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_data_p", utc_bluetooth_bt_adapter_le_add_advertising_data_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_clear_advertising_data_p", utc_bluetooth_bt_adapter_le_clear_advertising_data_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_remove_advertising_data_p", utc_bluetooth_bt_adapter_le_remove_advertising_data_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_set_visibility_duration_changed_cb_p", utc_bluetooth_bt_adapter_set_visibility_duration_changed_cb_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_create_advertiser_p", utc_bluetooth_bt_adapter_le_create_advertiser_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_destroy_advertiser_p", utc_bluetooth_bt_adapter_le_destroy_advertiser_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_unset_visibility_duration_changed_cb_p", utc_bluetooth_bt_adapter_unset_visibility_duration_changed_cb_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_start_scan_p", utc_bluetooth_bt_adapter_le_start_scan_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_stop_scan_p", utc_bluetooth_bt_adapter_le_stop_scan_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_p", utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_p", utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_service_data_p", utc_bluetooth_bt_adapter_le_add_advertising_service_data_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_appearance_p", utc_bluetooth_bt_adapter_le_add_advertising_appearance_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_p", utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_set_advertising_device_name_p", utc_bluetooth_bt_adapter_le_set_advertising_device_name_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_p", utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_start_advertising_new_p", utc_bluetooth_bt_adapter_le_start_advertising_new_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_set_advertising_mode_p", utc_bluetooth_bt_adapter_le_set_advertising_mode_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_le_set_advertising_connectable_p", utc_bluetooth_bt_adapter_le_set_advertising_connectable_p, utc_bluetooth_adapter_positive_startup, utc_bluetooth_adapter_positive_cleanup},
+    {"utc_bluetooth_bt_audio_connect_n", utc_bluetooth_bt_audio_connect_n, utc_bluetooth_bt_audio_negative_startup, utc_bluetooth_bt_audio_negative_cleanup},
+    {"utc_bluetooth_bt_audio_disconnect_n", utc_bluetooth_bt_audio_disconnect_n, utc_bluetooth_bt_audio_negative_startup, utc_bluetooth_bt_audio_negative_cleanup},
+    {"utc_bluetooth_bt_audio_set_connection_state_changed_cb_n", utc_bluetooth_bt_audio_set_connection_state_changed_cb_n, utc_bluetooth_bt_audio_negative_startup, utc_bluetooth_bt_audio_negative_cleanup},
+    {"utc_bluetooth_bt_audio_set_connection_state_changed_cb_n1", utc_bluetooth_bt_audio_set_connection_state_changed_cb_n1, utc_bluetooth_bt_audio_negative_startup, utc_bluetooth_bt_audio_negative_cleanup},
+    {"utc_bluetooth_bt_audio_deinitialize_n", utc_bluetooth_bt_audio_deinitialize_n, utc_bluetooth_bt_audio_negative_startup, utc_bluetooth_bt_audio_negative_cleanup},
+    {"utc_bluetooth_bt_audio_initialize_n", utc_bluetooth_bt_audio_initialize_n, utc_bluetooth_bt_audio_negative_startup, utc_bluetooth_bt_audio_negative_cleanup},
+    {"utc_bluetooth_bt_audio_unset_connection_state_changed_cb_n", utc_bluetooth_bt_audio_unset_connection_state_changed_cb_n, utc_bluetooth_bt_audio_negative_startup, utc_bluetooth_bt_audio_negative_cleanup},
+    {"utc_bluetooth_bt_audio_initialize_p", utc_bluetooth_bt_audio_initialize_p, utc_bluetooth_audio_positive_startup, utc_bluetooth_audio_positive_cleanup},
+    {"utc_bluetooth_bt_audio_set_connection_state_changed_cb_p", utc_bluetooth_bt_audio_set_connection_state_changed_cb_p, utc_bluetooth_audio_positive_startup, utc_bluetooth_audio_positive_cleanup},
+    {"utc_bluetooth_bt_audio_unset_connection_state_changed_cb_p", utc_bluetooth_bt_audio_unset_connection_state_changed_cb_p, utc_bluetooth_audio_positive_startup, utc_bluetooth_audio_positive_cleanup},
+    {"utc_bluetooth_bt_audio_deinitialize_p", utc_bluetooth_bt_audio_deinitialize_p, utc_bluetooth_audio_positive_startup, utc_bluetooth_audio_positive_cleanup},
+    {"utc_bluetooth_bt_initialize_p", utc_bluetooth_bt_initialize_p, utc_bluetooth_common_startup, utc_bluetooth_common_cleanup},
+    {"utc_bluetooth_bt_deinitialize_p", utc_bluetooth_bt_deinitialize_p, utc_bluetooth_common_startup, utc_bluetooth_common_cleanup},
+    {"utc_bluetooth_bt_adapter_stop_device_discovery_n1", utc_bluetooth_bt_adapter_stop_device_discovery_n1, utc_bluetooth_device_discovery_negative_startup, utc_bluetooth_device_discovery_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_unset_device_discovery_state_changed_cb_n1", utc_bluetooth_bt_adapter_unset_device_discovery_state_changed_cb_n1, utc_bluetooth_device_discovery_negative_startup, utc_bluetooth_device_discovery_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_n", utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_n, utc_bluetooth_device_discovery_negative_startup, utc_bluetooth_device_discovery_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_n1", utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_n1, utc_bluetooth_device_discovery_negative_startup, utc_bluetooth_device_discovery_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_start_device_discovery_n1", utc_bluetooth_bt_adapter_start_device_discovery_n1, utc_bluetooth_device_discovery_negative_startup, utc_bluetooth_device_discovery_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_is_discovering_n1", utc_bluetooth_bt_adapter_is_discovering_n1, utc_bluetooth_device_discovery_negative_startup, utc_bluetooth_device_discovery_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_is_discovering_n2", utc_bluetooth_bt_adapter_is_discovering_n2, utc_bluetooth_device_discovery_negative_startup, utc_bluetooth_device_discovery_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_is_discovering_p", utc_bluetooth_bt_adapter_is_discovering_p, utc_bluetooth_device_discovery_positive_startup, utc_bluetooth_device_discovery_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_p", utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_p, utc_bluetooth_device_discovery_positive_startup, utc_bluetooth_device_discovery_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_start_device_discovery_p", utc_bluetooth_bt_adapter_start_device_discovery_p, utc_bluetooth_device_discovery_positive_startup, utc_bluetooth_device_discovery_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_unset_device_discovery_state_changed_cb_p", utc_bluetooth_bt_adapter_unset_device_discovery_state_changed_cb_p, utc_bluetooth_device_discovery_positive_startup, utc_bluetooth_device_discovery_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_stop_device_discovery_p", utc_bluetooth_bt_adapter_stop_device_discovery_p, utc_bluetooth_device_discovery_positive_startup, utc_bluetooth_device_discovery_positive_cleanup},
+    {"utc_bluetooth_bt_device_set_bond_created_cb_n", utc_bluetooth_bt_device_set_bond_created_cb_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_set_bonded_cb_n1", utc_bluetooth_bt_device_set_bonded_cb_n1, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_set_bond_destroyed_cb_n", utc_bluetooth_bt_device_set_bond_destroyed_cb_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_set_authorization_changed_cb_n", utc_bluetooth_bt_device_set_authorization_changed_cb_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_set_authorization_changed_cb_n1", utc_bluetooth_bt_device_set_authorization_changed_cb_n1, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_unset_bond_created_cb_n", utc_bluetooth_bt_device_unset_bond_created_cb_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_unset_bond_destroyed_cb_n", utc_bluetooth_bt_device_unset_bond_destroyed_cb_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_unset_authorization_changed_cb_n", utc_bluetooth_bt_device_unset_authorization_changed_cb_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_create_bond_n", utc_bluetooth_bt_device_create_bond_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_create_bond_n1", utc_bluetooth_bt_device_create_bond_n1, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_cancel_bonding_n", utc_bluetooth_bt_device_cancel_bonding_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_destroy_bond_n", utc_bluetooth_bt_device_destroy_bond_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_foreach_bonded_device_n1", utc_bluetooth_bt_adapter_foreach_bonded_device_n1, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_adapter_foreach_bonded_device_n2", utc_bluetooth_bt_adapter_foreach_bonded_device_n2, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_set_alias_n", utc_bluetooth_bt_device_set_alias_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_set_alias_n2", utc_bluetooth_bt_device_set_alias_n2, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_set_authorization_n", utc_bluetooth_bt_device_set_authorization_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_set_authorization_n2", utc_bluetooth_bt_device_set_authorization_n2, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_get_service_mask_from_uuid_list_n", utc_bluetooth_bt_device_get_service_mask_from_uuid_list_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_is_profile_connected_n", utc_bluetooth_bt_device_is_profile_connected_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_set_connection_state_changed_cb_n", utc_bluetooth_bt_device_set_connection_state_changed_cb_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_unset_connection_state_changed_cb_n", utc_bluetooth_bt_device_unset_connection_state_changed_cb_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_foreach_connected_profiles_n", utc_bluetooth_bt_device_foreach_connected_profiles_n, utc_bluetooth_device_negative_startup, utc_bluetooth_device_negative_cleanup},
+    {"utc_bluetooth_bt_device_set_bond_created_cb_p", utc_bluetooth_bt_device_set_bond_created_cb_p, utc_bluetooth_device_positive_startup, utc_bluetooth_device_positive_cleanup},
+    {"utc_bluetooth_bt_device_set_bond_destroyed_cb_p", utc_bluetooth_bt_device_set_bond_destroyed_cb_p, utc_bluetooth_device_positive_startup, utc_bluetooth_device_positive_cleanup},
+    {"utc_bluetooth_bt_device_set_authorization_changed_cb_p", utc_bluetooth_bt_device_set_authorization_changed_cb_p, utc_bluetooth_device_positive_startup, utc_bluetooth_device_positive_cleanup},
+    {"utc_bluetooth_bt_device_get_service_mask_from_uuid_list_p", utc_bluetooth_bt_device_get_service_mask_from_uuid_list_p, utc_bluetooth_device_positive_startup, utc_bluetooth_device_positive_cleanup},
+    {"utc_bluetooth_bt_device_is_profile_connected_p", utc_bluetooth_bt_device_is_profile_connected_p, utc_bluetooth_device_positive_startup, utc_bluetooth_device_positive_cleanup},
+    {"utc_bluetooth_bt_device_unset_bond_created_cb_p", utc_bluetooth_bt_device_unset_bond_created_cb_p, utc_bluetooth_device_positive_startup, utc_bluetooth_device_positive_cleanup},
+    {"utc_bluetooth_bt_adapter_foreach_bonded_device_p", utc_bluetooth_bt_adapter_foreach_bonded_device_p, utc_bluetooth_device_positive_startup, utc_bluetooth_device_positive_cleanup},
+    {"utc_bluetooth_bt_device_unset_bond_destroyed_cb_p", utc_bluetooth_bt_device_unset_bond_destroyed_cb_p, utc_bluetooth_device_positive_startup, utc_bluetooth_device_positive_cleanup},
+    {"utc_bluetooth_bt_device_unset_authorization_changed_cb_p", utc_bluetooth_bt_device_unset_authorization_changed_cb_p, utc_bluetooth_device_positive_startup, utc_bluetooth_device_positive_cleanup},
+    {"utc_bluetooth_bt_device_set_connection_state_changed_cb_p", utc_bluetooth_bt_device_set_connection_state_changed_cb_p, utc_bluetooth_device_positive_startup, utc_bluetooth_device_positive_cleanup},
+    {"utc_bluetooth_bt_device_unset_connection_state_changed_cb_p", utc_bluetooth_bt_device_unset_connection_state_changed_cb_p, utc_bluetooth_device_positive_startup, utc_bluetooth_device_positive_cleanup},
+    {"utc_bluetooth_bt_gatt_connect_n", utc_bluetooth_bt_gatt_connect_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_disconnect_n", utc_bluetooth_bt_gatt_disconnect_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_connect_n1", utc_bluetooth_bt_gatt_connect_n1, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_disconnect_n1", utc_bluetooth_bt_gatt_disconnect_n1, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_set_connection_state_changed_cb_n", utc_bluetooth_bt_gatt_set_connection_state_changed_cb_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_unset_connection_state_changed_cb_n", utc_bluetooth_bt_gatt_unset_connection_state_changed_cb_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_get_value_n", utc_bluetooth_bt_gatt_get_value_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_get_int_value_n", utc_bluetooth_bt_gatt_get_int_value_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_get_float_value_n", utc_bluetooth_bt_gatt_get_float_value_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_set_value_n", utc_bluetooth_bt_gatt_set_value_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_set_int_value_n", utc_bluetooth_bt_gatt_set_int_value_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_set_float_value_n", utc_bluetooth_bt_gatt_set_float_value_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_get_uuid_n", utc_bluetooth_bt_gatt_get_uuid_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_get_type_n", utc_bluetooth_bt_gatt_get_type_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_service_get_client_n", utc_bluetooth_bt_gatt_service_get_client_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_service_get_characteristic_n", utc_bluetooth_bt_gatt_service_get_characteristic_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_service_foreach_characteristics_n", utc_bluetooth_bt_gatt_service_foreach_characteristics_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_service_get_included_service_n", utc_bluetooth_bt_gatt_service_get_included_service_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_service_foreach_included_services_n", utc_bluetooth_bt_gatt_service_foreach_included_services_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_characteristic_get_service_n", utc_bluetooth_bt_gatt_characteristic_get_service_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_characteristic_get_properties_n", utc_bluetooth_bt_gatt_characteristic_get_properties_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_characteristic_set_properties_n", utc_bluetooth_bt_gatt_characteristic_set_properties_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_characteristic_get_write_type_n", utc_bluetooth_bt_gatt_characteristic_get_write_type_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_characteristic_set_write_type_n", utc_bluetooth_bt_gatt_characteristic_set_write_type_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_characteristic_get_descriptor_n", utc_bluetooth_bt_gatt_characteristic_get_descriptor_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_characteristic_foreach_descriptors_n", utc_bluetooth_bt_gatt_characteristic_foreach_descriptors_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_descriptor_get_characteristic_n", utc_bluetooth_bt_gatt_descriptor_get_characteristic_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_client_create_n", utc_bluetooth_bt_gatt_client_create_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_client_destroy_n", utc_bluetooth_bt_gatt_client_destroy_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_client_get_remote_address_n", utc_bluetooth_bt_gatt_client_get_remote_address_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_client_read_value_n", utc_bluetooth_bt_gatt_client_read_value_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_client_write_value_n", utc_bluetooth_bt_gatt_client_write_value_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_client_set_characteristic_value_changed_cb_n", utc_bluetooth_bt_gatt_client_set_characteristic_value_changed_cb_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_client_unset_characteristic_value_changed_cb_n", utc_bluetooth_bt_gatt_client_unset_characteristic_value_changed_cb_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_client_get_service_n", utc_bluetooth_bt_gatt_client_get_service_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_client_foreach_services_n", utc_bluetooth_bt_gatt_client_foreach_services_n, utc_bluetooth_gatt_negative_startup, utc_bluetooth_gatt_negative_cleanup},
+    {"utc_bluetooth_bt_gatt_set_connection_state_changed_cb_p", utc_bluetooth_bt_gatt_set_connection_state_changed_cb_p, utc_bluetooth_gatt_positive_startup, utc_bluetooth_gatt_positive_cleanup},
+    {"utc_bluetooth_bt_gatt_unset_connection_state_changed_cb_p", utc_bluetooth_bt_gatt_unset_connection_state_changed_cb_p, utc_bluetooth_gatt_positive_startup, utc_bluetooth_gatt_positive_cleanup},
+    {"utc_bluetooth_bt_hdp_set_data_received_cb_n", utc_bluetooth_bt_hdp_set_data_received_cb_n, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_set_data_received_cb_n1", utc_bluetooth_bt_hdp_set_data_received_cb_n1, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_set_connection_state_changed_cb_n", utc_bluetooth_bt_hdp_set_connection_state_changed_cb_n, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_set_connection_state_changed_cb_n1", utc_bluetooth_bt_hdp_set_connection_state_changed_cb_n1, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_disconnect_n", utc_bluetooth_bt_hdp_disconnect_n, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_connect_to_source_n", utc_bluetooth_bt_hdp_connect_to_source_n, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_connect_to_source_n2", utc_bluetooth_bt_hdp_connect_to_source_n2, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_register_sink_app_n", utc_bluetooth_bt_hdp_register_sink_app_n, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_unregister_sink_app_n", utc_bluetooth_bt_hdp_unregister_sink_app_n, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_unregister_sink_app_n1", utc_bluetooth_bt_hdp_unregister_sink_app_n1, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_send_data_n", utc_bluetooth_bt_hdp_send_data_n, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_unset_connection_state_changed_cb_n", utc_bluetooth_bt_hdp_unset_connection_state_changed_cb_n, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_unset_data_received_cb_n", utc_bluetooth_bt_hdp_unset_data_received_cb_n, utc_bluetooth_hdp_negative_startup, utc_bluetooth_hdp_negative_cleanup},
+    {"utc_bluetooth_bt_hdp_set_data_received_cb_p", utc_bluetooth_bt_hdp_set_data_received_cb_p, utc_bluetooth_hdp_positive_startup, utc_bluetooth_hdp_positive_cleanup},
+    {"utc_bluetooth_bt_hdp_unset_data_received_cb_p", utc_bluetooth_bt_hdp_unset_data_received_cb_p, utc_bluetooth_hdp_positive_startup, utc_bluetooth_hdp_positive_cleanup},
+    {"utc_bluetooth_bt_hdp_set_connection_state_changed_cb_p", utc_bluetooth_bt_hdp_set_connection_state_changed_cb_p, utc_bluetooth_hdp_positive_startup, utc_bluetooth_hdp_positive_cleanup},
+    {"utc_bluetooth_bt_hdp_unset_connection_state_changed_cb_p", utc_bluetooth_bt_hdp_unset_connection_state_changed_cb_p, utc_bluetooth_hdp_positive_startup, utc_bluetooth_hdp_positive_cleanup},
+    {"utc_bluetooth_bt_hdp_unregister_sink_app_p", utc_bluetooth_bt_hdp_unregister_sink_app_p, utc_bluetooth_hdp_positive_startup, utc_bluetooth_hdp_positive_cleanup},
+    {"utc_bluetooth_bt_hdp_register_sink_app_p", utc_bluetooth_bt_hdp_register_sink_app_p, utc_bluetooth_hdp_positive_startup, utc_bluetooth_hdp_positive_cleanup},
+    {"utc_bluetooth_bt_hid_host_initialize_n", utc_bluetooth_bt_hid_host_initialize_n, utc_bluetooth_hid_negative_startup, utc_bluetooth_hid_negative_cleanup},
+    {"utc_bluetooth_bt_hid_host_initialize_n1", utc_bluetooth_bt_hid_host_initialize_n1, utc_bluetooth_hid_negative_startup, utc_bluetooth_hid_negative_cleanup},
+    {"utc_bluetooth_bt_hid_host_connect_n", utc_bluetooth_bt_hid_host_connect_n, utc_bluetooth_hid_negative_startup, utc_bluetooth_hid_negative_cleanup},
+    {"utc_bluetooth_bt_hid_host_disconnect_n", utc_bluetooth_bt_hid_host_disconnect_n, utc_bluetooth_hid_negative_startup, utc_bluetooth_hid_negative_cleanup},
+    {"utc_bluetooth_bt_hid_host_deinitialize_n", utc_bluetooth_bt_hid_host_deinitialize_n, utc_bluetooth_hid_negative_startup, utc_bluetooth_hid_negative_cleanup},
+    {"utc_bluetooth_bt_hid_host_initialize_p", utc_bluetooth_bt_hid_host_initialize_p, utc_bluetooth_hid_positive_startup, utc_bluetooth_hid_positive_cleanup},
+    {"utc_bluetooth_bt_hid_host_deinitialize_p", utc_bluetooth_bt_hid_host_deinitialize_p, utc_bluetooth_hid_positive_startup, utc_bluetooth_hid_positive_cleanup},
+    {"utc_bluetooth_bt_opp_client_initialize_n", utc_bluetooth_bt_opp_client_initialize_n, utc_bluetooth_opp_client_negative_startup, utc_bluetooth_opp_client_negative_cleanup},
+    {"utc_bluetooth_bt_opp_client_deinitialize_n", utc_bluetooth_bt_opp_client_deinitialize_n, utc_bluetooth_opp_client_negative_startup, utc_bluetooth_opp_client_negative_cleanup},
+    {"utc_bluetooth_bt_opp_client_add_file_n", utc_bluetooth_bt_opp_client_add_file_n, utc_bluetooth_opp_client_negative_startup, utc_bluetooth_opp_client_negative_cleanup},
+    {"utc_bluetooth_bt_opp_client_add_file_n1", utc_bluetooth_bt_opp_client_add_file_n1, utc_bluetooth_opp_client_negative_startup, utc_bluetooth_opp_client_negative_cleanup},
+    {"utc_bluetooth_bt_opp_client_clear_files_n", utc_bluetooth_bt_opp_client_clear_files_n, utc_bluetooth_opp_client_negative_startup, utc_bluetooth_opp_client_negative_cleanup},
+    {"utc_bluetooth_bt_opp_client_push_files_n", utc_bluetooth_bt_opp_client_push_files_n, utc_bluetooth_opp_client_negative_startup, utc_bluetooth_opp_client_negative_cleanup},
+    {"utc_bluetooth_bt_opp_client_cancel_push_n", utc_bluetooth_bt_opp_client_cancel_push_n, utc_bluetooth_opp_client_negative_startup, utc_bluetooth_opp_client_negative_cleanup},
+    {"utc_bluetooth_bt_opp_client_initialize_p", utc_bluetooth_bt_opp_client_initialize_p, utc_bluetooth_opp_client_positive_startup, utc_bluetooth_opp_client_positive_cleanup},
+    {"utc_bluetooth_bt_opp_client_deinitialize_p", utc_bluetooth_bt_opp_client_deinitialize_p, utc_bluetooth_opp_client_positive_startup, utc_bluetooth_opp_client_positive_cleanup},
+    {"utc_bluetooth_bt_opp_client_clear_files_p", utc_bluetooth_bt_opp_client_clear_files_p, utc_bluetooth_opp_client_positive_startup, utc_bluetooth_opp_client_positive_cleanup},
+    {"utc_bluetooth_bt_opp_server_accept_n", utc_bluetooth_bt_opp_server_accept_n, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_accept_n1", utc_bluetooth_bt_opp_server_accept_n1, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_accept_n2", utc_bluetooth_bt_opp_server_accept_n2, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_reject_n", utc_bluetooth_bt_opp_server_reject_n, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_reject_n1", utc_bluetooth_bt_opp_server_reject_n1, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_set_destination_n", utc_bluetooth_bt_opp_server_set_destination_n, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_set_destination_n1", utc_bluetooth_bt_opp_server_set_destination_n1, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_set_destination_n2", utc_bluetooth_bt_opp_server_set_destination_n2, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_initialize_by_connection_request_n", utc_bluetooth_bt_opp_server_initialize_by_connection_request_n, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_initialize_by_connection_request_n1", utc_bluetooth_bt_opp_server_initialize_by_connection_request_n1, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_deinitialize_n", utc_bluetooth_bt_opp_server_deinitialize_n, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_deinitialize_n1", utc_bluetooth_bt_opp_server_deinitialize_n1, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_cancel_transfer_n", utc_bluetooth_bt_opp_server_cancel_transfer_n, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_cancel_transfer_n1", utc_bluetooth_bt_opp_server_cancel_transfer_n1, utc_bluetooth_bt_opp_server_negative_startup, utc_bluetooth_bt_opp_server_negative_cleanup},
+    {"utc_bluetooth_bt_opp_server_initialize_by_connection_request_p", utc_bluetooth_bt_opp_server_initialize_by_connection_request_p, utc_bluetooth_opp_server_positive_startup, utc_bluetooth_opp_server_positive_cleanup},
+    {"utc_bluetooth_bt_opp_server_deinitialize_p", utc_bluetooth_bt_opp_server_deinitialize_p, utc_bluetooth_opp_server_positive_startup, utc_bluetooth_opp_server_positive_cleanup},
+    {"utc_bluetooth_bt_opp_server_set_destination_p", utc_bluetooth_bt_opp_server_set_destination_p, utc_bluetooth_opp_server_positive_startup, utc_bluetooth_opp_server_positive_cleanup},
+    {"utc_bluetooth_bt_device_set_service_searched_cb_n", utc_bluetooth_bt_device_set_service_searched_cb_n, utc_bluetooth_service_search_negative_startup, utc_bluetooth_service_search_negative_cleanup},
+    {"utc_bluetooth_service_search_set_cb_n1", utc_bluetooth_service_search_set_cb_n1, utc_bluetooth_service_search_negative_startup, utc_bluetooth_service_search_negative_cleanup},
+    {"utc_bluetooth_bt_device_unset_service_searched_cb_n", utc_bluetooth_bt_device_unset_service_searched_cb_n, utc_bluetooth_service_search_negative_startup, utc_bluetooth_service_search_negative_cleanup},
+    {"utc_bluetooth_bt_device_start_service_search_n", utc_bluetooth_bt_device_start_service_search_n, utc_bluetooth_service_search_negative_startup, utc_bluetooth_service_search_negative_cleanup},
+    {"utc_bluetooth_bt_device_set_service_searched_cb_p", utc_bluetooth_bt_device_set_service_searched_cb_p, utc_bluetooth_service_search_positive_startup, utc_bluetooth_service_search_positive_cleanup},
+    {"utc_bluetooth_bt_device_unset_service_searched_cb_p", utc_bluetooth_bt_device_unset_service_searched_cb_p, utc_bluetooth_service_search_positive_startup, utc_bluetooth_service_search_positive_cleanup},
+    {"utc_bluetooth_bt_socket_set_data_received_cb_n", utc_bluetooth_bt_socket_set_data_received_cb_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_set_data_received_cb_n1", utc_bluetooth_bt_socket_set_data_received_cb_n1, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_set_connection_state_changed_cb_n", utc_bluetooth_bt_socket_set_connection_state_changed_cb_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_set_connection_state_changed_cb_n1", utc_bluetooth_bt_socket_set_connection_state_changed_cb_n1, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_unset_data_received_cb_n", utc_bluetooth_bt_socket_unset_data_received_cb_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_unset_connection_state_changed_cb_n", utc_bluetooth_bt_socket_unset_connection_state_changed_cb_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_create_rfcomm_n", utc_bluetooth_bt_socket_create_rfcomm_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_create_rfcomm_n1", utc_bluetooth_bt_socket_create_rfcomm_n1, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_destroy_rfcomm_n", utc_bluetooth_bt_socket_destroy_rfcomm_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_listen_and_accept_rfcomm_n", utc_bluetooth_bt_socket_listen_and_accept_rfcomm_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_connect_rfcomm_n", utc_bluetooth_bt_socket_connect_rfcomm_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_disconnect_rfcomm_n", utc_bluetooth_bt_socket_disconnect_rfcomm_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_send_data_n", utc_bluetooth_bt_socket_send_data_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_set_connection_requested_cb_n", utc_bluetooth_bt_socket_set_connection_requested_cb_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_unset_connection_requested_cb_n", utc_bluetooth_bt_socket_unset_connection_requested_cb_n, utc_bluetooth_socket_negative_startup, utc_bluetooth_socket_negative_cleanup},
+    {"utc_bluetooth_bt_socket_set_data_received_cb_p", utc_bluetooth_bt_socket_set_data_received_cb_p, utc_bluetooth_bt_socket_positive_startup, utc_bluetooth_bt_socket_positive_cleanup},
+    {"utc_bluetooth_bt_socket_set_connection_state_changed_cb_p", utc_bluetooth_bt_socket_set_connection_state_changed_cb_p, utc_bluetooth_bt_socket_positive_startup, utc_bluetooth_bt_socket_positive_cleanup},
+    {"utc_bluetooth_bt_socket_create_rfcomm_p", utc_bluetooth_bt_socket_create_rfcomm_p, utc_bluetooth_bt_socket_positive_startup, utc_bluetooth_bt_socket_positive_cleanup},
+    {"utc_bluetooth_bt_socket_listen_and_accept_rfcomm_p", utc_bluetooth_bt_socket_listen_and_accept_rfcomm_p, utc_bluetooth_bt_socket_positive_startup, utc_bluetooth_bt_socket_positive_cleanup},
+    {"utc_bluetooth_bt_socket_destroy_rfcomm_p", utc_bluetooth_bt_socket_destroy_rfcomm_p, utc_bluetooth_bt_socket_positive_startup, utc_bluetooth_bt_socket_positive_cleanup},
+    {"utc_bluetooth_bt_socket_unset_data_received_cb_p", utc_bluetooth_bt_socket_unset_data_received_cb_p, utc_bluetooth_bt_socket_positive_startup, utc_bluetooth_bt_socket_positive_cleanup},
+    {"utc_bluetooth_bt_socket_unset_connection_state_changed_cb_p", utc_bluetooth_bt_socket_unset_connection_state_changed_cb_p, utc_bluetooth_bt_socket_positive_startup, utc_bluetooth_bt_socket_positive_cleanup},
+    {"utc_bluetooth_bt_socket_set_connection_requested_cb_p", utc_bluetooth_bt_socket_set_connection_requested_cb_p, utc_bluetooth_bt_socket_positive_startup, utc_bluetooth_bt_socket_positive_cleanup},
+    {"utc_bluetooth_bt_socket_unset_connection_requested_cb_p", utc_bluetooth_bt_socket_unset_connection_requested_cb_p, utc_bluetooth_bt_socket_positive_startup, utc_bluetooth_bt_socket_positive_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_BLUETOOTH_CORE_H__
diff --git a/src/utc/bluetooth/utc_bluetooth_adapter_negative.c b/src/utc/bluetooth/utc_bluetooth_adapter_negative.c
new file mode 100755 (executable)
index 0000000..9da89b3
--- /dev/null
@@ -0,0 +1,993 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <time.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothAdapterNegative
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool le_supported = false;
+static bool bt_supported = false;
+
+void utc_bluetooth_adapter_negative_startup(void)
+{    
+    startup_flag = BT_ERROR_NONE;
+
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    le_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.le", &le_supported);
+
+    if(bt_supported) {
+
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }        
+    }
+}
+
+void utc_bluetooth_adapter_negative_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+int utc_bluetooth_bt_deinitialize_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_state_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_state_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_set_state_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_state_changed_cb_n1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_set_state_changed_cb(NULL, NULL);
+        assert_eq(ret,BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_set_state_changed_cb(NULL, NULL);
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_name_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_name_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_set_name_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_name_changed_cb_n1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_set_name_changed_cb(NULL, NULL);
+        assert_eq(ret,BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_set_name_changed_cb(NULL, NULL);
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_visibility_mode_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_set_visibility_mode_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_n1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_set_visibility_mode_changed_cb(NULL, NULL);
+        assert_eq(ret,BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_set_visibility_mode_changed_cb(NULL, NULL);
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_state_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_get_state(NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_get_state(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_state_n1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_get_state(NULL);
+        assert_eq(ret,BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_get_state(NULL);
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_address_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_get_address(NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_get_address(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_address_n1(void)
+{
+    char *address = NULL;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_get_address(&address);
+        assert_eq(ret,BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_get_address(&address);
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_name_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_get_name(NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_get_name(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_name_n1(void)
+{
+    char *name = NULL;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_get_name(&name);
+        assert_eq(ret,BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_get_name(&name);
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_visibility_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_get_visibility(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_get_visibility(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_visibility_n1(void)
+{
+    int dur = 10;
+    bt_adapter_visibility_mode_e mode =
+        BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_get_visibility(&mode, &dur);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_get_visibility(&mode, &dur);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_name_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_name(NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_set_name(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_name_n1(void)
+{
+    char *name = "Test name";
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_set_name(name);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_set_name(name);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_unset_state_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_unset_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_unset_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_unset_name_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_unset_name_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_unset_name_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_unset_visibility_mode_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_unset_visibility_mode_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_unset_visibility_mode_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_local_oob_data_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_get_local_oob_data(NULL, NULL, NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_get_local_oob_data(NULL, NULL, NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+
+}
+
+int utc_bluetooth_bt_adapter_is_service_used_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_is_service_used(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_is_service_used(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);    
+    }    
+
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_visibility_duration_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_visibility_duration_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_set_visibility_duration_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_create_advertiser_n(void)
+{ 
+    bt_advertiser_h advertiser = NULL;
+    
+    if(le_supported) {
+
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_create_advertiser(&advertiser);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_le_create_advertiser(&advertiser);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }   
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_destroy_advertiser_n(void)
+{
+    bt_advertiser_h advertiser = NULL;
+
+    if(le_supported) {
+
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_destroy_advertiser(&advertiser);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_le_destroy_advertiser(&advertiser);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_stop_advertising_n(void)
+{
+    bt_advertiser_h advertiser = NULL;
+
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_stop_advertising(advertiser);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_le_stop_advertising(advertiser);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_add_advertising_data_n(void)
+{
+    bt_advertiser_h first_advertiser = NULL;
+
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_add_advertising_data(first_advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING,
+                       0x03, NULL,0);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_le_add_advertising_data(first_advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING,
+                       0x03, NULL,0);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_clear_advertising_data_n(void)
+{
+    bt_advertiser_h advertiser = NULL;
+
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_clear_advertising_data(advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_le_clear_advertising_data(advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_remove_advertising_data_n(void)
+{
+    bt_advertiser_h advertiser = NULL;
+
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_remove_advertising_data(advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING,
+                       0x03);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_le_remove_advertising_data(advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING,
+                       0x03);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+static void bt_adapter_vd_changed_cb(int duration, void *user_data)
+{
+
+}
+
+int utc_bluetooth_bt_adapter_unset_visibility_duration_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_visibility_duration_changed_cb(bt_adapter_vd_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_unset_visibility_duration_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_unset_visibility_duration_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_bonded_device_info_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_get_bonded_device_info(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_get_bonded_device_info(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_free_device_info_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_free_device_info(NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_free_device_info(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_remote_oob_data_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_remote_oob_data(NULL, NULL, NULL, 0,0);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_set_remote_oob_data(NULL, NULL, NULL, 0,0);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_remove_remote_oob_data_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_remove_remote_oob_data(NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_remove_remote_oob_data(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+
+int utc_bluetooth_bt_adapter_le_start_scan_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_start_scan(NULL, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_start_scan(NULL, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_stop_scan_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_deinitialize();
+               assert_eq(ret, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_stop_scan();
+               assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+       } else {
+               ret = bt_adapter_le_stop_scan();
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_get_scan_result_service_uuids_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_get_scan_result_service_uuids(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_get_scan_result_service_uuids(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_get_scan_result_device_name_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_get_scan_result_device_name(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_get_scan_result_device_name(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_bluetooth_bt_adapter_le_get_scan_result_tx_power_level_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_get_scan_result_tx_power_level(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+
+       } else {
+               ret = bt_adapter_le_get_scan_result_tx_power_level(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_get_scan_result_service_solicitation_uuids_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_get_scan_result_service_solicitation_uuids(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_get_scan_result_service_solicitation_uuids(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_get_scan_result_service_data_list_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_get_scan_result_service_data_list(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_get_scan_result_service_data_list(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_free_service_data_list_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_free_service_data_list(NULL, 0);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_free_service_data_list(NULL, 0);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_get_scan_result_appearance_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_get_scan_result_appearance(NULL,
+                                               BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_get_scan_result_appearance(NULL,
+                                               BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_get_scan_result_manufacturer_data_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_get_scan_result_manufacturer_data(NULL,
+                                       BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, NULL, NULL, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_get_scan_result_manufacturer_data(NULL,
+                                       BT_ADAPTER_LE_PACKET_SCAN_RESPONSE, NULL, NULL, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_add_advertising_service_uuid(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_add_advertising_service_uuid(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_add_advertising_service_solicitation_uuid(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_add_advertising_service_solicitation_uuid(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_bluetooth_bt_adapter_le_add_advertising_service_data_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_add_advertising_service_data(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL, NULL, 0);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_add_advertising_service_data(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, NULL, NULL, 0);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_add_advertising_appearance_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_set_advertising_appearance(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, 0);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_set_advertising_appearance(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, 0);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_add_advertising_manufacturer_data(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, 0, NULL, 0);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_add_advertising_manufacturer_data(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, 0, NULL, 0);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_set_advertising_device_name_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_set_advertising_device_name(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, false);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_set_advertising_device_name(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, false);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_set_advertising_tx_power_level(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, false);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_set_advertising_tx_power_level(NULL,
+                                               BT_ADAPTER_LE_PACKET_ADVERTISING, false);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_bluetooth_bt_adapter_le_start_advertising_new_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_start_advertising_new(NULL, NULL, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_start_advertising_new(NULL, NULL, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_set_advertising_mode_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_set_advertising_mode(NULL,
+                                               BT_ADAPTER_LE_ADVERTISING_MODE_BALANCED);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_set_advertising_mode(NULL,
+                                               BT_ADAPTER_LE_ADVERTISING_MODE_BALANCED);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_set_advertising_connectable_n(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_set_advertising_connectable(NULL, false);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_adapter_le_set_advertising_connectable(NULL, false);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_adapter_positive.c b/src/utc/bluetooth/utc_bluetooth_adapter_positive.c
new file mode 100755 (executable)
index 0000000..71d3fdf
--- /dev/null
@@ -0,0 +1,897 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <time.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothAdapterPositive
+
+static int startup_flag = BT_ERROR_NONE;
+static GMainLoop *mainloop = NULL;
+static int ret = BT_ERROR_NONE;
+static bool callback_result = false;
+static char adapter_name[128] = "dts_test";
+static bool le_supported = false;
+static bool bt_supported = false;
+
+/**
+* @brief test_for_add_advertising_data
+*/
+static int adv_data_type = 3;
+static int manufacturer_id = 117;
+static char *manufacture = NULL;
+static char manufacture_0[] = {0x0, 0x0, 0x0, 0x0};
+static char manufacture_1[] = {0x01, 0x01, 0x01, 0x01};
+static char manufacture_2[] = {0x02, 0x02, 0x02, 0x02};
+static char manufacture_3[] = {0x03, 0x03, 0x03, 0x03};
+static char service_data[] = {0x01, 0x02, 0x03};
+static const char *time_svc_uuid_16 = "1805";
+static const char *battery_svc_uuid_16 = "180f";
+static const char *heart_rate_svc_uuid_16 = "180d";
+static const char *lmmediate_alert_svc_uuid_16 = "1802";
+static const char *ancs_uuid_128 = "7905F431-B5CE-4E99-A40F-4B1E122D00D0";
+static int appearance = 192;  // 192 is generic watch
+
+/**
+ * @brief Callback funtions
+ */
+static void adapter_state_changed_cb_for_adapter_p(int result,
+                        bt_adapter_state_e adapter_state,
+                        void *user_data)
+{
+    if(user_data != NULL) {
+        if(!strcmp((char *)user_data, "enable")) {
+            if(BT_ADAPTER_ENABLED == adapter_state) {
+                callback_result = true;
+            }
+        } else if(!strcmp((char *)user_data, "disable")) {
+            if(BT_ADAPTER_DISABLED == adapter_state) {
+                callback_result = true;
+            }
+        }
+    }
+
+    if (mainloop) {
+        g_main_loop_quit(mainloop);
+    }
+}
+
+static void adapter_name_changed_cb_for_adapter_p(char *device_name, void *user_data)
+{
+    if (user_data != NULL && !strcmp((char *)user_data, "set_name")) {
+        if (!strcmp(device_name, adapter_name)) {
+             callback_result = true;
+        } else {
+            fprintf(stderr,"device_name: %s \n", device_name);
+            fprintf(stderr,"adapter_name: %s \n", adapter_name);
+        }
+    }
+
+    if (mainloop) {
+        g_main_loop_quit(mainloop);
+    }
+}
+
+static void adapter_visibility_mode_changed_cb_for_adpater_p(int result,
+                    bt_adapter_visibility_mode_e visibility_mode,
+                    void *user_data)
+{
+    fprintf(stderr, "adapter_visibility_mode_changed_cb_for_adpater_p was called.\n");
+
+    callback_result = true;
+
+    if (mainloop) {
+         g_main_loop_quit(mainloop);
+    }
+}
+
+static gboolean timeout_func(gpointer data)
+{
+    g_main_loop_quit((GMainLoop *)data);
+    return FALSE;
+}
+
+static void wait_for_async()
+{
+    int timeout_id = 0;
+    mainloop = g_main_loop_new(NULL, FALSE);
+
+    timeout_id = g_timeout_add(5000, timeout_func, mainloop);
+    g_main_loop_run(mainloop);
+    g_source_remove(timeout_id);
+}
+
+void utc_bluetooth_adapter_positive_startup(void)
+{
+    bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+    startup_flag = BT_ERROR_NONE;
+
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    le_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.le", &le_supported);
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+
+        callback_result = false;
+
+        ret = bt_adapter_get_state(&adapter_state);
+        if (adapter_state != BT_ADAPTER_ENABLED) {
+                fprintf(stdout, "BT is not enabled!!");
+                startup_flag = BT_ERROR_NOT_ENABLED;
+        }
+    }
+}
+
+void utc_bluetooth_adapter_positive_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+int utc_bluetooth_bt_adapter_set_state_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_adapter_set_state_changed_cb(adapter_state_changed_cb_for_adapter_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_set_state_changed_cb(adapter_state_changed_cb_for_adapter_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_name_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+       ret = bt_adapter_set_name_changed_cb(adapter_name_changed_cb_for_adapter_p, NULL);
+       assert_eq(ret, BT_ERROR_NONE);
+       
+        ret = bt_adapter_unset_name_changed_cb();
+        assert_eq(ret,BT_ERROR_NONE);
+    } else {
+       ret = bt_adapter_set_name_changed_cb(adapter_name_changed_cb_for_adapter_p, NULL);
+       assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_name_changed_cb_p1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_name_changed_cb(adapter_name_changed_cb_for_adapter_p, "set_name");
+        assert_eq(ret,BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_set_name_changed_cb(adapter_name_changed_cb_for_adapter_p, "set_name");
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_visibility_mode_changed_cb(
+                       adapter_visibility_mode_changed_cb_for_adpater_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_unset_visibility_mode_changed_cb();
+        assert_eq(ret,BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_set_visibility_mode_changed_cb(
+                       adapter_visibility_mode_changed_cb_for_adpater_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_visibility_mode_changed_cb_p1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_adapter_set_visibility_mode_changed_cb(adapter_visibility_mode_changed_cb_for_adpater_p, NULL);
+        assert_eq(ret,BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_set_visibility_mode_changed_cb(adapter_visibility_mode_changed_cb_for_adpater_p, NULL);
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_state_p(void)
+{
+    bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_get_state(&adapter_state);
+        assert_eq(ret,BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_get_state(&adapter_state);
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_address_p(void)
+{
+    char *address = NULL;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_get_address(&address);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        free(address);
+        address = NULL;
+    } else {
+        ret = bt_adapter_get_address(&address);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+
+int utc_bluetooth_bt_adapter_get_name_p(void)
+{
+    char *name = NULL;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_get_name(&name);
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_get_name(&name);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_visibility_p(void)
+{
+    int dur = 1;
+    bt_adapter_visibility_mode_e mode = BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_get_visibility(&mode, &dur);
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_get_visibility(&mode, &dur);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_name_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_name(adapter_name);
+        assert_eq(ret,BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_set_name(adapter_name);
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_unset_state_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_state_changed_cb(adapter_state_changed_cb_for_adapter_p, NULL);
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_unset_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_unset_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_unset_name_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_name_changed_cb(adapter_name_changed_cb_for_adapter_p, NULL);
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_unset_name_changed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_unset_name_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_unset_visibility_mode_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_visibility_mode_changed_cb(adapter_visibility_mode_changed_cb_for_adpater_p, NULL);
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_unset_visibility_mode_changed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_unset_visibility_mode_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_get_local_oob_data_p(void)
+{
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    unsigned char *hash = NULL;
+    unsigned char *randomizer = NULL;
+    int hash_len = 0;
+    int randomizer_len = 0;
+
+    if(bt_supported) {
+        ret = bt_adapter_get_local_oob_data(&hash, &randomizer, &hash_len, &randomizer_len);
+
+        free(hash);
+        hash = NULL;
+
+        free(randomizer);
+        randomizer = NULL;
+
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_get_local_oob_data(&hash, &randomizer, &hash_len, &randomizer_len);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_is_service_used_p(void)
+{
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    bool used = false;
+    const char *service_uuid = "00001105-0000-1000-8000-00805f9b34fb";
+
+    if(bt_supported) {
+        ret = bt_adapter_is_service_used(service_uuid, &used);
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_is_service_used(service_uuid, &used);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_add_advertising_data_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_adapter_le_create_advertiser(&advertiser);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_add_advertising_data(advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING,
+                       0x03, "ab", 2);
+
+        bt_adapter_le_destroy_advertiser(advertiser);
+
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_le_add_advertising_data(advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING,
+                       0x03, "ab", 2);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_clear_advertising_data_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_adapter_le_create_advertiser(&advertiser);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_clear_advertising_data(advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING);
+
+        bt_adapter_le_destroy_advertiser(advertiser);
+
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_le_create_advertiser(&advertiser);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_remove_advertising_data_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_adapter_le_create_advertiser(&advertiser);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_add_advertising_data(advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING,
+                       0x03, "ab", 2);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_remove_advertising_data(advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING,
+                       0x03);
+
+        bt_adapter_le_destroy_advertiser(advertiser);
+
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_le_remove_advertising_data(advertiser, BT_ADAPTER_LE_PACKET_ADVERTISING,
+                       0x03);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+static void bt_adapter_vd_changed_cb(int duration, void *user_data)
+{
+
+}
+
+int utc_bluetooth_bt_adapter_set_visibility_duration_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_visibility_duration_changed_cb(bt_adapter_vd_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        bt_adapter_unset_visibility_duration_changed_cb();
+    } else {
+        ret = bt_adapter_set_visibility_duration_changed_cb(bt_adapter_vd_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_create_advertiser_p(void)
+{
+    bt_advertiser_h advertiser = NULL;
+
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_create_advertiser(&advertiser);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        bt_adapter_le_destroy_advertiser(advertiser);
+    } else {
+        ret = bt_adapter_le_create_advertiser(&advertiser);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_destroy_advertiser_p(void)
+{
+    bt_advertiser_h second_advertiser = NULL;
+
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_create_advertiser(&second_advertiser);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_le_destroy_advertiser(second_advertiser);
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_le_destroy_advertiser(second_advertiser);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+static void __bt_adapter_le_advertising_state_changed_cb(int result,
+                                                               bt_advertiser_h advertiser,
+                                                               bt_adapter_le_advertising_state_e adv_state,
+                                                               void *user_data)
+{
+
+}
+
+int utc_bluetooth_bt_adapter_unset_visibility_duration_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_visibility_duration_changed_cb(bt_adapter_vd_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_unset_visibility_duration_changed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_unset_visibility_duration_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+static void __bt_adapter_le_scan_result_cb(int result,
+                       bt_adapter_le_device_scan_result_info_s *info, void *user_data)
+{
+
+}
+
+int utc_bluetooth_bt_adapter_le_start_scan_p(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_adapter_le_start_scan(__bt_adapter_le_scan_result_cb, NULL);
+               wait_for_async();
+               assert_eq(ret, BT_ERROR_NONE);
+       } else {
+               ret = bt_adapter_le_start_scan(__bt_adapter_le_scan_result_cb, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       if(ret == BT_ERROR_NONE)
+               bt_adapter_le_stop_scan();
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_stop_scan_p(void)
+{
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               bt_adapter_le_start_scan(__bt_adapter_le_scan_result_cb, NULL);
+               wait_for_async();
+
+               ret = bt_adapter_le_stop_scan();
+               assert_eq(ret, BT_ERROR_NONE);
+       } else {
+               ret = bt_adapter_le_stop_scan();
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_add_advertising_service_uuid_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+       bt_adapter_le_packet_type_e pkt_type = BT_ADAPTER_LE_PACKET_ADVERTISING;
+
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_adapter_le_create_advertiser(&advertiser);
+               assert_eq(ret, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_add_advertising_service_uuid(advertiser,
+                                               pkt_type, time_svc_uuid_16);
+               assert_eq(ret, BT_ERROR_NONE);
+               if(ret == BT_ERROR_NONE) {
+                       bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+                       bt_adapter_le_destroy_advertiser(advertiser);
+               }
+       } else {
+               ret = bt_adapter_le_add_advertising_service_uuid(advertiser,
+                                               pkt_type, time_svc_uuid_16);
+
+               if(ret == BT_ERROR_NONE)
+                       bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_add_advertising_service_solicitation_uuid_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+       bt_adapter_le_packet_type_e pkt_type = BT_ADAPTER_LE_PACKET_ADVERTISING;
+
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_adapter_le_create_advertiser(&advertiser);
+               assert_eq(ret, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_add_advertising_service_solicitation_uuid(advertiser,
+                                               pkt_type, heart_rate_svc_uuid_16);
+               assert_eq(ret, BT_ERROR_NONE);
+               if(ret == BT_ERROR_NONE) {
+                       bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+                       bt_adapter_le_destroy_advertiser(advertiser);
+               }
+       } else {
+               ret = bt_adapter_le_add_advertising_service_solicitation_uuid(advertiser,
+                                               pkt_type, heart_rate_svc_uuid_16);
+
+               if(ret == BT_ERROR_NONE)
+                       bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_add_advertising_service_data_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+       bt_adapter_le_packet_type_e pkt_type = BT_ADAPTER_LE_PACKET_SCAN_RESPONSE;
+
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_adapter_le_create_advertiser(&advertiser);
+               assert_eq(ret, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_add_advertising_service_data(advertiser,
+                                                                       pkt_type, time_svc_uuid_16,
+                                                                       service_data, sizeof(service_data));
+               assert_eq(ret, BT_ERROR_NONE);
+               if(ret == BT_ERROR_NONE) {
+                       bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+                       bt_adapter_le_destroy_advertiser(advertiser);
+               }
+       } else {
+               ret = bt_adapter_le_add_advertising_service_data(advertiser,
+                                                               pkt_type, time_svc_uuid_16,
+                                                               service_data, sizeof(service_data));
+               if(ret == BT_ERROR_NONE)
+                       bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_add_advertising_appearance_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+       bt_adapter_le_packet_type_e pkt_type = BT_ADAPTER_LE_PACKET_SCAN_RESPONSE;
+
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_adapter_le_create_advertiser(&advertiser);
+               assert_eq(ret, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_set_advertising_appearance(advertiser,
+                                                                       pkt_type, 4);
+               assert_eq(ret, BT_ERROR_NONE);
+               if(ret == BT_ERROR_NONE) {
+                       bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+                       bt_adapter_le_destroy_advertiser(advertiser);
+               }
+       } else {
+               ret = bt_adapter_le_set_advertising_appearance(advertiser,
+                                                               pkt_type, 4);
+               if(ret == BT_ERROR_NONE)
+                       bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_add_advertising_manufacturer_data_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+       bt_adapter_le_packet_type_e pkt_type = BT_ADAPTER_LE_PACKET_SCAN_RESPONSE;
+
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               bt_adapter_le_create_advertiser(&advertiser);
+               manufacture = manufacture_3;
+               ret = bt_adapter_le_add_advertising_manufacturer_data(advertiser,
+                                                               pkt_type,
+                                                               manufacturer_id,
+                                                               manufacture, sizeof(manufacture_0));
+               assert_eq(ret, BT_ERROR_NONE);
+               if(ret == BT_ERROR_NONE) {
+                       bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+                       bt_adapter_le_destroy_advertiser(advertiser);
+               }
+               manufacture = NULL;
+       } else {
+               ret = bt_adapter_le_add_advertising_manufacturer_data(advertiser,
+                                                       pkt_type,
+                                                       manufacturer_id,
+                                                       manufacture, sizeof(manufacture_0));
+               if(ret == BT_ERROR_NONE)
+                       bt_adapter_le_clear_advertising_data(advertiser, pkt_type);
+
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_set_advertising_device_name_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+       bt_adapter_le_packet_type_e pkt_type = BT_ADAPTER_LE_PACKET_SCAN_RESPONSE;
+
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_adapter_le_create_advertiser(&advertiser);
+               assert_eq(ret, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_set_advertising_device_name(advertiser, pkt_type, true);
+               assert_eq(ret, BT_ERROR_NONE);
+               if(ret == BT_ERROR_NONE)
+                       bt_adapter_le_destroy_advertiser(advertiser);
+       } else {
+               ret = bt_adapter_le_set_advertising_device_name(advertiser, pkt_type, true);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_set_advertising_tx_power_level_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+       bt_adapter_le_packet_type_e pkt_type = BT_ADAPTER_LE_PACKET_ADVERTISING;
+
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_adapter_le_create_advertiser(&advertiser);
+               assert_eq(ret, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_set_advertising_tx_power_level(advertiser,
+                               pkt_type, true);
+               assert_eq(ret, BT_ERROR_NONE);
+               if(ret == BT_ERROR_NONE)
+                       bt_adapter_le_destroy_advertiser(advertiser);
+       } else {
+               ret = bt_adapter_le_set_advertising_tx_power_level(advertiser, pkt_type, true);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_start_advertising_new_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+       bt_adapter_le_advertising_state_changed_cb cb;
+
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               bt_adapter_le_create_advertiser(&advertiser);
+
+               cb = __bt_adapter_le_advertising_state_changed_cb;
+
+               ret = bt_adapter_le_start_advertising_new(advertiser, cb, NULL);
+               wait_for_async();
+               assert_eq(ret, BT_ERROR_NONE);
+
+               if(ret == BT_ERROR_NONE)
+                       bt_adapter_le_destroy_advertiser(advertiser);
+       } else {
+               cb = __bt_adapter_le_advertising_state_changed_cb;
+               ret = bt_adapter_le_start_advertising_new(advertiser, cb, NULL);
+
+               if(ret == BT_ERROR_NONE)
+                       bt_adapter_le_stop_advertising(advertiser);
+
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_set_advertising_mode_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+       int mode = BT_ADAPTER_LE_ADVERTISING_MODE_BALANCED;
+
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_adapter_le_create_advertiser(&advertiser);
+               assert_eq(ret, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_set_advertising_mode(advertiser, mode);
+               assert_eq(ret, BT_ERROR_NONE);
+
+               if(ret == BT_ERROR_NONE)
+                       bt_adapter_le_destroy_advertiser(advertiser);
+       } else {
+               ret = bt_adapter_le_set_advertising_mode(advertiser, mode);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_adapter_le_set_advertising_connectable_p(void)
+{
+       bt_advertiser_h advertiser = NULL;
+       int type = 0x00;
+
+       if(bt_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_adapter_le_create_advertiser(&advertiser);
+               assert_eq(ret, BT_ERROR_NONE);
+
+               ret = bt_adapter_le_set_advertising_connectable(advertiser, type);
+               assert_eq(ret, BT_ERROR_NONE);
+               if(ret == BT_ERROR_NONE)
+                       bt_adapter_le_destroy_advertiser(advertiser);
+       } else {
+               ret = bt_adapter_le_set_advertising_connectable(advertiser, type);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_audio_negative.c b/src/utc/bluetooth/utc_bluetooth_audio_negative.c
new file mode 100755 (executable)
index 0000000..072b694
--- /dev/null
@@ -0,0 +1,193 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothAudioNegative
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool bt_supported = false;
+static bool media_supported = false;
+static bool call_supported = false;
+
+void utc_bluetooth_bt_audio_negative_startup(void)
+{
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    media_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.audio.media", &media_supported);
+    
+    call_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.audio.call", &call_supported);
+
+    if(bt_supported) {
+        startup_flag = BT_ERROR_NONE;
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+        
+        if(media_supported || call_supported) {
+            ret = bt_audio_initialize();
+            if(BT_ERROR_NONE != ret) {
+                fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+                fprintf(stderr, "bt_audio_initialize failed (code: %d)\n", ret);
+                startup_flag = ret;
+                return;
+            }
+        }
+    }
+}
+
+void utc_bluetooth_bt_audio_negative_cleanup(void)
+{
+    if(media_supported || call_supported)
+        bt_audio_deinitialize();
+    
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+int utc_bluetooth_bt_audio_connect_n(void)
+{
+    if(media_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_audio_connect("DummyAddress", BT_AUDIO_PROFILE_TYPE_A2DP);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_audio_connect("DummyAddress", BT_AUDIO_PROFILE_TYPE_A2DP);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_audio_disconnect_n(void)
+{
+    if(media_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_audio_disconnect(NULL, BT_AUDIO_PROFILE_TYPE_A2DP);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_audio_disconnect(NULL, BT_AUDIO_PROFILE_TYPE_A2DP);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_audio_set_connection_state_changed_cb_n(void)
+{
+    if(media_supported || call_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_audio_set_connection_state_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_audio_set_connection_state_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_audio_set_connection_state_changed_cb_n1(void)
+{
+    if(media_supported || call_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_audio_set_connection_state_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_audio_set_connection_state_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_audio_deinitialize_n(void)
+{
+    if(media_supported || call_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_audio_deinitialize();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_audio_deinitialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_audio_initialize_n(void)
+{
+    if(media_supported || call_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_audio_initialize();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_audio_initialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_audio_unset_connection_state_changed_cb_n(void)
+{
+    if(media_supported || call_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_audio_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_audio_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_audio_positive.c b/src/utc/bluetooth/utc_bluetooth_audio_positive.c
new file mode 100755 (executable)
index 0000000..dd63667
--- /dev/null
@@ -0,0 +1,158 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothAudioPositive
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool callback_result = false;
+static bool bt_supported = false;
+static bool media_supported = false;
+static bool call_supported = false;
+
+
+void utc_bluetooth_audio_positive_startup(void)
+{
+    bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    media_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.audio.media", &media_supported);
+    
+    call_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.audio.call", &call_supported);
+    
+    if(bt_supported) {
+        startup_flag = BT_ERROR_NONE;
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+
+        if(media_supported || call_supported) {
+            ret = bt_audio_initialize();
+            if(BT_ERROR_NONE != ret) {
+                fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+                fprintf(stderr, "bt_audio_initialize failed (code: %d)\n", ret);
+                startup_flag = ret;
+                return;
+            }
+        }
+
+        callback_result = false;
+        ret = bt_adapter_get_state(&adapter_state);
+        if (adapter_state != BT_ADAPTER_ENABLED) {
+                fprintf(stdout, "BT is not enabled!!");
+                startup_flag = BT_ERROR_NOT_ENABLED;        
+        }
+    }
+}
+
+void utc_bluetooth_audio_positive_cleanup(void)
+{
+    if(media_supported || call_supported)
+        bt_audio_deinitialize();
+    
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+static void connection_state_changed_cb_for_audio_p(int result, bool connected,
+                        const char *remote_address,
+                        bt_audio_profile_type_e type,
+                        void *user_data)
+{
+
+}
+
+int utc_bluetooth_bt_audio_initialize_p(void)
+{
+    if(media_supported || call_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_audio_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_audio_initialize();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_audio_initialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_audio_set_connection_state_changed_cb_p(void)
+{
+    if(media_supported || call_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_audio_set_connection_state_changed_cb
+            (connection_state_changed_cb_for_audio_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_audio_set_connection_state_changed_cb
+            (connection_state_changed_cb_for_audio_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_audio_unset_connection_state_changed_cb_p(void)
+{
+    if(media_supported || call_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_audio_set_connection_state_changed_cb
+            (connection_state_changed_cb_for_audio_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_audio_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_audio_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_audio_deinitialize_p(void)
+{
+    if(media_supported || call_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_audio_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_audio_deinitialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_common_positive.c b/src/utc/bluetooth/utc_bluetooth_common_positive.c
new file mode 100755 (executable)
index 0000000..1659927
--- /dev/null
@@ -0,0 +1,66 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "bluetooth.h"
+#include "assert.h"
+#include <glib.h>
+#include <system_info.h>
+
+//& set: BluetoothCommonPositive
+
+static int ret = BT_ERROR_NONE;
+static bool supported = false;
+
+void utc_bluetooth_common_startup(void)
+{
+    ret = bt_initialize();
+    supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &supported);
+}
+
+void utc_bluetooth_common_cleanup(void)
+{
+       bt_deinitialize();
+}
+
+/**
+ * @brief Positive test case of bt_initialize()
+ */
+int utc_bluetooth_bt_initialize_p(void)
+{
+    if(!supported) {
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    } else {
+        assert_eq(ret, BT_ERROR_NONE);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_deinitialize()
+ */
+int utc_bluetooth_bt_deinitialize_p(void)
+{
+    ret = bt_deinitialize();
+
+    if(!supported) {
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }  else {
+        assert_eq(ret, BT_ERROR_NONE);
+    }
+
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_device_discovery_negative.c b/src/utc/bluetooth/utc_bluetooth_device_discovery_negative.c
new file mode 100755 (executable)
index 0000000..209e11a
--- /dev/null
@@ -0,0 +1,200 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+
+//& set: BluetoothDeviceDiscoveryNegative
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool bt_supported = false;
+
+
+void utc_bluetooth_device_discovery_negative_startup(void)
+{
+    startup_flag = BT_ERROR_NONE;
+
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+    }
+}
+
+void utc_bluetooth_device_discovery_negative_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+/**
+  *@brief Negative test case of bt_adapter_stop_device_discovery()
+ */
+int utc_bluetooth_bt_adapter_stop_device_discovery_n1(void)
+{
+    
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_stop_device_discovery();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_stop_device_discovery();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+  *@brief Negative test case of bt_adapter_unset_device_discovery_state_changed_cb()
+ */
+int utc_bluetooth_bt_adapter_unset_device_discovery_state_changed_cb_n1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+        
+        ret = bt_adapter_unset_device_discovery_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_unset_device_discovery_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+static void device_discovery_state_changed_cb_for_discovery_p(int result,
+                    bt_adapter_device_discovery_state_e discovery_state,
+                    bt_adapter_device_discovery_info_s *discovery_info,
+                    void *user_data)
+{
+
+}
+
+/**
+  *@brief Negative test case of bt_adapter_set_device_discovery_state_changed_cb()
+ */
+int utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_device_discovery_state_changed_cb(device_discovery_state_changed_cb_for_discovery_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_set_device_discovery_state_changed_cb(device_discovery_state_changed_cb_for_discovery_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_n1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_device_discovery_state_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_set_device_discovery_state_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+  *@brief Negative test case of bt_adapter_start_device_discovery()
+ */
+int utc_bluetooth_bt_adapter_start_device_discovery_n1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_start_device_discovery();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_start_device_discovery();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+  *@brief Negative test case of bt_adapter_is_discovering()
+ */
+int utc_bluetooth_bt_adapter_is_discovering_n1(void)
+{
+    bool status = false;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_is_discovering(&status);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_is_discovering(&status);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_is_discovering_n2(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_is_discovering(NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_is_discovering(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_device_discovery_positive.c b/src/utc/bluetooth/utc_bluetooth_device_discovery_positive.c
new file mode 100755 (executable)
index 0000000..30d16ea
--- /dev/null
@@ -0,0 +1,196 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+
+//& set: BluetoothDeviceDiscoveryPositive
+
+static int startup_flag = BT_ERROR_NONE;
+static GMainLoop *mainloop = NULL;
+static int ret = BT_ERROR_NONE;
+static bool callback_result = false;
+static bool bt_supported = false;
+
+
+static void device_discovery_state_changed_cb_for_discovery_p(int result,
+                    bt_adapter_device_discovery_state_e discovery_state,
+                    bt_adapter_device_discovery_info_s *discovery_info,
+                    void *user_data)
+{
+}
+
+static gboolean timeout_func(gpointer data)
+{
+    g_main_loop_quit((GMainLoop *) data);
+    return FALSE;
+}
+
+static void wait_for_async()
+{
+    int timeout_id = 0;
+    mainloop = g_main_loop_new(NULL, FALSE);
+
+    timeout_id = g_timeout_add(20000, timeout_func, mainloop);
+    g_main_loop_run(mainloop);
+    g_source_remove(timeout_id);
+}
+
+void utc_bluetooth_device_discovery_positive_startup(void)
+{
+    bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+    startup_flag = BT_ERROR_NONE;
+
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+
+        callback_result = false;
+        ret = bt_adapter_get_state(&adapter_state);
+        if (adapter_state != BT_ADAPTER_ENABLED) {
+                fprintf(stdout, "BT is not enabled!!");
+                startup_flag = BT_ERROR_NOT_ENABLED;        
+        }
+    }
+}
+
+void utc_bluetooth_device_discovery_positive_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+/**
+ * @brief Positive test case of bt_adapter_is_discovering()
+ */
+int utc_bluetooth_bt_adapter_is_discovering_p(void)
+{
+    bool status = false;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_is_discovering(&status);
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_is_discovering(&status);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_adapter_set_device_discovery_state_changed_cb()
+ */
+int utc_bluetooth_bt_adapter_set_device_discovery_state_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_set_device_discovery_state_changed_cb(device_discovery_state_changed_cb_for_discovery_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_set_device_discovery_state_changed_cb(device_discovery_state_changed_cb_for_discovery_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_adapter_start_device_discovery()
+ */
+int utc_bluetooth_bt_adapter_start_device_discovery_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_stop_device_discovery();
+        assert(BT_ERROR_NONE == ret || BT_ERROR_NOT_IN_PROGRESS == ret);
+        if(BT_ERROR_NONE == ret) {
+            wait_for_async();
+        }
+
+        ret = bt_adapter_start_device_discovery();
+        assert_eq(ret, BT_ERROR_NONE);
+        wait_for_async();
+    } else {
+        ret = bt_adapter_start_device_discovery();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_adapter_unset_device_discovery_state_changed_cb()
+ */
+int utc_bluetooth_bt_adapter_unset_device_discovery_state_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_unset_device_discovery_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_unset_device_discovery_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_adapter_stop_device_discovery()
+ */
+int utc_bluetooth_bt_adapter_stop_device_discovery_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_stop_device_discovery();
+        assert(BT_ERROR_NONE == ret || BT_ERROR_NOT_IN_PROGRESS == ret);
+        if(BT_ERROR_NONE == ret) {
+            wait_for_async();
+        }
+
+        ret = bt_adapter_start_device_discovery();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_adapter_stop_device_discovery();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_stop_device_discovery();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
diff --git a/src/utc/bluetooth/utc_bluetooth_device_negative.c b/src/utc/bluetooth/utc_bluetooth_device_negative.c
new file mode 100755 (executable)
index 0000000..c573b4b
--- /dev/null
@@ -0,0 +1,506 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+
+//& set: BluetoothDeviceNegative
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static const char *remote_address = "B8:5E:7B:E7:92:7D";
+static bool bt_supported = false;
+
+
+static void bt_connection_state_changed_cb(bool connected, bt_device_connection_info_s *conn_info,
+        void *user_data)
+{
+
+}
+
+static bool bonded_device_cb_for_device_p(bt_device_info_s *dev_info, void *user_data)
+{
+    return false;
+}
+
+void utc_bluetooth_device_negative_startup(void)
+{
+    startup_flag = BT_ERROR_NONE;
+
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+    }
+}
+
+void utc_bluetooth_device_negative_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+/**
+ * @brief Negative test case of bt_device_set_bond_created_cb()
+ */
+int utc_bluetooth_bt_device_set_bond_created_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_device_set_bond_created_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_set_bond_created_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_device_set_bonded_cb_n1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_bond_created_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_device_set_bond_created_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_set_bond_destroyed_cb()
+ */
+int utc_bluetooth_bt_device_set_bond_destroyed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_device_set_bond_destroyed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_set_bond_destroyed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_set_authorization_changed_cb()
+ */
+int utc_bluetooth_bt_device_set_authorization_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_device_set_authorization_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_set_authorization_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_device_set_authorization_changed_cb_n1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_authorization_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_device_set_authorization_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_unset_bond_created_cb()
+ */
+int utc_bluetooth_bt_device_unset_bond_created_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+        
+        ret = bt_device_unset_bond_created_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_unset_bond_created_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_unset_bond_destroyed_cb()
+ */
+int utc_bluetooth_bt_device_unset_bond_destroyed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_device_unset_bond_destroyed_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_unset_bond_destroyed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_unset_authorization_changed_cb()
+ */
+int utc_bluetooth_bt_device_unset_authorization_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_device_unset_authorization_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_unset_authorization_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_create_bond()
+ */
+int utc_bluetooth_bt_device_create_bond_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_device_create_bond(remote_address);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_create_bond(remote_address);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_device_create_bond_n1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_create_bond(NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_device_create_bond(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_cancel_bonding()
+ */
+int utc_bluetooth_bt_device_cancel_bonding_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_device_cancel_bonding();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_cancel_bonding();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_destroy_bond()
+ */
+int utc_bluetooth_bt_device_destroy_bond_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_device_destroy_bond(remote_address);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_destroy_bond(remote_address);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_adapter_foreach_bonded_device()
+ */
+int utc_bluetooth_bt_adapter_foreach_bonded_device_n1(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_adapter_foreach_bonded_device(bonded_device_cb_for_device_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_adapter_foreach_bonded_device(bonded_device_cb_for_device_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_adapter_foreach_bonded_device_n2(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_foreach_bonded_device(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_adapter_foreach_bonded_device(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_set_alias()
+ */
+int utc_bluetooth_bt_device_set_alias_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_device_set_alias(remote_address, "dts_alias");
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_set_alias(remote_address, "dts_alias");
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_device_set_alias_n2(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_alias(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_device_set_alias(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_set_authorization()
+ */
+int utc_bluetooth_bt_device_set_authorization_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_device_set_authorization(remote_address, BT_DEVICE_AUTHORIZED);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_set_authorization(remote_address, BT_DEVICE_AUTHORIZED);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_device_set_authorization_n2(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_authorization(NULL, BT_DEVICE_AUTHORIZED);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_device_set_authorization(NULL, BT_DEVICE_AUTHORIZED);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_get_service_mask_from_uuid_list()
+ */
+int utc_bluetooth_bt_device_get_service_mask_from_uuid_list_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_get_service_mask_from_uuid_list(NULL, 1, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_device_get_service_mask_from_uuid_list(NULL, 1, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_is_profile_connected()
+ */
+int utc_bluetooth_bt_device_is_profile_connected_n(void)
+{
+    bt_profile_e bt_profile = BT_PROFILE_RFCOMM;
+    bool is_connected;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_device_is_profile_connected(remote_address, bt_profile, &is_connected);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_is_profile_connected(remote_address, bt_profile, &is_connected);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_device_set_connection_state_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_device_set_connection_state_changed_cb(bt_connection_state_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_set_connection_state_changed_cb(bt_connection_state_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_device_unset_connection_state_changed_cb_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_connection_state_changed_cb(bt_connection_state_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_device_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_device_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+static bool bt_device_connected_profiles_cb(bt_profile_e profile, void *user_data)
+{
+       return false;
+}
+
+int utc_bluetooth_bt_device_foreach_connected_profiles_n(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_foreach_connected_profiles(NULL, bt_device_connected_profiles_cb, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_device_foreach_connected_profiles(NULL, bt_device_connected_profiles_cb, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_device_positive.c b/src/utc/bluetooth/utc_bluetooth_device_positive.c
new file mode 100755 (executable)
index 0000000..b92a5ab
--- /dev/null
@@ -0,0 +1,322 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+
+//& set: BluetoothDevicePositive
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool callback_result = false;
+static bt_device_info_s *device_info = NULL;
+static const char *remote_address = "B8:5E:7B:E7:92:7D";
+static bool bt_supported = false;
+
+
+static void device_bonded_cb(int result, bt_device_info_s * device_info,
+                void *user_data)
+{
+
+}
+
+static void device_unbonded_cb(int result, char *remote_address, void *user_data)
+{
+
+}
+
+static void device_authorization_state_changed_cb(bt_device_authorization_e authorization_state,
+        char *address, void *user_data)
+{
+
+}
+
+static bool bonded_device_cb_for_device_p(bt_device_info_s *dev_info, void *user_data)
+{
+    return false;
+}
+
+static void bt_connection_state_changed_cb(bool connected,
+        bt_device_connection_info_s *conn_info, void *user_data)
+{
+
+}
+
+void utc_bluetooth_device_positive_startup(void)
+{
+    bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    if(bt_supported) {
+        startup_flag = BT_ERROR_NONE;
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+
+        callback_result = false;
+        ret = bt_adapter_get_state(&adapter_state);
+        if (adapter_state != BT_ADAPTER_ENABLED) {
+                fprintf(stdout, "BT is not enabled!!");
+                startup_flag = BT_ERROR_NOT_ENABLED;        
+        }
+    }
+}
+
+void utc_bluetooth_device_positive_cleanup(void)
+{
+    if(bt_supported) {
+        free(device_info);
+        device_info = NULL;
+
+        bt_deinitialize();
+    }
+}
+
+/**
+ * @brief Positive test case of bt_device_set_bond_created_cb()
+ */
+int utc_bluetooth_bt_device_set_bond_created_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_bond_created_cb(device_bonded_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        bt_device_unset_bond_created_cb();
+    } else {
+        ret = bt_device_set_bond_created_cb(device_bonded_cb, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_device_set_bond_destroyed_cb()
+ */
+int utc_bluetooth_bt_device_set_bond_destroyed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_bond_destroyed_cb(device_unbonded_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        bt_device_unset_bond_destroyed_cb();
+    } else {
+        ret = bt_device_set_bond_destroyed_cb(device_unbonded_cb, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_device_set_authorization_changed_cb()
+ */
+int utc_bluetooth_bt_device_set_authorization_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_authorization_changed_cb(device_authorization_state_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        bt_device_unset_authorization_changed_cb();
+    } else {
+        ret = bt_device_set_authorization_changed_cb(device_authorization_state_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_device_get_service_mask_from_uuid_list()
+ */
+int utc_bluetooth_bt_device_get_service_mask_from_uuid_list_p(void)
+{
+    char* uuid = "00001101-0000-1000-8000-00805f9b34fb";
+    int no_of_service = 1;
+    bt_service_class_t service_mask_list;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_get_service_mask_from_uuid_list(&uuid, no_of_service,
+                                         &service_mask_list);
+        assert_eq(ret, BT_ERROR_NONE);
+    } else{
+        ret = bt_device_get_service_mask_from_uuid_list(&uuid, no_of_service,
+                                         &service_mask_list);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_device_is_profile_connected()
+*/
+int utc_bluetooth_bt_device_is_profile_connected_p(void)
+{
+    bt_profile_e bt_profile = BT_PROFILE_RFCOMM;
+    bool is_connected = FALSE;
+
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_is_profile_connected(remote_address, bt_profile,
+                               &is_connected);
+
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_device_is_profile_connected(remote_address, bt_profile,
+                               &is_connected);
+
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_device_unset_bond_created_cb()
+ */
+int utc_bluetooth_bt_device_unset_bond_created_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_bond_created_cb(device_bonded_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_device_unset_bond_created_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_device_unset_bond_created_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_adapter_foreach_bonded_device()
+ */
+int utc_bluetooth_bt_adapter_foreach_bonded_device_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_adapter_foreach_bonded_device(bonded_device_cb_for_device_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_adapter_foreach_bonded_device(bonded_device_cb_for_device_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_device_unset_bond_destroyed_cb()
+ */
+int utc_bluetooth_bt_device_unset_bond_destroyed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_bond_destroyed_cb(device_unbonded_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_device_unset_bond_destroyed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_device_unset_bond_destroyed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_device_unset_authorization_changed_cb()
+ */
+int utc_bluetooth_bt_device_unset_authorization_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_authorization_changed_cb(device_authorization_state_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_device_unset_authorization_changed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_device_unset_authorization_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_device_set_connection_state_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_connection_state_changed_cb(bt_connection_state_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        bt_device_unset_connection_state_changed_cb();
+    } else {
+        ret = bt_device_set_connection_state_changed_cb(bt_connection_state_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_device_unset_connection_state_changed_cb_p(void)
+{
+    if(bt_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_device_set_connection_state_changed_cb(bt_connection_state_changed_cb, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_device_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_device_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_gatt_negative.c b/src/utc/bluetooth/utc_bluetooth_gatt_negative.c
new file mode 100755 (executable)
index 0000000..bd74528
--- /dev/null
@@ -0,0 +1,780 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothGattNegative
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static const char *remote_addr = "E4:32:CB:41:1F:A6";
+static bool le_supported = false;
+static bool bt_supported = false;
+
+
+static void gatt_connection_state_changed_cb_p(int result, bool connected,
+                               const char *remote_address, void *user_data)
+{
+       if (connected)
+               fprintf(stderr,"Device is connected with remote address.");
+       else
+               fprintf(stderr,"Device is disconnected from remote address.");
+}
+
+void utc_bluetooth_gatt_negative_startup(void)
+{
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    le_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.le", &le_supported);
+
+    if(bt_supported) {
+        startup_flag = BT_ERROR_NONE;
+
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+    }
+}
+
+void utc_bluetooth_gatt_negative_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+int utc_bluetooth_bt_gatt_connect_n(void)
+{
+    bool auto_connect = FALSE;
+
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_gatt_connect(remote_addr, auto_connect);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else{
+        ret = bt_gatt_connect(remote_addr, auto_connect);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_gatt_disconnect_n(void)
+{
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_gatt_disconnect(remote_addr);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_gatt_disconnect(remote_addr);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_gatt_connect_n1(void)
+{
+    bool auto_connect = FALSE;
+
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_initialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_gatt_connect(NULL, auto_connect);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_gatt_connect(NULL, auto_connect);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_gatt_disconnect_n1(void)
+{
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_initialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_gatt_disconnect(NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = bt_gatt_disconnect(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_gatt_set_connection_state_changed_cb_n(void)
+{
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_gatt_set_connection_state_changed_cb(
+               gatt_connection_state_changed_cb_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_gatt_set_connection_state_changed_cb(
+               gatt_connection_state_changed_cb_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_unset_connection_state_changed_cb_n(void)
+{
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_gatt_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else {
+        ret = bt_gatt_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+
+int utc_bluetooth_bt_gatt_get_value_n(void)
+{
+       bt_gatt_h gatt_handle = NULL;
+       char *value = NULL;
+       int len = 0;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_get_value(gatt_handle, &value, &len);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_get_value(gatt_handle, &value, &len);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_get_int_value_n(void)
+{
+       bt_gatt_h gatt_handle = NULL;
+       char *value = NULL;
+       int offset = 0;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_get_int_value(gatt_handle, BT_DATA_TYPE_SINT16, offset, value);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_get_int_value(gatt_handle, BT_DATA_TYPE_SINT16, offset, value);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_get_float_value_n(void)
+{
+       bt_gatt_h gatt_handle = NULL;
+       float *value = NULL;
+       int offset = 0;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_get_float_value(gatt_handle, BT_DATA_TYPE_FLOAT, offset, value);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_get_float_value(gatt_handle, BT_DATA_TYPE_FLOAT, offset, value);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_set_value_n(void)
+{
+       bt_gatt_h gatt_handle = NULL;
+       const char *value = NULL;
+       int value_length = 0;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_set_value(gatt_handle, value, value_length);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_set_value(gatt_handle, value, value_length);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_set_int_value_n(void)
+{
+       bt_gatt_h gatt_handle = NULL;
+       const char *value = NULL;
+       int value_length = 0;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_set_int_value(gatt_handle, 0x02, value, value_length);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_set_int_value(gatt_handle, 0x02, value, value_length);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_set_float_value_n(void)
+{
+       bt_gatt_h gatt_handle = NULL;
+       const char *value = NULL;
+       int mantissa = 0;
+       int exponent = 0;
+       int offset = 0;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_set_float_value(gatt_handle,
+                                               BT_DATA_TYPE_FLOAT, mantissa, exponent, offset);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_set_float_value(gatt_handle,
+                                               BT_DATA_TYPE_FLOAT, mantissa, exponent, offset);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_get_uuid_n(void)
+{
+       bt_gatt_h gatt_handle = NULL;
+       char *uuid = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_get_uuid(gatt_handle, &uuid);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_get_uuid(gatt_handle, &uuid);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_get_type_n(void)
+{
+       bt_gatt_h gatt_handle = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_get_type(gatt_handle, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_get_type(gatt_handle, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_service_get_client_n(void)
+{
+       bt_gatt_h gatt_handle = NULL;
+       bt_gatt_client_h *client = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_service_get_client(gatt_handle, client);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_service_get_client(gatt_handle, client);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_service_get_characteristic_n(void)
+{
+       bt_gatt_h service = NULL;
+       const char *uuid = NULL;
+       bt_gatt_h *characteristic = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_service_get_characteristic(service, uuid, characteristic);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_service_get_characteristic(service, uuid, characteristic);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+static void __bt_gatt_client_foreach_chr_cb(int total, int index, bt_gatt_h chr_handle, void *data)
+{
+
+}
+
+int utc_bluetooth_bt_gatt_service_foreach_characteristics_n(void)
+{
+       int test_id = 0;
+       bt_gatt_h service = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_service_foreach_characteristics(service,
+                                               __bt_gatt_client_foreach_chr_cb, (void *)test_id);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_service_foreach_characteristics(service,
+                                               __bt_gatt_client_foreach_chr_cb, (void *)test_id);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_service_get_included_service_n(void)
+{
+       bt_gatt_h service = NULL;
+       const char *uuid = NULL;
+       bt_gatt_h *included_service = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_service_get_included_service(service, uuid, included_service);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_service_get_included_service(service, uuid, included_service);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_bluetooth_bt_gatt_service_foreach_included_services_n(void)
+{
+       bt_gatt_h service = NULL;
+       const char *uuid = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_service_foreach_included_services(service, __bt_gatt_client_foreach_chr_cb, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_service_foreach_included_services(service, __bt_gatt_client_foreach_chr_cb, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_characteristic_get_service_n(void)
+{
+       bt_gatt_h characteristic = NULL;
+       bt_gatt_h *service = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_characteristic_get_service(characteristic, service);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_characteristic_get_service(characteristic, service);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_characteristic_get_properties_n(void)
+{
+       bt_gatt_h characteristic = NULL;
+       int *properties = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_characteristic_get_properties(characteristic, properties);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_characteristic_get_properties(characteristic, properties);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_characteristic_set_properties_n(void)
+{
+       bt_gatt_h characteristic = NULL;
+       int properties = 0;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_characteristic_set_properties(characteristic, properties);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_characteristic_set_properties(characteristic, properties);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_characteristic_get_write_type_n(void)
+{
+       bt_gatt_h characteristic = NULL;
+       bt_gatt_write_type_e *write_type = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_characteristic_get_write_type(characteristic, write_type);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+
+       } else {
+               ret = bt_gatt_characteristic_get_write_type(characteristic, write_type);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_characteristic_set_write_type_n(void)
+{
+       bt_gatt_h characteristic = NULL;
+       bt_gatt_write_type_e write_type = BT_GATT_WRITE_TYPE_WRITE_NO_RESPONSE;
+
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_characteristic_set_write_type(characteristic, write_type);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_characteristic_set_write_type(characteristic, write_type);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_characteristic_get_descriptor_n(void)
+{
+       bt_gatt_h characteristic = NULL;
+       const char *uuid = NULL;
+       bt_gatt_h *descriptor = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_characteristic_get_descriptor(characteristic, uuid, descriptor);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_characteristic_get_descriptor(characteristic, uuid, descriptor);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_characteristic_foreach_descriptors_n(void)
+{
+       bt_gatt_h characteristic = NULL;
+       const char *uuid = NULL;
+       bt_gatt_h *descriptor = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_characteristic_foreach_descriptors(characteristic,
+                                                       __bt_gatt_client_foreach_chr_cb, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_characteristic_foreach_descriptors(characteristic,
+                                                       __bt_gatt_client_foreach_chr_cb, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_descriptor_get_characteristic_n(void)
+{
+       bt_gatt_h descriptor = NULL;
+       bt_gatt_h *characteristic = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_descriptor_get_characteristic(descriptor, characteristic);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_descriptor_get_characteristic(descriptor, characteristic);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_client_create_n(void)
+{
+       const char *remote_address = "00:19:0E:01:61:17";
+       bt_gatt_client_h client = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_deinitialize();
+               assert_eq(ret,BT_ERROR_NONE);
+
+               ret = bt_gatt_client_create(remote_address,     &client);
+               if(ret == BT_ERROR_NONE)
+                       bt_gatt_client_destroy(client);
+               assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+       } else {
+               ret = bt_gatt_client_create(remote_address, client);
+               if(ret == BT_ERROR_NONE)
+                       bt_gatt_client_destroy(client);
+
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_client_destroy_n(void)
+{
+       const char *remote_address = "00:19:0E:01:61:17";
+       bt_gatt_client_h client = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_deinitialize();
+               assert_eq(ret,BT_ERROR_NONE);
+
+               ret = bt_gatt_client_create(remote_address,     &client);
+               ret = bt_gatt_client_destroy(client);
+               assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+       } else {
+               ret = bt_gatt_client_destroy(client);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_client_get_remote_address_n(void)
+{
+       bt_gatt_client_h client = NULL;
+       char *remote_address = "00:19:0E:01:61:17";
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+               ret = bt_deinitialize();
+               assert_eq(ret,BT_ERROR_NONE);
+
+               bt_gatt_client_create(remote_address, &client);
+
+               ret = bt_gatt_client_get_remote_address(client, &remote_address);
+               assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+               if(ret == BT_ERROR_NONE)
+                       bt_gatt_client_destroy(client);
+       } else {
+               ret = bt_gatt_client_get_remote_address(client, &remote_address);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+static void __bt_gatt_client_read_complete_cb(int result, bt_gatt_h gatt_handle, void *data)
+{
+
+}
+
+int utc_bluetooth_bt_gatt_client_read_value_n(void)
+{
+       bt_gatt_h gatt_handle = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_client_read_value(gatt_handle,
+                                               __bt_gatt_client_read_complete_cb, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_client_read_value(gatt_handle,
+                                               __bt_gatt_client_read_complete_cb, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+static void __bt_gatt_client_request_completed_cb(int result, bt_gatt_h request_handle, void *user_data)
+{
+
+}
+
+int utc_bluetooth_bt_gatt_client_write_value_n(void)
+{
+       bt_gatt_h client = NULL;
+       void *user_data = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_client_write_value(client, __bt_gatt_client_request_completed_cb, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_client_write_value(client, __bt_gatt_client_read_complete_cb, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+static void __bt_gatt_client_value_changed_cb(bt_gatt_h chr, char *value, int len, void *user_data)
+{
+
+}
+
+int utc_bluetooth_bt_gatt_client_set_characteristic_value_changed_cb_n(void)
+{
+       bt_gatt_h characteristic = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_client_set_characteristic_value_changed_cb(characteristic,
+                               __bt_gatt_client_value_changed_cb, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_client_set_characteristic_value_changed_cb(characteristic,
+                               __bt_gatt_client_value_changed_cb, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_bluetooth_bt_gatt_client_unset_characteristic_value_changed_cb_n(void)
+{
+       bt_gatt_h characteristic = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_client_unset_characteristic_value_changed_cb(characteristic);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_client_unset_characteristic_value_changed_cb(characteristic);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_bluetooth_bt_gatt_client_get_service_n(void)
+{
+       bt_gatt_client_h client = NULL;
+       const char *uuid = NULL;
+       bt_gatt_h *service = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_client_get_service(client, uuid, service);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_client_get_service(client, uuid, service);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+static void __bt_gatt_foreach_cb(int total, int index, bt_gatt_h gatt_handle, void *user_data)
+{
+
+}
+
+int utc_bluetooth_bt_gatt_client_foreach_services_n(void)
+{
+       bt_gatt_client_h client = NULL;
+
+       if(le_supported) {
+               assert_eq(startup_flag, BT_ERROR_NONE);
+
+               ret = bt_gatt_client_foreach_services(client, __bt_gatt_foreach_cb, NULL);
+               assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = bt_gatt_client_foreach_services(client, __bt_gatt_foreach_cb, NULL);
+               assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_gatt_positive.c b/src/utc/bluetooth/utc_bluetooth_gatt_positive.c
new file mode 100755 (executable)
index 0000000..737f183
--- /dev/null
@@ -0,0 +1,105 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+
+//& set: BluetoothGattPositive
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool le_supported = false;
+static bool bt_supported = false;
+
+
+static void gatt_connection_state_changed_cb_p(int result, bool connected,
+                               const char *remote_address, void *user_data)
+{
+       if (connected)
+               fprintf(stderr,"Device is connected with remote address.");
+       else
+               fprintf(stderr,"Device is disconnected from remote address.");
+}
+
+void utc_bluetooth_gatt_positive_startup(void)
+{
+    bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    le_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.le", &le_supported);
+
+    if(bt_supported) {
+        startup_flag = BT_ERROR_NONE;
+
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+
+        ret = bt_adapter_get_state(&adapter_state);
+        if (adapter_state != BT_ADAPTER_ENABLED) {
+                fprintf(stdout, "BT is not enabled!!");
+                startup_flag = BT_ERROR_NOT_ENABLED;        
+        }
+    }
+}
+
+void utc_bluetooth_gatt_positive_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+int utc_bluetooth_bt_gatt_set_connection_state_changed_cb_p(void)
+{
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_gatt_set_connection_state_changed_cb(gatt_connection_state_changed_cb_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_gatt_set_connection_state_changed_cb(gatt_connection_state_changed_cb_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_gatt_unset_connection_state_changed_cb_p(void)
+{
+    if(le_supported) {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+
+        ret = bt_gatt_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    } else {
+        ret = bt_gatt_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_hdp_negative.c b/src/utc/bluetooth/utc_bluetooth_hdp_negative.c
new file mode 100755 (executable)
index 0000000..20b7feb
--- /dev/null
@@ -0,0 +1,319 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothHDPNegative
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool hdp_supported = false;
+static bool bt_supported = false;
+
+
+void utc_bluetooth_hdp_negative_startup(void)
+{
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    hdp_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.health", &hdp_supported);
+
+    if(bt_supported) {      
+        startup_flag = BT_ERROR_NONE;
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+    }
+}
+
+void utc_bluetooth_hdp_negative_cleanup(void)
+{
+    if(bt_supported)  
+        bt_deinitialize();
+}
+
+/**
+ * @brief Negative test case of bt_hdp_set_data_received_cb()
+ */
+int utc_bluetooth_bt_hdp_set_data_received_cb_n(void)
+{
+    if(hdp_supported) {        
+        assert_eq(startup_flag, BT_ERROR_NONE);    
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_hdp_set_data_received_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    } else { 
+        ret = bt_hdp_set_data_received_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    }
+        
+    return 0;
+}
+
+int utc_bluetooth_bt_hdp_set_data_received_cb_n1(void)
+{
+    if(!hdp_supported) {    
+        ret = bt_hdp_set_data_received_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else { 
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_set_data_received_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_hdp_set_connection_state_changed_cb()
+ */
+int utc_bluetooth_bt_hdp_set_connection_state_changed_cb_n(void)
+{
+    if(!hdp_supported) {        
+        ret = bt_hdp_set_connection_state_changed_cb(NULL, NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else { 
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_hdp_set_connection_state_changed_cb(NULL, NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_hdp_set_connection_state_changed_cb_n1(void)
+{
+    if(!hdp_supported) { 
+        ret = bt_hdp_set_connection_state_changed_cb(NULL, NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {    
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_set_connection_state_changed_cb(NULL, NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_hdp_disconnect()
+ */
+int utc_bluetooth_bt_hdp_disconnect_n(void)
+{
+    if(!hdp_supported) {        
+        ret = bt_hdp_disconnect(NULL, 1);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_hdp_disconnect(NULL, 1);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_hdp_connect_to_source()
+ */
+int utc_bluetooth_bt_hdp_connect_to_source_n(void)
+{
+    if(!hdp_supported) {    
+        ret = bt_hdp_connect_to_source(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_hdp_connect_to_source(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_hdp_connect_to_source_n2(void)
+{
+    if(!hdp_supported) {        
+        ret = bt_hdp_connect_to_source(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_connect_to_source(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_hdp_register_sink_app()
+ */
+int utc_bluetooth_bt_hdp_register_sink_app_n(void)
+{
+    if(!hdp_supported) {
+        ret = bt_hdp_register_sink_app(1, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_hdp_register_sink_app(1, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_hdp_unregister_sink_appe()
+ */
+int utc_bluetooth_bt_hdp_unregister_sink_app_n(void)
+{
+    if(!hdp_supported) {
+        ret = bt_hdp_unregister_sink_app(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_hdp_unregister_sink_app(NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_hdp_unregister_sink_app_n1(void)
+{
+    if(!hdp_supported) {
+        ret = bt_hdp_unregister_sink_app(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_unregister_sink_app(NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_hdp_send_data()
+ */
+int utc_bluetooth_bt_hdp_send_data_n(void)
+{    
+    const char *data = "dts_test";
+
+    if(!hdp_supported) {        
+        ret = bt_hdp_send_data(1, data, strlen(data));
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_hdp_send_data(1, data, strlen(data));
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    }
+    
+    return 0;
+}
+
+static void connected_cb_for_hdp_p(int result, const char *remote_address,
+                    const char *app_id,
+                    bt_hdp_channel_type_e type, unsigned int channel, void *user_data)
+{
+
+}
+
+static void disconnected_cb_for_hdp_p(int result, const char *remote_address,
+                    unsigned int channel, void *user_data)
+{
+
+}
+
+int utc_bluetooth_bt_hdp_unset_connection_state_changed_cb_n(void)
+{
+    if(!hdp_supported) {        
+        ret = bt_hdp_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_set_connection_state_changed_cb(connected_cb_for_hdp_p,disconnected_cb_for_hdp_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_hdp_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+        bt_deinitialize();
+        bt_hdp_unset_connection_state_changed_cb();
+    }
+    
+    return 0;
+}
+
+static void data_received_cb_for_hdp_p(unsigned int channel, const char *data,
+                    unsigned int size, void *user_data)
+{
+
+}
+
+int utc_bluetooth_bt_hdp_unset_data_received_cb_n(void)
+{
+    if(!hdp_supported) {        
+        ret = bt_hdp_unset_data_received_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_set_data_received_cb(data_received_cb_for_hdp_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_hdp_unset_data_received_cb();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+        bt_deinitialize();
+        bt_hdp_unset_data_received_cb();
+    }
+    
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_hdp_positive.c b/src/utc/bluetooth/utc_bluetooth_hdp_positive.c
new file mode 100755 (executable)
index 0000000..131cb91
--- /dev/null
@@ -0,0 +1,196 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+
+//& set: BluetoothHDPPositive
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool hdp_supported = false;
+static bool bt_supported = false;
+
+
+static void data_received_cb_for_hdp_p(unsigned int channel, const char *data,
+                    unsigned int size, void *user_data)
+{
+
+}
+
+static void connected_cb_for_hdp_p(int result, const char *remote_address,
+                    const char *app_id,
+                    bt_hdp_channel_type_e type, unsigned int channel, void *user_data)
+{
+
+}
+
+static void disconnected_cb_for_hdp_p(int result, const char *remote_address,
+                    unsigned int channel, void *user_data)
+{
+
+}
+
+void utc_bluetooth_hdp_positive_startup(void)
+{
+    bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+    startup_flag = BT_ERROR_NONE;
+
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    hdp_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.health", &hdp_supported);
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+
+        ret = bt_adapter_get_state(&adapter_state);
+        if (adapter_state != BT_ADAPTER_ENABLED) {
+                fprintf(stdout, "BT is not enabled!!");
+                startup_flag = BT_ERROR_NOT_ENABLED;        
+        }
+    }
+}
+
+void utc_bluetooth_hdp_positive_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+int utc_bluetooth_bt_hdp_set_data_received_cb_p(void)
+{
+    if(!hdp_supported) {        
+        ret = bt_hdp_set_data_received_cb(data_received_cb_for_hdp_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_set_data_received_cb(data_received_cb_for_hdp_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_hdp_unset_data_received_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_hdp_unset_data_received_cb_p(void)
+{
+    if(!hdp_supported) {        
+        ret = bt_hdp_unset_data_received_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_set_data_received_cb(data_received_cb_for_hdp_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_hdp_unset_data_received_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_hdp_set_connection_state_changed_cb_p(void)
+{
+    if(!hdp_supported) {        
+        ret = bt_hdp_set_connection_state_changed_cb(connected_cb_for_hdp_p,disconnected_cb_for_hdp_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_set_connection_state_changed_cb(connected_cb_for_hdp_p,disconnected_cb_for_hdp_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_hdp_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_hdp_unset_connection_state_changed_cb_p(void)
+{
+    if(!hdp_supported) {        
+        ret = bt_hdp_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_set_connection_state_changed_cb(connected_cb_for_hdp_p,disconnected_cb_for_hdp_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_hdp_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_hdp_unregister_sink_app_p(void)
+{
+    char *app_id = NULL;
+
+    if(!hdp_supported) {        
+        ret = bt_hdp_unregister_sink_app(app_id);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_register_sink_app(1, &app_id);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_hdp_unregister_sink_app(app_id);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        free(app_id);
+        app_id = NULL;
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_hdp_register_sink_app_p(void)
+{
+    char *app_id = NULL;
+
+    if(!hdp_supported) {        
+        ret = bt_hdp_register_sink_app(1, &app_id);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hdp_register_sink_app(1, &app_id);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_hdp_unregister_sink_app(app_id);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        free(app_id);
+        app_id = NULL;
+    }
+    
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_hid_negative.c b/src/utc/bluetooth/utc_bluetooth_hid_negative.c
new file mode 100755 (executable)
index 0000000..a9259ac
--- /dev/null
@@ -0,0 +1,154 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+
+//& set: BluetoothHIDNegative
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool hid_supported = false;
+static bool bt_supported = false;
+
+
+static void host_connection_state_changed_cb_for_hid_p(int result,
+                bool connected, const char *remote_address, void *user_data)
+{
+
+}
+
+void utc_bluetooth_hid_negative_startup(void)
+{
+    startup_flag = BT_ERROR_NONE;
+
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    hid_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.hid", &hid_supported);
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+    }
+
+    if(hid_supported)
+        ret = bt_hid_host_initialize(host_connection_state_changed_cb_for_hid_p, NULL);
+}
+
+void utc_bluetooth_hid_negative_cleanup(void)
+{
+    if(hid_supported)
+        bt_hid_host_deinitialize();
+
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+int utc_bluetooth_bt_hid_host_initialize_n(void)
+{
+    if(!hid_supported) {        
+        ret = bt_hid_host_initialize(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_hid_host_initialize(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    }
+    return 0;
+}
+
+int utc_bluetooth_bt_hid_host_initialize_n1(void)
+{
+    if(!hid_supported) {        
+        ret = bt_hid_host_initialize(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hid_host_initialize(NULL, NULL);
+        assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_hid_host_connect_n(void)
+{
+    if(!hid_supported) {        
+        ret = bt_hid_host_connect(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_hid_host_connect(NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_hid_host_disconnect_n(void)
+{
+    if(!hid_supported) {        
+        ret = bt_hid_host_disconnect(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_deinitialize();
+        assert_eq(ret,BT_ERROR_NONE);
+
+        ret = bt_hid_host_disconnect(NULL);
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    }
+    
+    return 0;
+}
+
+int utc_bluetooth_bt_hid_host_deinitialize_n(void)
+{
+    if(!hid_supported) {        
+        ret = bt_hid_host_deinitialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hid_host_initialize(host_connection_state_changed_cb_for_hid_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_hid_host_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_hid_host_deinitialize();
+        assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+    }
+    
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_hid_positive.c b/src/utc/bluetooth/utc_bluetooth_hid_positive.c
new file mode 100755 (executable)
index 0000000..3dfc707
--- /dev/null
@@ -0,0 +1,102 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothHIDPositive
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool hid_supported = false;
+static bool bt_supported = false;
+
+
+static void host_connection_state_changed_cb_for_hid_p(int result,
+                bool connected, const char *remote_address, void *user_data)
+{
+}
+
+void utc_bluetooth_hid_positive_startup(void)
+{    
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    hid_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.hid", &hid_supported);
+
+    if(bt_supported) {  
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+
+        bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+
+        ret = bt_adapter_get_state(&adapter_state);
+        if (adapter_state != BT_ADAPTER_ENABLED) {
+            fprintf(stdout, "BT is not enabled!!");
+            startup_flag = BT_ERROR_NOT_ENABLED;        
+        }    
+    }
+}
+
+void utc_bluetooth_hid_positive_cleanup(void)
+{
+    if(hid_supported)
+        bt_hid_host_deinitialize();
+
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+int utc_bluetooth_bt_hid_host_initialize_p(void)
+{
+    if(!hid_supported) {        
+        ret = bt_hid_host_initialize(host_connection_state_changed_cb_for_hid_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hid_host_initialize(host_connection_state_changed_cb_for_hid_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_bluetooth_bt_hid_host_deinitialize_p(void)
+{
+    if(!hid_supported) {        
+        ret = bt_hid_host_deinitialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);        
+    } else {
+        assert_eq(startup_flag, BT_ERROR_NONE);
+        ret = bt_hid_host_initialize(host_connection_state_changed_cb_for_hid_p, NULL);
+        assert_eq(ret, BT_ERROR_NONE);
+
+        ret = bt_hid_host_deinitialize();
+        assert_eq(ret, BT_ERROR_NONE);
+    }
+    
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_opp_client_negative.c b/src/utc/bluetooth/utc_bluetooth_opp_client_negative.c
new file mode 100755 (executable)
index 0000000..09eac43
--- /dev/null
@@ -0,0 +1,201 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothOpp-clientNegative
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool opp_supported = false;
+static bool bt_supported = false;
+
+
+void utc_bluetooth_opp_client_negative_startup(void)
+{
+    startup_flag = BT_ERROR_NONE;
+
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    opp_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.opp", &opp_supported);
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+    }
+
+    if(opp_supported) {
+        ret = bt_opp_client_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_opp_client_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+        }
+    }
+}
+
+void utc_bluetooth_opp_client_negative_cleanup(void)
+{
+    if(opp_supported)
+        bt_opp_client_deinitialize();
+
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+int utc_bluetooth_bt_opp_client_initialize_n(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_client_initialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret, BT_ERROR_NONE);
+
+    ret = bt_opp_client_initialize();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_client_deinitialize_n(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_client_deinitialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret, BT_ERROR_NONE);
+
+    ret = bt_opp_client_deinitialize();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_client_add_file_n(void)
+{
+    const char *file = "/tmp/image16.jpg";
+    
+    if(!opp_supported) {
+        ret = bt_opp_client_add_file(file);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_opp_client_add_file(file);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_client_add_file_n1(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_client_add_file(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_opp_client_add_file(NULL);
+    assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_client_clear_files_n(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_client_clear_files();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_opp_client_clear_files();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_client_push_files_n(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_client_push_files(NULL, NULL, NULL, NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_opp_client_push_files(NULL, NULL, NULL, NULL, NULL);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_client_cancel_push_n(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_client_cancel_push();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_opp_client_cancel_push();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_opp_client_positive.c b/src/utc/bluetooth/utc_bluetooth_opp_client_positive.c
new file mode 100755 (executable)
index 0000000..5653e47
--- /dev/null
@@ -0,0 +1,127 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothOpp-client_Positive
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool opp_supported = false;
+static bool bt_supported = false;
+
+
+void utc_bluetooth_opp_client_positive_startup(void)
+{
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    opp_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.opp", &opp_supported);
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+
+        bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+        ret = bt_adapter_get_state(&adapter_state);
+        if (adapter_state != BT_ADAPTER_ENABLED) {
+                fprintf(stdout, "BT is not enabled!!");
+                startup_flag = BT_ERROR_NOT_ENABLED;        
+        }
+    }
+
+    if(opp_supported) {
+        ret = bt_opp_client_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_opp_client_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+        }
+    }
+}
+
+void utc_bluetooth_opp_client_positive_cleanup(void)
+{
+    if(opp_supported)
+        bt_opp_client_deinitialize();
+
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+
+
+int utc_bluetooth_bt_opp_client_initialize_p(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_client_initialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_opp_client_deinitialize();
+    assert_eq(ret, BT_ERROR_NONE);
+
+       ret = bt_opp_client_initialize();
+       assert_eq(ret, BT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_bluetooth_bt_opp_client_deinitialize_p(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_client_deinitialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+       ret = bt_opp_client_deinitialize();
+       assert_eq(ret, BT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_bluetooth_bt_opp_client_clear_files_p(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_client_clear_files();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_opp_client_clear_files();
+       assert_eq(ret, BT_ERROR_NONE);
+
+       return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_opp_server_negative.c b/src/utc/bluetooth/utc_bluetooth_opp_server_negative.c
new file mode 100755 (executable)
index 0000000..6b01eb6
--- /dev/null
@@ -0,0 +1,331 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothOpp-serverNegative
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static const char *dest = "/tmp";
+static bool opp_supported = false;
+static bool bt_supported = false;
+
+
+static void transfer_finished_cb_for_opp_server_p(int result, const char *file,
+                                            long long size, void *user_data)
+{
+
+}
+
+static void transfer_progress_cb_for_opp_server(const char *file, long long size,
+                                                int percent, void *user_data)
+{
+
+}
+
+static void transfer_finished_cb_for_opp_server(int result, const char *file,
+                                            long long size, void *user_data)
+{
+
+}
+
+void utc_bluetooth_bt_opp_server_negative_startup(void)
+{
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    opp_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.opp", &opp_supported);
+
+    startup_flag = BT_ERROR_NONE;
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+    }
+}
+
+void utc_bluetooth_bt_opp_server_negative_cleanup(void)
+{
+
+}
+
+int utc_bluetooth_bt_opp_server_accept_n(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_accept(transfer_progress_cb_for_opp_server,
+                            transfer_finished_cb_for_opp_server, NULL, NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_opp_server_accept(transfer_progress_cb_for_opp_server,
+                        transfer_finished_cb_for_opp_server, NULL, NULL, NULL);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_accept_n1(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_accept(transfer_progress_cb_for_opp_server,
+                            transfer_finished_cb_for_opp_server, NULL, NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_opp_server_accept(transfer_progress_cb_for_opp_server,
+                        transfer_finished_cb_for_opp_server, NULL, NULL, NULL);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_accept_n2(void)
+{
+    int tid = 0;
+    const char *name = "abc";
+
+    if(!opp_supported) {
+        ret = bt_opp_server_accept(transfer_progress_cb_for_opp_server,
+                transfer_finished_cb_for_opp_server_p, name, NULL, &tid);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_opp_server_accept(transfer_progress_cb_for_opp_server,
+            transfer_finished_cb_for_opp_server_p, name, NULL, &tid);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_reject_n(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_reject();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_opp_server_reject();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_reject_n1(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_reject();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_opp_server_reject();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_set_destination_n(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_set_destination(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_opp_server_set_destination(NULL);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_set_destination_n1(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_set_destination(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_opp_server_set_destination(NULL);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_set_destination_n2(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_set_destination(dest);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_opp_server_set_destination(dest);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_initialize_by_connection_request_n(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_initialize_by_connection_request(NULL, NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_opp_server_initialize_by_connection_request(NULL, NULL, NULL);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_initialize_by_connection_request_n1(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_initialize_by_connection_request(NULL, NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_opp_server_initialize_by_connection_request(NULL, NULL, NULL);
+    assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_deinitialize_n(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_deinitialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_opp_server_deinitialize();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_deinitialize_n1(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_deinitialize();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_opp_server_deinitialize();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_cancel_transfer_n(void)
+{
+    int tid = 0;
+    
+    if(!opp_supported) {
+        ret = bt_opp_server_cancel_transfer(tid);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_opp_server_cancel_transfer(tid);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_cancel_transfer_n1(void)
+{
+    int tid = 0;
+
+    if(!opp_supported) {
+        ret = bt_opp_server_cancel_transfer(tid);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_opp_server_cancel_transfer(tid);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
diff --git a/src/utc/bluetooth/utc_bluetooth_opp_server_positive.c b/src/utc/bluetooth/utc_bluetooth_opp_server_positive.c
new file mode 100755 (executable)
index 0000000..7ef7136
--- /dev/null
@@ -0,0 +1,124 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothOpp-serverPositive
+
+static bool startup_flag = true;
+static int ret = BT_ERROR_NONE;
+static const char *dest = "/tmp";
+static bool opp_supported = false;
+static bool bt_supported = false;
+
+
+static void push_requested_cb_for_opp_server_p(const char *remote_address,
+                                                            void *user_data)
+{
+
+}
+
+void utc_bluetooth_opp_server_positive_startup(void)
+{
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    opp_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.opp", &opp_supported);
+
+    startup_flag = BT_ERROR_NONE;
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+
+        bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+
+            ret = bt_adapter_get_state(&adapter_state);
+            if (adapter_state != BT_ADAPTER_ENABLED) {
+                    fprintf(stdout, "BT is not enabled!!");
+                    startup_flag = BT_ERROR_NOT_ENABLED;        
+            }
+    }
+}
+
+void utc_bluetooth_opp_server_positive_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+int utc_bluetooth_bt_opp_server_initialize_by_connection_request_p(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_initialize_by_connection_request(dest, push_requested_cb_for_opp_server_p, NULL);
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    
+       assert_eq(startup_flag, BT_ERROR_NONE);
+
+       ret = bt_opp_server_initialize_by_connection_request(dest, push_requested_cb_for_opp_server_p, NULL);
+       assert_eq(ret,BT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_bluetooth_bt_opp_server_deinitialize_p(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_deinitialize();
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+       ret = bt_opp_server_initialize_by_connection_request(dest, push_requested_cb_for_opp_server_p, NULL);
+
+    ret = bt_opp_server_deinitialize();
+    assert_eq(ret, BT_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_opp_server_set_destination_p(void)
+{
+    if(!opp_supported) {
+        ret = bt_opp_server_initialize_by_connection_request(dest, push_requested_cb_for_opp_server_p, NULL);
+        assert_eq(ret,BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+       ret = bt_opp_server_initialize_by_connection_request(dest, push_requested_cb_for_opp_server_p, NULL);
+
+    ret = bt_opp_server_set_destination(dest);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_service_search_negative.c b/src/utc/bluetooth/utc_bluetooth_service_search_negative.c
new file mode 100755 (executable)
index 0000000..b97817f
--- /dev/null
@@ -0,0 +1,134 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothServiceSearchNegative
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool bt_supported = false;
+
+void utc_bluetooth_service_search_negative_startup(void)
+{
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    startup_flag = BT_ERROR_NONE;
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+    }
+}
+
+void utc_bluetooth_service_search_negative_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+/**
+ * @brief Negative test case of bt_device_set_service_searched_cb()
+ */
+int utc_bluetooth_bt_device_set_service_searched_cb_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_device_set_service_searched_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_device_set_service_searched_cb(NULL, NULL);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_service_search_set_cb_n1(void)
+{
+    if(!bt_supported) {
+        ret = bt_device_set_service_searched_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_device_set_service_searched_cb(NULL, NULL);
+    assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_unset_service_searched_cb()
+ */
+int utc_bluetooth_bt_device_unset_service_searched_cb_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_device_unset_service_searched_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_device_unset_service_searched_cb();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_device_start_service_search()
+ */
+int utc_bluetooth_bt_device_start_service_search_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_device_start_service_search(NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_device_start_service_search(NULL);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_service_search_positive.c b/src/utc/bluetooth/utc_bluetooth_service_search_positive.c
new file mode 100755 (executable)
index 0000000..7fc6695
--- /dev/null
@@ -0,0 +1,106 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothServiceSearchPositive
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static bool bt_supported = false;
+
+static void service_searched_cb_for_service_search_p(int result,
+                            bt_device_sdp_info_s *sdp_info,
+                            void *user_data)
+{
+
+}
+
+void utc_bluetooth_service_search_positive_startup(void)
+{
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            startup_flag = ret;
+            return;
+        }
+
+        bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+
+        ret = bt_adapter_get_state(&adapter_state);
+        if (adapter_state != BT_ADAPTER_ENABLED) {
+                fprintf(stdout, "BT is not enabled!!");
+                startup_flag = BT_ERROR_NOT_ENABLED;        
+        }
+    }
+}
+
+void utc_bluetooth_service_search_positive_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+/**
+ * @brief Positive test case of bt_device_set_service_searched_cb()
+ */
+int utc_bluetooth_bt_device_set_service_searched_cb_p(void)
+{
+    if(!bt_supported) {
+        ret = bt_device_set_service_searched_cb(service_searched_cb_for_service_search_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_device_set_service_searched_cb(service_searched_cb_for_service_search_p, NULL);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    bt_device_unset_service_searched_cb();
+    
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_device_unset_service_searched_cb()
+ */
+int utc_bluetooth_bt_device_unset_service_searched_cb_p(void)
+{
+    if(!bt_supported) {
+        ret = bt_device_unset_service_searched_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_device_set_service_searched_cb(service_searched_cb_for_service_search_p, NULL);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    ret = bt_device_unset_service_searched_cb();
+    assert_eq(ret, BT_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_socket_negative.c b/src/utc/bluetooth/utc_bluetooth_socket_negative.c
new file mode 100755 (executable)
index 0000000..e002a1b
--- /dev/null
@@ -0,0 +1,368 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothSocketNegative
+
+static int startup_flag = BT_ERROR_NONE;
+static int ret = BT_ERROR_NONE;
+static const char *data = "dts_test";
+static char *address = "D8:90:E8:EE:2B:3A";
+static bool bt_supported = false;
+
+void utc_bluetooth_socket_negative_startup(void)
+{
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    startup_flag = BT_ERROR_NONE;
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+    }
+}
+
+void utc_bluetooth_socket_negative_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+/**
+ * @brief Negative test case of bt_socket_set_data_received_cb()
+ */
+int utc_bluetooth_bt_socket_set_data_received_cb_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_set_data_received_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_socket_set_data_received_cb(NULL, NULL);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_socket_set_data_received_cb_n1(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_set_data_received_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_set_data_received_cb(NULL, NULL);
+    assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_socket_set_connection_state_changed_cb()
+ */
+int utc_bluetooth_bt_socket_set_connection_state_changed_cb_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_set_connection_state_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_socket_set_connection_state_changed_cb(NULL, NULL);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_socket_set_connection_state_changed_cb_n1(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_set_connection_state_changed_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_set_connection_state_changed_cb(NULL, NULL);
+    assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_socket_unset_data_received_cb()
+ */
+int utc_bluetooth_bt_socket_unset_data_received_cb_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_unset_data_received_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+    
+    ret = bt_socket_unset_data_received_cb();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_socket_unset_connection_state_changed_cb()
+ */
+int utc_bluetooth_bt_socket_unset_connection_state_changed_cb_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_socket_unset_connection_state_changed_cb();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_socket_create_rfcomm()
+ */
+int utc_bluetooth_bt_socket_create_rfcomm_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_create_rfcomm(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_socket_create_rfcomm(NULL, NULL);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_socket_create_rfcomm_n1(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_create_rfcomm(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_create_rfcomm(NULL, NULL);
+    assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_socket_destroy_rfcomm()
+ */
+int utc_bluetooth_bt_socket_destroy_rfcomm_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_destroy_rfcomm(-1);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_socket_destroy_rfcomm(-1);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_socket_listen_and_accept_rfcomm()
+ */
+int utc_bluetooth_bt_socket_listen_and_accept_rfcomm_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_listen_and_accept_rfcomm(1, 1);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_socket_listen_and_accept_rfcomm(1, 1);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_socket_connect_rfcomm()
+ */
+int utc_bluetooth_bt_socket_connect_rfcomm_n(void)
+{
+    char *uuid = "";
+
+    if(!bt_supported) {
+        ret = bt_socket_connect_rfcomm(address, uuid);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_socket_connect_rfcomm(address, uuid);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_socket_disconnect_rfcomm()
+ */
+int utc_bluetooth_bt_socket_disconnect_rfcomm_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_disconnect_rfcomm(-1);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_socket_disconnect_rfcomm(-1);
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of bt_socket_send_data()
+ */
+int utc_bluetooth_bt_socket_send_data_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_send_data(1, data, strlen(data));
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_socket_send_data(1, data, strlen(data));
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    return 0;
+}
+
+int utc_bluetooth_bt_socket_set_connection_requested_cb_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_set_connection_requested_cb(NULL, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_set_connection_requested_cb(NULL, NULL);
+    assert_eq(ret, BT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static void bt_socket_connection_requested_cb_func (int socket_fd, const char *remote_address, void *user_data) {
+}
+
+int utc_bluetooth_bt_socket_unset_connection_requested_cb_n(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_unset_connection_requested_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_set_connection_requested_cb(bt_socket_connection_requested_cb_func, NULL);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    ret = bt_deinitialize();
+    assert_eq(ret,BT_ERROR_NONE);
+
+    ret = bt_socket_unset_connection_requested_cb();
+    assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+
+    bt_deinitialize();
+    bt_socket_unset_connection_requested_cb();
+
+    return 0;
+}
diff --git a/src/utc/bluetooth/utc_bluetooth_socket_positive.c b/src/utc/bluetooth/utc_bluetooth_socket_positive.c
new file mode 100755 (executable)
index 0000000..dbf3b78
--- /dev/null
@@ -0,0 +1,263 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bluetooth.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: BluetoothSocketPositive
+
+static int startup_flag = BT_ERROR_NONE;
+static int socket_fd = 0;
+static int ret = BT_ERROR_NONE;
+static const char *rfcomm_test_uuid_spp = "00001101-0000-1000-8000-00805F9B34FB";
+static bool bt_supported = false;
+
+
+static void socket_data_received_cb_for_socket_p(bt_socket_received_data_s *data,
+                    void *user_data)
+{
+}
+
+static void socket_connection_state_changed_cb_for_socket_p(int result,
+                bt_socket_connection_state_e connection_state,
+                bt_socket_connection_s *connection, void *user_data)
+{
+}
+
+void utc_bluetooth_bt_socket_positive_startup(void)
+{
+    bt_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth", &bt_supported);
+
+    startup_flag = BT_ERROR_NONE;
+
+    if(bt_supported) {
+        ret = bt_initialize();
+        if(BT_ERROR_NONE != ret) {
+            fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "bt_initialize failed (code: %d)\n", ret);
+            startup_flag = ret;
+            return;
+        }
+
+        bt_adapter_state_e adapter_state = BT_ADAPTER_DISABLED;
+
+        ret = bt_adapter_get_state(&adapter_state);
+        if (adapter_state != BT_ADAPTER_ENABLED) {
+                fprintf(stdout, "BT is not enabled!!");
+                startup_flag = BT_ERROR_NOT_ENABLED;        
+                //disable_bluetooth_le_adapter();
+        }
+    }
+}
+
+void utc_bluetooth_bt_socket_positive_cleanup(void)
+{
+    if(bt_supported)
+        bt_deinitialize();
+}
+
+/**
+ * @brief Positive test case of bt_socket_set_data_received_cb()
+ */
+int utc_bluetooth_bt_socket_set_data_received_cb_p(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_set_data_received_cb(socket_data_received_cb_for_socket_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_set_data_received_cb(socket_data_received_cb_for_socket_p, NULL);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    bt_socket_unset_data_received_cb();
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_socket_set_connection_state_changed_cb()
+ */
+int utc_bluetooth_bt_socket_set_connection_state_changed_cb_p(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_set_connection_state_changed_cb(socket_connection_state_changed_cb_for_socket_p, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_set_connection_state_changed_cb(socket_connection_state_changed_cb_for_socket_p, NULL);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    bt_socket_unset_connection_state_changed_cb();
+
+    return 0;
+}
+/**
+ * @brief Positive test case of bt_socket_create_rfcomm()
+ */
+int utc_bluetooth_bt_socket_create_rfcomm_p(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_create_rfcomm(rfcomm_test_uuid_spp, &socket_fd);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_create_rfcomm(rfcomm_test_uuid_spp, &socket_fd);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_socket_listen_and_accept_rfcomm()
+ */
+int utc_bluetooth_bt_socket_listen_and_accept_rfcomm_p(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_listen_and_accept_rfcomm(socket_fd, 1);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_create_rfcomm(rfcomm_test_uuid_spp, &socket_fd);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    ret = bt_socket_listen_and_accept_rfcomm(socket_fd, 1);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_socket_destroy_rfcomm()
+ */
+int utc_bluetooth_bt_socket_destroy_rfcomm_p(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_destroy_rfcomm(socket_fd);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_create_rfcomm(rfcomm_test_uuid_spp, &socket_fd);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    ret = bt_socket_destroy_rfcomm(socket_fd);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_socket_unset_data_received_cb()
+ */
+int utc_bluetooth_bt_socket_unset_data_received_cb_p(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_unset_data_received_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_set_data_received_cb(socket_data_received_cb_for_socket_p, NULL);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    ret = bt_socket_unset_data_received_cb();
+    assert_eq(ret, BT_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of bt_socket_unset_connection_state_changed_cb()
+ */
+int utc_bluetooth_bt_socket_unset_connection_state_changed_cb_p(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_unset_connection_state_changed_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_set_connection_state_changed_cb(socket_connection_state_changed_cb_for_socket_p, NULL);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    ret = bt_socket_unset_connection_state_changed_cb();
+    assert_eq(ret, BT_ERROR_NONE);
+
+    return 0;
+}
+
+static void bt_socket_connection_requested_cb_func (int socket_fd, const char *remote_address, void *user_data) {
+}
+
+int utc_bluetooth_bt_socket_set_connection_requested_cb_p(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_set_connection_requested_cb(bt_socket_connection_requested_cb_func, NULL);
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_set_connection_requested_cb(bt_socket_connection_requested_cb_func, NULL);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    bt_socket_unset_connection_requested_cb();
+
+    return 0;
+}
+
+int utc_bluetooth_bt_socket_unset_connection_requested_cb_p(void)
+{
+    if(!bt_supported) {
+        ret = bt_socket_unset_connection_requested_cb();
+        assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(startup_flag, BT_ERROR_NONE);
+
+    ret = bt_socket_set_connection_requested_cb(bt_socket_connection_requested_cb_func, NULL);
+    assert_eq(ret, BT_ERROR_NONE);
+
+    ret = bt_socket_unset_connection_requested_cb();
+    assert_eq(ret, BT_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/bundle/CMakeLists.txt b/src/utc/bundle/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..cedd340
--- /dev/null
@@ -0,0 +1,50 @@
+SET(PKG_NAME "bundle")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "bundle")
+SET(TC_SOURCES
+       utc-ApplicationFW-bundle-create-func.c
+       utc-ApplicationFW-bundle-decode-func.c
+       utc-ApplicationFW-bundle-del-func.c
+       utc-ApplicationFW-bundle-encode-func.c
+       utc-ApplicationFW-bundle-free-func.c
+       utc-ApplicationFW-bundle-get-count-func.c
+       utc-ApplicationFW-bundle-foreach-func.c
+       utc-ApplicationFW-bundle-get-type-func.c
+       utc-ApplicationFW-bundle-add-str-func.c
+       utc-ApplicationFW-bundle-get-str-func.c
+       utc-ApplicationFW-bundle-add-byte-func.c
+       utc-ApplicationFW-bundle-get-byte-func.c
+       utc-ApplicationFW-bundle-add-str-array-func.c
+       utc-ApplicationFW-bundle-get-str-array-func.c
+       utc-ApplicationFW-bundle-keyval.c
+       utc-ApplicationFW-bundle-keyval-get-basic-val-func.c
+       utc-ApplicationFW-bundle-keyval-get-array-val-func.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-base-common
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/bundle/nonpriv.list b/src/utc/bundle/nonpriv.list
new file mode 100755 (executable)
index 0000000..9b573b5
--- /dev/null
@@ -0,0 +1,33 @@
+bundle_add
+bundle_add_byte
+bundle_add_byte_array
+bundle_add_str
+bundle_add_str_array
+bundle_create
+bundle_decode
+bundle_decode_raw
+bundle_del
+bundle_dup
+bundle_encode
+bundle_encode_raw
+bundle_export_to_argv
+bundle_foreach
+bundle_free
+bundle_free_encoded_rawdata
+bundle_free_exported_argv
+bundle_get_byte
+bundle_get_byte_array
+bundle_get_count
+bundle_get_str
+bundle_get_str_array
+bundle_get_type
+bundle_get_val
+bundle_import_from_argv
+bundle_iterate
+bundle_keyval_get_array_val
+bundle_keyval_get_basic_val
+bundle_keyval_get_type
+bundle_keyval_type_is_array
+bundle_keyval_type_is_measurable
+bundle_set_byte_array_element
+bundle_set_str_array_element
diff --git a/src/utc/bundle/public.list b/src/utc/bundle/public.list
new file mode 100755 (executable)
index 0000000..664d91f
--- /dev/null
@@ -0,0 +1,19 @@
+bundle_add_byte
+bundle_add_str
+bundle_add_str_array
+bundle_create
+bundle_decode
+bundle_del
+bundle_encode
+bundle_foreach
+bundle_free
+bundle_get_byte
+bundle_get_count
+bundle_get_str
+bundle_get_str_array
+bundle_get_type
+bundle_keyval_get_array_val
+bundle_keyval_get_basic_val
+bundle_keyval_get_type
+bundle_keyval_type_is_array
+
diff --git a/src/utc/bundle/tct-bundle-core.c b/src/utc/bundle/tct-bundle-core.c
new file mode 100755 (executable)
index 0000000..ea3c76e
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-bundle-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/bundle/tct-bundle-core.h b/src/utc/bundle/tct-bundle-core.h
new file mode 100755 (executable)
index 0000000..45e63a7
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_BUNDLE_CORE_H__
+#define __TCT_BUNDLE_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_ApplicationFW_bundle_del_startup(void);
+extern void utc_ApplicationFW_bundle_del_cleanup(void);
+extern void utc_ApplicationFW_bundle_add_str_startup(void);
+extern void utc_ApplicationFW_bundle_add_str_cleanup(void);
+extern void utc_ApplicationFW_bundle_add_byte_startup(void);
+extern void utc_ApplicationFW_bundle_add_byte_cleanup(void);
+extern void utc_ApplicationFW_bundle_add_str_array_startup(void);
+extern void utc_ApplicationFW_bundle_add_str_array_cleanup(void);
+extern void utc_ApplicationFW_bundle_get_str_array_startup(void);
+extern void utc_ApplicationFW_bundle_get_str_array_cleanup(void);
+
+extern int utc_ApplicationFW_bundle_create_p(void);
+extern int utc_ApplicationFW_bundle_decode_p(void);
+extern int utc_ApplicationFW_bundle_decode_n(void);
+extern int utc_ApplicationFW_bundle_del_p(void);
+extern int utc_ApplicationFW_bundle_del_n(void);
+extern int utc_ApplicationFW_bundle_del_n2(void);
+extern int utc_ApplicationFW_bundle_del_n3(void);
+extern int utc_ApplicationFW_bundle_encode_p(void);
+extern int utc_ApplicationFW_bundle_encode_n(void);
+extern int utc_ApplicationFW_bundle_encode_n2(void);
+extern int utc_ApplicationFW_bundle_encode_n3(void);
+extern int utc_ApplicationFW_bundle_free_p(void);
+extern int utc_ApplicationFW_bundle_free_n(void);
+extern int utc_ApplicationFW_bundle_get_count_p(void);
+extern int utc_ApplicationFW_bundle_get_count_n(void);
+extern int utc_ApplicationFW_bundle_foreach_p(void);
+extern int utc_ApplicationFW_bundle_foreach_n(void);
+extern int utc_ApplicationFW_bundle_get_type_p(void);
+extern int utc_ApplicationFW_bundle_get_type_n(void);
+extern int utc_ApplicationFW_bundle_add_str_p(void);
+extern int utc_ApplicationFW_bundle_add_str_n(void);
+extern int utc_ApplicationFW_bundle_add_str_n2(void);
+extern int utc_ApplicationFW_bundle_add_str_n3(void);
+extern int utc_ApplicationFW_bundle_get_str_p(void);
+extern int utc_ApplicationFW_bundle_get_str_n(void);
+extern int utc_ApplicationFW_bundle_get_str_n2(void);
+extern int utc_ApplicationFW_bundle_get_str_n3(void);
+extern int utc_ApplicationFW_bundle_add_byte_p(void);
+extern int utc_ApplicationFW_bundle_add_byte_n(void);
+extern int utc_ApplicationFW_bundle_add_byte_n2(void);
+extern int utc_ApplicationFW_bundle_get_byte_p(void);
+extern int utc_ApplicationFW_bundle_get_byte_n(void);
+extern int utc_ApplicationFW_bundle_get_byte_n2(void);
+extern int utc_ApplicationFW_bundle_get_byte_n3(void);
+extern int utc_ApplicationFW_bundle_add_str_array_p(void);
+extern int utc_ApplicationFW_bundle_add_str_array_n(void);
+extern int utc_ApplicationFW_bundle_add_str_array_n2(void);
+extern int utc_ApplicationFW_bundle_add_str_array_n3(void);
+extern int utc_ApplicationFW_bundle_get_str_array_p(void);
+extern int utc_ApplicationFW_bundle_get_str_array_n(void);
+extern int utc_ApplicationFW_bundle_get_str_array_n2(void);
+extern int utc_ApplicationFW_bundle_get_str_array_n3(void);
+extern int utc_ApplicationFW_bundle_keyval_get_type_p(void);
+extern int utc_ApplicationFW_bundle_keyval_get_type_n(void);
+extern int utc_ApplicationFW_bundle_keyval_type_is_array_p(void);
+extern int utc_ApplicationFW_bundle_keyval_type_is_array_n(void);
+extern int utc_bundle_keyval_get_basic_val_p(void);
+extern int utc_bundle_keyval_get_basic_val_n(void);
+extern int utc_bundle_keyval_get_array_val_p(void);
+extern int utc_bundle_keyval_get_array_val_n(void);
+
+testcase tc_array[] = {
+    {"utc_ApplicationFW_bundle_create_p", utc_ApplicationFW_bundle_create_p, NULL, NULL},
+    {"utc_ApplicationFW_bundle_decode_p", utc_ApplicationFW_bundle_decode_p, NULL, NULL},
+    {"utc_ApplicationFW_bundle_decode_n", utc_ApplicationFW_bundle_decode_n, NULL, NULL},
+    {"utc_ApplicationFW_bundle_del_p", utc_ApplicationFW_bundle_del_p, utc_ApplicationFW_bundle_del_startup, utc_ApplicationFW_bundle_del_cleanup},
+    {"utc_ApplicationFW_bundle_del_n", utc_ApplicationFW_bundle_del_n, utc_ApplicationFW_bundle_del_startup, utc_ApplicationFW_bundle_del_cleanup},
+    {"utc_ApplicationFW_bundle_del_n2", utc_ApplicationFW_bundle_del_n2, utc_ApplicationFW_bundle_del_startup, utc_ApplicationFW_bundle_del_cleanup},
+    {"utc_ApplicationFW_bundle_del_n3", utc_ApplicationFW_bundle_del_n3, utc_ApplicationFW_bundle_del_startup, utc_ApplicationFW_bundle_del_cleanup},
+    {"utc_ApplicationFW_bundle_encode_p", utc_ApplicationFW_bundle_encode_p, NULL, NULL},
+    {"utc_ApplicationFW_bundle_encode_n", utc_ApplicationFW_bundle_encode_n, NULL, NULL},
+    {"utc_ApplicationFW_bundle_encode_n2", utc_ApplicationFW_bundle_encode_n2, NULL, NULL},
+    {"utc_ApplicationFW_bundle_encode_n3", utc_ApplicationFW_bundle_encode_n3, NULL, NULL},
+    {"utc_ApplicationFW_bundle_free_p", utc_ApplicationFW_bundle_free_p, NULL, NULL},
+    {"utc_ApplicationFW_bundle_free_n", utc_ApplicationFW_bundle_free_n, NULL, NULL},
+    {"utc_ApplicationFW_bundle_get_count_p", utc_ApplicationFW_bundle_get_count_p, NULL, NULL},
+    {"utc_ApplicationFW_bundle_get_count_n", utc_ApplicationFW_bundle_get_count_n, NULL, NULL},
+    {"utc_ApplicationFW_bundle_foreach_p", utc_ApplicationFW_bundle_foreach_p, NULL, NULL},
+    {"utc_ApplicationFW_bundle_foreach_n", utc_ApplicationFW_bundle_foreach_n, NULL, NULL},
+    {"utc_ApplicationFW_bundle_get_type_p", utc_ApplicationFW_bundle_get_type_p, NULL, NULL},
+    {"utc_ApplicationFW_bundle_get_type_n", utc_ApplicationFW_bundle_get_type_n, NULL, NULL},
+    {"utc_ApplicationFW_bundle_add_str_p", utc_ApplicationFW_bundle_add_str_p, utc_ApplicationFW_bundle_add_str_startup, utc_ApplicationFW_bundle_add_str_cleanup},
+    {"utc_ApplicationFW_bundle_add_str_n", utc_ApplicationFW_bundle_add_str_n, utc_ApplicationFW_bundle_add_str_startup, utc_ApplicationFW_bundle_add_str_cleanup},
+    {"utc_ApplicationFW_bundle_add_str_n2", utc_ApplicationFW_bundle_add_str_n2, utc_ApplicationFW_bundle_add_str_startup, utc_ApplicationFW_bundle_add_str_cleanup},
+    {"utc_ApplicationFW_bundle_add_str_n3", utc_ApplicationFW_bundle_add_str_n3, utc_ApplicationFW_bundle_add_str_startup, utc_ApplicationFW_bundle_add_str_cleanup},
+    {"utc_ApplicationFW_bundle_get_str_p", utc_ApplicationFW_bundle_get_str_p, NULL, NULL},
+    {"utc_ApplicationFW_bundle_get_str_n", utc_ApplicationFW_bundle_get_str_n, NULL, NULL},
+    {"utc_ApplicationFW_bundle_get_str_n2", utc_ApplicationFW_bundle_get_str_n2, NULL, NULL},
+    {"utc_ApplicationFW_bundle_get_str_n3", utc_ApplicationFW_bundle_get_str_n3, NULL, NULL},
+    {"utc_ApplicationFW_bundle_add_byte_p", utc_ApplicationFW_bundle_add_byte_p, utc_ApplicationFW_bundle_add_byte_startup, utc_ApplicationFW_bundle_add_byte_cleanup},
+    {"utc_ApplicationFW_bundle_add_byte_n", utc_ApplicationFW_bundle_add_byte_n, utc_ApplicationFW_bundle_add_byte_startup, utc_ApplicationFW_bundle_add_byte_cleanup},
+    {"utc_ApplicationFW_bundle_add_byte_n2", utc_ApplicationFW_bundle_add_byte_n2, utc_ApplicationFW_bundle_add_byte_startup, utc_ApplicationFW_bundle_add_byte_cleanup},
+    {"utc_ApplicationFW_bundle_get_byte_p", utc_ApplicationFW_bundle_get_byte_p, NULL, NULL},
+    {"utc_ApplicationFW_bundle_get_byte_n", utc_ApplicationFW_bundle_get_byte_n, NULL, NULL},
+    {"utc_ApplicationFW_bundle_get_byte_n2", utc_ApplicationFW_bundle_get_byte_n2, NULL, NULL},
+    {"utc_ApplicationFW_bundle_get_byte_n3", utc_ApplicationFW_bundle_get_byte_n3, NULL, NULL},
+    {"utc_ApplicationFW_bundle_add_str_array_p", utc_ApplicationFW_bundle_add_str_array_p, utc_ApplicationFW_bundle_add_str_array_startup, utc_ApplicationFW_bundle_add_str_array_cleanup},
+    {"utc_ApplicationFW_bundle_add_str_array_n", utc_ApplicationFW_bundle_add_str_array_n, utc_ApplicationFW_bundle_add_str_array_startup, utc_ApplicationFW_bundle_add_str_array_cleanup},
+    {"utc_ApplicationFW_bundle_add_str_array_n2", utc_ApplicationFW_bundle_add_str_array_n2, utc_ApplicationFW_bundle_add_str_array_startup, utc_ApplicationFW_bundle_add_str_array_cleanup},
+    {"utc_ApplicationFW_bundle_add_str_array_n3", utc_ApplicationFW_bundle_add_str_array_n3, utc_ApplicationFW_bundle_add_str_array_startup, utc_ApplicationFW_bundle_add_str_array_cleanup},
+    {"utc_ApplicationFW_bundle_get_str_array_p", utc_ApplicationFW_bundle_get_str_array_p, utc_ApplicationFW_bundle_get_str_array_startup, utc_ApplicationFW_bundle_get_str_array_cleanup},
+    {"utc_ApplicationFW_bundle_get_str_array_n", utc_ApplicationFW_bundle_get_str_array_n, utc_ApplicationFW_bundle_get_str_array_startup, utc_ApplicationFW_bundle_get_str_array_cleanup},
+    {"utc_ApplicationFW_bundle_get_str_array_n2", utc_ApplicationFW_bundle_get_str_array_n2, utc_ApplicationFW_bundle_get_str_array_startup, utc_ApplicationFW_bundle_get_str_array_cleanup},
+    {"utc_ApplicationFW_bundle_get_str_array_n3", utc_ApplicationFW_bundle_get_str_array_n3, utc_ApplicationFW_bundle_get_str_array_startup, utc_ApplicationFW_bundle_get_str_array_cleanup},
+    {"utc_ApplicationFW_bundle_keyval_get_type_p", utc_ApplicationFW_bundle_keyval_get_type_p, NULL, NULL},
+    {"utc_ApplicationFW_bundle_keyval_get_type_n", utc_ApplicationFW_bundle_keyval_get_type_n, NULL, NULL},
+    {"utc_ApplicationFW_bundle_keyval_type_is_array_p", utc_ApplicationFW_bundle_keyval_type_is_array_p, NULL, NULL},
+    {"utc_ApplicationFW_bundle_keyval_type_is_array_n", utc_ApplicationFW_bundle_keyval_type_is_array_n, NULL, NULL},
+    {"utc_bundle_keyval_get_basic_val_p", utc_bundle_keyval_get_basic_val_p, NULL, NULL},
+    {"utc_bundle_keyval_get_basic_val_n", utc_bundle_keyval_get_basic_val_n, NULL, NULL},
+    {"utc_bundle_keyval_get_array_val_p", utc_bundle_keyval_get_array_val_p, NULL, NULL},
+    {"utc_bundle_keyval_get_array_val_n", utc_bundle_keyval_get_array_val_n, NULL, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_BUNDLE_CORE_H__
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-add-byte-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-add-byte-func.c
new file mode 100755 (executable)
index 0000000..1b5782e
--- /dev/null
@@ -0,0 +1,77 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+
+//& set: BundleAddByteFunc
+
+static bundle *b = NULL;
+
+void utc_ApplicationFW_bundle_add_byte_startup(void)
+{
+    b = bundle_create();
+}
+
+void utc_ApplicationFW_bundle_add_byte_cleanup(void)
+{
+    bundle_free(b);
+    b = NULL;
+}
+
+int utc_ApplicationFW_bundle_add_byte_p(void)
+{
+    int r = 0;
+    unsigned char data[4] = {0, 1, 2, 3};
+
+    assert_neq(b, NULL);
+
+    r = bundle_add_byte(b, "b", data, 4);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_get_type(b, "b");
+    assert_eq(r, BUNDLE_TYPE_BYTE);
+
+    return 0;
+}
+
+
+int utc_ApplicationFW_bundle_add_byte_n(void)
+{
+    int r = 0;
+    unsigned char data[4] = {0, 1, 2, 3};
+
+    assert_neq(b, NULL);
+
+    r = bundle_add_byte(b, "b", data, 4);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_add_byte(b, "b", data, 4);
+    assert_neq(r, BUNDLE_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_add_byte_n2(void)
+{
+    int r = 0;
+    unsigned char data[4] = {0, 1, 2, 3};
+
+    r = bundle_add_byte(b, NULL, data, 4);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-add-str-array-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-add-str-array-func.c
new file mode 100755 (executable)
index 0000000..d1f4672
--- /dev/null
@@ -0,0 +1,89 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+
+//& set: BundleAddStrArrayFunc
+
+static bundle *b = NULL;
+
+void utc_ApplicationFW_bundle_add_str_array_startup(void)
+{
+    b = bundle_create();
+}
+
+void utc_ApplicationFW_bundle_add_str_array_cleanup(void)
+{
+    bundle_free(b);
+    b = NULL;
+}
+
+int utc_ApplicationFW_bundle_add_str_array_p(void)
+{
+    int r = 0;
+    int array_len = 3;
+    assert_neq(b, NULL);
+    const char *str_array[] = { "aaa", "bbb", "ccc" };
+
+    r = bundle_add_str_array(b, "key", str_array, array_len);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_get_type(b, "key");
+    assert_eq(r, BUNDLE_TYPE_STR_ARRAY);
+
+    return 0;
+}
+
+// key already exists
+int utc_ApplicationFW_bundle_add_str_array_n(void)
+{
+    int r = 0;
+    int array_len = 3;
+    const char *str_array[] = { "aaa", "bbb", "ccc" };
+    assert_neq(b, NULL);
+
+    r = bundle_add_str_array(b, "key", str_array, array_len);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_add_str_array(b, "key", str_array, array_len);
+    assert_neq(r, BUNDLE_ERROR_NONE);
+
+    return 0;
+}
+
+// NULL key pointer
+int utc_ApplicationFW_bundle_add_str_array_n2(void)
+{
+    int r = 0;
+    assert_neq(b, NULL);
+
+    r = bundle_add_str_array(b, NULL, NULL, 0);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+// all pointers NULL
+int utc_ApplicationFW_bundle_add_str_array_n3(void)
+{
+    int r = 0;
+    assert_neq(b, NULL);
+
+    r = bundle_add_str_array(NULL, NULL, NULL, 0);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-add-str-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-add-str-func.c
new file mode 100755 (executable)
index 0000000..62fc3e2
--- /dev/null
@@ -0,0 +1,87 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+
+//& set: BundleAddStrFunc
+
+static bundle *b = NULL;
+
+void utc_ApplicationFW_bundle_add_str_startup(void)
+{
+    b = bundle_create();
+}
+
+void utc_ApplicationFW_bundle_add_str_cleanup(void)
+{
+    bundle_free(b);
+    b = NULL;
+}
+
+int utc_ApplicationFW_bundle_add_str_p(void)
+{
+    int r = 0;
+    char *key = "a";
+    char *val = "123";
+
+    assert_neq(b, NULL);
+
+    r = bundle_add_str(b, key, val);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_get_type(b, key);
+    assert_eq(r, BUNDLE_TYPE_STR);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_add_str_n(void)
+{
+    int r = 0;
+    char *key = "key";
+    char *val1 = "aaa";
+    char *val2 = "bbb";
+
+    r = bundle_add_str(b, key, val1);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_add_str(b, key, val2);
+    assert_neq(r, BUNDLE_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_add_str_n2(void)
+{
+    int r = 0;
+    char *val = "aaa";
+
+    r = bundle_add_str(b, NULL, val);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_add_str_n3(void)
+{
+    int r = 0;
+    char *key = "key";
+
+    r = bundle_add_str(b, key, NULL);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-create-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-create-func.c
new file mode 100755 (executable)
index 0000000..bdf98bc
--- /dev/null
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+
+//& set: BundleCreateFunc
+
+int utc_ApplicationFW_bundle_create_p(void)
+{
+    bundle *b = NULL;
+
+    b = bundle_create();
+    assert_neq(b, NULL);
+
+    /* If assert above passed than bundle object has been created
+     * and have to be removed. */
+    bundle_free(b);
+
+    return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-decode-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-decode-func.c
new file mode 100755 (executable)
index 0000000..3526af3
--- /dev/null
@@ -0,0 +1,60 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+#include <string.h>
+#include <stdlib.h>
+
+//& set: BundleDecodeFunc
+
+int utc_ApplicationFW_bundle_decode_p(void)
+{
+    int r = 0;
+    int len;
+    bundle_raw *raw = NULL;
+    char *val = NULL;
+
+    bundle *b = bundle_create();
+    assert(b);
+    r = bundle_add_str(b, "a", "123");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_encode(b, &raw, &len);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+    assert_neq(raw, NULL);
+
+    bundle *b_dec = bundle_decode(raw, len);
+    assert(b_dec);
+
+    bundle_get_str(b_dec, "a", &val);
+    assert(!strcmp("123", val));
+
+    bundle_free(b);
+    bundle_free(b_dec);
+    free(raw);
+    return 0;
+}
+
+
+int utc_ApplicationFW_bundle_decode_n(void)
+{
+    bundle* result = bundle_decode(NULL, 1);
+    assert(!result);
+    bundle_free(result);
+
+    return 0;
+}
+
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-del-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-del-func.c
new file mode 100755 (executable)
index 0000000..2d7eec6
--- /dev/null
@@ -0,0 +1,89 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+//& set: BundleDelFunc
+
+static bundle *b = NULL;
+
+void utc_ApplicationFW_bundle_del_startup(void)
+{
+    b = bundle_create();
+}
+
+void utc_ApplicationFW_bundle_del_cleanup(void)
+{
+    bundle_free(b);
+}
+
+int utc_ApplicationFW_bundle_del_p(void)
+{
+    int r = 0;
+    assert_neq(b, NULL);
+    char *val = NULL;
+
+    r = bundle_add_str(b, "a", "123");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_del(b, "a");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_get_str(b, "a", &val);
+    assert_eq(r, BUNDLE_ERROR_KEY_NOT_AVAILABLE);
+
+    return 0;
+}
+
+
+int utc_ApplicationFW_bundle_del_n(void)
+{
+    int r = 0;
+    assert_neq(b, NULL);
+
+    r = bundle_add_str(b, "a", "123");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_del(b, "a");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_del(b, "a");
+    assert_eq(r, BUNDLE_ERROR_KEY_NOT_AVAILABLE);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_del_n2(void)
+{
+    int r = 0;
+    assert_neq(b, NULL);
+
+    r = bundle_del(b, NULL);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_del_n3(void)
+{
+    int r = 0;
+    assert_neq(b, NULL);
+
+    r = bundle_del(NULL, "a");
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-encode-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-encode-func.c
new file mode 100755 (executable)
index 0000000..9cfaee3
--- /dev/null
@@ -0,0 +1,87 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+
+//& set: BundleEncodeFunc
+
+int utc_ApplicationFW_bundle_encode_p(void)
+{
+    int r = 0;
+    int len = 0;
+
+    bundle_raw *raw = NULL;
+    bundle *b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_add_str(b, "a", "123");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_encode(b, &raw, &len);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+    assert_neq(raw, NULL);
+    assert(len > 0);
+
+    bundle_free(b);
+    free(raw);
+    return 0;
+}
+
+
+int utc_ApplicationFW_bundle_encode_n(void)
+{
+    int r = 0;
+
+    r = bundle_encode(NULL, NULL, NULL);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_encode_n2(void)
+{
+    int r = 0;
+
+    bundle *b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_add_str(b, "a", "123");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_encode(b, NULL, NULL);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    bundle_free(b);
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_encode_n3(void)
+{
+    int r = 0;
+
+    bundle *b = bundle_create();
+    bundle_raw *raw = NULL;
+    assert_neq(b, NULL);
+
+    r = bundle_add_str(b, "a", "123");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_encode(b, &raw, NULL);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    bundle_free(b);
+    return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-foreach-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-foreach-func.c
new file mode 100755 (executable)
index 0000000..40dab93
--- /dev/null
@@ -0,0 +1,78 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+#include <string.h>
+#include <stdbool.h>
+//& set: BundleForeachFunc
+
+static int cb_counter = 0;
+static char* keys[2] = {"aa", "bb"};
+static char* vals[2] = {"123", "456"};
+static bool valid_key = true;
+static bool valid_type = true;
+static bool valid_kv = true;
+static bool valid_val = true;
+static void _foreach_cb(const char *key, const int type, const bundle_keyval_t *kv, void *data)
+{
+    void *basic_val = NULL;
+    size_t basic_size = 0;
+
+    if (!strcmp(key, keys[cb_counter])) valid_key = false;
+    if (type != BUNDLE_TYPE_STR) valid_type = false;
+    if (kv == NULL) valid_kv = false;
+    else {
+       bundle_keyval_get_basic_val(kv, &basic_val, &basic_size);
+       if(strcmp(basic_val, vals[cb_counter])) valid_val = false;
+    }
+
+    cb_counter++;
+}
+
+
+int utc_ApplicationFW_bundle_foreach_p(void)
+{
+    int r = 0;
+
+    bundle *b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_add_str(b, "a", "123");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+    r = bundle_add_str(b, "b", "456");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    bundle_foreach(b, _foreach_cb, NULL);
+    assert_eq(cb_counter, 2);
+
+    assert(valid_key);
+    assert(valid_type);
+    assert(valid_kv);
+    assert(valid_val);
+
+    bundle_free(b);
+    return 0;
+}
+
+
+int utc_ApplicationFW_bundle_foreach_n(void)
+{
+    bundle_foreach(NULL, NULL, NULL);
+
+    /* Function does not return any value so test PASS if there's no
+     * segmentation fault for NULL pointers */
+    return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-free-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-free-func.c
new file mode 100755 (executable)
index 0000000..ece3512
--- /dev/null
@@ -0,0 +1,43 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+
+//& set: BundleFreeFunc
+
+int utc_ApplicationFW_bundle_free_p(void)
+{
+    int r;
+
+    bundle *b = NULL;
+    b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_free(b);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_ApplicationFW_bundle_free_n(void)
+{
+    int r = 0;
+
+    r = bundle_free(NULL);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+    return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-get-byte-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-get-byte-func.c
new file mode 100755 (executable)
index 0000000..236698b
--- /dev/null
@@ -0,0 +1,81 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+
+//& set: BundleGetByteFunc
+
+int utc_ApplicationFW_bundle_get_byte_p(void)
+{
+    int r;
+    unsigned char data[4] = {0, 1, 2, 3};
+    unsigned char* output = NULL;
+    size_t size = 0;
+
+    bundle *b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_add_byte(b, "b", (void*)data, 4);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_get_byte(b, "b", (void*)&output, &size);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+    assert_eq(size, 4);
+    int i;
+    for(i = 0; i < 4; i++) {
+        assert_eq(data[i], output[i]);
+    }
+
+    bundle_free(b);
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_get_byte_n(void)
+{
+    int r;
+    r = bundle_get_byte(NULL, NULL, NULL, NULL);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_get_byte_n2(void)
+{
+    int r;
+    bundle *b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_get_byte(b, NULL, NULL, NULL);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    bundle_free(b);
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_get_byte_n3(void)
+{
+    int r;
+    unsigned char* output = NULL;
+    size_t size = 0;
+    bundle *b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_get_byte(b, "somekey", (void*)&output, &size);
+    assert_eq(r, BUNDLE_ERROR_KEY_NOT_AVAILABLE);
+
+    bundle_free(b);
+    return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-get-count-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-get-count-func.c
new file mode 100755 (executable)
index 0000000..76dbc81
--- /dev/null
@@ -0,0 +1,56 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+
+//& set: BundleGetCountFunc
+
+int utc_ApplicationFW_bundle_get_count_p(void)
+{
+    int r;
+    bundle *b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_add_str(b, "a", "123");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_get_count(b);
+    assert_eq(r, 1);
+
+    r = bundle_add_str(b, "b", "456");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_get_count(b);
+    assert_eq(r, 2);
+
+    r = bundle_del(b, "b");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_get_count(b);
+    assert_eq(r, 1);
+
+    bundle_free(b);
+    return 0;
+}
+
+
+int utc_ApplicationFW_bundle_get_count_n(void)
+{
+    int r;
+    r = bundle_get_count(NULL);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+    return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-get-str-array-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-get-str-array-func.c
new file mode 100755 (executable)
index 0000000..8888d22
--- /dev/null
@@ -0,0 +1,86 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+#include <string.h>
+
+//& set: BundleGetStrArrayFunc
+
+static bundle *b = NULL;
+
+void utc_ApplicationFW_bundle_get_str_array_startup(void)
+{
+    b = bundle_create();
+}
+
+void utc_ApplicationFW_bundle_get_str_array_cleanup(void)
+{
+    bundle_free(b);
+    b = NULL;
+}
+
+int utc_ApplicationFW_bundle_get_str_array_p(void)
+{
+    int r = 0;
+
+    int array_len = 0;
+    const char *str_array[] = { "aaa", "bbb", "ccc" };
+    const char **out_str_array = NULL;
+
+    assert_neq(b, NULL);
+
+    r = bundle_add_str_array(b, "key", str_array, 3);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    out_str_array = bundle_get_str_array(b, "key", &array_len);
+    assert(out_str_array);
+    assert_eq(array_len, 3);
+
+    free(out_str_array);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_get_str_array_n(void)
+{
+    const char **str_array = bundle_get_str_array(NULL,NULL, 0);
+    assert_eq(str_array, NULL);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_get_str_array_n2(void)
+{
+    assert_neq(b, NULL);
+
+    const char **str_array = bundle_get_str_array(b, NULL, 0);
+    assert_eq(str_array, NULL);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_get_str_array_n3(void)
+{
+    int len = 0;
+
+    assert_neq(b, NULL);
+
+    const char **str_array = bundle_get_str_array(b, "somekey", &len);
+    assert_eq(str_array, NULL);
+    assert_eq(len, 0);
+
+    return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-get-str-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-get-str-func.c
new file mode 100755 (executable)
index 0000000..7a8f631
--- /dev/null
@@ -0,0 +1,75 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+#include <string.h>
+
+//& set: BundleGetStrFunc
+
+int utc_ApplicationFW_bundle_get_str_p(void)
+{
+    int r;
+    char* output = NULL;
+    bundle *b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_add_str(b, "key", "123");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_get_str(b, "key", &output);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+    assert_neq(output, NULL);
+    assert(!strcmp(output, "123"));
+
+    bundle_free(b);
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_get_str_n(void)
+{
+    int r;
+    r = bundle_get_str(NULL, NULL, NULL);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_get_str_n2(void)
+{
+    int r;
+    bundle *b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_get_str(b, NULL, NULL);
+    assert_eq(r, BUNDLE_ERROR_INVALID_PARAMETER);
+
+    bundle_free(b);
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_get_str_n3(void)
+{
+    int r;
+    char* output = NULL;
+    bundle *b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_get_str(b, "somekey", &output);
+    assert_eq(r, BUNDLE_ERROR_KEY_NOT_AVAILABLE);
+
+    bundle_free(b);
+    return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-get-type-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-get-type-func.c
new file mode 100755 (executable)
index 0000000..46ca363
--- /dev/null
@@ -0,0 +1,52 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+
+//& set: BundleGetTypeFunc
+
+int utc_ApplicationFW_bundle_get_type_p(void)
+{
+    int r;
+    unsigned char data[4] = {0, 1, 2, 3};
+    bundle *b = bundle_create();
+    assert_neq(b, NULL);
+
+    r = bundle_add_str(b, "a", "123");
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_get_type(b, "a");
+    assert_eq(r, BUNDLE_TYPE_STR);
+
+    r = bundle_add_byte(b, "b", (void *)data, 4);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    r = bundle_get_type(b, "b");
+    assert_eq(r, BUNDLE_TYPE_BYTE);
+
+    bundle_free(b);
+    return 0;
+}
+
+
+int utc_ApplicationFW_bundle_get_type_n(void)
+{
+    int r;
+    r = bundle_get_type(NULL, NULL);
+    assert_lt(r, 0);
+
+    return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-keyval-get-array-val-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-keyval-get-array-val-func.c
new file mode 100755 (executable)
index 0000000..e575d40
--- /dev/null
@@ -0,0 +1,85 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+#include <string.h>
+#include <stdbool.h>
+
+//& set: BundleKeyvalGetArrayVal
+
+static int type_is_array_ret;
+static int get_array_val_err;
+static bool val_not_empty;
+static bool len_not_empty;
+static bool size_not_empty;
+static bool kv_not_empty;
+
+static void sample_cb(const char *key, const int type, const bundle_keyval_t *kv, void *user_data) {
+
+       void **array_val = NULL;
+       unsigned int array_len = 0;
+       size_t *array_elem_size = NULL;
+
+       if(kv != NULL) kv_not_empty = true;
+
+       type_is_array_ret = bundle_keyval_type_is_array((bundle_keyval_t *)kv);
+       get_array_val_err = bundle_keyval_get_array_val((bundle_keyval_t *)kv, &array_val, &array_len, &array_elem_size);
+
+       if(array_val != NULL) val_not_empty = true;
+       if(array_len > 0) len_not_empty = true;
+       if(array_elem_size != NULL) size_not_empty = true;
+
+       return;
+ }
+
+int utc_bundle_keyval_get_array_val_p(void)
+{
+       int ret;
+       bundle *b = bundle_create(); // Create new bundle object
+       const char *s_arr[] = {"abc", "bcd", "cde"};
+
+       ret = bundle_add_str_array(b, "k3", s_arr, 3); // add a key-val pair
+       assert_eq(ret, BUNDLE_ERROR_NONE);
+
+       type_is_array_ret = 0;
+       get_array_val_err = 0;
+       val_not_empty = false;
+       len_not_empty = false;
+       size_not_empty = false;
+       kv_not_empty = false;
+
+       bundle_foreach(b, sample_cb, NULL);    // iterate sample_cb for each key/val
+
+       assert_eq(type_is_array_ret, 1);
+       assert_eq(get_array_val_err, BUNDLE_ERROR_NONE);
+       assert(kv_not_empty);
+       assert(val_not_empty);
+       assert(len_not_empty);
+       assert(size_not_empty);
+
+       return 0;
+ }
+
+
+int utc_bundle_keyval_get_array_val_n(void)
+{
+       int ret = 0;
+
+       ret = bundle_keyval_get_array_val(NULL, NULL, NULL, NULL);
+       assert_eq(ret, BUNDLE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-keyval-get-basic-val-func.c b/src/utc/bundle/utc-ApplicationFW-bundle-keyval-get-basic-val-func.c
new file mode 100755 (executable)
index 0000000..2b3b016
--- /dev/null
@@ -0,0 +1,71 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+#include <string.h>
+#include <stdbool.h>
+
+//& set: BundleKeyvalGetBasicVal
+static int ret_error;
+static bool basic_val_notempty;
+static bool basic_size_notempty;
+
+static void sample_cb(const char *key, const int type, const bundle_keyval_t *kv, void *user_data)
+{
+
+       void *basic_val = NULL;
+       size_t basic_size = 0;
+
+       ret_error = bundle_keyval_get_basic_val( (bundle_keyval_t *) kv, &basic_val, &basic_size);
+
+       if(basic_val!=NULL)basic_val_notempty=true;
+       if(basic_size>0)basic_size_notempty=true;
+
+       return;
+ }
+
+int utc_bundle_keyval_get_basic_val_p(void)
+{
+       int ret;
+       bundle *b = bundle_create(); // Create new bundle object
+
+       ret = bundle_add_str(b, "k1", "v1");
+       assert_eq(ret, BUNDLE_ERROR_NONE);
+
+       ret_error=0;
+       basic_val_notempty=false;
+       basic_size_notempty=false;
+       bundle_foreach(b, sample_cb, NULL);    // iterate sample_cb for each key/val
+
+       assert_eq(ret_error, BUNDLE_ERROR_NONE);
+       assert_eq(basic_val_notempty,true);
+       assert_eq(basic_size_notempty,true);
+       return 0;
+}
+
+
+int utc_bundle_keyval_get_basic_val_n(void)
+{
+       int ret = 0;
+
+       ret = bundle_keyval_get_basic_val(NULL, NULL, NULL);
+       assert_eq(ret, BUNDLE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+
diff --git a/src/utc/bundle/utc-ApplicationFW-bundle-keyval.c b/src/utc/bundle/utc-ApplicationFW-bundle-keyval.c
new file mode 100755 (executable)
index 0000000..3cb9419
--- /dev/null
@@ -0,0 +1,97 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <bundle.h>
+#include <string.h>
+
+//& set: BundleKeyval
+
+static int _correct_array_type = 0;
+static int _keyval_type_array = 0;
+static int _keyval_type_measurable = 0;
+
+static void _foreach_cb_1(const char *key, const int type, const bundle_keyval_t *kv, void *data)
+{
+    int r = 0;
+
+    r = bundle_keyval_get_type( (bundle_keyval_t *) kv);
+    if(r == BUNDLE_TYPE_STR_ARRAY) {
+        _correct_array_type = 1;
+    }
+}
+
+static void _foreach_cb_2(const char *key, const int type, const bundle_keyval_t *kv, void *data)
+{
+    _keyval_type_array = bundle_keyval_type_is_array((bundle_keyval_t *)kv);
+}
+
+int utc_ApplicationFW_bundle_keyval_get_type_p(void)
+{
+    int r = 0;
+    const char *str_array[] = { "aaa", "bbb", "ccc" };
+
+    bundle *b = bundle_create();
+    assert(b);
+
+    r = bundle_add_str_array(b, "key", str_array, 3);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    bundle_foreach(b, _foreach_cb_1, NULL);
+    assert(_correct_array_type);
+
+    bundle_free(b);
+    return 0;
+}
+
+
+int utc_ApplicationFW_bundle_keyval_get_type_n(void)
+{
+    int r = 0;
+
+    r = bundle_keyval_get_type(NULL);
+    assert_eq(r, -1);
+
+    return 0;
+}
+
+int utc_ApplicationFW_bundle_keyval_type_is_array_p(void)
+{
+    int r = 0;
+    const char *str_array[] = { "aaa", "bbb", "ccc" };
+
+    bundle *b = bundle_create();
+    assert(b);
+
+    r = bundle_add_str_array(b, "key", str_array, 3);
+    assert_eq(r, BUNDLE_ERROR_NONE);
+
+    bundle_foreach(b, _foreach_cb_2, NULL);
+    assert(_keyval_type_array);
+
+    bundle_free(b);
+    return 0;
+}
+
+
+int utc_ApplicationFW_bundle_keyval_type_is_array_n(void)
+{
+    int r = 0;
+
+    r = bundle_keyval_type_is_array(NULL);
+    assert_neq(r, 0);
+
+    return 0;
+}
diff --git a/src/utc/cairo/CMakeLists.txt b/src/utc/cairo/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..53340b0
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "cairo")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "cairo")
+SET(TC_SOURCES
+       utc-cairo.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       cairo
+       evas
+       elementary
+       bundle
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/cairo/public.list b/src/utc/cairo/public.list
new file mode 100755 (executable)
index 0000000..ac3a5b1
--- /dev/null
@@ -0,0 +1,9 @@
+cairo_evas_gl_device_create
+cairo_gl_surface_create_for_evas_gl
+cairo_gl_surface_create
+cairo_gl_surface_create_for_texture
+cairo_gl_surface_get_width
+cairo_gl_surface_get_height
+cairo_gl_device_set_thread_aware
+cairo_evas_gl_device_get_gl
+cairo_evas_gl_device_get_context
diff --git a/src/utc/cairo/tct-cairo-core.c b/src/utc/cairo/tct-cairo-core.c
new file mode 100755 (executable)
index 0000000..6132dfb
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-cairo-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/cairo/tct-cairo-core.h b/src/utc/cairo/tct-cairo-core.h
new file mode 100755 (executable)
index 0000000..fe2ef3c
--- /dev/null
@@ -0,0 +1,65 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CAIRO_CORE_H__
+#define __TCT_CAIRO_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_cairo_startup(void);
+extern void utc_cairo_cleanup(void);
+
+extern int utc_cairo_evas_gl_device_create_n(void);
+extern int utc_cairo_evas_gl_device_create_p(void);
+extern int utc_cairo_gl_surface_create_for_evas_gl_n(void);
+extern int utc_cairo_gl_surface_create_for_evas_gl_p(void);
+extern int utc_cairo_gl_surface_create_n(void);
+extern int utc_cairo_gl_surface_create_p(void);
+extern int utc_cairo_gl_surface_create_for_texture_n(void);
+extern int utc_cairo_gl_surface_create_for_texture_p(void);
+extern int utc_cairo_gl_surface_get_width_n(void);
+extern int utc_cairo_gl_surface_get_width_p(void);
+extern int utc_cairo_gl_surface_get_height_n(void);
+extern int utc_cairo_gl_surface_get_height_p(void);
+extern int utc_cairo_gl_device_set_thread_aware_n(void);
+extern int utc_cairo_gl_device_set_thread_aware_p(void);
+extern int utc_cairo_evas_gl_device_get_gl_n(void);
+extern int utc_cairo_evas_gl_device_get_gl_p(void);
+extern int utc_cairo_evas_gl_device_get_context_n(void);
+extern int utc_cairo_evas_gl_device_get_context_p(void);
+
+testcase tc_array[] = {
+    {"utc_cairo_evas_gl_device_create_n", utc_cairo_evas_gl_device_create_n, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_evas_gl_device_create_p", utc_cairo_evas_gl_device_create_p, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_surface_create_for_evas_gl_n", utc_cairo_gl_surface_create_for_evas_gl_n, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_surface_create_for_evas_gl_p", utc_cairo_gl_surface_create_for_evas_gl_p, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_surface_create_n", utc_cairo_gl_surface_create_n, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_surface_create_p", utc_cairo_gl_surface_create_p, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_surface_create_for_texture_n", utc_cairo_gl_surface_create_for_texture_n, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_surface_create_for_texture_p", utc_cairo_gl_surface_create_for_texture_p, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_surface_get_width_n", utc_cairo_gl_surface_get_width_n, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_surface_get_width_p", utc_cairo_gl_surface_get_width_p, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_surface_get_height_n", utc_cairo_gl_surface_get_height_n, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_surface_get_height_p", utc_cairo_gl_surface_get_height_p, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_device_set_thread_aware_n", utc_cairo_gl_device_set_thread_aware_n, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_gl_device_set_thread_aware_p", utc_cairo_gl_device_set_thread_aware_p, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_evas_gl_device_get_gl_n", utc_cairo_evas_gl_device_get_gl_n, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_evas_gl_device_get_gl_p", utc_cairo_evas_gl_device_get_gl_p, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_evas_gl_device_get_context_n", utc_cairo_evas_gl_device_get_context_n, utc_cairo_startup, utc_cairo_cleanup},
+    {"utc_cairo_evas_gl_device_get_context_p", utc_cairo_evas_gl_device_get_context_p, utc_cairo_startup, utc_cairo_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CAIRO_CORE_H__
diff --git a/src/utc/cairo/utc-cairo.c b/src/utc/cairo/utc-cairo.c
new file mode 100755 (executable)
index 0000000..44e5ab1
--- /dev/null
@@ -0,0 +1,583 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <stdio.h>
+#include "assert.h"
+#include <cairo.h>
+#include <cairo-evas-gl.h>
+#include <Evas_GL.h>
+#include <Elementary.h>
+
+#include <system_info.h>
+
+#define FEATURE_KEY_VERSION_1_1 "http://tizen.org/feature/opengles.version.1_1"
+#define FEATURE_KEY_VERSION_2_0 "http://tizen.org/feature/opengles.version.2_0"
+
+Evas_Object *win;
+Evas_GL *evas_gl;
+Evas_GL_Config *evas_gl_config;
+Evas_GL_Surface *evas_gl_surface;
+Evas_GL_Context *evas_gl_context;
+cairo_device_t *cairo_device = NULL;
+cairo_surface_t *surface = NULL;
+
+int is_supported = 1;
+int evas_state = 1;
+
+
+void utc_cairo_startup(void)
+{
+       int bValue = 0;
+       system_info_get_platform_bool(FEATURE_KEY_VERSION_1_1, &bValue);
+       if(!bValue)
+       {
+               is_supported = 0;
+       }
+
+       system_info_get_platform_bool(FEATURE_KEY_VERSION_2_0, &bValue);
+       if(!bValue)
+       {
+               is_supported = 0;
+       }
+
+       if(is_supported)
+       {
+               elm_init(0,NULL);
+               elm_config_accel_preference_set("opengl");      
+               win = elm_win_add(NULL, "utc cairo", ELM_WIN_BASIC);
+               if(win == NULL) 
+               {
+                       evas_state = 0;
+               }
+               else
+               {
+                       elm_win_title_set(win, "utc cairo");
+                       evas_object_show(win);
+
+                       evas_gl = evas_gl_new(evas_object_evas_get(win));
+                       if(evas_gl == NULL)
+                               evas_state = 0;
+
+                       evas_gl_config = evas_gl_config_new();
+                       if(evas_gl_config == NULL)
+                               evas_state = 0;
+                       else 
+                               evas_gl_config->color_format = EVAS_GL_RGBA_8888;
+
+                       if(evas_state)
+                       {
+                               int width = 300;
+                               int height = 300;
+                               evas_gl_surface = evas_gl_surface_create(evas_gl, evas_gl_config, width, height);
+                               if(evas_gl_surface == NULL)
+                                       evas_state = 0;
+
+                               evas_gl_context = evas_gl_context_create(evas_gl, NULL);
+                               if(evas_gl_context == NULL)
+                                       evas_state = 0;
+
+                               setenv("CAIRO_GL_COMPOSITOR", "msaa", 1);
+                       }
+               }
+       }
+}
+
+void utc_cairo_cleanup(void)
+{
+       if(surface)             cairo_surface_destroy (surface);
+       if(cairo_device)        cairo_device_destroy(cairo_device);
+
+       if(evas_gl_surface)     evas_gl_surface_destroy(evas_gl, evas_gl_surface);
+       if(evas_gl_context)     evas_gl_context_destroy(evas_gl, evas_gl_context);
+       if(evas_gl_config)      evas_gl_config_free(evas_gl_config);
+       if(evas_gl)             evas_gl_free(evas_gl);
+
+       if(win)                 evas_object_del(win);
+       elm_shutdown();
+}
+
+int utc_cairo_evas_gl_device_create_n(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       cairo_status_t ret = CAIRO_STATUS_SUCCESS;
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (NULL, NULL);
+                       ret = cairo_device_status(cairo_device);        
+                       assert_neq(ret, CAIRO_STATUS_SUCCESS);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+       
+    return 0;
+}
+
+int utc_cairo_evas_gl_device_create_p(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       cairo_status_t ret = CAIRO_STATUS_SUCCESS;
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
+                       ret = cairo_device_status(cairo_device);
+                       assert_eq(ret, CAIRO_STATUS_SUCCESS);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_gl_surface_create_for_evas_gl_n(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       cairo_status_t ret = CAIRO_STATUS_SUCCESS;
+                       int width = 300;
+                       int height = 300;
+
+                       surface = (cairo_surface_t *)cairo_gl_surface_create_for_evas_gl(NULL, NULL, NULL, width, height);
+                       ret = cairo_surface_status(surface);
+                       assert_neq(ret, CAIRO_STATUS_SUCCESS);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_gl_surface_create_for_evas_gl_p(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       cairo_status_t ret = CAIRO_STATUS_SUCCESS;
+                       int width = 300;
+                       int height = 300;
+
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
+                       surface = (cairo_surface_t *)cairo_gl_surface_create_for_evas_gl(cairo_device, evas_gl_surface, evas_gl_config, width, height);
+                       ret = cairo_surface_status(surface);
+                       assert_eq(ret, CAIRO_STATUS_SUCCESS);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_gl_surface_create_n(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       cairo_status_t ret = CAIRO_STATUS_SUCCESS;
+                       int width = 300;
+                       int height = 300;
+
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (NULL, NULL);
+                       surface = (cairo_surface_t *)cairo_gl_surface_create(cairo_device, CAIRO_CONTENT_COLOR_ALPHA, width, height);
+                       ret = cairo_surface_status(surface);
+                       assert_neq(ret, CAIRO_STATUS_SUCCESS);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_gl_surface_create_p(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       cairo_status_t ret = CAIRO_STATUS_SUCCESS;
+                       int width = 300;
+                       int height = 300;
+
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
+                       surface = (cairo_surface_t *)cairo_gl_surface_create(cairo_device, CAIRO_CONTENT_COLOR_ALPHA, width, height);
+                       ret = cairo_surface_status(surface);
+                       assert_eq(ret, CAIRO_STATUS_SUCCESS);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_gl_surface_create_for_texture_n(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       cairo_status_t ret = CAIRO_STATUS_SUCCESS;
+                       int width = 300;
+                       int height = 300;
+
+                       surface = (cairo_surface_t *)cairo_gl_surface_create_for_texture(NULL, CAIRO_CONTENT_COLOR_ALPHA, 0, width, height);
+                       ret = cairo_surface_status(surface);
+                       assert_neq(ret, CAIRO_STATUS_SUCCESS);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_gl_surface_create_for_texture_p(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       cairo_status_t ret = CAIRO_STATUS_SUCCESS;
+                       int width = 300;
+                       int height = 300;
+
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
+                       surface = (cairo_surface_t *)cairo_gl_surface_create_for_texture(cairo_device, CAIRO_CONTENT_COLOR_ALPHA, 0, width, height);
+                       ret = cairo_surface_status(surface);
+                       assert_eq(ret, CAIRO_STATUS_SUCCESS);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_gl_surface_get_width_n(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       int width = 300;
+                       int height = 300;
+                       int ret = 0;
+
+                       surface = (cairo_surface_t *)cairo_gl_surface_create(NULL, CAIRO_CONTENT_COLOR_ALPHA, width, height);
+                       ret = cairo_gl_surface_get_width(surface);
+                       assert_neq(ret, width);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_gl_surface_get_width_p(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       int width = 300;
+                       int height = 300;
+                       int ret = 0;
+
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
+                       surface = (cairo_surface_t *)cairo_gl_surface_create(cairo_device, CAIRO_CONTENT_COLOR_ALPHA, width, height);
+                       ret = cairo_gl_surface_get_width(surface);
+                       assert_eq(ret, width);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_gl_surface_get_height_n(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       int width = 300;
+                       int height = 300;
+                       int ret = 0;
+
+                       surface = (cairo_surface_t *)cairo_gl_surface_create(NULL, CAIRO_CONTENT_COLOR_ALPHA, width, height);
+                       ret = cairo_gl_surface_get_height(surface);
+                       assert_neq(ret, height);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_gl_surface_get_height_p(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       int width = 300;
+                       int height = 300;
+                       int ret = 0;
+
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
+                       surface = (cairo_surface_t *)cairo_gl_surface_create(cairo_device, CAIRO_CONTENT_COLOR_ALPHA, width, height);
+                       ret = cairo_gl_surface_get_height(surface);
+                       assert_eq(ret, height);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_gl_device_set_thread_aware_n(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       cairo_status_t ret = CAIRO_STATUS_SUCCESS;
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
+                       cairo_gl_device_set_thread_aware(cairo_device, -1);
+                       ret = cairo_device_status(cairo_device);
+                       assert_eq(ret, CAIRO_STATUS_INVALID_STATUS);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+
+}
+
+int utc_cairo_gl_device_set_thread_aware_p(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       cairo_status_t ret = CAIRO_STATUS_SUCCESS;
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
+                       cairo_gl_device_set_thread_aware(cairo_device, 0);
+                       ret = cairo_device_status(cairo_device);
+                       assert_eq(ret, CAIRO_STATUS_SUCCESS);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+
+}
+
+int utc_cairo_evas_gl_device_get_gl_n(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       Evas_GL *ret_evas_gl = NULL;
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (NULL, evas_gl_context);
+                       ret_evas_gl = cairo_evas_gl_device_get_gl(cairo_device);
+                       assert_eq(ret_evas_gl, NULL);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+       
+    return 0;
+}
+
+int utc_cairo_evas_gl_device_get_gl_p(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       Evas_GL *ret_evas_gl = NULL;
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
+                       ret_evas_gl = cairo_evas_gl_device_get_gl(cairo_device);
+                       assert_neq(ret_evas_gl, NULL);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_evas_gl_device_get_context_n(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       Evas_GL_Context *ret_evas_gl_context;
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, NULL);
+                       ret_evas_gl_context = cairo_evas_gl_device_get_context(cairo_device);
+                       assert_eq(ret_evas_gl_context, NULL);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
+int utc_cairo_evas_gl_device_get_context_p(void)
+{
+       if(is_supported)
+       {
+               if(evas_state)
+               {
+                       Evas_GL_Context *ret_evas_gl_context;
+                       cairo_device = (cairo_device_t *)cairo_evas_gl_device_create (evas_gl, evas_gl_context);
+                       ret_evas_gl_context = cairo_evas_gl_device_get_context(cairo_device);
+                       assert_neq(ret_evas_gl_context, NULL);
+               }
+               else
+               {
+                       assert_eq(evas_state, 1);
+               }
+       }
+       else
+       {
+               assert_eq(is_supported, 1);
+       }
+
+    return 0;
+}
+
diff --git a/src/utc/camera/CMakeLists.txt b/src/utc/camera/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..e4afb1f
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "camera")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-media-camera")
+SET(TC_SOURCES
+       utc_media_camera_attr.c
+       utc_media_camera_lifecycle.c
+       utc_media_camera_setting.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       gthread-2.0
+       gobject-2.0
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/camera/public.list b/src/utc/camera/public.list
new file mode 100755 (executable)
index 0000000..92daeac
--- /dev/null
@@ -0,0 +1,128 @@
+camera_attr_clear_af_area
+camera_attr_disable_shutter_sound
+camera_attr_enable_anti_shake
+camera_attr_enable_auto_contrast
+camera_attr_enable_tag
+camera_attr_enable_video_stabilization
+camera_attr_foreach_supported_af_mode
+camera_attr_foreach_supported_effect
+camera_attr_foreach_supported_exposure_mode
+camera_attr_foreach_supported_flash_mode
+camera_attr_foreach_supported_fps
+camera_attr_foreach_supported_iso
+camera_attr_foreach_supported_scene_mode
+camera_attr_foreach_supported_stream_flip
+camera_attr_foreach_supported_stream_rotation
+camera_attr_foreach_supported_theater_mode
+camera_attr_foreach_supported_whitebalance
+camera_attr_get_af_mode
+camera_attr_get_brightness
+camera_attr_get_brightness_range
+camera_attr_get_contrast
+camera_attr_get_contrast_range
+camera_attr_get_effect
+camera_attr_get_exposure
+camera_attr_get_exposure_mode
+camera_attr_get_exposure_range
+camera_attr_get_flash_mode
+camera_attr_get_geotag
+camera_attr_get_hdr_mode
+camera_attr_get_image_quality
+camera_attr_get_iso
+camera_attr_get_lens_orientation
+camera_attr_get_preview_fps
+camera_attr_get_scene_mode
+camera_attr_get_stream_flip
+camera_attr_get_stream_rotation
+camera_attr_get_tag_image_description
+camera_attr_get_tag_orientation
+camera_attr_get_tag_software
+camera_attr_get_theater_mode
+camera_attr_get_whitebalance
+camera_attr_get_zoom
+camera_attr_get_zoom_range
+camera_attr_is_enabled_anti_shake
+camera_attr_is_enabled_auto_contrast
+camera_attr_is_enabled_tag
+camera_attr_is_enabled_video_stabilization
+camera_attr_is_supported_anti_shake
+camera_attr_is_supported_auto_contrast
+camera_attr_is_supported_hdr_capture
+camera_attr_is_supported_video_stabilization
+camera_attr_remove_geotag
+camera_attr_set_af_area
+camera_attr_set_af_mode
+camera_attr_set_brightness
+camera_attr_set_contrast
+camera_attr_set_effect
+camera_attr_set_exposure
+camera_attr_set_exposure_mode
+camera_attr_set_flash_mode
+camera_attr_set_geotag
+camera_attr_set_hdr_capture_progress_cb
+camera_attr_set_hdr_mode
+camera_attr_set_image_quality
+camera_attr_set_iso
+camera_attr_set_preview_fps
+camera_attr_set_scene_mode
+camera_attr_set_stream_flip
+camera_attr_set_stream_rotation
+camera_attr_set_tag_image_description
+camera_attr_set_tag_orientation
+camera_attr_set_tag_software
+camera_attr_set_theater_mode
+camera_attr_set_whitebalance
+camera_attr_set_zoom
+camera_attr_unset_hdr_capture_progress_cb
+camera_cancel_focusing
+camera_create
+camera_destroy
+camera_foreach_supported_capture_format
+camera_foreach_supported_capture_resolution
+camera_foreach_supported_preview_format
+camera_foreach_supported_preview_resolution
+camera_get_capture_format
+camera_get_capture_resolution
+camera_get_device_count
+camera_get_display_flip
+camera_get_display_mode
+camera_get_display_rotation
+camera_get_preview_format
+camera_get_preview_resolution
+camera_get_recommended_preview_resolution
+camera_get_state
+camera_is_display_visible
+camera_is_supported_continuous_capture
+camera_is_supported_face_detection
+camera_is_supported_media_packet_preview_cb
+camera_is_supported_zero_shutter_lag
+camera_set_capture_format
+camera_set_capture_resolution
+camera_set_display
+camera_set_display_flip
+camera_set_display_mode
+camera_set_display_rotation
+camera_set_display_visible
+camera_set_error_cb
+camera_set_focus_changed_cb
+camera_set_interrupted_cb
+camera_set_media_packet_preview_cb
+camera_set_preview_cb
+camera_set_preview_format
+camera_set_preview_resolution
+camera_set_state_changed_cb
+camera_start_capture
+camera_start_continuous_capture
+camera_start_face_detection
+camera_start_focusing
+camera_start_preview
+camera_stop_continuous_capture
+camera_stop_face_detection
+camera_stop_preview
+camera_unset_error_cb
+camera_unset_focus_changed_cb
+camera_unset_interrupted_cb
+camera_unset_media_packet_preview_cb
+camera_unset_preview_cb
+camera_unset_state_changed_cb
+
diff --git a/src/utc/camera/tct-camera-core.c b/src/utc/camera/tct-camera-core.c
new file mode 100755 (executable)
index 0000000..c57dc9a
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-camera-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/camera/tct-camera-core.h b/src/utc/camera/tct-camera-core.h
new file mode 100755 (executable)
index 0000000..0c66759
--- /dev/null
@@ -0,0 +1,673 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CAMERA_CORE_H__
+#define __TCT_CAMERA_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_media_camera_attr_startup(void);
+extern void utc_media_camera_attr_cleanup(void);
+extern void utc_media_camera_lifecycle_startup(void);
+extern void utc_media_camera_lifecycle_cleanup(void);
+extern void utc_media_camera_setting_startup(void);
+extern void utc_media_camera_setting_cleanup(void);
+
+extern int utc_media_camera_attr_set_preview_fps_n1(void);
+extern int utc_media_camera_attr_set_preview_fps_n2(void);
+extern int utc_media_camera_attr_set_preview_fps_p(void);
+extern int utc_media_camera_attr_set_image_quality_n1(void);
+extern int utc_media_camera_attr_set_image_quality_n2(void);
+extern int utc_media_camera_attr_set_image_quality_p(void);
+extern int utc_media_camera_attr_get_preview_fps_n1(void);
+extern int utc_media_camera_attr_get_preview_fps_n2(void);
+extern int utc_media_camera_attr_get_preview_fps_p(void);
+extern int utc_media_camera_attr_get_image_quality_n1(void);
+extern int utc_media_camera_attr_get_image_quality_n2(void);
+extern int utc_media_camera_attr_get_image_quality_p(void);
+extern int utc_media_camera_attr_set_zoom_n1(void);
+extern int utc_media_camera_attr_set_zoom_p(void);
+extern int utc_media_camera_attr_set_af_mode_n1(void);
+extern int utc_media_camera_attr_set_af_mode_n2(void);
+extern int utc_media_camera_attr_set_af_mode_p(void);
+extern int utc_media_camera_attr_set_exposure_mode_n1(void);
+extern int utc_media_camera_attr_set_exposure_mode_p(void);
+extern int utc_media_camera_attr_set_exposure_n1(void);
+extern int utc_media_camera_attr_set_exposure_n2(void);
+extern int utc_media_camera_attr_set_exposure_p(void);
+extern int utc_media_camera_attr_set_iso_n1(void);
+extern int utc_media_camera_attr_set_iso_n2(void);
+extern int utc_media_camera_attr_set_iso_p(void);
+extern int utc_media_camera_attr_set_brightness_n1(void);
+extern int utc_media_camera_attr_set_brightness_n2(void);
+extern int utc_media_camera_attr_set_brightness_p(void);
+extern int utc_media_camera_attr_set_contrast_n1(void);
+extern int utc_media_camera_attr_set_contrast_n2(void);
+extern int utc_media_camera_attr_set_contrast_p(void);
+extern int utc_media_camera_attr_set_whitebalance_n1(void);
+extern int utc_media_camera_attr_set_whitebalance_n2(void);
+extern int utc_media_camera_attr_set_whitebalance_p(void);
+extern int utc_media_camera_attr_get_effect_n1(void);
+extern int utc_media_camera_attr_get_effect_n2(void);
+extern int utc_media_camera_attr_get_effect_p(void);
+extern int utc_media_camera_attr_get_scene_mode_n1(void);
+extern int utc_media_camera_attr_get_scene_mode_n2(void);
+extern int utc_media_camera_attr_get_scene_mode_p(void);
+extern int utc_media_camera_attr_is_enabled_tag_n1(void);
+extern int utc_media_camera_attr_is_enabled_tag_n2(void);
+extern int utc_media_camera_attr_is_enabled_tag_p(void);
+extern int utc_media_camera_attr_get_tag_image_description_n1(void);
+extern int utc_media_camera_attr_get_tag_image_description_n2(void);
+extern int utc_media_camera_attr_get_tag_image_description_p(void);
+extern int utc_media_camera_attr_get_tag_orientation_n1(void);
+extern int utc_media_camera_attr_get_tag_orientation_n2(void);
+extern int utc_media_camera_attr_get_tag_orientation_p(void);
+extern int utc_media_camera_attr_get_tag_software_n1(void);
+extern int utc_media_camera_attr_get_tag_software_n2(void);
+extern int utc_media_camera_attr_get_tag_software_p(void);
+extern int utc_media_camera_attr_get_geotag_n1(void);
+extern int utc_media_camera_attr_get_geotag_n2(void);
+extern int utc_media_camera_attr_get_geotag_n3(void);
+extern int utc_media_camera_attr_get_geotag_n4(void);
+extern int utc_media_camera_attr_get_geotag_p(void);
+extern int utc_media_camera_attr_remove_geotag_n(void);
+extern int utc_media_camera_attr_remove_geotag_p(void);
+extern int utc_media_camera_attr_get_flash_mode_n1(void);
+extern int utc_media_camera_attr_get_flash_mode_n2(void);
+extern int utc_media_camera_attr_get_flash_mode_p(void);
+extern int utc_media_camera_attr_foreach_supported_af_mode_n1(void);
+extern int utc_media_camera_attr_foreach_supported_af_mode_n2(void);
+extern int utc_media_camera_attr_foreach_supported_af_mode_p(void);
+extern int utc_media_camera_attr_foreach_supported_exposure_mode_n1(void);
+extern int utc_media_camera_attr_foreach_supported_exposure_mode_n2(void);
+extern int utc_media_camera_attr_foreach_supported_exposure_mode_p(void);
+extern int utc_media_camera_attr_foreach_supported_iso_n1(void);
+extern int utc_media_camera_attr_foreach_supported_iso_n2(void);
+extern int utc_media_camera_attr_foreach_supported_iso_p(void);
+extern int utc_media_camera_attr_foreach_supported_whitebalance_n1(void);
+extern int utc_media_camera_attr_foreach_supported_whitebalance_n2(void);
+extern int utc_media_camera_attr_foreach_supported_whitebalance_p(void);
+extern int utc_media_camera_attr_foreach_supported_effect_n1(void);
+extern int utc_media_camera_attr_foreach_supported_effect_n2(void);
+extern int utc_media_camera_attr_foreach_supported_effect_p(void);
+extern int utc_media_camera_attr_foreach_supported_scene_mode_n1(void);
+extern int utc_media_camera_attr_foreach_supported_scene_mode_n2(void);
+extern int utc_media_camera_attr_foreach_supported_scene_mode_p(void);
+extern int utc_media_camera_attr_foreach_supported_flash_mode_n1(void);
+extern int utc_media_camera_attr_foreach_supported_flash_mode_n2(void);
+extern int utc_media_camera_attr_foreach_supported_flash_mode_p(void);
+extern int utc_media_camera_attr_foreach_supported_fps_n1(void);
+extern int utc_media_camera_attr_foreach_supported_fps_n2(void);
+extern int utc_media_camera_attr_foreach_supported_fps_p(void);
+extern int utc_media_camera_attr_get_lens_orientation_n1(void);
+extern int utc_media_camera_attr_get_lens_orientation_n2(void);
+extern int utc_media_camera_attr_get_lens_orientation_p(void);
+extern int utc_media_camera_attr_set_af_area_n1(void);
+extern int utc_media_camera_attr_set_af_area_n2(void);
+extern int utc_media_camera_attr_set_af_area_p(void);
+extern int utc_media_camera_attr_clear_af_area_n(void);
+extern int utc_media_camera_attr_clear_af_area_p(void);
+extern int utc_media_camera_attr_disable_shutter_sound_n(void);
+extern int utc_media_camera_attr_disable_shutter_sound_p(void);
+extern int utc_media_camera_attr_is_supported_anti_shake_n(void);
+extern int utc_media_camera_attr_is_supported_anti_shake_p(void);
+extern int utc_media_camera_attr_enable_anti_shake_n(void);
+extern int utc_media_camera_attr_enable_anti_shake_p(void);
+extern int utc_media_camera_attr_is_enabled_anti_shake_n1(void);
+extern int utc_media_camera_attr_is_enabled_anti_shake_n2(void);
+extern int utc_media_camera_attr_is_enabled_anti_shake_p(void);
+extern int utc_media_camera_attr_is_supported_auto_contrast_n(void);
+extern int utc_media_camera_attr_is_supported_auto_contrast_p(void);
+extern int utc_media_camera_attr_enable_auto_contrast_n(void);
+extern int utc_media_camera_attr_enable_auto_contrast_p(void);
+extern int utc_media_camera_attr_is_enabled_auto_contrast_n1(void);
+extern int utc_media_camera_attr_is_enabled_auto_contrast_n2(void);
+extern int utc_media_camera_attr_is_enabled_auto_contrast_p(void);
+extern int utc_media_camera_attr_enable_video_stabilization_n(void);
+extern int utc_media_camera_attr_enable_video_stabilization_p(void);
+extern int utc_media_camera_attr_is_enabled_video_stabilization_n1(void);
+extern int utc_media_camera_attr_is_enabled_video_stabilization_n2(void);
+extern int utc_media_camera_attr_is_enabled_video_stabilization_p(void);
+extern int utc_media_camera_attr_is_supported_video_stabilization_n(void);
+extern int utc_media_camera_attr_is_supported_video_stabilization_p(void);
+extern int utc_media_camera_attr_get_hdr_mode_n1(void);
+extern int utc_media_camera_attr_get_hdr_mode_n2(void);
+extern int utc_media_camera_attr_get_hdr_mode_p(void);
+extern int utc_media_camera_attr_set_hdr_mode_n(void);
+extern int utc_media_camera_attr_set_hdr_mode_p(void);
+extern int utc_media_camera_attr_foreach_supported_stream_flip_n1(void);
+extern int utc_media_camera_attr_foreach_supported_stream_flip_n2(void);
+extern int utc_media_camera_attr_foreach_supported_stream_flip_p(void);
+extern int utc_media_camera_attr_get_stream_flip_n1(void);
+extern int utc_media_camera_attr_get_stream_flip_n2(void);
+extern int utc_media_camera_attr_get_stream_flip_p(void);
+extern int utc_media_camera_attr_set_stream_flip_n(void);
+extern int utc_media_camera_attr_set_stream_flip_p(void);
+extern int utc_media_camera_attr_foreach_supported_stream_rotation_n1(void);
+extern int utc_media_camera_attr_foreach_supported_stream_rotation_n2(void);
+extern int utc_media_camera_attr_foreach_supported_stream_rotation_p(void);
+extern int utc_media_camera_attr_get_stream_rotation_n1(void);
+extern int utc_media_camera_attr_get_stream_rotation_n2(void);
+extern int utc_media_camera_attr_get_stream_rotation_p(void);
+extern int utc_media_camera_attr_set_stream_rotation_n(void);
+extern int utc_media_camera_attr_set_stream_rotation_p(void);
+extern int utc_media_camera_attr_foreach_supported_theater_mode_n1(void);
+extern int utc_media_camera_attr_foreach_supported_theater_mode_n2(void);
+extern int utc_media_camera_attr_foreach_supported_theater_mode_p(void);
+extern int utc_media_camera_attr_get_theater_mode_n1(void);
+extern int utc_media_camera_attr_get_theater_mode_n2(void);
+extern int utc_media_camera_attr_get_theater_mode_p(void);
+extern int utc_media_camera_attr_set_theater_mode_n(void);
+extern int utc_media_camera_attr_set_theater_mode_p(void);
+extern int utc_media_camera_get_display_flip_n1(void);
+extern int utc_media_camera_get_display_flip_n2(void);
+extern int utc_media_camera_get_display_flip_p(void);
+extern int utc_media_camera_set_display_flip_n(void);
+extern int utc_media_camera_set_display_flip_p(void);
+extern int utc_media_camera_attr_is_supported_hdr_capture_n(void);
+extern int utc_media_camera_attr_is_supported_hdr_capture_p(void);
+extern int utc_media_camera_is_supported_face_detection_n(void);
+extern int utc_media_camera_is_supported_face_detection_p(void);
+extern int utc_media_camera_is_supported_zero_shutter_lag_n(void);
+extern int utc_media_camera_is_supported_zero_shutter_lag_p(void);
+extern int utc_media_camera_is_supported_media_packet_preview_cb_n(void);
+extern int utc_media_camera_is_supported_media_packet_preview_cb_p(void);
+extern int utc_media_camera_get_device_count_n1(void);
+extern int utc_media_camera_get_device_count_n2(void);
+extern int utc_media_camera_get_device_count_p(void);
+extern int utc_media_camera_get_recommended_preview_resolution_n1(void);
+extern int utc_media_camera_get_recommended_preview_resolution_n2(void);
+extern int utc_media_camera_get_recommended_preview_resolution_n3(void);
+extern int utc_media_camera_get_recommended_preview_resolution_p(void);
+extern int utc_media_camera_attr_enable_tag_n(void);
+extern int utc_media_camera_attr_enable_tag_p(void);
+extern int utc_media_camera_attr_get_af_mode_n(void);
+extern int utc_media_camera_attr_get_af_mode_p(void);
+extern int utc_media_camera_attr_get_brightness_n(void);
+extern int utc_media_camera_attr_get_brightness_p(void);
+extern int utc_media_camera_attr_get_brightness_range_n(void);
+extern int utc_media_camera_attr_get_brightness_range_p(void);
+extern int utc_media_camera_attr_get_contrast_n(void);
+extern int utc_media_camera_attr_get_contrast_p(void);
+extern int utc_media_camera_attr_get_contrast_range_n(void);
+extern int utc_media_camera_attr_get_contrast_range_p(void);
+extern int utc_media_camera_attr_get_exposure_n(void);
+extern int utc_media_camera_attr_get_exposure_p(void);
+extern int utc_media_camera_attr_get_exposure_mode_n(void);
+extern int utc_media_camera_attr_get_exposure_mode_p(void);
+extern int utc_media_camera_attr_get_exposure_range_n(void);
+extern int utc_media_camera_attr_get_exposure_range_p(void);
+extern int utc_media_camera_attr_get_iso_n(void);
+extern int utc_media_camera_attr_get_iso_p(void);
+extern int utc_media_camera_attr_get_whitebalance_n(void);
+extern int utc_media_camera_attr_get_whitebalance_p(void);
+extern int utc_media_camera_attr_get_zoom_n(void);
+extern int utc_media_camera_attr_get_zoom_p(void);
+extern int utc_media_camera_attr_get_zoom_range_n(void);
+extern int utc_media_camera_attr_get_zoom_range_p(void);
+extern int utc_media_camera_attr_set_effect_n(void);
+extern int utc_media_camera_attr_set_effect_p(void);
+extern int utc_media_camera_attr_set_flash_mode_n(void);
+extern int utc_media_camera_attr_set_flash_mode_p(void);
+extern int utc_media_camera_attr_set_geotag_n(void);
+extern int utc_media_camera_attr_set_geotag_p(void);
+extern int utc_media_camera_attr_set_scene_mode_n(void);
+extern int utc_media_camera_attr_set_scene_mode_p(void);
+extern int utc_media_camera_attr_set_tag_image_description_n(void);
+extern int utc_media_camera_attr_set_tag_image_description_p(void);
+extern int utc_media_camera_attr_set_tag_orientation_n(void);
+extern int utc_media_camera_attr_set_tag_orientation_p(void);
+extern int utc_media_camera_attr_set_tag_software_n(void);
+extern int utc_media_camera_attr_set_tag_software_p(void);
+extern int utc_media_camera_create_n(void);
+extern int utc_media_camera_create_p(void);
+extern int utc_media_camera_destroy_n(void);
+extern int utc_media_camera_destroy_p(void);
+extern int utc_media_camera_start_preview_n(void);
+extern int utc_media_camera_start_preview_p(void);
+extern int utc_media_camera_stop_preview_n(void);
+extern int utc_media_camera_stop_preview_p(void);
+extern int utc_media_camera_start_capture_n(void);
+extern int utc_media_camera_start_capture_p(void);
+extern int utc_media_camera_get_state_n(void);
+extern int utc_media_camera_get_state_p(void);
+extern int utc_media_camera_start_focusing_n(void);
+extern int utc_media_camera_start_focusing_p(void);
+extern int utc_media_camera_cancel_focusing_n(void);
+extern int utc_media_camera_cancel_focusing_p(void);
+extern int utc_media_camera_is_supported_continuous_capture_n(void);
+extern int utc_media_camera_is_supported_continuous_capture_p(void);
+extern int utc_media_camera_start_continuous_capture_n(void);
+extern int utc_media_camera_start_continuous_capture_p(void);
+extern int utc_media_camera_stop_continuous_capture_n(void);
+extern int utc_media_camera_stop_continuous_capture_p(void);
+extern int utc_media_camera_start_face_detection_n(void);
+extern int utc_media_camera_stop_face_detection_n(void);
+extern int utc_camera_set_display_n(void);
+extern int utc_camera_set_display_p(void);
+extern int utc_camera_set_preview_resolution_n(void);
+extern int utc_camera_set_preview_resolution_p(void);
+extern int utc_camera_set_display_rotation_n1(void);
+extern int utc_camera_set_display_rotation_n2(void);
+extern int utc_camera_set_display_rotation_p(void);
+extern int utc_camera_set_capture_resolution_n(void);
+extern int utc_camera_set_capture_resolution_p(void);
+extern int utc_camera_set_capture_format_n1(void);
+extern int utc_camera_set_capture_format_n2(void);
+extern int utc_camera_set_capture_format_p(void);
+extern int utc_camera_set_preview_format_n1(void);
+extern int utc_camera_set_preview_format_n2(void);
+extern int utc_camera_set_preview_format_p(void);
+extern int utc_camera_get_preview_resolution_n1(void);
+extern int utc_camera_get_preview_resolution_n2(void);
+extern int utc_camera_get_preview_resolution_n3(void);
+extern int utc_camera_get_preview_resolution_p(void);
+extern int utc_camera_get_display_rotation_n1(void);
+extern int utc_camera_get_display_rotation_n2(void);
+extern int utc_camera_get_display_rotation_p(void);
+extern int utc_camera_get_capture_resolution_n1(void);
+extern int utc_camera_get_capture_resolution_n2(void);
+extern int utc_camera_get_capture_resolution_n3(void);
+extern int utc_camera_get_capture_resolution_p(void);
+extern int utc_camera_get_preview_format_n1(void);
+extern int utc_camera_get_preview_format_n2(void);
+extern int utc_camera_get_preview_format_p(void);
+extern int utc_camera_set_preview_cb_n1(void);
+extern int utc_camera_set_preview_cb_n2(void);
+extern int utc_camera_set_preview_cb_p(void);
+extern int utc_camera_unset_preview_cb_n(void);
+extern int utc_camera_unset_preview_cb_p(void);
+extern int utc_camera_set_media_packet_preview_cb_n1(void);
+extern int utc_camera_set_media_packet_preview_cb_n2(void);
+extern int utc_camera_set_media_packet_preview_cb_p(void);
+extern int utc_camera_unset_media_packet_preview_cb_n(void);
+extern int utc_camera_unset_media_packet_preview_cb_p(void);
+extern int utc_camera_set_state_changed_cb_n1(void);
+extern int utc_camera_set_state_changed_cb_n2(void);
+extern int utc_camera_set_state_changed_cb_p(void);
+extern int utc_camera_unset_state_changed_cb_n(void);
+extern int utc_camera_unset_state_changed_cb_p(void);
+extern int utc_camera_set_focus_changed_cb_n1(void);
+extern int utc_camera_set_focus_changed_cb_n2(void);
+extern int utc_camera_set_focus_changed_cb_p(void);
+extern int utc_camera_unset_focus_changed_cb_n(void);
+extern int utc_camera_unset_focus_changed_cb_p(void);
+extern int utc_camera_foreach_supported_preview_resolution_n1(void);
+extern int utc_camera_foreach_supported_preview_resolution_n2(void);
+extern int utc_camera_foreach_supported_preview_resolution_p(void);
+extern int utc_camera_foreach_supported_capture_resolution_n1(void);
+extern int utc_camera_foreach_supported_capture_resolution_n2(void);
+extern int utc_camera_foreach_supported_capture_resolution_p(void);
+extern int utc_camera_foreach_supported_capture_format_n1(void);
+extern int utc_camera_foreach_supported_capture_format_n2(void);
+extern int utc_camera_foreach_supported_capture_format_p(void);
+extern int utc_camera_foreach_supported_preview_format_n1(void);
+extern int utc_camera_foreach_supported_preview_format_n2(void);
+extern int utc_camera_foreach_supported_preview_format_p(void);
+extern int utc_camera_set_display_visible_n(void);
+extern int utc_camera_set_display_visible_p(void);
+extern int utc_camera_is_display_visible_n1(void);
+extern int utc_camera_is_display_visible_n2(void);
+extern int utc_camera_is_display_visible_p(void);
+extern int utc_camera_set_display_mode_n1(void);
+extern int utc_camera_set_display_mode_n2(void);
+extern int utc_camera_set_display_mode_p(void);
+extern int utc_camera_get_display_mode_n1(void);
+extern int utc_camera_get_display_mode_n2(void);
+extern int utc_camera_get_display_mode_p(void);
+extern int utc_camera_get_capture_format_n1(void);
+extern int utc_camera_get_capture_format_n2(void);
+extern int utc_camera_get_capture_format_p(void);
+extern int utc_camera_set_error_cb_n1(void);
+extern int utc_camera_set_error_cb_n2(void);
+extern int utc_camera_set_error_cb_p(void);
+extern int utc_camera_unset_error_cb_n(void);
+extern int utc_camera_unset_error_cb_p(void);
+extern int utc_camera_set_interrupted_cb_n1(void);
+extern int utc_camera_set_interrupted_cb_n2(void);
+extern int utc_camera_set_interrupted_cb_p(void);
+extern int utc_camera_unset_interrupted_cb_n(void);
+extern int utc_camera_unset_interrupted_cb_p(void);
+extern int utc_camera_attr_set_hdr_capture_progress_cb_n1(void);
+extern int utc_camera_attr_set_hdr_capture_progress_cb_n2(void);
+extern int utc_camera_attr_set_hdr_capture_progress_cb_p(void);
+extern int utc_camera_attr_unset_hdr_capture_progress_cb_n(void);
+extern int utc_camera_attr_unset_hdr_capture_progress_cb_p(void);
+
+testcase tc_array[] = {
+    {"utc_media_camera_attr_set_preview_fps_n1", utc_media_camera_attr_set_preview_fps_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_preview_fps_n2", utc_media_camera_attr_set_preview_fps_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_preview_fps_p", utc_media_camera_attr_set_preview_fps_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_image_quality_n1", utc_media_camera_attr_set_image_quality_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_image_quality_n2", utc_media_camera_attr_set_image_quality_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_image_quality_p", utc_media_camera_attr_set_image_quality_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_preview_fps_n1", utc_media_camera_attr_get_preview_fps_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_preview_fps_n2", utc_media_camera_attr_get_preview_fps_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_preview_fps_p", utc_media_camera_attr_get_preview_fps_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_image_quality_n1", utc_media_camera_attr_get_image_quality_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_image_quality_n2", utc_media_camera_attr_get_image_quality_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_image_quality_p", utc_media_camera_attr_get_image_quality_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_zoom_n1", utc_media_camera_attr_set_zoom_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_zoom_p", utc_media_camera_attr_set_zoom_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_af_mode_n1", utc_media_camera_attr_set_af_mode_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_af_mode_n2", utc_media_camera_attr_set_af_mode_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_af_mode_p", utc_media_camera_attr_set_af_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_exposure_mode_n1", utc_media_camera_attr_set_exposure_mode_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_exposure_mode_p", utc_media_camera_attr_set_exposure_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_exposure_n1", utc_media_camera_attr_set_exposure_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_exposure_n2", utc_media_camera_attr_set_exposure_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_exposure_p", utc_media_camera_attr_set_exposure_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_iso_n1", utc_media_camera_attr_set_iso_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_iso_n2", utc_media_camera_attr_set_iso_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_iso_p", utc_media_camera_attr_set_iso_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_brightness_n1", utc_media_camera_attr_set_brightness_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_brightness_n2", utc_media_camera_attr_set_brightness_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_brightness_p", utc_media_camera_attr_set_brightness_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_contrast_n1", utc_media_camera_attr_set_contrast_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_contrast_n2", utc_media_camera_attr_set_contrast_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_contrast_p", utc_media_camera_attr_set_contrast_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_whitebalance_n1", utc_media_camera_attr_set_whitebalance_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_whitebalance_n2", utc_media_camera_attr_set_whitebalance_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_whitebalance_p", utc_media_camera_attr_set_whitebalance_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_effect_n1", utc_media_camera_attr_get_effect_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_effect_n2", utc_media_camera_attr_get_effect_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_effect_p", utc_media_camera_attr_get_effect_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_scene_mode_n1", utc_media_camera_attr_get_scene_mode_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_scene_mode_n2", utc_media_camera_attr_get_scene_mode_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_scene_mode_p", utc_media_camera_attr_get_scene_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_tag_n1", utc_media_camera_attr_is_enabled_tag_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_tag_n2", utc_media_camera_attr_is_enabled_tag_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_tag_p", utc_media_camera_attr_is_enabled_tag_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_tag_image_description_n1", utc_media_camera_attr_get_tag_image_description_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_tag_image_description_n2", utc_media_camera_attr_get_tag_image_description_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_tag_image_description_p", utc_media_camera_attr_get_tag_image_description_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_tag_orientation_n1", utc_media_camera_attr_get_tag_orientation_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_tag_orientation_n2", utc_media_camera_attr_get_tag_orientation_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_tag_orientation_p", utc_media_camera_attr_get_tag_orientation_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_tag_software_n1", utc_media_camera_attr_get_tag_software_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_tag_software_n2", utc_media_camera_attr_get_tag_software_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_tag_software_p", utc_media_camera_attr_get_tag_software_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_geotag_n1", utc_media_camera_attr_get_geotag_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_geotag_n2", utc_media_camera_attr_get_geotag_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_geotag_n3", utc_media_camera_attr_get_geotag_n3, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_geotag_n4", utc_media_camera_attr_get_geotag_n4, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_geotag_p", utc_media_camera_attr_get_geotag_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_remove_geotag_n", utc_media_camera_attr_remove_geotag_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_remove_geotag_p", utc_media_camera_attr_remove_geotag_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_flash_mode_n1", utc_media_camera_attr_get_flash_mode_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_flash_mode_n2", utc_media_camera_attr_get_flash_mode_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_flash_mode_p", utc_media_camera_attr_get_flash_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_af_mode_n1", utc_media_camera_attr_foreach_supported_af_mode_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_af_mode_n2", utc_media_camera_attr_foreach_supported_af_mode_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_af_mode_p", utc_media_camera_attr_foreach_supported_af_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_exposure_mode_n1", utc_media_camera_attr_foreach_supported_exposure_mode_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_exposure_mode_n2", utc_media_camera_attr_foreach_supported_exposure_mode_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_exposure_mode_p", utc_media_camera_attr_foreach_supported_exposure_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_iso_n1", utc_media_camera_attr_foreach_supported_iso_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_iso_n2", utc_media_camera_attr_foreach_supported_iso_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_iso_p", utc_media_camera_attr_foreach_supported_iso_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_whitebalance_n1", utc_media_camera_attr_foreach_supported_whitebalance_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_whitebalance_n2", utc_media_camera_attr_foreach_supported_whitebalance_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_whitebalance_p", utc_media_camera_attr_foreach_supported_whitebalance_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_effect_n1", utc_media_camera_attr_foreach_supported_effect_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_effect_n2", utc_media_camera_attr_foreach_supported_effect_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_effect_p", utc_media_camera_attr_foreach_supported_effect_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_scene_mode_n1", utc_media_camera_attr_foreach_supported_scene_mode_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_scene_mode_n2", utc_media_camera_attr_foreach_supported_scene_mode_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_scene_mode_p", utc_media_camera_attr_foreach_supported_scene_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_flash_mode_n1", utc_media_camera_attr_foreach_supported_flash_mode_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_flash_mode_n2", utc_media_camera_attr_foreach_supported_flash_mode_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_flash_mode_p", utc_media_camera_attr_foreach_supported_flash_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_fps_n1", utc_media_camera_attr_foreach_supported_fps_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_fps_n2", utc_media_camera_attr_foreach_supported_fps_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_fps_p", utc_media_camera_attr_foreach_supported_fps_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_lens_orientation_n1", utc_media_camera_attr_get_lens_orientation_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_lens_orientation_n2", utc_media_camera_attr_get_lens_orientation_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_lens_orientation_p", utc_media_camera_attr_get_lens_orientation_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_af_area_n1", utc_media_camera_attr_set_af_area_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_af_area_n2", utc_media_camera_attr_set_af_area_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_af_area_p", utc_media_camera_attr_set_af_area_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_clear_af_area_n", utc_media_camera_attr_clear_af_area_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_clear_af_area_p", utc_media_camera_attr_clear_af_area_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_disable_shutter_sound_n", utc_media_camera_attr_disable_shutter_sound_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_disable_shutter_sound_p", utc_media_camera_attr_disable_shutter_sound_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_supported_anti_shake_n", utc_media_camera_attr_is_supported_anti_shake_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_supported_anti_shake_p", utc_media_camera_attr_is_supported_anti_shake_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_enable_anti_shake_n", utc_media_camera_attr_enable_anti_shake_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_enable_anti_shake_p", utc_media_camera_attr_enable_anti_shake_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_anti_shake_n1", utc_media_camera_attr_is_enabled_anti_shake_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_anti_shake_n2", utc_media_camera_attr_is_enabled_anti_shake_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_anti_shake_p", utc_media_camera_attr_is_enabled_anti_shake_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_supported_auto_contrast_n", utc_media_camera_attr_is_supported_auto_contrast_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_supported_auto_contrast_p", utc_media_camera_attr_is_supported_auto_contrast_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_enable_auto_contrast_n", utc_media_camera_attr_enable_auto_contrast_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_enable_auto_contrast_p", utc_media_camera_attr_enable_auto_contrast_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_auto_contrast_n1", utc_media_camera_attr_is_enabled_auto_contrast_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_auto_contrast_n2", utc_media_camera_attr_is_enabled_auto_contrast_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_auto_contrast_p", utc_media_camera_attr_is_enabled_auto_contrast_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_enable_video_stabilization_n", utc_media_camera_attr_enable_video_stabilization_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_enable_video_stabilization_p", utc_media_camera_attr_enable_video_stabilization_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_video_stabilization_n1", utc_media_camera_attr_is_enabled_video_stabilization_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_video_stabilization_n2", utc_media_camera_attr_is_enabled_video_stabilization_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_enabled_video_stabilization_p", utc_media_camera_attr_is_enabled_video_stabilization_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_supported_video_stabilization_n", utc_media_camera_attr_is_supported_video_stabilization_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_supported_video_stabilization_p", utc_media_camera_attr_is_supported_video_stabilization_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_hdr_mode_n1", utc_media_camera_attr_get_hdr_mode_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_hdr_mode_n2", utc_media_camera_attr_get_hdr_mode_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_hdr_mode_p", utc_media_camera_attr_get_hdr_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_hdr_mode_n", utc_media_camera_attr_set_hdr_mode_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_hdr_mode_p", utc_media_camera_attr_set_hdr_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_stream_flip_n1", utc_media_camera_attr_foreach_supported_stream_flip_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_stream_flip_n2", utc_media_camera_attr_foreach_supported_stream_flip_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_stream_flip_p", utc_media_camera_attr_foreach_supported_stream_flip_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_stream_flip_n1", utc_media_camera_attr_get_stream_flip_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_stream_flip_n2", utc_media_camera_attr_get_stream_flip_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_stream_flip_p", utc_media_camera_attr_get_stream_flip_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_stream_flip_n", utc_media_camera_attr_set_stream_flip_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_stream_flip_p", utc_media_camera_attr_set_stream_flip_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_stream_rotation_n1", utc_media_camera_attr_foreach_supported_stream_rotation_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_stream_rotation_n2", utc_media_camera_attr_foreach_supported_stream_rotation_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_stream_rotation_p", utc_media_camera_attr_foreach_supported_stream_rotation_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_stream_rotation_n1", utc_media_camera_attr_get_stream_rotation_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_stream_rotation_n2", utc_media_camera_attr_get_stream_rotation_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_stream_rotation_p", utc_media_camera_attr_get_stream_rotation_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_stream_rotation_n", utc_media_camera_attr_set_stream_rotation_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_stream_rotation_p", utc_media_camera_attr_set_stream_rotation_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_theater_mode_n1", utc_media_camera_attr_foreach_supported_theater_mode_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_theater_mode_n2", utc_media_camera_attr_foreach_supported_theater_mode_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_foreach_supported_theater_mode_p", utc_media_camera_attr_foreach_supported_theater_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_theater_mode_n1", utc_media_camera_attr_get_theater_mode_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_theater_mode_n2", utc_media_camera_attr_get_theater_mode_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_theater_mode_p", utc_media_camera_attr_get_theater_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_theater_mode_n", utc_media_camera_attr_set_theater_mode_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_theater_mode_p", utc_media_camera_attr_set_theater_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_get_display_flip_n1", utc_media_camera_get_display_flip_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_get_display_flip_n2", utc_media_camera_get_display_flip_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_get_display_flip_p", utc_media_camera_get_display_flip_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_set_display_flip_n", utc_media_camera_set_display_flip_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_set_display_flip_p", utc_media_camera_set_display_flip_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_supported_hdr_capture_n", utc_media_camera_attr_is_supported_hdr_capture_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_is_supported_hdr_capture_p", utc_media_camera_attr_is_supported_hdr_capture_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_is_supported_face_detection_n", utc_media_camera_is_supported_face_detection_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_is_supported_face_detection_p", utc_media_camera_is_supported_face_detection_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_is_supported_zero_shutter_lag_n", utc_media_camera_is_supported_zero_shutter_lag_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_is_supported_zero_shutter_lag_p", utc_media_camera_is_supported_zero_shutter_lag_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_is_supported_media_packet_preview_cb_n", utc_media_camera_is_supported_media_packet_preview_cb_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_is_supported_media_packet_preview_cb_p", utc_media_camera_is_supported_media_packet_preview_cb_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_get_device_count_n1", utc_media_camera_get_device_count_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_get_device_count_n2", utc_media_camera_get_device_count_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_get_device_count_p", utc_media_camera_get_device_count_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_get_recommended_preview_resolution_n1", utc_media_camera_get_recommended_preview_resolution_n1, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_get_recommended_preview_resolution_n2", utc_media_camera_get_recommended_preview_resolution_n2, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_get_recommended_preview_resolution_n3", utc_media_camera_get_recommended_preview_resolution_n3, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_get_recommended_preview_resolution_p", utc_media_camera_get_recommended_preview_resolution_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_enable_tag_n", utc_media_camera_attr_enable_tag_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_enable_tag_p", utc_media_camera_attr_enable_tag_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_af_mode_n", utc_media_camera_attr_get_af_mode_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_af_mode_p", utc_media_camera_attr_get_af_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_brightness_n", utc_media_camera_attr_get_brightness_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_brightness_p", utc_media_camera_attr_get_brightness_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_brightness_range_n", utc_media_camera_attr_get_brightness_range_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_brightness_range_p", utc_media_camera_attr_get_brightness_range_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_contrast_n", utc_media_camera_attr_get_contrast_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_contrast_p", utc_media_camera_attr_get_contrast_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_contrast_range_n", utc_media_camera_attr_get_contrast_range_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_contrast_range_p", utc_media_camera_attr_get_contrast_range_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_exposure_n", utc_media_camera_attr_get_exposure_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_exposure_p", utc_media_camera_attr_get_exposure_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_exposure_mode_n", utc_media_camera_attr_get_exposure_mode_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_exposure_mode_p", utc_media_camera_attr_get_exposure_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_exposure_range_n", utc_media_camera_attr_get_exposure_range_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_exposure_range_p", utc_media_camera_attr_get_exposure_range_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_iso_n", utc_media_camera_attr_get_iso_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_iso_p", utc_media_camera_attr_get_iso_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_whitebalance_n", utc_media_camera_attr_get_whitebalance_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_whitebalance_p", utc_media_camera_attr_get_whitebalance_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_zoom_n", utc_media_camera_attr_get_zoom_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_zoom_p", utc_media_camera_attr_get_zoom_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_zoom_range_n", utc_media_camera_attr_get_zoom_range_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_get_zoom_range_p", utc_media_camera_attr_get_zoom_range_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_effect_n", utc_media_camera_attr_set_effect_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_effect_p", utc_media_camera_attr_set_effect_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_flash_mode_n", utc_media_camera_attr_set_flash_mode_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_flash_mode_p", utc_media_camera_attr_set_flash_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_geotag_n", utc_media_camera_attr_set_geotag_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_geotag_p", utc_media_camera_attr_set_geotag_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_scene_mode_n", utc_media_camera_attr_set_scene_mode_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_scene_mode_p", utc_media_camera_attr_set_scene_mode_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_tag_image_description_n", utc_media_camera_attr_set_tag_image_description_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_tag_image_description_p", utc_media_camera_attr_set_tag_image_description_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_tag_orientation_n", utc_media_camera_attr_set_tag_orientation_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_tag_orientation_p", utc_media_camera_attr_set_tag_orientation_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_tag_software_n", utc_media_camera_attr_set_tag_software_n, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_attr_set_tag_software_p", utc_media_camera_attr_set_tag_software_p, utc_media_camera_attr_startup, utc_media_camera_attr_cleanup},
+    {"utc_media_camera_create_n", utc_media_camera_create_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_create_p", utc_media_camera_create_p, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_destroy_n", utc_media_camera_destroy_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_destroy_p", utc_media_camera_destroy_p, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_start_preview_n", utc_media_camera_start_preview_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_start_preview_p", utc_media_camera_start_preview_p, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_stop_preview_n", utc_media_camera_stop_preview_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_stop_preview_p", utc_media_camera_stop_preview_p, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_start_capture_n", utc_media_camera_start_capture_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_start_capture_p", utc_media_camera_start_capture_p, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_get_state_n", utc_media_camera_get_state_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_get_state_p", utc_media_camera_get_state_p, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_start_focusing_n", utc_media_camera_start_focusing_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_start_focusing_p", utc_media_camera_start_focusing_p, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_cancel_focusing_n", utc_media_camera_cancel_focusing_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_cancel_focusing_p", utc_media_camera_cancel_focusing_p, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_is_supported_continuous_capture_n", utc_media_camera_is_supported_continuous_capture_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_is_supported_continuous_capture_p", utc_media_camera_is_supported_continuous_capture_p, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_start_continuous_capture_n", utc_media_camera_start_continuous_capture_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_start_continuous_capture_p", utc_media_camera_start_continuous_capture_p, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_stop_continuous_capture_n", utc_media_camera_stop_continuous_capture_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_stop_continuous_capture_p", utc_media_camera_stop_continuous_capture_p, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_start_face_detection_n", utc_media_camera_start_face_detection_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_media_camera_stop_face_detection_n", utc_media_camera_stop_face_detection_n, utc_media_camera_lifecycle_startup, utc_media_camera_lifecycle_cleanup},
+    {"utc_camera_set_display_n", utc_camera_set_display_n, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_display_p", utc_camera_set_display_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_preview_resolution_n", utc_camera_set_preview_resolution_n, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_preview_resolution_p", utc_camera_set_preview_resolution_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_display_rotation_n1", utc_camera_set_display_rotation_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_display_rotation_n2", utc_camera_set_display_rotation_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_display_rotation_p", utc_camera_set_display_rotation_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_capture_resolution_n", utc_camera_set_capture_resolution_n, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_capture_resolution_p", utc_camera_set_capture_resolution_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_capture_format_n1", utc_camera_set_capture_format_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_capture_format_n2", utc_camera_set_capture_format_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_capture_format_p", utc_camera_set_capture_format_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_preview_format_n1", utc_camera_set_preview_format_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_preview_format_n2", utc_camera_set_preview_format_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_preview_format_p", utc_camera_set_preview_format_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_preview_resolution_n1", utc_camera_get_preview_resolution_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_preview_resolution_n2", utc_camera_get_preview_resolution_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_preview_resolution_n3", utc_camera_get_preview_resolution_n3, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_preview_resolution_p", utc_camera_get_preview_resolution_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_display_rotation_n1", utc_camera_get_display_rotation_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_display_rotation_n2", utc_camera_get_display_rotation_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_display_rotation_p", utc_camera_get_display_rotation_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_capture_resolution_n1", utc_camera_get_capture_resolution_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_capture_resolution_n2", utc_camera_get_capture_resolution_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_capture_resolution_n3", utc_camera_get_capture_resolution_n3, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_capture_resolution_p", utc_camera_get_capture_resolution_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_preview_format_n1", utc_camera_get_preview_format_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_preview_format_n2", utc_camera_get_preview_format_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_preview_format_p", utc_camera_get_preview_format_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_preview_cb_n1", utc_camera_set_preview_cb_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_preview_cb_n2", utc_camera_set_preview_cb_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_preview_cb_p", utc_camera_set_preview_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_preview_cb_n", utc_camera_unset_preview_cb_n, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_preview_cb_p", utc_camera_unset_preview_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_media_packet_preview_cb_n1", utc_camera_set_media_packet_preview_cb_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_media_packet_preview_cb_n2", utc_camera_set_media_packet_preview_cb_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_media_packet_preview_cb_p", utc_camera_set_media_packet_preview_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_media_packet_preview_cb_n", utc_camera_unset_media_packet_preview_cb_n, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_media_packet_preview_cb_p", utc_camera_unset_media_packet_preview_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_state_changed_cb_n1", utc_camera_set_state_changed_cb_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_state_changed_cb_n2", utc_camera_set_state_changed_cb_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_state_changed_cb_p", utc_camera_set_state_changed_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_state_changed_cb_n", utc_camera_unset_state_changed_cb_n, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_state_changed_cb_p", utc_camera_unset_state_changed_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_focus_changed_cb_n1", utc_camera_set_focus_changed_cb_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_focus_changed_cb_n2", utc_camera_set_focus_changed_cb_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_focus_changed_cb_p", utc_camera_set_focus_changed_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_focus_changed_cb_n", utc_camera_unset_focus_changed_cb_n, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_focus_changed_cb_p", utc_camera_unset_focus_changed_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_preview_resolution_n1", utc_camera_foreach_supported_preview_resolution_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_preview_resolution_n2", utc_camera_foreach_supported_preview_resolution_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_preview_resolution_p", utc_camera_foreach_supported_preview_resolution_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_capture_resolution_n1", utc_camera_foreach_supported_capture_resolution_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_capture_resolution_n2", utc_camera_foreach_supported_capture_resolution_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_capture_resolution_p", utc_camera_foreach_supported_capture_resolution_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_capture_format_n1", utc_camera_foreach_supported_capture_format_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_capture_format_n2", utc_camera_foreach_supported_capture_format_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_capture_format_p", utc_camera_foreach_supported_capture_format_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_preview_format_n1", utc_camera_foreach_supported_preview_format_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_preview_format_n2", utc_camera_foreach_supported_preview_format_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_foreach_supported_preview_format_p", utc_camera_foreach_supported_preview_format_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_display_visible_n", utc_camera_set_display_visible_n, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_display_visible_p", utc_camera_set_display_visible_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_is_display_visible_n1", utc_camera_is_display_visible_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_is_display_visible_n2", utc_camera_is_display_visible_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_is_display_visible_p", utc_camera_is_display_visible_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_display_mode_n1", utc_camera_set_display_mode_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_display_mode_n2", utc_camera_set_display_mode_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_display_mode_p", utc_camera_set_display_mode_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_display_mode_n1", utc_camera_get_display_mode_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_display_mode_n2", utc_camera_get_display_mode_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_display_mode_p", utc_camera_get_display_mode_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_capture_format_n1", utc_camera_get_capture_format_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_capture_format_n2", utc_camera_get_capture_format_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_get_capture_format_p", utc_camera_get_capture_format_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_error_cb_n1", utc_camera_set_error_cb_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_error_cb_n2", utc_camera_set_error_cb_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_error_cb_p", utc_camera_set_error_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_error_cb_n", utc_camera_unset_error_cb_n, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_error_cb_p", utc_camera_unset_error_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_interrupted_cb_n1", utc_camera_set_interrupted_cb_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_interrupted_cb_n2", utc_camera_set_interrupted_cb_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_set_interrupted_cb_p", utc_camera_set_interrupted_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_interrupted_cb_n", utc_camera_unset_interrupted_cb_n, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_unset_interrupted_cb_p", utc_camera_unset_interrupted_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_attr_set_hdr_capture_progress_cb_n1", utc_camera_attr_set_hdr_capture_progress_cb_n1, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_attr_set_hdr_capture_progress_cb_n2", utc_camera_attr_set_hdr_capture_progress_cb_n2, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_attr_set_hdr_capture_progress_cb_p", utc_camera_attr_set_hdr_capture_progress_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_attr_unset_hdr_capture_progress_cb_n", utc_camera_attr_unset_hdr_capture_progress_cb_n, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {"utc_camera_attr_unset_hdr_capture_progress_cb_p", utc_camera_attr_unset_hdr_capture_progress_cb_p, utc_media_camera_setting_startup, utc_media_camera_setting_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CAMERA_CORE_H__
diff --git a/src/utc/camera/utc_media_camera_attr.c b/src/utc/camera/utc_media_camera_attr.c
new file mode 100755 (executable)
index 0000000..982aff1
--- /dev/null
@@ -0,0 +1,3937 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <media/camera.h>
+#include <stdio.h>
+#include <system_info.h>
+#include "assert.h"
+
+//& set: CameraAttr
+
+
+static bool _cb_af_mode(camera_attr_af_mode_e mode, void *user_data);
+
+static int g_startup_err = CAMERA_ERROR_NONE;
+
+static camera_h camera = NULL;
+static bool camera_supported = false;
+
+void utc_media_camera_attr_startup(void)
+{
+    int ret;
+    camera_state_e state;
+
+    g_startup_err = CAMERA_ERROR_NONE;
+    camera = NULL;
+    camera_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/camera", &camera_supported);
+
+    ret = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
+    if(ret != CAMERA_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " camera_create failed (code: %d)\n", ret);
+        g_startup_err = ret;
+        return;
+    }
+    ret = camera_get_state(camera, &state);
+
+    if (ret != CAMERA_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "camera_create failed (code: %d)\n", ret);
+        g_startup_err = ret;
+        return;
+    }
+    else if (state != CAMERA_STATE_CREATED)
+    {
+        fprintf(stderr, "Startup warning at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "Unexpected camera state: %d\n", state);
+        g_startup_err = ret;
+        return;
+    }
+}
+
+void utc_media_camera_attr_cleanup(void)
+{
+    /* end of TC */
+    if(camera) {
+        int ret;
+        ret = camera_destroy(camera);
+        if (ret != CAMERA_ERROR_NONE) {
+            fprintf(stderr, "Cleanup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "camera_destroy failed (code: %d)\n", ret);
+        }
+    }
+}
+
+int utc_media_camera_attr_set_preview_fps_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_preview_fps(NULL, -1);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_preview_fps_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_preview_fps(camera, -1);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_preview_fps_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_preview_fps(camera, CAMERA_ATTR_FPS_AUTO);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_image_quality_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_image_quality(NULL, -1);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_image_quality_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    ret = camera_attr_set_image_quality(camera, -1);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_image_quality_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    ret = camera_attr_set_image_quality(camera, 100);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_preview_fps_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_preview_fps(NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_preview_fps_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_preview_fps(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_preview_fps_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_attr_fps_e value;
+
+    ret = camera_attr_get_preview_fps(camera, &value);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_image_quality_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_image_quality(NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_image_quality_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_image_quality(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_image_quality_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value;
+
+    ret = camera_attr_get_image_quality(camera, &value);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_zoom_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_zoom(NULL, -1);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_zoom_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int min, max;
+
+    ret = camera_attr_get_zoom_range(camera, &min, &max);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (min > max) {
+        fprintf(stderr, "zoom is not supported");
+        return 0;
+    }
+
+    ret = camera_attr_set_zoom(camera, min);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_af_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_af_mode(NULL, -1);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_af_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_af_mode(camera, -1);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_af_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int af_mode = CAMERA_ATTR_AF_NONE;
+
+    camera_attr_foreach_supported_af_mode(camera, _cb_af_mode, &af_mode);
+    ret = camera_attr_set_af_mode(camera, af_mode);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static int exposure_mode = -1;
+
+static bool _cb_exposure_mode(camera_attr_exposure_mode_e mode, void *user_data)
+{
+    exposure_mode = mode;
+    return false;
+}
+
+int utc_media_camera_attr_set_exposure_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    exposure_mode = -1;
+    ret = camera_attr_foreach_supported_exposure_mode(camera,_cb_exposure_mode,NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if (exposure_mode < 0) {
+        ret = camera_attr_set_exposure_mode(camera, -1);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }else {
+        ret = camera_attr_set_exposure_mode(NULL, -1);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    }
+    
+    return 0;
+}
+
+int utc_media_camera_attr_set_exposure_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    exposure_mode = -1;
+    ret = camera_attr_foreach_supported_exposure_mode(camera,_cb_exposure_mode,NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if (exposure_mode < 0) {
+        ret = camera_attr_set_exposure_mode(camera, exposure_mode);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }else {
+        ret = camera_attr_set_exposure_mode(camera, exposure_mode);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    }
+    
+    return 0;
+}
+
+int utc_media_camera_attr_set_exposure_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_exposure(NULL, -1);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+
+}
+
+int utc_media_camera_attr_set_exposure_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int min, max;
+
+    ret = camera_attr_get_exposure_range(camera, &min, &max);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    fprintf(stderr,"min : %d max : %d", min, max);
+    if (max < min) {
+        fprintf(stderr, "exposure is not supported");
+        return 0;
+    }
+
+    ret = camera_attr_set_exposure(camera, min-1);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+
+}
+
+int utc_media_camera_attr_set_exposure_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int min, max;
+
+    exposure_mode = -1;
+    ret = camera_attr_foreach_supported_exposure_mode(camera,_cb_exposure_mode,NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if (exposure_mode < 0) {
+        ret = camera_attr_set_exposure_mode(camera, exposure_mode);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }else {
+        ret = camera_attr_set_exposure_mode(camera, exposure_mode);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+        ret = camera_attr_get_exposure_range(camera, &min, &max);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+
+        fprintf(stderr,"min : %d max : %d", min, max);
+        if (max < min) {
+            fprintf(stderr, "exposure is not supported");
+            return 0;
+        }
+
+        ret = camera_attr_set_exposure(camera, min);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    }
+    
+    return 0;
+
+}
+
+int utc_media_camera_attr_set_iso_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_iso(NULL, -1);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_iso_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_iso(camera, -1);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_iso_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_iso(camera, CAMERA_ATTR_ISO_AUTO);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_brightness_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_brightness(NULL, -10000);    // qct -3 ~ 3
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+
+}
+
+int utc_media_camera_attr_set_brightness_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int min, max;
+    ret = camera_attr_get_brightness_range(camera, &min, &max);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if(max < min){
+        fprintf(stderr, "brightness is not supported");
+        return 0;
+    }
+
+    ret = camera_attr_set_brightness(camera, min-1);   // qct -3 ~ 3
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+
+}
+
+int utc_media_camera_attr_set_brightness_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int min, max;
+
+    ret = camera_attr_get_brightness_range(camera, &min, &max);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if(max < min){
+        fprintf(stderr, "brightness is not supported");
+        return 0;
+    }
+
+    ret = camera_attr_set_brightness(camera, min);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_contrast_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int min, max;
+
+    ret = camera_attr_set_contrast(NULL, -1);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_contrast_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int min, max;
+
+    ret = camera_attr_get_contrast_range(camera, &min, &max);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if (max < min) { /* not supported */
+        return 0;
+    }
+
+    ret = camera_attr_set_contrast(camera, min-1);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_contrast_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int min, max;
+
+    ret = camera_attr_get_contrast_range(camera, &min, &max);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if (max < min) { /* not supported */
+        return 0;
+    }
+    ret = camera_attr_set_contrast(camera, min);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static bool _set_whitebalance_cb(camera_attr_whitebalance_e wb, void *user_data)
+{
+    if (user_data) {
+        *((int *)user_data) = wb;
+    }
+
+    return true;
+}
+
+int utc_media_camera_attr_set_whitebalance_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int set_wb = -1;
+
+    ret = camera_attr_foreach_supported_whitebalance(camera, _set_whitebalance_cb, &set_wb);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (set_wb > -1) {
+        ret = camera_attr_set_whitebalance(NULL, CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT );
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    } else {
+        fprintf(stderr, "there is no supported white balance");
+        ret = camera_attr_set_whitebalance(camera, CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT );
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_whitebalance_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int set_wb = -1;
+
+    ret = camera_attr_foreach_supported_whitebalance(camera, _set_whitebalance_cb, &set_wb);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (set_wb > -1) {
+        ret = camera_attr_set_whitebalance(camera, -1);
+        assert_neq(ret, CAMERA_ERROR_NONE);
+    } else {
+        fprintf(stderr, "there is no supported white balance");
+        ret = camera_attr_set_whitebalance(camera, -1);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_whitebalance_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int set_wb = -1;
+
+    ret = camera_attr_foreach_supported_whitebalance(camera, _set_whitebalance_cb, &set_wb);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (set_wb > -1) {
+        ret = camera_attr_set_whitebalance(camera, set_wb);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    } else {
+        fprintf(stderr, "there is no supported white balance");
+        ret = camera_attr_set_whitebalance(camera, set_wb);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_effect_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_effect(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_effect_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_effect(NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_effect_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_attr_effect_mode_e value;
+
+    ret = camera_attr_get_effect(camera, &value);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_scene_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_scene_mode(NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+
+}
+
+int utc_media_camera_attr_get_scene_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_scene_mode(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_scene_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_attr_scene_mode_e value;
+
+    ret = camera_attr_get_scene_mode(camera, &value);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_tag_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_enabled_tag(NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_tag_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_enabled_tag(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_tag_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool enable;
+
+    ret = camera_attr_is_enabled_tag(camera, &enable);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_tag_image_description_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_tag_image_description(NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_tag_image_description_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_tag_image_description(camera, NULL);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_tag_image_description_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    char *buffer = NULL;
+
+    ret = camera_attr_get_tag_image_description(camera, &buffer);
+    free(buffer);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_tag_orientation_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_tag_orientation(NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+
+}
+
+int utc_media_camera_attr_get_tag_orientation_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_tag_orientation(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_tag_orientation_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_attr_tag_orientation_e value;
+
+    ret = camera_attr_get_tag_orientation(camera, &value);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_tag_software_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_tag_software(NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_tag_software_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_tag_software(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_tag_software_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    char *buffer = 0;
+
+    ret = camera_attr_get_tag_software(camera, &buffer);
+    free(buffer);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_geotag_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_geotag(NULL, NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_geotag_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_geotag(camera, NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_geotag_n3(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    double value1;
+
+    ret = camera_attr_get_geotag(camera, &value1, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_geotag_n4(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    double value1, value2;
+
+    ret = camera_attr_get_geotag(camera, &value1, &value2, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_geotag_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    double value1, value2, value3;
+
+    ret = camera_attr_get_geotag(camera, &value1, &value2, &value3);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_remove_geotag_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_remove_geotag(NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_remove_geotag_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_remove_geotag(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_flash_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_flash_mode(NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_flash_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_flash_mode(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_flash_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_attr_flash_mode_e value;
+
+    // TODO: need new API to tell whether flash of this camera is supported or not
+    ret = camera_attr_get_flash_mode(camera, &value);
+    if(ret != CAMERA_ERROR_NONE && ret != CAMERA_ERROR_NOT_SUPPORTED) {
+        assert(false);
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_af_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_af_mode(NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_af_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_af_mode(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _cb_af_mode(camera_attr_af_mode_e mode, void *user_data)
+{
+    int *af_mode = NULL;
+
+    af_mode = (int *)user_data;
+    if (af_mode) {
+       *af_mode = mode;
+       return false;
+    }
+
+    return true;
+}
+
+int utc_media_camera_attr_foreach_supported_af_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_af_mode(camera, _cb_af_mode, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_exposure_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_exposure_mode(NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_exposure_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_exposure_mode(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_exposure_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_exposure_mode(camera, _cb_exposure_mode, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_iso_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_iso(NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_iso_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_iso(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _cb_iso(camera_attr_iso_e iso, void *user_data)
+{
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_iso_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_iso(camera, _cb_iso, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_whitebalance_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_whitebalance(NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_whitebalance_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_whitebalance(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _cb_whitebalance_cb(camera_attr_whitebalance_e wb, void *user_data)
+{
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_whitebalance_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_whitebalance(camera, _cb_whitebalance_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_effect_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_effect(NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_effect_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_effect(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _cb_effect_cb(camera_attr_effect_mode_e effect, void *user_data)
+{
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_effect_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_effect(camera, _cb_effect_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_scene_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_scene_mode(NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_scene_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_scene_mode(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _cb_scene_mode_cb(camera_attr_scene_mode_e mode, void *user_data)
+{
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_scene_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_scene_mode(camera, _cb_scene_mode_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_flash_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_flash_mode(NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_flash_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_flash_mode(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _cb_flash_mode_cb(camera_attr_flash_mode_e mode,  void *user_data)
+{
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_flash_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    // TODO: need new API to tell whether flash of this camera is supported or not
+    ret = camera_attr_foreach_supported_flash_mode(camera, _cb_flash_mode_cb, NULL);
+    if(ret != CAMERA_ERROR_NONE && ret != CAMERA_ERROR_NOT_SUPPORTED) {
+        assert(false);
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_fps_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_fps(NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_fps_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_fps(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _cb_fps_cb(camera_attr_fps_e fps, void *user_data)
+{
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_fps_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_fps(camera, _cb_fps_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_lens_orientation_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_lens_orientation(NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_lens_orientation_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_get_lens_orientation(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_lens_orientation_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int rotate;
+
+    ret = camera_attr_get_lens_orientation(camera, &rotate);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int m_autofocus_mode = -1;
+
+static bool _autofocus_mode_cb(camera_attr_af_mode_e mode, void *user_data)
+{
+    m_autofocus_mode = mode;
+    return false;
+}
+
+int utc_media_camera_attr_set_af_area_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_af_area(NULL, 0, 0);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_af_area_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_set_af_area(camera, -1, -1);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_af_area_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int ret_mode;
+
+    m_autofocus_mode = 0;
+    ret = camera_attr_foreach_supported_af_mode(camera,_autofocus_mode_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if (m_autofocus_mode == 0) {
+        fprintf(stderr, "auto focus is not supported");
+        return 0;
+    }
+
+    ret_mode = camera_attr_set_af_mode(camera, m_autofocus_mode);
+    ret = camera_attr_set_af_area(camera, 0, 0);
+    if (ret_mode == CAMERA_ERROR_NONE) {
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    } else {
+        assert_neq(ret, CAMERA_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_clear_af_area_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_clear_af_area(NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_clear_af_area_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_clear_af_area(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_disable_shutter_sound_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    ret = camera_attr_disable_shutter_sound(NULL, false);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_disable_shutter_sound_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    ret = camera_attr_disable_shutter_sound(camera, false);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_supported_anti_shake_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_anti_shake(NULL);
+    fprintf(stderr, "camera_attr_is_supported_anti_shake(NULL) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_supported_anti_shake_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_anti_shake(camera);
+    fprintf(stderr, "camera_attr_is_supported_anti_shake(camera) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_attr_enable_anti_shake_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool supported = false;
+    supported = camera_attr_is_supported_anti_shake(camera);
+
+    if(!supported) {
+        ret = camera_attr_enable_anti_shake(camera, -10);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    } else{
+        ret = camera_attr_enable_anti_shake(NULL, true);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    }
+    
+    return 0;
+}
+
+int utc_media_camera_attr_enable_anti_shake_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool supported = false;
+    supported = camera_attr_is_supported_anti_shake(camera);
+
+    if(!supported) {
+        ret = camera_attr_enable_anti_shake(camera, true);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    } else{
+        ret = camera_attr_enable_anti_shake(camera, true);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_anti_shake_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    bool supported = false;
+    supported = camera_attr_is_supported_anti_shake(camera);
+
+    if(!supported) {
+        ret = camera_attr_is_enabled_anti_shake(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    } else{
+        ret = camera_attr_is_enabled_anti_shake(NULL, NULL);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    }
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_anti_shake_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    bool supported = false;
+    supported = camera_attr_is_supported_anti_shake(camera);
+
+    if(!supported) {
+        ret = camera_attr_is_enabled_anti_shake(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    } else{
+        ret = camera_attr_is_enabled_anti_shake(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    }
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_anti_shake_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool enable;
+
+    bool supported = false;
+    supported = camera_attr_is_supported_anti_shake(camera);
+
+    if(!supported) {
+        ret = camera_attr_is_enabled_anti_shake(camera, &enable);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    } else{
+        ret = camera_attr_is_enabled_anti_shake(camera, &enable);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    }
+    
+    return 0;
+}
+
+int utc_media_camera_attr_is_supported_auto_contrast_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_auto_contrast(NULL);
+    fprintf(stderr, "camera_attr_is_supported_auto_contrast(NULL) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_supported_auto_contrast_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_auto_contrast(camera);
+    fprintf(stderr, "camera_attr_is_supported_auto_contrast(camera) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_attr_enable_auto_contrast_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool supported = camera_attr_is_supported_auto_contrast(camera);
+
+    if(supported) {
+        ret = camera_attr_enable_auto_contrast(NULL, true);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = camera_attr_enable_auto_contrast(camera, true);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);    
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_enable_auto_contrast_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool supported = camera_attr_is_supported_auto_contrast(camera);
+
+    if(supported) {
+        ret = camera_attr_enable_auto_contrast(camera, true);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    } else {
+        ret = camera_attr_enable_auto_contrast(camera, true);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);    
+    }
+    
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_auto_contrast_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool supported = camera_attr_is_supported_auto_contrast(camera);
+
+    if(supported) {
+        ret = camera_attr_is_enabled_auto_contrast(NULL, NULL);
+        assert_neq(ret, CAMERA_ERROR_NONE);
+    } else {
+        ret = camera_attr_is_enabled_auto_contrast(camera,NULL);
+        assert_neq(ret, CAMERA_ERROR_NONE);
+    }
+    
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_auto_contrast_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool supported = camera_attr_is_supported_auto_contrast(camera);
+
+    if(supported) {
+        ret = camera_attr_is_enabled_auto_contrast(camera, NULL);
+        assert_neq(ret, CAMERA_ERROR_NONE);
+    } else {
+        ret = camera_attr_is_enabled_auto_contrast(camera, NULL);
+        assert_neq(ret, CAMERA_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_auto_contrast_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool enable = false;
+
+    camera_attr_enable_auto_contrast(camera, false);
+    camera_attr_is_enabled_auto_contrast(camera, &enable);
+    assert_eq(enable, false);
+
+    return 0;
+}
+
+int utc_media_camera_attr_enable_video_stabilization_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_video_stabilization(camera);
+    if (ret == false) {
+        fprintf(stderr, "video stabilization is not supported");
+        ret = camera_attr_enable_video_stabilization(camera, -10);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+        return 0;
+    }
+
+    ret = camera_attr_enable_video_stabilization(NULL, true);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_enable_video_stabilization_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_video_stabilization(camera);
+    if (ret == false) {
+        fprintf(stderr, "video stabilization is not supported");
+        ret = camera_attr_enable_video_stabilization(camera, true);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+        return 0;
+    }
+
+    ret = camera_attr_enable_video_stabilization(camera, true);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_video_stabilization_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_video_stabilization(camera);
+    if (ret == false) {
+        fprintf(stderr, "video stabilization is not supported");
+        ret = camera_attr_is_enabled_video_stabilization(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+        return 0;
+    }
+
+    ret = camera_attr_is_enabled_video_stabilization(NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_video_stabilization_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_video_stabilization(camera);
+    if (ret == false) {
+        fprintf(stderr, "video stabilization is not supported");
+        ret = camera_attr_is_enabled_video_stabilization(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+        return 0;
+    }
+
+    ret = camera_attr_is_enabled_video_stabilization(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_enabled_video_stabilization_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool enable;
+
+    ret = camera_attr_is_supported_video_stabilization(camera);
+    if (ret == false) {
+        fprintf(stderr, "video stabilization is not supported");
+        ret = camera_attr_is_enabled_video_stabilization(camera, &enable);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+        return 0;
+    }
+
+    ret = camera_attr_is_enabled_video_stabilization(camera, &enable);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_supported_video_stabilization_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    ret = camera_attr_is_supported_video_stabilization(NULL);
+    fprintf(stderr, "camera_attr_is_supported_video_stabilization(NULL) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_supported_video_stabilization_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    ret = camera_attr_is_supported_video_stabilization(camera);
+    fprintf(stderr, "camera_attr_is_supported_video_stabilization(camera) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_hdr_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_attr_hdr_mode_e hdr;
+
+    ret = camera_attr_is_supported_hdr_capture(camera);
+    if (ret == false) {
+        fprintf(stderr, "hdr capture is not supported");
+        ret = camera_attr_get_hdr_mode(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = camera_attr_get_hdr_mode(NULL, &hdr);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_hdr_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_hdr_capture(camera);
+    if (ret == false) {
+        fprintf(stderr, "hdr capture is not supported");
+        ret = camera_attr_get_hdr_mode(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = camera_attr_get_hdr_mode(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_hdr_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_attr_hdr_mode_e hdr;
+
+    ret = camera_attr_is_supported_hdr_capture(camera);
+    if (ret == false) {
+        fprintf(stderr, "hdr capture is not supported");
+        ret = camera_attr_get_hdr_mode(camera, &hdr);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = camera_attr_get_hdr_mode(camera, &hdr);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_hdr_mode_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_hdr_capture(camera);
+    if (ret == false) {
+        fprintf(stderr, "hdr capture is not supported");
+        ret = camera_attr_set_hdr_mode(camera, -10);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }
+    else {
+        ret = camera_attr_set_hdr_mode(NULL, CAMERA_ATTR_HDR_MODE_ENABLE);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);        
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_hdr_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_hdr_capture(camera);
+    if (ret == false) {
+        fprintf(stderr, "hdr capture is not supported");
+        ret = camera_attr_set_hdr_mode(camera, CAMERA_ATTR_HDR_MODE_ENABLE);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = camera_attr_set_hdr_mode(camera, CAMERA_ATTR_HDR_MODE_ENABLE);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_stream_flip_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_stream_flip(NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_stream_flip_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_stream_flip(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return false;
+}
+
+static bool _cb_stream_flip(camera_flip_e flip, void *user_data)
+{
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_stream_flip_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_stream_flip(camera, _cb_stream_flip, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static bool _cb_set_stream_flip(camera_flip_e flip, void *user_data)
+{
+    if (user_data) {
+      *((int *)user_data) = flip;
+    }
+
+    return true;
+}
+
+int utc_media_camera_attr_get_stream_flip_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_flip_e flip;
+    int fflip = -1;
+
+    ret = camera_attr_foreach_supported_stream_flip(camera, _cb_set_stream_flip, &fflip);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (fflip > -1) {
+        ret = camera_attr_get_stream_flip(NULL, &flip);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    } else {
+      fprintf(stderr, "There is no supported stream flip\n");
+      ret = camera_attr_get_stream_flip(camera, NULL);
+      assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);      
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_stream_flip_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_flip_e flip;
+    int fflip = -1;
+
+    ret = camera_attr_foreach_supported_stream_flip(camera, _cb_set_stream_flip, &fflip);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (fflip > -1) {
+        ret = camera_attr_get_stream_flip(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    } else {
+      fprintf(stderr, "There is no supported stream flip\n");
+      ret = camera_attr_get_stream_flip(camera, NULL);
+      assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);      
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_stream_flip_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_flip_e flip;
+    int fflip = -1;
+
+    ret = camera_attr_foreach_supported_stream_flip(camera, _cb_set_stream_flip, &fflip);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (fflip > -1) {
+        ret = camera_attr_get_stream_flip(camera, &flip);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    } else {
+      fprintf(stderr, "There is no supported stream flip\n");
+      ret = camera_attr_get_stream_flip(camera, &flip);
+      assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);      
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_stream_flip_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int flip = -1;
+
+    ret = camera_attr_foreach_supported_stream_flip(camera, _cb_set_stream_flip, &flip);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (flip > -1) {
+        ret = camera_attr_set_stream_flip(NULL, CAMERA_FLIP_HORIZONTAL);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    } else {
+      fprintf(stderr, "There is no supported stream flip\n");
+      ret = camera_attr_set_stream_flip(camera, -10);
+      assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_stream_flip_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int flip = -1;
+
+    ret = camera_attr_foreach_supported_stream_flip(camera, _cb_set_stream_flip, &flip);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (flip > -1) {
+      ret = camera_attr_set_stream_flip(camera, flip);
+      assert_eq(ret, CAMERA_ERROR_NONE);
+    } else {
+      fprintf(stderr, "There is no supported stream flip\n");
+      ret = camera_attr_set_stream_flip(camera, flip);
+      assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);      
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_stream_rotation_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_stream_rotation(NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_stream_rotation_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_stream_rotation(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return false;
+}
+
+static bool _cb_stream_rotation(camera_rotation_e rotation, void *user_data)
+{
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_stream_rotation_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_stream_rotation(camera, _cb_stream_rotation, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static bool _cb_set_stream_rotation(camera_rotation_e rotation, void *user_data)
+{
+    if (user_data) {
+      *((int *)user_data) = rotation;
+    }
+
+    return true;
+}
+
+int utc_media_camera_attr_get_stream_rotation_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_rotation_e rotation;
+
+    int frotation = -1;
+
+    ret = camera_attr_foreach_supported_stream_rotation(camera, _cb_set_stream_rotation, &frotation);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (frotation > -1) {
+        ret = camera_attr_get_stream_rotation(NULL, &rotation);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    } else {
+      fprintf(stderr, "There is no supported stream rotation\n");
+      ret = camera_attr_get_stream_rotation(camera, -10);
+      assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_stream_rotation_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_rotation_e rotation;
+
+    int frotation = -1;
+
+    ret = camera_attr_foreach_supported_stream_rotation(camera, _cb_set_stream_rotation, &frotation);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (frotation > -1) {
+        ret = camera_attr_get_stream_rotation(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    } else {
+      fprintf(stderr, "There is no supported stream rotation\n");
+      ret = camera_attr_get_stream_rotation(camera, NULL);
+      assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_stream_rotation_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_rotation_e rotation;
+
+    int frotation = -1;
+
+    ret = camera_attr_foreach_supported_stream_rotation(camera, _cb_set_stream_rotation, &frotation);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (frotation > -1) {
+        ret = camera_attr_get_stream_rotation(camera, &rotation);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    } else {
+      fprintf(stderr, "There is no supported stream rotation\n");
+      ret = camera_attr_get_stream_rotation(camera, &rotation);
+      assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }
+
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_stream_rotation_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int rotation = -1;
+
+    ret = camera_attr_foreach_supported_stream_rotation(camera, _cb_set_stream_rotation, &rotation);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (rotation > -1) {
+        ret = camera_attr_set_stream_rotation(NULL, CAMERA_ROTATION_90);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    } else {
+      fprintf(stderr, "There is no supported stream rotation\n");
+      ret = camera_attr_set_stream_rotation(camera, -10);
+      assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_media_camera_attr_set_stream_rotation_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int rotation = -1;
+
+    ret = camera_attr_foreach_supported_stream_rotation(camera, _cb_set_stream_rotation, &rotation);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (rotation > -1) {
+      ret = camera_attr_set_stream_rotation(camera, rotation);
+      assert_eq(ret, CAMERA_ERROR_NONE);
+    } else {
+      fprintf(stderr, "There is no supported stream rotation\n");
+      ret = camera_attr_set_stream_rotation(camera, rotation);
+      assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_foreach_supported_theater_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_theater_mode(NULL, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_theater_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_theater_mode(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return false;
+}
+
+static bool _cb_theater_mode(camera_attr_theater_mode_e mode, void *user_data)
+{
+    return false;
+}
+
+int utc_media_camera_attr_foreach_supported_theater_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_foreach_supported_theater_mode(camera, _cb_theater_mode, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static bool _cb_set_theater_mode(camera_attr_theater_mode_e mode, void *user_data)
+{
+    if (user_data) {
+        *((int *)user_data) = mode;
+    }
+
+    return true;
+}
+
+
+int utc_media_camera_attr_get_theater_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int mode = -1;
+    camera_attr_theater_mode_e gmode = CAMERA_ATTR_THEATER_MODE_DISABLE;
+
+    ret = camera_attr_foreach_supported_theater_mode(camera, _cb_set_theater_mode, &mode);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (mode > -1) {
+        ret = camera_attr_get_theater_mode(NULL, &gmode);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    } else {
+        fprintf(stderr, "There is no supported theater mode\n");
+        ret = camera_attr_get_theater_mode(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_theater_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int mode = -1;
+
+    ret = camera_attr_foreach_supported_theater_mode(camera, _cb_set_theater_mode, &mode);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (mode > -1) {
+        ret = camera_attr_get_theater_mode(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    } else {
+        fprintf(stderr, "There is no supported theater mode\n");
+        ret = camera_attr_get_theater_mode(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_theater_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int mode = -1;
+    camera_attr_theater_mode_e gmode = CAMERA_ATTR_THEATER_MODE_DISABLE;
+
+    ret = camera_attr_foreach_supported_theater_mode(camera, _cb_set_theater_mode, &mode);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (mode > -1) {
+        ret = camera_attr_get_theater_mode(camera, &gmode);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    } else {
+        fprintf(stderr, "There is no supported theater mode\n");
+        ret = camera_attr_get_theater_mode(camera, &gmode);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_set_theater_mode_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int mode = -1;
+
+    ret = camera_attr_foreach_supported_theater_mode(camera, _cb_set_theater_mode, &mode);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (mode > -1) {
+        ret = camera_attr_set_theater_mode(NULL, CAMERA_ATTR_THEATER_MODE_ENABLE);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = camera_attr_set_theater_mode(camera, -10);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_media_camera_attr_set_theater_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int mode = -1;
+
+    ret = camera_attr_foreach_supported_theater_mode(camera, _cb_set_theater_mode, &mode);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (mode > -1) {
+        ret = camera_attr_set_theater_mode(camera, mode);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    } else {
+        fprintf(stderr, "There is no supported theater mode\n");
+        ret = camera_attr_set_theater_mode(camera, -10);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    }
+
+    return 0;
+}
+
+int utc_media_camera_get_display_flip_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_flip_e mode;
+
+    ret = camera_get_display_flip(NULL, &mode);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_get_display_flip_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_get_display_flip(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_get_display_flip_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_flip_e mode;
+
+    ret = camera_get_display_flip(camera, &mode);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_set_display_flip_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display_flip(NULL, CAMERA_FLIP_HORIZONTAL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_set_display_flip_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display_flip(camera, CAMERA_FLIP_HORIZONTAL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_supported_hdr_capture_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_hdr_capture(NULL);
+    fprintf(stderr, "camera_attr_is_supported_hdr_capture(NULL) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_attr_is_supported_hdr_capture_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_hdr_capture(camera);
+    fprintf(stderr, "camera_attr_is_supported_hdr_capture(camera) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_is_supported_face_detection_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_is_supported_face_detection(NULL);
+    fprintf(stderr, "camera_is_supported_face_detection(NULL) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_is_supported_face_detection_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_is_supported_face_detection(camera);
+    fprintf(stderr, "camera_is_supported_face_detection(camera) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_is_supported_zero_shutter_lag_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_is_supported_zero_shutter_lag(NULL);
+    fprintf(stderr, "camera_is_supported_zero_shutter_lag(NULL) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_is_supported_zero_shutter_lag_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_is_supported_zero_shutter_lag(camera);
+    fprintf(stderr, "camera_is_supported_zero_shutter_lag(camera) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_is_supported_media_packet_preview_cb_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_is_supported_media_packet_preview_cb(NULL);
+    fprintf(stderr, "camera_is_supported_media_packet_preview_cb(NULL) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_is_supported_media_packet_preview_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_is_supported_media_packet_preview_cb(camera);
+    fprintf(stderr, "camera_is_supported_media_packet_preview_cb(camera) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_get_device_count_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int count;
+
+    ret = camera_get_device_count(NULL, &count);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_get_device_count_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_get_device_count(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_get_device_count_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int count;
+
+    ret = camera_get_device_count(camera, &count);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_get_recommended_preview_resolution_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int width;
+    int height;
+
+    ret = camera_get_recommended_preview_resolution(NULL, &width, &height);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_get_recommended_preview_resolution_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int height;
+
+    ret = camera_get_recommended_preview_resolution(camera, NULL, &height);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_get_recommended_preview_resolution_n3(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int width;
+
+    ret = camera_get_recommended_preview_resolution(camera, &width, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_get_recommended_preview_resolution_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int width;
+    int height;
+
+    ret = camera_get_recommended_preview_resolution(camera, &width, &height);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_attr_enable_tag_n(void)
+{
+    int ret;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    ret = camera_attr_enable_tag(NULL, true);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+    return 0;
+}
+
+int utc_media_camera_attr_enable_tag_p(void)
+{
+    int ret;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_enable_tag(camera, true);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_af_mode_n(void)
+{
+    int ret;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+       camera_attr_af_mode_e get_mode;
+       ret = camera_attr_get_af_mode(NULL, &get_mode);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_af_mode_p(void)
+{
+    int ret;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+       camera_attr_af_mode_e get_mode;
+       ret = camera_attr_get_af_mode(camera, &get_mode);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_brightness_n(void)
+{
+       int ret;
+       int level;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_brightness(NULL, &level);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_brightness_p(void)
+{
+       int ret;
+       int level;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_brightness(camera, &level);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_brightness_range_n(void)
+{
+    int ret;
+    int min, max;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+    ret = camera_attr_get_brightness_range(NULL, &min, &max);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+    return 0;
+}
+
+int utc_media_camera_attr_get_brightness_range_p(void)
+{
+    int ret;
+    int min, max;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+    ret = camera_attr_get_brightness_range(camera, &min, &max);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    return 0;
+}
+
+int utc_media_camera_attr_get_contrast_n(void)
+{
+       int ret;
+       int value;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_contrast (NULL, &value );
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_contrast_p(void)
+{
+       int ret;
+       int value;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_contrast (camera, &value );
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_contrast_range_n(void)
+{
+       int ret;
+       int min;
+       int max;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_contrast_range(NULL, &min , &max);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_contrast_range_p(void)
+{
+       int ret;
+       int min;
+       int max;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_contrast_range(camera, &min , &max);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_exposure_n(void)
+{
+       int ret;
+       int value;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_exposure(NULL, &value);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_exposure_p(void)
+{
+       int ret;
+       int value;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_exposure(camera, &value);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_exposure_mode_n(void)
+{
+       int ret;
+       camera_attr_exposure_mode_e mode;
+
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    exposure_mode = -1;
+    ret = camera_attr_foreach_supported_exposure_mode(camera,_cb_exposure_mode,NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if (exposure_mode < 0) {
+        ret = camera_attr_get_exposure_mode(camera, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }else {
+       ret = camera_attr_get_exposure_mode(NULL,&mode);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_exposure_mode_p(void)
+{
+       int ret;
+       camera_attr_exposure_mode_e mode;
+
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    exposure_mode = -1;
+    ret = camera_attr_foreach_supported_exposure_mode(camera,_cb_exposure_mode,NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if (exposure_mode < 0) {
+        ret = camera_attr_get_exposure_mode(camera,&mode);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }else {
+       ret = camera_attr_get_exposure_mode(camera,&mode);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_camera_attr_get_exposure_range_n(void)
+{
+       int ret;
+       int min;
+       int max;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_exposure_range(NULL, &min, &max);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_exposure_range_p(void)
+{
+       int ret;
+       int min;
+       int max;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_exposure_range(camera, &min, &max);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_iso_n(void)
+{
+       int ret;
+       camera_attr_iso_e iso;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_iso(NULL,&iso);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_iso_p(void)
+{
+       int ret;
+       camera_attr_iso_e iso;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_iso(camera,&iso);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_whitebalance_n(void)
+{
+       int ret;
+       camera_attr_whitebalance_e wb;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int set_wb = -1;
+
+    ret = camera_attr_foreach_supported_whitebalance(camera, _set_whitebalance_cb, &set_wb);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (set_wb > -1) {
+        ret = camera_attr_get_whitebalance(NULL,&wb);
+        assert_neq(ret, CAMERA_ERROR_NONE);
+    } else {
+        fprintf(stderr, "there is no supported white balance");
+        ret = camera_attr_get_whitebalance(camera,&wb);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    }
+    
+       return 0;
+}
+
+int utc_media_camera_attr_get_whitebalance_p(void)
+{
+       int ret;
+       camera_attr_whitebalance_e wb;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+        int set_wb = -1;
+
+    ret = camera_attr_foreach_supported_whitebalance(camera, _set_whitebalance_cb, &set_wb);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    if (set_wb > -1) {
+        ret = camera_attr_get_whitebalance(camera,&wb);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    } else {
+        fprintf(stderr, "there is no supported white balance");
+        ret = camera_attr_get_whitebalance(camera,&wb);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    }
+    
+       return 0;
+}
+
+int utc_media_camera_attr_get_zoom_n(void)
+{
+       int ret;
+       int level;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_zoom(NULL, &level);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_zoom_p(void)
+{
+       int ret;
+       int level;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_zoom(camera, &level);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_zoom_range_n(void)
+{
+       int ret;
+       int min;
+       int max;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_zoom_range(NULL, &min ,&max);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_get_zoom_range_p(void)
+{
+       int ret;
+       int min;
+       int max;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_get_zoom_range(camera, &min ,&max);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_effect_n(void)
+{
+       int ret;
+       camera_attr_effect_mode_e effect = CAMERA_ATTR_EFFECT_NONE;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_set_effect(NULL, effect);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_effect_p(void)
+{
+       int ret;
+       camera_attr_effect_mode_e effect = CAMERA_ATTR_EFFECT_NONE;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_set_effect(camera, effect);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_flash_mode_n(void)
+{
+       int ret;
+       camera_attr_flash_mode_e flash = CAMERA_ATTR_FLASH_MODE_OFF;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_set_flash_mode(NULL,flash);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_flash_mode_p(void)
+{
+    int ret;
+    camera_attr_flash_mode_e flash = CAMERA_ATTR_FLASH_MODE_OFF;
+
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    // TODO: need new API to tell whether flash of this camera is supported or not
+    ret = camera_attr_set_flash_mode(camera,flash);
+    if(ret != CAMERA_ERROR_NONE && ret != CAMERA_ERROR_NOT_SUPPORTED) {
+        assert(false);
+    }
+    return 0;
+}
+
+int utc_media_camera_attr_set_geotag_n(void)
+{
+       double lng = 1.12;
+       double lat = 1.13;
+       double alt = 1.14;
+       int ret;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_set_geotag(NULL, lat, lng , alt );
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_geotag_p(void)
+{
+       double lng = 1.12;
+       double lat = 1.13;
+       double alt = 1.14;
+       int ret;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_set_geotag(camera, lat, lng , alt );
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_scene_mode_n(void)
+{
+       int ret;
+       camera_attr_scene_mode_e scene = CAMERA_ATTR_SCENE_MODE_NORMAL;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_set_scene_mode(NULL , scene);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_scene_mode_p(void)
+{
+       int ret;
+       camera_attr_scene_mode_e scene = CAMERA_ATTR_SCENE_MODE_NORMAL;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_set_scene_mode(camera , scene);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_tag_image_description_n(void)
+{
+       int ret;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_set_tag_image_description(NULL, "12345678901234567890");
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_tag_image_description_p(void)
+{
+       int ret;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_set_tag_image_description(camera, "12345678901234567890");
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_tag_orientation_n(void)
+{
+       int ret;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       camera_attr_tag_orientation_e orientation = CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT;
+       ret = camera_attr_set_tag_orientation(NULL, orientation);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_tag_orientation_p(void)
+{
+       int ret;
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       camera_attr_tag_orientation_e orientation = CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT;
+       ret = camera_attr_set_tag_orientation(camera, orientation);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_tag_software_n(void)
+{
+       int ret;
+       char *string = "1.0";
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_set_tag_software(NULL, string);
+       assert_neq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
+
+int utc_media_camera_attr_set_tag_software_p(void)
+{
+       int ret;
+       char *string = "1.0";
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+       ret = camera_attr_set_tag_software(camera, string);
+       assert_eq(ret, CAMERA_ERROR_NONE);
+       return 0;
+}
diff --git a/src/utc/camera/utc_media_camera_lifecycle.c b/src/utc/camera/utc_media_camera_lifecycle.c
new file mode 100755 (executable)
index 0000000..e4e633f
--- /dev/null
@@ -0,0 +1,606 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <media/camera.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <glib.h>
+#include <pthread.h>
+#include <glib-object.h>
+#include <system_info.h>
+
+#include "assert.h"
+
+//& set: CameraLifecycle
+
+static int g_startup_err = CAMERA_ERROR_NONE;
+
+static camera_h camera = NULL;
+static bool camera_supported = false;
+
+typedef enum {
+    ASYNC_READY,
+    ASYNC_DONE
+}async_state;
+
+async_state async_flag;
+
+void utc_media_camera_lifecycle_startup(void)
+{
+    int ret = CAMERA_ERROR_NONE;
+
+    g_startup_err = CAMERA_ERROR_NONE;
+    camera = NULL;
+    camera_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/camera", &camera_supported);
+
+    ret = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
+    if(ret != CAMERA_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " camera_create failed (code: %d)\n", ret);
+        g_startup_err = ret;
+        return;
+    }
+}
+
+
+void utc_media_camera_lifecycle_cleanup(void)
+{
+    if(camera)
+        camera_destroy(camera);
+}
+
+
+int utc_media_camera_create_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_create(CAMERA_DEVICE_CAMERA0, NULL);
+
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_create_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret ;
+
+    ret = camera_destroy(camera);
+    camera = NULL;
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    ret = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_destroy_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_destroy(NULL);
+
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_destroy_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret ;
+
+    ret = camera_destroy(camera);
+    camera = NULL;
+
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_start_preview_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_start_preview(NULL);
+
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_start_preview_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_start_preview(camera);
+    camera_stop_preview(camera);
+
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_stop_preview_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_stop_preview(NULL);
+
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_stop_preview_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_start_preview(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    ret = camera_stop_preview(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_start_capture_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_start_capture(camera, NULL, NULL, NULL);
+
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_start_capture_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display(camera, CAMERA_DISPLAY_TYPE_NONE, 0);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    ret = camera_start_preview(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    ret = camera_start_capture(camera, NULL, NULL, NULL);
+    camera_stop_preview(camera);
+
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_get_state_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_get_state(camera, NULL);
+
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_camera_get_state_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    camera_state_e state;
+
+    ret = camera_get_state(camera, &state);
+
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_start_focusing_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_start_focusing(NULL, false);
+
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_start_focusing_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_attr_af_mode_e focus_mode = CAMERA_ATTR_AF_NONE;
+
+    ret = camera_start_preview(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    ret = camera_attr_get_af_mode(camera, &focus_mode);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if(focus_mode == CAMERA_ATTR_AF_NONE){
+        camera_stop_preview(camera);
+        fprintf(stderr, "auto focus is not supported, this is fixed focus");
+        return 0;
+    }
+    ret = camera_start_focusing(camera, false);
+    sleep(5);
+    camera_cancel_focusing(camera);
+    camera_stop_preview(camera);
+
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_cancel_focusing_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_cancel_focusing(camera);
+
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_camera_cancel_focusing_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_attr_af_mode_e focus_mode = CAMERA_ATTR_AF_NONE;
+
+    ret = camera_start_preview(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    ret = camera_attr_get_af_mode(camera, &focus_mode);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    if(focus_mode == CAMERA_ATTR_AF_NONE){
+        camera_stop_preview(camera);
+        fprintf(stderr, "auto focus is not supported, this is fixed focus");
+        return 0;
+    }
+
+    ret = camera_start_focusing(camera, false);
+    if (ret != CAMERA_ERROR_NONE){
+        camera_stop_preview(camera);
+        return 0;
+    }
+
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    ret = camera_cancel_focusing(camera);
+    camera_stop_preview(camera);
+
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+//=================================================================
+
+static void _face_detected_cb(camera_detected_face_s *faces, int count, void *user_data)
+{
+    *(int *)user_data = faces->id;
+    async_flag = ASYNC_DONE;
+
+//    util_stop_loop();
+    return;
+}
+
+int utc_media_camera_is_supported_continuous_capture_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_is_supported_continuous_capture(NULL);
+    fprintf(stderr, "camera_is_supported_continuous_capture(NULL) ret %d", ret);
+
+    return 0;
+}
+
+int utc_media_camera_is_supported_continuous_capture_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret = false;
+
+    ret = camera_is_supported_continuous_capture(camera);
+    fprintf(stderr, "camera_is_supported_continuous_capture(camera) ret %d", ret);
+
+    return 0;
+
+}
+
+int utc_media_camera_start_continuous_capture_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    bool supported = false;
+    supported = camera_is_supported_continuous_capture(camera);
+
+    if(!supported) {
+        ret = camera_start_continuous_capture(camera,0,0, NULL, NULL, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }  else {
+        ret = camera_start_continuous_capture(camera,0,0, NULL, NULL, NULL);
+
+        assert_neq(ret , CAMERA_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+
+int utc_media_camera_start_continuous_capture_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    bool supported = false;
+    supported = camera_is_supported_continuous_capture(camera);
+
+    if(!supported) {
+        ret = camera_start_continuous_capture(camera,10,100, NULL, NULL, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }  else {
+        ret = camera_set_display(camera, CAMERA_DISPLAY_TYPE_NONE, 0);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+
+        ret = camera_start_preview(camera);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+
+        sleep(3);
+
+        ret = camera_start_continuous_capture(camera,10,100, NULL, NULL, NULL);
+
+        camera_stop_continuous_capture(camera);
+        camera_stop_preview(camera);
+
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    }
+    
+    return 0;
+}
+
+
+int utc_media_camera_stop_continuous_capture_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    bool supported = false;
+    supported = camera_is_supported_continuous_capture(camera);
+
+    if(!supported) {
+        ret = camera_stop_continuous_capture(camera);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }  else {
+        ret = camera_stop_continuous_capture(NULL);
+
+        assert_neq(ret, CAMERA_ERROR_NONE);
+    }
+    
+    return 0;
+}
+
+int utc_media_camera_stop_continuous_capture_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    bool supported = false;
+    supported = camera_is_supported_continuous_capture(camera);
+
+    if(!supported) {
+        ret = camera_stop_continuous_capture(camera);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }  else {
+        ret = camera_set_display(camera, CAMERA_DISPLAY_TYPE_NONE, 0);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+
+        ret = camera_start_preview(camera);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+
+        ret = camera_start_continuous_capture(camera,10,100, NULL, NULL, NULL);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+
+        ret = camera_stop_continuous_capture(camera);
+        camera_stop_preview(camera);
+
+       assert_eq(ret, CAMERA_ERROR_NONE);
+    }
+    
+       return 0;
+}
+
+
+int utc_media_camera_start_face_detection_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    bool supported = false;
+    supported = camera_is_supported_face_detection(camera);
+
+    if(!supported) {
+        ret = camera_start_face_detection(camera,NULL, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }else {
+        ret = camera_start_face_detection(NULL,_face_detected_cb, NULL);
+
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    }
+    
+    return 0;
+}
+
+int utc_media_camera_stop_face_detection_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool supported = false;
+    supported = camera_is_supported_face_detection(camera);
+
+    if(!supported) {
+        ret =camera_stop_face_detection(camera);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    }else {
+
+        ret = camera_stop_face_detection(NULL);
+
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    }
+    
+    return 0;
+}
diff --git a/src/utc/camera/utc_media_camera_setting.c b/src/utc/camera/utc_media_camera_setting.c
new file mode 100755 (executable)
index 0000000..a6ec127
--- /dev/null
@@ -0,0 +1,1703 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <media/camera.h>
+#include <stdio.h>
+#include <glib.h>
+#include <pthread.h>
+#include <system_info.h>
+#include "assert.h"
+
+//& set: CameraSetting
+
+static int g_startup_err = CAMERA_ERROR_NONE;
+
+static camera_h camera = NULL;
+static bool camera_supported = false;
+
+void utc_media_camera_setting_startup(void)
+{
+    /* start of TC */
+    int ret;
+    camera_state_e state;
+
+    g_startup_err = CAMERA_ERROR_NONE;
+    camera = NULL;
+    camera_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/camera", &camera_supported);
+
+    ret = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
+    if(ret != CAMERA_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " camera_create failed (code: %d)\n", ret);
+        g_startup_err = ret;
+        return;
+    }
+
+
+    ret = camera_get_state(camera, &state);
+
+    if (ret != CAMERA_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "camera_create failed (code: %d)\n", ret);
+        g_startup_err = ret;
+        return;
+    }
+    else if (state != CAMERA_STATE_CREATED)
+    {
+        fprintf(stderr, "Startup warning at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "Unexpected camera state: %d\n", state);
+        g_startup_err = ret;
+        return;
+    }
+}
+
+void utc_media_camera_setting_cleanup(void)
+{
+    /* end of TC */
+    if(camera) {
+        int ret;
+        ret = camera_destroy(camera);
+        if (ret != CAMERA_ERROR_NONE) {
+            fprintf(stderr, "Cleanup error at %s:%d\n", __FILE__, __LINE__);
+            fprintf(stderr, "camera_destroy failed (code: %d)\n", ret);
+        }
+    }
+}
+
+
+int utc_camera_set_display_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display(NULL, CAMERA_DISPLAY_TYPE_NONE, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_display_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display(camera, CAMERA_DISPLAY_TYPE_NONE, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_set_preview_resolution_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_preview_resolution(NULL, 0, 0);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _preview_resolution_cb(int width, int height, void *user_data)
+{
+    int *resolution = (int*)user_data;
+    resolution[0] = width;
+    resolution[1] = height;
+    return false;
+}
+
+int utc_camera_set_preview_resolution_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int resolution[2];
+    
+    camera_foreach_supported_preview_resolution(camera, _preview_resolution_cb, resolution);
+    ret = camera_set_preview_resolution(camera, resolution[0],  resolution[1]);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_set_display_rotation_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display_rotation(NULL, CAMERA_ROTATION_NONE);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_display_rotation_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display_rotation(camera, -1);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_set_display_rotation_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display_rotation(camera, CAMERA_ROTATION_NONE);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+int utc_camera_set_capture_resolution_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_capture_resolution(NULL, 0, 0);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _capture_resolution_cb(int width, int height, void *user_data)
+{
+    int *resolution = (int*) user_data;
+    resolution[0] = width;
+    resolution[1] = height;
+    return false;
+}
+
+int utc_camera_set_capture_resolution_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int resolution[2];
+    
+    camera_foreach_supported_capture_resolution(camera, _capture_resolution_cb, resolution);
+    ret = camera_set_capture_resolution(camera, resolution[0], resolution[1]);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static bool _capture_format_cb(camera_pixel_format_e format, void *user_data)
+{
+    int *ret = (int*) user_data;
+    *ret = format;
+    return false;
+}
+
+int utc_camera_set_capture_format_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value;
+
+    camera_foreach_supported_capture_format(camera, _capture_format_cb, &value);
+    ret = camera_set_capture_format(NULL, value);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_capture_format_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_capture_format(camera, -1);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_set_capture_format_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value;
+
+    camera_foreach_supported_capture_format(camera, _capture_format_cb, &value);
+    ret = camera_set_capture_format(camera, value);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+    
+    return 0;
+}
+
+static bool _preview_format_cb(camera_pixel_format_e format, void *user_data)
+{
+    camera_pixel_format_e * ret = (camera_pixel_format_e*)user_data;
+    *ret = format;
+    return false;
+}
+
+int utc_camera_set_preview_format_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_pixel_format_e format;
+
+    camera_foreach_supported_preview_format(camera, _preview_format_cb, &format);
+    ret = camera_set_preview_format(NULL, format);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_preview_format_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_preview_format(camera, -1);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_set_preview_format_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_pixel_format_e format;
+
+    camera_foreach_supported_preview_format(camera, _preview_format_cb, &format);
+    ret = camera_set_preview_format(camera, format);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_get_preview_resolution_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value1;
+    int value2;
+
+    ret = camera_get_preview_resolution(NULL, &value1, &value2);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_preview_resolution_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value2;
+
+    ret = camera_get_preview_resolution(camera, NULL, &value2);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_preview_resolution_n3(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value1;
+
+    ret = camera_get_preview_resolution(camera, &value1, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_preview_resolution_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value1;
+    int value2;
+
+    ret = camera_get_preview_resolution(camera, &value1, &value2);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_get_display_rotation_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_rotation_e value;
+
+    ret = camera_get_display_rotation(NULL, &value);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_display_rotation_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_get_display_rotation(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_display_rotation_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_rotation_e value;
+
+    ret = camera_get_display_rotation(camera, &value);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_get_capture_resolution_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value1, value2;
+
+    ret = camera_get_capture_resolution(NULL, &value1, &value2);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_capture_resolution_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value2;
+
+    ret = camera_get_capture_resolution(camera, NULL, &value2);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_capture_resolution_n3(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value1;
+
+    ret = camera_get_capture_resolution(camera, &value1, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_capture_resolution_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value1, value2;
+
+    ret = camera_get_capture_resolution(camera, &value1, &value2);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_get_preview_format_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value;
+
+    ret =  camera_get_preview_format(NULL, &value);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_preview_format_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_get_preview_format(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_preview_format_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    int value;
+
+    ret =  camera_get_preview_format(camera, &value);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static void _preview_cb(camera_preview_data_s *frame, void *user_data)
+{
+}
+
+int utc_camera_set_preview_cb_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_preview_cb(NULL, _preview_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_preview_cb_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_preview_cb(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_preview_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_preview_cb(camera, _preview_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_unset_preview_cb_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_unset_preview_cb(NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_unset_preview_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_unset_preview_cb(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static void _media_packet_preview_cb(media_packet_h pkt, void *user_data)
+{
+}
+
+int utc_camera_set_media_packet_preview_cb_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    bool supported = false;
+    supported = camera_is_supported_media_packet_preview_cb(camera);
+
+    if(!supported) {
+        ret = camera_set_media_packet_preview_cb(camera, NULL, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    } else {
+        ret = camera_set_media_packet_preview_cb(NULL, _media_packet_preview_cb, NULL);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_camera_set_media_packet_preview_cb_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    
+    bool supported = false;
+    supported = camera_is_supported_media_packet_preview_cb(camera);
+
+    if(!supported) {
+        ret = camera_set_media_packet_preview_cb(camera, NULL, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    } else {
+        ret = camera_set_media_packet_preview_cb(camera, NULL, NULL);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    }
+    return 0;
+}
+
+int utc_camera_set_media_packet_preview_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool supported = false;
+    supported = camera_is_supported_media_packet_preview_cb(camera);
+
+    if(!supported) {
+        ret = camera_set_media_packet_preview_cb(camera, _media_packet_preview_cb, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);        
+    } else {
+        ret = camera_set_media_packet_preview_cb(camera, _media_packet_preview_cb, NULL);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_camera_unset_media_packet_preview_cb_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool supported = false;
+    supported = camera_is_supported_media_packet_preview_cb(camera);
+
+    if(!supported) {
+        ret = camera_unset_media_packet_preview_cb(camera);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    } else {
+        ret = camera_unset_media_packet_preview_cb(NULL);
+        assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+    }
+    
+    return 0;
+}
+
+int utc_camera_unset_media_packet_preview_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool supported = false;
+    supported = camera_is_supported_media_packet_preview_cb(camera);
+
+    if(!supported) {
+        ret = camera_unset_media_packet_preview_cb(camera);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+    } else {
+        ret = camera_unset_media_packet_preview_cb(camera);
+        assert_eq(ret, CAMERA_ERROR_NONE);
+    }
+    
+    return 0;
+}
+
+static void _changed_cb(camera_state_e previous, camera_state_e current, bool by_asm, void *user_data)
+{
+}
+
+int utc_camera_set_state_changed_cb_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_state_changed_cb(NULL, _changed_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_state_changed_cb_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_state_changed_cb(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_state_changed_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_state_changed_cb(camera, _changed_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_unset_state_changed_cb_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_unset_state_changed_cb(NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_unset_state_changed_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_unset_state_changed_cb(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static void _focus_changed_cb(camera_focus_state_e state, void *user_data)
+{
+}
+
+int utc_camera_set_focus_changed_cb_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_focus_changed_cb(NULL, _focus_changed_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_focus_changed_cb_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_focus_changed_cb(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_focus_changed_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_focus_changed_cb(camera, _focus_changed_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_unset_focus_changed_cb_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_unset_focus_changed_cb(NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_unset_focus_changed_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_unset_focus_changed_cb(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static bool _preview_resolution_cb2(int width, int height, void *user_data)
+{
+    return false;
+}
+
+int utc_camera_foreach_supported_preview_resolution_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_preview_resolution(NULL, _preview_resolution_cb2, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_foreach_supported_preview_resolution_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_preview_resolution(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_foreach_supported_preview_resolution_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_preview_resolution(camera, _preview_resolution_cb2, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static bool _capture_resolution_cb2(int width, int height, void *user_data)
+{
+    return false;
+}
+
+int utc_camera_foreach_supported_capture_resolution_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_capture_resolution(NULL, _capture_resolution_cb2, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_foreach_supported_capture_resolution_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_capture_resolution(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_foreach_supported_capture_resolution_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_capture_resolution(camera, _capture_resolution_cb2, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static bool _capture_format_cb2(camera_pixel_format_e format, void *user_data)
+{
+    return false;
+}
+
+int utc_camera_foreach_supported_capture_format_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_capture_format(NULL, _capture_format_cb2, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_foreach_supported_capture_format_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_capture_format(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_foreach_supported_capture_format_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_capture_format(camera, _capture_format_cb2, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static bool _preview_format_cb2(camera_pixel_format_e format, void *user_data)
+{
+    return false;
+}
+
+int utc_camera_foreach_supported_preview_format_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_preview_format(NULL, _preview_format_cb2, NULL);    
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_foreach_supported_preview_format_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_preview_format(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_foreach_supported_preview_format_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_foreach_supported_preview_format(camera, _preview_format_cb2, NULL);    
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_set_display_visible_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display_visible(NULL, true);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_display_visible_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display_visible(camera, true);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_is_display_visible_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool value;
+
+    ret = camera_is_display_visible(NULL, &value);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_is_display_visible_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_is_display_visible(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_is_display_visible_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    bool value;
+
+    ret = camera_is_display_visible(camera, &value);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_set_display_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display_mode(NULL, CAMERA_DISPLAY_MODE_LETTER_BOX);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_display_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display_mode(camera, -1);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_display_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_display_mode(camera, CAMERA_DISPLAY_MODE_LETTER_BOX);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_get_display_mode_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_display_mode_e value;
+
+    ret = camera_get_display_mode(NULL, &value);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_display_mode_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_get_display_mode(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_display_mode_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_display_mode_e value;
+
+    ret = camera_get_display_mode(camera, &value);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_get_capture_format_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_pixel_format_e value;
+
+    ret = camera_get_capture_format(NULL, &value);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_capture_format_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_get_capture_format(camera, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_get_capture_format_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    camera_pixel_format_e value;
+
+    ret = camera_get_capture_format(camera, &value);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static void _error_cb(int error, camera_state_e current_state, void *user_data)
+{
+}
+
+int utc_camera_set_error_cb_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_error_cb(NULL, _error_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_error_cb_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_error_cb(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_error_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_error_cb(camera, _error_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_unset_error_cb_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_unset_error_cb(NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_unset_error_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_unset_error_cb(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static void _interrupted_cb(camera_policy_e policy, camera_state_e previous, camera_state_e current, void *user_data){
+    return;
+}
+
+int utc_camera_set_interrupted_cb_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_interrupted_cb(NULL, _interrupted_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_interrupted_cb_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_interrupted_cb(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_set_interrupted_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_set_interrupted_cb(camera, _interrupted_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_unset_interrupted_cb_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_unset_interrupted_cb(NULL);
+    assert_neq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_unset_interrupted_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_unset_interrupted_cb(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+static void _attr_hdr_progress_cb(int percent, void *user_data){
+    return;
+}
+
+int utc_camera_attr_set_hdr_capture_progress_cb_n1(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_hdr_capture(camera);
+    if (ret == false) {
+        fprintf(stderr, "hdr capture is not supported");
+        ret = camera_attr_set_hdr_capture_progress_cb(camera , NULL, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = camera_attr_set_hdr_capture_progress_cb(NULL , _attr_hdr_progress_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_attr_set_hdr_capture_progress_cb_n2(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_hdr_capture(camera);
+    if (ret == false) {
+        fprintf(stderr, "hdr capture is not supported");
+        ret = camera_attr_set_hdr_capture_progress_cb(camera, NULL, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = camera_attr_set_hdr_capture_progress_cb(camera, NULL, NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_attr_set_hdr_capture_progress_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+
+    ret = camera_attr_is_supported_hdr_capture(camera);
+    if (ret == false) {
+        fprintf(stderr, "hdr capture is not supported");
+        ret = camera_attr_set_hdr_capture_progress_cb(camera, _attr_hdr_progress_cb, NULL);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = camera_attr_set_hdr_capture_progress_cb(camera, _attr_hdr_progress_cb, NULL);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_camera_attr_unset_hdr_capture_progress_cb_n(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    ret = camera_attr_is_supported_hdr_capture(camera);
+    if (ret == false) {
+        fprintf(stderr, "hdr capture is not supported");
+        ret = camera_attr_unset_hdr_capture_progress_cb(camera);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = camera_attr_unset_hdr_capture_progress_cb(NULL);
+    assert_eq(ret, CAMERA_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_camera_attr_unset_hdr_capture_progress_cb_p(void)
+{
+    if(!camera_supported) {
+        assert_eq(g_startup_err, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+    assert_eq(g_startup_err, CAMERA_ERROR_NONE);
+
+    int ret;
+    ret = camera_attr_is_supported_hdr_capture(camera);
+    if (ret == false) {
+        fprintf(stderr, "hdr capture is not supported");
+        ret = camera_attr_unset_hdr_capture_progress_cb(camera);
+        assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
+        return 0;
+    }    
+
+    ret = camera_attr_unset_hdr_capture_progress_cb(camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/capi-media-tool/CMakeLists.txt b/src/utc/capi-media-tool/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..8733355
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "capi-media-tool")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-media-tool")
+SET(TC_SOURCES
+       utc-capi-media-tool.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       gthread-2.0
+       gobject-2.0
+       libtbm
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/capi-media-tool/public.list b/src/utc/capi-media-tool/public.list
new file mode 100755 (executable)
index 0000000..9ff1338
--- /dev/null
@@ -0,0 +1,48 @@
+media_packet_alloc
+media_packet_copy
+media_packet_create
+media_packet_create_alloc
+media_packet_create_from_tbm_surface
+media_packet_destroy
+media_packet_get_buffer_data_ptr
+media_packet_get_buffer_size
+media_packet_get_dts
+media_packet_get_duration
+media_packet_get_extra
+media_packet_get_format
+media_packet_get_pts
+media_packet_get_tbm_surface
+media_packet_is_audio
+media_packet_is_codec_config
+media_packet_is_encoded
+media_packet_is_end_of_stream
+media_packet_is_raw
+media_packet_is_sync_frame
+media_packet_is_video
+media_packet_set_buffer_size
+media_packet_set_dts
+media_packet_set_duration
+media_packet_set_extra
+media_packet_set_flags
+media_packet_set_format
+media_packet_set_pts
+media_packet_unset_flags
+media_format_create
+media_format_get_video_info
+media_format_get_audio_info
+media_format_set_video_mime
+media_format_set_video_width
+media_format_set_video_height
+media_format_set_video_avg_bps
+media_format_set_video_max_bps
+media_format_set_audio_mime
+media_format_set_audio_channel
+media_format_set_audio_samplerate
+media_format_set_audio_bit
+media_format_set_audio_avg_bps
+media_format_ref
+media_format_unref
+media_format_is_writable
+media_format_make_writable
+media_packet_has_tbm_surface_buffer
+
diff --git a/src/utc/capi-media-tool/tct-capi-media-tool-core.c b/src/utc/capi-media-tool/tct-capi-media-tool-core.c
new file mode 100755 (executable)
index 0000000..1859544
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-capi-media-tool-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/capi-media-tool/tct-capi-media-tool-core.h b/src/utc/capi-media-tool/tct-capi-media-tool-core.h
new file mode 100755 (executable)
index 0000000..85168cd
--- /dev/null
@@ -0,0 +1,217 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CAPI_MEDIA_TOOL_CORE_H__
+#define __TCT_CAPI_MEDIA_TOOL_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_media_packet_startup(void);
+extern void utc_media_packet_cleanup(void);
+
+extern int utc_media_packet_create_alloc_p(void);
+extern int utc_media_packet_create_alloc_n(void);
+extern int utc_media_packet_create_p(void);
+extern int utc_media_packet_create_n(void);
+extern int utc_media_packet_copy_p(void);
+extern int utc_media_packet_copy_n(void);
+extern int utc_media_packet_set_format_p(void);
+extern int utc_media_packet_set_format_n(void);
+extern int utc_media_packet_alloc_p(void);
+extern int utc_media_packet_alloc_n(void);
+extern int utc_media_packet_set_flags_p(void);
+extern int utc_media_packet_set_flags_n(void);
+extern int utc_media_packet_unset_flags_p(void);
+extern int utc_media_packet_unset_flags_n(void);
+extern int utc_media_packet_is_codec_config_p(void);
+extern int utc_media_packet_is_codec_config_n(void);
+extern int utc_media_packet_is_end_of_stream_p(void);
+extern int utc_media_packet_is_end_of_stream_n(void);
+extern int utc_media_packet_is_sync_frame_p(void);
+extern int utc_media_packet_is_sync_frame_n(void);
+extern int utc_media_packet_has_tbm_surface_buffer_p(void);
+extern int utc_media_packet_has_tbm_surface_buffer_n(void);
+extern int utc_media_packet_create_from_tbm_surface_p(void);
+extern int utc_media_packet_create_from_tbm_surface_n(void);
+extern int utc_media_packet_get_format_p(void);
+extern int utc_media_packet_get_format_n(void);
+extern int utc_media_packet_set_pts_p(void);
+extern int utc_media_packet_set_pts_n(void);
+extern int utc_media_packet_set_dts_p(void);
+extern int utc_media_packet_set_dts_n(void);
+extern int utc_media_packet_set_duration_p(void);
+extern int utc_media_packet_set_duration_n(void);
+extern int utc_media_packet_set_buffer_size_p(void);
+extern int utc_media_packet_set_buffer_size_n(void);
+extern int utc_media_packet_get_pts_p(void);
+extern int utc_media_packet_get_pts_n(void);
+extern int utc_media_packet_get_dts_p(void);
+extern int utc_media_packet_get_dts_n(void);
+extern int utc_media_packet_get_duration_p(void);
+extern int utc_media_packet_get_duration_n(void);
+extern int utc_media_packet_get_buffer_size_p(void);
+extern int utc_media_packet_get_buffer_size_n(void);
+extern int utc_media_packet_get_buffer_data_ptr_p(void);
+extern int utc_media_packet_get_buffer_data_ptr_n(void);
+extern int utc_media_packet_get_tbm_surface_p(void);
+extern int utc_media_packet_get_tbm_surface_n(void);
+extern int utc_media_packet_set_extra_p(void);
+extern int utc_media_packet_set_extra_n(void);
+extern int utc_media_packet_get_extra_p(void);
+extern int utc_media_packet_get_extra_n(void);
+extern int utc_media_packet_is_video_p(void);
+extern int utc_media_packet_is_video_n(void);
+extern int utc_media_packet_is_audio_p(void);
+extern int utc_media_packet_is_audio_n(void);
+extern int utc_media_packet_is_encoded_p(void);
+extern int utc_media_packet_is_encoded_n(void);
+extern int utc_media_packet_is_raw_p(void);
+extern int utc_media_packet_is_raw_n(void);
+extern int utc_media_packet_destroy_p(void);
+extern int utc_media_packet_destroy_n(void);
+extern int utc_media_format_create_p(void);
+extern int utc_media_format_create_n(void);
+extern int utc_media_format_get_video_info_p(void);
+extern int utc_media_format_get_video_info_n(void);
+extern int utc_media_format_get_audio_info_p(void);
+extern int utc_media_format_get_audio_info_n(void);
+extern int utc_media_format_set_video_mime_p(void);
+extern int utc_media_format_set_video_mime_n(void);
+extern int utc_media_format_set_video_width_p(void);
+extern int utc_media_format_set_video_width_n(void);
+extern int utc_media_format_set_video_height_p(void);
+extern int utc_media_format_set_video_height_n(void);
+extern int utc_media_format_set_video_avg_bps_p(void);
+extern int utc_media_format_set_video_avg_bps_n(void);
+extern int utc_media_format_set_video_max_bps_p(void);
+extern int utc_media_format_set_video_max_bps_n(void);
+extern int utc_media_format_set_audio_mime_p(void);
+extern int utc_media_format_set_audio_mime_n(void);
+extern int utc_media_format_set_audio_channel_p(void);
+extern int utc_media_format_set_audio_channel_n(void);
+extern int utc_media_format_set_audio_samplerate_p(void);
+extern int utc_media_format_set_audio_samplerate_n(void);
+extern int utc_media_format_set_audio_bit_p(void);
+extern int utc_media_format_set_audio_bit_n(void);
+extern int utc_media_format_set_audio_avg_bps_p(void);
+extern int utc_media_format_set_audio_avg_bps_n(void);
+extern int utc_media_format_ref_p(void);
+extern int utc_media_format_ref_n(void);
+extern int utc_media_format_unref_p(void);
+extern int utc_media_format_unref_n(void);
+extern int media_format_is_writable_p(void);
+extern int media_format_is_writable_n(void);
+extern int utc_media_format_make_writable_p(void);
+extern int utc_media_format_make_writable_n(void);
+
+testcase tc_array[] = {
+    {"utc_media_packet_create_alloc_p", utc_media_packet_create_alloc_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_create_alloc_n", utc_media_packet_create_alloc_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_create_p", utc_media_packet_create_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_create_n", utc_media_packet_create_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_copy_p", utc_media_packet_copy_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_copy_n", utc_media_packet_copy_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_format_p", utc_media_packet_set_format_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_format_n", utc_media_packet_set_format_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_alloc_p", utc_media_packet_alloc_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_alloc_n", utc_media_packet_alloc_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_flags_p", utc_media_packet_set_flags_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_flags_n", utc_media_packet_set_flags_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_unset_flags_p", utc_media_packet_unset_flags_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_unset_flags_n", utc_media_packet_unset_flags_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_codec_config_p", utc_media_packet_is_codec_config_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_codec_config_n", utc_media_packet_is_codec_config_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_end_of_stream_p", utc_media_packet_is_end_of_stream_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_end_of_stream_n", utc_media_packet_is_end_of_stream_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_sync_frame_p", utc_media_packet_is_sync_frame_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_sync_frame_n", utc_media_packet_is_sync_frame_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_has_tbm_surface_buffer_p", utc_media_packet_has_tbm_surface_buffer_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_has_tbm_surface_buffer_n", utc_media_packet_has_tbm_surface_buffer_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_create_from_tbm_surface_p", utc_media_packet_create_from_tbm_surface_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_create_from_tbm_surface_n", utc_media_packet_create_from_tbm_surface_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_format_p", utc_media_packet_get_format_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_format_n", utc_media_packet_get_format_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_pts_p", utc_media_packet_set_pts_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_pts_n", utc_media_packet_set_pts_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_dts_p", utc_media_packet_set_dts_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_dts_n", utc_media_packet_set_dts_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_duration_p", utc_media_packet_set_duration_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_duration_n", utc_media_packet_set_duration_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_buffer_size_p", utc_media_packet_set_buffer_size_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_buffer_size_n", utc_media_packet_set_buffer_size_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_pts_p", utc_media_packet_get_pts_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_pts_n", utc_media_packet_get_pts_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_dts_p", utc_media_packet_get_dts_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_dts_n", utc_media_packet_get_dts_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_duration_p", utc_media_packet_get_duration_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_duration_n", utc_media_packet_get_duration_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_buffer_size_p", utc_media_packet_get_buffer_size_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_buffer_size_n", utc_media_packet_get_buffer_size_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_buffer_data_ptr_p", utc_media_packet_get_buffer_data_ptr_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_buffer_data_ptr_n", utc_media_packet_get_buffer_data_ptr_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_tbm_surface_p", utc_media_packet_get_tbm_surface_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_tbm_surface_n", utc_media_packet_get_tbm_surface_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_extra_p", utc_media_packet_set_extra_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_set_extra_n", utc_media_packet_set_extra_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_extra_p", utc_media_packet_get_extra_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_get_extra_n", utc_media_packet_get_extra_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_video_p", utc_media_packet_is_video_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_video_n", utc_media_packet_is_video_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_audio_p", utc_media_packet_is_audio_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_audio_n", utc_media_packet_is_audio_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_encoded_p", utc_media_packet_is_encoded_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_encoded_n", utc_media_packet_is_encoded_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_raw_p", utc_media_packet_is_raw_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_is_raw_n", utc_media_packet_is_raw_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_destroy_p", utc_media_packet_destroy_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_packet_destroy_n", utc_media_packet_destroy_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_create_p", utc_media_format_create_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_create_n", utc_media_format_create_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_get_video_info_p", utc_media_format_get_video_info_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_get_video_info_n", utc_media_format_get_video_info_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_get_audio_info_p", utc_media_format_get_audio_info_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_get_audio_info_n", utc_media_format_get_audio_info_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_video_mime_p", utc_media_format_set_video_mime_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_video_mime_n", utc_media_format_set_video_mime_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_video_width_p", utc_media_format_set_video_width_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_video_width_n", utc_media_format_set_video_width_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_video_height_p", utc_media_format_set_video_height_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_video_height_n", utc_media_format_set_video_height_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_video_avg_bps_p", utc_media_format_set_video_avg_bps_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_video_avg_bps_n", utc_media_format_set_video_avg_bps_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_video_max_bps_p", utc_media_format_set_video_max_bps_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_video_max_bps_n", utc_media_format_set_video_max_bps_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_audio_mime_p", utc_media_format_set_audio_mime_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_audio_mime_n", utc_media_format_set_audio_mime_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_audio_channel_p", utc_media_format_set_audio_channel_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_audio_channel_n", utc_media_format_set_audio_channel_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_audio_samplerate_p", utc_media_format_set_audio_samplerate_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_audio_samplerate_n", utc_media_format_set_audio_samplerate_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_audio_bit_p", utc_media_format_set_audio_bit_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_audio_bit_n", utc_media_format_set_audio_bit_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_audio_avg_bps_p", utc_media_format_set_audio_avg_bps_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_set_audio_avg_bps_n", utc_media_format_set_audio_avg_bps_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_ref_p", utc_media_format_ref_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_ref_n", utc_media_format_ref_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_unref_p", utc_media_format_unref_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_unref_n", utc_media_format_unref_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"media_format_is_writable_p", media_format_is_writable_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"media_format_is_writable_n", media_format_is_writable_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_make_writable_p", utc_media_format_make_writable_p, utc_media_packet_startup, utc_media_packet_cleanup},
+    {"utc_media_format_make_writable_n", utc_media_format_make_writable_n, utc_media_packet_startup, utc_media_packet_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CAPI_MEDIA_TOOL_CORE_H__
diff --git a/src/utc/capi-media-tool/utc-capi-media-tool.c b/src/utc/capi-media-tool/utc-capi-media-tool.c
new file mode 100755 (executable)
index 0000000..21bf778
--- /dev/null
@@ -0,0 +1,1266 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "assert.h"
+#include <media/media_packet.h>
+#include <media/media_format.h>
+
+#include <tbm_surface.h>
+
+
+static media_format_h format = NULL;
+static media_format_h format2 = NULL;
+static media_format_h format_for_tbm = NULL;
+static media_packet_h packet;
+static media_packet_h packet2;
+static media_packet_h pkt_create;
+static media_packet_h pkt_create_alloc;
+
+static int finalizeCB_called = 0;
+
+void utc_media_packet_startup(void)
+{
+
+    if (media_format_create(&format) == MEDIA_FORMAT_ERROR_NONE)
+    {
+        int ret_video = MEDIA_FORMAT_ERROR_NONE;
+        ret_video = media_format_set_video_mime(format, MEDIA_FORMAT_H264_HP);
+        ret_video = media_format_set_video_width(format, 480);
+        ret_video = media_format_set_video_height(format, 640);
+        ret_video = media_format_set_video_avg_bps(format, 10000000);
+        ret_video = media_format_set_video_max_bps(format, 15000000);
+        if (ret_video != MEDIA_FORMAT_ERROR_NONE)
+        {
+
+            fprintf(stderr, "media_format_set_video_xxxx failed!");
+        }
+
+    }
+    else
+    {
+        fprintf(stderr, "media_format_create ,format failed!");
+    }
+
+    if (media_format_create(&format2) == MEDIA_FORMAT_ERROR_NONE)
+    {
+        int ret_audio = MEDIA_FORMAT_ERROR_NONE ;
+        ret_audio = media_format_set_audio_mime(format2, MEDIA_FORMAT_AMR);
+        ret_audio = media_format_set_audio_channel(format2, 2000);
+        ret_audio = media_format_set_audio_samplerate(format2, 20000);
+        ret_audio = media_format_set_audio_bit(format2, 200000);
+        ret_audio = media_format_set_audio_avg_bps(format2, 1000000);
+        if (ret_audio != MEDIA_FORMAT_ERROR_NONE)
+        {
+            fprintf(stderr, "media_format_set_audio_xxxx failed!");
+        }
+
+    }
+    else
+    {
+        fprintf(stderr, "media_format_create ,format failed!");
+    }
+
+
+    if (media_format_create(&format_for_tbm) == MEDIA_FORMAT_ERROR_NONE)
+    {
+        int ret_tbm = MEDIA_FORMAT_ERROR_NONE;
+        ret_tbm = media_format_set_video_mime(format_for_tbm, MEDIA_FORMAT_I420);
+        ret_tbm = media_format_set_video_width(format_for_tbm, 128);
+        ret_tbm = media_format_set_video_height(format_for_tbm, 128);
+        ret_tbm = media_format_set_video_avg_bps(format_for_tbm, 10000000);
+        ret_tbm = media_format_set_video_max_bps(format_for_tbm, 15000000);
+        if (ret_tbm != MEDIA_FORMAT_ERROR_NONE)
+        {
+            fprintf(stderr, "media_format_set_video_xxxx failed!");
+        }
+    }
+    else
+    {
+        fprintf(stderr, "media_format_create , format_for_tbm failed!");
+    }
+
+    if (media_packet_create(format, NULL, NULL, &pkt_create) != MEDIA_PACKET_ERROR_NONE)
+    {
+        fprintf(stderr, "media_packet_create , pkt_create failed!");
+    }
+    else
+    {
+        media_format_unref(format);
+    }
+
+
+    if (media_packet_create_alloc(format, NULL, NULL, &pkt_create_alloc) != MEDIA_PACKET_ERROR_NONE)
+    {
+        fprintf(stderr, "media_packet_create_alloc , pkt_create_alloc failed!");
+    }
+    else
+    {
+        media_format_unref(format);
+    }
+
+}
+
+void utc_media_packet_cleanup(void)
+{
+    if (format)
+        media_format_unref(format);
+    if (format2)
+        media_format_unref(format2);
+    if (format_for_tbm)
+        media_format_unref(format_for_tbm);
+}
+
+
+static int _finalize_callback(media_packet_h packet, int err, void * userdata)
+{
+    finalizeCB_called = 1;
+    return MEDIA_PACKET_FINALIZE;
+}
+
+int utc_media_packet_create_alloc_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_create_alloc(format, NULL, NULL, &packet);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+    if (ret == MEDIA_PACKET_ERROR_NONE)
+        media_packet_destroy(packet);
+
+    return 0;
+}
+
+int utc_media_packet_create_alloc_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_create_alloc(NULL, NULL, NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_create_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_create(format, NULL, NULL, &packet);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_create_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_create(NULL, NULL, NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_copy_p(void)
+{
+    int ret1 = MEDIA_PACKET_ERROR_NONE;
+    int ret2 = MEDIA_PACKET_ERROR_NONE;
+
+    ret1 = media_packet_create(format, NULL, NULL, &packet);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret1);
+
+    ret2 = media_packet_copy(packet, NULL, NULL, &packet2);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret2);
+
+    if(ret2 == MEDIA_PACKET_ERROR_NONE)
+        media_packet_destroy(packet2);
+
+    return 0;
+}
+
+int utc_media_packet_copy_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_copy(NULL, NULL, NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_format_p(void)
+{
+    int ret1 = MEDIA_PACKET_ERROR_NONE;
+    int ret2 = MEDIA_PACKET_ERROR_NONE;
+
+    media_format_h fmt;
+    if (media_format_create(&fmt) == MEDIA_FORMAT_ERROR_NONE)
+    {
+        int ret_video = MEDIA_FORMAT_ERROR_NONE;
+        ret_video = media_format_set_video_mime(fmt, MEDIA_FORMAT_H264_HP);
+        ret_video = media_format_set_video_width(fmt, 320);
+        ret_video = media_format_set_video_height(fmt, 240);
+        ret_video = media_format_set_video_avg_bps(fmt, 10000000);
+        ret_video = media_format_set_video_max_bps(fmt, 15000000);
+        if (ret_video != MEDIA_FORMAT_ERROR_NONE)
+        {
+            fprintf(stderr, "media_format_set_video_xxxx failed!");
+        }
+    }
+    else
+    {
+        fprintf(stderr, "media_format_create failed!");
+    }
+
+    ret1 = media_packet_create(format, NULL, NULL, &packet);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret1);
+
+    ret2 = media_packet_set_format(packet, fmt);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret2);
+
+    return 0;
+
+}
+
+int utc_media_packet_set_format_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_set_format(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+
+int utc_media_packet_alloc_p(void)
+{
+    int ret1 = MEDIA_PACKET_ERROR_NONE;
+    int ret2 = MEDIA_PACKET_ERROR_NONE;
+
+    ret1 = media_packet_create(format, NULL, NULL, &packet);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret1);
+
+    ret2 = media_packet_alloc(packet);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret2);
+
+    return 0;
+}
+
+int utc_media_packet_alloc_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_alloc(NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_flags_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    media_buffer_flags_e flag = MEDIA_PACKET_CODEC_CONFIG;
+
+    ret = media_packet_set_flags(pkt_create_alloc, flag);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_flags_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_set_flags(NULL, 0);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_unset_flags_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    media_buffer_flags_e flag = MEDIA_PACKET_CODEC_CONFIG;
+
+    ret = media_packet_unset_flags(pkt_create_alloc, flag);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_unset_flags_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_unset_flags(NULL, 0);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+int utc_media_packet_is_codec_config_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    bool is_codec_config;
+
+    ret = media_packet_is_codec_config(pkt_create_alloc, &is_codec_config);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert(!is_codec_config);
+
+    return 0;
+}
+
+int utc_media_packet_is_codec_config_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_is_codec_config(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_is_end_of_stream_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    bool is_eos;
+
+    ret = media_packet_is_end_of_stream(pkt_create_alloc, &is_eos);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert(!is_eos);
+
+    return 0;
+}
+
+int utc_media_packet_is_end_of_stream_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_is_end_of_stream(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_is_sync_frame_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    bool is_sync;
+
+    ret = media_packet_is_sync_frame(pkt_create_alloc, &is_sync);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert(!is_sync);
+
+    return 0;
+}
+
+int utc_media_packet_is_sync_frame_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_is_sync_frame(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_has_tbm_surface_buffer_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    bool has_tbm;
+
+    ret = media_packet_has_tbm_surface_buffer(pkt_create_alloc, &has_tbm);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert(!has_tbm);
+
+    return 0;
+}
+
+int utc_media_packet_has_tbm_surface_buffer_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_has_tbm_surface_buffer(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_create_from_tbm_surface_p(void)
+{
+
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    if (packet)
+        ret = media_packet_destroy(packet);
+
+    if (ret != MEDIA_PACKET_ERROR_NONE)
+        fprintf(stderr, "destory exsit packet handle failed..\n");
+
+    tbm_surface_h surface;
+    int width = 128;
+    int height = 128;
+    tbm_format tbm_fmt = TBM_FORMAT_YUV420;
+    surface = tbm_surface_create (width, height, tbm_fmt);
+
+    if (surface == NULL)
+        assert(false);
+
+    ret = media_packet_create_from_tbm_surface(format_for_tbm, surface, _finalize_callback, NULL, &packet);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_create_from_tbm_surface_n(void)
+{
+
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_create_from_tbm_surface(NULL, NULL, NULL,NULL, NULL);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+
+int utc_media_packet_get_format_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    media_format_h fmt;
+    int width;
+    ret = media_packet_get_format(pkt_create, &fmt);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    media_format_get_video_info(fmt, NULL, &width, NULL, NULL, NULL);
+    assert_eq(480, width);
+
+    return 0;
+}
+
+int utc_media_packet_get_format_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_get_format(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_pts_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    uint64_t pts = 1234567;
+
+    ret = media_packet_set_pts(pkt_create, pts);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_pts_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_set_pts(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_dts_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    uint64_t dts = 7654321;
+
+    ret = media_packet_set_dts(pkt_create, dts);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_dts_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_set_dts(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_duration_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    uint64_t duration = 5000000;
+
+    ret = media_packet_set_duration(pkt_create, duration);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_duration_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_set_duration(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_buffer_size_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    uint64_t size = 10000;
+
+    ret = media_packet_set_buffer_size(pkt_create_alloc, size);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_buffer_size_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_set_buffer_size(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_get_pts_p(void)
+{
+    int ret1 = MEDIA_PACKET_ERROR_NONE;
+    int ret2 = MEDIA_PACKET_ERROR_NONE;
+
+    uint64_t get_pts;
+    uint64_t pts = 1234567;
+
+    ret1 = media_packet_set_pts(pkt_create, pts);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret1);
+
+    ret2 = media_packet_get_pts(pkt_create, &get_pts);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret2);
+    assert_eq(1234567, get_pts);
+
+    return 0;
+}
+
+int utc_media_packet_get_pts_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_get_pts(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_get_dts_p(void)
+{
+    int ret1 = MEDIA_PACKET_ERROR_NONE;
+    int ret2 = MEDIA_PACKET_ERROR_NONE;
+    uint64_t get_dts;
+    uint64_t dts = 7654321;
+
+    ret1 = media_packet_set_dts(pkt_create, dts);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret1);
+
+    ret2 = media_packet_get_dts(pkt_create, &get_dts);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret2);
+    assert_eq(7654321, get_dts);
+
+    return 0;
+}
+
+int utc_media_packet_get_dts_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_get_dts(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_get_duration_p(void)
+{
+    int ret1 = MEDIA_PACKET_ERROR_NONE;
+    int ret2 = MEDIA_PACKET_ERROR_NONE;
+    uint64_t get_duration;
+    uint64_t duration = 5000000;
+
+    ret1 = media_packet_set_duration(pkt_create, duration);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret1);
+
+    ret2 = media_packet_get_duration(pkt_create, &get_duration);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret2);
+    assert_eq(5000000, duration);
+
+    return 0;
+}
+
+int utc_media_packet_get_duration_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_get_duration(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_get_buffer_size_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    uint64_t size;
+
+    ret = media_packet_get_buffer_size(pkt_create_alloc, &size);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_get_buffer_size_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_get_buffer_size(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_get_buffer_data_ptr_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    void* data;
+
+    ret = media_packet_get_buffer_data_ptr(pkt_create_alloc, &data);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    if (data == NULL)
+        assert(false);
+
+    return 0;
+}
+
+int utc_media_packet_get_buffer_data_ptr_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_get_buffer_data_ptr(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_get_tbm_surface_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    tbm_surface_h surface;
+
+    ret = media_packet_get_tbm_surface(pkt_create_alloc, &surface);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_get_tbm_surface_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_get_tbm_surface(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_extra_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    char* extra = "extra";
+
+    ret = media_packet_set_extra(pkt_create_alloc, (void*)extra);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_set_extra_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_set_extra(NULL, NULL);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_get_extra_p(void)
+{
+    int ret1 = MEDIA_PACKET_ERROR_NONE;
+    int ret2 = MEDIA_PACKET_ERROR_NONE;
+    void* get_extra;
+    char* extra = "extra";
+
+    ret1 = media_packet_set_extra(pkt_create_alloc, (void*)extra);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret1);
+
+    ret2 = media_packet_get_extra(pkt_create_alloc, &get_extra);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret2);
+
+    if (strcmp (extra, (char*)get_extra) != 0)
+        assert(false);
+
+    return 0;
+}
+
+int utc_media_packet_get_extra_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_get_extra(NULL, NULL);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+
+int utc_media_packet_is_video_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    bool is_video;
+
+    ret = media_packet_is_video(pkt_create_alloc, &is_video);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_is_video_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_is_video(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_is_audio_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    bool is_audio;
+
+    ret = media_packet_is_audio(pkt_create_alloc, &is_audio);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_is_audio_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_is_audio(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_is_encoded_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    bool is_enc;
+
+    ret = media_packet_is_encoded(pkt_create_alloc, &is_enc);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_is_encoded_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_is_encoded(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_is_raw_p(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+    bool is_raw;
+
+    ret = media_packet_is_raw(pkt_create_alloc, &is_raw);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_packet_is_raw_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_is_raw(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+    assert_eq(MEDIA_PACKET_ERROR_INVALID_PARAMETER, ret);
+
+    return 0;
+}
+
+int utc_media_packet_destroy_p(void)
+{
+    int ret1 = MEDIA_PACKET_ERROR_NONE;
+    int ret2 = MEDIA_PACKET_ERROR_NONE;
+
+    ret1 = media_packet_create_alloc(format, _finalize_callback, NULL, &packet);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret1);
+
+    ret2 = media_packet_destroy(packet);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret2);
+    assert_eq(1, finalizeCB_called);
+
+    return 0;
+}
+
+int utc_media_packet_destroy_n(void)
+{
+    int ret = MEDIA_PACKET_ERROR_NONE;
+
+    ret = media_packet_destroy(NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_format_create_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    media_format_h fmt;
+    ret = media_format_create(&fmt);
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_create_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_create(NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_get_video_info_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+    media_format_mimetype_e mime;
+    int w;
+    int h;
+    int avg_bps;
+    int max_bps;
+
+    ret = media_format_get_video_info(format, &mime, &w, &h, &avg_bps, &max_bps);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_get_video_info_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_get_video_info(NULL, NULL, NULL, NULL, NULL, NULL);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+
+int utc_media_format_get_audio_info_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+    media_format_mimetype_e mime;
+    int channel;
+    int samplerate;
+    int bit;
+    int avg_bps;
+
+    ret = media_format_get_audio_info(format2, &mime, &channel, &samplerate, &bit, &avg_bps);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_get_audio_info_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_get_audio_info(NULL, NULL, NULL, NULL, NULL, NULL);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_video_mime_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_video_mime(format, MEDIA_FORMAT_H264_HP);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_format_set_video_mime_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+    ret = media_format_set_video_mime(NULL, MEDIA_FORMAT_H264_HP);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_video_width_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_video_width(format, 320);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_format_set_video_width_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+    ret = media_format_set_video_width(NULL, 320);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_video_height_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_video_height(format, 240);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_format_set_video_height_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_video_height(NULL, 240);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_format_set_video_avg_bps_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_video_avg_bps(format, 200000);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_format_set_video_avg_bps_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_video_avg_bps(NULL, 200000);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_format_set_video_max_bps_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_video_max_bps(format, 1000000);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_format_set_video_max_bps_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_video_max_bps(NULL, 1000000);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_format_set_audio_mime_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_audio_mime(format2, MEDIA_FORMAT_PCM);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_audio_mime_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+    ret = media_format_set_audio_mime(NULL, MEDIA_FORMAT_PCM);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_audio_channel_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_audio_channel(format2, 4);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_audio_channel_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_audio_channel(NULL, 4);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_audio_samplerate_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_audio_samplerate(format2, 200);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_audio_samplerate_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_audio_samplerate(NULL, 200);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_audio_bit_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_audio_bit(format2, 2000);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_audio_bit_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_audio_bit(NULL, 2000);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_audio_avg_bps_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_audio_avg_bps(format2, 20000);
+
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_set_audio_avg_bps_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_set_audio_avg_bps(NULL, 20000);
+
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_ref_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_ref(format);
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_ref_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_ref(NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_unref_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_unref(format);
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_unref_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_unref(NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int media_format_is_writable_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+    bool writable;
+
+    ret = media_format_is_writable(format, &writable);
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int media_format_is_writable_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    ret = media_format_is_writable(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_make_writable_p(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+    media_format_h fmt;
+    ret = media_format_make_writable(format, &fmt);
+    assert_eq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+int utc_media_format_make_writable_n(void)
+{
+    int ret = MEDIA_FORMAT_ERROR_NONE;
+
+
+    ret = media_format_make_writable(NULL, NULL);
+    assert_neq(MEDIA_PACKET_ERROR_NONE,ret);
+
+    return 0;
+}
+
+
diff --git a/src/utc/capi-message-port/CMakeLists.txt b/src/utc/capi-message-port/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..2d46461
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "capi-message-port")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-message-port")
+SET(TC_SOURCES
+       utc-capi-message-port.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       gobject-2.0
+       glib-2.0
+       capi-appfw-application
+       capi-appfw-app-manager
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/capi-message-port/core-capi-message-port-tests.sh b/src/utc/capi-message-port/core-capi-message-port-tests.sh
new file mode 100755 (executable)
index 0000000..3e9c27e
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+( echo 3 ; sleep 1 ; echo cert ; sleep 1 ; echo 0 ) | pkginfo --setcert core-capi-message-port-tests
diff --git a/src/utc/capi-message-port/platform.list b/src/utc/capi-message-port/platform.list
new file mode 100755 (executable)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/src/utc/capi-message-port/product.list b/src/utc/capi-message-port/product.list
new file mode 100755 (executable)
index 0000000..88419af
--- /dev/null
@@ -0,0 +1,10 @@
+message_port_check_remote_port
+message_port_check_trusted_remote_port
+message_port_register_local_port
+message_port_register_trusted_local_port
+message_port_send_message
+message_port_send_message_with_local_port
+message_port_send_trusted_message
+message_port_send_trusted_message_with_local_port
+message_port_unregister_local_port
+message_port_unregister_trusted_local_port
diff --git a/src/utc/capi-message-port/public.list b/src/utc/capi-message-port/public.list
new file mode 100755 (executable)
index 0000000..2660017
--- /dev/null
@@ -0,0 +1,11 @@
+message_port_check_remote_port
+message_port_check_trusted_remote_port
+message_port_register_local_port
+message_port_register_trusted_local_port
+message_port_send_message
+message_port_send_message_with_local_port
+message_port_send_trusted_message
+message_port_send_trusted_message_with_local_port
+message_port_unregister_local_port
+message_port_unregister_trusted_local_port
+
diff --git a/src/utc/capi-message-port/res/org.tizen.messageportapp-1.0.0-arm.tpk b/src/utc/capi-message-port/res/org.tizen.messageportapp-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..891af00
Binary files /dev/null and b/src/utc/capi-message-port/res/org.tizen.messageportapp-1.0.0-arm.tpk differ
diff --git a/src/utc/capi-message-port/res/org.tizen.messageportapp-1.0.0-i386.tpk b/src/utc/capi-message-port/res/org.tizen.messageportapp-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..2633c15
Binary files /dev/null and b/src/utc/capi-message-port/res/org.tizen.messageportapp-1.0.0-i386.tpk differ
diff --git a/src/utc/capi-message-port/tct-capi-message-port-core.c b/src/utc/capi-message-port/tct-capi-message-port-core.c
new file mode 100755 (executable)
index 0000000..b5b9098
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-capi-message-port-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/capi-message-port/tct-capi-message-port-core.h b/src/utc/capi-message-port/tct-capi-message-port-core.h
new file mode 100755 (executable)
index 0000000..200781f
--- /dev/null
@@ -0,0 +1,109 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CAPI_MESSAGE_PORT_CORE_H__
+#define __TCT_CAPI_MESSAGE_PORT_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_capi_message_port_startup(void);
+extern void utc_capi_message_port_cleanup(void);
+
+extern int utc_capi_message_port_register_local_port_n01(void);
+extern int utc_capi_message_port_register_local_port_n02(void);
+extern int utc_capi_message_port_register_local_port_p01(void);
+extern int utc_capi_message_port_register_trusted_local_port_n01(void);
+extern int utc_capi_message_port_register_trusted_local_port_n02(void);
+extern int utc_capi_message_port_register_trusted_local_port_p01(void);
+extern int utc_capi_message_port_unregister_local_port_n01(void);
+extern int utc_capi_message_port_unregister_local_port_n02(void);
+extern int utc_capi_message_port_unregister_local_port_p01(void);
+extern int utc_capi_message_port_unregister_trusted_local_port_n01(void);
+extern int utc_capi_message_port_unregister_trusted_local_port_n02(void);
+extern int utc_capi_message_port_unregister_trusted_local_port_p01(void);
+extern int utc_capi_message_port_check_remote_port_p01(void);
+extern int utc_capi_message_port_check_remote_port_p02(void);
+extern int utc_capi_message_port_check_remote_port_n01(void);
+extern int utc_capi_message_port_check_remote_port_n02(void);
+extern int utc_capi_message_port_check_trusted_remote_port_p01(void);
+extern int utc_capi_message_port_check_trusted_remote_port_p02(void);
+extern int utc_capi_message_port_check_trusted_remote_port_n01(void);
+extern int utc_capi_message_port_check_trusted_remote_port_n02(void);
+extern int utc_capi_message_port_send_message_p01(void);
+extern int utc_capi_message_port_send_message_n01(void);
+extern int utc_capi_message_port_send_message_n02(void);
+extern int utc_capi_message_port_send_message_n03(void);
+extern int utc_capi_message_port_send_trusted_message_p01(void);
+extern int utc_capi_message_port_send_trusted_message_n01(void);
+extern int utc_capi_message_port_send_trusted_message_n02(void);
+extern int utc_capi_message_port_send_trusted_message_n03(void);
+extern int utc_capi_message_port_send_message_with_local_port_p01(void);
+extern int utc_capi_message_port_send_message_with_local_port_n01(void);
+extern int utc_capi_message_port_send_message_with_local_port_n02(void);
+extern int utc_capi_message_port_send_message_with_local_port_n03(void);
+extern int utc_capi_message_port_send_message_with_local_port_n04(void);
+extern int utc_capi_message_port_send_message_with_local_port_n05(void);
+extern int utc_capi_message_port_send_trusted_message_with_local_port_p01(void);
+extern int utc_capi_message_port_send_trusted_message_with_local_port_n01(void);
+extern int utc_capi_message_port_send_trusted_message_with_local_port_n02(void);
+extern int utc_capi_message_port_send_trusted_message_with_local_port_n03(void);
+extern int utc_capi_message_port_send_trusted_message_with_local_port_n04(void);
+extern int utc_capi_message_port_send_trusted_message_with_local_port_n05(void);
+
+testcase tc_array[] = {
+    {"utc_capi_message_port_register_local_port_n01", utc_capi_message_port_register_local_port_n01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_register_local_port_n02", utc_capi_message_port_register_local_port_n02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_register_local_port_p01", utc_capi_message_port_register_local_port_p01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_register_trusted_local_port_n01", utc_capi_message_port_register_trusted_local_port_n01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_register_trusted_local_port_n02", utc_capi_message_port_register_trusted_local_port_n02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_register_trusted_local_port_p01", utc_capi_message_port_register_trusted_local_port_p01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_unregister_local_port_n01", utc_capi_message_port_unregister_local_port_n01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_unregister_local_port_n02", utc_capi_message_port_unregister_local_port_n02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_unregister_local_port_p01", utc_capi_message_port_unregister_local_port_p01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_unregister_trusted_local_port_n01", utc_capi_message_port_unregister_trusted_local_port_n01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_unregister_trusted_local_port_n02", utc_capi_message_port_unregister_trusted_local_port_n02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_unregister_trusted_local_port_p01", utc_capi_message_port_unregister_trusted_local_port_p01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_check_remote_port_p01", utc_capi_message_port_check_remote_port_p01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_check_remote_port_p02", utc_capi_message_port_check_remote_port_p02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_check_remote_port_n01", utc_capi_message_port_check_remote_port_n01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_check_remote_port_n02", utc_capi_message_port_check_remote_port_n02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_check_trusted_remote_port_p01", utc_capi_message_port_check_trusted_remote_port_p01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_check_trusted_remote_port_p02", utc_capi_message_port_check_trusted_remote_port_p02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_check_trusted_remote_port_n01", utc_capi_message_port_check_trusted_remote_port_n01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_check_trusted_remote_port_n02", utc_capi_message_port_check_trusted_remote_port_n02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_message_p01", utc_capi_message_port_send_message_p01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_message_n01", utc_capi_message_port_send_message_n01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_message_n02", utc_capi_message_port_send_message_n02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_message_n03", utc_capi_message_port_send_message_n03, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_trusted_message_p01", utc_capi_message_port_send_trusted_message_p01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_trusted_message_n01", utc_capi_message_port_send_trusted_message_n01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_trusted_message_n02", utc_capi_message_port_send_trusted_message_n02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_trusted_message_n03", utc_capi_message_port_send_trusted_message_n03, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_message_with_local_port_p01", utc_capi_message_port_send_message_with_local_port_p01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_message_with_local_port_n01", utc_capi_message_port_send_message_with_local_port_n01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_message_with_local_port_n02", utc_capi_message_port_send_message_with_local_port_n02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_message_with_local_port_n03", utc_capi_message_port_send_message_with_local_port_n03, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_message_with_local_port_n04", utc_capi_message_port_send_message_with_local_port_n04, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_message_with_local_port_n05", utc_capi_message_port_send_message_with_local_port_n05, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_trusted_message_with_local_port_p01", utc_capi_message_port_send_trusted_message_with_local_port_p01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_trusted_message_with_local_port_n01", utc_capi_message_port_send_trusted_message_with_local_port_n01, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_trusted_message_with_local_port_n02", utc_capi_message_port_send_trusted_message_with_local_port_n02, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_trusted_message_with_local_port_n03", utc_capi_message_port_send_trusted_message_with_local_port_n03, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_trusted_message_with_local_port_n04", utc_capi_message_port_send_trusted_message_with_local_port_n04, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {"utc_capi_message_port_send_trusted_message_with_local_port_n05", utc_capi_message_port_send_trusted_message_with_local_port_n05, utc_capi_message_port_startup, utc_capi_message_port_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CAPI_MESSAGE_PORT_CORE_H__
diff --git a/src/utc/capi-message-port/utc-capi-message-port.c b/src/utc/capi-message-port/utc-capi-message-port.c
new file mode 100755 (executable)
index 0000000..98e6002
--- /dev/null
@@ -0,0 +1,560 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <message_port.h>
+#include <stdlib.h>
+#include <app.h>
+#include <app_manager.h>
+#define MAX_COUNTER 30
+
+//& set: CapiMessage-port
+
+static const int __local_port_id = 1;
+static const char __local_port[] = "my_test_local_port";
+static const char __remote_port[] = "my_test_remote_port";
+static const char __remote_app_id[] = "org.tizen.messageportapp";
+static bundle* __bundle = NULL;
+
+static const int __negative_local_port_id = -1;
+static const int __invalid_local_port_id = 2147483647;
+static app_control_h __g_app_control_handler;
+
+
+void utc_capi_message_port_startup(void)
+{
+
+       g_type_init();
+       bool is_running = false;
+       int counter = MAX_COUNTER;
+       int ret = app_control_create(&__g_app_control_handler);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       ret = app_control_set_app_id(__g_app_control_handler , __remote_app_id);
+       assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+       do {
+
+               ret = app_manager_is_running(__remote_app_id, &is_running);
+               if(ret == APP_MANAGER_ERROR_NONE)
+               {
+                       if (!is_running) {
+                               ret = app_control_send_launch_request(__g_app_control_handler , NULL , NULL);
+                               if ( ret != APP_CONTROL_ERROR_NONE )
+                               {
+                                       sleep(1);
+                               }
+                       }
+               }
+
+       } while (--counter > 0 && !is_running);
+
+       sleep(3);
+       __bundle = bundle_create();
+}
+
+void utc_capi_message_port_cleanup(void)
+{
+       bundle_free(__bundle);
+}
+
+void __message_port_cb(int local_port_id, const char *remote_app_id,
+        const char *remote_port, bool trusted_remote_port, bundle *message, void *user_data)
+{
+}
+
+int utc_capi_message_port_register_local_port_n01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_register_local_port(__local_port, NULL, NULL);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_register_local_port_n02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_register_local_port(NULL, __message_port_cb, NULL);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_register_local_port_p01(void)
+{
+    int port_id = 0;
+
+    port_id = message_port_register_local_port(__local_port, __message_port_cb, NULL);
+    assert_gt(port_id, 0);
+
+    message_port_unregister_local_port(port_id);
+
+    return 0;
+}
+
+int utc_capi_message_port_register_trusted_local_port_n01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_register_trusted_local_port(__local_port, NULL, NULL);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_register_trusted_local_port_n02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_register_trusted_local_port(NULL, __message_port_cb, NULL);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_register_trusted_local_port_p01(void)
+{
+    int port_id = 0;
+
+    port_id = message_port_register_trusted_local_port(__local_port, __message_port_cb, NULL);
+    assert_gt(port_id, 0);
+
+    message_port_unregister_trusted_local_port(port_id);
+
+    return 0;
+
+}
+
+int utc_capi_message_port_unregister_local_port_n01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+       res = message_port_unregister_local_port(__negative_local_port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_unregister_local_port_n02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+       res = message_port_unregister_local_port(__invalid_local_port_id);
+       assert_neq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_capi_message_port_unregister_local_port_p01(void)
+{
+    int res = MESSAGE_PORT_ERROR_NONE;
+    int port_id = 0;
+
+    port_id = message_port_register_local_port(__local_port,
+            __message_port_cb, NULL);
+    assert_gt(port_id, 0);
+
+    res = message_port_unregister_local_port(port_id);
+    assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_message_port_unregister_trusted_local_port_n01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+       res = message_port_unregister_trusted_local_port(__negative_local_port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_unregister_trusted_local_port_n02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+       res = message_port_unregister_trusted_local_port(__invalid_local_port_id);
+       assert_neq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_capi_message_port_unregister_trusted_local_port_p01(void)
+{
+    int res = MESSAGE_PORT_ERROR_NONE;
+    int port_id = 0;
+
+    port_id = message_port_register_trusted_local_port(__local_port,
+            __message_port_cb, NULL);
+    assert_gt(port_id, 0);
+
+    res = message_port_unregister_trusted_local_port(port_id);
+    assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_capi_message_port_check_remote_port_p01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+
+       res = message_port_check_remote_port(__remote_app_id, __remote_port, &exist);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_capi_message_port_check_remote_port_p02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+       int port_id = 0;
+
+       port_id = message_port_register_local_port(__remote_port, __message_port_cb, NULL);
+       assert_gt(port_id, 0);
+
+       res = message_port_check_remote_port(__remote_app_id, __remote_port, &exist);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+       assert_eq(exist, true);
+
+       message_port_unregister_local_port(port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_capi_message_port_check_remote_port_n01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+
+    res = message_port_check_remote_port(__remote_app_id, NULL, &exist);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_check_remote_port_n02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+
+    res = message_port_check_remote_port(NULL, __remote_port, &exist);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_check_trusted_remote_port_p01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+
+       res = message_port_check_trusted_remote_port(__remote_app_id, __remote_port, &exist);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_capi_message_port_check_trusted_remote_port_p02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+       int port_id = 0;
+
+       port_id = message_port_register_trusted_local_port(__remote_port, __message_port_cb, NULL);
+       assert_gt(port_id, 0);
+
+       res = message_port_check_trusted_remote_port(__remote_app_id, __remote_port, &exist);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+       assert_eq(exist, true);
+
+       message_port_unregister_trusted_local_port(port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_capi_message_port_check_trusted_remote_port_n01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+
+    res = message_port_check_trusted_remote_port(__remote_app_id, NULL, &exist);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_check_trusted_remote_port_n02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+
+    res = message_port_check_trusted_remote_port(NULL, __remote_port, &exist);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_message_p01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+       int port_id = 0;
+
+       port_id = message_port_register_local_port(__remote_port, __message_port_cb, NULL);
+       assert_gt(port_id, 0);
+
+       res = message_port_check_remote_port(__remote_app_id, __remote_port, &exist);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       res = message_port_send_message(__remote_app_id, __remote_port, __bundle);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       message_port_unregister_local_port(port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_message_n01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_message(__remote_app_id, __remote_port, NULL);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_message_n02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_message(__remote_app_id, NULL, __bundle);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_message_n03(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_message(NULL, __remote_port, __bundle);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_trusted_message_p01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+       int port_id = 0;
+
+       port_id = message_port_register_trusted_local_port(__remote_port, __message_port_cb, NULL);
+       assert_gt(port_id, 0);
+
+       res = message_port_check_trusted_remote_port(__remote_app_id, __remote_port, &exist);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       res = message_port_send_trusted_message(__remote_app_id, __remote_port, __bundle);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       message_port_unregister_trusted_local_port(port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_trusted_message_n01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_trusted_message(__remote_app_id, __remote_port, NULL);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_trusted_message_n02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_trusted_message(__remote_app_id, NULL, __bundle);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_trusted_message_n03(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_trusted_message(NULL, __remote_port, __bundle);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_message_with_local_port_p01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+       int port_id = 0;
+
+       port_id = message_port_register_local_port(__remote_port, __message_port_cb, NULL);
+       assert_gt(port_id, 0);
+
+       res = message_port_check_remote_port(__remote_app_id, __remote_port, &exist);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       res = message_port_send_message_with_local_port(__remote_app_id, __remote_port, __bundle, __local_port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       message_port_unregister_local_port(port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_message_with_local_port_n01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_message_with_local_port(__remote_app_id, __remote_port, NULL, __local_port_id);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_message_with_local_port_n02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_message_with_local_port(__remote_app_id, NULL, __bundle, __local_port_id);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_message_with_local_port_n03(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_message_with_local_port(NULL, __remote_port, __bundle, __local_port_id);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_message_with_local_port_n04(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+       res = message_port_send_message_with_local_port(__remote_app_id, __remote_port, __bundle, __negative_local_port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_message_with_local_port_n05(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+       res = message_port_send_message_with_local_port(__remote_app_id, __remote_port, __bundle, __invalid_local_port_id);
+       assert_neq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_trusted_message_with_local_port_p01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+       bool exist = false;
+       int port_id = 0;
+
+       port_id = message_port_register_trusted_local_port(__remote_port, __message_port_cb, NULL);
+       assert_gt(port_id, 0);
+
+       res = message_port_check_trusted_remote_port(__remote_app_id, __remote_port, &exist);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       res = message_port_send_trusted_message_with_local_port(__remote_app_id, __remote_port, __bundle, __local_port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       message_port_unregister_trusted_local_port(port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_trusted_message_with_local_port_n01(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_trusted_message_with_local_port(__remote_app_id, __remote_port, NULL, __local_port_id);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_trusted_message_with_local_port_n02(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_trusted_message_with_local_port(__remote_app_id, NULL, __bundle, __local_port_id);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_trusted_message_with_local_port_n03(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+    res = message_port_send_trusted_message_with_local_port(NULL, __remote_port, __bundle, __local_port_id);
+    assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_trusted_message_with_local_port_n04(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+       res = message_port_send_trusted_message_with_local_port(__remote_app_id, __remote_port, __bundle, __negative_local_port_id);
+       assert_eq(res, MESSAGE_PORT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_capi_message_port_send_trusted_message_with_local_port_n05(void)
+{
+       int res = MESSAGE_PORT_ERROR_NONE;
+
+       res = message_port_send_trusted_message_with_local_port(__remote_app_id, __remote_port, __bundle, __invalid_local_port_id);
+       assert_neq(res, MESSAGE_PORT_ERROR_NONE);
+
+       return 0;
+}
+
diff --git a/src/utc/connection/CMakeLists.txt b/src/utc/connection/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..836b616
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "connection")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-network-connection")
+SET(TC_SOURCES
+       utc-network-connection.c
+       utc-connection-profile.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-network-wifi
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/connection/platform.list b/src/utc/connection/platform.list
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/src/utc/connection/product.list b/src/utc/connection/product.list
new file mode 100755 (executable)
index 0000000..107d95d
--- /dev/null
@@ -0,0 +1,2 @@
+connection_profile_get_cellular_subscriber_id
+connection_profile_set_cellular_subscriber_id
diff --git a/src/utc/connection/public.list b/src/utc/connection/public.list
new file mode 100755 (executable)
index 0000000..6def835
--- /dev/null
@@ -0,0 +1,82 @@
+connection_add_profile
+connection_add_route
+connection_add_route_ipv6
+connection_close_profile
+connection_create
+connection_destroy
+connection_destroy_profile_iterator
+connection_get_bt_state
+connection_get_cellular_state
+connection_get_current_profile
+connection_get_default_cellular_service_profile
+connection_get_ip_address
+connection_get_profile_iterator
+connection_get_proxy
+connection_get_statistics
+connection_get_type
+connection_get_wifi_state
+connection_open_profile
+connection_profile_clone
+connection_profile_create
+connection_profile_destroy
+connection_profile_get_cellular_apn
+connection_profile_get_cellular_auth_info
+connection_profile_get_cellular_home_url
+connection_profile_get_cellular_service_type
+connection_profile_get_dns_address
+connection_profile_get_gateway_address
+connection_profile_get_id
+connection_profile_get_ip_address
+connection_profile_get_ip_config_type
+connection_profile_get_name
+connection_profile_get_network_interface_name
+connection_profile_get_proxy_address
+connection_profile_get_proxy_type
+connection_profile_get_state
+connection_profile_get_subnet_mask
+connection_profile_get_type
+connection_profile_get_wifi_bssid
+connection_profile_get_wifi_encryption_type
+connection_profile_get_wifi_essid
+connection_profile_get_wifi_frequency
+connection_profile_get_wifi_max_speed
+connection_profile_get_wifi_rssi
+connection_profile_get_wifi_security_type
+connection_profile_is_cellular_editable
+connection_profile_is_cellular_default
+connection_profile_is_cellular_hidden
+connection_profile_is_cellular_roaming
+connection_profile_is_wifi_passphrase_required
+connection_profile_is_wifi_wps_supported
+connection_profile_iterator_has_next
+connection_profile_iterator_next
+connection_profile_refresh
+connection_profile_set_cellular_apn
+connection_profile_set_cellular_auth_info
+connection_profile_set_cellular_home_url
+connection_profile_set_cellular_service_type
+connection_profile_set_dns_address
+connection_profile_set_gateway_address
+connection_profile_set_ip_address
+connection_profile_set_ip_config_type
+connection_profile_set_proxy_address
+connection_profile_set_proxy_type
+connection_profile_set_state_changed_cb
+connection_profile_set_subnet_mask
+connection_profile_set_wifi_passphrase
+connection_profile_unset_state_changed_cb
+connection_remove_profile
+connection_remove_route
+connection_remove_route_ipv6
+connection_reset_profile
+connection_reset_statistics
+connection_set_default_cellular_service_profile
+connection_set_default_cellular_service_profile_async
+connection_set_ip_address_changed_cb
+connection_set_proxy_address_changed_cb
+connection_set_type_changed_cb
+connection_unset_ip_address_changed_cb
+connection_unset_proxy_address_changed_cb
+connection_unset_type_changed_cb
+connection_update_profile
+
diff --git a/src/utc/connection/tct-connection-core.c b/src/utc/connection/tct-connection-core.c
new file mode 100755 (executable)
index 0000000..50de0b8
--- /dev/null
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-connection-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup ) 
+                       tc_array[i].startup();
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name); 
+                       if ( tc_array[i].cleanup )
+                       tc_array[i].cleanup();
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/connection/tct-connection-core.h b/src/utc/connection/tct-connection-core.h
new file mode 100755 (executable)
index 0000000..525c5ea
--- /dev/null
@@ -0,0 +1,355 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CONNECTION_CORE_H__
+#define __TCT_CONNECTION_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_network_connection_startup(void);
+extern void utc_network_connection_cleanup(void);
+extern void utc_connection_profile_startup(void);
+extern void utc_connection_profile_cleanup(void);
+
+extern int utc_connection_create_p(void);
+extern int utc_connection_create_n(void);
+extern int utc_connection_get_ip_address_p(void);
+extern int utc_connection_get_ip_address_n(void);
+extern int utc_connection_get_proxy_p(void);
+extern int utc_connection_get_proxy_n(void);
+extern int utc_connection_get_type_n(void);
+extern int utc_connection_get_type_p(void);
+extern int utc_connection_get_cellular_state_n(void);
+extern int utc_connection_get_cellular_state_p(void);
+extern int utc_connection_get_wifi_state_n(void);
+extern int utc_connection_get_wifi_state_p(void);
+extern int utc_connection_get_bt_state_n(void);
+extern int utc_connection_get_bt_state_p(void);
+extern int utc_connection_get_current_profile_p(void);
+extern int utc_connection_get_current_profile_n(void);
+extern int utc_connection_get_default_cellular_service_profile_p(void);
+extern int utc_connection_get_default_cellular_service_profile_n(void);
+extern int utc_connection_set_default_cellular_service_profile_p(void);
+extern int utc_connection_set_default_cellular_service_profile_n(void);
+extern int utc_connection_set_default_cellular_service_profile_async_p(void);
+extern int utc_connection_set_default_cellular_service_profile_async_n(void);
+extern int utc_connection_set_type_changed_cb_n(void);
+extern int utc_connection_set_type_changed_cb_p(void);
+extern int utc_connection_unset_type_changed_cb_n(void);
+extern int utc_connection_unset_type_changed_cb_p(void);
+extern int utc_connection_set_ip_address_changed_cb_n(void);
+extern int utc_connection_set_ip_address_changed_cb_p(void);
+extern int utc_connection_unset_ip_address_changed_cb_n(void);
+extern int utc_connection_unset_ip_address_changed_cb_p(void);
+extern int utc_connection_set_proxy_address_changed_cb_n(void);
+extern int utc_connection_set_proxy_address_changed_cb_p(void);
+extern int utc_connection_unset_proxy_address_changed_cb_n(void);
+extern int utc_connection_unset_proxy_address_changed_cb_p(void);
+extern int utc_connection_get_statistics_p(void);
+extern int utc_connection_get_statistics_n(void);
+extern int utc_connection_reset_statistics_p(void);
+extern int utc_connection_reset_statistics_n(void);
+extern int utc_connection_add_route_n(void);
+extern int utc_connection_add_route_p(void);
+extern int utc_connection_remove_route_n(void);
+extern int utc_connection_remove_route_p(void);
+extern int utc_connection_add_route_ipv6_n(void);
+extern int utc_connection_add_route_ipv6_p(void);
+extern int utc_connection_remove_route_ipv6_n(void);
+extern int utc_connection_remove_route_ipv6_p(void);
+extern int utc_connection_get_profile_iterator_n(void);
+extern int utc_connection_get_profile_iterator_p(void);
+extern int utc_connection_destroy_profile_iterator_n(void);
+extern int utc_connection_destroy_profile_iterator_p(void);
+extern int utc_connection_profile_iterator_has_next_n(void);
+extern int utc_connection_profile_iterator_has_next_p(void);
+extern int utc_connection_profile_iterator_next_n(void);
+extern int utc_connection_profile_iterator_next_p(void);
+extern int utc_connection_add_profile_p(void);
+extern int utc_connection_add_profile_n(void);
+extern int utc_connection_remove_profile_p(void);
+extern int utc_connection_remove_profile_n(void);
+extern int utc_connection_update_profile_p(void);
+extern int utc_connection_update_profile_n(void);
+extern int utc_connection_open_profile_p(void);
+extern int utc_connection_open_profile_n(void);
+extern int utc_connection_close_profile_p(void);
+extern int utc_connection_close_profile_n(void);
+extern int utc_connection_reset_profile_p(void);
+extern int utc_connection_reset_profile_n(void);
+extern int utc_connection_destroy_p(void);
+extern int utc_connection_destroy_n(void);
+extern int utc_connection_profile_create_p(void);
+extern int utc_connection_profile_create_n(void);
+extern int utc_connection_profile_clone_p(void);
+extern int utc_connection_profile_clone_n(void);
+extern int utc_connection_profile_get_name_p(void);
+extern int utc_connection_profile_get_name_n(void);
+extern int utc_connection_profile_get_id_p(void);
+extern int utc_connection_profile_get_id_n(void);
+extern int utc_connection_profile_get_type_p(void);
+extern int utc_connection_profile_get_type_n(void);
+extern int utc_connection_profile_get_network_interface_name_p(void);
+extern int utc_connection_profile_get_network_interface_name_n(void);
+extern int utc_connection_profile_get_state_p(void);
+extern int utc_connection_profile_get_state_n(void);
+extern int utc_connection_profile_get_ip_config_type_p(void);
+extern int utc_connection_profile_get_ip_config_type_n(void);
+extern int utc_connection_profile_get_ip_address_p(void);
+extern int utc_connection_profile_get_ip_address_n(void);
+extern int utc_connection_profile_get_subnet_mask_p(void);
+extern int utc_connection_profile_get_subnet_mask_n(void);
+extern int utc_connection_profile_get_gateway_address_p(void);
+extern int utc_connection_profile_get_gateway_address_n(void);
+extern int utc_connection_profile_get_dns_address_p(void);
+extern int utc_connection_profile_get_dns_address_n(void);
+extern int utc_connection_profile_get_proxy_type_p(void);
+extern int utc_connection_profile_get_proxy_type_n(void);
+extern int utc_connection_profile_get_proxy_address_p(void);
+extern int utc_connection_profile_get_proxy_address_n(void);
+extern int utc_connection_profile_set_ip_config_type_p(void);
+extern int utc_connection_profile_set_ip_config_type_n(void);
+extern int utc_connection_profile_set_ip_address_p(void);
+extern int utc_connection_profile_set_ip_address_n(void);
+extern int utc_connection_profile_set_subnet_mask_p(void);
+extern int utc_connection_profile_set_subnet_mask_n(void);
+extern int utc_connection_profile_set_gateway_address_p(void);
+extern int utc_connection_profile_set_gateway_address_n(void);
+extern int utc_connection_profile_set_dns_address_p(void);
+extern int utc_connection_profile_set_dns_address_n(void);
+extern int utc_connection_profile_set_proxy_type_p(void);
+extern int utc_connection_profile_set_proxy_type_n(void);
+extern int utc_connection_profile_set_proxy_address_p(void);
+extern int utc_connection_profile_set_proxy_address_n(void);
+extern int utc_connection_profile_set_state_changed_cb_p(void);
+extern int utc_connection_profile_set_state_changed_cb_n(void);
+extern int utc_connection_profile_unset_state_changed_cb_p(void);
+extern int utc_connection_profile_unset_state_changed_cb_n(void);
+extern int utc_connection_profile_set_cellular_service_type_p(void);
+extern int utc_connection_profile_set_cellular_service_type_n(void);
+extern int utc_connection_profile_set_cellular_apn_p(void);
+extern int utc_connection_profile_set_cellular_apn_n(void);
+extern int utc_connection_profile_set_cellular_auth_info_p(void);
+extern int utc_connection_profile_set_cellular_auth_info_n(void);
+extern int utc_connection_profile_set_cellular_home_url_p(void);
+extern int utc_connection_profile_set_cellular_home_url_n(void);
+extern int utc_connection_profile_get_cellular_service_type_p(void);
+extern int utc_connection_profile_get_cellular_service_type_n(void);
+extern int utc_connection_profile_get_cellular_apn_p(void);
+extern int utc_connection_profile_get_cellular_apn_n(void);
+extern int utc_connection_profile_get_cellular_auth_info_p(void);
+extern int utc_connection_profile_get_cellular_auth_info_n(void);
+extern int utc_connection_profile_get_cellular_home_url_p(void);
+extern int utc_connection_profile_get_cellular_home_url_n(void);
+extern int utc_connection_profile_is_cellular_roaming_p(void);
+extern int utc_connection_profile_is_cellular_roaming_n(void);
+extern int utc_connection_profile_is_cellular_hidden_p(void);
+extern int utc_connection_profile_is_cellular_hidden_n(void);
+extern int utc_connection_profile_is_cellular_editable_p(void);
+extern int utc_connection_profile_is_cellular_editable_n(void);
+extern int utc_connection_profile_is_cellular_default_p(void);
+extern int utc_connection_profile_is_cellular_default_n(void);
+extern int utc_connection_profile_refresh_p(void);
+extern int utc_connection_profile_refresh_n(void);
+extern int utc_connection_profile_get_wifi_essid_p(void);
+extern int utc_connection_profile_get_wifi_essid_n(void);
+extern int utc_connection_profile_get_wifi_bssid_p(void);
+extern int utc_connection_profile_get_wifi_bssid_n(void);
+extern int utc_connection_profile_get_wifi_rssi_p(void);
+extern int utc_connection_profile_get_wifi_rssi_n(void);
+extern int utc_connection_profile_get_wifi_frequency_p(void);
+extern int utc_connection_profile_get_wifi_frequency_n(void);
+extern int utc_connection_profile_get_wifi_max_speed_p(void);
+extern int utc_connection_profile_get_wifi_max_speed_n(void);
+extern int utc_connection_profile_get_wifi_security_type_p(void);
+extern int utc_connection_profile_get_wifi_security_type_n(void);
+extern int utc_connection_profile_get_wifi_encryption_type_p(void);
+extern int utc_connection_profile_get_wifi_encryption_type_n(void);
+extern int utc_connection_profile_is_wifi_passphrase_required_p(void);
+extern int utc_connection_profile_is_wifi_passphrase_required_n(void);
+extern int utc_connection_profile_set_wifi_passphrase_p(void);
+extern int utc_connection_profile_set_wifi_passphrase_n(void);
+extern int utc_connection_profile_is_wifi_wps_supported_p(void);
+extern int utc_connection_profile_is_wifi_wps_supported_n(void);
+extern int utc_connection_profile_destroy_p(void);
+extern int utc_connection_profile_destroy_n(void);
+
+testcase tc_array[] = {
+    {"utc_connection_create_p", utc_connection_create_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_create_n", utc_connection_create_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_ip_address_p", utc_connection_get_ip_address_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_ip_address_n", utc_connection_get_ip_address_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_proxy_p", utc_connection_get_proxy_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_proxy_n", utc_connection_get_proxy_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_type_n", utc_connection_get_type_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_type_p", utc_connection_get_type_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_cellular_state_n", utc_connection_get_cellular_state_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_cellular_state_p", utc_connection_get_cellular_state_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_wifi_state_n", utc_connection_get_wifi_state_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_wifi_state_p", utc_connection_get_wifi_state_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_bt_state_n", utc_connection_get_bt_state_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_bt_state_p", utc_connection_get_bt_state_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_current_profile_p", utc_connection_get_current_profile_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_current_profile_n", utc_connection_get_current_profile_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_default_cellular_service_profile_p", utc_connection_get_default_cellular_service_profile_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_default_cellular_service_profile_n", utc_connection_get_default_cellular_service_profile_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_set_default_cellular_service_profile_p", utc_connection_set_default_cellular_service_profile_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_set_default_cellular_service_profile_n", utc_connection_set_default_cellular_service_profile_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_set_default_cellular_service_profile_async_p", utc_connection_set_default_cellular_service_profile_async_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_set_default_cellular_service_profile_async_n", utc_connection_set_default_cellular_service_profile_async_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_set_type_changed_cb_n", utc_connection_set_type_changed_cb_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_set_type_changed_cb_p", utc_connection_set_type_changed_cb_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_unset_type_changed_cb_n", utc_connection_unset_type_changed_cb_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_unset_type_changed_cb_p", utc_connection_unset_type_changed_cb_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_set_ip_address_changed_cb_n", utc_connection_set_ip_address_changed_cb_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_set_ip_address_changed_cb_p", utc_connection_set_ip_address_changed_cb_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_unset_ip_address_changed_cb_n", utc_connection_unset_ip_address_changed_cb_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_unset_ip_address_changed_cb_p", utc_connection_unset_ip_address_changed_cb_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_set_proxy_address_changed_cb_n", utc_connection_set_proxy_address_changed_cb_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_set_proxy_address_changed_cb_p", utc_connection_set_proxy_address_changed_cb_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_unset_proxy_address_changed_cb_n", utc_connection_unset_proxy_address_changed_cb_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_unset_proxy_address_changed_cb_p", utc_connection_unset_proxy_address_changed_cb_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_statistics_p", utc_connection_get_statistics_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_statistics_n", utc_connection_get_statistics_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_reset_statistics_p", utc_connection_reset_statistics_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_reset_statistics_n", utc_connection_reset_statistics_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_add_route_n", utc_connection_add_route_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_add_route_p", utc_connection_add_route_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_remove_route_n", utc_connection_remove_route_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_remove_route_p", utc_connection_remove_route_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_add_route_ipv6_n", utc_connection_add_route_ipv6_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_add_route_ipv6_p", utc_connection_add_route_ipv6_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_remove_route_ipv6_n", utc_connection_remove_route_ipv6_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_remove_route_ipv6_p", utc_connection_remove_route_ipv6_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_profile_iterator_n", utc_connection_get_profile_iterator_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_get_profile_iterator_p", utc_connection_get_profile_iterator_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_destroy_profile_iterator_n", utc_connection_destroy_profile_iterator_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_destroy_profile_iterator_p", utc_connection_destroy_profile_iterator_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_profile_iterator_has_next_n", utc_connection_profile_iterator_has_next_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_profile_iterator_has_next_p", utc_connection_profile_iterator_has_next_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_profile_iterator_next_n", utc_connection_profile_iterator_next_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_profile_iterator_next_p", utc_connection_profile_iterator_next_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_add_profile_p", utc_connection_add_profile_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_add_profile_n", utc_connection_add_profile_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_remove_profile_p", utc_connection_remove_profile_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_remove_profile_n", utc_connection_remove_profile_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_update_profile_p", utc_connection_update_profile_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_update_profile_n", utc_connection_update_profile_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_open_profile_p", utc_connection_open_profile_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_open_profile_n", utc_connection_open_profile_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_close_profile_p", utc_connection_close_profile_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_close_profile_n", utc_connection_close_profile_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_reset_profile_p", utc_connection_reset_profile_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_reset_profile_n", utc_connection_reset_profile_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_destroy_p", utc_connection_destroy_p, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_destroy_n", utc_connection_destroy_n, utc_network_connection_startup, utc_network_connection_cleanup},
+    {"utc_connection_profile_create_p", utc_connection_profile_create_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_create_n", utc_connection_profile_create_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_clone_p", utc_connection_profile_clone_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_clone_n", utc_connection_profile_clone_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_name_p", utc_connection_profile_get_name_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_name_n", utc_connection_profile_get_name_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_id_p", utc_connection_profile_get_id_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_id_n", utc_connection_profile_get_id_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_type_p", utc_connection_profile_get_type_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_type_n", utc_connection_profile_get_type_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_network_interface_name_p", utc_connection_profile_get_network_interface_name_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_network_interface_name_n", utc_connection_profile_get_network_interface_name_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_state_p", utc_connection_profile_get_state_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_state_n", utc_connection_profile_get_state_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_ip_config_type_p", utc_connection_profile_get_ip_config_type_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_ip_config_type_n", utc_connection_profile_get_ip_config_type_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_ip_address_p", utc_connection_profile_get_ip_address_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_ip_address_n", utc_connection_profile_get_ip_address_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_subnet_mask_p", utc_connection_profile_get_subnet_mask_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_subnet_mask_n", utc_connection_profile_get_subnet_mask_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_gateway_address_p", utc_connection_profile_get_gateway_address_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_gateway_address_n", utc_connection_profile_get_gateway_address_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_dns_address_p", utc_connection_profile_get_dns_address_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_dns_address_n", utc_connection_profile_get_dns_address_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_proxy_type_p", utc_connection_profile_get_proxy_type_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_proxy_type_n", utc_connection_profile_get_proxy_type_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_proxy_address_p", utc_connection_profile_get_proxy_address_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_proxy_address_n", utc_connection_profile_get_proxy_address_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_ip_config_type_p", utc_connection_profile_set_ip_config_type_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_ip_config_type_n", utc_connection_profile_set_ip_config_type_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_ip_address_p", utc_connection_profile_set_ip_address_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_ip_address_n", utc_connection_profile_set_ip_address_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_subnet_mask_p", utc_connection_profile_set_subnet_mask_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_subnet_mask_n", utc_connection_profile_set_subnet_mask_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_gateway_address_p", utc_connection_profile_set_gateway_address_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_gateway_address_n", utc_connection_profile_set_gateway_address_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_dns_address_p", utc_connection_profile_set_dns_address_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_dns_address_n", utc_connection_profile_set_dns_address_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_proxy_type_p", utc_connection_profile_set_proxy_type_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_proxy_type_n", utc_connection_profile_set_proxy_type_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_proxy_address_p", utc_connection_profile_set_proxy_address_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_proxy_address_n", utc_connection_profile_set_proxy_address_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_state_changed_cb_p", utc_connection_profile_set_state_changed_cb_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_state_changed_cb_n", utc_connection_profile_set_state_changed_cb_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_unset_state_changed_cb_p", utc_connection_profile_unset_state_changed_cb_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_unset_state_changed_cb_n", utc_connection_profile_unset_state_changed_cb_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_cellular_service_type_p", utc_connection_profile_set_cellular_service_type_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_cellular_service_type_n", utc_connection_profile_set_cellular_service_type_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_cellular_apn_p", utc_connection_profile_set_cellular_apn_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_cellular_apn_n", utc_connection_profile_set_cellular_apn_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_cellular_auth_info_p", utc_connection_profile_set_cellular_auth_info_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_cellular_auth_info_n", utc_connection_profile_set_cellular_auth_info_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_cellular_home_url_p", utc_connection_profile_set_cellular_home_url_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_cellular_home_url_n", utc_connection_profile_set_cellular_home_url_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_cellular_service_type_p", utc_connection_profile_get_cellular_service_type_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_cellular_service_type_n", utc_connection_profile_get_cellular_service_type_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_cellular_apn_p", utc_connection_profile_get_cellular_apn_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_cellular_apn_n", utc_connection_profile_get_cellular_apn_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_cellular_auth_info_p", utc_connection_profile_get_cellular_auth_info_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_cellular_auth_info_n", utc_connection_profile_get_cellular_auth_info_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_cellular_home_url_p", utc_connection_profile_get_cellular_home_url_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_cellular_home_url_n", utc_connection_profile_get_cellular_home_url_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_cellular_roaming_p", utc_connection_profile_is_cellular_roaming_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_cellular_roaming_n", utc_connection_profile_is_cellular_roaming_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_cellular_hidden_p", utc_connection_profile_is_cellular_hidden_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_cellular_hidden_n", utc_connection_profile_is_cellular_hidden_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_cellular_editable_p", utc_connection_profile_is_cellular_editable_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_cellular_editable_n", utc_connection_profile_is_cellular_editable_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_cellular_default_p", utc_connection_profile_is_cellular_default_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_cellular_default_n", utc_connection_profile_is_cellular_default_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_refresh_p", utc_connection_profile_refresh_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_refresh_n", utc_connection_profile_refresh_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_essid_p", utc_connection_profile_get_wifi_essid_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_essid_n", utc_connection_profile_get_wifi_essid_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_bssid_p", utc_connection_profile_get_wifi_bssid_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_bssid_n", utc_connection_profile_get_wifi_bssid_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_rssi_p", utc_connection_profile_get_wifi_rssi_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_rssi_n", utc_connection_profile_get_wifi_rssi_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_frequency_p", utc_connection_profile_get_wifi_frequency_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_frequency_n", utc_connection_profile_get_wifi_frequency_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_max_speed_p", utc_connection_profile_get_wifi_max_speed_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_max_speed_n", utc_connection_profile_get_wifi_max_speed_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_security_type_p", utc_connection_profile_get_wifi_security_type_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_security_type_n", utc_connection_profile_get_wifi_security_type_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_encryption_type_p", utc_connection_profile_get_wifi_encryption_type_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_get_wifi_encryption_type_n", utc_connection_profile_get_wifi_encryption_type_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_wifi_passphrase_required_p", utc_connection_profile_is_wifi_passphrase_required_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_wifi_passphrase_required_n", utc_connection_profile_is_wifi_passphrase_required_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_wifi_passphrase_p", utc_connection_profile_set_wifi_passphrase_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_set_wifi_passphrase_n", utc_connection_profile_set_wifi_passphrase_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_wifi_wps_supported_p", utc_connection_profile_is_wifi_wps_supported_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_is_wifi_wps_supported_n", utc_connection_profile_is_wifi_wps_supported_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_destroy_p", utc_connection_profile_destroy_p, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {"utc_connection_profile_destroy_n", utc_connection_profile_destroy_n, utc_connection_profile_startup, utc_connection_profile_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CONNECTION_CORE_H__
diff --git a/src/utc/connection/utc-connection-profile.c b/src/utc/connection/utc-connection-profile.c
new file mode 100755 (executable)
index 0000000..e72522a
--- /dev/null
@@ -0,0 +1,2080 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <glib.h>
+#include "net_connection.h"
+#include <system_info.h>
+
+//& set: ConnectionProfile
+
+#define assert_eq(var, ref)\
+    if (var != ref) {\
+               FILE *g_fp = fopen("/tmp/utclog","a");\
+               if(g_fp != NULL) {\
+               fprintf(g_fp,\
+                   "Assert fail in %s:%d\n", __FILE__, __LINE__);\
+               fprintf(g_fp,\
+                   "Values \"%s\" and \"%s\" are not equal:\n"\
+                       "%s == %d, %s == %d\n",\
+                   #var, #ref, #var, (int)var, #ref, (int)ref);\
+                       fclose(g_fp);\
+               }\
+        return 1;\
+    }
+
+#define FREE_RESOURCE(var)\
+       if(var != NULL) {\
+               g_free(var);\
+               var = NULL;\
+       }
+
+static connection_profile_h profile_cellular = NULL;
+static connection_profile_h profile_wifi = NULL;
+static connection_profile_h profile_temp = NULL;
+static connection_h connection = NULL;
+
+static bool wifi_supported = false;
+static bool telephony_supported = false;
+static bool bt_tethering_supported = false;
+static bool ethernet_supported = false;
+static bool all_features_not_supported = false;
+
+static void test_profile_state_changed_cb(connection_profile_state_e state, void* user_data)
+{
+    char *profile_name;
+    connection_profile_h profile = user_data;
+
+    if (profile == NULL)
+        return;
+    if (connection_profile_get_name(profile, &profile_name) != CONNECTION_ERROR_NONE)
+        return;
+
+       FREE_RESOURCE(profile_name);
+}
+
+static int test_get_any_profile(connection_profile_h *profile)
+{
+    connection_profile_h profile_h;
+    connection_profile_iterator_h profile_iter;
+
+    int  rv = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_REGISTERED, &profile_iter);
+    if(CONNECTION_ERROR_NONE != rv) {
+        return -1;
+    }
+
+    int  rv1 = connection_profile_iterator_next(profile_iter, &profile_h);
+    if(CONNECTION_ERROR_NONE != rv1) {
+        return -1;
+    }
+
+    int  rv2 = connection_profile_clone(profile, profile_h);
+    if(CONNECTION_ERROR_NONE != rv2) {
+        return -1;
+    }
+
+    return 1;
+}
+
+void utc_connection_profile_startup(void)
+{
+    wifi_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.wifi", &wifi_supported);
+
+    telephony_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.telephony", &telephony_supported);
+
+    bt_tethering_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.tethering.bluetooth", &bt_tethering_supported);
+
+       ethernet_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.ethernet", &ethernet_supported);
+
+       if(telephony_supported == false && wifi_supported == false
+               && bt_tethering_supported == false && ethernet_supported == false){
+               all_features_not_supported = true;
+               fprintf(stderr, "all features not supported at %s:%d", __FILE__, __LINE__);
+               return ;
+       }
+
+    int ret = connection_create(&connection);
+
+    if(ret != CONNECTION_ERROR_NONE){
+        fprintf(stderr, "connection_create error at %s:%d", __FILE__, __LINE__);
+        return;
+    }
+
+    if(telephony_supported) {
+        if (!profile_cellular) {
+            ret = connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, "Net", &profile_cellular);
+            if(ret != CONNECTION_ERROR_NONE){
+                fprintf(stderr, "connection_profile_create error at %s:%d", __FILE__, __LINE__);
+            }
+        }
+    }
+
+    if(wifi_supported) {
+        if (!profile_wifi) {
+            ret = connection_profile_create(CONNECTION_PROFILE_TYPE_WIFI, NULL, &profile_wifi);
+            if(ret != CONNECTION_ERROR_NONE){
+                fprintf(stderr, "connection_profile_create error at %s:%d", __FILE__, __LINE__);
+            }
+        }
+    }
+}
+
+void utc_connection_profile_cleanup(void)
+{
+    int ret;
+
+    if (profile_cellular) {
+        ret = connection_profile_destroy(profile_cellular);
+        if(ret != CONNECTION_ERROR_NONE){
+            fprintf(stderr, "connection_profile_destroy error at %s:%d", __FILE__, __LINE__);
+        }
+        profile_cellular = NULL;
+    }
+
+    if (profile_wifi) {
+        ret = connection_profile_destroy(profile_wifi);
+        if(ret != CONNECTION_ERROR_NONE){
+            fprintf(stderr, "connection_profile_destroy error at %s:%d", __FILE__, __LINE__);
+        }
+        profile_wifi = NULL;
+    }
+
+    if (connection) {
+        ret = connection_destroy(connection);
+        if(ret != CONNECTION_ERROR_NONE){
+            fprintf(stderr, "connection_destroy error at %s:%d", __FILE__, __LINE__);
+        }
+        connection = NULL;
+    }
+
+    if(profile_temp) {
+        ret = connection_destroy(profile_temp);
+        if(ret != CONNECTION_ERROR_NONE){
+            fprintf(stderr, "connection_destroy error at %s:%d", __FILE__, __LINE__);
+        }
+        profile_temp = NULL;
+    }
+}
+
+
+/* Common profile operations. */
+
+int utc_connection_profile_create_p(void)
+{
+    int ret;
+
+    if (profile_cellular) {
+        connection_profile_destroy(profile_cellular);
+        profile_cellular = NULL;
+    }
+
+    if(telephony_supported) {
+        ret = connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, "Net", &profile_cellular);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        ret = connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, "Net", &profile_cellular);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_create_n(void)
+{
+       int ret;
+    connection_profile_h profile_temp = NULL;
+
+       if(telephony_supported == false && wifi_supported == false) {
+               ret = connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, "Net", NULL);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       if(telephony_supported){
+               ret = connection_profile_create(-1, "Net", &profile_temp);
+           assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+           ret = connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, NULL, &profile_temp);
+           assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+           ret = connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, "Net", NULL);
+           assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       } else {
+               ret = connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, "Net", NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+
+    return 0;
+}
+
+int utc_connection_profile_clone_p(void)
+{
+    connection_profile_h profile_temp = NULL;
+    int ret = 0;
+    connection_profile_h profile_to_be_cloned = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_clone(&profile_temp, profile_to_be_cloned);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    test_get_any_profile(&profile_to_be_cloned);
+    if(profile_to_be_cloned != NULL) {
+        ret = connection_profile_clone(&profile_temp, profile_to_be_cloned);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        connection_profile_destroy(profile_to_be_cloned);
+        connection_profile_destroy(profile_temp);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_clone_n(void)
+{
+       int ret;
+    connection_profile_h profile_temp = NULL;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_clone(NULL, profile_inval);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_clone(NULL, profile_inval);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_clone(NULL, profile_cellular);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_clone(&profile_temp, profile_inval);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_get_name_p(void)
+{
+       int ret;
+       char *name = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_name(profile_temp, &name);
+               FREE_RESOURCE(name);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       test_get_any_profile(&profile_temp);
+       assert(profile_temp);
+
+       ret = connection_profile_get_name(profile_temp, &name);
+       FREE_RESOURCE(name);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_profile_get_name_n(void)
+{
+       int ret;
+       char *name = NULL;
+       connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_name(profile_inval, NULL);
+               FREE_RESOURCE(name);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_profile_get_name(profile_inval, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_profile_get_name(profile_inval, &name);
+       FREE_RESOURCE(name);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_profile_get_name(profile_cellular, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_connection_profile_get_id_p(void)
+{
+       char *id = NULL;
+       connection_profile_h profile_h = NULL;
+       int ret = test_get_any_profile(&profile_h);
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_id(profile_temp, &id);
+               FREE_RESOURCE(id);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       profile_temp = profile_h;
+       assert(profile_temp);
+
+       ret = connection_profile_get_id(profile_temp, &id);
+       FREE_RESOURCE(id);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_profile_get_id_n(void)
+{
+       int ret;
+    char *id = NULL;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_id(profile_inval, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_get_id(profile_inval, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    ret = connection_profile_get_id(profile_inval, &id);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    ret = connection_profile_get_id(profile_cellular, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_connection_profile_get_type_p(void)
+{
+    connection_profile_type_e type;
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_type(profile_temp, &type);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_get_type(profile_temp, &type);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_get_type_n(void)
+{
+       int ret;
+    connection_profile_type_e type;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_type(profile_inval, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_get_type(profile_inval, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_type(profile_inval, &type);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_type(profile_cellular, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_get_network_interface_name_p(void)
+{
+       char *name = NULL;
+       int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_network_interface_name(profile_temp, &name);
+               FREE_RESOURCE(name);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert(profile_temp);
+       ret = connection_profile_get_network_interface_name(profile_temp, &name);
+       FREE_RESOURCE(name);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_profile_get_network_interface_name_n(void)
+{
+       int ret;
+    char *name = NULL;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_network_interface_name(profile_inval, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_get_network_interface_name(profile_inval, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_network_interface_name(profile_inval, &name);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_network_interface_name(profile_cellular, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_get_state_p(void)
+{
+    connection_profile_state_e state;
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_create(&connection);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_get_state(profile_temp, &state);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_get_state_n(void)
+{
+       int ret;
+    connection_profile_state_e state;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_state(profile_inval, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_get_state(profile_inval, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_state(profile_inval, &state);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_state(profile_cellular, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_get_ip_config_type_p(void)
+{
+    connection_ip_config_type_e type;
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_ip_config_type(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &type);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_get_ip_config_type(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &type);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_get_ip_config_type_n(void)
+{
+       int ret;
+    connection_ip_config_type_e type;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_ip_config_type(profile_inval, -1, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_get_ip_config_type(profile_inval, -1, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_ip_config_type(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, &type);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_ip_config_type(profile_cellular, -1, &type);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_ip_config_type(profile_cellular, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_ip_config_type(profile_inval, -1, &type);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_ip_config_type(profile_cellular, -1, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_get_ip_address_p(void)
+{
+       char *ip_addr = NULL;
+       int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_ip_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+               FREE_RESOURCE(ip_addr);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert(profile_temp);
+       ret = connection_profile_get_ip_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+       FREE_RESOURCE(ip_addr);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_profile_get_ip_address_n(void)
+{
+       int ret;
+    char *ip_addr = NULL;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_ip_address(profile_inval, -1, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_get_ip_address(profile_inval, -1, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_ip_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_ip_address(profile_cellular, -1, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_ip_address(profile_cellular, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_ip_address(profile_inval, -1, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_ip_address(profile_cellular, -1, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_get_subnet_mask_p(void)
+{
+    char *ip_addr = NULL;
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_subnet_mask(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_get_subnet_mask(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_get_subnet_mask_n(void)
+{
+       int ret;
+    char *ip_addr = NULL;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_subnet_mask(profile_inval, -1, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_get_subnet_mask(profile_inval, -1, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_subnet_mask(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_subnet_mask(profile_cellular, -1, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_subnet_mask(profile_cellular, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_subnet_mask(profile_inval, -1, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_subnet_mask(profile_cellular, -1, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_get_gateway_address_p(void)
+{
+       char *ip_addr = NULL;
+       int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_gateway_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+               FREE_RESOURCE(ip_addr);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert(profile_temp);
+       ret = connection_profile_get_gateway_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+       FREE_RESOURCE(ip_addr);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_profile_get_gateway_address_n(void)
+{
+       int ret;
+    char *ip_addr = NULL;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_gateway_address(profile_inval, -1, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_get_gateway_address(profile_inval, -1, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_gateway_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_gateway_address(profile_cellular, -1, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_gateway_address(profile_cellular, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_gateway_address(profile_inval, -1, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_gateway_address(profile_cellular, -1, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_get_dns_address_p(void)
+{
+       char *ip_addr = NULL;
+       int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_dns_address(profile_temp, 1, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+               FREE_RESOURCE(ip_addr);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert(profile_temp);
+       ret = connection_profile_get_dns_address(profile_temp, 1, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+       FREE_RESOURCE(ip_addr);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+       ret = connection_profile_get_dns_address(profile_temp, 2, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+       FREE_RESOURCE(ip_addr);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_profile_get_dns_address_n(void)
+{
+       int ret;
+       char *ip_addr = NULL;
+       connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_dns_address(profile_inval, 1, -1, NULL);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_profile_get_dns_address(profile_inval, 1, -1, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_profile_get_dns_address(profile_inval, 1, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+       FREE_RESOURCE(ip_addr);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_profile_get_dns_address(profile_cellular, 1, -1, &ip_addr);
+       FREE_RESOURCE(ip_addr);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_profile_get_dns_address(profile_cellular, 1, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_profile_get_dns_address(profile_inval, 1, -1, &ip_addr);
+       FREE_RESOURCE(ip_addr);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_profile_get_dns_address(profile_cellular, 1, -1, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_profile_get_dns_address(profile_cellular, 99, CONNECTION_ADDRESS_FAMILY_IPV6, &ip_addr);
+       FREE_RESOURCE(ip_addr);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_connection_profile_get_proxy_type_p(void)
+{
+    connection_proxy_type_e type;
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_proxy_type(profile_temp, &type);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+       ret = connection_profile_set_proxy_type(profile_temp, CONNECTION_PROXY_TYPE_MANUAL);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+    ret = connection_profile_get_proxy_type(profile_temp, &type);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_get_proxy_type_n(void)
+{
+       int ret;
+    connection_proxy_type_e type;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_proxy_type(profile_inval, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_get_proxy_type(profile_inval, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_proxy_type(profile_inval, &type);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_proxy_type(profile_cellular, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_get_proxy_address_p(void)
+{
+       char *ip_addr = NULL;
+       int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_proxy_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+               FREE_RESOURCE(ip_addr);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert(profile_temp);
+       ret = connection_profile_get_proxy_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+       FREE_RESOURCE(ip_addr);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_profile_get_proxy_address_n(void)
+{
+       int ret;
+    char *ip_addr = NULL;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_get_proxy_address(profile_inval, -1, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_get_proxy_address(profile_inval, -1, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_proxy_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_proxy_address(profile_cellular, -1, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_proxy_address(profile_cellular, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_proxy_address(profile_inval, -1, &ip_addr);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_get_proxy_address(profile_cellular, -1, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_set_ip_config_type_p(void)
+{
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_ip_config_type(profile_temp,
+            CONNECTION_ADDRESS_FAMILY_IPV4, CONNECTION_IP_CONFIG_TYPE_STATIC);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_set_ip_config_type(profile_temp,
+            CONNECTION_ADDRESS_FAMILY_IPV4, CONNECTION_IP_CONFIG_TYPE_STATIC);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_set_ip_config_type_n(void)
+{
+       int ret;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_ip_config_type(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, -1);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_set_ip_config_type(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, -1);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_set_ip_config_type(profile_inval,
+            CONNECTION_ADDRESS_FAMILY_IPV4, CONNECTION_IP_CONFIG_TYPE_STATIC);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_set_ip_config_type(profile_cellular, CONNECTION_ADDRESS_FAMILY_IPV4, -1);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_set_ip_address_p(void)
+{
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_ip_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+       ret = connection_profile_set_ip_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_set_ip_address_n(void)
+{
+       int ret;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_ip_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_set_ip_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_set_ip_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_set_subnet_mask_p(void)
+{
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_subnet_mask(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, "255.255.255.0");
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+       ret = connection_profile_set_subnet_mask(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, "255.255.255.0");
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_set_subnet_mask_n(void)
+{
+       int ret;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_subnet_mask(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_set_subnet_mask(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_set_subnet_mask(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, "255.255.255.0");
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_set_gateway_address_p(void)
+{
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_gateway_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_set_gateway_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_set_gateway_address_n(void)
+{
+       int ret;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_gateway_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_set_gateway_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_set_gateway_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_set_dns_address_p(void)
+{
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_dns_address(profile_temp, 1, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_set_dns_address(profile_temp, 1, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+    ret = connection_profile_set_dns_address(profile_temp, 2, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.2");
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_set_dns_address_n(void)
+{
+       int ret;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_dns_address(profile_inval, 1, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_set_dns_address(profile_inval, 1, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_set_dns_address(profile_inval, 1, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_set_dns_address(profile_cellular, 99, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_set_proxy_type_p(void)
+{
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_proxy_type(profile_temp, CONNECTION_PROXY_TYPE_MANUAL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_set_proxy_type(profile_temp, CONNECTION_PROXY_TYPE_MANUAL);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_set_proxy_type_n(void)
+{
+       int ret;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_proxy_type(profile_inval, -1);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_set_proxy_type(profile_inval, -1);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_set_proxy_type(profile_inval, CONNECTION_PROXY_TYPE_MANUAL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_set_proxy_type(profile_cellular, -1);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_set_proxy_address_p(void)
+{
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_proxy_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1:8080");
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_set_proxy_address(profile_temp, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1:8080");
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_set_proxy_address_n(void)
+{
+       int ret;
+    connection_profile_h profile_inval = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_proxy_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_profile_set_proxy_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_profile_set_proxy_address(profile_inval, CONNECTION_ADDRESS_FAMILY_IPV4, "192.168.11.1:8080");
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_set_state_changed_cb_p(void)
+{
+    connection_profile_h profile_h = NULL;
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_state_changed_cb(profile_temp, test_profile_state_changed_cb, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_set_state_changed_cb(profile_temp, test_profile_state_changed_cb, NULL);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_set_state_changed_cb_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+       connection_profile_h profile_h = NULL;
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_set_state_changed_cb(profile_inval, NULL, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_set_state_changed_cb(profile_inval, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    ret = connection_profile_set_state_changed_cb(profile_inval, test_profile_state_changed_cb, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    ret = connection_profile_set_state_changed_cb(profile_temp, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_profile_unset_state_changed_cb_p(void)
+{
+    connection_profile_h profile_h = NULL;
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_unset_state_changed_cb(profile_temp);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+       ret = connection_profile_set_state_changed_cb(profile_temp, test_profile_state_changed_cb, NULL);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    ret = connection_profile_unset_state_changed_cb(profile_temp);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_unset_state_changed_cb_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+
+    int ret = connection_profile_unset_state_changed_cb(profile_inval);
+
+    if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       }
+
+    return 0;
+}
+
+
+/* Cellular profile operations. */
+
+int utc_connection_profile_set_cellular_service_type_p(void)
+{
+    if(telephony_supported) {
+        int ret = connection_profile_set_cellular_service_type(profile_cellular, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_set_cellular_service_type(profile_cellular, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_set_cellular_service_type_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+
+    if(telephony_supported) {
+        int ret = connection_profile_set_cellular_service_type(profile_inval, -1);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_service_type(profile_inval, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_service_type(profile_cellular, -1);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_service_type(profile_wifi, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_set_cellular_service_type(profile_inval, -1);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_set_cellular_apn_p(void)
+{
+    if(telephony_supported) {
+        int ret = connection_profile_set_cellular_apn(profile_cellular, "tizen.org");
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_set_cellular_apn(profile_cellular, "tizen.org");
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_set_cellular_apn_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+
+    if(telephony_supported) {
+        int ret = connection_profile_set_cellular_apn(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_apn(profile_inval, "tizen.org");
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_apn(profile_cellular, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_apn(profile_wifi, "tizen.org");
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_set_cellular_apn(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_connection_profile_set_cellular_auth_info_p(void)
+{
+    if(telephony_supported) {
+        int ret = connection_profile_set_cellular_auth_info(profile_cellular,
+                CONNECTION_CELLULAR_AUTH_TYPE_PAP, "tizen", "flower");
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_set_cellular_auth_info(profile_cellular,
+                CONNECTION_CELLULAR_AUTH_TYPE_PAP, "tizen", "flower");
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_set_cellular_auth_info_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+
+    if(telephony_supported) {
+        int ret = connection_profile_set_cellular_auth_info(profile_inval, -1, NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_auth_info(profile_inval,
+                CONNECTION_CELLULAR_AUTH_TYPE_PAP, "tizen", "flower");
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_auth_info(profile_cellular, -1, "tizen", "flower");
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_auth_info(profile_cellular,
+                CONNECTION_CELLULAR_AUTH_TYPE_PAP, NULL, "flower");
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_auth_info(profile_cellular,
+                CONNECTION_CELLULAR_AUTH_TYPE_PAP, "tizen", NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_auth_info(profile_inval,
+                CONNECTION_CELLULAR_AUTH_TYPE_PAP, NULL, "flower");
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_auth_info(profile_cellular,
+                CONNECTION_CELLULAR_AUTH_TYPE_PAP, NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_auth_info(profile_wifi,
+                CONNECTION_CELLULAR_AUTH_TYPE_PAP, "tizen", "flower");
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_set_cellular_auth_info(profile_inval, -1, NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_set_cellular_home_url_p(void)
+{
+    if(telephony_supported) {
+        int ret = connection_profile_set_cellular_home_url(profile_cellular, "www.tizen.org");
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_set_cellular_home_url(profile_cellular, "www.tizen.org");
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_set_cellular_home_url_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+
+    if(telephony_supported) {
+        int ret = connection_profile_set_cellular_home_url(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_home_url(profile_inval, "www.tizen.org");
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_home_url(profile_cellular, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_cellular_home_url(profile_wifi, "www.tizen.org");
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_set_cellular_home_url(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_connection_profile_get_cellular_service_type_p(void)
+{
+    connection_cellular_service_type_e type;
+
+    if(telephony_supported) {
+        connection_profile_set_cellular_service_type(profile_cellular, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET);
+
+        int ret = connection_profile_get_cellular_service_type(profile_cellular, &type);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_get_cellular_service_type(profile_cellular, &type);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_get_cellular_service_type_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    connection_cellular_service_type_e type;
+
+    if(telephony_supported) {
+        int ret = connection_profile_get_cellular_service_type(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_service_type(profile_inval, &type);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_service_type(profile_cellular, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_service_type(profile_wifi, &type);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_get_cellular_service_type(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_get_cellular_apn_p(void)
+{
+       char *apn = NULL;
+
+       int ret = connection_profile_get_cellular_apn(profile_cellular, &apn);
+       FREE_RESOURCE(apn);
+
+       if(telephony_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_connection_profile_get_cellular_apn_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    char *apn = NULL;
+
+    if(telephony_supported) {
+        int ret = connection_profile_get_cellular_apn(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_apn(profile_inval, &apn);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_apn(profile_cellular, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_apn(profile_wifi, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_get_cellular_apn(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_get_cellular_auth_info_p(void)
+{
+       connection_cellular_auth_type_e type;
+       char *name = NULL;
+       char *pwd = NULL;
+
+       int ret = connection_profile_get_cellular_auth_info(profile_cellular, &type, &name, &pwd);
+       FREE_RESOURCE(name); FREE_RESOURCE(pwd);
+
+       if(telephony_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_connection_profile_get_cellular_auth_info_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    connection_cellular_auth_type_e type;
+    char *name = NULL;
+    char *pwd = NULL;
+
+    if(telephony_supported) {
+        int ret = connection_profile_get_cellular_auth_info(profile_inval, NULL, NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_inval, &type, &name, &pwd);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_cellular, NULL, &name, &pwd);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_cellular, &type, NULL, &pwd);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_cellular, &type, &name, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_inval, NULL, &name, &pwd);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_inval, &type, NULL, &pwd);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_inval, &type, &name, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_cellular, NULL, NULL, &pwd);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_cellular, NULL, &name, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_cellular, &type, NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_inval, NULL, NULL, &pwd);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_cellular, NULL, NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_auth_info(profile_wifi, &type, &name, &pwd);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_get_cellular_auth_info(profile_inval, NULL, NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_get_cellular_home_url_p(void)
+{
+       char *home_url = NULL;
+
+       int ret = connection_profile_get_cellular_home_url(profile_cellular, &home_url);
+       FREE_RESOURCE(home_url);
+
+       if(telephony_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_connection_profile_get_cellular_home_url_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    char *home_url = NULL;
+
+    if(telephony_supported) {
+        int ret = connection_profile_get_cellular_home_url(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_home_url(profile_inval, &home_url);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_home_url(profile_cellular, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_cellular_home_url(profile_wifi, &home_url);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_get_cellular_home_url(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_is_cellular_roaming_p(void)
+{
+    bool roaming;
+
+    if(telephony_supported) {
+        int ret = connection_profile_is_cellular_roaming(profile_cellular, &roaming);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_is_cellular_roaming(profile_cellular, &roaming);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_is_cellular_roaming_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    bool roaming;
+
+    if(telephony_supported) {
+        int ret = connection_profile_is_cellular_roaming(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_cellular_roaming(profile_inval, &roaming);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_cellular_roaming(profile_cellular, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_cellular_roaming(profile_wifi, &roaming);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_is_cellular_roaming(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_is_cellular_hidden_p(void)
+{
+    bool is_hidden;
+
+    if(telephony_supported) {
+        int ret = connection_profile_is_cellular_hidden(profile_cellular, &is_hidden);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_is_cellular_hidden(profile_cellular, &is_hidden);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+
+}
+
+int utc_connection_profile_is_cellular_hidden_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    bool is_hidden;
+
+    if(telephony_supported) {
+        int ret = connection_profile_is_cellular_hidden(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_cellular_hidden(profile_inval, &is_hidden);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_cellular_hidden(profile_cellular, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_cellular_hidden(profile_wifi, &is_hidden);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_is_cellular_hidden(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_is_cellular_editable_p(void)
+{
+    bool is_editable;
+
+    if(telephony_supported) {
+        int ret = connection_profile_is_cellular_editable(profile_cellular, &is_editable);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_is_cellular_editable(profile_cellular, &is_editable);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_is_cellular_editable_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    bool is_editable;
+
+    if(telephony_supported) {
+        int ret = connection_profile_is_cellular_editable(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_cellular_editable(profile_inval, &is_editable);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_cellular_editable(profile_cellular, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_cellular_editable(profile_wifi, &is_editable);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_is_cellular_editable(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_is_cellular_default_p(void)
+{
+    bool is_default;
+
+    if(telephony_supported) {
+        int ret = connection_profile_is_cellular_default(profile_cellular, &is_default);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_is_cellular_default(profile_cellular, &is_default);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_is_cellular_default_n(void)
+{
+    bool is_editable;
+
+    if(telephony_supported) {
+        int ret = connection_profile_is_cellular_default(NULL, &is_editable);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_profile_is_cellular_default(profile_cellular, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_profile_is_cellular_default(profile_wifi, &is_editable);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_is_cellular_default(NULL, &is_editable);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_refresh_p(void)
+{
+    int ret = test_get_any_profile(&profile_temp);
+
+       if(all_features_not_supported){
+               ret = connection_profile_refresh(profile_temp);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_temp);
+    ret = connection_profile_refresh(profile_temp);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_refresh_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+
+    int ret = connection_profile_refresh(profile_inval);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       }
+
+    return 0;
+}
+
+/* Wi-Fi profile operations. */
+
+int utc_connection_profile_get_wifi_essid_p(void)
+{
+       char *essid = NULL;
+
+       int ret = connection_profile_get_wifi_essid(profile_wifi, &essid);
+       FREE_RESOURCE(essid);
+
+       if(wifi_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_connection_profile_get_wifi_essid_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    char *essid = NULL;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_essid(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_essid(profile_inval, &essid);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_essid(profile_wifi, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_essid(profile_cellular, &essid);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_get_wifi_essid(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_get_wifi_bssid_p(void)
+{
+       char *bssid = NULL;
+
+       int ret = connection_profile_get_wifi_bssid(profile_wifi, &bssid);
+       FREE_RESOURCE(bssid);
+
+       if(wifi_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_connection_profile_get_wifi_bssid_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    char *bssid = NULL;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_bssid(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_bssid(profile_inval, &bssid);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_bssid(profile_wifi, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_bssid(profile_cellular, &bssid);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_get_wifi_bssid(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_get_wifi_rssi_p(void)
+{
+    int rssi;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_rssi(profile_wifi, &rssi);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_get_wifi_rssi(profile_wifi, &rssi);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_get_wifi_rssi_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    int rssi;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_rssi(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_rssi(profile_inval, &rssi);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_rssi(profile_wifi, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_rssi(profile_cellular, &rssi);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_get_wifi_rssi(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_get_wifi_frequency_p(void)
+{
+    int frequency;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_frequency(profile_wifi, &frequency);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_get_wifi_frequency(profile_wifi, &frequency);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_get_wifi_frequency_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    int frequency;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_frequency(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_frequency(profile_inval, &frequency);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_frequency(profile_wifi, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_frequency(profile_cellular, &frequency);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_get_wifi_frequency(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_get_wifi_max_speed_p(void)
+{
+    int max_speed;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_max_speed(profile_wifi, &max_speed);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_get_wifi_max_speed(profile_wifi, &max_speed);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_get_wifi_max_speed_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    int max_speed;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_max_speed(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_max_speed(profile_inval, &max_speed);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_max_speed(profile_wifi, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_max_speed(profile_cellular, &max_speed);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_get_wifi_max_speed(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_get_wifi_security_type_p(void)
+{
+    connection_wifi_security_type_e sec_type;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_security_type(profile_wifi, &sec_type);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_get_wifi_security_type(profile_wifi, &sec_type);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_get_wifi_security_type_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    connection_wifi_security_type_e sec_type;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_security_type(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_security_type(profile_inval, &sec_type);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_security_type(profile_wifi, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_security_type(profile_cellular, &sec_type);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_get_wifi_security_type(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_get_wifi_encryption_type_p(void)
+{
+    connection_wifi_encryption_type_e enc_type;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_encryption_type(profile_wifi, &enc_type);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_get_wifi_encryption_type(profile_wifi, &enc_type);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_get_wifi_encryption_type_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    connection_wifi_encryption_type_e enc_type;
+
+    if(wifi_supported) {
+        int ret = connection_profile_get_wifi_encryption_type(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_encryption_type(profile_inval, &enc_type);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_encryption_type(profile_wifi, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_get_wifi_encryption_type(profile_cellular, &enc_type);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_get_wifi_encryption_type(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_is_wifi_passphrase_required_p(void)
+{
+    bool flag;
+
+    if(wifi_supported) {
+        int ret = connection_profile_is_wifi_passphrase_required(profile_wifi, &flag);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_is_wifi_passphrase_required(profile_wifi, &flag);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_is_wifi_passphrase_required_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    bool flag;
+
+    if(wifi_supported) {
+        int ret = connection_profile_is_wifi_passphrase_required(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_wifi_passphrase_required(profile_inval, &flag);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_wifi_passphrase_required(profile_wifi, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_wifi_passphrase_required(profile_cellular, &flag);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_is_wifi_passphrase_required(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_set_wifi_passphrase_p(void)
+{
+    if(wifi_supported) {
+        int ret = connection_profile_set_wifi_passphrase(profile_wifi, "keystring");
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_set_wifi_passphrase(profile_wifi, "keystring");
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_set_wifi_passphrase_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+
+    if(wifi_supported) {
+        int ret = connection_profile_set_wifi_passphrase(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_wifi_passphrase(profile_inval, "keystring");
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_wifi_passphrase(profile_wifi, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_set_wifi_passphrase(profile_cellular, "keystring");
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_set_wifi_passphrase(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_profile_is_wifi_wps_supported_p(void)
+{
+    bool flag;
+
+    if(wifi_supported) {
+        int ret = connection_profile_is_wifi_wps_supported(profile_wifi, &flag);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_profile_is_wifi_wps_supported(profile_wifi, &flag);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_is_wifi_wps_supported_n(void)
+{
+    connection_profile_h profile_inval = NULL;
+    bool flag;
+
+    if(wifi_supported) {
+        int ret = connection_profile_is_wifi_wps_supported(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_wifi_wps_supported(profile_inval, &flag);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_wifi_wps_supported(profile_wifi, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_profile_is_wifi_wps_supported(profile_cellular, &flag);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_profile_is_wifi_wps_supported(profile_inval, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_profile_destroy_p(void)
+{
+    int ret = CONNECTION_ERROR_INVALID_PARAMETER;
+
+       if(all_features_not_supported){
+               ret = connection_profile_destroy(profile_temp);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    test_get_any_profile(&profile_temp);
+    assert(profile_temp);
+    ret = connection_profile_destroy(profile_temp);    
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_destroy_n(void)
+{
+    int ret = connection_profile_destroy(NULL);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       }
+
+    return 0;
+}
diff --git a/src/utc/connection/utc-network-connection.c b/src/utc/connection/utc-network-connection.c
new file mode 100755 (executable)
index 0000000..5f39cb4
--- /dev/null
@@ -0,0 +1,1592 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "assert.h"
+#include <glib.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wifi.h>
+#include <net_connection.h>
+#include <system_info.h>
+
+#define assert_eq(var, ref)\
+    if (var != ref) {\
+               FILE *g_fp = fopen("/tmp/utclog","a");\
+               if(g_fp != NULL) {\
+               fprintf(g_fp,\
+                   "Assert fail in %s:%d\n", __FILE__, __LINE__);\
+               fprintf(g_fp, \
+                   "Values \"%s\" and \"%s\" are not equal:\n"\
+                       "%s == %d, %s == %d\n",\
+                   #var, #ref, #var, (int)var, #ref, (int)ref);\
+                       fclose(g_fp);\
+               }\
+        return 1;\
+    }
+
+#define FREE_RESOURCE(var)\
+       if(var != NULL) {\
+               g_free(var);\
+               var = NULL;\
+       }
+
+static connection_h connection = NULL;
+static connection_profile_h profile_cellular = NULL;
+static connection_profile_h profile_temp = NULL;
+
+static GMainLoop *g_pMainLoop;
+static int g_CallbackRet = CONNECTION_ERROR_NONE;
+
+static bool wifi_supported = false;
+static bool telephony_supported = false;
+static bool bt_tethering_supported = false;
+static bool ethernet_supported = false;
+static bool all_features_not_supported = false;
+
+static void test_network_state_changed_cb(connection_type_e state, void* user_data)
+{
+}
+
+static void test_ip_address_changed_cb(const char* ipv4_address, const char* ipv6_address, void* user_data)
+{
+}
+
+static void test_proxy_address_changed_cb(const char* ipv4_address, const char* ipv6_address, void* user_data)
+{
+}
+
+static void test_connection_opened_callback(connection_error_e result, void* user_data)
+{
+}
+
+static void test_connection_closed_callback(connection_error_e result, void* user_data)
+{
+}
+
+static void test_connection_set_default_callback(connection_error_e result, void* user_data)
+{
+}
+
+static void test_connection_reset_profile_callback(connection_error_e result, void* user_data)
+{
+       g_CallbackRet = result;
+       if (g_pMainLoop)
+               g_main_loop_quit(g_pMainLoop);
+}
+
+static void __utc_wifi_deactivate_callback(wifi_error_e result, void* user_data)
+{
+       g_CallbackRet = result;
+       if (g_pMainLoop)
+               g_main_loop_quit(g_pMainLoop);
+}
+
+static int test_get_any_profile(connection_profile_h *profile)
+{
+    connection_profile_h profile_h;
+    connection_profile_iterator_h profile_iter;
+
+    int  rv = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_REGISTERED, &profile_iter);
+    if(CONNECTION_ERROR_NONE != rv) {
+        return -1;
+    }
+
+    int  rv1 = connection_profile_iterator_next(profile_iter, &profile_h);
+    if(CONNECTION_ERROR_NONE != rv1) {
+        return -1;
+    }
+
+    int  rv2 = connection_profile_clone(profile, profile_h);
+    if(CONNECTION_ERROR_NONE != rv2) {
+        return -1;
+    }
+
+    return 1;
+}
+
+static int test_get_telephony_profile(connection_profile_h *profile, int service_type)
+{
+    connection_profile_h profile_h;
+    connection_profile_iterator_h profile_iter;
+       connection_profile_type_e profile_type;
+
+       if(service_type == NULL) {
+               service_type = CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET;
+       }
+
+    int  ret = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_REGISTERED, &profile_iter);
+    if(ret != CONNECTION_ERROR_NONE) {
+        return -1;
+    }
+
+       while(connection_profile_iterator_has_next(profile_iter)) {
+               ret = connection_profile_iterator_next(profile_iter, &profile_h);
+           if(ret != CONNECTION_ERROR_NONE) {
+               return -1;
+           }
+
+               ret = connection_profile_get_type(profile_h, &profile_type);
+               if(ret != CONNECTION_ERROR_NONE) {
+               return -1;
+           }
+
+               if(profile_type == CONNECTION_PROFILE_TYPE_CELLULAR) {
+                       if(service_type) {
+                               connection_cellular_service_type_e type;
+                               ret = connection_profile_get_cellular_service_type(profile_h, &type);
+                               if(ret != CONNECTION_ERROR_NONE) {
+                               return -1;
+                           }
+                               if(service_type == type) {
+                                       ret = connection_profile_clone(profile, profile_h);
+                                   if(ret != CONNECTION_ERROR_NONE) {
+                                       return -1;
+                                   }
+                                       return 1;
+                               }
+                       }
+                       else {
+                               ret = connection_profile_clone(profile, profile_h);
+                           if(ret != CONNECTION_ERROR_NONE) {
+                               return -1;
+                           }
+                               return 1;
+                       }
+               }
+       }
+
+    return -1;
+}
+
+void utc_network_connection_startup(void)
+{
+    wifi_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.wifi", &wifi_supported);
+
+    telephony_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.telephony", &telephony_supported);
+
+    bt_tethering_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.tethering.bluetooth", &bt_tethering_supported);
+
+       ethernet_supported = false;
+    system_info_get_platform_bool("http://tizen.org/feature/network.ethernet", &ethernet_supported);
+
+       if(telephony_supported == false && wifi_supported == false
+               && bt_tethering_supported == false && ethernet_supported == false){
+               all_features_not_supported = true;
+               fprintf(stderr, "all features not supported at %s:%d", __FILE__, __LINE__);
+               return ;
+       }
+
+    int ret = connection_create(&connection);
+    if(ret != CONNECTION_ERROR_NONE){
+        fprintf(stderr, "connection_create error at %s:%d\n", __FILE__, __LINE__);
+    }
+
+    if(telephony_supported) {
+        if (!profile_cellular) {
+            ret = connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, "Net", &profile_cellular);
+            if(ret != CONNECTION_ERROR_NONE){
+                fprintf(stderr, "connection_profile_create error at %s:%d", __FILE__, __LINE__);
+            }
+        }
+    }
+}
+
+void utc_network_connection_cleanup(void)
+{
+    int ret;
+
+       if (profile_cellular) {
+        ret = connection_profile_destroy(profile_cellular);
+        if(ret != CONNECTION_ERROR_NONE){
+            fprintf(stderr, "connection_profile_destroy error at %s:%d", __FILE__, __LINE__);
+        }
+        profile_cellular = NULL;
+    }
+
+    if(profile_temp) {
+        ret = connection_profile_destroy(profile_temp);
+        if(ret != CONNECTION_ERROR_NONE){
+            fprintf(stderr, "connection_profile_destroy error at %s:%d", __FILE__, __LINE__);
+        }
+        profile_temp = NULL;
+    }
+
+       if(connection){
+        ret = connection_destroy(connection);
+        if(ret != CONNECTION_ERROR_NONE){
+            fprintf(stderr, "connection_destroy error at %s:%d\n", __FILE__, __LINE__);
+        }
+        connection = NULL;
+    }
+}
+
+int utc_connection_create_p(void)
+{
+    int ret;
+
+       if(all_features_not_supported){
+               ret = connection_create(&connection);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    if(connection){
+        ret = connection_destroy(connection);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        connection = NULL;
+    }
+
+    ret = connection_create(&connection);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_create_n(void)
+{
+    int ret;
+
+       if(all_features_not_supported){
+               ret = connection_destroy(connection);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    if(connection){
+        ret = connection_destroy(connection);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        connection = NULL;
+    }
+
+    ret = connection_create(NULL);
+    assert_neq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_get_ip_address_p(void)
+{
+       char *ip_address = NULL;
+
+       int ret = connection_get_ip_address(connection, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_address);
+       FREE_RESOURCE(ip_address);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_connection_get_ip_address_n(void)
+{
+       int ret;
+       char *ip_address = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_get_ip_address(connection, -100, NULL);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_get_ip_address(NULL, -100, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_ip_address(NULL, CONNECTION_ADDRESS_FAMILY_IPV4, &ip_address);
+       FREE_RESOURCE(ip_address);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_ip_address(connection, -100, &ip_address);
+       FREE_RESOURCE(ip_address);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_ip_address(connection, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_ip_address(NULL, -100, &ip_address);
+       FREE_RESOURCE(ip_address);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_ip_address(NULL, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_ip_address(connection, -100, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_connection_get_proxy_p(void)
+{
+       char *proxy = NULL;
+
+       int ret = connection_get_proxy(connection, CONNECTION_ADDRESS_FAMILY_IPV4, &proxy);
+       FREE_RESOURCE(proxy);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_connection_get_proxy_n(void)
+{
+       int ret;
+       char *proxy = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_get_proxy(connection, -100, NULL);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_get_proxy(NULL, -100, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_proxy(NULL, CONNECTION_ADDRESS_FAMILY_IPV4, &proxy);
+       FREE_RESOURCE(proxy);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_proxy(connection, -100, &proxy);
+       FREE_RESOURCE(proxy);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_proxy(connection, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_proxy(NULL, -100, &proxy);
+       FREE_RESOURCE(proxy);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_proxy(NULL, CONNECTION_ADDRESS_FAMILY_IPV4, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_get_proxy(connection, -100, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_connection_get_type_n(void)
+{
+       int ret;
+    connection_type_e state;
+
+       if(all_features_not_supported){
+               ret = connection_get_type(connection, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_get_type(NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_type(NULL, &state);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_type(connection, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_get_type_p(void)
+{
+    connection_type_e state;
+
+    int ret = connection_get_type(connection, &state);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+    return 0;
+}
+
+int utc_connection_get_cellular_state_n(void)
+{
+    connection_cellular_state_e state;
+
+    if(!telephony_supported) {
+        int ret = connection_get_cellular_state(NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int ret = connection_get_cellular_state(NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_cellular_state(NULL, &state);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_cellular_state(connection, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_get_cellular_state_p(void)
+{
+    connection_cellular_state_e state;
+
+    if(!telephony_supported) {
+        int ret = connection_get_cellular_state(connection, &state);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int ret = connection_get_cellular_state(connection, &state);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_get_wifi_state_n(void)
+{
+    connection_wifi_state_e state;
+
+    if(!wifi_supported) {
+        int ret = connection_get_wifi_state(NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int ret = connection_get_wifi_state(NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_wifi_state(NULL, &state);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_wifi_state(connection, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_get_wifi_state_p(void)
+{
+    connection_wifi_state_e state;
+
+    if(!wifi_supported) {
+        int ret = connection_get_wifi_state(connection, &state);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int ret = connection_get_wifi_state(connection, &state);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_get_bt_state_n(void)
+{
+    connection_bt_state_e state;
+
+    if(!bt_tethering_supported) {
+        int ret = connection_get_bt_state(NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int ret = connection_get_bt_state(NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_bt_state(NULL, &state);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_bt_state(connection, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_get_bt_state_p(void)
+{
+    connection_bt_state_e state;
+
+    if(!bt_tethering_supported) {
+        int ret = connection_get_bt_state(connection, &state);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int ret = connection_get_bt_state(connection, &state);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_get_current_profile_p(void)
+{
+       int ret = connection_get_current_profile(connection, &profile_temp);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+    return 0;
+}
+
+int utc_connection_get_current_profile_n(void)
+{
+       int ret;
+    connection_profile_h profile = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_get_current_profile(connection, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_get_current_profile(NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_current_profile(connection, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_current_profile(NULL, &profile);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_get_default_cellular_service_profile_p(void)
+{
+    connection_profile_h profile = NULL;
+
+    if(!telephony_supported) {
+        int ret = connection_get_default_cellular_service_profile(connection, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET, &profile);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int service_type = CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET;
+    int ret = connection_get_default_cellular_service_profile(connection, service_type, &profile);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    service_type = CONNECTION_CELLULAR_SERVICE_TYPE_MMS;
+    ret = connection_get_default_cellular_service_profile(connection, service_type, &profile);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_get_default_cellular_service_profile_n(void)
+{
+    connection_profile_h profile = NULL;
+
+    if(!telephony_supported) {
+        int ret = connection_get_default_cellular_service_profile(NULL, CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int service_type = CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET;
+    int ret = connection_get_default_cellular_service_profile(NULL, service_type, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    service_type = CONNECTION_CELLULAR_SERVICE_TYPE_MMS;
+    ret = connection_get_default_cellular_service_profile(connection, service_type, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    service_type = CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET;
+    ret = connection_get_default_cellular_service_profile(NULL, service_type, &profile);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+
+}
+
+int utc_connection_set_default_cellular_service_profile_p(void)
+{
+    int service_type = CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET;
+
+    if(!telephony_supported) {
+        int ret = connection_set_default_cellular_service_profile(connection, service_type, profile_cellular);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int ret = connection_get_default_cellular_service_profile(connection, service_type, &profile_cellular);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    ret = connection_set_default_cellular_service_profile(connection, service_type, profile_cellular);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_set_default_cellular_service_profile_n(void)
+{
+    int service_type = CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET;
+
+    if(!telephony_supported) {
+        int ret = connection_set_default_cellular_service_profile(NULL, service_type, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int ret = connection_set_default_cellular_service_profile(NULL, service_type, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_set_default_cellular_service_profile(connection, service_type, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    service_type = CONNECTION_CELLULAR_SERVICE_TYPE_TETHERING;
+    ret = connection_get_default_cellular_service_profile(NULL, service_type, profile_cellular);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_set_default_cellular_service_profile_async_p(void)
+{
+    int service_type = CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET;
+
+    if(!telephony_supported) {
+        int ret = connection_set_default_cellular_service_profile_async(connection, service_type, NULL, test_connection_set_default_callback, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int ret = connection_get_default_cellular_service_profile(connection, service_type, &profile_cellular);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    ret = connection_set_default_cellular_service_profile_async(connection, service_type, profile_cellular, test_connection_set_default_callback, NULL);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_set_default_cellular_service_profile_async_n(void)
+{
+    int service_type = CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET;
+
+    if(!telephony_supported) {
+        int ret = connection_set_default_cellular_service_profile_async(NULL, service_type, NULL, NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    int ret = connection_set_default_cellular_service_profile_async(NULL, service_type, NULL, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_set_default_cellular_service_profile_async(connection, service_type, profile_cellular, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_set_default_cellular_service_profile_async(connection, service_type, NULL, test_connection_set_default_callback, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    service_type = CONNECTION_CELLULAR_SERVICE_TYPE_TETHERING;
+    ret = connection_set_default_cellular_service_profile_async(NULL, service_type, profile_cellular, test_connection_set_default_callback, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_set_type_changed_cb_n(void)
+{
+       int ret;
+
+       if(all_features_not_supported){
+               ret = connection_set_type_changed_cb(connection, NULL, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_set_type_changed_cb(NULL, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_set_type_changed_cb(NULL, test_network_state_changed_cb, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_set_type_changed_cb(connection, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_set_type_changed_cb_p(void)
+{
+       int ret = connection_set_type_changed_cb(connection, test_network_state_changed_cb, NULL);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+    return 0;
+}
+
+int utc_connection_unset_type_changed_cb_n(void)
+{
+    int ret = connection_unset_type_changed_cb(NULL);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       }
+
+    return 0;
+}
+
+int utc_connection_unset_type_changed_cb_p(void)
+{
+    int ret = connection_unset_type_changed_cb(connection);
+
+    if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+    return 0;
+}
+
+int utc_connection_set_ip_address_changed_cb_n(void)
+{
+       int ret;
+
+       if(all_features_not_supported){
+               ret = connection_set_ip_address_changed_cb(connection, NULL, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_set_ip_address_changed_cb(NULL, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_set_ip_address_changed_cb(NULL, test_ip_address_changed_cb, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_set_ip_address_changed_cb(connection, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_set_ip_address_changed_cb_p(void)
+{
+    int ret = connection_set_ip_address_changed_cb(connection, test_ip_address_changed_cb, NULL);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+    return 0;
+}
+
+int utc_connection_unset_ip_address_changed_cb_n(void)
+{
+    int ret = connection_unset_ip_address_changed_cb(NULL);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       }
+
+    return 0;
+}
+
+int utc_connection_unset_ip_address_changed_cb_p(void)
+{
+    int ret = connection_unset_ip_address_changed_cb(connection);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+    return 0;
+}
+
+int utc_connection_set_proxy_address_changed_cb_n(void)
+{
+       int ret;
+
+       if(all_features_not_supported){
+               ret = connection_set_proxy_address_changed_cb(connection, NULL, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_set_proxy_address_changed_cb(NULL, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_set_proxy_address_changed_cb(NULL, test_proxy_address_changed_cb, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_set_proxy_address_changed_cb(connection, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_set_proxy_address_changed_cb_p(void)
+{
+    int ret = connection_set_proxy_address_changed_cb(connection, test_proxy_address_changed_cb, NULL);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+    return 0;
+}
+
+int utc_connection_unset_proxy_address_changed_cb_n(void)
+{
+    int ret = connection_unset_proxy_address_changed_cb(NULL);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       }
+
+    return 0;
+}
+
+int utc_connection_unset_proxy_address_changed_cb_p(void)
+{
+    int ret = connection_unset_proxy_address_changed_cb(connection);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+    return 0;
+}
+
+int utc_connection_get_statistics_p(void)
+{
+    long long stat;
+
+    if(telephony_supported) {
+        int ret = connection_get_statistics(connection, CONNECTION_TYPE_CELLULAR, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_CELLULAR, CONNECTION_STATISTICS_TYPE_LAST_RECEIVED_DATA, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_CELLULAR, CONNECTION_STATISTICS_TYPE_TOTAL_SENT_DATA, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_CELLULAR, CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_get_statistics(connection, CONNECTION_TYPE_CELLULAR, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    if(wifi_supported) {    
+        int ret = connection_get_statistics(connection, CONNECTION_TYPE_WIFI, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_WIFI, CONNECTION_STATISTICS_TYPE_LAST_RECEIVED_DATA, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_WIFI, CONNECTION_STATISTICS_TYPE_TOTAL_SENT_DATA, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_WIFI, CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_get_statistics(connection, CONNECTION_TYPE_WIFI, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_get_statistics_n(void)
+{
+       int ret;
+    long long stat;
+
+       if(telephony_supported == false && wifi_supported == false){
+               ret = connection_get_statistics(NULL, -1, -1, NULL);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_get_statistics(NULL, -1, -1, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_statistics(connection, -1, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA, &stat);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_statistics(connection, -1, -1, &stat);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    if(telephony_supported) {
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_CELLULAR, -1, &stat);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_CELLULAR, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_CELLULAR, -1, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_CELLULAR, -1, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    if(wifi_supported) {
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_WIFI, -1, &stat);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_WIFI, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_WIFI, -1, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = connection_get_statistics(connection, CONNECTION_TYPE_WIFI, -1, &stat);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_reset_statistics_p(void)
+{
+    int ret = 0;
+    if(telephony_supported) {
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_CELLULAR, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_CELLULAR, CONNECTION_STATISTICS_TYPE_LAST_RECEIVED_DATA);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_CELLULAR, CONNECTION_STATISTICS_TYPE_TOTAL_SENT_DATA);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_CELLULAR, CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_CELLULAR, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    if(wifi_supported) {
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_WIFI, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_WIFI, CONNECTION_STATISTICS_TYPE_LAST_RECEIVED_DATA);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_WIFI, CONNECTION_STATISTICS_TYPE_TOTAL_SENT_DATA);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_WIFI, CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_WIFI, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_reset_statistics_n(void)
+{
+       int ret;
+       if(telephony_supported == false && wifi_supported == false){
+               ret = connection_reset_statistics(NULL, -1, -1);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_reset_statistics(NULL, -1, -1);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_reset_statistics(connection, -1, CONNECTION_STATISTICS_TYPE_LAST_SENT_DATA);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    if(telephony_supported) {
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_CELLULAR, -1);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        ret = connection_reset_statistics(connection, CONNECTION_TYPE_CELLULAR, -1);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_connection_add_route_n(void)
+{
+       int ret;
+
+       if(all_features_not_supported){
+               ret = connection_add_route(connection, NULL, NULL);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_add_route(NULL, NULL, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_add_route(NULL, "pdp0", "192.168.129.3");
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_add_route(connection, "pdp0", NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_add_route(connection, NULL, "192.168.129.3");
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_connection_add_route_p(void)
+{
+       int ret;
+       char* interface_name = NULL;
+       int service_type = CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET;
+
+       if(all_features_not_supported) {
+               ret = connection_add_route(connection, interface_name, "192.168.129.3");
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       test_get_any_profile(&profile_temp);
+       ret = connection_profile_get_network_interface_name(profile_temp, &interface_name);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+       ret = connection_add_route(connection, interface_name, "192.168.129.3");
+       FREE_RESOURCE(interface_name);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_remove_route_n(void)
+{
+       int ret;
+
+       if(all_features_not_supported){
+               ret = connection_remove_route(NULL, NULL, NULL);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_remove_route(NULL, NULL, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_remove_route(NULL, "pdp0", "192.168.129.3");
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_remove_route(connection, "pdp0", NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_add_route(connection, NULL, "192.168.129.3");
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_connection_remove_route_p(void)
+{
+       int ret;
+       char* interface_name = NULL;
+       int service_type = CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET;
+
+       if(all_features_not_supported) {
+               ret = connection_remove_route(connection, interface_name, "192.168.129.3");
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       test_get_any_profile(&profile_temp);
+       ret = connection_profile_get_network_interface_name(profile_temp, &interface_name);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+       ret = connection_remove_route(connection, interface_name, "192.168.129.3");
+       FREE_RESOURCE(interface_name);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_add_route_ipv6_n(void)
+{
+       int ret;
+
+       if(telephony_supported == false && wifi_supported == false && ethernet_supported == false){
+               ret = connection_add_route_ipv6(NULL, NULL, NULL, NULL);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_add_route_ipv6(NULL, NULL, NULL, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_add_route_ipv6(connection, NULL, "2001:db8:1:0::1", "fe80::");
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_add_route_ipv6(connection, NULL, NULL, "fe80::");
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_connection_add_route_ipv6_p(void)
+{
+       int ret;
+       char* interface_name = NULL;
+
+       if(telephony_supported == false && wifi_supported == false && ethernet_supported == false) {
+               ret = connection_add_route_ipv6(connection, interface_name, "2001:db8:1:0::1", "fe80::");
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       test_get_any_profile(&profile_temp);
+       connection_profile_get_network_interface_name(profile_temp, &interface_name);
+
+       ret = connection_add_route_ipv6(connection, interface_name, "2001:db8:1:0::1", "fe80::");
+       FREE_RESOURCE(interface_name);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_remove_route_ipv6_n(void)
+{
+       int ret;
+
+       if(all_features_not_supported){
+               ret = connection_remove_route_ipv6(NULL, NULL, NULL, NULL);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_remove_route_ipv6(NULL, NULL, NULL, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_remove_route_ipv6(connection, NULL, "2001:db8:1:0::1", "fe80::");
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       ret = connection_remove_route_ipv6(connection, NULL, NULL, "fe80::");
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_connection_remove_route_ipv6_p(void)
+{
+       int ret;
+       char* interface_name = NULL;
+
+       if(telephony_supported == false && wifi_supported == false && ethernet_supported == false) {
+               ret = connection_remove_route_ipv6(connection, interface_name, "2001:db8:1:0::1", "fe80::");
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       test_get_any_profile(&profile_temp);
+       connection_profile_get_network_interface_name(profile_temp, &interface_name);
+
+       ret = connection_remove_route_ipv6(connection, interface_name, "2001:db8:1:0::1", "fe80::");
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_get_profile_iterator_n(void)
+{
+       int ret;
+    connection_profile_iterator_h profile_iter;
+
+       if(all_features_not_supported){
+               ret = connection_get_profile_iterator(connection, 3, &profile_iter);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_get_profile_iterator(NULL, 3, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_profile_iterator(NULL, CONNECTION_ITERATOR_TYPE_CONNECTED, &profile_iter);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_get_profile_iterator(connection, 3, &profile_iter);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_get_profile_iterator_p(void)
+{
+       int ret;
+    connection_profile_iterator_h profile_iter;
+
+       if(all_features_not_supported){
+               ret = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_CONNECTED, &profile_iter);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_CONNECTED, &profile_iter);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+    ret = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_REGISTERED, &profile_iter);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_destroy_profile_iterator_n(void)
+{
+    int ret = connection_destroy_profile_iterator(NULL);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       }
+
+    return 0;
+}
+
+int utc_connection_destroy_profile_iterator_p(void)
+{
+       int ret;
+    connection_profile_iterator_h profile_iter = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_destroy_profile_iterator(profile_iter);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_CONNECTED, &profile_iter);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+    ret = connection_destroy_profile_iterator(profile_iter);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_connection_profile_iterator_has_next_n(void)
+{
+    int ret = connection_profile_iterator_has_next(NULL);
+       if(all_features_not_supported){
+               assert_eq(get_last_result(), CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, false);
+       }
+
+    return 0;
+}
+
+int utc_connection_profile_iterator_has_next_p(void)
+{
+       int ret;
+       connection_profile_iterator_h profile_iter = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_iterator_has_next(profile_iter);
+               assert_eq(get_last_result(), CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_REGISTERED, &profile_iter);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+       ret = connection_profile_iterator_has_next(profile_iter);
+       assert_eq(ret, true);
+       ret = connection_destroy_profile_iterator(profile_iter);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_profile_iterator_next_n(void)
+{
+    connection_profile_h profile_h;
+
+    int ret = connection_profile_iterator_next(NULL, &profile_h);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       }
+
+    return 0;
+}
+
+int utc_connection_profile_iterator_next_p(void)
+{
+       int ret;
+       connection_profile_iterator_h profile_iter = NULL;
+       connection_profile_h profile_h = NULL;
+
+       if(all_features_not_supported){
+               ret = connection_profile_iterator_next(profile_iter, &profile_h);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_get_profile_iterator(connection, CONNECTION_ITERATOR_TYPE_CONNECTED, &profile_iter);
+
+       while (connection_profile_iterator_has_next(profile_iter)) {
+               ret = connection_profile_iterator_next(profile_iter, &profile_h);
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_connection_add_profile_p(void)
+{
+    if(telephony_supported) {
+        int ret = connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, "Net", &profile_cellular);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+        ret = connection_profile_set_cellular_service_type(profile_cellular, CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+
+        ret = connection_add_profile(connection, profile_cellular);
+        assert_eq(ret, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_add_profile(connection, profile_cellular);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_connection_add_profile_n(void)
+{
+    connection_profile_h profile = NULL;
+
+    if(telephony_supported) {
+        int ret = connection_add_profile(NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_add_profile(NULL, &profile);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+        ret = connection_add_profile(connection, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_add_profile(NULL, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_connection_remove_profile_p(void)
+{
+       int ret;
+
+       if(!telephony_supported && !wifi_supported){
+               ret = connection_remove_profile(connection, profile_temp);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       test_get_any_profile(&profile_temp);
+       ret = connection_remove_profile(connection, profile_temp);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_remove_profile_n(void)
+{
+       int ret;
+       connection_profile_h profile = NULL;
+
+       if(!telephony_supported && !wifi_supported){
+               ret = connection_remove_profile(NULL, NULL);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_remove_profile(NULL, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_remove_profile(NULL, profile);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_remove_profile(connection, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_connection_update_profile_p(void)
+{
+       int ret = test_get_any_profile(&profile_temp);
+       connection_profile_type_e profile_type = CONNECTION_PROFILE_TYPE_CELLULAR;
+
+       if(!telephony_supported && !wifi_supported){
+               ret = connection_update_profile(connection, profile_temp);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert(profile_temp);
+       connection_profile_get_type(profile_temp, &profile_type);
+
+       if( profile_type == CONNECTION_PROFILE_TYPE_CELLULAR) {
+               ret = connection_profile_set_cellular_service_type(profile_temp, CONNECTION_CELLULAR_SERVICE_TYPE_MMS);
+       } else if (profile_type == CONNECTION_PROFILE_TYPE_WIFI) {
+               ret = connection_profile_set_wifi_passphrase(profile_temp, "keystring");
+       }
+
+       ret = connection_update_profile(connection, profile_temp);
+       assert_eq(ret, CONNECTION_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_connection_update_profile_n(void)
+{
+       int ret;
+       connection_profile_h profile = NULL;
+
+       if(!telephony_supported && !wifi_supported){
+               ret = connection_update_profile(NULL, NULL);
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       ret = connection_update_profile(NULL, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_update_profile(NULL, profile);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       ret = connection_update_profile(connection, NULL);
+       assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_connection_open_profile_p(void)
+{
+    connection_profile_h profile_h = NULL;
+    int ret = test_get_any_profile(&profile_h);
+
+       if(!telephony_supported && !wifi_supported && !bt_tethering_supported){
+               ret = connection_open_profile(connection, profile_temp, test_connection_opened_callback, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_h);
+       profile_temp = profile_h;
+    ret = connection_open_profile(connection, profile_temp, test_connection_opened_callback, NULL);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+    
+    return 0;
+}
+
+int utc_connection_open_profile_n(void)
+{
+       int ret;
+    connection_profile_h profile = NULL;
+
+       if(!telephony_supported && !wifi_supported && !bt_tethering_supported){
+               ret = connection_open_profile(NULL, NULL, NULL, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_open_profile(NULL, NULL, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_open_profile(NULL, profile, test_connection_opened_callback, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_open_profile(connection, profile, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_close_profile_p(void)
+{
+    connection_profile_h profile_h = NULL;
+    int ret = test_get_any_profile(&profile_h);
+
+       if(!telephony_supported && !wifi_supported && !bt_tethering_supported){
+               ret = connection_close_profile(connection, profile_temp, test_connection_closed_callback, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    assert(profile_h);
+    profile_temp = profile_h;
+    ret = connection_close_profile(connection, profile_temp, test_connection_closed_callback, NULL);
+    assert_eq(ret, CONNECTION_ERROR_NONE);
+    
+    return 0;
+}
+
+int utc_connection_close_profile_n(void)
+{
+       int ret;
+    connection_profile_h profile = NULL;
+
+       if(!telephony_supported && !wifi_supported && !bt_tethering_supported){
+               ret = connection_close_profile(NULL, NULL, NULL, NULL);
+           assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+    ret = connection_close_profile(NULL, NULL, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_open_profile(NULL, profile, test_connection_closed_callback, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    ret = connection_open_profile(connection, profile, NULL, NULL);
+    assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_connection_reset_profile_p(void)
+{
+    if(telephony_supported) {
+        g_pMainLoop = g_main_loop_new(NULL, false);
+        connection_reset_profile(connection, CONNECTION_RESET_DEFAULT_PROFILE, 0, test_connection_reset_profile_callback, NULL);
+        g_main_loop_run(g_pMainLoop);
+
+        assert_eq(g_CallbackRet, CONNECTION_ERROR_NONE);
+    } else {
+        int ret = connection_reset_profile(connection, CONNECTION_RESET_DEFAULT_PROFILE, 0, test_connection_reset_profile_callback, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_reset_profile_n(void)
+{
+    if(telephony_supported) {
+        int ret = connection_reset_profile(NULL, CONNECTION_RESET_DEFAULT_PROFILE, 0, test_connection_reset_profile_callback, NULL);
+        assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+    } else {
+        int ret = connection_reset_profile(NULL, CONNECTION_RESET_DEFAULT_PROFILE, 0, test_connection_reset_profile_callback, NULL);
+        assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_connection_destroy_p(void)
+{
+    int ret = connection_destroy(connection);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_NONE);
+       }
+
+    return 0;
+}
+
+int utc_connection_destroy_n(void)
+{
+    int ret = connection_destroy(NULL);
+
+       if(all_features_not_supported) {
+               assert_eq(ret, CONNECTION_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, CONNECTION_ERROR_INVALID_PARAMETER);
+       }
+
+    return 0;
+}
diff --git a/src/utc/context-manager/CMakeLists.txt b/src/utc/context-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..a1fef24
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "context-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "libcore-context-manager")
+SET(TC_SOURCES
+       utc-context-manager-activity.c
+       utc-context-manager-gesture.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-system-info
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       capi-system-info
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/context-manager/public.list b/src/utc/context-manager/public.list
new file mode 100755 (executable)
index 0000000..0404b57
--- /dev/null
@@ -0,0 +1,14 @@
+activity_create
+activity_get_accuracy
+activity_is_supported
+activity_release
+activity_start_recognition
+activity_stop_recognition
+gesture_create
+gesture_get_event
+gesture_get_tilt
+gesture_is_supported
+gesture_release
+gesture_start_recognition
+gesture_stop_recognition
+
diff --git a/src/utc/context-manager/tct-context-manager-core.c b/src/utc/context-manager/tct-context-manager-core.c
new file mode 100755 (executable)
index 0000000..38d15bb
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-context-manager-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/context-manager/tct-context-manager-core.h b/src/utc/context-manager/tct-context-manager-core.h
new file mode 100755 (executable)
index 0000000..b5bd3fb
--- /dev/null
@@ -0,0 +1,77 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_CONTEXT_MANAGER_CORE_H__
+#define __TCT_CONTEXT_MANAGER_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_context_manager_activity_startup(void);
+extern void utc_context_manager_activity_cleanup(void);
+extern void utc_context_manager_gesture_startup(void);
+extern void utc_context_manager_gesture_cleanup(void);
+
+extern int utc_context_manager_activity_is_supported_p(void);
+extern int utc_context_manager_activity_is_supported_n(void);
+extern int utc_context_manager_activity_create_p(void);
+extern int utc_context_manager_activity_create_n(void);
+extern int utc_context_manager_activity_release_p(void);
+extern int utc_context_manager_activity_release_n(void);
+extern int utc_context_manager_activity_start_recognition_p(void);
+extern int utc_context_manager_activity_start_recognition_n(void);
+extern int utc_context_manager_activity_stop_recognition_p(void);
+extern int utc_context_manager_activity_stop_recognition_n(void);
+extern int utc_context_manager_activity_get_accuracy_n(void);
+extern int utc_context_manager_gesture_is_supported_p(void);
+extern int utc_context_manager_gesture_is_supported_n(void);
+extern int utc_context_manager_gesture_create_p(void);
+extern int utc_context_manager_gesture_create_n(void);
+extern int utc_context_manager_gesture_release_p(void);
+extern int utc_context_manager_gesture_release_n(void);
+extern int utc_context_manager_gesture_start_recognition_p(void);
+extern int utc_context_manager_gesture_start_recognition_n(void);
+extern int utc_context_manager_gesture_stop_recognition_p(void);
+extern int utc_context_manager_gesture_stop_recognition_n(void);
+extern int utc_context_manager_gesture_get_event_n(void);
+extern int utc_context_manager_gesture_get_tilt_n(void);
+
+testcase tc_array[] = {
+    {"utc_context_manager_activity_is_supported_p", utc_context_manager_activity_is_supported_p, utc_context_manager_activity_startup, utc_context_manager_activity_cleanup},
+    {"utc_context_manager_activity_is_supported_n", utc_context_manager_activity_is_supported_n, utc_context_manager_activity_startup, utc_context_manager_activity_cleanup},
+    {"utc_context_manager_activity_create_p", utc_context_manager_activity_create_p, utc_context_manager_activity_startup, utc_context_manager_activity_cleanup},
+    {"utc_context_manager_activity_create_n", utc_context_manager_activity_create_n, utc_context_manager_activity_startup, utc_context_manager_activity_cleanup},
+    {"utc_context_manager_activity_release_p", utc_context_manager_activity_release_p, utc_context_manager_activity_startup, utc_context_manager_activity_cleanup},
+    {"utc_context_manager_activity_release_n", utc_context_manager_activity_release_n, utc_context_manager_activity_startup, utc_context_manager_activity_cleanup},
+    {"utc_context_manager_activity_start_recognition_p", utc_context_manager_activity_start_recognition_p, utc_context_manager_activity_startup, utc_context_manager_activity_cleanup},
+    {"utc_context_manager_activity_start_recognition_n", utc_context_manager_activity_start_recognition_n, utc_context_manager_activity_startup, utc_context_manager_activity_cleanup},
+    {"utc_context_manager_activity_stop_recognition_p", utc_context_manager_activity_stop_recognition_p, utc_context_manager_activity_startup, utc_context_manager_activity_cleanup},
+    {"utc_context_manager_activity_stop_recognition_n", utc_context_manager_activity_stop_recognition_n, utc_context_manager_activity_startup, utc_context_manager_activity_cleanup},
+    {"utc_context_manager_activity_get_accuracy_n", utc_context_manager_activity_get_accuracy_n, utc_context_manager_activity_startup, utc_context_manager_activity_cleanup},
+    {"utc_context_manager_gesture_is_supported_p", utc_context_manager_gesture_is_supported_p, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {"utc_context_manager_gesture_is_supported_n", utc_context_manager_gesture_is_supported_n, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {"utc_context_manager_gesture_create_p", utc_context_manager_gesture_create_p, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {"utc_context_manager_gesture_create_n", utc_context_manager_gesture_create_n, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {"utc_context_manager_gesture_release_p", utc_context_manager_gesture_release_p, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {"utc_context_manager_gesture_release_n", utc_context_manager_gesture_release_n, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {"utc_context_manager_gesture_start_recognition_p", utc_context_manager_gesture_start_recognition_p, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {"utc_context_manager_gesture_start_recognition_n", utc_context_manager_gesture_start_recognition_n, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {"utc_context_manager_gesture_stop_recognition_p", utc_context_manager_gesture_stop_recognition_p, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {"utc_context_manager_gesture_stop_recognition_n", utc_context_manager_gesture_stop_recognition_n, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {"utc_context_manager_gesture_get_event_n", utc_context_manager_gesture_get_event_n, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {"utc_context_manager_gesture_get_tilt_n", utc_context_manager_gesture_get_tilt_n, utc_context_manager_gesture_startup, utc_context_manager_gesture_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_CONTEXT_MANAGER_CORE_H__
diff --git a/src/utc/context-manager/utc-context-manager-activity.c b/src/utc/context-manager/utc-context-manager-activity.c
new file mode 100755 (executable)
index 0000000..57f31f8
--- /dev/null
@@ -0,0 +1,277 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <stdio.h>
+#include <activity_recognition.h>
+#include <system_info.h>
+
+
+//& set: ContextManager - Activity
+static bool support = false;
+static activity_h handle = NULL;
+static int is_supported = false;
+
+static void activity_cb(activity_type_e activity, const activity_data_h data, double timestamp, activity_error_e error, void *user_data)
+{
+}
+
+void utc_context_manager_activity_startup(void)
+{
+       system_info_get_platform_bool("http://tizen.org/feature/sensor.activity_recognition", &is_supported);
+       activity_is_supported(ACTIVITY_WALK, &support);
+       activity_create(&handle);
+}
+
+void utc_context_manager_activity_cleanup(void)
+{
+       if (handle) {
+               activity_release(handle);
+               handle = NULL;
+       }
+}
+
+
+//& purpose: Checks whether the given activity is recognizable or not.
+int utc_context_manager_activity_is_supported_p(void)
+{
+       int error = ACTIVITY_ERROR_NONE;
+       bool s;
+
+       error = activity_is_supported(ACTIVITY_WALK, &s);
+       if(is_supported)
+       {
+               assert(error == ACTIVITY_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Checks whether the given activity is recognizable with an invalid parameter.
+int utc_context_manager_activity_is_supported_n(void)
+{
+       int error = ACTIVITY_ERROR_NONE;
+
+       error = activity_is_supported(ACTIVITY_WALK, NULL);
+       if(is_supported)
+       {
+               assert_eq(error , ACTIVITY_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+//& purpose: Initializes a handle object for activity recognition.
+int utc_context_manager_activity_create_p(void)
+{
+       int error = ACTIVITY_ERROR_NONE;
+       activity_h h;
+
+       error = activity_create(&h);
+       if(is_supported)
+       {
+               assert_eq(error, ACTIVITY_ERROR_NONE);
+               activity_release(h);
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+//& purpose: Initializes a handle object for activity recognition with an invalid parameter
+int utc_context_manager_activity_create_n(void)
+{
+       int error = ACTIVITY_ERROR_NONE;
+
+       error = activity_create(NULL);
+       if(is_supported)
+       {
+               assert_eq(error, ACTIVITY_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+
+//& purpose: Releases resources allocated for the handle.
+int utc_context_manager_activity_release_p(void)
+{
+       int error = ACTIVITY_ERROR_NONE;
+       activity_h h;
+
+       activity_create(&h);
+
+       error = activity_release(h);
+       if(is_supported)
+       {
+               assert_eq(error, ACTIVITY_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Releases resources with an invalid parameter
+int utc_context_manager_activity_release_n(void)
+{
+       int error = ACTIVITY_ERROR_NONE;
+
+       error = activity_release(NULL);
+       if(is_supported)
+       {
+               assert_eq(error, ACTIVITY_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+
+//& purpose: Starts recognition
+int utc_context_manager_activity_start_recognition_p(void)
+{
+       int error = ACTIVITY_ERROR_NONE;
+
+       error = activity_start_recognition(handle, ACTIVITY_WALK, activity_cb, NULL);
+       if(is_supported)
+       {
+               if (support) {
+                       assert_eq(error, ACTIVITY_ERROR_NONE);
+                       activity_stop_recognition(handle);
+               } else {
+                       assert_eq(error, ACTIVITY_ERROR_NOT_SUPPORTED);
+               }
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Starts recognition with an invalid parameter
+int utc_context_manager_activity_start_recognition_n(void)
+{
+       int error = ACTIVITY_ERROR_NONE;
+
+       error = activity_start_recognition(handle, ACTIVITY_WALK, NULL, NULL);
+       if(is_supported)
+       {
+               assert_eq(error, ACTIVITY_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+
+       error = activity_start_recognition(NULL, ACTIVITY_WALK, activity_cb, NULL);
+       if(is_supported)
+       {
+               assert_eq(error, ACTIVITY_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+
+//& purpose: Stops recognition
+int utc_context_manager_activity_stop_recognition_p(void)
+{
+       int error = ACTIVITY_ERROR_NONE;
+
+       activity_start_recognition(handle, ACTIVITY_WALK, activity_cb, NULL);
+
+       error = activity_stop_recognition(handle);
+       if(is_supported)
+       {
+               if (support) {
+                       assert_eq(error, ACTIVITY_ERROR_NONE);
+               } else {
+                       assert_eq(error, ACTIVITY_ERROR_NOT_STARTED);
+               }
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Stops recogntion with an invalid parameter
+int utc_context_manager_activity_stop_recognition_n(void)
+{
+       int error = ACTIVITY_ERROR_NONE;
+
+       error = activity_stop_recognition(NULL);
+       if(is_supported)
+       {
+               assert_eq(error, ACTIVITY_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Gets the recognition accuracy
+int utc_context_manager_activity_get_accuracy_n(void)
+{
+       int error = ACTIVITY_ERROR_NONE;
+       activity_accuracy_e acc;
+       activity_data_h data = NULL;
+
+       error = activity_get_accuracy(NULL, &acc);
+       if(is_supported)
+       {
+               assert_eq(error, ACTIVITY_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+
+       error = activity_get_accuracy(data, NULL);
+       if(is_supported)
+       {
+               assert_eq(error, ACTIVITY_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , ACTIVITY_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
diff --git a/src/utc/context-manager/utc-context-manager-gesture.c b/src/utc/context-manager/utc-context-manager-gesture.c
new file mode 100755 (executable)
index 0000000..7c801fb
--- /dev/null
@@ -0,0 +1,336 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <stdio.h>
+#include <gesture_recognition.h>
+#include <system_info.h>
+
+//& set: ContextManager - Gesture
+static bool support = false;
+static gesture_type_e gesture_type = GESTURE_SHAKE;
+static gesture_h handle = NULL;
+static bool is_supported = false;
+
+
+//& purpose: Gesture callback function
+static void gesture_cb(gesture_type_e gesture, const gesture_data_h data, double timestamp, gesture_error_e error, void *user_data)
+{
+}
+
+
+void utc_context_manager_gesture_startup(void)
+{
+       system_info_get_platform_bool("http://tizen.org/feature/sensor.gesture_recognition", &is_supported);
+       gesture_is_supported(gesture_type, &support);
+       gesture_create(&handle);
+}
+
+void utc_context_manager_gesture_cleanup(void)
+{
+       if (handle) {
+               gesture_release(handle);
+               handle = NULL;
+       }
+}
+
+
+//& purpose: Checks whether the given gesture is supported or not.
+int utc_context_manager_gesture_is_supported_p(void)
+{
+       int error = GESTURE_ERROR_NONE;
+       bool s;
+
+       error = gesture_is_supported(gesture_type, &s);
+       if(is_supported)
+       {
+               assert(error == GESTURE_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Checks whether it is supported with an invalid parameter
+int utc_context_manager_gesture_is_supported_n(void)
+{
+       int error = GESTURE_ERROR_NONE;
+
+       error = gesture_is_supported(gesture_type, NULL);
+       if(is_supported)
+       {
+               assert(error == GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+
+//& purpose: Initializes a handle object for gesture recognition.
+int utc_context_manager_gesture_create_p(void)
+{
+       int error = GESTURE_ERROR_NONE;
+       gesture_h h;
+
+       error = gesture_create(&h);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_NONE);
+               gesture_release(h);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+//& purpose: Initializes a handle object with invalid parameter.
+int utc_context_manager_gesture_create_n(void)
+{
+       int error = GESTURE_ERROR_NONE;
+
+       error = gesture_create(NULL);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Releases resources allocated for the handle.
+int utc_context_manager_gesture_release_p(void)
+{
+       int error = GESTURE_ERROR_NONE;
+       gesture_h h;
+
+       gesture_create(&h);
+
+       error = gesture_release(h);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(error ,GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Releases resources with an invalid parameter
+int utc_context_manager_gesture_release_n(void)
+{
+       int error = GESTURE_ERROR_NONE;
+
+       error = gesture_release(NULL);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Starts recognition
+int utc_context_manager_gesture_start_recognition_p(void)
+{
+       int error = GESTURE_ERROR_NONE;
+
+       error = gesture_start_recognition(handle, gesture_type, GESTURE_OPTION_DEFAULT, gesture_cb, NULL);
+
+       if(is_supported)
+       {
+               if (support) {
+                       assert_eq(error, GESTURE_ERROR_NONE);
+                       gesture_stop_recognition(handle);
+               } else {
+                       assert_eq(error, GESTURE_ERROR_NOT_SUPPORTED);
+               }
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Starts recognition with invalid parameters
+int utc_context_manager_gesture_start_recognition_n(void)
+{
+       int error = GESTURE_ERROR_NONE;
+
+       error = gesture_start_recognition(NULL, gesture_type, GESTURE_OPTION_DEFAULT, gesture_cb, NULL);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+
+       error = gesture_start_recognition(handle, -1, GESTURE_OPTION_DEFAULT, gesture_cb, NULL);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       error = gesture_start_recognition(handle, gesture_type, -1, gesture_cb, NULL);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+
+       error = gesture_start_recognition(handle, gesture_type, GESTURE_OPTION_DEFAULT, NULL, NULL);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Stops recognition
+int utc_context_manager_gesture_stop_recognition_p(void)
+{
+       int error = GESTURE_ERROR_NONE;
+
+       gesture_start_recognition(handle, gesture_type, GESTURE_OPTION_DEFAULT, gesture_cb, NULL);
+
+       error = gesture_stop_recognition(handle);
+
+       if(is_supported)
+       {
+               if (support) {
+                       assert_eq(error, GESTURE_ERROR_NONE);
+               } else {
+                       assert_eq(error, GESTURE_ERROR_NOT_STARTED);
+               }
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Stops recognizing the gesture with invalid parameter
+int utc_context_manager_gesture_stop_recognition_n(void)
+{
+       int error = GESTURE_ERROR_NONE;
+
+       error = gesture_stop_recognition(NULL);
+
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+//& purpose: Gets a gesture event with invalid parameter
+int utc_context_manager_gesture_get_event_n(void)
+{
+       int error = GESTURE_ERROR_NONE;
+       gesture_event_e event;
+       gesture_data_h data = NULL;
+
+       error = gesture_get_event(NULL, &event);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       error = gesture_get_event(data, NULL);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+//& purpose: Gets tilting degrees with invalid parameter
+int utc_context_manager_gesture_get_tilt_n(void)
+{
+       int error = GESTURE_ERROR_NONE;
+       int tilt_x, tilt_y;
+       gesture_data_h data = NULL;
+
+       error = gesture_get_tilt(NULL, &tilt_x, &tilt_y);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       error = gesture_get_tilt(data, NULL, &tilt_y);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+
+       error = gesture_get_tilt(data, &tilt_x, NULL);
+       if(is_supported)
+       {
+               assert_eq(error, GESTURE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error , GESTURE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
diff --git a/src/utc/context-manager/utc-context-manager.c b/src/utc/context-manager/utc-context-manager.c
new file mode 100755 (executable)
index 0000000..c3cf51d
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <context-manager/context_motion.h>
+
+//& set: ContextManager
+
+void utc_context_manager_startup(void)
+{
+}
+
+void utc_context_manager_cleanup(void)
+{
+}
+
+
+//& purpose: A purpose of a first positive TC.
+int first_tc_p(void)
+{
+    return 0;
+}
+
+//& purpose: A purpose of a first negative TC.
+int first_tc_n(void)
+{
+    return 0;
+}
diff --git a/src/utc/data-control/CMakeLists.txt b/src/utc/data-control/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..10aabe0
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "data-control")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-data-control")
+SET(TC_SOURCES
+       utc-data-control-map.c
+       utc-data-control-sql.c
+       utc-data-control-provider.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       capi-base-common
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+       capi-base-common
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall ${EXTRA_CFLAGS} -fprofile-arcs -ftest-coverage")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/data-control/public.list b/src/utc/data-control/public.list
new file mode 100755 (executable)
index 0000000..0877df0
--- /dev/null
@@ -0,0 +1,58 @@
+data_control_map_add 
+data_control_map_create
+data_control_map_destroy
+data_control_map_get 
+data_control_map_get_data_id
+data_control_map_get_provider_id
+data_control_map_get_with_page
+data_control_map_register_response_cb
+data_control_map_remove
+data_control_map_set 
+data_control_map_set_data_id
+data_control_map_set_provider_id
+data_control_map_unregister_response_cb
+data_control_provider_create_delete_statement
+data_control_provider_create_insert_statement
+data_control_provider_create_select_statement
+data_control_provider_create_update_statement
+data_control_provider_get_client_appid
+data_control_provider_map_register_cb
+data_control_provider_map_unregister_cb
+data_control_provider_match_data_id
+data_control_provider_match_provider_id
+data_control_provider_send_delete_result
+data_control_provider_send_error
+data_control_provider_send_insert_result
+data_control_provider_send_map_get_value_result
+data_control_provider_send_map_result
+data_control_provider_send_select_result
+data_control_provider_send_update_result
+data_control_provider_sql_register_cb
+data_control_provider_sql_unregister_cb
+data_control_sql_create
+data_control_sql_delete 
+data_control_sql_destroy
+data_control_sql_get_blob_data
+data_control_sql_get_column_count
+data_control_sql_get_column_item_size
+data_control_sql_get_column_item_type
+data_control_sql_get_column_name
+data_control_sql_get_data_id
+data_control_sql_get_double_data
+data_control_sql_get_int_data
+data_control_sql_get_int64_data
+data_control_sql_get_provider_id
+data_control_sql_get_text_data
+data_control_sql_insert 
+data_control_sql_register_response_cb
+data_control_sql_select 
+data_control_sql_select_with_page
+data_control_sql_set_data_id
+data_control_sql_set_provider_id
+data_control_sql_step_first
+data_control_sql_step_last
+data_control_sql_step_next
+data_control_sql_step_previous
+data_control_sql_unregister_response_cb
+data_control_sql_update
+
diff --git a/src/utc/data-control/res/org.tizen.datacontrolprovider-1.0.0-arm.tpk b/src/utc/data-control/res/org.tizen.datacontrolprovider-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..67de878
Binary files /dev/null and b/src/utc/data-control/res/org.tizen.datacontrolprovider-1.0.0-arm.tpk differ
diff --git a/src/utc/data-control/res/org.tizen.datacontrolprovider-1.0.0-i386.tpk b/src/utc/data-control/res/org.tizen.datacontrolprovider-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..c09551d
Binary files /dev/null and b/src/utc/data-control/res/org.tizen.datacontrolprovider-1.0.0-i386.tpk differ
diff --git a/src/utc/data-control/tct-data-control-core.c b/src/utc/data-control/tct-data-control-core.c
new file mode 100755 (executable)
index 0000000..81a9253
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-data-control-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/data-control/tct-data-control-core.h b/src/utc/data-control/tct-data-control-core.h
new file mode 100755 (executable)
index 0000000..e506a14
--- /dev/null
@@ -0,0 +1,151 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_DATA_CONTROL_CORE_H__
+#define __TCT_DATA_CONTROL_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_data_control_map_startup(void);
+extern void utc_data_control_map_cleanup(void);
+extern void utc_data_control_sql_startup(void);
+extern void utc_data_control_sql_cleanup(void);
+
+extern int utc_data_control_map_create_p(void);
+extern int utc_data_control_map_create_n(void);
+extern int utc_data_control_map_destroy_p(void);
+extern int utc_data_control_map_destroy_n(void);
+extern int utc_data_control_map_set_provider_id_p(void);
+extern int utc_data_control_map_set_provider_id_n(void);
+extern int utc_data_control_map_get_provider_id_p(void);
+extern int utc_data_control_map_get_provider_id_n(void);
+extern int utc_data_control_map_set_data_id_p(void);
+extern int utc_data_control_map_set_data_id_n(void);
+extern int utc_data_control_map_get_data_id_p(void);
+extern int utc_data_control_map_get_data_id_n(void);
+extern int utc_data_control_map_register_response_cb_p(void);
+extern int utc_data_control_map_register_response_cb_n(void);
+extern int utc_data_control_map_unregister_response_cb_p(void);
+extern int utc_data_control_map_add_p(void);
+extern int utc_data_control_map_add_n(void);
+extern int utc_data_control_map_set_p(void);
+extern int utc_data_control_map_set_n(void);
+extern int utc_data_control_map_get_p(void);
+extern int utc_data_control_map_get_n(void);
+extern int utc_data_control_map_get_with_page_p(void);
+extern int utc_data_control_map_get_with_page_n(void);
+extern int utc_data_control_map_remove_p(void);
+extern int utc_data_control_map_remove_n(void);
+extern int utc_data_control_sql_create_p(void);
+extern int utc_data_control_sql_create_n(void);
+extern int utc_data_control_sql_destroy_p(void);
+extern int utc_data_control_sql_destroy_n(void);
+extern int utc_data_control_sql_set_provider_id_p(void);
+extern int utc_data_control_sql_set_provider_id_n(void);
+extern int utc_data_control_sql_get_provider_id_p(void);
+extern int utc_data_control_sql_get_provider_id_n(void);
+extern int utc_data_control_provider_match_provider_id_p(void);
+extern int utc_data_control_provider_match_provider_id_n(void);
+extern int utc_data_control_sql_set_data_id_p(void);
+extern int utc_data_control_sql_set_data_id_n(void);
+extern int utc_data_control_provider_match_data_id_p(void);
+extern int utc_data_control_provider_match_data_id_n(void);
+extern int utc_data_control_sql_get_data_id_p(void);
+extern int utc_data_control_sql_get_data_id_n(void);
+extern int utc_data_control_sql_register_response_cb_p(void);
+extern int utc_data_control_sql_register_response_cb_n(void);
+extern int utc_data_control_sql_unregister_response_cb_p(void);
+extern int utc_data_control_sql_insert_p(void);
+extern int utc_data_control_sql_insert_n(void);
+extern int utc_data_control_sql_update_p(void);
+extern int utc_data_control_sql_update_n(void);
+extern int utc_data_control_sql_select_p(void);
+extern int utc_data_control_sql_select_n(void);
+extern int utc_data_control_sql_select_with_page_p(void);
+extern int utc_data_control_sql_select_with_page_n(void);
+extern int utc_data_control_sql_delete_p(void);
+extern int utc_data_control_sql_delete_n(void);
+extern int utc_data_control_provider_sql_register_cb_p(void);
+extern int utc_data_control_provider_sql_register_cb_n(void);
+extern int utc_data_control_provider_sql_unregister_cb_p(void);
+extern int utc_data_control_provider_map_register_cb_p(void);
+extern int utc_data_control_provider_map_register_cb_n(void);
+extern int utc_data_control_provider_map_unregister_cb_p(void);
+
+testcase tc_array[] = {
+    {"utc_data_control_map_create_p", utc_data_control_map_create_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_create_n", utc_data_control_map_create_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_destroy_p", utc_data_control_map_destroy_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_destroy_n", utc_data_control_map_destroy_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_set_provider_id_p", utc_data_control_map_set_provider_id_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_set_provider_id_n", utc_data_control_map_set_provider_id_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_get_provider_id_p", utc_data_control_map_get_provider_id_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_get_provider_id_n", utc_data_control_map_get_provider_id_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_set_data_id_p", utc_data_control_map_set_data_id_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_set_data_id_n", utc_data_control_map_set_data_id_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_get_data_id_p", utc_data_control_map_get_data_id_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_get_data_id_n", utc_data_control_map_get_data_id_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_register_response_cb_p", utc_data_control_map_register_response_cb_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_register_response_cb_n", utc_data_control_map_register_response_cb_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_unregister_response_cb_p", utc_data_control_map_unregister_response_cb_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_add_p", utc_data_control_map_add_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_add_n", utc_data_control_map_add_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_set_p", utc_data_control_map_set_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_set_n", utc_data_control_map_set_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_get_p", utc_data_control_map_get_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_get_n", utc_data_control_map_get_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_get_with_page_p", utc_data_control_map_get_with_page_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_get_with_page_n", utc_data_control_map_get_with_page_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_remove_p", utc_data_control_map_remove_p, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_map_remove_n", utc_data_control_map_remove_n, utc_data_control_map_startup, utc_data_control_map_cleanup},
+    {"utc_data_control_sql_create_p", utc_data_control_sql_create_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_create_n", utc_data_control_sql_create_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_destroy_p", utc_data_control_sql_destroy_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_destroy_n", utc_data_control_sql_destroy_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_set_provider_id_p", utc_data_control_sql_set_provider_id_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_set_provider_id_n", utc_data_control_sql_set_provider_id_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_get_provider_id_p", utc_data_control_sql_get_provider_id_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_get_provider_id_n", utc_data_control_sql_get_provider_id_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_provider_match_provider_id_p", utc_data_control_provider_match_provider_id_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_provider_match_provider_id_n", utc_data_control_provider_match_provider_id_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_set_data_id_p", utc_data_control_sql_set_data_id_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_set_data_id_n", utc_data_control_sql_set_data_id_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_provider_match_data_id_p", utc_data_control_provider_match_data_id_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_provider_match_data_id_n", utc_data_control_provider_match_data_id_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_get_data_id_p", utc_data_control_sql_get_data_id_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_get_data_id_n", utc_data_control_sql_get_data_id_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_register_response_cb_p", utc_data_control_sql_register_response_cb_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_register_response_cb_n", utc_data_control_sql_register_response_cb_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_unregister_response_cb_p", utc_data_control_sql_unregister_response_cb_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_insert_p", utc_data_control_sql_insert_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_insert_n", utc_data_control_sql_insert_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_update_p", utc_data_control_sql_update_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_update_n", utc_data_control_sql_update_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_select_p", utc_data_control_sql_select_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_select_n", utc_data_control_sql_select_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_select_with_page_p", utc_data_control_sql_select_with_page_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_select_with_page_n", utc_data_control_sql_select_with_page_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_delete_p", utc_data_control_sql_delete_p, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_sql_delete_n", utc_data_control_sql_delete_n, utc_data_control_sql_startup, utc_data_control_sql_cleanup},
+    {"utc_data_control_provider_sql_register_cb_p", utc_data_control_provider_sql_register_cb_p, NULL, NULL},
+    {"utc_data_control_provider_sql_register_cb_n", utc_data_control_provider_sql_register_cb_n, NULL, NULL},
+    {"utc_data_control_provider_sql_unregister_cb_p", utc_data_control_provider_sql_unregister_cb_p, NULL, NULL},
+    {"utc_data_control_provider_map_register_cb_p", utc_data_control_provider_map_register_cb_p, NULL, NULL},
+    {"utc_data_control_provider_map_register_cb_n", utc_data_control_provider_map_register_cb_n, NULL, NULL},
+    {"utc_data_control_provider_map_unregister_cb_p", utc_data_control_provider_map_unregister_cb_p, NULL, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_DATA_CONTROL_CORE_H__
diff --git a/src/utc/data-control/utc-data-control-map.c b/src/utc/data-control/utc-data-control-map.c
new file mode 100755 (executable)
index 0000000..78a5de4
--- /dev/null
@@ -0,0 +1,472 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <data_control.h>
+
+#define PROVIDER_ID "http://tizen.org/datacontrol/provider/datacontrolprovider"
+#define MAP_DATA_ID "MapRepository"
+
+static const char *test_key = "wrong_key";
+static data_control_h g_provider;
+
+void utc_data_control_map_startup(void)
+{
+       int result = 0;
+
+       result = data_control_map_create(&g_provider);
+       if(result) {
+               printf("create error");
+       }
+
+       result = data_control_map_set_provider_id(g_provider, PROVIDER_ID);
+       if(result) {
+               printf("set provider id error");
+       }
+
+       result = data_control_map_set_data_id(g_provider, MAP_DATA_ID);
+       if(result) {
+               printf("set data id error");
+       }
+}
+
+void utc_data_control_map_cleanup(void)
+{
+       int result = 0;
+
+       result = data_control_map_destroy(g_provider);
+       if(result) {
+               printf("cleanup error");
+       }
+}
+
+
+static void get_response_cb(int request_id, data_control_h provider, char **result_value_list, int result_value_count, bool provider_result, const char *error, void *user_data)
+{
+       printf("get_response_cb");
+}
+
+static void set_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+{
+       printf("set_response_cb");
+}
+
+static void add_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+{
+       printf("add_response_cb");
+}
+
+static void remove_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+{
+       printf("remove_response_cb");
+}
+int utc_data_control_map_create_p(void)
+{
+       data_control_h provider;
+       int result = 0;
+
+       result = data_control_map_create(&provider);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_destroy(provider);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_create_n(void)
+{
+       int result = 0;
+
+       result = data_control_map_create(NULL);
+       assert_neq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_destroy_p(void)
+{
+       data_control_h provider;
+       int result = 0;
+
+       result = data_control_map_create(&provider);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_destroy(provider);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_destroy_n(void)
+{
+       data_control_h provider = NULL;
+       int result = 0;
+
+       result = data_control_map_destroy(provider);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_map_set_provider_id_p(void)
+{
+       int result = 0;
+
+       result = data_control_map_set_provider_id(g_provider, PROVIDER_ID);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_set_provider_id_n(void)
+{
+       int result = 0;
+
+       result = data_control_map_set_provider_id(g_provider, NULL);
+       assert_neq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_get_provider_id_p(void)
+{
+       char *provider_id;
+       int result = 0;
+
+       result = data_control_map_set_provider_id(g_provider, PROVIDER_ID);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_get_provider_id(g_provider, &provider_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+       assert(!strcmp(PROVIDER_ID, provider_id));
+
+       return 0;
+}
+
+int utc_data_control_map_get_provider_id_n(void)
+{
+       int result = 0;
+
+       result = data_control_map_get_provider_id(g_provider, NULL);
+       assert_neq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_set_data_id_p(void)
+{
+       int result = 0;
+
+       result = data_control_map_set_data_id(g_provider, MAP_DATA_ID);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_set_data_id_n(void)
+{
+       int result = 0;
+
+       result = data_control_map_set_provider_id(g_provider, NULL);
+       assert_neq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_get_data_id_p(void)
+{
+       char *data_id;
+       int result = 0;
+
+       result = data_control_map_set_data_id(g_provider, MAP_DATA_ID);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_get_data_id(g_provider, &data_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+       assert(!strcmp(data_id, MAP_DATA_ID));
+
+       return 0;
+}
+
+int utc_data_control_map_get_data_id_n(void)
+{
+       int result = 0;
+
+       result = data_control_map_set_data_id(g_provider, MAP_DATA_ID);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_get_data_id(g_provider, NULL);
+       assert_neq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_register_response_cb_p(void)
+{
+       data_control_map_response_cb *map_callback;
+       int result = 0;
+
+       map_callback = (data_control_map_response_cb *) malloc(sizeof(data_control_map_response_cb));
+       assert(map_callback);
+
+       map_callback->get_cb = get_response_cb;
+       map_callback->add_cb = add_response_cb;
+       map_callback->remove_cb = remove_response_cb;
+       map_callback->set_cb = set_response_cb;
+
+       result = data_control_map_register_response_cb(g_provider, map_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       free(map_callback);
+
+       return 0;
+}
+
+int utc_data_control_map_register_response_cb_n(void)
+{
+       int result = 0;
+
+       result = data_control_map_register_response_cb(g_provider, NULL, NULL);
+       assert_neq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_unregister_response_cb_p(void)
+{
+       data_control_map_response_cb *map_callback;
+       int result = 0;
+
+       map_callback = (data_control_map_response_cb *) malloc(sizeof(data_control_map_response_cb));
+       assert(map_callback);
+
+       map_callback->get_cb = get_response_cb;
+       map_callback->add_cb = add_response_cb;
+       map_callback->remove_cb = remove_response_cb;
+       map_callback->set_cb = set_response_cb;
+
+       result = data_control_map_register_response_cb(g_provider, map_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_unregister_response_cb(g_provider);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       free(map_callback);
+
+       return 0;
+}
+
+int utc_data_control_map_add_p(void)
+{
+       int result = 0;
+       int req_id;
+       data_control_map_response_cb *map_callback;
+       const char *val = "old_value";
+
+       map_callback = (data_control_map_response_cb *) malloc(sizeof(data_control_map_response_cb));
+       assert(map_callback);
+
+       map_callback->get_cb = get_response_cb;
+       map_callback->add_cb = add_response_cb;
+       map_callback->remove_cb = remove_response_cb;
+       map_callback->set_cb = set_response_cb;
+
+       result = data_control_map_register_response_cb(g_provider, map_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_add(g_provider, test_key, val, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       free(map_callback);
+
+       return 0;
+}
+
+int utc_data_control_map_add_n(void)
+{
+       int result = 0;
+       int req_id;
+       const char *val = "old_value";
+
+       result = data_control_map_add(NULL, test_key, val, &req_id);
+       assert_neq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_set_p(void)
+{
+       int result = 0;
+       int req_id;
+       const char *old_val = "old_value";
+       const char *new_val = "new_value";
+
+       data_control_map_response_cb *map_callback;
+
+       map_callback = (data_control_map_response_cb *) malloc(sizeof(data_control_map_response_cb));
+       assert(map_callback);
+
+       map_callback->get_cb = get_response_cb;
+       map_callback->add_cb = add_response_cb;
+       map_callback->remove_cb = remove_response_cb;
+       map_callback->set_cb = set_response_cb;
+
+       result = data_control_map_register_response_cb(g_provider, map_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_set(g_provider, test_key, old_val, new_val, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       free(map_callback);
+
+       return 0;
+}
+
+int utc_data_control_map_set_n(void)
+{
+       int result = 0;
+       int req_id;
+       const char *old_val = "old_value";
+       const char *new_val = "new_value";
+
+       result = data_control_map_set(NULL, test_key, old_val, new_val, &req_id);
+       assert_neq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_get_p(void)
+{
+       int result = 0;
+       int req_id;
+       const char *val = "old_value";
+
+       data_control_map_response_cb *map_callback;
+
+       map_callback = (data_control_map_response_cb *) malloc(sizeof(data_control_map_response_cb));
+       assert(map_callback);
+
+       map_callback->get_cb = get_response_cb;
+       map_callback->add_cb = add_response_cb;
+       map_callback->remove_cb = remove_response_cb;
+       map_callback->set_cb = set_response_cb;
+
+       result = data_control_map_register_response_cb(g_provider, map_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_add(g_provider, test_key, val, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_get(g_provider, test_key, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       free(map_callback);
+
+       return 0;
+}
+
+int utc_data_control_map_get_n(void)
+{
+       int result = 0;
+       int req_id;
+
+       result = data_control_map_get(NULL, test_key, &req_id);
+       assert_neq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_get_with_page_p(void)
+{
+       int result = 0;
+       int req_id;
+
+       const char *val = "old_value";
+       data_control_map_response_cb *map_callback;
+
+       map_callback = (data_control_map_response_cb *) malloc(sizeof(data_control_map_response_cb));
+       assert(map_callback);
+
+       map_callback->get_cb = get_response_cb;
+       map_callback->add_cb = add_response_cb;
+       map_callback->remove_cb = remove_response_cb;
+       map_callback->set_cb = set_response_cb;
+
+       result = data_control_map_register_response_cb(g_provider, map_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_add(g_provider, test_key, val, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_get_with_page(g_provider, test_key, &req_id, 1, 20);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       free(map_callback);
+       return 0;
+}
+
+int utc_data_control_map_get_with_page_n(void)
+{
+       int result = 0;
+       int req_id;
+
+       result = data_control_map_get_with_page(NULL, test_key, &req_id, 1, 20);
+       assert_neq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_map_remove_p(void)
+{
+       int result = 0;
+       int req_id;
+       const char *val = "old_value";
+
+       data_control_map_response_cb *map_callback;
+
+       map_callback = (data_control_map_response_cb *) malloc(sizeof(data_control_map_response_cb));
+       assert(map_callback);
+
+       map_callback->get_cb = get_response_cb;
+       map_callback->add_cb = add_response_cb;
+       map_callback->remove_cb = remove_response_cb;
+       map_callback->set_cb = set_response_cb;
+
+       result = data_control_map_register_response_cb(g_provider, map_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_add(g_provider, test_key, val, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_map_remove(g_provider, test_key, val, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       free(map_callback);
+
+       return 0;
+}
+
+int utc_data_control_map_remove_n(void)
+{
+       int result = 0;
+       int req_id;
+       const char *val = "old_value";
+
+       result = data_control_map_remove(NULL, test_key, val, &req_id);
+       assert_neq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
diff --git a/src/utc/data-control/utc-data-control-provider.c b/src/utc/data-control/utc-data-control-provider.c
new file mode 100755 (executable)
index 0000000..3fbdfb7
--- /dev/null
@@ -0,0 +1,134 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <data_control.h>
+
+static data_control_provider_sql_cb *sql_callback;
+static data_control_provider_map_cb *map_callback;
+
+static void insert_request_cb(int request_id, data_control_h provider, bundle *insert_data, void *user_data)
+{
+}
+
+static void delete_request_cb(int request_id, data_control_h provider, const char *where, void *user_data)
+{
+}
+
+static void select_request_cb(int request_id, data_control_h provider, const char **column_list, int column_count, const char *where, const char *order, void *user_data)
+{
+
+}
+
+static void update_request_cb(int request_id, data_control_h provider, bundle *update_data, const char *where, void *user_data)
+{
+
+}
+
+static void get_value_request_cb(int request_id, data_control_h provider, const char *key, void *user_data)
+{
+
+}
+
+static void set_value_request_cb(int request_id, data_control_h provider, const char *key, const char *old_value, const char *new_value, void *user_data)
+{
+
+}
+
+static void add_value_request_cb(int request_id, data_control_h provider, const char *key, const char *value, void *user_data)
+{
+
+}
+
+static void remove_value_request_cb(int request_id, data_control_h provider, const char *key, const char *value, void *user_data)
+{
+
+}
+
+
+int utc_data_control_provider_sql_register_cb_p(void)
+{
+       int ret;
+
+       sql_callback = (data_control_provider_sql_cb *) malloc(sizeof(data_control_provider_sql_cb));
+       sql_callback->select_cb = select_request_cb;
+       sql_callback->insert_cb = insert_request_cb;
+       sql_callback->delete_cb = delete_request_cb;
+       sql_callback->update_cb = update_request_cb;
+
+       ret = data_control_provider_sql_register_cb(sql_callback, NULL);
+       assert_eq(ret, DATA_CONTROL_ERROR_NONE);
+       free(sql_callback);
+
+       return 0;
+}
+
+int utc_data_control_provider_sql_register_cb_n(void)
+{
+       int ret;
+
+       ret = data_control_provider_sql_register_cb(NULL, NULL);
+       assert_neq(ret, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_provider_sql_unregister_cb_p(void)
+{
+       int ret;
+
+       ret = data_control_provider_sql_unregister_cb();
+       assert_eq(ret, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_provider_map_register_cb_p(void)
+{
+       int ret;
+
+       map_callback = (data_control_provider_map_cb *) malloc(sizeof(data_control_provider_map_cb));
+       map_callback->get_cb = get_value_request_cb;
+       map_callback->add_cb = add_value_request_cb;
+       map_callback->remove_cb = remove_value_request_cb;
+       map_callback->set_cb = set_value_request_cb;
+
+       ret = data_control_provider_map_register_cb(map_callback, NULL);
+       assert_eq(ret, DATA_CONTROL_ERROR_NONE);
+       free(map_callback);
+
+       return 0;
+}
+
+int utc_data_control_provider_map_register_cb_n(void)
+{
+       int ret;
+
+       ret = data_control_provider_map_register_cb(NULL, NULL);
+       assert_neq(ret, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_provider_map_unregister_cb_p(void)
+{
+       int ret;
+
+       ret = data_control_provider_map_unregister_cb();
+       assert_eq(ret, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
diff --git a/src/utc/data-control/utc-data-control-sql.c b/src/utc/data-control/utc-data-control-sql.c
new file mode 100755 (executable)
index 0000000..345b362
--- /dev/null
@@ -0,0 +1,627 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <data_control.h>
+#include <data_control_sql.h>
+#include <bundle.h>
+#include <string.h>
+
+#define PROVIDER_ID "http://tizen.org/datacontrol/provider/datacontrolprovider"
+#define PROVIDER_ID2 "http://tizen.org/datacontrol/provider/datacontrolprovider2"
+#define SQL_DATA_ID "SqlRepository"
+#define SQL_DATA_ID2 "SqlRepository2"
+
+#define MAX_WHERE_LEN 40
+#define MAX_VALUE_LEN 16
+
+static data_control_h g_provider;
+const char* insert_row_list[2][2];
+
+static long long row_id;
+static long long last_id;
+
+void utc_data_control_sql_startup(void)
+{
+       int result = 0;
+
+       result = data_control_sql_create(&g_provider);
+       if(result) {
+               printf("startup error");
+       }
+
+       insert_row_list[0][0] = "'word_0'";
+       insert_row_list[1][0] = "'word_1'";
+       insert_row_list[0][1] = "'word_0 initially'";
+       insert_row_list[1][1] = "'word_1 initially'";
+
+       result = data_control_sql_set_provider_id(g_provider, PROVIDER_ID);
+       if(result) {
+               printf("set provider id error");
+       }
+
+       result = data_control_sql_set_data_id(g_provider, SQL_DATA_ID);
+       if(result) {
+               printf("set data id error");
+       }
+}
+
+void utc_data_control_sql_cleanup(void)
+{
+       int result = 0;
+
+       result = data_control_sql_destroy(g_provider);
+       if(result) {
+               printf("cleanup error");
+       }
+}
+static void insert_response_cb(int request_id, data_control_h provider, long long inserted_row_id, bool provider_result, const char *error, void *user_data)
+{
+       if (provider_result) {
+               row_id = inserted_row_id;
+               last_id++;
+               printf("PASS: last inserted row_id is %lld", inserted_row_id);
+       }
+       else {
+               printf("FAILED: %s", error);
+       }
+}
+
+static void delete_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+{
+       if (provider_result) {
+               row_id--;
+               last_id--;
+       }
+       printf("delete_response_cb");
+}
+
+static void select_response_cb(int request_id, data_control_h provider, result_set_cursor enumerator, bool provider_result, const char *error, void *user_data)
+{
+       printf("select_response_cb");
+}
+
+static void update_response_cb(int request_id, data_control_h provider, bool provider_result, const char *error, void *user_data)
+{
+       printf("update_response_cb");
+}
+
+int utc_data_control_sql_create_p(void)
+{
+       data_control_h provider;
+       int result = 0;
+
+       result = data_control_sql_create(&provider);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_destroy(provider);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_sql_create_n(void)
+{
+       int result = 0;
+
+       result = data_control_sql_create(NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_sql_destroy_p(void)
+{
+       data_control_h provider;
+       int result = 0;
+
+       result = data_control_sql_create(&provider);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_destroy(provider);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_sql_destroy_n(void)
+{
+       data_control_h provider = NULL;
+       int result = 0;
+
+       result = data_control_sql_destroy(provider);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_sql_set_provider_id_p(void)
+{
+       int result = 0;
+
+       result = data_control_sql_set_provider_id(g_provider, PROVIDER_ID);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_sql_set_provider_id_n(void)
+{
+       int result = 0;
+
+       result = data_control_sql_set_provider_id(g_provider, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_sql_get_provider_id_p(void)
+{
+       char *provider_id;
+       int result = 0;
+
+       result = data_control_sql_set_provider_id(g_provider, PROVIDER_ID);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_get_provider_id(g_provider, &provider_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+       assert(!strcmp(PROVIDER_ID, provider_id));
+
+       return 0;
+}
+
+int utc_data_control_sql_get_provider_id_n(void)
+{
+       int result = 0;
+
+       result = data_control_sql_get_provider_id(g_provider, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_provider_match_provider_id_p(void)
+{
+       bool result = false;
+       int ret = 0;
+
+       ret = data_control_sql_set_provider_id(g_provider, PROVIDER_ID);
+       assert_eq(ret, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_provider_match_provider_id(g_provider, PROVIDER_ID);
+       assert_eq(get_last_result(), DATA_CONTROL_ERROR_NONE);
+       assert(result);
+
+       return 0;
+}
+
+int utc_data_control_provider_match_provider_id_n(void)
+{
+
+       bool result = false;
+       int ret = 0;
+
+       ret = data_control_sql_set_provider_id(g_provider, PROVIDER_ID);
+       assert_eq(ret, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_provider_match_provider_id(g_provider, PROVIDER_ID2);
+       assert_eq(get_last_result(), DATA_CONTROL_ERROR_NONE);
+       assert(!result);
+
+       return 0;
+}
+
+int utc_data_control_sql_set_data_id_p(void)
+{
+       int result = 0;
+
+       result = data_control_sql_set_data_id(g_provider, SQL_DATA_ID);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_sql_set_data_id_n(void)
+{
+       int result = 0;
+
+       result = data_control_sql_set_provider_id(g_provider, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_provider_match_data_id_p(void)
+{
+       bool result = false;
+       int ret = 0;
+
+       ret = data_control_sql_set_provider_id(g_provider, PROVIDER_ID);
+       assert_eq(ret, DATA_CONTROL_ERROR_NONE);
+
+       ret = data_control_sql_set_data_id(g_provider, SQL_DATA_ID);
+       assert_eq(ret, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_provider_match_data_id(g_provider, SQL_DATA_ID);
+       assert(result);
+
+       return 0;
+}
+
+int utc_data_control_provider_match_data_id_n(void)
+{
+       bool result = false;
+       int ret = 0;
+
+       ret = data_control_sql_set_provider_id(g_provider, PROVIDER_ID);
+       assert_eq(ret, DATA_CONTROL_ERROR_NONE);
+
+       ret = data_control_sql_set_data_id(g_provider, SQL_DATA_ID);
+       assert_eq(ret, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_provider_match_data_id(g_provider, SQL_DATA_ID2);
+       assert_eq(get_last_result(), DATA_CONTROL_ERROR_NONE);
+       assert(!result);
+
+       return 0;
+}
+
+int utc_data_control_sql_get_data_id_p(void)
+{
+       char *data_id;
+       int result = 0;
+
+       result = data_control_sql_set_data_id(g_provider, SQL_DATA_ID);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_get_data_id(g_provider, &data_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+       assert(!strcmp(data_id, SQL_DATA_ID));
+       free(data_id);
+
+       return 0;
+}
+
+int utc_data_control_sql_get_data_id_n(void)
+{
+       int result = 0;
+
+       result = data_control_sql_set_data_id(g_provider, SQL_DATA_ID);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_get_data_id(g_provider, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_sql_register_response_cb_p(void)
+{
+       int result = 0;
+
+       data_control_sql_response_cb sql_callback;
+
+       sql_callback.insert_cb = insert_response_cb;
+       sql_callback.delete_cb = update_response_cb;
+       sql_callback.update_cb = update_response_cb;
+       sql_callback.select_cb = select_response_cb;
+
+       result = data_control_sql_register_response_cb(g_provider, &sql_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_sql_register_response_cb_n(void)
+{
+       int result = 0;
+
+       result = data_control_sql_register_response_cb(g_provider, NULL, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_sql_unregister_response_cb_p(void)
+{
+       int result = 0;
+
+       data_control_sql_response_cb sql_callback;
+
+       sql_callback.insert_cb = insert_response_cb;
+       sql_callback.delete_cb = update_response_cb;
+       sql_callback.update_cb = update_response_cb;
+       sql_callback.select_cb = select_response_cb;
+
+       result = data_control_sql_register_response_cb(g_provider, &sql_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_unregister_response_cb(g_provider);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_sql_insert_p(void)
+{
+       int req_id;
+       int result;
+       char word_len[MAX_VALUE_LEN] = {0,};
+       char word_desc_len[MAX_VALUE_LEN] = {0};
+       snprintf(word_len, MAX_VALUE_LEN, "%d", strlen(insert_row_list[row_id][0]));
+       snprintf(word_desc_len, MAX_VALUE_LEN, "%d", strlen(insert_row_list[row_id][1]) - 2);
+
+       bundle *b = bundle_create();
+       bundle_add_str(b, "WORD", insert_row_list[row_id][0]);
+       bundle_add_str(b, "WORD_DESC", insert_row_list[row_id][1]);
+       bundle_add_str(b, "WORD_LEN", word_len);
+       bundle_add_str(b, "WORD_DESC_LEN", word_desc_len);
+       bundle_add_str(b, "WORD_STATUS", "0");
+
+
+       data_control_sql_response_cb sql_callback;
+
+       sql_callback.insert_cb = insert_response_cb;
+       sql_callback.delete_cb = update_response_cb;
+       sql_callback.update_cb = update_response_cb;
+       sql_callback.select_cb = select_response_cb;
+
+       result = data_control_sql_register_response_cb(g_provider, &sql_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_insert(g_provider, b, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_sql_insert_n(void)
+{
+       int result = 0;
+       int req_id;
+
+       result = data_control_sql_insert(NULL, NULL, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_sql_update_p(void)
+{
+
+       int req_id;
+       int result;
+       char where[MAX_WHERE_LEN];
+       char word_len[MAX_VALUE_LEN] = {0,};
+       char word_desc_len[MAX_VALUE_LEN] = {0};
+
+       snprintf(word_len, MAX_VALUE_LEN, "%d", strlen(insert_row_list[row_id][0]));
+       snprintf(word_desc_len, MAX_VALUE_LEN, "%d", strlen(insert_row_list[row_id][1]) - 2);
+
+       bundle *b = bundle_create();
+       bundle_add_str(b, "WORD", insert_row_list[row_id][0]);
+       bundle_add_str(b, "WORD_DESC", insert_row_list[row_id][1]);
+       bundle_add_str(b, "WORD_LEN", word_len);
+       bundle_add_str(b, "WORD_DESC_LEN", word_desc_len);
+       bundle_add_str(b, "WORD_STATUS", "0");
+
+       memset(where, 0, MAX_WHERE_LEN);
+       snprintf(where, MAX_WHERE_LEN, "rowid=%lld", last_id);
+
+       bundle *b2 = bundle_create();
+       bundle_add_str(b2, "WRONG_WORD_DESC", "'wrong value'");
+
+       data_control_sql_response_cb sql_callback;
+
+       sql_callback.insert_cb = insert_response_cb;
+       sql_callback.delete_cb = update_response_cb;
+       sql_callback.update_cb = update_response_cb;
+       sql_callback.select_cb = select_response_cb;
+
+       result = data_control_sql_register_response_cb(g_provider, &sql_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_insert(g_provider, b, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_update(g_provider, b2, where, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_sql_update_n(void)
+{
+       int result = 0;
+       int req_id;
+
+       result = data_control_sql_update(NULL, NULL, NULL, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_sql_select_p(void)
+{
+       char* collist[5];
+       collist[0] = "WORD";
+       collist[1] = "WORD_DESC";
+       collist[2] = "WORD_LEN";
+       collist[3] = "WORD_DESC_LEN";
+       collist[4] = "WORD_STATUS";
+
+       int req_id;
+       int result;
+       char where[MAX_WHERE_LEN];
+       char word_len[MAX_VALUE_LEN] = {0,};
+       char word_desc_len[MAX_VALUE_LEN] = {0};
+       char *order = "WORD ASC";
+
+       memset(where, 0, MAX_WHERE_LEN);
+
+       snprintf(where, MAX_WHERE_LEN, "rowid<%lld", row_id);
+
+       snprintf(word_len, MAX_VALUE_LEN, "%d", strlen(insert_row_list[row_id][0]));
+       snprintf(word_desc_len, MAX_VALUE_LEN, "%d", strlen(insert_row_list[row_id][1]) - 2);
+
+       bundle *b = bundle_create();
+       bundle_add_str(b, collist[0], insert_row_list[row_id][0]);
+       bundle_add_str(b, collist[1], insert_row_list[row_id][1]);
+       bundle_add_str(b, collist[2], word_len);
+       bundle_add_str(b, collist[3], word_desc_len);
+       bundle_add_str(b, collist[4], "0");
+
+       data_control_sql_response_cb sql_callback;
+
+       sql_callback.insert_cb = insert_response_cb;
+       sql_callback.delete_cb = update_response_cb;
+       sql_callback.update_cb = update_response_cb;
+       sql_callback.select_cb = select_response_cb;
+
+       result = data_control_sql_register_response_cb(g_provider, &sql_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_insert(g_provider, b, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_select(g_provider, collist, 5, where, order, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_sql_select_n(void)
+{
+       int result = 0;
+       int req_id;
+
+       result = data_control_sql_select(NULL, NULL, 5, NULL, NULL, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_sql_select_with_page_p(void)
+{
+       char* collist[5];
+       collist[0] = "WORD";
+       collist[1] = "WORD_DESC";
+       collist[2] = "WORD_LEN";
+       collist[3] = "WORD_DESC_LEN";
+       collist[4] = "WORD_STATUS";
+
+       int req_id;
+       int result;
+       char word_len[MAX_VALUE_LEN] = {0,};
+       char word_desc_len[MAX_VALUE_LEN] = {0};
+       char *order = "WORD ASC";
+
+       snprintf(word_len, MAX_VALUE_LEN, "%d", strlen(insert_row_list[row_id][0]));
+       snprintf(word_desc_len, MAX_VALUE_LEN, "%d", strlen(insert_row_list[row_id][1]) - 2);
+
+       bundle *b = bundle_create();
+       bundle_add_str(b, collist[0], insert_row_list[row_id][0]);
+       bundle_add_str(b, collist[1], insert_row_list[row_id][1]);
+       bundle_add_str(b, collist[2], word_len);
+       bundle_add_str(b, collist[3], word_desc_len);
+       bundle_add_str(b, collist[4], "0");
+
+       data_control_sql_response_cb sql_callback;
+
+       sql_callback.insert_cb = insert_response_cb;
+       sql_callback.delete_cb = update_response_cb;
+       sql_callback.update_cb = update_response_cb;
+       sql_callback.select_cb = select_response_cb;
+
+       result = data_control_sql_register_response_cb(g_provider, &sql_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_insert(g_provider, b, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_select_with_page(g_provider, collist, 5, NULL, order, 1, 5, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_sql_select_with_page_n(void)
+{
+       int result = 0;
+       int req_id;
+
+       result = data_control_sql_select_with_page(NULL, NULL, 5, NULL, "WORD ASC", 1, 5, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_data_control_sql_delete_p(void)
+{
+       char* collist[5];
+       collist[0] = "WORD";
+       collist[1] = "WORD_DESC";
+       collist[2] = "WORD_LEN";
+       collist[3] = "WORD_DESC_LEN";
+       collist[4] = "WORD_STATUS";
+
+       int req_id;
+       int result;
+       char word_len[MAX_VALUE_LEN] = {0,};
+       char word_desc_len[MAX_VALUE_LEN] = {0};
+       char where[MAX_WHERE_LEN];
+
+       snprintf(word_len, MAX_VALUE_LEN, "%d", strlen(insert_row_list[row_id][0]));
+       snprintf(word_desc_len, MAX_VALUE_LEN, "%d", strlen(insert_row_list[row_id][1]) - 2);
+
+       memset(where, 0, MAX_WHERE_LEN);
+       snprintf(where, MAX_WHERE_LEN, "rowid=%lld", row_id);
+
+       bundle *b = bundle_create();
+       bundle_add_str(b, collist[0], insert_row_list[row_id][0]);
+       bundle_add_str(b, collist[1], insert_row_list[row_id][1]);
+       bundle_add_str(b, collist[2], word_len);
+       bundle_add_str(b, collist[3], word_desc_len);
+       bundle_add_str(b, collist[4], "0");
+
+       data_control_sql_response_cb sql_callback;
+
+       sql_callback.insert_cb = insert_response_cb;
+       sql_callback.delete_cb = update_response_cb;
+       sql_callback.update_cb = update_response_cb;
+       sql_callback.select_cb = select_response_cb;
+
+       result = data_control_sql_register_response_cb(g_provider, &sql_callback, NULL);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_insert(g_provider, b, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       result = data_control_sql_delete(g_provider, where, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_data_control_sql_delete_n(void)
+{
+       int result = 0;
+       int req_id;
+
+       result = data_control_sql_delete(NULL, NULL, &req_id);
+       assert_eq(result, DATA_CONTROL_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
diff --git a/src/utc/device/CMakeLists.txt b/src/utc/device/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..dedf180
--- /dev/null
@@ -0,0 +1,39 @@
+SET(PKG_NAME "device")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-system-device")
+SET(TC_SOURCES
+       utc-system-device-battery.c
+       utc-system-device-callback.c
+       utc-system-device-display.c
+       utc-system-device-haptic.c
+       utc-system-device-led.c
+       utc-system-device-power.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-system-info
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/device/public.list b/src/utc/device/public.list
new file mode 100755 (executable)
index 0000000..2774d08
--- /dev/null
@@ -0,0 +1,25 @@
+device_add_callback 
+device_battery_get_level_status
+device_battery_get_percent
+device_battery_is_charging
+device_display_change_state
+device_display_get_brightness 
+device_display_get_max_brightness 
+device_display_get_numbers 
+device_display_get_state
+device_display_set_brightness 
+device_flash_get_brightness 
+device_flash_get_max_brightness 
+device_flash_set_brightness 
+device_haptic_close 
+device_haptic_get_count 
+device_haptic_open 
+device_haptic_stop 
+device_haptic_vibrate 
+device_led_play_custom 
+device_led_stop_custom 
+device_power_release_lock 
+device_power_request_lock 
+device_power_wakeup 
+device_remove_callback 
+
diff --git a/src/utc/device/tct-device-core.c b/src/utc/device/tct-device-core.c
new file mode 100755 (executable)
index 0000000..83c562c
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-device-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/device/tct-device-core.h b/src/utc/device/tct-device-core.h
new file mode 100755 (executable)
index 0000000..b4ae9bd
--- /dev/null
@@ -0,0 +1,149 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_DEVICE_CORE_H__
+#define __TCT_DEVICE_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_system_device_display_startup(void);
+extern void utc_system_device_display_cleanup(void);
+extern void utc_system_haptic_startup(void);
+extern void utc_system_haptic_cleanup(void);
+
+extern int utc_system_device_battery_get_percent_p(void);
+extern int utc_system_device_battery_get_percent_n(void);
+extern int utc_system_device_battery_is_charging_p(void);
+extern int utc_system_device_battery_is_charging_n(void);
+extern int utc_system_device_battery_get_level_status_p(void);
+extern int utc_system_device_battery_get_level_status_n(void);
+extern int utc_system_device_add_callback_p(void);
+extern int utc_system_device_add_callback_n_1(void);
+extern int utc_system_device_add_callback_n_2(void);
+extern int utc_system_device_remove_callback_p(void);
+extern int utc_system_device_remove_callback_n_1(void);
+extern int utc_system_device_remove_callback_n_2(void);
+extern int utc_system_device_display_get_numbers_p(void);
+extern int utc_system_device_display_get_numbers_n(void);
+extern int utc_system_device_display_get_max_brightness_p(void);
+extern int utc_system_device_display_get_max_brightness_n_1(void);
+extern int utc_system_device_display_get_max_brightness_n_2(void);
+extern int utc_system_device_display_get_brightness_p(void);
+extern int utc_system_device_display_get_brightness_n_1(void);
+extern int utc_system_device_display_get_brightness_n_2(void);
+extern int utc_system_device_display_set_brightness_p(void);
+extern int utc_system_device_display_set_brightness_n_1(void);
+extern int utc_system_device_display_set_brightness_n_2(void);
+extern int utc_system_device_display_set_brightness_n_3(void);
+extern int utc_system_device_display_get_state_p(void);
+extern int utc_system_device_display_get_state_n(void);
+extern int utc_system_device_display_change_state_p(void);
+extern int utc_system_device_display_change_state_n(void);
+extern int utc_system_device_haptic_get_count_p(void);
+extern int utc_system_device_haptic_get_count_n(void);
+extern int utc_system_device_haptic_open_p(void);
+extern int utc_system_device_haptic_open_n_1(void);
+extern int utc_system_device_haptic_open_n_2(void);
+extern int utc_system_device_haptic_close_p(void);
+extern int utc_system_device_haptic_close_n(void);
+extern int utc_system_device_haptic_vibrate_p(void);
+extern int utc_system_device_haptic_vibrate_n_1(void);
+extern int utc_system_device_haptic_vibrate_n_2(void);
+extern int utc_system_device_haptic_vibrate_n_3(void);
+extern int utc_system_device_haptic_stop_p(void);
+extern int utc_system_device_haptic_stop_n(void);
+extern int utc_system_device_flash_get_max_brightness_p(void);
+extern int utc_system_device_flash_get_max_brightness_n(void);
+extern int utc_system_device_flash_get_brightness_p(void);
+extern int utc_system_device_flash_get_brightness_n(void);
+extern int utc_system_device_flash_set_brightness_p(void);
+extern int utc_system_device_flash_set_brightness_n(void);
+extern int utc_system_device_led_play_custom_p(void);
+extern int utc_system_device_led_play_custom_n_1(void);
+extern int utc_system_device_led_play_custom_n2(void);
+extern int utc_system_device_led_stop_custom_p(void);
+extern int utc_system_device_led_stop_custom_n(void);
+extern int utc_system_device_power_request_lock_p_1(void);
+extern int utc_system_device_power_request_lock_p_2(void);
+extern int utc_system_device_power_request_lock_n_1(void);
+extern int utc_system_device_power_request_lock_n_2(void);
+extern int utc_system_device_power_release_lock_p(void);
+extern int utc_system_device_power_release_lock_n(void);
+extern int utc_system_device_power_wakeup_p(void);
+
+testcase tc_array[] = {
+    {"utc_system_device_battery_get_percent_p", utc_system_device_battery_get_percent_p, NULL, NULL},
+    {"utc_system_device_battery_get_percent_n", utc_system_device_battery_get_percent_n, NULL, NULL},
+    {"utc_system_device_battery_is_charging_p", utc_system_device_battery_is_charging_p, NULL, NULL},
+    {"utc_system_device_battery_is_charging_n", utc_system_device_battery_is_charging_n, NULL, NULL},
+    {"utc_system_device_battery_get_level_status_p", utc_system_device_battery_get_level_status_p, NULL, NULL},
+    {"utc_system_device_battery_get_level_status_n", utc_system_device_battery_get_level_status_n, NULL, NULL},
+    {"utc_system_device_add_callback_p", utc_system_device_add_callback_p, NULL, NULL},
+    {"utc_system_device_add_callback_n_1", utc_system_device_add_callback_n_1, NULL, NULL},
+    {"utc_system_device_add_callback_n_2", utc_system_device_add_callback_n_2, NULL, NULL},
+    {"utc_system_device_remove_callback_p", utc_system_device_remove_callback_p, NULL, NULL},
+    {"utc_system_device_remove_callback_n_1", utc_system_device_remove_callback_n_1, NULL, NULL},
+    {"utc_system_device_remove_callback_n_2", utc_system_device_remove_callback_n_2, NULL, NULL},
+    {"utc_system_device_display_get_numbers_p", utc_system_device_display_get_numbers_p, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_get_numbers_n", utc_system_device_display_get_numbers_n, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_get_max_brightness_p", utc_system_device_display_get_max_brightness_p, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_get_max_brightness_n_1", utc_system_device_display_get_max_brightness_n_1, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_get_max_brightness_n_2", utc_system_device_display_get_max_brightness_n_2, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_get_brightness_p", utc_system_device_display_get_brightness_p, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_get_brightness_n_1", utc_system_device_display_get_brightness_n_1, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_get_brightness_n_2", utc_system_device_display_get_brightness_n_2, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_set_brightness_p", utc_system_device_display_set_brightness_p, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_set_brightness_n_1", utc_system_device_display_set_brightness_n_1, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_set_brightness_n_2", utc_system_device_display_set_brightness_n_2, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_set_brightness_n_3", utc_system_device_display_set_brightness_n_3, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_get_state_p", utc_system_device_display_get_state_p, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_get_state_n", utc_system_device_display_get_state_n, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_change_state_p", utc_system_device_display_change_state_p, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_display_change_state_n", utc_system_device_display_change_state_n, utc_system_device_display_startup, utc_system_device_display_cleanup},
+    {"utc_system_device_haptic_get_count_p", utc_system_device_haptic_get_count_p, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_get_count_n", utc_system_device_haptic_get_count_n, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_open_p", utc_system_device_haptic_open_p, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_open_n_1", utc_system_device_haptic_open_n_1, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_open_n_2", utc_system_device_haptic_open_n_2, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_close_p", utc_system_device_haptic_close_p, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_close_n", utc_system_device_haptic_close_n, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_vibrate_p", utc_system_device_haptic_vibrate_p, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_vibrate_n_1", utc_system_device_haptic_vibrate_n_1, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_vibrate_n_2", utc_system_device_haptic_vibrate_n_2, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_vibrate_n_3", utc_system_device_haptic_vibrate_n_3, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_stop_p", utc_system_device_haptic_stop_p, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_haptic_stop_n", utc_system_device_haptic_stop_n, utc_system_haptic_startup, utc_system_haptic_cleanup},
+    {"utc_system_device_flash_get_max_brightness_p", utc_system_device_flash_get_max_brightness_p, NULL, NULL},
+    {"utc_system_device_flash_get_max_brightness_n", utc_system_device_flash_get_max_brightness_n, NULL, NULL},
+    {"utc_system_device_flash_get_brightness_p", utc_system_device_flash_get_brightness_p, NULL, NULL},
+    {"utc_system_device_flash_get_brightness_n", utc_system_device_flash_get_brightness_n, NULL, NULL},
+    {"utc_system_device_flash_set_brightness_p", utc_system_device_flash_set_brightness_p, NULL, NULL},
+    {"utc_system_device_flash_set_brightness_n", utc_system_device_flash_set_brightness_n, NULL, NULL},
+    {"utc_system_device_led_play_custom_p", utc_system_device_led_play_custom_p, NULL, NULL},
+    {"utc_system_device_led_play_custom_n_1", utc_system_device_led_play_custom_n_1, NULL, NULL},
+    {"utc_system_device_led_play_custom_n2", utc_system_device_led_play_custom_n2, NULL, NULL},
+    {"utc_system_device_led_stop_custom_p", utc_system_device_led_stop_custom_p, NULL, NULL},
+    {"utc_system_device_led_stop_custom_n", utc_system_device_led_stop_custom_n, NULL, NULL},
+    {"utc_system_device_power_request_lock_p_1", utc_system_device_power_request_lock_p_1, NULL, NULL},
+    {"utc_system_device_power_request_lock_p_2", utc_system_device_power_request_lock_p_2, NULL, NULL},
+    {"utc_system_device_power_request_lock_n_1", utc_system_device_power_request_lock_n_1, NULL, NULL},
+    {"utc_system_device_power_request_lock_n_2", utc_system_device_power_request_lock_n_2, NULL, NULL},
+    {"utc_system_device_power_release_lock_p", utc_system_device_power_release_lock_p, NULL, NULL},
+    {"utc_system_device_power_release_lock_n", utc_system_device_power_release_lock_n, NULL, NULL},
+    {"utc_system_device_power_wakeup_p", utc_system_device_power_wakeup_p, NULL, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_DEVICE_CORE_H__
diff --git a/src/utc/device/utc-system-device-battery.c b/src/utc/device/utc-system-device-battery.c
new file mode 100755 (executable)
index 0000000..65b8082
--- /dev/null
@@ -0,0 +1,81 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <device/battery.h>
+
+//& set: DeviceBattery
+
+int utc_system_device_battery_get_percent_p(void)
+{
+       int percent, error;
+
+       error = device_battery_get_percent(&percent);
+       assert_eq(error, DEVICE_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_system_device_battery_get_percent_n(void)
+{
+       int error;
+
+       error = device_battery_get_percent(NULL);
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_system_device_battery_is_charging_p(void)
+{
+       bool charging;
+       int error;
+
+       error = device_battery_is_charging(&charging);
+       assert_eq(error, DEVICE_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_system_device_battery_is_charging_n(void)
+{
+       int error;
+
+       error = device_battery_is_charging(NULL);
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_system_device_battery_get_level_status_p(void)
+{
+       device_battery_level_e status;
+       int error;
+
+       error = device_battery_get_level_status(&status);
+       assert_eq(error, DEVICE_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_system_device_battery_get_level_status_n(void)
+{
+       int error;
+
+       error = device_battery_get_level_status(NULL);
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
diff --git a/src/utc/device/utc-system-device-callback.c b/src/utc/device/utc-system-device-callback.c
new file mode 100755 (executable)
index 0000000..8e5f6c1
--- /dev/null
@@ -0,0 +1,100 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <device/callback.h>
+
+//& set: DeviceCallback
+
+static void changed_cb(device_callback_e type, void *value, void *user_data)
+{
+
+}
+
+int utc_system_device_add_callback_p(void)
+{
+       int i, error;
+
+       for (i = 0; i < DEVICE_CALLBACK_MAX; ++i) {
+               error = device_add_callback(i, changed_cb, NULL);
+               device_remove_callback(i, changed_cb);
+               assert_eq(error, DEVICE_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_system_device_add_callback_n_1(void)
+{
+       int error;
+
+       error = device_add_callback(-1, changed_cb, NULL);
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_system_device_add_callback_n_2(void)
+{
+       int i, error;
+
+       for (i = 0; i < DEVICE_CALLBACK_MAX; ++i) {
+               error = device_add_callback(i, NULL, NULL);
+               assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_system_device_remove_callback_p(void)
+{
+       int i, error;
+
+       for (i = 0; i < DEVICE_CALLBACK_MAX; ++i) {
+               device_add_callback(i, changed_cb, NULL);
+               error = device_remove_callback(i, changed_cb);
+               assert_eq(error, DEVICE_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_system_device_remove_callback_n_1(void)
+{
+       int i, error;
+
+       for (i = 0; i < DEVICE_CALLBACK_MAX; ++i) {
+               device_add_callback(i, changed_cb, NULL);
+               error = device_remove_callback(-1, changed_cb);
+               device_remove_callback(i, changed_cb);
+               assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_system_device_remove_callback_n_2(void)
+{
+       int i, error;
+
+       for (i = 0; i < DEVICE_CALLBACK_MAX; ++i) {
+               device_add_callback(i, changed_cb, NULL);
+               error = device_remove_callback(i, NULL);
+               device_remove_callback(i, changed_cb);
+               assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
diff --git a/src/utc/device/utc-system-device-display.c b/src/utc/device/utc-system-device-display.c
new file mode 100755 (executable)
index 0000000..ebc2a24
--- /dev/null
@@ -0,0 +1,228 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <device/display.h>
+
+//& set: DeviceDisplay
+
+#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
+
+display_state_e states[] = {
+       DISPLAY_STATE_SCREEN_OFF,
+       DISPLAY_STATE_SCREEN_DIM,
+       DISPLAY_STATE_NORMAL,
+};
+
+static int cnt;
+
+void utc_system_device_display_startup(void)
+{
+       device_display_get_numbers(&cnt);
+}
+
+void utc_system_device_display_cleanup(void)
+{
+
+}
+
+int utc_system_device_display_get_numbers_p(void)
+{
+       int number, error;
+
+       error = device_display_get_numbers(&number);
+       assert_eq(error, DEVICE_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_system_device_display_get_numbers_n(void)
+{
+       int error;
+
+       error = device_display_get_numbers(NULL);
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_system_device_display_get_max_brightness_p(void)
+{
+       int value, error, i;
+
+       for (i = 0; i < cnt; i++) {
+               error = device_display_get_max_brightness(i, &value);
+               assert_eq(error, DEVICE_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_system_device_display_get_max_brightness_n_1(void)
+{
+       int value, error;
+
+       error = device_display_get_max_brightness(cnt+1, &value);
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_system_device_display_get_max_brightness_n_2(void)
+{
+       int error, i;
+
+       for (i = 0; i < cnt; i++) {
+               error = device_display_get_max_brightness(i, NULL);
+               assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_system_device_display_get_brightness_p(void)
+{
+       int value, error, i;
+
+       for (i = 0; i < cnt; i++) {
+               error = device_display_get_brightness(i, &value);
+               assert_eq(error, DEVICE_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_system_device_display_get_brightness_n_1(void)
+{
+       int value, error;
+
+       error = device_display_get_brightness(cnt+1, &value);
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_system_device_display_get_brightness_n_2(void)
+{
+       int error, i;
+
+       for (i = 0; i < cnt; i++) {
+               error = device_display_get_brightness(i, NULL);
+               assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_system_device_display_set_brightness_p(void)
+{
+       int max, error, i;
+
+       for (i = 0; i < cnt; i++) {
+               if (device_display_get_max_brightness(i, &max) != DEVICE_ERROR_NONE)
+                       return -1;
+
+               error = device_display_set_brightness(i, max);
+               assert_eq(error, DEVICE_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_system_device_display_set_brightness_n_1(void)
+{
+       int error;
+
+       error = device_display_set_brightness(-1, 0);
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_system_device_display_set_brightness_n_2(void)
+{
+       int error, i;
+
+       for (i = 0; i < cnt; i++) {
+               error = device_display_set_brightness(i, -1);
+               assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_system_device_display_set_brightness_n_3(void)
+{
+       int max, error, i;
+
+       for (i = 0; i < cnt; i++) {
+               if (device_display_get_max_brightness(i, &max) != DEVICE_ERROR_NONE)
+                       return -1;
+
+               error = device_display_set_brightness(i, max+1);
+               assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_system_device_display_get_state_p(void)
+{
+       display_state_e state;
+       int error;
+
+       error = device_display_get_state(&state);
+       assert_eq(error, DEVICE_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_system_device_display_get_state_n(void)
+{
+       int error;
+
+       error = device_display_get_state(NULL);
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of device_display_change_state()
+ */
+int utc_system_device_display_change_state_p(void)
+{
+       int error, i;
+
+       for (i = 0; i < ARRAY_SIZE(states); i++) {
+               error = device_display_change_state(states[i]);
+               assert_eq(error, DEVICE_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of device_display_change_state()
+ */
+int utc_system_device_display_change_state_n(void)
+{
+       int error;
+
+       error = device_display_change_state(-1);
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
diff --git a/src/utc/device/utc-system-device-haptic.c b/src/utc/device/utc-system-device-haptic.c
new file mode 100755 (executable)
index 0000000..4db7d75
--- /dev/null
@@ -0,0 +1,233 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <device/haptic.h>
+
+//& set: DeviceHaptic
+
+static haptic_device_h haptic_h;
+
+void utc_system_haptic_startup(void)
+{
+       int cnt, ret;
+
+       ret = device_haptic_get_count(&cnt);
+       if (ret < 0) {
+               printf("Failed to get count\n");
+               return;
+       }
+
+       if (cnt == 0) {
+               printf("Do not support haptic device\n");
+               return;
+       }
+
+       ret = device_haptic_open(0, &haptic_h);
+       if (ret < 0) {
+               printf("Failed to open haptic device\n");
+               return;
+       }
+}
+
+void utc_system_haptic_cleanup(void)
+{
+       if (!haptic_h)
+               return;
+
+       device_haptic_close(haptic_h);
+}
+
+
+/**
+ * @brief Positive test case of haptic_get_count()
+ */
+int utc_system_device_haptic_get_count_p(void)
+{
+       int val, ret;
+
+       ret = device_haptic_get_count(&val);
+       assert_eq(ret, DEVICE_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of haptic_get_count()
+ */
+int utc_system_device_haptic_get_count_n(void)
+{
+       int ret;
+
+       ret = device_haptic_get_count(NULL);
+       assert_eq(ret, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of device_haptic_open()
+ */
+int utc_system_device_haptic_open_p(void)
+{
+       haptic_device_h handle;
+       int ret;
+
+       ret = device_haptic_open(0, &handle);
+       assert_eq(ret, DEVICE_ERROR_NONE);
+       device_haptic_close(handle);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of device_haptic_open()
+ */
+int utc_system_device_haptic_open_n_1(void)
+{
+       haptic_device_h handle;
+       int ret;
+
+       ret = device_haptic_open(-1, &handle);
+       assert_eq(ret, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of device_haptic_open()
+ */
+int utc_system_device_haptic_open_n_2(void)
+{
+       int ret;
+
+       ret = device_haptic_open(0, NULL);
+       assert_eq(ret, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of device_haptic_close()
+ */
+int utc_system_device_haptic_close_p(void)
+{
+       haptic_device_h handle;
+       int ret;
+
+       device_haptic_open(0, &handle);
+       ret = device_haptic_close(handle);
+       assert_eq(ret, DEVICE_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of device_haptic_close()
+ */
+int utc_system_device_haptic_close_n(void)
+{
+       int ret;
+
+       ret = device_haptic_close(NULL);
+       assert_eq(ret, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of device_haptic_vibrate()
+ */
+int utc_system_device_haptic_vibrate_p(void)
+{
+       haptic_effect_h eh;
+       int ret;
+
+       ret = device_haptic_vibrate(haptic_h, 1000, 100, &eh);
+       device_haptic_stop(haptic_h, eh);
+       assert_eq(ret, DEVICE_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of device_haptic_vibrate()
+ */
+int utc_system_device_haptic_vibrate_n_1(void)
+{
+       int ret;
+
+       ret = device_haptic_vibrate(NULL, 1000, 100, NULL);
+       assert_eq(ret, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of device_haptic_vibrate()
+ */
+int utc_system_device_haptic_vibrate_n_2(void)
+{
+       int ret;
+
+       ret = device_haptic_vibrate(haptic_h, -1, 100, NULL);
+       assert_eq(ret, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of device_haptic_vibrate()
+ */
+int utc_system_device_haptic_vibrate_n_3(void)
+{
+       int ret;
+
+       ret = device_haptic_vibrate(haptic_h, 1000, -1, NULL);
+       assert_eq(ret, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of device_haptic_stop()
+ */
+int utc_system_device_haptic_stop_p(void)
+{
+       haptic_effect_h eh;
+       int ret;
+
+       device_haptic_vibrate(haptic_h, 1000, 100, &eh);
+       ret = device_haptic_stop(haptic_h, eh);
+       assert_eq(ret, DEVICE_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of device_haptic_stop()
+ */
+int utc_system_device_haptic_stop_n(void)
+{
+       haptic_effect_h eh;
+       int ret;
+
+       device_haptic_vibrate(haptic_h, 1000, 100, &eh);
+       ret = device_haptic_stop(NULL, eh);
+       device_haptic_stop(haptic_h, eh);
+       assert_eq(ret, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
diff --git a/src/utc/device/utc-system-device-led.c b/src/utc/device/utc-system-device-led.c
new file mode 100755 (executable)
index 0000000..12e0105
--- /dev/null
@@ -0,0 +1,255 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <device/led.h>
+#include <tizen.h>
+#include <system_info.h>
+
+//& set: DeviceLed
+
+int utc_system_device_flash_get_max_brightness_p(void)
+{
+       int max, error;
+    bool is_supported;
+    system_info_get_platform_bool("http://tizen.org/feature/camera.back.flash",&is_supported);
+
+       error = device_flash_get_max_brightness(&max);
+
+    if(is_supported == true)
+       {
+        assert_eq(error, DEVICE_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(error,DEVICE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+int utc_system_device_flash_get_max_brightness_n(void)
+{
+       int error;
+    bool is_supported;
+    system_info_get_platform_bool("http://tizen.org/feature/camera.back.flash",&is_supported);
+
+       error = device_flash_get_max_brightness(NULL);
+    if(is_supported == true)
+       {
+        assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error,DEVICE_ERROR_NOT_SUPPORTED);
+       }    
+       
+       return 0;
+}
+
+int utc_system_device_flash_get_brightness_p(void)
+{
+       int brightness, error;
+    bool is_supported;
+    system_info_get_platform_bool("http://tizen.org/feature/camera.back.flash",&is_supported);
+
+       error = device_flash_get_brightness(&brightness);
+    if(is_supported == true)
+       {
+        assert_eq(error, DEVICE_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(error,DEVICE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+int utc_system_device_flash_get_brightness_n(void)
+{
+       int error;
+    bool is_supported;
+    system_info_get_platform_bool("http://tizen.org/feature/camera.back.flash",&is_supported);
+
+       error = device_flash_get_brightness(NULL);
+
+    if(is_supported == true)
+       {
+           assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error,DEVICE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+int utc_system_device_flash_set_brightness_p(void)
+{
+       int max, error;
+    bool is_supported;
+    system_info_get_platform_bool("http://tizen.org/feature/camera.back.flash",&is_supported);
+
+       device_flash_get_max_brightness(&max);
+       error = device_flash_set_brightness(max);
+
+    if(is_supported == true)
+       {
+       assert_eq(error, DEVICE_ERROR_NONE);
+       device_flash_set_brightness(0);
+       }
+       else
+       {
+               assert_eq(error,DEVICE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+int utc_system_device_flash_set_brightness_n(void)
+{
+       int error;
+    bool is_supported;
+    system_info_get_platform_bool("http://tizen.org/feature/camera.back.flash",&is_supported);
+
+       error = device_flash_set_brightness(-1);
+
+    if(is_supported == true)
+       {
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error,DEVICE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+/**
+ * @brief Positive test case of device_led_play_custom()
+ */
+int utc_system_device_led_play_custom_p(void)
+{
+       int error;
+    bool is_supported;
+
+    system_info_get_platform_bool("http://tizen.org/feature/led",&is_supported);
+
+    error = device_led_play_custom(500, 500, 0xFFFF00, LED_CUSTOM_DUTY_ON);
+    if(is_supported == true)
+       {
+               assert_eq(error, DEVICE_ERROR_NONE);
+               device_led_stop_custom();
+       }
+       else
+       {
+               assert_eq(error,DEVICE_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+/**
+ * @brief Negative test case of device_led_play_custom()
+ */
+int utc_system_device_led_play_custom_n_1(void)
+{
+       int error;
+
+    bool is_supported;
+
+    system_info_get_platform_bool("http://tizen.org/feature/led",&is_supported);
+
+    error = device_led_play_custom(-1, 500, 0xFFFF00FF, LED_CUSTOM_DUTY_ON);
+    if(is_supported == true)
+       {
+               assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(error,DEVICE_ERROR_NOT_SUPPORTED);
+       }
+  
+       return 0;
+}
+
+/**
+ * @brief Negative test case of device_led_play_custom()
+ */
+int utc_system_device_led_play_custom_n2(void)
+{
+       int error;
+    bool is_supported;
+
+    system_info_get_platform_bool("http://tizen.org/feature/led",&is_supported);
+    error = device_led_play_custom(500, -1, 0xFFFF00FF, LED_CUSTOM_DUTY_ON);
+
+    if(is_supported == true)
+       {               
+               assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {               
+               assert_eq(error,DEVICE_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of device_led_stop_custom()
+ */
+int utc_system_device_led_stop_custom_p(void)
+{
+       int error;
+       bool is_supported;
+
+    system_info_get_platform_bool("http://tizen.org/feature/led",&is_supported);
+
+    device_led_play_custom(500, 500, 0xFFFF00, LED_CUSTOM_DUTY_ON);
+    error = device_led_stop_custom();
+      
+    if(is_supported == true)
+       {               
+               assert_eq(error, DEVICE_ERROR_NONE);
+       }
+       else
+       {               
+               assert_eq(error,DEVICE_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of device_led_stop_custom()
+ */
+int utc_system_device_led_stop_custom_n(void)
+{
+       int error;
+    bool is_supported;
+
+    system_info_get_platform_bool("http://tizen.org/feature/led",&is_supported);
+    error = device_led_stop_custom();
+    if(is_supported == true)
+       {               
+               assert_eq(error, DEVICE_ERROR_OPERATION_FAILED);
+       }
+       else
+       {
+               assert_eq(error,DEVICE_ERROR_NOT_SUPPORTED);
+       }
+
+
+
+       return 0;
+}
diff --git a/src/utc/device/utc-system-device-power.c b/src/utc/device/utc-system-device-power.c
new file mode 100755 (executable)
index 0000000..b24ecce
--- /dev/null
@@ -0,0 +1,112 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <device/power.h>
+
+//& set: DevicePower
+
+#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
+
+power_lock_e locks[] = {
+       POWER_LOCK_CPU,
+       POWER_LOCK_DISPLAY
+};
+
+int utc_system_device_power_request_lock_p_1(void)
+{
+       int error, i;
+
+       for (i = 0; i < ARRAY_SIZE(locks); i++) {
+               error = device_power_request_lock(locks[i], 0);
+               assert_eq(error, DEVICE_ERROR_NONE);
+               device_power_release_lock(locks[i]);
+       }
+
+       return 0;
+}
+
+int utc_system_device_power_request_lock_p_2(void)
+{
+       int error, i;
+
+       for (i = 0; i < ARRAY_SIZE(locks); i++) {
+               error = device_power_request_lock(locks[i], 10);
+               assert_eq(error, DEVICE_ERROR_NONE);
+               device_power_release_lock(locks[i]);
+       }
+
+       return 0;
+}
+
+int utc_system_device_power_request_lock_n_1(void)
+{
+       int error;
+
+       error = device_power_request_lock(-1, 0);
+       assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_system_device_power_request_lock_n_2(void)
+{
+       int error, i;
+
+       for (i = 0; i < ARRAY_SIZE(locks); i++) {
+               error = device_power_request_lock(locks[i], -1);
+               assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_system_device_power_release_lock_p(void)
+{
+       int error, i;
+
+       for (i = 0; i < ARRAY_SIZE(locks); i++) {
+               device_power_request_lock(locks[i], 0);
+               error = device_power_release_lock(locks[i]);
+               assert_eq(error, DEVICE_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_system_device_power_release_lock_n(void)
+{
+       int error, i;
+
+       for (i = 0; i < ARRAY_SIZE(locks); i++) {
+               device_power_request_lock(locks[i], 0);
+               error = device_power_release_lock(-1);
+               assert_eq(error, DEVICE_ERROR_INVALID_PARAMETER);
+               device_power_release_lock(locks[i]);
+       }
+
+       return 0;
+}
+
+int utc_system_device_power_wakeup_p(void)
+{
+       int error;
+
+       error = device_power_wakeup(false);
+       assert_eq(error, DEVICE_ERROR_NONE);
+
+       return 0;
+}
diff --git a/src/utc/dlog/CMakeLists.txt b/src/utc/dlog/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..d25456b
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "dlog")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "dlog")
+SET(TC_SOURCES
+       utc-ApplicationFW-dlog-print-func.c
+       utc-ApplicationFW-dlog-vprint-func.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/dlog/public.list b/src/utc/dlog/public.list
new file mode 100755 (executable)
index 0000000..8879edc
--- /dev/null
@@ -0,0 +1,3 @@
+dlog_print
+dlog_vprint
+
diff --git a/src/utc/dlog/tct-dlog-core.c b/src/utc/dlog/tct-dlog-core.c
new file mode 100755 (executable)
index 0000000..b2d08e3
--- /dev/null
@@ -0,0 +1,130 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-dlog-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/dlog/tct-dlog-core.h b/src/utc/dlog/tct-dlog-core.h
new file mode 100755 (executable)
index 0000000..5ee968d
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_DLOG_CORE_H__
+#define __TCT_DLOG_CORE_H__
+
+#include "testcase.h"
+
+
+extern int utc_ApplicationFW_dlog_print_p(void);
+extern int utc_ApplicationFW_dlog_print_n(void);
+extern int utc_ApplicationFW_dlog_vprint_p(void);
+extern int utc_ApplicationFW_dlog_vprint_n(void);
+
+testcase tc_array[] = {
+    {"utc_ApplicationFW_dlog_print_p", utc_ApplicationFW_dlog_print_p, NULL, NULL},
+    {"utc_ApplicationFW_dlog_print_n", utc_ApplicationFW_dlog_print_n, NULL, NULL},
+    {"utc_ApplicationFW_dlog_vprint_p", utc_ApplicationFW_dlog_vprint_p, NULL, NULL},
+    {"utc_ApplicationFW_dlog_vprint_n", utc_ApplicationFW_dlog_vprint_n, NULL, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_DLOG_CORE_H__
diff --git a/src/utc/dlog/utc-ApplicationFW-dlog-print-func.c b/src/utc/dlog/utc-ApplicationFW-dlog-print-func.c
new file mode 100755 (executable)
index 0000000..6930317
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <dlog.h>
+
+//& set: dlog-print
+
+#define LOG_BUF_SIZE 1024
+
+static char *fmt = "dlog test message for tct-mgr\n";
+
+/**
+ * @brief Positive test case of __dlog_print()
+ */
+int utc_ApplicationFW_dlog_print_p(void)
+{
+    int r = 0;
+
+    r = dlog_print(DLOG_DEBUG, "DLOG_TEST", fmt);
+    
+    assert_gt(r , 0);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of ug_init __dlog_print()
+ */
+int utc_ApplicationFW_dlog_print_n(void)
+{
+    int r = 0;
+
+    r = dlog_print(-1, NULL, NULL);
+
+    assert_lt(r, 1);
+
+    return 0;
+}
diff --git a/src/utc/dlog/utc-ApplicationFW-dlog-vprint-func.c b/src/utc/dlog/utc-ApplicationFW-dlog-vprint-func.c
new file mode 100755 (executable)
index 0000000..9c6b874
--- /dev/null
@@ -0,0 +1,60 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <stdarg.h>
+#include <dlog.h>
+
+//& set: dlog-vprint
+
+#define LOG_BUF_SIZE 1024
+
+static int test_dlog_vprint(int level, char *tag, char *format, ...)
+{
+       va_list ap;
+       int ret;
+
+       va_start(ap, format);
+       ret = dlog_vprint(level, tag, format, ap);
+       va_end(ap);
+
+       return ret;
+}
+
+/**
+ * @brief Positive test case of __dlog_vprint()
+ */
+int utc_ApplicationFW_dlog_vprint_p(void)
+{
+    int ret;
+
+    ret = test_dlog_vprint(DLOG_DEBUG, "DLOG_TEST", "Test (%s), (%d)", "Hello", 100);
+    assert_geq(ret, 0);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of ug_init __dlog_vprint()
+ */
+int utc_ApplicationFW_dlog_vprint_n(void)
+{
+    int ret;
+
+    ret = test_dlog_vprint(-1, NULL, "Test (%s), (%d)", "Hello", 100);
+    assert_lt(ret, 0);
+
+    return 0;
+}
diff --git a/src/utc/efl-ext/CMakeLists.txt b/src/utc/efl-ext/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..2bb9991
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "efl-ext")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "efl-extension")
+SET(TC_SOURCES
+    utc-efl-ext.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+    ${CAPI_LIB}
+       glib-2.0
+    elementary
+    bundle
+    capi-appfw-application
+       dlog
+)
+INCLUDE_DIRECTORIES(
+    ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+    ${${CAPI_LIB}_LIBRARIES}
+    bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+    DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/efl-ext/tct-efl-ext-core.c b/src/utc/efl-ext/tct-efl-ext-core.c
new file mode 100755 (executable)
index 0000000..901caae
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-efl-ext-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/efl-ext/tct-efl-ext-core.h b/src/utc/efl-ext/tct-efl-ext-core.h
new file mode 100755 (executable)
index 0000000..13a2ae4
--- /dev/null
@@ -0,0 +1,331 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_EFL_EXT_CORE_H__
+#define __TCT_EFL_EXT_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_efl_ext_startup(void);
+extern void utc_efl_ext_cleanup(void);
+
+extern int utc_efl_ext_rotary_object_event_callback_add_p(void);
+extern int utc_efl_ext_rotary_object_event_callback_add_n1(void);
+extern int utc_efl_ext_rotary_object_event_callback_add_n2(void);
+extern int utc_efl_ext_rotary_object_event_callback_priority_add_p(void);
+extern int utc_efl_ext_rotary_object_event_callback_priority_add_n1(void);
+extern int utc_efl_ext_rotary_object_event_callback_priority_add_n2(void);
+extern int utc_efl_ext_rotary_object_event_callback_del_p1(void);
+extern int utc_efl_ext_rotary_object_event_callback_del_p2(void);
+extern int utc_efl_ext_rotary_handler_add_p(void);
+extern int utc_efl_ext_rotary_handler_add_n(void);
+extern int utc_efl_ext_rotary_handler_del_p(void);
+extern int utc_efl_ext_eext_circle_object_line_width_set_p(void);
+extern int utc_efl_ext_eext_circle_object_line_width_set_n(void);
+extern int utc_efl_ext_eext_circle_object_line_width_get_p(void);
+extern int utc_efl_ext_eext_circle_object_line_width_get_n(void);
+extern int utc_efl_ext_eext_circle_object_angle_set_p(void);
+extern int utc_efl_ext_eext_circle_object_angle_set_n(void);
+extern int utc_efl_ext_eext_circle_object_angle_get_p(void);
+extern int utc_efl_ext_eext_circle_object_angle_get_n(void);
+extern int utc_efl_ext_eext_circle_object_angle_offset_set_p(void);
+extern int utc_efl_ext_eext_circle_object_angle_offset_set_n(void);
+extern int utc_efl_ext_eext_circle_object_angle_offset_get_p(void);
+extern int utc_efl_ext_eext_circle_object_angle_offset_get_n(void);
+extern int utc_efl_ext_eext_circle_object_angle_min_max_set_p(void);
+extern int utc_efl_ext_eext_circle_object_angle_min_max_set_n(void);
+extern int utc_efl_ext_eext_circle_object_angle_min_max_get_p(void);
+extern int utc_efl_ext_eext_circle_object_angle_min_max_get_n(void);
+extern int utc_efl_ext_eext_circle_object_value_min_max_set_p(void);
+extern int utc_efl_ext_eext_circle_object_value_min_max_set_n(void);
+extern int utc_efl_ext_eext_circle_object_value_min_max_get_p(void);
+extern int utc_efl_ext_eext_circle_object_value_min_max_get_n(void);
+extern int utc_efl_ext_eext_circle_object_value_set_p(void);
+extern int utc_efl_ext_eext_circle_object_value_set_n(void);
+extern int utc_efl_ext_eext_circle_object_value_get_p(void);
+extern int utc_efl_ext_eext_circle_object_value_get_n(void);
+extern int utc_efl_ext_eext_circle_object_color_set_p(void);
+extern int utc_efl_ext_eext_circle_object_color_set_n(void);
+extern int utc_efl_ext_eext_circle_object_color_get_p(void);
+extern int utc_efl_ext_eext_circle_object_color_get_n(void);
+extern int utc_efl_ext_eext_circle_object_radius_set_p(void);
+extern int utc_efl_ext_eext_circle_object_radius_set_n(void);
+extern int utc_efl_ext_eext_circle_object_radius_get_p(void);
+extern int utc_efl_ext_eext_circle_object_radius_get_n(void);
+extern int utc_efl_ext_eext_circle_object_disabled_set_p(void);
+extern int utc_efl_ext_eext_circle_object_disabled_set_n(void);
+extern int utc_efl_ext_eext_circle_object_disabled_get_p(void);
+extern int utc_efl_ext_eext_circle_object_disabled_get_n(void);
+extern int utc_efl_ext_eext_circle_object_add_p(void);
+extern int utc_efl_ext_eext_circle_object_item_line_width_set_p(void);
+extern int utc_efl_ext_eext_circle_object_item_line_width_set_n(void);
+extern int utc_efl_ext_eext_circle_object_item_line_width_get_p(void);
+extern int utc_efl_ext_eext_circle_object_item_line_width_get_n(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_set_p(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_set_n(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_get_p(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_get_n(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_offset_set_p(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_offset_set_n(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_offset_get_p(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_offset_get_n(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_min_max_set_p(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_min_max_set_n(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_min_max_get_p(void);
+extern int utc_efl_ext_eext_circle_object_item_angle_min_max_get_n(void);
+extern int utc_efl_ext_eext_circle_object_item_value_min_max_set_p(void);
+extern int utc_efl_ext_eext_circle_object_item_value_min_max_set_n(void);
+extern int utc_efl_ext_eext_circle_object_item_value_min_max_get_p(void);
+extern int utc_efl_ext_eext_circle_object_item_value_min_max_get_n(void);
+extern int utc_efl_ext_eext_circle_object_item_value_set_p(void);
+extern int utc_efl_ext_eext_circle_object_item_value_set_n(void);
+extern int utc_efl_ext_eext_circle_object_item_value_get_p(void);
+extern int utc_efl_ext_eext_circle_object_item_value_get_n(void);
+extern int utc_efl_ext_eext_circle_object_item_color_set_p(void);
+extern int utc_efl_ext_eext_circle_object_item_color_set_n(void);
+extern int utc_efl_ext_eext_circle_object_item_color_get_p(void);
+extern int utc_efl_ext_eext_circle_object_item_color_get_n(void);
+extern int utc_efl_ext_eext_circle_object_item_radius_set_p(void);
+extern int utc_efl_ext_eext_circle_object_item_radius_set_n(void);
+extern int utc_efl_ext_eext_circle_object_item_radius_get_p(void);
+extern int utc_efl_ext_eext_circle_object_item_radius_get_n(void);
+extern int utc_efl_ext_eext_circle_surface_conformant_add_p(void);
+extern int utc_efl_ext_eext_circle_surface_conformant_add_n1(void);
+extern int utc_efl_ext_eext_circle_surface_conformant_add_n2(void);
+extern int utc_efl_ext_eext_circle_surface_layout_add_p(void);
+extern int utc_efl_ext_eext_circle_surface_layout_add_n1(void);
+extern int utc_efl_ext_eext_circle_surface_layout_add_n2(void);
+extern int utc_efl_ext_eext_circle_surface_naviframe_add_p(void);
+extern int utc_efl_ext_eext_circle_surface_naviframe_add_n1(void);
+extern int utc_efl_ext_eext_circle_surface_naviframe_add_n2(void);
+extern int utc_efl_ext_eext_circle_surface_del_p(void);
+extern int utc_efl_ext_eext_circle_surface_del_n(void);
+extern int utc_efl_ext_eext_circle_object_datetime_add_p(void);
+extern int utc_efl_ext_eext_circle_object_datetime_add_n(void);
+extern int utc_efl_ext_eext_circle_object_genlist_add_p(void);
+extern int utc_efl_ext_eext_circle_object_genlist_add_n(void);
+extern int utc_efl_ext_eext_circle_object_genlist_scroller_policy_get_p(void);
+extern int utc_efl_ext_eext_circle_object_genlist_scroller_policy_get_n(void);
+extern int utc_efl_ext_eext_circle_object_genlist_scroller_policy_set_p(void);
+extern int utc_efl_ext_eext_circle_object_genlist_scroller_policy_set_n(void);
+extern int utc_efl_ext_eext_circle_object_progressbar_add_p(void);
+extern int utc_efl_ext_eext_circle_object_progressbar_add_n(void);
+extern int utc_efl_ext_eext_circle_object_slider_add_p(void);
+extern int utc_efl_ext_eext_circle_object_slider_add_n(void);
+extern int utc_efl_ext_eext_circle_object_slider_step_set_p(void);
+extern int utc_efl_ext_eext_circle_object_slider_step_set_n(void);
+extern int utc_efl_ext_eext_circle_object_slider_step_get_p(void);
+extern int utc_efl_ext_eext_circle_object_slider_step_get_n(void);
+extern int utc_efl_ext_eext_circle_object_scroller_add_p(void);
+extern int utc_efl_ext_eext_circle_object_scroller_add_n(void);
+extern int utc_efl_ext_eext_circle_object_scroller_policy_get_p(void);
+extern int utc_efl_ext_eext_circle_object_scroller_policy_get_n(void);
+extern int utc_efl_ext_eext_circle_object_scroller_policy_set_p(void);
+extern int utc_efl_ext_eext_circle_object_scroller_policy_set_n(void);
+extern int utc_efl_ext_eext_more_option_add_p(void);
+extern int utc_efl_ext_eext_more_option_add_n(void);
+extern int utc_efl_ext_eext_more_option_direction_set_p(void);
+extern int utc_efl_ext_eext_more_option_direction_set_n(void);
+extern int utc_efl_ext_eext_more_option_direction_get_p(void);
+extern int utc_efl_ext_eext_more_option_direction_get_n(void);
+extern int utc_efl_ext_eext_more_option_item_append_p(void);
+extern int utc_efl_ext_eext_more_option_item_append_n(void);
+extern int utc_efl_ext_eext_more_option_item_prepend_p(void);
+extern int utc_efl_ext_eext_more_option_item_prepend_n(void);
+extern int utc_efl_ext_eext_more_option_item_insert_after_p(void);
+extern int utc_efl_ext_eext_more_option_item_insert_after_n(void);
+extern int utc_efl_ext_eext_more_option_item_insert_before_p(void);
+extern int utc_efl_ext_eext_more_option_item_insert_before_n(void);
+extern int utc_efl_ext_eext_more_option_item_del_p(void);
+extern int utc_efl_ext_eext_more_option_item_del_n(void);
+extern int utc_efl_ext_eext_more_option_items_clear_p(void);
+extern int utc_efl_ext_eext_more_option_items_clear_n(void);
+extern int utc_efl_ext_eext_more_option_item_part_text_set_p(void);
+extern int utc_efl_ext_eext_more_option_item_part_text_set_n(void);
+extern int utc_efl_ext_eext_more_option_item_part_text_get_p(void);
+extern int utc_efl_ext_eext_more_option_item_part_text_get_n(void);
+extern int utc_efl_ext_eext_more_option_item_domain_translatable_part_text_set_p(void);
+extern int utc_efl_ext_eext_more_option_item_domain_translatable_part_text_set_n(void);
+extern int utc_efl_ext_eext_more_option_item_part_content_set_p(void);
+extern int utc_efl_ext_eext_more_option_item_part_content_set_n(void);
+extern int utc_efl_ext_eext_more_option_item_part_content_get_p(void);
+extern int utc_efl_ext_eext_more_option_item_part_content_get_n(void);
+extern int utc_efl_ext_eext_more_option_opened_set_p(void);
+extern int utc_efl_ext_eext_more_option_opened_set_n(void);
+extern int utc_efl_ext_eext_more_option_opened_get_p(void);
+extern int utc_efl_ext_eext_more_option_opened_get_n(void);
+extern int utc_efl_ext_eext_more_option_items_get_p(void);
+extern int utc_efl_ext_eext_more_option_items_get_n(void);
+extern int utc_efl_ext_eext_circle_object_spinner_add_p(void);
+extern int utc_efl_ext_eext_circle_object_spinner_add_n(void);
+extern int utc_efl_ext_eext_circle_object_spinner_angle_set_p(void);
+extern int utc_efl_ext_eext_circle_object_spinner_angle_set_n(void);
+
+testcase tc_array[] = {
+    {"utc_efl_ext_rotary_object_event_callback_add_p", utc_efl_ext_rotary_object_event_callback_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_rotary_object_event_callback_add_n1", utc_efl_ext_rotary_object_event_callback_add_n1, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_rotary_object_event_callback_add_n2", utc_efl_ext_rotary_object_event_callback_add_n2, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_rotary_object_event_callback_priority_add_p", utc_efl_ext_rotary_object_event_callback_priority_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_rotary_object_event_callback_priority_add_n1", utc_efl_ext_rotary_object_event_callback_priority_add_n1, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_rotary_object_event_callback_priority_add_n2", utc_efl_ext_rotary_object_event_callback_priority_add_n2, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_rotary_object_event_callback_del_p1", utc_efl_ext_rotary_object_event_callback_del_p1, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_rotary_object_event_callback_del_p2", utc_efl_ext_rotary_object_event_callback_del_p2, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_rotary_handler_add_p", utc_efl_ext_rotary_handler_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_rotary_handler_add_n", utc_efl_ext_rotary_handler_add_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_rotary_handler_del_p", utc_efl_ext_rotary_handler_del_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_line_width_set_p", utc_efl_ext_eext_circle_object_line_width_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_line_width_set_n", utc_efl_ext_eext_circle_object_line_width_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_line_width_get_p", utc_efl_ext_eext_circle_object_line_width_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_line_width_get_n", utc_efl_ext_eext_circle_object_line_width_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_set_p", utc_efl_ext_eext_circle_object_angle_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_set_n", utc_efl_ext_eext_circle_object_angle_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_get_p", utc_efl_ext_eext_circle_object_angle_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_get_n", utc_efl_ext_eext_circle_object_angle_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_offset_set_p", utc_efl_ext_eext_circle_object_angle_offset_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_offset_set_n", utc_efl_ext_eext_circle_object_angle_offset_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_offset_get_p", utc_efl_ext_eext_circle_object_angle_offset_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_offset_get_n", utc_efl_ext_eext_circle_object_angle_offset_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_min_max_set_p", utc_efl_ext_eext_circle_object_angle_min_max_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_min_max_set_n", utc_efl_ext_eext_circle_object_angle_min_max_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_min_max_get_p", utc_efl_ext_eext_circle_object_angle_min_max_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_angle_min_max_get_n", utc_efl_ext_eext_circle_object_angle_min_max_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_value_min_max_set_p", utc_efl_ext_eext_circle_object_value_min_max_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_value_min_max_set_n", utc_efl_ext_eext_circle_object_value_min_max_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_value_min_max_get_p", utc_efl_ext_eext_circle_object_value_min_max_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_value_min_max_get_n", utc_efl_ext_eext_circle_object_value_min_max_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_value_set_p", utc_efl_ext_eext_circle_object_value_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_value_set_n", utc_efl_ext_eext_circle_object_value_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_value_get_p", utc_efl_ext_eext_circle_object_value_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_value_get_n", utc_efl_ext_eext_circle_object_value_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_color_set_p", utc_efl_ext_eext_circle_object_color_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_color_set_n", utc_efl_ext_eext_circle_object_color_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_color_get_p", utc_efl_ext_eext_circle_object_color_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_color_get_n", utc_efl_ext_eext_circle_object_color_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_radius_set_p", utc_efl_ext_eext_circle_object_radius_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_radius_set_n", utc_efl_ext_eext_circle_object_radius_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_radius_get_p", utc_efl_ext_eext_circle_object_radius_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_radius_get_n", utc_efl_ext_eext_circle_object_radius_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_disabled_set_p", utc_efl_ext_eext_circle_object_disabled_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_disabled_set_n", utc_efl_ext_eext_circle_object_disabled_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_disabled_get_p", utc_efl_ext_eext_circle_object_disabled_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_disabled_get_n", utc_efl_ext_eext_circle_object_disabled_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_add_p", utc_efl_ext_eext_circle_object_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_line_width_set_p", utc_efl_ext_eext_circle_object_item_line_width_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_line_width_set_n", utc_efl_ext_eext_circle_object_item_line_width_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_line_width_get_p", utc_efl_ext_eext_circle_object_item_line_width_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_line_width_get_n", utc_efl_ext_eext_circle_object_item_line_width_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_set_p", utc_efl_ext_eext_circle_object_item_angle_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_set_n", utc_efl_ext_eext_circle_object_item_angle_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_get_p", utc_efl_ext_eext_circle_object_item_angle_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_get_n", utc_efl_ext_eext_circle_object_item_angle_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_offset_set_p", utc_efl_ext_eext_circle_object_item_angle_offset_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_offset_set_n", utc_efl_ext_eext_circle_object_item_angle_offset_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_offset_get_p", utc_efl_ext_eext_circle_object_item_angle_offset_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_offset_get_n", utc_efl_ext_eext_circle_object_item_angle_offset_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_min_max_set_p", utc_efl_ext_eext_circle_object_item_angle_min_max_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_min_max_set_n", utc_efl_ext_eext_circle_object_item_angle_min_max_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_min_max_get_p", utc_efl_ext_eext_circle_object_item_angle_min_max_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_angle_min_max_get_n", utc_efl_ext_eext_circle_object_item_angle_min_max_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_value_min_max_set_p", utc_efl_ext_eext_circle_object_item_value_min_max_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_value_min_max_set_n", utc_efl_ext_eext_circle_object_item_value_min_max_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_value_min_max_get_p", utc_efl_ext_eext_circle_object_item_value_min_max_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_value_min_max_get_n", utc_efl_ext_eext_circle_object_item_value_min_max_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_value_set_p", utc_efl_ext_eext_circle_object_item_value_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_value_set_n", utc_efl_ext_eext_circle_object_item_value_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_value_get_p", utc_efl_ext_eext_circle_object_item_value_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_value_get_n", utc_efl_ext_eext_circle_object_item_value_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_color_set_p", utc_efl_ext_eext_circle_object_item_color_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_color_set_n", utc_efl_ext_eext_circle_object_item_color_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_color_get_p", utc_efl_ext_eext_circle_object_item_color_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_color_get_n", utc_efl_ext_eext_circle_object_item_color_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_radius_set_p", utc_efl_ext_eext_circle_object_item_radius_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_radius_set_n", utc_efl_ext_eext_circle_object_item_radius_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_radius_get_p", utc_efl_ext_eext_circle_object_item_radius_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_item_radius_get_n", utc_efl_ext_eext_circle_object_item_radius_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_surface_conformant_add_p", utc_efl_ext_eext_circle_surface_conformant_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_surface_conformant_add_n1", utc_efl_ext_eext_circle_surface_conformant_add_n1, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_surface_conformant_add_n2", utc_efl_ext_eext_circle_surface_conformant_add_n2, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_surface_layout_add_p", utc_efl_ext_eext_circle_surface_layout_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_surface_layout_add_n1", utc_efl_ext_eext_circle_surface_layout_add_n1, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_surface_layout_add_n2", utc_efl_ext_eext_circle_surface_layout_add_n2, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_surface_naviframe_add_p", utc_efl_ext_eext_circle_surface_naviframe_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_surface_naviframe_add_n1", utc_efl_ext_eext_circle_surface_naviframe_add_n1, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_surface_naviframe_add_n2", utc_efl_ext_eext_circle_surface_naviframe_add_n2, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_surface_del_p", utc_efl_ext_eext_circle_surface_del_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_surface_del_n", utc_efl_ext_eext_circle_surface_del_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_datetime_add_p", utc_efl_ext_eext_circle_object_datetime_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_datetime_add_n", utc_efl_ext_eext_circle_object_datetime_add_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_genlist_add_p", utc_efl_ext_eext_circle_object_genlist_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_genlist_add_n", utc_efl_ext_eext_circle_object_genlist_add_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_genlist_scroller_policy_get_p", utc_efl_ext_eext_circle_object_genlist_scroller_policy_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_genlist_scroller_policy_get_n", utc_efl_ext_eext_circle_object_genlist_scroller_policy_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_genlist_scroller_policy_set_p", utc_efl_ext_eext_circle_object_genlist_scroller_policy_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_genlist_scroller_policy_set_n", utc_efl_ext_eext_circle_object_genlist_scroller_policy_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_progressbar_add_p", utc_efl_ext_eext_circle_object_progressbar_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_progressbar_add_n", utc_efl_ext_eext_circle_object_progressbar_add_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_slider_add_p", utc_efl_ext_eext_circle_object_slider_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_slider_add_n", utc_efl_ext_eext_circle_object_slider_add_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_slider_step_set_p", utc_efl_ext_eext_circle_object_slider_step_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_slider_step_set_n", utc_efl_ext_eext_circle_object_slider_step_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_slider_step_get_p", utc_efl_ext_eext_circle_object_slider_step_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_slider_step_get_n", utc_efl_ext_eext_circle_object_slider_step_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_scroller_add_p", utc_efl_ext_eext_circle_object_scroller_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_scroller_add_n", utc_efl_ext_eext_circle_object_scroller_add_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_scroller_policy_get_p", utc_efl_ext_eext_circle_object_scroller_policy_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_scroller_policy_get_n", utc_efl_ext_eext_circle_object_scroller_policy_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_scroller_policy_set_p", utc_efl_ext_eext_circle_object_scroller_policy_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_scroller_policy_set_n", utc_efl_ext_eext_circle_object_scroller_policy_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_add_p", utc_efl_ext_eext_more_option_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_add_n", utc_efl_ext_eext_more_option_add_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_direction_set_p", utc_efl_ext_eext_more_option_direction_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_direction_set_n", utc_efl_ext_eext_more_option_direction_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_direction_get_p", utc_efl_ext_eext_more_option_direction_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_direction_get_n", utc_efl_ext_eext_more_option_direction_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_append_p", utc_efl_ext_eext_more_option_item_append_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_append_n", utc_efl_ext_eext_more_option_item_append_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_prepend_p", utc_efl_ext_eext_more_option_item_prepend_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_prepend_n", utc_efl_ext_eext_more_option_item_prepend_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_insert_after_p", utc_efl_ext_eext_more_option_item_insert_after_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_insert_after_n", utc_efl_ext_eext_more_option_item_insert_after_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_insert_before_p", utc_efl_ext_eext_more_option_item_insert_before_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_insert_before_n", utc_efl_ext_eext_more_option_item_insert_before_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_del_p", utc_efl_ext_eext_more_option_item_del_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_del_n", utc_efl_ext_eext_more_option_item_del_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_items_clear_p", utc_efl_ext_eext_more_option_items_clear_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_items_clear_n", utc_efl_ext_eext_more_option_items_clear_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_part_text_set_p", utc_efl_ext_eext_more_option_item_part_text_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_part_text_set_n", utc_efl_ext_eext_more_option_item_part_text_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_part_text_get_p", utc_efl_ext_eext_more_option_item_part_text_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_part_text_get_n", utc_efl_ext_eext_more_option_item_part_text_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_domain_translatable_part_text_set_p", utc_efl_ext_eext_more_option_item_domain_translatable_part_text_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_domain_translatable_part_text_set_n", utc_efl_ext_eext_more_option_item_domain_translatable_part_text_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_part_content_set_p", utc_efl_ext_eext_more_option_item_part_content_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_part_content_set_n", utc_efl_ext_eext_more_option_item_part_content_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_part_content_get_p", utc_efl_ext_eext_more_option_item_part_content_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_item_part_content_get_n", utc_efl_ext_eext_more_option_item_part_content_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_opened_set_p", utc_efl_ext_eext_more_option_opened_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_opened_set_n", utc_efl_ext_eext_more_option_opened_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_opened_get_p", utc_efl_ext_eext_more_option_opened_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_opened_get_n", utc_efl_ext_eext_more_option_opened_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_items_get_p", utc_efl_ext_eext_more_option_items_get_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_more_option_items_get_n", utc_efl_ext_eext_more_option_items_get_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_spinner_add_p", utc_efl_ext_eext_circle_object_spinner_add_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_spinner_add_n", utc_efl_ext_eext_circle_object_spinner_add_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_spinner_angle_set_p", utc_efl_ext_eext_circle_object_spinner_angle_set_p, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {"utc_efl_ext_eext_circle_object_spinner_angle_set_n", utc_efl_ext_eext_circle_object_spinner_angle_set_n, utc_efl_ext_startup, utc_efl_ext_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_EFL_EXT_CORE_H__
diff --git a/src/utc/efl-ext/utc-efl-ext.c b/src/utc/efl-ext/utc-efl-ext.c
new file mode 100755 (executable)
index 0000000..1113af3
--- /dev/null
@@ -0,0 +1,3440 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <efl_extension.h>
+
+//& set: EflExt
+
+void utc_efl_ext_startup(void)
+{
+   elm_init(0, NULL);
+}
+
+void utc_efl_ext_cleanup(void)
+{
+   elm_shutdown();
+}
+
+static void _win_del(void *data, Evas_Object *obj, void *event)
+{
+   elm_exit();
+}
+
+static Evas_Object * _create_win(const char *name)
+{
+   Evas_Object *obj = NULL;
+
+   obj = elm_win_add(NULL, name, ELM_WIN_BASIC);
+   if (obj)
+     {
+        elm_win_title_set(obj, name);
+        evas_object_smart_callback_add(obj, "delete,request", _win_del, NULL);
+     }
+
+   return obj;
+}
+
+Eina_Bool _rotary_callback(void *data, Evas_Object *obj, Eext_Rotary_Event_Info *info)
+{
+   return EINA_TRUE;
+}
+
+static char *_genlist_text_get(void *data, Evas_Object *obj, const char *part)
+{
+   return strdup("default");
+}
+
+int utc_efl_ext_rotary_object_event_callback_add_p(void)
+{
+   Eina_Bool ret = EINA_FALSE;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+
+   ret = eext_rotary_object_event_callback_add(scr, _rotary_callback, NULL);
+   assert(ret);
+
+   return 0;
+}
+
+int utc_efl_ext_rotary_object_event_callback_add_n1(void)
+{
+   Eina_Bool ret = EINA_TRUE;
+
+   ret = eext_rotary_object_event_callback_add(NULL, _rotary_callback, NULL);
+   assert_eq(ret, EINA_FALSE);
+
+   return 0;
+}
+
+int utc_efl_ext_rotary_object_event_callback_add_n2(void)
+{
+   Eina_Bool ret = EINA_TRUE;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+
+   ret = eext_rotary_object_event_callback_add(scr, NULL, NULL);
+   assert_eq(ret, EINA_FALSE);
+
+   return 0;
+}
+
+int utc_efl_ext_rotary_object_event_callback_priority_add_p(void)
+{
+   Eina_Bool ret = EINA_FALSE;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+
+   ret = eext_rotary_object_event_callback_priority_add(scr, EEXT_CALLBACK_PRIORITY_BEFORE,
+                                                        _rotary_callback, NULL);
+   assert(ret);
+
+   return 0;
+}
+
+int utc_efl_ext_rotary_object_event_callback_priority_add_n1(void)
+{
+   Eina_Bool ret = EINA_TRUE;
+
+   ret = eext_rotary_object_event_callback_priority_add(NULL, EEXT_CALLBACK_PRIORITY_BEFORE,
+                                                        _rotary_callback, NULL);
+   assert_eq(ret, EINA_FALSE);
+
+   return 0;
+}
+
+int utc_efl_ext_rotary_object_event_callback_priority_add_n2(void)
+{
+   Eina_Bool ret = EINA_TRUE;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+
+   ret = eext_rotary_object_event_callback_priority_add(scr, EEXT_CALLBACK_PRIORITY_BEFORE,
+                                                        NULL, NULL);
+   assert_eq(ret, EINA_FALSE);
+
+   return 0;
+}
+
+int utc_efl_ext_rotary_object_event_callback_del_p1(void)
+{
+   Eina_Bool ret = EINA_FALSE;
+   char s[] = "test";
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+
+   ret = eext_rotary_object_event_callback_add(scr, _rotary_callback, s);
+   assert(ret);
+
+   char *s2 = (char *)eext_rotary_object_event_callback_del(scr, _rotary_callback);
+   assert(s2);
+
+   return 0;
+}
+
+int utc_efl_ext_rotary_object_event_callback_del_p2(void)
+{
+   Eina_Bool ret = EINA_FALSE;
+   char s[] = "test";
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+
+   ret = eext_rotary_object_event_callback_priority_add(scr, EEXT_CALLBACK_PRIORITY_BEFORE,
+                                                        _rotary_callback, s);
+   assert(ret);
+
+   char *s2 = (char *)eext_rotary_object_event_callback_del(scr, _rotary_callback);
+   assert(s2);
+
+   return 0;
+}
+
+Eina_Bool _rotary_handler(void *data, Eext_Rotary_Event_Info *info)
+{
+   return EINA_TRUE;
+}
+
+int utc_efl_ext_rotary_handler_add_p(void)
+{
+   Eina_Bool ret = EINA_FALSE;
+
+   ret = eext_rotary_event_handler_add(_rotary_handler, NULL);
+   assert(ret);
+
+   return 0;
+}
+
+int utc_efl_ext_rotary_handler_add_n(void)
+{
+   Eina_Bool ret = EINA_TRUE;
+
+   ret = eext_rotary_event_handler_add(NULL, NULL);
+   assert_eq(ret, EINA_FALSE);
+
+   return 0;
+}
+
+int utc_efl_ext_rotary_handler_del_p(void)
+{
+   Eina_Bool ret = EINA_FALSE;
+   char s[] = "test";
+
+   ret = eext_rotary_event_handler_add(_rotary_handler, s);
+   assert(ret);
+
+   char *s2 = (char *)eext_rotary_event_handler_del(_rotary_handler);
+   assert(s2);
+
+   return 0;
+}
+
+///////// efl_extension_circle_object.h //////////////////
+int utc_efl_ext_eext_circle_object_line_width_set_p(void)
+{
+   int w = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *scr_cir = eext_circle_object_add(scr, NULL);
+   assert(scr_cir);
+
+   eext_circle_object_line_width_set(scr_cir, 10);
+   w = eext_circle_object_line_width_get(scr_cir);
+   assert_eq(w, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_line_width_set_n(void)
+{
+   int w = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_line_width_set(win, 10);
+   w = eext_circle_object_line_width_get(win);
+   assert_eq(w, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_line_width_get_p(void)
+{
+   int w = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *scr_cir = eext_circle_object_add(scr, NULL);
+   assert(scr_cir);
+
+   eext_circle_object_line_width_set(scr_cir, 10);
+   w = eext_circle_object_line_width_get(scr_cir);
+   assert_eq(w, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_line_width_get_n(void)
+{
+   int w = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_line_width_set(win, 10);
+   w = eext_circle_object_line_width_get(win);
+   assert_eq(w, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_set_p(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_angle_set(cir_obj, 10);
+   a = eext_circle_object_angle_get(cir_obj);
+   assert_eq(a, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_set_n(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_angle_set(win, 10);
+   a = eext_circle_object_angle_get(win);
+   assert_eq(a, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_get_p(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_angle_set(cir_obj, 10);
+   a = eext_circle_object_angle_get(cir_obj);
+   assert_eq(a, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_get_n(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_angle_set(win, 10);
+   a = eext_circle_object_angle_get(win);
+   assert_eq(a, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_offset_set_p(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_angle_offset_set(cir_obj, 10);
+   a = eext_circle_object_angle_offset_get(cir_obj);
+   assert_eq(a, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_offset_set_n(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_angle_offset_set(win, 10);
+   a = eext_circle_object_angle_offset_get(win);
+   assert_eq(a, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_offset_get_p(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_angle_offset_set(cir_obj, 10);
+   a = eext_circle_object_angle_offset_get(cir_obj);
+   assert_eq(a, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_offset_get_n(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_angle_offset_set(win, 10);
+   a = eext_circle_object_angle_offset_get(win);
+   assert_eq(a, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_min_max_set_p(void)
+{
+   double min = 0, max = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_angle_min_max_set(cir_obj, 5, 10);
+   eext_circle_object_angle_min_max_get(cir_obj, &min, &max);
+   assert_eq(min, 5);
+   assert_eq(max, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_min_max_set_n(void)
+{
+   double min = -1, max = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_angle_min_max_set(win, 5, 10);
+   eext_circle_object_angle_min_max_get(win, &min, &max);
+   assert_eq(min, 0);
+   assert_eq(max, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_min_max_get_p(void)
+{
+   double min = 0, max = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_angle_min_max_set(cir_obj, 5, 10);
+   eext_circle_object_angle_min_max_get(cir_obj, &min, &max);
+   assert_eq(min, 5);
+   assert_eq(max, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_angle_min_max_get_n(void)
+{
+   double min = -1, max = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_angle_min_max_set(win, 5, 10);
+   eext_circle_object_angle_min_max_get(win, &min, &max);
+   assert_eq(min, 0);
+   assert_eq(max, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_value_min_max_set_p(void)
+{
+   double min = 0, max = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_value_min_max_set(cir_obj, 5, 10);
+   eext_circle_object_value_min_max_get(cir_obj, &min, &max);
+   assert_eq(min, 5);
+   assert_eq(max, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_value_min_max_set_n(void)
+{
+   double min = -1, max = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_value_min_max_set(win, 5, 10);
+   eext_circle_object_value_min_max_get(win, &min, &max);
+   assert_eq(min, 0);
+   assert_eq(max, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_value_min_max_get_p(void)
+{
+   double min = 0, max = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_value_min_max_set(cir_obj, 5, 10);
+   eext_circle_object_value_min_max_get(cir_obj, &min, &max);
+   assert_eq(min, 5);
+   assert_eq(max, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_value_min_max_get_n(void)
+{
+   double min = -1, max = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_value_min_max_set(win, 5, 10);
+   eext_circle_object_value_min_max_get(win, &min, &max);
+   assert_eq(min, 0);
+   assert_eq(max, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_value_set_p(void)
+{
+   double val = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_value_set(cir_obj, 10);
+   val = eext_circle_object_value_get(cir_obj);
+   assert_eq(val, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_value_set_n(void)
+{
+   double val = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_value_set(win, 10);
+   val = eext_circle_object_value_get(win);
+   assert_eq(val, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_value_get_p(void)
+{
+   double val = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_value_set(cir_obj, 10);
+   val = eext_circle_object_value_get(cir_obj);
+   assert_eq(val, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_value_get_n(void)
+{
+   double val = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_value_set(win, 10);
+   val = eext_circle_object_value_get(win);
+   assert_eq(val, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_color_set_p(void)
+{
+   int r = 0, g = 0, b = 0, a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_color_set(cir_obj, 10, 20, 30, 40);
+   eext_circle_object_color_get(cir_obj, &r, &g, &b, &a);
+   assert_eq(r, 10);
+   assert_eq(g, 20);
+   assert_eq(b, 30);
+   assert_eq(a, 40);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_color_set_n(void)
+{
+   int r = -1, g = -1, b = -1, a = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_color_set(win, 10, 20, 30, 40);
+   eext_circle_object_color_get(win, &r, &g, &b, &a);
+   assert_eq(r, 0);
+   assert_eq(g, 0);
+   assert_eq(b, 0);
+   assert_eq(a, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_color_get_p(void)
+{
+   int r = 0, g = 0, b = 0, a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_color_set(cir_obj, 10, 20, 30, 40);
+   eext_circle_object_color_get(cir_obj, &r, &g, &b, &a);
+   assert_eq(r, 10);
+   assert_eq(g, 20);
+   assert_eq(b, 30);
+   assert_eq(a, 40);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_color_get_n(void)
+{
+   int r = -1, g = -1, b = -1, a = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_color_set(win, 10, 20, 30, 40);
+   eext_circle_object_color_get(win, &r, &g, &b, &a);
+   assert_eq(r, 0);
+   assert_eq(g, 0);
+   assert_eq(b, 0);
+   assert_eq(a, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_radius_set_p(void)
+{
+   double rad = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_radius_set(cir_obj, 10);
+   rad = eext_circle_object_radius_get(cir_obj);
+   assert_eq(rad, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_radius_set_n(void)
+{
+   double rad = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_radius_set(win, 10);
+   rad = eext_circle_object_radius_get(win);
+   assert_eq(rad, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_radius_get_p(void)
+{
+   double rad = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_radius_set(cir_obj, 10);
+   rad = eext_circle_object_radius_get(cir_obj);
+   assert_eq(rad, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_radius_get_n(void)
+{
+   double rad = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_radius_set(win, 10);
+   rad = eext_circle_object_radius_get(win);
+   assert_eq(rad, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_disabled_set_p(void)
+{
+   Eina_Bool ret = EINA_FALSE;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_disabled_set(cir_obj, EINA_TRUE);
+   ret = eext_circle_object_disabled_get(cir_obj);
+   assert_eq(ret, EINA_TRUE);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_disabled_set_n(void)
+{
+   Eina_Bool ret = EINA_TRUE;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_disabled_set(win, 10);
+   ret = eext_circle_object_disabled_get(win);
+   assert_eq(ret, EINA_FALSE);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_disabled_get_p(void)
+{
+   Eina_Bool ret = EINA_FALSE;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_disabled_set(cir_obj, EINA_TRUE);
+   ret = eext_circle_object_disabled_get(cir_obj);
+   assert_eq(ret, EINA_TRUE);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_disabled_get_n(void)
+{
+   Eina_Bool ret = EINA_TRUE;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_disabled_set(win, 10);
+   ret = eext_circle_object_disabled_get(win);
+   assert_eq(ret, EINA_FALSE);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_add_p(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_line_width_set_p(void)
+{
+   int w = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *scr_cir = eext_circle_object_add(scr, NULL);
+   assert(scr_cir);
+
+   eext_circle_object_item_line_width_set(scr_cir, "default", 10);
+   w = eext_circle_object_item_line_width_get(scr_cir, "default");
+   assert_eq(w, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_line_width_set_n(void)
+{
+   int w = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_line_width_set(win, "default", 10);
+   w = eext_circle_object_item_line_width_get(win, "default");
+   assert_eq(w, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_line_width_get_p(void)
+{
+   int w = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *scr_cir = eext_circle_object_add(scr, NULL);
+   assert(scr_cir);
+
+   eext_circle_object_item_line_width_set(scr_cir, "default", 10);
+   w = eext_circle_object_item_line_width_get(scr_cir, "default");
+   assert_eq(w, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_line_width_get_n(void)
+{
+   int w = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_line_width_set(win, "default", 10);
+   w = eext_circle_object_item_line_width_get(win, "default");
+   assert_eq(w, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_set_p(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_angle_set(cir_obj, "default", 10);
+   a = eext_circle_object_item_angle_get(cir_obj, "default");
+   assert_eq(a, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_set_n(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_angle_set(win, "default", 10);
+   a = eext_circle_object_item_angle_get(win, "default");
+   assert_eq(a, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_get_p(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_angle_set(cir_obj, "default", 10);
+   a = eext_circle_object_item_angle_get(cir_obj, "default");
+   assert_eq(a, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_get_n(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_angle_set(win, "default", 10);
+   a = eext_circle_object_item_angle_get(win, "default");
+   assert_eq(a, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_offset_set_p(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_angle_offset_set(cir_obj, "default", 10);
+   a = eext_circle_object_item_angle_offset_get(cir_obj, "default");
+   assert_eq(a, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_offset_set_n(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_angle_offset_set(win, "default", 10);
+   a = eext_circle_object_item_angle_offset_get(win, "default");
+   assert_eq(a, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_offset_get_p(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_angle_offset_set(cir_obj, "default", 10);
+   a = eext_circle_object_item_angle_offset_get(cir_obj, "default");
+   assert_eq(a, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_offset_get_n(void)
+{
+   double a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_angle_offset_set(win, "default", 10);
+   a = eext_circle_object_item_angle_offset_get(win, "default");
+   assert_eq(a, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_min_max_set_p(void)
+{
+   double min = 0, max = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_angle_min_max_set(cir_obj, "default", 5, 10);
+   eext_circle_object_item_angle_min_max_get(cir_obj, "default", &min, &max);
+   assert_eq(min, 5);
+   assert_eq(max, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_min_max_set_n(void)
+{
+   double min = -1, max = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_angle_min_max_set(win, "default", 5, 10);
+   eext_circle_object_item_angle_min_max_get(win, "default", &min, &max);
+   assert_eq(min, 0);
+   assert_eq(max, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_min_max_get_p(void)
+{
+   double min = 0, max = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_angle_min_max_set(cir_obj, "default", 5, 10);
+   eext_circle_object_item_angle_min_max_get(cir_obj, "default", &min, &max);
+   assert_eq(min, 5);
+   assert_eq(max, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_angle_min_max_get_n(void)
+{
+   double min = -1, max = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_angle_min_max_set(win, "default", 5, 10);
+   eext_circle_object_item_angle_min_max_get(win, "default", &min, &max);
+   assert_eq(min, 0);
+   assert_eq(max, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_value_min_max_set_p(void)
+{
+   double min = 0, max = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_value_min_max_set(cir_obj, "default", 5, 10);
+   eext_circle_object_item_value_min_max_get(cir_obj, "default", &min, &max);
+   assert_eq(min, 5);
+   assert_eq(max, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_value_min_max_set_n(void)
+{
+   double min = -1, max = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_value_min_max_set(win, "default", 5, 10);
+   eext_circle_object_item_value_min_max_get(win, "default", &min, &max);
+   assert_eq(min, 0);
+   assert_eq(max, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_value_min_max_get_p(void)
+{
+   double min = 0, max = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_value_min_max_set(cir_obj, "default", 5, 10);
+   eext_circle_object_item_value_min_max_get(cir_obj, "default", &min, &max);
+   assert_eq(min, 5);
+   assert_eq(max, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_value_min_max_get_n(void)
+{
+   double min = -1, max = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_value_min_max_set(win, "default", 5, 10);
+   eext_circle_object_item_value_min_max_get(win, "default", &min, &max);
+   assert_eq(min, 0);
+   assert_eq(max, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_value_set_p(void)
+{
+   double val = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_value_set(cir_obj, "default", 10);
+   val = eext_circle_object_item_value_get(cir_obj, "default");
+   assert_eq(val, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_value_set_n(void)
+{
+   double val = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_value_set(win, "default", 10);
+   val = eext_circle_object_item_value_get(win, "default");
+   assert_eq(val, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_value_get_p(void)
+{
+   double val = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_value_set(cir_obj, "default", 10);
+   val = eext_circle_object_item_value_get(cir_obj, "default");
+   assert_eq(val, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_value_get_n(void)
+{
+   double val = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_value_set(win, "default", 10);
+   val = eext_circle_object_item_value_get(win, "default");
+   assert_eq(val, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_color_set_p(void)
+{
+   int r = 0, g = 0, b = 0, a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_color_set(cir_obj, "default", 10, 20, 30, 40);
+   eext_circle_object_item_color_get(cir_obj, "default", &r, &g, &b, &a);
+   assert_eq(r, 10);
+   assert_eq(g, 20);
+   assert_eq(b, 30);
+   assert_eq(a, 40);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_color_set_n(void)
+{
+   int r = -1, g = -1, b = -1, a = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_color_set(win, "default", 10, 20, 30, 40);
+   eext_circle_object_item_color_get(win, "default", &r, &g, &b, &a);
+   assert_eq(r, 0);
+   assert_eq(g, 0);
+   assert_eq(b, 0);
+   assert_eq(a, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_color_get_p(void)
+{
+   int r = 0, g = 0, b = 0, a = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_color_set(cir_obj, "default", 10, 20, 30, 40);
+   eext_circle_object_item_color_get(cir_obj, "default", &r, &g, &b, &a);
+   assert_eq(r, 10);
+   assert_eq(g, 20);
+   assert_eq(b, 30);
+   assert_eq(a, 40);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_color_get_n(void)
+{
+   int r = -1, g = -1, b = -1, a = -1;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_color_set(win, "default", 10, 20, 30, 40);
+   eext_circle_object_item_color_get(win, "default", &r, &g, &b, &a);
+   assert_eq(r, 0);
+   assert_eq(g, 0);
+   assert_eq(b, 0);
+   assert_eq(a, 0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_radius_set_p(void)
+{
+   double rad = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_radius_set(cir_obj, "default", 10);
+   rad = eext_circle_object_item_radius_get(cir_obj, "default");
+   assert_eq(rad, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_radius_set_n(void)
+{
+   double rad = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_radius_set(win, "default", 10);
+   rad = eext_circle_object_item_radius_get(win, "default");
+   assert_eq(rad, -1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_radius_get_p(void)
+{
+   double rad = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *scr = elm_scroller_add(win);
+   assert(scr);
+   Evas_Object *cir_obj = eext_circle_object_add(scr, NULL);
+   assert(cir_obj);
+
+   eext_circle_object_item_radius_set(cir_obj, "default", 10);
+   rad = eext_circle_object_item_radius_get(cir_obj, "default");
+   assert_eq(rad, 10);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_item_radius_get_n(void)
+{
+   double rad = 0;
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_object_item_radius_set(win, "default", 10);
+   rad = eext_circle_object_item_radius_get(win, "default");
+   assert_eq(rad, -1);
+
+   return 0;
+}
+
+//////////
+
+/////////// efl_extension_circle_surface.h ////////////////////
+int utc_efl_ext_eext_circle_surface_conformant_add_p(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *cfm = elm_conformant_add(win);
+   assert(cfm);
+   Eext_Circle_Surface *sur = eext_circle_surface_conformant_add(cfm);
+   assert(sur);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_surface_conformant_add_n1(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Eext_Circle_Surface *sur = eext_circle_surface_conformant_add(NULL);
+   assert_eq(sur, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_surface_conformant_add_n2(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Eext_Circle_Surface *sur = eext_circle_surface_conformant_add(win);
+   assert_eq(sur, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_surface_layout_add_p(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *cfm = elm_layout_add(win);
+   assert(cfm);
+   Eext_Circle_Surface *sur = eext_circle_surface_layout_add(cfm);
+   assert(sur);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_surface_layout_add_n1(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Eext_Circle_Surface *sur = eext_circle_surface_layout_add(NULL);
+   assert_eq(sur, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_surface_layout_add_n2(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Eext_Circle_Surface *sur = eext_circle_surface_layout_add(win);
+   assert_eq(sur, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_surface_naviframe_add_p(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *nf = elm_naviframe_add(win);
+   assert(nf);
+   Eext_Circle_Surface *sur = eext_circle_surface_naviframe_add(nf);
+   assert(sur);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_surface_naviframe_add_n1(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Eext_Circle_Surface *sur = eext_circle_surface_naviframe_add(NULL);
+   assert_eq(sur, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_surface_naviframe_add_n2(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Eext_Circle_Surface *sur = eext_circle_surface_naviframe_add(win);
+   assert_eq(sur, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_surface_del_p(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+   Evas_Object *cfm = elm_conformant_add(win);
+   assert(cfm);
+   Eext_Circle_Surface *sur = eext_circle_surface_conformant_add(cfm);
+   assert(sur);
+
+   eext_circle_surface_del(sur);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_surface_del_n(void)
+{
+   Evas_Object *win = _create_win("window");
+   assert(win);
+
+   eext_circle_surface_del(NULL);
+
+   return 0;
+}
+//////////
+
+int utc_efl_ext_eext_circle_object_datetime_add_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *datetime, *circle_datetime;
+
+   win = _create_win("window");
+   assert(win);
+
+   datetime = elm_datetime_add(win);
+   assert(datetime);
+
+   circle_datetime = eext_circle_object_datetime_add(datetime, NULL);
+   assert(circle_datetime);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_datetime_add_n(void)
+{
+   Evas_Object *circle_datetime;
+
+   circle_datetime = eext_circle_object_datetime_add(NULL, NULL);
+   assert_eq(circle_datetime, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_genlist_add_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *genlist, *circle_genlist;
+
+   win = _create_win("window");
+   assert(win);
+
+   genlist = elm_genlist_add(win);
+   assert(win);
+
+   circle_genlist = eext_circle_object_genlist_add(genlist, NULL);
+   assert(circle_genlist);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_genlist_add_n(void)
+{
+   Evas_Object *circle_genlist;
+
+   circle_genlist = eext_circle_object_genlist_add(NULL, NULL);
+   assert_eq(circle_genlist, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_genlist_scroller_policy_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *genlist, *circle_genlist;
+   Elm_Scroller_Policy policy_h = ELM_SCROLLER_POLICY_AUTO;
+   Elm_Scroller_Policy policy_v = ELM_SCROLLER_POLICY_AUTO;
+
+   win = _create_win("window");
+   assert(win);
+
+   genlist = elm_genlist_add(win);
+   assert(win);
+
+   circle_genlist = eext_circle_object_genlist_add(genlist, NULL);
+   assert(circle_genlist);
+
+   eext_circle_object_genlist_scroller_policy_get(circle_genlist, &policy_h, &policy_v);
+
+   assert_eq(policy_h, ELM_SCROLLER_POLICY_AUTO);
+   assert_eq(policy_v, ELM_SCROLLER_POLICY_AUTO);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_genlist_scroller_policy_get_n(void)
+{
+   Elm_Scroller_Policy policy_h = ELM_SCROLLER_POLICY_OFF;
+   Elm_Scroller_Policy policy_v = ELM_SCROLLER_POLICY_OFF;
+
+   eext_circle_object_genlist_scroller_policy_get(NULL, &policy_h, &policy_v);
+
+   assert_eq(policy_h, ELM_SCROLLER_POLICY_AUTO);
+   assert_eq(policy_v, ELM_SCROLLER_POLICY_AUTO);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_genlist_scroller_policy_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *genlist, *circle_genlist;
+   Elm_Scroller_Policy policy_h = ELM_SCROLLER_POLICY_AUTO;
+   Elm_Scroller_Policy policy_v = ELM_SCROLLER_POLICY_AUTO;
+
+   win = _create_win("window");
+   assert(win);
+
+   genlist = elm_genlist_add(win);
+   assert(win);
+
+   circle_genlist = eext_circle_object_genlist_add(genlist, NULL);
+   assert(circle_genlist);
+
+   eext_circle_object_genlist_scroller_policy_set(circle_genlist, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_OFF);
+   eext_circle_object_genlist_scroller_policy_get(circle_genlist, &policy_h, &policy_v);
+
+   assert_eq(policy_h, ELM_SCROLLER_POLICY_ON);
+   assert_eq(policy_v, ELM_SCROLLER_POLICY_OFF);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_genlist_scroller_policy_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *genlist, *circle_genlist;
+
+   win = _create_win("window");
+   assert(win);
+
+   genlist = elm_genlist_add(win);
+   assert(win);
+
+   circle_genlist = eext_circle_object_genlist_add(genlist, NULL);
+   assert(circle_genlist);
+
+   eext_circle_object_genlist_scroller_policy_set(NULL, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_OFF);
+   eext_circle_object_genlist_scroller_policy_set(circle_genlist, ELM_SCROLLER_POLICY_AUTO - 1, ELM_SCROLLER_POLICY_OFF);
+   eext_circle_object_genlist_scroller_policy_set(circle_genlist, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_AUTO - 1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_progressbar_add_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *progressbar;
+
+   win = _create_win("window");
+   assert(win);
+
+   progressbar = eext_circle_object_progressbar_add(win, NULL);
+   assert(progressbar);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_progressbar_add_n(void)
+{
+   Evas_Object *progressbar;
+
+   progressbar = eext_circle_object_progressbar_add(NULL, NULL);
+   assert_eq(progressbar, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_slider_add_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *slider;
+
+   win = _create_win("window");
+   assert(win);
+
+   slider = eext_circle_object_slider_add(win, NULL);
+   assert(slider);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_slider_add_n(void)
+{
+   Evas_Object *slider;
+
+   slider = eext_circle_object_slider_add(NULL, NULL);
+   assert_eq(slider, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_slider_step_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *slider;
+   double step = 0;
+
+   win = _create_win("window");
+   assert(win);
+
+   slider = eext_circle_object_slider_add(win, NULL);
+   assert(slider);
+
+   eext_circle_object_slider_step_set(slider, 5.0);
+   step = eext_circle_object_slider_step_get(slider);
+
+   assert(step);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_slider_step_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *slider;
+   double step = 1.0;
+
+   win = _create_win("window");
+   assert(win);
+
+   slider = eext_circle_object_slider_add(win, NULL);
+   assert(slider);
+
+   eext_circle_object_slider_step_set(NULL, 5.0);
+   step = eext_circle_object_slider_step_get(slider);
+
+   assert_eq(step, 1.0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_slider_step_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *slider;
+   double step = 0;
+
+   win = _create_win("window");
+   assert(win);
+
+   slider = eext_circle_object_slider_add(win, NULL);
+   assert(slider);
+
+   eext_circle_object_slider_step_set(slider, 5.0);
+   step = eext_circle_object_slider_step_get(slider);
+
+   assert(step);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_slider_step_get_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *slider;
+   double step = 1.0;
+
+   win = _create_win("window");
+   assert(win);
+
+   slider = eext_circle_object_slider_add(win, NULL);
+   assert(slider);
+
+   eext_circle_object_slider_step_set(slider, 5.0);
+   step = eext_circle_object_slider_step_get(NULL);
+
+   assert_neq(step, 1.0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_scroller_add_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *scroller;
+
+   win = _create_win("window");
+   assert(win);
+
+   scroller = eext_circle_object_scroller_add(win, NULL);
+   assert(scroller);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_scroller_add_n(void)
+{
+   Evas_Object *scroller;
+
+   scroller = eext_circle_object_scroller_add(NULL, NULL);
+   assert_eq(scroller, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_scroller_policy_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *scroller, *circle_scroller;
+   Elm_Scroller_Policy policy_h = ELM_SCROLLER_POLICY_AUTO;
+   Elm_Scroller_Policy policy_v = ELM_SCROLLER_POLICY_AUTO;
+
+   win = _create_win("window");
+   assert(win);
+
+   scroller = elm_scroller_add(win);
+   assert(win);
+
+   circle_scroller = eext_circle_object_scroller_add(scroller, NULL);
+   assert(circle_scroller);
+
+   eext_circle_object_scroller_policy_get(circle_scroller, &policy_h, &policy_v);
+
+   assert_eq(policy_h, ELM_SCROLLER_POLICY_AUTO);
+   assert_eq(policy_v, ELM_SCROLLER_POLICY_AUTO);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_scroller_policy_get_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *scroller, *circle_scroller;
+   Elm_Scroller_Policy policy_h = ELM_SCROLLER_POLICY_AUTO;
+   Elm_Scroller_Policy policy_v = ELM_SCROLLER_POLICY_AUTO;
+
+   win = _create_win("window");
+   assert(win);
+
+   scroller = elm_scroller_add(win);
+   assert(win);
+
+   circle_scroller = eext_circle_object_scroller_add(scroller, NULL);
+   assert(circle_scroller);
+
+   eext_circle_object_scroller_policy_set(circle_scroller, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_OFF);
+   eext_circle_object_scroller_policy_get(NULL, &policy_h, &policy_v);
+
+   assert_eq(policy_h, ELM_SCROLLER_POLICY_AUTO);
+   assert_eq(policy_v, ELM_SCROLLER_POLICY_AUTO);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_scroller_policy_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *scroller, *circle_scroller;
+   Elm_Scroller_Policy policy_h = ELM_SCROLLER_POLICY_AUTO;
+   Elm_Scroller_Policy policy_v = ELM_SCROLLER_POLICY_AUTO;
+
+   win = _create_win("window");
+   assert(win);
+
+   scroller = elm_scroller_add(win);
+   assert(win);
+
+   circle_scroller = eext_circle_object_scroller_add(scroller, NULL);
+   assert(circle_scroller);
+
+   eext_circle_object_scroller_policy_set(circle_scroller, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_OFF);
+   eext_circle_object_scroller_policy_get(circle_scroller, &policy_h, &policy_v);
+
+   assert_eq(policy_h, ELM_SCROLLER_POLICY_ON);
+   assert_eq(policy_v, ELM_SCROLLER_POLICY_OFF);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_scroller_policy_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *scroller, *circle_scroller;
+
+   win = _create_win("window");
+   assert(win);
+
+   scroller = elm_scroller_add(win);
+   assert(win);
+
+   circle_scroller = eext_circle_object_scroller_add(scroller, NULL);
+   assert(circle_scroller);
+
+   eext_circle_object_scroller_policy_set(NULL, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_ON);
+   eext_circle_object_scroller_policy_set(circle_scroller, ELM_SCROLLER_POLICY_AUTO - 1, ELM_SCROLLER_POLICY_OFF);
+   eext_circle_object_scroller_policy_set(circle_scroller, ELM_SCROLLER_POLICY_ON, ELM_SCROLLER_POLICY_AUTO - 1);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_add_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_add_n(void)
+{
+   Evas_Object *more_option;
+
+   more_option = eext_more_option_add(NULL);
+   assert_eq(more_option, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_direction_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_More_Option_Direction direction;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   eext_more_option_direction_set(more_option, EEXT_MORE_OPTION_DIRECTION_BOTTOM);
+   direction = eext_more_option_direction_get(more_option);
+
+   assert_eq(direction, EEXT_MORE_OPTION_DIRECTION_BOTTOM);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_direction_set_n(void)
+{
+   Evas_Object *win;
+
+   win = _create_win("window");
+   assert(win);
+
+   eext_more_option_direction_set(NULL, EEXT_MORE_OPTION_DIRECTION_BOTTOM);
+   eext_more_option_direction_set(win, EEXT_MORE_OPTION_DIRECTION_BOTTOM);
+   
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_direction_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_More_Option_Direction direction;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   direction = eext_more_option_direction_get(more_option);
+   assert_eq(direction, EEXT_MORE_OPTION_DIRECTION_RIGHT);
+
+   eext_more_option_direction_set(more_option, EEXT_MORE_OPTION_DIRECTION_BOTTOM);
+   direction = eext_more_option_direction_get(more_option);
+   assert_eq(direction, EEXT_MORE_OPTION_DIRECTION_BOTTOM);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_direction_get_n(void)
+{
+   Evas_Object *win;
+   Eext_More_Option_Direction direction;
+
+   win = _create_win("window");
+   assert(win);
+
+   direction = eext_more_option_direction_get(NULL);
+   assert_eq(direction, EEXT_MORE_OPTION_DIRECTION_RIGHT);
+
+   direction = eext_more_option_direction_get(win);
+   assert_eq(direction, EEXT_MORE_OPTION_DIRECTION_RIGHT);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_append_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_append_n(void)
+{
+   Evas_Object *win;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   item = eext_more_option_item_append(NULL);
+   assert_eq(item, NULL);
+
+   item = eext_more_option_item_append(win);
+   assert_eq(item, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_prepend_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_prepend(more_option);
+   assert(item);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_prepend_n(void)
+{
+   Evas_Object *win;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   item = eext_more_option_item_prepend(NULL);
+   assert_eq(item, NULL);
+
+   item = eext_more_option_item_prepend(win);
+   assert_eq(item, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_insert_after_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+   Eext_Object_Item *inserted_item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   inserted_item = eext_more_option_item_insert_after(more_option, item);
+   assert(inserted_item);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_insert_after_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+   Eext_Object_Item *inserted_item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   inserted_item = eext_more_option_item_insert_after(NULL, item);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_more_option_item_insert_after(NULL, NULL);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_more_option_item_insert_after(win, item);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_more_option_item_insert_after(win, NULL);
+   assert_eq(inserted_item, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_insert_before_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+   Eext_Object_Item *inserted_item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   inserted_item = eext_more_option_item_insert_before(more_option, item);
+   assert(inserted_item);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_insert_before_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+   Eext_Object_Item *inserted_item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   inserted_item = eext_more_option_item_insert_before(NULL, item);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_more_option_item_insert_before(NULL, NULL);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_more_option_item_insert_before(win, item);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_more_option_item_insert_before(win, NULL);
+   assert_eq(inserted_item, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_del_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+   Eina_List *items;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   eext_more_option_item_del(item);
+   items = eext_more_option_items_get(more_option);
+   assert_eq(items, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_del_n(void)
+{
+   eext_more_option_item_del(NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_items_clear_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+   Eina_List *items;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   eext_more_option_items_clear(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   eext_more_option_items_clear(more_option);
+   items = eext_more_option_items_get(more_option);
+   assert_eq(items, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_items_clear_n(void)
+{
+   Evas_Object *win;
+
+   win = _create_win("window");
+   assert(win);
+
+   eext_more_option_items_clear(NULL);
+   eext_more_option_items_clear(win);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_part_text_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+   const char *text;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   eext_more_option_item_part_text_set(item, "selector,main_text", "elm.text test");
+   text = eext_more_option_item_part_text_get(item, "selector,main_text");
+   assert(!strcmp(text, "elm.text test"));
+
+   eext_more_option_item_part_text_set(item, "selector,sub_text", "elm.text.sub test");
+   text = eext_more_option_item_part_text_get(item, "selector,sub_text");
+   assert(!strcmp(text, "elm.text.sub test"));
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_part_text_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+   const char *text;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   eext_more_option_item_part_text_set(item, NULL, NULL);
+   text = eext_more_option_item_part_text_get(item, "selector,main_text");
+   assert(!text || !strcmp(text, ""));
+
+   eext_more_option_item_part_text_set(NULL, NULL, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_part_text_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+   const char *text;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   eext_more_option_item_part_text_set(item, "selector,main_text", "elm.text test");
+   text = eext_more_option_item_part_text_get(item, "selector,main_text");
+   assert(!strcmp(text, "elm.text test"));
+
+   eext_more_option_item_part_text_set(item, "selector,sub_text", "elm.text.sub test");
+   text = eext_more_option_item_part_text_get(item, "selector,sub_text");
+   assert(!strcmp(text, "elm.text.sub test"));
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_part_text_get_n(void)
+{
+   const char *text;
+
+   text = eext_more_option_item_part_text_get(NULL, NULL);
+   assert_eq(text, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_domain_translatable_part_text_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+   const char *text;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   eext_more_option_item_domain_translatable_part_text_set(item, "selector,main_text", "Korea", "elm.text test");
+   text = eext_more_option_item_part_text_get(item, "selector,main_text");
+   assert(text);
+
+   eext_more_option_item_domain_translatable_part_text_set(item, "selector,sub_text", "Korea", "elm.text.sub test");
+   text = eext_more_option_item_part_text_get(item, "selector,sub_text");
+   assert(text);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_domain_translatable_part_text_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   eext_more_option_item_domain_translatable_part_text_set(item, NULL, NULL, NULL);
+   eext_more_option_item_domain_translatable_part_text_set(NULL, NULL, NULL, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_part_content_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Evas_Object *img;
+   Evas_Object *ret_obj;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   img = elm_image_add(more_option);
+   eext_more_option_item_part_content_set(item, "item,icon", img);
+   ret_obj = eext_more_option_item_part_content_get(item, "item,icon");
+   assert_eq(ret_obj, img);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_part_content_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Evas_Object *img;
+   Evas_Object *contents;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   img = elm_image_add(more_option);
+   eext_more_option_item_part_content_set(item, NULL, img);
+   contents = eext_more_option_item_part_content_get(item, "item,icon");
+   assert_eq(contents, NULL);
+
+   eext_more_option_item_part_content_set(NULL, NULL, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_part_content_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Evas_Object *img;
+   Evas_Object *ret_obj;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   ret_obj = eext_more_option_item_part_content_get(item, "item,icon");
+   assert_eq(ret_obj, NULL);
+
+   img = elm_image_add(more_option);
+   eext_more_option_item_part_content_set(item, "item,icon", img);
+   ret_obj = eext_more_option_item_part_content_get(item, "item,icon");
+   assert_eq(ret_obj, img);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_item_part_content_get_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Evas_Object *img;
+   Evas_Object *ret_obj;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   img = elm_image_add(more_option);
+   eext_more_option_item_part_content_set(item, "item,icon", img);
+   ret_obj = eext_more_option_item_part_content_get(item, NULL);
+   assert_eq(ret_obj, NULL);
+
+   ret_obj = eext_more_option_item_part_content_get(NULL, NULL);
+   assert_eq(ret_obj, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_opened_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eina_Bool opened;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   eext_more_option_opened_set(more_option, EINA_TRUE);
+   opened = eext_more_option_opened_get(more_option);
+   assert(opened);
+
+   eext_more_option_opened_set(more_option, EINA_FALSE);
+   opened = eext_more_option_opened_get(more_option);
+   assert_eq(opened, EINA_FALSE);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_opened_set_n(void)
+{
+   Evas_Object *win;
+
+   win = _create_win("window");
+   assert(win);
+
+   eext_more_option_opened_set(NULL, EINA_TRUE);
+   eext_more_option_opened_set(win, EINA_TRUE);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_opened_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   Eina_Bool opened;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   opened = eext_more_option_opened_get(more_option);
+   assert_eq(opened, EINA_FALSE);
+
+   eext_more_option_opened_set(more_option, EINA_TRUE);
+   opened = eext_more_option_opened_get(more_option);
+   assert(opened);
+
+   eext_more_option_opened_set(more_option, EINA_FALSE);
+   opened = eext_more_option_opened_get(more_option);
+   assert_eq(opened, EINA_FALSE);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_opened_get_n(void)
+{
+   Evas_Object *win;
+   Eina_Bool opened;
+
+   win = _create_win("window");
+   assert(win);
+
+   opened = eext_more_option_opened_get(NULL);
+   assert_eq(opened, EINA_FALSE);
+
+   opened = eext_more_option_opened_get(win);
+   assert_eq(opened, EINA_FALSE);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_items_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *more_option;
+   const Eina_List *list;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   more_option = eext_more_option_add(win);
+   assert(more_option);
+
+   list = eext_more_option_items_get(more_option);
+   assert_eq(list, NULL);
+
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+   item = eext_more_option_item_append(more_option);
+   assert(item);
+
+   list = eext_more_option_items_get(more_option);
+   assert(list);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_more_option_items_get_n(void)
+{
+   Evas_Object *win;
+   const Eina_List *list;
+
+   win = _create_win("window");
+   assert(win);
+
+   list = eext_more_option_items_get(NULL);
+   assert_eq(list, NULL);
+   list = eext_more_option_items_get(win);
+   assert_eq(list, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_spinner_add_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *spinner;
+
+   win = _create_win("window");
+   assert(win);
+
+   spinner = eext_circle_object_spinner_add(win, NULL);
+   assert(spinner);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_spinner_add_n(void)
+{
+   Evas_Object *spinner;
+
+   spinner = eext_circle_object_spinner_add(NULL, NULL);
+   assert_eq(spinner, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_spinner_angle_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *spinner;
+
+   win = _create_win("window");
+   assert(win);
+
+   spinner = eext_circle_object_spinner_add(win, NULL);
+   assert(spinner);
+   eext_circle_object_spinner_angle_set(spinner, 5.0);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_circle_object_spinner_angle_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *spinner;
+   win = _create_win("window");
+   assert(win);
+
+   spinner = eext_circle_object_spinner_add(win, NULL);
+   assert(spinner);
+
+   eext_circle_object_spinner_angle_set(NULL, 5.0);
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_add_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_add_n(void)
+{
+   Evas_Object *rotary_selector;
+
+   rotary_selector = eext_rotary_selector_add(NULL);
+   assert_eq(rotary_selector, NULL);
+
+   return 0;
+}
+
+
+int utc_efl_ext_eext_rotary_selector_item_append_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_append_n(void)
+{
+   Evas_Object *win;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   item = eext_rotary_selector_item_append(NULL);
+   assert_eq(item, NULL);
+
+   item = eext_rotary_selector_item_append(win);
+   assert_eq(item, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_prepend_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_prepend(rotary_selector);
+   assert(item);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_prepend_n(void)
+{
+   Evas_Object *win;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   item = eext_rotary_selector_item_prepend(NULL);
+   assert_eq(item, NULL);
+
+   item = eext_rotary_selector_item_prepend(win);
+   assert_eq(item, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_insert_after_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   Eext_Object_Item *inserted_item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   inserted_item = eext_rotary_selector_item_insert_after(rotary_selector, item);
+   assert(inserted_item);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_insert_after_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   Eext_Object_Item *inserted_item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   inserted_item = eext_rotary_selector_item_insert_after(NULL, item);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_rotary_selector_item_insert_after(NULL, NULL);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_rotary_selector_item_insert_after(win, item);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_rotary_selector_item_insert_after(win, NULL);
+   assert_eq(inserted_item, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_insert_before_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   Eext_Object_Item *inserted_item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   inserted_item = eext_rotary_selector_item_insert_before(rotary_selector, item);
+   assert(inserted_item);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_insert_before_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   Eext_Object_Item *inserted_item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   inserted_item = eext_rotary_selector_item_insert_before(NULL, item);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_rotary_selector_item_insert_before(NULL, NULL);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_rotary_selector_item_insert_before(win, item);
+   assert_eq(inserted_item, NULL);
+
+   inserted_item = eext_rotary_selector_item_insert_before(win, NULL);
+   assert_eq(inserted_item, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_del_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   Eina_List *items;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_item_del(item);
+   items = eext_rotary_selector_items_get(rotary_selector);
+   assert_eq(items, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_del_n(void)
+{
+   eext_rotary_selector_item_del(NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_items_clear_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   eext_rotary_selector_items_clear(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_items_clear(rotary_selector);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_text_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   const char *text;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_item_part_text_set(item, "selector,main_text", "selector,main_text test");
+   text = eext_rotary_selector_item_part_text_get(item, "selector,main_text");
+   assert(!strcmp(text, "selector,main_text test"));
+
+   eext_rotary_selector_item_part_text_set(item, "selector,sub_text", "selector,sub_text test");
+   text = eext_rotary_selector_item_part_text_get(item, "selector,sub_text");
+   assert(!strcmp(text, "selector,sub_text test"));
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_text_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   const char *text;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_item_part_text_set(item, NULL, NULL);
+
+   text = eext_rotary_selector_item_part_text_get(item, "selector,main_text");
+   assert(!text || !strcmp(text, ""));
+
+   eext_rotary_selector_item_part_text_set(NULL, NULL, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_text_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   const char *text;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_item_part_text_set(item, "selector,main_text", "selector,main_text test");
+   text = eext_rotary_selector_item_part_text_get(item, "selector,main_text");
+   assert(!strcmp(text, "selector,main_text test"));
+
+   eext_rotary_selector_item_part_text_set(item, "selector,sub_text", "selector,sub_text test");
+   text = eext_rotary_selector_item_part_text_get(item, "selector,sub_text");
+   assert(!strcmp(text, "selector,sub_text test"));
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_text_get_n(void)
+{
+   const char *text;
+
+   text = eext_rotary_selector_item_part_text_get(NULL, NULL);
+   assert_eq(text, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_domain_translatable_part_text_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   const char *text;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_item_domain_translatable_part_text_set(item, "selector,main_text", "test", "selector,main_text test");
+   text = eext_rotary_selector_item_part_text_get(item, "selector,main_text");
+   assert(text);
+
+   eext_rotary_selector_item_domain_translatable_part_text_set(item, "selector,sub_text", "test", "selector,sub_text test");
+   text = eext_rotary_selector_item_part_text_get(item, "selector,sub_text");
+   assert(text);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_domain_translatable_part_text_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_item_domain_translatable_part_text_set(item, NULL, NULL, NULL);
+   eext_rotary_selector_item_domain_translatable_part_text_set(NULL, NULL, NULL, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_content_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Evas_Object *button;
+   Evas_Object *ret_obj;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   button = elm_button_add(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_item_part_content_set(item, "item,icon", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, button);
+   ret_obj = eext_rotary_selector_item_part_content_get(item, "item,icon", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL);
+   assert_eq(ret_obj, button);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_content_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Evas_Object *button;
+   Evas_Object *contents;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   button = elm_button_add(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_item_part_content_set(item, NULL, EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, button);
+   contents = eext_rotary_selector_item_part_content_get(item, "item,icon", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL);
+   assert_eq(contents, NULL);
+
+   eext_rotary_selector_item_part_content_set(NULL, NULL, EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_content_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Evas_Object *button;
+   Evas_Object *ret_obj;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   button = elm_button_add(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   ret_obj = eext_rotary_selector_item_part_content_get(item, "item,icon", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL);
+   assert_eq(ret_obj, NULL);
+
+   eext_rotary_selector_item_part_content_set(item, "item,icon", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, button);
+   ret_obj = eext_rotary_selector_item_part_content_get(item, "item,icon", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL);
+   assert_eq(ret_obj, button);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_content_get_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Evas_Object *button;
+   Evas_Object *ret_obj;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   button = elm_button_add(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_item_part_content_set(item, NULL, EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, button);
+   ret_obj = eext_rotary_selector_item_part_content_get(NULL, NULL, EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL);
+   assert_eq(ret_obj, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_part_content_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Evas_Object *button;
+   Evas_Object *ret_obj;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   button = elm_button_add(rotary_selector);
+
+   eext_rotary_selector_part_content_set(rotary_selector, "selector,bg_image", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, button);
+   ret_obj = eext_rotary_selector_part_content_get(rotary_selector, "selector,bg_image", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL);
+   assert_eq(ret_obj, button);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_part_content_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Evas_Object *button;
+   Evas_Object *contents;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   button = elm_button_add(rotary_selector);
+
+   eext_rotary_selector_part_content_set(rotary_selector, NULL, EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, button);
+   contents = eext_rotary_selector_part_content_get(rotary_selector, NULL, EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL);
+   assert_eq(contents, NULL);
+
+   eext_rotary_selector_part_content_set(NULL, NULL, EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_part_content_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Evas_Object *button;
+   Evas_Object *ret_obj;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   button = elm_button_add(rotary_selector);
+
+   eext_rotary_selector_part_content_set(rotary_selector, "selector,bg_image", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, button);
+   ret_obj = eext_rotary_selector_part_content_get(rotary_selector, "selector,bg_image", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL);
+   assert_eq(ret_obj, button);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_part_content_get_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Evas_Object *button;
+   Evas_Object *ret_obj;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   button = elm_button_add(rotary_selector);
+
+   eext_rotary_selector_part_content_set(rotary_selector, NULL, EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, button);
+   ret_obj = eext_rotary_selector_part_content_get(NULL, NULL, EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL);
+   assert_eq(ret_obj, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_color_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   int r, g, b, a;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+
+   eext_rotary_selector_item_part_color_set(item, "item,icon", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, 255, 255, 255, 255);
+   eext_rotary_selector_item_part_color_get(item, "item,icon", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, &r, &g, &b, &a);
+
+   assert_eq(r, 255);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_color_get_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_item_part_color_get(item, NULL, EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, NULL, NULL, NULL, NULL);
+   eext_rotary_selector_item_part_color_get(NULL, NULL, EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, NULL, NULL, NULL, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_color_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   int r, g, b, a;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+
+   eext_rotary_selector_item_part_color_set(item, "item,icon", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, 255, 255, 255, 255);
+   eext_rotary_selector_item_part_color_get(item, "item,icon", EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, &r, &g, &b, &a);
+
+   assert_eq(r, 255);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_item_part_color_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_item_part_color_set(item, NULL, EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, NULL, NULL, NULL, NULL);
+   eext_rotary_selector_item_part_color_set(NULL, NULL, EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL, NULL, NULL, NULL, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_part_color_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   int r, g, b, a;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   eext_rotary_selector_part_color_set(rotary_selector, "item,icon", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, 255, 255, 255, 255);
+   eext_rotary_selector_part_color_get(rotary_selector, "item,icon", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, &r, &g, &b, &a);
+
+   assert_eq(r, 255);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_part_color_get_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   eext_rotary_selector_part_color_get(rotary_selector, NULL, EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, NULL, NULL, NULL, NULL);
+   eext_rotary_selector_part_color_get(NULL, NULL, EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, NULL, NULL, NULL, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_part_color_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   int r, g, b, a;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   eext_rotary_selector_part_color_set(rotary_selector, "item,icon", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, 255, 255, 255, 255);
+   eext_rotary_selector_part_color_get(rotary_selector, "item,icon", EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, &r, &g, &b, &a);
+
+   assert_eq(r, 255);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_part_color_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   eext_rotary_selector_part_color_set(rotary_selector, NULL, EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, NULL, NULL, NULL, NULL);
+   eext_rotary_selector_part_color_set(NULL, NULL, EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL, NULL, NULL, NULL, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_selected_item_set_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   Eext_Object_Item *ret_item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_selected_item_set(rotary_selector, item);
+   ret_item = eext_rotary_selector_selected_item_get(rotary_selector);
+   assert_eq(item, ret_item);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_selected_item_set_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   eext_rotary_selector_selected_item_set(rotary_selector, NULL);
+   item = eext_rotary_selector_selected_item_get(rotary_selector);
+   assert_eq(item, NULL);
+   eext_rotary_selector_selected_item_set(NULL, NULL);
+
+   return 0;
+}
+
+
+int utc_efl_ext_eext_rotary_selector_selected_item_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   Eext_Object_Item *ret_item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   eext_rotary_selector_selected_item_set(rotary_selector, item);
+   ret_item = eext_rotary_selector_selected_item_get(rotary_selector);
+   assert_eq(item, ret_item);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_selected_item_get_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_selected_item_get(rotary_selector);
+   assert_eq(item, NULL);
+   item = eext_rotary_selector_selected_item_get(NULL);
+   assert_eq(item, NULL);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_items_get_p(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eext_Object_Item *item;
+   Eina_List *ret_item_list;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   item = eext_rotary_selector_item_append(rotary_selector);
+   assert(item);
+
+   ret_item_list = eext_rotary_selector_items_get(rotary_selector);
+   assert(ret_item_list);
+
+   return 0;
+}
+
+int utc_efl_ext_eext_rotary_selector_items_get_n(void)
+{
+   Evas_Object *win;
+   Evas_Object *rotary_selector;
+   Eina_List *ret_item_list;
+
+   win = _create_win("window");
+   assert(win);
+
+   rotary_selector = eext_rotary_selector_add(win);
+   assert(rotary_selector);
+
+   ret_item_list = eext_rotary_selector_items_get(NULL);
+   assert_eq(ret_item_list, NULL);
+
+   return 0;
+}
diff --git a/src/utc/efl-util/CMakeLists.txt b/src/utc/efl-util/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..46630fc
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "efl-util")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-ui-efl-util")
+SET(TC_SOURCES
+       utc-efl-util.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/efl-util/public.list b/src/utc/efl-util/public.list
new file mode 100755 (executable)
index 0000000..9a886ef
--- /dev/null
@@ -0,0 +1,5 @@
+efl_util_get_notification_window_level
+efl_util_set_notification_window_level
+efl_util_set_notification_window_level_error_cb
+efl_util_unset_notification_window_level_error_cb
+
diff --git a/src/utc/efl-util/tct-efl-util-core.c b/src/utc/efl-util/tct-efl-util-core.c
new file mode 100755 (executable)
index 0000000..a553012
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-efl-util-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/efl-util/tct-efl-util-core.h b/src/utc/efl-util/tct-efl-util-core.h
new file mode 100755 (executable)
index 0000000..b2c4d32
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_EFL_UTIL_CORE_H__
+#define __TCT_EFL_UTIL_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_efl_util_startup(void);
+extern void utc_efl_util_cleanup(void);
+
+extern int utc_efl_util_set_notification_window_level_n1(void);
+extern int utc_efl_util_set_notification_window_level_n2(void);
+extern int utc_efl_util_set_notification_window_level_n3(void);
+extern int utc_efl_util_get_notification_window_level_n1(void);
+extern int utc_efl_util_get_notification_window_level_n2(void);
+extern int utc_efl_util_set_notification_window_level_p1(void);
+extern int utc_efl_util_set_notification_window_level_p2(void);
+extern int utc_efl_util_get_notification_window_level_p1(void);
+extern int utc_efl_util_get_notification_window_level_p2(void);
+extern int utc_efl_util_set_notification_window_level_error_cb_p(void);
+extern int utc_efl_util_set_notification_window_level_error_cb_n(void);
+extern int utc_efl_util_unset_notification_window_level_error_cb_p(void);
+extern int utc_efl_util_unset_notification_window_level_error_cb_n(void);
+
+testcase tc_array[] = {
+    {"utc_efl_util_set_notification_window_level_n1", utc_efl_util_set_notification_window_level_n1, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_set_notification_window_level_n2", utc_efl_util_set_notification_window_level_n2, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_set_notification_window_level_n3", utc_efl_util_set_notification_window_level_n3, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_get_notification_window_level_n1", utc_efl_util_get_notification_window_level_n1, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_get_notification_window_level_n2", utc_efl_util_get_notification_window_level_n2, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_set_notification_window_level_p1", utc_efl_util_set_notification_window_level_p1, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_set_notification_window_level_p2", utc_efl_util_set_notification_window_level_p2, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_get_notification_window_level_p1", utc_efl_util_get_notification_window_level_p1, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_get_notification_window_level_p2", utc_efl_util_get_notification_window_level_p2, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_set_notification_window_level_error_cb_p", utc_efl_util_set_notification_window_level_error_cb_p, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_set_notification_window_level_error_cb_n", utc_efl_util_set_notification_window_level_error_cb_n, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_unset_notification_window_level_error_cb_p", utc_efl_util_unset_notification_window_level_error_cb_p, utc_efl_util_startup, utc_efl_util_cleanup},
+    {"utc_efl_util_unset_notification_window_level_error_cb_n", utc_efl_util_unset_notification_window_level_error_cb_n, utc_efl_util_startup, utc_efl_util_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_EFL_UTIL_CORE_H__
diff --git a/src/utc/efl-util/utc-efl-util.c b/src/utc/efl-util/utc-efl-util.c
new file mode 100755 (executable)
index 0000000..4f20213
--- /dev/null
@@ -0,0 +1,274 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <efl_util.h>
+#include <Elementary.h>
+#include <Ecore_X.h>
+
+void utc_efl_util_startup(void)
+{
+    elm_init(0, NULL);
+}
+
+void utc_efl_util_cleanup(void)
+{
+    elm_shutdown();
+}
+
+
+static void _win_del(void *data, Evas_Object *obj, void *event)
+{
+    elm_exit();
+}
+
+
+static Evas_Object* _create_normal_win(const char *name)
+{
+    Evas_Object *eo = NULL;
+
+    eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
+    if (eo)
+    {
+        elm_win_title_set(eo, name);
+        elm_win_borderless_set(eo, EINA_TRUE);
+        evas_object_smart_callback_add(eo, "delete,request",
+                _win_del, NULL);
+        elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_SHOW);
+    }
+
+    return eo;
+}
+
+
+static Evas_Object* _create_notification_win(const char *name)
+{
+    Evas_Object *eo;
+
+    eo = elm_win_add(NULL, name, ELM_WIN_NOTIFICATION);
+    if (eo)
+    {
+        elm_win_title_set(eo, name);
+        elm_win_borderless_set(eo, EINA_TRUE);
+        evas_object_smart_callback_add(eo, "delete,request",
+                _win_del, NULL);
+        elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_SHOW);
+    }
+
+    return eo;
+}
+
+int utc_efl_util_set_notification_window_level_n1(void)
+{
+    int ret = 0;
+
+    ret = efl_util_set_notification_window_level(NULL,  EFL_UTIL_NOTIFICATION_LEVEL_2);
+
+    assert_eq(ret, EFL_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_efl_util_set_notification_window_level_n2(void)
+{
+    Evas_Object *win = NULL;
+    int ret = 0;
+
+    win = _create_normal_win("Normal window");
+    assert(win);
+
+    ret = efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_2);
+    assert_eq(ret, EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE);
+
+    return 0;
+}
+
+int utc_efl_util_set_notification_window_level_n3(void)
+{
+    Evas_Object *win = NULL;
+    int ret = 0;
+
+    win = _create_notification_win("Notification Type Window");
+    assert(win);
+
+    ret = efl_util_set_notification_window_level(win, 100);
+    assert_eq(ret, EFL_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_efl_util_get_notification_window_level_n1(void)
+{
+    int ret = 0;
+    efl_util_notification_level_e level = 0;
+
+    ret = efl_util_get_notification_window_level(NULL, &level);
+    assert_eq(ret, EFL_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_efl_util_get_notification_window_level_n2(void)
+{
+    Evas_Object *win = NULL;
+    int ret = 0;
+    efl_util_notification_level_e level = 0;
+
+    win = _create_normal_win("Normal Type Window");
+    assert(win);
+
+    ret = efl_util_get_notification_window_level(win, &level);
+    assert_eq(ret, EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE);
+
+    return 0;
+}
+
+int utc_efl_util_set_notification_window_level_p1(void)
+{
+    Evas_Object *win = NULL;
+    int ret = -1;
+
+    win = _create_notification_win("Notification Type Window");
+    assert(win);
+
+    ret = efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_1);
+    assert_eq(ret, EFL_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_efl_util_set_notification_window_level_p2(void)
+{
+    Evas_Object *win = NULL;
+    int ret = -1;
+
+    win = _create_notification_win("Notification Type Window");
+    assert(win);
+
+    ret = efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_1);
+    assert_eq(ret, EFL_UTIL_ERROR_NONE);
+    ret = efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_2);
+    assert_eq(ret, EFL_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_efl_util_get_notification_window_level_p1(void)
+{
+    Evas_Object *win = NULL;
+    int ret = -1;
+    efl_util_notification_level_e level = -1;
+
+    win = _create_notification_win("Notification Type Window");
+    assert(win);
+
+    efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_1);
+    ret = efl_util_get_notification_window_level(win, &level);
+
+    assert_eq(ret, EFL_UTIL_ERROR_NONE);
+    assert_eq(level, EFL_UTIL_NOTIFICATION_LEVEL_1);
+
+    return 0;
+}
+
+int utc_efl_util_get_notification_window_level_p2(void)
+{
+    Evas_Object *win = NULL;
+    int ret = -1;
+    efl_util_notification_level_e level = -1;
+
+    win = _create_notification_win("Notification Type Window");
+    assert(win);
+
+    efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_1);
+    ret = efl_util_get_notification_window_level(win, &level);
+    assert_eq(ret, EFL_UTIL_ERROR_NONE);
+    assert_eq(level, EFL_UTIL_NOTIFICATION_LEVEL_1);
+    efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_2);
+    ret = efl_util_get_notification_window_level(win, &level);
+    assert_eq(ret, EFL_UTIL_ERROR_NONE);
+    assert_eq(level, EFL_UTIL_NOTIFICATION_LEVEL_2);
+
+    return 0;
+}
+
+void _window_level_error_cb(Evas_Object *window, int error_code, void *user_data)
+{
+    return 0;
+}
+
+//efl_util_set_notification_window_level_error_cb
+int utc_efl_util_set_notification_window_level_error_cb_p(void)
+{
+    Evas_Object *win = NULL;
+    int ret = -1;
+    efl_util_notification_level_e level = -1;
+
+    win = _create_notification_win("Notification Type Window");
+    assert(win);
+
+    ret = efl_util_set_notification_window_level_error_cb(win, _window_level_error_cb, NULL);
+    assert_eq(ret, EFL_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_efl_util_set_notification_window_level_error_cb_n(void)
+{
+    Evas_Object *win = NULL;
+    int ret = -1;
+    efl_util_notification_level_e level = -1;
+
+    ret = efl_util_set_notification_window_level_error_cb(win, _window_level_error_cb, NULL);
+    assert_eq(ret, EFL_UTIL_ERROR_INVALID_PARAMETER);
+
+
+    return 0;
+}
+
+int utc_efl_util_unset_notification_window_level_error_cb_p(void)
+{
+    Evas_Object *win = NULL;
+    int ret = -1;
+    efl_util_notification_level_e level = -1;
+
+    win = _create_notification_win("Notification Type Window");
+    assert(win);
+
+    efl_util_set_notification_window_level_error_cb(win, _window_level_error_cb, NULL);
+    
+    ret = efl_util_unset_notification_window_level_error_cb (win);
+    assert_eq(ret, EFL_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_efl_util_unset_notification_window_level_error_cb_n(void)
+{
+    Evas_Object *win = NULL;
+    int ret = -1;
+    efl_util_notification_level_e level = -1;
+
+
+    ret = efl_util_unset_notification_window_level_error_cb(win);
+    assert_eq(ret, EFL_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+
+
diff --git a/src/utc/image-util/CMakeLists.txt b/src/utc/image-util/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..cbcbd4d
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "image-util")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-media-image-util")
+SET(TC_SOURCES
+       utc-image-util-jpeg.c
+       utc-media-image-util-basic.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       storage
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/image-util/public.list b/src/utc/image-util/public.list
new file mode 100755 (executable)
index 0000000..581ca46
--- /dev/null
@@ -0,0 +1,19 @@
+image_util_calculate_buffer_size
+image_util_decode_jpeg
+image_util_decode_jpeg_from_memory
+image_util_encode_jpeg
+image_util_encode_jpeg_to_memory
+image_util_foreach_supported_jpeg_colorspace
+image_util_transform_create
+image_util_transform_set_hardware_acceleration
+image_util_transform_set_colorspace
+image_util_transform_set_resolution
+image_util_transform_set_rotation
+image_util_transform_set_crop_area
+image_util_transform_get_colorspace
+image_util_transform_get_resolution
+image_util_transform_get_rotation
+image_util_transform_get_crop_area
+image_util_transform_run
+image_util_transform_destroy
+
diff --git a/src/utc/image-util/res/sample.jpg b/src/utc/image-util/res/sample.jpg
new file mode 100755 (executable)
index 0000000..c090428
Binary files /dev/null and b/src/utc/image-util/res/sample.jpg differ
diff --git a/src/utc/image-util/tct-image-util-core.c b/src/utc/image-util/tct-image-util-core.c
new file mode 100755 (executable)
index 0000000..820e8e9
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-image-util-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/image-util/tct-image-util-core.h b/src/utc/image-util/tct-image-util-core.h
new file mode 100755 (executable)
index 0000000..8bfc297
--- /dev/null
@@ -0,0 +1,145 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_IMAGE_UTIL_CORE_H__
+#define __TCT_IMAGE_UTIL_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_image_util_jpeg_startup(void);
+extern void utc_image_util_jpeg_cleanup(void);
+extern void utc_media_image_util_basic_startup(void);
+extern void utc_media_image_util_basic_cleanup(void);
+
+extern int utc_image_util_decode_jpeg_n_1(void);
+extern int utc_image_util_decode_jpeg_n_2(void);
+extern int utc_image_util_decode_jpeg_n_3(void);
+extern int utc_image_util_decode_jpeg_n_4(void);
+extern int utc_image_util_decode_jpeg_n_5(void);
+extern int utc_image_util_decode_jpeg_p(void);
+extern int utc_image_util_decode_jpeg_from_memory_n_1(void);
+extern int utc_image_util_decode_jpeg_from_memory_n_2(void);
+extern int utc_image_util_decode_jpeg_from_memory_n_3(void);
+extern int utc_image_util_decode_jpeg_from_memory_n_4(void);
+extern int utc_image_util_decode_jpeg_from_memory_p(void);
+extern int utc_image_util_encode_jpeg_n_1(void);
+extern int utc_image_util_encode_jpeg_n_2(void);
+extern int utc_image_util_encode_jpeg_n_3(void);
+extern int utc_image_util_encode_jpeg_n_4(void);
+extern int utc_image_util_encode_jpeg_n_5(void);
+extern int utc_image_util_encode_jpeg_p(void);
+extern int utc_image_util_encode_jpeg_to_memory_n_1(void);
+extern int utc_image_util_encode_jpeg_to_memory_n_2(void);
+extern int utc_image_util_encode_jpeg_to_memory_n_3(void);
+extern int utc_image_util_encode_jpeg_to_memory_n_4(void);
+extern int utc_image_util_encode_jpeg_to_memory_p(void);
+extern int utc_image_util_foreach_supported_jpeg_colorspace_p(void);
+extern int utc_image_util_foreach_supported_jpeg_colorspace_n(void);
+extern int utc_image_util_supported_jpeg_colorspace_p1(void);
+extern int utc_image_util_supported_jpeg_colorspace_p2(void);
+extern int utc_image_util_supported_jpeg_colorspace_n(void);
+extern int utc_image_util_calculate_buffer_size_p1(void);
+extern int utc_image_util_calculate_buffer_size_p2(void);
+extern int utc_image_util_calculate_buffer_size_p3(void);
+extern int utc_image_util_calculate_buffer_size_n1(void);
+extern int utc_image_util_calculate_buffer_size_n2(void);
+extern int utc_image_util_calculate_buffer_size_n3(void);
+extern int utc_image_util_transform_create_n(void);
+extern int utc_image_util_transform_create_p(void);
+extern int utc_image_util_transform_set_hardware_acceleration_n(void);
+extern int utc_image_util_transform_set_hardware_acceleration_p(void);
+extern int utc_image_util_transform_set_colorspace_n(void);
+extern int utc_image_util_transform_set_colorspace_p(void);
+extern int utc_image_util_transform_get_colorspace_n(void);
+extern int utc_image_util_transform_get_colorspace_p(void);
+extern int utc_image_util_transform_set_resolution_n(void);
+extern int utc_image_util_transform_set_resolution_p(void);
+extern int utc_image_util_transform_get_resolution_n(void);
+extern int utc_image_util_transform_get_resolution_p(void);
+extern int utc_image_util_transform_set_rotation_n(void);
+extern int utc_image_util_transform_set_rotation_p(void);
+extern int utc_image_util_transform_get_rotation_n(void);
+extern int utc_image_util_transform_get_rotation_p(void);
+extern int utc_image_util_transform_run_n(void);
+extern int utc_image_util_transform_run_p(void);
+extern int utc_image_util_transform_set_crop_area_n(void);
+extern int utc_image_util_transform_set_crop_area_p(void);
+extern int utc_image_util_transform_get_crop_area_n(void);
+extern int utc_image_util_transform_get_crop_area_p(void);
+extern int utc_image_util_transform_destory_n(void);
+extern int utc_image_util_transform_destory_p(void);
+
+testcase tc_array[] = {
+    {"utc_image_util_decode_jpeg_n_1", utc_image_util_decode_jpeg_n_1, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_decode_jpeg_n_2", utc_image_util_decode_jpeg_n_2, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_decode_jpeg_n_3", utc_image_util_decode_jpeg_n_3, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_decode_jpeg_n_4", utc_image_util_decode_jpeg_n_4, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_decode_jpeg_n_5", utc_image_util_decode_jpeg_n_5, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_decode_jpeg_p", utc_image_util_decode_jpeg_p, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_decode_jpeg_from_memory_n_1", utc_image_util_decode_jpeg_from_memory_n_1, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_decode_jpeg_from_memory_n_2", utc_image_util_decode_jpeg_from_memory_n_2, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_decode_jpeg_from_memory_n_3", utc_image_util_decode_jpeg_from_memory_n_3, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_decode_jpeg_from_memory_n_4", utc_image_util_decode_jpeg_from_memory_n_4, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_decode_jpeg_from_memory_p", utc_image_util_decode_jpeg_from_memory_p, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_encode_jpeg_n_1", utc_image_util_encode_jpeg_n_1, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_encode_jpeg_n_2", utc_image_util_encode_jpeg_n_2, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_encode_jpeg_n_3", utc_image_util_encode_jpeg_n_3, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_encode_jpeg_n_4", utc_image_util_encode_jpeg_n_4, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_encode_jpeg_n_5", utc_image_util_encode_jpeg_n_5, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_encode_jpeg_p", utc_image_util_encode_jpeg_p, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_encode_jpeg_to_memory_n_1", utc_image_util_encode_jpeg_to_memory_n_1, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_encode_jpeg_to_memory_n_2", utc_image_util_encode_jpeg_to_memory_n_2, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_encode_jpeg_to_memory_n_3", utc_image_util_encode_jpeg_to_memory_n_3, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_encode_jpeg_to_memory_n_4", utc_image_util_encode_jpeg_to_memory_n_4, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_encode_jpeg_to_memory_p", utc_image_util_encode_jpeg_to_memory_p, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_foreach_supported_jpeg_colorspace_p", utc_image_util_foreach_supported_jpeg_colorspace_p, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_foreach_supported_jpeg_colorspace_n", utc_image_util_foreach_supported_jpeg_colorspace_n, utc_image_util_jpeg_startup, utc_image_util_jpeg_cleanup},
+    {"utc_image_util_supported_jpeg_colorspace_p1", utc_image_util_supported_jpeg_colorspace_p1, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_supported_jpeg_colorspace_p2", utc_image_util_supported_jpeg_colorspace_p2, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_supported_jpeg_colorspace_n", utc_image_util_supported_jpeg_colorspace_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_calculate_buffer_size_p1", utc_image_util_calculate_buffer_size_p1, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_calculate_buffer_size_p2", utc_image_util_calculate_buffer_size_p2, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_calculate_buffer_size_p3", utc_image_util_calculate_buffer_size_p3, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_calculate_buffer_size_n1", utc_image_util_calculate_buffer_size_n1, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_calculate_buffer_size_n2", utc_image_util_calculate_buffer_size_n2, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_calculate_buffer_size_n3", utc_image_util_calculate_buffer_size_n3, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_create_n", utc_image_util_transform_create_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_create_p", utc_image_util_transform_create_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_set_hardware_acceleration_n", utc_image_util_transform_set_hardware_acceleration_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_set_hardware_acceleration_p", utc_image_util_transform_set_hardware_acceleration_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_set_colorspace_n", utc_image_util_transform_set_colorspace_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_set_colorspace_p", utc_image_util_transform_set_colorspace_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_get_colorspace_n", utc_image_util_transform_get_colorspace_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_get_colorspace_p", utc_image_util_transform_get_colorspace_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_set_resolution_n", utc_image_util_transform_set_resolution_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_set_resolution_p", utc_image_util_transform_set_resolution_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_get_resolution_n", utc_image_util_transform_get_resolution_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_get_resolution_p", utc_image_util_transform_get_resolution_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_set_rotation_n", utc_image_util_transform_set_rotation_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_set_rotation_p", utc_image_util_transform_set_rotation_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_get_rotation_n", utc_image_util_transform_get_rotation_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_get_rotation_p", utc_image_util_transform_get_rotation_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_run_n", utc_image_util_transform_run_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_run_p", utc_image_util_transform_run_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_set_crop_area_n", utc_image_util_transform_set_crop_area_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_set_crop_area_p", utc_image_util_transform_set_crop_area_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_get_crop_area_n", utc_image_util_transform_get_crop_area_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_get_crop_area_p", utc_image_util_transform_get_crop_area_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_destory_n", utc_image_util_transform_destory_n, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {"utc_image_util_transform_destory_p", utc_image_util_transform_destory_p, utc_media_image_util_basic_startup, utc_media_image_util_basic_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_IMAGE_UTIL_CORE_H__
diff --git a/src/utc/image-util/utc-image-util-jpeg.c b/src/utc/image-util/utc-image-util-jpeg.c
new file mode 100755 (executable)
index 0000000..401097e
--- /dev/null
@@ -0,0 +1,482 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <stdio.h>
+#include <image_util.h>
+#include <storage.h>
+
+#define WRONG_PATH ""
+
+static image_util_colorspace_e SUPPORTED_COLORSPACE;
+static image_util_colorspace_e NOT_SUPPORTED_COLORSPACE;
+static image_util_colorspace_e FIRST_COLORSPACE;
+static image_util_colorspace_e LAST_COLORSPACE;
+static bool _is_broken = false;
+static char* img_file1 = "sample.jpg";
+static char* img_file2 = "test_output.jpg";
+static char* img_path1 = NULL;
+static char* img_path2 = NULL;
+
+
+static struct{
+    unsigned char *buffer;
+    unsigned int size;
+    int w;
+    int h;
+}raw_image = {NULL, 0, 0, 0};
+
+static struct{
+    unsigned char *buffer;
+    unsigned int size;
+}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);
+        sprintf(img_path1, "%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);
+        sprintf(img_path2, "%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)
+{
+    int ret = image_util_decode_jpeg(img_path1, colorspace, &raw_image.buffer,
+            &raw_image.w, &raw_image.h, &raw_image.size);
+    if(IMAGE_UTIL_ERROR_NONE == ret){
+        *(int*)user_data = colorspace;
+        return false;
+    }
+    return true;
+}
+
+void utc_image_util_jpeg_startup(void)
+{
+    int ret = IMAGE_UTIL_ERROR_NONE;
+
+       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       }
+
+    ret = image_util_foreach_supported_jpeg_colorspace(
+        find_first_supported_colorspace_cb , (void*)(&SUPPORTED_COLORSPACE) );
+    if (IMAGE_UTIL_ERROR_NONE != ret) {
+        _is_broken = true;
+        return;
+    }
+
+    FIRST_COLORSPACE = IMAGE_UTIL_COLORSPACE_YV12;
+    LAST_COLORSPACE = IMAGE_UTIL_COLORSPACE_NV61;
+    NOT_SUPPORTED_COLORSPACE = IMAGE_UTIL_COLORSPACE_UYVY;
+    // prepare buffers for raw and jpeg images
+    ret = image_util_decode_jpeg(img_path1, SUPPORTED_COLORSPACE, &raw_image.buffer,
+        &raw_image.w, &raw_image.h, &raw_image.size);
+    if (IMAGE_UTIL_ERROR_NONE != ret) {
+        _is_broken = true;
+        return;
+    }
+
+    ret = image_util_encode_jpeg_to_memory(raw_image.buffer, raw_image.w , raw_image.h,
+        SUPPORTED_COLORSPACE, 100, &jpeg_image.buffer, &jpeg_image.size);
+    if (IMAGE_UTIL_ERROR_NONE != ret) {
+        _is_broken = true;
+        return;
+    }
+}
+
+void utc_image_util_jpeg_cleanup(void)
+{
+    /* end of TC */
+    if(raw_image.buffer){
+        free(raw_image.buffer);
+        raw_image.buffer = NULL;
+    }
+    if(jpeg_image.buffer){
+        free(jpeg_image.buffer);
+        jpeg_image.buffer = NULL;
+    }
+       if(img_path1) free(img_path1);
+       if(img_path2) free(img_path2);
+}
+
+int utc_image_util_decode_jpeg_n_1(void)
+{
+    int r;
+    int w, h;
+    unsigned int size = 0;
+
+    r = image_util_decode_jpeg(NULL, SUPPORTED_COLORSPACE, NULL, &w, &h, &size);
+    assert_eq(r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_decode_jpeg_n_2(void)
+{
+    int r;
+    int w, h;
+    unsigned int size = 0;
+    unsigned char *buffer = NULL;
+
+    r = image_util_decode_jpeg(img_path1, LAST_COLORSPACE + 1, &buffer, &w, &h, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq(r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_decode_jpeg_n_3(void)
+{
+    int r;
+    int w, h;
+    unsigned int size = 0;
+    unsigned char *buffer = NULL;
+
+    r = image_util_decode_jpeg(img_path1, FIRST_COLORSPACE - 1, &buffer, &w, &h, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq(r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_decode_jpeg_n_4(void)
+{
+    int r;
+    int w, h;
+    unsigned int size = 0;
+    unsigned char *buffer = NULL;
+
+    r = image_util_decode_jpeg(img_path1, NOT_SUPPORTED_COLORSPACE, &buffer, &w, &h, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq (r, IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT);
+
+    return 0;
+}
+
+int utc_image_util_decode_jpeg_n_5(void)
+{
+    int r;
+    int w, h;
+    unsigned int size = 0;
+    unsigned char *buffer = NULL;
+
+    r = image_util_decode_jpeg(WRONG_PATH, SUPPORTED_COLORSPACE, &buffer, &w, &h, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq(r, IMAGE_UTIL_ERROR_NO_SUCH_FILE);
+
+    return 0;
+}
+
+int utc_image_util_decode_jpeg_p(void)
+{
+    assert(!_is_broken);
+    int r;
+    unsigned char *buffer = NULL;
+    int w, h;
+    unsigned int size = 0;
+
+    r = image_util_decode_jpeg(img_path1, SUPPORTED_COLORSPACE, &buffer, &w, &h, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq(r, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_decode_jpeg_from_memory_n_1(void)
+{
+    int r;
+    int w, h;
+    unsigned int size = 0;
+
+    r = image_util_decode_jpeg_from_memory(NULL, jpeg_image.size, SUPPORTED_COLORSPACE, NULL, &w, &h, &size);
+    assert_eq (r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_decode_jpeg_from_memory_n_2(void)
+{
+    int r;
+    unsigned char *buffer = NULL;
+    int w, h;
+    unsigned int size = 0;
+
+    r = image_util_decode_jpeg_from_memory(jpeg_image.buffer, jpeg_image.size, FIRST_COLORSPACE -1, &buffer, &w, &h, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq (r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_decode_jpeg_from_memory_n_3(void)
+{
+    int r;
+    unsigned char *buffer = NULL;
+    int w, h;
+    unsigned int size = 0;
+
+    r = image_util_decode_jpeg_from_memory(jpeg_image.buffer, jpeg_image.size, LAST_COLORSPACE + 1, &buffer, &w, &h, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq (r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_decode_jpeg_from_memory_n_4(void)
+{
+    int r;
+    unsigned char *buffer = NULL;
+    int w, h;
+    unsigned int size = 0;
+
+    r = image_util_decode_jpeg_from_memory(jpeg_image.buffer, jpeg_image.size, NOT_SUPPORTED_COLORSPACE, &buffer, &w, &h, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq (r, IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT);
+
+    return 0;
+}
+
+int utc_image_util_decode_jpeg_from_memory_p(void)
+{
+    assert(!_is_broken);
+    int r;
+    unsigned char *buffer = NULL;
+    int w, h;
+    unsigned int size = 0;
+
+    r = image_util_decode_jpeg_from_memory(jpeg_image.buffer, jpeg_image.size, SUPPORTED_COLORSPACE, &buffer, &w, &h, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq (r, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_encode_jpeg_n_1(void)
+{
+    int r;
+
+    r = image_util_encode_jpeg(NULL, raw_image.w , raw_image.h , SUPPORTED_COLORSPACE, 100, NULL);
+    assert_eq (r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_encode_jpeg_n_2(void)
+{
+    int r;
+
+    r = image_util_encode_jpeg(raw_image.buffer, raw_image.w , raw_image.h , LAST_COLORSPACE + 1, 100, img_path2);
+    assert_eq (r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_encode_jpeg_n_3(void)
+{
+    int r;
+
+    r = image_util_encode_jpeg(raw_image.buffer, raw_image.w , raw_image.h , FIRST_COLORSPACE -1, 100, img_path2);
+    assert_eq (r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_encode_jpeg_n_4(void)
+{
+    int r;
+
+    r = image_util_encode_jpeg(raw_image.buffer, raw_image.w , raw_image.h , NOT_SUPPORTED_COLORSPACE, 100, img_path2);
+    assert_eq (r, IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT);
+
+    return 0;
+}
+
+int utc_image_util_encode_jpeg_n_5(void)
+{
+    int r;
+
+    r = image_util_encode_jpeg(raw_image.buffer, raw_image.w , raw_image.h , SUPPORTED_COLORSPACE, 100, WRONG_PATH);
+    assert_eq (r, IMAGE_UTIL_ERROR_NO_SUCH_FILE);
+
+    return 0;
+}
+
+int utc_image_util_encode_jpeg_p(void)
+{
+    assert(!_is_broken);
+    int r;
+
+    r = image_util_encode_jpeg(raw_image.buffer, raw_image.w , raw_image.h , SUPPORTED_COLORSPACE, 100, img_path2);
+    assert_eq (r, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_encode_jpeg_to_memory_n_1(void)
+{
+    int r;
+    unsigned int size = 0;
+
+    r = image_util_encode_jpeg_to_memory(NULL, 5 , 5 , SUPPORTED_COLORSPACE, 100, NULL, &size);
+    assert_eq (r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_encode_jpeg_to_memory_n_2(void)
+{
+    int r;
+    unsigned char *buffer = NULL;
+    unsigned int size = 0;
+
+    r = image_util_encode_jpeg_to_memory(raw_image.buffer, raw_image.w , raw_image.h , FIRST_COLORSPACE - 1, 100, &buffer, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq (r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_encode_jpeg_to_memory_n_3(void)
+{
+    int r;
+    unsigned char *buffer = NULL;
+    unsigned int size = 0;
+
+    r = image_util_encode_jpeg_to_memory(raw_image.buffer, raw_image.w , raw_image.h , LAST_COLORSPACE + 1, 100, &buffer, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq (r, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_encode_jpeg_to_memory_n_4(void)
+{
+    int r;
+    unsigned char *buffer = NULL;
+    unsigned int size = 0;
+
+    r = image_util_encode_jpeg_to_memory(raw_image.buffer, raw_image.w , raw_image.h , NOT_SUPPORTED_COLORSPACE, 100, &buffer, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq (r, IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT);
+
+    return 0;
+}
+
+int utc_image_util_encode_jpeg_to_memory_p(void)
+{
+    assert(!_is_broken);
+    int r;
+    unsigned char *buffer = NULL;
+    unsigned int size = 0;
+
+    r = image_util_encode_jpeg_to_memory(raw_image.buffer, raw_image.w , raw_image.h , SUPPORTED_COLORSPACE, 100, &buffer, &size);
+
+    if(buffer){
+        free(buffer);
+        buffer = NULL;
+    }
+
+    assert_eq (r, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+static bool _image_util_supported_jpeg_colorspace_cb(image_util_colorspace_e colorspace, void *user_data)
+{
+    return false;
+}
+
+int utc_image_util_foreach_supported_jpeg_colorspace_p(void)
+{
+    int ret = image_util_foreach_supported_jpeg_colorspace(_image_util_supported_jpeg_colorspace_cb, NULL);
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+    return 0;
+}
+
+int utc_image_util_foreach_supported_jpeg_colorspace_n(void)
+{
+    int ret = image_util_foreach_supported_jpeg_colorspace(NULL, NULL);
+    assert_eq(ret, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+    return 0;
+}
diff --git a/src/utc/image-util/utc-media-image-util-basic.c b/src/utc/image-util/utc-media-image-util-basic.c
new file mode 100755 (executable)
index 0000000..ec4e9d9
--- /dev/null
@@ -0,0 +1,470 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <stdio.h>
+#include <image_util.h>
+#include <storage.h>
+
+
+#define LAST_COLORSPACE IMAGE_UTIL_COLORSPACE_BGRX8888
+
+static transformation_h image_h = NULL;
+static media_format_h fmt;
+static media_packet_h src;
+static char* img_file1 = "sample.jpg";
+static char* img_path1 = 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);
+        sprintf(img_path1, "%s/res/%s", path, img_file1);
+        return false;
+    }
+    return true;
+}
+
+void utc_media_image_util_basic_startup(void)
+{
+       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       }
+}
+
+void utc_media_image_util_basic_cleanup(void)
+{
+       if(img_path1) free(img_path1);
+}
+
+
+
+static bool utc_transform_completed_cb(media_packet_h *packet, int error, void *user_param)
+{
+       if(error == IMAGE_UTIL_ERROR_NONE) {
+               return true;
+       } else {
+               return false;
+       }
+}
+
+static bool jpeg_colorspace_cb( image_util_colorspace_e colorspace, void * user_data)
+{
+    return true;
+}
+
+static bool jpeg_colorspace_quit_cb(image_util_colorspace_e colorspace, void * user_data)
+{
+    int last = *((int*)user_data);
+    return (int)colorspace == last  ?  false : true;
+}
+
+static bool jpeg_colorspace_size_cb(image_util_colorspace_e colorspace, void * user_data)
+{
+    bool *result = (bool*)user_data;
+
+    const int W = 480, H = 320; // these values are taken from test file - sample.jpg
+    int width = 0, height = 0;
+    unsigned int size_decode = 0;
+    unsigned int size_calc = 0;
+    unsigned char *img_buf = NULL;
+
+    // avoiding unsupported colorspaces
+    if(image_util_decode_jpeg(img_path1, colorspace, &img_buf, &width, &height, &size_decode) == IMAGE_UTIL_ERROR_NONE){
+        image_util_calculate_buffer_size(width, height, colorspace, &size_calc);
+        if(img_buf){
+            free(img_buf);
+            img_buf = NULL;
+        }
+
+        *result = (size_decode == size_calc);
+        // if false then callbacks stop
+        return *result;
+    }
+    //continue for not supported colospaces
+    return true;
+}
+
+int utc_image_util_supported_jpeg_colorspace_p1(void)
+{
+    int err = image_util_foreach_supported_jpeg_colorspace(jpeg_colorspace_cb , (void*)NULL);
+    assert_eq(err, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_supported_jpeg_colorspace_p2(void)
+{
+    int err;
+
+    // parameter i decides when loop of callbacks should break
+    int i;
+    for(i = 0; i < LAST_COLORSPACE; ++i)
+    {
+        err = image_util_foreach_supported_jpeg_colorspace(jpeg_colorspace_quit_cb , (void*)(&i));
+        assert_eq(err, IMAGE_UTIL_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_image_util_supported_jpeg_colorspace_n(void)
+{
+    int pointer = 0;
+    int ret = image_util_foreach_supported_jpeg_colorspace(NULL, (void*)(&pointer));
+    assert_eq(ret, IMAGE_UTIL_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_image_util_calculate_buffer_size_p1(void)
+{
+    int width = 100, height = 20;
+    unsigned int size = 0;
+
+    int err = image_util_calculate_buffer_size(width, height, IMAGE_UTIL_COLORSPACE_RGB888, &size);
+    assert_eq(err, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_calculate_buffer_size_p2(void)
+{
+    const int W = 480, H = 320; // these values are taken from original file sample.jpg
+    int width = 0, height = 0;
+    unsigned int size_decode = 0;
+    unsigned int size_calc = 0;
+    unsigned char * img_buf = 0;
+    const image_util_colorspace_e colorspace = IMAGE_UTIL_COLORSPACE_RGB888;
+
+    // load jpeg sample file
+    image_util_decode_jpeg(img_path1, colorspace, &img_buf, &width, &height, &size_decode);
+    // prepare buffers
+    image_util_calculate_buffer_size(width, height, colorspace, &size_calc);
+
+    if(img_buf){
+        free(img_buf);
+        img_buf = NULL;
+    }
+
+    assert_eq((int)size_calc, size_decode);
+
+    return 0;
+}
+
+int utc_image_util_calculate_buffer_size_p3(void)
+{
+    bool result = true;
+    int ret = image_util_foreach_supported_jpeg_colorspace(jpeg_colorspace_size_cb, &result);
+
+    // result is taken from inside the colorspace callbacks loop,
+    // there is compared buffor size
+    // result takes true or false
+    assert_eq (ret, IMAGE_UTIL_ERROR_NONE);
+    assert_eq (result, true);
+
+    return 0;
+}
+
+int utc_image_util_calculate_buffer_size_n1(void)
+{
+    int width = 100, height = 20;
+    unsigned int size = 0;
+    const int colorspace = IMAGE_UTIL_COLORSPACE_NV61 + 1; // after last one
+
+    int err = image_util_calculate_buffer_size(width, height, colorspace, &size);
+    assert_neq(err, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_calculate_buffer_size_n2(void)
+{
+    int width = -100, height = 20; // wrong parameter
+    unsigned int size = 0;
+    const int colorspace = IMAGE_UTIL_COLORSPACE_BGRX8888;
+
+    int err = image_util_calculate_buffer_size(width, height, colorspace, &size);
+    assert_neq(err, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_calculate_buffer_size_n3(void)
+{
+    int width = 0, height = 0; // wrong parameter
+    unsigned int size = 0;
+    const int colorspace = IMAGE_UTIL_COLORSPACE_BGRX8888;
+
+    int err = image_util_calculate_buffer_size(width, height, colorspace, &size);
+    assert_neq(err, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_create_n(void)
+{
+    int ret = image_util_transform_create(NULL);
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_create_p(void)
+{
+    int ret = image_util_transform_create(&image_h);
+
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_set_hardware_acceleration_n(void)
+{
+    int ret = image_util_transform_set_hardware_acceleration(NULL, false);
+
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_set_hardware_acceleration_p(void)
+{
+    int ret = image_util_transform_create(&image_h);
+    ret = image_util_transform_set_hardware_acceleration(image_h, false);
+
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_set_colorspace_n(void)
+{
+     int ret = image_util_transform_set_colorspace(NULL, MEDIA_FORMAT_RGB888);
+
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_set_colorspace_p(void)
+{
+    int ret = image_util_transform_create(&image_h);
+    ret = image_util_transform_set_colorspace(image_h, MEDIA_FORMAT_I420);
+
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_get_colorspace_n(void)
+{
+     int ret = image_util_transform_get_colorspace(image_h, NULL);
+
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_get_colorspace_p(void)
+{
+    image_util_colorspace_e colorspace;
+    int ret = image_util_transform_create(&image_h);
+    ret = image_util_transform_get_colorspace(image_h, &colorspace);
+
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_set_resolution_n(void)
+{
+     int ret = image_util_transform_set_resolution(NULL, 320, 240);
+
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_set_resolution_p(void)
+{
+    int ret = image_util_transform_create(&image_h);
+    ret = image_util_transform_set_resolution(image_h, 320, 240);
+
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_get_resolution_n(void)
+{
+    int ret = image_util_transform_get_resolution(image_h, NULL, NULL);
+
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_get_resolution_p(void)
+{
+     unsigned int width = 0;
+     unsigned int height = 0;
+     int ret = image_util_transform_create(&image_h);
+     ret = image_util_transform_get_resolution(image_h, &width, &height);
+
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_set_rotation_n(void)
+{
+     int ret = image_util_transform_set_rotation(NULL, IMAGE_UTIL_ROTATION_NONE);
+
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_util_transform_set_rotation_p(void)
+{
+    int ret = image_util_transform_create(&image_h);
+    ret = image_util_transform_set_rotation(image_h, IMAGE_UTIL_ROTATION_NONE);
+
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_get_rotation_n(void)
+{
+    int ret = image_util_transform_get_rotation(image_h, NULL);
+
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_util_transform_get_rotation_p(void)
+{
+    image_util_rotation_e rotation;
+    int ret = image_util_transform_create(&image_h);
+    ret = image_util_transform_get_rotation(image_h, &rotation);
+
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_util_transform_run_n(void)
+{
+    int ret = image_util_transform_run(image_h, NULL, (image_util_transform_completed_cb) utc_transform_completed_cb, NULL);
+
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_util_transform_run_p(void)
+{
+    int ret = image_util_transform_create(&image_h);
+    ret = media_format_create(&fmt);
+    ret = media_format_set_video_mime(fmt, MEDIA_FORMAT_I420);
+    ret = media_format_set_video_width(fmt, 320);
+    ret = media_format_set_video_height(fmt, 240);
+    ret = media_format_set_video_avg_bps(fmt, 1500000);
+    ret = media_format_set_video_max_bps(fmt, 20000000);
+    ret = media_packet_create_alloc(fmt, (media_packet_finalize_cb)NULL, NULL, &src);
+    ret = image_util_transform_set_resolution(image_h, 176, 144);
+    ret = image_util_transform_run(image_h, src, (image_util_transform_completed_cb) utc_transform_completed_cb, NULL);
+
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_util_transform_set_crop_area_n(void)
+{
+     int ret = image_util_transform_set_crop_area(NULL, 0, 0, 320, 240);
+
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_util_transform_set_crop_area_p(void)
+{
+    int ret = image_util_transform_create(&image_h);
+    ret = image_util_transform_set_crop_area(image_h, 0, 0, 320, 240);
+
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_get_crop_area_n(void)
+{
+     int ret = image_util_transform_get_crop_area(image_h, NULL, NULL, NULL, NULL);
+
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_util_transform_get_crop_area_p(void)
+{
+    unsigned int start_x = 0;
+    unsigned int start_y = 0;
+    unsigned int end_x = 0;
+    unsigned int end_y = 0;
+    int ret = image_util_transform_create(&image_h);
+    ret = image_util_transform_get_crop_area(image_h, &start_x, &start_y, &end_x, &end_y);
+
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+
+
+int utc_image_util_transform_destory_n(void)
+{
+    int ret = IMAGE_UTIL_ERROR_NONE;
+
+    ret = image_util_transform_destroy(NULL);
+    assert_neq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_image_util_transform_destory_p(void)
+{
+    int ret = image_util_transform_create(&image_h);
+    image_util_transform_destroy(image_h);
+    image_h = NULL;
+    assert_eq(ret, IMAGE_UTIL_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/key-manager/CMakeLists.txt b/src/utc/key-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..ab75ea9
--- /dev/null
@@ -0,0 +1,37 @@
+SET(PKG_NAME "key-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "key-manager")
+SET(TC_SOURCES
+       utc-key-manager-crypto.c
+       utc-key-manager-storage.c
+       utc-key-manager-type.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       storage
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+INSTALL(FILES dfb08fe4.0 DESTINATION /opt/etc/ssl/certs/)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/key-manager/dfb08fe4.0 b/src/utc/key-manager/dfb08fe4.0
new file mode 100755 (executable)
index 0000000..c349ba3
--- /dev/null
@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDnzCCAoegAwIBAgIJAMH/ADkC5YSTMA0GCSqGSIb3DQEBBQUAMGYxCzAJBgNV
+BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMQ0wCwYDVQQKDARBQ01FMRAwDgYD
+VQQLDAdUZXN0aW5nMSEwHwYDVQQDDBhUZXN0IHJvb3QgY2EgY2VydGlmaWNhdGUw
+HhcNMTQxMjMwMTcyMTUyWhcNMjQxMjI3MTcyMTUyWjBmMQswCQYDVQQGEwJBVTET
+MBEGA1UECAwKU29tZS1TdGF0ZTENMAsGA1UECgwEQUNNRTEQMA4GA1UECwwHVGVz
+dGluZzEhMB8GA1UEAwwYVGVzdCByb290IGNhIGNlcnRpZmljYXRlMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0EJRdUtd2th0vTVF7QxvDKzyFCF3w9vC
+9IDE/Yr12w+a9jd0s7/eG96qTHIYffS3B7x2MB+d4n+SR3W0qmYh7xk8qfEgH3da
+eDoV59IZ9r543KM+g8jm6KffYGX1bIJVVY5OhBRbO9nY6byYpd5kbCIUB6dCf7/W
+rQl1aIdLGFIegAzPGFPXDcU6F192686x54bxt/itMX4agHJ9ZC/rrTBIZghVsjJo
+5/AH5WZpasv8sfrGiiohAxtieoYoJkv5MOYP4/2lPlOY+Cgw1Yoz+HHv31AllgFs
+BquBb/kJVmCCNsAOcnvQzTZUsW/TXz9G2nwRdqI1nSy2JvVjZGsqGQIDAQABo1Aw
+TjAdBgNVHQ4EFgQUt6pkzFt1PZlfYRL/HGnufF4frdwwHwYDVR0jBBgwFoAUt6pk
+zFt1PZlfYRL/HGnufF4frdwwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
+AQEAld7Qwq0cdzDQ51w1RVLwTR8Oy25PB3rzwEHcSGJmdqlMi3xOdaz80S1R1BBX
+ldvGBG5Tn0vT7xSuhmSgI2/HnBpy9ocHVOmhtNB4473NieEpfTYrnGXrFxu46Wus
+9m/ZnugcQ2G6C54A/NFtvgLmaC8uH8M7gKdS6uYUwJFQEofkjmd4UpOYSqmcRXhS
+Jzd5FYFWkJhKJYp3nlENSOD8CUFFVGekm05nFN2gRVc/qaqQkEX77+XYvhodLRsV
+qMn7nf7taidDKLO2T4bhujztnTYOhhaXKgPy7AtZ28N2wvX96VyAPB/vrchGmyBK
+kOg11TpPdNDkhb1J4ZCh2gupDg==
+-----END CERTIFICATE-----
diff --git a/src/utc/key-manager/public.list b/src/utc/key-manager/public.list
new file mode 100755 (executable)
index 0000000..f4f9a5f
--- /dev/null
@@ -0,0 +1,23 @@
+ckmc_allow_access
+ckmc_create_key_pair_dsa
+ckmc_create_key_pair_ecdsa
+ckmc_create_key_pair_rsa
+ckmc_create_signature
+ckmc_deny_access
+ckmc_get_cert
+ckmc_get_cert_alias_list
+ckmc_get_cert_chain
+ckmc_get_cert_chain_with_alias
+ckmc_get_data
+ckmc_get_data_alias_list
+ckmc_get_key
+ckmc_get_key_alias_list
+ckmc_load_cert_from_file
+ckmc_load_from_pkcs12_file
+ckmc_remove_cert
+ckmc_remove_data
+ckmc_remove_key
+ckmc_save_cert
+ckmc_save_data
+ckmc_save_key
+ckmc_verify_signature
diff --git a/src/utc/key-manager/tct-key-manager-core.c b/src/utc/key-manager/tct-key-manager-core.c
new file mode 100755 (executable)
index 0000000..955c445
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-key-manager-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/key-manager/tct-key-manager-core.h b/src/utc/key-manager/tct-key-manager-core.h
new file mode 100755 (executable)
index 0000000..7886741
--- /dev/null
@@ -0,0 +1,127 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_KEY_MANAGER_CORE_H__
+#define __TCT_KEY_MANAGER_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_key_manager_crypto_startup(void);
+extern void utc_key_manager_crypto_cleanup(void);
+extern void utc_key_manager_store_startup(void);
+extern void utc_key_manager_store_cleanup(void);
+extern void utc_key_manager_type_startup(void);
+extern void utc_key_manager_type_cleanup(void);
+
+extern int utc_ckmc_create_key_pair_rsa_p(void);
+extern int utc_ckmc_create_key_pair_rsa_n(void);
+extern int utc_ckmc_create_key_pair_ecdsa_p(void);
+extern int utc_ckmc_create_key_pair_ecdsa_n(void);
+extern int utc_ckmc_create_key_pair_dsa_p(void);
+extern int utc_ckmc_create_key_pair_dsa_n(void);
+extern int utc_ckmc_create_signature_p(void);
+extern int utc_ckmc_create_signature_n(void);
+extern int utc_ckmc_verify_signature_p(void);
+extern int utc_ckmc_verify_signature_n(void);
+extern int utc_ckmc_get_cert_chain_p(void);
+extern int utc_ckmc_get_cert_chain_n(void);
+extern int utc_ckmc_get_cert_chain_with_alias_p(void);
+extern int utc_ckmc_get_cert_chain_with_alias_n(void);
+extern int utc_ckmc_save_key_p(void);
+extern int utc_ckmc_save_key_n(void);
+extern int utc_ckmc_remove_key_p(void);
+extern int utc_ckmc_remove_key_n(void);
+extern int utc_ckmc_get_key_p(void);
+extern int utc_ckmc_get_key_n(void);
+extern int utc_ckmc_get_key_n2(void);
+extern int utc_ckmc_get_key_alias_list_p(void);
+extern int utc_ckmc_get_key_alias_list_n(void);
+extern int utc_ckmc_save_cert_p(void);
+extern int utc_ckmc_save_cert_n(void);
+extern int utc_ckmc_remove_cert_p(void);
+extern int utc_ckmc_remove_cert_n(void);
+extern int utc_ckmc_get_cert_p(void);
+extern int utc_ckmc_get_cert_n(void);
+extern int utc_ckmc_get_cert_n2(void);
+extern int utc_ckmc_get_cert_n3(void);
+extern int utc_ckmc_get_cert_alias_list_p(void);
+extern int utc_ckmc_get_cert_alias_list_n(void);
+extern int utc_ckmc_save_data_p(void);
+extern int utc_ckmc_save_data_n(void);
+extern int utc_ckmc_remove_data_p(void);
+extern int utc_ckmc_remove_data_n(void);
+extern int utc_ckmc_remove_data_n2(void);
+extern int utc_ckmc_get_data_p(void);
+extern int utc_ckmc_get_data_n(void);
+extern int utc_ckmc_get_data_n2(void);
+extern int utc_ckmc_get_data_alias_list_p(void);
+extern int utc_ckmc_get_data_alias_list_n(void);
+extern int utc_ckmc_load_cert_from_file_p(void);
+extern int utc_ckmc_load_cert_from_file_n(void);
+extern int utc_ckmc_load_from_pkcs12_file_p(void);
+extern int utc_ckmc_load_from_pkcs12_file_n(void);
+
+testcase tc_array[] = {
+    {"utc_ckmc_create_key_pair_rsa_p", utc_ckmc_create_key_pair_rsa_p, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_create_key_pair_rsa_n", utc_ckmc_create_key_pair_rsa_n, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_create_key_pair_ecdsa_p", utc_ckmc_create_key_pair_ecdsa_p, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_create_key_pair_ecdsa_n", utc_ckmc_create_key_pair_ecdsa_n, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_create_key_pair_dsa_p", utc_ckmc_create_key_pair_dsa_p, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_create_key_pair_dsa_n", utc_ckmc_create_key_pair_dsa_n, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_create_signature_p", utc_ckmc_create_signature_p, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_create_signature_n", utc_ckmc_create_signature_n, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_verify_signature_p", utc_ckmc_verify_signature_p, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_verify_signature_n", utc_ckmc_verify_signature_n, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_get_cert_chain_p", utc_ckmc_get_cert_chain_p, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_get_cert_chain_n", utc_ckmc_get_cert_chain_n, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_get_cert_chain_with_alias_p", utc_ckmc_get_cert_chain_with_alias_p, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_get_cert_chain_with_alias_n", utc_ckmc_get_cert_chain_with_alias_n, utc_key_manager_crypto_startup, utc_key_manager_crypto_cleanup},
+    {"utc_ckmc_save_key_p", utc_ckmc_save_key_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_save_key_n", utc_ckmc_save_key_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_remove_key_p", utc_ckmc_remove_key_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_remove_key_n", utc_ckmc_remove_key_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_key_p", utc_ckmc_get_key_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_key_n", utc_ckmc_get_key_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_key_n2", utc_ckmc_get_key_n2, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_key_alias_list_p", utc_ckmc_get_key_alias_list_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_key_alias_list_n", utc_ckmc_get_key_alias_list_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_save_cert_p", utc_ckmc_save_cert_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_save_cert_n", utc_ckmc_save_cert_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_remove_cert_p", utc_ckmc_remove_cert_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_remove_cert_n", utc_ckmc_remove_cert_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_cert_p", utc_ckmc_get_cert_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_cert_n", utc_ckmc_get_cert_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_cert_n2", utc_ckmc_get_cert_n2, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_cert_n3", utc_ckmc_get_cert_n3, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_cert_alias_list_p", utc_ckmc_get_cert_alias_list_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_cert_alias_list_n", utc_ckmc_get_cert_alias_list_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_save_data_p", utc_ckmc_save_data_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_save_data_n", utc_ckmc_save_data_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_remove_data_p", utc_ckmc_remove_data_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_remove_data_n", utc_ckmc_remove_data_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_remove_data_n2", utc_ckmc_remove_data_n2, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_data_p", utc_ckmc_get_data_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_data_n", utc_ckmc_get_data_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_data_n2", utc_ckmc_get_data_n2, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_data_alias_list_p", utc_ckmc_get_data_alias_list_p, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_get_data_alias_list_n", utc_ckmc_get_data_alias_list_n, utc_key_manager_store_startup, utc_key_manager_store_cleanup},
+    {"utc_ckmc_load_cert_from_file_p", utc_ckmc_load_cert_from_file_p, utc_key_manager_type_startup, utc_key_manager_type_cleanup},
+    {"utc_ckmc_load_cert_from_file_n", utc_ckmc_load_cert_from_file_n, utc_key_manager_type_startup, utc_key_manager_type_cleanup},
+    {"utc_ckmc_load_from_pkcs12_file_p", utc_ckmc_load_from_pkcs12_file_p, utc_key_manager_type_startup, utc_key_manager_type_cleanup},
+    {"utc_ckmc_load_from_pkcs12_file_n", utc_ckmc_load_from_pkcs12_file_n, utc_key_manager_type_startup, utc_key_manager_type_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_KEY_MANAGER_CORE_H__
diff --git a/src/utc/key-manager/utc-key-manager-crypto.c b/src/utc/key-manager/utc-key-manager-crypto.c
new file mode 100755 (executable)
index 0000000..e5731e9
--- /dev/null
@@ -0,0 +1,693 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+
+#include <ckmc/ckmc-manager.h>
+#include <ckmc/ckmc-control.h>
+#include <ckmc/ckmc-type.h>
+#include <ckmc/ckmc-error.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+
+static const int   APPUSER_UID    = 5000;
+static const char *APPUSER_PASSWD = "simple-password";
+
+//& set: key-manager-crypto
+
+static const char* RSA_PUB_KEY_PEM = "-----BEGIN PUBLIC KEY-----\n"
+       "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2b1bXDa+S8/MGWnMkru4\n"
+       "T4tUddtZNi0NVjQn9RFH1NMa220GsRhRO56F77FlSVFKfSfVZKIiWg6C+DVCkcLf\n"
+       "zXJ/Z0pvwOQYBAqVMFjV6efQGN0JzJ1Unu7pPRiZl7RKGEI+cyzzrcDyrLLrQ2W7\n"
+       "0ZySkNEOv6Frx9JgC5NExuYY4lk2fQQa38JXiZkfyzif2em0px7mXbyf5LjccsKq\n"
+       "v1e+XLtMsL0ZefRcqsP++NzQAI8fKX7WBT+qK0HJDLiHrKOTWYzx6CwJ66LD/vvf\n"
+       "j55xtsKDLVDbsotvf8/m6VLMab+vqKk11TP4tq6yo0mwyTADvgl1zowQEO9I1W6o\n"
+       "zQIDAQAB\n"
+       "-----END PUBLIC KEY-----";
+
+static const char* CERT_PEM = "-----BEGIN CERTIFICATE-----\n"
+    "MIIEgDCCA2igAwIBAgIIcjtBYJGQtOAwDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE\n"
+    "BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl\n"
+    "cm5ldCBBdXRob3JpdHkgRzIwHhcNMTQwNTIyMTEyOTQyWhcNMTQwODIwMDAwMDAw\n"
+    "WjBtMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN\n"
+    "TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEcMBoGA1UEAwwTYWNj\n"
+    "b3VudHMuZ29vZ2xlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\n"
+    "ALtlLWVWPN3q3bSEQl1Z97gPdgl5vbgJOZSAr0ZY0tJCuFLBbUKetJWryyE+5KpG\n"
+    "gMMpLS4v8/bvXaZc6mAs+RfAqGM24C3vQg5hPnj4dflnhL0WiOCZBurm1tV4oexk\n"
+    "HLXs3jr/jpnb738AQpj8zZ9a4VEBuHJRZALnWZ/XhqU+dvYomAoRQNuL5OhkT7uu\n"
+    "d0NKJL9JjYLyQglGgE2sVsWv2kj7EO/P9Q6NEKt9BGmhMsFvtfeKUaymynaxpR1g\n"
+    "wEPlqYvB38goh1dIOgVLT0OVyLImeg5Mdwar/8c1U0OYhLOc6PJapOZAfUkE+3+w\n"
+    "xYt8AChLN1b5szOwInrCVpECAwEAAaOCAUYwggFCMB0GA1UdJQQWMBQGCCsGAQUF\n"
+    "BwMBBggrBgEFBQcDAjAeBgNVHREEFzAVghNhY2NvdW50cy5nb29nbGUuY29tMGgG\n"
+    "CCsGAQUFBwEBBFwwWjArBggrBgEFBQcwAoYfaHR0cDovL3BraS5nb29nbGUuY29t\n"
+    "L0dJQUcyLmNydDArBggrBgEFBQcwAYYfaHR0cDovL2NsaWVudHMxLmdvb2dsZS5j\n"
+    "b20vb2NzcDAdBgNVHQ4EFgQU0/UtToEtNIfwDwHuYGuVKcj0xK8wDAYDVR0TAQH/\n"
+    "BAIwADAfBgNVHSMEGDAWgBRK3QYWG7z2aLV29YG2u2IaulqBLzAXBgNVHSAEEDAO\n"
+    "MAwGCisGAQQB1nkCBQEwMAYDVR0fBCkwJzAloCOgIYYfaHR0cDovL3BraS5nb29n\n"
+    "bGUuY29tL0dJQUcyLmNybDANBgkqhkiG9w0BAQUFAAOCAQEAcGNI/X9f0g+7ij0o\n"
+    "ehLpk6vxSMQGrmOZ4+PG/MC9SLClCkt7zJkfU7erZnyVXyxCpwlljq+Wk9YTPUOq\n"
+    "xD/V2ikQVSAANoxGJFO9UoL5jzWusPhKKv8CcM7fuiERz8K+CfBcqfxbgI5rH0g5\n"
+    "dYclmLC81cJ/08i+9Nltvxv69Y3hGfEICT6K+EdSxwnQzOhpMZmvxZsIj+d6CVNa\n"
+    "9ICYgUthsNQVWzrIs5wknpjjZ9liDMwJX0vu8A0rce4X/Lna5hh2bW9igz2iP5WM\n"
+    "9fuwdbTw4y3jfPQgszU4YZxWxhMzccxe058Qx1tLndAknBQEBesQjXytVQpuM1SV\n"
+    "rHva8A==\n"
+    "-----END CERTIFICATE-----\n";
+
+static const char* CRY_RSA_PRI_KEY =
+       "-----BEGIN RSA PRIVATE KEY-----\n"
+       "MIICXQIBAAKBgQDCKb9BkTdOjCTXKPi/H5FSGuyrgzORBtR3nCTg7SRnL47zNGEj\n"
+       "l2wkgsY9ZO3UJHm0gy5KMjWeCuUVkSD3G46J9obg1bYJivCQBJKxfieA8sWOtNq1\n"
+       "M8emHGK8o3sjaRklrngmk2xSCs5vFJVlCluzAYUmrPDm64C3+n4yW4pBCQIDAQAB\n"
+       "AoGAd1IWgiHO3kuLvFome7XXpaB8P27SutZ6rcLcewnhLDRy4g0XgTrmL43abBJh\n"
+       "gdSkooVXZity/dvuKpHUs2dQ8W8zYiFFsHfu9qqLmLP6SuBPyUCvlUDH5BGfjjxI\n"
+       "5qGWIowj/qGHKpbQ7uB+Oe2BHwbHao0zFZIkfKqY0mX9U00CQQDwF/4zQcGS1RX/\n"
+       "229gowTsvSGVmm8cy1jGst6xkueEuOEZ/AVPO1fjavz+nTziUk4E5lZHAj18L6Hl\n"
+       "iO29LRujAkEAzwbEWVhfTJewCZIFf3sY3ifXhGZhVKDHVzPBNyoft8Z+09DMHTJb\n"
+       "EYg85MIbR73aUyIWsEci/CPk6LPRNv47YwJAHtQF2NEFqPPhakPjzjXAaSFz0YDN\n"
+       "6ZWWpZTMEWL6hUkz5iE9EUpeY54WNB8+dRT6XZix1VZNTMfU8uMdG6BSHwJBAKYM\n"
+       "gm47AGz5eVujwD8op6CACk+KomRzdI+P1lh9s+T+E3mnDiAY5IxiXp0Ix0K6lyN4\n"
+       "wwPuerQLwi2XFKZsMYsCQQDOiSQFP9PfXh9kFzN6e89LxOdnqC/r9i5GDB3ea8eL\n"
+       "SCRprpzqOXZvOP1HBAEjsJ6k4f8Dqj1fm+y8ZcgAZUPr\n"
+       "-----END RSA PRIVATE KEY-----\n";
+
+static const char* CRY_CERT =
+       "-----BEGIN CERTIFICATE-----\n"
+       "MIICijCCAfOgAwIBAgIJAMvaNHQ1ozT8MA0GCSqGSIb3DQEBBQUAMF4xCzAJBgNV\n"
+       "BAYTAlBMMQ0wCwYDVQQIDARMb2R6MQ0wCwYDVQQHDARMb2R6MRAwDgYDVQQKDAdT\n"
+       "YW1zdW5nMREwDwYDVQQLDAhTZWN1cml0eTEMMAoGA1UEAwwDQ0tNMB4XDTE0MDcw\n"
+       "MjEyNDE0N1oXDTE3MDcwMTEyNDE0N1owXjELMAkGA1UEBhMCUEwxDTALBgNVBAgM\n"
+       "BExvZHoxDTALBgNVBAcMBExvZHoxEDAOBgNVBAoMB1NhbXN1bmcxETAPBgNVBAsM\n"
+       "CFNlY3VyaXR5MQwwCgYDVQQDDANDS00wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ\n"
+       "AoGBAMIpv0GRN06MJNco+L8fkVIa7KuDM5EG1HecJODtJGcvjvM0YSOXbCSCxj1k\n"
+       "7dQkebSDLkoyNZ4K5RWRIPcbjon2huDVtgmK8JAEkrF+J4DyxY602rUzx6YcYryj\n"
+       "eyNpGSWueCaTbFIKzm8UlWUKW7MBhSas8ObrgLf6fjJbikEJAgMBAAGjUDBOMB0G\n"
+       "A1UdDgQWBBQuW9DuITahZJ6saVZZI0aBlis5vzAfBgNVHSMEGDAWgBQuW9DuITah\n"
+       "ZJ6saVZZI0aBlis5vzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAB2X\n"
+       "GNtJopBJR3dCpzDONknr/c6qcsPVa3nH4c7qzy6F+4bgqa5IObnoF8zUrvD2sMAO\n"
+       "km3C/N+Qzt8Rb7ORM6U4tlPp1kZ5t6PKjghhNaiYwVm9A/Zm+wyAmRIkQiYDr4MX\n"
+       "e+bRAkPmJeEWpaav1lvvBnFzGSGJrnSSeWUegGyn\n"
+       "-----END CERTIFICATE-----\n";
+
+// Test certificate signed with test intermediate ca
+static const char* CERT_CHAIN1 =
+    "-----BEGIN CERTIFICATE-----\n"
+    "MIIDOzCCAiMCAQEwDQYJKoZIhvcNAQEFBQAwZDELMAkGA1UEBhMCQVUxEzARBgNV\n"
+    "BAgMClNvbWUtU3RhdGUxDTALBgNVBAoMBEFDTUUxEDAOBgNVBAsMB1Rlc3Rpbmcx\n"
+    "HzAdBgNVBAMMFlRlc3QgSU0gQ0EgY2VydGlmaWNhdGUwHhcNMTUwMTE2MTY0ODE0\n"
+    "WhcNMzUwMTExMTY0ODE0WjBjMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1T\n"
+    "dGF0ZTENMAsGA1UECgwEQUNNRTEQMA4GA1UECwwHVGVzdGluZzEeMBwGA1UEAwwV\n"
+    "VGVzdCBsZWFmIGNlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\n"
+    "CgKCAQEAzTdDIa2tDmRxFnIgiG+mBz8GoSVODs0ImNQGbqj+pLhBOFRH8fsah4Jl\n"
+    "z5YF9KwhMVLknnHGFLE/Nb7Ac35kEzhMQMpTRxohW83oxw3eZ8zN/FBoKqg4qHRq\n"
+    "QR8kS10YXTgrBR0ex/Vp+OUKEw6h7yL2r4Tpvrn9/qHwsxtLxqWbDIVf1O9b1Lfc\n"
+    "bllYMdmV5E62yN5tcwrDP8gvHjFnVeLzrG8wTpc9FR90/0Jkfp5jAJcArOBLrT0E\n"
+    "4VRqs+4HuwT8jAwFAmNnc7IYX5qSjtSWkmmHe73K/lzB+OiI0JEc/3eWUTWqwTSk\n"
+    "4tNCiQGBKJ39LXPTBBJdzmxVH7CUDQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQAp\n"
+    "UdDOGu3hNiG+Vn10aQ6B1ZmOj3t+45gUV3sC+y8hB8EK1g4P5Ke9bVDts0T5eOnj\n"
+    "CSc+6VoND5O4adI0IFFRFljHNVnvjeosHfUZNnowsmA2ptQBtC1g5ZKRvKXlkC5/\n"
+    "i5BGgRqPFA7y9WB9Y05MrJHf3E+Oz/RBsLeeNiNN+rF5X1vYExvGHpo0M0zS0ze9\n"
+    "HtC0aOy8ocsTrQkf3ceHTAXx2i8ftoSSD4klojtWFpWMrNQa52F7wB9nU6FfKRuF\n"
+    "Zj/T1JkYXKkEwZU6nAR2jdZp3EP9xj3o15V/tyFcXHx6l8NTxn4cJb+Xe4VquQJz\n"
+    "6ON7PVe0ABN/AlwVQiFE\n"
+    "-----END CERTIFICATE-----\n";
+
+// Test root ca is installed in /etc/ssl/certs
+// Test intermediate ca signed with test root ca
+static const char* CERT_CHAIN2 =
+    "-----BEGIN CERTIFICATE-----\n"
+    "MIIDljCCAn6gAwIBAgICEAAwDQYJKoZIhvcNAQEFBQAwZjELMAkGA1UEBhMCQVUx\n"
+    "EzARBgNVBAgMClNvbWUtU3RhdGUxDTALBgNVBAoMBEFDTUUxEDAOBgNVBAsMB1Rl\n"
+    "c3RpbmcxITAfBgNVBAMMGFRlc3Qgcm9vdCBjYSBjZXJ0aWZpY2F0ZTAeFw0xNTAx\n"
+    "MTYxNjQ1MzRaFw0zNTAxMTExNjQ1MzRaMGQxCzAJBgNVBAYTAkFVMRMwEQYDVQQI\n"
+    "DApTb21lLVN0YXRlMQ0wCwYDVQQKDARBQ01FMRAwDgYDVQQLDAdUZXN0aW5nMR8w\n"
+    "HQYDVQQDDBZUZXN0IElNIENBIGNlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0BAQEF\n"
+    "AAOCAQ8AMIIBCgKCAQEAzmBF78qClgoKfnLAncMXZwZ14TW+5kags1+QCYeg3c7j\n"
+    "L9+RvDxIaX2tKf1sukJcwQfYqUlQkwt+58LMOb2ORtkpj8Or6WCWCZ0BzneT8ug7\n"
+    "nxJT4m9+bohMF0JoKjjB2H4KNMHamLIwUxRKt6nyfk81kVhJOi2vzzxd+UCPi6Pc\n"
+    "UAbJNH48eNgOIg55nyFovVzYj8GIo/9GvHJj83PPa/KlJZ+Z1qZASZZ/VYorplVT\n"
+    "thsHXKfejhFy5YJ9t7n/vyAQsyBsagZsvX19xnH41fbYXHKf8UbXG23rNaZlchs6\n"
+    "XJVLQdzOpj3WTj/lCocVHqLaZISLhNQ3aI7kUBUdiwIDAQABo1AwTjAdBgNVHQ4E\n"
+    "FgQUoCYNaCBP4jl/3SYQuK8Ka+6i3QEwHwYDVR0jBBgwFoAUt6pkzFt1PZlfYRL/\n"
+    "HGnufF4frdwwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAjRzWiD97\n"
+    "Htv4Kxpm3P+C+xP9AEteCJfO+7p8MWgtWEJOknJyt55zeKS2JwZIq57KcbqD8U7v\n"
+    "vAUx1ymtUhlFPFd7J1mJ3pou+3aFYmGShYhGHpbrmUwjp7HVP588jrW1NoZVHdMc\n"
+    "4OgJWFrViXeu9+maIcekjMB/+9Y0dUgQuK5ZuT5H/Jwet7Th/o9uufTUZjBzRvrB\n"
+    "pbXgQpqgME2av4Q/6LuldPCTHLtWXgFUU2R+yCGmuGilvhFJnKoQryAbYnIQNWE8\n"
+    "SLoHQ9s1i7Zyb7HU6UAaqMOz15LBkyAqtNyJcO2p7Q/p5YK0xfD4xisI5qXucqVm\n"
+    "F2obL5qJSTN/RQ==\n"
+    "-----END CERTIFICATE-----\n";
+
+
+void utc_key_manager_crypto_startup(void)
+{
+//     setuid(APPUSER_ID);
+}
+
+void utc_key_manager_crypto_cleanup(void)
+{
+}
+
+
+int utc_ckmc_create_key_pair_rsa_p(void)
+{
+       int temp;
+
+       size_t size = 1024;
+       const char *private_key_alias = "PRV_KEY1";
+       const char *public_key_alias = "PUB_KEY1";
+       ckmc_policy_s policy_private_key;
+       ckmc_policy_s policy_public_key;
+
+       policy_private_key.password = NULL;
+       policy_private_key.extractable = true;
+
+       policy_public_key.password = NULL;
+       policy_public_key.extractable = true;
+
+       temp = ckmc_create_key_pair_rsa(size, private_key_alias, public_key_alias, policy_private_key, policy_public_key);
+       assert_eq(temp,CKMC_ERROR_NONE);
+    ckmc_remove_key (private_key_alias);
+    ckmc_remove_key (public_key_alias);
+       return 0;
+}
+
+int utc_ckmc_create_key_pair_rsa_n(void)
+{
+       int temp;
+
+       size_t size = 2048;
+       const char *private_key_alias = NULL;
+       const char *public_key_alias = NULL;
+       ckmc_policy_s policy_private_key;
+       ckmc_policy_s policy_public_key;
+
+       policy_private_key.password = NULL;
+       policy_private_key.extractable = true;
+
+       policy_public_key.password = NULL;
+       policy_public_key.extractable = true;
+
+       temp = ckmc_create_key_pair_rsa(size, private_key_alias, public_key_alias, policy_private_key, policy_public_key);
+       assert_eq(temp,CKMC_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_ckmc_create_key_pair_ecdsa_p(void)
+{
+       int temp;
+
+       ckmc_ec_type_e ectype = CKMC_EC_PRIME192V1;
+       const char *private_key_alias = "ecdsa-test-1";
+       const char *public_key_alias = "ecdsa-test-2";
+       ckmc_policy_s policy_private_key;
+       ckmc_policy_s policy_public_key;
+
+       const char *key_password = "privatepassword";
+
+       policy_private_key.password = key_password;
+       policy_private_key.extractable = false;
+
+       policy_public_key.password = NULL;
+       policy_public_key.extractable = true;
+
+       temp = ckmc_create_key_pair_ecdsa(ectype, private_key_alias, public_key_alias, policy_private_key, policy_public_key);
+       assert_eq(temp,CKMC_ERROR_NONE);
+    ckmc_remove_key (private_key_alias);
+    ckmc_remove_key (public_key_alias);
+       return 0;
+}
+
+int utc_ckmc_create_key_pair_ecdsa_n(void)
+{
+       int temp;
+
+       ckmc_ec_type_e ectype = CKMC_EC_PRIME192V1;
+       const char *private_key_alias = NULL;
+       const char *public_key_alias = NULL;
+       ckmc_policy_s policy_private_key;
+       ckmc_policy_s policy_public_key;
+
+       const char *key_password = "privatepassword";
+
+       policy_private_key.password = key_password;
+       policy_private_key.extractable = false;
+
+       policy_public_key.password = NULL;
+       policy_public_key.extractable = true;
+
+       temp = ckmc_create_key_pair_ecdsa(ectype, private_key_alias, public_key_alias, policy_private_key, policy_public_key);
+       assert_eq(temp,CKMC_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_ckmc_create_key_pair_dsa_p(void)
+{
+       int temp;
+       size_t size = 1024;
+       const char *private_key_alias = "dsa-test-1-priv";
+       const char *public_key_alias = "dsa-test-1-pub";
+       ckmc_policy_s policy_private_key;
+       ckmc_policy_s policy_public_key;
+
+       policy_private_key.password = NULL;
+       policy_private_key.extractable = false;
+
+       policy_public_key.password = NULL;
+       policy_public_key.extractable = true;
+
+       temp = ckmc_create_key_pair_dsa(size, private_key_alias, public_key_alias, policy_private_key, policy_public_key);
+       assert_eq(temp, CKMC_ERROR_NONE);
+    ckmc_remove_key (private_key_alias);
+    ckmc_remove_key (public_key_alias);
+       return 0;
+}
+
+int utc_ckmc_create_key_pair_dsa_n(void)
+{
+       int temp;
+       size_t size = 1024;
+       const char *private_key_alias = NULL;
+       const char *public_key_alias = NULL;
+       ckmc_policy_s policy_private_key;
+       ckmc_policy_s policy_public_key;
+
+       policy_private_key.password = NULL;
+       policy_private_key.extractable = false;
+
+       policy_public_key.password = NULL;
+       policy_public_key.extractable = true;
+
+       temp = ckmc_create_key_pair_dsa(size, private_key_alias, public_key_alias, policy_private_key, policy_public_key);
+       assert_eq(temp, CKMC_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_ckmc_create_signature_p(void)
+{
+       int temp;
+
+       char* message = "message test";
+
+       ckmc_raw_buffer_s msg_buff;
+       msg_buff.data = (unsigned char*) message;
+       msg_buff.size = strlen(message);
+
+       const char *pri_alias = "create_signature_p_pri_alias";
+       const char *pub_alias = "create_signature_p_pub_alias";
+       char *key_passwd = NULL;
+       char *pri_passwd = NULL;
+       char *pub_passwd = NULL;
+
+       ckmc_cert_s cert;
+       cert.raw_cert = (unsigned char *) CRY_CERT;
+       cert.cert_size = strlen(CRY_CERT);
+       cert.data_format = CKMC_FORM_PEM;
+
+       ckmc_policy_s certpolicy;
+       certpolicy.password = pub_passwd;
+       certpolicy.extractable = true;
+
+       ckmc_key_s prikey;
+       prikey.raw_key = (unsigned char *) CRY_RSA_PRI_KEY;
+       prikey.key_size = strlen(CRY_RSA_PRI_KEY);
+       prikey.key_type = CKMC_KEY_NONE;
+       prikey.password = key_passwd;
+
+       ckmc_policy_s pripolicy;
+       pripolicy.password = pri_passwd;
+       pripolicy.extractable = false;
+
+       temp = ckmc_save_cert(pub_alias, cert, certpolicy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       temp = ckmc_save_key(pri_alias, prikey, pripolicy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       ckmc_hash_algo_e hash_algo = CKMC_HASH_SHA256;
+       ckmc_rsa_padding_algo_e pad_algo = CKMC_PKCS1_PADDING;
+       ckmc_raw_buffer_s *signature;
+
+       temp = ckmc_create_signature(
+                                       pri_alias,
+                                       pri_passwd,
+                                       msg_buff,
+                                       hash_algo,
+                                       pad_algo,
+                                       &signature);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+    ckmc_remove_cert(pub_alias);
+    ckmc_remove_key(pri_alias);
+
+       return 0;
+}
+
+int utc_ckmc_create_signature_n(void)
+{
+       int temp;
+
+       char* message = "message test";
+
+       ckmc_raw_buffer_s msg_buff;
+       msg_buff.data = (unsigned char*) message;
+       msg_buff.size = strlen(message);
+
+       const char *pri_alias = "crete_signature_n_prv3";
+       const char *pub_alias = "crete_signature_n_pub3";
+       const char *pri_alias_wrong = NULL;
+       const char *pub_alias_wrong = NULL;
+       char *key_passwd = NULL;
+       char *pri_passwd = NULL;
+       char *pub_passwd = NULL;
+
+       ckmc_cert_s cert;
+       cert.raw_cert = (unsigned char *) CRY_CERT;
+       cert.cert_size = strlen(CRY_CERT);
+       cert.data_format = CKMC_FORM_PEM;
+
+       ckmc_policy_s certpolicy;
+       certpolicy.password = pub_passwd;
+       certpolicy.extractable = true;
+
+       ckmc_key_s prikey;
+       prikey.raw_key = (unsigned char *) CRY_RSA_PRI_KEY;
+       prikey.key_size = strlen(CRY_RSA_PRI_KEY);
+       prikey.key_type = CKMC_KEY_NONE;
+       prikey.password = key_passwd;
+
+       ckmc_policy_s pripolicy;
+       pripolicy.password = pri_passwd;
+       pripolicy.extractable = false;
+
+       temp = ckmc_save_cert(pub_alias, cert, certpolicy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       temp = ckmc_save_key(pri_alias, prikey, pripolicy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       ckmc_hash_algo_e hash_algo = CKMC_HASH_SHA256;
+       ckmc_rsa_padding_algo_e pad_algo = CKMC_PKCS1_PADDING;
+       ckmc_raw_buffer_s *signature;
+
+       temp = ckmc_create_signature(
+                                       pri_alias_wrong,
+                                       pub_alias_wrong,
+                                       msg_buff,
+                                       hash_algo,
+                                       pad_algo,
+                                       &signature);
+       assert_eq(temp,CKMC_ERROR_INVALID_PARAMETER);
+
+    ckmc_remove_cert(pub_alias);
+    ckmc_remove_key(pri_alias);    
+
+       return 0;
+}
+
+int utc_ckmc_verify_signature_p(void)
+{
+       int temp;
+
+       char* message = "message test";
+
+       ckmc_raw_buffer_s msg_buff;
+       msg_buff.data = (unsigned char*) message;
+       msg_buff.size = strlen(message);
+
+       const char *pri_alias = "verify_signature_p_prv3";
+       const char *pub_alias = "verify_signature_p_pub3";
+       char *key_passwd = NULL;
+       char *pri_passwd = NULL;
+       char *pub_passwd = NULL;
+
+       ckmc_hash_algo_e hash_algo = CKMC_HASH_SHA256;
+       ckmc_rsa_padding_algo_e pad_algo = CKMC_PKCS1_PADDING;
+       ckmc_raw_buffer_s *signature;
+
+       ckmc_cert_s cert;
+       cert.raw_cert = (unsigned char *) CRY_CERT;
+       cert.cert_size = strlen(CRY_CERT);
+       cert.data_format = CKMC_FORM_PEM;
+
+       ckmc_policy_s certpolicy;
+       certpolicy.password = pub_passwd;
+       certpolicy.extractable = true;
+
+       ckmc_key_s prikey;
+       prikey.raw_key = (unsigned char *) CRY_RSA_PRI_KEY;
+       prikey.key_size = strlen(CRY_RSA_PRI_KEY);
+       prikey.key_type = CKMC_KEY_NONE;
+       prikey.password = key_passwd;
+
+       ckmc_policy_s pripolicy;
+       pripolicy.password = pri_passwd;
+       pripolicy.extractable = false;
+
+       temp = ckmc_save_cert(pub_alias, cert, certpolicy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       temp = ckmc_save_key(pri_alias, prikey, pripolicy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       temp = ckmc_create_signature(
+                                       pri_alias,
+                                       pri_passwd,
+                                       msg_buff,
+                                       hash_algo,
+                                       pad_algo,
+                                       &signature);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       temp = ckmc_verify_signature(
+                                       pub_alias,
+                                       pub_passwd,
+                                       msg_buff,
+                                       *signature,
+                                       hash_algo,
+                                       pad_algo);
+
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+    ckmc_remove_cert(pub_alias);
+    ckmc_remove_key(pri_alias);
+    
+       return 0;
+}
+
+int utc_ckmc_verify_signature_n(void)
+{
+       int temp;
+
+       char* message = "message test";
+
+       ckmc_raw_buffer_s msg_buff;
+       msg_buff.data = (unsigned char*) message;
+       msg_buff.size = strlen(message);
+
+       const char *pri_alias = "verify_signature_n_pri3";
+       const char *pub_alias = "verify_signature_n_pub3";
+       const char *pri_alias_wrong = NULL;
+       const char *pub_alias_wrong = NULL;
+       char *key_passwd = NULL;
+       char *pri_passwd = NULL;
+       char *pub_passwd = NULL;
+
+       ckmc_hash_algo_e hash_algo = CKMC_HASH_SHA256;
+       ckmc_rsa_padding_algo_e pad_algo = CKMC_PKCS1_PADDING;
+       ckmc_raw_buffer_s *signature;
+
+       ckmc_cert_s cert;
+       cert.raw_cert = (unsigned char *) CRY_CERT;
+       cert.cert_size = strlen(CRY_CERT);
+       cert.data_format = CKMC_FORM_PEM;
+
+       ckmc_policy_s certpolicy;
+       certpolicy.password = pub_passwd;
+       certpolicy.extractable = true;
+
+       ckmc_key_s prikey;
+       prikey.raw_key = (unsigned char *) CRY_RSA_PRI_KEY;
+       prikey.key_size = strlen(CRY_RSA_PRI_KEY);
+       prikey.key_type = CKMC_KEY_NONE;
+       prikey.password = key_passwd;
+
+       ckmc_policy_s pripolicy;
+       pripolicy.password = pri_passwd;
+       pripolicy.extractable = false;
+
+       temp = ckmc_save_cert(pub_alias, cert, certpolicy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       temp = ckmc_save_key(pri_alias, prikey, pripolicy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       temp = ckmc_create_signature(
+                                       pri_alias,
+                                       pri_passwd,
+                                       msg_buff,
+                                       hash_algo,
+                                       pad_algo,
+                                       &signature);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       temp = ckmc_verify_signature(
+                                       pri_alias_wrong,
+                                       pub_alias_wrong,
+                                       msg_buff,
+                                       *signature,
+                                       hash_algo,
+                                       pad_algo);
+       assert_eq(temp,CKMC_ERROR_INVALID_PARAMETER);
+
+    ckmc_remove_cert(pub_alias);
+    ckmc_remove_key(pri_alias);
+    
+       return 0;
+}
+
+int utc_ckmc_get_cert_chain_p(void)
+{
+       int temp;
+       int chain_len = 3;
+
+       ckmc_cert_s c_cert;
+       ckmc_cert_s c_cert1;
+       ckmc_cert_list_s untrustedcerts;
+
+       c_cert.raw_cert = (unsigned char *) CERT_CHAIN1;
+       c_cert.cert_size = strlen(CERT_CHAIN1);
+       c_cert.data_format = CKMC_FORM_PEM;
+
+       c_cert1.raw_cert = (unsigned char *) CERT_CHAIN2;
+       c_cert1.cert_size = strlen(CERT_CHAIN2);
+       c_cert1.data_format = CKMC_FORM_PEM;
+
+       untrustedcerts.cert = &c_cert1;
+       untrustedcerts.next = NULL;
+
+       ckmc_cert_list_s *cert_chain_list;
+
+       temp = ckmc_get_cert_chain(&c_cert, &untrustedcerts, &cert_chain_list);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       int cnt = 0;
+       ckmc_cert_list_s *current;
+       ckmc_cert_list_s *next = cert_chain_list;
+
+       do{
+               current = next;
+               next = current->next;
+               cnt ++;
+       } while(next != NULL);
+
+       assert_eq(cnt,chain_len);
+
+       ckmc_cert_list_all_free(cert_chain_list);
+
+       return 0;
+}
+
+int utc_ckmc_get_cert_chain_n(void)
+{
+       int temp;
+       ckmc_cert_s c_cert;
+
+       ckmc_cert_list_s *cert_chain_list = NULL;
+       ckmc_cert_list_s *untrustedcerts = NULL;
+
+       c_cert.raw_cert = (unsigned char *) CERT_CHAIN1;
+       c_cert.cert_size = strlen(CERT_CHAIN1);
+       c_cert.data_format = CKMC_FORM_PEM;
+
+       temp = ckmc_get_cert_chain(&c_cert, untrustedcerts, &cert_chain_list);
+       assert_eq(temp,CKMC_ERROR_VERIFICATION_FAILED);
+
+       return 0;
+}
+
+int utc_ckmc_get_cert_chain_with_alias_p(void)
+{
+       int temp;
+       int chain_len = 3;
+       ckmc_cert_s c_cert, c_cert1;
+       ckmc_policy_s cert_policy;
+       char* policy_password = NULL;
+    char* save_cert_alias = "cert_untrusted";
+
+       c_cert.raw_cert = (unsigned char *) CERT_CHAIN1;
+       c_cert.cert_size = strlen(CERT_CHAIN1);
+       c_cert.data_format = CKMC_FORM_PEM;
+
+       ckmc_cert_list_s *cert_chain_list;
+
+       cert_policy.password = policy_password;
+       cert_policy.extractable = true;
+
+       c_cert1.raw_cert = (unsigned char *) CERT_CHAIN2;
+       c_cert1.cert_size = strlen(CERT_CHAIN2);
+       c_cert1.data_format = CKMC_FORM_PEM;
+
+       ckmc_save_cert(save_cert_alias, c_cert1, cert_policy);
+
+       ckmc_get_cert_alias_list(&cert_chain_list);
+
+       temp = ckmc_get_cert_chain_with_alias(&c_cert, cert_chain_list, &cert_chain_list);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       int cnt = 0;
+       ckmc_cert_list_s *current;
+       ckmc_cert_list_s *next = cert_chain_list;
+
+       do{
+               current = next;
+               next = current->next;
+               cnt ++;
+       } while(next != NULL);
+
+       assert_eq(cnt,chain_len);
+
+       ckmc_cert_list_all_free(cert_chain_list);
+
+    ckmc_remove_cert(save_cert_alias);
+
+       return 0;
+}
+
+int utc_ckmc_get_cert_chain_with_alias_n(void)
+{
+       int temp;
+       int chain_len = 3;
+       ckmc_cert_s c_cert, c_cert1;
+       ckmc_policy_s cert_policy;
+       char* policy_password = NULL;
+
+       c_cert.raw_cert = (unsigned char *) CERT_CHAIN1;
+       c_cert.cert_size = strlen(CERT_CHAIN1);
+       c_cert.data_format = CKMC_FORM_PEM;
+
+       ckmc_cert_list_s *cert_chain_list = NULL;
+
+       temp = ckmc_get_cert_chain_with_alias(&c_cert, cert_chain_list, &cert_chain_list);
+       assert_eq(temp,CKMC_ERROR_VERIFICATION_FAILED);
+
+       return 0;
+}
+
diff --git a/src/utc/key-manager/utc-key-manager-storage.c b/src/utc/key-manager/utc-key-manager-storage.c
new file mode 100755 (executable)
index 0000000..25ed282
--- /dev/null
@@ -0,0 +1,840 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+
+#include <ckmc/ckmc-manager.h>
+#include <ckmc/ckmc-control.h>
+#include <ckmc/ckmc-type.h>
+#include <ckmc/ckmc-error.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+
+static const int   APPUSER_UID    = 5000;
+static const char *APPUSER_PASSWD = "simple-password";
+
+//& set: key-manager-storage2
+static const char* RSA_PUB_KEY_PEM = "-----BEGIN PUBLIC KEY-----\n"
+    "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2b1bXDa+S8/MGWnMkru4\n"
+    "T4tUddtZNi0NVjQn9RFH1NMa220GsRhRO56F77FlSVFKfSfVZKIiWg6C+DVCkcLf\n"
+    "zXJ/Z0pvwOQYBAqVMFjV6efQGN0JzJ1Unu7pPRiZl7RKGEI+cyzzrcDyrLLrQ2W7\n"
+    "0ZySkNEOv6Frx9JgC5NExuYY4lk2fQQa38JXiZkfyzif2em0px7mXbyf5LjccsKq\n"
+    "v1e+XLtMsL0ZefRcqsP++NzQAI8fKX7WBT+qK0HJDLiHrKOTWYzx6CwJ66LD/vvf\n"
+    "j55xtsKDLVDbsotvf8/m6VLMab+vqKk11TP4tq6yo0mwyTADvgl1zowQEO9I1W6o\n"
+    "zQIDAQAB\n"
+    "-----END PUBLIC KEY-----";
+
+static const char* CERT_PEM = "-----BEGIN CERTIFICATE-----\n"
+    "MIIEgDCCA2igAwIBAgIIcjtBYJGQtOAwDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE\n"
+    "BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl\n"
+    "cm5ldCBBdXRob3JpdHkgRzIwHhcNMTQwNTIyMTEyOTQyWhcNMTQwODIwMDAwMDAw\n"
+    "WjBtMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN\n"
+    "TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEcMBoGA1UEAwwTYWNj\n"
+    "b3VudHMuZ29vZ2xlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\n"
+    "ALtlLWVWPN3q3bSEQl1Z97gPdgl5vbgJOZSAr0ZY0tJCuFLBbUKetJWryyE+5KpG\n"
+    "gMMpLS4v8/bvXaZc6mAs+RfAqGM24C3vQg5hPnj4dflnhL0WiOCZBurm1tV4oexk\n"
+    "HLXs3jr/jpnb738AQpj8zZ9a4VEBuHJRZALnWZ/XhqU+dvYomAoRQNuL5OhkT7uu\n"
+    "d0NKJL9JjYLyQglGgE2sVsWv2kj7EO/P9Q6NEKt9BGmhMsFvtfeKUaymynaxpR1g\n"
+    "wEPlqYvB38goh1dIOgVLT0OVyLImeg5Mdwar/8c1U0OYhLOc6PJapOZAfUkE+3+w\n"
+    "xYt8AChLN1b5szOwInrCVpECAwEAAaOCAUYwggFCMB0GA1UdJQQWMBQGCCsGAQUF\n"
+    "BwMBBggrBgEFBQcDAjAeBgNVHREEFzAVghNhY2NvdW50cy5nb29nbGUuY29tMGgG\n"
+    "CCsGAQUFBwEBBFwwWjArBggrBgEFBQcwAoYfaHR0cDovL3BraS5nb29nbGUuY29t\n"
+    "L0dJQUcyLmNydDArBggrBgEFBQcwAYYfaHR0cDovL2NsaWVudHMxLmdvb2dsZS5j\n"
+    "b20vb2NzcDAdBgNVHQ4EFgQU0/UtToEtNIfwDwHuYGuVKcj0xK8wDAYDVR0TAQH/\n"
+    "BAIwADAfBgNVHSMEGDAWgBRK3QYWG7z2aLV29YG2u2IaulqBLzAXBgNVHSAEEDAO\n"
+    "MAwGCisGAQQB1nkCBQEwMAYDVR0fBCkwJzAloCOgIYYfaHR0cDovL3BraS5nb29n\n"
+    "bGUuY29tL0dJQUcyLmNybDANBgkqhkiG9w0BAQUFAAOCAQEAcGNI/X9f0g+7ij0o\n"
+    "ehLpk6vxSMQGrmOZ4+PG/MC9SLClCkt7zJkfU7erZnyVXyxCpwlljq+Wk9YTPUOq\n"
+    "xD/V2ikQVSAANoxGJFO9UoL5jzWusPhKKv8CcM7fuiERz8K+CfBcqfxbgI5rH0g5\n"
+    "dYclmLC81cJ/08i+9Nltvxv69Y3hGfEICT6K+EdSxwnQzOhpMZmvxZsIj+d6CVNa\n"
+    "9ICYgUthsNQVWzrIs5wknpjjZ9liDMwJX0vu8A0rce4X/Lna5hh2bW9igz2iP5WM\n"
+    "9fuwdbTw4y3jfPQgszU4YZxWxhMzccxe058Qx1tLndAknBQEBesQjXytVQpuM1SV\n"
+    "rHva8A==\n"
+    "-----END CERTIFICATE-----\n";
+
+void utc_key_manager_store_startup(void)
+{
+
+//    setuid(APPUSER_ID);
+}
+
+void utc_key_manager_store_cleanup(void)
+{
+}
+
+int utc_ckmc_save_key_p(void)
+{
+    int temp;
+    ckmc_key_s test_key;
+    char* key_password = NULL;
+    ckmc_policy_s test_policy;
+    char* policy_password = NULL;
+    char* alias = "save_key_p";
+
+    test_key.raw_key =  (unsigned char *)RSA_PUB_KEY_PEM;
+    test_key.key_size = strlen(RSA_PUB_KEY_PEM);
+    test_key.key_type = CKMC_KEY_RSA_PUBLIC;
+    test_key.password = key_password;
+
+    test_policy.password = policy_password;
+    test_policy.extractable = true;
+
+    temp = ckmc_save_key(alias, test_key, test_policy);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    ckmc_remove_key(alias);
+    return 0;
+}
+
+int utc_ckmc_save_key_n(void)
+{
+    int temp;
+    ckmc_key_s test_key, correct_test_key;
+    char* key_password = NULL;
+    ckmc_policy_s test_policy;
+    char* policy_password = NULL;
+    char* alias = "save_key_n";
+    char* existed_alias = "save_key_p";
+    char* keyPem = "-----BEGIN PUBLICnzQIDAQAB\n-----END PUBLIC KEY-----";
+    char* null_alias = NULL;
+
+    test_key.raw_key =  (unsigned char *)keyPem;
+    test_key.key_size = strlen(keyPem);
+    test_key.key_type = CKMC_KEY_RSA_PUBLIC;
+    test_key.password = key_password;
+
+    correct_test_key.raw_key =  (unsigned char *)RSA_PUB_KEY_PEM;
+    correct_test_key.key_size = strlen(RSA_PUB_KEY_PEM);
+    correct_test_key.key_type = CKMC_KEY_RSA_PUBLIC;
+    correct_test_key.password = key_password;
+
+    test_policy.password = policy_password;
+    test_policy.extractable = true;
+
+    // check CKMC_ERROR_INVALID_FORMAT
+    temp = ckmc_save_key(alias, test_key, test_policy);
+    assert_eq(temp, CKMC_ERROR_INVALID_FORMAT);
+
+    // check CKMC_ERROR_INVALID_PARAMETER
+    temp = ckmc_save_key(null_alias, correct_test_key, test_policy);
+    assert_eq(temp, CKMC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ckmc_remove_key_p(void)
+{
+    int temp;
+    ckmc_key_s test_key;
+    char* key_password = NULL;
+    ckmc_policy_s test_policy;
+    char* policy_password = NULL;
+    char* alias = "remove_key_p";
+
+    test_key.raw_key =  (unsigned char *)RSA_PUB_KEY_PEM;
+    test_key.key_size = strlen(RSA_PUB_KEY_PEM);
+    test_key.key_type = CKMC_KEY_RSA_PUBLIC;
+    test_key.password = key_password;
+
+    test_policy.password = policy_password;
+    test_policy.extractable = true;
+
+    temp = ckmc_save_key(alias, test_key, test_policy);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    temp = ckmc_remove_key(alias);
+    assert_eq(temp, CKMC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_ckmc_remove_key_n(void)
+{
+    int temp;
+    ckmc_key_s test_key;
+    char* key_password = NULL;
+    ckmc_policy_s test_policy;
+    char* policy_password = NULL;
+    char* alias = "remove_key_n2";
+    char* wrong_alias = "wrong";
+    char* null_alias = NULL;
+
+    test_key.raw_key =  (unsigned char *)RSA_PUB_KEY_PEM;
+    test_key.key_size = strlen(RSA_PUB_KEY_PEM);
+    test_key.key_type = CKMC_KEY_RSA_PUBLIC;
+    test_key.password = key_password;
+
+    test_policy.password = policy_password;
+    test_policy.extractable = true;
+
+    temp = ckmc_save_key(alias, test_key, test_policy);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    // check CKMC_ERROR_DB_ALIAS_UNKNOWN
+    temp = ckmc_remove_key(wrong_alias);
+    assert_eq(temp, CKMC_ERROR_DB_ALIAS_UNKNOWN);
+
+    // check CKMC_ERROR_INVALID_PARAMETER
+    temp = ckmc_remove_key(null_alias);
+    assert_eq(temp, CKMC_ERROR_INVALID_PARAMETER);
+
+    ckmc_remove_key(alias);
+    
+    return 0;
+}
+
+int utc_ckmc_get_key_p(void)
+{
+    int temp;
+    ckmc_key_s test_key, *test_key2;
+    char* key_password = NULL;
+    ckmc_policy_s test_policy, test_policy2;
+    char* policy_password = NULL;
+    char* alias = "get_key_p";
+    char* alias2 = "get_key_p_2";
+
+    test_key.raw_key =  (unsigned char *)RSA_PUB_KEY_PEM;
+    test_key.key_size = strlen(RSA_PUB_KEY_PEM);
+    test_key.key_type = CKMC_KEY_RSA_PUBLIC;
+    test_key.password = key_password;
+
+    test_policy.password = policy_password;
+    test_policy.extractable = true;
+
+    test_policy2.password = policy_password;
+    test_policy2.extractable = false;
+
+    temp = ckmc_save_key(alias, test_key, test_policy);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    temp = ckmc_save_key(alias2, test_key, test_policy2);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    temp = ckmc_get_key(alias, key_password, &test_key2);
+    assert_eq(temp, CKMC_ERROR_NONE);
+
+    ckmc_key_free(test_key2);
+
+    ckmc_remove_key(alias);
+    ckmc_remove_key(alias2);
+
+    return 0;
+}
+
+int utc_ckmc_get_key_n(void)
+{
+    int temp;
+    ckmc_key_s test_key, *test_key2;
+    ckmc_policy_s test_policy;
+    char* key_password = NULL;
+    char* policy_password = NULL;
+    char* wrong_alias = NULL;
+    char* nonKey = "get_key_n2";
+    char* correct_alias = "get_key_p";
+    char* non_extractable_alias = "get_key_p_2";
+
+    // check CKMC_ERROR_INVALID_PARAMETER
+    temp = ckmc_get_key(wrong_alias, key_password, &test_key2);
+    assert_eq(temp, CKMC_ERROR_INVALID_PARAMETER);
+
+    // check CKMC_ERROR_DB_ALIAS_UNKNOWN
+    temp = ckmc_get_key(nonKey, key_password, &test_key2);
+    assert_eq(temp, CKMC_ERROR_DB_ALIAS_UNKNOWN);
+
+    return 0;
+}
+
+int utc_ckmc_get_key_n2(void)
+{
+    int temp;
+    ckmc_key_s test_key, *test_key2;
+    char* key_password = NULL;
+    ckmc_policy_s test_policy;
+    char* policy_password = NULL;
+    char* alias = "get_key_p3";
+
+    test_key.raw_key =  (unsigned char *)RSA_PUB_KEY_PEM;
+    test_key.key_size = strlen(RSA_PUB_KEY_PEM);
+    test_key.key_type = CKMC_KEY_RSA_PUBLIC;
+    test_key.password = key_password;
+
+    test_policy.password = policy_password;
+    test_policy.extractable = false;
+
+    temp = ckmc_save_key(alias, test_key, test_policy);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    temp = ckmc_get_key(alias, key_password, &test_key2);
+    assert_eq(temp, CKMC_ERROR_NOT_EXPORTABLE);
+
+    ckmc_remove_key(alias);
+
+    return 0;
+}
+
+int utc_ckmc_get_key_alias_list_p(void)
+{
+    int temp = CKMC_ERROR_NONE;
+    ckmc_key_s test_key, *test_key2;
+    char* key_password = NULL;
+    ckmc_policy_s test_policy1, test_policy2, test_policy3;
+    char* policy_password = NULL;
+    ckmc_alias_list_s *aliasList = NULL;
+    ckmc_alias_list_s *aliasListOrig = NULL;
+    int cnt1 = 0;
+    int cnt2 = 0;
+    
+    temp = ckmc_get_key_alias_list(&aliasList);
+    assert(temp == CKMC_ERROR_NONE || temp == CKMC_ERROR_DB_ALIAS_UNKNOWN);
+    aliasListOrig = aliasList;
+
+    if (aliasList) {
+        while (aliasList) {
+            aliasList = aliasList->next;
+            cnt1++;
+        }
+
+        ckmc_alias_list_all_free(aliasListOrig);
+    }
+
+    test_key.raw_key =  (unsigned char *)RSA_PUB_KEY_PEM;
+    test_key.key_size = strlen(RSA_PUB_KEY_PEM);
+    test_key.key_type = CKMC_KEY_RSA_PUBLIC;
+    test_key.password = key_password;
+
+    test_policy1.password = policy_password;
+    test_policy1.extractable = true;
+
+    test_policy2.password = policy_password;
+    test_policy2.extractable = false;
+
+    test_policy3.password = policy_password;
+    test_policy3.extractable = false;
+
+    ckmc_save_key("rootkey1", test_key, test_policy1);
+    ckmc_save_key("rootkey2", test_key, test_policy2);
+    ckmc_save_key("rootkey3", test_key, test_policy3);
+
+    temp = ckmc_get_key_alias_list(&aliasList);
+    assert_eq(temp, CKMC_ERROR_NONE);
+    assert_neq(aliasList, NULL);
+
+    aliasListOrig = aliasList;
+
+    while (aliasList) {
+        aliasList = aliasList->next;
+        cnt2++;
+    }
+
+    ckmc_alias_list_all_free(aliasListOrig);
+
+    assert_eq(cnt1 + 3, cnt2);
+
+    ckmc_remove_key("rootkey1");
+    ckmc_remove_key("rootkey2");
+    ckmc_remove_key("rootkey3");
+    
+    return 0;
+}
+
+int utc_ckmc_get_key_alias_list_n(void)
+{
+    int temp;
+    char* wrong_aliasList = NULL;
+    ckmc_alias_list_s *aliasList;
+
+    // check CKMC_ERROR_INVALID_PARAMETER
+    temp = ckmc_get_key_alias_list(wrong_aliasList);
+    assert_eq(temp,CKMC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ckmc_save_cert_p(void)
+{
+    int temp;
+
+    ckmc_cert_s cert;
+    ckmc_policy_s test_policy;
+
+    char* alias = "save_cert_p";
+    char* policy_password = NULL;
+
+    test_policy.password = policy_password;
+    test_policy.extractable = true;
+
+    cert.raw_cert =  (unsigned char *)CERT_PEM;
+    cert.cert_size = strlen(CERT_PEM);
+    cert.data_format = CKMC_FORM_PEM;
+
+    temp = ckmc_save_cert(alias, cert, test_policy);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    ckmc_remove_cert(alias);
+    
+    return 0;
+}
+
+int utc_ckmc_save_cert_n(void)
+{
+    int temp;
+
+    ckmc_cert_s cert;
+    ckmc_policy_s test_policy;
+
+    char alias = NULL;
+    char* policy_password = NULL;
+    char* correct_alias = "save_cert_p";
+    test_policy.password = policy_password;
+    test_policy.extractable = true;
+
+    cert.raw_cert =  (unsigned char *)CERT_PEM;
+    cert.cert_size = strlen(CERT_PEM);
+    cert.data_format = CKMC_FORM_PEM;
+
+    // check CKMC_ERROR_INVALID_PARAMETER
+    temp = ckmc_save_cert(alias, cert, test_policy);
+    assert_eq(temp,CKMC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ckmc_remove_cert_p(void)
+{
+    int temp;
+
+    ckmc_cert_s cert;
+    ckmc_policy_s test_policy;
+
+    char* alias = "remove_cert_p";
+    char* policy_password = NULL;
+
+    test_policy.password = policy_password;
+    test_policy.extractable = true;
+
+    cert.raw_cert =  (unsigned char *)CERT_PEM;
+    cert.cert_size = strlen(CERT_PEM);
+    cert.data_format = CKMC_FORM_PEM;
+
+    temp = ckmc_save_cert(alias, cert, test_policy);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    temp = ckmc_remove_cert(alias);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_ckmc_remove_cert_n(void)
+{
+    int temp;
+    char* wrong_alias = NULL;
+    char* unKnown_alias = "no_cert";
+    char* correct_alias = "remove_cert_p";
+
+    // check CKMC_ERROR_INVALID_PARAMETER
+    temp = ckmc_remove_cert(wrong_alias);
+    assert_eq(temp,CKMC_ERROR_INVALID_PARAMETER);
+
+    // check CKMC_ERROR_DB_ALIAS_UNKNOWN
+    temp = ckmc_remove_cert(unKnown_alias);
+    assert_eq(temp,CKMC_ERROR_DB_ALIAS_UNKNOWN);
+
+    return 0;
+}
+
+int utc_ckmc_get_cert_p(void)
+{
+    int temp;
+
+    ckmc_cert_s cert;
+    ckmc_cert_s *cert2;
+    ckmc_policy_s test_policy;
+
+    char* alias = "get_cert_p";
+    char* alias2 = "get_cert_p_2";
+    char* policy_password = NULL;
+
+    test_policy.password = policy_password;
+    test_policy.extractable = true;
+
+    cert.raw_cert =  (unsigned char *)CERT_PEM;
+    cert.cert_size = strlen(CERT_PEM);
+    cert.data_format = CKMC_FORM_PEM;
+
+    temp = ckmc_save_cert(alias, cert, test_policy);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    temp = ckmc_get_cert(alias,policy_password,&cert2);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    ckmc_remove_cert(alias);
+
+    return 0;
+}
+
+int utc_ckmc_get_cert_n(void)
+{
+    int temp;
+    char* password = NULL;
+    char* wrong_alias = NULL;
+    ckmc_cert_s *cert2;
+
+    temp = ckmc_get_cert(wrong_alias, password, &cert2);
+    assert_eq(temp,CKMC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ckmc_get_cert_n2(void)
+{
+    int temp;
+    char* password = NULL;
+    char* alias = "no_cert_n2";
+    ckmc_cert_s *cert2;
+
+    temp = ckmc_get_cert(alias, password, &cert2);
+    assert_eq(temp,CKMC_ERROR_DB_ALIAS_UNKNOWN);
+
+    return 0;
+}
+
+int utc_ckmc_get_cert_n3(void)
+{
+    int temp;
+
+    ckmc_cert_s cert;
+    ckmc_cert_s *cert2;
+    ckmc_policy_s test_policy;
+
+    char* alias = "get_cert_p_2";
+    char* policy_password = NULL;
+
+    test_policy.password = policy_password;
+    test_policy.extractable = false;
+
+    cert.raw_cert =  (unsigned char *)CERT_PEM;
+    cert.cert_size = strlen(CERT_PEM);
+    cert.data_format = CKMC_FORM_PEM;
+
+    temp = ckmc_save_cert(alias, cert, test_policy);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    temp = ckmc_get_cert(alias,policy_password,&cert2);
+    assert_eq(temp,CKMC_ERROR_NOT_EXPORTABLE);
+
+    ckmc_remove_cert(alias);
+    
+    return 0;
+}
+
+int utc_ckmc_get_cert_alias_list_p(void)
+{
+    int temp = CKMC_ERROR_NONE;
+    ckmc_cert_s cert;
+    ckmc_cert_s *cert2;
+    ckmc_policy_s test_policy;
+
+    char* alias = "get_cert_alias_list_p";
+    char* policy_password = NULL;
+    int cnt1 = 0;
+    int cnt2 = 0;
+    ckmc_alias_list_s *aliasList = NULL;
+    ckmc_alias_list_s *aliasListOrig = NULL;
+    
+    temp = ckmc_get_cert_alias_list(&aliasList);
+    assert(temp == CKMC_ERROR_NONE || temp == CKMC_ERROR_DB_ALIAS_UNKNOWN);
+
+    aliasListOrig = aliasList;
+
+    if (aliasList){
+        while (aliasList) {
+            aliasList = aliasList->next;
+            cnt1++;
+        }
+
+        ckmc_alias_list_all_free(aliasListOrig);
+    }    
+    
+    test_policy.password = policy_password;
+    test_policy.extractable = true;
+
+    cert.raw_cert =  (unsigned char *)CERT_PEM;
+    cert.cert_size = strlen(CERT_PEM);
+    cert.data_format = CKMC_FORM_PEM;
+    ckmc_save_cert("cert_test1", cert, test_policy);
+    ckmc_save_cert("cert_test2", cert, test_policy);
+    ckmc_save_cert("cert_test3", cert, test_policy);
+
+    temp = ckmc_get_cert_alias_list(&aliasList);
+    assert_eq(temp, CKMC_ERROR_NONE);
+    assert_neq(aliasList, NULL);
+
+    aliasListOrig = aliasList;
+    while (aliasList) {
+        aliasList = aliasList->next;
+        cnt2++;
+    }
+    ckmc_alias_list_all_free(aliasListOrig);
+
+    assert_eq(cnt1 + 3, cnt2);
+
+    ckmc_remove_cert("cert_test1");
+    ckmc_remove_cert("cert_test2");
+    ckmc_remove_cert("cert_test3");
+
+    return 0;
+}
+
+int utc_ckmc_get_cert_alias_list_n(void)
+{
+    int temp;
+
+    ckmc_alias_list_s *aliasList = NULL;
+
+    temp = ckmc_get_cert_alias_list(aliasList);
+    assert_eq(temp,CKMC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ckmc_save_data_p(void)
+{
+    int temp;
+    char* policy_password = NULL;
+    char* binData1 = "My bin data";
+    char* alias = "save_data";
+    ckmc_raw_buffer_s testData1;
+    ckmc_policy_s test_policy1;
+
+    testData1.data = (unsigned char *) binData1;
+    testData1.size = strlen(binData1);
+
+    test_policy1.password = policy_password;
+    test_policy1.extractable = true;
+
+    temp = ckmc_save_data(alias, testData1, test_policy1);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    ckmc_remove_data(alias);
+
+    return 0;
+}
+
+int utc_ckmc_save_data_n(void)
+{
+    int temp;
+    char* policy_password = NULL;
+    char* binData1 = "My bin data";
+    char* alias = NULL;
+    ckmc_raw_buffer_s testData1;
+    ckmc_policy_s test_policy1;
+
+    testData1.data = (unsigned char *) binData1;
+    testData1.size = strlen(binData1);
+
+    test_policy1.password = policy_password;
+    test_policy1.extractable = true;
+
+    temp = ckmc_save_data(alias, testData1, test_policy1);
+    assert_eq(temp,CKMC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_ckmc_remove_data_p(void)
+{
+    int temp;
+    char* policy_password = NULL;
+    char* binData1 = "My bin data";
+    char* alias = "remove_data";
+    ckmc_raw_buffer_s testData1, *recvData;
+    ckmc_policy_s test_policy1;
+
+    testData1.data = (unsigned char *) binData1;
+    testData1.size = strlen(binData1);
+
+    test_policy1.password = policy_password;
+    test_policy1.extractable = true;
+
+    temp = ckmc_save_data(alias, testData1, test_policy1);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    temp = ckmc_remove_data(alias);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_ckmc_remove_data_n(void)
+{
+    int temp;
+    char* alias = NULL;
+    char* policy_password = NULL;
+    ckmc_raw_buffer_s testData1, *recvData;
+    ckmc_policy_s test_policy1;
+
+    temp = ckmc_remove_data(alias);
+    assert_eq(temp, CKMC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ckmc_remove_data_n2(void)
+{
+    int temp;
+    char* alias = "no_data";
+    char* policy_password = NULL;
+    ckmc_raw_buffer_s testData1, *recvData;
+
+    temp = ckmc_remove_data(alias);
+    assert_eq(temp,CKMC_ERROR_DB_ALIAS_UNKNOWN);
+
+    return 0;
+}
+
+int utc_ckmc_get_data_p(void)
+{
+    int temp;
+    char* policy_password = NULL;
+    char* binData1 = "My bin data";
+    char* alias = "get_data_p";
+    ckmc_raw_buffer_s testData;
+    ckmc_raw_buffer_s *recvData;
+    ckmc_policy_s test_policy1;
+
+    testData.data = (unsigned char *) binData1;
+    testData.size = strlen(binData1);
+
+    test_policy1.password = policy_password;
+    test_policy1.extractable = true;
+
+    temp = ckmc_save_data(alias, testData, test_policy1);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    temp = ckmc_get_data(alias, policy_password, &recvData);
+    assert_eq(temp,CKMC_ERROR_NONE);
+
+    ckmc_buffer_free(recvData);
+
+    ckmc_remove_data(alias);
+    
+    return 0;
+}
+
+int utc_ckmc_get_data_n(void)
+{
+    int temp;
+    char* policy_password = NULL;
+    char* alias = NULL;
+    ckmc_raw_buffer_s *recvData;
+
+    temp = ckmc_get_data(alias, policy_password, &recvData);
+    assert_eq(temp,CKMC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_ckmc_get_data_n2(void)
+{
+    int temp;
+    char* policy_password = NULL;
+    char* alias = "no_data_n2";
+
+    ckmc_raw_buffer_s *recvData;
+
+    temp = ckmc_get_data(alias, policy_password, &recvData);
+    assert_eq(temp,CKMC_ERROR_DB_ALIAS_UNKNOWN);
+
+    return 0;
+}
+
+int utc_ckmc_get_data_alias_list_p(void)
+{
+    int temp = CKMC_ERROR_NONE;
+    char* policy_password = NULL;
+    char* binData1 = "My bin data";
+    ckmc_raw_buffer_s testData;
+    ckmc_raw_buffer_s *recvData;
+    ckmc_policy_s test_policy1, test_policy2;
+    ckmc_alias_list_s *aliasList = NULL;
+    ckmc_alias_list_s *aliasListOrig = NULL;
+    int cnt1 = 0;
+    int cnt2 = 0;    
+
+    temp = ckmc_get_data_alias_list(&aliasList);
+    assert(temp == CKMC_ERROR_NONE || temp == CKMC_ERROR_DB_ALIAS_UNKNOWN);
+    aliasListOrig = aliasList;
+
+    if (aliasList) {
+        while (aliasList) {
+            aliasList = aliasList->next;
+            cnt1++;
+        }
+        ckmc_alias_list_all_free(aliasListOrig);
+    }
+
+    testData.data = (unsigned char *) binData1;
+    testData.size = strlen(binData1);
+
+    test_policy1.password = policy_password;
+    test_policy1.extractable = true;
+
+    test_policy2.password = policy_password;
+    test_policy2.extractable = true;
+
+    ckmc_save_data("appdata1", testData, test_policy1);
+    ckmc_save_data("appdata2", testData, test_policy1);
+    ckmc_save_data("appdata3", testData, test_policy2);
+
+    temp = ckmc_get_data_alias_list(&aliasList);
+    assert_eq(temp, CKMC_ERROR_NONE);
+    assert_neq(aliasList, NULL);
+
+    aliasListOrig = aliasList;
+    while (aliasList) {
+        aliasList = aliasList->next;
+        cnt2++;
+    }
+
+    ckmc_alias_list_all_free(aliasListOrig);
+
+    assert_eq(cnt1 + 3, cnt2);
+    
+    ckmc_remove_data("appdata1");
+    ckmc_remove_data("appdata2");
+    ckmc_remove_data("appdata3");
+    
+    return 0;
+}
+
+int utc_ckmc_get_data_alias_list_n(void)
+{
+    int temp;
+
+    ckmc_alias_list_s *aliasList = NULL;
+    temp = ckmc_get_data_alias_list(aliasList);
+
+    assert_eq(temp, CKMC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
diff --git a/src/utc/key-manager/utc-key-manager-type.c b/src/utc/key-manager/utc-key-manager-type.c
new file mode 100755 (executable)
index 0000000..3f39b3b
--- /dev/null
@@ -0,0 +1,410 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+
+#include <ckmc/ckmc-manager.h>
+#include <ckmc/ckmc-control.h>
+#include <ckmc/ckmc-type.h>
+#include <ckmc/ckmc-error.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <fts.h>
+#include <storage.h>
+
+//& set: key-manager-type
+static char* file1 = "ckm_test_cert";
+static char* file2 = "ckm_test_cert_2";
+static char* path1 = NULL;
+static char* path2 = 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)
+       {
+        path1 = (char*)malloc(strlen(path) + strlen(file1) + 2);
+               memset(path1,0x00,strlen(path) + strlen(file1) + 2);
+        sprintf(path1, "%s/%s", path, file1);
+        path2 = (char*)malloc(strlen(path) + strlen(file2) + 2);
+               memset(path2,0x00,strlen(path) + strlen(file2) + 2);
+        sprintf(path2, "%s/%s", path, file2);
+        return false;
+    }
+    return true;
+}
+
+
+void utc_key_manager_type_startup(void)
+{
+
+       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       }
+}
+
+void utc_key_manager_type_cleanup(void)
+{
+       if(path1) free(path1);
+       if(path2) free(path2);
+}
+
+
+
+
+int utc_ckmc_load_cert_from_file_p(void)
+{
+       int ret;
+
+       char *certStr =
+               "-----BEGIN CERTIFICATE-----\n"
+               "MIIF0TCCBLmgAwIBAgIQaPGTP4aS7Ut/WDNaBzdQrDANBgkqhkiG9w0BAQUFADCB\n"
+               "ujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL\n"
+               "ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug\n"
+               "YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE0MDIGA1UEAxMr\n"
+               "VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBDQTAeFw0x\n"
+               "NDAyMjAwMDAwMDBaFw0xNTAyMjAyMzU5NTlaMIHmMRMwEQYLKwYBBAGCNzwCAQMT\n"
+               "AlBMMR0wGwYDVQQPExRQcml2YXRlIE9yZ2FuaXphdGlvbjETMBEGA1UEBRMKMDAw\n"
+               "MDAyNTIzNzELMAkGA1UEBhMCUEwxDzANBgNVBBEUBjAwLTk1MDEUMBIGA1UECBML\n"
+               "bWF6b3dpZWNraWUxETAPBgNVBAcUCFdhcnN6YXdhMRYwFAYDVQQJFA1TZW5hdG9y\n"
+               "c2thIDE4MRMwEQYDVQQKFAptQmFuayBTLkEuMQwwCgYDVQQLFANESU4xGTAXBgNV\n"
+               "BAMUEHd3dy5tYmFuay5jb20ucGwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\n"
+               "AoIBAQDph6x8V6xUW/+651+qHF+UmorH9uaz2ZrX2bIWiMKIJFmpDDHlxcapKkqE\n"
+               "BV04is83aiCpqKtc2ZHy2g4Hpj1eSF5BP2+OAlo0YUQZPIeRRdiMjmeAxw/ncBDx\n"
+               "9rQBuCJ4XTD6cqQox5SI0TASOZ+wyAEjbDRXzL73XqRAFZ1LOpb2ONkolS+RutMB\n"
+               "vshvCsWPeNe7eGLuOh6DyC6r1vX9xhw3xnjM2mTSvmtimgzSLacNGKqRrsucUgcb\n"
+               "0+O5C2jZAtAMLyZksL92cxmWbtVzUYzem4chjHu5cRxUlPNzUJWrrczueB7Ip4A8\n"
+               "aQuFMfNXYc0x+WLWjy//urypMKjhAgMBAAGjggGjMIIBnzAbBgNVHREEFDASghB3\n"
+               "d3cubWJhbmsuY29tLnBsMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQDAgWgMB0GA1Ud\n"
+               "JQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBEBgNVHSAEPTA7MDkGC2CGSAGG+EUB\n"
+               "BxcGMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9jcHMw\n"
+               "HQYDVR0OBBYEFN37iGaS7mZnENxZ9FGqNLR+QgoMMB8GA1UdIwQYMBaAFPyKULqe\n"
+               "uSVae1WFT5UAY4/pWGtDMEIGA1UdHwQ7MDkwN6A1oDOGMWh0dHA6Ly9FVlNlY3Vy\n"
+               "ZS1jcmwudmVyaXNpZ24uY29tL0VWU2VjdXJlMjAwNi5jcmwwfAYIKwYBBQUHAQEE\n"
+               "cDBuMC0GCCsGAQUFBzABhiFodHRwOi8vRVZTZWN1cmUtb2NzcC52ZXJpc2lnbi5j\n"
+               "b20wPQYIKwYBBQUHMAKGMWh0dHA6Ly9FVlNlY3VyZS1haWEudmVyaXNpZ24uY29t\n"
+               "L0VWU2VjdXJlMjAwNi5jZXIwDQYJKoZIhvcNAQEFBQADggEBAD0wO+rooUrIM4qp\n"
+               "PHhp+hkXK6WMQ2qzGOmbMcZjw0govg5vkzkefPDryIXXbrF8mRagiJNMSfNaWWeh\n"
+               "Cj41OV24EdUl0OLbFxNzcvub599zRs/apfaRLTfsmlmOgi0/YP305i+3tJ2ll946\n"
+               "P+qV1wXnXqTqEdIl4Ys3+1HmDCdTB1hoDwAAzqRVUXZ5+iiwPAU7R/LTHfMjV1ke\n"
+               "8jtNFfrorlZMCfVH/7eEnHJvVjOJt+YFe4aFMzE+DfuYIK7MH+olC2v79kBwbnEQ\n"
+               "fvHMA9gFwOYLUBBdSfcocp8EKZ+mRlNPGR/3LBrPeaQQ0GZEkxzRK+v/aNTuiYfr\n"
+               "oFXtrg0=\n"
+               "-----END CERTIFICATE-----\n";
+
+       //remove(path1);
+
+       FILE* cert_file = fopen(path1, "w");
+    assert_neq(cert_file, NULL);
+
+       fprintf(cert_file, "%s",certStr);
+       fclose(cert_file);
+    
+       ckmc_cert_s *pcert;
+
+       ret = ckmc_load_cert_from_file(path1, &pcert);
+       assert_eq(ret,CKMC_ERROR_NONE);
+    
+       ckmc_cert_free(pcert);
+       remove(path1);
+       return 0;
+}
+
+int utc_ckmc_load_cert_from_file_n(void)
+{
+       int ret;
+
+       char *certStr =
+               "-----BEGIN CERTIFICATE-----\n"
+               "MIIF0TCCBLmgAwIBAgIQaPGTP4aS7Ut/WDNaBzdQrDANBgkqhkiG9w0BAQUFADCB\n"
+               "ujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL\n"
+               "ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug\n"
+               "YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE0MDIGA1UEAxMr\n"
+               "VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBDQTAeFw0x\n"
+               "NDAyMjAwMDAwMDBaFw0xNTAyMjAyMzU5NTlaMIHmMRMwEQYLKwYBBAGCNzwCAQMT\n"
+               "AlBMMR0wGwYDVQQPExRQcml2YXRlIE9yZ2FuaXphdGlvbjETMBEGA1UEBRMKMDAw\n"
+               "MDAyNTIzNzELMAkGA1UEBhMCUEwxDzANBgNVBBEUBjAwLTk1MDEUMBIGA1UECBML\n"
+               "bWF6b3dpZWNraWUxETAPBgNVBAcUCFdhcnN6YXdhMRYwFAYDVQQJFA1TZW5hdG9y\n"
+               "c2thIDE4MRMwEQYDVQQKFAptQmFuayBTLkEuMQwwCgYDVQQLFANESU4xGTAXBgNV\n"
+               "BAMUEHd3dy5tYmFuay5jb20ucGwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\n"
+               "AoIBAQDph6x8V6xUW/+651+qHF+UmorH9uaz2ZrX2bIWiMKIJFmpDDHlxcapKkqE\n"
+               "BV04is83aiCpqKtc2ZHy2g4Hpj1eSF5BP2+OAlo0YUQZPIeRRdiMjmeAxw/ncBDx\n"
+               "9rQBuCJ4XTD6cqQox5SI0TASOZ+wyAEjbDRXzL73XqRAFZ1LOpb2ONkolS+RutMB\n"
+               "vshvCsWPeNe7e"
+               "PHhp+hkXK6WMQ2qzGOmbMcZjw0govg5vkzkefPDryIXXbrF8mRagiJNMSfNaWWeh\n"
+               "Cj41OV24EdUl0OLbFxNzcvub599zRs/apfaRLTfsmlmOgi0/YP305i+3tJ2ll946\n"
+               "P+qV1wXnXqTqEdIl4Ys3+1HmDCdTB1hoDwAAzqRVUXZ5+iiwPAU7R/LTHfMjV1ke\n"
+               "8jtNFfrorlZMCfVH/7eEnHJvVjOJt+YFe4aFMzE+DfuYIK7MH+olC2v79kBwbnEQ\n"
+               "fvHMA9gFwOYLUBBdSfcocp8EKZ+mRlNPGR/3LBrPeaQQ0GZEkxzRK+v/aNTuiYfr\n"
+               "oFXtrg0=\n"
+               "-----END CERTIFICATE-----\n";
+
+       //remove(path2);
+
+       FILE* cert_file = fopen(path2, "w");
+    assert_neq(cert_file, NULL);
+
+       fprintf(cert_file, "%s",certStr);
+       fclose(cert_file);
+
+       ckmc_cert_s *pcert;
+
+       ret = ckmc_load_cert_from_file(path2, &pcert);
+       assert_eq(ret,CKMC_ERROR_INVALID_FORMAT);
+
+       remove(path2);
+
+       return 0;
+}
+
+int utc_ckmc_load_from_pkcs12_file_p(void)
+{
+       char *p12Base64 =
+               "MIINaQIBAzCCDS8GCSqGSIb3DQEHAaCCDSAEgg0cMIINGDCCChcGCSqGSIb3DQEH\n"
+               "BqCCCggwggoEAgEAMIIJ/QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIvO01\n"
+               "D2ODdkYCAggAgIIJ0NscvWq3hmXai5DQcleOgELPbu2c97d+KJnRGCK7K3eRb0/v\n"
+               "4F3f3LFSFFT9OAK0/OS1ZYCiO+IuZ6Rpc8Baqe89xVcOHrQ0dQ7sIvbq10dnp5nY\n"
+               "fEcrt7qPXcRa3IdOX4PFo4aCOFq5bHv5M3quHldKRh4itosjsAGuF/xtnVnO6lU5\n"
+               "UlPhtAdr2Mpr4SHh+oBbJknLvyd6n/4xZ2elEA8ui4Qt5GfiHwWs2J7KO3Z8M1vW\n"
+               "yukuyVTaZ6RNkj8dkq/RttvVinlgATYLoosjCsH7VVcd+/z9JqD37QQ89pzdjvJg\n"
+               "CtXFVbqsOIbjPMkQMYtMdaPsLDDzw6l+q7BJreGIoJmTHbhTtNOJo03XPEnlVXUq\n"
+               "Q+224ibNKzLAvpSWOo8BUHK7ZDc1oaLODDZ+WAA6jfgHkuhhWYr9dxce6UdhMghJ\n"
+               "M7ixWwa350psdACREdGxNQzxmucmueprbDumVPAnnJfnKfgRXdKpTDFWS4TaYRc/\n"
+               "TE4lKSBZpFFduy/gdpLGCHdklTs33aWZ/mEVZJnk2PggKyvSKH9oL3DxkZIFkGdQ\n"
+               "wcy8gAuLBirdWB/q4JWqW7sH8kMfEwXACEm1z4SzCik8afamQNJEbovA3Pvrhw/P\n"
+               "1HE5KPNvKMaIr9kk5rTnGGTSNrSMqUCnBl4MjVS4HacrZvvt60y0D3RFB8IqlFMt\n"
+               "od2FagxojPyO/wP8jDERnySo2Irz0x0WUjWARtcLLH2FOK7ROkX1/WjRZmDV0jtv\n"
+               "yL8r97XZf/NddVU13Jt13dBJCjxZRvfJZgNI8RybkPQ3Y9J5LIOLVFPU3ZKIi7W7\n"
+               "KtCw/FCUfEdNarLQMWG0Z9bux7vu/eK1+KpF9pfzD3Q1V0sj2M158Q5W2gy9q/u0\n"
+               "gOOuybiZB2AL9kxBv0rqb8h7SF5ZIRoy85PrwtnX7w4Xq+4I7RA68bcEGyqgTWWb\n"
+               "XZxcY65F2slqekXddKeDSTizQk/APgWva/TwgaUeXR9YBCO4o71pla//FNqJ6pRm\n"
+               "tZjEY9ALBCc083gsImc7+LAeubEcYzjhhgRPQwGJfJTMqgC/NOa9wFhvNO4QcFjf\n"
+               "XQxxIFxlQJ64qU316FyeuyxLYGd02uakrLLgYtAGG7nPZCYNkUKvCwICKJYI+wAg\n"
+               "CX0FVwXsR1f33kVuV6sd4YConz80Lk9ayvNJVeCzEOBvhthbMcP3mIn22X+GT3jU\n"
+               "O5Z0bkXAU0C8XTfLQMk2m6Ag3mctrn4iJBPwQ7j12GnlSLko+e7IssRd4Qj4vBZd\n"
+               "KXUIoRcOsXqWoQgXJAtdLJEHVo0SUyxVojXsXqUZ3yYOkVUykvXZUcBnS6xwtaUt\n"
+               "EzdFsEO3NQSLOju5Tpp12lKbrgIToV75zyA3CULEdimEUWD/wA+pDaIS39shNyeE\n"
+               "edtAp3WF3mDkHQFyKG52IVx7hJU8jXXunvY21tshTAx/Gda0X1CtgSU7Q00ROr+L\n"
+               "TaehRiKsSgxQa6/jyJY5KY1hIDzwaem5Y7gDnxotmQuPhIX8MeD5Qdv6AVovfScN\n"
+               "07QuWyUBgFsZzbp79AsnPRLzoiAMQljMn7TXDDLq+uF922OU47BQkzlPfKAuHbyu\n"
+               "R+uZwtDfMD71FqWjCAHMPyENinsnUehCwX2pVxa6KSs61IsTfb3oUPY1TRxfZnfd\n"
+               "8SAUfPjKVss9Eyahuv+kzenPUDZn5LV9E0G0DGNxIf493A5Z29scNkQcCBjTJJvx\n"
+               "4BBJCES6SgkTQl7eFoBGOIqqytpYP9QZW5jy7ramgz/gF2kMKjAfikhbd5vB4Fwd\n"
+               "QlExMlbW+wL/ffr4AGlwenlDzXBFKQM0mYZNKLuB9LrRzw35fVFZ9XY06VCxhbMa\n"
+               "wI9gN4rKA3bNG3DCWTsr1TZ6CvrqFJjlfK4KF/+eNfnkIY8uVYxnPlRRkmPw4dpE\n"
+               "KdaXUiu5WJvZupeYqqNsWdxs+v2KS1E/PcM9BgUFKFD4lW84WbWUHPxvxXoZhSCs\n"
+               "nQ0hsPd53NKBBdEOao5HAAf+T5yFnJzZ3rVkYBEC67gHyWgXB1Zy283yAIihvUXw\n"
+               "DOEVppNHnIqAjQpncQcDpV0/zYCvqOEfU+JPpmepgo737Tq2MlUKLTByhg1mQhKm\n"
+               "2pI63BFiw2/2igImFbmhzJjilWkaM4kwM1uGKOKgjacXI/VSVEajuYAfo37quBxF\n"
+               "ZWyWJoFXBvQ7jolTKXUVbCqnSSaItosZrS3vcDdGUegRm0rf6IzCRPdSIsfCDdZG\n"
+               "9UeChoznNezoLENgmqQJTV3wDo3uSZbztlctoERvZpn457MLZEn8hXEwMLPXx2Ur\n"
+               "HQ5fYAdTBzBpoLiy8ujzFxFJDzW9ytnb7aFF7YVivfj42eVGnCANvVcwkp2/E3MW\n"
+               "Img0OyqKRQHaGGI7iGNO5KYpTk0CdSyErQarH52ZRvr0t2CK6J6vDgrhJnzd5Ayr\n"
+               "6t+coAZBw8eIJqiM5WzAm4mlZRSHL+JcaKkrqoYOo+kewj7wgW2Kk/7S8re38RvP\n"
+               "+V9nqpfr18gIV72G2yZ60C21eRqOFPgl1CYbmWHqYKXatuT4o+kgBmJpez5uvIHz\n"
+               "LSd88An02ow+WQ+KP8YGV38ZtuA6D4FPA3fsMdhNOqjtwWiPei+ILaXD5PsOfDGH\n"
+               "2fZgOWXivFYqq9Cm3B3ffFX/oD/7sFMs+/AWeZOh8XqU8ro73L1HNRXx4HdyRUY/\n"
+               "pInwA0mWaFNGgBRPbNW0A6cZ2dY0Hn8sRRsF+5tIs0hOelpT1y/ZEVyGImTQgEbK\n"
+               "KeggQGT9h9rhrrUK+hE27MorcRi6tVteKlNyGQsCJko0ZoqqctM4o7wT5ce4nWtb\n"
+               "ixzp5xDkDmcP6eldHiVm8TsZn0hkmNDu0xpgIVtb4VDRmWP687EOaGHYhjOBw6X1\n"
+               "GD1d1yyg/VxlUr0lKmbsFVC2mDiWbnWd49+FGsrySc2RO8DlC9xkXLaG+ubjmLpK\n"
+               "lwagiI2P1MzkHuZiz7WlIjFefuYh0yrYvDA5UDiQTDdoZWFuR5r93QWdsUcHlvdF\n"
+               "rYmhQ93F6I4gaT9HSVEDJfisIjIUmIwhh20tdGnf3FC5VyqBYS5GQObq3VnC8stU\n"
+               "b7byCEMlKr5bWslEem6gRGTB9xektKgrsFgS7nb3Geegq9K+mWIBC/iBOInVqFYx\n"
+               "Uw8+s6ywApXPLPEIrVZumkwo7Rl8lJfCTDNni/68XHhhVHY70N0PSdfnCAvV9G41\n"
+               "3wuTZHqLOeQG3Sm8I1JJXkWSuuk0QI7DVKZpmz+x4aFBd+rncfvWOEbN9G0ZqbUT\n"
+               "lGkfxtUWY6pWX/XJpyBzOlv2+fCPi/Yd0csb45IEuFHNG1svgqGMJw5BmFu5v0Qs\n"
+               "0i1zKBrNA/Acd6+uL0UqDZStB6lyPn6+uifh3sMwggL5BgkqhkiG9w0BBwGgggLq\n"
+               "BIIC5jCCAuIwggLeBgsqhkiG9w0BDAoBAqCCAqYwggKiMBwGCiqGSIb3DQEMAQMw\n"
+               "DgQIBJuBj07uHGACAggABIICgJBfOlC99JJjEUBibYLXIJPe53Cy7eDXCtVaPbhX\n"
+               "VHPCsBrUd7+6Ul7Vh/JHMlJL1VA3WvGnX93f0p5FICgZZA3sIZjpxBoeVkZ0Zx6r\n"
+               "ZMnBPIN4GaHYufCGPyAlPXgEGjlBr3g6Sxr8j50vsWtfspwiILsyte+nQ3kE1nV4\n"
+               "TjNBnayXmCMnEkf4kKu+dlLFbd1OY/fQJbiT+f9YtMfcfp2IR+7bXb23UIv8Wt1I\n"
+               "XyqsYTcUjIvnByKSDrvVu941x1EN5DF1964qQbAZb/z5ueTl8tCpaCFlGbZcXz7X\n"
+               "7L3k0YWdymx1J+szd6heQJrzqMjcHK3XWC7YlDytWB59j0eNMx42XEFP0pAO+gt9\n"
+               "Iny2XL+sxJC/xzf6apYMmmGwEXrZkkudsSVMgLCtYyin4zM7PFzLAPK9ryEhsxaP\n"
+               "g077MJ/aIaZ7PLi7cABz/g+gQ1dSXakNOof6EjRUADHpav9UKeKwWdR8ycB/8AQV\n"
+               "XxQTpEsFJ7izdNZDNC/ZeOhc/ohnei169rfH0shVeeckjf++c8zlh/Y5UWIi3V6i\n"
+               "5c7RlIJLMtHrvpB5UxRpZgWSdXvCuTCBEzlZAeWJ11I4DAeioqJ1V3h2KcUjNKf1\n"
+               "z8mTJrzAycuhm8npaC0Gj6JU7jiYPZLvj+cK/e/gjadWggHFYsjAKhACDbAtG64N\n"
+               "Gu9PWJszvhSO8ga7TOVEzdbe2jm4oWtqPe3gb6eYl2Ma6GTfj/PUEDpNAOnr99qV\n"
+               "g3uKIXMBp2115bfUf5sbfPdMbnH12XILXR9Va+JjeQHexa64QWlsiRgtXEAXxoEb\n"
+               "D2aTlfdsJpgilyj31Y45xOdN7FI+Ltfhudxt1kABPdmKwRMxJTAjBgkqhkiG9w0B\n"
+               "CRUxFgQUMvxYuPi3XpEeXbzAkXaNbAw7P5gwMTAhMAkGBSsOAwIaBQAEFOBC4ppE\n"
+               "AXO+xdzSBKimvjBBTLbEBAjlaWiC5IVtmAICCAA=\n";
+
+       // write file
+
+       const char *password = "password";
+
+       //remove(path1);
+       //remove(path2);
+
+       int cmd_len = 1024;
+
+       FILE *b64_file = fopen(path1, "w");
+    assert_neq(b64_file, NULL);
+
+       fprintf(b64_file, "%s",p12Base64);
+       fclose(b64_file);
+
+       char cmd[cmd_len];
+
+       memset(cmd, 0, cmd_len);
+
+    snprintf(cmd, cmd_len, "openssl base64 -d -in %s -out %s", path1, path2);
+
+       system(cmd);
+
+       int temp;
+
+       ckmc_key_s *private_key = NULL;
+       ckmc_cert_s *cert = NULL;
+       ckmc_cert_list_s *ca_cert_list = NULL;
+
+       temp = ckmc_load_from_pkcs12_file(path2, password, &private_key, &cert, &ca_cert_list);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       assert_neq(private_key, NULL);
+       assert_neq(cert, NULL);
+       assert_neq(ca_cert_list, NULL);
+
+       ckmc_policy_s policy;
+       policy.password = NULL;
+       policy.extractable = 1;
+
+       const char *pkey_alias = "pkey_alias_p";
+       temp = ckmc_save_key(pkey_alias, *private_key, policy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       const char *cert_alias = "cert_alias_p";
+       temp = ckmc_save_cert(cert_alias, *cert, policy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       ckmc_cert_list_s *tmpList = ca_cert_list;
+       const char *ca_cert_alias_0 = "ca_cert_alias_0_p";
+       temp = ckmc_save_cert(ca_cert_alias_0, *(tmpList->cert), policy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+       tmpList = tmpList->next;
+       const char *ca_cert_alias_1 = "ca_cert_alias_1_p";
+       temp = ckmc_save_cert(ca_cert_alias_1, *(tmpList->cert), policy);
+       assert_eq(temp,CKMC_ERROR_NONE);
+
+    ckmc_remove_key(pkey_alias);
+    ckmc_remove_cert(cert_alias);
+    ckmc_remove_cert(ca_cert_alias_0);
+    ckmc_remove_cert(ca_cert_alias_1);
+    
+       ckmc_key_free(private_key);
+       ckmc_cert_free(cert);
+       ckmc_cert_list_all_free(ca_cert_list);
+
+       remove(path1);
+       remove(path2);
+
+       return 0;
+}
+
+int utc_ckmc_load_from_pkcs12_file_n(void)
+{
+       char *p12Base64 =
+               "MIINaQIBAzCCDS8GCSqGSIb3DQEHAaCCDSAEgg0cMIINGDCCChcGCSqGSIb3DQEH\n"
+               "BqCCCggwggoEAgEAMIIJ/QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIvO01\n"
+               "D2ODdkYCAggAgIIJ0NscvWq3hmXai5DQcleOgELPbu2c97d+KJnRGCK7K3eRb0/v\n"
+               "4F3f3LFSFFT9OAK0/OS1ZYCiO+IuZ6Rpc8Baqe89xVcOHrQ0dQ7sIvbq10dnp5nY\n"
+               "fEcrt7qPXcRa3IdOX4PFo4aCOFq5bHv5M3quHldKRh4itosjsAGuF/xtnVnO6lU5\n"
+               "UlPhtAdr2Mpr4SHh+oBbJknLvyd6n/4xZ2elEA8ui4Qt5GfiHwWs2J7KO3Z8M1vW\n"
+               "yukuyVTaZ6RNkj8dkq/RttvVinlgATYLoosjCsH7VVcd+/z9JqD37QQ89pzdjvJg\n"
+               "CtXFVbqsOIbjPMkQMYtMda+eNfnkIY8uVYxnPlRRkmPw4dpE\n"
+               "KdaXUiu5WJvZupeYqqNsWdxs+v2KS1E/PcM9BgUFKFD4lW84WbWUHPxvxXoZhSCs\n"
+               "nQ0hsPd53NKBBdEOao5HAAf+T5yFnJzZ3rVkYBEC67gHyWgXB1Zy283yAIihvUXw\n"
+               "DOEVppNHnIqAjQpncQcDpV0/zYCvqOEfU+JPpmepgo737Tq2MlUKLTByhg1mQhKm\n"
+               "2pI63BFiw2/2igImFbmhzJjilWkaM4kwM1uGKOKgjacXI/VSVEajuYAfo37quBxF\n"
+               "ZWyWJoFXBvQ7jolTKXUVbCqnSSaItosZrS3vcDdGUegRm0rf6IzCRPdSIsfCDdZG\n"
+               "9UeChoznNezoLENgmqQJTV3wDo3uSZbztlctoERvZpn457MLZEn8hXEwMLPXx2Ur\n"
+               "HQ5fYAdTBzBpoLiy8ujzFxFJDzW9ytnb7aFF7YVivfj42eVGnCANvVcwkp2/E3MW\n"
+               "Img0OyqKRQHaGGI7iGNO5KYpTk0CdSyErQarH52ZRvr0t2CK6J6vDgrhJnzd5Ayr\n"
+               "6t+coAZBw8eIJqiM5WzAm4mlZRSHL+JcaKkrqoYOo+kewj7wgW2Kk/7S8re38RvP\n"
+               "+V9nqpfr18gIV72G2yZ60C21eRqOFPgl1CYbmWHqYKXatuT4o+kgBmJpez5uvIHz\n"
+               "LSd88An02ow+WQ+KP8YGV38ZtuA6D4FPA3fsMdhNOqjtwWiPei+ILaXD5PsOfDGH\n"
+               "2fZgOWXivFYqq9Cm3B3ffFX/oD/7sFMs+/AWeZOh8XqU8ro73L1HNRXx4HdyRUY/\n"
+               "pInwA0mWaFNGgBRPbNW0A6cZ2dY0Hn8sRRsF+5tIs0hOelpT1y/ZEVyGImTQgEbK\n"
+               "KeggQGT9h9rhrrUK+hE27MorcRi6tVteKlNyGQsCJko0ZoqqctM4o7wT5ce4nWtb\n"
+               "ixzp5xDkDmcP6eldHiVm8TsZn0hkmNDu0xpgIVtb4VDRmWP687EOaGHYhjOBw6X1\n"
+               "GD1d1yyg/VxlUr0lKmbsFVC2mDiWbnWd49+FGsrySc2RO8DlC9xkXLaG+ubjmLpK\n"
+               "lwagiI2P1MzkHuZiz7WlIjFefuYh0yrYvDA5UDiQTDdoZWFuR5r93QWdsUcHlvdF\n"
+               "rYmhQ93F6I4gaT9HSVEDJfisIjIUmIwhh20tdGnf3FC5VyqBYS5GQObq3VnC8stU\n"
+               "b7byCEMlKr5bWslEem6gRGTB9xektKgrsFgS7nb3Geegq9K+mWIBC/iBOInVqFYx\n"
+               "Uw8+s6ywApXPLPEIrVZumkwo7Rl8lJfCTDNni/68XHhhVHY70N0PSdfnCAvV9G41\n"
+               "3wuTZHqLOeQG3Sm8I1JJXkWSuuk0QI7DVKZpmz+x4aFBd+rncfvWOEbN9G0ZqbUT\n"
+               "lGkfxtUWY6pWX/XJpyBzOlv2+fCPi/Yd0csb45IEuFHNG1svgqGMJw5BmFu5v0Qs\n"
+               "0i1zKBrNA/Acd6+uL0UqDZStB6lyPn6+uifh3sMwggL5BgkqhkiG9w0BBwGgggLq\n"
+               "BIIC5jCCAuIwggLeBgsqhkiG9w0BDAoBAqCCAqYwggKiMBwGCiqGSIb3DQEMAQMw\n"
+               "DgQIBJuBj07uHGACAggABIICgJBfOlC99JJjEUBibYLXIJPe53Cy7eDXCtVaPbhX\n"
+               "VHPCsBrUd7+6Ul7Vh/JHMlJL1VA3WvGnX93f0p5FICgZZA3sIZjpxBoeVkZ0Zx6r\n"
+               "ZMnBPIN4GaHYufCGPyAlPXgEGjlBr3g6Sxr8j50vsWtfspwiILsyte+nQ3kE1nV4\n"
+               "TjNBnayXmCMnEkf4kKu+dlLFbd1OY/fQJbiT+f9YtMfcfp2IR+7bXb23UIv8Wt1I\n"
+               "XyqsYTcUjIvnByKSDrvVu941x1EN5DF1964qQbAZb/z5ueTl8tCpaCFlGbZcXz7X\n"
+               "7L3k0YWdymx1J+szd6heQJrzqMjcHK3XWC7YlDytWB59j0eNMx42XEFP0pAO+gt9\n"
+               "Iny2XL+sxJC/xzf6apYMmmGwEXrZkkudsSVMgLCtYyin4zM7PFzLAPK9ryEhsxaP\n"
+               "g077MJ/aIaZ7PLi7cABz/g+gQ1dSXakNOof6EjRUADHpav9UKeKwWdR8ycB/8AQV\n"
+               "XxQTpEsFJ7izdNZDNC/ZeOhc/ohnei169rfH0shVeeckjf++c8zlh/Y5UWIi3V6i\n"
+               "5c7RlIJLMtHrvpB5UxRpZgWSdXvCuTCBEzlZAeWJ11I4DAeioqJ1V3h2KcUjNKf1\n"
+               "z8mTJrzAycuhm8npaC0Gj6JU7jiYPZLvj+cK/e/gjadWggHFYsjAKhACDbAtG64N\n"
+               "Gu9PWJszvhSO8ga7TOVEzdbe2jm4oWtqPe3gb6eYl2Ma6GTfj/PUEDpNAOnr99qV\n"
+               "g3uKIXMBp2115bfUf5sbfPdMbnH12XILXR9Va+JjeQHexa64QWlsiRgtXEAXxoEb\n"
+               "D2aTlfdsJpgilyj31Y45xOdN7FI+Ltfhudxt1kABPdmKwRMxJTAjBgkqhkiG9w0B\n"
+               "CRUxFgQUMvxYuPi3XpEeXbzAkXaNbAw7P5gwMTAhMAkGBSsOAwIaBQAEFOBC4ppE\n"
+               "AXO+xdzSBKimvjBBTLbEBAjlaWiC5IVtmAICCAA=\n";
+
+       // write file
+       const char *password = "password";
+
+       remove(path1);
+       remove(path2);
+
+       int cmd_len = 1024;
+
+       FILE *b64_file = fopen(path1, "w");
+    assert_neq(b64_file, NULL);
+
+       fprintf(b64_file, "%s",p12Base64);
+       fclose(b64_file);
+
+       char cmd[cmd_len];
+
+       memset(cmd, 0, cmd_len);
+
+    snprintf(cmd, cmd_len, "openssl base64 -d -in %s -out %s", path1, path2);
+
+       system(cmd);
+
+       int temp;
+
+       ckmc_key_s *private_key = NULL;
+       ckmc_cert_s *cert = NULL;
+       ckmc_cert_list_s *ca_cert_list = NULL;
+
+       temp = ckmc_load_from_pkcs12_file(path2, password, &private_key, &cert, &ca_cert_list);
+       assert_eq(temp,CKMC_ERROR_INVALID_FORMAT);
+
+       return 0;
+}
+
diff --git a/src/utc/libstorage/CMakeLists.txt b/src/utc/libstorage/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..bd5e7eb
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "libstorage")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "storage")
+SET(TC_SOURCES
+       utc-system-storage.c
+       utc-system-storage-expand.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-base-common
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/libstorage/public.list b/src/utc/libstorage/public.list
new file mode 100755 (executable)
index 0000000..a37a8dc
--- /dev/null
@@ -0,0 +1,14 @@
+storage_foreach_device_supported
+storage_get_available_space
+storage_get_directory
+storage_get_external_memory_size
+storage_get_external_memory_size64
+storage_get_internal_memory_size
+storage_get_internal_memory_size64
+storage_get_root_directory
+storage_get_state
+storage_get_total_space
+storage_get_type
+storage_set_state_changed_cb
+storage_unset_state_changed_cb
+
diff --git a/src/utc/libstorage/tct-libstorage-core.c b/src/utc/libstorage/tct-libstorage-core.c
new file mode 100755 (executable)
index 0000000..7c98381
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-libstorage-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/libstorage/tct-libstorage-core.h b/src/utc/libstorage/tct-libstorage-core.h
new file mode 100755 (executable)
index 0000000..20ab4b0
--- /dev/null
@@ -0,0 +1,90 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_LIBSTORAGE_CORE_H__
+#define __TCT_LIBSTORAGE_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_storage_startup(void);
+
+extern int utc_system_storage_get_internal_memory_size_p(void);
+extern int utc_system_storage_get_internal_memory_size_n(void);
+extern int utc_system_storage_get_external_memory_size_p(void);
+extern int utc_system_storage_get_external_memory_size_n(void);
+extern int utc_storage_foreach_device_supported_p(void);
+extern int utc_storage_foreach_device_supported_n(void);
+extern int utc_storage_get_root_directory_p(void);
+extern int utc_storage_get_root_directory_n_1(void);
+extern int utc_storage_get_root_directory_n_2(void);
+extern int utc_storage_get_directory_p(void);
+extern int utc_storage_get_directory_n_1(void);
+extern int utc_storage_get_directory_n_2(void);
+extern int utc_storage_get_directory_n_3(void);
+extern int utc_storage_get_type_p(void);
+extern int utc_storage_get_type_n_1(void);
+extern int utc_storage_get_type_n_2(void);
+extern int utc_storage_get_state_p(void);
+extern int utc_storage_get_state_n_1(void);
+extern int utc_storage_get_state_n_2(void);
+extern int utc_storage_get_total_space_p(void);
+extern int utc_storage_get_total_space_n_1(void);
+extern int utc_storage_get_total_space_n_2(void);
+extern int utc_storage_get_available_space_p(void);
+extern int utc_storage_get_available_space_n_1(void);
+extern int utc_storage_get_available_space_n_2(void);
+extern int utc_storage_set_state_changed_cb_p(void);
+extern int utc_storage_set_state_changed_cb_n_1(void);
+extern int utc_storage_set_state_changed_cb_n_2(void);
+extern int utc_storage_unset_state_changed_cb_p(void);
+extern int utc_storage_unset_state_changed_cb_n_1(void);
+extern int utc_storage_unset_state_changed_cb_n_2(void);
+
+testcase tc_array[] = {
+    {"utc_system_storage_get_internal_memory_size_p", utc_system_storage_get_internal_memory_size_p, NULL, NULL},
+    {"utc_system_storage_get_internal_memory_size_n", utc_system_storage_get_internal_memory_size_n, NULL, NULL},
+    {"utc_system_storage_get_external_memory_size_p", utc_system_storage_get_external_memory_size_p, NULL, NULL},
+    {"utc_system_storage_get_external_memory_size_n", utc_system_storage_get_external_memory_size_n, NULL, NULL},
+    {"utc_storage_foreach_device_supported_p", utc_storage_foreach_device_supported_p, utc_storage_startup, NULL},
+    {"utc_storage_foreach_device_supported_n", utc_storage_foreach_device_supported_n, utc_storage_startup, NULL},
+    {"utc_storage_get_root_directory_p", utc_storage_get_root_directory_p, utc_storage_startup, NULL},
+    {"utc_storage_get_root_directory_n_1", utc_storage_get_root_directory_n_1, utc_storage_startup, NULL},
+    {"utc_storage_get_root_directory_n_2", utc_storage_get_root_directory_n_2, utc_storage_startup, NULL},
+    {"utc_storage_get_directory_p", utc_storage_get_directory_p, utc_storage_startup, NULL},
+    {"utc_storage_get_directory_n_1", utc_storage_get_directory_n_1, utc_storage_startup, NULL},
+    {"utc_storage_get_directory_n_2", utc_storage_get_directory_n_2, utc_storage_startup, NULL},
+    {"utc_storage_get_directory_n_3", utc_storage_get_directory_n_3, utc_storage_startup, NULL},
+    {"utc_storage_get_type_p", utc_storage_get_type_p, utc_storage_startup, NULL},
+    {"utc_storage_get_type_n_1", utc_storage_get_type_n_1, utc_storage_startup, NULL},
+    {"utc_storage_get_type_n_2", utc_storage_get_type_n_2, utc_storage_startup, NULL},
+    {"utc_storage_get_state_p", utc_storage_get_state_p, utc_storage_startup, NULL},
+    {"utc_storage_get_state_n_1", utc_storage_get_state_n_1, utc_storage_startup, NULL},
+    {"utc_storage_get_state_n_2", utc_storage_get_state_n_2, utc_storage_startup, NULL},
+    {"utc_storage_get_total_space_p", utc_storage_get_total_space_p, utc_storage_startup, NULL},
+    {"utc_storage_get_total_space_n_1", utc_storage_get_total_space_n_1, utc_storage_startup, NULL},
+    {"utc_storage_get_total_space_n_2", utc_storage_get_total_space_n_2, utc_storage_startup, NULL},
+    {"utc_storage_get_available_space_p", utc_storage_get_available_space_p, utc_storage_startup, NULL},
+    {"utc_storage_get_available_space_n_1", utc_storage_get_available_space_n_1, utc_storage_startup, NULL},
+    {"utc_storage_get_available_space_n_2", utc_storage_get_available_space_n_2, utc_storage_startup, NULL},
+    {"utc_storage_set_state_changed_cb_p", utc_storage_set_state_changed_cb_p, utc_storage_startup, NULL},
+    {"utc_storage_set_state_changed_cb_n_1", utc_storage_set_state_changed_cb_n_1, utc_storage_startup, NULL},
+    {"utc_storage_set_state_changed_cb_n_2", utc_storage_set_state_changed_cb_n_2, utc_storage_startup, NULL},
+    {"utc_storage_unset_state_changed_cb_p", utc_storage_unset_state_changed_cb_p, utc_storage_startup, NULL},
+    {"utc_storage_unset_state_changed_cb_n_1", utc_storage_unset_state_changed_cb_n_1, utc_storage_startup, NULL},
+    {"utc_storage_unset_state_changed_cb_n_2", utc_storage_unset_state_changed_cb_n_2, utc_storage_startup, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_LIBSTORAGE_CORE_H__
diff --git a/src/utc/libstorage/utc-system-storage-expand.c b/src/utc/libstorage/utc-system-storage-expand.c
new file mode 100755 (executable)
index 0000000..1126ec4
--- /dev/null
@@ -0,0 +1,311 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <storage.h>
+
+//& set: StorageExpand
+
+static int internal_storage_id;
+
+static bool get_internal_storage(int storage_id, storage_type_e type,
+               storage_state_e state, const char *path, void *user_data)
+{
+       if (type == STORAGE_TYPE_INTERNAL) {
+               internal_storage_id = storage_id;
+               return false;
+       }
+
+       return true;
+}
+
+void utc_storage_startup(void)
+{
+       /* find internal storage */
+       storage_foreach_device_supported(get_internal_storage, NULL);
+}
+
+static bool get_storage_device(int storage, storage_type_e type, storage_state_e state,
+                       const char *path, void *user_data)
+{
+       return true;
+}
+
+int utc_storage_foreach_device_supported_p(void)
+{
+       int err;
+
+       err = storage_foreach_device_supported(get_storage_device, NULL);
+       assert_eq(err, STORAGE_ERROR_NONE);
+       return 0;
+}
+
+int utc_storage_foreach_device_supported_n(void)
+{
+       int err;
+
+       err = storage_foreach_device_supported(NULL, NULL);
+       assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_storage_get_root_directory_p(void)
+{
+       char *path;
+       int err;
+
+       err = storage_get_root_directory(internal_storage_id, &path);
+       free(path);
+    assert_eq(err, STORAGE_ERROR_NONE);
+       return 0;
+}
+
+int utc_storage_get_root_directory_n_1(void)
+{
+       char *path;
+       int err;
+
+       err = storage_get_root_directory(-1, &path);
+       assert_eq(err, STORAGE_ERROR_NOT_SUPPORTED);
+       return 0;
+}
+
+int utc_storage_get_root_directory_n_2(void)
+{
+       int err;
+
+       err = storage_get_root_directory(internal_storage_id, NULL);
+       assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_storage_get_directory_p(void)
+{
+       char *path;
+       int i, err;
+
+       for (i = 0; i < STORAGE_DIRECTORY_MAX; ++i) {
+               err = storage_get_directory(internal_storage_id, i, &path);
+               assert_eq(err, STORAGE_ERROR_NONE);
+               free(path);
+       }
+       return 0;
+}
+
+int utc_storage_get_directory_n_1(void)
+{
+       char *path;
+       int err;
+
+       err = storage_get_directory(-1, STORAGE_DIRECTORY_IMAGES, &path);
+       assert_eq(err, STORAGE_ERROR_NOT_SUPPORTED);
+       return 0;
+}
+
+int utc_storage_get_directory_n_2(void)
+{
+       char *path;
+       int err;
+
+       err = storage_get_directory(internal_storage_id, -1, &path);
+       assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_storage_get_directory_n_3(void)
+{
+       int err;
+
+       err = storage_get_directory(internal_storage_id, STORAGE_DIRECTORY_IMAGES, NULL);
+       assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_storage_get_type_p(void)
+{
+       storage_type_e type;
+       int err;
+
+       err = storage_get_type(internal_storage_id, &type);
+    assert_eq(err, STORAGE_ERROR_NONE);
+    assert_eq(type, STORAGE_TYPE_INTERNAL);
+       return 0;
+}
+
+int utc_storage_get_type_n_1(void)
+{
+       storage_type_e type;
+       int err;
+
+       err = storage_get_type(-1, &type);
+       assert_eq(err, STORAGE_ERROR_NOT_SUPPORTED);
+       return 0;
+}
+
+int utc_storage_get_type_n_2(void)
+{
+       int err;
+
+       err = storage_get_type(internal_storage_id, NULL);
+       assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_storage_get_state_p(void)
+{
+       storage_state_e state;
+       int err;
+
+       err = storage_get_state(internal_storage_id, &state);
+    assert_eq(err, STORAGE_ERROR_NONE);
+    assert_eq(state, STORAGE_STATE_MOUNTED);
+       return 0;
+}
+
+int utc_storage_get_state_n_1(void)
+{
+       storage_state_e state;
+       int err;
+
+       err = storage_get_state(-1, &state);
+       assert_eq(err, STORAGE_ERROR_NOT_SUPPORTED);
+       return 0;
+}
+
+int utc_storage_get_state_n_2(void)
+{
+       int err;
+
+       err = storage_get_state(internal_storage_id, NULL);
+       assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_storage_get_total_space_p(void)
+{
+       unsigned long long size;
+       int err;
+
+       err = storage_get_total_space(internal_storage_id, &size);
+       assert_eq(err, STORAGE_ERROR_NONE);
+       return 0;
+}
+
+int utc_storage_get_total_space_n_1(void)
+{
+       unsigned long long size;
+       int err;
+
+       err = storage_get_total_space(-1, &size);
+       assert_eq(err, STORAGE_ERROR_NOT_SUPPORTED);
+       return 0;
+}
+
+int utc_storage_get_total_space_n_2(void)
+{
+       int err;
+       err = storage_get_total_space(internal_storage_id, NULL);
+
+       assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_storage_get_available_space_p(void)
+{
+       unsigned long long size;
+       int err;
+
+       err = storage_get_available_space(internal_storage_id, &size);
+       assert_eq(err, STORAGE_ERROR_NONE);
+       return 0;
+}
+
+int utc_storage_get_available_space_n_1(void)
+{
+       unsigned long long size;
+       int err;
+
+       err = storage_get_available_space(-1, &size);
+       assert_eq(err, STORAGE_ERROR_NOT_SUPPORTED);
+       return 0;
+}
+
+int utc_storage_get_available_space_n_2(void)
+{
+       int err;
+
+       err = storage_get_available_space(internal_storage_id, NULL);
+       assert_eq(err,STORAGE_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+static void dts_storage_state_changed_cb(int storage, storage_state_e state, void *user_data)
+{
+}
+
+int utc_storage_set_state_changed_cb_p(void)
+{
+       int err;
+
+       err = storage_set_state_changed_cb(internal_storage_id, dts_storage_state_changed_cb, NULL);
+       assert_eq(err, STORAGE_ERROR_NONE);
+       return 0;
+}
+
+int utc_storage_set_state_changed_cb_n_1(void)
+{
+       int err;
+
+       err = storage_set_state_changed_cb(-1, dts_storage_state_changed_cb, NULL);
+       assert_eq(err, STORAGE_ERROR_NOT_SUPPORTED);
+       return 0;
+}
+
+int utc_storage_set_state_changed_cb_n_2(void)
+{
+       int err;
+
+       err = storage_set_state_changed_cb(internal_storage_id, NULL, NULL);
+       assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_storage_unset_state_changed_cb_p(void)
+{
+       int err;
+
+       storage_set_state_changed_cb(internal_storage_id, dts_storage_state_changed_cb, NULL);
+       err = storage_unset_state_changed_cb(internal_storage_id, dts_storage_state_changed_cb);
+       assert_eq(err, STORAGE_ERROR_NONE);
+       return 0;
+}
+
+int utc_storage_unset_state_changed_cb_n_1(void)
+{
+       int err;
+
+       err = storage_unset_state_changed_cb(-1, dts_storage_state_changed_cb);
+    assert_eq(err, STORAGE_ERROR_NOT_SUPPORTED);
+       return 0;
+}
+
+int utc_storage_unset_state_changed_cb_n_2(void)
+{
+       int err;
+
+       err = storage_unset_state_changed_cb(internal_storage_id, NULL);
+    assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+       return 0;
+}
diff --git a/src/utc/libstorage/utc-system-storage.c b/src/utc/libstorage/utc-system-storage.c
new file mode 100755 (executable)
index 0000000..1cdc92b
--- /dev/null
@@ -0,0 +1,59 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <storage.h>
+#include "assert.h"
+
+/**
+ * @brief Positive test case of storage_get_internal_memory_size()
+ */
+int utc_system_storage_get_internal_memory_size_p(void)
+{
+    struct statvfs s;
+    int ret = storage_get_internal_memory_size(&s);
+    assert_eq(ret, 0);
+    return 0;
+}
+
+/**
+ * @brief Negative test case of storage_get_internal_memory_size()
+ */
+int utc_system_storage_get_internal_memory_size_n(void)
+{
+    int ret = storage_get_internal_memory_size(NULL);
+    assert_lt(ret, 0);
+    return 0;
+}
+
+/**
+ * @brief Positive test case of storage_get_external_memory_size()
+ */
+int utc_system_storage_get_external_memory_size_p(void)
+{
+    struct statvfs s;
+    int ret = storage_get_external_memory_size(&s);
+    assert_eq(ret, 0);
+    return 0;
+}
+
+/**
+ * @brief Negative test case of storage_get_external_memory_size()
+ */
+int utc_system_storage_get_external_memory_size_n(void)
+{
+    int ret = storage_get_external_memory_size(NULL);
+    assert_lt(ret, 0);
+    return 0;
+}
diff --git a/src/utc/location-manager/CMakeLists.txt b/src/utc/location-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..3624de0
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "location-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-location-manager")
+SET(TC_SOURCES
+       utc-location-manager.c
+       utc-location-manager-cb.c
+       utc-location-gps-status.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-system-info
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/location-manager/public.list b/src/utc/location-manager/public.list
new file mode 100755 (executable)
index 0000000..e33f09a
--- /dev/null
@@ -0,0 +1,50 @@
+gps_status_foreach_last_satellites_in_view
+gps_status_foreach_satellites_in_view
+gps_status_get_last_satellite
+gps_status_get_satellite
+gps_status_set_satellite_updated_cb
+gps_status_unset_satellite_updated_cb
+location_bounds_contains_coordinates
+location_bounds_create_circle
+location_bounds_create_polygon
+location_bounds_create_rect
+location_bounds_destroy
+location_bounds_foreach_polygon_coords
+location_bounds_get_circle_coords
+location_bounds_get_rect_coords
+location_bounds_get_type
+location_bounds_set_state_changed_cb
+location_bounds_unset_state_changed_cb
+location_manager_add_boundary
+location_manager_create
+location_manager_destroy
+location_manager_enable_method
+location_manager_foreach_boundary
+location_manager_get_accessibility_state
+location_manager_get_accuracy
+location_manager_get_distance
+location_manager_get_last_accuracy
+location_manager_get_last_location
+location_manager_get_last_position
+location_manager_get_last_velocity
+location_manager_get_location
+location_manager_get_method
+location_manager_get_position
+location_manager_get_velocity
+location_manager_is_enabled_method
+location_manager_is_supported_method
+location_manager_remove_boundary
+location_manager_request_single_location
+location_manager_set_position_updated_cb
+location_manager_set_service_state_changed_cb
+location_manager_set_setting_changed_cb
+location_manager_set_velocity_updated_cb
+location_manager_set_zone_changed_cb
+location_manager_start
+location_manager_stop
+location_manager_unset_position_updated_cb
+location_manager_unset_service_state_changed_cb
+location_manager_unset_setting_changed_cb
+location_manager_unset_velocity_updated_cb
+location_manager_unset_zone_changed_cb
+
diff --git a/src/utc/location-manager/tct-location-manager-core.c b/src/utc/location-manager/tct-location-manager-core.c
new file mode 100755 (executable)
index 0000000..5b438a6
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-location-manager-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/location-manager/tct-location-manager-core.h b/src/utc/location-manager/tct-location-manager-core.h
new file mode 100755 (executable)
index 0000000..cbd6057
--- /dev/null
@@ -0,0 +1,403 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_LOCATION_MANAGER_CORE_H__
+#define __TCT_LOCATION_MANAGER_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_location_manager_startup(void);
+extern void utc_location_manager_cleanup(void);
+extern void utc_location_manager_cb_startup(void);
+extern void utc_location_manager_cb_cleanup(void);
+extern void utc_location_gps_status_startup(void);
+extern void utc_location_gps_status_cleanup(void);
+
+extern int utc_location_manager_create_p1(void);
+extern int utc_location_manager_create_p2(void);
+extern int utc_location_manager_create_p3(void);
+extern int utc_location_manager_create_n1(void);
+extern int utc_location_manager_create_n2(void);
+extern int utc_location_manager_create_n3(void);
+extern int utc_location_manager_create_n4(void);
+extern int utc_location_manager_create_n5(void);
+extern int utc_location_manager_create_n6(void);
+extern int utc_location_manager_add_boundary_p(void);
+extern int utc_location_manager_add_boundary_n1(void);
+extern int utc_location_manager_add_boundary_n2(void);
+extern int utc_location_manager_add_boundary_n3(void);
+extern int utc_location_manager_foreach_boundary_p(void);
+extern int utc_location_manager_foreach_boundary_n1(void);
+extern int utc_location_manager_foreach_boundary_n2(void);
+extern int utc_location_manager_foreach_boundary_n3(void);
+extern int utc_location_manager_remove_boundary_p(void);
+extern int utc_location_manager_remove_boundary_n(void);
+extern int utc_location_manager_remove_boundary_n2(void);
+extern int utc_location_manager_remove_boundary_n3(void);
+extern int utc_location_manager_get_method_p(void);
+extern int utc_location_manager_get_method_n1(void);
+extern int utc_location_manager_get_method_n2(void);
+extern int utc_location_manager_get_method_n3(void);
+extern int utc_location_manager_get_position_p(void);
+extern int utc_location_manager_get_position_n1(void);
+extern int utc_location_manager_get_position_n2(void);
+extern int utc_location_manager_get_position_n3(void);
+extern int utc_location_manager_get_position_n4(void);
+extern int utc_location_manager_get_position_n5(void);
+extern int utc_location_manager_get_velocity_p(void);
+extern int utc_location_manager_get_velocity_n1(void);
+extern int utc_location_manager_get_velocity_n2(void);
+extern int utc_location_manager_get_velocity_n3(void);
+extern int utc_location_manager_get_velocity_n4(void);
+extern int utc_location_manager_get_velocity_n5(void);
+extern int utc_location_manager_get_accuracy_p(void);
+extern int utc_location_manager_get_accuracy_n1(void);
+extern int utc_location_manager_get_accuracy_n2(void);
+extern int utc_location_manager_get_accuracy_n3(void);
+extern int utc_location_manager_get_accuracy_n4(void);
+extern int utc_location_manager_get_accuracy_n5(void);
+extern int utc_location_bounds_foreach_polygon_coords_p(void);
+extern int utc_location_bounds_foreach_polygon_coords_n1(void);
+extern int utc_location_bounds_foreach_polygon_coords_n2(void);
+extern int utc_location_bounds_get_circle_coords_p(void);
+extern int utc_location_bounds_get_circle_coords_n1(void);
+extern int utc_location_bounds_get_circle_coords_n2(void);
+extern int utc_location_bounds_get_circle_coords_n3(void);
+extern int utc_location_bounds_get_rect_coords_p(void);
+extern int utc_location_bounds_get_rect_coords_n1(void);
+extern int utc_location_bounds_get_rect_coords_n2(void);
+extern int utc_location_bounds_get_rect_coords_n3(void);
+extern int utc_location_bounds_get_type_p(void);
+extern int utc_location_bounds_get_type_n(void);
+extern int utc_location_bounds_contains_coordinates_p1(void);
+extern int utc_location_bounds_contains_coordinates_p2(void);
+extern int utc_location_bounds_contains_coordinates_n1(void);
+extern int utc_location_bounds_contains_coordinates_n2(void);
+extern int utc_location_manager_get_last_accuracy_p(void);
+extern int utc_location_manager_get_last_accuracy_n1(void);
+extern int utc_location_manager_get_last_accuracy_n2(void);
+extern int utc_location_manager_get_last_accuracy_n3(void);
+extern int utc_location_manager_get_last_accuracy_n4(void);
+extern int utc_location_manager_get_accessibility_state_p(void);
+extern int utc_location_manager_get_accessibility_state_n(void);
+extern int utc_location_manager_get_last_location_p(void);
+extern int utc_location_manager_get_last_location_n(void);
+extern int utc_location_manager_get_location_p(void);
+extern int utc_location_manager_get_location_n(void);
+extern int utc_location_manager_get_last_position_p(void);
+extern int utc_location_manager_get_last_position_n1(void);
+extern int utc_location_manager_get_last_position_n2(void);
+extern int utc_location_manager_get_last_position_n3(void);
+extern int utc_location_manager_get_last_position_n4(void);
+extern int utc_location_manager_get_last_position_n5(void);
+extern int utc_location_manager_get_last_velocity_p(void);
+extern int utc_location_manager_get_last_velocity_n1(void);
+extern int utc_location_manager_get_last_velocity_n2(void);
+extern int utc_location_manager_get_last_velocity_n3(void);
+extern int utc_location_manager_get_last_velocity_n4(void);
+extern int utc_location_manager_get_last_velocity_n5(void);
+extern int utc_location_manager_is_supported_method_p1(void);
+extern int utc_location_manager_is_supported_method_p2(void);
+extern int utc_location_manager_is_supported_method_p3(void);
+extern int utc_location_manager_is_supported_method_n1(void);
+extern int utc_location_manager_is_supported_method_n2(void);
+extern int utc_location_manager_destroy_p(void);
+extern int utc_location_manager_destroy_n(void);
+extern int utc_location_manager_get_distance_p(void);
+extern int utc_location_manager_get_distance_n1(void);
+extern int utc_location_manager_get_distance_n2(void);
+extern int utc_location_manager_get_distance_n3(void);
+extern int utc_location_manager_get_distance_n4(void);
+extern int utc_location_manager_get_distance_n5(void);
+extern int utc_location_bounds_create_rect_p(void);
+extern int utc_location_bounds_create_rect_n1(void);
+extern int utc_location_bounds_create_rect_n2(void);
+extern int utc_location_bounds_create_rect_n3(void);
+extern int utc_location_bounds_create_circle_p(void);
+extern int utc_location_bounds_create_circle_n1(void);
+extern int utc_location_bounds_create_circle_n2(void);
+extern int utc_location_bounds_create_circle_n3(void);
+extern int utc_location_bounds_create_polygon_p(void);
+extern int utc_location_bounds_create_polygon_n1(void);
+extern int utc_location_bounds_create_polygon_n2(void);
+extern int utc_location_bounds_create_polygon_n3(void);
+extern int utc_location_bounds_set_state_changed_cb_p1(void);
+extern int utc_location_bounds_set_state_changed_cb_p2(void);
+extern int utc_location_bounds_set_state_changed_cb_n1(void);
+extern int utc_location_bounds_set_state_changed_cb_n2(void);
+extern int utc_location_bounds_unset_state_changed_cb_p(void);
+extern int utc_location_bounds_unset_state_changed_cb_n(void);
+extern int utc_location_bounds_destroy_p(void);
+extern int utc_location_bounds_destroy_n(void);
+extern int utc_location_manager_enable_method_p(void);
+extern int utc_location_manager_enable_method_n(void);
+extern int utc_location_manager_is_enabled_method_p1(void);
+extern int utc_location_manager_is_enabled_method_p2(void);
+extern int utc_location_manager_is_enabled_method_p3(void);
+extern int utc_location_manager_is_enabled_method_p4(void);
+extern int utc_location_manager_is_enabled_method_p5(void);
+extern int utc_location_manager_is_enabled_method_n(void);
+extern int utc_location_manager_request_single_location_p(void);
+extern int utc_location_manager_request_single_location_p2(void);
+extern int utc_location_manager_request_single_location_n1(void);
+extern int utc_location_manager_request_single_location_n2(void);
+extern int utc_location_manager_start_p(void);
+extern int utc_location_manager_start_n(void);
+extern int utc_location_manager_set_position_updated_cb_p(void);
+extern int utc_location_manager_set_position_updated_cb_n1(void);
+extern int utc_location_manager_set_position_updated_cb_n2(void);
+extern int utc_location_manager_set_position_updated_cb_n3(void);
+extern int utc_location_manager_set_position_updated_cb_n4(void);
+extern int utc_location_manager_unset_position_updated_cb_p(void);
+extern int utc_location_manager_unset_position_updated_cb_n(void);
+extern int utc_location_manager_set_velocity_updated_cb_p(void);
+extern int utc_location_manager_set_velocity_updated_cb_n1(void);
+extern int utc_location_manager_set_velocity_updated_cb_n2(void);
+extern int utc_location_manager_unset_velocity_updated_cb_p(void);
+extern int utc_location_manager_unset_velocity_updated_cb_n(void);
+extern int utc_location_manager_set_service_state_changed_cb_p(void);
+extern int utc_location_manager_set_service_state_changed_cb_n1(void);
+extern int utc_location_manager_set_service_state_changed_cb_n2(void);
+extern int utc_location_manager_unset_service_state_changed_cb_p(void);
+extern int utc_location_manager_unset_service_state_changed_cb_n(void);
+extern int utc_location_manager_set_zone_changed_cb_p(void);
+extern int utc_location_manager_set_zone_changed_cb_n1(void);
+extern int utc_location_manager_set_zone_changed_cb_n2(void);
+extern int utc_location_manager_unset_zone_changed_cb_p(void);
+extern int utc_location_manager_unset_zone_changed_cb_n(void);
+extern int utc_location_manager_set_setting_changed_cb_p1(void);
+extern int utc_location_manager_set_setting_changed_cb_p2(void);
+extern int utc_location_manager_set_setting_changed_cb_p3(void);
+extern int utc_location_manager_set_setting_changed_cb_p4(void);
+extern int utc_location_manager_set_setting_changed_cb_n(void);
+extern int utc_location_manager_unset_setting_changed_cb_p(void);
+extern int utc_location_manager_unset_setting_changed_cb_n(void);
+extern int utc_location_manager_stop_p(void);
+extern int utc_location_manager_stop_n(void);
+extern int utc_location_gps_status_get_nmea_p(void);
+extern int utc_location_gps_status_get_nmea_n1(void);
+extern int utc_location_gps_status_get_nmea_n2(void);
+extern int utc_location_gps_status_get_satellite_p(void);
+extern int utc_location_gps_status_set_satellite_updated_cb_p(void);
+extern int utc_location_gps_status_set_satellite_updated_cb_n(void);
+extern int utc_location_gps_status_unset_satellite_updated_cb_p(void);
+extern int utc_location_gps_status_unset_satellite_updated_cb_n(void);
+extern int utc_location_gps_status_get_satellite_n1(void);
+extern int utc_location_gps_status_get_satellite_n2(void);
+extern int utc_location_gps_status_get_satellite_n3(void);
+extern int utc_location_gps_status_get_satellite_n4(void);
+extern int utc_location_gps_status_get_satellite_n5(void);
+extern int utc_location_gps_status_foreach_satellites_in_view_p(void);
+extern int utc_location_gps_status_foreach_satellites_in_view_n1(void);
+extern int utc_location_gps_status_foreach_satellites_in_view_n2(void);
+extern int utc_location_gps_status_foreach_last_satellites_in_view_p(void);
+extern int utc_location_gps_status_foreach_last_satellites_in_view_n1(void);
+extern int utc_location_gps_status_foreach_last_satellites_in_view_n2(void);
+extern int utc_location_gps_status_get_last_satellite_p(void);
+extern int utc_location_gps_status_get_last_satellite_n1(void);
+extern int utc_location_gps_status_get_last_satellite_n2(void);
+extern int utc_location_gps_status_get_last_satellite_n3(void);
+extern int utc_location_gps_status_get_last_satellite_n4(void);
+
+testcase tc_array[] = {
+    {"utc_location_manager_create_p1", utc_location_manager_create_p1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_create_p2", utc_location_manager_create_p2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_create_p3", utc_location_manager_create_p3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_create_n1", utc_location_manager_create_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_create_n2", utc_location_manager_create_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_create_n3", utc_location_manager_create_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_create_n4", utc_location_manager_create_n4, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_create_n5", utc_location_manager_create_n5, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_create_n6", utc_location_manager_create_n6, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_add_boundary_p", utc_location_manager_add_boundary_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_add_boundary_n1", utc_location_manager_add_boundary_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_add_boundary_n2", utc_location_manager_add_boundary_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_add_boundary_n3", utc_location_manager_add_boundary_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_foreach_boundary_p", utc_location_manager_foreach_boundary_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_foreach_boundary_n1", utc_location_manager_foreach_boundary_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_foreach_boundary_n2", utc_location_manager_foreach_boundary_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_foreach_boundary_n3", utc_location_manager_foreach_boundary_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_remove_boundary_p", utc_location_manager_remove_boundary_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_remove_boundary_n", utc_location_manager_remove_boundary_n, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_remove_boundary_n2", utc_location_manager_remove_boundary_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_remove_boundary_n3", utc_location_manager_remove_boundary_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_method_p", utc_location_manager_get_method_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_method_n1", utc_location_manager_get_method_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_method_n2", utc_location_manager_get_method_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_method_n3", utc_location_manager_get_method_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_position_p", utc_location_manager_get_position_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_position_n1", utc_location_manager_get_position_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_position_n2", utc_location_manager_get_position_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_position_n3", utc_location_manager_get_position_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_position_n4", utc_location_manager_get_position_n4, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_position_n5", utc_location_manager_get_position_n5, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_velocity_p", utc_location_manager_get_velocity_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_velocity_n1", utc_location_manager_get_velocity_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_velocity_n2", utc_location_manager_get_velocity_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_velocity_n3", utc_location_manager_get_velocity_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_velocity_n4", utc_location_manager_get_velocity_n4, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_velocity_n5", utc_location_manager_get_velocity_n5, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_accuracy_p", utc_location_manager_get_accuracy_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_accuracy_n1", utc_location_manager_get_accuracy_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_accuracy_n2", utc_location_manager_get_accuracy_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_accuracy_n3", utc_location_manager_get_accuracy_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_accuracy_n4", utc_location_manager_get_accuracy_n4, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_accuracy_n5", utc_location_manager_get_accuracy_n5, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_foreach_polygon_coords_p", utc_location_bounds_foreach_polygon_coords_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_foreach_polygon_coords_n1", utc_location_bounds_foreach_polygon_coords_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_foreach_polygon_coords_n2", utc_location_bounds_foreach_polygon_coords_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_get_circle_coords_p", utc_location_bounds_get_circle_coords_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_get_circle_coords_n1", utc_location_bounds_get_circle_coords_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_get_circle_coords_n2", utc_location_bounds_get_circle_coords_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_get_circle_coords_n3", utc_location_bounds_get_circle_coords_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_get_rect_coords_p", utc_location_bounds_get_rect_coords_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_get_rect_coords_n1", utc_location_bounds_get_rect_coords_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_get_rect_coords_n2", utc_location_bounds_get_rect_coords_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_get_rect_coords_n3", utc_location_bounds_get_rect_coords_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_get_type_p", utc_location_bounds_get_type_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_get_type_n", utc_location_bounds_get_type_n, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_contains_coordinates_p1", utc_location_bounds_contains_coordinates_p1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_contains_coordinates_p2", utc_location_bounds_contains_coordinates_p2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_contains_coordinates_n1", utc_location_bounds_contains_coordinates_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_contains_coordinates_n2", utc_location_bounds_contains_coordinates_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_accuracy_p", utc_location_manager_get_last_accuracy_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_accuracy_n1", utc_location_manager_get_last_accuracy_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_accuracy_n2", utc_location_manager_get_last_accuracy_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_accuracy_n3", utc_location_manager_get_last_accuracy_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_accuracy_n4", utc_location_manager_get_last_accuracy_n4, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_accessibility_state_p", utc_location_manager_get_accessibility_state_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_accessibility_state_n", utc_location_manager_get_accessibility_state_n, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_location_p", utc_location_manager_get_last_location_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_location_n", utc_location_manager_get_last_location_n, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_location_p", utc_location_manager_get_location_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_location_n", utc_location_manager_get_location_n, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_position_p", utc_location_manager_get_last_position_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_position_n1", utc_location_manager_get_last_position_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_position_n2", utc_location_manager_get_last_position_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_position_n3", utc_location_manager_get_last_position_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_position_n4", utc_location_manager_get_last_position_n4, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_position_n5", utc_location_manager_get_last_position_n5, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_velocity_p", utc_location_manager_get_last_velocity_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_velocity_n1", utc_location_manager_get_last_velocity_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_velocity_n2", utc_location_manager_get_last_velocity_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_velocity_n3", utc_location_manager_get_last_velocity_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_velocity_n4", utc_location_manager_get_last_velocity_n4, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_last_velocity_n5", utc_location_manager_get_last_velocity_n5, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_is_supported_method_p1", utc_location_manager_is_supported_method_p1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_is_supported_method_p2", utc_location_manager_is_supported_method_p2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_is_supported_method_p3", utc_location_manager_is_supported_method_p3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_is_supported_method_n1", utc_location_manager_is_supported_method_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_is_supported_method_n2", utc_location_manager_is_supported_method_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_destroy_p", utc_location_manager_destroy_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_destroy_n", utc_location_manager_destroy_n, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_distance_p", utc_location_manager_get_distance_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_distance_n1", utc_location_manager_get_distance_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_distance_n2", utc_location_manager_get_distance_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_distance_n3", utc_location_manager_get_distance_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_distance_n4", utc_location_manager_get_distance_n4, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_get_distance_n5", utc_location_manager_get_distance_n5, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_rect_p", utc_location_bounds_create_rect_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_rect_n1", utc_location_bounds_create_rect_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_rect_n2", utc_location_bounds_create_rect_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_rect_n3", utc_location_bounds_create_rect_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_circle_p", utc_location_bounds_create_circle_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_circle_n1", utc_location_bounds_create_circle_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_circle_n2", utc_location_bounds_create_circle_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_circle_n3", utc_location_bounds_create_circle_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_polygon_p", utc_location_bounds_create_polygon_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_polygon_n1", utc_location_bounds_create_polygon_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_polygon_n2", utc_location_bounds_create_polygon_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_create_polygon_n3", utc_location_bounds_create_polygon_n3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_set_state_changed_cb_p1", utc_location_bounds_set_state_changed_cb_p1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_set_state_changed_cb_p2", utc_location_bounds_set_state_changed_cb_p2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_set_state_changed_cb_n1", utc_location_bounds_set_state_changed_cb_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_set_state_changed_cb_n2", utc_location_bounds_set_state_changed_cb_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_unset_state_changed_cb_p", utc_location_bounds_unset_state_changed_cb_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_unset_state_changed_cb_n", utc_location_bounds_unset_state_changed_cb_n, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_destroy_p", utc_location_bounds_destroy_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_bounds_destroy_n", utc_location_bounds_destroy_n, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_enable_method_p", utc_location_manager_enable_method_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_enable_method_n", utc_location_manager_enable_method_n, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_is_enabled_method_p1", utc_location_manager_is_enabled_method_p1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_is_enabled_method_p2", utc_location_manager_is_enabled_method_p2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_is_enabled_method_p3", utc_location_manager_is_enabled_method_p3, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_is_enabled_method_p4", utc_location_manager_is_enabled_method_p4, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_is_enabled_method_p5", utc_location_manager_is_enabled_method_p5, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_is_enabled_method_n", utc_location_manager_is_enabled_method_n, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_request_single_location_p", utc_location_manager_request_single_location_p, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_request_single_location_p2", utc_location_manager_request_single_location_p2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_request_single_location_n1", utc_location_manager_request_single_location_n1, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_request_single_location_n2", utc_location_manager_request_single_location_n2, utc_location_manager_startup, utc_location_manager_cleanup},
+    {"utc_location_manager_start_p", utc_location_manager_start_p, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_start_n", utc_location_manager_start_n, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_position_updated_cb_p", utc_location_manager_set_position_updated_cb_p, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_position_updated_cb_n1", utc_location_manager_set_position_updated_cb_n1, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_position_updated_cb_n2", utc_location_manager_set_position_updated_cb_n2, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_position_updated_cb_n3", utc_location_manager_set_position_updated_cb_n3, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_position_updated_cb_n4", utc_location_manager_set_position_updated_cb_n4, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_unset_position_updated_cb_p", utc_location_manager_unset_position_updated_cb_p, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_unset_position_updated_cb_n", utc_location_manager_unset_position_updated_cb_n, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_velocity_updated_cb_p", utc_location_manager_set_velocity_updated_cb_p, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_velocity_updated_cb_n1", utc_location_manager_set_velocity_updated_cb_n1, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_velocity_updated_cb_n2", utc_location_manager_set_velocity_updated_cb_n2, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_unset_velocity_updated_cb_p", utc_location_manager_unset_velocity_updated_cb_p, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_unset_velocity_updated_cb_n", utc_location_manager_unset_velocity_updated_cb_n, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_service_state_changed_cb_p", utc_location_manager_set_service_state_changed_cb_p, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_service_state_changed_cb_n1", utc_location_manager_set_service_state_changed_cb_n1, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_service_state_changed_cb_n2", utc_location_manager_set_service_state_changed_cb_n2, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_unset_service_state_changed_cb_p", utc_location_manager_unset_service_state_changed_cb_p, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_unset_service_state_changed_cb_n", utc_location_manager_unset_service_state_changed_cb_n, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_zone_changed_cb_p", utc_location_manager_set_zone_changed_cb_p, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_zone_changed_cb_n1", utc_location_manager_set_zone_changed_cb_n1, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_zone_changed_cb_n2", utc_location_manager_set_zone_changed_cb_n2, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_unset_zone_changed_cb_p", utc_location_manager_unset_zone_changed_cb_p, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_unset_zone_changed_cb_n", utc_location_manager_unset_zone_changed_cb_n, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_setting_changed_cb_p1", utc_location_manager_set_setting_changed_cb_p1, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_setting_changed_cb_p2", utc_location_manager_set_setting_changed_cb_p2, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_setting_changed_cb_p3", utc_location_manager_set_setting_changed_cb_p3, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_setting_changed_cb_p4", utc_location_manager_set_setting_changed_cb_p4, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_set_setting_changed_cb_n", utc_location_manager_set_setting_changed_cb_n, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_unset_setting_changed_cb_p", utc_location_manager_unset_setting_changed_cb_p, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_unset_setting_changed_cb_n", utc_location_manager_unset_setting_changed_cb_n, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_stop_p", utc_location_manager_stop_p, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_manager_stop_n", utc_location_manager_stop_n, utc_location_manager_cb_startup, utc_location_manager_cb_cleanup},
+    {"utc_location_gps_status_get_nmea_p", utc_location_gps_status_get_nmea_p, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_nmea_n1", utc_location_gps_status_get_nmea_n1, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_nmea_n2", utc_location_gps_status_get_nmea_n2, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_satellite_p", utc_location_gps_status_get_satellite_p, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_set_satellite_updated_cb_p", utc_location_gps_status_set_satellite_updated_cb_p, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_set_satellite_updated_cb_n", utc_location_gps_status_set_satellite_updated_cb_n, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_unset_satellite_updated_cb_p", utc_location_gps_status_unset_satellite_updated_cb_p, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_unset_satellite_updated_cb_n", utc_location_gps_status_unset_satellite_updated_cb_n, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_satellite_n1", utc_location_gps_status_get_satellite_n1, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_satellite_n2", utc_location_gps_status_get_satellite_n2, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_satellite_n3", utc_location_gps_status_get_satellite_n3, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_satellite_n4", utc_location_gps_status_get_satellite_n4, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_satellite_n5", utc_location_gps_status_get_satellite_n5, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_foreach_satellites_in_view_p", utc_location_gps_status_foreach_satellites_in_view_p, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_foreach_satellites_in_view_n1", utc_location_gps_status_foreach_satellites_in_view_n1, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_foreach_satellites_in_view_n2", utc_location_gps_status_foreach_satellites_in_view_n2, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_foreach_last_satellites_in_view_p", utc_location_gps_status_foreach_last_satellites_in_view_p, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_foreach_last_satellites_in_view_n1", utc_location_gps_status_foreach_last_satellites_in_view_n1, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_foreach_last_satellites_in_view_n2", utc_location_gps_status_foreach_last_satellites_in_view_n2, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_last_satellite_p", utc_location_gps_status_get_last_satellite_p, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_last_satellite_n1", utc_location_gps_status_get_last_satellite_n1, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_last_satellite_n2", utc_location_gps_status_get_last_satellite_n2, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_last_satellite_n3", utc_location_gps_status_get_last_satellite_n3, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {"utc_location_gps_status_get_last_satellite_n4", utc_location_gps_status_get_last_satellite_n4, utc_location_gps_status_startup, utc_location_gps_status_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_LOCATION_MANAGER_CORE_H__
diff --git a/src/utc/location-manager/utc-location-gps-status.c b/src/utc/location-manager/utc-location-gps-status.c
new file mode 100755 (executable)
index 0000000..122ebde
--- /dev/null
@@ -0,0 +1,611 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <locations.h>
+#include <glib.h>
+#include "assert.h"
+#include <string.h>
+#include <unistd.h>
+#include <system_info.h>
+
+//& set: LocationGpsStatus
+
+static GMainLoop *g_mainloop = NULL;
+static GThread *event_thread = NULL;
+static location_manager_h manager = NULL;
+static bool _is_broken = false;
+
+static bool is_gps_supported;
+static bool is_wps_supported;
+static bool is_location_supported;
+static bool is_gps_satellite_supported;
+static char *gps_feature = "http://tizen.org/feature/location.gps";
+static char *location_feature = "http://tizen.org/feature/location";
+static char *gps_satellite_feature = "http://tizen.org/feature/location.gps.satellite";
+
+static bool service_enabled = false;
+static bool satellite_enabled = false;
+static int loop_count = 2;
+
+static gpointer GmainThread(gpointer data)
+{
+    g_mainloop = g_main_loop_new(NULL, 0);
+    g_main_loop_run(g_mainloop);
+
+    return NULL;
+}
+static void wait_for_service()
+{
+    int timeout = 0;
+    for (; timeout < 30; timeout++) {
+        if(service_enabled && satellite_enabled) {
+            break;
+        } else {
+            sleep(1);
+        }
+    }
+}
+
+static void __service_state_changed_cb(location_service_state_e state, void *user_data)
+{
+    switch (state) {
+        case LOCATIONS_SERVICE_ENABLED:
+            service_enabled = true;
+            break;
+        case LOCATIONS_SERVICE_DISABLED:
+            service_enabled = false;
+            break;
+        default:
+            break;
+    }
+    if(!(--loop_count))
+    {
+        g_main_loop_quit(g_mainloop);
+    }        
+}
+
+static void __satellite_updated_cb(int num_of_active, int num_of_inview, time_t timestamp, void *user_data)
+{
+       satellite_enabled = true;
+    if(!(--loop_count))
+    {
+        g_main_loop_quit(g_mainloop);
+    }       
+}
+
+static bool __get_satellites_cb(unsigned int azimuth, unsigned int elevation, unsigned int prn, int snr, bool is_in_use, void *user_data)
+{
+    printf("[get_satellites_cb]  azimuth : %d, elevation : %d, prn :%d, snr : %d, used: %d\n", azimuth, elevation, prn, snr, is_in_use);
+    return true;
+}
+
+void utc_location_gps_status_startup(void)
+{
+    service_enabled = false;
+       satellite_enabled = false;
+    _is_broken = false;
+
+    system_info_get_platform_bool(location_feature,&is_location_supported);
+    system_info_get_platform_bool(gps_feature,&is_gps_supported);
+    system_info_get_platform_bool(gps_satellite_feature,&is_gps_satellite_supported);
+
+    int ret = LOCATIONS_ERROR_INVALID_PARAMETER;
+    ret = location_manager_create(LOCATIONS_METHOD_GPS, &manager);
+    if(LOCATIONS_ERROR_NONE != ret) {
+        _is_broken = true;
+        return;
+    }
+
+    ret = location_manager_set_service_state_changed_cb(manager, __service_state_changed_cb, NULL);
+    if(LOCATIONS_ERROR_NONE != ret) {
+        _is_broken = true;
+        return;
+    }
+
+    ret = gps_status_set_satellite_updated_cb(manager, __satellite_updated_cb, 1, NULL);
+       if(LOCATIONS_ERROR_NONE != ret) {
+        _is_broken = true;
+        return;
+    }
+
+    ret = location_manager_start(manager);
+    if(LOCATIONS_ERROR_NONE != ret) {
+        _is_broken = true;
+        return;
+    }
+
+    g_mainloop = g_main_loop_new(NULL, 0);
+    g_main_loop_run(g_mainloop);
+    
+    //wait_for_service();
+}
+
+void utc_location_gps_status_cleanup(void)
+{
+    if (manager) {
+        location_manager_unset_service_state_changed_cb(manager);
+           gps_status_unset_satellite_updated_cb(manager);
+        location_manager_stop(manager);
+        location_manager_destroy(manager);
+        manager = NULL;
+    }
+
+    service_enabled = false;
+       satellite_enabled = false;
+}
+
+int utc_location_gps_status_get_nmea_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    char *nmea = NULL;
+    ret = gps_status_get_nmea(manager, &nmea);
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        if(nmea) {
+            free(nmea);
+        }
+               assert(ret == LOCATIONS_ERROR_NONE || ret == LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE);
+    }
+    else
+    {
+      assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_gps_status_get_nmea_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = gps_status_get_nmea(manager, NULL);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+      assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }    
+    return 0;
+}
+
+int utc_location_gps_status_get_nmea_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    char *nmea = NULL;
+
+    ret = gps_status_get_nmea(NULL, &nmea);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+      assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    } 
+    return 0;
+}
+
+int utc_location_gps_status_get_satellite_p(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+    int num_of_active = 0, num_of_inview = 0;
+    time_t timestamp;
+    location_method_e method;
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        ret = location_manager_get_method(manager, &method);
+
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        assert_eq(method, LOCATIONS_METHOD_GPS);
+
+        ret = gps_status_get_satellite(manager, &num_of_active, &num_of_inview, &timestamp);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        ret = gps_status_get_satellite(manager, &num_of_active, &num_of_inview, &timestamp);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_gps_status_set_satellite_updated_cb_p(void)
+{
+    int ret = 0;
+    int interval = 1;
+
+    ret = gps_status_set_satellite_updated_cb(manager, __satellite_updated_cb, interval, NULL);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        ret = gps_status_unset_satellite_updated_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+        
+
+    return 0;
+}
+
+int utc_location_gps_status_set_satellite_updated_cb_n(void)
+{
+    int ret = 0;
+    int interval = 1;
+
+    ret = gps_status_set_satellite_updated_cb(manager, NULL, interval, NULL);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_neq(ret, LOCATIONS_ERROR_NONE);    
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_gps_status_unset_satellite_updated_cb_p(void)
+{
+    
+    int ret = 0;
+    int interval = 1;
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        ret = gps_status_set_satellite_updated_cb(manager, __satellite_updated_cb, interval, NULL);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = gps_status_unset_satellite_updated_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }        
+    else
+    {
+        ret = gps_status_unset_satellite_updated_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+
+    return 0;
+}
+
+int utc_location_gps_status_unset_satellite_updated_cb_n(void)
+{
+    int ret = 0;
+    int interval = 1;
+
+    ret = gps_status_unset_satellite_updated_cb(NULL);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_neq(ret, LOCATIONS_ERROR_NONE);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_gps_status_get_satellite_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = gps_status_get_satellite(manager, NULL, NULL, NULL);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }    
+    return 0;
+}
+
+int utc_location_gps_status_get_satellite_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    int num_of_active = 0, num_of_inview = 0;
+    time_t timestamp;
+
+    ret = gps_status_get_satellite(NULL, &num_of_active, &num_of_inview, &timestamp);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }        
+    return 0;
+}
+
+int utc_location_gps_status_get_satellite_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    int num_of_inview = 0;
+    time_t timestamp;
+
+    ret = gps_status_get_satellite(manager, NULL, &num_of_inview, &timestamp);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }      
+    return 0;
+}
+
+int utc_location_gps_status_get_satellite_n4(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    int num_of_active = 0;
+    time_t timestamp;
+
+    ret = gps_status_get_satellite(manager, &num_of_active, NULL, &timestamp);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_gps_status_get_satellite_n5(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    int num_of_active = 0, num_of_inview = 0;
+
+    ret = gps_status_get_satellite(manager, &num_of_active, &num_of_inview, NULL);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }    
+    return 0;
+}
+
+int utc_location_gps_status_foreach_satellites_in_view_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_method_e method;
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        ret = location_manager_get_method(manager, &method);
+        ret = gps_status_foreach_satellites_in_view(manager, __get_satellites_cb, NULL);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }        
+    else
+    {
+        ret = gps_status_foreach_satellites_in_view(manager, __get_satellites_cb, NULL);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }    
+
+    return 0;
+}
+
+int utc_location_gps_status_foreach_satellites_in_view_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = gps_status_foreach_satellites_in_view(manager, NULL, NULL);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }       
+    return 0;
+}
+
+int utc_location_gps_status_foreach_satellites_in_view_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = gps_status_foreach_satellites_in_view(NULL, __get_satellites_cb, NULL);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }        
+    return 0;
+}
+
+int utc_location_gps_status_foreach_last_satellites_in_view_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_method_e method;
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        ret = location_manager_get_method(manager, &method);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        assert_eq(method, LOCATIONS_METHOD_GPS);
+
+        ret = gps_status_foreach_last_satellites_in_view(manager, __get_satellites_cb, NULL);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }        
+    else
+    {
+        ret = gps_status_foreach_last_satellites_in_view(manager, __get_satellites_cb, NULL);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }      
+    return 0;
+}
+
+int utc_location_gps_status_foreach_last_satellites_in_view_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = gps_status_foreach_last_satellites_in_view(manager, NULL, NULL);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }       
+    return 0;
+}
+
+int utc_location_gps_status_foreach_last_satellites_in_view_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = gps_status_foreach_last_satellites_in_view(NULL, __get_satellites_cb, NULL);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }       
+    return 0;
+}
+
+int utc_location_gps_status_get_last_satellite_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    int num_of_inview = 0, num_of_active = 0;
+    time_t timestamp;
+    location_method_e method;
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        ret = location_manager_get_method(manager, &method);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        assert_eq(method, LOCATIONS_METHOD_GPS);
+
+        ret = gps_status_get_last_satellite(manager, &num_of_active, &num_of_inview, &timestamp);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }        
+    else
+    {
+        ret = gps_status_get_last_satellite(manager, &num_of_active, &num_of_inview, &timestamp);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }  
+    return 0;
+}
+
+int utc_location_gps_status_get_last_satellite_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    int num_of_inview = 0, num_of_active = 0;
+    time_t timestamp;
+
+    ret = gps_status_get_last_satellite(NULL, &num_of_active, &num_of_inview, &timestamp);
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }        
+
+    return 0;
+}
+
+int utc_location_gps_status_get_last_satellite_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    int num_of_inview = 0;
+    time_t timestamp;
+
+    ret = gps_status_get_last_satellite(manager, NULL, &num_of_inview, &timestamp);
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }      
+    
+
+    return 0;
+}
+
+int utc_location_gps_status_get_last_satellite_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    int num_of_active = 0;
+    time_t timestamp;
+
+    ret = gps_status_get_last_satellite(manager, &num_of_active, NULL, &timestamp);
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }      
+
+    return 0;
+}
+
+int utc_location_gps_status_get_last_satellite_n4(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    int num_of_inview = 0, num_of_active = 0;
+
+    ret = gps_status_get_last_satellite(manager, &num_of_active, &num_of_inview, NULL);
+
+    if(is_gps_supported && is_gps_satellite_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }        
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }     
+    return 0;
+}
diff --git a/src/utc/location-manager/utc-location-manager-cb.c b/src/utc/location-manager/utc-location-manager-cb.c
new file mode 100755 (executable)
index 0000000..6cac965
--- /dev/null
@@ -0,0 +1,757 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <locations.h>
+#include <glib.h>
+#include "assert.h"
+#include <string.h>
+#include <unistd.h>
+#include <system_info.h>
+//& set: LocationManagercb
+
+static bool service_enabled = false;
+
+static location_manager_h manager = NULL;
+
+static bool is_gps_supported;
+static bool is_wps_supported;
+static bool is_location_supported;
+static char* gps_feature = "http://tizen.org/feature/location.gps";
+static char* wps_feature = "http://tizen.org/feature/location.wps";
+static char* location_feature = "http://tizen.org/feature/location";
+
+static GMainLoop *g_mainloop = NULL;
+static GThread *event_thread = NULL;
+
+static void wait_for_service()
+{/*
+    int timeout = 0;
+    for (; timeout < 30; timeout++) {
+        if(service_enabled) {
+            break;
+        } else {
+            sleep(1);
+        }
+    }*/
+    g_mainloop = g_main_loop_new(NULL, 0);
+    g_main_loop_run(g_mainloop);    
+}
+
+static void __service_state_changed_cb(location_service_state_e state, void *user_data)
+{
+    switch (state) {
+        case LOCATIONS_SERVICE_ENABLED:
+            service_enabled = true;
+            break;
+        case LOCATIONS_SERVICE_DISABLED:
+            service_enabled = false;
+            break;
+        default:
+            break;
+    }
+    g_main_loop_quit(g_mainloop);
+}
+
+
+void utc_location_manager_cb_startup(void)
+{
+    system_info_get_platform_bool(location_feature,&is_location_supported);
+    system_info_get_platform_bool(gps_feature,&is_gps_supported);
+    system_info_get_platform_bool(wps_feature, &is_wps_supported);
+    location_manager_create(LOCATIONS_METHOD_HYBRID, &manager);
+}
+
+void utc_location_manager_cb_cleanup(void)
+{
+    if (manager) {
+        location_manager_destroy(manager);
+        manager = NULL;
+    }
+
+    service_enabled = false;
+}
+
+static void __position_updated_cb(double latitude, double longitude, double altitude, time_t timestamp, void *user_data)
+{
+    printf("[position_updated_cb] Latitude : %lf, Longitude : %lf, Altitude :%lf\n", latitude, longitude, altitude);
+    g_main_loop_quit(g_mainloop);
+}
+
+static void __zone_changed_cb(location_boundary_state_e state, double latitude, double longitude, double altitude, time_t timestamp, void *user_data)
+{
+    printf("[zone_changed_cb] Latitude : %lf, Longitude : %lf, Altitude :%lf\n", latitude, longitude, altitude);
+}
+
+static void __velocity_updated_cb(double speed, double direction, double climb, time_t timestamp, void *user_data)
+{
+    printf("[velocity_updated_cb] Speed : %lf, Direction: %lf, Climb : %lf\n", speed, direction, climb);
+    g_main_loop_quit(g_mainloop);
+}
+
+static void __setting_changed_cb(location_method_e method, bool enable, void *user_data)
+{
+       if (enable) {
+           printf("[setting_changed_cb] Enable");
+       } else {
+           printf("[setting_changed_cb] Disable");
+       }
+}
+
+int utc_location_manager_start_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    location_manager_set_service_state_changed_cb(manager, __service_state_changed_cb, NULL);
+    ret = location_manager_start(manager);    
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        wait_for_service();
+        assert(service_enabled);
+
+        ret = location_manager_stop(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        ret = location_manager_unset_service_state_changed_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_start_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_start(NULL);
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }       
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_set_position_updated_cb_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_position_updated_cb(manager, __position_updated_cb, 1, NULL);
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_start(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        wait_for_service();
+
+        ret = location_manager_stop(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_unset_position_updated_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_set_position_updated_cb_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_position_updated_cb(manager, NULL, 1, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);    
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_set_position_updated_cb_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_position_updated_cb(NULL, __position_updated_cb, 1, NULL);
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);    
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_set_position_updated_cb_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_position_updated_cb(manager, __position_updated_cb, 0, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_set_position_updated_cb_n4(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_position_updated_cb(manager, __position_updated_cb, 121, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_unset_position_updated_cb_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_position_updated_cb(manager, __position_updated_cb, 1, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_start(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        wait_for_service();
+
+        ret = location_manager_stop(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_unset_position_updated_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }    
+    return 0;
+}
+
+int utc_location_manager_unset_position_updated_cb_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_unset_position_updated_cb(NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_set_velocity_updated_cb_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    ret = location_manager_set_velocity_updated_cb(manager, __velocity_updated_cb, 1, NULL);
+    
+    if(is_location_supported)
+    {  
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_start(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        wait_for_service();
+
+        ret = location_manager_stop(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_unset_velocity_updated_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_set_velocity_updated_cb_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_velocity_updated_cb(manager, NULL, 1, NULL);
+  
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_set_velocity_updated_cb_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_velocity_updated_cb(NULL, __velocity_updated_cb, 1, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_unset_velocity_updated_cb_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_velocity_updated_cb(manager, __velocity_updated_cb, 1, NULL);
+
+    ret = location_manager_unset_velocity_updated_cb(manager);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_unset_velocity_updated_cb_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_unset_velocity_updated_cb(NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }    
+
+    return 0;
+}
+
+int utc_location_manager_set_service_state_changed_cb_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    ret = location_manager_set_service_state_changed_cb(manager, __service_state_changed_cb, NULL);
+    
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_start(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        wait_for_service();
+
+        ret = location_manager_stop(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_unset_service_state_changed_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }    
+
+
+    return 0;
+}
+
+int utc_location_manager_set_service_state_changed_cb_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_service_state_changed_cb(manager, NULL, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }    
+
+    return 0;
+}
+
+int utc_location_manager_set_service_state_changed_cb_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_service_state_changed_cb(NULL, __service_state_changed_cb, NULL);
+   
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }    
+    return 0;
+}
+
+int utc_location_manager_unset_service_state_changed_cb_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_service_state_changed_cb(manager, __service_state_changed_cb, NULL);
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_start(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        wait_for_service();
+
+        ret = location_manager_stop(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_unset_service_state_changed_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }   
+
+
+    return 0;
+}
+
+int utc_location_manager_unset_service_state_changed_cb_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_unset_service_state_changed_cb(NULL);
+    
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    } 
+    return 0;
+}
+
+int utc_location_manager_set_zone_changed_cb_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    ret = location_manager_set_zone_changed_cb(manager, __zone_changed_cb, NULL);
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        ret = location_manager_unset_zone_changed_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    } 
+    
+    return 0;
+}
+
+int utc_location_manager_set_zone_changed_cb_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_zone_changed_cb(manager, NULL, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    } 
+    return 0;
+}
+
+int utc_location_manager_set_zone_changed_cb_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_set_zone_changed_cb(NULL, __zone_changed_cb, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    } 
+    return 0;
+}
+
+int utc_location_manager_unset_zone_changed_cb_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    ret = location_manager_set_zone_changed_cb(manager, __zone_changed_cb, NULL);
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_unset_zone_changed_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    } 
+    
+    return 0;
+}
+
+int utc_location_manager_unset_zone_changed_cb_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_unset_zone_changed_cb(NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    } 
+    return 0;
+}
+
+int utc_location_manager_set_setting_changed_cb_p1(void)
+{
+       int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_start(manager);
+
+    ret = location_manager_set_setting_changed_cb(LOCATIONS_METHOD_HYBRID, __setting_changed_cb, NULL);
+    
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    } 
+    return 0;
+}
+
+int utc_location_manager_set_setting_changed_cb_p2(void)
+{
+       int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_start(manager);
+
+    ret = location_manager_set_setting_changed_cb(LOCATIONS_METHOD_GPS, __setting_changed_cb, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }    
+    return 0;
+}
+
+int utc_location_manager_set_setting_changed_cb_p3(void)
+{
+       int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_start(manager);
+
+    ret = location_manager_set_setting_changed_cb(LOCATIONS_METHOD_WPS, __setting_changed_cb, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }       
+    return 0;
+}
+
+int utc_location_manager_set_setting_changed_cb_p4(void)
+{
+       int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_start(manager);
+
+    ret = location_manager_set_setting_changed_cb(LOCATIONS_METHOD_NONE, __setting_changed_cb, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }     
+    return 0;
+}
+
+int utc_location_manager_set_setting_changed_cb_n(void)
+{
+       int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_start(manager);
+
+    ret = location_manager_set_setting_changed_cb(LOCATIONS_METHOD_GPS, NULL, NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }      
+    return 0;
+}
+
+int utc_location_manager_unset_setting_changed_cb_p(void)
+{
+       int ret = LOCATIONS_ERROR_NONE;
+    if(is_location_supported)
+    {
+        ret = location_manager_start(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_set_setting_changed_cb(LOCATIONS_METHOD_GPS, __setting_changed_cb, NULL);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+        ret = location_manager_unset_setting_changed_cb(LOCATIONS_METHOD_GPS);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        ret = location_manager_unset_setting_changed_cb(LOCATIONS_METHOD_GPS);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_unset_setting_changed_cb_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_unset_setting_changed_cb(LOCATIONS_METHOD_WPS+1);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }      
+    return 0;
+}
+
+int utc_location_manager_stop_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    if(is_location_supported)
+    {    
+        location_manager_set_service_state_changed_cb(manager, __service_state_changed_cb, NULL);
+        ret = location_manager_start(manager);
+        wait_for_service();
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        assert(service_enabled);
+
+        ret = location_manager_stop(manager);
+        location_manager_unset_service_state_changed_cb(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        ret = location_manager_stop(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_stop_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_stop(NULL);
+
+    if(is_location_supported)
+    {    
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }    
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }         
+    return 0;
+}
+
diff --git a/src/utc/location-manager/utc-location-manager.c b/src/utc/location-manager/utc-location-manager.c
new file mode 100755 (executable)
index 0000000..9d2d2ee
--- /dev/null
@@ -0,0 +1,3052 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <locations.h>
+#include <glib.h>
+#include "assert.h"
+#include <string.h>
+#include <unistd.h>
+#include <system_info.h>
+//& set: LocationManager
+
+static bool service_enabled = false;
+static bool updated_called = false;
+static bool touch_foreach_bounds = false;
+static bool _is_broken = false;
+
+static location_manager_h manager = NULL;
+static location_bounds_h bounds_rect = NULL;
+static location_bounds_h bounds_circle = NULL;
+static location_bounds_h bounds_poly = NULL;
+
+static bool is_gps_supported;
+static bool is_wps_supported;
+static bool is_location_supported;
+static char* gps_feature = "http://tizen.org/feature/location.gps";
+static char* wps_feature = "http://tizen.org/feature/location.wps";
+static char* location_feature = "http://tizen.org/feature/location";
+
+static GMainLoop *g_mainloop = NULL;
+static GThread *event_thread = NULL;
+
+
+static void wait_for_service()
+{
+       g_mainloop = g_main_loop_new(NULL, 0);
+       g_main_loop_run(g_mainloop);
+}
+
+static void __state_changed_cb(location_service_state_e state, void *user_data)
+{
+    switch (state) {
+        case LOCATIONS_SERVICE_ENABLED:
+            service_enabled = true;
+            break;
+        case LOCATIONS_SERVICE_DISABLED:
+            service_enabled = false;
+            break;
+        default:
+            break;
+    }
+    g_main_loop_quit(g_mainloop);
+}
+
+static bool __location_bounds_cb(location_bounds_h bounds, void *user_data)
+{
+    if(bounds == NULL)
+        printf("bounds ==NULL\n");
+    else {
+        location_bounds_type_e type;
+        location_bounds_get_type(bounds, &type);
+        touch_foreach_bounds = true;
+    }
+    return true;
+}
+
+static bool __polygon_coords_cb(location_coords_s coords, void *user_data)
+{
+    printf("polygon_coords_cb(latitude : %lf, longitude: %lf) \n", coords.latitude, coords.longitude);
+    return true;
+}
+
+static void __location_updated_cb(location_error_e error, double latitude, double longitude, double altitude, time_t timestamp, double speed, double direction, double climb, void *user_data)
+{
+       updated_called = true;
+    printf("location_updated_cb \n");
+    g_main_loop_quit(g_mainloop);
+}
+
+
+
+void utc_location_manager_startup(void)
+{
+    system_info_get_platform_bool(location_feature,&is_location_supported);
+    system_info_get_platform_bool(gps_feature, &is_gps_supported);
+    system_info_get_platform_bool(wps_feature,&is_wps_supported);
+
+    location_manager_create(LOCATIONS_METHOD_HYBRID, &manager);
+}
+
+void utc_location_manager_cleanup(void)
+{
+    if(manager) {
+        location_manager_destroy(manager);
+        manager = NULL;
+    }
+
+    service_enabled = false;
+    touch_foreach_bounds = false;
+}
+
+int utc_location_manager_create_p1(void)
+{
+    location_manager_h manager2 = NULL;
+    int ret = LOCATIONS_ERROR_NONE;
+    location_method_e method;
+
+    ret = location_manager_create(LOCATIONS_METHOD_HYBRID, &manager2);
+    ret = location_manager_get_method(manager2, &method);
+    if(is_gps_supported || is_wps_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        assert_eq(method, LOCATIONS_METHOD_HYBRID);
+        ret = location_manager_destroy(manager2);
+        manager2 = NULL;
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+     return 0;
+}
+
+int utc_location_manager_create_p2(void)
+{
+    location_manager_h manager2 = NULL;
+    int ret = LOCATIONS_ERROR_NONE;
+    location_method_e method;
+
+    ret = location_manager_create(LOCATIONS_METHOD_GPS, &manager2);
+
+    ret = location_manager_get_method(manager2, &method);
+    if(is_gps_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        assert_eq(method, LOCATIONS_METHOD_GPS);
+        ret = location_manager_destroy(manager2);
+        manager2 = NULL;
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_create_p3(void)
+{
+    location_manager_h manager2 = NULL;
+    int ret = LOCATIONS_ERROR_NONE;
+    location_method_e method;
+
+    ret = location_manager_create(LOCATIONS_METHOD_WPS, &manager2);
+    if(is_wps_supported)
+    {
+        ret = location_manager_get_method(manager2, &method);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        assert_eq(method, LOCATIONS_METHOD_WPS);
+        ret = location_manager_destroy(manager2);
+        manager2 = NULL;
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_create_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_create(LOCATIONS_METHOD_HYBRID, NULL);
+    if(is_gps_supported || is_wps_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_create_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_create(LOCATIONS_METHOD_NONE, NULL);
+
+    assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+
+    return 0;
+}
+
+int utc_location_manager_create_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_create(LOCATIONS_METHOD_GPS, NULL);
+    if(is_gps_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_manager_create_n4(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_create(LOCATIONS_METHOD_WPS, NULL);
+    if(is_wps_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_manager_create_n5(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_create(LOCATIONS_METHOD_WPS + 1, NULL);
+
+    assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+
+    return 0;
+}
+
+int utc_location_manager_create_n6(void)
+{
+    location_manager_h manager2 = NULL;
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_create(LOCATIONS_METHOD_NONE, &manager2);
+
+    assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+
+    return 0;
+}
+
+int utc_location_manager_add_boundary_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the circle bounds
+    location_coords_s center;
+    center.latitude = 37.258;
+    center.longitude = 127.056;
+    double radius = 30;
+
+    ret = location_bounds_create_circle(center, radius, &bounds_circle);
+
+    ret = location_manager_add_boundary(manager, bounds_circle);
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    //Add the rect bounds
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    ret = location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    ret = location_manager_add_boundary(manager, bounds_rect);
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    //Add the polygon bounds
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    coord_list[1].latitude = 20;
+    coord_list[1].longitude = 20;
+    coord_list[2].latitude = 30;
+    coord_list[2].longitude = 30;
+    ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+
+    ret = location_manager_add_boundary(manager, bounds_poly);
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_manager_add_boundary_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_add_boundary(NULL, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_add_boundary_n2(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_add_boundary(manager, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_add_boundary_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the circle bounds
+    location_coords_s center;
+    center.latitude = 37.258;
+    center.longitude = 127.056;
+    double radius = 30;
+    ret = location_bounds_create_circle(center, radius, &bounds_circle);
+
+    ret = location_manager_add_boundary(NULL, bounds_circle);
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_manager_foreach_boundary_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the circle bounds
+    location_coords_s center;
+    center.latitude = 37.258;
+    center.longitude = 127.056;
+    double radius = 30;
+
+    if(!is_location_supported) {
+               ret = location_manager_foreach_boundary(NULL, NULL, NULL);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);    //Add the rect bounds
+               return 0;
+       }
+
+    ret = location_bounds_create_circle(center, radius, &bounds_circle);
+
+    ret = location_manager_add_boundary(manager, bounds_circle);
+    assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    ret = location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+    assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+
+    ret = location_manager_add_boundary(manager, bounds_rect);
+    assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+    //Add the polygon bounds
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    coord_list[1].latitude = 20;
+    coord_list[1].longitude = 20;
+    coord_list[2].latitude = 30;
+    coord_list[2].longitude = 30;
+    ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+
+    ret = location_manager_add_boundary(manager, bounds_poly);
+    assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+    ret = location_manager_foreach_boundary(manager, __location_bounds_cb, (void *) manager);
+    assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+    assert_eq(touch_foreach_bounds, true);
+
+    return 0;
+}
+
+int utc_location_manager_foreach_boundary_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_foreach_boundary(NULL, NULL, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_foreach_boundary_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_foreach_boundary(NULL, __location_bounds_cb, (void *) manager);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_foreach_boundary_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_foreach_boundary(manager, NULL, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_remove_boundary_p(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the circle bounds
+    location_coords_s center;
+    center.latitude = 37.258;
+    center.longitude = 127.056;
+    double radius = 30;
+    ret = location_bounds_create_circle(center, radius, &bounds_circle);
+
+    ret = location_manager_add_boundary(manager, bounds_circle);
+
+    ret = location_manager_remove_boundary(manager, bounds_circle);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    //Add the rect bounds
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    ret = location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    ret = location_manager_add_boundary(manager, bounds_rect);
+
+    ret = location_manager_remove_boundary(manager, bounds_rect);
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    //Add the polygon bounds
+
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    coord_list[1].latitude = 20;
+    coord_list[1].longitude = 20;
+    coord_list[2].latitude = 30;
+    coord_list[2].longitude = 30;
+    ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+
+    ret = location_manager_add_boundary(manager, bounds_poly);
+
+
+    ret = location_manager_remove_boundary(manager, bounds_poly);
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    location_bounds_destroy(bounds_rect);
+    location_bounds_destroy(bounds_circle);
+    location_bounds_destroy(bounds_poly);
+
+    return 0;
+}
+
+int utc_location_manager_remove_boundary_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_remove_boundary(NULL, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_remove_boundary_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_remove_boundary(NULL, bounds_rect);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_remove_boundary_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_remove_boundary(manager, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_method_p(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+    location_method_e method;
+
+    ret = location_manager_get_method(manager, &method);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_method_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_get_method(NULL, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_method_n2(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_get_method(manager, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_method_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_method_e method;
+
+    ret = location_manager_get_method(NULL, &method);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_position_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double altitude = 0.0;
+    double latitude = 0.0;
+    double longitude = 0.0;
+    time_t timestamp = 0.0;
+
+    ret = location_manager_set_service_state_changed_cb(manager, __state_changed_cb, NULL);
+    if(is_location_supported)
+    {
+        ret = location_manager_start(manager);
+        wait_for_service();
+        assert(service_enabled);
+
+        ret = location_manager_get_position(manager, &altitude, &latitude, &longitude, &timestamp);
+
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        ret = location_manager_stop(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        ret = location_manager_get_position(manager, &altitude, &latitude, &longitude, &timestamp);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_manager_get_position_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double latitude = 0.0;
+    double longitude = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_position(manager, NULL, &latitude, &longitude, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_position_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double altitude = 0.0;
+    double latitude = 0.0;
+    double longitude = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_position(NULL, &altitude, &latitude, &longitude, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_position_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double altitude = 0.0;
+    double longitude = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_position(manager, &altitude, NULL, &longitude, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_position_n4(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+    double altitude = 0.0;
+    double latitude = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_position(manager, &altitude, &latitude, NULL, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_position_n5(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+    double altitude = 0.0;
+    double latitude = 0.0;
+    double longitude = 0.0;
+
+    ret = location_manager_get_position(manager, &altitude, &latitude, &longitude, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_velocity_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double climb = 0.0;
+    double direction = 0.0;
+    double speed = 0.0;
+    time_t timestamp;
+
+    if(is_location_supported)
+    {
+        ret = location_manager_set_service_state_changed_cb(manager, __state_changed_cb, NULL);
+
+        ret = location_manager_start(manager);
+
+        wait_for_service();
+        assert(service_enabled);
+
+        ret = location_manager_get_velocity(manager, &climb, &direction, &speed, &timestamp);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        ret = location_manager_stop(manager);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        ret = location_manager_get_velocity(manager, &climb, &direction, &speed, &timestamp);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_manager_get_velocity_n1(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+    double direction = 0.0;
+    double speed = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_velocity(manager, NULL, &direction, &speed, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_velocity_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double climb = 0.0;
+    double direction = 0.0;
+    double speed = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_velocity(NULL, &climb, &direction, &speed, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_velocity_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double climb = 0.0;
+    double speed = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_velocity(manager, &climb, NULL, &speed, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_velocity_n4(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+    double climb = 0.0;
+    double direction = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_velocity(manager, &climb, &direction, NULL, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_velocity_n5(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double climb = 0.0;
+    double direction = 0.0;
+    double speed = 0.0;
+
+    ret = location_manager_get_velocity(manager, &climb, &direction, &speed, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_accuracy_p(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+    location_accuracy_level_e level;
+    double horizontal = 0.0;
+    double vertical = 0.0;
+    if(is_location_supported)
+    {
+        ret = location_manager_set_service_state_changed_cb(manager, __state_changed_cb, NULL);
+
+        ret = location_manager_start(manager);
+
+        wait_for_service();
+        assert(service_enabled);
+
+        ret = location_manager_get_accuracy(manager, &level, &horizontal, &vertical);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        ret = location_manager_stop(manager);
+    }
+    else
+    {
+        ret = location_manager_get_accuracy(manager, &level, &horizontal, &vertical);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_accuracy_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_get_accuracy(manager, NULL, NULL, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_accuracy_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_accuracy_level_e level;
+    double horizontal = 0.0;
+    double vertical = 0.0;
+
+    ret = location_manager_get_accuracy(NULL, &level, &horizontal, &vertical);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_accuracy_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double horizontal = 0.0;
+    double vertical = 0.0;
+
+    ret = location_manager_get_accuracy(manager, NULL, &horizontal, &vertical);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_accuracy_n4(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_accuracy_level_e level;
+    double vertical = 0.0;
+
+    ret = location_manager_get_accuracy(manager, &level, NULL, &vertical);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_accuracy_n5(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_accuracy_level_e level;
+    double horizontal = 0.0;
+
+    ret = location_manager_get_accuracy(manager, &level, &horizontal, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_foreach_polygon_coords_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the polygon bounds
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    coord_list[1].latitude = 20;
+    coord_list[1].longitude = 20;
+    coord_list[2].latitude = 30;
+    coord_list[2].longitude = 30;
+
+    location_bounds_h bounds_poly;
+    ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+
+    ret = location_bounds_foreach_polygon_coords(bounds_poly, __polygon_coords_cb, NULL);
+    if(is_location_supported)
+    {
+        location_bounds_destroy(bounds_poly);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_foreach_polygon_coords_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_bounds_foreach_polygon_coords(NULL, __polygon_coords_cb, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_foreach_polygon_coords_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the polygon bounds
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    coord_list[1].latitude = 20;
+    coord_list[1].longitude = 20;
+    coord_list[2].latitude = 30;
+    coord_list[2].longitude = 30;
+
+    location_bounds_h bounds_poly;
+    ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+
+    ret = location_bounds_foreach_polygon_coords(bounds_poly, NULL, NULL);
+
+    if(is_location_supported)
+    {
+        location_bounds_destroy(bounds_poly);
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_get_circle_coords_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    location_coords_s center;
+    center.latitude = 37.258;
+    center.longitude = 127.056;
+    double radius = 30;
+    location_coords_s center2;
+    double radius2 = 35;
+    location_bounds_h bounds_circle;
+    ret = location_bounds_create_circle(center, radius, &bounds_circle);
+
+    ret = location_bounds_get_circle_coords(bounds_circle, &center2, &radius2);
+
+    if(is_location_supported)
+    {
+        location_bounds_destroy(bounds_circle);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_get_circle_coords_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_coords_s center2;
+    double radius2 = 30;
+
+    ret = location_bounds_get_circle_coords(NULL, &center2, &radius2);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_get_circle_coords_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_coords_s center;
+    center.latitude = 37.258;
+    center.longitude = 127.056;
+    double radius = 30;
+    location_bounds_h bounds_circle;
+    double radius2 = 34;
+    ret = location_bounds_create_circle(center, radius, &bounds_circle);
+
+    ret = location_bounds_get_circle_coords(bounds_circle, NULL, &radius2);
+
+    if(is_location_supported)
+    {
+        location_bounds_destroy(bounds_circle);
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_get_circle_coords_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_coords_s center;
+    center.latitude = 37.258;
+    center.longitude = 127.056;
+    double radius = 30;
+    location_bounds_h bounds_circle;
+    location_coords_s center2;
+    ret = location_bounds_create_circle(center, radius, &bounds_circle);
+
+    ret = location_bounds_get_circle_coords(bounds_circle, &center2, NULL);
+
+    if(is_location_supported)
+    {
+        location_bounds_destroy(bounds_circle);
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_get_rect_coords_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the rect bounds
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    location_bounds_h bounds_rect;
+    location_coords_s left_top2;
+    location_coords_s right_bottom2;
+
+    ret = location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    ret = location_bounds_get_rect_coords(bounds_rect, &left_top2, &right_bottom2);
+
+    if(is_location_supported)
+    {
+        location_bounds_destroy(bounds_rect);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_get_rect_coords_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_coords_s left_top2;
+    location_coords_s right_bottom2;
+
+    ret = location_bounds_get_rect_coords(NULL, &left_top2, &right_bottom2);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_get_rect_coords_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the rect bounds
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    location_bounds_h bounds_rect;
+    location_coords_s right_bottom2;
+    ret = location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    ret = location_bounds_get_rect_coords(bounds_rect, NULL, &right_bottom2);
+
+    if(is_location_supported)
+    {
+        location_bounds_destroy(bounds_rect);
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_get_rect_coords_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the rect bounds
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    location_bounds_h bounds_rect;
+    location_coords_s left_top2;
+    ret = location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    ret = location_bounds_get_rect_coords(bounds_rect, &left_top2, NULL);
+
+    if(is_location_supported)
+    {
+        location_bounds_destroy(bounds_rect);
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+////////////////////////////////////////////////////////////////////////////////////
+int utc_location_bounds_get_type_p(void)
+{
+    int ret = 0;
+    location_bounds_type_e type;
+
+    //Add the rect bounds
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    location_bounds_h bounds_rect;
+
+    ret = location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    ret = location_bounds_get_type(bounds_rect, &type);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        assert_eq(type, LOCATION_BOUNDS_RECT);
+        location_bounds_destroy(bounds_rect);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_bounds_get_type_n(void)
+{
+    int ret = 0;
+
+    ret = location_bounds_get_type(NULL, NULL);
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_contains_coordinates_p1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the polygon bounds
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    coord_list[1].latitude = 20;
+    coord_list[1].longitude = 20;
+    coord_list[2].latitude = 30;
+    coord_list[2].longitude = 10;
+    location_bounds_h bounds_poly;
+    location_coords_s test_coords;
+    test_coords.latitude = 20;
+    test_coords.longitude = 12;
+    bool contained = false;
+    ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+
+    location_bounds_contains_coordinates(bounds_poly, test_coords);
+       ret = get_last_result();
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        location_bounds_destroy(bounds_poly);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_contains_coordinates_p2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the polygon bounds
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    coord_list[1].latitude = 20;
+    coord_list[1].longitude = 20;
+    coord_list[2].latitude = 30;
+    coord_list[2].longitude = 10;
+    location_bounds_h bounds_poly;
+    location_coords_s test_coords;
+    test_coords.latitude = 50;
+    test_coords.longitude = 50;
+    bool contained = false;
+    ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+
+    location_bounds_contains_coordinates(bounds_poly, test_coords);
+       ret = get_last_result();
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        location_bounds_destroy(bounds_poly);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_contains_coordinates_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_coords_s test_coords;
+    test_coords.latitude = 12;
+    test_coords.longitude = 12;
+
+    location_bounds_contains_coordinates(NULL, test_coords);
+       ret = get_last_result();
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_contains_coordinates_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the polygon bounds
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    coord_list[1].latitude = 20;
+    coord_list[1].longitude = 20;
+    coord_list[2].latitude = 30;
+    coord_list[2].longitude = 10;
+    location_bounds_h bounds_poly;
+    location_coords_s coord_test;
+    coord_test.latitude = -91;
+    coord_test.longitude = 181;
+    ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+
+    location_bounds_contains_coordinates(bounds_poly, coord_test);
+       ret = get_last_result();
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+        location_bounds_destroy(bounds_poly);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_accuracy_p(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+    double horizontal = 0.0, vertical = 0.0;
+    location_accuracy_level_e level;
+
+    ret = location_manager_get_last_accuracy(manager, &level, &horizontal, &vertical);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_accuracy_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double horizontal = 0.0, vertical = 0.0;
+    location_accuracy_level_e level;
+
+    ret = location_manager_get_last_accuracy(NULL, &level, &horizontal, &vertical);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_accuracy_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double horizontal = 0.0, vertical = 0.0;
+
+    ret = location_manager_get_last_accuracy(manager, NULL, &horizontal, &vertical);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_accuracy_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double vertical = 0.0;
+    location_accuracy_level_e level;
+
+    ret = location_manager_get_last_accuracy(manager, &level, NULL, &vertical);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_accuracy_n4(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double horizontal = 0.0;
+    location_accuracy_level_e level;
+
+    ret = location_manager_get_last_accuracy(manager, &level, &horizontal, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_accessibility_state_p(void)
+{
+    int ret = 0;
+    location_accessibility_state_e state;
+
+    ret = location_manager_get_accessibility_state(&state);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_accessibility_state_n(void)
+{
+    int ret = 0;
+
+    ret = location_manager_get_accessibility_state(NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_location_p(void)
+{
+    int ret;
+    double altitude, latitude, longitude, climb, direction, speed, horizontal,
+            vertical;
+    location_accuracy_level_e level;
+    time_t timestamp;
+
+    ret = location_manager_get_last_location(manager, &altitude, &latitude, &longitude, &climb, &direction, &speed, &level, &horizontal, &vertical, &timestamp);
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_location_n(void)
+{
+    int ret;
+    double altitude, latitude, longitude, climb, direction, speed, horizontal,
+            vertical;
+    location_accuracy_level_e level;
+    time_t timestamp;
+
+    ret = location_manager_get_last_location(NULL, &altitude, &latitude, &longitude, &climb, &direction, &speed, &level, &horizontal, &vertical, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_manager_get_location_p(void)
+{
+    int ret;
+    double altitude, latitude, longitude, climb, direction, speed, horizontal,
+            vertical;
+    location_accuracy_level_e level;
+    time_t timestamp;
+    ret = location_manager_set_service_state_changed_cb(manager, __state_changed_cb, NULL);
+    if(is_location_supported)
+    {
+        ret = location_manager_start(manager);
+
+        wait_for_service();
+        assert(service_enabled);
+
+        ret = location_manager_get_location(manager, &altitude, &latitude, &longitude, &climb, &direction, &speed, &level, &horizontal, &vertical, &timestamp);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        ret = location_manager_get_location(manager, &altitude, &latitude, &longitude, &climb, &direction, &speed, &level, &horizontal, &vertical, &timestamp);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_location_n(void)
+{
+    int ret;
+    double altitude, latitude, longitude, climb, direction, speed, horizontal,
+            vertical;
+    location_accuracy_level_e level;
+    time_t timestamp;
+
+    if(is_location_supported)
+    {
+        ret = location_manager_start(manager);
+
+        ret = location_manager_get_location(NULL, &altitude, &latitude, &longitude, &climb, &direction,
+            &speed, &level, &horizontal, &vertical, &timestamp);
+
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        ret = location_manager_get_location(NULL, &altitude, &latitude, &longitude, &climb, &direction,
+            &speed, &level, &horizontal, &vertical, &timestamp);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_manager_get_last_position_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double altitude = 0.0;
+    double latitude = 0.0;
+    double longitude = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_last_position(manager, &altitude, &latitude, &longitude, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_position_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double altitude = 0.0;
+    double latitude = 0.0;
+    double longitude = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_last_position(NULL, &altitude, &latitude, &longitude, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_position_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double latitude = 0.0;
+    double longitude = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_last_position(manager, NULL, &latitude, &longitude, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_position_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double altitude = 0.0;
+    double longitude = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_last_position(manager, &altitude, NULL, &longitude, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_position_n4(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double altitude = 0.0;
+    double latitude = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_last_position(manager, &altitude, &latitude, NULL, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_position_n5(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+    double altitude = 0.0;
+    double latitude = 0.0;
+    double longitude = 0.0;
+
+    ret = location_manager_get_last_position(manager, &altitude, &latitude, &longitude, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_velocity_p(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+    double climb = 0.0;
+    double direction = 0.0;
+    double speed = 0.0;
+    time_t timestamp;
+    location_manager_create(LOCATIONS_METHOD_HYBRID, &manager);
+
+    ret = location_manager_get_last_velocity(manager, &climb, &direction, &speed, &timestamp);
+
+    if(is_gps_supported || is_wps_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_velocity_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double climb = 0.0;
+    double direction = 0.0;
+    double speed = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_last_velocity(NULL, &climb, &direction, &speed, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_velocity_n2(void)
+{
+
+    int ret = LOCATIONS_ERROR_NONE;
+    double direction = 0.0;
+    double speed = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_last_velocity(manager, NULL, &direction, &speed, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_velocity_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double climb = 0.0;
+    double speed = 0.0;
+    time_t timestamp;
+
+    ret = location_manager_get_last_velocity(manager, &climb, NULL, &speed, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_velocity_n4(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double climb = 0.0;
+    double direction = 0.0;
+    time_t timestamp = 0.0;
+
+    ret = location_manager_get_last_velocity(manager, &climb, &direction, NULL, &timestamp);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_last_velocity_n5(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double climb = 0.0;
+    double direction = 0.0;
+    double speed = 0.0;
+
+    ret = location_manager_get_last_velocity(manager, &climb, &direction, &speed, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_is_supported_method_p1(void)
+{
+
+    bool ret = false;
+    int ret_err = LOCATIONS_ERROR_NONE;
+    ret = location_manager_is_supported_method(LOCATIONS_METHOD_HYBRID);
+    ret_err = get_last_result();
+    if(is_gps_supported || is_wps_supported)
+    {
+        assert(ret);
+    }
+    else
+    {
+        assert_eq(ret_err, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_is_supported_method_p2(void)
+{
+
+    bool ret = false;
+    int ret_err = LOCATIONS_ERROR_NONE;
+    ret = location_manager_is_supported_method(LOCATIONS_METHOD_GPS);
+    ret_err = get_last_result();
+
+    if(is_location_supported)
+    {
+               if (is_gps_supported)
+               {
+                   assert_eq(ret, true);
+               }
+               else
+               {
+                   assert_eq(ret, false);
+               }
+    }
+    else
+    {
+        assert_eq(ret_err, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_is_supported_method_p3(void)
+{
+    bool ret = false;
+    int ret_err = LOCATIONS_ERROR_NONE;
+    ret = location_manager_is_supported_method(LOCATIONS_METHOD_WPS);
+    ret_err = get_last_result();
+
+    if(is_location_supported)
+    {
+               if (is_wps_supported)
+               {
+                   assert_eq(ret, true);
+               }
+               else
+               {
+                   assert_eq(ret, false);
+               }
+    }
+    else
+    {
+        assert_eq(ret_err, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_is_supported_method_n1(void)
+{
+
+    bool ret = false;
+    int ret_err = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_is_supported_method(LOCATIONS_METHOD_NONE);
+    ret_err = get_last_result();
+    if(is_location_supported)
+    {
+        assert(!ret);
+    }
+    else
+    {
+        assert_eq(ret_err, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_is_supported_method_n2(void)
+{
+
+    bool ret = false;
+    int ret_err = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_is_supported_method(LOCATIONS_METHOD_WPS + 1);
+    ret_err = get_last_result();
+    if(is_location_supported)
+    {
+        assert(!ret);
+    }
+    else
+    {
+        assert_eq(ret_err, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_destroy_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_manager_h manager2;
+    location_manager_create(LOCATIONS_METHOD_HYBRID, &manager2);
+
+    ret = location_manager_destroy(manager2);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    manager2 = NULL;
+    return 0;
+}
+
+int utc_location_manager_destroy_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_destroy(NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_distance_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double start_latitude = 30.0;
+    double start_longitude = 30.0;
+    double end_latitude = 50.0;
+    double end_longitude = 50.0;
+    double distance = 0.0;
+
+    ret = location_manager_get_distance(start_latitude, start_longitude, end_latitude, end_longitude, &distance);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_distance_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double start_longitude = 30.0;
+    double end_latitude = 50.0;
+    double end_longitude = 50.0;
+    double distance = 0.0;
+
+    ret = location_manager_get_distance(200, start_longitude, end_latitude, end_longitude, &distance);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_distance_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double start_latitude = 30.0;
+    double end_latitude = 50.0;
+    double end_longitude = 50.0;
+    double distance = 0.0;
+
+    ret = location_manager_get_distance(start_latitude, 200, end_latitude, end_longitude, &distance);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_distance_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double start_latitude = 30.0;
+    double start_longitude = 30.0;
+    double end_longitude = 50.0;
+    double distance = 0.0;
+
+    ret = location_manager_get_distance(start_latitude, start_longitude, 200, end_longitude, &distance);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_distance_n4(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double start_latitude = 30.0;
+    double start_longitude = 30.0;
+    double end_latitude = 50.0;
+    double distance = 0.0;
+
+    ret = location_manager_get_distance(start_latitude, start_longitude, end_latitude, 200, &distance);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_get_distance_n5(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    double start_latitude = 30.0;
+    double start_longitude = 30.0;
+    double end_latitude = 50.0;
+    double end_longitude = 50.0;
+
+    ret = location_manager_get_distance(start_latitude, start_longitude, end_latitude, end_longitude, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_rect_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the rect bounds
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    location_bounds_h bounds_rect = NULL;
+
+    ret = location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    if(is_location_supported)
+    {
+        if (bounds_rect) {
+            location_bounds_destroy(bounds_rect);
+        }
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_rect_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the rect bounds
+    location_coords_s left_top;
+    left_top.latitude = -200;
+    left_top.longitude = -200;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    location_bounds_h bounds_rect = NULL;
+
+    ret = location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    if(is_location_supported)
+    {
+        if (bounds_rect) {
+            location_bounds_destroy(bounds_rect);
+        }
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_rect_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the rect bounds
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = -200;
+    right_bottom.longitude = -200;
+    location_bounds_h bounds_rect = NULL;
+
+    ret = location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    if(is_location_supported)
+    {
+        if (bounds_rect) {
+            location_bounds_destroy(bounds_rect);
+        }
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_rect_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the rect bounds
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+
+    ret = location_bounds_create_rect(left_top, right_bottom, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_circle_p(void)
+{
+    int ret = LOCATION_BOUNDS_ERROR_NONE;
+    location_coords_s center;
+    center.latitude = 37.336723;
+    center.longitude = -121.889555;
+    double radius = 30;
+    location_bounds_h bounds_circle = NULL;
+
+    ret = location_bounds_create_circle(center, radius, &bounds_circle);
+
+    if(is_location_supported)
+    {
+        if (bounds_circle) {
+            location_bounds_destroy(bounds_circle);
+        }
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_circle_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_coords_s center;
+    center.latitude = -200;
+    center.longitude = -200;
+    double radius = 30;
+    location_bounds_h bounds_circle = NULL;
+
+    ret = location_bounds_create_circle(center, radius, &bounds_circle);
+
+    if(is_location_supported)
+    {
+        if (bounds_circle) {
+            location_bounds_destroy(bounds_circle);
+        }
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_circle_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_coords_s center;
+    center.latitude = 37.336723;
+    center.longitude = -121.889555;
+    double radius = -1;
+    location_bounds_h bounds_circle = NULL;
+
+    ret = location_bounds_create_circle(center, radius, &bounds_circle);
+
+    if(is_location_supported)
+    {
+        if (bounds_circle)
+        {
+            location_bounds_destroy(bounds_circle);
+        }
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_circle_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_coords_s center;
+    center.latitude = 37.336723;
+    center.longitude = -121.889555;
+    double radius = 30;
+
+    ret = location_bounds_create_circle(center, radius, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_polygon_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the polygon bounds
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    coord_list[1].latitude = 20;
+    coord_list[1].longitude = 20;
+    coord_list[2].latitude = 30;
+    coord_list[2].longitude = 30;
+    location_bounds_h bounds_poly = NULL;
+
+    ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+
+    if(is_location_supported)
+    {
+        if (bounds_poly)
+        {
+            location_bounds_destroy(bounds_poly);
+        }
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_polygon_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the polygon bounds
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+    coord_list[0].latitude = -200;
+    coord_list[0].longitude = -200;
+    coord_list[1].latitude = -200;
+    coord_list[1].longitude = -200;
+    coord_list[2].latitude = -200;
+    coord_list[2].longitude = -200;
+    location_bounds_h bounds_poly = NULL;
+
+    ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+
+    if(is_location_supported)
+    {
+        if (bounds_poly)
+        {
+            location_bounds_destroy(bounds_poly);
+        }
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_polygon_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the polygon bounds
+    int poly_size = 1;
+    location_coords_s coord_list[poly_size];
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    location_bounds_h bounds_poly = NULL;
+
+    ret = location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+    if(is_location_supported)
+    {
+        if (bounds_poly)
+        {
+           location_bounds_destroy(bounds_poly);
+        }
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_create_polygon_n3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    //Add the polygon bounds
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    coord_list[1].latitude = 20;
+    coord_list[1].longitude = 20;
+    coord_list[2].latitude = 30;
+    coord_list[2].longitude = 30;
+
+    ret = location_bounds_create_polygon(coord_list, poly_size, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+static void _capi_bounds_state_changed_cb(location_boundary_state_e state, void *user_data)
+{
+}
+
+int utc_location_bounds_set_state_changed_cb_p1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    int poly_size = 3;
+    location_coords_s coord_list[poly_size];
+    coord_list[0].latitude = 10;
+    coord_list[0].longitude = 10;
+    coord_list[1].latitude = 20;
+    coord_list[1].longitude = 20;
+    coord_list[2].latitude = 30;
+    coord_list[2].longitude = 30;
+    location_bounds_h bounds_poly = NULL;
+    location_bounds_create_polygon(coord_list, poly_size, &bounds_poly);
+
+    ret = location_bounds_set_state_changed_cb(bounds_poly, _capi_bounds_state_changed_cb, NULL);
+
+    if(is_location_supported)
+    {
+        if (bounds_poly)
+        {
+            location_bounds_destroy(bounds_poly);
+        }
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_set_state_changed_cb_p2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    location_bounds_h bounds_rect;
+    location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    ret = location_bounds_set_state_changed_cb(bounds_rect, _capi_bounds_state_changed_cb, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+        if (bounds_rect)
+        {
+            location_bounds_destroy(bounds_rect);
+        }
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_set_state_changed_cb_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+
+    location_bounds_h bounds_rect;
+    location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    ret = location_bounds_set_state_changed_cb(bounds_rect, NULL, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+        if (bounds_rect)
+        {
+            location_bounds_destroy(bounds_rect);
+        }
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_set_state_changed_cb_n2(void)
+{
+    int ret = LOCATION_BOUNDS_ERROR_INVALID_PARAMETER;
+
+    ret = location_bounds_set_state_changed_cb(NULL, _capi_bounds_state_changed_cb, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_unset_state_changed_cb_p(void)
+{
+    int ret = LOCATION_BOUNDS_ERROR_INVALID_PARAMETER;
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    location_bounds_h bounds_rect;
+    location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+    location_bounds_set_state_changed_cb(bounds_rect, _capi_bounds_state_changed_cb, NULL);
+
+    ret = location_bounds_unset_state_changed_cb(bounds_rect);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+        if (bounds_rect)
+        {
+            location_bounds_destroy(bounds_rect);
+        }
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_unset_state_changed_cb_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_bounds_unset_state_changed_cb(NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+        }
+    return 0;
+}
+
+int utc_location_bounds_destroy_p(void)
+{
+
+    int ret = LOCATION_BOUNDS_ERROR_INVALID_PARAMETER;
+
+    //Add the rect bounds
+    location_coords_s left_top;
+    left_top.latitude = 30;
+    left_top.longitude = 30;
+    location_coords_s right_bottom;
+    right_bottom.latitude = 10;
+    right_bottom.longitude = 50;
+    location_bounds_h bounds_rect;
+    ret = location_bounds_create_rect(left_top, right_bottom, &bounds_rect);
+
+    ret = location_bounds_destroy(bounds_rect);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_bounds_destroy_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_bounds_destroy(NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATION_BOUNDS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_enable_method_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    if(is_location_supported)
+    {
+           if(is_gps_supported)
+           {
+                       ret = location_manager_enable_method(LOCATIONS_METHOD_GPS, true);
+                       assert_eq(ret, LOCATIONS_ERROR_NONE);
+               }
+               else
+               {
+                       ret = location_manager_enable_method(LOCATIONS_METHOD_GPS, false);
+                       assert_eq(ret, LOCATIONS_ERROR_NONE);
+               }
+    }
+    else
+    {
+           ret = location_manager_enable_method(LOCATIONS_METHOD_GPS, true);
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_enable_method_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_enable_method(LOCATIONS_METHOD_NONE, true);
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INCORRECT_METHOD);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_is_enabled_method_p1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    bool enabled = false;
+
+    ret = location_manager_is_enabled_method(LOCATIONS_METHOD_HYBRID, &enabled);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_is_enabled_method_p2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    bool enabled = false;
+
+    ret = location_manager_is_enabled_method(LOCATIONS_METHOD_GPS, &enabled);
+
+    if(is_location_supported)
+    {
+               if (is_gps_supported)
+               {
+                   assert_eq(enabled, true);
+               }
+               else
+               {
+                   assert_eq(enabled, false);
+               }
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_is_enabled_method_p3(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    bool enabled = false;
+
+    ret = location_manager_is_enabled_method(LOCATIONS_METHOD_WPS, &enabled);
+
+    if(is_location_supported)
+    {
+               if (is_wps_supported)
+               {
+                   assert_eq(enabled, true);
+               }
+               else
+               {
+                   assert_eq(enabled, false);
+               }
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_is_enabled_method_p4(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    bool enabled = false;
+
+    ret = location_manager_is_enabled_method(LOCATIONS_METHOD_NONE, &enabled);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INCORRECT_METHOD);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_manager_is_enabled_method_p5(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    bool enabled = false;
+
+    ret = location_manager_is_enabled_method(LOCATIONS_METHOD_WPS + 1, &enabled);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INCORRECT_METHOD);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_is_enabled_method_n(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_is_enabled_method(LOCATIONS_METHOD_WPS, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_request_single_location_p(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+    ret = location_manager_request_single_location(manager, 30, __location_updated_cb, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+       wait_for_service();
+        assert(updated_called);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_request_single_location_p2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_request_single_location(manager, 30, __location_updated_cb, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+        wait_for_service();
+        assert(updated_called);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_location_manager_request_single_location_n1(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+
+    ret = location_manager_request_single_location(NULL, 2, __location_updated_cb, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+    }
+    else
+    {
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_location_manager_request_single_location_n2(void)
+{
+    int ret = LOCATIONS_ERROR_NONE;
+       location_manager_h manager2 = NULL;
+
+    ret = location_manager_create(LOCATIONS_METHOD_HYBRID, &manager2);
+
+    ret = location_manager_request_single_location(manager2, 2, NULL, NULL);
+
+    if(is_location_supported)
+    {
+        assert_eq(ret, LOCATIONS_ERROR_INVALID_PARAMETER);
+        ret = location_manager_destroy(manager2);
+        assert_eq(ret, LOCATIONS_ERROR_NONE);
+
+    }
+    else
+        assert_eq(ret, LOCATIONS_ERROR_NOT_SUPPORTED);
+
+    return 0;
+}
+
diff --git a/src/utc/media-content/CMakeLists.txt b/src/utc/media-content/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..59b6c8b
--- /dev/null
@@ -0,0 +1,50 @@
+SET(PKG_NAME "media-content")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-content-media-content")
+SET(TC_SOURCES
+utc-media-audio.c
+utc-media-bookmark-delete.c
+utc-media-bookmark-insert.c
+utc-media-bookmark.c
+utc-media-content.c
+utc-media-filter-create.c
+utc-media-filter-destroy.c
+utc-media-filter.c
+utc-media-folder.c
+utc-media-group.c
+utc-media-image.c
+utc-media-info.c
+utc-media-playlist.c
+utc-media-tag.c
+utc-media-video.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       storage
+       capi-appfw-application
+       dlog
+)
+
+ADD_DEFINITIONS( -DCOMMERCIAL_FEATURE )
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/media-content/public.list b/src/utc/media-content/public.list
new file mode 100755 (executable)
index 0000000..d0c370b
--- /dev/null
@@ -0,0 +1,209 @@
+audio_meta_clone
+audio_meta_destroy
+audio_meta_get_album
+audio_meta_get_album_artist
+audio_meta_get_artist
+audio_meta_get_bit_rate
+audio_meta_get_bitpersample
+audio_meta_get_channel
+audio_meta_get_composer
+audio_meta_get_copyright
+audio_meta_get_duration
+audio_meta_get_genre
+audio_meta_get_media_id
+audio_meta_get_played_count
+audio_meta_get_played_position
+audio_meta_get_played_time
+audio_meta_get_recorded_date
+audio_meta_get_sample_rate
+audio_meta_get_track_num
+audio_meta_get_year
+audio_meta_set_played_count
+audio_meta_set_played_position
+audio_meta_set_played_time
+audio_meta_update_to_db
+image_meta_clone
+image_meta_destroy
+image_meta_get_burst_id
+image_meta_get_date_taken
+image_meta_get_height
+image_meta_get_media_id
+image_meta_get_orientation
+image_meta_get_width
+image_meta_is_burst_shot
+image_meta_set_orientation
+image_meta_update_to_db
+media_album_clone
+media_album_destroy
+media_album_foreach_album_from_db
+media_album_foreach_media_from_db
+media_album_get_album_art
+media_album_get_album_count_from_db
+media_album_get_album_from_db
+media_album_get_album_id
+media_album_get_artist
+media_album_get_media_count_from_db
+media_album_get_name
+media_bookmark_clone
+media_bookmark_delete_from_db
+media_bookmark_destroy
+media_bookmark_get_bookmark_count_from_db
+media_bookmark_get_bookmark_id
+media_bookmark_get_marked_time
+media_bookmark_get_thumbnail_path
+media_bookmark_insert_to_db
+media_content_connect
+media_content_disconnect
+media_content_scan_file
+media_content_scan_folder
+media_content_set_db_updated_cb
+media_content_unset_db_updated_cb
+media_filter_create
+media_filter_destroy
+media_filter_get_condition
+media_filter_get_offset
+media_filter_get_order
+media_filter_set_condition
+media_filter_set_offset
+media_filter_set_order
+media_folder_clone
+media_folder_destroy
+media_folder_foreach_folder_from_db
+media_folder_foreach_media_from_db
+media_folder_get_folder_count_from_db
+media_folder_get_folder_from_db
+media_folder_get_folder_id
+media_folder_get_media_count_from_db
+media_folder_get_modified_time
+media_folder_get_name
+media_folder_get_path
+media_folder_get_storage_type
+media_folder_set_name
+media_folder_update_to_db
+media_group_foreach_group_from_db
+media_group_foreach_media_from_db
+media_group_get_group_count_from_db
+media_group_get_media_count_from_db
+media_info_cancel_thumbnail
+media_info_clone
+media_info_create_thumbnail
+media_info_delete_batch_from_db
+media_info_delete_from_db
+media_info_destroy
+media_info_foreach_bookmark_from_db
+media_info_foreach_media_from_db
+media_info_foreach_tag_from_db
+media_info_get_added_time
+media_info_get_age_rating
+media_info_get_altitude
+media_info_get_audio
+media_info_get_author
+media_info_get_bookmark_count_from_db
+media_info_get_category
+media_info_get_content_name
+media_info_get_description
+media_info_get_display_name
+media_info_get_favorite
+media_info_get_file_path
+media_info_get_image
+media_info_get_keyword
+media_info_get_latitude
+media_info_get_location_tag
+media_info_get_longitude
+media_info_get_media_count_from_db
+media_info_get_media_from_db
+media_info_get_media_id
+media_info_get_media_type
+media_info_get_mime_type
+media_info_get_modified_time
+media_info_get_provider
+media_info_get_rating
+media_info_get_size
+media_info_get_storage_type
+media_info_get_tag_count_from_db
+media_info_get_thumbnail_path
+media_info_get_timeline
+media_info_get_title
+media_info_get_video
+media_info_get_weather
+media_info_insert_batch_to_db
+media_info_insert_burst_shot_to_db
+media_info_insert_to_db
+media_info_is_drm
+media_info_move_to_db
+media_info_refresh_metadata_to_db
+media_info_set_added_time
+media_info_set_age_rating
+media_info_set_altitude
+media_info_set_author
+media_info_set_category
+media_info_set_content_name
+media_info_set_description
+media_info_set_display_name
+media_info_set_favorite
+media_info_set_keyword
+media_info_set_latitude
+media_info_set_location_tag
+media_info_set_longitude
+media_info_set_provider
+media_info_set_rating
+media_info_set_weather
+media_info_update_to_db
+media_playlist_add_media
+media_playlist_clone
+media_playlist_delete_from_db
+media_playlist_destroy
+media_playlist_foreach_media_from_db
+media_playlist_foreach_playlist_from_db
+media_playlist_get_media_count_from_db
+media_playlist_get_name
+media_playlist_get_play_order
+media_playlist_get_playlist_count_from_db
+media_playlist_get_playlist_from_db
+media_playlist_get_playlist_id
+media_playlist_get_thumbnail_path
+media_playlist_insert_to_db
+media_playlist_remove_media
+media_playlist_set_name
+media_playlist_set_play_order
+media_playlist_set_thumbnail_path
+media_playlist_update_to_db
+media_tag_add_media
+media_tag_clone
+media_tag_delete_from_db
+media_tag_destroy
+media_tag_foreach_media_from_db
+media_tag_foreach_tag_from_db
+media_tag_get_media_count_from_db
+media_tag_get_name
+media_tag_get_tag_count_from_db
+media_tag_get_tag_from_db
+media_tag_get_tag_id
+media_tag_insert_to_db
+media_tag_remove_media
+media_tag_set_name
+media_tag_update_to_db
+video_meta_clone
+video_meta_destroy
+video_meta_get_album
+video_meta_get_album_artist
+video_meta_get_artist
+video_meta_get_bit_rate
+video_meta_get_composer
+video_meta_get_copyright
+video_meta_get_duration
+video_meta_get_genre
+video_meta_get_height
+video_meta_get_media_id
+video_meta_get_played_count
+video_meta_get_played_position
+video_meta_get_played_time
+video_meta_get_recorded_date
+video_meta_get_track_num
+video_meta_get_width
+video_meta_get_year
+video_meta_set_played_count
+video_meta_set_played_position
+video_meta_set_played_time
+video_meta_update_to_db
+
diff --git a/src/utc/media-content/res/image.jpg b/src/utc/media-content/res/image.jpg
new file mode 100755 (executable)
index 0000000..a1a4fc4
Binary files /dev/null and b/src/utc/media-content/res/image.jpg differ
diff --git a/src/utc/media-content/res/movie.mp4 b/src/utc/media-content/res/movie.mp4
new file mode 100755 (executable)
index 0000000..84ba7de
Binary files /dev/null and b/src/utc/media-content/res/movie.mp4 differ
diff --git a/src/utc/media-content/res/sound.m4a b/src/utc/media-content/res/sound.m4a
new file mode 100755 (executable)
index 0000000..93971f6
Binary files /dev/null and b/src/utc/media-content/res/sound.m4a differ
diff --git a/src/utc/media-content/res/test/test.jpg b/src/utc/media-content/res/test/test.jpg
new file mode 100755 (executable)
index 0000000..a1a4fc4
Binary files /dev/null and b/src/utc/media-content/res/test/test.jpg differ
diff --git a/src/utc/media-content/tct-media-content-core.c b/src/utc/media-content/tct-media-content-core.c
new file mode 100755 (executable)
index 0000000..53b8d70
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-media-content-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/media-content/tct-media-content-core.h b/src/utc/media-content/tct-media-content-core.h
new file mode 100755 (executable)
index 0000000..4e82646
--- /dev/null
@@ -0,0 +1,892 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_MEDIA_CONTENT_CORE_H__
+#define __TCT_MEDIA_CONTENT_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_media_audio_startup(void);
+extern void utc_media_audio_cleanup(void);
+extern void utc_media_bookmark_delete_startup(void);
+extern void utc_media_bookmark_delete_cleanup(void);
+extern void utc_media_bookmark_insert_startup(void);
+extern void utc_media_bookmark_insert_cleanup(void);
+extern void utc_media_bookmark_startup(void);
+extern void utc_media_bookmark_cleanup(void);
+extern void utc_media_content_startup(void);
+extern void utc_media_content_cleanup(void);
+extern void utc_media_filter_create_cleanup(void);
+extern void utc_media_filter_destroy_startup(void);
+extern void utc_media_filter_destroy_cleanup(void);
+extern void utc_media_filter_startup(void);
+extern void utc_media_filter_cleanup(void);
+extern void utc_media_folder_startup(void);
+extern void utc_media_folder_cleanup(void);
+extern void utc_media_group_startup(void);
+extern void utc_media_group_cleanup(void);
+extern void utc_media_image_startup(void);
+extern void utc_media_image_cleanup(void);
+extern void utc_media_info_startup(void);
+extern void utc_media_info_cleanup(void);
+extern void utc_media_playlist_startup(void);
+extern void utc_media_playlist_cleanup(void);
+extern void utc_media_tag_startup(void);
+extern void utc_media_tag_cleanup(void);
+extern void utc_media_video_startup(void);
+extern void utc_media_video_cleanup(void);
+
+extern int utc_media_audio_meta_destroy_n(void);
+extern int utc_media_audio_meta_destroy_p(void);
+extern int utc_media_audio_meta_clone_n(void);
+extern int utc_media_audio_meta_clone_p(void);
+extern int utc_media_audio_meta_get_media_id_n(void);
+extern int utc_media_audio_meta_get_media_id_p(void);
+extern int utc_media_audio_meta_get_album_n(void);
+extern int utc_media_audio_meta_get_album_p(void);
+extern int utc_media_audio_meta_get_artist_n(void);
+extern int utc_media_audio_meta_get_artist_p(void);
+extern int utc_media_audio_meta_get_album_artist_n(void);
+extern int utc_media_audio_meta_get_album_artist_p(void);
+extern int utc_media_audio_meta_get_genre_n(void);
+extern int utc_media_audio_meta_get_genre_p(void);
+extern int utc_media_audio_meta_get_composer_n(void);
+extern int utc_media_audio_meta_get_composer_p(void);
+extern int utc_media_audio_meta_get_year_n(void);
+extern int utc_media_audio_meta_get_year_p(void);
+extern int utc_media_audio_meta_get_recorded_date_n(void);
+extern int utc_media_audio_meta_get_recorded_date_p(void);
+extern int utc_media_audio_meta_get_copyright_n(void);
+extern int utc_media_audio_meta_get_copyright_p(void);
+extern int utc_media_audio_meta_get_track_num_n(void);
+extern int utc_media_audio_meta_get_track_num_p(void);
+extern int utc_media_audio_meta_get_bit_rate_n(void);
+extern int utc_media_audio_meta_get_bit_rate_p(void);
+extern int utc_media_audio_meta_get_sample_rate_n(void);
+extern int utc_media_audio_meta_get_sample_rate_p(void);
+extern int utc_media_audio_meta_get_channel_n(void);
+extern int utc_media_audio_meta_get_channel_p(void);
+extern int utc_media_audio_meta_get_duration_n(void);
+extern int utc_media_audio_meta_get_duration_p(void);
+extern int utc_media_audio_meta_get_played_count_n(void);
+extern int utc_media_audio_meta_get_played_count_p(void);
+extern int utc_media_audio_meta_get_played_time_n(void);
+extern int utc_media_audio_meta_get_played_time_p(void);
+extern int utc_media_audio_meta_get_played_position_n(void);
+extern int utc_media_audio_meta_get_played_position_p(void);
+extern int utc_media_audio_meta_get_bitpersample_n(void);
+extern int utc_media_audio_meta_get_bitpersample_p(void);
+extern int utc_media_audio_meta_set_played_count_n(void);
+extern int utc_media_audio_meta_set_played_count_p(void);
+extern int utc_media_audio_meta_set_played_time_n(void);
+extern int utc_media_audio_meta_set_played_time_p(void);
+extern int utc_media_audio_meta_set_played_position_n(void);
+extern int utc_media_audio_meta_set_played_position_p(void);
+extern int utc_media_audio_meta_update_to_db_n(void);
+extern int utc_media_audio_meta_update_to_db_p(void);
+extern int utc_media_bookmark_delete_from_db_n(void);
+extern int utc_media_bookmark_delete_from_db_p(void);
+extern int utc_media_bookmark_insert_to_db_n(void);
+extern int utc_media_bookmark_insert_to_db_p(void);
+extern int utc_media_bookmark_get_bookmark_count_from_db_n(void);
+extern int utc_media_bookmark_get_bookmark_count_from_db_p(void);
+extern int utc_media_bookmark_clone_n(void);
+extern int utc_media_bookmark_clone_p(void);
+extern int utc_media_bookmark_destroy_n(void);
+extern int utc_media_bookmark_destroy_p(void);
+extern int utc_media_bookmark_get_bookmark_id_n(void);
+extern int utc_media_bookmark_get_bookmark_id_p(void);
+extern int utc_media_bookmark_get_marked_time_n(void);
+extern int utc_media_bookmark_get_marked_time_p(void);
+extern int utc_media_bookmark_get_thumbnail_path_n(void);
+extern int utc_media_bookmark_get_thumbnail_path_p(void);
+extern int utc_media_content_connect_p(void);
+extern int utc_media_content_connect_n(void);
+extern int utc_media_content_disconnect_p(void);
+extern int utc_media_content_disconnect_n(void);
+extern int utc_media_content_scan_file_n(void);
+extern int utc_media_content_scan_file_p(void);
+extern int utc_media_content_scan_folder_n(void);
+extern int utc_media_content_scan_folder_p(void);
+extern int utc_media_content_set_db_updated_cb_n(void);
+extern int utc_media_content_set_db_updated_cb_p(void);
+extern int utc_media_content_unset_db_updated_cb_p(void);
+extern int utc_media_content_unset_db_updated_cb_n(void);
+extern int utc_media_filter_create_n(void);
+extern int utc_media_filter_create_p(void);
+extern int utc_media_filter_destroy_n(void);
+extern int utc_media_filter_destroy_p(void);
+extern int utc_media_filter_set_offset_n(void);
+extern int utc_media_filter_set_offset_p(void);
+extern int utc_media_filter_set_condition_n(void);
+extern int utc_media_filter_set_condition_p(void);
+extern int utc_media_filter_set_order_n(void);
+extern int utc_media_filter_set_order_p(void);
+extern int utc_media_filter_get_offset_n(void);
+extern int utc_media_filter_get_offset_p(void);
+extern int utc_media_filter_get_condition_n(void);
+extern int utc_media_filter_get_condition_p(void);
+extern int utc_media_filter_get_order_n(void);
+extern int utc_media_filter_get_order_p(void);
+extern int utc_media_folder_foreach_folder_from_db_n(void);
+extern int utc_media_folder_foreach_folder_from_db_p(void);
+extern int utc_media_folder_get_media_count_from_db_n(void);
+extern int utc_media_folder_get_media_count_from_db_p(void);
+extern int utc_media_folder_foreach_media_from_db_n(void);
+extern int utc_media_folder_foreach_media_from_db_p(void);
+extern int utc_media_folder_clone_n(void);
+extern int utc_media_folder_clone_p(void);
+extern int utc_media_folder_get_path_n(void);
+extern int utc_media_folder_get_path_p(void);
+extern int utc_media_folder_get_modified_time_p(void);
+extern int utc_media_folder_get_modified_time_n(void);
+extern int utc_media_folder_get_name_n(void);
+extern int utc_media_folder_get_name_p(void);
+extern int utc_media_folder_get_date_modified_n(void);
+extern int utc_media_folder_get_date_modified_p(void);
+extern int utc_media_folder_get_storage_type_n(void);
+extern int utc_media_folder_get_storage_type_p(void);
+extern int utc_media_folder_set_name_n(void);
+extern int utc_media_folder_set_name_p(void);
+extern int utc_media_folder_update_to_db_n(void);
+extern int utc_media_folder_update_to_db_p(void);
+extern int utc_media_folder_get_folder_id_n(void);
+extern int utc_media_folder_get_folder_id_p(void);
+extern int utc_media_folder_get_folder_from_db_n(void);
+extern int utc_media_folder_get_folder_from_db_p(void);
+extern int utc_media_folder_get_folder_count_from_db_n(void);
+extern int utc_media_folder_get_folder_count_from_db_p(void);
+extern int utc_media_folder_destroy_n(void);
+extern int utc_media_folder_destroy_p(void);
+extern int utc_media_album_get_album_count_from_db_n(void);
+extern int utc_media_album_get_album_count_from_db_p(void);
+extern int utc_media_album_foreach_album_from_db_n(void);
+extern int utc_media_album_foreach_album_from_db_p(void);
+extern int utc_media_album_get_media_count_from_db_n(void);
+extern int utc_media_album_get_media_count_from_db_p(void);
+extern int utc_media_album_foreach_media_from_db_n(void);
+extern int utc_media_album_foreach_media_from_db_p(void);
+extern int utc_media_album_get_album_from_db_n(void);
+extern int utc_media_album_get_album_from_db_p(void);
+extern int utc_media_album_get_album_id_n(void);
+extern int utc_media_album_get_album_id_p(void);
+extern int utc_media_album_get_name_n(void);
+extern int utc_media_album_get_name_p(void);
+extern int utc_media_album_get_artist_n(void);
+extern int utc_media_album_get_artist_p(void);
+extern int utc_media_album_get_album_art_n(void);
+extern int utc_media_album_get_album_art_p(void);
+extern int utc_media_album_clone_n(void);
+extern int utc_media_album_clone_p(void);
+extern int utc_media_album_destroy_n(void);
+extern int utc_media_album_destroy_p(void);
+extern int utc_media_group_get_group_count_from_db_n(void);
+extern int utc_media_group_get_group_count_from_db_p(void);
+extern int utc_media_group_get_media_count_from_db_n(void);
+extern int utc_media_group_get_media_count_from_db_p(void);
+extern int utc_media_group_foreach_group_from_db_n(void);
+extern int utc_media_group_foreach_group_from_db_p(void);
+extern int utc_media_group_foreach_media_from_db_n(void);
+extern int utc_media_group_foreach_media_from_db_p(void);
+extern int utc_image_meta_destroy_n(void);
+extern int utc_image_meta_destroy_p(void);
+extern int utc_image_meta_clone_n(void);
+extern int utc_image_meta_clone_p(void);
+extern int utc_image_meta_get_media_id_n(void);
+extern int utc_image_meta_get_media_id_p(void);
+extern int utc_image_meta_get_width_n(void);
+extern int utc_image_meta_get_width_p(void);
+extern int utc_image_meta_get_height_n(void);
+extern int utc_image_meta_get_height_p(void);
+extern int utc_image_meta_get_orientation_n(void);
+extern int utc_image_meta_get_orientation_p(void);
+extern int utc_image_meta_get_date_taken_n(void);
+extern int utc_image_meta_get_date_taken_p(void);
+extern int utc_image_meta_set_orientation_n(void);
+extern int utc_image_meta_set_orientation_p(void);
+extern int utc_image_meta_update_to_db_n(void);
+extern int utc_image_meta_update_to_db_p(void);
+extern int utc_image_meta_get_burst_id_n(void);
+extern int utc_image_meta_get_burst_id_p(void);
+extern int utc_image_meta_is_burst_shot_n(void);
+extern int utc_image_meta_is_burst_shot_p(void);
+extern int utc_media_info_insert_to_db_n(void);
+extern int utc_media_info_insert_to_db_p(void);
+extern int utc_media_info_insert_batch_to_db_n(void);
+extern int utc_media_info_insert_batch_to_db_p(void);
+extern int utc_media_info_set_display_name_n(void);
+extern int utc_media_info_set_display_name_p(void);
+extern int utc_media_info_set_favorite_n(void);
+extern int utc_media_info_set_favorite_p(void);
+extern int utc_media_info_set_altitude_n(void);
+extern int utc_media_info_set_altitude_p(void);
+extern int utc_media_info_set_latitude_n(void);
+extern int utc_media_info_set_latitude_p(void);
+extern int utc_media_info_set_longitude_n(void);
+extern int utc_media_info_set_longitude_p(void);
+extern int utc_media_info_set_weather_n(void);
+extern int utc_media_info_set_weather_p(void);
+extern int utc_media_info_set_rating_n(void);
+extern int utc_media_info_set_rating_p(void);
+extern int utc_media_info_set_category_n(void);
+extern int utc_media_info_set_category_p(void);
+extern int utc_media_info_set_location_tag_n(void);
+extern int utc_media_info_set_location_tag_p(void);
+extern int utc_media_info_set_provider_n(void);
+extern int utc_media_info_set_provider_p(void);
+extern int utc_media_info_set_content_name_n(void);
+extern int utc_media_info_set_content_name_p(void);
+extern int utc_media_info_set_description_n(void);
+extern int utc_media_info_set_description_p(void);
+extern int utc_media_info_set_author_n(void);
+extern int utc_media_info_set_author_p(void);
+extern int utc_media_info_set_age_rating_n(void);
+extern int utc_media_info_set_age_rating_p(void);
+extern int utc_media_info_set_added_time_n(void);
+extern int utc_media_info_set_added_time_p(void);
+extern int utc_media_info_set_keyword_n(void);
+extern int utc_media_info_set_keyword_p(void);
+extern int utc_media_info_update_to_db_n(void);
+extern int utc_media_info_update_to_db_p(void);
+extern int utc_media_info_create_thumbnail_n(void);
+extern int utc_media_info_create_thumbnail_p(void);
+extern int utc_media_info_move_to_db_n(void);
+extern int utc_media_info_move_to_db_p(void);
+extern int utc_media_info_delete_from_db_n(void);
+extern int utc_media_info_delete_from_db_p(void);
+extern int utc_media_info_delete_batch_from_db_n(void);
+extern int utc_media_info_delete_batch_from_db_p(void);
+extern int utc_media_info_foreach_media_from_db_n(void);
+extern int utc_media_info_foreach_media_from_db_p(void);
+extern int utc_media_info_destroy_n(void);
+extern int utc_media_info_destroy_p(void);
+extern int utc_media_info_clone_n(void);
+extern int utc_media_info_clone_p(void);
+extern int utc_media_info_get_media_id_n(void);
+extern int utc_media_info_get_media_id_p(void);
+extern int utc_media_info_get_file_path_n(void);
+extern int utc_media_info_get_file_path_p(void);
+extern int utc_media_info_get_display_name_n(void);
+extern int utc_media_info_get_display_name_p(void);
+extern int utc_media_info_get_media_type_n(void);
+extern int utc_media_info_get_media_type_p(void);
+extern int utc_media_info_get_mime_type_n(void);
+extern int utc_media_info_get_mime_type_p(void);
+extern int utc_media_info_get_thumbnail_path_n(void);
+extern int utc_media_info_get_thumbnail_path_p(void);
+extern int utc_media_info_get_modified_time_n(void);
+extern int utc_media_info_get_modified_time_p(void);
+extern int utc_media_info_get_size_n(void);
+extern int utc_media_info_get_size_p(void);
+extern int utc_media_info_get_storage_type_n(void);
+extern int utc_media_info_get_storage_type_p(void);
+extern int utc_media_info_is_drm_n(void);
+extern int utc_media_info_is_drm_p(void);
+extern int utc_media_info_get_altitude_n(void);
+extern int utc_media_info_get_altitude_p(void);
+extern int utc_media_info_get_latitude_n(void);
+extern int utc_media_info_get_latitude_p(void);
+extern int utc_media_info_get_longitude_n(void);
+extern int utc_media_info_get_longitude_p(void);
+extern int utc_media_info_get_weather_n(void);
+extern int utc_media_info_get_weather_p(void);
+extern int utc_media_info_get_description_n(void);
+extern int utc_media_info_get_description_p(void);
+extern int utc_media_info_get_rating_n(void);
+extern int utc_media_info_get_rating_p(void);
+extern int utc_media_info_get_location_tag_n(void);
+extern int utc_media_info_get_location_tag_p(void);
+extern int utc_media_info_get_provider_n(void);
+extern int utc_media_info_get_provider_p(void);
+extern int utc_media_info_get_content_name_n(void);
+extern int utc_media_info_get_content_name_p(void);
+extern int utc_media_info_get_category_n(void);
+extern int utc_media_info_get_category_p(void);
+extern int utc_media_info_get_age_rating_n(void);
+extern int utc_media_info_get_age_rating_p(void);
+extern int utc_media_info_get_keyword_n(void);
+extern int utc_media_info_get_keyword_p(void);
+extern int utc_media_info_get_author_n(void);
+extern int utc_media_info_get_author_p(void);
+extern int utc_media_info_get_added_time_n(void);
+extern int utc_media_info_get_added_time_p(void);
+extern int utc_media_info_get_favorite_n(void);
+extern int utc_media_info_get_favorite_p(void);
+extern int utc_media_info_get_media_from_db_n(void);
+extern int utc_media_info_get_media_from_db_p(void);
+extern int utc_media_info_get_image_n(void);
+extern int utc_media_info_get_image_p(void);
+extern int utc_media_info_get_video_n(void);
+extern int utc_media_info_get_video_p(void);
+extern int utc_media_info_get_audio_n(void);
+extern int utc_media_info_get_audio_p(void);
+extern int utc_media_info_refresh_metadata_to_db_n(void);
+extern int utc_media_info_refresh_metadata_to_db_p(void);
+extern int utc_media_info_foreach_tag_from_db_n(void);
+extern int utc_media_info_foreach_tag_from_db_p(void);
+extern int utc_media_info_foreach_bookmark_from_db_n(void);
+extern int utc_media_info_foreach_bookmark_from_db_p(void);
+extern int utc_media_info_get_bookmark_count_from_db_n(void);
+extern int utc_media_info_get_bookmark_count_from_db_p(void);
+extern int utc_media_info_get_media_count_from_db_n(void);
+extern int utc_media_info_get_media_count_from_db_p(void);
+extern int utc_media_info_get_tag_count_from_db_n(void);
+extern int utc_media_info_get_tag_count_from_db_p(void);
+extern int utc_media_info_get_timeline_n(void);
+extern int utc_media_info_get_timeline_p(void);
+extern int utc_media_info_get_title_n(void);
+extern int utc_media_info_get_title_p(void);
+extern int utc_media_info_cancel_thumbnail_n(void);
+extern int utc_media_info_cancel_thumbnail_p(void);
+extern int utc_media_info_insert_burst_shot_to_db_n(void);
+extern int utc_media_info_insert_burst_shot_to_db_p(void);
+extern int utc_media_playlist_insert_to_db_n(void);
+extern int utc_media_playlist_insert_to_db_p(void);
+extern int utc_media_playlist_delete_from_db_n(void);
+extern int utc_media_playlist_delete_from_db_p(void);
+extern int utc_media_playlist_get_playlist_count_from_db_n(void);
+extern int utc_media_playlist_get_playlist_count_from_db_p(void);
+extern int utc_media_playlist_foreach_playlist_from_db_n(void);
+extern int utc_media_playlist_foreach_playlist_from_db_p(void);
+extern int utc_media_playlist_get_media_count_from_db_n(void);
+extern int utc_media_playlist_get_media_count_from_db_p(void);
+extern int utc_media_playlist_foreach_media_from_db_n(void);
+extern int utc_media_playlist_foreach_media_from_db_p(void);
+extern int utc_media_playlist_destroy_n(void);
+extern int utc_media_playlist_destroy_p(void);
+extern int utc_media_playlist_clone_n(void);
+extern int utc_media_playlist_clone_p(void);
+extern int utc_media_playlist_get_playlist_from_db_n(void);
+extern int utc_media_playlist_get_playlist_from_db_p(void);
+extern int utc_media_playlist_get_playlist_id_n(void);
+extern int utc_media_playlist_get_playlist_id_p(void);
+extern int utc_media_playlist_get_name_n(void);
+extern int utc_media_playlist_get_name_p(void);
+extern int utc_media_playlist_get_play_order_n(void);
+extern int utc_media_playlist_get_play_order_p(void);
+extern int utc_media_playlist_update_to_db_n(void);
+extern int utc_media_playlist_update_to_db_p(void);
+extern int utc_media_playlist_set_name_n(void);
+extern int utc_media_playlist_set_name_p(void);
+extern int utc_media_playlist_add_media_n(void);
+extern int utc_media_playlist_add_media_p(void);
+extern int utc_media_playlist_set_play_order_n(void);
+extern int utc_media_playlist_set_play_order_p(void);
+extern int utc_media_playlist_remove_media_n(void);
+extern int utc_media_playlist_remove_media_p(void);
+extern int utc_media_playlist_get_thumbnail_path_n(void);
+extern int utc_media_playlist_get_thumbnail_path_p(void);
+extern int utc_media_playlist_set_thumbnail_path_n(void);
+extern int utc_media_playlist_set_thumbnail_path_p(void);
+extern int utc_media_tag_insert_to_db_n(void);
+extern int utc_media_tag_insert_to_db_p(void);
+extern int utc_media_tag_delete_from_db_n(void);
+extern int utc_media_tag_delete_from_db_p(void);
+extern int utc_media_tag_get_tag_count_from_db_n(void);
+extern int utc_media_tag_get_tag_count_from_db_p(void);
+extern int utc_media_tag_foreach_tag_from_db_n(void);
+extern int utc_media_tag_foreach_tag_from_db_p(void);
+extern int utc_media_tag_get_media_count_from_db_n(void);
+extern int utc_media_tag_get_media_count_from_db_p(void);
+extern int utc_media_tag_foreach_media_from_db_n(void);
+extern int utc_media_tag_foreach_media_from_db_p(void);
+extern int utc_media_tag_clone_n(void);
+extern int utc_media_tag_clone_p(void);
+extern int utc_media_tag_update_to_db_n(void);
+extern int utc_media_tag_update_to_db_p(void);
+extern int utc_media_tag_add_media_n(void);
+extern int utc_media_tag_add_media_p(void);
+extern int utc_media_tag_remove_media_n(void);
+extern int utc_media_tag_remove_media_p(void);
+extern int utc_media_tag_set_name_n(void);
+extern int utc_media_tag_set_name_p(void);
+extern int utc_media_tag_get_tag_id_n(void);
+extern int utc_media_tag_get_tag_id_p(void);
+extern int utc_media_tag_get_name_n(void);
+extern int utc_media_tag_get_name_p(void);
+extern int utc_media_tag_get_tag_from_db_n(void);
+extern int utc_media_tag_get_tag_from_db_p(void);
+extern int utc_media_tag_destroy_n(void);
+extern int utc_media_tag_destroy_p(void);
+extern int utc_video_meta_destroy_n(void);
+extern int utc_video_meta_destroy_p(void);
+extern int utc_video_meta_clone_n(void);
+extern int utc_video_meta_clone_p(void);
+extern int utc_video_meta_get_media_id_n(void);
+extern int utc_video_meta_get_media_id_p(void);
+extern int utc_video_meta_get_album_n(void);
+extern int utc_video_meta_get_album_p(void);
+extern int utc_video_meta_get_artist_n(void);
+extern int utc_video_meta_get_artist_p(void);
+extern int utc_video_meta_get_album_artist_n(void);
+extern int utc_video_meta_get_album_artist_p(void);
+extern int utc_video_meta_get_genre_n(void);
+extern int utc_video_meta_get_genre_p(void);
+extern int utc_video_meta_get_composer_n(void);
+extern int utc_video_meta_get_composer_p(void);
+extern int utc_video_meta_get_year_n(void);
+extern int utc_video_meta_get_year_p(void);
+extern int utc_video_meta_get_recorded_date_n(void);
+extern int utc_video_meta_get_recorded_date_p(void);
+extern int utc_video_meta_get_copyright_n(void);
+extern int utc_video_meta_get_copyright_p(void);
+extern int utc_video_meta_get_track_num_n(void);
+extern int utc_video_meta_get_track_num_p(void);
+extern int utc_video_meta_get_bit_rate_n(void);
+extern int utc_video_meta_get_bit_rate_p(void);
+extern int utc_video_meta_get_duration_n(void);
+extern int utc_video_meta_get_duration_p(void);
+extern int utc_video_meta_get_width_n(void);
+extern int utc_video_meta_get_width_p(void);
+extern int utc_video_meta_get_height_n(void);
+extern int utc_video_meta_get_height_p(void);
+extern int utc_video_meta_get_played_count_n(void);
+extern int utc_video_meta_get_played_count_p(void);
+extern int utc_video_meta_get_played_time_n(void);
+extern int utc_video_meta_get_played_time_p(void);
+extern int utc_video_meta_get_played_position_n(void);
+extern int utc_video_meta_get_played_position_p(void);
+extern int utc_video_meta_set_played_count_n(void);
+extern int utc_video_meta_set_played_count_p(void);
+extern int utc_video_meta_set_played_time_n(void);
+extern int utc_video_meta_set_played_time_p(void);
+extern int utc_video_meta_set_played_position_n(void);
+extern int utc_video_meta_set_played_position_p(void);
+extern int utc_video_meta_update_to_db_n(void);
+extern int utc_video_meta_update_to_db_p(void);
+
+testcase tc_array[] = {
+    {"utc_media_audio_meta_destroy_n", utc_media_audio_meta_destroy_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_destroy_p", utc_media_audio_meta_destroy_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_clone_n", utc_media_audio_meta_clone_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_clone_p", utc_media_audio_meta_clone_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_media_id_n", utc_media_audio_meta_get_media_id_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_media_id_p", utc_media_audio_meta_get_media_id_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_album_n", utc_media_audio_meta_get_album_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_album_p", utc_media_audio_meta_get_album_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_artist_n", utc_media_audio_meta_get_artist_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_artist_p", utc_media_audio_meta_get_artist_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_album_artist_n", utc_media_audio_meta_get_album_artist_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_album_artist_p", utc_media_audio_meta_get_album_artist_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_genre_n", utc_media_audio_meta_get_genre_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_genre_p", utc_media_audio_meta_get_genre_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_composer_n", utc_media_audio_meta_get_composer_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_composer_p", utc_media_audio_meta_get_composer_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_year_n", utc_media_audio_meta_get_year_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_year_p", utc_media_audio_meta_get_year_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_recorded_date_n", utc_media_audio_meta_get_recorded_date_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_recorded_date_p", utc_media_audio_meta_get_recorded_date_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_copyright_n", utc_media_audio_meta_get_copyright_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_copyright_p", utc_media_audio_meta_get_copyright_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_track_num_n", utc_media_audio_meta_get_track_num_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_track_num_p", utc_media_audio_meta_get_track_num_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_bit_rate_n", utc_media_audio_meta_get_bit_rate_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_bit_rate_p", utc_media_audio_meta_get_bit_rate_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_sample_rate_n", utc_media_audio_meta_get_sample_rate_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_sample_rate_p", utc_media_audio_meta_get_sample_rate_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_channel_n", utc_media_audio_meta_get_channel_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_channel_p", utc_media_audio_meta_get_channel_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_duration_n", utc_media_audio_meta_get_duration_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_duration_p", utc_media_audio_meta_get_duration_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_played_count_n", utc_media_audio_meta_get_played_count_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_played_count_p", utc_media_audio_meta_get_played_count_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_played_time_n", utc_media_audio_meta_get_played_time_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_played_time_p", utc_media_audio_meta_get_played_time_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_played_position_n", utc_media_audio_meta_get_played_position_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_played_position_p", utc_media_audio_meta_get_played_position_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_bitpersample_n", utc_media_audio_meta_get_bitpersample_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_get_bitpersample_p", utc_media_audio_meta_get_bitpersample_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_set_played_count_n", utc_media_audio_meta_set_played_count_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_set_played_count_p", utc_media_audio_meta_set_played_count_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_set_played_time_n", utc_media_audio_meta_set_played_time_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_set_played_time_p", utc_media_audio_meta_set_played_time_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_set_played_position_n", utc_media_audio_meta_set_played_position_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_set_played_position_p", utc_media_audio_meta_set_played_position_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_update_to_db_n", utc_media_audio_meta_update_to_db_n, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_audio_meta_update_to_db_p", utc_media_audio_meta_update_to_db_p, utc_media_audio_startup, utc_media_audio_cleanup},
+    {"utc_media_bookmark_delete_from_db_n", utc_media_bookmark_delete_from_db_n, utc_media_bookmark_delete_startup, utc_media_bookmark_delete_cleanup},
+    {"utc_media_bookmark_delete_from_db_p", utc_media_bookmark_delete_from_db_p, utc_media_bookmark_delete_startup, utc_media_bookmark_delete_cleanup},
+    {"utc_media_bookmark_insert_to_db_n", utc_media_bookmark_insert_to_db_n, utc_media_bookmark_insert_startup, utc_media_bookmark_insert_cleanup},
+    {"utc_media_bookmark_insert_to_db_p", utc_media_bookmark_insert_to_db_p, utc_media_bookmark_insert_startup, utc_media_bookmark_insert_cleanup},
+    {"utc_media_bookmark_get_bookmark_count_from_db_n", utc_media_bookmark_get_bookmark_count_from_db_n, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_bookmark_get_bookmark_count_from_db_p", utc_media_bookmark_get_bookmark_count_from_db_p, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_bookmark_clone_n", utc_media_bookmark_clone_n, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_bookmark_clone_p", utc_media_bookmark_clone_p, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_bookmark_destroy_n", utc_media_bookmark_destroy_n, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_bookmark_destroy_p", utc_media_bookmark_destroy_p, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_bookmark_get_bookmark_id_n", utc_media_bookmark_get_bookmark_id_n, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_bookmark_get_bookmark_id_p", utc_media_bookmark_get_bookmark_id_p, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_bookmark_get_marked_time_n", utc_media_bookmark_get_marked_time_n, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_bookmark_get_marked_time_p", utc_media_bookmark_get_marked_time_p, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_bookmark_get_thumbnail_path_n", utc_media_bookmark_get_thumbnail_path_n, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_bookmark_get_thumbnail_path_p", utc_media_bookmark_get_thumbnail_path_p, utc_media_bookmark_startup, utc_media_bookmark_cleanup},
+    {"utc_media_content_connect_p", utc_media_content_connect_p, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_content_connect_n", utc_media_content_connect_n, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_content_disconnect_p", utc_media_content_disconnect_p, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_content_disconnect_n", utc_media_content_disconnect_n, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_content_scan_file_n", utc_media_content_scan_file_n, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_content_scan_file_p", utc_media_content_scan_file_p, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_content_scan_folder_n", utc_media_content_scan_folder_n, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_content_scan_folder_p", utc_media_content_scan_folder_p, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_content_set_db_updated_cb_n", utc_media_content_set_db_updated_cb_n, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_content_set_db_updated_cb_p", utc_media_content_set_db_updated_cb_p, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_content_unset_db_updated_cb_p", utc_media_content_unset_db_updated_cb_p, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_content_unset_db_updated_cb_n", utc_media_content_unset_db_updated_cb_n, utc_media_content_startup, utc_media_content_cleanup},
+    {"utc_media_filter_create_n", utc_media_filter_create_n, NULL, utc_media_filter_create_cleanup},
+    {"utc_media_filter_create_p", utc_media_filter_create_p, NULL, utc_media_filter_create_cleanup},
+    {"utc_media_filter_destroy_n", utc_media_filter_destroy_n, utc_media_filter_destroy_startup, utc_media_filter_destroy_cleanup},
+    {"utc_media_filter_destroy_p", utc_media_filter_destroy_p, utc_media_filter_destroy_startup, utc_media_filter_destroy_cleanup},
+    {"utc_media_filter_set_offset_n", utc_media_filter_set_offset_n, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_filter_set_offset_p", utc_media_filter_set_offset_p, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_filter_set_condition_n", utc_media_filter_set_condition_n, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_filter_set_condition_p", utc_media_filter_set_condition_p, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_filter_set_order_n", utc_media_filter_set_order_n, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_filter_set_order_p", utc_media_filter_set_order_p, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_filter_get_offset_n", utc_media_filter_get_offset_n, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_filter_get_offset_p", utc_media_filter_get_offset_p, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_filter_get_condition_n", utc_media_filter_get_condition_n, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_filter_get_condition_p", utc_media_filter_get_condition_p, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_filter_get_order_n", utc_media_filter_get_order_n, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_filter_get_order_p", utc_media_filter_get_order_p, utc_media_filter_startup, utc_media_filter_cleanup},
+    {"utc_media_folder_foreach_folder_from_db_n", utc_media_folder_foreach_folder_from_db_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_foreach_folder_from_db_p", utc_media_folder_foreach_folder_from_db_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_media_count_from_db_n", utc_media_folder_get_media_count_from_db_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_media_count_from_db_p", utc_media_folder_get_media_count_from_db_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_foreach_media_from_db_n", utc_media_folder_foreach_media_from_db_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_foreach_media_from_db_p", utc_media_folder_foreach_media_from_db_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_clone_n", utc_media_folder_clone_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_clone_p", utc_media_folder_clone_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_path_n", utc_media_folder_get_path_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_path_p", utc_media_folder_get_path_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_modified_time_p", utc_media_folder_get_modified_time_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_modified_time_n", utc_media_folder_get_modified_time_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_name_n", utc_media_folder_get_name_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_name_p", utc_media_folder_get_name_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_date_modified_n", utc_media_folder_get_date_modified_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_date_modified_p", utc_media_folder_get_date_modified_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_storage_type_n", utc_media_folder_get_storage_type_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_storage_type_p", utc_media_folder_get_storage_type_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_set_name_n", utc_media_folder_set_name_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_set_name_p", utc_media_folder_set_name_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_update_to_db_n", utc_media_folder_update_to_db_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_update_to_db_p", utc_media_folder_update_to_db_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_folder_id_n", utc_media_folder_get_folder_id_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_folder_id_p", utc_media_folder_get_folder_id_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_folder_from_db_n", utc_media_folder_get_folder_from_db_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_folder_from_db_p", utc_media_folder_get_folder_from_db_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_folder_count_from_db_n", utc_media_folder_get_folder_count_from_db_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_get_folder_count_from_db_p", utc_media_folder_get_folder_count_from_db_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_destroy_n", utc_media_folder_destroy_n, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_folder_destroy_p", utc_media_folder_destroy_p, utc_media_folder_startup, utc_media_folder_cleanup},
+    {"utc_media_album_get_album_count_from_db_n", utc_media_album_get_album_count_from_db_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_album_count_from_db_p", utc_media_album_get_album_count_from_db_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_foreach_album_from_db_n", utc_media_album_foreach_album_from_db_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_foreach_album_from_db_p", utc_media_album_foreach_album_from_db_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_media_count_from_db_n", utc_media_album_get_media_count_from_db_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_media_count_from_db_p", utc_media_album_get_media_count_from_db_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_foreach_media_from_db_n", utc_media_album_foreach_media_from_db_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_foreach_media_from_db_p", utc_media_album_foreach_media_from_db_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_album_from_db_n", utc_media_album_get_album_from_db_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_album_from_db_p", utc_media_album_get_album_from_db_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_album_id_n", utc_media_album_get_album_id_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_album_id_p", utc_media_album_get_album_id_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_name_n", utc_media_album_get_name_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_name_p", utc_media_album_get_name_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_artist_n", utc_media_album_get_artist_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_artist_p", utc_media_album_get_artist_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_album_art_n", utc_media_album_get_album_art_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_get_album_art_p", utc_media_album_get_album_art_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_clone_n", utc_media_album_clone_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_clone_p", utc_media_album_clone_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_destroy_n", utc_media_album_destroy_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_album_destroy_p", utc_media_album_destroy_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_group_get_group_count_from_db_n", utc_media_group_get_group_count_from_db_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_group_get_group_count_from_db_p", utc_media_group_get_group_count_from_db_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_group_get_media_count_from_db_n", utc_media_group_get_media_count_from_db_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_group_get_media_count_from_db_p", utc_media_group_get_media_count_from_db_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_group_foreach_group_from_db_n", utc_media_group_foreach_group_from_db_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_group_foreach_group_from_db_p", utc_media_group_foreach_group_from_db_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_group_foreach_media_from_db_n", utc_media_group_foreach_media_from_db_n, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_media_group_foreach_media_from_db_p", utc_media_group_foreach_media_from_db_p, utc_media_group_startup, utc_media_group_cleanup},
+    {"utc_image_meta_destroy_n", utc_image_meta_destroy_n, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_destroy_p", utc_image_meta_destroy_p, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_clone_n", utc_image_meta_clone_n, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_clone_p", utc_image_meta_clone_p, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_media_id_n", utc_image_meta_get_media_id_n, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_media_id_p", utc_image_meta_get_media_id_p, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_width_n", utc_image_meta_get_width_n, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_width_p", utc_image_meta_get_width_p, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_height_n", utc_image_meta_get_height_n, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_height_p", utc_image_meta_get_height_p, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_orientation_n", utc_image_meta_get_orientation_n, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_orientation_p", utc_image_meta_get_orientation_p, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_date_taken_n", utc_image_meta_get_date_taken_n, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_date_taken_p", utc_image_meta_get_date_taken_p, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_set_orientation_n", utc_image_meta_set_orientation_n, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_set_orientation_p", utc_image_meta_set_orientation_p, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_update_to_db_n", utc_image_meta_update_to_db_n, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_update_to_db_p", utc_image_meta_update_to_db_p, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_burst_id_n", utc_image_meta_get_burst_id_n, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_get_burst_id_p", utc_image_meta_get_burst_id_p, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_is_burst_shot_n", utc_image_meta_is_burst_shot_n, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_image_meta_is_burst_shot_p", utc_image_meta_is_burst_shot_p, utc_media_image_startup, utc_media_image_cleanup},
+    {"utc_media_info_insert_to_db_n", utc_media_info_insert_to_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_insert_to_db_p", utc_media_info_insert_to_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_insert_batch_to_db_n", utc_media_info_insert_batch_to_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_insert_batch_to_db_p", utc_media_info_insert_batch_to_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_display_name_n", utc_media_info_set_display_name_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_display_name_p", utc_media_info_set_display_name_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_favorite_n", utc_media_info_set_favorite_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_favorite_p", utc_media_info_set_favorite_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_altitude_n", utc_media_info_set_altitude_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_altitude_p", utc_media_info_set_altitude_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_latitude_n", utc_media_info_set_latitude_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_latitude_p", utc_media_info_set_latitude_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_longitude_n", utc_media_info_set_longitude_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_longitude_p", utc_media_info_set_longitude_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_weather_n", utc_media_info_set_weather_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_weather_p", utc_media_info_set_weather_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_rating_n", utc_media_info_set_rating_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_rating_p", utc_media_info_set_rating_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_category_n", utc_media_info_set_category_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_category_p", utc_media_info_set_category_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_location_tag_n", utc_media_info_set_location_tag_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_location_tag_p", utc_media_info_set_location_tag_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_provider_n", utc_media_info_set_provider_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_provider_p", utc_media_info_set_provider_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_content_name_n", utc_media_info_set_content_name_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_content_name_p", utc_media_info_set_content_name_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_description_n", utc_media_info_set_description_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_description_p", utc_media_info_set_description_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_author_n", utc_media_info_set_author_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_author_p", utc_media_info_set_author_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_age_rating_n", utc_media_info_set_age_rating_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_age_rating_p", utc_media_info_set_age_rating_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_added_time_n", utc_media_info_set_added_time_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_added_time_p", utc_media_info_set_added_time_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_keyword_n", utc_media_info_set_keyword_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_set_keyword_p", utc_media_info_set_keyword_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_update_to_db_n", utc_media_info_update_to_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_update_to_db_p", utc_media_info_update_to_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_create_thumbnail_n", utc_media_info_create_thumbnail_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_create_thumbnail_p", utc_media_info_create_thumbnail_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_move_to_db_n", utc_media_info_move_to_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_move_to_db_p", utc_media_info_move_to_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_delete_from_db_n", utc_media_info_delete_from_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_delete_from_db_p", utc_media_info_delete_from_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_delete_batch_from_db_n", utc_media_info_delete_batch_from_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_delete_batch_from_db_p", utc_media_info_delete_batch_from_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_foreach_media_from_db_n", utc_media_info_foreach_media_from_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_foreach_media_from_db_p", utc_media_info_foreach_media_from_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_destroy_n", utc_media_info_destroy_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_destroy_p", utc_media_info_destroy_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_clone_n", utc_media_info_clone_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_clone_p", utc_media_info_clone_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_media_id_n", utc_media_info_get_media_id_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_media_id_p", utc_media_info_get_media_id_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_file_path_n", utc_media_info_get_file_path_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_file_path_p", utc_media_info_get_file_path_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_display_name_n", utc_media_info_get_display_name_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_display_name_p", utc_media_info_get_display_name_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_media_type_n", utc_media_info_get_media_type_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_media_type_p", utc_media_info_get_media_type_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_mime_type_n", utc_media_info_get_mime_type_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_mime_type_p", utc_media_info_get_mime_type_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_thumbnail_path_n", utc_media_info_get_thumbnail_path_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_thumbnail_path_p", utc_media_info_get_thumbnail_path_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_modified_time_n", utc_media_info_get_modified_time_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_modified_time_p", utc_media_info_get_modified_time_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_size_n", utc_media_info_get_size_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_size_p", utc_media_info_get_size_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_storage_type_n", utc_media_info_get_storage_type_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_storage_type_p", utc_media_info_get_storage_type_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_is_drm_n", utc_media_info_is_drm_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_is_drm_p", utc_media_info_is_drm_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_altitude_n", utc_media_info_get_altitude_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_altitude_p", utc_media_info_get_altitude_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_latitude_n", utc_media_info_get_latitude_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_latitude_p", utc_media_info_get_latitude_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_longitude_n", utc_media_info_get_longitude_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_longitude_p", utc_media_info_get_longitude_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_weather_n", utc_media_info_get_weather_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_weather_p", utc_media_info_get_weather_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_description_n", utc_media_info_get_description_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_description_p", utc_media_info_get_description_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_rating_n", utc_media_info_get_rating_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_rating_p", utc_media_info_get_rating_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_location_tag_n", utc_media_info_get_location_tag_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_location_tag_p", utc_media_info_get_location_tag_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_provider_n", utc_media_info_get_provider_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_provider_p", utc_media_info_get_provider_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_content_name_n", utc_media_info_get_content_name_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_content_name_p", utc_media_info_get_content_name_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_category_n", utc_media_info_get_category_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_category_p", utc_media_info_get_category_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_age_rating_n", utc_media_info_get_age_rating_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_age_rating_p", utc_media_info_get_age_rating_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_keyword_n", utc_media_info_get_keyword_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_keyword_p", utc_media_info_get_keyword_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_author_n", utc_media_info_get_author_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_author_p", utc_media_info_get_author_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_added_time_n", utc_media_info_get_added_time_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_added_time_p", utc_media_info_get_added_time_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_favorite_n", utc_media_info_get_favorite_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_favorite_p", utc_media_info_get_favorite_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_media_from_db_n", utc_media_info_get_media_from_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_media_from_db_p", utc_media_info_get_media_from_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_image_n", utc_media_info_get_image_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_image_p", utc_media_info_get_image_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_video_n", utc_media_info_get_video_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_video_p", utc_media_info_get_video_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_audio_n", utc_media_info_get_audio_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_audio_p", utc_media_info_get_audio_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_refresh_metadata_to_db_n", utc_media_info_refresh_metadata_to_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_refresh_metadata_to_db_p", utc_media_info_refresh_metadata_to_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_foreach_tag_from_db_n", utc_media_info_foreach_tag_from_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_foreach_tag_from_db_p", utc_media_info_foreach_tag_from_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_foreach_bookmark_from_db_n", utc_media_info_foreach_bookmark_from_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_foreach_bookmark_from_db_p", utc_media_info_foreach_bookmark_from_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_bookmark_count_from_db_n", utc_media_info_get_bookmark_count_from_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_bookmark_count_from_db_p", utc_media_info_get_bookmark_count_from_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_media_count_from_db_n", utc_media_info_get_media_count_from_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_media_count_from_db_p", utc_media_info_get_media_count_from_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_tag_count_from_db_n", utc_media_info_get_tag_count_from_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_tag_count_from_db_p", utc_media_info_get_tag_count_from_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_timeline_n", utc_media_info_get_timeline_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_timeline_p", utc_media_info_get_timeline_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_title_n", utc_media_info_get_title_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_get_title_p", utc_media_info_get_title_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_cancel_thumbnail_n", utc_media_info_cancel_thumbnail_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_cancel_thumbnail_p", utc_media_info_cancel_thumbnail_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_insert_burst_shot_to_db_n", utc_media_info_insert_burst_shot_to_db_n, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_info_insert_burst_shot_to_db_p", utc_media_info_insert_burst_shot_to_db_p, utc_media_info_startup, utc_media_info_cleanup},
+    {"utc_media_playlist_insert_to_db_n", utc_media_playlist_insert_to_db_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_insert_to_db_p", utc_media_playlist_insert_to_db_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_delete_from_db_n", utc_media_playlist_delete_from_db_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_delete_from_db_p", utc_media_playlist_delete_from_db_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_playlist_count_from_db_n", utc_media_playlist_get_playlist_count_from_db_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_playlist_count_from_db_p", utc_media_playlist_get_playlist_count_from_db_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_foreach_playlist_from_db_n", utc_media_playlist_foreach_playlist_from_db_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_foreach_playlist_from_db_p", utc_media_playlist_foreach_playlist_from_db_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_media_count_from_db_n", utc_media_playlist_get_media_count_from_db_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_media_count_from_db_p", utc_media_playlist_get_media_count_from_db_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_foreach_media_from_db_n", utc_media_playlist_foreach_media_from_db_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_foreach_media_from_db_p", utc_media_playlist_foreach_media_from_db_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_destroy_n", utc_media_playlist_destroy_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_destroy_p", utc_media_playlist_destroy_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_clone_n", utc_media_playlist_clone_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_clone_p", utc_media_playlist_clone_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_playlist_from_db_n", utc_media_playlist_get_playlist_from_db_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_playlist_from_db_p", utc_media_playlist_get_playlist_from_db_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_playlist_id_n", utc_media_playlist_get_playlist_id_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_playlist_id_p", utc_media_playlist_get_playlist_id_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_name_n", utc_media_playlist_get_name_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_name_p", utc_media_playlist_get_name_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_play_order_n", utc_media_playlist_get_play_order_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_play_order_p", utc_media_playlist_get_play_order_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_update_to_db_n", utc_media_playlist_update_to_db_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_update_to_db_p", utc_media_playlist_update_to_db_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_set_name_n", utc_media_playlist_set_name_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_set_name_p", utc_media_playlist_set_name_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_add_media_n", utc_media_playlist_add_media_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_add_media_p", utc_media_playlist_add_media_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_set_play_order_n", utc_media_playlist_set_play_order_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_set_play_order_p", utc_media_playlist_set_play_order_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_remove_media_n", utc_media_playlist_remove_media_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_remove_media_p", utc_media_playlist_remove_media_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_thumbnail_path_n", utc_media_playlist_get_thumbnail_path_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_get_thumbnail_path_p", utc_media_playlist_get_thumbnail_path_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_set_thumbnail_path_n", utc_media_playlist_set_thumbnail_path_n, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_playlist_set_thumbnail_path_p", utc_media_playlist_set_thumbnail_path_p, utc_media_playlist_startup, utc_media_playlist_cleanup},
+    {"utc_media_tag_insert_to_db_n", utc_media_tag_insert_to_db_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_insert_to_db_p", utc_media_tag_insert_to_db_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_delete_from_db_n", utc_media_tag_delete_from_db_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_delete_from_db_p", utc_media_tag_delete_from_db_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_get_tag_count_from_db_n", utc_media_tag_get_tag_count_from_db_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_get_tag_count_from_db_p", utc_media_tag_get_tag_count_from_db_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_foreach_tag_from_db_n", utc_media_tag_foreach_tag_from_db_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_foreach_tag_from_db_p", utc_media_tag_foreach_tag_from_db_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_get_media_count_from_db_n", utc_media_tag_get_media_count_from_db_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_get_media_count_from_db_p", utc_media_tag_get_media_count_from_db_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_foreach_media_from_db_n", utc_media_tag_foreach_media_from_db_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_foreach_media_from_db_p", utc_media_tag_foreach_media_from_db_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_clone_n", utc_media_tag_clone_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_clone_p", utc_media_tag_clone_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_update_to_db_n", utc_media_tag_update_to_db_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_update_to_db_p", utc_media_tag_update_to_db_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_add_media_n", utc_media_tag_add_media_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_add_media_p", utc_media_tag_add_media_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_remove_media_n", utc_media_tag_remove_media_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_remove_media_p", utc_media_tag_remove_media_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_set_name_n", utc_media_tag_set_name_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_set_name_p", utc_media_tag_set_name_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_get_tag_id_n", utc_media_tag_get_tag_id_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_get_tag_id_p", utc_media_tag_get_tag_id_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_get_name_n", utc_media_tag_get_name_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_get_name_p", utc_media_tag_get_name_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_get_tag_from_db_n", utc_media_tag_get_tag_from_db_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_get_tag_from_db_p", utc_media_tag_get_tag_from_db_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_destroy_n", utc_media_tag_destroy_n, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_media_tag_destroy_p", utc_media_tag_destroy_p, utc_media_tag_startup, utc_media_tag_cleanup},
+    {"utc_video_meta_destroy_n", utc_video_meta_destroy_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_destroy_p", utc_video_meta_destroy_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_clone_n", utc_video_meta_clone_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_clone_p", utc_video_meta_clone_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_media_id_n", utc_video_meta_get_media_id_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_media_id_p", utc_video_meta_get_media_id_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_album_n", utc_video_meta_get_album_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_album_p", utc_video_meta_get_album_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_artist_n", utc_video_meta_get_artist_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_artist_p", utc_video_meta_get_artist_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_album_artist_n", utc_video_meta_get_album_artist_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_album_artist_p", utc_video_meta_get_album_artist_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_genre_n", utc_video_meta_get_genre_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_genre_p", utc_video_meta_get_genre_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_composer_n", utc_video_meta_get_composer_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_composer_p", utc_video_meta_get_composer_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_year_n", utc_video_meta_get_year_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_year_p", utc_video_meta_get_year_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_recorded_date_n", utc_video_meta_get_recorded_date_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_recorded_date_p", utc_video_meta_get_recorded_date_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_copyright_n", utc_video_meta_get_copyright_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_copyright_p", utc_video_meta_get_copyright_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_track_num_n", utc_video_meta_get_track_num_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_track_num_p", utc_video_meta_get_track_num_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_bit_rate_n", utc_video_meta_get_bit_rate_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_bit_rate_p", utc_video_meta_get_bit_rate_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_duration_n", utc_video_meta_get_duration_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_duration_p", utc_video_meta_get_duration_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_width_n", utc_video_meta_get_width_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_width_p", utc_video_meta_get_width_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_height_n", utc_video_meta_get_height_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_height_p", utc_video_meta_get_height_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_played_count_n", utc_video_meta_get_played_count_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_played_count_p", utc_video_meta_get_played_count_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_played_time_n", utc_video_meta_get_played_time_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_played_time_p", utc_video_meta_get_played_time_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_played_position_n", utc_video_meta_get_played_position_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_get_played_position_p", utc_video_meta_get_played_position_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_set_played_count_n", utc_video_meta_set_played_count_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_set_played_count_p", utc_video_meta_set_played_count_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_set_played_time_n", utc_video_meta_set_played_time_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_set_played_time_p", utc_video_meta_set_played_time_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_set_played_position_n", utc_video_meta_set_played_position_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_set_played_position_p", utc_video_meta_set_played_position_p, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_update_to_db_n", utc_video_meta_update_to_db_n, utc_media_video_startup, utc_media_video_cleanup},
+    {"utc_video_meta_update_to_db_p", utc_video_meta_update_to_db_p, utc_media_video_startup, utc_media_video_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_MEDIA_CONTENT_CORE_H__
diff --git a/src/utc/media-content/utc-media-audio.c b/src/utc/media-content/utc-media-audio.c
new file mode 100755 (executable)
index 0000000..0bcc5ca
--- /dev/null
@@ -0,0 +1,941 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+
+//& set: MediaAudio
+
+static audio_meta_h g_audio;
+static audio_meta_h g_audio_dst;
+static filter_h g_filter;
+static char *g_media_id = NULL;
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+static bool media_item_cb(media_info_h media, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_info_get_media_id(media, &g_media_id);
+    if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL))
+    {
+       return false;
+    }
+
+    ret = media_info_get_audio(media, &g_audio);
+    if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_audio == NULL))
+    {
+       return false;
+    }
+
+    return true;
+}
+
+
+void utc_media_audio_startup(void)
+{
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+
+    g_filter = NULL;
+    g_audio = NULL;
+    g_audio_dst = NULL;
+
+    ret = media_content_connect();
+    if(ret != MEDIA_CONTENT_ERROR_NONE) {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_content_connect failed (code: %d)\n", ret);
+        startup_ret = ret;
+    }
+
+    char *condition = "MEDIA_TYPE=3";  //Music
+
+    media_filter_create(&g_filter);
+    media_filter_set_condition(g_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
+    media_filter_set_order(g_filter, MEDIA_CONTENT_ORDER_ASC, MEDIA_TITLE, MEDIA_CONTENT_COLLATE_DEFAULT);
+    if(g_filter == NULL)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "filter is NULL");
+        startup_ret = ret;
+        return;
+    }
+
+    ret = media_info_foreach_media_from_db(g_filter, media_item_cb, NULL);
+    if(ret != MEDIA_CONTENT_ERROR_NONE) {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_info_foreach_media_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+    }
+}
+
+
+void utc_media_audio_cleanup(void)
+{
+       if(g_filter){
+               media_filter_destroy(g_filter);
+               g_filter = NULL;
+    }
+    audio_meta_destroy(NULL);
+}
+
+
+int utc_media_audio_meta_destroy_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = audio_meta_destroy(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_destroy_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    /* precondition */
+    ret = audio_meta_clone(&g_audio_dst, g_audio);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    /* actual test */
+    ret = audio_meta_destroy(g_audio_dst);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_clone_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = audio_meta_clone(&g_audio_dst, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_clone_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = audio_meta_clone(&g_audio_dst, g_audio);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+       if(g_audio_dst) {
+               ret = audio_meta_destroy(g_audio_dst);
+       }
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_media_id_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *media_id = NULL;
+
+    ret = audio_meta_get_media_id(NULL, &media_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    if(media_id){
+        free(media_id);
+        media_id = NULL;
+    }
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_media_id_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *media_id = NULL;
+
+    ret = audio_meta_get_media_id(g_audio, &media_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    if(media_id){
+        free(media_id);
+        media_id = NULL;
+    }
+
+    return 0;
+}
+
+int utc_media_audio_meta_get_album_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *album = NULL;
+
+    ret = audio_meta_get_album(NULL, &album);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    if(album){
+        free(album);
+        album = NULL;
+    }
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_album_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *album = NULL;
+
+    ret = audio_meta_get_album(g_audio, &album);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    if(album){
+       free(album);
+        album = NULL;
+    }
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_artist_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *artist = NULL;
+
+    ret = audio_meta_get_artist(NULL, &artist);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    if(artist){
+        free(artist);
+        artist = NULL;
+    }
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_artist_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *artist = NULL;
+
+    ret = audio_meta_get_artist(g_audio, &artist);
+
+    if(artist){
+       free(artist);
+        artist = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_album_artist_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *album_artist = NULL;
+
+    ret = audio_meta_get_album_artist(NULL, &album_artist);
+
+    if(album_artist){
+        free(album_artist);
+        album_artist = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_album_artist_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *album_artist = NULL;
+
+    ret = audio_meta_get_album_artist(g_audio, &album_artist);
+
+    if(album_artist){
+       free(album_artist);
+        album_artist = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_genre_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *genre = NULL;
+
+    ret = audio_meta_get_genre(NULL, &genre);
+
+    if(genre){
+        free(genre);
+        genre = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_genre_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *genre = NULL;
+
+    ret = audio_meta_get_genre(g_audio, &genre);
+
+    if(genre){
+       free(genre);
+        genre = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_composer_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *composer = NULL;
+
+    ret = audio_meta_get_composer(NULL, &composer);
+
+    if(composer){
+        free(composer);
+        composer = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_composer_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *composer = NULL;
+
+    ret = audio_meta_get_composer(g_audio, &composer);
+
+    if(composer){
+       free(composer);
+        composer = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_year_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *year = NULL;
+
+    ret = audio_meta_get_year(NULL, &year);
+
+    if(year){
+        free(year);
+        year = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_year_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *year = NULL;
+
+    ret = audio_meta_get_year(g_audio, &year);
+
+    if(year){
+       free(year);
+        year = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_recorded_date_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *recorded_date = NULL;
+
+    ret = audio_meta_get_recorded_date(NULL, &recorded_date);
+
+    if(recorded_date){
+        free(recorded_date);
+        recorded_date = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_recorded_date_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *recorded_date = NULL;
+
+    ret = audio_meta_get_year(g_audio, &recorded_date);
+
+    if(recorded_date){
+       free(recorded_date);
+        recorded_date = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_copyright_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *copyright = NULL;
+
+    ret = audio_meta_get_copyright(NULL, &copyright);
+
+    if(copyright){
+        free(copyright);
+        copyright = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_copyright_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *copyright = NULL;
+
+    ret = audio_meta_get_copyright(g_audio, &copyright);
+
+    if(copyright){
+       free(copyright);
+        copyright = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_track_num_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *tracknum = NULL;
+
+    ret = audio_meta_get_track_num(NULL, &tracknum);
+
+    if(tracknum){
+        free(tracknum);
+        tracknum = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_track_num_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *tracknum = NULL;
+
+    ret = audio_meta_get_track_num(g_audio, &tracknum);
+
+    if(tracknum){
+       free(tracknum);
+        tracknum = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_bit_rate_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int bit_rate = 0;
+
+    ret = audio_meta_get_bit_rate(NULL, &bit_rate);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_bit_rate_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int bit_rate = 0;
+
+    ret = audio_meta_get_bit_rate(g_audio, &bit_rate);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_sample_rate_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int sample_rate = 0;
+
+    ret = audio_meta_get_sample_rate(NULL, &sample_rate);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_sample_rate_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int sample_rate = 0;
+
+    ret = audio_meta_get_sample_rate(g_audio, &sample_rate);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_channel_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int channel = 0;
+
+    ret = audio_meta_get_channel(NULL, &channel);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_channel_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int channel = 0;
+
+    ret = audio_meta_get_channel(g_audio, &channel);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_duration_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int duration = 0;
+
+    ret = audio_meta_get_duration(NULL, &duration);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_duration_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int duration = 0;
+
+    ret = audio_meta_get_duration(g_audio, &duration);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_played_count_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int count = 0;
+
+    ret = audio_meta_get_played_count(NULL, &count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_played_count_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int count = 0;
+
+    ret = audio_meta_get_played_count(g_audio, &count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_played_time_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    time_t played_time = 0;
+
+    ret = audio_meta_get_played_time(NULL, &played_time);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_played_time_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    time_t played_time = 0;
+
+    ret = audio_meta_get_played_time(g_audio, &played_time);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_played_position_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int position = 0;
+
+    ret = audio_meta_get_played_position(NULL, &position);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_played_position_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int position = 0;
+
+    ret = audio_meta_get_played_position(g_audio, &position);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_audio_meta_get_bitpersample_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int bitpersample = 0;
+
+    ret = audio_meta_get_bitpersample(NULL, &bitpersample);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_get_bitpersample_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int bitpersample = 0;
+
+    ret = audio_meta_get_bitpersample(g_audio, &bitpersample);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_set_played_count_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int played_count = 3;
+
+    ret = audio_meta_set_played_count(NULL, played_count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _played_count_cb(media_info_h media, void *user_data)
+{
+    return false;
+}
+
+
+int utc_media_audio_meta_set_played_count_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int played_count = 3;
+
+    ret = audio_meta_set_played_count(g_audio, played_count);
+
+       ret = audio_meta_update_to_db(g_audio);
+
+       ret = media_info_foreach_media_from_db(g_filter, _played_count_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_set_played_time_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    time_t played_time = 0;
+
+    ret = audio_meta_set_played_time(NULL, played_time);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _played_time_cb(media_info_h media, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+       time_t get_played_time = 0;
+       audio_meta_h audio;
+
+       ret = media_info_get_audio(media, &audio);
+
+       ret = audio_meta_get_played_time(audio, &get_played_time);
+
+    if(get_played_time != 0)
+               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       audio_meta_destroy(audio);
+
+    return true;
+}
+
+
+int utc_media_audio_meta_set_played_time_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    time_t played_time = 0;
+
+    ret = audio_meta_set_played_time(g_audio, played_time);
+
+       ret = audio_meta_update_to_db(g_audio);
+
+       ret = media_info_foreach_media_from_db(g_filter, _played_time_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_set_played_position_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int played_position = 0;
+
+    ret = audio_meta_set_played_position(NULL, played_position);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _played_position_cb(media_info_h media, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+       int position = 0;
+       audio_meta_h audio;
+
+       ret = media_info_get_audio(media, &audio);
+
+       ret = audio_meta_get_played_position(audio, &position);
+
+    if(position != 0)
+               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       audio_meta_destroy(audio);
+
+    return true;
+}
+
+
+int utc_media_audio_meta_set_played_position_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int played_position = 0;
+
+    ret = audio_meta_set_played_position(g_audio, played_position);
+
+       ret = audio_meta_update_to_db(g_audio);
+
+       ret = media_info_foreach_media_from_db(g_filter, _played_position_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_update_to_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = audio_meta_update_to_db(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_audio_meta_update_to_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = audio_meta_update_to_db(g_audio);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/media-content/utc-media-bookmark-delete.c b/src/utc/media-content/utc-media-bookmark-delete.c
new file mode 100755 (executable)
index 0000000..f8c3bb3
--- /dev/null
@@ -0,0 +1,204 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <storage.h>
+
+//& set: MediaBookmarkDelete
+
+static media_bookmark_h g_bookmark;
+static char *g_media_id = NULL;
+static filter_h g_filter;
+static int g_bookmark_id;
+
+static bool del_flag = false;
+
+static char* img_path = NULL;
+static const char *img_file = "thumb.jpg";
+
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+       if(type == STORAGE_TYPE_INTERNAL)
+       {
+        img_path = (char*)malloc(strlen(path) + strlen(img_file) + 6);
+               memset(img_path,0x00,strlen(path) + strlen(img_file) + 6);
+        sprintf(img_path, "%s/res/%s", path, img_file);
+        return false;
+    }
+    return true;
+}
+
+
+static bool bookmark_cb(media_bookmark_h bookmark, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_clone(&g_bookmark, bookmark);
+       if (ret != MEDIA_CONTENT_ERROR_NONE) {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_bookmark_clone failed (code: %d)\n", ret);
+               return false;
+       }
+
+       ret = media_bookmark_get_bookmark_id(bookmark, &g_bookmark_id);
+       if (ret != MEDIA_CONTENT_ERROR_NONE) {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_bookmark_get_bookmark_id failed (code: %d)\n", ret);
+               return false;
+       }
+
+       return false;
+}
+
+
+static bool media_item_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_get_media_id(media, &g_media_id);
+       if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL))
+       {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_get_media_id failed (code: %d)\n", ret);
+               return false;
+       }
+
+       return false;
+}
+
+
+void utc_media_bookmark_delete_startup(void)
+{
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_connect();
+
+       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       }
+       
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_content_connect failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+       }
+
+       char *condition = "MEDIA_TYPE=1";       //Video
+
+       media_filter_create(&g_filter);
+       media_filter_set_condition(g_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
+       if(g_filter == NULL)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "g_filter is NULL");
+        startup_ret = ret;
+        return;
+       }
+
+       ret = media_info_foreach_media_from_db(g_filter, media_item_cb, NULL);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_foreach_media_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+       }
+
+       ret = media_bookmark_insert_to_db(g_media_id, 1437008628, img_path);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_bookmark_insert_to_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+       }
+
+       ret = media_info_foreach_bookmark_from_db(g_media_id, NULL, bookmark_cb, NULL);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_foreach_bookmark_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+       }
+}
+
+
+void utc_media_bookmark_delete_cleanup(void)
+{
+    if(del_flag){
+        media_bookmark_delete_from_db(g_bookmark_id);
+        del_flag = false;
+    }
+
+       if(g_media_id != NULL){
+               free(g_media_id);
+        g_media_id = NULL;
+    }
+
+       if(g_filter != NULL){
+               media_filter_destroy(g_filter);
+        g_filter = NULL;
+    }
+
+       if(g_bookmark != NULL){
+               media_bookmark_destroy(g_bookmark);
+        g_bookmark = NULL;
+    }
+
+       media_content_disconnect();
+       
+       if(img_path != NULL)            free(img_path);
+
+}
+
+
+int utc_media_bookmark_delete_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_delete_from_db(-1);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    del_flag = true;
+
+    return 0;
+}
+
+
+int utc_media_bookmark_delete_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_delete_from_db(g_bookmark_id);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
diff --git a/src/utc/media-content/utc-media-bookmark-insert.c b/src/utc/media-content/utc-media-bookmark-insert.c
new file mode 100755 (executable)
index 0000000..a2548d5
--- /dev/null
@@ -0,0 +1,180 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <storage.h>
+
+//& set: MediaBookmarkInsert
+
+static media_bookmark_h g_bookmark;
+static char *g_media_id = NULL;
+static filter_h g_filter;
+static int g_bookmark_id;
+
+static char* img_path = NULL;
+static const char *img_file = "thumb.jpg";
+
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+       if(type == STORAGE_TYPE_INTERNAL)
+       {
+        img_path = (char*)malloc(strlen(path) + strlen(img_file) + 6);
+               memset(img_path,0x00,strlen(path) + strlen(img_file) + 6);
+        sprintf(img_path, "%s/res/%s", path, img_file);
+        return false;
+    }
+    return true;
+}
+
+
+static bool bookmark_cb(media_bookmark_h bookmark, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_clone(&g_bookmark, bookmark);
+       if (ret != MEDIA_CONTENT_ERROR_NONE) {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_bookmark_clone failed (code: %d)\n", ret);
+               return false;
+       }
+
+       ret = media_bookmark_get_bookmark_id(bookmark, &g_bookmark_id);
+       if (ret != MEDIA_CONTENT_ERROR_NONE) {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_bookmark_get_bookmark_id failed (code: %d)\n", ret);
+               return false;
+       }
+
+       return false;
+}
+
+
+static bool media_item_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_get_media_id(media, &g_media_id);
+       if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL))
+       {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_get_media_id failed (code: %d)\n", ret);
+               return false;
+       }
+
+       return false;
+}
+
+
+void utc_media_bookmark_insert_startup(void)
+{
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+
+       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       }
+
+       ret = media_content_connect();
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_content_connect failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+       }
+
+       char *condition = "MEDIA_TYPE=1";       //Video
+
+       media_filter_create(&g_filter);
+       media_filter_set_condition(g_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
+       if(g_filter == NULL)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "g_filter is NULL");
+        startup_ret = ret;
+        return;
+       }
+
+       ret = media_info_foreach_media_from_db(g_filter, media_item_cb, NULL);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_foreach_media_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+       }
+}
+
+
+void utc_media_bookmark_insert_cleanup(void)
+{
+
+       if(g_media_id != NULL){
+               free(g_media_id);
+        g_media_id = NULL;
+    }
+
+       if(g_filter != NULL){
+               media_filter_destroy(g_filter);
+        g_filter = NULL;
+    }
+
+       if(g_bookmark != NULL) {
+        media_bookmark_delete_from_db(g_bookmark_id);
+               media_bookmark_destroy(g_bookmark);
+        g_bookmark = NULL;
+    }
+
+       media_content_disconnect();
+       
+       if(img_path != NULL)            free(img_path);
+
+}
+
+
+int utc_media_bookmark_insert_to_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_insert_to_db(NULL, 0, img_file);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_insert_to_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_insert_to_db(g_media_id, 1437008628, img_file);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_info_foreach_bookmark_from_db(g_media_id, NULL, bookmark_cb, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/media-content/utc-media-bookmark.c b/src/utc/media-content/utc-media-bookmark.c
new file mode 100755 (executable)
index 0000000..5e0034c
--- /dev/null
@@ -0,0 +1,342 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <storage.h>
+
+//& set: MediaBookmark
+
+static media_bookmark_h g_bookmark;
+static media_bookmark_h g_bookmark_dst;
+static char *g_media_id = NULL;
+static filter_h g_filter;
+static int g_bookmark_id;
+
+static char* img_path = NULL;
+static const char *img_file = "thumb.jpg";
+
+
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+
+static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+       if(type == STORAGE_TYPE_INTERNAL)
+       {
+        img_path = (char*)malloc(strlen(path) + strlen(img_file) + 6);
+               memset(img_path,0x00,strlen(path) + strlen(img_file) + 6);
+        snprintf(img_path, strlen(path) + strlen(img_file) + 6, "%s/res/%s", path, img_file);
+        return false;
+    }
+    return true;
+}
+
+
+static bool bookmark_cb(media_bookmark_h bookmark, void *user_data)
+{
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_clone(&g_bookmark, bookmark);
+       if (ret != MEDIA_CONTENT_ERROR_NONE) {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_bookmark_clone failed (code: %d)\n", ret);
+        startup_ret = ret;
+               return false;
+       }
+
+       ret = media_bookmark_get_bookmark_id(bookmark, &g_bookmark_id);
+       if (ret != MEDIA_CONTENT_ERROR_NONE) {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_bookmark_get_bookmark_id failed (code: %d)\n", ret);
+        startup_ret = ret;
+               return false;
+       }
+
+       return false;
+}
+
+
+static bool media_item_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_get_media_id(media, &g_media_id);
+       if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL))
+       {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_get_media_id failed (code: %d)\n", ret);
+               return false;
+       }
+
+       return false;
+}
+
+
+void utc_media_bookmark_startup(void)
+{
+       int ret = media_content_connect();
+
+       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       }
+
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_content_connect failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+       }
+
+       char *condition = "MEDIA_TYPE=1";       //Video
+
+       media_filter_create(&g_filter);
+       media_filter_set_condition(g_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
+       if(g_filter == NULL)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "g_filter is NULL");
+        startup_ret = ret;
+        return;
+       }
+
+       ret = media_info_foreach_media_from_db(g_filter, media_item_cb, NULL);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_foreach_media_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+       }
+
+       ret = media_bookmark_insert_to_db(g_media_id, 1437008628, img_path);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_bookmark_insert_to_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+       }
+
+       ret = media_info_foreach_bookmark_from_db(g_media_id, NULL, bookmark_cb, NULL);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_foreach_bookmark_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+       }
+}
+
+
+void utc_media_bookmark_cleanup(void)
+{
+       if(g_media_id != NULL){
+               free(g_media_id);
+        g_media_id = NULL;
+    }
+
+       if(g_filter != NULL){
+               media_filter_destroy(g_filter);
+        g_filter = NULL;
+    }
+
+       if(g_bookmark != NULL) {
+        media_bookmark_delete_from_db(g_bookmark_id);
+               media_bookmark_destroy(g_bookmark);
+        g_bookmark = NULL;
+    }
+
+       media_content_disconnect();
+       
+
+       if(img_path != NULL)            free(img_path);
+}
+
+
+int utc_media_bookmark_get_bookmark_count_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_get_bookmark_count_from_db(g_filter, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_get_bookmark_count_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       int bookmark_count = 0;
+
+       ret = media_bookmark_get_bookmark_count_from_db(g_filter, &bookmark_count);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_clone_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_clone(&g_bookmark_dst, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_clone_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_clone(&g_bookmark_dst, g_bookmark);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_destroy_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_destroy(NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_destroy_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_clone(&g_bookmark_dst, g_bookmark);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_bookmark_destroy(g_bookmark_dst);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_get_bookmark_id_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_get_bookmark_id(NULL, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_get_bookmark_id_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       int bookmark_id = 0;
+
+       ret = media_bookmark_get_bookmark_id(g_bookmark, &bookmark_id);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_get_marked_time_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_get_marked_time(NULL, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_get_marked_time_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       time_t bookmark_time = 0;
+
+       ret = media_bookmark_get_marked_time(g_bookmark, &bookmark_time);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_get_thumbnail_path_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_bookmark_get_thumbnail_path(NULL, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_bookmark_get_thumbnail_path_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *path = NULL;
+
+       ret = media_bookmark_get_thumbnail_path(g_bookmark, &path);
+
+    if(path){
+        free(path);
+        path = NULL;
+    }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
diff --git a/src/utc/media-content/utc-media-content.c b/src/utc/media-content/utc-media-content.c
new file mode 100755 (executable)
index 0000000..46dab90
--- /dev/null
@@ -0,0 +1,335 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <glib.h>
+#include <unistd.h>
+#include <string.h>
+#include <storage.h>
+
+//& set: MediaContent
+
+static GMainLoop *g_loop = NULL;
+static const char *g_insert_file = "test.jpg";
+static const char *g_origin_file = "image.jpg";
+static char *g_insert_path = NULL;
+static char *g_origin_path = NULL;
+static char *dir_path = NULL;
+
+
+
+static media_content_error_e cb_result = MEDIA_CONTENT_ERROR_NONE;
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+       if(type == STORAGE_TYPE_INTERNAL)
+       {
+        g_origin_path = (char*)malloc(strlen(path) + strlen(g_origin_file) + 6);
+               memset(g_origin_path,0x00,strlen(path) + strlen(g_origin_file) + 6);
+        sprintf(g_origin_path, "%s/res/%s", path, g_origin_file);
+               
+        g_insert_path = (char*)malloc(strlen(path) + strlen(g_insert_file) + 6);
+               memset(g_insert_path,0x00,strlen(path) + strlen(g_insert_file) + 6);
+        sprintf(g_insert_path, "%s/res/%s", path, g_insert_file);
+
+               dir_path = strdup(path);
+               
+        return false;
+    }
+    return true;
+}
+
+void utc_media_content_startup(void)
+{
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       }
+
+    ret = media_content_connect();
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_content_connect failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+    }
+
+    char test_copy[256] = {0, };
+    snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", g_origin_path, g_insert_path);
+
+    ret = system(test_copy);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "\"%s\" failed (code: %d)\n", test_copy, ret);
+        startup_ret = ret;
+        return;
+    }
+
+}
+
+
+void utc_media_content_cleanup(void)
+{
+    media_content_disconnect();
+       if(g_insert_path != NULL)               free(g_insert_path);
+       if(g_origin_path != NULL)               free(g_origin_path);
+       if(dir_path != NULL)                    free(dir_path);
+       
+}
+
+
+static void _noti_cb(media_content_error_e error,
+                       int pid,
+                       media_content_db_update_item_type_e update_item,
+                       media_content_db_update_type_e update_type,
+                       media_content_type_e media_type,
+                       char *uuid,
+                       char *path,
+                       char *mime_type,
+                       void *user_data)
+{
+}
+
+
+int utc_media_content_connect_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_connect();
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_content_connect_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_disconnect();
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_content_disconnect_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_content_disconnect();
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_content_disconnect_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_content_disconnect();
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_content_disconnect();
+    assert_neq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_content_scan_file_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_scan_file(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_content_scan_file_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+
+    ret = media_content_scan_file(g_insert_path);
+
+    media_content_disconnect();
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_content_scan_folder_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_scan_folder(NULL, FALSE, NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+static void _scan_folder_cb(media_content_error_e error, void * user_data)
+{
+    cb_result = error;
+    g_main_loop_quit(g_loop);
+}
+
+static gboolean _scan_folder_start(gpointer data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_scan_folder(dir_path, FALSE, _scan_folder_cb, NULL);
+
+    if (ret < 1)
+    {
+        g_main_loop_quit(g_loop);
+        cb_result = ret;
+    }
+    return false;
+}
+
+
+int utc_media_content_scan_folder_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    GSource *source = NULL;
+    GMainContext *context = NULL;
+
+    g_loop = g_main_loop_new(NULL, FALSE);
+    context = g_main_loop_get_context(g_loop);
+    source = g_idle_source_new();
+    g_source_set_callback (source, _scan_folder_start, NULL, NULL);
+    g_source_attach (source, context);
+
+    g_main_loop_run(g_loop);
+    g_main_loop_unref(g_loop);
+
+    g_loop = NULL;
+
+    assert_eq(cb_result, MEDIA_CONTENT_ERROR_NONE);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_content_set_db_updated_cb_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_set_db_updated_cb(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_content_set_db_updated_cb_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    char *user_str = strdup("hi");
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_set_db_updated_cb(_noti_cb, (void*)user_str);
+
+    if(user_str){
+        free(user_str);
+        user_str = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_content_unset_db_updated_cb_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    char *user_str = strdup("hi");
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_set_db_updated_cb(_noti_cb, (void*)user_str);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_content_unset_db_updated_cb();
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    if(user_str){
+        free(user_str);
+        user_str = NULL;
+    }
+
+    return 0;
+}
+
+
+int utc_media_content_unset_db_updated_cb_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    char *user_str = strdup("hi");
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_set_db_updated_cb(_noti_cb, (void*)user_str);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_content_unset_db_updated_cb();
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    if(user_str){
+        free(user_str);
+        user_str = NULL;
+    }
+
+    return 0;
+}
+
diff --git a/src/utc/media-content/utc-media-filter-create.c b/src/utc/media-content/utc-media-filter-create.c
new file mode 100755 (executable)
index 0000000..4f7a65a
--- /dev/null
@@ -0,0 +1,52 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <stdlib.h>
+
+//& set: MediaFilterCreate
+
+static filter_h g_filter = NULL;
+
+void utc_media_filter_create_cleanup(void)
+{
+    if(g_filter){
+        media_filter_destroy(g_filter);
+        g_filter = NULL;
+    }
+}
+
+
+int utc_media_filter_create_n(void)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_filter_create(NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_filter_create_p(void)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_filter_create(&g_filter);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/media-content/utc-media-filter-destroy.c b/src/utc/media-content/utc-media-filter-destroy.c
new file mode 100755 (executable)
index 0000000..41274c8
--- /dev/null
@@ -0,0 +1,75 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <stdlib.h>
+
+//& set: MediaFilterDestroy
+
+static filter_h g_filter = NULL;
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+void utc_media_filter_destroy_startup(void)
+{
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+    
+    ret = media_filter_create(&g_filter);
+
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_filter_create failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+    }
+}
+
+
+void utc_media_filter_destroy_cleanup(void)
+{
+    if(g_filter){
+        media_filter_destroy(g_filter);
+        g_filter = NULL;
+    }
+}
+
+
+int utc_media_filter_destroy_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_filter_destroy(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_filter_destroy_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_filter_destroy(g_filter);
+    g_filter = NULL;
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/media-content/utc-media-filter.c b/src/utc/media-content/utc-media-filter.c
new file mode 100755 (executable)
index 0000000..5056cda
--- /dev/null
@@ -0,0 +1,240 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <stdlib.h>
+
+#define SET_TEST_CONDITION "MEDIA_TYPE=3"
+//& set: MediaFilter
+
+static filter_h g_filter = NULL;
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+void utc_media_filter_startup(void)
+{
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_filter_create(&g_filter);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_filter_create failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+    }
+
+}
+
+
+void utc_media_filter_cleanup(void)
+{
+    media_filter_destroy(g_filter);
+}
+
+
+int utc_media_filter_set_offset_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_filter_set_offset(NULL, 0, 3);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_filter_set_offset_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_filter_set_offset(g_filter, 0, 3);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_filter_set_condition_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_filter_set_condition(NULL, SET_TEST_CONDITION, MEDIA_CONTENT_COLLATE_NOCASE);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_filter_set_condition_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_filter_set_condition(g_filter, SET_TEST_CONDITION, MEDIA_CONTENT_COLLATE_NOCASE);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_filter_set_order_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_filter_set_order(NULL, MEDIA_CONTENT_ORDER_ASC, MEDIA_TITLE, MEDIA_CONTENT_COLLATE_DEFAULT);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_filter_set_order_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_filter_set_order(g_filter, MEDIA_CONTENT_ORDER_ASC, MEDIA_TITLE, MEDIA_CONTENT_COLLATE_DEFAULT);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_filter_get_offset_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int offset = 0;
+    int count = 0;
+
+    ret = media_filter_get_offset(NULL, &offset, &count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_filter_get_offset_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int offset = 0;
+    int count = 0;
+
+    ret = media_filter_get_offset(g_filter, &offset, &count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_filter_get_condition_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *condition = NULL;
+    media_content_collation_e collate_type = -1;
+
+    ret = media_filter_get_condition(NULL, &condition, &collate_type);
+
+    if(condition){
+        free(condition);
+        condition = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_filter_get_condition_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *condition = NULL;
+    media_content_collation_e collate_type = -1;
+
+    ret = media_filter_get_condition(g_filter, &condition, &collate_type);
+
+    if(condition){
+       free(condition);
+        condition = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_filter_get_order_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_content_order_e order;
+    char *order_keyword = NULL;
+    media_content_collation_e collate_type = -1;
+
+    ret = media_filter_get_order(NULL, &order, &order_keyword, &collate_type);
+
+    if(order_keyword){
+        free(order_keyword);
+        order_keyword = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_filter_get_order_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_content_order_e order = 0;
+    char *order_keyword = NULL;
+    media_content_collation_e collate_type = -1;
+
+    ret = media_filter_get_order(g_filter, &order, &order_keyword, &collate_type);
+
+    if(order_keyword){
+       free(order_keyword);
+        order_keyword = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/media-content/utc-media-folder.c b/src/utc/media-content/utc-media-folder.c
new file mode 100755 (executable)
index 0000000..032b032
--- /dev/null
@@ -0,0 +1,763 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <storage.h>
+
+#define TEST_SET_CONDITION "MEDIA_TYPE=0"
+#define TEST_SET_CONDITION_WITH_STORAGE_TYPE "MEDIA_TYPE=0 and MEDIA_STORAGE_TYPE=0"
+#define TEST_SET_NAME "new test"
+#define TEST_DEFAULT_NAME "res"
+
+
+//& set: MediaFolder
+
+static media_folder_h g_folder = NULL;
+static media_folder_h g_test_folder = NULL;
+static filter_h g_filter = NULL;
+
+static char *g_folder_path = NULL;
+static char* g_test_folder_path = NULL;
+static char* g_default_folder_path = NULL;
+
+static char* g_origin_item_path = NULL;
+static const char* g_origin_item_file = "image.jpg";
+static char* g_test_item_path = NULL;
+static const char* g_test_item_file = "test.jpg";
+
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+       char temp[500];
+       if(type == STORAGE_TYPE_INTERNAL)
+       {
+        g_origin_item_path = (char*)malloc(strlen(path) + strlen(g_origin_item_file) + 6);
+               memset(g_origin_item_path,0x00,strlen(path) + strlen(g_origin_item_file) + 6);
+        sprintf(g_origin_item_path, "%s/res/%s", path, g_origin_item_file);
+
+        g_test_item_path = (char*)malloc(strlen(path) + strlen(g_test_item_file) + + strlen("/res/test/") + 1);
+               memset(g_test_item_path,0x00,strlen(path) + strlen(g_test_item_file) + strlen("/res/test/") +1);
+        sprintf(g_test_item_path, "%s/res/test/%s", path, g_test_item_file);
+
+               memset(temp,0x00,sizeof(temp));
+               sprintf(temp, "%s/%s",path, "res");
+               g_default_folder_path = strdup(temp);
+
+               memset(temp,0x00,sizeof(temp));
+               sprintf(temp, "%s/%s",path, "res/test");
+               g_test_folder_path = strdup(temp);
+
+        return false;
+    }
+    return true;
+}
+
+
+static bool capi_folder_list_cb(media_folder_h folder, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    if(folder != NULL)
+    {
+       media_folder_get_path(folder, &g_folder_path);
+
+       if(strcmp(g_folder_path, g_test_folder_path) == 0)
+       {
+               ret = media_folder_clone(&g_test_folder, folder);
+            if (ret != MEDIA_CONTENT_ERROR_NONE)
+            {
+                fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+                fprintf(stderr, "g_test_folder cloning failed (code: %d)\n", ret);
+            }
+
+       } else if(strcmp(g_folder_path, g_default_folder_path) == 0)
+       {
+
+               ret = media_folder_clone(&g_folder, folder);
+            if (ret != MEDIA_CONTENT_ERROR_NONE)
+            {
+                fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+                fprintf(stderr, "g_folder cloning failed (code: %d)\n", ret);
+            }
+       
+       }
+    }
+
+    if(g_folder_path){
+        free(g_folder_path);
+        g_folder_path = NULL;
+    }
+
+    return true;
+}
+
+void utc_media_folder_startup(void)
+{
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+    g_filter = NULL;
+       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       }
+    ret = media_content_connect();
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_content_connect failed (code: %d)\n", ret);
+        startup_ret = ret;
+       return;
+    }
+
+    media_filter_create(&g_filter);
+    if(!g_filter)
+    {
+        startup_ret = ret;
+        return;
+    }
+    ret = media_folder_foreach_folder_from_db(g_filter, capi_folder_list_cb, NULL);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        startup_ret = ret;
+       return;
+    }
+       
+}
+
+
+void utc_media_folder_cleanup(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    ret = media_content_disconnect();
+
+       if(g_filter){
+               media_filter_destroy(g_filter);
+               g_filter = NULL;
+    }
+
+    media_folder_destroy(g_folder);
+    media_folder_destroy(g_test_folder);
+
+    if(g_folder_path){
+        free(g_folder_path);
+        g_folder_path = NULL;
+    }
+
+       if(g_test_folder_path) free(g_test_folder_path);
+       if(g_default_folder_path) free(g_default_folder_path);
+       if(g_origin_item_path) free(g_origin_item_path);
+       if(g_test_item_path) free(g_test_item_path);
+}
+
+
+int utc_media_folder_foreach_folder_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_folder_foreach_folder_from_db(NULL, NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_foreach_folder_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    filter_h filter;
+
+    /* precondition */
+    if(g_folder){
+        media_folder_destroy(g_folder);
+        g_folder = NULL;
+    }
+
+    /* actual test */
+    ret = media_filter_create(&filter);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_folder_foreach_folder_from_db(filter, capi_folder_list_cb, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_media_count_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int cnt;
+
+    ret = media_folder_get_media_count_from_db(NULL, NULL, &cnt);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_media_count_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int cnt;
+
+    filter_h filter;
+
+    ret = media_filter_create(&filter);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_filter_set_condition(filter, TEST_SET_CONDITION, MEDIA_CONTENT_COLLATE_DEFAULT);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    char *folder_id = NULL;
+    ret = media_folder_get_folder_id(g_folder, &folder_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_folder_get_media_count_from_db(folder_id, filter, &cnt);
+
+    if(folder_id){
+        free(folder_id);
+        folder_id = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+static bool sub_media_cb(media_info_h media, void *user_data)
+{
+    return true;
+}
+
+
+int utc_media_folder_foreach_media_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    filter_h filter;
+
+    ret = media_filter_create(&filter);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_filter_set_condition(filter, TEST_SET_CONDITION, MEDIA_CONTENT_COLLATE_DEFAULT);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_folder_foreach_media_from_db(NULL, filter, sub_media_cb, NULL);
+
+    if(filter){
+        media_filter_destroy(filter);
+        filter = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_foreach_media_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    filter_h filter;
+    ret = media_filter_create(&filter);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_filter_set_condition(filter, TEST_SET_CONDITION, MEDIA_CONTENT_COLLATE_DEFAULT);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    char *folder_id = NULL;
+    ret = media_folder_get_folder_id(g_folder, &folder_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_folder_foreach_media_from_db(folder_id, filter, sub_media_cb, NULL);
+
+    if(filter){
+        media_filter_destroy(filter);
+        filter = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_folder_clone_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_folder_h dst_folder = NULL;
+    
+    ret = media_folder_clone(&dst_folder, NULL);
+
+    if(dst_folder){
+        media_folder_destroy(dst_folder);
+        dst_folder = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_clone_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_folder_h dst_folder = NULL;
+       
+    ret = media_folder_clone(&dst_folder, g_folder);
+
+    if(dst_folder){
+       media_folder_destroy(dst_folder);
+        dst_folder = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_path_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *path = NULL;
+
+    ret = media_folder_get_path(NULL, &path);
+
+    if(path){
+        free(path);
+        path = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_media_folder_get_path_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *path = NULL;
+
+    ret = media_folder_get_path(g_folder, &path);
+
+    if(path){
+       free(path);
+        path = NULL;
+    }
+    
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_folder_get_modified_time_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       time_t date;
+
+       ret = media_folder_get_modified_time(g_folder, &date);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_media_folder_get_modified_time_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_folder_get_modified_time(NULL, NULL);
+       assert_neq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_media_folder_get_name_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *name = NULL;
+
+    ret = media_folder_get_name(NULL, &name);
+
+    if(name){
+       free(name);
+        name = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_name_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *name = NULL;
+
+    ret = media_folder_get_name(g_folder, &name);
+
+    if(name){
+       free(name);
+        name = NULL;
+    }
+    
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_date_modified_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    time_t date_modifed = 0;
+
+    ret = media_folder_get_modified_time(NULL, &date_modifed);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_date_modified_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    time_t date_modifed = 0;
+
+    ret = media_folder_get_modified_time(g_folder, &date_modifed);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_storage_type_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_content_storage_e type;
+
+    ret = media_folder_get_storage_type(NULL, &type);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_storage_type_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_content_storage_e type;
+
+    ret = media_folder_get_storage_type(g_folder, &type);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_folder_set_name_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_folder_set_name(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _name_cb(media_folder_h folder, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *name = NULL;
+
+       media_folder_get_path(folder, &g_folder_path);
+
+       if(strcmp(g_folder_path, g_default_folder_path) == 0)
+       {
+               ret = media_folder_get_name(folder, &name);
+               if(strcmp(name, TEST_DEFAULT_NAME) != 0)
+                       ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+       }
+
+    if(g_folder_path){
+        free(g_folder_path);
+        g_folder_path = NULL;
+    }
+
+       if(name){
+        free(name);
+        name = NULL;
+    }
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return true;
+}
+
+
+int utc_media_folder_set_name_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_folder_set_name(g_folder, TEST_SET_NAME);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_folder_update_to_db(g_folder);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_folder_set_name(g_folder, TEST_DEFAULT_NAME);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_folder_update_to_db(g_folder);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       media_folder_foreach_folder_from_db(g_filter, _name_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_folder_update_to_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_folder_update_to_db(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_update_to_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    filter_h filter1;
+    int folder_count = 0;
+    char *org_name = NULL;
+    
+    
+    ret = media_filter_create(&filter1);
+    
+    media_filter_set_condition(filter1, TEST_SET_CONDITION_WITH_STORAGE_TYPE, MEDIA_CONTENT_COLLATE_DEFAULT);  /*MEDIA_TYPE 0-image, 1-video, 2-sound, 3-music, 4-other*/
+    
+    ret = media_folder_get_folder_count_from_db(filter1, &folder_count);
+    ret = media_folder_foreach_folder_from_db(filter1, capi_folder_list_cb, NULL);
+    
+    media_filter_destroy(filter1);
+
+    ret = media_folder_get_name(g_folder,&org_name);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_folder_set_name(g_folder, "new test2");
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_folder_update_to_db(g_folder);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_folder_set_name(g_folder, org_name);
+    ret = media_folder_update_to_db(g_folder);
+
+    free(org_name);    
+
+    return 0;
+}
+
+
+int utc_media_folder_get_folder_id_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_folder_get_folder_id(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_folder_id_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *folder_id = NULL;
+
+       ret = media_folder_get_folder_id(g_folder, &folder_id);
+
+    if(folder_id){
+        free(folder_id);
+        folder_id = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_folder_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_folder_get_folder_from_db(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_folder_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *folder_id = NULL;
+    media_folder_get_folder_id(g_folder, &folder_id);
+    media_folder_h folder_info;
+
+    ret = media_folder_get_folder_from_db(folder_id, &folder_info);
+
+    if(folder_id){
+        free(folder_id);
+        folder_id = NULL;
+    }
+
+       if(folder_info){
+        ret = media_folder_destroy(folder_info);
+        folder_info = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_folder_count_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_folder_get_folder_count_from_db(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_get_folder_count_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int cnt = 0;
+
+    filter_h filter;
+    ret = media_filter_create(&filter);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_filter_set_condition(filter, TEST_SET_CONDITION, MEDIA_CONTENT_COLLATE_DEFAULT);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_folder_get_folder_count_from_db(filter, &cnt);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_folder_destroy_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_folder_destroy(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_folder_destroy_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    if(g_folder){
+        ret = media_folder_destroy(g_folder);
+        g_folder = NULL;
+        assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+    } else return -1;
+
+    return 0;
+}
diff --git a/src/utc/media-content/utc-media-group.c b/src/utc/media-content/utc-media-group.c
new file mode 100755 (executable)
index 0000000..5f42abf
--- /dev/null
@@ -0,0 +1,581 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <stdlib.h>
+#include <media_content.h>
+
+#define TEST_SET_GROUP_NAME "artist"
+//& set: MediaGroup
+
+static media_album_h g_album;
+static media_album_h g_album_dst;
+static filter_h g_filter;
+static int g_album_id = 0;
+static char *g_album_name = NULL;
+static char *g_artist_name = NULL;
+static char *g_genre_name = NULL;
+static char *g_composer_name = NULL;
+static char *g_year_name = NULL;
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+static bool media_item_cb(media_info_h media, void *user_data)
+{
+    return true;
+}
+
+
+static bool album_cb(media_album_h album, void *user_data)
+{
+    if(album != NULL)
+    {
+       media_album_get_album_id(album, &g_album_id);
+       media_album_get_name(album, &g_album_name);
+    }
+
+    return true;
+}
+
+
+static bool group_cb(const char *name, void *user_data)
+{
+    if(name != NULL)
+    {
+    }
+
+    return false;
+}
+
+
+void utc_media_group_startup(void)
+{
+    /* start of TC */
+
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_connect();
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_content_connect failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+    }
+
+    char *condition = "MEDIA_TYPE=3";  //Music
+
+    media_filter_create(&g_filter);
+    media_filter_set_condition(g_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
+    media_filter_set_order(g_filter, MEDIA_CONTENT_ORDER_ASC, "MEDIA_TITLE", MEDIA_CONTENT_COLLATE_DEFAULT);
+    if(g_filter == NULL)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "g_filter is NULL");
+        startup_ret = ret;
+        return;
+    }
+
+    ret = media_album_foreach_album_from_db(g_filter, album_cb, NULL);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_album_foreach_album_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+    }
+
+    ret = media_album_get_album_from_db(g_album_id, &g_album);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_album_get_album_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+    }
+
+}
+
+
+void utc_media_group_cleanup(void)
+{
+    /* end of TC */
+
+    if(g_album_name){
+       free(g_album_name);
+        g_album_name = NULL;
+    }
+
+    if(g_artist_name){
+       free(g_artist_name);
+        g_artist_name = NULL;
+    }
+
+    if(g_genre_name){
+       free(g_genre_name);
+        g_genre_name = NULL;
+    }
+
+    if(g_composer_name){
+       free(g_composer_name);
+        g_composer_name = NULL;
+    }
+
+    if(g_year_name){
+       free(g_year_name);
+        g_year_name = NULL;
+    }
+
+    if(g_filter){
+       media_filter_destroy(g_filter);
+        g_filter = NULL;
+    }
+
+    if(g_album){
+       media_album_destroy(g_album);
+        g_album = NULL;
+    }
+
+    media_content_disconnect();
+
+}
+
+
+int utc_media_album_get_album_count_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_get_album_count_from_db(g_filter, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_album_get_album_count_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int album_count = 0;
+
+    ret = media_album_get_album_count_from_db(g_filter, &album_count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_album_foreach_album_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_foreach_album_from_db(g_filter, NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_album_foreach_album_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_foreach_album_from_db(g_filter, album_cb, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_album_get_media_count_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int media_count = 0;
+
+    ret = media_album_get_media_count_from_db(0, g_filter, &media_count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_album_get_media_count_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int media_count = 0;
+
+    ret = media_album_get_media_count_from_db(g_album_id, g_filter, &media_count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_album_foreach_media_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_foreach_media_from_db(0, g_filter, media_item_cb, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_album_foreach_media_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_foreach_media_from_db(g_album_id, g_filter, media_item_cb, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_album_get_album_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_get_album_from_db(-1, &g_album);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_album_get_album_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    /* precondition */
+    ret = media_album_destroy(g_album);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    /* actual test */
+    ret = media_album_get_album_from_db(g_album_id, &g_album);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_album_get_album_id_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_get_album_id(g_album, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_album_get_album_id_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int album_id = 0;
+
+    ret = media_album_get_album_id(g_album, &album_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_album_get_name_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_get_name(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_album_get_name_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *album_name = NULL;
+
+    ret = media_album_get_name(g_album, &album_name);
+
+    if(album_name){
+       free(album_name);
+        album_name = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_album_get_artist_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_get_artist(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_album_get_artist_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *artist_name = NULL;
+
+    ret = media_album_get_artist(g_album, &artist_name);
+
+    if(artist_name){
+       free(artist_name);
+        artist_name = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_album_get_album_art_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_get_album_art(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_album_get_album_art_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *album_art = NULL;
+
+    ret = media_album_get_album_art(g_album, &album_art);
+
+    if(album_art){
+       free(album_art);
+        album_art = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_album_clone_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_clone(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_album_clone_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_clone(&g_album_dst, g_album);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_album_destroy_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_album_destroy(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_album_destroy_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    /* precondition */
+    ret = media_album_clone(&g_album_dst, g_album);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    /* actual test */
+    ret = media_album_destroy(g_album_dst);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_group_get_group_count_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_group_get_group_count_from_db(g_filter, MEDIA_CONTENT_GROUP_DISPLAY_NAME, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_group_get_group_count_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int group_count = 0;
+
+    ret = media_group_get_group_count_from_db(g_filter, MEDIA_CONTENT_GROUP_DISPLAY_NAME, &group_count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_group_get_media_count_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_group_get_media_count_from_db(NULL, MEDIA_CONTENT_GROUP_DISPLAY_NAME, g_filter, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_group_get_media_count_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int media_count = 0;
+
+    ret = media_group_get_media_count_from_db(NULL, MEDIA_CONTENT_GROUP_DISPLAY_NAME, g_filter, &media_count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_group_foreach_group_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_group_foreach_group_from_db(g_filter, MEDIA_CONTENT_GROUP_DISPLAY_NAME, NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_group_foreach_group_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_group_foreach_group_from_db(g_filter, MEDIA_CONTENT_GROUP_DISPLAY_NAME, group_cb, TEST_SET_GROUP_NAME);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_group_foreach_media_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_group_foreach_media_from_db(NULL, MEDIA_CONTENT_GROUP_DISPLAY_NAME, g_filter, NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_group_foreach_media_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_group_foreach_media_from_db(NULL, MEDIA_CONTENT_GROUP_DISPLAY_NAME, g_filter, media_item_cb, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
diff --git a/src/utc/media-content/utc-media-image.c b/src/utc/media-content/utc-media-image.c
new file mode 100755 (executable)
index 0000000..2661fb3
--- /dev/null
@@ -0,0 +1,394 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <stdlib.h>
+
+//& set: MediaImage
+
+static image_meta_h g_image;
+static image_meta_h g_image_dst;
+static char *g_media_id = NULL;
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+static bool media_item_cb(media_info_h media, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_info_get_media_id(media, &g_media_id);
+    if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL))
+    {
+       return false;
+    }
+
+    ret = media_info_get_image(media, &g_image);
+    if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_image == NULL))
+    {
+       return false;
+    }
+
+    return true;
+}
+
+
+void utc_media_image_startup(void)
+{
+    filter_h filter;
+    g_image = NULL;
+
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_connect();
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_content_connect failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+    }
+
+    char *condition = "MEDIA_TYPE=0";  //Image
+
+    media_filter_create(&filter);
+    media_filter_set_condition(filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
+    media_filter_set_order(filter, MEDIA_CONTENT_ORDER_ASC, MEDIA_DISPLAY_NAME, MEDIA_CONTENT_COLLATE_DEFAULT);
+    if(filter == NULL)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "filter is NULL");
+        startup_ret = ret;
+        return;
+    }
+
+    ret = media_info_foreach_media_from_db(filter, media_item_cb, NULL);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_info_foreach_media_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+    }
+
+    media_filter_destroy(filter);
+}
+
+
+void utc_media_image_cleanup(void)
+{
+    if(g_media_id){
+       free(g_media_id);
+        g_media_id = NULL;
+    }
+
+    if(g_image){
+       image_meta_destroy(g_image);
+        g_image = NULL;
+    }
+
+    media_content_disconnect();
+}
+
+
+
+int utc_image_meta_destroy_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = image_meta_destroy(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+
+int utc_image_meta_destroy_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    /* precondition */
+    ret = image_meta_clone(&g_image_dst, g_image);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    /* actual test */
+    ret = image_meta_destroy(g_image_dst);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_meta_clone_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    
+    ret = image_meta_clone(&g_image_dst, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_image_meta_clone_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    
+    ret = image_meta_clone(&g_image_dst, g_image);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_media_id_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *media_id = NULL;
+
+    ret = image_meta_get_media_id(NULL, &media_id);
+
+    if(media_id){
+        free(media_id);
+        media_id = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_media_id_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *media_id = NULL;
+
+    ret = image_meta_get_media_id(g_image, &media_id);
+
+    if(media_id){
+        free(media_id);
+        media_id = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_width_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int width = 0;
+
+    ret = image_meta_get_width(NULL, &width);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_width_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int width = 0;
+
+    ret = image_meta_get_width(g_image, &width);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_height_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int height = 0;
+
+    ret = image_meta_get_height(NULL, &height);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_height_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int height = 0;
+
+    ret = image_meta_get_height(g_image, &height);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_orientation_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_content_orientation_e orientation = 0;
+
+    ret = image_meta_get_orientation(NULL, &orientation);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_orientation_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_content_orientation_e orientation = 0;
+
+    ret = image_meta_get_orientation(g_image, &orientation);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_date_taken_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *date_taken = NULL;
+
+    ret = image_meta_get_date_taken(NULL, &date_taken);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_date_taken_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *date_taken = NULL;
+
+    ret = image_meta_get_date_taken(g_image, &date_taken);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_meta_set_orientation_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = image_meta_set_orientation(NULL, MEDIA_CONTENT_ORIENTATION_NORMAL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _set_orientation_cb(media_info_h media, void *user_data)
+{
+    return false;
+}
+
+int utc_image_meta_set_orientation_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter;
+       ret = media_filter_create(&filter);
+
+    ret = image_meta_set_orientation(g_image, MEDIA_CONTENT_ORIENTATION_NORMAL);
+
+       ret = image_meta_update_to_db(g_image);
+
+       ret = media_info_foreach_media_from_db(filter, _set_orientation_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_meta_update_to_db_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = image_meta_update_to_db(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_image_meta_update_to_db_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = image_meta_update_to_db(g_image);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_burst_id_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = image_meta_get_burst_id(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_image_meta_get_burst_id_p(void)
+{
+    char* burst_id = NULL;
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = image_meta_get_burst_id(g_image, &burst_id);
+
+    if(burst_id){
+       free(burst_id);
+        burst_id = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_image_meta_is_burst_shot_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = image_meta_is_burst_shot(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_image_meta_is_burst_shot_p(void)
+{
+    bool is_burst_shot = false;
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = image_meta_is_burst_shot(g_image, &is_burst_shot);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
diff --git a/src/utc/media-content/utc-media-info.c b/src/utc/media-content/utc-media-info.c
new file mode 100755 (executable)
index 0000000..81ed02c
--- /dev/null
@@ -0,0 +1,3037 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <stdlib.h>
+#include <glib.h>
+#include <unistd.h>
+#include <string.h>
+#include <storage.h>
+
+#define TEST_SET_SVALUE "new text"
+#define TEST_SET_IVALUE 1000.0
+//& set: MediaInfo
+
+static GMainLoop *g_loop = NULL;
+
+static media_info_h g_item;
+static media_info_h g_vitem;
+static media_info_h g_aitem;
+static media_info_h g_inserted_media_handle;
+static filter_h g_filter;
+
+static char *g_item_media_id = NULL;
+static char *g_inserted_media_id = NULL;
+
+static const char *g_insert_file = "test.jpg";
+static const char *g_origin_file = "image.jpg";
+static const char *g_move_dst_file = "test1.jpg";
+
+static char *g_insert_path = NULL;
+static char *g_origin_path = NULL;
+static char *g_move_dst_path = NULL;
+static char *g_insert_path_list[3];
+static char *g_burst_path_list[3];
+
+static time_t g_added_time;
+
+static media_content_error_e foreach_cb_result = MEDIA_CONTENT_ERROR_NONE;
+static media_content_error_e insert_batch_cb_result = MEDIA_CONTENT_ERROR_NONE;
+static media_content_error_e thumb_cb_result = MEDIA_CONTENT_ERROR_NONE;
+static media_content_error_e insert_burst_cb_result = MEDIA_CONTENT_ERROR_NONE;
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+
+static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+       int i;
+       char temp[500];
+       
+       if(type == STORAGE_TYPE_INTERNAL)
+       {
+               g_insert_path = (char*)malloc(strlen(path) + strlen(g_insert_file) + 6);
+               memset(g_insert_path,0x00,strlen(path) + strlen(g_insert_file) + 6);
+               sprintf(g_insert_path, "%s/res/%s", path, g_insert_file);
+
+               g_origin_path = (char*)malloc(strlen(path) + strlen(g_origin_file) + 6);
+               memset(g_origin_path,0x00,strlen(path) + strlen(g_origin_file) + 6);
+               sprintf(g_origin_path, "%s/res/%s", path, g_origin_file);
+
+               g_move_dst_path = (char*)malloc(strlen(path) + strlen(g_move_dst_file) + 6);
+               memset(g_move_dst_path,0x00,strlen(path) + strlen(g_move_dst_file) + 6);
+               sprintf(g_move_dst_path, "%s/res/%s", path, g_move_dst_file);
+
+               for(i = 0; i < 3; i++)
+               {
+                       memset(temp,0x00, sizeof(temp));
+                       sprintf(temp, "%s/res/batch%02d.jpg", path,i);
+                       g_insert_path_list[i] = strdup(temp);
+
+                       memset(temp,0x00, sizeof(temp));
+                       sprintf(temp, "%s/res/burst%02d.jpg", path,i);
+                       g_burst_path_list[i] = strdup(temp);                    
+               }
+               
+               
+               return false;
+       }
+       return true;
+}
+
+static bool sub_item_cb(media_info_h media, void *user_data)
+{
+       media_content_type_e type = 0;
+       char *name = NULL;
+
+       media_info_get_media_type(media, &type);
+       media_info_get_display_name(media, &name);
+
+       if(g_item == NULL && type == MEDIA_CONTENT_TYPE_IMAGE)
+       {
+               media_info_clone(&g_item, media);
+               media_info_get_media_id(media, &g_item_media_id);
+       }
+
+       if(g_vitem == NULL && type == MEDIA_CONTENT_TYPE_VIDEO)
+       {
+               media_info_clone(&g_vitem, media);
+               media_info_get_media_id(media, &g_item_media_id);
+       }
+       if(g_aitem == NULL && type == MEDIA_CONTENT_TYPE_MUSIC)
+       {
+               media_info_clone(&g_aitem, media);
+               media_info_get_media_id(media, &g_item_media_id);
+       }
+       free(name);
+       return true;
+}
+
+static bool foreach_cb(media_info_h media, void *user_data)
+{
+
+       char *id = NULL;
+       if(media != NULL)
+       {
+          media_info_get_media_id(media, &id);
+
+       if (id != NULL) {
+                       if(!strcmp(id, g_inserted_media_id))
+                       {
+                               fprintf(stderr," file path : %s \n", id);
+                               foreach_cb_result = MEDIA_CONTENT_ERROR_DB_FAILED;
+                       }
+                       else
+                       {
+//                             media_info_delete_from_db(id);
+                       }
+                               free(id);
+               }
+       }
+
+       return true;
+}
+
+void utc_media_info_startup(void)
+{
+       /* start of TC */
+
+       g_item = NULL;
+       g_vitem = NULL;
+       g_aitem = NULL;
+       g_inserted_media_handle = NULL;
+       g_filter = NULL;
+       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       }
+
+       media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_content_connect();
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+               fprintf(stderr, " media_content_connect failed (code: %d)\n", ret);
+               startup_ret = ret;
+               return;
+       }
+
+
+       char test_copy[256] = {0, };
+       snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", g_origin_path, g_insert_path);
+
+       ret = system(test_copy);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+               fprintf(stderr, "\"%s\" failed (code: %d)\n", test_copy, ret);
+               startup_ret = ret;
+               return;
+       }
+
+
+       ret = media_info_insert_to_db(g_insert_path, &g_inserted_media_handle);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+               fprintf(stderr, " media_info_insert_to_db failed (code: %d)\n", ret);
+               startup_ret = ret;
+               return;
+       }
+
+       ret = media_info_get_media_id(g_inserted_media_handle, &g_inserted_media_id);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+               fprintf(stderr, " media_info_get_media_id failed (code: %d)\n", ret);
+               startup_ret = ret;
+               return;
+       }
+
+       media_filter_create(&g_filter);
+       media_filter_set_condition(g_filter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+       if(g_filter == NULL)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+               fprintf(stderr, "filter is NULL");
+               startup_ret = ret;
+               return;
+       }
+
+       ret = media_info_foreach_media_from_db(g_filter, sub_item_cb, NULL);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+               fprintf(stderr, " media_info_foreach_media_from_db failed (code: %d)\n", ret);
+               startup_ret = ret;
+               return;
+       }
+       //media_info_clone(&g_item, g_inserted_media_handle);
+       //media_info_get_media_id(g_inserted_media_handle, &g_item_media_id);
+}
+
+void utc_media_info_cleanup(void)
+{
+       /* end of TC */
+       int i;
+
+       media_info_delete_from_db(g_inserted_media_id);
+
+       media_content_disconnect();
+
+       if(g_item_media_id){
+               free(g_item_media_id);
+               g_item_media_id = NULL;
+       }
+
+       if(g_inserted_media_id){
+               free(g_inserted_media_id);
+               g_inserted_media_id = NULL;
+       }
+
+       if(g_filter){
+               media_filter_destroy(g_filter);
+               g_filter = NULL;
+       }
+
+       if(g_insert_path != NULL)               free(g_insert_path);
+       if(g_origin_path != NULL)               free(g_origin_path);
+       if(g_move_dst_path != NULL)             free(g_move_dst_path);
+
+       for(i = 0; i < 3; i++)
+       {
+               if(g_burst_path_list[i]) free(g_burst_path_list[i]);
+               if(g_insert_path_list[i]) free(g_insert_path_list[i]);
+       }
+}
+
+int utc_media_info_insert_to_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_insert_to_db(NULL, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_insert_to_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       media_info_delete_from_db(g_insert_path);
+
+       ret = media_info_insert_to_db(g_insert_path, &g_inserted_media_handle);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+static void _insert_batch_cb(media_content_error_e error, void *user_data)
+{
+       insert_batch_cb_result = error;
+       g_main_loop_quit(g_loop);
+}
+
+static gboolean _insert_batch_start(gpointer data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char test_copy[256] = {0, };
+       int i = 0 ;
+
+       for (i = 0; i < 3; i ++) {
+               memset(test_copy, 0x0, sizeof(test_copy));
+               snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", g_origin_path, g_insert_path_list[i]);
+
+               ret = system(test_copy);
+       }
+
+       ret = media_info_insert_batch_to_db(g_insert_path_list, sizeof(g_insert_path_list)/ sizeof(*g_insert_path_list), _insert_batch_cb, NULL);
+       if (ret < 1)
+       {
+               g_main_loop_quit(g_loop);
+               insert_batch_cb_result = ret;
+       }
+       
+       return false;
+}
+
+
+int utc_media_info_insert_batch_to_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_insert_batch_to_db(NULL, 3, NULL, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_insert_batch_to_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       GSource *source = NULL;
+       GMainContext *context = NULL;
+
+       g_loop = g_main_loop_new(NULL, FALSE);
+       context = g_main_loop_get_context(g_loop);
+       source = g_idle_source_new();
+       g_source_set_callback (source, _insert_batch_start, NULL, NULL);
+       g_source_attach (source, context);
+
+       g_main_loop_run(g_loop);
+       g_main_loop_unref(g_loop);
+
+       g_loop = NULL;
+
+       assert_eq(insert_batch_cb_result, MEDIA_CONTENT_ERROR_NONE);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_display_name_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_display_name(NULL, TEST_SET_SVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _display_name_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *name = NULL;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path) {
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_display_name(media, &name);
+
+                       if(strcmp(name, TEST_SET_SVALUE) != 0)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+
+               if(name){
+                       free(name);
+                       name = NULL;
+               }
+
+               free(path);
+               path = NULL;
+       } else {
+               ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+
+int utc_media_info_set_display_name_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_display_name(g_inserted_media_handle, TEST_SET_SVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _display_name_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_favorite_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_favorite(NULL, true);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _favorite_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       bool fav = false;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_favorite(media, &fav);
+
+                       if(fav == false)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+               free(path);
+               path = NULL;
+       } else {
+               ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+
+int utc_media_info_set_favorite_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_favorite(g_inserted_media_handle, true);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _favorite_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_altitude_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_altitude(NULL, TEST_SET_IVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_altitude_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       double altitude = 0;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_altitude(media, &altitude);
+
+                       if(altitude != TEST_SET_IVALUE)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+
+               free(path);
+               path = NULL;
+       } else {
+               ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+
+int utc_media_info_set_altitude_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_altitude(g_inserted_media_handle, TEST_SET_IVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_altitude_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_latitude_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_latitude(NULL, TEST_SET_IVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_latitude_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       double latitude = 0;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_latitude(media, &latitude);
+
+                       if(latitude != TEST_SET_IVALUE)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+               free(path);
+               path = NULL;
+       } else {
+               ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+
+int utc_media_info_set_latitude_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_latitude(g_inserted_media_handle, TEST_SET_IVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_latitude_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_longitude_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_longitude(NULL, TEST_SET_IVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_longitude_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       double longitude = 0;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+       if(path) {
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_longitude(media, &longitude);
+
+                       if(longitude != TEST_SET_IVALUE)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+int utc_media_info_set_longitude_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_longitude(g_inserted_media_handle, TEST_SET_IVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_longitude_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_weather_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_weather(NULL, TEST_SET_SVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_weather_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *weather = NULL;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_weather(media, &weather);
+
+                       if(strcmp(weather, TEST_SET_SVALUE) != 0)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+
+               if(weather){
+                       free(weather);
+                       weather = NULL;
+               }
+
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+int utc_media_info_set_weather_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_weather(g_inserted_media_handle, TEST_SET_SVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_weather_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_rating_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_rating(NULL, 5);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_rating_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       int rating = 0;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_rating(media, &rating);
+
+                       if(rating != 5)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+int utc_media_info_set_rating_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_rating(g_inserted_media_handle, 5);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_rating_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_category_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_category(NULL, TEST_SET_SVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_category_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *category = NULL;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_category(media, &category);
+
+                       if(strcmp(category, TEST_SET_SVALUE))
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+
+               if(category){
+                       free(category);
+                       category = NULL;
+               }
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+int utc_media_info_set_category_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_category(g_inserted_media_handle, TEST_SET_SVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_category_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_location_tag_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_favorite(NULL, TEST_SET_SVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_location_tag_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *location = NULL;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_location_tag(media, &location);
+
+                       if(strcmp(location, TEST_SET_SVALUE)!= 0)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+
+               if(location){
+                       free(location);
+                       location = NULL;
+               }
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+int utc_media_info_set_location_tag_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_location_tag(g_inserted_media_handle, TEST_SET_SVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_location_tag_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_provider_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_provider(NULL, TEST_SET_SVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_provider_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *prov = NULL;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_provider(media, &prov);
+
+                       if(strcmp(prov, TEST_SET_SVALUE)!= 0)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+
+               if(prov){
+                       free(prov);
+                       prov = NULL;
+               }
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+int utc_media_info_set_provider_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+
+       ret = media_info_set_provider(g_inserted_media_handle, TEST_SET_SVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_provider_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_content_name_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_content_name(NULL, TEST_SET_SVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_content_name_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *name = NULL;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_content_name(media, &name);
+
+                       if(strcmp(name, TEST_SET_SVALUE)!= 0)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+
+               if(name){
+                       free(name);
+                       name = NULL;
+               }
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+int utc_media_info_set_content_name_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_content_name(g_inserted_media_handle, TEST_SET_SVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_content_name_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_description_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_description(NULL, TEST_SET_SVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_description_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *description = NULL;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path) {
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_description(media, &description);
+
+                       if(strcmp(description, TEST_SET_SVALUE)!= 0)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+
+               if(description){
+                       free(description);
+                       description = NULL;
+               }
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+int utc_media_info_set_description_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_description(g_inserted_media_handle, TEST_SET_SVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_description_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_author_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_author(NULL, TEST_SET_SVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_author_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *author = NULL;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path) {
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_author(media, &author);
+
+                       if(strcmp(author, TEST_SET_SVALUE)!= 0)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+
+               if(author){
+                       free(author);
+                       author = NULL;
+               }
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+int utc_media_info_set_author_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_author(g_inserted_media_handle, TEST_SET_SVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_author_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_age_rating_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_age_rating(NULL, TEST_SET_SVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_age_rating_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *rating = NULL;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+       if(strcmp(path, g_insert_path) == 0) {
+               ret = media_info_get_age_rating(media, &rating);
+
+               if(strcmp(rating, TEST_SET_SVALUE)!= 0)
+                       ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+       }
+
+       if(rating){
+               free(rating);
+               rating = NULL;
+       }
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+int utc_media_info_set_age_rating_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_age_rating(g_inserted_media_handle, TEST_SET_SVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_age_rating_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_added_time_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_added_time(NULL, 0);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_added_time_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       time_t get_added_time = 0;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_added_time(media, &get_added_time);
+
+                       if(g_added_time != get_added_time)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+int utc_media_info_set_added_time_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       time(&g_added_time);
+
+       ret = media_info_set_added_time(g_inserted_media_handle, g_added_time);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_added_time_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_set_keyword_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_keyword(NULL, TEST_SET_SVALUE);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool _set_keyword_cb(media_info_h media, void *user_data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *keyword = NULL;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(media, &path);
+
+       if(path){
+               if(strcmp(path, g_insert_path) == 0) {
+                       ret = media_info_get_keyword(media, &keyword);
+
+                       if(strcmp(keyword, TEST_SET_SVALUE)!= 0)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               }
+
+               if(keyword){
+                       free(keyword);
+                       keyword = NULL;
+               }
+               free(path);
+               path = NULL;
+       } else {
+               ret  = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return true;
+}
+
+
+int utc_media_info_set_keyword_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_set_keyword(g_inserted_media_handle, TEST_SET_SVALUE);
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+
+       ret = media_info_foreach_media_from_db(g_filter, _set_keyword_cb, NULL);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_update_to_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_update_to_db(NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_update_to_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_update_to_db(g_inserted_media_handle);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+static void thumb_cb(media_content_error_e error, const char *path, void *user_data)
+{
+       thumb_cb_result = error;
+       g_main_loop_quit(g_loop);
+}
+
+static gboolean _create_thumbnail_start(gpointer data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       ret = media_info_create_thumbnail(g_inserted_media_handle, thumb_cb, NULL);
+
+       if (ret < 1)
+       {
+               g_main_loop_quit(g_loop);
+               thumb_cb_result = ret;
+       }
+       return false;
+}
+
+
+int utc_media_info_create_thumbnail_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_create_thumbnail(NULL, thumb_cb, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_create_thumbnail_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       GSource *source = NULL;
+       GMainContext *context = NULL;
+
+       g_loop = g_main_loop_new(NULL, FALSE);
+       context = g_main_loop_get_context(g_loop);
+       source = g_idle_source_new();
+       g_source_set_callback (source, _create_thumbnail_start, NULL, NULL);
+       g_source_attach (source, context);
+
+       g_main_loop_run(g_loop);
+       g_main_loop_unref(g_loop);
+
+       g_loop = NULL;
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       assert_eq(thumb_cb_result, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_move_to_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_move_to_db(NULL, g_move_dst_path);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_move_to_db_p(void)
+{
+       char *m_id = NULL;
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char test_copy[256] = {0, };
+
+       snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", g_origin_path, g_move_dst_path);
+
+       ret = system(test_copy);
+
+       ret = media_info_move_to_db(g_inserted_media_handle, g_move_dst_path);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_info_delete_from_db(g_inserted_media_id);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       free (m_id);
+
+       unlink(g_move_dst_path);
+
+       return 0;
+}
+
+
+int utc_media_info_delete_from_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_delete_from_db(NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_delete_from_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_delete_from_db(g_inserted_media_id);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_info_foreach_media_from_db(NULL, foreach_cb, NULL);
+
+       assert_eq(foreach_cb_result, MEDIA_CONTENT_ERROR_NONE);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_delete_batch_from_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+
+       ret = media_info_delete_batch_from_db(filter);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_delete_batch_from_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+       media_filter_create(&filter);
+       media_filter_set_condition(filter, "MEDIA_DISPLAY_NAME like \'%%tc_image%%\'", MEDIA_CONTENT_COLLATE_DEFAULT);
+
+       ret = media_info_delete_batch_from_db(filter);
+       media_filter_destroy(filter);
+       filter = NULL;
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_foreach_media_from_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       filter_h filter = NULL;
+       media_filter_create(&filter);
+       media_filter_set_condition(filter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1", MEDIA_CONTENT_COLLATE_NOCASE);
+
+       ret = media_info_foreach_media_from_db(NULL, NULL, NULL);
+
+       if(filter){
+               media_filter_destroy(filter);
+               filter = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_foreach_media_from_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+
+       media_filter_create(&filter);
+       media_filter_set_condition(filter, "MEDIA_TYPE=0 OR MEDIA_TYPE=1 OR MEDIA_TYPE=3", MEDIA_CONTENT_COLLATE_NOCASE);
+
+       ret = media_info_foreach_media_from_db(filter, sub_item_cb, NULL);
+
+       if(filter){
+               media_filter_destroy(filter);
+               filter = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_destroy_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_destroy(NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_destroy_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_destroy(g_item);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_clone_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       media_info_h dst;
+
+       ret = media_info_clone(&dst, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_clone_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       media_info_h dst;
+
+       ret = media_info_clone(&dst, g_item);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_info_destroy(dst);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_media_id_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *media_id = NULL;
+
+       ret = media_info_get_media_id(NULL, &media_id);
+
+       if(media_id){
+               free(media_id);
+               media_id = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_media_id_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *media_id = NULL;
+
+       ret = media_info_get_media_id(g_item, &media_id);
+       if(media_id){
+               free(media_id);
+               media_id = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_file_path_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(NULL, &path);
+
+       if(path){
+               free(path);
+               path = NULL;
+       }
+       
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_file_path_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *path = NULL;
+
+       ret = media_info_get_file_path(g_item, &path);
+
+       if(path){
+               free(path);
+               path = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_display_name_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *name = NULL;
+
+       ret = media_info_get_display_name(NULL, &name);
+
+       if(name){
+               free(name);
+               name = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_display_name_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *name = NULL;
+
+       ret = media_info_get_display_name(g_item, &name);
+
+       if(name){
+               free(name);
+               name = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_media_type_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       media_content_type_e type = 0;
+
+       ret = media_info_get_media_type(NULL, &type);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_media_type_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       media_content_type_e type = 0;
+
+       ret = media_info_get_media_type(g_item, &type);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_mime_type_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *mime_type = NULL;
+
+       ret = media_info_get_mime_type(NULL, &mime_type);
+
+       if(mime_type){
+               free(mime_type);
+               mime_type = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_mime_type_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *mime_type = NULL;
+
+       ret = media_info_get_mime_type(g_item, &mime_type);
+       if(mime_type){
+               free(mime_type);
+               mime_type = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_thumbnail_path_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *thumbnail_path = NULL;
+
+       ret = media_info_get_thumbnail_path(NULL, &thumbnail_path);
+
+       if(thumbnail_path){
+               free(thumbnail_path);
+               thumbnail_path = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_thumbnail_path_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *thumbnail_path = NULL;
+
+       ret = media_info_get_thumbnail_path(g_item, &thumbnail_path);
+
+       if(thumbnail_path){
+               free(thumbnail_path);
+               thumbnail_path = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_modified_time_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       time_t date_modi;
+
+       ret = media_info_get_modified_time(NULL, &date_modi);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_modified_time_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       time_t date_modi;
+
+       ret = media_info_get_modified_time(g_item, &date_modi);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_size_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       unsigned long long size;
+
+       ret = media_info_get_size(NULL, &size);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_size_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       unsigned long long size;
+
+       ret = media_info_get_size(g_item, &size);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_storage_type_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       media_content_storage_e storage_type;
+
+       ret = media_info_get_storage_type(NULL, &storage_type);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_storage_type_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       media_content_storage_e storage_type;
+
+       ret = media_info_get_storage_type(g_item, &storage_type);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_is_drm_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       bool is_drm;
+
+       ret = media_info_is_drm(NULL, &is_drm);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_is_drm_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       bool is_drm = false;
+
+       ret = media_info_is_drm(g_item, &is_drm);
+       if(is_drm)
+               ret = MEDIA_CONTENT_ERROR_INVALID_OPERATION;
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_altitude_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       double altitude;
+
+       ret = media_info_get_altitude(NULL, &altitude);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_altitude_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       double altitude;
+
+       ret = media_info_get_altitude(g_item, &altitude);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_latitude_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       double latitude;
+
+       ret = media_info_get_altitude(NULL, &latitude);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_latitude_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       double latitude;
+
+       ret = media_info_get_latitude(g_item, &latitude);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_longitude_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       double longitude;
+
+       ret = media_info_get_longitude(NULL, &longitude);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_longitude_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       double longitude;
+
+       ret = media_info_get_longitude(g_item, &longitude);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_weather_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *weather = NULL;
+
+       ret = media_info_get_weather(NULL, &weather);
+
+       if(weather){
+               free(weather);
+               weather = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_weather_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *weather = NULL;
+
+       ret = media_info_get_weather(g_item, &weather);
+
+       if(weather != NULL)
+               free(weather);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+       return 0;
+}
+
+
+int utc_media_info_get_description_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *description=NULL;
+
+       ret = media_info_get_description(NULL, &description);
+
+       if(description){
+               free(description);
+               description = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_description_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *description = NULL;
+
+       ret = media_info_get_description(g_item, &description);
+
+       if(description){
+               free(description);
+               description = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_rating_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       int rating;
+
+       ret = media_info_get_rating(NULL, &rating);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_rating_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       int rating;
+
+       ret = media_info_get_rating(g_item, &rating);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_location_tag_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *location = NULL;
+
+       ret = media_info_get_location_tag(NULL, &location);
+
+       if(location){
+               free(location);
+               location = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_location_tag_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *location = NULL;
+
+       ret = media_info_get_location_tag(g_item, &location);
+
+       if(location){
+               free(location);
+               location = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_provider_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *provider = NULL;
+
+       ret = media_info_get_provider(NULL, &provider);
+
+       if(provider){
+               free(provider);
+               provider = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_provider_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *provider = NULL;
+
+       ret = media_info_get_provider(g_item, &provider);
+
+       if(provider){
+               free(provider);
+               provider = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_content_name_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *content_name = NULL;
+
+       ret = media_info_get_content_name(NULL, &content_name);
+
+       if(content_name){
+               free(content_name);
+               content_name = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_content_name_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *content_name = NULL;
+
+       ret = media_info_get_content_name(g_item, &content_name);
+
+       if(content_name){
+               free(content_name);
+               content_name = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_category_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *category = NULL;
+
+       ret = media_info_get_category(NULL, &category);
+
+       if(category){
+               free(category);
+               category = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_category_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *category = NULL;
+
+       ret = media_info_get_category(g_item, &category);
+
+       if(category){
+               free(category);
+               category = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_age_rating_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *age_rating = NULL;
+
+       ret = media_info_get_age_rating(NULL, &age_rating);
+
+       if(age_rating){
+               free(age_rating);
+               age_rating = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_age_rating_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *age_rating = NULL;
+
+       ret = media_info_get_age_rating(g_item, &age_rating);
+
+       if(age_rating){
+               free(age_rating);
+               age_rating = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_keyword_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *keyword = NULL;
+
+       ret = media_info_get_keyword(NULL, &keyword);
+
+       if(keyword){
+               free(keyword);
+               keyword = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_keyword_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *keyword = NULL;
+
+       ret = media_info_get_keyword(g_item, &keyword);
+
+       if(keyword){
+               free(keyword);
+               keyword = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_author_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *author = NULL;
+
+       ret = media_info_get_author(NULL, &author);
+
+       if(author){
+               free(author);
+               author = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_author_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *author = NULL;
+
+       ret = media_info_get_author(g_item, &author);
+
+       if(author){
+               free(author);
+               author = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_added_time_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       time_t added_time;
+
+       ret = media_info_get_added_time(NULL, &added_time);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_added_time_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       time_t added_time;
+
+       ret = media_info_get_added_time(g_item, &added_time);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_favorite_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       bool fav;
+
+       ret = media_info_get_favorite(NULL, &fav);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_favorite_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       bool fav;
+
+       ret = media_info_get_favorite(g_item, &fav);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_media_from_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       media_info_h media = NULL;
+
+       ret = media_info_get_media_from_db(NULL, &media);
+
+       if(media){
+               media_info_destroy(media);
+               media = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_media_from_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       media_info_h media = NULL;
+
+       ret = media_info_get_media_from_db(g_item_media_id, &media);
+
+       if(media){
+               media_info_destroy(media);
+               media = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_image_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       image_meta_h image = NULL;
+
+       ret = media_info_get_image(NULL, &image);
+
+       if(image){
+               image_meta_destroy(image);
+               image = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_image_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       image_meta_h image = NULL;
+
+       ret = media_info_get_image(g_item, &image);
+
+       if(image){
+               image_meta_destroy(image);
+               image = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_video_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       video_meta_h video = NULL;
+
+       ret = media_info_get_video(NULL, &video);
+
+       if(video){
+               video_meta_destroy(video);
+               video = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_video_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       video_meta_h video = NULL;
+
+       ret = media_info_get_video(g_vitem, &video);
+
+       if(video){
+               video_meta_destroy(video);
+               video = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_audio_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       audio_meta_h audio = NULL;
+
+       ret = media_info_get_audio(NULL, &audio);
+
+       if(audio){
+               audio_meta_destroy(audio);
+               audio = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_audio_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       audio_meta_h audio = NULL;
+
+       ret = media_info_get_audio(g_aitem, &audio);
+
+       if(audio){
+               audio_meta_destroy(audio);
+               audio = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_refresh_metadata_to_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_refresh_metadata_to_db(NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+static bool sub_item_cb2(media_info_h media, void *user_data)
+{
+       char **media_id = (char**)user_data;
+       if(media != NULL)
+       {
+               media_info_get_media_id(media, media_id);
+       }
+
+       return false;
+}
+
+
+int utc_media_info_refresh_metadata_to_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       char* media_id = NULL;
+       filter_h filter;
+       
+       media_filter_create(&filter);
+       media_filter_set_condition(filter, "MEDIA_DISPLAY_NAME='image.jpg'", MEDIA_CONTENT_COLLATE_NOCASE);
+
+       ret = media_info_foreach_media_from_db(filter, sub_item_cb2, &media_id);
+       if(ret != MEDIA_CONTENT_ERROR_NONE)
+       {
+               assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+       }
+
+       ret = media_info_refresh_metadata_to_db(media_id);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+       free(media_id);
+       return 0;
+}
+
+
+static bool sub_tag_cb(media_tag_h tag, void *user_data)
+{
+       char *name = NULL;
+       if(tag)
+       {
+               media_tag_get_name(tag, &name);
+       }
+
+       return false;
+}
+
+
+static bool sub_bookmark_cb(media_bookmark_h bookmark, void *user_data)
+{
+       int bm_id;
+
+       if(bookmark)
+       {
+               media_bookmark_get_bookmark_id(bookmark, &bm_id);
+       }
+
+       return false;
+}
+
+
+int utc_media_info_foreach_tag_from_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+
+       ret = media_info_foreach_tag_from_db(NULL, filter, NULL, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_foreach_tag_from_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+
+       media_filter_create(&filter);
+
+       ret = media_info_foreach_tag_from_db(g_item_media_id, filter, sub_tag_cb, NULL);
+       media_filter_destroy(filter);
+       filter = NULL;
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_foreach_bookmark_from_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+
+       ret = media_info_foreach_tag_from_db(NULL, filter, NULL, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_foreach_bookmark_from_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+
+       ret=media_filter_create(&filter);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_info_foreach_bookmark_from_db(g_item_media_id, filter, sub_bookmark_cb, NULL);
+       media_filter_destroy(filter);
+       filter = NULL;
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_bookmark_count_from_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+       int count;
+
+       ret = media_info_get_bookmark_count_from_db(NULL, filter, &count);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_bookmark_count_from_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+       int count;
+
+       media_filter_create(&filter);
+
+       ret = media_info_get_bookmark_count_from_db(g_item_media_id, filter, &count);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       if(filter){
+               media_filter_destroy(filter);
+               filter = NULL;
+       }
+
+       return 0;
+}
+
+
+int utc_media_info_get_media_count_from_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+
+       ret = media_info_get_media_count_from_db(filter, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_media_count_from_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+       int count;
+
+       media_filter_create(&filter);
+
+       ret = media_info_get_media_count_from_db(filter, &count);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       if(filter){
+               media_filter_destroy(filter);
+               filter = NULL;
+       }
+
+       return 0;
+}
+
+
+int utc_media_info_get_tag_count_from_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+       int count;
+
+       ret = media_info_get_tag_count_from_db(NULL, filter, &count);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_tag_count_from_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       filter_h filter = NULL;
+       int count;
+
+       media_filter_create(&filter);
+
+       ret = media_info_get_tag_count_from_db(g_item_media_id, filter, &count);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       if(filter){
+               media_filter_destroy(filter);
+               filter = NULL;
+       }
+
+       return 0;
+}
+
+
+int utc_media_info_get_timeline_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_get_timeline(NULL, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_timeline_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       time_t t_value = 0;
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_get_timeline(g_item, &t_value);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_get_title_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_get_title(NULL, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_get_title_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       char* title = NULL;
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_get_title(g_item, &title);
+
+       if(title){
+               free(title);
+               title = NULL;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_cancel_thumbnail_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_cancel_thumbnail(NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+int utc_media_info_cancel_thumbnail_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_cancel_thumbnail(g_item);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
+
+int utc_media_info_insert_burst_shot_to_db_n(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       ret = media_info_insert_burst_shot_to_db(NULL, 0, NULL, NULL);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+
+static void _insert_burst_shot_cb(media_content_error_e error, void * user_data)
+{
+       insert_burst_cb_result = error;
+       g_main_loop_quit(g_loop);
+}
+
+static gboolean _insert_burst_shot_to_db_start(gpointer data)
+{
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+       int i = 0;
+       char test_copy[256] = {0,};
+
+       for (i = 0; i < 3; i ++) {
+               memset(test_copy, 0x0, sizeof(test_copy));
+               snprintf(test_copy, sizeof(test_copy), "/bin/cp %s %s", g_origin_path, g_burst_path_list[i]);
+
+               ret = system(test_copy);
+       }
+
+       ret = media_info_insert_burst_shot_to_db((const char **)g_burst_path_list, 3, _insert_burst_shot_cb, NULL);
+       if (ret < 1)
+       {
+               g_main_loop_quit(g_loop);
+               insert_burst_cb_result = ret;
+       }
+
+       return ret;
+}
+
+
+int utc_media_info_insert_burst_shot_to_db_p(void)
+{
+       assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+       int ret = MEDIA_CONTENT_ERROR_NONE;
+
+       GSource *source = NULL;
+       GMainContext *context = NULL;
+
+       g_loop = g_main_loop_new(NULL, FALSE);
+       context = g_main_loop_get_context(g_loop);
+       source = g_idle_source_new();
+       g_source_set_callback (source, _insert_burst_shot_to_db_start, NULL, NULL);
+       g_source_attach (source, context);
+
+       g_main_loop_run(g_loop);
+       g_main_loop_unref(g_loop);
+
+       assert_eq(insert_burst_cb_result, MEDIA_CONTENT_ERROR_NONE);
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       return 0;
+}
+
diff --git a/src/utc/media-content/utc-media-playlist.c b/src/utc/media-content/utc-media-playlist.c
new file mode 100755 (executable)
index 0000000..954d68a
--- /dev/null
@@ -0,0 +1,819 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <stdlib.h>
+#include <string.h>
+#include <media_content.h>
+#include <storage.h>
+
+#define TEST_SET_PLAYLIST_SUB_1 "test_playlist_123"
+#define TEST_SET_PLAYLIST_SUB_2 "test_playlist_234"
+
+//& set: MediaPlaylist
+static const char *img_file = "image.jpg";
+static char *img_path = NULL;
+
+static media_playlist_h g_playlist;
+static media_playlist_h g_playlist_dst;
+
+static filter_h g_filter;
+static char *g_media_id = NULL;
+static int g_playlist_id = 0;
+static int g_playlist_member_id = 0;
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+       if(type == STORAGE_TYPE_INTERNAL)
+       {
+        img_path = (char*)malloc(strlen(path) + strlen(img_file) + 6);
+               memset(img_path,0x00,strlen(path) + strlen(img_file) + 6);
+        sprintf(img_path, "%s/res/%s", path, img_file);
+        return false;
+    }
+    return true;
+}
+
+static bool media_item_cb(media_info_h media, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_info_get_media_id(media, &g_media_id);
+
+    if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL))
+    {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_get_media_id failed (code: %d)\n", ret);
+       return false;
+    }
+
+    return true;
+}
+
+
+static bool playlist_item_cb(int playlist_member_id, media_info_h media, void *user_data)
+{
+    fprintf(stderr,"member id: %d", playlist_member_id);
+    g_playlist_member_id = playlist_member_id;
+
+    return true;
+}
+
+
+static bool playlist_cb(media_playlist_h playlist, void *user_data)
+{
+       int playlist_id = 0;
+       char *name = NULL;
+       if(playlist != NULL) {
+               media_playlist_get_playlist_id(g_playlist, &playlist_id);
+               media_playlist_get_name(g_playlist, &name);
+       }
+
+       if(name) {
+               free(name);
+               name = NULL;
+       }
+    return true;
+}
+
+
+void utc_media_playlist_startup(void)
+{
+    /* start of TC */
+
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       }
+
+    ret = media_content_connect();
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_content_connect failed (code: %d)\n", ret);
+        startup_ret = ret;
+       return;
+    }
+
+    char *condition = "MEDIA_TYPE=3";  //Music
+
+    media_filter_create(&g_filter);
+    media_filter_set_condition(g_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
+    //media_filter_set_order(g_filter, MEDIA_CONTENT_ORDER_ASC, "MEDIA_TITLE", MEDIA_CONTENT_COLLATE_DEFAULT);
+
+    if(g_filter == NULL)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "g_filter is NULL");
+        startup_ret = ret;
+       return;
+    }
+
+    ret = media_info_foreach_media_from_db(g_filter, media_item_cb, NULL);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_foreach_media_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+       return;
+    }
+    
+    //media_playlist_get_playlist_id(g_playlist, &g_playlist_id);
+    //media_playlist_delete_from_db(g_playlist_id);
+    
+    // to check if the same date has been already inserted
+    ret = media_playlist_insert_to_db(TEST_SET_PLAYLIST_SUB_1, &g_playlist);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_playlist_insert_to_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+       return;
+    }
+
+    ret = media_playlist_get_playlist_id(g_playlist, &g_playlist_id);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_playlist_get_playlist_id failed (code: %d)\n", ret);
+        startup_ret = ret;
+       return;
+    }
+}
+
+
+void utc_media_playlist_cleanup(void)
+{
+    /* end of TC */
+
+    if(g_media_id != NULL)
+       free(g_media_id);
+
+    if(g_filter != NULL)
+       media_filter_destroy(g_filter);
+
+    if(g_playlist != NULL)
+    {          
+       media_playlist_destroy(g_playlist);
+    }
+    
+    media_playlist_delete_from_db(g_playlist_id);
+    media_content_disconnect();
+       if(img_path != NULL)            free(img_path);
+}
+
+
+int utc_media_playlist_insert_to_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_insert_to_db(NULL, &g_playlist);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_insert_to_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    
+    media_playlist_delete_from_db(g_playlist_id);
+
+    /* precondition */
+    ret = media_playlist_destroy(g_playlist);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    /* actual test */
+    ret = media_playlist_insert_to_db(TEST_SET_PLAYLIST_SUB_2, &g_playlist);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_playlist_get_playlist_id(g_playlist, &g_playlist_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_delete_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_delete_from_db(-1);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_delete_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_delete_from_db(g_playlist_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_playlist_count_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_get_playlist_count_from_db(g_filter, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_playlist_count_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int playlist_count = 0;
+
+    ret = media_playlist_get_playlist_count_from_db(g_filter, &playlist_count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_foreach_playlist_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_foreach_playlist_from_db(g_filter, NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_foreach_playlist_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_foreach_playlist_from_db(g_filter, playlist_cb, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_media_count_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_get_media_count_from_db(0, g_filter, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_media_count_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int media_count = 0;
+
+    ret = media_playlist_get_media_count_from_db(g_playlist_id, g_filter, &media_count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_foreach_media_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_foreach_media_from_db(0, g_filter, playlist_item_cb, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_foreach_media_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_foreach_media_from_db(g_playlist_id, g_filter, playlist_item_cb, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_destroy_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_destroy(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_destroy_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_clone(&g_playlist_dst, g_playlist);
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       ret = media_playlist_destroy(g_playlist_dst);
+    g_playlist_dst = NULL;
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_clone_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_clone(&g_playlist_dst, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_clone_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_clone(&g_playlist_dst, g_playlist);
+
+       ret = media_playlist_destroy(g_playlist_dst);
+    g_playlist_dst = NULL;
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_playlist_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_playlist_h playlist;
+
+    ret = media_playlist_get_playlist_from_db(0, &playlist);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_playlist_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_playlist_h playlist;
+
+    ret = media_playlist_get_playlist_from_db(g_playlist_id, &playlist);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_playlist_id_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_get_playlist_id(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_playlist_id_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int playlist_id = 0;
+
+    ret = media_playlist_get_playlist_id(g_playlist, &playlist_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_name_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *name = NULL;
+
+    ret = media_playlist_get_name(NULL, &name);
+
+    if(name){
+        free(name);
+        name = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_name_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *name = NULL;
+
+    ret = media_playlist_get_name(g_playlist, &name);
+
+    if(name){
+       free(name);
+        name = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_play_order_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_get_play_order(NULL, g_playlist_member_id, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_play_order_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int playlist_order = 0;
+
+    ret = media_playlist_get_play_order(g_playlist, g_playlist_member_id, &playlist_order);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_update_to_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_update_to_db(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_update_to_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_update_to_db(g_playlist);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_set_name_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_set_name(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _set_name_cb(media_playlist_h playlist, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *name = NULL;
+    int playlist_id = 0;
+
+       ret = media_playlist_get_playlist_id(playlist, &playlist_id);
+
+       if(playlist_id == g_playlist_id) {
+               ret = media_playlist_get_name(playlist, &name);
+
+               if(strcmp(name, "myPlaylist") != 0)
+                       ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+       }
+
+    if(name){
+        free(name);
+        name = NULL;
+    }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return true;
+}
+
+int utc_media_playlist_set_name_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_set_name(g_playlist, "myPlaylist");
+
+    ret = media_playlist_update_to_db(g_playlist);
+
+    ret = media_playlist_foreach_playlist_from_db(g_filter, _set_name_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_playlist_add_media_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_add_media(NULL, g_media_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_add_media_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_add_media(g_playlist, g_media_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_set_play_order_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_set_play_order(NULL, g_playlist_member_id, 3);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _set_play_order_cb(media_playlist_h playlist, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+       int playlist_order = 0;
+    int playlist_id = 0;
+
+       ret = media_playlist_get_playlist_id(playlist, &playlist_id);
+
+       if(playlist_id == g_playlist_id) {
+               ret = media_playlist_get_play_order(playlist, g_playlist_member_id, &playlist_order);
+
+               if(playlist_order != 1)
+                       ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+       }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return true;
+}
+
+int utc_media_playlist_set_play_order_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    
+    media_playlist_add_media(g_playlist, g_media_id);
+    media_playlist_update_to_db(g_playlist);
+    
+    media_playlist_foreach_media_from_db(g_playlist_id, g_filter, playlist_item_cb, NULL);
+    fprintf(stderr,"member id: %d", g_playlist_member_id);
+    ret = media_playlist_set_play_order(g_playlist, g_playlist_member_id, 1);
+
+    media_playlist_update_to_db(g_playlist);
+
+       ret = media_playlist_foreach_playlist_from_db(g_filter, _set_play_order_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+    return 0;
+}
+
+int utc_media_playlist_remove_media_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_remove_media(NULL, g_playlist_member_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_remove_media_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_add_media(g_playlist, g_media_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_playlist_update_to_db(g_playlist);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_playlist_foreach_media_from_db(g_playlist_id, g_filter, playlist_item_cb, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+       
+    fprintf(stderr,"member id: %d", g_playlist_member_id);
+    ret = media_playlist_remove_media(g_playlist, g_playlist_member_id);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_thumbnail_path_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_get_thumbnail_path(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_playlist_get_thumbnail_path_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    char* thumbnail_path = NULL;
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_get_thumbnail_path(g_playlist, &thumbnail_path);
+
+    if(thumbnail_path){
+       free(thumbnail_path);
+        thumbnail_path = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_playlist_set_thumbnail_path_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_set_thumbnail_path(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _set_thumbnail_path_cb(media_playlist_h playlist, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *get_thumb_path = NULL;
+    int playlist_id = 0;
+
+       ret = media_playlist_get_playlist_id(playlist, &playlist_id);
+
+       if(playlist_id == g_playlist_id) {
+               ret = media_playlist_get_thumbnail_path(playlist, &get_thumb_path);
+
+               if(get_thumb_path) {
+                       if(strcmp(get_thumb_path, img_path) != 0)
+                               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+               } else {
+                       ret = MEDIA_CONTENT_ERROR_DB_FAILED;
+               }
+       }
+
+    if(get_thumb_path){
+               free(get_thumb_path);
+               get_thumb_path = NULL;
+    }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return true;
+}
+
+int utc_media_playlist_set_thumbnail_path_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    char *thumbnail_path = img_path;
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_playlist_set_thumbnail_path(g_playlist, thumbnail_path);
+
+    ret = media_playlist_update_to_db(g_playlist);
+
+    ret = media_playlist_foreach_playlist_from_db(g_filter, _set_thumbnail_path_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/media-content/utc-media-tag.c b/src/utc/media-content/utc-media-tag.c
new file mode 100755 (executable)
index 0000000..6f9f44c
--- /dev/null
@@ -0,0 +1,645 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <stdlib.h>
+#include <string.h>
+
+//& set: MediaTag
+
+static media_tag_h g_tag = NULL;
+static media_tag_h g_tag_dst = NULL;
+static filter_h g_filter;
+static int g_tag_id;
+static char *g_media_id = NULL;
+static char *tag_name = "tag_test_12";
+static media_content_error_e cb_name_cmp_result = MEDIA_CONTENT_ERROR_NONE;
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+static bool media_item_cb(media_info_h media, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_info_get_media_id(media, &g_media_id);
+
+    if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL))
+    {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_get_media_id failed (code: %d)\n", ret);
+       return false;
+    }
+
+    return true;
+}
+
+void utc_media_tag_startup(void)
+{
+    g_filter = NULL;
+    g_tag = NULL;
+    g_tag_dst = NULL;
+
+    media_content_error_e ret =  MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_connect();
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_content_connect failed (code: %d)\n", ret);
+        startup_ret = ret;
+       return;
+    }
+
+    char *condition = "MEDIA_TYPE=1";  //Video
+
+    media_filter_create(&g_filter);
+    media_filter_set_condition(g_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
+    media_filter_set_order(g_filter, MEDIA_CONTENT_ORDER_ASC, MEDIA_TITLE, MEDIA_CONTENT_COLLATE_DEFAULT);
+    if(g_filter == NULL)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "filter is NULL");
+        startup_ret = ret;
+       return;
+    }
+
+    ret = media_info_foreach_media_from_db(g_filter, media_item_cb, NULL);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_foreach_media_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+       return;
+    }
+
+    // test if the same data already has been inserted
+    ret = media_tag_insert_to_db(tag_name, &g_tag);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_tag_insert_to_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+       return;
+    }
+
+    ret = media_tag_get_tag_id(g_tag, &g_tag_id);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_tag_get_tag_id failed (code: %d)\n", ret);
+        startup_ret = ret;
+       return;
+    }
+}
+
+void utc_media_tag_cleanup(void)
+{
+    if(g_tag)
+    {
+       media_tag_delete_from_db(g_tag_id);
+       media_tag_destroy(g_tag);
+       
+    }
+
+       if(g_filter){
+               media_filter_destroy(g_filter);
+               g_filter = NULL;
+    }
+
+    media_content_disconnect();
+}
+
+
+static bool tag_cb(media_tag_h tag, void *user_data)
+{
+    char *name = NULL;
+    
+    if(tag != NULL)
+    {  
+       media_tag_get_name(tag, &name);
+
+        if(name == tag_name)
+        {
+            fprintf(stderr," tag name : %s \n", name);
+            free(name);
+            cb_name_cmp_result = MEDIA_CONTENT_ERROR_DB_FAILED;
+        }
+        else
+        {
+            int id;
+            fprintf(stderr," Removing tag named : %s \n", name);
+            free(name);
+            media_tag_get_tag_id(tag, &id);
+            media_tag_delete_from_db(id);
+        }
+       
+    }
+
+    return true;
+}
+
+
+static bool tag_check_cb(media_tag_h tag, void *user_data)
+{
+    char *name = NULL;
+
+    if(tag != NULL)
+    {
+        media_tag_get_name(tag, &name);
+        fprintf(stderr," tag name : %s should not exist in db.\n", name);
+
+        cb_name_cmp_result = MEDIA_CONTENT_ERROR_DB_FAILED;
+        free(name);
+    }
+
+    return true;
+}
+
+
+
+int utc_media_tag_insert_to_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_insert_to_db(NULL, &g_tag);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_insert_to_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_delete_from_db(g_tag_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+    
+    /* precondition */
+    if(g_tag){
+       ret = media_tag_destroy(g_tag);
+       g_tag = NULL;
+        assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+    }
+
+    /* actual test */
+    ret = media_tag_insert_to_db(tag_name, &g_tag);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = media_tag_get_tag_id(g_tag, &g_tag_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_tag_delete_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_delete_from_db(-1);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_delete_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_delete_from_db(g_tag_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_tag_get_tag_count_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_get_tag_count_from_db(NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+int utc_media_tag_get_tag_count_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int tag_count = 0;
+
+    ret = media_tag_get_tag_count_from_db(NULL, &tag_count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_tag_foreach_tag_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_foreach_tag_from_db(NULL, NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_foreach_tag_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    cb_name_cmp_result = MEDIA_CONTENT_ERROR_NONE;
+    filter_h filter1;
+
+    char *g_condition = "TAG_NAME like \"%%my%%\"";
+
+    ret = media_filter_create(&filter1);
+
+    ret = media_filter_set_condition(filter1, g_condition, MEDIA_CONTENT_COLLATE_DEFAULT);
+
+    ret = media_filter_set_order(filter1, MEDIA_CONTENT_ORDER_DESC, TAG_NAME, MEDIA_CONTENT_COLLATE_DEFAULT);
+
+    ret = media_tag_foreach_tag_from_db(filter1, tag_cb, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    media_tag_foreach_tag_from_db(filter1, tag_check_cb, NULL);
+    assert_eq(cb_name_cmp_result, MEDIA_CONTENT_ERROR_NONE);
+
+
+    return 0;
+}
+
+
+int utc_media_tag_get_media_count_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_get_media_count_from_db(g_tag_id, NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_get_media_count_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int media_count = 0;
+
+    ret = media_tag_get_media_count_from_db(g_tag_id, NULL, &media_count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_tag_foreach_media_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_foreach_media_from_db(g_tag_id, NULL, NULL, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_foreach_media_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_foreach_media_from_db(g_tag_id, NULL, media_item_cb, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+
+
+int utc_media_tag_clone_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_clone(&g_tag_dst, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_clone_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_clone(&g_tag_dst, g_tag);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+       if(g_tag_dst) {
+               media_tag_destroy(g_tag_dst);
+               g_tag_dst = NULL;
+       }
+
+    return 0;
+}
+
+
+int utc_media_tag_update_to_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_update_to_db(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_update_to_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_update_to_db(g_tag);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_tag_add_media_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_add_media(NULL, g_media_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_add_media_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_add_media(g_tag, g_media_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_tag_remove_media_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_remove_media(NULL, g_media_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_remove_media_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_remove_media(g_tag, g_media_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_tag_set_name_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_set_name(NULL, "myTag");
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _set_name_cb(media_tag_h tag, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+       char *name = NULL;
+       int tag_id = 0;
+
+       ret = media_tag_get_tag_id(tag, &tag_id);
+
+       if(tag_id == g_tag_id) {
+               ret = media_tag_get_name(tag, &name);
+
+               if(strcmp(name, "myTag") != 0)
+                       ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+       }
+
+    if(name){
+               free(name);
+               name = NULL;
+    }
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return true;
+}
+
+int utc_media_tag_set_name_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_set_name(g_tag, "myTag");
+
+       ret = media_tag_update_to_db(g_tag);
+
+       ret = media_tag_foreach_tag_from_db(g_filter, _set_name_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_tag_get_tag_id_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int tag_id = 0;
+
+    ret = media_tag_get_tag_id(NULL, &tag_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_get_tag_id_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int tag_id = 0;
+
+    ret = media_tag_get_tag_id(g_tag, &tag_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_tag_get_name_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *name = NULL;
+
+    ret = media_tag_get_name(NULL, &name);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_get_name_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *name = NULL;
+
+    ret = media_tag_get_name(g_tag, &name);
+
+    if(name){
+       free(name);
+        name = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_tag_get_tag_from_db_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_tag_h tag;
+
+    ret = media_tag_get_tag_from_db(0, &tag);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_get_tag_from_db_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    media_tag_h tag = NULL;
+
+    ret = media_tag_get_tag_from_db(g_tag_id, &tag);
+
+    if(tag){
+        media_tag_destroy(tag);
+        tag = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_tag_destroy_n(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_destroy(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_media_tag_destroy_p(void)
+{
+    assert_eq(startup_ret, MEDIA_CONTENT_ERROR_NONE);
+
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_tag_destroy(g_tag);
+    g_tag = NULL;
+    
+    media_tag_delete_from_db(g_tag_id);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/media-content/utc-media-video.c b/src/utc/media-content/utc-media-video.c
new file mode 100755 (executable)
index 0000000..92fada3
--- /dev/null
@@ -0,0 +1,848 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_content.h>
+#include <stdlib.h>
+#include <string.h>
+
+//& set: MediaVideo
+
+static video_meta_h g_video;
+static video_meta_h g_video_dst;
+static filter_h g_filter;
+static char *g_media_id = NULL;
+
+static media_content_error_e startup_ret = MEDIA_CONTENT_ERROR_NONE;
+
+static bool media_item_cb(media_info_h media, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_info_get_media_id(media, &g_media_id);
+    if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_media_id == NULL))
+    {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_get_media_id failed (code: %d)\n", ret);
+        return false;
+    }
+
+    ret = media_info_get_video(media, &g_video);
+    if((ret != MEDIA_CONTENT_ERROR_NONE) || (g_video == NULL))
+    {
+        fprintf(stderr, "CB error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "media_info_get_video failed (code: %d)\n", ret);
+        return false;
+    }
+
+    return true;
+}
+
+
+void utc_media_video_startup(void)
+{
+    /* start of TC */
+    g_filter = NULL;
+    g_video = NULL;
+
+    media_content_error_e ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = media_content_connect();
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_content_connect failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+    }
+
+    char *condition = "MEDIA_TYPE=1";    //Video
+
+    media_filter_create(&g_filter);
+    media_filter_set_condition(g_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
+    media_filter_set_order(g_filter, MEDIA_CONTENT_ORDER_ASC, MEDIA_TITLE, MEDIA_CONTENT_COLLATE_DEFAULT);
+    if(g_filter == NULL)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, "filter is NULL");
+        startup_ret = ret;
+        return;
+    }
+
+    ret = media_info_foreach_media_from_db(g_filter, media_item_cb, NULL);
+    if(ret != MEDIA_CONTENT_ERROR_NONE)
+    {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+        fprintf(stderr, " media_info_foreach_media_from_db failed (code: %d)\n", ret);
+        startup_ret = ret;
+        return;
+    }
+}
+
+
+void utc_media_video_cleanup(void)
+{
+    /* end of TC */
+
+    if(g_media_id != NULL){
+        free(g_media_id);
+        g_media_id = NULL;
+    }
+
+    if(g_video != NULL){
+        video_meta_destroy(g_video);
+        g_video = NULL;
+    }
+
+    if(g_video_dst!= NULL){
+        video_meta_destroy(g_video_dst);
+        g_video_dst = NULL;
+    }
+
+       if(g_filter){
+               media_filter_destroy(g_filter);
+               g_filter = NULL;
+    }
+
+    media_content_disconnect();
+}
+
+
+
+int utc_video_meta_destroy_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = video_meta_destroy(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+
+int utc_video_meta_destroy_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = video_meta_clone(&g_video_dst, g_video);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    ret = video_meta_destroy(g_video_dst);
+    g_video_dst = NULL;
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_clone_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    
+    ret = video_meta_clone(&g_video_dst, NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_clone_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    
+    ret = video_meta_clone(&g_video_dst, g_video);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_media_id_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *media_id = NULL;
+
+    ret = video_meta_get_media_id(NULL, &media_id);
+
+    if(media_id){
+        free(media_id);
+        media_id = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_media_id_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *media_id = NULL;
+
+    ret = video_meta_get_media_id(g_video, &media_id);
+
+    if(media_id){
+        free(media_id);
+        media_id = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_album_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *album = NULL;
+
+    ret = video_meta_get_album(NULL, &album);
+
+    if(album){
+        free(album);
+        album = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_album_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *album = NULL;
+
+    ret = video_meta_get_album(g_video, &album);
+
+    if(album){
+        free(album);
+        album = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_artist_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *artist = NULL;
+
+    ret = video_meta_get_artist(NULL, &artist);
+
+    if(artist){
+        free(artist);
+        artist = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_artist_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *artist = NULL;
+
+    ret = video_meta_get_artist(g_video, &artist);
+
+    if(artist){
+        free(artist);
+        artist = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_album_artist_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *album_artist = NULL;
+
+    ret = video_meta_get_album_artist(NULL, &album_artist);
+
+    if(album_artist){
+        free(album_artist);
+        album_artist = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_album_artist_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *album_artist = NULL;
+
+    ret = video_meta_get_album_artist(g_video, &album_artist);
+
+    if(album_artist){
+        free(album_artist);
+        album_artist = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_genre_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *genre = NULL;
+
+    ret = video_meta_get_genre(NULL, &genre);
+
+    if(genre){
+        free(genre);
+        genre = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+
+int utc_video_meta_get_genre_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *genre = NULL;
+
+    ret = video_meta_get_genre(g_video, &genre);
+
+    if(genre){
+        free(genre);
+        genre = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_composer_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *composer = NULL;
+
+    ret = video_meta_get_composer(NULL, &composer);
+
+    if(composer){
+        free(composer);
+        composer = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_composer_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *composer = NULL;
+
+    ret = video_meta_get_composer(g_video, &composer);
+
+    if(composer){
+        free(composer);
+        composer = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_year_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *year = NULL;
+
+    ret = video_meta_get_year(NULL, &year);
+
+    if(year){
+        free(year);
+        year = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+
+int utc_video_meta_get_year_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *year = NULL;
+
+    ret = video_meta_get_year(g_video, &year);
+
+    if(year){
+        free(year);
+        year = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_recorded_date_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *recorded_date = NULL;
+
+    ret = video_meta_get_recorded_date(NULL, &recorded_date);
+
+    if(recorded_date){
+        free(recorded_date);
+        recorded_date = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_recorded_date_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *recorded_date = NULL;
+
+    ret = video_meta_get_year(g_video, &recorded_date);
+
+    if(recorded_date){
+        free(recorded_date);
+        recorded_date = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_copyright_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *copyright = NULL;
+
+    ret = video_meta_get_copyright(NULL, &copyright);
+
+    if(copyright){
+        free(copyright);
+        copyright = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_copyright_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *copyright = NULL;
+
+    ret = video_meta_get_copyright(g_video, &copyright);
+
+    if(copyright){
+        free(copyright);
+        copyright = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_track_num_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *track_num = NULL;
+
+    ret = video_meta_get_track_num(NULL, &track_num);
+
+    if(track_num){
+        free(track_num);
+        track_num = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_track_num_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    char *track_num = NULL;
+
+    ret = video_meta_get_track_num(g_video, &track_num);
+
+    if(track_num){
+        free(track_num);
+        track_num = NULL;
+    }
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_bit_rate_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int bit_rate = 0;
+
+    ret = video_meta_get_bit_rate(NULL, &bit_rate);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_bit_rate_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int bit_rate = 0;
+
+    ret = video_meta_get_bit_rate(g_video, &bit_rate);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_duration_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int duration = 0;
+
+    ret = video_meta_get_duration(NULL, &duration);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_duration_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int duration = 0;
+
+    ret = video_meta_get_duration(g_video, &duration);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_width_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int width = 0;
+
+    ret = video_meta_get_width(NULL, &width);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_width_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int width = 0;
+
+    ret = video_meta_get_width(g_video, &width);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_height_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int height = 0;
+
+    ret = video_meta_get_height(NULL, &height);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_height_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int height = 0;
+
+    ret = video_meta_get_height(g_video, &height);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_played_count_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int count = 0;
+
+    ret = video_meta_get_played_count(NULL, &count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_played_count_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int count = 0;
+
+    ret = video_meta_get_played_count(g_video, &count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_played_time_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    time_t played_time = 0;
+
+    ret = video_meta_get_played_time(NULL, &played_time);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_played_time_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    time_t played_time = 0;
+
+    ret = video_meta_get_played_time(g_video, &played_time);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_played_position_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int position = 0;
+
+    ret = video_meta_get_played_position(NULL, &position);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_get_played_position_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int position = 0;
+
+    ret = video_meta_get_played_position(g_video, &position);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_set_played_count_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int played_count = 3;
+
+    ret = video_meta_set_played_count(NULL, played_count);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _played_count_cb(media_info_h media, void *user_data)
+{
+    return false;
+}
+
+
+int utc_video_meta_set_played_count_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int played_count = 3;
+
+    ret = video_meta_set_played_count(g_video, played_count);
+
+    ret = video_meta_update_to_db(g_video);
+
+       ret = media_info_foreach_media_from_db(g_filter, _played_count_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_set_played_time_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    time_t played_time = 0;
+
+    ret = video_meta_set_played_time(NULL, played_time);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _played_time_cb(media_info_h media, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+       time_t get_played_time = 0;
+       video_meta_h video;
+
+       ret = media_info_get_video(media, &video);
+
+       ret = video_meta_get_played_time(video, &get_played_time);
+
+       if(get_played_time != 0)
+               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+
+       assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return true;
+}
+
+int utc_video_meta_set_played_time_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    time_t played_time = 0;
+
+    ret = video_meta_set_played_time(g_video, played_time);
+
+    ret = video_meta_update_to_db(g_video);
+
+       ret = media_info_foreach_media_from_db(g_filter, _played_time_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_set_played_position_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int played_position = 0;
+
+    ret = video_meta_set_played_position(NULL, played_position);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static bool _played_position_cb(media_info_h media, void *user_data)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+       int position = 0;
+       video_meta_h video;
+
+       ret = media_info_get_video(media, &video);
+
+    ret = video_meta_get_played_position(video, &position);
+
+       if(position != 0)
+               ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return true;
+}
+
+int utc_video_meta_set_played_position_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+    int played_position = 0;
+
+    ret = video_meta_set_played_position(g_video, played_position);
+
+    ret = video_meta_update_to_db(g_video);
+
+       ret = media_info_foreach_media_from_db(g_filter, _played_position_cb, NULL);
+
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_video_meta_update_to_db_n(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = video_meta_update_to_db(NULL);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_video_meta_update_to_db_p(void)
+{
+    int ret = MEDIA_CONTENT_ERROR_NONE;
+
+    ret = video_meta_update_to_db(g_video);
+    assert_eq(ret, MEDIA_CONTENT_ERROR_NONE);
+
+    return 0;
+}
diff --git a/src/utc/media-key/CMakeLists.txt b/src/utc/media-key/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..39f4ec9
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "media-key")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-system-media-key")
+SET(TC_SOURCES
+       utc-media-key-release-func.c
+       utc-media-key-reserve-func.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/media-key/public.list b/src/utc/media-key/public.list
new file mode 100755 (executable)
index 0000000..fdc95c0
--- /dev/null
@@ -0,0 +1,2 @@
+media_key_release
+media_key_reserve
\ No newline at end of file
diff --git a/src/utc/media-key/tct-media-key-core.c b/src/utc/media-key/tct-media-key-core.c
new file mode 100755 (executable)
index 0000000..4e0d68d
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-media-key-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/media-key/tct-media-key-core.h b/src/utc/media-key/tct-media-key-core.h
new file mode 100755 (executable)
index 0000000..9a0d0d9
--- /dev/null
@@ -0,0 +1,34 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_MEDIA_KEY_CORE_H__
+#define __TCT_MEDIA_KEY_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_media_key_reserve_func_cleanup(void);
+
+extern int utc_media_key_release_p(void);
+extern int utc_media_key_reserve_p(void);
+extern int utc_media_key_reserve_n(void);
+
+testcase tc_array[] = {
+    {"utc_media_key_release_p", utc_media_key_release_p, NULL, NULL},
+    {"utc_media_key_reserve_p", utc_media_key_reserve_p, NULL, utc_media_key_reserve_func_cleanup},
+    {"utc_media_key_reserve_n", utc_media_key_reserve_n, NULL, utc_media_key_reserve_func_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_MEDIA_KEY_CORE_H__
diff --git a/src/utc/media-key/utc-media-key-release-func.c b/src/utc/media-key/utc-media-key-release-func.c
new file mode 100755 (executable)
index 0000000..2b722d8
--- /dev/null
@@ -0,0 +1,32 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_key.h>
+
+//& set: MediaKeyRelease
+
+static void _event_cb(media_key_e key, media_key_event_e status, void* user_data)
+{
+}
+
+int utc_media_key_release_p(void)
+{
+    int r = media_key_reserve(_event_cb, NULL);
+    assert_eq(r, MEDIA_KEY_ERROR_NONE);
+    r = media_key_release();
+    assert_eq(r, MEDIA_KEY_ERROR_NONE);
+    return 0;
+}
diff --git a/src/utc/media-key/utc-media-key-reserve-func.c b/src/utc/media-key/utc-media-key-reserve-func.c
new file mode 100755 (executable)
index 0000000..957c7c9
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media_key.h>
+
+//& set: MediaKeyReserve
+
+void utc_media_key_reserve_func_cleanup(void)
+{
+    media_key_release();
+}
+
+static void _event_cb(media_key_e key, media_key_event_e status, void* user_data)
+{
+}
+
+int utc_media_key_reserve_p(void)
+{
+    int r = media_key_reserve(_event_cb, NULL);
+    assert_eq(r, MEDIA_KEY_ERROR_NONE);
+    return 0;
+}
+
+int utc_media_key_reserve_n(void)
+{
+    int r = media_key_reserve(NULL, NULL);
+    assert_eq(r, MEDIA_KEY_ERROR_INVALID_PARAMETER);
+    return 0;
+}
diff --git a/src/utc/mediacodec/CMakeLists.txt b/src/utc/mediacodec/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..50f0330
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "mediacodec")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-media-codec")
+SET(TC_SOURCES
+       utc-media-mediacodec.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       storage
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/mediacodec/public.list b/src/utc/mediacodec/public.list
new file mode 100755 (executable)
index 0000000..1befdaf
--- /dev/null
@@ -0,0 +1,20 @@
+mediacodec_create
+mediacodec_destroy
+mediacodec_set_codec
+mediacodec_set_vdec_info
+mediacodec_set_venc_info
+mediacodec_set_adec_info
+mediacodec_set_aenc_info
+mediacodec_prepare
+mediacodec_unprepare
+mediacodec_process_input
+mediacodec_get_output
+mediacodec_set_input_buffer_used_cb
+mediacodec_unset_input_buffer_used_cb
+mediacodec_set_output_buffer_available_cb
+mediacodec_unset_output_buffer_available_cb
+mediacodec_set_error_cb
+mediacodec_unset_error_cb
+mediacodec_set_eos_cb
+mediacodec_unset_eos_cb
+
diff --git a/src/utc/mediacodec/res/test.pcm b/src/utc/mediacodec/res/test.pcm
new file mode 100755 (executable)
index 0000000..38a4275
Binary files /dev/null and b/src/utc/mediacodec/res/test.pcm differ
diff --git a/src/utc/mediacodec/tct-mediacodec-core.c b/src/utc/mediacodec/tct-mediacodec-core.c
new file mode 100755 (executable)
index 0000000..5521fd5
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-mediacodec-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/mediacodec/tct-mediacodec-core.h b/src/utc/mediacodec/tct-mediacodec-core.h
new file mode 100755 (executable)
index 0000000..5fdf138
--- /dev/null
@@ -0,0 +1,107 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_MEDIACODEC_CORE_H__
+#define __TCT_MEDIACODEC_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_media_mediacodec_startup(void);
+extern void utc_media_mediacodec_cleanup(void);
+
+extern int _mediacodec_get_output(void);
+extern int utc_mediacodec_create_p(void);
+extern int utc_mediacodec_create_n(void);
+extern int utc_mediacodec_destroy_p(void);
+extern int utc_mediacodec_destroy_n(void);
+extern int utc_media_mediacodec_set_codec_p(void);
+extern int utc_media_mediacodec_set_codec_n(void);
+extern int utc_media_mediacodec_set_venc_info_p(void);
+extern int utc_media_mediacodec_set_venc_info_n(void);
+extern int utc_media_mediacodec_set_vdec_info_p(void);
+extern int utc_media_mediacodec_set_vdec_info_n(void);
+extern int utc_media_mediacodec_set_aenc_info_p(void);
+extern int utc_media_mediacodec_set_aenc_info_n(void);
+extern int utc_media_mediacodec_set_adec_info_p(void);
+extern int utc_media_mediacodec_set_adec_info_n(void);
+extern int utc_media_mediacodec_prepare_p(void);
+extern int utc_media_mediacodec_prepare_n(void);
+extern int utc_media_mediacodec_unprepare_p(void);
+extern int utc_media_mediacodec_unprepare_n(void);
+extern int utc_media_mediacodec_process_input_p(void);
+extern int utc_media_mediacodec_process_input_n(void);
+extern int utc_media_mediacodec_get_output_p(void);
+extern int utc_media_mediacodec_get_output_n(void);
+extern int utc_mediacodec_set_input_buffer_used_cb_p(void);
+extern int utc_mediacodec_set_input_buffer_used_cb_n(void);
+extern int utc_mediacodec_unset_input_buffer_used_cb_p(void);
+extern int utc_mediacodec_unset_input_buffer_used_cb_n(void);
+extern int utc_mediacodec_set_output_buffer_available_cb_p(void);
+extern int utc_mediacodec_set_output_buffer_available_cb_n(void);
+extern int utc_mediacodec_unset_output_buffer_available_cb_p(void);
+extern int utc_mediacodec_unset_output_buffer_available_cb_n(void);
+extern int utc_mediacodec_set_error_cb_p(void);
+extern int utc_mediacodec_set_error_cb_n(void);
+extern int utc_mediacodec_unset_error_cb_p(void);
+extern int utc_mediacodec_unset_error_cb_n(void);
+extern int utc_mediacodec_set_eos_cb_p(void);
+extern int utc_mediacodec_set_eos_cb_n(void);
+extern int utc_mediacodec_unset_eos_cb_p(void);
+extern int utc_mediacodec_unset_eos_cb_n(void);
+
+testcase tc_array[] = {
+    {"_mediacodec_get_output", _mediacodec_get_output, NULL, NULL},
+    {"utc_mediacodec_create_p", utc_mediacodec_create_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_create_n", utc_mediacodec_create_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_destroy_p", utc_mediacodec_destroy_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_destroy_n", utc_mediacodec_destroy_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_set_codec_p", utc_media_mediacodec_set_codec_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_set_codec_n", utc_media_mediacodec_set_codec_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_set_venc_info_p", utc_media_mediacodec_set_venc_info_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_set_venc_info_n", utc_media_mediacodec_set_venc_info_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_set_vdec_info_p", utc_media_mediacodec_set_vdec_info_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_set_vdec_info_n", utc_media_mediacodec_set_vdec_info_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_set_aenc_info_p", utc_media_mediacodec_set_aenc_info_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_set_aenc_info_n", utc_media_mediacodec_set_aenc_info_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_set_adec_info_p", utc_media_mediacodec_set_adec_info_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_set_adec_info_n", utc_media_mediacodec_set_adec_info_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_prepare_p", utc_media_mediacodec_prepare_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_prepare_n", utc_media_mediacodec_prepare_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_unprepare_p", utc_media_mediacodec_unprepare_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_unprepare_n", utc_media_mediacodec_unprepare_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_process_input_p", utc_media_mediacodec_process_input_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_process_input_n", utc_media_mediacodec_process_input_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_get_output_p", utc_media_mediacodec_get_output_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_media_mediacodec_get_output_n", utc_media_mediacodec_get_output_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_set_input_buffer_used_cb_p", utc_mediacodec_set_input_buffer_used_cb_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_set_input_buffer_used_cb_n", utc_mediacodec_set_input_buffer_used_cb_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_unset_input_buffer_used_cb_p", utc_mediacodec_unset_input_buffer_used_cb_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_unset_input_buffer_used_cb_n", utc_mediacodec_unset_input_buffer_used_cb_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_set_output_buffer_available_cb_p", utc_mediacodec_set_output_buffer_available_cb_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_set_output_buffer_available_cb_n", utc_mediacodec_set_output_buffer_available_cb_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_unset_output_buffer_available_cb_p", utc_mediacodec_unset_output_buffer_available_cb_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_unset_output_buffer_available_cb_n", utc_mediacodec_unset_output_buffer_available_cb_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_set_error_cb_p", utc_mediacodec_set_error_cb_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_set_error_cb_n", utc_mediacodec_set_error_cb_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_unset_error_cb_p", utc_mediacodec_unset_error_cb_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_unset_error_cb_n", utc_mediacodec_unset_error_cb_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_set_eos_cb_p", utc_mediacodec_set_eos_cb_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_set_eos_cb_n", utc_mediacodec_set_eos_cb_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_unset_eos_cb_p", utc_mediacodec_unset_eos_cb_p, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {"utc_mediacodec_unset_eos_cb_n", utc_mediacodec_unset_eos_cb_n, utc_media_mediacodec_startup, utc_media_mediacodec_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_MEDIACODEC_CORE_H__
diff --git a/src/utc/mediacodec/utc-media-mediacodec.c b/src/utc/mediacodec/utc-media-mediacodec.c
new file mode 100755 (executable)
index 0000000..e21b04c
--- /dev/null
@@ -0,0 +1,792 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media/media_codec.h>
+#include <glib.h>
+#include <string.h>
+#include <storage.h>
+
+
+#define MAX_HANDLE                     10
+#define MAX_INPUT_BUF_NUM   20
+
+#define TEST_FILE_SIZE  (10 * 1024 * 1024)
+#define MAX_STRING_LEN 256
+
+#define DEFAULT_OUT_BUF_WIDTH   640
+#define DEFAULT_OUT_BUF_HEIGHT  480
+#define OUTBUF_SIZE (DEFAULT_OUT_BUF_WIDTH * DEFAULT_OUT_BUF_HEIGHT * 3 / 2)
+
+static char* pcm_path = NULL;
+static char* pcm_file = "test.pcm";
+
+char g_uri[MAX_STRING_LEN];
+FILE *fp_src = NULL;
+unsigned char buffer[1000000];
+
+static mediacodec_h g_media_codec = NULL;
+
+media_packet_h input_buf = NULL;
+media_packet_h output_buf = NULL;
+media_format_h input_fmt = NULL;
+
+static bool _is_broken = false;
+static bool _is_positive = false;
+
+void* empty_data;
+void* fill_data;
+void* error_data;
+void *eos_data;
+
+static bool _emptybufferCB_called = false;
+static bool _fillbufferCB_called = false;
+static bool _eosCB_called = false;
+
+
+static bool __storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+{
+    int size_of_path;
+
+    if(type == STORAGE_TYPE_INTERNAL)
+    {
+        size_of_path = strlen(path)+strlen(pcm_file)+6;
+        pcm_path = (char*)malloc(strlen(path) + strlen(pcm_file) + 6);
+        memset(pcm_path,0x00,strlen(path) + strlen(pcm_file) + 6);
+        snprintf(pcm_path, size_of_path, "%s/res/%s", path, pcm_file);
+
+        return false;
+    }
+    return true;
+}
+
+
+static unsigned int input_data_open(void)
+{
+    int read_size = 0;
+    int result = 0;
+    read_size = (1024*2*2);
+
+    if (fp_src == NULL)
+    {
+        fp_src = fopen(pcm_path, "r");
+        if (fp_src == NULL)
+        {
+            g_print("file open failed\n");
+            return MEDIACODEC_ERROR_INVALID_PARAMETER;
+        }
+    }
+
+    if (feof(fp_src))
+        return -1;
+
+    result = fread(buffer, 1, read_size, fp_src);
+
+    if(result != read_size)
+    {
+        return -1;
+    }
+
+    return 1;
+}
+
+static unsigned int input_data_get(unsigned char* indata)
+{
+    int indata_size;
+    indata_size = (1024*2*2);
+    memcpy(indata, buffer, indata_size);
+    return indata_size;
+}
+
+static void input_data_close(void)
+{
+    if (fp_src)
+        fclose(fp_src);
+}
+
+int _mediacodec_get_output(void)
+{
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    if (_is_positive)
+    {
+        ret = mediacodec_get_output(g_media_codec, &output_buf, 0);
+        assert_eq(ret, MEDIACODEC_ERROR_NONE);
+        _is_positive = false;
+    }
+    else
+    {
+        ret = mediacodec_get_output(NULL, &output_buf, 0);
+        assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+static bool _mediacodec_empty_buffer_cb(media_packet_h * pkt, void *user_data)
+{
+    if (pkt != NULL)
+    {
+        media_packet_destroy(pkt);
+    }
+    _emptybufferCB_called = true;
+    return true;
+}
+
+static bool _mediacodec_fill_buffer_cb(media_packet_h * pkt, void *user_data)
+{
+    if (pkt != NULL)
+    {
+        _mediacodec_get_output();
+    }
+
+    _fillbufferCB_called = true;
+    return true;
+}
+
+static bool _mediacodec_eos_cb(void *user_data)
+{
+    _eosCB_called = true;
+    return true;
+}
+
+static bool empty_cb(media_packet_h * pkt, void *user_data)
+{
+    g_print("empty_cb is called\n");
+    return true;
+}
+
+static bool fill_cb(media_packet_h * pkt, void *user_data)
+{
+    g_print("fill_cb is called\n");
+    return true;
+}
+
+static bool error_cb(mediacodec_error_e error, void *user_data)
+{
+    g_print("error_cb is called\n");
+    return true;
+}
+
+static bool eos_cb(void *user_data)
+{
+    g_print("eos_cb is called\n");
+    return true;
+}
+
+void utc_media_mediacodec_startup(void)
+{
+    int ret = 0;
+
+       if(storage_foreach_device_supported(__storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE)
+       {
+               fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+       }
+
+
+    ret = mediacodec_create(&g_media_codec);
+    if (ret  != MEDIACODEC_ERROR_NONE)
+    {
+        _is_broken = true;
+        g_print("mediacodec create is failed\n");
+        return;
+    }
+    media_format_create(&input_fmt);
+
+    media_format_set_audio_mime(input_fmt, MEDIA_FORMAT_PCM);
+    media_format_set_audio_samplerate(input_fmt, 48000);
+    media_format_set_audio_channel(input_fmt, 2);
+    media_format_set_audio_bit(input_fmt, 16);
+    media_format_set_audio_avg_bps(input_fmt,128000);
+
+    media_packet_create_alloc(input_fmt, NULL, NULL, &input_buf);
+    input_data_open();
+}
+
+void utc_media_mediacodec_cleanup(void)
+{
+
+    if (input_buf)
+        media_packet_destroy(input_buf);
+
+    if (input_fmt)
+        media_format_unref(input_fmt);
+
+    if (g_media_codec)
+    {
+        mediacodec_unprepare(g_media_codec);
+        mediacodec_destroy(g_media_codec);
+        g_media_codec = NULL;
+    }
+
+    input_data_close();
+       if(pcm_path != NULL)
+       {
+               free(pcm_path);
+       }       
+}
+
+int utc_mediacodec_create_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_create(&g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_mediacodec_create_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_create(NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mediacodec_destroy_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_destroy(g_media_codec);
+    g_media_codec = NULL;
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_mediacodec_destroy_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_destroy(NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+int utc_media_mediacodec_set_codec_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_mediacodec_set_codec_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_NONE, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE);
+
+    return 0;
+}
+
+int utc_media_mediacodec_set_venc_info_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_H263, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_venc_info(g_media_codec, 640, 480, 30, 1000000);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_mediacodec_set_venc_info_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_H263, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_venc_info(g_media_codec, -640, -480, 30, 1000000);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_mediacodec_set_vdec_info_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_H264, (MEDIACODEC_DECODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_vdec_info(g_media_codec, 640, 480);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_mediacodec_set_vdec_info_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_H264, (MEDIACODEC_DECODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_vdec_info(g_media_codec, -640, -480);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_mediacodec_set_aenc_info_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_aenc_info(g_media_codec, 48000, 2, 16, 128000);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_mediacodec_set_aenc_info_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_aenc_info(g_media_codec, -48000, 0, 0, 0);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_mediacodec_set_adec_info_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_DECODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+
+    ret = mediacodec_set_adec_info(g_media_codec, 48000, 2, 16);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_mediacodec_set_adec_info_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_DECODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_adec_info(g_media_codec, -48000, 0, 0);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_mediacodec_prepare_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_aenc_info(g_media_codec, 48000, 2, 16, 128000);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_prepare(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_mediacodec_prepare_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_aenc_info(g_media_codec, 48000, 2, 16, 128000);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_prepare(NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_mediacodec_unprepare_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_aenc_info(g_media_codec, 48000, 2, 16, 128000);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_prepare(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_unprepare(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_mediacodec_unprepare_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_aenc_info(g_media_codec, 48000, 2, 16, 128000);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_prepare(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_unprepare(NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_mediacodec_process_input_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    void *data = NULL;
+    unsigned int data_size = 0;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_aenc_info(g_media_codec, 48000, 2, 16, 128000);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_prepare(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = media_packet_get_buffer_data_ptr(input_buf, &data);
+     assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    data_size = input_data_get(data);
+    ret = media_packet_set_buffer_size(input_buf, data_size);
+     assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    ret = mediacodec_process_input(g_media_codec, input_buf, 0);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_mediacodec_process_input_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    void *data = NULL;
+    unsigned int data_size = 0;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_aenc_info(g_media_codec, 48000, 2, 16, 128000);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_prepare(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = media_packet_get_buffer_data_ptr(input_buf, &data);
+     assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    data_size = input_data_get(data);
+    ret = media_packet_set_buffer_size(input_buf, data_size);
+     assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    ret = mediacodec_process_input(NULL, NULL, 0);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_mediacodec_get_output_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+   void *data = NULL;
+    unsigned int data_size = 0;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_aenc_info(g_media_codec, 48000, 2, 16, 128000);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    mediacodec_set_input_buffer_used_cb(g_media_codec, (mediacodec_input_buffer_used_cb)_mediacodec_empty_buffer_cb, g_media_codec);
+    _is_positive = true;
+    mediacodec_set_output_buffer_available_cb(g_media_codec, (mediacodec_output_buffer_available_cb)_mediacodec_fill_buffer_cb, g_media_codec);
+    mediacodec_set_eos_cb(g_media_codec,(mediacodec_eos_cb) _mediacodec_eos_cb, g_media_codec);
+
+    ret = mediacodec_prepare(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = media_packet_get_buffer_data_ptr(input_buf, &data);
+     assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    data_size = input_data_get(data);
+    ret = media_packet_set_buffer_size(input_buf, data_size);
+     assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_media_mediacodec_get_output_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+   void *data = NULL;
+    unsigned int data_size = 0;
+
+    ret = mediacodec_set_codec(g_media_codec, MEDIACODEC_AAC, (MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_SW));
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = mediacodec_set_aenc_info(g_media_codec, 48000, 2, 16, 128000);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    mediacodec_set_input_buffer_used_cb(g_media_codec, (mediacodec_input_buffer_used_cb)_mediacodec_empty_buffer_cb, g_media_codec);
+    _is_positive = false;
+    mediacodec_set_output_buffer_available_cb(g_media_codec, (mediacodec_output_buffer_available_cb)_mediacodec_fill_buffer_cb, g_media_codec);
+    mediacodec_set_eos_cb(g_media_codec,(mediacodec_eos_cb) _mediacodec_eos_cb, g_media_codec);
+
+    ret = mediacodec_prepare(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    ret = media_packet_get_buffer_data_ptr(input_buf, &data);
+     assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    data_size = input_data_get(data);
+    ret = media_packet_set_buffer_size(input_buf, data_size);
+    assert_eq(MEDIA_PACKET_ERROR_NONE, ret);
+
+    return 0;
+}
+
+int utc_mediacodec_set_input_buffer_used_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_input_buffer_used_cb(g_media_codec, empty_cb, empty_data);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_mediacodec_set_input_buffer_used_cb_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_input_buffer_used_cb(NULL, NULL, NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mediacodec_unset_input_buffer_used_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_unset_input_buffer_used_cb(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_mediacodec_unset_input_buffer_used_cb_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_unset_input_buffer_used_cb(NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mediacodec_set_output_buffer_available_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_output_buffer_available_cb(g_media_codec, fill_cb, fill_data);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_mediacodec_set_output_buffer_available_cb_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_output_buffer_available_cb(NULL, NULL, NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mediacodec_unset_output_buffer_available_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_unset_output_buffer_available_cb(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_mediacodec_unset_output_buffer_available_cb_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_unset_output_buffer_available_cb(NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mediacodec_set_error_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_error_cb(g_media_codec, error_cb, error_data);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_mediacodec_set_error_cb_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_error_cb(NULL,NULL,NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mediacodec_unset_error_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_unset_error_cb(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_mediacodec_unset_error_cb_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_unset_error_cb(NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mediacodec_set_eos_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_eos_cb(g_media_codec, eos_cb, eos_data);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_mediacodec_set_eos_cb_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_set_eos_cb(NULL,NULL,NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mediacodec_unset_eos_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_unset_eos_cb(g_media_codec);
+    assert_eq(ret, MEDIACODEC_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_mediacodec_unset_eos_cb_n(void)
+{
+    assert(!_is_broken);
+    int ret = MEDIACODEC_ERROR_NONE;
+
+    ret = mediacodec_unset_eos_cb(NULL);
+    assert_eq(ret, MEDIACODEC_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/messages/CMakeLists.txt b/src/utc/messages/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..ee7fb99
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "messages")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-messaging-messages")
+SET(CONFIGFILEPATH "\"/tmp/ITC_Config.txt\"")
+SET(TC_SOURCES
+       utc-messaging-messages.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       storage
+       capi-appfw-application
+       capi-system-info
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+add_definitions(-DCONFIGFILE_PATH=${CONFIGFILEPATH})
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/messages/public.list b/src/utc/messages/public.list
new file mode 100755 (executable)
index 0000000..d98e68d
--- /dev/null
@@ -0,0 +1,38 @@
+messages_add_address
+messages_add_sms_listening_port
+messages_close_service
+messages_create_message
+messages_destroy_message
+messages_foreach_message
+messages_free_message_array
+messages_get_address
+messages_get_address_count
+messages_get_mbox_type
+messages_get_message_count
+messages_get_message_id
+messages_get_message_port
+messages_get_message_type
+messages_get_sim_id
+messages_get_text
+messages_get_time
+messages_mms_add_attachment
+messages_mms_get_attachment
+messages_mms_get_attachment_count
+messages_mms_get_subject
+messages_mms_remove_all_attachments
+messages_mms_set_subject
+messages_open_service
+messages_push_add_incoming_cb
+messages_push_deregister
+messages_push_register
+messages_push_remove_incoming_cb
+messages_push_reregister
+messages_remove_all_addresses
+messages_search_message
+messages_search_message_by_id
+messages_send_message
+messages_set_message_incoming_cb
+messages_set_sim_id
+messages_set_text
+messages_unset_message_incoming_cb
+
diff --git a/src/utc/messages/res/Default.jpg b/src/utc/messages/res/Default.jpg
new file mode 100755 (executable)
index 0000000..c090428
Binary files /dev/null and b/src/utc/messages/res/Default.jpg differ
diff --git a/src/utc/messages/res/V091120_104905.3gp b/src/utc/messages/res/V091120_104905.3gp
new file mode 100755 (executable)
index 0000000..c41d536
Binary files /dev/null and b/src/utc/messages/res/V091120_104905.3gp differ
diff --git a/src/utc/messages/res/audio.amr b/src/utc/messages/res/audio.amr
new file mode 100755 (executable)
index 0000000..c41d536
Binary files /dev/null and b/src/utc/messages/res/audio.amr differ
diff --git a/src/utc/messages/tct-messages-core.c b/src/utc/messages/tct-messages-core.c
new file mode 100755 (executable)
index 0000000..1fda09c
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-messages-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/messages/tct-messages-core.h b/src/utc/messages/tct-messages-core.h
new file mode 100755 (executable)
index 0000000..6031d0d
--- /dev/null
@@ -0,0 +1,199 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_MESSAGES_CORE_H__
+#define __TCT_MESSAGES_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_messaging_messages_startup(void);
+extern void utc_messaging_messages_cleanup(void);
+
+extern int utc_messaging_messages_open_service_p(void);
+extern int utc_messaging_messages_open_service_n(void);
+extern int utc_messaging_messages_create_message_p01(void);
+extern int utc_messaging_messages_create_message_p02(void);
+extern int utc_messaging_messages_create_message_n(void);
+extern int utc_messaging_messages_add_address_p(void);
+extern int utc_messaging_messages_add_address_n(void);
+extern int utc_messaging_messages_get_address_count_p(void);
+extern int utc_messaging_messages_get_address_count_n(void);
+extern int utc_messaging_messages_get_address_p(void);
+extern int utc_messaging_messages_get_address_n(void);
+extern int utc_messaging_messages_remove_all_addresses_p(void);
+extern int utc_messaging_messages_remove_all_addresses_n(void);
+extern int utc_messaging_messages_set_text_p01(void);
+extern int utc_messaging_messages_set_text_p02(void);
+extern int utc_messaging_messages_set_text_n(void);
+extern int utc_messaging_messages_get_text_p01(void);
+extern int utc_messaging_messages_get_text_p02(void);
+extern int utc_messaging_messages_get_text_n(void);
+extern int utc_messaging_messages_get_time_p(void);
+extern int utc_messaging_messages_get_time_n(void);
+extern int utc_messaging_messages_get_message_type_p01(void);
+extern int utc_messaging_messages_get_message_type_p02(void);
+extern int utc_messaging_messages_get_message_type_n(void);
+extern int utc_messaging_messages_mms_set_subject_p(void);
+extern int utc_messaging_messages_mms_set_subject_n01(void);
+extern int utc_messaging_messages_mms_set_subject_n02(void);
+extern int utc_messaging_messages_mms_get_subject_p(void);
+extern int utc_messaging_messages_mms_get_subject_n01(void);
+extern int utc_messaging_messages_mms_get_subject_n02(void);
+extern int utc_messaging_messages_mms_add_attachment_p(void);
+extern int utc_messaging_messages_mms_add_attachment_n01(void);
+extern int utc_messaging_messages_mms_add_attachment_n02(void);
+extern int utc_messaging_messages_mms_get_attachment_count_p(void);
+extern int utc_messaging_messages_mms_get_attachment_count_n01(void);
+extern int utc_messaging_messages_mms_get_attachment_count_n02(void);
+extern int utc_messaging_messages_mms_get_attachment_p(void);
+extern int utc_messaging_messages_mms_get_attachment_n01(void);
+extern int utc_messaging_messages_mms_get_attachment_n02(void);
+extern int utc_messaging_messages_send_message_p01(void);
+extern int utc_messaging_messages_send_message_p02(void);
+extern int utc_messaging_messages_send_message_n(void);
+extern int utc_messaging_messages_set_message_incoming_cb_p(void);
+extern int utc_messaging_messages_set_message_incoming_cb_n(void);
+extern int utc_messaging_messages_unset_message_incoming_cb_p(void);
+extern int utc_messaging_messages_unset_message_incoming_cb_n(void);
+extern int utc_messaging_messages_mms_remove_all_attachments_p(void);
+extern int utc_messaging_messages_mms_remove_all_attachments_n(void);
+extern int utc_messaging_messages_destroy_message_p01(void);
+extern int utc_messaging_messages_destroy_message_p02(void);
+extern int utc_messaging_messages_destroy_message_n(void);
+extern int utc_messaging_messages_foreach_message_p(void);
+extern int utc_messaging_messages_foreach_message_n(void);
+extern int utc_messaging_messages_search_message_p(void);
+extern int utc_messaging_messages_search_message_n(void);
+extern int utc_messaging_messages_get_message_id_p(void);
+extern int utc_messaging_messages_get_message_id_n(void);
+extern int utc_messaging_messages_set_sim_id_p(void);
+extern int utc_messaging_messages_set_sim_id_n(void);
+extern int utc_messaging_messages_get_sim_id_p(void);
+extern int utc_messaging_messages_get_sim_id_n(void);
+extern int utc_messaging_messages_get_mbox_type_p(void);
+extern int utc_messaging_messages_get_mbox_type_n(void);
+extern int utc_messaging_messages_add_sms_listening_port_p(void);
+extern int utc_messaging_messages_add_sms_listening_port_n(void);
+extern int utc_messaging_messages_get_message_port_p(void);
+extern int utc_messaging_messages_get_message_port_n(void);
+extern int utc_messaging_messages_search_message_by_id_p(void);
+extern int utc_messaging_messages_search_message_by_id_n(void);
+extern int utc_messaging_messages_get_message_count_p(void);
+extern int utc_messaging_messages_get_message_count_n(void);
+extern int utc_messaging_messages_free_message_array_p(void);
+extern int utc_messaging_messages_free_message_array_n(void);
+extern int utc_messaging_messages_close_service_p(void);
+extern int utc_messaging_messages_close_service_n(void);
+extern int utc_messaging_messages_push_add_incoming_cb_p(void);
+extern int utc_messaging_messages_push_add_incoming_cb_n(void);
+extern int utc_messaging_messages_push_remove_incoming_cb_p(void);
+extern int utc_messaging_messages_push_remove_incoming_cb_n(void);
+extern int utc_messaging_messages_push_register_p(void);
+extern int utc_messaging_messages_push_register_n(void);
+extern int utc_messaging_messages_push_reregister_p(void);
+extern int utc_messaging_messages_push_reregister_n(void);
+extern int utc_messaging_messages_push_deregister_p(void);
+extern int utc_messaging_messages_push_deregister_n(void);
+
+testcase tc_array[] = {
+    {"utc_messaging_messages_open_service_p", utc_messaging_messages_open_service_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_open_service_n", utc_messaging_messages_open_service_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_create_message_p01", utc_messaging_messages_create_message_p01, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_create_message_p02", utc_messaging_messages_create_message_p02, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_create_message_n", utc_messaging_messages_create_message_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_add_address_p", utc_messaging_messages_add_address_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_add_address_n", utc_messaging_messages_add_address_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_address_count_p", utc_messaging_messages_get_address_count_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_address_count_n", utc_messaging_messages_get_address_count_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_address_p", utc_messaging_messages_get_address_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_address_n", utc_messaging_messages_get_address_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_remove_all_addresses_p", utc_messaging_messages_remove_all_addresses_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_remove_all_addresses_n", utc_messaging_messages_remove_all_addresses_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_set_text_p01", utc_messaging_messages_set_text_p01, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_set_text_p02", utc_messaging_messages_set_text_p02, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_set_text_n", utc_messaging_messages_set_text_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_text_p01", utc_messaging_messages_get_text_p01, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_text_p02", utc_messaging_messages_get_text_p02, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_text_n", utc_messaging_messages_get_text_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_time_p", utc_messaging_messages_get_time_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_time_n", utc_messaging_messages_get_time_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_message_type_p01", utc_messaging_messages_get_message_type_p01, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_message_type_p02", utc_messaging_messages_get_message_type_p02, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_message_type_n", utc_messaging_messages_get_message_type_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_set_subject_p", utc_messaging_messages_mms_set_subject_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_set_subject_n01", utc_messaging_messages_mms_set_subject_n01, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_set_subject_n02", utc_messaging_messages_mms_set_subject_n02, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_get_subject_p", utc_messaging_messages_mms_get_subject_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_get_subject_n01", utc_messaging_messages_mms_get_subject_n01, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_get_subject_n02", utc_messaging_messages_mms_get_subject_n02, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_add_attachment_p", utc_messaging_messages_mms_add_attachment_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_add_attachment_n01", utc_messaging_messages_mms_add_attachment_n01, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_add_attachment_n02", utc_messaging_messages_mms_add_attachment_n02, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_get_attachment_count_p", utc_messaging_messages_mms_get_attachment_count_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_get_attachment_count_n01", utc_messaging_messages_mms_get_attachment_count_n01, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_get_attachment_count_n02", utc_messaging_messages_mms_get_attachment_count_n02, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_get_attachment_p", utc_messaging_messages_mms_get_attachment_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_get_attachment_n01", utc_messaging_messages_mms_get_attachment_n01, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_get_attachment_n02", utc_messaging_messages_mms_get_attachment_n02, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_send_message_p01", utc_messaging_messages_send_message_p01, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_send_message_p02", utc_messaging_messages_send_message_p02, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_send_message_n", utc_messaging_messages_send_message_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_set_message_incoming_cb_p", utc_messaging_messages_set_message_incoming_cb_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_set_message_incoming_cb_n", utc_messaging_messages_set_message_incoming_cb_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_unset_message_incoming_cb_p", utc_messaging_messages_unset_message_incoming_cb_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_unset_message_incoming_cb_n", utc_messaging_messages_unset_message_incoming_cb_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_remove_all_attachments_p", utc_messaging_messages_mms_remove_all_attachments_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_mms_remove_all_attachments_n", utc_messaging_messages_mms_remove_all_attachments_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_destroy_message_p01", utc_messaging_messages_destroy_message_p01, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_destroy_message_p02", utc_messaging_messages_destroy_message_p02, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_destroy_message_n", utc_messaging_messages_destroy_message_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_foreach_message_p", utc_messaging_messages_foreach_message_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_foreach_message_n", utc_messaging_messages_foreach_message_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_search_message_p", utc_messaging_messages_search_message_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_search_message_n", utc_messaging_messages_search_message_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_message_id_p", utc_messaging_messages_get_message_id_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_message_id_n", utc_messaging_messages_get_message_id_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_set_sim_id_p", utc_messaging_messages_set_sim_id_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_set_sim_id_n", utc_messaging_messages_set_sim_id_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_sim_id_p", utc_messaging_messages_get_sim_id_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_sim_id_n", utc_messaging_messages_get_sim_id_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_mbox_type_p", utc_messaging_messages_get_mbox_type_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_mbox_type_n", utc_messaging_messages_get_mbox_type_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_add_sms_listening_port_p", utc_messaging_messages_add_sms_listening_port_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_add_sms_listening_port_n", utc_messaging_messages_add_sms_listening_port_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_message_port_p", utc_messaging_messages_get_message_port_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_message_port_n", utc_messaging_messages_get_message_port_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_search_message_by_id_p", utc_messaging_messages_search_message_by_id_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_search_message_by_id_n", utc_messaging_messages_search_message_by_id_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_message_count_p", utc_messaging_messages_get_message_count_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_get_message_count_n", utc_messaging_messages_get_message_count_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_free_message_array_p", utc_messaging_messages_free_message_array_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_free_message_array_n", utc_messaging_messages_free_message_array_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_close_service_p", utc_messaging_messages_close_service_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_close_service_n", utc_messaging_messages_close_service_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_push_add_incoming_cb_p", utc_messaging_messages_push_add_incoming_cb_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_push_add_incoming_cb_n", utc_messaging_messages_push_add_incoming_cb_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_push_remove_incoming_cb_p", utc_messaging_messages_push_remove_incoming_cb_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_push_remove_incoming_cb_n", utc_messaging_messages_push_remove_incoming_cb_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_push_register_p", utc_messaging_messages_push_register_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_push_register_n", utc_messaging_messages_push_register_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_push_reregister_p", utc_messaging_messages_push_reregister_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_push_reregister_n", utc_messaging_messages_push_reregister_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_push_deregister_p", utc_messaging_messages_push_deregister_p, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {"utc_messaging_messages_push_deregister_n", utc_messaging_messages_push_deregister_n, utc_messaging_messages_startup, utc_messaging_messages_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_MESSAGES_CORE_H__
diff --git a/src/utc/messages/utc-messaging-messages.c b/src/utc/messages/utc-messaging-messages.c
new file mode 100755 (executable)
index 0000000..87037dc
--- /dev/null
@@ -0,0 +1,2157 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <messages.h>
+#include <stdlib.h>
+#include <string.h>
+#include <storage.h>
+#include <system_info.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 TEST_ADDRESS_COUNT 3
+#define TEST_ADDRESS "000123412345"
+
+static char g_pstrRecipient[CONFIG_VALUE_LEN_MAX] = {0,};
+
+static char *test_addresses[TEST_ADDRESS_COUNT] = {
+    "+471234567128",
+    "+472222222332",
+    TEST_ADDRESS,
+};
+
+#define TEST_SIM_ID 1
+#define TEST_TEXT "This is test message body. Hello TIZEN Native API!!"
+#define TEST_SUBJECT "Test MMS Message!"
+
+#define TEST_ATTACH_COUNT 3
+
+static char* image_path=NULL;
+static char* audio_path=NULL;
+static char* video_path=NULL;
+
+static char* image="Default.jpg";
+static char* audio="audio.amr";
+static char* video="V091120_104905.3gp";
+
+static messages_service_h _svc = NULL;
+static messages_message_h _msg_sms = NULL;
+static messages_message_h _msg_mms = NULL;
+
+static messages_message_h* searched_message_array = NULL;
+static int searched_message_length;
+
+static bool is_telephony_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) {
+               image_path=(char*)malloc(strlen(path)+strlen(image)+6);
+               sprintf(image_path, "%s/res/%s",path,image);
+               audio_path=(char*)malloc(strlen(path)+strlen(audio)+6);
+               sprintf(audio_path, "%s/res/%s",path,audio);
+               video_path=(char*)malloc(strlen(path)+strlen(video)+6);
+               sprintf(video_path,"%s/res/%s",path,video);
+               return false;
+       }
+       return true;
+}
+
+
+typedef struct
+{
+       bool add_address;
+       bool add_text;
+       bool add_subject;     //Should be false for SMS
+       bool add_attachment;  //Should be false for SMS
+       bool search;
+} message_prepare;
+
+typedef struct
+{
+       bool channel;
+       bool channel_set_activated;
+       bool channel_set_id;
+       bool channel_set_name;
+
+       bool settings;
+       bool settings_set_enabled;
+
+
+} cb_prepare;
+
+
+bool _get_value_from_config(char* key, char* value)
+{
+       if ( NULL == key )
+       {
+               return false;
+       }
+       FILE* pfilePtr = fopen(CONFIGFILE_PATH, "r");
+       if ( NULL == pfilePtr )
+       {
+               return false;
+       }
+
+       char* pszKey = NULL;
+       char* pszValue = NULL;
+       char* pszDelim = "=\n";
+       char *temp = NULL;
+       char szConfigLine[CONFIG_LINE_LEN_MAX] = {0,};
+
+       while ( !feof(pfilePtr) )
+       {
+               if ( fgets(szConfigLine, CONFIG_LINE_LEN_MAX, pfilePtr) != NULL )
+               {
+                       pszKey = strtok_r(szConfigLine, pszDelim, &temp);
+                       pszValue = strtok_r(NULL, pszDelim, &temp);
+
+                       if ( 0 == g_strcmp0(pszKey, key) )
+                       {
+                               break;
+                       }
+
+                       pszKey = NULL;
+                       pszValue = NULL;
+               }
+       }
+
+       fclose(pfilePtr);
+       if ( NULL == pszValue )
+       {
+               return false;
+       }
+
+       if ( strlen(pszValue) >= CONFIG_VALUE_LEN_MAX )
+       {
+               return false;
+       }
+
+       memset(value, 0, CONFIG_VALUE_LEN_MAX);
+       strncpy(value, pszValue, CONFIG_VALUE_LEN_MAX);
+
+       return true;
+}
+void utc_messaging_messages_startup(void)
+{
+       /* start of TC */
+       system_info_get_platform_bool("http://tizen.org/feature/network.telephony",&is_telephony_supported);
+       system_info_get_platform_bool("http://tizen.org/feature/network.telephony.mms",&is_mms_supported);
+       storage_foreach_device_supported(storage_device_cb,NULL);
+       messages_open_service(&_svc);
+
+       if ( true != _get_value_from_config("MESSAGES_MOBILE_NUMBER", g_pstrRecipient) )
+       {
+               strncpy(g_pstrRecipient, TEST_ADDRESS, CONFIG_VALUE_LEN_MAX);
+       }
+}
+
+
+void utc_messaging_messages_cleanup(void)
+{
+       /* end of TC */
+       if(_msg_mms){
+               messages_destroy_message(_msg_mms);
+       }
+       if(_msg_sms){
+               messages_destroy_message(_msg_sms);
+       }
+       if(_svc){
+               messages_close_service(_svc);
+               _svc = NULL;
+       }
+       if(audio_path) free(audio_path);
+       if(video_path) free(video_path);
+       if(image_path) free(image_path);
+}
+
+
+static int msg_mms_prepare(message_prepare msg_p)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       ret = messages_create_message(MESSAGES_TYPE_MMS, &_msg_mms);
+       if (ret != MESSAGES_ERROR_NONE) return ret;
+
+       if(msg_p.add_address) {
+               int i;
+               for (i = 0; i < TEST_ADDRESS_COUNT; i++)
+               {
+                       ret =  messages_add_address(_msg_mms, test_addresses[i], MESSAGES_RECIPIENT_TO);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+               }
+       }
+
+       if(msg_p.add_text) {
+               ret = messages_set_text(_msg_mms, TEST_TEXT);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+
+       if(msg_p.add_subject) {
+               ret = messages_mms_set_subject(_msg_mms, TEST_SUBJECT);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+
+       if(msg_p.add_attachment) {
+               ret = messages_mms_add_attachment(_msg_mms, MESSAGES_MEDIA_IMAGE, image_path);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_add_attachment(_msg_mms, MESSAGES_MEDIA_AUDIO, audio_path);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_add_attachment(_msg_mms, MESSAGES_MEDIA_VIDEO, video_path);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+static int msg_sms_prepare(message_prepare msg_p)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       ret = messages_create_message(MESSAGES_TYPE_SMS, &_msg_sms);
+       if (ret != MESSAGES_ERROR_NONE) return ret;
+
+       if(msg_p.add_address){
+               int i;
+               for (i = 0; i < TEST_ADDRESS_COUNT; i++)
+               {
+                       ret =  messages_add_address(_msg_sms, test_addresses[i], MESSAGES_RECIPIENT_TO);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+               }
+       }
+
+       if(msg_p.add_text){
+               ret = messages_set_text(_msg_sms, TEST_TEXT);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+
+       if(msg_p.search){
+               ret = messages_search_message(
+               _svc, MESSAGES_MBOX_ALL, MESSAGES_TYPE_UNKNOWN,
+               NULL, NULL, 0, 0,
+               &searched_message_array, &searched_message_length, NULL);
+
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               assert_neq(searched_message_length, 0);
+       }
+
+       return 0;
+}
+
+static messages_message_h create_dummy_sms_message()
+{
+       messages_message_h p_msg = NULL;
+       int ret = messages_create_message(MESSAGES_TYPE_SMS, &p_msg);
+       assert_eq(ret, MESSAGES_ERROR_NONE);
+       return p_msg;
+}
+
+int utc_messaging_messages_open_service_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       if(is_telephony_supported)
+       {
+               // startup function is opening service for all tests but this
+               // one needs service to be closed
+               if(_svc){
+                       messages_close_service(_svc);
+                       _svc = NULL;
+               }
+
+               ret = messages_open_service(&_svc);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               assert_neq(_svc, NULL);
+       }
+       else
+       {
+               ret = messages_open_service(&_svc);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_messaging_messages_open_service_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_open_service(NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_create_message_p01(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_create_message(MESSAGES_TYPE_SMS, &_msg_sms);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_create_message_p02(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_create_message(MESSAGES_TYPE_MMS, &_msg_mms);
+
+       if(is_telephony_supported)
+       {
+               if (is_mms_supported) {
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+               } else {
+                       assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+               }
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_create_message_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_create_message(MESSAGES_TYPE_SMS, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_add_address_p(void)
+{
+       int i;
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg = {0,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg);
+               assert(!ret);
+
+               for (i=0; i < TEST_ADDRESS_COUNT; i++)
+               {
+                       ret =  messages_add_address(_msg_sms, test_addresses[i], MESSAGES_RECIPIENT_TO);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+               }
+       }
+       else
+       {
+               for (i=0; i < TEST_ADDRESS_COUNT; i++)
+               {
+                       ret =  messages_add_address(_msg_sms, test_addresses[i], MESSAGES_RECIPIENT_TO);
+                       assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+               }
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_add_address_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg = {0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg);
+               assert(!ret);
+
+               ret =  messages_add_address(_msg_sms, NULL, MESSAGES_RECIPIENT_TO);
+
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               ret =  messages_add_address(_msg_sms, NULL, MESSAGES_RECIPIENT_TO);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_address_count_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       int count = 0;
+       message_prepare msg = {1,0,0,0,0};
+
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg);
+               assert(!ret);
+
+               ret = messages_get_address_count(_msg_sms, &count);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               assert_eq(count, TEST_ADDRESS_COUNT);
+       }
+       else
+       {
+               ret = messages_get_address_count(_msg_sms, &count);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_address_count_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg = {1,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg);
+               assert(!ret);
+               ret = messages_get_address_count(_msg_sms, NULL);
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               ret = messages_get_address_count(_msg_sms, NULL);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_address_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       int i;
+
+       char *address = NULL;
+       message_prepare msg = {1,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg);
+               assert(!ret);
+
+               for (i=0; i < TEST_ADDRESS_COUNT; i++)
+               {
+                       ret = messages_get_address(_msg_sms, i, &address, NULL);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+                       assert_neq(address, NULL);
+                       ret = strcmp(address, test_addresses[i]);
+                       assert_eq(ret, 0);
+               }
+       }
+       else
+       {
+               for (i=0; i < TEST_ADDRESS_COUNT; i++)
+               {
+                       ret = messages_get_address(_msg_sms, i, &address, NULL);
+                       assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+               }
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_address_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg = {1,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg);
+               assert(!ret);
+
+               ret = messages_get_address(_msg_sms, 0, NULL, NULL);
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               ret = messages_get_address(_msg_sms, 0, NULL, NULL);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_remove_all_addresses_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       int count = -1;
+       message_prepare msg = {1,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg);
+               assert(!ret);
+
+               ret = messages_remove_all_addresses(_msg_sms);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_get_address_count(_msg_sms, &count);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               assert_eq(count, 0);
+       }
+       else
+       {
+               ret = messages_remove_all_addresses(_msg_sms);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_remove_all_addresses_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_remove_all_addresses(NULL);
+
+       if(is_telephony_supported) {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       } else {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_set_text_p01(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg_p = {0,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_set_text(_msg_sms, TEST_TEXT);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               ret = messages_set_text(_msg_sms, TEST_TEXT);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_set_text_p02(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg = {0,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_mms_prepare(msg);
+
+               if (is_mms_supported) {
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+
+                       ret = messages_set_text(_msg_mms, TEST_TEXT);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               } else {
+                       assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+               }
+       }
+       else
+       {
+               ret = messages_set_text(_msg_mms, TEST_TEXT);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_messaging_messages_set_text_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg_p = {0,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_set_text(_msg_sms, NULL);
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               ret = messages_set_text(_msg_sms, NULL);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_text_p01(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       char *text = NULL;
+       message_prepare msg_p = {0,1,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_get_text(_msg_sms, &text);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               assert_neq(text, NULL);
+
+               ret = strcmp(text, TEST_TEXT);
+               free(text);
+               text = NULL;
+               assert_eq(ret, 0);
+       }
+       else
+       {
+               ret = messages_get_text(_msg_sms, &text);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_text_p02(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       char *text = NULL;
+       message_prepare msg = {0,1,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_mms_prepare(msg);
+               if (is_mms_supported) {
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+
+                       ret = messages_get_text(_msg_mms, &text);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+                       assert_neq(text, NULL);
+
+                       ret = strcmp(text, TEST_TEXT);
+                       free(text);
+                       text = NULL;
+                       assert_eq(ret, 0);
+
+               } else {
+                       assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+               }
+       }
+       else
+       {
+               ret = messages_get_text(_msg_mms, &text);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_text_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_get_text(_msg_sms, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_time_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       time_t t;
+       message_prepare msg_p = {0,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+               ret = messages_get_time(_msg_sms, &t);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               ret = messages_get_time(_msg_sms, &t);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_time_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_get_time(NULL, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_message_type_p01(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       messages_message_type_e type;
+       message_prepare msg_p = {0,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_get_message_type(_msg_sms, &type);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               assert_eq(type, MESSAGES_TYPE_SMS);
+       }
+       else
+       {
+               ret = messages_get_message_type(_msg_sms, &type);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_message_type_p02(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       messages_message_type_e type;
+       message_prepare msg = {0,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_mms_prepare(msg);
+               if (is_mms_supported) {
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+
+                       ret = messages_get_message_type(_msg_mms, &type);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+                       assert_eq(type, MESSAGES_TYPE_MMS);
+               } else {
+                       assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+               }
+       }
+       else
+       {
+               ret = messages_get_message_type(_msg_mms, &type);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_message_type_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg_p = {0,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_get_message_type(_msg_sms, NULL);
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               ret = messages_get_message_type(_msg_sms, NULL);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_set_subject_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg = {0,0,0,0,0};
+       if(is_mms_supported)
+       {
+               ret = msg_mms_prepare(msg);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_set_subject(_msg_mms, TEST_SUBJECT);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               ret = messages_mms_set_subject(_msg_mms, TEST_SUBJECT);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_set_subject_n01(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_mms_set_subject(_msg_mms, NULL);
+
+       if(is_mms_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_set_subject_n02(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg_p = {0,0,0,0,0};
+       if(is_mms_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_mms_set_subject(_msg_sms, TEST_SUBJECT);
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               ret = messages_mms_set_subject(_msg_sms, TEST_SUBJECT);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_get_subject_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       char *subject = NULL;
+       message_prepare msg = {0,0,1,0,0};
+       if(is_mms_supported)
+       {
+               ret = msg_mms_prepare(msg);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_get_subject(_msg_mms, &subject);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               assert_neq(subject, NULL);
+
+               ret = strcmp(TEST_SUBJECT, subject);
+               free(subject);
+               subject = NULL;
+               assert_eq(ret, 0);
+       }
+       else
+       {
+               ret = messages_mms_get_subject(_msg_mms, &subject);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_get_subject_n01(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_mms_get_subject(_msg_mms, NULL);
+
+       if(is_mms_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_get_subject_n02(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       char *subject = NULL;
+       message_prepare msg_p = {0,0,0,0,0};
+       if(is_mms_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_mms_get_subject(_msg_sms, &subject);
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               ret = messages_mms_get_subject(_msg_sms, &subject);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_add_attachment_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg = {0,0,0,0,0};
+       if(is_mms_supported)
+       {
+               ret = msg_mms_prepare(msg);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_add_attachment(_msg_mms, MESSAGES_MEDIA_IMAGE, image_path);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_add_attachment(_msg_mms, MESSAGES_MEDIA_AUDIO, audio_path);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_add_attachment(_msg_mms, MESSAGES_MEDIA_VIDEO, video_path);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               ret = messages_mms_add_attachment(_msg_mms, MESSAGES_MEDIA_IMAGE, image_path);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_add_attachment_n01(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_mms_add_attachment(_msg_mms, MESSAGES_MEDIA_IMAGE, NULL);
+
+       if(is_mms_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_add_attachment_n02(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg_p = {0,0,0,0,0};
+
+       if(is_mms_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_add_attachment(_msg_sms, MESSAGES_MEDIA_IMAGE, image_path);
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               ret = messages_mms_add_attachment(_msg_sms, MESSAGES_MEDIA_IMAGE, image_path);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_get_attachment_count_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       int count = 0;
+       message_prepare msg = {0,0,0,1,0};
+       if(is_mms_supported)
+       {
+               ret = msg_mms_prepare(msg);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_get_attachment_count(_msg_mms, &count);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               assert_eq(count, TEST_ATTACH_COUNT);
+       }
+       else
+       {
+               ret = messages_mms_get_attachment_count(_msg_mms, &count);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_get_attachment_count_n01(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_mms_get_attachment_count(_msg_mms, NULL);
+
+       if(is_mms_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_get_attachment_count_n02(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       int count = 0;
+       message_prepare msg_p = {0,0,0,0,0};
+
+       if(is_mms_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_get_attachment_count(_msg_sms, &count);
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+
+       }
+       else
+       {
+               ret = messages_mms_get_attachment_count(_msg_sms, &count);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_get_attachment_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       int i;
+       messages_media_type_e type;
+       char *path = NULL;
+
+       message_prepare msg = {0,0,0,1,0};
+       if(is_mms_supported)
+       {
+               int res = msg_mms_prepare(msg);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               for (i=0; i < TEST_ATTACH_COUNT; i++)
+               {
+               ret = messages_mms_get_attachment(_msg_mms, i, &type, &path);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               assert_neq(path, NULL);
+
+               switch(type)
+               {
+                       case MESSAGES_MEDIA_IMAGE:
+                               ret = strcmp(image_path, path);
+                               free(path);
+                               path = NULL;
+                               assert_eq(ret, 0);
+                               break;
+                       case MESSAGES_MEDIA_AUDIO:
+                               ret = strcmp(audio_path, path);
+                               free(path);
+                               path = NULL;
+                               assert_eq(ret, 0);
+                               break;
+                       case MESSAGES_MEDIA_VIDEO:
+                               ret = strcmp(video_path, path);
+                               free(path);
+                               path = NULL;
+                               assert_eq(ret, 0);
+                               break;
+                       default:
+                               free(path);
+                               path = NULL;
+                               return 1;
+                               break;
+                       }
+               }
+
+       }
+       else
+       {
+               for (i=0; i < TEST_ATTACH_COUNT; i++)
+               {
+                       ret = messages_mms_get_attachment(_msg_mms, i, &type, &path);
+                       assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+               }
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_get_attachment_n01(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       messages_media_type_e type;
+
+       ret = messages_mms_get_attachment(_msg_mms, 0, &type, NULL);
+
+       if(is_mms_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_get_attachment_n02(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       messages_media_type_e type;
+       char *path = NULL;
+       message_prepare msg_p = {0,0,0,0,0};
+       if(is_mms_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_mms_get_attachment(_msg_sms, 0, &type, &path);
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+               assert_eq(path, NULL);
+       }
+       else
+       {
+               ret = messages_mms_get_attachment(_msg_sms, 0, &type, &path);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+void _sent_cb(messages_sending_result_e result, void *user_data)
+{
+}
+
+int utc_messaging_messages_send_message_p01(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg_p = {0,1,0,0,0};
+
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_add_address(_msg_sms, g_pstrRecipient, MESSAGES_RECIPIENT_TO);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_send_message(_svc, _msg_sms, false, _sent_cb, NULL);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               ret = messages_send_message(_svc, _msg_sms, false, _sent_cb, NULL);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+/* Sending MMS is not supported in SDK */
+int utc_messaging_messages_send_message_p02(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg = {0,1,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_mms_prepare(msg);
+
+               if (is_mms_supported) {
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+
+                       ret = messages_add_address(_msg_mms, g_pstrRecipient, MESSAGES_RECIPIENT_TO);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+
+                       ret = messages_mms_add_attachment(_msg_mms, MESSAGES_MEDIA_IMAGE, image_path);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+
+                       ret = messages_send_message(_svc, _msg_mms, false, _sent_cb, NULL);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+               } else {
+                       assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+               }
+       }
+       else
+       {
+               ret = messages_send_message(_svc, _msg_mms, false, _sent_cb, NULL);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_send_message_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_send_message(_svc, NULL, false, _sent_cb, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+static void _incoming_cb(messages_message_h incoming_msg, void *user_data)
+{
+}
+
+int utc_messaging_messages_set_message_incoming_cb_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_set_message_incoming_cb(_svc, _incoming_cb, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_set_message_incoming_cb_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_set_message_incoming_cb(_svc, NULL, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_unset_message_incoming_cb_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_unset_message_incoming_cb(_svc);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_unset_message_incoming_cb_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_unset_message_incoming_cb(NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_remove_all_attachments_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       int count = -1;
+       message_prepare msg = {0,0,0,1,0};
+       if(is_mms_supported)
+       {
+               ret = msg_mms_prepare(msg);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_remove_all_attachments(_msg_mms);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_mms_get_attachment_count(_msg_mms, &count);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               assert_eq(count, 0);
+       }
+       else
+       {
+               ret = messages_mms_remove_all_attachments(_msg_mms);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_mms_remove_all_attachments_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_mms_remove_all_attachments(NULL);
+
+       if(is_mms_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_destroy_message_p01(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg_p = {0,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_destroy_message(_msg_sms);
+               _msg_sms = NULL;
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               ret = messages_destroy_message(_msg_sms);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_destroy_message_p02(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg = {1,1,1,1,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_mms_prepare(msg);
+
+               if (is_mms_supported) {
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+
+                       ret = messages_destroy_message(_msg_mms);
+                       _msg_mms = NULL;
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+               } else {
+                       assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+               }
+       }
+       else
+       {
+               ret = messages_destroy_message(_msg_mms);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_destroy_message_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_destroy_message(NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+static bool _search_cb(messages_message_h msg, int index, int result_count, int total_count, void *user_data)
+{
+       return true;
+}
+
+int utc_messaging_messages_foreach_message_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_foreach_message(
+                               _svc, MESSAGES_MBOX_ALL, MESSAGES_TYPE_MMS,
+                               "test", NULL, 0, 0, _search_cb, NULL);
+
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_foreach_message_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_foreach_message(
+                               NULL, MESSAGES_MBOX_ALL, MESSAGES_TYPE_MMS,
+                               NULL, NULL, 0, 0, _search_cb, NULL);
+
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_search_message_p(void)
+{
+       int ret;
+
+       ret = messages_search_message(
+                               _svc, MESSAGES_MBOX_ALL, MESSAGES_TYPE_UNKNOWN,
+                               NULL, NULL, 0, 0,
+                               &searched_message_array, &searched_message_length, NULL);
+
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_search_message_n(void)
+{
+       int ret;
+
+       ret = messages_search_message(
+                               NULL, MESSAGES_MBOX_ALL, MESSAGES_TYPE_UNKNOWN,
+                               NULL, NULL, 0, 0,
+                               NULL, NULL, NULL);
+
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_messaging_messages_get_message_id_p(void)
+{
+       int ret;
+       int msgid;
+       messages_message_h p_msg = NULL;
+
+       /* Assumption: you should have at least one message */
+       ret = messages_search_message(
+                               _svc, MESSAGES_MBOX_ALL, MESSAGES_TYPE_UNKNOWN,
+                               NULL, NULL, 0, 0,
+                               &searched_message_array, &searched_message_length, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               if( searched_message_length > 0 )
+               {
+                       p_msg = searched_message_array[0];
+                       ret = messages_get_message_id(p_msg, &msgid);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+               }
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_message_id_n(void)
+{
+       int ret;
+
+       ret = messages_get_message_id(NULL, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_set_sim_id_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg_p = {0,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_set_sim_id(_msg_sms, TEST_SIM_ID);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+       }
+       else
+       {
+               ret = messages_set_sim_id(_msg_sms, TEST_SIM_ID);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_messaging_messages_set_sim_id_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       message_prepare msg_p = {0,0,0,0,0};
+       if(is_telephony_supported)
+       {
+               ret = msg_sms_prepare(msg_p);
+               assert(!ret);
+
+               ret = messages_set_sim_id(NULL, TEST_SIM_ID);
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+
+       }
+       else
+       {
+               ret = messages_set_sim_id(NULL, TEST_SIM_ID);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_sim_id_p(void)
+{
+       int ret;
+       int simid;
+       messages_message_h p_msg = NULL;
+       if(is_telephony_supported)
+       {
+               p_msg = create_dummy_sms_message();
+
+               ret = messages_get_sim_id(p_msg, &simid);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               ret = messages_get_sim_id(p_msg, &simid);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_sim_id_n(void)
+{
+       int ret;
+
+       ret = messages_get_sim_id(NULL, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_mbox_type_p(void)
+{
+       int ret;
+       messages_message_h p_msg = NULL;
+       messages_message_box_e mbox;
+       if(is_telephony_supported)
+       {
+               ret = messages_create_message(MESSAGES_TYPE_SMS, &p_msg);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_get_mbox_type(p_msg, &mbox);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               assert(!(MESSAGES_MBOX_ALL > mbox || MESSAGES_MBOX_DRAFT < mbox));
+       }
+       else
+       {
+               ret = messages_get_mbox_type(p_msg, &mbox);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_mbox_type_n(void)
+{
+       int ret;
+
+       ret = messages_get_mbox_type(NULL, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_add_sms_listening_port_p(void)
+{
+       int ret;
+
+       ret = messages_add_sms_listening_port(_svc, 1000);
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_add_sms_listening_port_n(void)
+{
+       int ret;
+
+       ret = messages_add_sms_listening_port(NULL, 1000);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_message_port_p(void)
+{
+       int ret;
+       messages_message_h p_msg = NULL;
+       int port;
+       if(is_telephony_supported)
+       {
+               /* We use the dummy msg which is newly created.
+               If you have the incoming wap push msg, you can use it instead of dummy */
+               ret = messages_create_message(MESSAGES_TYPE_SMS, &p_msg);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               ret = messages_get_message_port(p_msg, &port);
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               ret = messages_get_message_port(p_msg, &port);
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_messaging_messages_get_message_port_n(void)
+{
+       int ret;
+
+       ret = messages_get_message_port(NULL, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_messaging_messages_search_message_by_id_p(void)
+{
+       int ret;
+       messages_message_h msg = NULL;
+       messages_message_h searched_msg = NULL;
+       int msgid;
+       int searched_msgid;
+
+       ret = messages_search_message(
+       _svc, MESSAGES_MBOX_ALL, MESSAGES_TYPE_UNKNOWN,
+       NULL, NULL, 0, 0,
+       &searched_message_array, &searched_message_length, NULL);
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+
+               if (searched_message_length > 0) {
+                       ret = messages_get_message_id(searched_message_array[0], &msgid);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+
+                       ret = messages_search_message_by_id(_svc, msgid, &searched_msg);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+
+                       ret = messages_get_message_id(searched_msg, &searched_msgid);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+                       assert_eq(msgid, searched_msgid);
+               }
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_messaging_messages_search_message_by_id_n(void)
+{
+       int ret;
+
+       ret = messages_search_message_by_id(NULL, 0, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_get_message_count_p(void)
+{
+       int ret;
+       int count;
+
+       ret = messages_get_message_count(_svc, MESSAGES_MBOX_INBOX, MESSAGES_TYPE_UNKNOWN, &count);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_messaging_messages_get_message_count_n(void)
+{
+       int ret;
+
+       ret = messages_get_message_count(_svc, MESSAGES_MBOX_INBOX, MESSAGES_TYPE_UNKNOWN, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_free_message_array_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       messages_message_h p_msg = NULL;
+
+       /* Assumption: you should have at least one message in MSG_BOX */
+       ret = messages_search_message(
+                                       _svc, MESSAGES_MBOX_ALL, MESSAGES_TYPE_UNKNOWN,
+                                       NULL, NULL, 0, 0,
+                                       &searched_message_array, &searched_message_length, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+               if (searched_message_length > 0)
+               {
+                       ret = messages_free_message_array(searched_message_array);
+                       assert_eq(ret, MESSAGES_ERROR_NONE);
+               }
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_free_message_array_n(void)
+{
+       int ret;
+
+       ret = messages_free_message_array(NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+int utc_messaging_messages_close_service_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+       if(is_telephony_supported)
+       {
+               ret = messages_close_service(_svc);
+               _svc = NULL;
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               ret = messages_close_service(_svc);
+               _svc = NULL;
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_close_service_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_close_service(NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+
+//& set: MessagesWapPush
+
+static void _push_callback(const char *header, const char *body, int body_length, void *user_data)
+{
+    // do nothing
+}
+
+int utc_messaging_messages_push_add_incoming_cb_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_push_add_incoming_cb(_svc, "TEST_APP_ID", _push_callback, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_push_add_incoming_cb_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_push_add_incoming_cb(NULL, "TEST_APP_ID", NULL, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_push_remove_incoming_cb_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_push_remove_incoming_cb(_svc, "TEST_APP_ID");
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_push_remove_incoming_cb_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_push_remove_incoming_cb(NULL, "TEST_APP_ID");
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+#define PUSH_TEST_APP_ID "TEST_APP_ID"
+#define PUSH_TEST_CONTENT_TYPE "text/vnd.wap.connectivity-xml"
+
+
+int utc_messaging_messages_push_register_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_push_register(_svc, PUSH_TEST_CONTENT_TYPE, PUSH_TEST_APP_ID);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_push_register_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_push_register(_svc, NULL, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_push_reregister_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_push_reregister(_svc, PUSH_TEST_CONTENT_TYPE, PUSH_TEST_APP_ID, PUSH_TEST_CONTENT_TYPE, PUSH_TEST_APP_ID);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_push_reregister_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_push_reregister(_svc, NULL, NULL, NULL, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_push_deregister_p(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_push_deregister(_svc, PUSH_TEST_CONTENT_TYPE, PUSH_TEST_APP_ID);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_NONE);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_messaging_messages_push_deregister_n(void)
+{
+       int ret = MESSAGES_ERROR_NONE;
+
+       ret = messages_push_deregister(_svc, NULL, NULL);
+
+       if(is_telephony_supported)
+       {
+               assert_eq(ret, MESSAGES_ERROR_INVALID_PARAMETER);
+       }
+       else
+       {
+               assert_eq(ret, MESSAGES_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
diff --git a/src/utc/metadata-extractor/CMakeLists.txt b/src/utc/metadata-extractor/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..4447824
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "metadata-extractor")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-media-metadata-extractor")
+SET(TC_SOURCES
+       utc-metadata-extractor.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       storage
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/metadata-extractor/public.list b/src/utc/metadata-extractor/public.list
new file mode 100755 (executable)
index 0000000..fe09812
--- /dev/null
@@ -0,0 +1,10 @@
+metadata_extractor_create
+metadata_extractor_destroy
+metadata_extractor_get_artwork
+metadata_extractor_get_frame
+metadata_extractor_get_frame_at_time
+metadata_extractor_get_metadata
+metadata_extractor_get_synclyrics
+metadata_extractor_set_buffer
+metadata_extractor_set_path
+
diff --git a/src/utc/metadata-extractor/res/Color.mp4 b/src/utc/metadata-extractor/res/Color.mp4
new file mode 100755 (executable)
index 0000000..e203ae2
Binary files /dev/null and b/src/utc/metadata-extractor/res/Color.mp4 differ
diff --git a/src/utc/metadata-extractor/res/Over the horizon.mp3 b/src/utc/metadata-extractor/res/Over the horizon.mp3
new file mode 100755 (executable)
index 0000000..c41d536
Binary files /dev/null and b/src/utc/metadata-extractor/res/Over the horizon.mp3 differ
diff --git a/src/utc/metadata-extractor/tct-metadata-extractor-core.c b/src/utc/metadata-extractor/tct-metadata-extractor-core.c
new file mode 100755 (executable)
index 0000000..6be1db7
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-metadata-extractor-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/metadata-extractor/tct-metadata-extractor-core.h b/src/utc/metadata-extractor/tct-metadata-extractor-core.h
new file mode 100755 (executable)
index 0000000..d326211
--- /dev/null
@@ -0,0 +1,75 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_METADATA_EXTRACTOR_CORE_H__
+#define __TCT_METADATA_EXTRACTOR_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_metadata_extractor_startup(void);
+extern void utc_metadata_extractor_cleanup(void);
+
+extern int utc_metadata_extractor_create_n(void);
+extern int utc_metadata_extractor_create_p(void);
+extern int utc_metadata_extractor_set_path_n1(void);
+extern int utc_metadata_extractor_set_path_n2(void);
+extern int utc_metadata_extractor_set_path_p(void);
+extern int utc_metadata_extractor_set_buffer_n1(void);
+extern int utc_metadata_extractor_set_buffer_n2(void);
+extern int utc_metadata_extractor_set_buffer_p(void);
+extern int utc_metadata_extractor_get_metadata_n(void);
+extern int utc_metadata_extractor_get_metadata_p1(void);
+extern int utc_metadata_extractor_get_metadata_p2(void);
+extern int utc_metadata_extractor_get_metadata_p3(void);
+extern int utc_metadata_extractor_get_artwork_n(void);
+extern int utc_metadata_extractor_get_artwork_p(void);
+extern int utc_metadata_extractor_get_frame_n(void);
+extern int utc_metadata_extractor_get_frame_p(void);
+extern int utc_metadata_extractor_get_frame_at_time_n(void);
+extern int utc_metadata_extractor_get_frame_at_time_p(void);
+extern int utc_metadata_extractor_get_synclyrics_n1(void);
+extern int utc_metadata_extractor_get_synclyrics_n2(void);
+extern int utc_metadata_extractor_get_synclyrics_p(void);
+extern int utc_metadata_extractor_destroy_n(void);
+extern int utc_metadata_extractor_destroy_p(void);
+
+testcase tc_array[] = {
+    {"utc_metadata_extractor_create_n", utc_metadata_extractor_create_n, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_create_p", utc_metadata_extractor_create_p, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_set_path_n1", utc_metadata_extractor_set_path_n1, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_set_path_n2", utc_metadata_extractor_set_path_n2, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_set_path_p", utc_metadata_extractor_set_path_p, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_set_buffer_n1", utc_metadata_extractor_set_buffer_n1, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_set_buffer_n2", utc_metadata_extractor_set_buffer_n2, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_set_buffer_p", utc_metadata_extractor_set_buffer_p, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_metadata_n", utc_metadata_extractor_get_metadata_n, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_metadata_p1", utc_metadata_extractor_get_metadata_p1, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_metadata_p2", utc_metadata_extractor_get_metadata_p2, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_metadata_p3", utc_metadata_extractor_get_metadata_p3, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_artwork_n", utc_metadata_extractor_get_artwork_n, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_artwork_p", utc_metadata_extractor_get_artwork_p, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_frame_n", utc_metadata_extractor_get_frame_n, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_frame_p", utc_metadata_extractor_get_frame_p, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_frame_at_time_n", utc_metadata_extractor_get_frame_at_time_n, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_frame_at_time_p", utc_metadata_extractor_get_frame_at_time_p, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_synclyrics_n1", utc_metadata_extractor_get_synclyrics_n1, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_synclyrics_n2", utc_metadata_extractor_get_synclyrics_n2, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_get_synclyrics_p", utc_metadata_extractor_get_synclyrics_p, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_destroy_n", utc_metadata_extractor_destroy_n, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {"utc_metadata_extractor_destroy_p", utc_metadata_extractor_destroy_p, utc_metadata_extractor_startup, utc_metadata_extractor_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_METADATA_EXTRACTOR_CORE_H__
diff --git a/src/utc/metadata-extractor/utc-metadata-extractor.c b/src/utc/metadata-extractor/utc-metadata-extractor.c
new file mode 100755 (executable)
index 0000000..fac53ce
--- /dev/null
@@ -0,0 +1,512 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <metadata_extractor.h>
+#include <storage.h>
+
+
+static char* video="Color.mp4";
+static char* audio="Over the horizon.mp3";
+static char* video_path=NULL;
+static char* audio_path=NULL;
+
+#define READ_FROM_FILE(FILE_PATH, data, size) \
+       do{     \
+               FILE *fp = fopen(FILE_PATH, "r");       \
+               if (fp) {       \
+                               int read_size = 0;  \
+                               fseek(fp, 0, SEEK_END); \
+                               size = ftell(fp);       \
+                               fseek(fp, 0, SEEK_SET); \
+                               if (size > 0)   \
+                                       data = malloc (size);   \
+                               if (data != NULL)       \
+                                       read_size = fread (data, size, sizeof(char), fp);       \
+                               fclose(fp);     \
+                               printf("file size = %d\n", size );      \
+               }       \
+       } while (0)
+#define SAFE_FREE(src)      { if(src) {free(src); src = NULL;}}
+
+static metadata_extractor_h g_metadata_h = NULL;
+static int _startup_error = 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){
+         video_path=(char*)malloc(strlen(path)+strlen(video)+6);
+         snprintf(video_path, strlen(path)+strlen(video)+6, "%s/res/%s",path,video);
+         audio_path=(char*)malloc(strlen(path)+strlen(audio)+6);
+         snprintf(audio_path, strlen(path)+strlen(audio)+6, "%s/res/%s",path,audio);
+       return false;
+       }       
+       return true;
+}
+
+/**
+ * @brief startup
+ */
+void utc_metadata_extractor_startup(void)
+{
+    storage_foreach_device_supported(storage_device_cb,NULL);
+
+    if (METADATA_EXTRACTOR_ERROR_NONE != metadata_extractor_create(&g_metadata_h)) {
+        _startup_error = 1;
+    }
+
+}
+
+/**
+ * @brief cleanup
+ */
+void utc_metadata_extractor_cleanup(void)
+{
+    if (g_metadata_h) {
+        if (METADATA_EXTRACTOR_ERROR_NONE != metadata_extractor_destroy(g_metadata_h)) {
+            fprintf(stderr, "Cleanup function error - can affect other tests.");
+        }
+    }
+
+    if (audio_path) free(audio_path);
+    if (video_path) free(video_path);
+}
+
+/**
+ * @brief Negative test case of metadata_extractor_create()
+ */
+int utc_metadata_extractor_create_n(void)
+{
+    int ret = metadata_extractor_create(NULL);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of metadata_extractor_create()
+ */
+int utc_metadata_extractor_create_p(void)
+{
+    assert_eq(_startup_error, 0);
+
+    int ret;
+
+    ret = metadata_extractor_destroy(g_metadata_h);
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    ret = metadata_extractor_create(&g_metadata_h);
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief First negative test case of metadata_extractor_set_path() - invalid metadata_extractor_h
+ */
+int utc_metadata_extractor_set_path_n1(void)
+{
+    int ret = metadata_extractor_set_path(NULL, NULL);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Second negative test case of metadata_extractor_set_path() - invalid path
+ */
+int utc_metadata_extractor_set_path_n2(void)
+{
+    assert_eq(_startup_error, 0);
+
+    int ret = metadata_extractor_set_path(g_metadata_h, NULL);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of metadata_extractor_set_path()
+ */
+int utc_metadata_extractor_set_path_p(void)
+{
+    assert_eq(_startup_error, 0);
+
+    int ret = metadata_extractor_set_path(g_metadata_h, video_path);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief First negative test case of metadata_extractor_set_buffer() - invalid metadata_extractor_h
+ */
+int utc_metadata_extractor_set_buffer_n1(void)
+{
+    void* buffer = NULL;
+    int size = 0, ret;
+
+    READ_FROM_FILE(audio_path, buffer, size);
+
+    ret = metadata_extractor_set_buffer(NULL, buffer, size);
+    SAFE_FREE(buffer);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Second negative test case of metadata_extractor_set_buffer() - invalid buffer
+ */
+int utc_metadata_extractor_set_buffer_n2(void)
+{
+    assert_eq(_startup_error, 0);
+
+    int ret = metadata_extractor_set_buffer(g_metadata_h, NULL, 0);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of metadata_extractor_set_buffer()
+ */
+int utc_metadata_extractor_set_buffer_p(void)
+{
+    assert_eq(_startup_error, 0);
+
+    void* buffer = NULL;
+    int size = 0, ret;
+
+    READ_FROM_FILE(audio_path, buffer, size);
+
+    ret = metadata_extractor_set_buffer(g_metadata_h, buffer, size);
+    SAFE_FREE(buffer);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of metadata_extractor_get_metadata()
+ */
+int utc_metadata_extractor_get_metadata_n(void)
+{
+    int attr, ret;
+    char *value = NULL;
+
+    for (attr = 0; attr < (METADATA_ROTATE + 1); attr++)
+    {
+        ret = metadata_extractor_get_metadata(NULL, attr, &value);
+        SAFE_FREE(value);
+
+        assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of metadata_extractor_get_metadata() to file
+ */
+int utc_metadata_extractor_get_metadata_p1(void)
+{
+       assert_eq(_startup_error, 0);
+
+       int attr, ret;
+       char *value = NULL;
+
+       ret = metadata_extractor_set_path(g_metadata_h, audio_path);
+       assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+       for (attr = 0; attr < (METADATA_ROTATE + 1); attr++)
+       {
+               ret = metadata_extractor_get_metadata(g_metadata_h, attr, &value);
+               SAFE_FREE(value);
+
+               assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of metadata_extractor_get_metadata() to buffer
+ */
+int utc_metadata_extractor_get_metadata_p2(void)
+{
+       assert_eq(_startup_error, 0);
+
+       int attr, ret;
+       char *value = NULL;
+       void* buffer = NULL;
+       int size = 0;
+
+       READ_FROM_FILE(audio_path, buffer, size);
+
+       ret = metadata_extractor_set_buffer(g_metadata_h, buffer, size);
+       assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+       for (attr = 0; attr < (METADATA_ROTATE + 1); attr++)
+       {
+               ret = metadata_extractor_get_metadata(g_metadata_h, attr, &value);
+               SAFE_FREE(value);
+
+               assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+       }
+
+       SAFE_FREE(buffer);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of metadata_extractor_get_metadata()
+ */
+int utc_metadata_extractor_get_metadata_p3(void)
+{
+    assert_eq(_startup_error, 0);
+
+    int ret;
+    char *value = NULL;
+
+    ret = metadata_extractor_set_path(g_metadata_h, audio_path);
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    ret = metadata_extractor_get_metadata(g_metadata_h, METADATA_HAS_AUDIO, &value);
+    SAFE_FREE(value);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of metadata_extractor_get_artwork()
+ */
+int utc_metadata_extractor_get_artwork_n(void)
+{
+    int ret, artwork_size = 0;
+    void *artwork = NULL;
+    char *artwork_mime = NULL;
+
+    ret = metadata_extractor_get_artwork(NULL, &artwork, &artwork_size, &artwork_mime);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of metadata_extractor_get_artwork()
+ */
+int utc_metadata_extractor_get_artwork_p(void)
+{
+    assert_eq(_startup_error, 0);
+
+    int ret, artwork_size = 0;
+    void *artwork = NULL;
+    char *artwork_mime = NULL;
+
+    ret = metadata_extractor_set_path(g_metadata_h, audio_path);
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    ret = metadata_extractor_get_artwork(g_metadata_h, &artwork, &artwork_size, &artwork_mime);
+
+    SAFE_FREE(artwork);
+    SAFE_FREE(artwork_mime);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of metadata_extractor_get_frame()
+ */
+int utc_metadata_extractor_get_frame_n(void)
+{
+    int ret, frame_size = 0;
+    void *frame = NULL;
+
+    ret = metadata_extractor_get_frame(NULL, &frame, &frame_size);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of metadata_extractor_get_frame()
+ */
+int utc_metadata_extractor_get_frame_p(void)
+{
+    assert_eq(_startup_error, 0);
+
+    int ret, frame_size = 0;
+    void *frame = NULL;
+
+    ret = metadata_extractor_set_path(g_metadata_h, video_path);
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    ret = metadata_extractor_get_frame(g_metadata_h, &frame, &frame_size);
+    SAFE_FREE(frame);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of metadata_extractor_get_frame_at_time()
+ */
+int utc_metadata_extractor_get_frame_at_time_n(void)
+{
+    int ret, frame_size = 0;
+    void *frame = NULL;
+
+    ret = metadata_extractor_get_frame_at_time(NULL, 0, true, &frame, &frame_size);
+    SAFE_FREE(frame);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of metadata_extractor_get_frame_at_time()
+ */
+int utc_metadata_extractor_get_frame_at_time_p(void)
+{
+    assert_eq(_startup_error, 0);
+
+    int ret, frame_size = 0;
+    void *frame = NULL;
+
+    ret = metadata_extractor_set_path(g_metadata_h, video_path);
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    ret = metadata_extractor_get_frame_at_time(g_metadata_h, 1, true, &frame, &frame_size);
+    SAFE_FREE(frame);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief First negative test case of metadata_extractor_get_synclyrics() - invalid metadata_extractor_h
+ */
+int utc_metadata_extractor_get_synclyrics_n1(void)
+{
+    int ret;
+    unsigned long time_info = 0;
+    char *lyrics = NULL;
+
+    ret = metadata_extractor_get_synclyrics(NULL, 1, &time_info, &lyrics);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Second negative test case of metadata_extractor_get_synclyrics() - invalid index of lyric
+ */
+int utc_metadata_extractor_get_synclyrics_n2(void)
+{
+    int ret, lyricsNum;
+    unsigned long time_info = 0;
+    char *lyrics = NULL;
+    char *value = NULL;
+
+    ret = metadata_extractor_set_path(g_metadata_h, video_path);
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    ret = metadata_extractor_get_metadata(g_metadata_h, METADATA_SYNCLYRICS_NUM, &value);
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    lyricsNum = atoi((char *) value);
+
+    ret = metadata_extractor_get_synclyrics(NULL, lyricsNum + 1, &time_info, &lyrics);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of metadata_extractor_get_synclyrics()
+ */
+int utc_metadata_extractor_get_synclyrics_p(void)
+{
+    assert_eq(_startup_error, 0);
+
+    int ret;
+    unsigned long time_info = 0;
+    char *lyrics = NULL;
+    char *value = NULL;
+
+    ret = metadata_extractor_set_path(g_metadata_h, video_path);
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    ret = metadata_extractor_get_metadata(g_metadata_h, METADATA_SYNCLYRICS_NUM, &value);
+    assert(value);
+    SAFE_FREE(value);
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    ret = metadata_extractor_get_synclyrics(g_metadata_h, 1, &time_info, &lyrics);
+    SAFE_FREE(lyrics);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of metadata_extractor_destroy()
+ */
+int utc_metadata_extractor_destroy_n(void)
+{
+    int ret = metadata_extractor_destroy(NULL);
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of metadata_extractor_destroy()
+ */
+int utc_metadata_extractor_destroy_p(void)
+{
+    assert_eq(_startup_error, 0);
+
+    int ret = metadata_extractor_destroy(g_metadata_h);
+    g_metadata_h = NULL;
+
+    assert_eq(ret, METADATA_EXTRACTOR_ERROR_NONE);
+
+    return 0;
+}
+
diff --git a/src/utc/mime-type/CMakeLists.txt b/src/utc/mime-type/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..62921c6
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "mime-type")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-content-mime-type")
+SET(TC_SOURCES
+       utc-mime-type.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/mime-type/platform.list b/src/utc/mime-type/platform.list
new file mode 100755 (executable)
index 0000000..88b579f
--- /dev/null
@@ -0,0 +1,2 @@
+mime_type_get_file_extension
+mime_type_get_mime_type
\ No newline at end of file
diff --git a/src/utc/mime-type/public.list b/src/utc/mime-type/public.list
new file mode 100755 (executable)
index 0000000..02d93df
--- /dev/null
@@ -0,0 +1,3 @@
+mime_type_get_file_extension
+mime_type_get_mime_type
+
diff --git a/src/utc/mime-type/tct-mime-type-core.c b/src/utc/mime-type/tct-mime-type-core.c
new file mode 100755 (executable)
index 0000000..8371d25
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-mime-type-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/mime-type/tct-mime-type-core.h b/src/utc/mime-type/tct-mime-type-core.h
new file mode 100755 (executable)
index 0000000..99ad6c9
--- /dev/null
@@ -0,0 +1,59 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_MIME_TYPE_CORE_H__
+#define __TCT_MIME_TYPE_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_mime_type_get_mime_type_startup(void);
+extern void utc_mime_type_get_mime_type_cleanup(void);
+
+extern int utc_mime_type_get_mime_type_p_1(void);
+extern int utc_mime_type_get_mime_type_p_2(void);
+extern int utc_mime_type_get_mime_type_p_3(void);
+extern int utc_mime_type_get_mime_type_p_4(void);
+extern int utc_mime_type_get_mime_type_p_5(void);
+extern int utc_mime_type_get_mime_type_p_6(void);
+extern int utc_mime_type_get_mime_type_n_1(void);
+extern int utc_mime_type_get_mime_type_n_2(void);
+extern int utc_mime_type_get_mime_type_n_3(void);
+extern int utc_mime_type_get_file_extension_p_1(void);
+extern int utc_mime_type_get_file_extension_p_2(void);
+extern int utc_mime_type_get_file_extension_n_1(void);
+extern int utc_mime_type_get_file_extension_n_2(void);
+extern int utc_mime_type_get_file_extension_n_3(void);
+extern int utc_mime_type_get_file_extension_n_4(void);
+
+testcase tc_array[] = {
+    {"utc_mime_type_get_mime_type_p_1", utc_mime_type_get_mime_type_p_1, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_mime_type_p_2", utc_mime_type_get_mime_type_p_2, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_mime_type_p_3", utc_mime_type_get_mime_type_p_3, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_mime_type_p_4", utc_mime_type_get_mime_type_p_4, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_mime_type_p_5", utc_mime_type_get_mime_type_p_5, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_mime_type_p_6", utc_mime_type_get_mime_type_p_6, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_mime_type_n_1", utc_mime_type_get_mime_type_n_1, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_mime_type_n_2", utc_mime_type_get_mime_type_n_2, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_mime_type_n_3", utc_mime_type_get_mime_type_n_3, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_file_extension_p_1", utc_mime_type_get_file_extension_p_1, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_file_extension_p_2", utc_mime_type_get_file_extension_p_2, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_file_extension_n_1", utc_mime_type_get_file_extension_n_1, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_file_extension_n_2", utc_mime_type_get_file_extension_n_2, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_file_extension_n_3", utc_mime_type_get_file_extension_n_3, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {"utc_mime_type_get_file_extension_n_4", utc_mime_type_get_file_extension_n_4, utc_mime_type_get_mime_type_startup, utc_mime_type_get_mime_type_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_MIME_TYPE_CORE_H__
diff --git a/src/utc/mime-type/utc-mime-type.c b/src/utc/mime-type/utc-mime-type.c
new file mode 100755 (executable)
index 0000000..e3a8df3
--- /dev/null
@@ -0,0 +1,232 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <mime_type.h>
+#include <string.h>
+
+//& set: Mime-type
+
+#define SAFE_FREE(src)      { if(src) {free(src); src = NULL;}}
+
+static char *mime_type;
+static char **file_extension;
+
+/**
+ * @brief startup
+ */
+void utc_mime_type_get_mime_type_startup(void)
+{
+    mime_type = NULL;
+    file_extension = NULL;
+}
+/**
+ * @brief cleanup
+ */
+void utc_mime_type_get_mime_type_cleanup(void)
+{
+    SAFE_FREE(mime_type);
+    SAFE_FREE(file_extension);
+}
+
+
+
+int utc_mime_type_get_mime_type_p_1(void)
+{
+    int retcode;
+
+    retcode = mime_type_get_mime_type("png", &mime_type);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_NONE);
+    assert_eq(strcmp(mime_type, "image/png"), 0);
+
+    return 0;
+}
+
+int utc_mime_type_get_mime_type_p_2(void)
+{
+    int retcode;
+
+    retcode = mime_type_get_mime_type("jpg", &mime_type);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_NONE);
+    assert_eq(strcmp(mime_type, "image/jpeg"), 0);
+
+    return 0;
+}
+
+int utc_mime_type_get_mime_type_p_3(void)
+{
+    int retcode;
+
+    retcode = mime_type_get_mime_type("mpg", &mime_type);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_NONE);
+    assert_eq(strcmp(mime_type, "video/mpeg"), 0);
+
+    return 0;
+}
+
+int utc_mime_type_get_mime_type_p_4(void)
+{
+    int retcode;
+
+    retcode = mime_type_get_mime_type("mp3", &mime_type);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_NONE);
+    assert_eq(strcmp(mime_type, "audio/mpeg"), 0);
+
+    return 0;
+}
+
+
+int utc_mime_type_get_mime_type_p_5(void)
+{
+    int retcode;
+
+    retcode = mime_type_get_mime_type("bin", &mime_type);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_NONE);
+    assert_eq(strcmp(mime_type, "application/octet-stream"), 0);
+
+    return 0;
+}
+
+int utc_mime_type_get_mime_type_p_6(void)
+{
+    int retcode;
+
+    retcode = mime_type_get_mime_type("abcdef", &mime_type);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_NONE);
+    assert_eq(strcmp(mime_type, "application/octet-stream"), 0);
+
+    return 0;
+}
+
+
+int utc_mime_type_get_mime_type_n_1(void)
+{
+    int retcode;
+
+    retcode = mime_type_get_mime_type(NULL, &mime_type);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mime_type_get_mime_type_n_2(void)
+{
+    int retcode;
+
+    retcode = mime_type_get_mime_type("", &mime_type);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mime_type_get_mime_type_n_3(void)
+{
+    int retcode;
+
+    retcode = mime_type_get_mime_type("mp3", NULL);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+int utc_mime_type_get_file_extension_p_1(void)
+{
+    int retcode;
+    int length;
+    const char *mime_type = "video/mpeg";
+
+    retcode = mime_type_get_file_extension(mime_type, &file_extension, &length);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_NONE);
+    assert_gt(length, 0);
+
+    return 0;
+}
+
+int utc_mime_type_get_file_extension_p_2(void)
+{
+    int retcode;
+    int length;
+
+    const char *mime_type = "image/jpeg";
+
+    retcode = mime_type_get_file_extension(mime_type, &file_extension, &length);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_NONE);
+    assert_gt(length, 0);
+
+    return 0;
+}
+
+int utc_mime_type_get_file_extension_n_1(void)
+{
+    int retcode;
+    int length;
+
+    retcode = mime_type_get_file_extension(NULL, &file_extension, &length);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mime_type_get_file_extension_n_2(void)
+{
+    int retcode;
+    int length;
+
+    retcode = mime_type_get_file_extension("", &file_extension, &length);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mime_type_get_file_extension_n_3(void)
+{
+    int retcode;
+    int length;
+
+    const char *mime_type = "image/jpeg";
+
+    retcode = mime_type_get_file_extension(mime_type, NULL, &length);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_mime_type_get_file_extension_n_4(void)
+{
+    int retcode;
+
+    const char *mime_type = "image/jpeg";
+
+    retcode = mime_type_get_file_extension(mime_type, &file_extension, NULL);
+
+    assert_eq(retcode, MIME_TYPE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/native-common/CMakeLists.txt b/src/utc/native-common/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..4444436
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "native-common")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-base-common")
+SET(TC_SOURCES
+       utc-native-common.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-base-common
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       pthread
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/native-common/public.list b/src/utc/native-common/public.list
new file mode 100755 (executable)
index 0000000..8d530fb
--- /dev/null
@@ -0,0 +1,3 @@
+get_last_result
+set_last_result
+get_error_message
diff --git a/src/utc/native-common/tct-native-common-core.c b/src/utc/native-common/tct-native-common-core.c
new file mode 100755 (executable)
index 0000000..4d91718
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-native-common-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/native-common/tct-native-common-core.h b/src/utc/native-common/tct-native-common-core.h
new file mode 100755 (executable)
index 0000000..3b4a78d
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_NATIVE_COMMON_CORE_H__
+#define __TCT_NATIVE_COMMON_CORE_H__
+
+#include "testcase.h"
+
+
+extern int utc_get_last_result_p(void);
+extern int utc_get_last_result_p2(void);
+extern int utc_set_last_result_p(void);
+extern int utc_get_error_message_p(void);
+extern int utc_get_error_message_n(void);
+
+testcase tc_array[] = {
+    {"utc_get_last_result_p", utc_get_last_result_p, NULL, NULL},
+    {"utc_get_last_result_p2", utc_get_last_result_p2, NULL, NULL},
+    {"utc_set_last_result_p", utc_set_last_result_p, NULL, NULL},
+    {"utc_get_error_message_p", utc_get_error_message_p, NULL, NULL},
+    {"utc_get_error_message_n", utc_get_error_message_n, NULL, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_NATIVE_COMMON_CORE_H__
diff --git a/src/utc/native-common/utc-native-common.c b/src/utc/native-common/utc-native-common.c
new file mode 100755 (executable)
index 0000000..5b84f30
--- /dev/null
@@ -0,0 +1,90 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <tizen_error.h>
+#include <pthread.h> 
+
+//& purpose: To check if get_last_result with valid parameters works fine.
+int utc_get_last_result_p(void)
+{
+       int i = -1;
+       int ret = 0;
+       for(; i > TIZEN_ERROR_KEY_REJECTED; i--)
+       {
+               set_last_result(i);
+               ret = get_last_result();
+               assert_eq(i,ret);
+       }
+  return 0;
+}
+
+void set_error_num_cb(void *ptr)
+{
+       set_last_result(5);
+       pthread_exit(0);
+}
+//& purpose: To check if get_last_result works in a thread-safe manner.
+int utc_get_last_result_p2(void)
+{
+       int ret1,ret2;
+       ret1 = get_last_result();
+       pthread_t thread1;
+       pthread_create (&thread1, NULL, (void *) &set_error_num_cb, NULL);
+       pthread_join(thread1, NULL);
+       ret2 = get_last_result();
+       assert_eq(ret1,ret2);
+  return 0;
+}
+//& purpose: To check if set_last_result with valid parameters works fine.
+int utc_set_last_result_p(void)
+{
+       int ret1, ret2;
+       ret1 = get_last_result();
+       set_last_result(TIZEN_ERROR_INVALID_PARAMETER);
+       ret2 = get_last_result();
+       assert_neq(ret1,ret2);
+  return 0;
+}
+//& purpose: To check if get_error_message with valid parameters works fine.
+int utc_get_error_message_p(void)
+{
+       int i,ret;              
+       char *msg = NULL;
+       msg = get_error_message(TIZEN_ERROR_NOT_PERMITTED);
+       ret = strncmp(msg,"",strlen(msg));
+        assert_neq(ret, 0);
+        msg = get_error_message(TIZEN_ERROR_ACCOUNT | 0x01);
+               ret = strncmp(msg,"",strlen(msg));
+               assert_neq(ret, 0);                     
+  return 0;
+}
+//& purpose: To check if get_error_message with invalid error value returns NULL.
+int utc_get_error_message_n(void)
+{
+       char* msg;
+       int ret;
+       msg = get_error_message(0x00011111);
+       ret = strncmp(msg,"",strlen(msg));
+       assert_eq(ret, 0);
+       msg = get_error_message(-0x04FFFFFF);
+       ret = strncmp(msg,"",strlen(msg));
+       assert_eq(ret, 0);
+       msg = get_error_message(TIZEN_ERROR_END_OF_COLLECTION + 1);
+       ret = strncmp(msg,"",strlen(msg));
+       assert_eq(ret, 0);      
+       return 0;
+}
+
diff --git a/src/utc/nfc/CMakeLists.txt b/src/utc/nfc/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..a03fb82
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "nfc")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-network-nfc")
+SET(TC_SOURCES
+       utc-network-nfc.c
+       utc-network-nfc-ndef-message.c
+       utc-network-nfc-ndef-record.c
+       utc-network-nfc-hce.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+       system-info
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/nfc/platform.list b/src/utc/nfc/platform.list
new file mode 100755 (executable)
index 0000000..96584d8
--- /dev/null
@@ -0,0 +1 @@
+nfc_manager_set_activation
diff --git a/src/utc/nfc/product.list b/src/utc/nfc/product.list
new file mode 100755 (executable)
index 0000000..a56d2bf
--- /dev/null
@@ -0,0 +1,9 @@
+nfc_test_sim_test
+nfc_test_ese_test
+nfc_test_prbs_test
+nfc_test_get_firmware_version
+nfc_test_set_nfcc_register
+nfc_se_open_secure_element
+nfc_se_send_apdu
+nfc_se_get_atr
+nfc_se_close_secure_element
diff --git a/src/utc/nfc/public.list b/src/utc/nfc/public.list
new file mode 100755 (executable)
index 0000000..e603936
--- /dev/null
@@ -0,0 +1,91 @@
+nfc_manager_is_supported
+nfc_manager_initialize
+nfc_manager_deinitialize
+nfc_manager_is_activated
+nfc_manager_set_activation_changed_cb
+nfc_manager_unset_activation_changed_cb
+nfc_manager_set_tag_discovered_cb
+nfc_manager_unset_tag_discovered_cb
+nfc_manager_set_ndef_discovered_cb
+nfc_manager_unset_ndef_discovered_cb
+nfc_manager_set_p2p_target_discovered_cb
+nfc_manager_unset_p2p_target_discovered_cb
+nfc_manager_set_se_event_cb
+nfc_manager_unset_se_event_cb
+nfc_manager_set_se_transaction_event_cb
+nfc_manager_unset_se_transaction_event_cb
+nfc_manager_enable_transaction_fg_dispatch
+nfc_manager_disable_transaction_fg_dispatch
+nfc_manager_set_se_type
+nfc_manager_get_se_type
+nfc_manager_set_tag_filter
+nfc_manager_get_tag_filter
+nfc_manager_get_connected_tag
+nfc_manager_get_connected_target
+nfc_manager_get_cached_message
+nfc_manager_set_system_handler_enable
+nfc_manager_is_system_handler_enabled
+nfc_ndef_record_create
+nfc_ndef_record_create_text
+nfc_ndef_record_create_uri
+nfc_ndef_record_create_mime
+nfc_ndef_record_destroy
+nfc_ndef_record_set_id
+nfc_ndef_record_get_id
+nfc_ndef_record_get_payload
+nfc_ndef_record_get_type
+nfc_ndef_record_get_tnf
+nfc_ndef_record_get_text
+nfc_ndef_record_get_langcode
+nfc_ndef_record_get_encode_type
+nfc_ndef_record_get_uri
+nfc_ndef_record_get_mime_type
+nfc_ndef_message_create
+nfc_ndef_message_create_from_rawdata
+nfc_ndef_message_destroy
+nfc_ndef_message_get_record_count
+nfc_ndef_message_get_rawdata
+nfc_ndef_message_append_record
+nfc_ndef_message_insert_record
+nfc_ndef_message_remove_record
+nfc_ndef_message_get_record
+nfc_tag_get_type
+nfc_tag_is_support_ndef
+nfc_tag_get_maximum_ndef_size
+nfc_tag_get_ndef_size
+nfc_tag_foreach_information
+nfc_tag_transceive
+nfc_tag_read_ndef
+nfc_tag_write_ndef
+nfc_tag_format_ndef
+nfc_mifare_authenticate_with_keyA
+nfc_mifare_authenticate_with_keyB
+nfc_mifare_read_block
+nfc_mifare_read_page
+nfc_mifare_write_block
+nfc_mifare_write_page
+nfc_mifare_increment
+nfc_mifare_decrement
+nfc_mifare_transfer
+nfc_mifare_restore
+nfc_p2p_set_data_received_cb
+nfc_p2p_unset_data_received_cb
+nfc_p2p_send
+nfc_snep_start_server
+nfc_snep_start_client
+nfc_snep_send_client_request
+nfc_snep_stop_service
+nfc_snep_register_server
+nfc_snep_unregister_server
+nfc_se_enable_card_emulation
+nfc_se_disable_card_emulation
+nfc_se_get_card_emulation_mode
+nfc_manager_set_hce_event_cb
+nfc_manager_unset_hce_event_cb
+nfc_se_set_default_route
+nfc_se_is_activated_handler_for_aid
+nfc_se_is_activated_handler_for_category
+nfc_se_register_aid
+nfc_se_unregister_aid
+nfc_se_foreach_registered_aids
+nfc_hce_send_apdu_response
diff --git a/src/utc/nfc/tct-nfc-core.c b/src/utc/nfc/tct-nfc-core.c
new file mode 100755 (executable)
index 0000000..f692745
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-nfc-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/nfc/tct-nfc-core.h b/src/utc/nfc/tct-nfc-core.h
new file mode 100755 (executable)
index 0000000..efbc491
--- /dev/null
@@ -0,0 +1,355 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_NFC_CORE_H__
+#define __TCT_NFC_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_nfc_startup(void);
+extern void utc_nfc_cleanup(void);
+extern void utc_nfc_tag_startup(void);
+extern void utc_nfc_tag_cleanup(void);
+extern void utc_nfc_p2p_startup(void);
+extern void utc_nfc_p2p_cleanup(void);
+extern void utc_ce_startup(void);
+extern void utc_ce_cleanup(void);
+extern void utc_nfc_ndef_message_startup(void);
+extern void utc_nfc_ndef_message_cleanup(void);
+extern void utc_nfc_ndef_record_startup(void);
+extern void utc_nfc_ndef_record_cleanup(void);
+extern void utc_nfc_se_hce_startup(void);
+extern void utc_nfc_se_hce_cleanup(void);
+
+extern int utc_nfc_manager_is_supported_p(void);
+extern int utc_nfc_manager_initialize_p(void);
+extern int utc_nfc_manager_deinitialize_p(void);
+extern int utc_nfc_manager_set_activation_changed_cb_p(void);
+extern int utc_nfc_manager_set_activation_changed_cb_n(void);
+extern int utc_nfc_manager_unset_activation_changed_cb_p(void);
+extern int utc_nfc_manager_unset_activation_changed_cb_n(void);
+extern int utc_nfc_manager_unset_ndef_discovered_cb_p(void);
+extern int utc_nfc_manager_unset_ndef_discovered_cb_n(void);
+extern int utc_nfc_manager_is_activated_p(void);
+extern int utc_nfc_manager_set_ndef_discovered_cb_p(void);
+extern int utc_nfc_manager_set_ndef_discovered_cb_n(void);
+extern int utc_nfc_manager_set_system_handler_enable_p1(void);
+extern int utc_nfc_manager_set_system_handler_enable_p2(void);
+extern int utc_nfc_manager_set_system_handler_enable_n(void);
+extern int utc_nfc_manager_get_cached_message_n(void);
+extern int utc_nfc_manager_is_system_handler_enabled_p(void);
+extern int utc_nfc_manager_is_system_handler_enabled_n(void);
+extern int utc_nfc_manager_get_connected_tag_n(void);
+extern int utc_nfc_manager_set_tag_filter_p(void);
+extern int utc_nfc_manager_set_tag_filter_n(void);
+extern int utc_nfc_manager_get_tag_filter_p(void);
+extern int utc_nfc_manager_get_tag_filter_n(void);
+extern int utc_nfc_manager_unset_tag_discovered_cb_p(void);
+extern int utc_nfc_manager_unset_tag_discovered_cb_n(void);
+extern int utc_nfc_manager_set_tag_discovered_cb_p(void);
+extern int utc_nfc_manager_set_tag_discovered_cb_n(void);
+extern int utc_nfc_tag_get_type_n(void);
+extern int utc_nfc_tag_is_support_ndef_n(void);
+extern int utc_nfc_tag_get_maximum_ndef_size_n(void);
+extern int utc_nfc_tag_get_ndef_size_n(void);
+extern int utc_nfc_tag_foreach_information_n(void);
+extern int utc_nfc_tag_transceive_n(void);
+extern int utc_nfc_tag_read_ndef_n(void);
+extern int utc_nfc_tag_write_ndef_n(void);
+extern int utc_nfc_tag_format_ndef_n(void);
+extern int utc_nfc_mifare_authenticate_with_keyA_n(void);
+extern int utc_nfc_mifare_authenticate_with_keyB_n(void);
+extern int utc_nfc_mifare_read_block_n(void);
+extern int utc_nfc_mifare_read_page_n(void);
+extern int utc_nfc_mifare_write_block_n(void);
+extern int utc_nfc_mifare_write_page_n(void);
+extern int utc_nfc_mifare_increment_n(void);
+extern int utc_nfc_mifare_decrement_n(void);
+extern int utc_nfc_mifare_transfer_n(void);
+extern int utc_nfc_mifare_restore_n(void);
+extern int utc_nfc_manager_unset_p2p_target_discovered_cb_p(void);
+extern int utc_nfc_manager_unset_p2p_target_discovered_cb_n(void);
+extern int utc_nfc_manager_set_p2p_target_discovered_cb_p(void);
+extern int utc_nfc_manager_set_p2p_target_discovered_cb_n(void);
+extern int utc_nfc_manager_get_connected_target_n(void);
+extern int utc_nfc_p2p_set_data_received_cb_n(void);
+extern int utc_nfc_p2p_unset_data_received_cb_n(void);
+extern int utc_nfc_p2p_send_n(void);
+extern int utc_nfc_snep_register_server_p(void);
+extern int utc_nfc_snep_register_server_n1(void);
+extern int utc_nfc_snep_register_server_n2(void);
+extern int utc_nfc_snep_unregister_server_p(void);
+extern int utc_nfc_snep_unregister_server_n(void);
+extern int utc_nfc_snep_send_client_request_n(void);
+extern int utc_nfc_snep_start_client_n(void);
+extern int utc_nfc_snep_start_server_n(void);
+extern int utc_nfc_snep_stop_service_n(void);
+extern int utc_nfc_manager_get_se_type_p(void);
+extern int utc_nfc_manager_get_se_type_n(void);
+extern int utc_nfc_manager_set_se_type_p(void);
+extern int utc_nfc_manager_set_se_type_n(void);
+extern int utc_nfc_se_enable_card_emulation_p(void);
+extern int utc_nfc_se_enable_card_emulation_n(void);
+extern int utc_nfc_se_disable_card_emulation_p(void);
+extern int utc_nfc_se_disable_card_emulation_n(void);
+extern int utc_nfc_se_get_card_emulation_mode_p(void);
+extern int utc_nfc_se_get_card_emulation_mode_n(void);
+extern int utc_nfc_manager_set_se_event_cb_p(void);
+extern int utc_nfc_manager_set_se_event_cb_n(void);
+extern int utc_nfc_manager_unset_se_event_cb_p(void);
+extern int utc_nfc_manager_unset_se_event_cb_n(void);
+extern int utc_nfc_manager_set_se_transaction_event_cb_p1(void);
+extern int utc_nfc_manager_set_se_transaction_event_cb_p2(void);
+extern int utc_nfc_manager_set_se_transaction_event_cb_n1(void);
+extern int utc_nfc_manager_set_se_transaction_event_cb_n2(void);
+extern int utc_nfc_manager_set_se_transaction_event_cb_n3(void);
+extern int utc_nfc_manager_unset_se_transaction_event_cb_p(void);
+extern int utc_nfc_manager_unset_se_transaction_event_cb_n(void);
+extern int utc_nfc_manager_enable_transaction_fg_dispatch_p(void);
+extern int utc_nfc_manager_enable_transaction_fg_dispatch_n(void);
+extern int utc_nfc_manager_disable_transaction_fg_dispatch_p(void);
+extern int utc_nfc_manager_disable_transaction_fg_dispatch_n(void);
+extern int utc_nfc_ndef_message_create_p(void);
+extern int utc_nfc_ndef_message_create_n(void);
+extern int utc_nfc_ndef_message_create_from_rawdata_p(void);
+extern int utc_nfc_ndef_message_create_from_rawdata_n1(void);
+extern int utc_nfc_ndef_message_create_from_rawdata_n2(void);
+extern int utc_nfc_ndef_message_destroy_p(void);
+extern int utc_nfc_ndef_message_destroy_n(void);
+extern int utc_nfc_ndef_message_get_record_count_p(void);
+extern int utc_nfc_ndef_message_get_record_count_n1(void);
+extern int utc_nfc_ndef_message_get_record_count_n2(void);
+extern int utc_nfc_ndef_message_get_rawdata_p(void);
+extern int utc_nfc_ndef_message_get_rawdata_n(void);
+extern int utc_nfc_ndef_message_append_record_p(void);
+extern int utc_nfc_ndef_message_append_record_n(void);
+extern int utc_nfc_ndef_message_insert_record_p(void);
+extern int utc_nfc_ndef_message_insert_record_n(void);
+extern int utc_nfc_ndef_message_remove_record_p(void);
+extern int utc_nfc_ndef_message_remove_record_n(void);
+extern int utc_nfc_ndef_message_get_record_p(void);
+extern int utc_nfc_ndef_message_get_record_n(void);
+extern int utc_nfc_ndef_record_create_p(void);
+extern int utc_nfc_ndef_record_create_n(void);
+extern int utc_nfc_ndef_record_create_text_p(void);
+extern int utc_nfc_ndef_record_create_text_n(void);
+extern int utc_nfc_ndef_record_create_uri_p(void);
+extern int utc_nfc_ndef_record_create_uri_n(void);
+extern int utc_nfc_ndef_record_create_mime_p(void);
+extern int utc_nfc_ndef_record_create_mime_n_1(void);
+extern int utc_nfc_ndef_record_create_mime_n_2(void);
+extern int utc_nfc_ndef_record_create_mime_n_3(void);
+extern int utc_nfc_ndef_record_destroy_p(void);
+extern int utc_nfc_ndef_record_destroy_n(void);
+extern int utc_nfc_ndef_record_set_id_p(void);
+extern int utc_nfc_ndef_record_set_id_n(void);
+extern int utc_nfc_ndef_record_get_id_p(void);
+extern int utc_nfc_ndef_record_get_id_n(void);
+extern int utc_nfc_ndef_record_get_payload_p(void);
+extern int utc_nfc_ndef_record_get_payload_n(void);
+extern int utc_nfc_ndef_record_get_type_p(void);
+extern int utc_nfc_ndef_record_get_type_n(void);
+extern int utc_nfc_ndef_record_get_tnf_p(void);
+extern int utc_nfc_ndef_record_get_tnf_n(void);
+extern int utc_nfc_ndef_record_get_text_p(void);
+extern int utc_nfc_ndef_record_get_text_n(void);
+extern int utc_nfc_ndef_record_get_langcode_p(void);
+extern int utc_nfc_ndef_record_get_langcode_n(void);
+extern int utc_nfc_ndef_record_get_encode_type_p(void);
+extern int utc_nfc_ndef_record_get_encode_type_n(void);
+extern int utc_nfc_ndef_record_get_uri_p(void);
+extern int utc_nfc_ndef_record_get_uri_n(void);
+extern int utc_nfc_ndef_record_get_mime_type_p(void);
+extern int utc_nfc_ndef_record_get_mime_type_n(void);
+extern int utc_nfc_manager_set_hce_event_cb_p(void);
+extern int utc_nfc_manager_set_hce_event_cb_n(void);
+extern int utc_nfc_manager_unset_hce_event_cb_p(void);
+extern int utc_nfc_manager_unset_hce_event_cb_n(void);
+extern int utc_nfc_se_set_default_route_p(void);
+extern int utc_nfc_se_set_default_route_n(void);
+extern int utc_nfc_se_is_activated_handler_for_aid_p(void);
+extern int utc_nfc_se_is_activated_handler_for_aid_n(void);
+extern int utc_nfc_se_is_activated_handler_for_category_p(void);
+extern int utc_nfc_se_is_activated_handler_for_category_n(void);
+extern int utc_nfc_se_register_aid_p(void);
+extern int utc_nfc_se_register_aid_n(void);
+extern int utc_nfc_se_unregister_aid_p(void);
+extern int utc_nfc_se_unregister_aid_n(void);
+extern int utc_nfc_se_foreach_registered_aids_p(void);
+extern int utc_nfc_se_foreach_registered_aids_n(void);
+extern int utc_nfc_hce_send_apdu_response_n(void);
+
+testcase tc_array[] = {
+    {"utc_nfc_manager_is_supported_p", utc_nfc_manager_is_supported_p, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_initialize_p", utc_nfc_manager_initialize_p, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_deinitialize_p", utc_nfc_manager_deinitialize_p, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_set_activation_changed_cb_p", utc_nfc_manager_set_activation_changed_cb_p, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_set_activation_changed_cb_n", utc_nfc_manager_set_activation_changed_cb_n, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_unset_activation_changed_cb_p", utc_nfc_manager_unset_activation_changed_cb_p, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_unset_activation_changed_cb_n", utc_nfc_manager_unset_activation_changed_cb_n, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_unset_ndef_discovered_cb_p", utc_nfc_manager_unset_ndef_discovered_cb_p, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_unset_ndef_discovered_cb_n", utc_nfc_manager_unset_ndef_discovered_cb_n, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_is_activated_p", utc_nfc_manager_is_activated_p, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_set_ndef_discovered_cb_p", utc_nfc_manager_set_ndef_discovered_cb_p, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_set_ndef_discovered_cb_n", utc_nfc_manager_set_ndef_discovered_cb_n, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_set_system_handler_enable_p1", utc_nfc_manager_set_system_handler_enable_p1, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_set_system_handler_enable_p2", utc_nfc_manager_set_system_handler_enable_p2, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_set_system_handler_enable_n", utc_nfc_manager_set_system_handler_enable_n, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_get_cached_message_n", utc_nfc_manager_get_cached_message_n, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_is_system_handler_enabled_p", utc_nfc_manager_is_system_handler_enabled_p, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_is_system_handler_enabled_n", utc_nfc_manager_is_system_handler_enabled_n, utc_nfc_startup, utc_nfc_cleanup},
+    {"utc_nfc_manager_get_connected_tag_n", utc_nfc_manager_get_connected_tag_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_manager_set_tag_filter_p", utc_nfc_manager_set_tag_filter_p, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_manager_set_tag_filter_n", utc_nfc_manager_set_tag_filter_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_manager_get_tag_filter_p", utc_nfc_manager_get_tag_filter_p, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_manager_get_tag_filter_n", utc_nfc_manager_get_tag_filter_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_manager_unset_tag_discovered_cb_p", utc_nfc_manager_unset_tag_discovered_cb_p, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_manager_unset_tag_discovered_cb_n", utc_nfc_manager_unset_tag_discovered_cb_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_manager_set_tag_discovered_cb_p", utc_nfc_manager_set_tag_discovered_cb_p, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_manager_set_tag_discovered_cb_n", utc_nfc_manager_set_tag_discovered_cb_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_tag_get_type_n", utc_nfc_tag_get_type_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_tag_is_support_ndef_n", utc_nfc_tag_is_support_ndef_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_tag_get_maximum_ndef_size_n", utc_nfc_tag_get_maximum_ndef_size_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_tag_get_ndef_size_n", utc_nfc_tag_get_ndef_size_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_tag_foreach_information_n", utc_nfc_tag_foreach_information_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_tag_transceive_n", utc_nfc_tag_transceive_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_tag_read_ndef_n", utc_nfc_tag_read_ndef_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_tag_write_ndef_n", utc_nfc_tag_write_ndef_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_tag_format_ndef_n", utc_nfc_tag_format_ndef_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_mifare_authenticate_with_keyA_n", utc_nfc_mifare_authenticate_with_keyA_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_mifare_authenticate_with_keyB_n", utc_nfc_mifare_authenticate_with_keyB_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_mifare_read_block_n", utc_nfc_mifare_read_block_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_mifare_read_page_n", utc_nfc_mifare_read_page_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_mifare_write_block_n", utc_nfc_mifare_write_block_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_mifare_write_page_n", utc_nfc_mifare_write_page_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_mifare_increment_n", utc_nfc_mifare_increment_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_mifare_decrement_n", utc_nfc_mifare_decrement_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_mifare_transfer_n", utc_nfc_mifare_transfer_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_mifare_restore_n", utc_nfc_mifare_restore_n, utc_nfc_tag_startup, utc_nfc_tag_cleanup},
+    {"utc_nfc_manager_unset_p2p_target_discovered_cb_p", utc_nfc_manager_unset_p2p_target_discovered_cb_p, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_manager_unset_p2p_target_discovered_cb_n", utc_nfc_manager_unset_p2p_target_discovered_cb_n, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_manager_set_p2p_target_discovered_cb_p", utc_nfc_manager_set_p2p_target_discovered_cb_p, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_manager_set_p2p_target_discovered_cb_n", utc_nfc_manager_set_p2p_target_discovered_cb_n, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_manager_get_connected_target_n", utc_nfc_manager_get_connected_target_n, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_p2p_set_data_received_cb_n", utc_nfc_p2p_set_data_received_cb_n, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_p2p_unset_data_received_cb_n", utc_nfc_p2p_unset_data_received_cb_n, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_p2p_send_n", utc_nfc_p2p_send_n, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_snep_register_server_p", utc_nfc_snep_register_server_p, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_snep_register_server_n1", utc_nfc_snep_register_server_n1, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_snep_register_server_n2", utc_nfc_snep_register_server_n2, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_snep_unregister_server_p", utc_nfc_snep_unregister_server_p, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_snep_unregister_server_n", utc_nfc_snep_unregister_server_n, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_snep_send_client_request_n", utc_nfc_snep_send_client_request_n, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_snep_start_client_n", utc_nfc_snep_start_client_n, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_snep_start_server_n", utc_nfc_snep_start_server_n, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_snep_stop_service_n", utc_nfc_snep_stop_service_n, utc_nfc_p2p_startup, utc_nfc_p2p_cleanup},
+    {"utc_nfc_manager_get_se_type_p", utc_nfc_manager_get_se_type_p, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_get_se_type_n", utc_nfc_manager_get_se_type_n, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_set_se_type_p", utc_nfc_manager_set_se_type_p, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_set_se_type_n", utc_nfc_manager_set_se_type_n, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_se_enable_card_emulation_p", utc_nfc_se_enable_card_emulation_p, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_se_enable_card_emulation_n", utc_nfc_se_enable_card_emulation_n, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_se_disable_card_emulation_p", utc_nfc_se_disable_card_emulation_p, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_se_disable_card_emulation_n", utc_nfc_se_disable_card_emulation_n, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_se_get_card_emulation_mode_p", utc_nfc_se_get_card_emulation_mode_p, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_se_get_card_emulation_mode_n", utc_nfc_se_get_card_emulation_mode_n, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_set_se_event_cb_p", utc_nfc_manager_set_se_event_cb_p, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_set_se_event_cb_n", utc_nfc_manager_set_se_event_cb_n, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_unset_se_event_cb_p", utc_nfc_manager_unset_se_event_cb_p, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_unset_se_event_cb_n", utc_nfc_manager_unset_se_event_cb_n, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_set_se_transaction_event_cb_p1", utc_nfc_manager_set_se_transaction_event_cb_p1, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_set_se_transaction_event_cb_p2", utc_nfc_manager_set_se_transaction_event_cb_p2, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_set_se_transaction_event_cb_n1", utc_nfc_manager_set_se_transaction_event_cb_n1, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_set_se_transaction_event_cb_n2", utc_nfc_manager_set_se_transaction_event_cb_n2, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_set_se_transaction_event_cb_n3", utc_nfc_manager_set_se_transaction_event_cb_n3, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_unset_se_transaction_event_cb_p", utc_nfc_manager_unset_se_transaction_event_cb_p, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_unset_se_transaction_event_cb_n", utc_nfc_manager_unset_se_transaction_event_cb_n, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_enable_transaction_fg_dispatch_p", utc_nfc_manager_enable_transaction_fg_dispatch_p, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_enable_transaction_fg_dispatch_n", utc_nfc_manager_enable_transaction_fg_dispatch_n, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_disable_transaction_fg_dispatch_p", utc_nfc_manager_disable_transaction_fg_dispatch_p, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_manager_disable_transaction_fg_dispatch_n", utc_nfc_manager_disable_transaction_fg_dispatch_n, utc_ce_startup, utc_ce_cleanup},
+    {"utc_nfc_ndef_message_create_p", utc_nfc_ndef_message_create_p, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_create_n", utc_nfc_ndef_message_create_n, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_create_from_rawdata_p", utc_nfc_ndef_message_create_from_rawdata_p, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_create_from_rawdata_n1", utc_nfc_ndef_message_create_from_rawdata_n1, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_create_from_rawdata_n2", utc_nfc_ndef_message_create_from_rawdata_n2, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_destroy_p", utc_nfc_ndef_message_destroy_p, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_destroy_n", utc_nfc_ndef_message_destroy_n, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_get_record_count_p", utc_nfc_ndef_message_get_record_count_p, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_get_record_count_n1", utc_nfc_ndef_message_get_record_count_n1, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_get_record_count_n2", utc_nfc_ndef_message_get_record_count_n2, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_get_rawdata_p", utc_nfc_ndef_message_get_rawdata_p, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_get_rawdata_n", utc_nfc_ndef_message_get_rawdata_n, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_append_record_p", utc_nfc_ndef_message_append_record_p, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_append_record_n", utc_nfc_ndef_message_append_record_n, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_insert_record_p", utc_nfc_ndef_message_insert_record_p, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_insert_record_n", utc_nfc_ndef_message_insert_record_n, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_remove_record_p", utc_nfc_ndef_message_remove_record_p, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_remove_record_n", utc_nfc_ndef_message_remove_record_n, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_get_record_p", utc_nfc_ndef_message_get_record_p, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_message_get_record_n", utc_nfc_ndef_message_get_record_n, utc_nfc_ndef_message_startup, utc_nfc_ndef_message_cleanup},
+    {"utc_nfc_ndef_record_create_p", utc_nfc_ndef_record_create_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_create_n", utc_nfc_ndef_record_create_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_create_text_p", utc_nfc_ndef_record_create_text_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_create_text_n", utc_nfc_ndef_record_create_text_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_create_uri_p", utc_nfc_ndef_record_create_uri_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_create_uri_n", utc_nfc_ndef_record_create_uri_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_create_mime_p", utc_nfc_ndef_record_create_mime_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_create_mime_n_1", utc_nfc_ndef_record_create_mime_n_1, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_create_mime_n_2", utc_nfc_ndef_record_create_mime_n_2, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_create_mime_n_3", utc_nfc_ndef_record_create_mime_n_3, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_destroy_p", utc_nfc_ndef_record_destroy_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_destroy_n", utc_nfc_ndef_record_destroy_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_set_id_p", utc_nfc_ndef_record_set_id_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_set_id_n", utc_nfc_ndef_record_set_id_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_id_p", utc_nfc_ndef_record_get_id_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_id_n", utc_nfc_ndef_record_get_id_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_payload_p", utc_nfc_ndef_record_get_payload_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_payload_n", utc_nfc_ndef_record_get_payload_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_type_p", utc_nfc_ndef_record_get_type_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_type_n", utc_nfc_ndef_record_get_type_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_tnf_p", utc_nfc_ndef_record_get_tnf_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_tnf_n", utc_nfc_ndef_record_get_tnf_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_text_p", utc_nfc_ndef_record_get_text_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_text_n", utc_nfc_ndef_record_get_text_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_langcode_p", utc_nfc_ndef_record_get_langcode_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_langcode_n", utc_nfc_ndef_record_get_langcode_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_encode_type_p", utc_nfc_ndef_record_get_encode_type_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_encode_type_n", utc_nfc_ndef_record_get_encode_type_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_uri_p", utc_nfc_ndef_record_get_uri_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_uri_n", utc_nfc_ndef_record_get_uri_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_mime_type_p", utc_nfc_ndef_record_get_mime_type_p, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_ndef_record_get_mime_type_n", utc_nfc_ndef_record_get_mime_type_n, utc_nfc_ndef_record_startup, utc_nfc_ndef_record_cleanup},
+    {"utc_nfc_manager_set_hce_event_cb_p", utc_nfc_manager_set_hce_event_cb_p, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_manager_set_hce_event_cb_n", utc_nfc_manager_set_hce_event_cb_n, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_manager_unset_hce_event_cb_p", utc_nfc_manager_unset_hce_event_cb_p, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_manager_unset_hce_event_cb_n", utc_nfc_manager_unset_hce_event_cb_n, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_set_default_route_p", utc_nfc_se_set_default_route_p, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_set_default_route_n", utc_nfc_se_set_default_route_n, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_is_activated_handler_for_aid_p", utc_nfc_se_is_activated_handler_for_aid_p, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_is_activated_handler_for_aid_n", utc_nfc_se_is_activated_handler_for_aid_n, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_is_activated_handler_for_category_p", utc_nfc_se_is_activated_handler_for_category_p, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_is_activated_handler_for_category_n", utc_nfc_se_is_activated_handler_for_category_n, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_register_aid_p", utc_nfc_se_register_aid_p, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_register_aid_n", utc_nfc_se_register_aid_n, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_unregister_aid_p", utc_nfc_se_unregister_aid_p, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_unregister_aid_n", utc_nfc_se_unregister_aid_n, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_foreach_registered_aids_p", utc_nfc_se_foreach_registered_aids_p, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_se_foreach_registered_aids_n", utc_nfc_se_foreach_registered_aids_n, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {"utc_nfc_hce_send_apdu_response_n", utc_nfc_hce_send_apdu_response_n, utc_nfc_se_hce_startup, utc_nfc_se_hce_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_NFC_CORE_H__
diff --git a/src/utc/nfc/utc-network-nfc-hce.c b/src/utc/nfc/utc-network-nfc-hce.c
new file mode 100755 (executable)
index 0000000..6f13cac
--- /dev/null
@@ -0,0 +1,336 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <nfc.h>
+#include <glib.h>
+#include <system_info.h>
+
+//& set: HCE
+static bool hce_supported=false;
+
+void utc_nfc_se_hce_startup(void)
+{
+       nfc_manager_initialize();
+       system_info_get_platform_bool("http://tizen.org/feature/network.nfc.card_emulation.hce",&hce_supported);
+}
+
+void utc_nfc_se_hce_cleanup(void)
+{
+    nfc_manager_deinitialize();
+}
+
+void _nfc_hce_event_cb(nfc_se_h handle, nfc_hce_event_type_e event,
+       unsigned char *apdu, unsigned int apdu_len, void *user_data)
+{
+
+}
+
+void _nfc_se_registered_aid_cb(nfc_se_type_e se_type,  const char *aid, bool read_only, void *user_data)
+{
+
+}
+
+int utc_nfc_manager_set_hce_event_cb_p(void)
+{
+       int ret;
+
+       ret = nfc_manager_set_hce_event_cb(_nfc_hce_event_cb, NULL);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+   }
+       else{
+               assert_eq(ret, NFC_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_nfc_manager_set_hce_event_cb_n(void)
+{
+       int ret;
+
+       ret = nfc_manager_set_hce_event_cb(NULL, NULL);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+   }
+       else{
+               assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_nfc_manager_unset_hce_event_cb_p(void)
+{
+       int ret;
+
+       nfc_manager_unset_hce_event_cb();
+
+       ret = get_last_result();
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+   }
+       else{
+               assert_eq(ret, NFC_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_nfc_manager_unset_hce_event_cb_n(void)
+{
+       int ret;
+
+       nfc_manager_deinitialize();
+       nfc_manager_unset_hce_event_cb();
+
+       ret = get_last_result();
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+   }
+       else{
+               assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+       }
+
+       return 0;
+}
+int utc_nfc_se_set_default_route_p(void)
+{
+       int ret;
+       ret = nfc_se_set_default_route(NFC_SE_TYPE_HCE, NFC_SE_TYPE_DISABLE, NFC_SE_TYPE_DISABLE);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert(ret == NFC_ERROR_NONE
+                       || ret == NFC_ERROR_SECURITY_RESTRICTED);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_set_default_route_n(void)
+{
+       int ret;
+
+       nfc_manager_deinitialize();
+       ret = nfc_se_set_default_route(NFC_SE_TYPE_HCE, NFC_SE_TYPE_DISABLE, NFC_SE_TYPE_DISABLE);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_is_activated_handler_for_aid_p(void)
+{
+       int ret;
+       const char aid[] = "11121314";
+       bool activated_handler;
+
+       ret = nfc_se_register_aid(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, aid);
+
+       ret = nfc_se_is_activated_handler_for_aid(NFC_SE_TYPE_HCE, aid, &activated_handler);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_is_activated_handler_for_aid_n(void)
+{
+       int ret;
+
+       ret = nfc_se_is_activated_handler_for_aid(NFC_SE_TYPE_HCE, NULL, NULL);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_is_activated_handler_for_category_p(void)
+{
+       int ret;
+       const char aid[] = "11121314";
+       bool activated_handler;
+
+       ret = nfc_se_register_aid(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, aid);
+
+       ret = nfc_se_is_activated_handler_for_category(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, &activated_handler);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_is_activated_handler_for_category_n(void)
+{
+       int ret;
+
+       ret = nfc_se_is_activated_handler_for_category(NFC_SE_TYPE_HCE, 0, NULL);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_register_aid_p(void)
+{
+       int ret;
+       const char aid[] = "11121314";
+
+       ret = nfc_se_register_aid(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, aid);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_register_aid_n(void)
+{
+       int ret;
+
+       ret = nfc_se_register_aid(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, NULL);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_unregister_aid_p(void)
+{
+       int ret;
+       const char aid[] = "11121314";
+
+       ret = nfc_se_register_aid(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, aid);
+       ret = nfc_se_unregister_aid(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, aid);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_unregister_aid_n(void)
+{
+       int ret;
+
+       ret = nfc_se_unregister_aid(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, NULL);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_foreach_registered_aids_p(void)
+{
+       int ret;
+       const char aid[] = "11121314";
+
+       ret = nfc_se_register_aid(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, aid);
+
+       ret = nfc_se_foreach_registered_aids(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, _nfc_se_registered_aid_cb, NULL);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_foreach_registered_aids_n(void)
+{
+       int ret;
+
+       ret = nfc_se_foreach_registered_aids(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, NULL, NULL);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_nfc_hce_send_apdu_response_n(void)
+{
+       int ret;
+
+       ret = nfc_hce_send_apdu_response(NULL, NULL, 0);
+
+       if(!hce_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+               assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
diff --git a/src/utc/nfc/utc-network-nfc-ndef-message.c b/src/utc/nfc/utc-network-nfc-ndef-message.c
new file mode 100755 (executable)
index 0000000..8870dfe
--- /dev/null
@@ -0,0 +1,402 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <nfc.h>
+#include <glib.h>
+#include <system_info.h>
+
+//& set: Nfc-ndef
+static bool nfc_supported=false;
+
+void utc_nfc_ndef_message_startup(void)
+{
+       nfc_manager_initialize();
+       system_info_get_platform_bool("http://tizen.org/feature/network.nfc",&nfc_supported);
+}
+
+void utc_nfc_ndef_message_cleanup(void)
+{
+    nfc_manager_deinitialize();
+}
+
+int utc_nfc_ndef_message_create_p(void)
+{
+    int ret;
+    nfc_ndef_message_h message;
+
+    ret = nfc_ndef_message_create(&message);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+           nfc_ndef_message_destroy(message);
+       }
+    return 0;
+}
+
+int utc_nfc_ndef_message_create_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_message_create(NULL);
+
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_message_create_from_rawdata_p(void)
+{
+    int ret;
+    unsigned char *buffer;
+    unsigned int size;
+    nfc_ndef_message_h message;
+    nfc_ndef_message_h message2;
+    nfc_ndef_record_h record1;
+
+    ret = nfc_ndef_message_create(&message);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+
+        assert_eq(ret,NFC_ERROR_NONE);
+        nfc_ndef_record_create_text(&record1, "test", "en-US", NFC_ENCODE_UTF_8);
+        nfc_ndef_message_append_record(message, record1);
+        nfc_ndef_message_get_rawdata(message, &buffer, &size);
+        ret = nfc_ndef_message_create_from_rawdata(&message2, buffer, size);
+
+        nfc_ndef_message_destroy(message2);
+        nfc_ndef_message_destroy(message);
+        free(buffer);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_nfc_ndef_message_create_from_rawdata_n1(void)
+{
+    int ret;
+
+    ret = nfc_ndef_message_create_from_rawdata(NULL, NULL, 0);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_message_create_from_rawdata_n2(void)
+{
+    int ret;
+    nfc_ndef_message_h message2;
+
+    ret = nfc_ndef_message_create_from_rawdata(&message2, NULL, 0);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_message_destroy_p(void)
+{
+    int ret;
+    nfc_ndef_message_h message;
+
+    ret = nfc_ndef_message_create(&message);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+
+        assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_message_destroy(message);
+    
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_message_destroy_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_message_destroy(NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_message_get_record_count_p(void)
+{
+    int ret;
+    int count;
+    nfc_ndef_message_h message;
+    nfc_ndef_record_h record1;
+
+    ret = nfc_ndef_message_create(&message);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+        assert_eq(ret,NFC_ERROR_NONE);
+        nfc_ndef_record_create_text(&record1, "test", "en-US", NFC_ENCODE_UTF_8);
+        nfc_ndef_message_append_record(message, record1);
+        ret = nfc_ndef_message_get_record_count(message, &count);
+        nfc_ndef_message_destroy(message);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_message_get_record_count_n1(void)
+{
+    int ret;
+    nfc_ndef_message_h message;
+
+    ret = nfc_ndef_message_create(&message);
+    if(nfc_supported){
+
+        assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_message_get_record_count(message, NULL);
+        assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+    }
+    else{
+        ret = nfc_ndef_message_get_record_count(message, NULL);
+        assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_nfc_ndef_message_get_record_count_n2(void)
+{
+    int ret;
+    int count;
+
+    ret = nfc_ndef_message_get_record_count(NULL, &count);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+    return 0;
+}
+
+int utc_nfc_ndef_message_get_rawdata_p(void)
+{
+    int ret;
+    unsigned char *buffer;
+    unsigned int size;
+    nfc_ndef_message_h message;
+    nfc_ndef_record_h record1;
+
+    ret = nfc_ndef_message_create(&message);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret,NFC_ERROR_NONE);
+        nfc_ndef_record_create_text(&record1, "test", "en-US", NFC_ENCODE_UTF_8);
+        nfc_ndef_message_append_record(message, record1);
+        ret = nfc_ndef_message_get_rawdata(message, &buffer, &size);
+        nfc_ndef_message_destroy(message);
+        free(buffer);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_message_get_rawdata_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_message_get_rawdata(NULL, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_message_append_record_p(void)
+{
+    int ret;
+    nfc_ndef_message_h message;
+    nfc_ndef_record_h record1;
+
+    ret = nfc_ndef_message_create(&message);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+        assert_eq(ret,NFC_ERROR_NONE);
+        nfc_ndef_record_create_text(&record1, "test", "en-US", NFC_ENCODE_UTF_8);
+        ret = nfc_ndef_message_append_record(message, record1);
+        nfc_ndef_message_destroy(message);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_message_append_record_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_message_append_record(NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+    return 0;
+}
+
+int utc_nfc_ndef_message_insert_record_p(void)
+{
+    int ret;
+    nfc_ndef_message_h message;
+    nfc_ndef_record_h record1;
+
+    ret = nfc_ndef_message_create(&message);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+        assert_eq(ret,NFC_ERROR_NONE);
+        nfc_ndef_record_create_text(&record1, "test", "en-US", NFC_ENCODE_UTF_8);
+        ret = nfc_ndef_message_insert_record(message, 0, record1);
+        nfc_ndef_message_destroy(message);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+  
+    return 0;
+}
+
+int utc_nfc_ndef_message_insert_record_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_message_insert_record(NULL, 0, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_message_remove_record_p(void)
+{
+    int ret;
+    nfc_ndef_message_h message;
+    nfc_ndef_record_h record1;
+
+    ret = nfc_ndef_message_create(&message);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret,NFC_ERROR_NONE);
+        nfc_ndef_record_create_text(&record1, "test", "en-US", NFC_ENCODE_UTF_8);
+        ret = nfc_ndef_message_insert_record(message, 0, record1);
+       assert_eq(ret,NFC_ERROR_NONE);
+       ret = nfc_ndef_message_remove_record(message, 0);
+        nfc_ndef_message_destroy(message);  
+       assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_message_remove_record_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_message_remove_record(NULL, 0);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_message_get_record_p(void)
+{
+    int ret;
+    nfc_ndef_message_h message;
+    nfc_ndef_record_h record1, record2;
+
+    ret = nfc_ndef_message_create(&message);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret,NFC_ERROR_NONE);
+        nfc_ndef_record_create_text(&record1, "test", "en-US", NFC_ENCODE_UTF_8);
+        ret = nfc_ndef_message_insert_record(message, 0, record1);
+       assert_eq(ret,NFC_ERROR_NONE);
+       ret = nfc_ndef_message_get_record(message, 0, &record2);
+        nfc_ndef_message_destroy(message);
+       assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_message_get_record_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_message_get_record(NULL, 0, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+    return 0;
+}
diff --git a/src/utc/nfc/utc-network-nfc-ndef-record.c b/src/utc/nfc/utc-network-nfc-ndef-record.c
new file mode 100755 (executable)
index 0000000..6a407fe
--- /dev/null
@@ -0,0 +1,588 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <nfc.h>
+#include <glib.h>
+#include <system_info.h>
+
+//& set: Nfc-ndef
+static bool nfc_supported;
+
+void utc_nfc_ndef_record_startup(void)
+{
+       nfc_manager_initialize();
+       system_info_get_platform_bool("http://tizen.org/feature/network.nfc",&nfc_supported);
+}
+
+void utc_nfc_ndef_record_cleanup(void)
+{
+       nfc_manager_deinitialize();
+}
+
+int utc_nfc_ndef_record_create_p(void)
+{
+    int ret;
+    nfc_ndef_record_h record;
+    unsigned char testbuffer[] = "TEST";
+
+    ret = nfc_ndef_record_create(&record, NFC_RECORD_TNF_WELL_KNOWN, testbuffer, 1, testbuffer, 4, testbuffer, 4);
+    if(!nfc_supported){
+        assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+    }
+    else{
+
+       assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_create_n(void)
+{
+    int ret;
+    unsigned char testbuffer[] = "TEST";
+
+    ret = nfc_ndef_record_create(NULL, NFC_RECORD_TNF_WELL_KNOWN, testbuffer, 1, testbuffer, 4, testbuffer, 4);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_record_create_text_p(void)
+{
+    int ret;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_text(&record, "test", "en-US", NFC_ENCODE_UTF_8);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret,NFC_ERROR_NONE);
+       ret= nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_create_text_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_create_text(NULL, "test", "en-US", NFC_ENCODE_UTF_8);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+    return 0;
+}
+
+int utc_nfc_ndef_record_create_uri_p(void)
+{
+    int ret;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_uri(&record, "http://test.com");
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+
+       assert_eq(ret,NFC_ERROR_NONE);
+       ret= nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_create_uri_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_create_uri(NULL, "http://test.com");
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+    return 0;
+}
+
+int utc_nfc_ndef_record_create_mime_p(void)
+{
+    int ret;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_mime(&record, "text/plain", (unsigned char *)"the text record", sizeof("the text record"));
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret, NFC_ERROR_NONE);
+       ret= nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_create_mime_n_1(void)
+{
+    int ret = NFC_ERROR_NONE;
+
+    ret = nfc_ndef_record_create_mime(NULL, "text/plain", (unsigned char *)"the text record", sizeof("the text record"));
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_record_create_mime_n_2(void)
+{
+    int ret;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_mime(&record, NULL, (unsigned char *)"the text record", sizeof("the text record"));
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+    
+    return 0;
+}
+
+int utc_nfc_ndef_record_create_mime_n_3(void)
+{
+    int ret;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_mime(&record, "text/plain", NULL, sizeof("the text record"));
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+    return 0;
+}
+
+int utc_nfc_ndef_record_destroy_p(void)
+{
+    int ret;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_text(&record, "test", "en-US", NFC_ENCODE_UTF_8);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_destroy_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_destroy(NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_record_set_id_p(void)
+{
+    int ret;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_text(&record, "test", "en-US", NFC_ENCODE_UTF_8);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_record_set_id(record, (unsigned char *)"test", 4);
+        nfc_ndef_record_destroy(record);   
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_set_id_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_set_id(NULL, (unsigned char *)"test", 4);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_id_p(void)
+{
+    int ret;
+    int size;
+    nfc_ndef_record_h record;
+    unsigned char *id;
+
+    ret = nfc_ndef_record_create_text(&record, "test", "en-US", NFC_ENCODE_UTF_8);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+
+       assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_record_set_id(record, (unsigned char *)"test", 4);
+        assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_record_get_id(record, &id, &size);
+        nfc_ndef_record_destroy(record);
+       assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_id_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_get_id(NULL, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_payload_p(void)
+{
+    int ret;
+    unsigned int size;
+    nfc_ndef_record_h record;
+    unsigned char *payload;
+
+    ret = nfc_ndef_record_create_text(&record, "test", "en-US", NFC_ENCODE_UTF_8);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret,NFC_ERROR_NONE);
+
+        ret = nfc_ndef_record_get_payload(record, &payload, &size);
+
+        nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_payload_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_set_id(NULL, (unsigned char *)"test", 4);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_type_p(void)
+{
+    int ret;
+    int size;
+    nfc_ndef_record_h record;
+    unsigned char *data;
+
+    ret = nfc_ndef_record_create_text(&record, "test", "en-US", NFC_ENCODE_UTF_8);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_record_get_type(record, &data, &size);
+        nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_type_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_get_type(NULL, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_tnf_p(void)
+{
+    int ret;
+    nfc_ndef_record_h record;
+    nfc_record_tnf_e tnf;
+
+    ret = nfc_ndef_record_create_text(&record, "test", "en-US", NFC_ENCODE_UTF_8);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_record_get_tnf(record, &tnf);
+        nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_tnf_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_get_tnf(NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_text_p(void)
+{
+    int ret;
+    char *text;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_text(&record, "test", "en-US", NFC_ENCODE_UTF_8);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+
+       assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_record_get_text(record, &text);
+       assert_eq(ret,NFC_ERROR_NONE);
+        free(text);
+        nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_text_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_get_text(NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_langcode_p(void)
+{
+    int ret;
+    char *text;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_text(&record, "test", "en-US", NFC_ENCODE_UTF_8);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_record_get_langcode(record, &text);
+        assert_eq(ret,NFC_ERROR_NONE);
+        free(text);
+        nfc_ndef_record_destroy(record);
+       assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+
+}
+int utc_nfc_ndef_record_get_langcode_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_get_langcode(NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_encode_type_p(void)
+{
+    int ret;
+    nfc_encode_type_e type;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_text(&record, "test", "en-US", NFC_ENCODE_UTF_8);
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+       assert_eq(ret,NFC_ERROR_NONE);
+
+        ret = nfc_ndef_record_get_encode_type(record, &type);
+
+        nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_encode_type_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_get_encode_type(NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_uri_p(void)
+{
+    int ret;
+    char *uri;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_uri(&record, "http://test.com");
+
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+
+       assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_record_get_uri(record, &uri);
+               assert_eq(ret,NFC_ERROR_NONE);
+        free(uri);
+        nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_uri_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_get_uri(NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_mime_type_p(void)
+{
+    int ret;
+    char *mime_type;
+    nfc_ndef_record_h record;
+
+    ret = nfc_ndef_record_create_mime(&record, "text/plain", (unsigned char *)"the text record", sizeof("the text record"));
+    if(!nfc_supported){ assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);}
+    else{
+
+       assert_eq(ret,NFC_ERROR_NONE);
+        ret = nfc_ndef_record_get_mime_type(record, &mime_type);
+        assert_eq(ret,NFC_ERROR_NONE);
+        free(mime_type);
+        nfc_ndef_record_destroy(record);
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_ndef_record_get_mime_type_n(void)
+{
+    int ret;
+
+    ret = nfc_ndef_record_get_mime_type(NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+    return 0;
+}
diff --git a/src/utc/nfc/utc-network-nfc.c b/src/utc/nfc/utc-network-nfc.c
new file mode 100755 (executable)
index 0000000..8237ecd
--- /dev/null
@@ -0,0 +1,1663 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <nfc.h>
+#include <glib.h>
+#include <system_info.h>
+
+//& set: Nfc
+static int _startup_ret = NFC_ERROR_NONE;
+static int _activation_ret = NFC_ERROR_NONE;
+static bool nfc_supported=false;
+
+void utc_nfc_startup(void)
+{
+    _startup_ret = nfc_manager_initialize();
+    system_info_get_platform_bool("http://tizen.org/feature/network.nfc",&nfc_supported);
+
+}
+
+void utc_nfc_cleanup(void)
+{
+    nfc_manager_deinitialize();
+}
+
+static void _activation_changed_cb(bool activated, void *user_data)
+{
+}
+
+static void _activation_completed_cb(int error, void *user_data)
+{
+       _activation_ret = error;
+       g_main_loop_quit((GMainLoop *)user_data);
+}
+
+static void _utc_tag_discovered_cb(nfc_discovered_type_e type,
+        nfc_tag_h tag, void *user_data)
+{
+}
+
+static void _utc_ndef_discovered_cb(nfc_ndef_message_h message, void *user_data)
+{
+}
+
+static void _utc_p2p_discovered_cb(nfc_discovered_type_e type,
+        nfc_p2p_target_h target, void *user_data)
+{
+}
+
+static void _utc_se_event_cb(nfc_se_event_e event , void *user_data)
+{
+}
+
+static void _utc_se_transaction_event_cb(nfc_se_type_e se_type,
+        unsigned char* aid, int aid_size , unsigned char* param,
+        int param_size,  void *user_data)
+{
+}
+
+int utc_nfc_manager_is_supported_p(void)
+{
+
+    int result;
+
+    nfc_manager_is_supported();
+    result = get_last_result();
+    if(!nfc_supported){
+
+        assert_eq(result,NFC_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(result, NFC_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_nfc_manager_initialize_p(void)
+{
+    int ret = NFC_ERROR_NONE;
+    nfc_manager_deinitialize();
+    ret = nfc_manager_initialize();
+    if(!nfc_supported){
+
+        assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_manager_deinitialize_p(void)
+{
+    int ret;
+
+    ret = nfc_manager_deinitialize();
+    if(!nfc_supported){
+
+       assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_eq(ret, NFC_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_nfc_manager_set_activation_changed_cb_p(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_activation_changed_cb(_activation_changed_cb, NULL);
+    if(!nfc_supported){
+
+       assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_eq(ret, NFC_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_activation_changed_cb_n(void)
+{
+
+    int ret;
+
+    ret = nfc_manager_set_activation_changed_cb(NULL, NULL);
+    if(!nfc_supported){
+
+        assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_nfc_manager_unset_activation_changed_cb_p(void)
+{
+       int ret;
+
+       nfc_manager_unset_activation_changed_cb();
+
+       ret = get_last_result();
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+       return 0;
+}
+
+int utc_nfc_manager_unset_activation_changed_cb_n(void)
+{
+       int ret;
+
+       nfc_manager_deinitialize();
+
+       nfc_manager_unset_activation_changed_cb();
+
+       ret = get_last_result();
+       if(!nfc_supported){
+
+          assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+       }
+       else{
+           assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+       }
+
+       return 0;
+}
+
+int utc_nfc_manager_unset_ndef_discovered_cb_p(void)
+{
+       int ret;
+
+       nfc_manager_unset_ndef_discovered_cb();
+
+       ret = get_last_result();
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+       return 0;
+}
+
+int utc_nfc_manager_unset_ndef_discovered_cb_n(void)
+{
+       int ret;
+
+       nfc_manager_deinitialize();
+
+       nfc_manager_unset_ndef_discovered_cb();
+
+       ret = get_last_result();
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+        }
+
+       return 0;
+}
+
+int utc_nfc_manager_is_activated_p(void)
+{
+       int result;
+       int ret;
+        nfc_manager_is_activated();
+
+       result = get_last_result();
+       if(!nfc_supported){
+
+            assert_eq(result,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(result, NFC_ERROR_NONE);
+        }
+
+        return 0;
+}
+
+int utc_nfc_manager_set_ndef_discovered_cb_p(void)
+{
+        int ret;
+
+        ret = nfc_manager_set_ndef_discovered_cb(_utc_ndef_discovered_cb, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+        return 0;
+}
+
+int utc_nfc_manager_set_ndef_discovered_cb_n(void)
+{
+        int ret;
+
+        ret = nfc_manager_set_ndef_discovered_cb(NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+        return 0;
+}
+
+int utc_nfc_manager_set_system_handler_enable_p1(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_system_handler_enable(true);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_system_handler_enable_p2(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_system_handler_enable(false);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_system_handler_enable_n(void)
+{
+    int ret;
+
+    nfc_manager_deinitialize();
+
+    ret = nfc_manager_set_system_handler_enable(false);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_get_cached_message_n(void)
+{
+    int ret;
+
+    ret = nfc_manager_get_cached_message(NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_is_system_handler_enabled_p(void)
+{
+    int ret;
+    bool enabled;
+
+    enabled = nfc_manager_is_system_handler_enabled();
+    ret = get_last_result();
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+    return 0;
+}
+
+int utc_nfc_manager_is_system_handler_enabled_n(void)
+{
+    int ret;
+    bool enabled;
+
+    nfc_manager_deinitialize();
+
+    enabled = nfc_manager_is_system_handler_enabled();
+    ret = get_last_result();
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+        }
+
+    return 0;
+}
+
+
+void utc_nfc_tag_startup(void)
+{
+    _startup_ret = nfc_manager_initialize();
+    system_info_get_platform_bool("http://tizen.org/feature/network.nfc.tag",&nfc_supported);
+}
+
+void utc_nfc_tag_cleanup(void)
+{
+    nfc_manager_deinitialize();
+}
+
+//& Set: Tag
+
+int utc_nfc_manager_get_connected_tag_n(void)
+{
+    int ret;
+
+    ret = nfc_manager_get_connected_tag(NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_tag_filter_p(void)
+{
+    int filter;
+    int ret;
+
+    nfc_manager_set_tag_filter(NFC_TAG_FILTER_ALL_ENABLE);
+    filter = nfc_manager_get_tag_filter();
+    ret = get_last_result();
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(filter,NFC_TAG_FILTER_ALL_ENABLE);
+        }
+
+    nfc_manager_set_tag_filter(NFC_TAG_FILTER_ALL_DISABLE);
+    filter = nfc_manager_get_tag_filter();
+    ret = get_last_result();
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(filter,NFC_TAG_FILTER_ALL_DISABLE);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_tag_filter_n(void)
+{
+       int ret;
+
+       nfc_manager_set_tag_filter(-1);
+
+       ret = get_last_result();
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+       return 0;
+}
+
+int utc_nfc_manager_get_tag_filter_p(void)
+{
+    int filter;
+    int ret;
+
+    nfc_manager_set_tag_filter(NFC_TAG_FILTER_ISO14443A_ENABLE);
+    filter = nfc_manager_get_tag_filter();
+    ret = get_last_result();
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+           assert_eq(filter, NFC_TAG_FILTER_ISO14443A_ENABLE);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_get_tag_filter_n(void)
+{
+       int ret;
+        int filter;
+
+       nfc_manager_deinitialize();
+
+        filter = nfc_manager_get_tag_filter();
+
+       ret = get_last_result();
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+        }
+
+       return 0;
+}
+
+int utc_nfc_manager_unset_tag_discovered_cb_p(void)
+{
+       int ret;
+
+       nfc_manager_unset_tag_discovered_cb();
+
+       ret = get_last_result();
+
+    if(!nfc_supported){
+
+        assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+
+       return 0;
+}
+
+int utc_nfc_manager_unset_tag_discovered_cb_n(void)
+{
+       int ret;
+       nfc_manager_deinitialize();
+
+       nfc_manager_unset_tag_discovered_cb();
+
+       ret = get_last_result();
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+        }
+       return 0;
+}
+
+int utc_nfc_manager_set_tag_discovered_cb_p(void)
+{
+        int ret;
+
+        ret = nfc_manager_set_tag_discovered_cb(_utc_tag_discovered_cb, NULL);
+        if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+        return 0;
+}
+
+int utc_nfc_manager_set_tag_discovered_cb_n(void)
+{
+    int ret;
+    ret = nfc_manager_set_tag_discovered_cb(NULL, NULL);
+    if(!nfc_supported){
+
+        assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_nfc_tag_get_type_n(void)
+{
+        int ret;
+
+       ret = nfc_tag_get_type(NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_tag_is_support_ndef_n(void)
+{
+        int ret;
+
+       ret = nfc_tag_is_support_ndef(NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+       return 0;
+}
+
+int utc_nfc_tag_get_maximum_ndef_size_n(void)
+{
+        int ret;
+
+       ret = nfc_tag_get_maximum_ndef_size(NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_tag_get_ndef_size_n(void)
+{
+        int ret;
+
+       ret = nfc_tag_get_ndef_size(NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_tag_foreach_information_n(void)
+{
+        int ret;
+
+       ret = nfc_tag_foreach_information(NULL, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_tag_transceive_n(void)
+{
+        int ret;
+
+       ret = nfc_tag_transceive(NULL, NULL, 0, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_tag_read_ndef_n(void)
+{
+        int ret;
+
+       ret = nfc_tag_read_ndef(NULL, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_tag_write_ndef_n(void)
+{
+        int ret;
+
+       ret = nfc_tag_write_ndef(NULL, NULL, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_tag_format_ndef_n(void)
+{
+        int ret;
+
+       ret = nfc_tag_format_ndef(NULL, NULL, 0, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_mifare_authenticate_with_keyA_n(void)
+{
+        int ret;
+
+       ret = nfc_mifare_authenticate_with_keyA(NULL, 0, NULL, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_mifare_authenticate_with_keyB_n(void)
+{
+        int ret;
+
+       ret = nfc_mifare_authenticate_with_keyB(NULL, 0, NULL, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_mifare_read_block_n(void)
+{
+        int ret;
+
+       ret = nfc_mifare_read_block(NULL, 0, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_mifare_read_page_n(void)
+{
+        int ret;
+
+       ret = nfc_mifare_read_page(NULL, 0, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+       return 0;
+}
+
+int utc_nfc_mifare_write_block_n(void)
+{
+        int ret;
+
+       ret = nfc_mifare_write_block(NULL, 0, NULL, 0, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_mifare_write_page_n(void)
+{
+        int ret;
+
+       ret = nfc_mifare_write_page(NULL, 0, NULL, 0, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_mifare_increment_n(void)
+{
+        int ret;
+
+       ret = nfc_mifare_increment(NULL, 0, 0, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_mifare_decrement_n(void)
+{
+        int ret;
+
+       ret = nfc_mifare_decrement(NULL, 0, 0, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+
+       return 0;
+}
+
+int utc_nfc_mifare_transfer_n(void)
+{
+        int ret;
+
+       ret = nfc_mifare_transfer(NULL, 0, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_mifare_restore_n(void)
+{
+        int ret;
+
+       ret = nfc_mifare_restore(NULL, 0, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+void utc_nfc_p2p_startup(void)
+{
+    _startup_ret = nfc_manager_initialize();
+    system_info_get_platform_bool("http://tizen.org/feature/network.nfc.p2p",&nfc_supported);
+}
+
+void utc_nfc_p2p_cleanup(void)
+{
+    nfc_manager_deinitialize();
+}
+
+static nfc_se_h se_handle;
+
+//& set: SNEP
+
+static void _snep_activation_completed_cb(nfc_error_e error, void *user_data)
+{
+       _activation_ret = error;
+    g_main_loop_quit((GMainLoop *)user_data);
+}
+
+static const char *san = "abcd:efgh";
+static int sap = 0x22;
+
+static void _snep_event_cb(nfc_p2p_snep_h handle,
+    nfc_snep_event_e event, nfc_error_e result,
+    nfc_ndef_message_h msg, void *user_data)
+{
+
+}
+
+int utc_nfc_manager_unset_p2p_target_discovered_cb_p(void)
+{
+       int ret;
+       nfc_manager_unset_p2p_target_discovered_cb();
+
+       ret = get_last_result();
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+       return 0;
+}
+
+int utc_nfc_manager_unset_p2p_target_discovered_cb_n(void)
+{
+       int ret;
+
+       nfc_manager_deinitialize();
+
+       nfc_manager_unset_p2p_target_discovered_cb();
+
+       ret = get_last_result();
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+        }
+
+       return 0;
+}
+
+int utc_nfc_manager_set_p2p_target_discovered_cb_p(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_p2p_target_discovered_cb(_utc_p2p_discovered_cb, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_p2p_target_discovered_cb_n(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_p2p_target_discovered_cb(NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+
+    return 0;
+}
+
+int utc_nfc_manager_get_connected_target_n(void)
+{
+    int ret;
+
+    ret = nfc_manager_get_connected_target(NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_p2p_set_data_received_cb_n(void)
+{
+        int ret;
+
+       ret = nfc_p2p_set_data_received_cb(NULL, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_p2p_unset_data_received_cb_n(void)
+{
+        int ret;
+
+       ret = nfc_p2p_unset_data_received_cb(NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_p2p_send_n(void)
+{
+        int ret;
+
+       ret = nfc_p2p_send(NULL, NULL, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
+
+int utc_nfc_snep_register_server_p(void)
+{
+    int ret;
+
+    ret = nfc_snep_register_server(san, sap, _snep_event_cb, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+           nfc_snep_unregister_server(san,sap);
+        }
+
+    return 0;
+}
+
+int utc_nfc_snep_register_server_n1(void)
+{
+    int ret;
+
+    ret = nfc_snep_register_server(san, 0, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_snep_register_server_n2(void)
+{
+    int ret;
+
+    ret = nfc_snep_register_server(NULL, sap, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_snep_unregister_server_p(void)
+{
+    int ret;
+
+    ret = nfc_snep_register_server(san, sap, _snep_event_cb, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+    ret = nfc_snep_unregister_server(san, sap);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+    return 0;
+}
+
+int utc_nfc_snep_unregister_server_n(void)
+{
+    int ret;
+
+    ret = nfc_snep_unregister_server(san, sap);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_OPERATION_FAILED);
+        }
+
+    return 0;
+}
+
+int utc_nfc_snep_send_client_request_n(void)
+{
+    int ret;
+
+    ret = nfc_snep_send_client_request(NULL, 0, NULL, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_snep_start_client_n(void)
+{
+    int ret;
+
+    ret = nfc_snep_start_client(NULL, NULL, 0, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_snep_start_server_n(void)
+{
+    int ret;
+    ret = nfc_snep_start_server(NULL, NULL, 0, NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+
+int utc_nfc_snep_stop_service_n(void)
+{
+    int ret;
+
+    ret = nfc_snep_stop_service(NULL, NULL);
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+void utc_ce_startup(void)
+{
+       _startup_ret = nfc_manager_initialize();
+       system_info_get_platform_bool("http://tizen.org/feature/network.nfc.card_emulation",&nfc_supported);
+}
+
+void utc_ce_cleanup(void)
+{
+    nfc_se_type_e tp;
+
+       nfc_manager_get_se_type(&tp);
+       if(tp == NFC_SE_TYPE_DISABLE)
+               nfc_manager_set_se_type(NFC_SE_TYPE_ESE);
+
+    nfc_manager_deinitialize();
+}
+
+int utc_nfc_manager_get_se_type_p(void)
+{
+    int ret;
+    nfc_se_type_e tp;
+
+    ret = nfc_manager_get_se_type(&tp);
+
+        if(nfc_supported){
+
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+    else{
+
+        assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_nfc_manager_get_se_type_n(void)
+{
+    int ret;
+
+    ret = nfc_manager_get_se_type(NULL);
+        if(nfc_supported){
+
+       assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+    }
+    else{
+
+        assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_se_type_p(void)
+{
+    int ret;
+    nfc_se_type_e tp;
+
+    if(nfc_supported){
+        ret = nfc_manager_get_se_type(&tp);
+        if(tp == NFC_SE_TYPE_DISABLE)
+               ret = nfc_manager_set_se_type(NFC_SE_TYPE_ESE);
+       else
+               ret = nfc_manager_set_se_type(NFC_SE_TYPE_DISABLE);
+
+       assert(ret == NFC_ERROR_NONE
+               || ret == NFC_ERROR_SECURITY_RESTRICTED);
+    }
+    else{
+       ret=nfc_manager_set_se_type(NFC_SE_TYPE_ESE);
+       assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_nfc_manager_set_se_type_n(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_se_type(-3);
+        if(nfc_supported){
+
+        assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+    }
+    else{
+
+        assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_nfc_se_enable_card_emulation_p(void)
+{
+       nfc_se_type_e tp;
+       int ret = NFC_ERROR_NONE;
+
+       nfc_manager_get_se_type(&tp);
+       if(tp != NFC_SE_TYPE_DISABLE)
+               ret = nfc_se_enable_card_emulation();
+
+       if(!nfc_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }else{
+               assert(ret == NFC_ERROR_NONE 
+                       || ret == NFC_ERROR_ILLEGAL_STATE
+                       || ret == NFC_ERROR_SECURITY_RESTRICTED);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_enable_card_emulation_n(void)
+{
+       int ret;
+
+       nfc_manager_deinitialize();
+       ret = nfc_se_enable_card_emulation();
+
+       if(!nfc_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }else{
+               assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+       }
+
+    return 0;
+}
+
+int utc_nfc_se_disable_card_emulation_p(void)
+{
+       nfc_se_type_e tp;
+       int ret = NFC_ERROR_NONE;
+
+       nfc_manager_get_se_type(&tp);
+       if(tp != NFC_SE_TYPE_DISABLE)
+               ret = nfc_se_disable_card_emulation();
+
+       if(!nfc_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }else{
+               assert(ret == NFC_ERROR_NONE
+                       || ret == NFC_ERROR_SECURITY_RESTRICTED);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_disable_card_emulation_n(void)
+{
+       int ret;
+
+       nfc_manager_deinitialize();
+       ret = nfc_se_disable_card_emulation();
+
+       if(!nfc_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }else{
+               assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_get_card_emulation_mode_p(void)
+{
+       int ret;
+       nfc_se_card_emulation_mode_type_e emode;
+
+       ret = nfc_se_get_card_emulation_mode(&emode);
+
+       if(!nfc_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }else{
+               assert_eq(ret, NFC_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_nfc_se_get_card_emulation_mode_n(void)
+{
+    int ret;
+
+    ret = nfc_se_get_card_emulation_mode(NULL);
+
+        if(!nfc_supported){
+                assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+        }else{
+                assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_se_event_cb_p(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_se_event_cb(_utc_se_event_cb, NULL);
+        if(!nfc_supported){
+                assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+        }else{
+                assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_se_event_cb_n(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_se_event_cb(NULL, NULL);
+
+        if(!nfc_supported){
+                assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+        } else{
+                assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_unset_se_event_cb_p(void)
+{
+       int ret;
+
+       nfc_manager_unset_se_event_cb();
+       ret = get_last_result();
+
+       if(!nfc_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }else{
+               assert_eq(ret, NFC_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_nfc_manager_unset_se_event_cb_n(void)
+{
+       int ret;
+
+       nfc_manager_deinitialize();
+       nfc_manager_unset_se_event_cb();
+       ret = get_last_result();
+
+       if(!nfc_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }else{
+               assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+       }
+
+       return 0;
+}
+
+int utc_nfc_manager_set_se_transaction_event_cb_p1(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_se_transaction_event_cb(NFC_SE_TYPE_ESE, _utc_se_transaction_event_cb, NULL);
+
+    if(!nfc_supported){
+
+        assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, NFC_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_se_transaction_event_cb_p2(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_se_transaction_event_cb(NFC_SE_TYPE_UICC, _utc_se_transaction_event_cb, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_se_transaction_event_cb_n1(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_se_transaction_event_cb(NFC_SE_TYPE_UICC, NULL, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+
+    return 0;
+}
+
+int utc_nfc_manager_set_se_transaction_event_cb_n2(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_se_transaction_event_cb(NFC_SE_TYPE_DISABLE, _utc_se_transaction_event_cb, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_set_se_transaction_event_cb_n3(void)
+{
+    int ret;
+
+    ret = nfc_manager_set_se_transaction_event_cb(-1, _utc_se_transaction_event_cb, NULL);
+
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_INVALID_PARAMETER);
+        }
+
+    return 0;
+}
+
+int utc_nfc_manager_unset_se_transaction_event_cb_p(void)
+{
+       int ret;
+
+       nfc_manager_unset_se_transaction_event_cb(NFC_SE_TYPE_ESE);
+
+       ret = get_last_result();
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NONE);
+        }
+
+       return 0;
+}
+
+int utc_nfc_manager_unset_se_transaction_event_cb_n(void)
+{
+       int ret;
+
+       nfc_manager_deinitialize();
+
+       nfc_manager_unset_se_transaction_event_cb(NFC_SE_TYPE_ESE);
+
+       ret = get_last_result();
+       if(!nfc_supported){
+
+            assert_eq(ret,NFC_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+        }
+
+       return 0;
+}
+
+int utc_nfc_manager_enable_transaction_fg_dispatch_p(void)
+{
+       int ret;
+
+       ret = nfc_manager_enable_transaction_fg_dispatch();
+
+       if(!nfc_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }else{
+               assert(ret == NFC_ERROR_NONE
+                       || ret == NFC_ERROR_ILLEGAL_STATE
+                       || ret == NFC_ERROR_SECURITY_RESTRICTED);
+       }
+
+       return 0;
+}
+
+int utc_nfc_manager_enable_transaction_fg_dispatch_n(void)
+{
+       int ret;
+
+       nfc_manager_deinitialize();
+       ret = nfc_manager_enable_transaction_fg_dispatch();
+
+       if(!nfc_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }else{
+               assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+       }
+
+       return 0;
+}
+
+int utc_nfc_manager_disable_transaction_fg_dispatch_p(void)
+{
+       int ret;
+
+       ret = nfc_manager_disable_transaction_fg_dispatch();
+
+       if(!nfc_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }else{
+               assert(ret == NFC_ERROR_NONE
+                       || ret == NFC_ERROR_SECURITY_RESTRICTED);
+       }
+
+       return 0;
+}
+
+int utc_nfc_manager_disable_transaction_fg_dispatch_n(void)
+{
+       int ret;
+
+       nfc_manager_deinitialize();
+       ret = nfc_manager_disable_transaction_fg_dispatch();
+
+       if(!nfc_supported){
+               assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
+       }else{
+          assert_eq(ret, NFC_ERROR_NOT_INITIALIZED);
+       }
+
+       return 0;
+}
+
diff --git a/src/utc/notification/CMakeLists.txt b/src/utc/notification/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..7d47978
--- /dev/null
@@ -0,0 +1,32 @@
+SET(PKG_NAME "notification")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "notification")
+SET(TC_SOURCES
+       utc-notification.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-appfw-application
+       glib-2.0
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/notification/platform.list b/src/utc/notification/platform.list
new file mode 100755 (executable)
index 0000000..b7eaf39
--- /dev/null
@@ -0,0 +1,19 @@
+notification_free_list
+notification_get_detail_list
+notification_get_list
+notification_list_append
+notification_list_get_data
+notification_list_get_head
+notification_list_get_next
+notification_list_get_prev
+notification_list_get_tail
+notification_list_remove
+notification_register_detailed_changed_cb
+notification_status_monitor_message_cb_set
+notification_status_monitor_message_cb_unset
+notification_unregister_detailed_changed_cb
+notification_update_async
+notification_update_content
+notification_update_progress
+notification_update_size
+notification_insert
diff --git a/src/utc/notification/public.list b/src/utc/notification/public.list
new file mode 100755 (executable)
index 0000000..835f61e
--- /dev/null
@@ -0,0 +1,42 @@
+notification_clone
+notification_create
+notification_delete
+notification_delete_all
+notification_free
+notification_get_display_applist
+notification_get_image
+notification_get_insert_time
+notification_get_launch_option
+notification_get_layout
+notification_get_led
+notification_get_led_time_period
+notification_get_progress
+notification_get_property
+notification_get_size
+notification_get_sound
+notification_get_tag
+notification_get_text
+notification_get_time
+notification_get_time_from_text
+notification_get_type
+notification_get_vibration
+notification_load_by_tag
+notification_post
+notification_set_display_applist
+notification_set_image
+notification_set_launch_option
+notification_set_layout
+notification_set_led
+notification_set_led_time_period
+notification_set_progress
+notification_set_property
+notification_set_size
+notification_set_sound
+notification_set_tag
+notification_set_text
+notification_set_time
+notification_set_time_to_text
+notification_set_vibration
+notification_status_message_post
+notification_update
+
diff --git a/src/utc/notification/tct-notification-core.c b/src/utc/notification/tct-notification-core.c
new file mode 100755 (executable)
index 0000000..ef7fa3e
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-notification-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/notification/tct-notification-core.h b/src/utc/notification/tct-notification-core.h
new file mode 100755 (executable)
index 0000000..2a21e7f
--- /dev/null
@@ -0,0 +1,225 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_NOTIFICATION_CORE_H__
+#define __TCT_NOTIFICATION_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_notification_startup(void);
+extern void utc_notification_cleanup(void);
+
+extern int utc_notification_create_1_n(void);
+extern int utc_notification_create_2_n(void);
+extern int utc_notification_create_1_p(void);
+extern int utc_notification_create_2_p(void);
+extern int utc_notification_set_image_n(void);
+extern int utc_notification_set_image_p(void);
+extern int utc_notification_get_image_n(void);
+extern int utc_notification_get_image_1_p(void);
+extern int utc_notification_get_image_2_p(void);
+extern int utc_notification_set_time_n(void);
+extern int utc_notification_set_time_p(void);
+extern int utc_notification_get_time_n(void);
+extern int utc_notification_get_time_1_p(void);
+extern int utc_notification_get_time_2_p(void);
+extern int utc_notification_get_insert_time_n(void);
+extern int utc_notification_get_insert_time_1_p(void);
+extern int utc_notification_get_insert_time_2_p(void);
+extern int utc_notification_set_text_n(void);
+extern int utc_notification_set_text_p(void);
+extern int utc_notification_get_text_n(void);
+extern int utc_notification_get_text_1_p(void);
+extern int utc_notification_set_time_to_text_n(void);
+extern int utc_notification_set_time_to_text_p(void);
+extern int utc_notification_get_time_from_text_n(void);
+extern int utc_notification_get_time_from_text_1_p(void);
+extern int utc_notification_get_time_from_text_2_p(void);
+extern int utc_notification_set_sound_n(void);
+extern int utc_notification_set_sound_p(void);
+extern int utc_notification_get_sound_n(void);
+extern int utc_notification_get_sound_1_p(void);
+extern int utc_notification_get_sound_2_p(void);
+extern int utc_notification_set_vibration_n(void);
+extern int utc_notification_set_vibration_p(void);
+extern int utc_notification_get_vibration_n(void);
+extern int utc_notification_get_vibration_1_p(void);
+extern int utc_notification_get_vibration_2_p(void);
+extern int utc_notification_set_led_n(void);
+extern int utc_notification_set_led_p(void);
+extern int utc_notification_get_led_n(void);
+extern int utc_notification_get_led_1_p(void);
+extern int utc_notification_get_led_2_p(void);
+extern int utc_notification_set_led_time_period_n(void);
+extern int utc_notification_set_led_time_period_p(void);
+extern int utc_notification_get_led_time_period_n(void);
+extern int utc_notification_get_led_time_period_1_p(void);
+extern int utc_notification_get_led_time_period_2_p(void);
+extern int utc_notification_set_property_n(void);
+extern int utc_notification_set_property_p(void);
+extern int utc_notification_get_property_n(void);
+extern int utc_notification_get_property_1_p(void);
+extern int utc_notification_get_property_2_p(void);
+extern int utc_notification_set_display_applist_n(void);
+extern int utc_notification_set_display_applist_p(void);
+extern int utc_notification_get_display_applist_n(void);
+extern int utc_notification_get_display_applist_1_p(void);
+extern int utc_notification_get_display_applist_2_p(void);
+extern int utc_notification_set_size_n(void);
+extern int utc_notification_set_size_p(void);
+extern int utc_notification_get_size_n(void);
+extern int utc_notification_get_size_1_p(void);
+extern int utc_notification_get_size_2_p(void);
+extern int utc_notification_set_progress_n(void);
+extern int utc_notification_set_progress_p(void);
+extern int utc_notification_get_progress_n(void);
+extern int utc_notification_get_progress_1_p(void);
+extern int utc_notification_get_progress_2_p(void);
+extern int utc_notification_set_layout_n(void);
+extern int utc_notification_set_layout_p(void);
+extern int utc_notification_get_layout_n(void);
+extern int utc_notification_get_layout_1_p(void);
+extern int utc_notification_get_layout_2_p(void);
+extern int utc_notification_get_type_n(void);
+extern int utc_notification_get_type_1_p(void);
+extern int utc_notification_get_type_2_p(void);
+extern int utc_notification_update_n(void);
+extern int utc_notification_update_p(void);
+extern int utc_notification_delete_n(void);
+extern int utc_notification_delete_p(void);
+extern int utc_notification_clone_n(void);
+extern int utc_notification_clone_p(void);
+extern int utc_notification_free_n(void);
+extern int utc_notification_free_p(void);
+extern int utc_notification_status_message_post_n(void);
+extern int utc_notification_status_message_post_p(void);
+extern int utc_notification_set_tag_n(void);
+extern int utc_notification_set_tag_p(void);
+extern int utc_notification_get_tag_n(void);
+extern int utc_notification_get_tag_1_p(void);
+extern int utc_notification_get_tag_2_p(void);
+extern int utc_notification_load_by_tag_n(void);
+extern int utc_notification_load_by_tag_p(void);
+extern int utc_notification_delete_all_p(void);
+extern int utc_notification_post_n(void);
+extern int utc_notification_post_p(void);
+extern int utc_notification_set_launch_option_n(void);
+extern int utc_notification_set_launch_option_p(void);
+extern int utc_notification_get_launch_option_n(void);
+extern int utc_notification_get_launch_option_p(void);
+
+testcase tc_array[] = {
+    {"utc_notification_create_1_n", utc_notification_create_1_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_create_2_n", utc_notification_create_2_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_create_1_p", utc_notification_create_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_create_2_p", utc_notification_create_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_image_n", utc_notification_set_image_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_image_p", utc_notification_set_image_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_image_n", utc_notification_get_image_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_image_1_p", utc_notification_get_image_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_image_2_p", utc_notification_get_image_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_time_n", utc_notification_set_time_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_time_p", utc_notification_set_time_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_time_n", utc_notification_get_time_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_time_1_p", utc_notification_get_time_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_time_2_p", utc_notification_get_time_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_insert_time_n", utc_notification_get_insert_time_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_insert_time_1_p", utc_notification_get_insert_time_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_insert_time_2_p", utc_notification_get_insert_time_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_text_n", utc_notification_set_text_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_text_p", utc_notification_set_text_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_text_n", utc_notification_get_text_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_text_1_p", utc_notification_get_text_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_time_to_text_n", utc_notification_set_time_to_text_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_time_to_text_p", utc_notification_set_time_to_text_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_time_from_text_n", utc_notification_get_time_from_text_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_time_from_text_1_p", utc_notification_get_time_from_text_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_time_from_text_2_p", utc_notification_get_time_from_text_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_sound_n", utc_notification_set_sound_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_sound_p", utc_notification_set_sound_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_sound_n", utc_notification_get_sound_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_sound_1_p", utc_notification_get_sound_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_sound_2_p", utc_notification_get_sound_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_vibration_n", utc_notification_set_vibration_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_vibration_p", utc_notification_set_vibration_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_vibration_n", utc_notification_get_vibration_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_vibration_1_p", utc_notification_get_vibration_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_vibration_2_p", utc_notification_get_vibration_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_led_n", utc_notification_set_led_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_led_p", utc_notification_set_led_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_led_n", utc_notification_get_led_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_led_1_p", utc_notification_get_led_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_led_2_p", utc_notification_get_led_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_led_time_period_n", utc_notification_set_led_time_period_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_led_time_period_p", utc_notification_set_led_time_period_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_led_time_period_n", utc_notification_get_led_time_period_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_led_time_period_1_p", utc_notification_get_led_time_period_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_led_time_period_2_p", utc_notification_get_led_time_period_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_property_n", utc_notification_set_property_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_property_p", utc_notification_set_property_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_property_n", utc_notification_get_property_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_property_1_p", utc_notification_get_property_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_property_2_p", utc_notification_get_property_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_display_applist_n", utc_notification_set_display_applist_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_display_applist_p", utc_notification_set_display_applist_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_display_applist_n", utc_notification_get_display_applist_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_display_applist_1_p", utc_notification_get_display_applist_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_display_applist_2_p", utc_notification_get_display_applist_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_size_n", utc_notification_set_size_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_size_p", utc_notification_set_size_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_size_n", utc_notification_get_size_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_size_1_p", utc_notification_get_size_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_size_2_p", utc_notification_get_size_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_progress_n", utc_notification_set_progress_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_progress_p", utc_notification_set_progress_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_progress_n", utc_notification_get_progress_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_progress_1_p", utc_notification_get_progress_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_progress_2_p", utc_notification_get_progress_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_layout_n", utc_notification_set_layout_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_layout_p", utc_notification_set_layout_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_layout_n", utc_notification_get_layout_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_layout_1_p", utc_notification_get_layout_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_layout_2_p", utc_notification_get_layout_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_type_n", utc_notification_get_type_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_type_1_p", utc_notification_get_type_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_type_2_p", utc_notification_get_type_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_update_n", utc_notification_update_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_update_p", utc_notification_update_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_delete_n", utc_notification_delete_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_delete_p", utc_notification_delete_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_clone_n", utc_notification_clone_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_clone_p", utc_notification_clone_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_free_n", utc_notification_free_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_free_p", utc_notification_free_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_status_message_post_n", utc_notification_status_message_post_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_status_message_post_p", utc_notification_status_message_post_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_tag_n", utc_notification_set_tag_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_tag_p", utc_notification_set_tag_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_tag_n", utc_notification_get_tag_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_tag_1_p", utc_notification_get_tag_1_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_tag_2_p", utc_notification_get_tag_2_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_load_by_tag_n", utc_notification_load_by_tag_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_load_by_tag_p", utc_notification_load_by_tag_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_delete_all_p", utc_notification_delete_all_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_post_n", utc_notification_post_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_post_p", utc_notification_post_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_launch_option_n", utc_notification_set_launch_option_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_set_launch_option_p", utc_notification_set_launch_option_p, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_launch_option_n", utc_notification_get_launch_option_n, utc_notification_startup, utc_notification_cleanup},
+    {"utc_notification_get_launch_option_p", utc_notification_get_launch_option_p, utc_notification_startup, utc_notification_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_NOTIFICATION_CORE_H__
diff --git a/src/utc/notification/utc-notification.c b/src/utc/notification/utc-notification.c
new file mode 100755 (executable)
index 0000000..8b7a651
--- /dev/null
@@ -0,0 +1,1861 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <app.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <libintl.h>
+#include <notification.h>
+
+//& set: Notification
+
+#define TEST_PKG "org.tizen.tetware"
+#define TEST_TEXT "test"
+#define TEST_UPDATE "updated"
+#define TEST_APP "org.tizen.app"
+#define TEST_PATH "path"
+#define TEST_IMAGE "test.png"
+#define TEST_INT 10
+#define TEST_DOUBLE 0.5
+#define TEST_TIME 0xFFFFFFF
+
+
+static void _changed_cb(void *data, notification_type_e type)
+{
+}
+
+static void _detailed_changed_cb(void *data, notification_type_e type, notification_op *op_list, int num_op)
+{
+}
+
+static void _deferred_job_cb(void *data)
+{
+}
+
+void utc_notification_startup(void)
+{
+       notification_h notification = NULL;
+       bundle *b = NULL;
+
+       notification = notification_create(NOTIFICATION_TYPE_NOTI);
+       b = bundle_create();
+
+       notification_set_time(notification, TEST_TIME);
+       notification_set_image(notification, NOTIFICATION_IMAGE_TYPE_ICON, TEST_IMAGE);
+       notification_set_tag(notification, TEST_TEXT);
+       notification_set_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, TEST_TEXT, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+       notification_set_time_to_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, time(NULL));
+       notification_set_sound(notification, NOTIFICATION_SOUND_TYPE_USER_DATA, TEST_PATH);
+       notification_set_layout(notification, NOTIFICATION_LY_NOTI_EVENT_SINGLE);
+       notification_set_progress(notification, TEST_DOUBLE);
+       notification_set_size(notification, TEST_DOUBLE);
+       notification_set_display_applist(notification, NOTIFICATION_DISPLAY_APP_ALL);
+       notification_set_property(notification, NOTIFICATION_PROP_DISABLE_AUTO_DELETE);
+       notification_set_led_time_period(notification, TEST_INT, TEST_INT);
+       notification_set_led(notification, NOTIFICATION_LED_OP_ON, 0);
+       notification_set_vibration(notification, NOTIFICATION_VIBRATION_TYPE_USER_DATA, TEST_PATH);
+
+       notification_post(notification);
+}
+
+void utc_notification_cleanup(void)
+{
+}
+
+/**
+ * @brief Negative test case of notification_create()
+ */
+int utc_notification_create_1_n(void)
+{
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NONE);
+
+    assert(!notification);
+
+    return 0;
+
+}
+
+/**
+ * @brief Negative test case of notification_create()
+ */
+int utc_notification_create_2_n(void)
+{
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_MAX);
+
+    assert(!notification);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_create()
+ */
+int utc_notification_create_1_p(void)
+{
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_create()
+ */
+int utc_notification_create_2_p(void)
+{
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_ONGOING);
+
+    assert(notification);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_set_image()
+ */
+int utc_notification_set_image_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_image(NULL, NOTIFICATION_IMAGE_TYPE_ICON, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_image()
+ */
+int utc_notification_set_image_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_image(notification, NOTIFICATION_IMAGE_TYPE_ICON, TEST_IMAGE);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_image()
+ */
+int utc_notification_get_image_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_image(NULL, NOTIFICATION_IMAGE_TYPE_ICON, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_image()
+ */
+int utc_notification_get_image_1_p(void)
+{
+    int ret = 0;
+    char *image = NULL;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_get_image(notification, NOTIFICATION_IMAGE_TYPE_ICON, &image);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_image()
+ */
+int utc_notification_get_image_2_p(void)
+{
+    int ret = 0;
+    char *image = NULL;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_image(notification, NOTIFICATION_IMAGE_TYPE_ICON, &image);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+    assert_eq(strcmp(image, TEST_IMAGE), 0);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_set_time()
+ */
+int utc_notification_set_time_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_time(NULL, 0);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_time()
+ */
+int utc_notification_set_time_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_time(notification, TEST_TIME);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_time()
+ */
+int utc_notification_get_time_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_time(NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_time()
+ */
+int utc_notification_get_time_1_p(void)
+{
+    int ret = 0;
+    time_t t = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    notification_set_time(notification, TEST_TIME);
+
+    ret = notification_get_time(notification, &t);
+
+    assert_neq(t, 0);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_time()
+ */
+int utc_notification_get_time_2_p(void)
+{
+    int ret = 0;
+    time_t t = 0;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_time(notification, &t);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+    assert_eq(t, TEST_TIME);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_insert_time()
+ */
+int utc_notification_get_insert_time_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_insert_time(NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_insert_time()
+ */
+int utc_notification_get_insert_time_1_p(void)
+{
+    int ret = 0;
+    time_t t = -1;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_get_insert_time(notification, &t);
+
+    assert_neq(t, -1);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_insert_time()
+ */
+int utc_notification_get_insert_time_2_p(void)
+{
+    int ret = 0;
+    time_t t = 0;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_insert_time(notification, &t);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+    assert_neq(t, 0);
+
+    return 0;
+}
+
+
+/**
+ * @brief Negative test case of notification_set_text()
+ */
+int utc_notification_set_text_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_text(NULL, NOTIFICATION_TEXT_TYPE_NONE, NULL, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_text()
+ */
+int utc_notification_set_text_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, TEST_TEXT, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_text()
+ */
+int utc_notification_get_text_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_text(NULL, NOTIFICATION_TEXT_TYPE_TITLE, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_text()
+ */
+int utc_notification_get_text_1_p(void)
+{
+    int ret = 0;
+    char *value = NULL;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    notification_set_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, TEST_TEXT, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+
+    ret = notification_get_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, &value);
+
+    assert_neq(value, NULL);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+
+
+/**
+ * @brief Negative test case of notification_set_time_to_text()
+ */
+int utc_notification_set_time_to_text_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_time_to_text(NULL, NOTIFICATION_TEXT_TYPE_NONE, 0);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_time_to_text()
+ */
+int utc_notification_set_time_to_text_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_time_to_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, time(NULL));
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_time_from_text()
+ */
+int utc_notification_get_time_from_text_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_time_from_text(NULL, NOTIFICATION_TEXT_TYPE_TITLE, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_time_from_text()
+ */
+int utc_notification_get_time_from_text_1_p(void)
+{
+    int ret = 0;
+    time_t t = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    notification_set_time_to_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, time(NULL));
+
+    ret = notification_get_time_from_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, &t);
+
+    assert_neq(t, 0);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_time_from_text()
+ */
+int utc_notification_get_time_from_text_2_p(void)
+{
+    int ret = 0;
+    time_t t = 0;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_time_from_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, &t);
+
+    assert_neq(t, 0);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_set_sound()
+ */
+int utc_notification_set_sound_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_sound(NULL, NOTIFICATION_SOUND_TYPE_MAX, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_sound()
+ */
+int utc_notification_set_sound_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_sound(notification, NOTIFICATION_SOUND_TYPE_DEFAULT, TEST_PATH);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_sound()
+ */
+int utc_notification_get_sound_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_sound(NULL, NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_sound()
+ */
+int utc_notification_get_sound_1_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+    notification_sound_type_e type;
+    const char *value = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    notification_set_sound(notification, NOTIFICATION_SOUND_TYPE_USER_DATA, TEST_PATH);
+
+    ret = notification_get_sound(notification, &type, &value);
+
+    assert_neq(value, NULL);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_sound()
+ */
+int utc_notification_get_sound_2_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+    notification_sound_type_e type;
+    const char *value = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_sound(notification, &type, &value);
+
+    assert_eq(type, NOTIFICATION_SOUND_TYPE_USER_DATA);
+    assert_eq(strcmp(value, TEST_PATH), 0);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_set_vibration()
+ */
+int utc_notification_set_vibration_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_vibration(NULL, NOTIFICATION_VIBRATION_TYPE_MAX, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_vibration()
+ */
+int utc_notification_set_vibration_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_vibration(notification, NOTIFICATION_VIBRATION_TYPE_DEFAULT, TEST_PATH);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_vibration()
+ */
+int utc_notification_get_vibration_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_vibration(NULL, NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_vibration()
+ */
+int utc_notification_get_vibration_1_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+    notification_vibration_type_e type = NOTIFICATION_VIBRATION_TYPE_USER_DATA;
+    const char *value = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    notification_set_vibration(notification, type, TEST_PATH);
+    ret = notification_get_vibration(notification, &type, &value);
+
+    assert_neq(value, NULL);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_vibration()
+ */
+int utc_notification_get_vibration_2_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+    notification_vibration_type_e type;
+    const char *value = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_vibration(notification, &type, &value);
+
+    assert_eq(type, NOTIFICATION_VIBRATION_TYPE_USER_DATA);
+    assert_eq(strcmp(value, TEST_PATH), 0);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_set_led()
+ */
+int utc_notification_set_led_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_led(NULL, NOTIFICATION_LED_OP_MAX, 0);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_led()
+ */
+int utc_notification_set_led_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_led(notification, NOTIFICATION_LED_OP_ON, 0);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_led()
+ */
+int utc_notification_get_led_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_led(NULL, NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_led()
+ */
+int utc_notification_get_led_1_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+    notification_led_op_e type = NOTIFICATION_LED_OP_OFF;
+    int value = -1;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    notification_set_led(notification, NOTIFICATION_LED_OP_ON_CUSTOM_COLOR, TEST_INT);
+
+    ret = notification_get_led(notification, &type, &value);
+
+    assert_neq(type, NOTIFICATION_LED_OP_OFF);
+    assert_neq(value, -1);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_led()
+ */
+int utc_notification_get_led_2_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+    notification_led_op_e type;
+    int value = 0;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_led(notification, &type, &value);
+
+    assert_eq(type, NOTIFICATION_LED_OP_ON);
+    assert_eq(value, 0);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_set_led_time_period()
+ */
+int utc_notification_set_led_time_period_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_led_time_period(NULL, 0, 0);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_led_time_period()
+ */
+int utc_notification_set_led_time_period_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_led_time_period(notification, TEST_INT, TEST_INT);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_led_time_period()
+ */
+int utc_notification_get_led_time_period_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_led_time_period(NULL, NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_led_time_period()
+ */
+int utc_notification_get_led_time_period_1_p(void)
+{
+    int ret = 0;
+    int value1 = -1;
+    int value2 = -1;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_get_led_time_period(notification, &value1, &value2);
+
+    assert_neq(value1, -1);
+    assert_neq(value2, -1);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_led_time_period()
+ */
+int utc_notification_get_led_time_period_2_p(void)
+{
+    int ret = 0;
+    int value1 = 0;
+    int value2 = 0;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_led_time_period(notification, &value1, &value2);
+
+    assert_eq(value1, TEST_INT);
+    assert_eq(value2, TEST_INT);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+
+
+/**
+ * @brief Negative test case of notification_set_property()
+ */
+int utc_notification_set_property_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_property(NULL, 0);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_property()
+ */
+int utc_notification_set_property_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_property(notification, NOTIFICATION_PROP_DISABLE_AUTO_DELETE);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_property()
+ */
+int utc_notification_get_property_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_property(NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_property()
+ */
+int utc_notification_get_property_1_p(void)
+{
+    int ret = 0;
+    int value = -1;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_get_property(notification, &value);
+
+    assert_neq(value, -1);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_property()
+ */
+int utc_notification_get_property_2_p(void)
+{
+    int ret = 0;
+    int value = 0;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_property(notification, &value);
+
+    assert_eq(value, NOTIFICATION_PROP_DISABLE_AUTO_DELETE);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_set_display_applist()
+ */
+int utc_notification_set_display_applist_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_display_applist(NULL, 0);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_display_applist()
+ */
+int utc_notification_set_display_applist_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_display_applist(notification, NOTIFICATION_DISPLAY_APP_ALL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_display_applist()
+ */
+int utc_notification_get_display_applist_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_display_applist(NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_display_applist()
+ */
+int utc_notification_get_display_applist_1_p(void)
+{
+    int ret = 0;
+    int value = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    notification_set_display_applist(notification, NOTIFICATION_DISPLAY_APP_ALL);
+
+    ret = notification_get_display_applist(notification, &value);
+
+    assert_neq(value, 0);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_display_applist()
+ */
+int utc_notification_get_display_applist_2_p(void)
+{
+    int ret = 0;
+    int value = 0;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_display_applist(notification, &value);
+
+    assert_eq(value, NOTIFICATION_DISPLAY_APP_ALL);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_set_size()
+ */
+int utc_notification_set_size_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_size(NULL, 0.0);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_size()
+ */
+int utc_notification_set_size_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_size(notification, TEST_DOUBLE);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_size()
+ */
+int utc_notification_get_size_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_size(NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_size()
+ */
+int utc_notification_get_size_1_p(void)
+{
+    int ret = 0;
+    double value = -1.0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_get_size(notification, &value);
+
+    assert_neq(value, -1.0);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_size()
+ */
+int utc_notification_get_size_2_p(void)
+{
+    int ret = 0;
+    double value = 0.0;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_size(notification, &value);
+
+    assert_eq(value, TEST_DOUBLE);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_set_progress()
+ */
+int utc_notification_set_progress_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_progress(NULL, 0.0);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_progress()
+ */
+int utc_notification_set_progress_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_progress(notification, TEST_DOUBLE);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_progress()
+ */
+int utc_notification_get_progress_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_progress(NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_progress()
+ */
+int utc_notification_get_progress_1_p(void)
+{
+    int ret = 0;
+    double value = -1.0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_get_progress(notification, &value);
+
+    assert_neq(value, -1.0);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_progress()
+ */
+int utc_notification_get_progress_2_p(void)
+{
+    int ret = 0;
+    double value = 0.0;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_progress(notification, &value);
+
+    assert_eq(value, TEST_DOUBLE);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+
+/**
+ * @brief Negative test case of notification_set_layout()
+ */
+int utc_notification_set_layout_n(void)
+{
+    int ret = 0;
+
+    ret = notification_set_layout(NULL, NOTIFICATION_LY_NONE);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_layout()
+ */
+int utc_notification_set_layout_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_set_layout(notification, NOTIFICATION_LY_NOTI_EVENT_SINGLE);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_layout()
+ */
+int utc_notification_get_layout_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_layout(NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_layout()
+ */
+int utc_notification_get_layout_1_p(void)
+{
+    int ret = 0;
+    notification_ly_type_e type = NOTIFICATION_LY_NONE;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_get_layout(notification, &type);
+
+    assert_neq(type, NOTIFICATION_LY_NONE);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_layout()
+ */
+int utc_notification_get_layout_2_p(void)
+{
+    int ret = 0;
+    notification_ly_type_e type;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_layout(notification, &type);
+
+    assert_eq(type, NOTIFICATION_LY_NOTI_EVENT_SINGLE);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+
+/**
+ * @brief Negative test case of notification_get_type()
+ */
+int utc_notification_get_type_n(void)
+{
+    int ret = 0;
+
+    ret = notification_get_type(NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_type()
+ */
+int utc_notification_get_type_1_p(void)
+{
+    int ret = 0;
+    notification_type_e type = NOTIFICATION_TYPE_NONE;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+    assert(notification);
+
+    ret = notification_get_type(notification, &type);
+
+    assert_neq(type, NOTIFICATION_TYPE_NONE);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_type()
+ */
+int utc_notification_get_type_2_p(void)
+{
+    int ret = 0;
+    notification_type_e type;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_get_type(notification, &type);
+
+    assert_eq(type, NOTIFICATION_TYPE_NOTI);
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_update()
+ */
+int utc_notification_update_n(void)
+{
+    int ret = 0;
+
+    ret = notification_update(NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_update()
+ */
+int utc_notification_update_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    notification_set_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, TEST_UPDATE, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+
+    ret = notification_update(notification);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+
+/**
+ * @brief Negative test case of notification_delete()
+ */
+int utc_notification_delete_n(void)
+{
+    int ret = 0;
+
+    ret = notification_delete(NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_delete()
+ */
+int utc_notification_delete_p(void)
+{
+    int ret = 0;
+    int priv_id = 0;
+    notification_h notification = NULL;
+
+    notification = notification_load_by_tag(TEST_TEXT);
+
+    assert(notification);
+
+    ret = notification_delete(notification);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+
+
+
+
+/**
+ * @brief Negative test case of notification_clone()
+ */
+int utc_notification_clone_n(void)
+{
+    int ret = 0;
+
+    ret = notification_clone(NULL, NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_clone()
+ */
+int utc_notification_clone_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+    notification_h notification_cloned = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_ONGOING);
+
+    assert(notification);
+
+    ret = notification_clone(notification, &notification_cloned);
+    assert(notification_cloned);
+
+    notification_free(notification_cloned);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of notification_free()
+ */
+int utc_notification_free_n(void)
+{
+    int ret = 0;
+
+    ret = notification_free(NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_free()
+ */
+int utc_notification_free_p(void)
+{
+    int ret = 0;
+    notification_h notification = NULL;
+
+    notification = notification_create(NOTIFICATION_TYPE_ONGOING);
+
+    assert(notification);
+
+    ret = notification_free(notification);
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+
+
+static void _message_callback(const char *message, void *data)
+{
+}
+
+/**
+ * @brief Negative test case of notification_status_message_post()
+ */
+int utc_notification_status_message_post_n(void)
+{
+    int ret;
+
+    ret = notification_status_message_post(NULL);
+
+    assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of notification_status_message_post()
+ */
+int utc_notification_status_message_post_p(void)
+{
+    int ret;
+
+    ret = notification_status_message_post("TESTKIT-P");
+
+    assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+    return 0;
+}
+
+
+
+static void _result_cb(int priv_id, int result, void *data)
+{
+    // do nothing
+}
+
+
+
+/**
+ * @brief Negative test case of notification_set_tag()
+ */
+int utc_notification_set_tag_n(void)
+{
+       int ret = 0;
+       notification_h notification = NULL;
+
+       ret = notification_set_tag(notification, TEST_TEXT);
+
+       assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_tag()
+ */
+int utc_notification_set_tag_p(void)
+{
+       int ret = 0;
+       notification_h notification = NULL;
+
+       notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       assert(notification);
+
+       ret = notification_set_tag(notification, TEST_TEXT);
+
+       assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_tag()
+ */
+int utc_notification_get_tag_n(void)
+{
+       int ret = 0;
+       notification_h notification = NULL;
+       const char *tag = NULL;
+
+       ret = notification_get_tag(notification, &tag);
+
+       assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_tag()
+ */
+int utc_notification_get_tag_1_p(void)
+{
+       int ret = 0;
+       notification_h notification = NULL;
+       const char *tag = NULL;
+
+       notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       assert(notification);
+
+       notification_set_tag(notification, TEST_TEXT);
+
+       ret = notification_get_tag(notification, &tag);
+
+       assert_neq(tag, NULL);
+       assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_tag()
+ */
+int utc_notification_get_tag_2_p(void)
+{
+       int ret = 0;
+       notification_h notification = NULL;
+       const char *tag = NULL;
+
+       notification = notification_load_by_tag(TEST_TEXT);
+
+       assert(notification);
+
+       ret = notification_get_tag(notification, &tag);
+
+       assert_eq(strcmp(tag, TEST_TEXT), 0);
+       assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of notification_load_by_tag()
+ */
+int utc_notification_load_by_tag_n(void)
+{
+       notification_h notification = NULL;
+
+       notification = notification_load_by_tag(NULL);
+
+       assert(!notification);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of notification_load_by_tag()
+ */
+int utc_notification_load_by_tag_p(void)
+{
+       notification_h notification = NULL;
+
+       notification = notification_load_by_tag(TEST_TEXT);
+
+       assert(notification);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of notification_delete_all()
+ */
+int utc_notification_delete_all_p(void)
+{
+       int ret = 0;
+
+       ret = notification_delete_all(NOTIFICATION_TYPE_NOTI);
+
+       assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of notification_post()
+ */
+int utc_notification_post_n(void)
+{
+       int ret = 0;
+       notification_h notification = NULL;
+
+       notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       assert(notification);
+
+       notification_set_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, TEST_TEXT, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+
+       ret = notification_post(NULL);
+
+       assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of notification_post()
+ */
+int utc_notification_post_p(void)
+{
+       int ret = 0;
+       notification_h notification = NULL;
+
+       notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       assert(notification);
+
+       notification_set_text(notification, NOTIFICATION_TEXT_TYPE_TITLE, TEST_TEXT, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+
+       ret = notification_post(notification);
+
+       assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of notification_set_launch()
+ */
+int utc_notification_set_launch_option_n(void)
+{
+       int ret = 0;
+
+       ret = notification_set_launch_option(NULL, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, NULL);
+
+       assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of notification_set_launch_option()
+ */
+int utc_notification_set_launch_option_p(void)
+{
+       int ret = 0;
+       notification_h notification = NULL;
+       app_control_h app_control = NULL;
+       bundle *b = NULL;
+
+       app_control_create(&app_control);
+       app_control_set_app_id(app_control, TEST_APP);
+       //Invalid parameter test
+       notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       assert(notification);
+
+       ret = notification_set_launch_option(notification, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, app_control);
+       app_control_destroy(app_control);
+
+       assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of notification_get_launch_option()
+ */
+int utc_notification_get_launch_option_n(void)
+{
+       int ret = 0;
+       app_control_h app_control = NULL;
+
+       ret = notification_get_launch_option(NULL, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, NULL);
+
+       assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Positive test case of notification_get_launch_option()
+ */
+int utc_notification_get_launch_option_p(void)
+{
+       int ret = 0;
+       notification_h notification = NULL;
+       app_control_h app_control = NULL;
+
+       app_control_create(&app_control);
+       app_control_set_app_id(app_control, TEST_APP);
+       notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       assert(notification);
+
+       ret = notification_set_launch_option(notification, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, app_control);
+       app_control_destroy(app_control);
+       app_control = NULL;
+
+       ret = notification_get_launch_option(notification, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, &app_control);
+       notification_free(notification);
+
+       assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+       return 0;
+}
diff --git a/src/utc/package-manager/CMakeLists.txt b/src/utc/package-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..b37db4c
--- /dev/null
@@ -0,0 +1,67 @@
+SET(PKG_NAME "package-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-appfw-package-manager")
+SET(TC_SOURCES
+       utc-ApplicationFW-package-info-clone.c
+       utc-ApplicationFW-package-info-create.c
+       utc-ApplicationFW-package-info-destroy.c
+       utc-ApplicationFW-package-info-foreach-app-from-package.c
+       utc-ApplicationFW-package-info-foreach-cert-info.c
+       utc-ApplicationFW-package-info-foreach-privilege-info.c
+       utc-ApplicationFW-package-info-get-icon.c
+       utc-ApplicationFW-package-info-get-installed-storage.c
+       utc-ApplicationFW-package-info-get-label.c
+       utc-ApplicationFW-package-info-get-package.c
+       utc-ApplicationFW-package-info-get-root-path.c
+       utc-ApplicationFW-package-info-get-type.c
+       utc-ApplicationFW-package-info-get-version.c
+       utc-ApplicationFW-package-info-is-accessible.c
+       utc-ApplicationFW-package-info-is-equal.c
+       utc-ApplicationFW-package-info-is-preload-package.c
+       utc-ApplicationFW-package-info-is-removable-package.c
+       utc-ApplicationFW-package-info-is-system-package.c
+       utc-ApplicationFW-package-manager-compare-app-cert-info.c
+       utc-ApplicationFW-package-manager-compare-package-cert-info.c
+       utc-ApplicationFW-package-manager-create.c
+       utc-ApplicationFW-package-manager-destroy.c
+       utc-ApplicationFW-package-manager-foreach-package-info.c
+       utc-ApplicationFW-package-manager-get-package-id-by-app-id.c
+       utc-ApplicationFW-package-manager-get-package-info.c
+       utc-ApplicationFW-package-manager-get-permission-type.c
+       utc-ApplicationFW-package-manager-is-preload-package-by-app-id.c
+       utc-ApplicationFW-package-manager-set-event-cb.c
+       utc-ApplicationFW-package-manager-set-event-status.c
+       utc-ApplicationFW-package-manager-unset-event-cb.c
+       utc-ApplicationFW-package-manager-filter-create.c
+       utc-ApplicationFW-package-manager-filter-add-bool.c
+       utc-ApplicationFW-package-manager-filter-count.c
+       utc-ApplicationFW-package-manager-filter-foreach-package-info.c
+       utc-ApplicationFW-package-manager-filter-destroy.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/package-manager/platform.list b/src/utc/package-manager/platform.list
new file mode 100755 (executable)
index 0000000..0248d81
--- /dev/null
@@ -0,0 +1,3 @@
+package_manager_request_install
+package_manager_request_move
+package_manager_request_uninstall
\ No newline at end of file
diff --git a/src/utc/package-manager/public.list b/src/utc/package-manager/public.list
new file mode 100755 (executable)
index 0000000..c7bb500
--- /dev/null
@@ -0,0 +1,36 @@
+package_info_clone
+package_info_create
+package_info_destroy
+package_info_foreach_app_from_package
+package_info_foreach_cert_info
+package_info_get_icon
+package_info_get_installed_storage
+package_info_get_label
+package_info_get_package
+package_info_get_root_path
+package_info_get_type
+package_info_get_version
+package_info_is_accessible
+package_info_is_equal
+package_info_is_preload_package
+package_info_is_removable_package
+package_info_is_system_package
+package_manager_compare_app_cert_info
+package_manager_compare_package_cert_info
+package_manager_create
+package_manager_destroy
+package_manager_filter_add_bool
+package_manager_filter_count
+package_manager_filter_create
+package_manager_filter_destroy
+package_manager_filter_foreach_package_info
+package_manager_foreach_package_info
+package_manager_get_package_id_by_app_id
+package_manager_get_package_info
+package_manager_get_permission_type
+package_manager_is_preload_package_by_app_id
+package_manager_set_event_cb
+package_manager_set_event_status
+package_manager_unset_event_cb
+package_info_foreach_privilege_info
+
diff --git a/src/utc/package-manager/res/org.tizen.helloworld-1.0.0-arm.tpk b/src/utc/package-manager/res/org.tizen.helloworld-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..4ff7e82
Binary files /dev/null and b/src/utc/package-manager/res/org.tizen.helloworld-1.0.0-arm.tpk differ
diff --git a/src/utc/package-manager/res/org.tizen.helloworld-1.0.0-i386.tpk b/src/utc/package-manager/res/org.tizen.helloworld-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..1da0b57
Binary files /dev/null and b/src/utc/package-manager/res/org.tizen.helloworld-1.0.0-i386.tpk differ
diff --git a/src/utc/package-manager/res/org.tizen.helloworld2-1.0.0-arm.tpk b/src/utc/package-manager/res/org.tizen.helloworld2-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..b954899
Binary files /dev/null and b/src/utc/package-manager/res/org.tizen.helloworld2-1.0.0-arm.tpk differ
diff --git a/src/utc/package-manager/res/org.tizen.helloworld2-1.0.0-i386.tpk b/src/utc/package-manager/res/org.tizen.helloworld2-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..945bd0f
Binary files /dev/null and b/src/utc/package-manager/res/org.tizen.helloworld2-1.0.0-i386.tpk differ
diff --git a/src/utc/package-manager/res/org.tizen.helloworld3-1.0.0-arm.tpk b/src/utc/package-manager/res/org.tizen.helloworld3-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..3dda624
Binary files /dev/null and b/src/utc/package-manager/res/org.tizen.helloworld3-1.0.0-arm.tpk differ
diff --git a/src/utc/package-manager/res/org.tizen.helloworld3-1.0.0-i386.tpk b/src/utc/package-manager/res/org.tizen.helloworld3-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..156da36
Binary files /dev/null and b/src/utc/package-manager/res/org.tizen.helloworld3-1.0.0-i386.tpk differ
diff --git a/src/utc/package-manager/tct-package-manager-core.c b/src/utc/package-manager/tct-package-manager-core.c
new file mode 100755 (executable)
index 0000000..d9d08da
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-package-manager-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/package-manager/tct-package-manager-core.h b/src/utc/package-manager/tct-package-manager-core.h
new file mode 100755 (executable)
index 0000000..4c0610a
--- /dev/null
@@ -0,0 +1,174 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_PACKAGE_MANAGER_CORE_H__
+#define __TCT_PACKAGE_MANAGER_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_package_manager_filter_add_bool_cleanup(void);
+extern void utc_package_manager_filter_count_cleanup(void);
+extern void utc_package_manager_filter_foreach_cleanup(void);
+
+extern int utc_package_manager_package_info_clone_p(void);
+extern int utc_package_manager_package_info_clone_n(void);
+extern int utc_ApplicationFW_package_info_create_p(void);
+extern int utc_ApplicationFW_package_info_create_n(void);
+extern int utc_package_manager_package_info_destroy_p(void);
+extern int utc_package_manager_package_info_destroy_n(void);
+extern int utc_package_manager_package_info_foreach_app_from_package_p(void);
+extern int utc_package_manager_package_info_foreach_app_from_package_n(void);
+extern int utc_package_manager_package_info_foreach_cert_info_p(void);
+extern int utc_package_manager_package_info_foreach_cert_info_n(void);
+extern int utc_package_manager_package_info_foreach_privilege_info_p(void);
+extern int utc_package_manager_package_info_foreach_privilege_info_n(void);
+extern int utc_package_manager_package_info_get_icon_p(void);
+extern int utc_package_manager_package_info_get_icon_n(void);
+extern int utc_package_manager_package_info_get_installed_storage_p(void);
+extern int utc_package_manager_package_info_get_installed_storage_n(void);
+extern int utc_package_manager_package_info_get_label_p(void);
+extern int utc_package_manager_package_info_get_label_n(void);
+extern int utc_package_manager_package_info_get_package_p(void);
+extern int utc_package_manager_package_info_get_package_n(void);
+extern int utc_package_manager_package_info_get_root_path_p(void);
+extern int utc_package_manager_package_info_get_root_path_n(void);
+extern int utc_package_manager_package_info_get_type_p(void);
+extern int utc_package_manager_package_info_get_type_n(void);
+extern int utc_package_manager_package_info_get_version_p(void);
+extern int utc_package_manager_package_info_get_version_n(void);
+extern int utc_package_managerpackage_info_is_accessible_p(void);
+extern int utc_package_managerpackage_info_is_accessible_n(void);
+extern int utc_package_manager_package_info_is_equal_p(void);
+extern int utc_package_manager_package_info_is_equal_n(void);
+extern int utc_package_manager_package_info_is_preload_package_p(void);
+extern int utc_package_manager_package_info_is_preload_package_n(void);
+extern int utc_package_manager_package_info_is_removable_package_p(void);
+extern int utc_package_manager_package_info_is_removable_package_n(void);
+extern int utc_package_manager_package_info_is_system_package_p(void);
+extern int utc_package_manager_package_info_is_system_package_n(void);
+extern int utc_ApplicationFW_package_manager_compare_app_cert_info_p(void);
+extern int utc_ApplicationFW_package_manager_compare_app_cert_info_n(void);
+extern int utc_ApplicationFW_package_manager_compare_package_cert_info_p(void);
+extern int utc_ApplicationFW_package_manager_compare_package_cert_info_n(void);
+extern int utc_ApplicationFW_package_manager_create_p(void);
+extern int utc_ApplicationFW_package_manager_create_n(void);
+extern int utc_ApplicationFW_package_manager_destroy_p(void);
+extern int utc_ApplicationFW_package_manager_destroy_n(void);
+extern int utc_ApplicationFW_package_manager_foreach_package_info_p(void);
+extern int utc_ApplicationFW_package_manager_foreach_package_info_n(void);
+extern int utc_ApplicationFW_package_manager_get_package_id_by_app_id_p(void);
+extern int utc_ApplicationFW_package_manager_get_package_id_by_app_id_n(void);
+extern int utc_ApplicationFW_package_manager_get_package_info_p(void);
+extern int utc_ApplicationFW_package_manager_get_package_info_n(void);
+extern int utc_ApplicationFW_package_manager_get_permission_type_p(void);
+extern int utc_ApplicationFW_package_manager_get_permission_type_n(void);
+extern int utc_ApplicationFW_package_manager_is_preload_package_by_app_id_p(void);
+extern int utc_ApplicationFW_package_manager_is_preload_package_by_app_id_n(void);
+extern int utc_ApplicationFW_package_manager_set_event_cb_p(void);
+extern int utc_ApplicationFW_package_manager_set_event_cb_n(void);
+extern int utc_ApplicationFW_package_manager_set_event_status_p(void);
+extern int utc_ApplicationFW_package_manager_set_event_status_n(void);
+extern int utc_ApplicationFW_package_manager_unset_event_cb_p(void);
+extern int utc_ApplicationFW_package_manager_unset_event_cb_n(void);
+extern int utc_package_manager_package_manager_filter_create_p(void);
+extern int utc_package_manager_package_manager_filter_create_n(void);
+extern int utc_package_manager_package_manager_filter_add_bool_p(void);
+extern int utc_package_manager_package_manager_filter_add_bool_n1(void);
+extern int utc_package_manager_package_manager_filter_add_bool_n2(void);
+extern int utc_package_manager_package_manager_filter_count_p(void);
+extern int utc_package_manager_package_manager_filter_count_n1(void);
+extern int utc_package_manager_package_manager_filter_count_n2(void);
+extern int utc_package_manager_package_manager_filter_foreach_package_info_p(void);
+extern int utc_package_manager_package_manager_filter_foreach_package_info_n(void);
+extern int utc_package_manager_package_manager_filter_destroy_p(void);
+extern int utc_package_manager_package_manager_filter_destroy_n(void);
+
+testcase tc_array[] = {
+    {"utc_package_manager_package_info_clone_p", utc_package_manager_package_info_clone_p, NULL, NULL},
+    {"utc_package_manager_package_info_clone_n", utc_package_manager_package_info_clone_n, NULL, NULL},
+    {"utc_ApplicationFW_package_info_create_p", utc_ApplicationFW_package_info_create_p, NULL, NULL},
+    {"utc_ApplicationFW_package_info_create_n", utc_ApplicationFW_package_info_create_n, NULL, NULL},
+    {"utc_package_manager_package_info_destroy_p", utc_package_manager_package_info_destroy_p, NULL, NULL},
+    {"utc_package_manager_package_info_destroy_n", utc_package_manager_package_info_destroy_n, NULL, NULL},
+    {"utc_package_manager_package_info_foreach_app_from_package_p", utc_package_manager_package_info_foreach_app_from_package_p, NULL, NULL},
+    {"utc_package_manager_package_info_foreach_app_from_package_n", utc_package_manager_package_info_foreach_app_from_package_n, NULL, NULL},
+    {"utc_package_manager_package_info_foreach_cert_info_p", utc_package_manager_package_info_foreach_cert_info_p, NULL, NULL},
+    {"utc_package_manager_package_info_foreach_cert_info_n", utc_package_manager_package_info_foreach_cert_info_n, NULL, NULL},
+    {"utc_package_manager_package_info_foreach_privilege_info_p", utc_package_manager_package_info_foreach_privilege_info_p, NULL, NULL},
+    {"utc_package_manager_package_info_foreach_privilege_info_n", utc_package_manager_package_info_foreach_privilege_info_n, NULL, NULL},
+    {"utc_package_manager_package_info_get_icon_p", utc_package_manager_package_info_get_icon_p, NULL, NULL},
+    {"utc_package_manager_package_info_get_icon_n", utc_package_manager_package_info_get_icon_n, NULL, NULL},
+    {"utc_package_manager_package_info_get_installed_storage_p", utc_package_manager_package_info_get_installed_storage_p, NULL, NULL},
+    {"utc_package_manager_package_info_get_installed_storage_n", utc_package_manager_package_info_get_installed_storage_n, NULL, NULL},
+    {"utc_package_manager_package_info_get_label_p", utc_package_manager_package_info_get_label_p, NULL, NULL},
+    {"utc_package_manager_package_info_get_label_n", utc_package_manager_package_info_get_label_n, NULL, NULL},
+    {"utc_package_manager_package_info_get_package_p", utc_package_manager_package_info_get_package_p, NULL, NULL},
+    {"utc_package_manager_package_info_get_package_n", utc_package_manager_package_info_get_package_n, NULL, NULL},
+    {"utc_package_manager_package_info_get_root_path_p", utc_package_manager_package_info_get_root_path_p, NULL, NULL},
+    {"utc_package_manager_package_info_get_root_path_n", utc_package_manager_package_info_get_root_path_n, NULL, NULL},
+    {"utc_package_manager_package_info_get_type_p", utc_package_manager_package_info_get_type_p, NULL, NULL},
+    {"utc_package_manager_package_info_get_type_n", utc_package_manager_package_info_get_type_n, NULL, NULL},
+    {"utc_package_manager_package_info_get_version_p", utc_package_manager_package_info_get_version_p, NULL, NULL},
+    {"utc_package_manager_package_info_get_version_n", utc_package_manager_package_info_get_version_n, NULL, NULL},
+    {"utc_package_managerpackage_info_is_accessible_p", utc_package_managerpackage_info_is_accessible_p, NULL, NULL},
+    {"utc_package_managerpackage_info_is_accessible_n", utc_package_managerpackage_info_is_accessible_n, NULL, NULL},
+    {"utc_package_manager_package_info_is_equal_p", utc_package_manager_package_info_is_equal_p, NULL, NULL},
+    {"utc_package_manager_package_info_is_equal_n", utc_package_manager_package_info_is_equal_n, NULL, NULL},
+    {"utc_package_manager_package_info_is_preload_package_p", utc_package_manager_package_info_is_preload_package_p, NULL, NULL},
+    {"utc_package_manager_package_info_is_preload_package_n", utc_package_manager_package_info_is_preload_package_n, NULL, NULL},
+    {"utc_package_manager_package_info_is_removable_package_p", utc_package_manager_package_info_is_removable_package_p, NULL, NULL},
+    {"utc_package_manager_package_info_is_removable_package_n", utc_package_manager_package_info_is_removable_package_n, NULL, NULL},
+    {"utc_package_manager_package_info_is_system_package_p", utc_package_manager_package_info_is_system_package_p, NULL, NULL},
+    {"utc_package_manager_package_info_is_system_package_n", utc_package_manager_package_info_is_system_package_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_compare_app_cert_info_p", utc_ApplicationFW_package_manager_compare_app_cert_info_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_compare_app_cert_info_n", utc_ApplicationFW_package_manager_compare_app_cert_info_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_compare_package_cert_info_p", utc_ApplicationFW_package_manager_compare_package_cert_info_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_compare_package_cert_info_n", utc_ApplicationFW_package_manager_compare_package_cert_info_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_create_p", utc_ApplicationFW_package_manager_create_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_create_n", utc_ApplicationFW_package_manager_create_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_destroy_p", utc_ApplicationFW_package_manager_destroy_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_destroy_n", utc_ApplicationFW_package_manager_destroy_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_foreach_package_info_p", utc_ApplicationFW_package_manager_foreach_package_info_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_foreach_package_info_n", utc_ApplicationFW_package_manager_foreach_package_info_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_get_package_id_by_app_id_p", utc_ApplicationFW_package_manager_get_package_id_by_app_id_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_get_package_id_by_app_id_n", utc_ApplicationFW_package_manager_get_package_id_by_app_id_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_get_package_info_p", utc_ApplicationFW_package_manager_get_package_info_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_get_package_info_n", utc_ApplicationFW_package_manager_get_package_info_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_get_permission_type_p", utc_ApplicationFW_package_manager_get_permission_type_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_get_permission_type_n", utc_ApplicationFW_package_manager_get_permission_type_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_is_preload_package_by_app_id_p", utc_ApplicationFW_package_manager_is_preload_package_by_app_id_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_is_preload_package_by_app_id_n", utc_ApplicationFW_package_manager_is_preload_package_by_app_id_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_set_event_cb_p", utc_ApplicationFW_package_manager_set_event_cb_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_set_event_cb_n", utc_ApplicationFW_package_manager_set_event_cb_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_set_event_status_p", utc_ApplicationFW_package_manager_set_event_status_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_set_event_status_n", utc_ApplicationFW_package_manager_set_event_status_n, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_unset_event_cb_p", utc_ApplicationFW_package_manager_unset_event_cb_p, NULL, NULL},
+    {"utc_ApplicationFW_package_manager_unset_event_cb_n", utc_ApplicationFW_package_manager_unset_event_cb_n, NULL, NULL},
+    {"utc_package_manager_package_manager_filter_create_p", utc_package_manager_package_manager_filter_create_p, NULL, NULL},
+    {"utc_package_manager_package_manager_filter_create_n", utc_package_manager_package_manager_filter_create_n, NULL, NULL},
+    {"utc_package_manager_package_manager_filter_add_bool_p", utc_package_manager_package_manager_filter_add_bool_p, NULL, utc_package_manager_filter_add_bool_cleanup},
+    {"utc_package_manager_package_manager_filter_add_bool_n1", utc_package_manager_package_manager_filter_add_bool_n1, NULL, utc_package_manager_filter_add_bool_cleanup},
+    {"utc_package_manager_package_manager_filter_add_bool_n2", utc_package_manager_package_manager_filter_add_bool_n2, NULL, utc_package_manager_filter_add_bool_cleanup},
+    {"utc_package_manager_package_manager_filter_count_p", utc_package_manager_package_manager_filter_count_p, NULL, utc_package_manager_filter_count_cleanup},
+    {"utc_package_manager_package_manager_filter_count_n1", utc_package_manager_package_manager_filter_count_n1, NULL, utc_package_manager_filter_count_cleanup},
+    {"utc_package_manager_package_manager_filter_count_n2", utc_package_manager_package_manager_filter_count_n2, NULL, utc_package_manager_filter_count_cleanup},
+    {"utc_package_manager_package_manager_filter_foreach_package_info_p", utc_package_manager_package_manager_filter_foreach_package_info_p, NULL, utc_package_manager_filter_foreach_cleanup},
+    {"utc_package_manager_package_manager_filter_foreach_package_info_n", utc_package_manager_package_manager_filter_foreach_package_info_n, NULL, utc_package_manager_filter_foreach_cleanup},
+    {"utc_package_manager_package_manager_filter_destroy_p", utc_package_manager_package_manager_filter_destroy_p, NULL, NULL},
+    {"utc_package_manager_package_manager_filter_destroy_n", utc_package_manager_package_manager_filter_destroy_n, NULL, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_PACKAGE_MANAGER_CORE_H__
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-clone.c b/src/utc/package-manager/utc-ApplicationFW-package-info-clone.c
new file mode 100755 (executable)
index 0000000..b3b0a0e
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoClone
+
+/**
+ * @brief Positive test case of package_info_clone()
+ */
+int utc_package_manager_package_info_clone_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    package_info_h clone_info = NULL;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_clone(&clone_info, package_info);
+    package_info_destroy(package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_clone()
+ */
+int utc_package_manager_package_info_clone_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    package_info_h clone_info = NULL;
+
+    ret = package_info_clone(&clone_info, package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-create.c b/src/utc/package-manager/utc-ApplicationFW-package-info-create.c
new file mode 100755 (executable)
index 0000000..0ebe5cd
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoCreate
+
+/**
+ * @brief Positive test case of package_info_create()
+ */
+int utc_ApplicationFW_package_info_create_p(void)
+{
+    int ret = PACKAGE_MANAGER_ERROR_NONE;
+    package_info_h package_info = NULL;
+    const char *pkgid = "org.tizen.helloworld2";
+
+    ret = package_info_create(pkgid, &package_info);
+    package_info_destroy(package_info);
+    package_info = NULL;
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_create()
+ */
+int utc_ApplicationFW_package_info_create_n(void)
+{
+    int ret = PACKAGE_MANAGER_ERROR_NONE;
+    package_info_h package_info = NULL;
+    const char *pkgid = NULL;
+
+    ret = package_info_create(pkgid, &package_info);
+    package_info_destroy(package_info);
+    package_info = NULL;
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-destroy.c b/src/utc/package-manager/utc-ApplicationFW-package-info-destroy.c
new file mode 100755 (executable)
index 0000000..c7f038c
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoDestroy
+
+/**
+ * @brief Positive test case of package_info_destroy()
+ */
+int utc_package_manager_package_info_destroy_p(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    const char *pkgid = "org.tizen.helloworld2";
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_destroy(package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_destroy()
+ */
+int utc_package_manager_package_info_destroy_n(void)
+{
+    int ret = 0;
+
+    ret = package_info_destroy(NULL);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-foreach-app-from-package.c b/src/utc/package-manager/utc-ApplicationFW-package-info-foreach-app-from-package.c
new file mode 100755 (executable)
index 0000000..e7ec2f1
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoForeachAppFromPackage
+
+static bool info_cb(package_info_app_component_type_e comp_type, const char *app_id, void *user_data)
+{
+    return false;
+}
+/**
+ * @brief Positive test case of package_info_foreach_app_from_package()
+ */
+int utc_package_manager_package_info_foreach_app_from_package_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_foreach_app_from_package(package_info, PACKAGE_INFO_UIAPP, info_cb, NULL);
+    package_info_destroy(package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_foreach_app_from_package()
+ */
+int utc_package_manager_package_info_foreach_app_from_package_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+
+    ret = package_info_foreach_app_from_package(package_info, PACKAGE_INFO_UIAPP, info_cb, NULL);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-foreach-cert-info.c b/src/utc/package-manager/utc-ApplicationFW-package-info-foreach-cert-info.c
new file mode 100755 (executable)
index 0000000..8252774
--- /dev/null
@@ -0,0 +1,56 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoForeachCertInfo
+
+static bool info_cb(package_info_h handle, package_cert_type_e cert_type, const char *cert_value, void *user_data)
+{
+    return false;
+}
+
+/**
+ * @brief Positive test case of package_info_foreach_cert_info()
+ */
+int utc_package_manager_package_info_foreach_cert_info_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_foreach_cert_info(package_info, info_cb, NULL);
+    package_info_destroy(package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_foreach_cert_info()
+ */
+int utc_package_manager_package_info_foreach_cert_info_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+
+    ret = package_info_foreach_cert_info(package_info, info_cb, NULL);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-foreach-privilege-info.c b/src/utc/package-manager/utc-ApplicationFW-package-info-foreach-privilege-info.c
new file mode 100755 (executable)
index 0000000..d482ef5
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoForeachPrivilegeInfo
+
+static bool privilege_cb(const char *privilege_name, void *user_data)
+{
+    return true;
+}
+/**
+ * @brief Positive test case of package_info_foreach_privilege_info()
+ */
+int utc_package_manager_package_info_foreach_privilege_info_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_foreach_privilege_info(package_info, privilege_cb, NULL);
+    package_info_destroy(package_info);
+    assert_eq(ret, 0);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_foreach_privilege_info()
+ */
+int utc_package_manager_package_info_foreach_privilege_info_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+
+    ret = package_info_foreach_privilege_info(package_info, privilege_cb, NULL);
+    assert_neq(ret, 0);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-get-icon.c b/src/utc/package-manager/utc-ApplicationFW-package-info-get-icon.c
new file mode 100755 (executable)
index 0000000..a90860d
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoGetIcon
+
+/**
+ * @brief Positive test case of package_info_get_icon()
+ */
+int utc_package_manager_package_info_get_icon_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_get_icon(package_info, &info);
+    package_info_destroy(package_info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_get_icon()
+ */
+int utc_package_manager_package_info_get_icon_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    ret = package_info_get_icon(package_info, &info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-get-installed-storage.c b/src/utc/package-manager/utc-ApplicationFW-package-info-get-installed-storage.c
new file mode 100755 (executable)
index 0000000..ae351ac
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoGetInstalledStorage
+
+/**
+ * @brief Positive test case of package_info_get_installed_storage()
+ */
+int utc_package_manager_package_info_get_installed_storage_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    package_info_installed_storage_type_e info = -1;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_get_installed_storage(package_info, &info);
+    package_info_destroy(package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_get_installed_storage()
+ */
+int utc_package_manager_package_info_get_installed_storage_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    package_info_installed_storage_type_e info;
+
+    ret = package_info_get_installed_storage(package_info, &info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-get-label.c b/src/utc/package-manager/utc-ApplicationFW-package-info-get-label.c
new file mode 100755 (executable)
index 0000000..658c4b3
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoGetLabel
+
+/**
+ * @brief Positive test case of package_info_get_label()
+ */
+int utc_package_manager_package_info_get_label_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_get_label(package_info, &info);
+    package_info_destroy(package_info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_get_label()
+ */
+int utc_package_manager_package_info_get_label_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    ret = package_info_get_label(package_info, &info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-get-package.c b/src/utc/package-manager/utc-ApplicationFW-package-info-get-package.c
new file mode 100755 (executable)
index 0000000..39774e2
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoGetPackage
+
+/**
+ * @brief Positive test case of package_info_get_package()
+ */
+int utc_package_manager_package_info_get_package_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_get_package(package_info, &info);
+    package_info_destroy(package_info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_get_package()
+ */
+int utc_package_manager_package_info_get_package_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    ret = package_info_get_package(package_info, &info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-get-root-path.c b/src/utc/package-manager/utc-ApplicationFW-package-info-get-root-path.c
new file mode 100755 (executable)
index 0000000..fe5b6a8
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoGetRootPath
+
+/**
+ * @brief Positive test case of package_info_get_root_path()
+ */
+int utc_package_manager_package_info_get_root_path_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_get_root_path(package_info, &info);
+    package_info_destroy(package_info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_get_root_path()
+ */
+int utc_package_manager_package_info_get_root_path_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    ret = package_info_get_root_path(package_info, &info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-get-type.c b/src/utc/package-manager/utc-ApplicationFW-package-info-get-type.c
new file mode 100755 (executable)
index 0000000..20097d5
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoGetType
+
+/**
+ * @brief Positive test case of package_info_get_type()
+ */
+int utc_package_manager_package_info_get_type_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_get_type(package_info, &info);
+    package_info_destroy(package_info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_get_type()
+ */
+int utc_package_manager_package_info_get_type_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    ret = package_info_get_type(package_info, &info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-get-version.c b/src/utc/package-manager/utc-ApplicationFW-package-info-get-version.c
new file mode 100755 (executable)
index 0000000..41dca61
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoGetVersion
+
+/**
+ * @brief Positive test case of package_info_get_version()
+ */
+int utc_package_manager_package_info_get_version_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_get_version(package_info, &info);
+    package_info_destroy(package_info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_get_version()
+ */
+int utc_package_manager_package_info_get_version_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    char *info = NULL;
+
+    ret = package_info_get_version(package_info, &info);
+    free (info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-is-accessible.c b/src/utc/package-manager/utc-ApplicationFW-package-info-is-accessible.c
new file mode 100755 (executable)
index 0000000..601d569
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoIsAccessible
+
+/**
+ * @brief Positive test case of package_info_is_accessible()
+ */
+int utc_package_managerpackage_info_is_accessible_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    bool info;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_is_accessible(package_info, &info);
+    package_info_destroy(package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_is_accessible()
+ */
+int utc_package_managerpackage_info_is_accessible_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    bool info;
+
+    ret = package_info_is_accessible(package_info, &info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-is-equal.c b/src/utc/package-manager/utc-ApplicationFW-package-info-is-equal.c
new file mode 100755 (executable)
index 0000000..e5b1f31
--- /dev/null
@@ -0,0 +1,65 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoIsEqual
+
+/**
+ * @brief Positive test case of package_info_is_equal()
+ */
+int utc_package_manager_package_info_is_equal_p(void)
+{
+    int ret = 0;
+    const char *lpkgid = "org.tizen.helloworld2";
+    const char *rpkgid = "org.tizen.helloworld2";
+    bool info;
+    package_info_h lpackage_info = NULL;
+    package_info_h rpackage_info = NULL;
+
+    package_manager_get_package_info(lpkgid, &lpackage_info);
+    package_manager_get_package_info(rpkgid, &rpackage_info);
+
+    ret = package_info_is_equal(lpackage_info, rpackage_info, &info);
+    package_info_destroy(lpackage_info);
+    package_info_destroy(rpackage_info);
+    assert_eq(info, true);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_is_equal()
+ */
+int utc_package_manager_package_info_is_equal_n(void)
+{
+    int ret = 0;
+    const char *lpkgid = "org.tizen.helloworld2";
+    const char *rpkgid = NULL;
+    bool info;
+    package_info_h lpackage_info = NULL;
+    package_info_h rpackage_info = NULL;
+
+    package_manager_get_package_info(lpkgid, &lpackage_info);
+    package_manager_get_package_info(rpkgid, &rpackage_info);
+
+    ret = package_info_is_equal(lpackage_info, rpackage_info, &info);
+    package_info_destroy(lpackage_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-is-preload-package.c b/src/utc/package-manager/utc-ApplicationFW-package-info-is-preload-package.c
new file mode 100755 (executable)
index 0000000..57c6fae
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoIsPreloadPackage
+
+/**
+ * @brief Positive test case of package_info_is_preload_package()
+ */
+int utc_package_manager_package_info_is_preload_package_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    bool info;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_is_preload_package(package_info, &info);
+    package_info_destroy(package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_is_preload_package()
+ */
+int utc_package_manager_package_info_is_preload_package_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    bool info;
+
+    ret = package_info_is_preload_package(package_info, &info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-is-removable-package.c b/src/utc/package-manager/utc-ApplicationFW-package-info-is-removable-package.c
new file mode 100755 (executable)
index 0000000..2e06a56
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoIsRemovablePackage
+
+/**
+ * @brief Positive test case of package_info_is_removable_package()
+ */
+int utc_package_manager_package_info_is_removable_package_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    bool info;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_is_removable_package(package_info, &info);
+    package_info_destroy(package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_is_removable_package()
+ */
+int utc_package_manager_package_info_is_removable_package_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    bool info;
+
+    ret = package_info_is_removable_package(package_info, &info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-info-is-system-package.c b/src/utc/package-manager/utc-ApplicationFW-package-info-is-system-package.c
new file mode 100755 (executable)
index 0000000..9f9877a
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageInfoIsSystemPackage
+
+/**
+ * @brief Positive test case of package_info_is_system_package()
+ */
+int utc_package_manager_package_info_is_system_package_p(void)
+{
+    int ret = 0;
+    const char *pkgid = "org.tizen.helloworld2";
+    package_info_h package_info = NULL;
+    bool info;
+
+    package_manager_get_package_info(pkgid, &package_info);
+
+    ret = package_info_is_system_package(package_info, &info);
+    package_info_destroy(package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_info_is_system_package()
+ */
+int utc_package_manager_package_info_is_system_package_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    bool info;
+
+    ret = package_info_is_system_package(package_info, &info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-compare-app-cert-info.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-compare-app-cert-info.c
new file mode 100755 (executable)
index 0000000..cb049a4
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageManagerCompareAppCertInfo
+
+/**
+ * @brief Positive test case of package_manager_compare_app_cert_info()
+ */
+int utc_ApplicationFW_package_manager_compare_app_cert_info_p(void)
+{
+    int ret = 0;
+    const char *lhs_app_id = "org.tizen.helloworld2";
+    const char *rhs_app_id = "org.tizen.helloworld3";
+    package_manager_compare_result_type_e compare_result = -1;
+
+    ret = package_manager_compare_app_cert_info(lhs_app_id, rhs_app_id, &compare_result);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_compare_app_cert_info()
+ */
+int utc_ApplicationFW_package_manager_compare_app_cert_info_n(void)
+{
+    int ret = 0;
+    const char *lhs_app_id = "org.tizen.helloworld2";
+    const char *rhs_app_id = NULL;
+    package_manager_compare_result_type_e compare_result = -1;
+
+    ret = package_manager_compare_app_cert_info(lhs_app_id, rhs_app_id, &compare_result);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-compare-package-cert-info.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-compare-package-cert-info.c
new file mode 100755 (executable)
index 0000000..58ecece
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageCertInfo
+
+/**
+ * @brief Positive test case of package_manager_compare_package_cert_info()
+ */
+int utc_ApplicationFW_package_manager_compare_package_cert_info_p(void)
+{
+    int ret = 0;
+    const char *lhs_app_id = "org.tizen.helloworld2";
+    const char *rhs_app_id = "org.tizen.helloworld3";
+    package_manager_compare_result_type_e compare_result = -1;
+
+    ret = package_manager_compare_package_cert_info(lhs_app_id, rhs_app_id, &compare_result);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_compare_package_cert_info()
+ */
+int utc_ApplicationFW_package_manager_compare_package_cert_info_n(void)
+{
+    int ret = 0;
+    const char *lhs_app_id = "org.tizen.helloworld2";
+    const char *rhs_app_id = NULL;
+    package_manager_compare_result_type_e compare_result = -1;
+
+    ret = package_manager_compare_package_cert_info(lhs_app_id, rhs_app_id, &compare_result);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-create.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-create.c
new file mode 100755 (executable)
index 0000000..fa87cd2
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageManagerCreate
+
+/**
+ * @brief Positive test case of package_manager_create()
+ */
+int utc_ApplicationFW_package_manager_create_p(void)
+{
+    int ret = 0;
+    package_manager_h manager = NULL;
+
+    ret = package_manager_create(&manager);
+    package_manager_destroy(manager);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_create()
+ */
+int utc_ApplicationFW_package_manager_create_n(void)
+{
+    int ret = 0;
+
+    ret = package_manager_create(NULL);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-destroy.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-destroy.c
new file mode 100755 (executable)
index 0000000..4446de2
--- /dev/null
@@ -0,0 +1,48 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageManagerDestroy
+
+/**
+ * @brief Positive test case of package_manager_destroy()
+ */
+int utc_ApplicationFW_package_manager_destroy_p(void)
+{
+    int ret = 0;
+    package_manager_h manager = NULL;
+
+    package_manager_create(&manager);
+    ret = package_manager_destroy(manager);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_destroy()
+ */
+int utc_ApplicationFW_package_manager_destroy_n(void)
+{
+    int ret = 0;
+    package_manager_h manager = NULL;
+
+    ret = package_manager_destroy(manager);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-filter-add-bool.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-filter-add-bool.c
new file mode 100755 (executable)
index 0000000..bce1972
--- /dev/null
@@ -0,0 +1,74 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+static package_manager_filter_h g_filter = NULL;
+
+void utc_package_manager_filter_add_bool_cleanup(void)
+{
+       package_manager_filter_destroy(g_filter);
+}
+
+/**
+ * @brief Positive test case of package_manager_filter_add_bool()
+ */
+int utc_package_manager_package_manager_filter_add_bool_p(void)
+{
+    int ret = PACKAGE_MANAGER_ERROR_NONE;
+    package_manager_filter_h filter = NULL;
+
+    ret = package_manager_filter_create(&filter);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+       ret = package_manager_filter_add_bool(filter, PACKAGE_MANAGER_PKGINFO_PROP_PRELOAD, true);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+    ret = package_manager_filter_destroy(filter);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_filter_add_bool()
+ */
+int utc_package_manager_package_manager_filter_add_bool_n1(void)
+{
+    int ret = PACKAGE_MANAGER_ERROR_NONE;
+    package_manager_filter_h filter = NULL;
+
+       ret = package_manager_filter_add_bool(filter, PACKAGE_MANAGER_PKGINFO_PROP_PRELOAD, true);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_filter_add_bool()
+ */
+int utc_package_manager_package_manager_filter_add_bool_n2(void)
+{
+    int ret = PACKAGE_MANAGER_ERROR_NONE;
+
+       ret = package_manager_filter_create(&g_filter);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+       ret = package_manager_filter_add_bool(g_filter, NULL, true);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-filter-count.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-filter-count.c
new file mode 100755 (executable)
index 0000000..106b465
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+static package_manager_filter_h g_filter = NULL;
+
+void utc_package_manager_filter_count_cleanup(void)
+{
+       package_manager_filter_destroy(g_filter);
+}
+
+/**
+ * @brief Positive test case of package_manager_filter_count()
+ */
+int utc_package_manager_package_manager_filter_count_p(void)
+{
+       int ret = PACKAGE_MANAGER_ERROR_NONE;
+       package_manager_filter_h filter = NULL;
+       int count;
+
+       ret = package_manager_filter_create(&filter);
+       assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+       ret = package_manager_filter_add_bool(filter, PACKAGE_MANAGER_PKGINFO_PROP_PRELOAD, true);
+       assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+       ret = package_manager_filter_count(filter, &count);
+       assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+       ret = package_manager_filter_destroy(filter);
+       assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_filter_count()
+ */
+int utc_package_manager_package_manager_filter_count_n1(void)
+{
+       int ret = PACKAGE_MANAGER_ERROR_NONE;
+       package_manager_filter_h filter = NULL;
+       int count;
+
+       ret = package_manager_filter_count(filter, &count);
+       assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_filter_count()
+ */
+int utc_package_manager_package_manager_filter_count_n2(void)
+{
+       int ret = PACKAGE_MANAGER_ERROR_NONE;
+
+       ret = package_manager_filter_create(&g_filter);
+       assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+       ret = package_manager_filter_add_bool(g_filter, PACKAGE_MANAGER_PKGINFO_PROP_PRELOAD, true);
+       assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+       ret = package_manager_filter_count(g_filter, NULL);
+       assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-filter-create.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-filter-create.c
new file mode 100755 (executable)
index 0000000..d31f9d4
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+/**
+ * @brief Positive test case of package_manager_filter_create()
+ */
+int utc_package_manager_package_manager_filter_create_p(void)
+{
+    int ret = PACKAGE_MANAGER_ERROR_NONE;
+    package_manager_filter_h filter = NULL;
+
+    ret = package_manager_filter_create(&filter);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+    ret = package_manager_filter_destroy(filter);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_filter_create()
+ */
+int utc_package_manager_package_manager_filter_create_n(void)
+{
+    int ret = PACKAGE_MANAGER_ERROR_NONE;
+
+    ret = package_manager_filter_create(NULL);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-filter-destroy.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-filter-destroy.c
new file mode 100755 (executable)
index 0000000..05eeda4
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+/**
+ * @brief Positive test case of package_manager_filter_destroy()
+ */
+int utc_package_manager_package_manager_filter_destroy_p(void)
+{
+    int ret = PACKAGE_MANAGER_ERROR_NONE;
+    package_manager_filter_h filter = NULL;
+
+    ret = package_manager_filter_create(&filter);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+    ret = package_manager_filter_destroy(filter);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_filter_destroy()
+ */
+int utc_package_manager_package_manager_filter_destroy_n(void)
+{
+    int ret = PACKAGE_MANAGER_ERROR_NONE;
+
+    ret = package_manager_filter_destroy(NULL);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-filter-foreach-package-info.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-filter-foreach-package-info.c
new file mode 100755 (executable)
index 0000000..277d5f4
--- /dev/null
@@ -0,0 +1,68 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+static package_manager_filter_h g_filter = NULL;
+
+void utc_package_manager_filter_foreach_cleanup(void)
+{
+       package_manager_filter_destroy(g_filter);
+}
+
+static bool filter_cb(package_info_h package_info, void *user_data)
+{
+    return true;
+}
+
+/**
+ * @brief Positive test case of package_manager_filter_foreach_package_info()
+ */
+int utc_package_manager_package_manager_filter_foreach_package_info_p(void)
+{
+    int ret = PACKAGE_MANAGER_ERROR_NONE;
+    package_manager_filter_h filter = NULL;
+
+    ret = package_manager_filter_create(&filter);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+       ret = package_manager_filter_add_bool(filter, PACKAGE_MANAGER_PKGINFO_PROP_PRELOAD, true);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+       ret = package_manager_filter_foreach_package_info(filter, filter_cb, NULL);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+    ret = package_manager_filter_destroy(filter);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_filter_foreach_package_info()
+ */
+int utc_package_manager_package_manager_filter_foreach_package_info_n(void)
+{
+    int ret = PACKAGE_MANAGER_ERROR_NONE;
+
+       ret = package_manager_filter_create(&g_filter);
+    assert_eq(ret,PACKAGE_MANAGER_ERROR_NONE);
+
+       ret = package_manager_filter_foreach_package_info(g_filter, NULL, NULL);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-foreach-package-info.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-foreach-package-info.c
new file mode 100755 (executable)
index 0000000..7779047
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageManagerForeachPackageInfo
+
+static bool info_cb(package_info_h package_info, void *user_data)
+{
+    return false;
+}
+
+/**
+ * @brief Positive test case of package_manager_foreach_package_info()
+ */
+int utc_ApplicationFW_package_manager_foreach_package_info_p(void)
+{
+    int ret = 0;
+
+    ret = package_manager_foreach_package_info(info_cb, NULL);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_foreach_package_info()
+ */
+int utc_ApplicationFW_package_manager_foreach_package_info_n(void)
+{
+    int ret = 0;
+
+    ret = package_manager_foreach_package_info(NULL, NULL);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-get-package-id-by-app-id.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-get-package-id-by-app-id.c
new file mode 100755 (executable)
index 0000000..27ae2b8
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageIdByAppId
+
+/**
+ * @brief Positive test case of package_manager_get_package_id_by_app_id()
+ */
+int utc_ApplicationFW_package_manager_get_package_id_by_app_id_p(void)
+{
+    int ret = 0;
+    const char *appid = "org.tizen.helloworld2";
+    char *pkgid = NULL;
+    // TODO Check if pkgid should be released by free()
+    // it is not mentioned in package_manager.h file
+    ret = package_manager_get_package_id_by_app_id(appid, &pkgid);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_get_package_id_by_app_id()
+ */
+int utc_ApplicationFW_package_manager_get_package_id_by_app_id_n(void)
+{
+    int ret = 0;
+    const char *appid = NULL;
+    char *pkgid = NULL;
+
+    ret = package_manager_get_package_id_by_app_id(appid, &pkgid);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-get-package-info.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-get-package-info.c
new file mode 100755 (executable)
index 0000000..20ad294
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageManagerGetPackageInfo
+
+/**
+ * @brief Positive test case of package_manager_get_package_info()
+ */
+int utc_ApplicationFW_package_manager_get_package_info_p(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    const char *pkgid = "org.tizen.helloworld2";
+
+    ret = package_manager_get_package_info(pkgid, &package_info);
+    package_info_destroy(package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_get_package_info()
+ */
+int utc_ApplicationFW_package_manager_get_package_info_n(void)
+{
+    int ret = 0;
+    package_info_h package_info = NULL;
+    const char *pkgid = NULL;
+
+    ret = package_manager_get_package_info(pkgid, &package_info);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-get-permission-type.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-get-permission-type.c
new file mode 100755 (executable)
index 0000000..72815e6
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageManagerGetPermissionType
+
+/**
+ * @brief Positive test case of package_manager_get_permission_type()
+ */
+int utc_ApplicationFW_package_manager_get_permission_type_p(void)
+{
+    int ret = 0;
+    package_manager_permission_type_e permission = -1;
+    const char *pkgid = "org.tizen.helloworld2";
+
+    ret = package_manager_get_permission_type(pkgid, &permission);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_get_permission_type()
+ */
+int utc_ApplicationFW_package_manager_get_permission_type_n(void)
+{
+    int ret = 0;
+    package_manager_permission_type_e permission = -1;
+    const char *pkgid = NULL;
+
+    ret = package_manager_get_permission_type(pkgid, &permission);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-is-preload-package-by-app-id.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-is-preload-package-by-app-id.c
new file mode 100755 (executable)
index 0000000..beff797
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageByAppId
+
+/**
+ * @brief Positive test case of package_manager_is_preload_package_by_app_id()
+ */
+int utc_ApplicationFW_package_manager_is_preload_package_by_app_id_p(void)
+{
+    int ret = 0;
+    bool preload;
+    const char *appid = "org.tizen.helloworld2";
+
+    ret = package_manager_is_preload_package_by_app_id(appid, &preload);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_is_preload_package_by_app_id()
+ */
+int utc_ApplicationFW_package_manager_is_preload_package_by_app_id_n(void)
+{
+    int ret = 0;
+    bool preload;
+    const char *appid = NULL;
+
+    ret = package_manager_is_preload_package_by_app_id(appid, &preload);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-set-event-cb.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-set-event-cb.c
new file mode 100755 (executable)
index 0000000..cb6fb53
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageManagerSetEventCb
+
+static void _event_cb (
+        const char *type,
+        const char *package,
+        package_manager_event_type_e event_type,
+        package_manager_event_state_e event_state,
+        int progress,
+        package_manager_error_e error,
+        void *user_data)
+{
+    return;
+}
+
+/**
+ * @brief Positive test case of package_manager_set_event_cb()
+ */
+int utc_ApplicationFW_package_manager_set_event_cb_p(void)
+{
+    int ret = 0;
+    package_manager_h manager = NULL;
+
+    package_manager_create(&manager);
+    ret = package_manager_set_event_cb(manager, _event_cb, NULL);
+    package_manager_destroy(manager);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_set_event_cb()
+ */
+int utc_ApplicationFW_package_manager_set_event_cb_n(void)
+{
+    int ret = 0;
+    package_manager_h manager = NULL;
+
+    ret = package_manager_set_event_cb(manager, _event_cb, NULL);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-set-event-status.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-set-event-status.c
new file mode 100755 (executable)
index 0000000..65aabdf
--- /dev/null
@@ -0,0 +1,43 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageManagerSetEventStatus
+
+int utc_ApplicationFW_package_manager_set_event_status_p(void)
+{
+    int ret = 0;
+    package_manager_h manager = NULL;
+
+    package_manager_create(&manager);
+    ret = package_manager_set_event_status(manager, PACKAGE_MANAGER_STATUS_TYPE_ALL);
+    package_manager_destroy(manager);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_ApplicationFW_package_manager_set_event_status_n(void)
+{
+    int ret = 0;
+    package_manager_h manager = NULL;
+
+    ret = package_manager_set_event_status(manager, -1);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/package-manager/utc-ApplicationFW-package-manager-unset-event-cb.c b/src/utc/package-manager/utc-ApplicationFW-package-manager-unset-event-cb.c
new file mode 100755 (executable)
index 0000000..1b0ef6f
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <package_manager.h>
+
+//& set: PackageManagerUnsetEventCb
+
+static void _event_cb (
+        const char *type,
+        const char *package,
+        package_manager_event_type_e event_type,
+        package_manager_event_state_e event_state,
+        int progress,
+        package_manager_error_e error,
+        void *user_data)
+{
+    return;
+}
+
+/**
+ * @brief Positive test case of package_manager_unset_event_cb()
+ */
+int utc_ApplicationFW_package_manager_unset_event_cb_p(void)
+{
+    int ret = 0;
+    package_manager_h manager = NULL;
+
+    package_manager_create(&manager);
+    package_manager_set_event_cb(manager, _event_cb, NULL);
+    ret = package_manager_unset_event_cb(manager);
+    package_manager_destroy(manager);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of package_manager_unset_event_cb()
+ */
+int utc_ApplicationFW_package_manager_unset_event_cb_n(void)
+{
+    int ret = 0;
+    package_manager_h manager = NULL;
+
+    ret = package_manager_unset_event_cb(manager);
+    assert_eq(ret, PACKAGE_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/player/CMakeLists.txt b/src/utc/player/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..1d2105d
--- /dev/null
@@ -0,0 +1,43 @@
+SET(PKG_NAME "player")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+SET(CONFIGFILEPATH "\"/tmp/ITC_Config.txt\"")
+SET(CAPI_LIB "capi-media-player")
+SET(TC_SOURCES
+       utc-media-player.c
+       utc-media-player-display.c
+       utc-media-player-callback.c
+       utc-media-player-lifecycle.c
+       utc-media-player-streaming.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       gthread-2.0
+       gobject-2.0
+       elementary
+       ecore
+       evas
+       storage
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+add_definitions(-DCONFIGFILE_PATH=${CONFIGFILEPATH})
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/player/public.list b/src/utc/player/public.list
new file mode 100755 (executable)
index 0000000..a3a2275
--- /dev/null
@@ -0,0 +1,69 @@
+player_audio_effect_equalizer_clear
+player_audio_effect_equalizer_is_available
+player_audio_effect_get_equalizer_band_frequency
+player_audio_effect_get_equalizer_band_frequency_range
+player_audio_effect_get_equalizer_band_level
+player_audio_effect_get_equalizer_bands_count
+player_audio_effect_get_equalizer_level_range
+player_audio_effect_set_equalizer_all_bands
+player_audio_effect_set_equalizer_band_level
+player_capture_video
+player_create
+player_destroy
+player_get_album_art
+player_get_audio_latency_mode
+player_get_audio_stream_info
+player_get_codec_info
+player_get_content_info
+player_get_display_mode
+player_get_display_rotation
+player_get_duration
+player_get_play_position
+player_get_progressive_download_status
+player_get_state
+player_get_streaming_download_progress
+player_get_video_size
+player_get_video_stream_info
+player_get_volume
+player_is_display_visible
+player_is_looping
+player_is_muted
+player_pause
+player_prepare
+player_prepare_async
+player_set_audio_latency_mode
+player_set_buffering_cb
+player_set_completed_cb
+player_set_display
+player_set_display_mode
+player_set_display_rotation
+player_set_display_visible
+player_set_error_cb
+player_set_interrupted_cb
+player_set_looping
+player_set_media_packet_video_frame_decoded_cb
+player_set_memory_buffer
+player_set_mute
+player_set_play_position
+player_set_playback_rate
+player_set_progressive_download_message_cb
+player_set_progressive_download_path
+player_set_sound_type
+player_set_streaming_cookie
+player_set_streaming_user_agent
+player_set_subtitle_path
+player_set_subtitle_updated_cb
+player_set_uri
+player_set_volume
+player_start
+player_stop
+player_unprepare
+player_unset_buffering_cb
+player_unset_completed_cb
+player_unset_error_cb
+player_unset_interrupted_cb
+player_unset_media_packet_video_frame_decoded_cb
+player_unset_progressive_download_message_cb
+player_unset_subtitle_updated_cb
+player_set_subtitle_position_offset
+
diff --git a/src/utc/player/res/Color.mp4 b/src/utc/player/res/Color.mp4
new file mode 100755 (executable)
index 0000000..9737271
Binary files /dev/null and b/src/utc/player/res/Color.mp4 differ
diff --git a/src/utc/player/res/subtitles_test_file.srt b/src/utc/player/res/subtitles_test_file.srt
new file mode 100755 (executable)
index 0000000..00a056c
--- /dev/null
@@ -0,0 +1,12 @@
+1
+00:00:03,400 --> 00:00:14,554
+LOS ANGELES, 2029
+
+2
+00:00:16,840 --> 00:00:25,991
+PLAYER SUBTITLES TEST
+
+3
+00:00:27,120 --> 00:00:40,669
+THE END
+
diff --git a/src/utc/player/tct-player-core.c b/src/utc/player/tct-player-core.c
new file mode 100755 (executable)
index 0000000..4084e7a
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-player-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/player/tct-player-core.h b/src/utc/player/tct-player-core.h
new file mode 100755 (executable)
index 0000000..ed7ca74
--- /dev/null
@@ -0,0 +1,309 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_PLAYER_CORE_H__
+#define __TCT_PLAYER_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_media_player_startup(void);
+extern void utc_media_player_cleanup(void);
+extern void utc_media_player_display_startup(void);
+extern void utc_media_player_display_cleanup(void);
+extern void utc_media_player_callback_startup(void);
+extern void utc_media_player_callback_cleanup(void);
+extern void utc_media_player_lifecycle_startup(void);
+extern void utc_media_player_lifecycle_cleanup(void);
+extern void utc_media_player_streaming_startup(void);
+extern void utc_media_player_streaming_cleanup(void);
+
+extern int utc_media_player_get_duration_p(void);
+extern int utc_media_player_get_duration_n(void);
+extern int utc_media_player_set_play_position_p(void);
+extern int utc_media_player_set_play_position_n(void);
+extern int utc_media_player_get_play_position_p(void);
+extern int utc_media_player_get_play_position_n(void);
+extern int utc_media_player_get_state_p(void);
+extern int utc_media_player_get_state_n(void);
+extern int utc_media_player_set_playback_rate_p(void);
+extern int utc_media_player_set_playback_rate_n(void);
+extern int utc_media_player_set_looping_p(void);
+extern int utc_media_player_set_looping_n(void);
+extern int utc_media_player_is_looping_p(void);
+extern int utc_media_player_is_looping_n(void);
+extern int utc_media_player_set_mute_p(void);
+extern int utc_media_player_set_mute_n(void);
+extern int utc_media_player_is_muted_p(void);
+extern int utc_media_player_is_muted_n(void);
+extern int utc_media_player_set_memory_buffer_p(void);
+extern int utc_media_player_set_memory_buffer_n(void);
+extern int utc_media_player_set_volume_p(void);
+extern int utc_media_player_set_volume_n(void);
+extern int utc_media_player_get_volume_p(void);
+extern int utc_media_player_get_volume_n(void);
+extern int utc_media_player_set_sound_type_p(void);
+extern int utc_media_player_set_sound_type_n(void);
+extern int utc_media_player_set_subtitle_path_p(void);
+extern int utc_media_player_set_subtitle_path_n(void);
+extern int utc_media_player_set_display_visible_p(void);
+extern int utc_media_player_set_display_visible_n(void);
+extern int utc_media_player_is_display_visible_p(void);
+extern int utc_media_player_is_display_visible_n(void);
+extern int utc_media_player_set_display_mode_p(void);
+extern int utc_media_player_set_display_mode_n(void);
+extern int utc_media_player_get_display_mode_p(void);
+extern int utc_media_player_get_display_mode_n(void);
+extern int utc_media_player_set_display_rotation_p(void);
+extern int utc_media_player_set_display_rotation_n(void);
+extern int utc_media_player_get_display_rotation_p(void);
+extern int utc_media_player_get_display_rotation_n(void);
+extern int utc_media_player_audio_effect_get_equalizer_bands_count_p(void);
+extern int utc_media_player_audio_effect_get_equalizer_bands_count_n(void);
+extern int utc_media_player_audio_effect_set_equalizer_band_level_p(void);
+extern int utc_media_player_audio_effect_set_equalizer_band_level_n(void);
+extern int utc_media_player_audio_effect_get_equalizer_band_level_p(void);
+extern int utc_media_player_audio_effect_get_equalizer_band_level_n(void);
+extern int utc_media_player_audio_effect_get_equalizer_level_range_p(void);
+extern int utc_media_player_audio_effect_get_equalizer_level_range_n(void);
+extern int utc_media_player_audio_effect_set_equalizer_all_bands_p(void);
+extern int utc_media_player_audio_effect_set_equalizer_all_bands_n(void);
+extern int utc_media_player_audio_effect_equalizer_clear_p(void);
+extern int utc_media_player_audio_effect_equalizer_clear_n(void);
+extern int utc_media_player_audio_effect_equalizer_is_available_p(void);
+extern int utc_media_player_audio_effect_equalizer_is_available_n(void);
+extern int utc_media_player_get_content_info_p(void);
+extern int utc_media_player_get_content_info_n(void);
+extern int utc_media_player_get_codec_info_p(void);
+extern int utc_media_player_get_codec_info_n(void);
+extern int utc_media_player_get_audio_stream_info_p(void);
+extern int utc_media_player_get_audio_stream_info_n(void);
+extern int utc_media_player_get_album_art_p(void);
+extern int utc_media_player_get_album_art_n(void);
+extern int utc_media_player_audio_effect_get_equalizer_band_frequency_p(void);
+extern int utc_media_player_audio_effect_get_equalizer_band_frequency_n(void);
+extern int utc_media_player_audio_effect_get_equalizer_band_frequency_range_p(void);
+extern int utc_media_player_audio_effect_get_equalizer_band_frequency_range_n(void);
+extern int utc_media_player_get_audio_latency_mode_p(void);
+extern int utc_media_player_get_audio_latency_mode_n(void);
+extern int utc_media_player_prepare_async_p(void);
+extern int utc_media_player_prepare_async_n(void);
+extern int utc_media_player_set_audio_latency_mode_p(void);
+extern int utc_media_player_set_audio_latency_mode_n(void);
+extern int utc_media_player_set_streaming_user_agent_p(void);
+extern int utc_media_player_set_streaming_user_agent_n(void);
+extern int utc_media_player_set_subtitle_position_offset_p(void);
+extern int utc_media_player_set_subtitle_position_offset_n(void);
+extern int utc_media_player_get_video_size_p(void);
+extern int utc_media_player_get_video_size_n(void);
+extern int utc_media_player_set_display_p(void);
+extern int utc_media_player_set_display_n(void);
+extern int utc_media_player_capture_video_p(void);
+extern int utc_media_player_capture_video_n(void);
+extern int utc_media_player_get_video_stream_info_p(void);
+extern int utc_media_player_get_video_stream_info_n(void);
+extern int utc_media_player_set_media_packet_video_frame_decoded_cb_p(void);
+extern int utc_media_player_set_media_packet_video_frame_decoded_cb_n(void);
+extern int utc_media_player_unset_media_packet_video_frame_decoded_cb_p(void);
+extern int utc_media_player_unset_media_packet_video_frame_decoded_cb_n(void);
+extern int utc_media_player_set_buffering_cb_p(void);
+extern int utc_media_player_set_buffering_cb_n(void);
+extern int utc_media_player_unset_buffering_cb_p(void);
+extern int utc_media_player_unset_buffering_cb_n(void);
+extern int utc_media_player_set_completed_cb_p(void);
+extern int utc_media_player_set_completed_cb_n(void);
+extern int utc_media_player_unset_completed_cb_p(void);
+extern int utc_media_player_unset_completed_cb_n(void);
+extern int utc_media_player_set_error_cb_p(void);
+extern int utc_media_player_set_error_cb_n(void);
+extern int utc_media_player_unset_error_cb_p(void);
+extern int utc_media_player_unset_error_cb_n(void);
+extern int utc_media_player_set_interrupted_cb_p(void);
+extern int utc_media_player_set_interrupted_cb_n(void);
+extern int utc_media_player_unset_interrupted_cb_p(void);
+extern int utc_media_player_unset_interrupted_cb_n(void);
+extern int utc_media_player_set_subtitle_updated_cb_p(void);
+extern int utc_media_player_set_subtitle_updated_cb_n(void);
+extern int utc_media_player_unset_subtitle_updated_cb_p(void);
+extern int utc_media_player_unset_subtitle_updated_cb_n(void);
+extern int utc_media_player_set_progressive_download_message_cb_p(void);
+extern int utc_media_player_set_progressive_download_message_cb_n(void);
+extern int utc_media_player_unset_progressive_download_message_cb_p(void);
+extern int utc_media_player_unset_progressive_download_message_cb_n(void);
+extern int utc_media_player_create_p(void);
+extern int utc_media_player_create_n(void);
+extern int utc_media_player_destroy_p(void);
+extern int utc_media_player_destroy_n(void);
+extern int utc_media_player_pause_p(void);
+extern int utc_media_player_pause_n(void);
+extern int utc_media_player_prepare_p(void);
+extern int utc_media_player_prepare_n(void);
+extern int utc_media_player_unprepare_p(void);
+extern int utc_media_player_unprepare_n(void);
+extern int utc_media_player_set_uri_p(void);
+extern int utc_media_player_set_uri_n(void);
+extern int utc_media_player_start_p(void);
+extern int utc_media_player_start_n(void);
+extern int utc_media_player_stop_p(void);
+extern int utc_media_player_stop_n(void);
+extern int utc_media_player_get_streaming_download_progress_p(void);
+extern int utc_media_player_get_streaming_download_progress_n(void);
+extern int utc_media_player_get_progressive_download_status_p(void);
+extern int utc_media_player_get_progressive_download_status_n(void);
+extern int utc_media_player_set_progressive_download_path_p(void);
+extern int utc_media_player_set_progressive_download_path_n(void);
+extern int utc_media_player_set_streaming_cookie_p(void);
+extern int utc_media_player_set_streaming_cookie_n(void);
+
+testcase tc_array[] = {
+    {"utc_media_player_get_duration_p", utc_media_player_get_duration_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_duration_n", utc_media_player_get_duration_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_play_position_p", utc_media_player_set_play_position_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_play_position_n", utc_media_player_set_play_position_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_play_position_p", utc_media_player_get_play_position_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_play_position_n", utc_media_player_get_play_position_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_state_p", utc_media_player_get_state_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_state_n", utc_media_player_get_state_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_playback_rate_p", utc_media_player_set_playback_rate_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_playback_rate_n", utc_media_player_set_playback_rate_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_looping_p", utc_media_player_set_looping_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_looping_n", utc_media_player_set_looping_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_is_looping_p", utc_media_player_is_looping_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_is_looping_n", utc_media_player_is_looping_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_mute_p", utc_media_player_set_mute_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_mute_n", utc_media_player_set_mute_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_is_muted_p", utc_media_player_is_muted_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_is_muted_n", utc_media_player_is_muted_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_memory_buffer_p", utc_media_player_set_memory_buffer_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_memory_buffer_n", utc_media_player_set_memory_buffer_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_volume_p", utc_media_player_set_volume_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_volume_n", utc_media_player_set_volume_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_volume_p", utc_media_player_get_volume_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_volume_n", utc_media_player_get_volume_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_sound_type_p", utc_media_player_set_sound_type_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_sound_type_n", utc_media_player_set_sound_type_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_subtitle_path_p", utc_media_player_set_subtitle_path_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_subtitle_path_n", utc_media_player_set_subtitle_path_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_display_visible_p", utc_media_player_set_display_visible_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_display_visible_n", utc_media_player_set_display_visible_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_is_display_visible_p", utc_media_player_is_display_visible_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_is_display_visible_n", utc_media_player_is_display_visible_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_display_mode_p", utc_media_player_set_display_mode_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_display_mode_n", utc_media_player_set_display_mode_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_display_mode_p", utc_media_player_get_display_mode_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_display_mode_n", utc_media_player_get_display_mode_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_display_rotation_p", utc_media_player_set_display_rotation_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_display_rotation_n", utc_media_player_set_display_rotation_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_display_rotation_p", utc_media_player_get_display_rotation_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_display_rotation_n", utc_media_player_get_display_rotation_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_get_equalizer_bands_count_p", utc_media_player_audio_effect_get_equalizer_bands_count_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_get_equalizer_bands_count_n", utc_media_player_audio_effect_get_equalizer_bands_count_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_set_equalizer_band_level_p", utc_media_player_audio_effect_set_equalizer_band_level_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_set_equalizer_band_level_n", utc_media_player_audio_effect_set_equalizer_band_level_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_get_equalizer_band_level_p", utc_media_player_audio_effect_get_equalizer_band_level_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_get_equalizer_band_level_n", utc_media_player_audio_effect_get_equalizer_band_level_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_get_equalizer_level_range_p", utc_media_player_audio_effect_get_equalizer_level_range_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_get_equalizer_level_range_n", utc_media_player_audio_effect_get_equalizer_level_range_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_set_equalizer_all_bands_p", utc_media_player_audio_effect_set_equalizer_all_bands_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_set_equalizer_all_bands_n", utc_media_player_audio_effect_set_equalizer_all_bands_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_equalizer_clear_p", utc_media_player_audio_effect_equalizer_clear_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_equalizer_clear_n", utc_media_player_audio_effect_equalizer_clear_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_equalizer_is_available_p", utc_media_player_audio_effect_equalizer_is_available_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_equalizer_is_available_n", utc_media_player_audio_effect_equalizer_is_available_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_content_info_p", utc_media_player_get_content_info_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_content_info_n", utc_media_player_get_content_info_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_codec_info_p", utc_media_player_get_codec_info_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_codec_info_n", utc_media_player_get_codec_info_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_audio_stream_info_p", utc_media_player_get_audio_stream_info_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_audio_stream_info_n", utc_media_player_get_audio_stream_info_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_album_art_p", utc_media_player_get_album_art_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_album_art_n", utc_media_player_get_album_art_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_get_equalizer_band_frequency_p", utc_media_player_audio_effect_get_equalizer_band_frequency_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_get_equalizer_band_frequency_n", utc_media_player_audio_effect_get_equalizer_band_frequency_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_get_equalizer_band_frequency_range_p", utc_media_player_audio_effect_get_equalizer_band_frequency_range_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_audio_effect_get_equalizer_band_frequency_range_n", utc_media_player_audio_effect_get_equalizer_band_frequency_range_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_audio_latency_mode_p", utc_media_player_get_audio_latency_mode_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_audio_latency_mode_n", utc_media_player_get_audio_latency_mode_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_prepare_async_p", utc_media_player_prepare_async_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_prepare_async_n", utc_media_player_prepare_async_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_audio_latency_mode_p", utc_media_player_set_audio_latency_mode_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_audio_latency_mode_n", utc_media_player_set_audio_latency_mode_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_streaming_user_agent_p", utc_media_player_set_streaming_user_agent_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_streaming_user_agent_n", utc_media_player_set_streaming_user_agent_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_subtitle_position_offset_p", utc_media_player_set_subtitle_position_offset_p, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_set_subtitle_position_offset_n", utc_media_player_set_subtitle_position_offset_n, utc_media_player_startup, utc_media_player_cleanup},
+    {"utc_media_player_get_video_size_p", utc_media_player_get_video_size_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
+    {"utc_media_player_get_video_size_n", utc_media_player_get_video_size_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
+    {"utc_media_player_set_display_p", utc_media_player_set_display_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
+    {"utc_media_player_set_display_n", utc_media_player_set_display_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
+    {"utc_media_player_capture_video_p", utc_media_player_capture_video_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
+    {"utc_media_player_capture_video_n", utc_media_player_capture_video_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
+    {"utc_media_player_get_video_stream_info_p", utc_media_player_get_video_stream_info_p, utc_media_player_display_startup, utc_media_player_display_cleanup},
+    {"utc_media_player_get_video_stream_info_n", utc_media_player_get_video_stream_info_n, utc_media_player_display_startup, utc_media_player_display_cleanup},
+    {"utc_media_player_set_media_packet_video_frame_decoded_cb_p", utc_media_player_set_media_packet_video_frame_decoded_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_media_packet_video_frame_decoded_cb_n", utc_media_player_set_media_packet_video_frame_decoded_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_media_packet_video_frame_decoded_cb_p", utc_media_player_unset_media_packet_video_frame_decoded_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_media_packet_video_frame_decoded_cb_n", utc_media_player_unset_media_packet_video_frame_decoded_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_buffering_cb_p", utc_media_player_set_buffering_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_buffering_cb_n", utc_media_player_set_buffering_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_buffering_cb_p", utc_media_player_unset_buffering_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_buffering_cb_n", utc_media_player_unset_buffering_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_completed_cb_p", utc_media_player_set_completed_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_completed_cb_n", utc_media_player_set_completed_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_completed_cb_p", utc_media_player_unset_completed_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_completed_cb_n", utc_media_player_unset_completed_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_error_cb_p", utc_media_player_set_error_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_error_cb_n", utc_media_player_set_error_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_error_cb_p", utc_media_player_unset_error_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_error_cb_n", utc_media_player_unset_error_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_interrupted_cb_p", utc_media_player_set_interrupted_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_interrupted_cb_n", utc_media_player_set_interrupted_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_interrupted_cb_p", utc_media_player_unset_interrupted_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_interrupted_cb_n", utc_media_player_unset_interrupted_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_subtitle_updated_cb_p", utc_media_player_set_subtitle_updated_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_subtitle_updated_cb_n", utc_media_player_set_subtitle_updated_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_subtitle_updated_cb_p", utc_media_player_unset_subtitle_updated_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_subtitle_updated_cb_n", utc_media_player_unset_subtitle_updated_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_progressive_download_message_cb_p", utc_media_player_set_progressive_download_message_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_set_progressive_download_message_cb_n", utc_media_player_set_progressive_download_message_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_progressive_download_message_cb_p", utc_media_player_unset_progressive_download_message_cb_p, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_unset_progressive_download_message_cb_n", utc_media_player_unset_progressive_download_message_cb_n, utc_media_player_callback_startup, utc_media_player_callback_cleanup},
+    {"utc_media_player_create_p", utc_media_player_create_p, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_create_n", utc_media_player_create_n, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_destroy_p", utc_media_player_destroy_p, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_destroy_n", utc_media_player_destroy_n, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_pause_p", utc_media_player_pause_p, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_pause_n", utc_media_player_pause_n, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_prepare_p", utc_media_player_prepare_p, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_prepare_n", utc_media_player_prepare_n, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_unprepare_p", utc_media_player_unprepare_p, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_unprepare_n", utc_media_player_unprepare_n, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_set_uri_p", utc_media_player_set_uri_p, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_set_uri_n", utc_media_player_set_uri_n, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_start_p", utc_media_player_start_p, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_start_n", utc_media_player_start_n, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_stop_p", utc_media_player_stop_p, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_stop_n", utc_media_player_stop_n, utc_media_player_lifecycle_startup, utc_media_player_lifecycle_cleanup},
+    {"utc_media_player_get_streaming_download_progress_p", utc_media_player_get_streaming_download_progress_p, utc_media_player_streaming_startup, utc_media_player_streaming_cleanup},
+    {"utc_media_player_get_streaming_download_progress_n", utc_media_player_get_streaming_download_progress_n, utc_media_player_streaming_startup, utc_media_player_streaming_cleanup},
+    {"utc_media_player_get_progressive_download_status_p", utc_media_player_get_progressive_download_status_p, utc_media_player_streaming_startup, utc_media_player_streaming_cleanup},
+    {"utc_media_player_get_progressive_download_status_n", utc_media_player_get_progressive_download_status_n, utc_media_player_streaming_startup, utc_media_player_streaming_cleanup},
+    {"utc_media_player_set_progressive_download_path_p", utc_media_player_set_progressive_download_path_p, utc_media_player_streaming_startup, utc_media_player_streaming_cleanup},
+    {"utc_media_player_set_progressive_download_path_n", utc_media_player_set_progressive_download_path_n, utc_media_player_streaming_startup, utc_media_player_streaming_cleanup},
+    {"utc_media_player_set_streaming_cookie_p", utc_media_player_set_streaming_cookie_p, utc_media_player_streaming_startup, utc_media_player_streaming_cleanup},
+    {"utc_media_player_set_streaming_cookie_n", utc_media_player_set_streaming_cookie_n, utc_media_player_streaming_startup, utc_media_player_streaming_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_PLAYER_CORE_H__
diff --git a/src/utc/player/utc-media-player-callback.c b/src/utc/player/utc-media-player-callback.c
new file mode 100755 (executable)
index 0000000..acb0971
--- /dev/null
@@ -0,0 +1,364 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media/player.h>
+
+#include <glib.h>
+
+//& set: MediaPlayerCallback
+
+static player_h player;
+
+static bool _is_broken = false;
+
+void utc_media_player_callback_startup(void)
+{
+    int ret = player_create(&player);
+    if (PLAYER_ERROR_NONE != ret) {
+        _is_broken = true;
+    }
+}
+
+void utc_media_player_callback_cleanup(void)
+{
+    if(player){
+        player_destroy(player);
+        player = NULL;
+    }
+}
+
+static void player_complete_cb(void *data)
+{
+}
+
+static void player_buffer_cb(int percent, void *data)
+{
+}
+
+static void player_interrupt_cb(player_interrupted_code_e code, void *data)
+{
+}
+
+static  void player_subtitle_update_cb(unsigned long duration, char *text, void *user_data)
+{
+}
+
+static  void _player_pd_message_cb(player_pd_message_type_e type, void *user_data)
+{
+}
+
+static void _player_image_buffer_updated_cb(char *buffer, int size, void *user_data)
+{
+
+}
+
+static void _player_media_packet_decoded_cb(media_packet_h pkt, void *user_data)
+{
+
+}
+
+int utc_media_player_set_media_packet_video_frame_decoded_cb_p(void)
+{
+    int ret = player_set_media_packet_video_frame_decoded_cb(player, _player_media_packet_decoded_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unset_media_packet_video_frame_decoded_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_media_packet_video_frame_decoded_cb_n(void)
+{
+    int ret = player_set_media_packet_video_frame_decoded_cb(NULL, _player_media_packet_decoded_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_unset_media_packet_video_frame_decoded_cb_p(void)
+{
+
+    int ret = player_unset_media_packet_video_frame_decoded_cb(player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_unset_media_packet_video_frame_decoded_cb_n(void)
+{
+    int ret = player_unset_media_packet_video_frame_decoded_cb(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_buffering_cb_p(void)
+{
+    assert(!_is_broken);
+
+    int ret = player_set_buffering_cb(player, player_buffer_cb, NULL);
+    // if wifi isn't connected or internet modules don't exist, this error will be returned.
+    // and it is wrongly detected as a fail. so we will skip the test on these cases.
+    if(ret==PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) {
+        fprintf(stderr, "check network status");
+        return 0;
+    }
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unset_buffering_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_buffering_cb_n(void)
+{
+    int ret = player_set_buffering_cb(NULL, player_buffer_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_unset_buffering_cb_p(void)
+{
+    assert(!_is_broken);
+
+    int ret2 = player_unset_buffering_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_unset_buffering_cb_n(void)
+{
+    int ret = player_unset_buffering_cb(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_completed_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = player_set_completed_cb(player, player_complete_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unset_completed_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_completed_cb_n(void)
+{
+    int ret = player_set_completed_cb(NULL, player_complete_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_unset_completed_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = player_set_completed_cb(player, player_complete_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unset_completed_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_unset_completed_cb_n(void)
+{
+    int ret = player_unset_completed_cb(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_error_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = player_set_error_cb(player, player_buffer_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unset_error_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_error_cb_n(void)
+{
+    int ret = player_set_error_cb(NULL, player_buffer_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_unset_error_cb_p(void)
+{
+    assert(!_is_broken);
+
+    int ret = player_set_error_cb(player, player_buffer_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unset_error_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_unset_error_cb_n(void)
+{
+    int ret = player_unset_error_cb(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_interrupted_cb_p(void)
+{
+    assert(!_is_broken);
+    int ret = player_set_interrupted_cb(player, player_interrupt_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unset_interrupted_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_interrupted_cb_n(void)
+{
+    void* user_data = NULL;
+
+    int ret = player_set_interrupted_cb(player, NULL, user_data);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_unset_interrupted_cb_p(void)
+{
+    assert(!_is_broken);
+
+    int ret = player_set_interrupted_cb(player, player_interrupt_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unset_interrupted_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_unset_interrupted_cb_n(void)
+{
+    int ret = player_unset_interrupted_cb(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_subtitle_updated_cb_p(void)
+{
+    assert(!_is_broken);
+
+    int ret = player_set_subtitle_updated_cb(player, player_subtitle_update_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unset_subtitle_updated_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_subtitle_updated_cb_n(void)
+{
+    int ret = player_set_subtitle_updated_cb(player, NULL, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_unset_subtitle_updated_cb_p(void)
+{
+    assert(!_is_broken);
+
+    int ret = player_set_subtitle_updated_cb(player, player_subtitle_update_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unset_subtitle_updated_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_unset_subtitle_updated_cb_n(void)
+{
+    int ret = player_unset_subtitle_updated_cb(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_progressive_download_message_cb_p(void)
+{
+    assert(!_is_broken);
+
+    int ret = player_set_progressive_download_message_cb(player, _player_pd_message_cb, NULL);
+    // if wifi isn't connected or internet modules don't exist, this error will be returned.
+    // and it is wrongly detected as a fail. so we will skip the test on these cases.
+    if(ret==PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) {
+        fprintf(stderr, "check network status");
+        return 0;
+    }
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unset_progressive_download_message_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_progressive_download_message_cb_n(void)
+{
+    int ret = player_set_progressive_download_message_cb(player, NULL, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_unset_progressive_download_message_cb_p(void)
+{
+    assert(!_is_broken);
+
+    int ret2 = player_unset_progressive_download_message_cb(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_unset_progressive_download_message_cb_n(void)
+{
+    int ret = player_unset_progressive_download_message_cb(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
diff --git a/src/utc/player/utc-media-player-display.c b/src/utc/player/utc-media-player-display.c
new file mode 100755 (executable)
index 0000000..28665de
--- /dev/null
@@ -0,0 +1,274 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media/player.h>
+#include <media/sound_manager.h>
+#include <glib.h>
+#include <Elementary.h>
+#include <storage.h>
+//& set: PlayerMediaDisplay
+
+static char* media="Color.mp4";
+static char* subtitle="subtitles_test_file.srt";
+static char* media_path=NULL;
+static char* subtitle_path=NULL;
+
+static player_h player;
+static bool _is_broken = false;
+static bool _is_pass = false;
+
+static GMainLoop *g_mainloop = NULL;
+static Evas_Object *g_win = NULL;
+
+static gboolean timeout_func(gpointer data)
+{
+    fprintf(stderr, "Timeout! Test case failed!\n");
+    g_main_loop_quit((GMainLoop *) data);
+    return FALSE;
+}
+
+static void wait_for_async()
+{
+    int timeout_id = 0;
+    g_mainloop = g_main_loop_new(NULL, FALSE);
+
+    timeout_id = g_timeout_add(5000, timeout_func, g_mainloop);
+    g_main_loop_run(g_mainloop);
+    g_source_remove(timeout_id);
+}
+
+static void win_del(void *data, Evas_Object *obj, void *event)
+{
+    elm_exit();
+}
+
+static void create_window()
+{
+    g_win = elm_win_util_standard_add("player_tc", "player_tc");
+    if (g_win) {
+        elm_win_borderless_set(g_win, EINA_TRUE);
+        evas_object_smart_callback_add(g_win, "delete,request",win_del, NULL);
+        elm_win_autodel_set(g_win, EINA_TRUE);
+    }
+}
+
+static void destroy_window()
+{
+    if (g_win) {
+        evas_object_del(g_win);
+        g_win = 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){
+          media_path=(char*)malloc(strlen(path)+strlen(media)+6);
+          snprintf(media_path, strlen(path)+strlen(media)+6, "%s/res/%s", path, media);
+          subtitle_path=(char*)malloc(strlen(path)+strlen(subtitle)+6);
+          snprintf(subtitle_path, strlen(path)+strlen(subtitle)+6, "%s/res/%s", path, subtitle);
+        return false;
+        }
+        return true;
+}
+
+
+void utc_media_player_display_startup(void)
+{
+    elm_init(0, NULL);
+    storage_foreach_device_supported(storage_device_cb,NULL);
+
+    int ret = player_create(&player);
+    if (PLAYER_ERROR_NONE != ret) {
+        _is_broken = true;
+        return;
+    }
+
+    ret = player_set_uri(player, media_path);
+    if (PLAYER_ERROR_NONE != ret) {
+        fprintf(stderr, "player didn't set uri\n");
+        _is_broken = true;
+    }
+
+    if (PLAYER_ERROR_NONE != ret) {
+        fprintf(stderr, "player didn't set display'\n");
+        _is_broken = true;
+    }
+
+    ret = player_prepare(player);
+    if (PLAYER_ERROR_NONE != ret) {
+        fprintf(stderr, "player isn't prepared\n");
+        _is_broken = true;
+    }
+
+}
+
+void utc_media_player_display_cleanup(void)
+{
+    elm_shutdown();
+    player_unprepare(player);
+
+    if(player){
+        player_destroy(player);
+        player = NULL;
+    }
+}
+
+static void player_video_capture_cb(unsigned char *data, int width, int height, unsigned int size, void *user_data)
+{
+    _is_pass = true;
+}
+
+int utc_media_player_get_video_size_p(void)
+{
+    assert(!_is_broken);
+    int width, height;
+    create_window();
+
+    int ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret1 = player_start(player);
+    assert_eq(ret1, PLAYER_ERROR_NONE);
+    player_state_e cur_state;
+    int ret2 = player_get_state(player, &cur_state);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert_eq(cur_state, PLAYER_STATE_PLAYING);
+
+    int ret3 = player_get_video_size(player, &width, &height);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+    int ret4 = player_stop(player);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+
+    destroy_window();
+
+    return 0;
+}
+
+int utc_media_player_get_video_size_n(void)
+{
+    int width, height;
+    player_state_e cur_state;
+
+    int ret = player_unprepare(player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+    int ret2 = player_get_state(player, &cur_state);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert_eq(cur_state, PLAYER_STATE_IDLE);
+
+    int ret3 = player_get_video_size(player, &width, &height);
+    assert_eq(ret3, PLAYER_ERROR_INVALID_STATE);
+
+    return 0;
+}
+
+int utc_media_player_set_display_p(void)
+{
+    assert(!_is_broken);
+
+    create_window();
+    int ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
+    destroy_window();
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_display_n(void)
+{
+    int ret = player_set_display(NULL, PLAYER_DISPLAY_TYPE_NONE, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_capture_video_p(void)
+{
+    assert(!_is_broken);
+    player_state_e *state;
+
+    player_get_state (player, &state);
+    if (state == PLAYER_STATE_READY)
+      player_unprepare(player);
+
+    create_window();
+
+    int ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret0 = player_prepare(player);
+    assert_eq(ret0, PLAYER_ERROR_NONE);
+
+    int ret1 = player_start(player);
+    assert_eq(ret1, PLAYER_ERROR_NONE);
+    player_state_e cur_state;
+    int ret2 = player_get_state(player, &cur_state);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert_eq(cur_state, PLAYER_STATE_PLAYING);
+
+    int ret3 = player_capture_video(player, player_video_capture_cb, NULL);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+    wait_for_async();
+    assert(_is_pass);
+    _is_pass = false;
+
+    int ret4 = player_stop(player);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+    destroy_window();
+
+    return 0;
+}
+
+int utc_media_player_capture_video_n(void)
+{
+    int ret = player_capture_video(NULL, player_video_capture_cb, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_get_video_stream_info_p(void)
+{
+    assert(!_is_broken);
+
+       create_window();
+
+    int ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret1 = player_start(player);
+    assert_eq(ret1, PLAYER_ERROR_NONE);
+
+    int fps = 0, bit_rate = 0;
+    int ret2 = player_get_video_stream_info(player, &fps, &bit_rate);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_stop(player);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+       destroy_window();
+
+    return 0;
+}
+
+int utc_media_player_get_video_stream_info_n(void)
+{
+    int fps = 0, bit_rate = 0;
+
+    int ret = player_get_video_stream_info(NULL, &fps, &bit_rate);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/player/utc-media-player-lifecycle.c b/src/utc/player/utc-media-player-lifecycle.c
new file mode 100755 (executable)
index 0000000..1366d9a
--- /dev/null
@@ -0,0 +1,275 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media/player.h>
+#include <glib.h>
+#include <storage.h>
+
+//& set: MediaPlayerLifecycle
+
+#define INVALID_MEDIA_PATH "./invalid.mp7"
+
+static char* media="Color.mp4";
+static char* media_path=NULL;
+
+
+static player_h g_player = NULL;
+static bool g_prepared = false;
+static bool g_started = false;
+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){
+        if(type==STORAGE_TYPE_INTERNAL){
+          media_path=(char*)malloc(strlen(path)+strlen(media)+6);
+          snprintf(media_path, strlen(path)+strlen(media)+6, "%s/res/%s", path, media);
+        return false;
+        }
+        return true;
+}
+
+
+void utc_media_player_lifecycle_startup(void)
+{
+    storage_foreach_device_supported(storage_device_cb,NULL);
+    int ret = player_create(&g_player);
+    if (ret == PLAYER_ERROR_NONE) {
+        _is_broken = true;
+    }
+
+    ret = player_set_uri(g_player, media_path);
+    if (ret == PLAYER_ERROR_NONE) {
+        _is_broken = true;
+    }
+}
+
+void utc_media_player_lifecycle_cleanup(void)
+{
+    if (g_started)
+        player_stop(g_player);
+
+    if (g_prepared)
+        player_unprepare(g_player);
+
+    if (g_player) {
+        player_destroy(g_player);
+        g_player = NULL;
+    }
+}
+
+/**
+ * @brief Positive test case of player_create()
+ */
+int utc_media_player_create_p(void)
+{
+    assert(_is_broken);
+    player_state_e cur_state;
+
+    int ret2 = player_get_state(g_player, &cur_state);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert_eq(cur_state, PLAYER_STATE_IDLE);
+
+    return 0;
+}
+
+int utc_media_player_create_n(void)
+{
+    int ret;
+
+    ret = player_create(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_destroy_p(void)
+{
+    int ret;
+    player_h g_player1 = NULL;
+
+    ret = player_create(&g_player1);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_destroy(g_player1);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    g_player1 = NULL;
+
+    return 0;
+}
+
+int utc_media_player_destroy_n(void)
+{
+    int ret;
+
+    ret = player_destroy(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_pause_p(void)
+{
+    assert(_is_broken);
+    player_state_e cur_state;
+
+    int ret2 = player_prepare(g_player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_start(g_player);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    int ret4 = player_pause(g_player);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+
+    int ret5 = player_get_state(g_player, &cur_state);
+    assert_eq(ret5, PLAYER_ERROR_NONE);
+    assert_eq(cur_state, PLAYER_STATE_PAUSED);
+
+    return 0;
+}
+
+int utc_media_player_pause_n(void)
+{
+    int ret = player_pause(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_prepare_p(void)
+{
+    assert(_is_broken);
+    player_state_e cur_state;
+
+    int ret = player_prepare(g_player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_get_state(g_player, &cur_state);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert_eq(cur_state, PLAYER_STATE_READY);
+
+    return 0;
+}
+
+int utc_media_player_prepare_n(void)
+{
+    int ret = player_prepare(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_unprepare_p(void)
+{
+    assert(_is_broken);
+    player_state_e cur_state;
+
+    int ret = player_prepare(g_player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_unprepare(g_player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_get_state(g_player, &cur_state);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+    assert_eq(cur_state, PLAYER_STATE_IDLE);
+
+    return 0;
+}
+
+int utc_media_player_unprepare_n(void)
+{
+    int ret = player_unprepare(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_uri_p(void)
+{
+    assert(_is_broken);
+
+    int ret = player_set_uri(g_player, media_path);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_uri_n(void)
+{
+    int ret = player_set_uri(NULL, media_path);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_start_p(void)
+{
+    assert(_is_broken);
+    player_state_e cur_state;
+
+    int ret = player_prepare(g_player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_start(g_player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_get_state(g_player, &cur_state);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+    assert_eq(cur_state, PLAYER_STATE_PLAYING);
+
+    int ret4 = player_stop(g_player);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_start_n(void)
+{
+    int ret = player_start(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_stop_p(void)
+{
+    assert(_is_broken);
+    player_state_e cur_state;
+
+    int ret = player_prepare(g_player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_start(g_player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_stop(g_player);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    int ret4 = player_get_state(g_player, &cur_state);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+    assert_eq(cur_state, PLAYER_STATE_READY);
+
+    return 0;
+}
+
+int utc_media_player_stop_n(void)
+{
+    int ret = player_stop(NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
diff --git a/src/utc/player/utc-media-player-streaming.c b/src/utc/player/utc-media-player-streaming.c
new file mode 100755 (executable)
index 0000000..a6249f9
--- /dev/null
@@ -0,0 +1,342 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media/player.h>
+#include <glib.h>
+#include <Elementary.h>
+#include <storage.h>
+
+//& set: MediaPlayerStreaming
+
+#define CONFIG_LINE_LEN_MAX            2048    //maximum key-value line length
+#define CONFIG_VALUE_LEN_MAX           1024    //maximum length of value
+#define DEFAULT_PATH "http://content.bitsontherun.com/videos/ntPYsD4L-1ahmry41.mp4"
+#define COOKIE_EXAMPLE "cookie example"
+
+static char* download="test.pd";
+static char* download_path=NULL;
+
+static player_h player;
+
+static bool _is_broken = false;
+static char g_media_path[CONFIG_VALUE_LEN_MAX] = {0,};
+
+static GMainLoop *g_mainloop = NULL;
+
+static gboolean timeout_func(gpointer data)
+{
+    fprintf(stderr, "waited 10 seconds\n");
+    g_main_loop_quit((GMainLoop *) data);
+    return FALSE;
+}
+
+static void wait_for_async()
+{
+    int timeout_id = 0;
+    g_mainloop = g_main_loop_new(NULL, FALSE);
+
+    timeout_id = g_timeout_add(10000, timeout_func, g_mainloop);
+    g_main_loop_run(g_mainloop);
+    g_source_remove(timeout_id);
+}
+
+bool _get_value_from_config(char* key, char* value)
+{
+        if ( NULL == key )
+        {
+            return false;
+        }
+        FILE* pfilePtr = fopen(CONFIGFILE_PATH, "r");
+        if ( NULL == pfilePtr )
+        {
+            return false;
+        }
+
+        char* pszKey = NULL;
+        char* pszValue = NULL;
+        char* pszDelim = "=\n";
+        char *temp = NULL;
+        char szConfigLine[CONFIG_LINE_LEN_MAX] = {0,};
+
+        while ( !feof(pfilePtr) )
+        {
+                if ( fgets(szConfigLine, CONFIG_LINE_LEN_MAX, pfilePtr) != NULL )
+                {
+                        pszKey = strtok_r(szConfigLine, pszDelim, &temp);
+                        pszValue = strtok_r(NULL, pszDelim, &temp);
+                        if(pszKey != NULL) {
+                            if ( 0 == strcmp(pszKey, key) )
+                            {
+                                    break;
+                            }
+
+                            pszKey = NULL;
+                            pszValue = NULL;
+                        }
+                }
+        }
+
+        fclose(pfilePtr);
+        if ( NULL == pszValue )
+        {
+                return false;
+        }
+
+        if ( strlen(pszValue) >= CONFIG_VALUE_LEN_MAX )
+        {
+                return false;
+        }
+
+        memset(value, 0, CONFIG_VALUE_LEN_MAX);
+        strncpy(value, pszValue, strlen(pszValue));
+        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){
+          download_path=(char*)malloc(strlen(path)+strlen(download)+6);
+          snprintf(download_path, strlen(path)+strlen(download)+6, "%s/res/%s", path, download);
+        return false;
+        }
+        return true;
+}
+
+void utc_media_player_streaming_startup(void)
+{
+    storage_foreach_device_supported(storage_device_cb,NULL);
+    if ( true != _get_value_from_config("PLAYER_DOWNLOAD_PROGRESS_URL", g_media_path) )
+    {
+        memset(g_media_path, 0x00, sizeof(g_media_path));
+        if(strlen(DEFAULT_PATH)<CONFIG_VALUE_LEN_MAX)
+        {
+          strncpy(g_media_path, DEFAULT_PATH, strlen(DEFAULT_PATH));
+          g_media_path[strlen(DEFAULT_PATH)] = '\0';
+        }
+        else
+          _is_broken = true;
+    }
+    int ret = player_create(&player);
+    if (PLAYER_ERROR_NONE != ret) {
+        _is_broken = true;
+        return;
+    }
+}
+
+void utc_media_player_streaming_cleanup(void)
+{
+    player_destroy(player);
+}
+
+int utc_media_player_get_streaming_download_progress_p(void)
+{
+    assert(!_is_broken);
+    int start;
+    int current;
+
+    int ret = player_set_streaming_cookie(player, COOKIE_EXAMPLE, sizeof(COOKIE_EXAMPLE));
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_set_uri(player, g_media_path);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_prepare(player);
+    // if wifi isn't connected or internet modules don't exist, this error will be returned.
+    // and it is wrongly detected as a fail. so we will skip the test on these cases.
+    if(ret3==PLAYER_ERROR_CONNECTION_FAILED) {
+        fprintf(stderr, "check network status");
+        return 0;
+    }
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    int ret4 = player_start(player);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+
+    int ret5 = player_get_streaming_download_progress(player, &start, &current);
+    assert_eq(ret5, PLAYER_ERROR_NONE);
+
+    int ret6 = player_stop(player);
+    assert_eq(ret6, PLAYER_ERROR_NONE);
+
+    int ret7 = player_unprepare(player);
+    assert_eq(ret7, PLAYER_ERROR_NONE);
+
+    if (start < 0 || start > 100 || current < 0 || current > 100) {
+        assert(false);
+    }
+
+    return 0;
+}
+
+int utc_media_player_get_streaming_download_progress_n(void)
+{
+    int start;
+    int current;
+
+    int ret = player_set_streaming_cookie(player, COOKIE_EXAMPLE, sizeof(COOKIE_EXAMPLE));
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_set_uri(player, g_media_path);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_prepare(player);
+    // if wifi isn't connected or internet modules don't exist, this error will be returned.
+    // and it is wrongly detected as a fail. so we will skip the test on these cases.
+    if(ret3==PLAYER_ERROR_CONNECTION_FAILED) {
+        fprintf(stderr, "check network status");
+        return 0;
+    }
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    int ret4 = player_start(player);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+
+    int ret5 = player_get_streaming_download_progress(NULL, &start, &current);
+    assert_eq(ret5, PLAYER_ERROR_INVALID_PARAMETER);
+
+    int ret6 = player_stop(player);
+    assert_eq(ret6, PLAYER_ERROR_NONE);
+
+    int ret7 = player_unprepare(player);
+    assert_eq(ret7, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_get_progressive_download_status_p(void)
+{
+    assert(!_is_broken);
+    unsigned long current;
+    unsigned long total_size;
+
+    int ret = player_set_uri(player, g_media_path);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_set_progressive_download_path(player, download_path);
+    // if wifi isn't connected or internet modules don't exist, this error will be returned.
+    // and it is wrongly detected as a fail. so we will skip the test on these cases.
+    if(ret2==PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) {
+        fprintf(stderr, "check network status");
+        return 0;
+    }
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_prepare(player);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    int ret4 = player_start(player);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+
+    int ret5 = player_get_progressive_download_status(player, &current, &total_size);
+    assert_eq(ret5, PLAYER_ERROR_NONE);
+
+    wait_for_async();
+
+    int ret7 = player_unprepare(player);
+    assert_eq(ret7, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_get_progressive_download_status_n(void)
+{
+    unsigned long current;
+    unsigned long total_size;
+
+    int ret = player_set_uri(player, g_media_path);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_set_progressive_download_path(player, download_path);
+    // if wifi isn't connected or internet modules don't exist, this error will be returned.
+    // and it is wrongly detected as a fail. so we will skip the test on these cases.
+    if(ret2==PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) {
+        fprintf(stderr, "check network status");
+        return 0;
+    }
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_prepare(player);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    int ret4 = player_start(player);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+
+    int ret5 = player_get_progressive_download_status(NULL, &current, &total_size);
+    assert_eq(ret5, PLAYER_ERROR_INVALID_PARAMETER);
+
+    wait_for_async();
+
+    int ret7 = player_unprepare(player);
+    assert_eq(ret7, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_progressive_download_path_p(void)
+{
+    unsigned long current;
+    unsigned long total_size;
+
+    int ret = player_set_uri(player, g_media_path);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_set_progressive_download_path(player, download_path);
+    // if wifi isn't connected or internet modules don't exist, this error will be returned.
+    // and it is wrongly detected as a fail. so we will skip the test on these cases.
+    if(ret2==PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) {
+        fprintf(stderr, "check network status");
+        return 0;
+    }
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_progressive_download_path_n(void)
+{
+    assert(!_is_broken);
+    unsigned long current;
+    unsigned long total_size;
+
+    int ret = player_set_uri(player, g_media_path);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_set_progressive_download_path(NULL, download_path);
+    assert_eq(ret2, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_streaming_cookie_p(void)
+{
+    assert(!_is_broken);
+
+    int ret = player_set_streaming_cookie(player, COOKIE_EXAMPLE, sizeof(COOKIE_EXAMPLE));
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_streaming_cookie_n(void)
+{
+    assert(!_is_broken);
+
+    int ret = player_set_streaming_cookie(NULL, COOKIE_EXAMPLE, sizeof(COOKIE_EXAMPLE));
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
diff --git a/src/utc/player/utc-media-player.c b/src/utc/player/utc-media-player.c
new file mode 100755 (executable)
index 0000000..6026611
--- /dev/null
@@ -0,0 +1,1110 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media/player.h>
+#include <media/sound_manager.h>
+#include <glib.h>
+#include <Elementary.h>
+#include <storage.h>
+//& set: PlayerMedia
+
+
+static char* media="Color.mp4";
+static char* subtitle="subtitles_test_file.srt";
+static char* media_path=NULL;
+static char* subtitle_path=NULL;
+
+static player_h player;
+static bool _is_broken = false;
+static bool _is_pass = false;
+
+static GMainLoop *g_mainloop = NULL;
+
+static gboolean timeout_func(gpointer data)
+{
+    fprintf(stderr, "Timeout! Test case failed!\n");
+    g_main_loop_quit((GMainLoop *) data);
+    return FALSE;
+}
+
+static void wait_for_async()
+{
+    int timeout_id = 0;
+    g_mainloop = g_main_loop_new(NULL, FALSE);
+
+    timeout_id = g_timeout_add(5000, timeout_func, g_mainloop);
+    g_main_loop_run(g_mainloop);
+    g_source_remove(timeout_id);
+}
+
+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){
+          media_path=(char*)malloc(strlen(path)+strlen(media)+6);
+          snprintf(media_path, strlen(path)+strlen(media)+6, "%s/res/%s", path, media);
+          subtitle_path=(char*)malloc(strlen(path)+strlen(subtitle)+6);
+          snprintf(subtitle_path, strlen(path)+strlen(subtitle)+6, "%s/res/%s", path, subtitle);
+        return false;
+        }
+        return true;
+}
+
+void utc_media_player_startup(void)
+{
+    storage_foreach_device_supported(storage_device_cb, NULL);
+
+    int ret = player_create(&player);
+    if (PLAYER_ERROR_NONE != ret) {
+        _is_broken = true;
+        return;
+    }
+
+    ret = player_set_uri(player, media_path);
+    if (PLAYER_ERROR_NONE != ret) {
+        fprintf(stderr, "player didn't set uri\n");
+        _is_broken = true;
+    }
+
+    ret = player_prepare(player);
+    if (PLAYER_ERROR_NONE != ret) {
+        fprintf(stderr, "player isn't prepared\n");
+        _is_broken = true;
+    }
+
+}
+
+void utc_media_player_cleanup(void)
+{
+    player_unprepare(player);
+
+    if(player){
+        player_destroy(player);
+        player = NULL;
+    }
+}
+
+typedef struct{
+    char *album;
+    char *artist;
+    char *author;
+    char *genre;
+    char *title;
+    char *year;
+    char *audio_codec;
+    char *video_codec;
+    int audio_sample_rate;
+    int audio_channel;
+    int audio_bit_rate;
+    void *album_art;
+    int album_art_size;
+    int audio_tracks_count;
+}t_streamInfo;
+
+static t_streamInfo stream_info = {0};
+
+int utc_media_player_get_duration_p(void)
+{
+    assert(!_is_broken);
+    int duration;
+
+    int ret = player_get_duration(player, &duration);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_get_duration_n(void)
+{
+    int ret = player_get_duration(player, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static void player_seek_completed_cb_func(void *user_data) {
+
+}
+
+int utc_media_player_set_play_position_p(void)
+{
+    assert(!_is_broken);
+    int position = 10;
+
+    int ret = player_set_play_position(player, position, TRUE, player_seek_completed_cb_func, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_play_position_n(void)
+{
+    int position = -100;
+
+    int ret = player_set_play_position(player, position, TRUE, player_seek_completed_cb_func, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_get_play_position_p(void)
+{
+    assert(!_is_broken);
+    int position = 10;
+
+    int ret = player_set_play_position(player, position, TRUE, player_seek_completed_cb_func, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+    wait_for_async();
+
+    int millisecond;
+    int ret2 = player_get_play_position(player, &millisecond);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert(millisecond);
+
+    return 0;
+}
+
+int utc_media_player_get_play_position_n(void)
+{
+    int position;
+
+    int ret = player_get_play_position(NULL, &position);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_get_state_p(void)
+{
+    assert(!_is_broken);
+    player_state_e cur_state;
+
+    int ret = player_get_state(player, &cur_state);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+    assert_eq(cur_state, PLAYER_STATE_READY);
+
+    return 0;
+}
+
+int utc_media_player_get_state_n(void)
+{
+    int ret = player_get_state(player, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_playback_rate_p(void)
+{
+    float rate = 1.0f;
+
+    int ret = player_set_playback_rate(player, rate);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_playback_rate_n(void)
+{
+    float rate = 10.0f;
+
+    int ret = player_set_playback_rate(player, rate);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_looping_p(void)
+{
+    assert(!_is_broken);
+    bool looping = true;
+    bool is = false;
+
+    int ret = player_set_looping(player, looping);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_is_looping(player, &is);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert(is);
+
+    return 0;
+}
+
+int utc_media_player_set_looping_n(void)
+{
+    bool looping = true;
+
+    int ret = player_set_looping(NULL, looping);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_is_looping_p(void)
+{
+    assert(!_is_broken);
+    bool is = false;
+
+    int ret = player_set_looping(player, true);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_is_looping(player, &is);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert(is);
+
+    return 0;
+}
+
+int utc_media_player_is_looping_n(void)
+{
+    bool looping;
+
+    int ret = player_is_looping(NULL, &looping);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_mute_p(void)
+{
+    assert(!_is_broken);
+    bool muted = false;
+    bool is = true;
+
+    int ret = player_set_mute(player, muted);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_is_muted(player, &is);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert(!is);
+
+    return 0;
+}
+
+int utc_media_player_set_mute_n(void)
+{
+    bool muted = false;
+
+    int ret = player_set_mute(NULL, muted);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_is_muted_p(void)
+{
+    assert(!_is_broken);
+    bool muted = false;
+    bool is = true;
+
+    int ret = player_set_mute(player, muted);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_is_muted(player, &is);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert(!is);
+
+    return 0;
+}
+
+int utc_media_player_is_muted_n(void)
+{
+    bool muted;
+
+    int ret = player_is_muted(NULL, &muted);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_memory_buffer_p(void)
+{
+    assert(!_is_broken);
+
+    GMappedFile *file;
+    gsize file_size;
+    guint8* g_media_mem = NULL;
+
+    file = g_mapped_file_new (media_path, FALSE,NULL);
+    file_size = g_mapped_file_get_length (file);
+    g_media_mem = (guint8 *) g_mapped_file_get_contents (file);
+
+    int ret = player_unprepare(player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_set_memory_buffer(player, (void*)g_media_mem, file_size);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    g_mapped_file_unref(file);
+
+    return 0;
+}
+
+int utc_media_player_set_memory_buffer_n(void)
+{
+    int ret = player_set_memory_buffer(player, NULL, 0);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_volume_p(void)
+{
+    assert(!_is_broken);
+    float left = 0.5f, right  = 0.5f;
+
+    int ret = player_set_volume(player, left, right);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_volume_n(void)
+{
+    float left = 2.0f, right  = -3.0f;
+
+    int ret = player_set_volume(player, left, right);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_get_volume_p(void)
+{
+    assert(!_is_broken);
+    float left = 0.7f, right  = 0.7f;
+    float l = .0f, r = .0f;
+
+    int ret = player_set_volume(player, left, right);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+    int ret2 = player_get_volume(player, &l, &r);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    if (l != left || r > right) {
+        assert(false);
+    }
+
+    return 0;
+}
+
+int utc_media_player_get_volume_n(void)
+{
+    float left;
+
+    int ret = player_get_volume(player, &left, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_sound_type_p(void)
+{
+    assert(!_is_broken);
+    sound_type_e type;
+    player_state_e state;
+
+    int ret0 = player_get_state (player, &state);
+    assert_eq(ret0, PLAYER_ERROR_NONE);
+
+    if (state != PLAYER_STATE_IDLE){
+        player_unprepare(player);
+    }
+
+    if (state == PLAYER_STATE_IDLE){
+        int ret = player_set_sound_type(player, SOUND_TYPE_MEDIA);
+        player_prepare(player);
+        assert_eq(ret, PLAYER_ERROR_NONE);
+        int ret2 = sound_manager_get_current_sound_type(&type);
+        assert_eq(ret2, SOUND_MANAGER_ERROR_NONE);
+        assert_eq(SOUND_TYPE_MEDIA, type);
+
+    }
+    return 0;
+}
+
+int utc_media_player_set_sound_type_n(void)
+{
+    int ret = player_set_sound_type(NULL, SOUND_TYPE_MEDIA);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_subtitle_path_p(void)
+{
+    int ret;
+    assert(!_is_broken);
+
+    player_state_e cur_state;
+
+    ret = player_unprepare(player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    ret = player_set_uri(player, media_path);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    ret = player_set_subtitle_path(player, subtitle_path);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_subtitle_path_n(void)
+{
+    int ret = player_set_subtitle_path(NULL, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_display_visible_p(void)
+{
+    assert(!_is_broken);
+    bool is = false;
+
+    int ret = player_set_display_visible(player, true);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+    int ret2 = player_is_display_visible(player, &is);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert(is);
+
+    return 0;
+}
+
+int utc_media_player_set_display_visible_n(void)
+{
+    int ret = player_set_display_visible(NULL, true);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_is_display_visible_p(void)
+{
+    assert(!_is_broken);
+    bool is = false;
+
+    int ret = player_set_display_visible(player, true);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+    int ret2 = player_is_display_visible(player, &is);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert(is);
+
+    return 0;
+}
+
+int utc_media_player_is_display_visible_n(void)
+{
+    int ret = player_is_display_visible(NULL, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_display_mode_p(void)
+{
+    assert(!_is_broken);
+    player_display_mode_e mode;
+
+    int ret = player_set_display_mode(player, PLAYER_DISPLAY_MODE_FULL_SCREEN);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+    int ret2 = player_get_display_mode(player, &mode);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert_eq(mode, PLAYER_DISPLAY_MODE_FULL_SCREEN);
+
+    return 0;
+}
+
+int utc_media_player_set_display_mode_n(void)
+{
+    int ret = player_set_display_mode(NULL, PLAYER_DISPLAY_MODE_FULL_SCREEN);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_get_display_mode_p(void)
+{
+    assert(!_is_broken);
+    player_display_mode_e mode;
+
+    int ret = player_set_display_mode(player, PLAYER_DISPLAY_MODE_FULL_SCREEN);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+    int ret2 = player_get_display_mode(player, &mode);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert_eq(mode, PLAYER_DISPLAY_MODE_FULL_SCREEN);
+
+    return 0;
+}
+
+int utc_media_player_get_display_mode_n(void)
+{
+    player_display_mode_e mode;
+
+    int ret = player_get_display_mode(NULL, &mode);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_display_rotation_p(void)
+{
+    assert(!_is_broken);
+    player_display_rotation_e rotation;
+
+    int ret = player_set_display_rotation(player, PLAYER_DISPLAY_ROTATION_90);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+    int ret2 = player_get_display_rotation(player, &rotation);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert_eq(rotation, PLAYER_DISPLAY_ROTATION_90);
+
+    return 0;
+}
+
+int utc_media_player_set_display_rotation_n(void)
+{
+    int ret = player_set_display_rotation(NULL, PLAYER_DISPLAY_ROTATION_90);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_get_display_rotation_p(void)
+{
+    assert(!_is_broken);
+    player_display_rotation_e rotation;
+
+    int ret = player_set_display_rotation(player, PLAYER_DISPLAY_ROTATION_90);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+    int ret2 = player_get_display_rotation(player, &rotation);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert_eq(rotation, PLAYER_DISPLAY_ROTATION_90);
+
+    return 0;
+}
+
+int utc_media_player_get_display_rotation_n(void)
+{
+    int ret = player_get_display_rotation(NULL, PLAYER_DISPLAY_ROTATION_90);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_get_equalizer_bands_count_p(void)
+{
+    assert(!_is_broken);
+    int count = 0;
+
+    int ret2 = player_audio_effect_get_equalizer_bands_count(player, &count);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_get_equalizer_bands_count_n(void)
+{
+    int count;
+
+    int ret = player_audio_effect_get_equalizer_bands_count(NULL, &count);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_set_equalizer_band_level_p(void)
+{
+    assert(!_is_broken);
+    int count, min, max, level;
+
+    int ret2 = player_audio_effect_get_equalizer_bands_count(player, &count);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_audio_effect_get_equalizer_level_range(player, &min, &max);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    int ret4 = player_audio_effect_set_equalizer_band_level(player, count/2, min);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+
+    int ret5 = player_audio_effect_get_equalizer_band_level(player, count/2, &level);
+    assert_eq(ret5, PLAYER_ERROR_NONE);
+
+    assert_eq(level, min);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_set_equalizer_band_level_n(void)
+{
+    int count = 0;
+    int min = 0;
+
+    int ret = player_audio_effect_set_equalizer_band_level(NULL, count, min);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_get_equalizer_band_level_p(void)
+{
+    assert(!_is_broken);
+    int count, min, max, level;
+
+    int ret2 = player_audio_effect_get_equalizer_bands_count(player, &count);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_audio_effect_get_equalizer_level_range(player, &min, &max);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    int ret4 = player_audio_effect_set_equalizer_band_level(player, count/2, min);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+
+    int ret5 = player_audio_effect_get_equalizer_band_level(player, count/2, &level);
+    assert_eq(ret5, PLAYER_ERROR_NONE);
+
+    assert_eq(level, min);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_get_equalizer_band_level_n(void)
+{
+    int level;
+
+    int ret = player_audio_effect_get_equalizer_band_level(NULL, 2, &level);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_get_equalizer_level_range_p(void)
+{
+    assert(!_is_broken);
+    int min, max;
+
+    int ret2 = player_audio_effect_get_equalizer_level_range(player, &min, &max);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_get_equalizer_level_range_n(void)
+{
+    int min, max;
+
+    int ret = player_audio_effect_get_equalizer_level_range(NULL, &min, &max);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_set_equalizer_all_bands_p(void)
+{
+    assert(!_is_broken);
+    int i;
+    int count, min, max, level;
+
+    int ret2 = player_audio_effect_get_equalizer_bands_count(player, &count);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_audio_effect_get_equalizer_level_range(player, &min, &max);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    int *band_levels = (int*)malloc(sizeof(int) * count);
+    if(!band_levels)
+    {
+      fprintf(stderr, "band_levels malloc failed\n");
+      return 1;
+    }
+
+    for(i = 0; i < count; i++)
+        band_levels[i] = min;
+
+    int ret4 = player_audio_effect_set_equalizer_all_bands(player, band_levels, count);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+
+    for(i = 0; i < count; i++){
+        int ret5 = player_audio_effect_get_equalizer_band_level(player, i, &level);
+        assert_eq(ret5, PLAYER_ERROR_NONE);
+        assert_eq(level, min);
+    }
+
+    if(band_levels){
+        free(band_levels);
+        band_levels = NULL;
+    }
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_set_equalizer_all_bands_n(void)
+{
+    int i;
+    int count, min, max;
+
+    int ret2 = player_audio_effect_get_equalizer_bands_count(player, &count);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_audio_effect_get_equalizer_level_range(player, &min, &max);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    int *band_levels = (int*)malloc(sizeof(int) * count);
+    if(!band_levels)
+    {
+      fprintf(stderr, "band_levels malloc failed\n");
+      return 1;
+    }
+
+    for(i=0;i<count;i++)
+        band_levels[i] = min;
+
+    int ret4 = player_audio_effect_set_equalizer_all_bands(player, band_levels, count + 5);
+    assert_eq(ret4, PLAYER_ERROR_INVALID_PARAMETER);
+
+    if(band_levels){
+        free(band_levels);
+        band_levels = NULL;
+    }
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_equalizer_clear_p(void)
+{
+    int ret2 = player_audio_effect_equalizer_clear(player);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_equalizer_clear_n(void)
+{
+    int ret2 = player_audio_effect_equalizer_clear(NULL);
+    assert_eq(ret2, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_equalizer_is_available_p(void)
+{
+    bool available = 0;
+
+    int ret2 = player_audio_effect_equalizer_is_available(player, &available);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_equalizer_is_available_n(void)
+{
+    bool available = 0;
+
+    int ret2 = player_audio_effect_equalizer_is_available(NULL, &available);
+    assert_eq(ret2, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_get_content_info_p(void)
+{
+    assert(!_is_broken);
+    int ret = player_start(player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_get_content_info(player, PLAYER_CONTENT_INFO_ALBUM, &stream_info.album);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_get_content_info(player, PLAYER_CONTENT_INFO_ARTIST, &stream_info.artist);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    int ret4 = player_get_content_info(player, PLAYER_CONTENT_INFO_AUTHOR, &stream_info.author);
+    assert_eq(ret4, PLAYER_ERROR_NONE);
+
+    int ret5 = player_get_content_info(player, PLAYER_CONTENT_INFO_GENRE, &stream_info.genre);
+    assert_eq(ret5, PLAYER_ERROR_NONE);
+
+    int ret6 = player_get_content_info(player, PLAYER_CONTENT_INFO_TITLE, &stream_info.title);
+    assert_eq(ret6, PLAYER_ERROR_NONE);
+
+    int ret7 = player_get_content_info(player, PLAYER_CONTENT_INFO_YEAR, &stream_info.year);
+    assert_eq(ret7, PLAYER_ERROR_NONE);
+
+    int ret8 = player_stop(player);
+    assert_eq(ret8, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_get_content_info_n(void)
+{
+    int ret = player_get_content_info(NULL, PLAYER_CONTENT_INFO_ALBUM, &stream_info.album);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_get_codec_info_p(void)
+{
+    assert(!_is_broken);
+    int ret = player_start(player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_get_codec_info(player, &stream_info.audio_codec, &stream_info.video_codec);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_stop(player);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_get_codec_info_n(void)
+{
+    int ret = player_get_codec_info(NULL, &stream_info.audio_codec, &stream_info.video_codec);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_get_audio_stream_info_p(void)
+{
+    assert(!_is_broken);
+
+    int ret = player_start(player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_get_audio_stream_info(player, &stream_info.audio_sample_rate, &stream_info.audio_channel,
+        &stream_info.audio_bit_rate);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_stop(player);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_get_audio_stream_info_n(void)
+{
+    int ret = player_get_audio_stream_info(NULL, &stream_info.audio_sample_rate, &stream_info.audio_channel,
+        &stream_info.audio_bit_rate);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_get_album_art_p(void)
+{
+    assert(!_is_broken);
+    int ret = player_start(player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_get_album_art(player, &stream_info.album_art, &stream_info.album_art_size);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_stop(player);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_get_album_art_n(void)
+{
+    player_h local_player = NULL;
+
+    int ret = player_get_album_art(local_player, &stream_info.album_art, &stream_info.album_art_size);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_get_equalizer_band_frequency_p(void)
+{
+    assert(!_is_broken);
+    int frequency = 10;
+
+    int ret = player_audio_effect_get_equalizer_band_frequency(player, 0, &frequency);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_get_equalizer_band_frequency_n(void)
+{
+    int frequency = 10;
+
+    int ret = player_audio_effect_get_equalizer_band_frequency(NULL, 0, &frequency);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_get_equalizer_band_frequency_range_p(void)
+{
+    assert(!_is_broken);
+    int frequency = 10;
+
+    int ret = player_audio_effect_get_equalizer_band_frequency_range(player, 0, &frequency);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_audio_effect_get_equalizer_band_frequency_range_n(void)
+{
+    int frequency = 10;
+
+    int ret = player_audio_effect_get_equalizer_band_frequency_range(NULL, 0, &frequency);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_get_audio_latency_mode_p(void)
+{
+    assert(!_is_broken);
+    audio_latency_mode_e latency_mode;
+
+    int ret = player_set_audio_latency_mode(player, AUDIO_LATENCY_MODE_MID);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_get_audio_latency_mode(player, &latency_mode);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert_eq(latency_mode, AUDIO_LATENCY_MODE_MID);
+
+    return 0;
+}
+
+int utc_media_player_get_audio_latency_mode_n(void)
+{
+    audio_latency_mode_e *latency_mode = NULL;
+
+    int ret = player_get_audio_latency_mode(NULL, latency_mode);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+static void player_prepared_cb_func(void *user_data) {
+    _is_pass = true;
+}
+
+int utc_media_player_prepare_async_p(void)
+{
+    int ret;
+    assert(!_is_broken);
+
+    ret = player_unprepare(player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    ret = player_set_uri(player, media_path);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    ret = player_prepare_async(player, player_prepared_cb_func, NULL);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_prepare_async_n(void)
+{
+    int ret = player_prepare_async(NULL, player_prepared_cb_func, NULL);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_audio_latency_mode_p(void)
+{
+    assert(!_is_broken);
+    audio_latency_mode_e latency_mode = AUDIO_LATENCY_MODE_LOW;
+    audio_latency_mode_e get_latency_mode;
+
+    int ret = player_set_audio_latency_mode(player, latency_mode);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_get_audio_latency_mode(player, &get_latency_mode);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+    assert_eq(get_latency_mode, latency_mode);
+
+    return 0;
+}
+
+int utc_media_player_set_audio_latency_mode_n(void)
+{
+    int ret = player_set_audio_latency_mode(NULL, AUDIO_LATENCY_MODE_MID);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_streaming_user_agent_p(void)
+{
+    assert(!_is_broken);
+    const char *user_agent = "123456789";
+
+    int ret = player_unprepare(player);
+    assert_eq(ret, PLAYER_ERROR_NONE);
+
+    int ret2 = player_set_streaming_user_agent(player, user_agent, strlen(user_agent)+1);
+    assert_eq(ret2, PLAYER_ERROR_NONE);
+
+    int ret3 = player_prepare(player);
+    assert_eq(ret3, PLAYER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_player_set_streaming_user_agent_n(void)
+{
+    const char *user_agent = "123456789";
+
+    int ret = player_set_streaming_user_agent(NULL, user_agent, strlen(user_agent)+1);
+    assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_player_set_subtitle_position_offset_p(void)
+{
+  assert(!_is_broken);
+
+  int ret = player_unprepare(player);
+  assert_eq(ret, PLAYER_ERROR_NONE);
+
+  ret = player_set_subtitle_path(player, subtitle_path);
+  assert_eq(ret, PLAYER_ERROR_NONE);
+
+  ret = player_prepare(player);
+  assert_eq(ret, PLAYER_ERROR_NONE);
+
+  ret = player_start(player);
+  assert_eq(ret, PLAYER_ERROR_NONE);
+
+  ret = player_set_subtitle_position_offset(player, 5);
+  assert_eq(ret, PLAYER_ERROR_NONE);
+
+  ret = player_stop(player);
+  assert_eq(ret, PLAYER_ERROR_NONE);
+
+
+
+  return 0;
+}
+
+int utc_media_player_set_subtitle_position_offset_n(void)
+{
+  int ret = player_set_subtitle_position_offset(player, 5);
+  assert_eq(ret, PLAYER_ERROR_INVALID_STATE);
+
+  return 0;
+}
diff --git a/src/utc/privilege-info/CMakeLists.txt b/src/utc/privilege-info/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..93a2f14
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "privilege-info")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "privilege-info")
+SET(TC_SOURCES
+       utc-privilege-info.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       dlog
+       capi-security-privilege-manager
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME} 
+       ${${CAPI_LIB}_LIBRARIES}
+       "privilege-info"
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/privilege-info/nonpriv.list b/src/utc/privilege-info/nonpriv.list
new file mode 100755 (executable)
index 0000000..00f1c51
--- /dev/null
@@ -0,0 +1,2 @@
+privilege_info_get_display_name
+privilege_info_get_description
diff --git a/src/utc/privilege-info/public.list b/src/utc/privilege-info/public.list
new file mode 100755 (executable)
index 0000000..b9447b8
--- /dev/null
@@ -0,0 +1,5 @@
+privilege_info_get_description
+privilege_info_get_display_name
+privilege_info_get_description_by_pkgtype
+privilege_info_get_display_name_by_pkgtype
+
diff --git a/src/utc/privilege-info/tct-privilege-info-core.c b/src/utc/privilege-info/tct-privilege-info-core.c
new file mode 100755 (executable)
index 0000000..653d210
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-privilege-info-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/privilege-info/tct-privilege-info-core.h b/src/utc/privilege-info/tct-privilege-info-core.h
new file mode 100755 (executable)
index 0000000..c3fe149
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_PRIVILEGE_INFO_CORE_H__
+#define __TCT_PRIVILEGE_INFO_CORE_H__
+
+#include "testcase.h"
+
+
+extern int utc_privilege_info_get_display_name_p1(void);
+extern int utc_privilege_info_get_display_name_p2(void);
+extern int utc_privilege_info_get_display_name_n(void);
+extern int utc_privilege_info_get_description_p1(void);
+extern int utc_privilege_info_get_description_p2(void);
+extern int utc_privilege_info_get_description_n(void);
+extern int utc_privilege_info_get_display_name_by_pkgtype_p1(void);
+extern int utc_privilege_info_get_display_name_by_pkgtype_p2(void);
+extern int utc_privilege_info_get_display_name_by_pkgtype_p3(void);
+extern int utc_privilege_info_get_display_name_by_pkgtype_n(void);
+extern int utc_privilege_info_get_description_by_pkgtype_p1(void);
+extern int utc_privilege_info_get_description_by_pkgtype_p2(void);
+extern int utc_privilege_info_get_description_by_pkgtype_p3(void);
+extern int utc_privilege_info_get_description_by_pkgtype_n(void);
+
+testcase tc_array[] = {
+    {"utc_privilege_info_get_display_name_p1", utc_privilege_info_get_display_name_p1, NULL, NULL},
+    {"utc_privilege_info_get_display_name_p2", utc_privilege_info_get_display_name_p2, NULL, NULL},
+    {"utc_privilege_info_get_display_name_n", utc_privilege_info_get_display_name_n, NULL, NULL},
+    {"utc_privilege_info_get_description_p1", utc_privilege_info_get_description_p1, NULL, NULL},
+    {"utc_privilege_info_get_description_p2", utc_privilege_info_get_description_p2, NULL, NULL},
+    {"utc_privilege_info_get_description_n", utc_privilege_info_get_description_n, NULL, NULL},
+    {"utc_privilege_info_get_display_name_by_pkgtype_p1", utc_privilege_info_get_display_name_by_pkgtype_p1, NULL, NULL},
+    {"utc_privilege_info_get_display_name_by_pkgtype_p2", utc_privilege_info_get_display_name_by_pkgtype_p2, NULL, NULL},
+    {"utc_privilege_info_get_display_name_by_pkgtype_p3", utc_privilege_info_get_display_name_by_pkgtype_p3, NULL, NULL},
+    {"utc_privilege_info_get_display_name_by_pkgtype_n", utc_privilege_info_get_display_name_by_pkgtype_n, NULL, NULL},
+    {"utc_privilege_info_get_description_by_pkgtype_p1", utc_privilege_info_get_description_by_pkgtype_p1, NULL, NULL},
+    {"utc_privilege_info_get_description_by_pkgtype_p2", utc_privilege_info_get_description_by_pkgtype_p2, NULL, NULL},
+    {"utc_privilege_info_get_description_by_pkgtype_p3", utc_privilege_info_get_description_by_pkgtype_p3, NULL, NULL},
+    {"utc_privilege_info_get_description_by_pkgtype_n", utc_privilege_info_get_description_by_pkgtype_n, NULL, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_PRIVILEGE_INFO_CORE_H__
diff --git a/src/utc/privilege-info/utc-privilege-info.c b/src/utc/privilege-info/utc-privilege-info.c
new file mode 100755 (executable)
index 0000000..6370003
--- /dev/null
@@ -0,0 +1,236 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <dlog.h>
+#include <privilege_information.h>
+#include <stdio.h>
+#include "assert.h"
+
+
+
+int utc_privilege_info_get_display_name_p1(void)
+{
+       int ret = PRVINFO_ERROR_NONE;
+       char* api_version = "2.3";
+       char* display_name = NULL;
+       char* core_privilege_name = "http://tizen.org/privilege/account.read";
+
+       ret = privilege_info_get_display_name(api_version, core_privilege_name, &display_name);
+       assert_eq(ret, PRVINFO_ERROR_NONE);
+       free(display_name);
+       return 0;
+}
+
+int utc_privilege_info_get_display_name_p2(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+       char* api_version = "2.3";
+    char* display_name = NULL;
+       char* not_exist_privilege_name = "http://tizen.org/privilege/badge.adminnnnnnnnn";
+       char* not_exist_privilege_display_name = "badge.adminnnnnnnnn";
+       int out_param_check = 1;
+
+    ret = privilege_info_get_display_name(api_version, not_exist_privilege_name, &display_name);
+       if(strcmp(display_name,not_exist_privilege_display_name)==0)
+       {
+               out_param_check = 0;
+       }
+       assert_eq(out_param_check, 0);
+    assert_eq(ret, PRVINFO_ERROR_NONE);
+       free(display_name);
+    return 0;
+}
+
+int utc_privilege_info_get_display_name_n(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+    char* display_name = NULL;
+
+    ret = privilege_info_get_display_name(NULL, NULL, &display_name);
+    assert_eq(ret, PRVINFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_privilege_info_get_description_p1(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+       char* api_version="2.3";
+    char* description = NULL;
+    char* core_privilege_name = "http://tizen.org/privilege/account.read";
+
+    ret = privilege_info_get_description(api_version, core_privilege_name, &description);
+
+    assert_eq(ret, PRVINFO_ERROR_NONE);
+       free(description);
+    return 0;
+}
+
+int utc_privilege_info_get_description_p2(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+       char* api_version = "2.3";
+    char* description = NULL;
+    char* not_exist_privilege_name = "http://tizen.org/privilege/badge.adminnnnnnnnn";
+
+    ret = privilege_info_get_description(api_version, not_exist_privilege_name, &description);
+
+    assert_eq(ret, PRVINFO_ERROR_NONE);
+       free(description);
+    return 0;
+}
+
+int utc_privilege_info_get_description_n(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+    char* description = NULL; 
+
+    ret = privilege_info_get_description(NULL, NULL, &description);
+    assert_eq(ret, PRVINFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+
+
+//
+
+int utc_privilege_info_get_display_name_by_pkgtype_p1(void)
+{
+       int ret = PRVINFO_ERROR_NONE;
+       char* api_version = "2.3";
+       const char* package_type = "PRVINFO_PACKAGE_TYPE_NATIVE";
+       char* display_name = NULL;
+       char* core_privilege_name = "http://tizen.org/privilege/account.read";
+
+       ret = privilege_info_get_display_name_by_pkgtype(package_type, api_version, core_privilege_name, &display_name);
+       assert_eq(ret, PRVINFO_ERROR_NONE);
+       free(display_name);
+       return 0;
+}
+
+int utc_privilege_info_get_display_name_by_pkgtype_p2(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+       char* api_version = "2.3";
+       const char* package_type = "PRVINFO_PACKAGE_TYPE_NATIVE";
+    char* display_name = NULL;
+       char* not_exist_privilege_name = "http://tizen.org/privilege/badge.adminnnnnnnnn";
+       char* not_exist_privilege_display_name = "badge.adminnnnnnnnn";
+       int out_param_check = 1;
+
+    ret = privilege_info_get_display_name_by_pkgtype(package_type, api_version, not_exist_privilege_name, &display_name);
+       if(strcmp(display_name,not_exist_privilege_display_name)==0)
+       {
+               out_param_check = 0;
+       }
+       assert_eq(out_param_check, 0);
+    assert_eq(ret, PRVINFO_ERROR_NONE);
+       free(display_name);
+    return 0;
+}
+
+
+int utc_privilege_info_get_display_name_by_pkgtype_p3(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+    char* api_version = "2.2";
+    const char* native_package_type = "PRVINFO_PACKAGE_TYPE_NATIVE";
+    char* display_name = NULL;
+    char* web_privilege_name = "http://tizen.org/privilege/filesystem.read";
+    char* package_type_mismatched_privilege_display_name = "filesystem.read";
+    int out_param_check = 1;
+
+    ret = privilege_info_get_display_name_by_pkgtype(native_package_type, api_version, web_privilege_name, &display_name);
+    if(strcmp(display_name,package_type_mismatched_privilege_display_name)==0)
+    {
+        out_param_check = 0;
+    }
+    assert_eq(out_param_check, 0);
+    assert_eq(ret, PRVINFO_ERROR_NONE);                                                                                                                                                
+    free(display_name);
+    return 0;
+}
+
+
+int utc_privilege_info_get_display_name_by_pkgtype_n(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+       const char* package_type = "PRVINFO_PACKAGE_TYPE_NATIVE";
+    char* display_name = NULL;
+
+    ret = privilege_info_get_display_name_by_pkgtype(package_type, NULL, NULL, &display_name);
+    assert_eq(ret, PRVINFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_privilege_info_get_description_by_pkgtype_p1(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+       char* api_version="2.3";
+       const char* package_type = "PRVINFO_PACKAGE_TYPE_NATIVE";
+    char* description = NULL;
+    char* core_privilege_name = "http://tizen.org/privilege/account.read";
+
+    ret = privilege_info_get_description_by_pkgtype(package_type, api_version, core_privilege_name, &description);
+
+    assert_eq(ret, PRVINFO_ERROR_NONE);
+       free(description);
+    return 0;
+}
+
+int utc_privilege_info_get_description_by_pkgtype_p2(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+       char* api_version = "2.3";
+       const char* package_type = "PRVINFO_PACKAGE_TYPE_NATIVE";
+    char* description = NULL;
+    char* not_exist_privilege_name = "http://tizen.org/privilege/badge.adminnnnnnnnn";
+
+    ret = privilege_info_get_description_by_pkgtype(package_type, api_version, not_exist_privilege_name, &description);
+
+    assert_eq(ret, PRVINFO_ERROR_NONE);
+       free(description);
+    return 0;
+}
+
+int utc_privilege_info_get_description_by_pkgtype_p3(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+    char* api_version = "2.2";
+    const char* native_package_type = "PRVINFO_PACKAGE_TYPE_NATIVE";
+    char* description = NULL;
+    char* web_privilege_name = "http://tizen.org/privilege/filesystem.read";
+
+    ret = privilege_info_get_display_name_by_pkgtype(native_package_type, api_version, web_privilege_name, &description);
+    assert_eq(ret, PRVINFO_ERROR_NONE);                                                                                                                                                
+    free(description);
+    return 0;
+}
+
+
+int utc_privilege_info_get_description_by_pkgtype_n(void)
+{
+    int ret = PRVINFO_ERROR_NONE;
+       const char* package_type = "PRVINFO_PACKAGE_TYPE_NATIVE";
+    char* description = NULL; 
+
+    ret = privilege_info_get_description_by_pkgtype(package_type, NULL, NULL, &description);
+    assert_eq(ret, PRVINFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
diff --git a/src/utc/push/CMakeLists.txt b/src/utc/push/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..605c285
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "push")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "push")
+SET(TC_SOURCES
+       utc-sppc-service.c
+       sppc-common.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-appfw-application
+       glib-2.0
+       libcurl
+       json-glib-1.0
+       dlog
+       capi-system-info
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       capi-appfw-application
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/push/public.list b/src/utc/push/public.list
new file mode 100755 (executable)
index 0000000..509a47e
--- /dev/null
@@ -0,0 +1,18 @@
+push_service_app_control_to_noti_data
+push_service_connect
+push_service_deregister
+push_service_disconnect
+push_service_free_notification
+push_service_get_notification_data
+push_service_get_notification_message
+push_service_get_notification_time
+push_service_get_registration_id
+push_service_get_unread_notification
+push_service_register
+push_service_request_unread_notification
+push_service_app_control_to_notification
+push_service_get_notification_sender
+push_service_get_notification_session_info
+push_service_get_notification_request_id
+push_service_get_notification_type
+
diff --git a/src/utc/push/sppc-common.c b/src/utc/push/sppc-common.c
new file mode 100755 (executable)
index 0000000..5e27b6e
--- /dev/null
@@ -0,0 +1,603 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <push-service.h>
+#include <app_control.h>
+#include <string.h>
+#include "sppc-common.h"
+
+// For the sending feature
+#include <json-glib/json-glib.h>
+#include <curl/curl.h>
+#define APP_SECRET_LENGTH 50
+#define APP_DATA_MAX_SIZE 4096
+#define ALERT_MESSAGE_MAX_LENGTH 127
+#define MAX_BODY_LENGTH        APP_DATA_MAX_SIZE + 500
+#define MAX_HEADER_LENGTH 100
+#define SPP_ID_MAX_LENGTH 128
+#define SPP_ID_MIN_LENGTH 10
+#define CURL_RES_MAX_STRING 500
+
+int CurlDebugCallback(CURL *handle, curl_infotype type, char *data, size_t size, void *userptr)
+{
+         const char *text;
+         (void)handle; /* prevent compiler warning */
+
+         switch (type) {
+         case CURLINFO_TEXT:
+#if DEBUG
+                 _LOG("Info = %s", data);
+#endif
+                 return 0;
+         default: /* in case a new one is introduced to shock us */
+           return 0;
+
+         case CURLINFO_HEADER_OUT:
+           text = "=> Send header";
+           break;
+         case CURLINFO_DATA_OUT:
+           text = "=> Send data";
+           break;
+         case CURLINFO_SSL_DATA_OUT:
+           text = "=> Send SSL data";
+           break;
+         case CURLINFO_HEADER_IN:
+           text = "<= Recv header";
+           break;
+         case CURLINFO_DATA_IN:
+           text = "<= Recv data";
+           break;
+         case CURLINFO_SSL_DATA_IN:
+           text = "<= Recv SSL data";
+           break;
+         }
+#if DEBUG
+         _LOG("Info = %s", text);
+#endif
+         return 0;
+}
+
+int GetResultFromJson(char* json_string)
+{
+       gint i = 0;
+       int retval = 0;
+       JsonParser *parser;
+       gboolean ret = FALSE;
+
+       if (NULL == json_string)
+       {
+               _LOG("json_string is NULL");
+               return -1;
+       }
+       parser = json_parser_new();
+
+       if(parser == NULL)
+       {
+#if DEBUG
+               _LOG("json parsor is NULL");
+#endif
+               goto FINALLY;
+       }
+
+       if (!JSON_IS_PARSER(parser))
+       {
+               _LOG("Parser creation failed.");
+               goto FINALLY;
+       }
+
+       ret = json_parser_load_from_data(parser, json_string, strlen(json_string), NULL);
+       if (FALSE == ret)
+       {
+               _LOG("Parser load failed");
+               goto FINALLY;
+       }
+
+       JsonObject *objnode = json_node_get_object(json_parser_get_root(parser));
+       if (objnode == NULL)
+       {
+               _LOG("object node is NULL");
+               goto FINALLY;
+       }
+
+       JsonNode* node = json_object_get_member(objnode, "results");
+       if (node == NULL)
+       {
+               _LOG("Node is null");
+               goto FINALLY;
+       }
+
+       JsonArray* jsonArray = json_node_get_array(node);
+       if (jsonArray == NULL)
+       {
+               _LOG("Json Array is NULL");
+               goto FINALLY;
+       }
+
+       int length = json_array_get_length(jsonArray);
+       for (i = 0; i < length; i++)
+       {
+               JsonNode *jsonNode = json_array_get_element(jsonArray, i);
+               JsonObject* obj = json_node_get_object(jsonNode);
+               char *status_msg = NULL;
+
+               retval = json_object_get_int_member(obj, "statusCode");
+               status_msg = g_strndup(json_object_get_string_member(obj, "statusMsg"), 100);
+
+               if (status_msg)
+               {
+                       g_free(status_msg);
+               }
+       }
+
+       FINALLY:
+       {
+               g_object_unref (parser);
+       }
+       return retval == 1000 ? 0 : -1;
+}
+
+size_t CurlResponseCallback(char *ptr, size_t size, size_t nmemb, void *userdata)
+{
+       int nRet = 0;
+       int *curl_response = (int *) userdata;
+       char response_string[CURL_RES_MAX_STRING+1];
+       strncpy(response_string, ptr, CURL_RES_MAX_STRING);
+
+       if (CURL_RES_MAX_STRING < strlen(ptr)) {
+               response_string[CURL_RES_MAX_STRING] = '\0';
+       }
+
+       nRet = GetResultFromJson(response_string);
+       if (!nRet)
+       {
+               _LOG("Request successfully sent");
+               *curl_response = 0;
+       }
+#if DEBUG
+       _LOG("CurlResponseCallback Response string is = %s", response_string);
+#endif
+       return size*nmemb;
+}
+
+int CheckOutgoingNotification(OutgoingNotification *pstNotificationInfo)
+{
+       int ret;
+
+       // NULL check
+       if (!pstNotificationInfo->app_id) {
+               _LOG("app_id is NULL");
+               return 1;
+       }
+       if (!pstNotificationInfo->app_secret)   {
+               _LOG("app_secret is NULL");
+               return 1;
+       }
+
+       if (!pstNotificationInfo->reg_id)       {
+               _LOG("reg_id is NULL");
+               return 1;
+       }
+
+       if (!pstNotificationInfo->request_id)   {
+               _LOG("request_id is NULL");
+               return 1;
+       }
+
+       // Size check
+       ret = strnlen(pstNotificationInfo->app_id, SPP_ID_MAX_LENGTH+1);
+       if ( ret > SPP_ID_MAX_LENGTH && ret < SPP_ID_MIN_LENGTH) {
+               _LOG("app_id [%s] : wrong length", pstNotificationInfo->app_id);
+               return 1;
+       }
+
+
+       ret = strnlen(pstNotificationInfo->app_secret, APP_SECRET_LENGTH+1);
+       if ( ret > APP_SECRET_LENGTH) {
+               _LOG("app_secret [%s]  : wrong length", pstNotificationInfo->app_secret);
+               return 1;
+       }
+
+       ret = strnlen(pstNotificationInfo->alert_message, ALERT_MESSAGE_MAX_LENGTH+1);
+       if ( ret > ALERT_MESSAGE_MAX_LENGTH) {
+               _LOG("alert_message [%s] is too long or too short", pstNotificationInfo->alert_message);
+               return 1;
+       }
+
+       ret = strnlen(pstNotificationInfo->app_data, APP_DATA_MAX_SIZE+1);
+       if ( ret > APP_DATA_MAX_SIZE) {
+               _LOG("app_data [%s] is too long or too short", pstNotificationInfo->app_data);
+               return 1;
+       }
+
+       if (pstNotificationInfo->badge_number < 0 || pstNotificationInfo->badge_number > 1000) {
+               _LOG("badge size is out of range!!");
+               return 1;
+       }
+
+       return 0;
+}
+
+int SendNotificationUsingCurl(OutgoingNotification *pstNotificationInfo, bool verbose)
+{
+
+       char app_id_str[23];
+       char app_secret_str[50];
+
+       char *server_address = NULL;
+       char body[MAX_BODY_LENGTH];
+       int current_size = 0;
+
+       char *temp_str= NULL;
+
+       struct curl_slist *header_list = NULL;
+       CURL *curl_handle;
+       CURLcode curl_err;
+
+       int curl_response = PUSH_SERVICE_ERROR_NOT_CONNECTED;
+       int ret =0;
+
+       // Determine RQM server
+       if (strncmp(pstNotificationInfo->reg_id, "00", 2) == 0) {
+               server_address = "https://useast.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "01", 2) == 0) {
+               server_address = "https://uswest.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "02", 2) == 0) {
+               server_address = "https://apsoutheast.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "03", 2) == 0) {
+               server_address = "https://euwest.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "04", 2) == 0) {
+               server_address = "https://apnortheast.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "05", 2) == 0) {
+               server_address = "https://apkorea.push.samsungosp.com:8088/spp/pns/api/push";
+       }
+       else if (strncmp(pstNotificationInfo->reg_id, "06", 2) == 0) {
+               server_address = "https://apchina.push.samsungosp.com.cn:8088/spp/pns/api/push";
+       }
+       else {
+               _LOG("REG_ID has a wrong prefix");
+       }
+
+
+       ////////////////////////////////////
+       // Create JSON query from here    //
+       ////////////////////////////////////
+
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "{");
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               _LOG("Buffer overflow");
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       // Add regID and requestID
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "\"regID\":\"%s\",\"requestID\":\"%s\"", pstNotificationInfo->reg_id, pstNotificationInfo->request_id);
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               _LOG("Buffer overflow");
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       // Add time_stamp
+       if (pstNotificationInfo->time_stamp>0)
+       {
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               ",\"timeStamp\":\"%ld\"", pstNotificationInfo->time_stamp);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       _LOG("Buffer overflow");
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       // Add type
+       if (pstNotificationInfo->type > 0 )
+       {
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               ",\"type\":\"%d\"", pstNotificationInfo->type);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       _LOG("Buffer overflow");
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       // Add delayDate
+       if (pstNotificationInfo->delay >0 )
+       {
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               ",\"delayDate\":\"%d\"", pstNotificationInfo->delay);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       _LOG("Buffer overflow");
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       // Add sender
+       if (pstNotificationInfo->sender)
+       {
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               ",\"sender\":\"%s\"", pstNotificationInfo->sender);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       _LOG("Buffer overflow");
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       // Add session info field
+       if (pstNotificationInfo->session_info)
+       {
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               ",\"sessionInfo\":\"%s\"", pstNotificationInfo->session_info);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       _LOG("Buffer overflow");
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       // Add message
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       ",\"message\":\"");
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               _LOG("Buffer overflow");
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               _LOG("Buffer overflow");
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       switch (pstNotificationInfo->action) {
+               case PUSH_ACTION_ALERT:
+                       temp_str = "ALERT";
+                       break;
+
+               case PUSH_ACTION_DISCARD:
+                       temp_str = "DISCARD";
+                       break;
+
+               case PUSH_ACTION_LAUNCH:
+                       temp_str = "LAUNCH";
+                       break;
+
+               case PUSH_ACTION_SILENT:
+                       temp_str = "SILENT";
+                       break;
+               default :
+                       _LOG("Invalid action");
+                       return PUSH_SERVICE_ERROR_INVALID_PARAMETER;
+       }
+
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "action=%s", temp_str);
+
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               _LOG("Buffer overflow");
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       if (pstNotificationInfo->action == PUSH_ACTION_ALERT) {
+
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "&alartMessage=%s", pstNotificationInfo->alert_message);
+
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       _LOG("Buffer overflow");
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       if (pstNotificationInfo->badge_option != PUSH_BADGE_OPTION_NONE) {
+
+               switch (pstNotificationInfo->badge_option) {
+                       case PUSH_BADGE_OPTION_INCREASE:
+                               temp_str = "INCREASE";
+                               break;
+
+                       case PUSH_BADGE_OPTION_DECREASE:
+                               temp_str = "DECREASE";
+                               break;
+
+                       case PUSH_BADGE_OPTION_SET:
+                               temp_str = "SET";
+                               break;
+
+                       default:
+                               _LOG("Invalid badge option");
+                               return PUSH_SERVICE_ERROR_INVALID_PARAMETER;
+                               break;
+               }
+
+               ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                               "&badgeOption=%s&badgeNumber=%d", temp_str, pstNotificationInfo->badge_number);
+               current_size += ret;
+               if (current_size >= MAX_BODY_LENGTH)
+               {
+                       _LOG("Buffer overflow");
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+       }
+
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "\"");
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               _LOG("Buffer overflow");
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       // Add appData
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       ",\"appData\":\"%s\"", pstNotificationInfo->app_data);
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               _LOG("Buffer overflow");
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       // Close the json query
+       ret = snprintf(body+current_size, MAX_BODY_LENGTH-current_size,
+                       "}");
+       current_size += ret;
+       if (current_size >= MAX_BODY_LENGTH)
+       {
+               _LOG("Buffer overflow");
+               return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+       }
+
+       ///////////////////////////////////////
+       // End of creating the JSON query    //
+       ///////////////////////////////////////
+
+       // Send noti to the RQM server using LIBCURL
+       do {
+
+               // Initiate the CURL handle
+               curl_handle = curl_easy_init();
+
+               ret = snprintf(app_id_str, sizeof(app_id_str), "appID:%s", pstNotificationInfo->app_id);
+               if (ret == sizeof(app_id_str)) {
+                       _LOG("Buffer overflow-app_id");
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+
+               ret = snprintf(app_secret_str, sizeof(app_secret_str), "appSecret:%s", pstNotificationInfo->app_secret);
+               if (ret == sizeof(app_secret_str)) {
+                       _LOG("Buffer overflow-app_secret");
+                       return PUSH_SERVICE_ERROR_OUT_OF_MEMORY;
+               }
+
+               // Print the headers
+
+               // Add the headers to the CURL handle
+               header_list = curl_slist_append(header_list, app_id_str);
+               header_list = curl_slist_append(header_list, app_secret_str);
+               curl_err = curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, header_list);
+               if ( curl_err != CURLE_OK ) {
+                       _LOG("CURL_ERR:header_list [%d]", curl_err);
+                       ret = PUSH_SERVICE_ERROR_OPERATION_FAILED;
+                       break;
+               }
+
+               // Link the data to post
+               curl_err = curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDS, body);
+               if ( curl_err != CURLE_OK ) {
+                       _LOG("CURL_ERR:body [%d]", curl_err);
+                       ret = PUSH_SERVICE_ERROR_OPERATION_FAILED;
+                       break;
+               }
+
+               // Link the server address
+               curl_err = curl_easy_setopt(curl_handle, CURLOPT_URL, server_address);
+               if ( curl_err != CURLE_OK ) {
+                       _LOG("CURL_ERR:server_address [%d]", curl_err);
+                       ret = PUSH_SERVICE_ERROR_OPERATION_FAILED;
+                       break;
+               }
+
+               curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, 0L);
+               curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, CurlResponseCallback);
+               curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, &curl_response);
+               curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT_MS, 8000);
+
+               // Display DEBUG info
+               if (verbose)
+               {
+                       curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1L);
+                       curl_easy_setopt(curl_handle, CURLOPT_DEBUGFUNCTION, CurlDebugCallback);
+               }
+
+               // Perform HTTP POST using CURL
+               curl_err = curl_easy_perform(curl_handle);
+               if ( curl_err != CURLE_OK ) {
+                       _LOG("CURL_ERR: perform [%d]", curl_err);
+                       ret = PUSH_SERVICE_ERROR_OPERATION_FAILED;
+                       break;
+               }
+
+               long lCodeReturned = 0L;
+               curl_easy_getinfo(curl_handle, CURLINFO_RESPONSE_CODE, &lCodeReturned);
+
+               _LOG("server status = %ld", lCodeReturned);
+
+               ret = curl_response;
+
+       } while (0);
+
+       curl_slist_free_all(header_list);
+       curl_easy_cleanup(curl_handle);
+
+       return ret;
+}
+
+int SendPushDataToServer(const char *push_app_id, const char *app_secret, const char *reg_id, const char *request_id,
+                                       const char *app_data, int app_data_size, const char *alert_message, push_action_e action,
+                                       push_badge_option_e badge_option, int badge_number, long time_stamp, int type, int delay,
+                                       const char *sender, bool verbose)
+{
+       int ret;
+       OutgoingNotification stOutgoingData;
+
+       stOutgoingData.app_id = push_app_id;
+       stOutgoingData.app_secret = app_secret;
+       stOutgoingData.reg_id = reg_id;
+       stOutgoingData.request_id = request_id;
+       stOutgoingData.app_data = app_data;
+       stOutgoingData.app_data_size = app_data_size;
+       stOutgoingData.alert_message = alert_message;
+       stOutgoingData.action = action;
+       stOutgoingData.badge_option = badge_option;
+       stOutgoingData.badge_number = badge_number;
+       stOutgoingData.time_stamp = time_stamp;
+       stOutgoingData.type = type;
+       stOutgoingData.delay = delay;
+       stOutgoingData.sender = sender;
+       stOutgoingData.session_info = "001001";
+
+       if (CheckOutgoingNotification(&stOutgoingData))
+       {
+               return PUSH_SERVICE_ERROR_INVALID_PARAMETER;
+       }
+
+       ret = SendNotificationUsingCurl(&stOutgoingData, verbose);
+
+       return ret;
+}
diff --git a/src/utc/push/sppc-common.h b/src/utc/push/sppc-common.h
new file mode 100755 (executable)
index 0000000..3ea6008
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __SPPC_COMMON_H__
+#define __SPPC_COMMON_H__
+
+#include <dlog.h>
+
+#define _LOG(fmt, args...) { \
+       dlog_print (DLOG_INFO, "core-push-tests", "[%s:%d] "fmt"\n", __func__, __LINE__, ##args); \
+}
+
+typedef enum {
+       PUSH_ACTION_DISCARD = 0,
+       PUSH_ACTION_ALERT,
+       PUSH_ACTION_SILENT,
+       PUSH_ACTION_LAUNCH,
+} push_action_e;
+
+typedef enum {
+       PUSH_BADGE_OPTION_MAINTAIN = 0,
+       PUSH_BADGE_OPTION_NONE = 0,
+       PUSH_BADGE_OPTION_INCREASE,
+       PUSH_BADGE_OPTION_DECREASE,
+       PUSH_BADGE_OPTION_SET,
+} push_badge_option_e;
+
+typedef struct outgoing_notification_s {
+        const char *app_id;
+        const char *app_secret;
+        const char *reg_id;
+        const char *request_id;
+        const char *sender;
+        const char *app_data;
+        int app_data_size;
+        const char *alert_message;
+        push_action_e action;
+        push_badge_option_e badge_option;
+        int badge_number;
+        int type;
+        int delay;
+        long time_stamp;
+       const char *session_info;
+} OutgoingNotification;
+
+int SendPushDataToServer(const char *push_app_id, const char *app_secret, const char *reg_id, const char *request_id,
+                                       const char *app_data, int app_data_size, const char *alert_message, push_action_e action,
+                                       push_badge_option_e badge_option, int badge_number, long time_stamp, int type, int delay,
+                                       const char *sender, bool verbose);
+
+#endif
diff --git a/src/utc/push/tct-push-core.c b/src/utc/push/tct-push-core.c
new file mode 100755 (executable)
index 0000000..b25aeaf
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-push-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/push/tct-push-core.h b/src/utc/push/tct-push-core.h
new file mode 100755 (executable)
index 0000000..d4f6e13
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_PUSH_CORE_H__
+#define __TCT_PUSH_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_push_service_startup(void);
+
+extern int utc_sppc_push_service_connect_n(void);
+extern int utc_sppc_push_service_connect_p(void);
+extern int utc_sppc_push_service_register_n(void);
+extern int utc_sppc_push_service_register_p(void);
+extern int utc_sppc_push_service_get_registration_id_p(void);
+extern int utc_sppc_push_service_get_registration_id_n(void);
+extern int utc_sppc_push_service_deregister_p(void);
+extern int utc_sppc_push_service_deregister_n(void);
+extern int utc_sppc_push_service_get_unread_notification_n(void);
+extern int utc_sppc_push_service_get_unread_notification_p(void);
+extern int utc_sppc_push_service_request_unread_notification_n(void);
+extern int utc_sppc_push_service_request_unread_notification_p(void);
+extern int utc_sppc_push_service_get_notification_data_n(void);
+extern int utc_sppc_push_service_get_notification_data_p(void);
+extern int utc_sppc_push_service_get_notification_message_n(void);
+extern int utc_sppc_push_service_get_notification_message_p(void);
+extern int utc_sppc_push_service_get_notification_time_n(void);
+extern int utc_sppc_push_service_get_notification_time_p(void);
+extern int utc_sppc_push_service_app_control_to_noti_data_n(void);
+extern int utc_sppc_push_service_get_notification_request_id_n(void);
+extern int utc_sppc_push_service_get_notification_request_id_p(void);
+extern int utc_sppc_push_service_get_notification_sender_n(void);
+extern int utc_sppc_push_service_get_notification_sender_p(void);
+extern int utc_sppc_push_service_get_notification_session_info_n(void);
+extern int utc_sppc_push_service_get_notification_session_info_p(void);
+extern int utc_sppc_push_service_get_notification_type_n(void);
+extern int utc_sppc_push_service_get_notification_type_p(void);
+
+testcase tc_array[] = {
+    {"utc_sppc_push_service_connect_n", utc_sppc_push_service_connect_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_connect_p", utc_sppc_push_service_connect_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_register_n", utc_sppc_push_service_register_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_register_p", utc_sppc_push_service_register_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_registration_id_p", utc_sppc_push_service_get_registration_id_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_registration_id_n", utc_sppc_push_service_get_registration_id_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_deregister_p", utc_sppc_push_service_deregister_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_deregister_n", utc_sppc_push_service_deregister_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_unread_notification_n", utc_sppc_push_service_get_unread_notification_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_unread_notification_p", utc_sppc_push_service_get_unread_notification_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_request_unread_notification_n", utc_sppc_push_service_request_unread_notification_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_request_unread_notification_p", utc_sppc_push_service_request_unread_notification_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_data_n", utc_sppc_push_service_get_notification_data_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_data_p", utc_sppc_push_service_get_notification_data_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_message_n", utc_sppc_push_service_get_notification_message_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_message_p", utc_sppc_push_service_get_notification_message_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_time_n", utc_sppc_push_service_get_notification_time_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_time_p", utc_sppc_push_service_get_notification_time_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_app_control_to_noti_data_n", utc_sppc_push_service_app_control_to_noti_data_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_request_id_n", utc_sppc_push_service_get_notification_request_id_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_request_id_p", utc_sppc_push_service_get_notification_request_id_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_sender_n", utc_sppc_push_service_get_notification_sender_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_sender_p", utc_sppc_push_service_get_notification_sender_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_session_info_n", utc_sppc_push_service_get_notification_session_info_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_session_info_p", utc_sppc_push_service_get_notification_session_info_p, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_type_n", utc_sppc_push_service_get_notification_type_n, utc_push_service_startup, NULL},
+    {"utc_sppc_push_service_get_notification_type_p", utc_sppc_push_service_get_notification_type_p, utc_push_service_startup, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_PUSH_CORE_H__
diff --git a/src/utc/push/utc-sppc-service.c b/src/utc/push/utc-sppc-service.c
new file mode 100755 (executable)
index 0000000..4c3c44b
--- /dev/null
@@ -0,0 +1,1200 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <push-service.h>
+#include <app_control.h>
+#include <string.h>
+#include <stdlib.h>
+#include <glib.h>
+#include <stdio.h>
+#include <system_info.h>
+
+#include "sppc-common.h"
+//& set: Push Service
+
+#define OP_NONE 0
+#define OP_REG 1
+/**
+ * UTC's push id
+ * utc's daily quota is very small
+ */
+#define APPID "7c58a4ac98388bba"
+#define APPSECRET "F0100FFE6907F9070F2CC355CEE3DD88"
+
+static bool push_supported= true;
+
+typedef enum {
+    CMD_GETID, CMD_DRG, CMD_END, CMD_UNREAD, CMD_UNREAD_ASYNC, CMD_SENDPUSH
+} Commands;
+
+typedef enum {
+    NOTIFY_GETUNREAD, NOTIFY_GETDATA, NOTIFY_GETMSG, NOTIFY_GETTIME,
+    NOTIFY_GETREQID, NOTIFY_GETSENDER, NOTIFY_GETSESSIONINFO, NOTIFY_GETTYPE, NOTIFY_NONE
+} NotificationOP;
+
+static bool get_service_error = false;
+static bool state_cb_error = false;
+static bool noti_cb_error = false;
+static bool start_error = false;
+static bool timeout_error = false;
+static int ret_error = 0;
+
+static gboolean timeout_func(gpointer data)
+{
+    _LOG("Timeout! Test case BLOCK!\n");
+    timeout_error = true;
+    g_main_loop_quit((GMainLoop *)data);
+    return FALSE;
+}
+
+static app_control_h _get_service(const char *tizen_app_id, const char *bd)
+{
+    char *key;
+    char *val;
+    char *s;
+    char *t;
+    app_control_h svc;
+
+    const char *d = ",";
+
+    int ret = app_control_create(&svc);
+    if(APP_CONTROL_ERROR_NONE != ret) {
+        _LOG("service_create() function failed!");
+        get_service_error = true;
+        return NULL;
+    }
+
+    if(!svc) {
+        _LOG("svc is NULL.");
+        return NULL;
+    }
+
+    if(tizen_app_id) {
+        ret = app_control_set_app_id(svc, tizen_app_id);
+        if(APP_CONTROL_ERROR_NONE != ret) {
+            _LOG("service_set_app_id() function failed!");
+            get_service_error = true;
+            return svc;
+        }
+    }
+
+    if(!bd) {
+        _LOG("bd is NULL.");
+        return svc;
+    }
+
+    val = NULL;
+    key = strdup(bd);
+
+    if(!key) {
+        _LOG("key is NULL.");
+        return svc;
+    }
+
+    t = strtok(key, d);
+
+    while (t) {
+        s = t;
+        while (*s) {
+            if(*s == ':') {
+                *s = '\0';
+                val = s + 1;
+                break;
+            }
+            s++;
+        }
+        if(*t && (val && *val)) {
+            ret = app_control_add_extra_data(svc, t, val);
+            if(APP_CONTROL_ERROR_NONE != ret) {
+                _LOG("service_add_extra_data(svc, t, val) function failed!");
+                get_service_error = true;
+                       free(key);
+                return svc;
+            }
+        }
+        t = strtok(NULL, d);
+    }
+
+    free(key);
+    return svc;
+}
+
+/**
+ * @brief Structures
+ */
+typedef struct {
+    Commands cmd;
+    const char *app_id;
+    const char *tizen_app_id;
+    const char *bd;
+    const char *userdata;
+} PushT;
+
+typedef struct {
+    push_service_connection_h conn;
+    PushT *pt;
+    GMainLoop *ml;
+    int op;
+    NotificationOP notify_op;
+    char *regid;
+} PushData;
+
+/**
+ * @brief Callback function
+ */
+static void _reg_cb(push_service_result_e res, const char *msg, void *data)
+{
+    _LOG("register callback result was called.");
+    PushData *pv = data;
+    if(CMD_END == pv->pt->cmd && NOTIFY_NONE == pv->notify_op) {
+        g_main_loop_quit(pv->ml);
+    }
+}
+
+static void _drg_cb(push_service_result_e res, const char *msg, void *data)
+{
+    _LOG("deregister callback result was called.");
+    PushData *pv = data;
+    if(NOTIFY_NONE == pv->notify_op) {
+        g_main_loop_quit(pv->ml);
+    }
+}
+
+static void _st_cb(push_service_state_e st, const char *err, void *data)
+{
+    _LOG("_st_cb was called.");
+
+    PushData *pv = data;
+    PushT *pt = pv->pt;
+    app_control_h svc = NULL;
+
+    if(OP_NONE == pv->op) {
+        if(NOTIFY_NONE == pv->notify_op) {
+            g_main_loop_quit(pv->ml);
+        }
+        return;
+    }
+
+    switch (st) {
+        case PUSH_SERVICE_STATE_UNREGISTERED: {
+            _LOG("State was PUSH_SERVICE_STATE_UNREGISTERED.");
+            get_service_error = false;
+            svc = _get_service(pt->tizen_app_id, pt->bd);
+            if(get_service_error) {
+                _LOG("_get_service() function failed!");
+                state_cb_error = true;
+                g_main_loop_quit(pv->ml);
+                break;
+            }
+
+            _LOG("push_service_register() function is being called.");
+            int ret = push_service_register(pv->conn, _reg_cb, pv);
+            if(PUSH_SERVICE_ERROR_NONE != ret) {
+                _LOG("push_service_register() function failed!");
+                state_cb_error = true;
+                g_main_loop_quit(pv->ml);
+            }
+            if(CMD_END == pt->cmd && NOTIFY_NONE == pv->notify_op) {
+                g_main_loop_quit(pv->ml);
+            }
+        } break;
+
+        case PUSH_SERVICE_STATE_REGISTERED: {
+            _LOG("State was PUSH_SERVICE_STATE_REGISTERED.");
+           /* get id */
+            if(CMD_GETID == pt->cmd) {
+                char* regid = NULL;
+                _LOG("push_service_get_registration_id() function is being called.");
+                int ret = push_service_get_registration_id(pv->conn, &regid);
+                if(PUSH_SERVICE_ERROR_NONE != ret) {
+                    _LOG("push_service_get_registration_id() function failed!");
+                    state_cb_error = true;
+                    g_main_loop_quit(pv->ml);
+                }
+                free(regid);
+            /* deregister */
+            } else if(CMD_DRG == pt->cmd || CMD_END == pt->cmd) {
+                _LOG("push_service_deregister() function is being called.");
+                int ret = push_service_deregister(pv->conn, _drg_cb, pv);
+                if(PUSH_SERVICE_ERROR_NONE != ret) {
+                    _LOG("push_service_deregister() function failed!");
+                    state_cb_error = true;
+                    g_main_loop_quit(pv->ml);
+                }
+            /* get unread notification */
+            } else if(CMD_UNREAD == pt->cmd) {
+                _LOG("push_service_get_unread_notification() function is being called.");
+                push_service_notification_h noti;
+                int ret = push_service_get_unread_notification(pv->conn, &noti);
+                if(PUSH_SERVICE_ERROR_NO_DATA != ret) {
+                    _LOG("push_service_get_unread_notification() function failed!");
+                    state_cb_error = true;
+                    g_main_loop_quit(pv->ml);
+                } else {
+                    push_service_free_notification(noti);
+                }
+            /* get unread notification async */
+            } else if(CMD_UNREAD_ASYNC == pt->cmd) {
+                _LOG("push_service_request_unread_notification() function is being called.");
+                int ret = push_service_request_unread_notification(pv->conn);
+                if(PUSH_SERVICE_ERROR_NONE != ret) {
+                    _LOG("push_service_request_unread_notification() function failed!");
+                    state_cb_error = true;
+                    g_main_loop_quit(pv->ml);
+                }
+            } else if(CMD_SENDPUSH == pt->cmd) {
+                _LOG("send push data to server");
+                int ret = push_service_get_registration_id(pv->conn, &pv->regid);
+                if (PUSH_SERVICE_ERROR_NONE != ret) {
+                    _LOG("push_service_get_registration_id() function failed!");
+                    state_cb_error = true;
+                    g_main_loop_quit(pv->ml);
+               } else {
+                    _LOG("regid : %s", pv->regid);
+                }
+            }
+
+            if(NOTIFY_NONE == pv->notify_op && CMD_END != pt->cmd) {
+                g_main_loop_quit(pv->ml);
+            }
+        } break;
+
+        default: {
+            _LOG("unknown status!");
+            state_cb_error = true;
+            g_main_loop_quit(pv->ml);
+        } break;
+    }
+}
+
+static void _noti_cb(const push_service_notification_h noti, void *data)
+{
+    _LOG("_noti_cb was called.");
+    PushData *pv = data;
+    int ret;
+
+    switch(pv->notify_op){
+        case NOTIFY_GETDATA: {
+            char *appdata = NULL;
+            _LOG("push_service_get_notification_data() function is being called.");
+            ret = push_service_get_notification_data(noti, &appdata);
+            if(PUSH_SERVICE_ERROR_NONE != ret) {
+                _LOG("push_service_get_notification_data() function failed!");
+                noti_cb_error = true;
+            }
+            free(appdata);
+        } break;
+
+        case NOTIFY_GETMSG: {
+            char *msg = NULL;
+            _LOG("push_service_get_notification_message() function is being called.");
+            ret = push_service_get_notification_message(noti, &msg);
+            if(PUSH_SERVICE_ERROR_NONE != ret) {
+                _LOG("push_service_get_notification_message() function failed!");
+                noti_cb_error = true;
+            }
+            free(msg);
+        } break;
+
+        case NOTIFY_GETTIME: {
+            long long int time = 0;
+            _LOG("push_service_get_notification_time() function is being called.");
+            ret = push_service_get_notification_time(noti, &time);
+            if(PUSH_SERVICE_ERROR_NONE != ret) {
+                _LOG("push_service_get_notification_time() function failed!");
+                noti_cb_error = true;
+            }
+        } break;
+
+        case NOTIFY_GETREQID: {
+            char *reqid = NULL;
+            _LOG("push_service_get_notification_request_id() function is being called.");
+            ret = push_service_get_notification_request_id(noti, &reqid);
+            if(PUSH_SERVICE_ERROR_NONE != ret) {
+                _LOG("push_service_get_notification_request_id() function failed!");
+                noti_cb_error = true;
+            }
+            free(reqid);
+        } break;
+        case NOTIFY_GETSENDER: {
+            char *sender = NULL;
+            _LOG("push_service_get_notification_sender() function is being called.");
+            ret = push_service_get_notification_sender(noti, &sender);
+            if(PUSH_SERVICE_ERROR_NONE != ret) {
+                _LOG("push_service_get_notification_sender() function failed!");
+                noti_cb_error = true;
+            }
+            free(sender);
+        } break;
+        case NOTIFY_GETSESSIONINFO: {
+            char *session = NULL;
+            _LOG("push_service_get_notification_session_info() function is being called.");
+            ret = push_service_get_notification_session_info(noti, &session);
+            if(PUSH_SERVICE_ERROR_NONE != ret) {
+                _LOG("push_service_get_notification_session_info() function failed!");
+                noti_cb_error = true;
+            }
+            free(session);
+        } break;
+
+       case NOTIFY_GETTYPE: {
+            int type = 0;
+            _LOG("push_service_get_notification_type() function is being called.");
+            ret = push_service_get_notification_type(noti, &type);
+            if(PUSH_SERVICE_ERROR_NONE != ret) {
+                _LOG("push_service_get_notification_type() function failed!");
+                noti_cb_error = true;
+            }
+        } break;
+
+        default: {
+
+        } break;
+    }
+
+    g_main_loop_quit(pv->ml);
+}
+
+static void _rgdg_cb(push_service_result_e result, const char *msg, void *user_data)
+{
+
+}
+
+void initialize_service(PushT* _pPushT, PushData* _pPushD)
+{
+    memset(_pPushT, 0, sizeof(PushT));
+    _pPushT->app_id = APPID;
+    _pPushT->cmd = CMD_END;
+    memset(_pPushD, 0, sizeof(PushData));
+    _pPushD->pt = _pPushT;
+    _pPushD->op = OP_NONE;
+    _pPushD->notify_op = NOTIFY_NONE;
+    _pPushD->regid = NULL;
+}
+
+void start_service(char *appid, PushT* _pPushT, PushData* _pPushD, int _op)
+{
+    int timeout_id = 0;
+
+    _pPushD->op = _op;
+
+    int r = push_service_connect(appid, _st_cb, _noti_cb, _pPushD, &_pPushD->conn);
+    if(PUSH_SERVICE_ERROR_NONE != r) {
+        _LOG("push_service_connect() function failed!");
+        ret_error = r;
+        start_error = true;
+        return;
+    }
+
+    _pPushD->ml = g_main_loop_new(NULL, FALSE);
+    timeout_id = g_timeout_add(25000, timeout_func, _pPushD->ml);
+    g_main_loop_run(_pPushD->ml);
+    g_source_remove(timeout_id);
+    g_main_loop_unref(_pPushD->ml);
+
+    if(timeout_error) {
+        start_error = true;
+    }
+
+    push_service_disconnect(_pPushD->conn);
+    _pPushD->conn = NULL;
+}
+
+void utc_push_service_startup(void)
+{
+
+    system_info_get_platform_bool("http://tizen.org/feature/network.push", &push_supported);
+
+}
+
+
+/**
+ * @brief Negative test case of push_service_connect()
+ */
+int utc_sppc_push_service_connect_n(void)
+{
+        
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    void *cb_data = NULL;
+    push_service_connection_h conn=NULL;
+
+    ret = push_service_connect(NULL, _st_cb, _noti_cb, cb_data, &conn);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_connect(APPID, NULL, _noti_cb, cb_data, &conn);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_connect(APPID, _st_cb, NULL, cb_data, &conn);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_connect(APPID, _st_cb, _noti_cb, cb_data, NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_connect()
+ */
+int utc_sppc_push_service_connect_p(void)
+{
+    PushT pt;
+    PushData pv;
+   
+
+    initialize_service(&pt, &pv);
+
+    start_error = false;
+    ret_error = 0;
+    start_service(APPID, &pt, &pv, OP_NONE);
+    if(!push_supported){ assert_eq(ret_error, PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert(!start_error);}
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_register()
+ */
+int utc_sppc_push_service_register_n(void)
+{
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+
+    int ret = push_service_register(NULL, _reg_cb, &pv);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_register((push_service_connection_h) pt.app_id, NULL, &pv);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_register()
+ */
+int utc_sppc_push_service_register_p(void)
+{
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+    start_service(APPID, &pt, &pv, OP_REG);
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ 
+       assert(!start_error);
+       assert(!state_cb_error);
+    }
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_get_registration_id()
+ */
+int utc_sppc_push_service_get_registration_id_p(void)
+{
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+
+    pt.cmd = CMD_GETID;
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+    start_service(APPID, &pt, &pv, OP_REG);
+
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ 
+        assert(!start_error);
+        assert(!state_cb_error);
+    }
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_get_registration_id()
+ */
+int utc_sppc_push_service_get_registration_id_n(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    push_service_connection_h conn = NULL;
+    char *regid = NULL;
+
+    ret = push_service_get_registration_id(conn, NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}    
+
+    ret = push_service_get_registration_id(NULL, &regid);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_deregister_p()
+ */
+int utc_sppc_push_service_deregister_p(void)
+{
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+
+    pt.cmd = CMD_DRG;
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+    start_service(APPID, &pt, &pv, OP_REG);
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ 
+        assert(!start_error);
+        assert(!state_cb_error);
+    }
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_deregister()
+ */
+int utc_sppc_push_service_deregister_n(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    push_service_connection_h conn = NULL;
+    void *data = NULL;
+
+    ret = push_service_deregister(NULL, _rgdg_cb, data);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_deregister(conn, NULL, data);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_deregister(conn, _rgdg_cb, NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_get_unread_notification()
+ */
+int utc_sppc_push_service_get_unread_notification_n(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    push_service_notification_h noti;
+
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+
+    ret = push_service_get_unread_notification(NULL, &noti);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_get_unread_notification(pv.conn, NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_get_unread_notification()
+ */
+int utc_sppc_push_service_get_unread_notification_p(void)
+{
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+    pt.cmd = CMD_UNREAD;
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+
+    start_service(APPID, &pt, &pv, OP_REG);
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ 
+        assert(!start_error);
+        assert(!state_cb_error);
+    }
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_request_unread_notification()
+ */
+int utc_sppc_push_service_request_unread_notification_n(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+
+    ret = push_service_request_unread_notification(NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_request_unread_notification()
+ */
+int utc_sppc_push_service_request_unread_notification_p(void)
+{
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+    pt.cmd = CMD_UNREAD_ASYNC;
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+
+    start_service(APPID, &pt, &pv, OP_REG);
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{
+        assert(!start_error);
+        assert(!state_cb_error);
+    }
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_get_notification_data()
+ */
+int utc_sppc_push_service_get_notification_data_n(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    push_service_notification_h noti = NULL;
+    char *data = NULL;
+
+    ret = push_service_get_notification_data(NULL, &data);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_get_notification_data(noti, NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_get_notification_data()
+ */
+int utc_sppc_push_service_get_notification_data_p(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+    pt.cmd = CMD_SENDPUSH;
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+
+    start_service(APPID, &pt, &pv, OP_REG);
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ 
+        assert(!start_error);
+        assert(!state_cb_error);
+
+        ret = SendPushDataToServer(APPID , APPSECRET, pv.regid,
+                                  "000101", "App_Data_to_send", 16,
+                                  "Alert-Message-to-Quick-Panel", PUSH_ACTION_ALERT,
+                                   PUSH_BADGE_OPTION_INCREASE, 1, 1L, 0, 0, APPID, true);
+        free(pv.regid);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OPERATION_FAILED);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OUT_OF_MEMORY);
+
+        pt.cmd = CMD_UNREAD_ASYNC;
+        pv.notify_op = NOTIFY_GETMSG;
+
+        state_cb_error = false;
+        start_error = false;
+        noti_cb_error = false;
+
+        start_service(APPID, &pt, &pv, OP_REG);
+
+        assert(!start_error);
+        assert(!state_cb_error);
+        assert(!noti_cb_error);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_get_notification_message()
+ */
+int utc_sppc_push_service_get_notification_message_n(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    push_service_notification_h noti = NULL;
+    char *msg = NULL;
+
+    ret = push_service_get_notification_message(noti, NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_get_notification_message(NULL, &msg);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_get_notification_message()
+ */
+int utc_sppc_push_service_get_notification_message_p(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+    pt.cmd = CMD_SENDPUSH;
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+
+    start_service(APPID, &pt, &pv, OP_REG);
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ 
+        assert(!start_error);
+        assert(!state_cb_error);
+
+        ret = SendPushDataToServer(APPID , APPSECRET, pv.regid,
+                                  "000101", "App_Data_to_send", 16,
+                                  "Alert-Message-to-Quick-Panel", PUSH_ACTION_ALERT,
+                                   PUSH_BADGE_OPTION_INCREASE, 1, 1L, 0, 0, APPID, true);
+        free(pv.regid);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OPERATION_FAILED);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OUT_OF_MEMORY);
+
+        pt.cmd = CMD_UNREAD_ASYNC;
+        pv.notify_op = NOTIFY_GETMSG;
+
+        state_cb_error = false;
+        start_error = false;
+        noti_cb_error = false;
+
+        start_service(APPID, &pt, &pv, OP_REG);
+
+        assert(!start_error);
+        assert(!state_cb_error);
+        assert(!noti_cb_error);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_get_notification_time()
+ */
+int utc_sppc_push_service_get_notification_time_n(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    push_service_notification_h noti = NULL;
+    long long int rtime;
+
+    ret = push_service_get_notification_time(noti, NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_get_notification_time(NULL, &rtime);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_get_notification_time()
+ */
+int utc_sppc_push_service_get_notification_time_p(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+    pt.cmd = CMD_SENDPUSH;
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+
+    start_service(APPID, &pt, &pv, OP_REG);
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ 
+        assert(!start_error);
+        assert(!state_cb_error);
+
+        ret = SendPushDataToServer(APPID , APPSECRET, pv.regid,
+                                  "000101", "App_Data_to_send", 16,
+                                  "Alert-Message-to-Quick-Panel", PUSH_ACTION_ALERT,
+                                   PUSH_BADGE_OPTION_INCREASE, 1, 1L, 0, 0, APPID, true);
+        free(pv.regid);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OPERATION_FAILED);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OUT_OF_MEMORY);
+
+        pt.cmd = CMD_UNREAD_ASYNC;
+        pv.notify_op = NOTIFY_GETTIME;
+
+        state_cb_error = false;
+        start_error = false;
+        noti_cb_error = false;
+
+        start_service(APPID, &pt, &pv, OP_REG);
+
+        assert(!start_error);
+        assert(!state_cb_error);
+        assert(!noti_cb_error);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_app_control_to_noti_data()
+ */
+int utc_sppc_push_service_app_control_to_noti_data_n(void)
+{
+    int ret;
+    char *notidata;
+    char *operation = "INVALID_OPERATION";
+    app_control_h app_control;
+
+    ret = app_control_create(&app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+
+    notidata = push_service_app_control_to_noti_data(NULL, operation);
+
+    ret=get_last_result();
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ 
+
+    assert_eq(notidata, NULL);
+
+    notidata = push_service_app_control_to_noti_data(app_control, NULL);
+    assert_eq(notidata, NULL);
+
+    ret = app_control_destroy(app_control);
+    assert_eq(ret, APP_CONTROL_ERROR_NONE);
+    }
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_get_notification_request_id()
+ */
+int utc_sppc_push_service_get_notification_request_id_n(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    push_service_notification_h noti = NULL;
+    char *id;
+
+    ret = push_service_get_notification_request_id(noti, NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_get_notification_request_id(NULL, &id);
+    
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_get_notification_request_id()
+ */
+int utc_sppc_push_service_get_notification_request_id_p(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+    pt.cmd = CMD_SENDPUSH;
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+
+    start_service(APPID, &pt, &pv, OP_REG);
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{
+        assert(!start_error);
+        assert(!state_cb_error);
+        
+        ret = SendPushDataToServer(APPID , APPSECRET, pv.regid,
+                                  "000101", "App_Data_to_send", 16,
+                                  "Alert-Message-to-Quick-Panel", PUSH_ACTION_ALERT,
+                                   PUSH_BADGE_OPTION_INCREASE, 1, 1L, 0, 0, APPID, true);
+        free(pv.regid);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OPERATION_FAILED);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OUT_OF_MEMORY);
+
+        pt.cmd = CMD_UNREAD_ASYNC;
+        pv.notify_op = NOTIFY_GETREQID;
+
+        state_cb_error = false;
+        start_error = false;
+        noti_cb_error = false;
+
+        start_service(APPID, &pt, &pv, OP_REG);
+
+        assert(!start_error);
+        assert(!state_cb_error);
+        assert(!noti_cb_error);
+    }
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_get_notification_sender()
+ */
+int utc_sppc_push_service_get_notification_sender_n(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    push_service_notification_h noti = NULL;
+    char *sender;
+
+    ret = push_service_get_notification_sender(noti, NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_get_notification_sender(NULL, &sender);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_get_notification_sender()
+ */
+int utc_sppc_push_service_get_notification_sender_p(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+    pt.cmd = CMD_SENDPUSH;
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+
+    start_service(APPID, &pt, &pv, OP_REG);
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{
+        assert(!start_error);
+        assert(!state_cb_error);
+
+        ret = SendPushDataToServer(APPID , APPSECRET, pv.regid,
+                                  "000101", "App_Data_to_send", 16,
+                                  "Alert-Message-to-Quick-Panel", PUSH_ACTION_ALERT,
+                                   PUSH_BADGE_OPTION_INCREASE, 1, 1L, 0, 0, APPID, true);
+        free(pv.regid);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OPERATION_FAILED);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OUT_OF_MEMORY);
+
+        pt.cmd = CMD_UNREAD_ASYNC;
+        pv.notify_op = NOTIFY_GETSENDER;
+
+        state_cb_error = false;
+        start_error = false;
+        noti_cb_error = false;
+
+        start_service(APPID, &pt, &pv, OP_REG);
+
+        assert(!start_error);
+        assert(!state_cb_error);
+        assert(!noti_cb_error);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_get_notification_session_info()
+ */
+int utc_sppc_push_service_get_notification_session_info_n(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    push_service_notification_h noti = NULL;
+    char *session;
+
+    ret = push_service_get_notification_session_info(noti, NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+
+    ret = push_service_get_notification_session_info(NULL, &session);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_get_notification_session_info()
+ */
+int utc_sppc_push_service_get_notification_session_info_p(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+    pt.cmd = CMD_SENDPUSH;
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+
+    start_service(APPID, &pt, &pv, OP_REG);
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{
+        assert(!start_error);
+        assert(!state_cb_error);
+    
+        ret = SendPushDataToServer(APPID , APPSECRET, pv.regid,
+                                  "000101", "App_Data_to_send", 16,
+                                  "Alert-Message-to-Quick-Panel", PUSH_ACTION_ALERT,
+                                   PUSH_BADGE_OPTION_INCREASE, 1, 1L, 0, 0, APPID, true);
+        free(pv.regid);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OPERATION_FAILED);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OUT_OF_MEMORY);
+
+        pt.cmd = CMD_UNREAD_ASYNC;
+        pv.notify_op = NOTIFY_GETSESSIONINFO;
+
+        state_cb_error = false;
+        start_error = false;
+        noti_cb_error = false;
+
+        start_service(APPID, &pt, &pv, OP_REG);
+
+        assert(!start_error);
+        assert(!state_cb_error);
+        assert(!noti_cb_error);
+    }
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of push_service_get_notification_type()
+ */
+int utc_sppc_push_service_get_notification_type_n(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    push_service_notification_h noti = NULL;
+    int type;
+
+    ret = push_service_get_notification_type(noti, NULL);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    ret = push_service_get_notification_type(NULL, &type);
+    if(!push_supported){assert_eq(ret,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ assert_eq(ret, PUSH_SERVICE_ERROR_INVALID_PARAMETER);}
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of push_service_get_notification_type()
+ */
+int utc_sppc_push_service_get_notification_type_p(void)
+{
+    int ret = PUSH_SERVICE_ERROR_NONE;
+    PushT pt;
+    PushData pv;
+
+    initialize_service(&pt, &pv);
+
+    pt.cmd = CMD_SENDPUSH;
+
+    state_cb_error = false;
+    start_error = false;
+    ret_error = 0;
+
+    start_service(APPID, &pt, &pv, OP_REG);
+    if(!push_supported){assert_eq(ret_error,PUSH_SERVICE_ERROR_NOT_SUPPORTED);}
+    else{ 
+        assert(!start_error);
+        assert(!state_cb_error);
+
+        ret = SendPushDataToServer(APPID , APPSECRET, pv.regid,
+                                  "000101", "App_Data_to_send", 16,
+                                  "Alert-Message-to-Quick-Panel", PUSH_ACTION_ALERT,
+                                   PUSH_BADGE_OPTION_INCREASE, 1, 1L, 0, 0, APPID, true);
+        free(pv.regid);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OPERATION_FAILED);
+        assert_neq(ret, PUSH_SERVICE_ERROR_OUT_OF_MEMORY);
+
+        pt.cmd = CMD_UNREAD_ASYNC;
+        pv.notify_op = NOTIFY_GETTYPE;
+
+        state_cb_error = false;
+        start_error = false;
+        noti_cb_error = false;
+
+        start_service(APPID, &pt, &pv, OP_REG);
+
+        assert(!start_error);
+        assert(!state_cb_error);
+        assert(!noti_cb_error);
+    }
+
+    return 0;
+}
+
diff --git a/src/utc/radio/CMakeLists.txt b/src/utc/radio/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..08ab7c2
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "radio")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-media-radio")
+SET(TC_SOURCES
+       utc-media-radio.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-system-info
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/radio/public.list b/src/utc/radio/public.list
new file mode 100755 (executable)
index 0000000..581545e
--- /dev/null
@@ -0,0 +1,19 @@
+radio_create
+radio_destroy
+radio_get_frequency
+radio_get_signal_strength
+radio_get_state
+radio_is_muted
+radio_scan_start
+radio_scan_stop
+radio_seek_down
+radio_seek_up
+radio_set_frequency
+radio_set_interrupted_cb
+radio_set_mute
+radio_set_scan_completed_cb
+radio_start
+radio_stop
+radio_unset_interrupted_cb
+radio_unset_scan_completed_cb
+
diff --git a/src/utc/radio/tct-radio-core.c b/src/utc/radio/tct-radio-core.c
new file mode 100755 (executable)
index 0000000..c968032
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-radio-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/radio/tct-radio-core.h b/src/utc/radio/tct-radio-core.h
new file mode 100755 (executable)
index 0000000..b7f1747
--- /dev/null
@@ -0,0 +1,101 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_RADIO_CORE_H__
+#define __TCT_RADIO_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_media_radio_startup(void);
+extern void utc_media_radio_cleanup(void);
+
+extern int utc_media_radio_get_state_p(void);
+extern int utc_media_radio_get_state_n(void);
+extern int utc_media_radio_start_p(void);
+extern int utc_media_radio_start_n(void);
+extern int utc_media_radio_set_frequency_p(void);
+extern int utc_media_radio_set_frequency_n(void);
+extern int utc_media_radio_get_frequency_p(void);
+extern int utc_media_radio_get_frequency_n(void);
+extern int utc_media_radio_seek_up_p(void);
+extern int utc_media_radio_seek_up_n(void);
+extern int utc_media_radio_seek_down_p(void);
+extern int utc_media_radio_seek_down_n(void);
+extern int utc_media_radio_scan_start_p(void);
+extern int utc_media_radio_scan_start_n(void);
+extern int utc_media_radio_scan_stop_p(void);
+extern int utc_media_radio_scan_stop_n(void);
+extern int utc_media_radio_set_mute_p(void);
+extern int utc_media_radio_set_mute_n(void);
+extern int utc_media_radio_is_muted_p(void);
+extern int utc_media_radio_is_muted_n(void);
+extern int utc_media_radio_set_scan_completed_cb_p(void);
+extern int utc_media_radio_set_scan_completed_cb_n(void);
+extern int utc_media_radio_unset_scan_completed_cb_p(void);
+extern int utc_media_radio_unset_scan_completed_cb_n(void);
+extern int utc_media_radio_set_interrupted_cb_p(void);
+extern int utc_media_radio_set_interrupted_cb_n(void);
+extern int utc_media_radio_unset_interrupted_cb_p(void);
+extern int utc_media_radio_unset_interrupted_cb_n(void);
+extern int utc_media_radio_get_signal_strength_p(void);
+extern int utc_media_radio_get_signal_strength_n(void);
+extern int utc_media_radio_stop_p(void);
+extern int utc_media_radio_stop_n(void);
+extern int utc_media_radio_destroy_p(void);
+extern int utc_media_radio_destroy_n(void);
+extern int utc_media_radio_create_p(void);
+extern int utc_media_radio_create_n(void);
+
+testcase tc_array[] = {
+    {"utc_media_radio_get_state_p", utc_media_radio_get_state_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_get_state_n", utc_media_radio_get_state_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_start_p", utc_media_radio_start_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_start_n", utc_media_radio_start_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_set_frequency_p", utc_media_radio_set_frequency_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_set_frequency_n", utc_media_radio_set_frequency_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_get_frequency_p", utc_media_radio_get_frequency_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_get_frequency_n", utc_media_radio_get_frequency_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_seek_up_p", utc_media_radio_seek_up_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_seek_up_n", utc_media_radio_seek_up_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_seek_down_p", utc_media_radio_seek_down_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_seek_down_n", utc_media_radio_seek_down_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_scan_start_p", utc_media_radio_scan_start_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_scan_start_n", utc_media_radio_scan_start_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_scan_stop_p", utc_media_radio_scan_stop_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_scan_stop_n", utc_media_radio_scan_stop_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_set_mute_p", utc_media_radio_set_mute_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_set_mute_n", utc_media_radio_set_mute_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_is_muted_p", utc_media_radio_is_muted_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_is_muted_n", utc_media_radio_is_muted_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_set_scan_completed_cb_p", utc_media_radio_set_scan_completed_cb_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_set_scan_completed_cb_n", utc_media_radio_set_scan_completed_cb_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_unset_scan_completed_cb_p", utc_media_radio_unset_scan_completed_cb_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_unset_scan_completed_cb_n", utc_media_radio_unset_scan_completed_cb_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_set_interrupted_cb_p", utc_media_radio_set_interrupted_cb_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_set_interrupted_cb_n", utc_media_radio_set_interrupted_cb_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_unset_interrupted_cb_p", utc_media_radio_unset_interrupted_cb_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_unset_interrupted_cb_n", utc_media_radio_unset_interrupted_cb_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_get_signal_strength_p", utc_media_radio_get_signal_strength_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_get_signal_strength_n", utc_media_radio_get_signal_strength_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_stop_p", utc_media_radio_stop_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_stop_n", utc_media_radio_stop_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_destroy_p", utc_media_radio_destroy_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_destroy_n", utc_media_radio_destroy_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_create_p", utc_media_radio_create_p, utc_media_radio_startup, utc_media_radio_cleanup},
+    {"utc_media_radio_create_n", utc_media_radio_create_n, utc_media_radio_startup, utc_media_radio_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_RADIO_CORE_H__
diff --git a/src/utc/radio/utc-media-radio.c b/src/utc/radio/utc-media-radio.c
new file mode 100755 (executable)
index 0000000..e6290be
--- /dev/null
@@ -0,0 +1,667 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <media/radio.h>
+#include "assert.h"
+
+
+radio_h radio;
+int sRet;
+static bool radio_supported=true;
+
+static void radio_completed_cb(int frequency, void *data)
+{
+
+}
+
+static void radio_interrupt_cb(radio_interrupted_code_e code, void *data)
+{
+
+}
+
+void utc_media_radio_startup(void)
+{
+    system_info_get_platform_bool("http://tizen.org/feature/fmradio", &radio_supported);
+
+    sRet = radio_create(&radio);
+
+}
+
+void utc_media_radio_cleanup(void)
+{
+       if (radio) {
+           radio_destroy(radio);
+       }
+}
+
+int utc_media_radio_get_state_p(void)
+{
+       int ret;
+       radio_state_e state;
+
+       if(radio_supported){    
+          assert_eq(sRet,RADIO_ERROR_NONE);
+       
+          ret = radio_get_state(radio, &state);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+
+          ret= radio_get_state(radio, &state);
+          assert_eq(ret,RADIO_ERROR_NOT_SUPPORTED);
+       }
+       
+    return 0;
+}
+
+int utc_media_radio_get_state_n(void)
+{
+       int ret;
+       radio_state_e state;
+
+       if(radio_supported){
+            assert_eq(sRet,RADIO_ERROR_NONE);
+
+           ret = radio_get_state(NULL, &state);
+            assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+
+           ret = radio_get_state(NULL, &state);
+            assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+
+       }
+       return 0;
+}
+
+int utc_media_radio_start_p(void)
+{
+       int ret;
+
+       if(radio_supported){
+            assert_eq(sRet,RADIO_ERROR_NONE);
+           ret = radio_start(radio);
+           
+           assert_eq(ret, RADIO_ERROR_NONE);
+    
+           radio_stop(radio);
+               }
+       else{
+
+           ret = radio_start(radio);
+            assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_media_radio_start_n(void)
+{
+       int ret;
+
+       if(radio_supported){
+            assert_eq(sRet,RADIO_ERROR_NONE);
+           ret = radio_start(NULL);
+            assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+           ret = radio_start(NULL);
+            assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+
+       }
+       return 0;
+}
+
+int utc_media_radio_set_frequency_p(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_set_frequency(radio, 91900);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+
+          ret = radio_set_frequency(radio, 91900);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+
+       }
+    return 0;
+
+}
+
+int utc_media_radio_set_frequency_n(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+
+          ret = radio_set_frequency(radio, 100);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       
+       }
+       else{
+
+          ret = radio_set_frequency(radio, 100);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+
+       }
+       return 0;
+}
+
+int utc_media_radio_get_frequency_p(void)
+{
+       int ret;
+       int frequency;
+
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+                  ret = radio_get_frequency(radio, &frequency);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+
+          ret = radio_get_frequency(radio, &frequency);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+
+       }
+       return 0;
+}
+
+int utc_media_radio_get_frequency_n(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_get_frequency(NULL, NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+          ret = radio_get_frequency(NULL, NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       
+       }
+    return 0;
+}
+
+int utc_media_radio_seek_up_p(void)
+{
+       int ret;
+
+
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          radio_start(radio);
+          ret = radio_seek_up(radio,NULL,NULL);
+          assert_eq(ret, RADIO_ERROR_NONE);
+          radio_stop(radio);
+
+       }
+       else{
+
+          ret = radio_seek_up(radio,NULL,NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+
+       }
+        return 0;
+}
+
+int utc_media_radio_seek_up_n(void)
+{
+       int ret;
+       if(radio_supported){
+          radio_start(radio);          
+          assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_seek_up(NULL,NULL,NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+          radio_stop(radio);
+       }
+       else{
+          ret = radio_seek_up(NULL,NULL,NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+
+       }
+        return 0;
+}
+
+
+int utc_media_radio_seek_down_p(void)
+{
+       int ret;
+
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          radio_start(radio);
+          ret = radio_seek_down(radio,NULL,NULL);
+          assert_eq(ret, RADIO_ERROR_NONE);
+          radio_stop(radio);
+       }
+       else{
+          ret = radio_seek_down(radio,NULL,NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+int utc_media_radio_seek_down_n(void)
+{
+       int ret;
+
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+        
+           ret = radio_seek_down(radio,NULL,NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_STATE);
+        }
+        else{
+
+          ret = radio_seek_down(radio,NULL,NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+        }
+
+    return 0;
+}
+
+int utc_media_radio_scan_start_p(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          radio_stop(radio);
+          ret = radio_scan_start(radio,NULL,NULL);
+          assert_eq(ret, RADIO_ERROR_NONE);
+          radio_scan_stop(radio,NULL,NULL);
+       }
+       else{
+          radio_stop(radio);
+           ret = radio_scan_start(radio,NULL,NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_scan_start_n(void)
+{
+       int ret;
+
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_scan_start(NULL,NULL,NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+          ret = radio_scan_start(NULL,NULL,NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+
+       }
+    return 0;
+}
+
+int utc_media_radio_scan_stop_p(void)
+{
+       int ret;
+
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_scan_start(radio,NULL,NULL);        
+          assert_eq(ret, RADIO_ERROR_NONE);
+
+          ret = radio_scan_stop(radio,NULL,NULL);
+          assert_eq(ret, RADIO_ERROR_NONE);
+          radio_stop(radio);
+       }
+       else{
+          ret = radio_scan_stop(radio,NULL,NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+
+       }
+    return 0;
+}
+
+int utc_media_radio_scan_stop_n(void)
+{
+       int ret;
+
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_scan_stop(NULL,NULL,NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+          ret = radio_scan_stop(NULL,NULL,NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+
+       }
+    return 0;
+}
+
+int utc_media_radio_set_mute_p(void)
+{
+       int ret;
+       bool mute = true;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_set_mute(radio, mute);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+          ret = radio_set_mute(radio, mute);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+
+       }
+    return 0;
+}
+
+int utc_media_radio_set_mute_n(void)
+{
+       int ret;
+        if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_set_mute(NULL,true);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+          ret = radio_set_mute(NULL,true);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_is_muted_p(void)
+{
+       int ret;
+       bool mute;
+
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+
+          ret = radio_is_muted(radio,&mute);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+          ret = radio_is_muted(radio,&mute);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_is_muted_n(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_is_muted(NULL,NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+          ret = radio_is_muted(NULL,NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_set_scan_completed_cb_p(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_set_scan_completed_cb(radio, radio_completed_cb, NULL);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+          ret = radio_set_scan_completed_cb(radio, radio_completed_cb, NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_set_scan_completed_cb_n(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_set_scan_completed_cb(radio, NULL, NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+          ret = radio_set_scan_completed_cb(radio, NULL, NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_unset_scan_completed_cb_p(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_unset_scan_completed_cb(radio);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+          ret = radio_unset_scan_completed_cb(radio);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_unset_scan_completed_cb_n(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_unset_scan_completed_cb(NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+          ret = radio_unset_scan_completed_cb(NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_set_interrupted_cb_p(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_set_interrupted_cb(radio, radio_interrupt_cb, NULL);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+          ret = radio_set_interrupted_cb(radio, radio_interrupt_cb, NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_set_interrupted_cb_n(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_set_interrupted_cb(radio, NULL, NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+          ret = radio_set_interrupted_cb(radio, NULL, NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_unset_interrupted_cb_p(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_unset_interrupted_cb(radio);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+          ret = radio_unset_interrupted_cb(radio);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_unset_interrupted_cb_n(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_unset_interrupted_cb(NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+          ret = radio_unset_interrupted_cb(NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_get_signal_strength_p(void)
+{
+       int strength = 0;
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_get_signal_strength(radio, &strength);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+          ret = radio_get_signal_strength(radio, &strength);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_get_signal_strength_n(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_get_signal_strength(NULL, NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+          ret = radio_get_signal_strength(NULL, NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+    return 0;
+}
+
+int utc_media_radio_stop_p(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          radio_state_e state;
+          radio_get_state(radio, &state);
+
+          if (state != RADIO_STATE_PLAYING) radio_start(radio);
+           ret = radio_stop(radio);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+          ret = radio_stop(radio);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+        return 0;
+}
+
+int utc_media_radio_stop_n(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_stop(NULL);
+          assert_eq(ret, RADIO_ERROR_INVALID_PARAMETER);
+       }
+       else{
+          ret = radio_stop(NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+int utc_media_radio_destroy_p(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_destroy(radio);
+          assert_eq(ret, RADIO_ERROR_NONE);
+          radio = NULL;
+       }
+       else{
+          ret = radio_destroy(radio);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+
+    return 0;
+}
+
+int utc_media_radio_destroy_n(void)
+{
+       int ret;
+
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_destroy(NULL);
+          assert_neq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+          ret = radio_destroy(NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+
+
+    return 0;
+}
+
+int utc_media_radio_create_p(void)
+{
+       int ret;
+       if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+       
+          if (radio) radio_destroy(radio);
+          ret = radio_create(&radio);
+          assert_eq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+          ret = radio_create(&radio);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+
+    return 0;
+}
+
+int utc_media_radio_create_n(void)
+{
+       int ret;
+        if(radio_supported){
+           assert_eq(sRet,RADIO_ERROR_NONE);
+          ret = radio_create(NULL);
+          assert_neq(ret, RADIO_ERROR_NONE);
+       }
+       else{
+          ret = radio_create(NULL);
+           assert_eq(ret, RADIO_ERROR_NOT_SUPPORTED);
+       }
+
+    return 0;
+}
diff --git a/src/utc/recorder/CMakeLists.txt b/src/utc/recorder/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..5ac82c0
--- /dev/null
@@ -0,0 +1,40 @@
+SET(PKG_NAME "recorder")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-media-recorder")
+SET(TC_SOURCES
+       utc_media_recorder.c
+       utc_media_recorder_callback.c
+       utc_media_recorder_lifecycle.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-system-info
+       glib-2.0
+       gthread-2.0
+       gobject-2.0
+       capi-media-camera
+       storage
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/recorder/public.list b/src/utc/recorder/public.list
new file mode 100755 (executable)
index 0000000..bfda37c
--- /dev/null
@@ -0,0 +1,58 @@
+recorder_attr_get_audio_channel
+recorder_attr_get_audio_device
+recorder_attr_get_audio_encoder_bitrate
+recorder_attr_get_audio_samplerate
+recorder_attr_get_orientation_tag
+recorder_attr_get_recording_motion_rate
+recorder_attr_get_size_limit
+recorder_attr_get_time_limit
+recorder_attr_get_video_encoder_bitrate
+recorder_attr_is_muted
+recorder_attr_set_audio_channel
+recorder_attr_set_audio_device
+recorder_attr_set_audio_encoder_bitrate
+recorder_attr_set_audio_samplerate
+recorder_attr_set_mute
+recorder_attr_set_orientation_tag
+recorder_attr_set_recording_motion_rate
+recorder_attr_set_size_limit
+recorder_attr_set_time_limit
+recorder_attr_set_video_encoder_bitrate
+recorder_cancel
+recorder_commit
+recorder_create_audiorecorder
+recorder_create_videorecorder
+recorder_destroy
+recorder_foreach_supported_audio_encoder
+recorder_foreach_supported_file_format
+recorder_foreach_supported_video_encoder
+recorder_foreach_supported_video_resolution
+recorder_get_audio_encoder
+recorder_get_audio_level
+recorder_get_file_format
+recorder_get_filename
+recorder_get_state
+recorder_get_video_encoder
+recorder_get_video_resolution
+recorder_pause
+recorder_prepare
+recorder_set_audio_encoder
+recorder_set_audio_stream_cb
+recorder_set_error_cb
+recorder_set_file_format
+recorder_set_filename
+recorder_set_interrupted_cb
+recorder_set_recording_limit_reached_cb
+recorder_set_recording_status_cb
+recorder_set_state_changed_cb
+recorder_set_video_encoder
+recorder_set_video_resolution
+recorder_start
+recorder_unprepare
+recorder_unset_audio_stream_cb
+recorder_unset_error_cb
+recorder_unset_interrupted_cb
+recorder_unset_recording_limit_reached_cb
+recorder_unset_recording_status_cb
+recorder_unset_state_changed_cb
+
diff --git a/src/utc/recorder/tct-recorder-core.c b/src/utc/recorder/tct-recorder-core.c
new file mode 100755 (executable)
index 0000000..b66f50f
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-recorder-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/recorder/tct-recorder-core.h b/src/utc/recorder/tct-recorder-core.h
new file mode 100755 (executable)
index 0000000..064a74b
--- /dev/null
@@ -0,0 +1,260 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_RECORDER_CORE_H__
+#define __TCT_RECORDER_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_media_recorder_startup(void);
+extern void utc_media_recorder_cleanup(void);
+extern void utc_media_recorder_callback_startup(void);
+extern void utc_media_recorder_callback_cleanup(void);
+extern void utc_media_recorder_lifecycle_startup(void);
+
+extern int utc_media_recorder_attr_get_audio_channel_p(void);
+extern int utc_media_recorder_attr_get_audio_channel_n(void);
+extern int utc_media_recorder_attr_get_audio_device_p(void);
+extern int utc_media_recorder_attr_get_audio_device_n(void);
+extern int utc_media_recorder_attr_get_audio_encoder_bitrate_p(void);
+extern int utc_media_recorder_attr_get_audio_encoder_bitrate_n(void);
+extern int utc_media_recorder_attr_get_audio_samplerate_p(void);
+extern int utc_media_recorder_attr_get_audio_samplerate_n(void);
+extern int utc_media_recorder_attr_get_orientation_tag_p(void);
+extern int utc_media_recorder_attr_get_orientation_tag_n(void);
+extern int utc_media_recorder_attr_get_recording_motion_rate_p(void);
+extern int utc_media_recorder_attr_get_recording_motion_rate_n(void);
+extern int utc_media_recorder_attr_get_size_limit_p(void);
+extern int utc_media_recorder_attr_get_size_limit_n(void);
+extern int utc_media_recorder_attr_get_time_limit_p(void);
+extern int utc_media_recorder_attr_get_time_limit_n(void);
+extern int utc_media_recorder_attr_get_video_encoder_bitrate_p(void);
+extern int utc_media_recorder_attr_get_video_encoder_bitrate_n(void);
+extern int utc_media_recorder_attr_is_muted_p(void);
+extern int utc_media_recorder_attr_is_muted_n(void);
+extern int utc_media_recorder_attr_set_audio_channel_p(void);
+extern int utc_media_recorder_attr_set_audio_channel_n(void);
+extern int utc_media_recorder_attr_set_audio_device_p(void);
+extern int utc_media_recorder_attr_set_audio_device_n(void);
+extern int utc_media_recorder_attr_set_audio_encoder_bitrate_p(void);
+extern int utc_media_recorder_attr_set_audio_encoder_bitrate_n(void);
+extern int utc_media_recorder_attr_set_audio_samplerate_p(void);
+extern int utc_media_recorder_attr_set_audio_samplerate_n(void);
+extern int utc_media_recorder_attr_set_size_limit_p(void);
+extern int utc_media_recorder_attr_set_size_limit_n(void);
+extern int utc_media_recorder_attr_set_time_limit_p(void);
+extern int utc_media_recorder_attr_set_time_limit_n(void);
+extern int utc_media_recorder_attr_set_video_encoder_bitrate_p(void);
+extern int utc_media_recorder_attr_set_video_encoder_bitrate_n(void);
+extern int utc_media_recorder_attr_set_mute_p(void);
+extern int utc_media_recorder_attr_set_mute_n(void);
+extern int utc_media_recorder_attr_set_orientation_tag_p(void);
+extern int utc_media_recorder_attr_set_orientation_tag_n(void);
+extern int utc_media_recorder_attr_set_recording_motion_rate_p(void);
+extern int utc_media_recorder_attr_set_recording_motion_rate_n(void);
+extern int utc_media_recorder_get_audio_encoder_p(void);
+extern int utc_media_recorder_get_audio_encoder_n(void);
+extern int utc_media_recorder_get_file_format_p(void);
+extern int utc_media_recorder_get_file_format_n(void);
+extern int utc_media_recorder_get_video_encoder_p(void);
+extern int utc_media_recorder_get_video_encoder_n(void);
+extern int utc_media_recorder_get_audio_level_p(void);
+extern int utc_media_recorder_get_audio_level_n(void);
+extern int utc_media_recorder_get_video_resolution_p(void);
+extern int utc_media_recorder_get_video_resolution_n(void);
+extern int utc_media_recorder_set_audio_encoder_p(void);
+extern int utc_media_recorder_set_audio_encoder_n(void);
+extern int utc_media_recorder_set_file_format_p(void);
+extern int utc_media_recorder_set_file_format_n(void);
+extern int utc_media_recorder_set_filename_p(void);
+extern int utc_media_recorder_set_filename_n(void);
+extern int utc_media_recorder_set_video_encoder_p(void);
+extern int utc_media_recorder_set_video_encoder_n(void);
+extern int utc_media_recorder_set_video_resolution_p(void);
+extern int utc_media_recorder_set_video_resolution_n(void);
+extern int utc_media_recorder_get_filename_p(void);
+extern int utc_media_recorder_get_filename_n(void);
+extern int utc_media_recorder_foreach_supported_audio_encoder_p(void);
+extern int utc_media_recorder_foreach_supported_audio_encoder_n(void);
+extern int utc_media_recorder_foreach_supported_file_format_p(void);
+extern int utc_media_recorder_foreach_supported_file_format_n(void);
+extern int utc_media_recorder_foreach_supported_video_encoder_p(void);
+extern int utc_media_recorder_foreach_supported_video_encoder_n(void);
+extern int utc_media_recorder_foreach_supported_video_resolution_p(void);
+extern int utc_media_recorder_foreach_supported_video_resolution_n(void);
+extern int utc_media_recorder_set_recording_limit_reached_cb_p(void);
+extern int utc_media_recorder_set_recording_limit_reached_cb_n(void);
+extern int utc_media_recorder_set_recording_status_cb_p(void);
+extern int utc_media_recorder_set_recording_status_cb_n(void);
+extern int utc_media_recorder_set_state_changed_cb_p(void);
+extern int utc_media_recorder_set_state_changed_cb_n(void);
+extern int utc_media_recorder_set_interrupted_cb_p(void);
+extern int utc_media_recorder_set_interrupted_cb_n(void);
+extern int utc_media_recorder_set_audio_stream_cb_p(void);
+extern int utc_media_recorder_set_audio_stream_cb_n(void);
+extern int utc_media_recorder_set_error_cb_p(void);
+extern int utc_media_recorder_set_error_cb_n(void);
+extern int utc_media_recorder_unset_recording_limit_reached_cb_p(void);
+extern int utc_media_recorder_unset_recording_limit_reached_cb_n(void);
+extern int utc_media_recorder_unset_recording_status_cb_p(void);
+extern int utc_media_recorder_unset_recording_status_cb_n(void);
+extern int utc_media_recorder_unset_state_changed_cb_p(void);
+extern int utc_media_recorder_unset_state_changed_cb_n(void);
+extern int utc_media_recorder_unset_interrupted_cb_p(void);
+extern int utc_media_recorder_unset_interrupted_cb_n(void);
+extern int utc_media_recorder_unset_audio_stream_cb_p(void);
+extern int utc_media_recorder_unset_audio_stream_cb_n(void);
+extern int utc_media_recorder_unset_error_cb_p(void);
+extern int utc_media_recorder_unset_error_cb_n(void);
+extern int utc_media_recorder_create_audiorecorder_n(void);
+extern int utc_media_recorder_create_audiorecorder_p(void);
+extern int utc_media_recorder_cancel_p(void);
+extern int utc_media_recorder_cancel_n(void);
+extern int utc_media_recorder_commit_p(void);
+extern int utc_media_recorder_commit_n(void);
+extern int utc_media_recorder_create_videorecorder_p(void);
+extern int utc_media_recorder_create_videorecorder_n(void);
+extern int utc_media_recorder_destroy_p(void);
+extern int utc_media_recorder_destroy_n(void);
+extern int utc_media_recorder_pause_p(void);
+extern int utc_media_recorder_pause_n(void);
+extern int utc_media_recorder_prepare_p(void);
+extern int utc_media_recorder_prepare_n(void);
+extern int utc_media_recorder_start_p(void);
+extern int utc_media_recorder_start_n(void);
+extern int utc_media_recorder_unprepare_p(void);
+extern int utc_media_recorder_unprepare_n(void);
+extern int utc_media_recorder_get_state_p(void);
+extern int utc_media_recorder_get_state_n(void);
+
+testcase tc_array[] = {
+    {"utc_media_recorder_attr_get_audio_channel_p", utc_media_recorder_attr_get_audio_channel_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_audio_channel_n", utc_media_recorder_attr_get_audio_channel_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_audio_device_p", utc_media_recorder_attr_get_audio_device_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_audio_device_n", utc_media_recorder_attr_get_audio_device_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_audio_encoder_bitrate_p", utc_media_recorder_attr_get_audio_encoder_bitrate_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_audio_encoder_bitrate_n", utc_media_recorder_attr_get_audio_encoder_bitrate_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_audio_samplerate_p", utc_media_recorder_attr_get_audio_samplerate_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_audio_samplerate_n", utc_media_recorder_attr_get_audio_samplerate_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_orientation_tag_p", utc_media_recorder_attr_get_orientation_tag_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_orientation_tag_n", utc_media_recorder_attr_get_orientation_tag_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_recording_motion_rate_p", utc_media_recorder_attr_get_recording_motion_rate_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_recording_motion_rate_n", utc_media_recorder_attr_get_recording_motion_rate_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_size_limit_p", utc_media_recorder_attr_get_size_limit_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_size_limit_n", utc_media_recorder_attr_get_size_limit_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_time_limit_p", utc_media_recorder_attr_get_time_limit_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_time_limit_n", utc_media_recorder_attr_get_time_limit_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_video_encoder_bitrate_p", utc_media_recorder_attr_get_video_encoder_bitrate_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_get_video_encoder_bitrate_n", utc_media_recorder_attr_get_video_encoder_bitrate_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_is_muted_p", utc_media_recorder_attr_is_muted_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_is_muted_n", utc_media_recorder_attr_is_muted_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_audio_channel_p", utc_media_recorder_attr_set_audio_channel_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_audio_channel_n", utc_media_recorder_attr_set_audio_channel_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_audio_device_p", utc_media_recorder_attr_set_audio_device_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_audio_device_n", utc_media_recorder_attr_set_audio_device_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_audio_encoder_bitrate_p", utc_media_recorder_attr_set_audio_encoder_bitrate_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_audio_encoder_bitrate_n", utc_media_recorder_attr_set_audio_encoder_bitrate_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_audio_samplerate_p", utc_media_recorder_attr_set_audio_samplerate_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_audio_samplerate_n", utc_media_recorder_attr_set_audio_samplerate_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_size_limit_p", utc_media_recorder_attr_set_size_limit_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_size_limit_n", utc_media_recorder_attr_set_size_limit_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_time_limit_p", utc_media_recorder_attr_set_time_limit_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_time_limit_n", utc_media_recorder_attr_set_time_limit_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_video_encoder_bitrate_p", utc_media_recorder_attr_set_video_encoder_bitrate_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_video_encoder_bitrate_n", utc_media_recorder_attr_set_video_encoder_bitrate_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_mute_p", utc_media_recorder_attr_set_mute_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_mute_n", utc_media_recorder_attr_set_mute_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_orientation_tag_p", utc_media_recorder_attr_set_orientation_tag_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_orientation_tag_n", utc_media_recorder_attr_set_orientation_tag_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_recording_motion_rate_p", utc_media_recorder_attr_set_recording_motion_rate_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_attr_set_recording_motion_rate_n", utc_media_recorder_attr_set_recording_motion_rate_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_audio_encoder_p", utc_media_recorder_get_audio_encoder_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_audio_encoder_n", utc_media_recorder_get_audio_encoder_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_file_format_p", utc_media_recorder_get_file_format_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_file_format_n", utc_media_recorder_get_file_format_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_video_encoder_p", utc_media_recorder_get_video_encoder_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_video_encoder_n", utc_media_recorder_get_video_encoder_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_audio_level_p", utc_media_recorder_get_audio_level_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_audio_level_n", utc_media_recorder_get_audio_level_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_video_resolution_p", utc_media_recorder_get_video_resolution_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_video_resolution_n", utc_media_recorder_get_video_resolution_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_set_audio_encoder_p", utc_media_recorder_set_audio_encoder_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_set_audio_encoder_n", utc_media_recorder_set_audio_encoder_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_set_file_format_p", utc_media_recorder_set_file_format_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_set_file_format_n", utc_media_recorder_set_file_format_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_set_filename_p", utc_media_recorder_set_filename_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_set_filename_n", utc_media_recorder_set_filename_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_set_video_encoder_p", utc_media_recorder_set_video_encoder_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_set_video_encoder_n", utc_media_recorder_set_video_encoder_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_set_video_resolution_p", utc_media_recorder_set_video_resolution_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_set_video_resolution_n", utc_media_recorder_set_video_resolution_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_filename_p", utc_media_recorder_get_filename_p, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_get_filename_n", utc_media_recorder_get_filename_n, utc_media_recorder_startup, utc_media_recorder_cleanup},
+    {"utc_media_recorder_foreach_supported_audio_encoder_p", utc_media_recorder_foreach_supported_audio_encoder_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_foreach_supported_audio_encoder_n", utc_media_recorder_foreach_supported_audio_encoder_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_foreach_supported_file_format_p", utc_media_recorder_foreach_supported_file_format_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_foreach_supported_file_format_n", utc_media_recorder_foreach_supported_file_format_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_foreach_supported_video_encoder_p", utc_media_recorder_foreach_supported_video_encoder_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_foreach_supported_video_encoder_n", utc_media_recorder_foreach_supported_video_encoder_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_foreach_supported_video_resolution_p", utc_media_recorder_foreach_supported_video_resolution_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_foreach_supported_video_resolution_n", utc_media_recorder_foreach_supported_video_resolution_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_recording_limit_reached_cb_p", utc_media_recorder_set_recording_limit_reached_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_recording_limit_reached_cb_n", utc_media_recorder_set_recording_limit_reached_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_recording_status_cb_p", utc_media_recorder_set_recording_status_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_recording_status_cb_n", utc_media_recorder_set_recording_status_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_state_changed_cb_p", utc_media_recorder_set_state_changed_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_state_changed_cb_n", utc_media_recorder_set_state_changed_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_interrupted_cb_p", utc_media_recorder_set_interrupted_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_interrupted_cb_n", utc_media_recorder_set_interrupted_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_audio_stream_cb_p", utc_media_recorder_set_audio_stream_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_audio_stream_cb_n", utc_media_recorder_set_audio_stream_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_error_cb_p", utc_media_recorder_set_error_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_set_error_cb_n", utc_media_recorder_set_error_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_recording_limit_reached_cb_p", utc_media_recorder_unset_recording_limit_reached_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_recording_limit_reached_cb_n", utc_media_recorder_unset_recording_limit_reached_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_recording_status_cb_p", utc_media_recorder_unset_recording_status_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_recording_status_cb_n", utc_media_recorder_unset_recording_status_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_state_changed_cb_p", utc_media_recorder_unset_state_changed_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_state_changed_cb_n", utc_media_recorder_unset_state_changed_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_interrupted_cb_p", utc_media_recorder_unset_interrupted_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_interrupted_cb_n", utc_media_recorder_unset_interrupted_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_audio_stream_cb_p", utc_media_recorder_unset_audio_stream_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_audio_stream_cb_n", utc_media_recorder_unset_audio_stream_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_error_cb_p", utc_media_recorder_unset_error_cb_p, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_unset_error_cb_n", utc_media_recorder_unset_error_cb_n, utc_media_recorder_callback_startup, utc_media_recorder_callback_cleanup},
+    {"utc_media_recorder_create_audiorecorder_n", utc_media_recorder_create_audiorecorder_n, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_create_audiorecorder_p", utc_media_recorder_create_audiorecorder_p, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_cancel_p", utc_media_recorder_cancel_p, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_cancel_n", utc_media_recorder_cancel_n, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_commit_p", utc_media_recorder_commit_p, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_commit_n", utc_media_recorder_commit_n, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_create_videorecorder_p", utc_media_recorder_create_videorecorder_p, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_create_videorecorder_n", utc_media_recorder_create_videorecorder_n, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_destroy_p", utc_media_recorder_destroy_p, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_destroy_n", utc_media_recorder_destroy_n, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_pause_p", utc_media_recorder_pause_p, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_pause_n", utc_media_recorder_pause_n, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_prepare_p", utc_media_recorder_prepare_p, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_prepare_n", utc_media_recorder_prepare_n, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_start_p", utc_media_recorder_start_p, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_start_n", utc_media_recorder_start_n, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_unprepare_p", utc_media_recorder_unprepare_p, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_unprepare_n", utc_media_recorder_unprepare_n, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_get_state_p", utc_media_recorder_get_state_p, utc_media_recorder_lifecycle_startup, NULL},
+    {"utc_media_recorder_get_state_n", utc_media_recorder_get_state_n, utc_media_recorder_lifecycle_startup, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_RECORDER_CORE_H__
diff --git a/src/utc/recorder/utc_media_recorder.c b/src/utc/recorder/utc_media_recorder.c
new file mode 100755 (executable)
index 0000000..cb02011
--- /dev/null
@@ -0,0 +1,1168 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media/recorder.h>
+#include <storage.h>
+#include <system_info.h>
+
+//& set: RecoderMain
+
+static char* media=".test_record.amr";
+static char* media_path=NULL;
+static bool mic_supported=false;
+static bool cam_supported=false;
+
+static recorder_h recorder = NULL;
+static int startup_ret;
+
+static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data)
+{
+    int size_of_path;
+    if(type==STORAGE_TYPE_INTERNAL) {
+        size_of_path = strlen(path)+strlen(media)+2;
+        media_path=(char*)malloc(size_of_path);
+        if(media_path != NULL) {
+            snprintf(media_path, size_of_path, "%s/%s",path,media);
+        }
+        return false;
+    }
+    return true;
+}
+
+void utc_media_recorder_startup(void)
+{
+    storage_foreach_device_supported(storage_device_cb,NULL);
+
+    system_info_get_platform_bool("http://tizen.org/feature/microphone",&mic_supported);
+    system_info_get_platform_bool("http://tizen.org/feature/camera",&cam_supported);
+
+    startup_ret = recorder_create_audiorecorder(&recorder);
+
+}
+
+void utc_media_recorder_cleanup(void)
+{
+    recorder_destroy(recorder);
+    recorder = NULL;
+}
+
+int utc_media_recorder_attr_get_audio_channel_p(void)
+{
+    int ret;
+    int channel;
+
+    ret = recorder_attr_get_audio_channel(recorder, &channel);
+    if(!mic_supported){
+       assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_media_recorder_attr_get_audio_channel_n(void)
+{
+    int ret;
+
+    ret = recorder_attr_get_audio_channel (recorder, NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_audio_device_p(void)
+{
+
+    int ret;
+    recorder_audio_device_e device;
+
+    ret = recorder_attr_get_audio_device(recorder, &device);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_audio_device_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_get_audio_device (recorder, NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+
+    }
+
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_audio_encoder_bitrate_p(void)
+{
+
+    int ret;
+    int bitrate;
+
+    ret = recorder_attr_get_audio_encoder_bitrate(recorder, &bitrate);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_audio_encoder_bitrate_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_get_audio_encoder_bitrate(recorder, NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_audio_samplerate_p(void)
+{
+
+    int ret;
+    int samplerate;
+
+    ret = recorder_attr_get_audio_samplerate(recorder, &samplerate);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_audio_samplerate_n(void)
+{
+    assert(recorder);
+
+    int ret;
+
+    ret = recorder_attr_get_audio_samplerate(recorder, NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_orientation_tag_p(void)
+{
+
+    int ret;
+    recorder_rotation_e rotation_tag;
+
+    ret = recorder_attr_get_orientation_tag(recorder, &rotation_tag);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_orientation_tag_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_get_orientation_tag(recorder, NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_recording_motion_rate_p(void)
+{
+
+    int ret;
+    double rate;
+
+    ret = recorder_attr_get_recording_motion_rate(recorder, &rate);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_recording_motion_rate_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_get_recording_motion_rate(recorder, NULL);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_size_limit_p(void)
+{
+
+    int ret;
+    int size;
+
+    ret = recorder_attr_get_size_limit(recorder, &size);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_size_limit_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_get_size_limit(recorder, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_time_limit_p(void)
+{
+
+    int ret;
+    int value;
+
+    ret = recorder_attr_get_time_limit(recorder, &value);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_time_limit_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_get_time_limit(recorder, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_video_encoder_bitrate_p(void)
+{
+
+    int ret;
+    int value;
+
+    ret = recorder_attr_get_video_encoder_bitrate(recorder, &value);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_get_video_encoder_bitrate_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_get_video_encoder_bitrate(recorder, NULL);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_is_muted_p(void)
+{
+
+    int ret=RECORDER_ERROR_NONE;
+    
+    if(mic_supported){     
+
+    ret |= recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_AMR);
+    ret |= recorder_set_file_format(recorder, RECORDER_FILE_FORMAT_AMR);
+    ret |= recorder_set_filename(recorder, media_path);
+    ret |= recorder_prepare(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    ret = recorder_start(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+    ret = recorder_attr_set_mute(recorder, true);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+    ret = recorder_attr_is_muted(recorder);
+    assert_eq(ret, true);
+    ret = recorder_attr_set_mute(recorder, false);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    recorder_cancel(recorder);
+    recorder_unprepare(recorder);
+    }
+    else{
+    
+        recorder_attr_is_muted(recorder);
+       ret = get_last_result();
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_is_muted_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_is_muted(NULL);
+    if(!mic_supported){
+        ret = get_last_result();
+       assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+    
+        assert_eq(ret, false);
+    }
+    return 0;
+}
+
+int utc_media_recorder_attr_set_audio_channel_p(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_audio_channel(recorder, 1);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_audio_channel_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_audio_channel(recorder, 10);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_audio_device_p(void)
+{
+
+    int ret;
+    recorder_audio_device_e device = 1;
+
+    ret = recorder_attr_set_audio_device(recorder, device);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_audio_device_n(void)
+{
+
+    int ret;
+    recorder_audio_device_e device = 10;
+
+    ret = recorder_attr_set_audio_device(recorder, device);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_audio_encoder_bitrate_p(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_audio_encoder_bitrate(recorder, 11111);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_audio_encoder_bitrate_n(void)
+{
+    assert(recorder);
+
+    int ret;
+
+    ret = recorder_attr_set_audio_encoder_bitrate(recorder, -1);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_audio_samplerate_p(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_audio_samplerate(recorder, 11111);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_audio_samplerate_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_audio_samplerate(recorder, -1);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_size_limit_p(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_size_limit(recorder, 0);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_size_limit_n(void)
+{
+    assert(recorder);
+
+    int ret;
+
+    ret = recorder_attr_set_size_limit(recorder, -1);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_time_limit_p(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_time_limit(recorder, 11111);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_time_limit_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_time_limit(recorder, -1);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_video_encoder_bitrate_p(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_video_encoder_bitrate(recorder, 0);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_video_encoder_bitrate_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_video_encoder_bitrate(recorder, -1);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_mute_p(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_mute(recorder, false);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_mute_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_mute(NULL, false);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_orientation_tag_p(void)
+{
+
+    int ret;
+    recorder_rotation_e rotation = RECORDER_ROTATION_NONE;
+
+    ret = recorder_attr_set_orientation_tag(recorder, rotation);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_orientation_tag_n(void)
+{
+
+    int ret;
+    recorder_rotation_e rotation = -1;
+
+    ret = recorder_attr_set_orientation_tag(recorder, rotation);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_recording_motion_rate_p(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_recording_motion_rate(recorder, 1.0);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_attr_set_recording_motion_rate_n(void)
+{
+
+    int ret;
+
+    ret = recorder_attr_set_recording_motion_rate(NULL, -1);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_get_audio_encoder_p(void)
+{
+
+    int ret;
+
+    recorder_audio_codec_e value;
+
+    ret = recorder_get_audio_encoder(recorder, &value);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_get_audio_encoder_n(void)
+{
+
+    int ret;
+
+    ret = recorder_get_audio_encoder(recorder, NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_get_file_format_p(void)
+{
+
+    int ret;
+
+    recorder_file_format_e value;
+    ret = recorder_get_file_format(recorder, &value);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_get_file_format_n(void)
+{
+
+    int ret;
+
+    ret = recorder_get_file_format(recorder, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_get_video_encoder_p(void)
+{
+
+    int ret;
+
+    recorder_video_codec_e value;
+    ret = recorder_get_video_encoder(recorder, &value);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_get_video_encoder_n(void)
+{
+
+    int ret;
+
+    ret = recorder_get_video_encoder(recorder, NULL);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_get_audio_level_p(void)
+{
+
+    double value;
+    int ret;
+    
+    if(mic_supported){
+    
+
+    ret = recorder_create_audiorecorder(&recorder);
+    ret |= recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_AMR);
+    ret |= recorder_set_file_format(recorder, RECORDER_FILE_FORMAT_AMR);
+    ret |= recorder_set_filename(recorder, media_path);
+    ret |= recorder_prepare(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    ret = recorder_start(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    ret = recorder_get_audio_level(recorder,&value);
+    recorder_cancel(recorder);
+    recorder_unprepare(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+    }
+    else{
+
+       ret = recorder_get_audio_level(recorder,&value);
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+
+    }
+    return 0;
+}
+
+int utc_media_recorder_get_audio_level_n(void)
+{
+
+    int ret;
+
+    ret = recorder_get_audio_level(recorder, NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_get_video_resolution_p(void)
+{
+
+    int ret;
+    int mHeight;
+    int mWidth;
+
+    ret = recorder_get_video_resolution(recorder, &mWidth, &mHeight);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_get_video_resolution_n(void)
+{
+
+    int ret;
+
+    ret = recorder_get_video_resolution(recorder, NULL, NULL);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_audio_encoder_p(void)
+{
+
+    int ret;
+    recorder_audio_codec_e codec = RECORDER_AUDIO_CODEC_AMR;
+
+    ret = recorder_set_audio_encoder(recorder, codec);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_audio_encoder_n(void)
+{
+
+    int ret;
+    recorder_audio_codec_e codec = -2;
+
+    ret = recorder_set_audio_encoder(recorder, codec);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+
+}
+
+int utc_media_recorder_set_file_format_p(void)
+{
+
+    int ret;
+    recorder_file_format_e format = RECORDER_FILE_FORMAT_3GP;
+
+    ret = recorder_set_file_format(recorder, format);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_file_format_n(void)
+{
+
+    int ret;
+    recorder_file_format_e format = -1;
+
+    ret = recorder_set_file_format(recorder, format);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_filename_p(void)
+{
+
+    int ret;
+
+    ret = recorder_set_filename(recorder, "/mnt/nfs/test.test");
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_filename_n(void)
+{
+
+    int ret;
+
+    ret = recorder_set_filename(recorder, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+bool _video_encoder_cb(recorder_video_codec_e codec, void *user_data)
+{
+    bool ret = true;
+    if(user_data != NULL)
+    {
+        *( (recorder_video_codec_e *)user_data) = codec;
+        return false;
+    }
+    return ret;
+}
+
+int utc_media_recorder_set_video_encoder_p(void)
+{
+    int ret;
+    recorder_video_codec_e codec = -1;
+
+    ret = recorder_foreach_supported_video_encoder(recorder, _video_encoder_cb, &codec);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    ret = recorder_set_video_encoder(recorder, codec);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_video_encoder_n(void)
+{
+
+    int ret;
+    recorder_video_codec_e codec = -1;
+
+    ret = recorder_set_video_encoder(recorder, codec);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_video_resolution_p(void)
+{
+
+    recorder_h recorder = NULL;
+    camera_h camera = NULL;
+    int ret;
+       int width = 0;
+       int height = 0;
+
+    if(cam_supported){
+        
+    ret = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
+    assert_eq(ret, CAMERA_ERROR_NONE);
+
+    ret = recorder_create_videorecorder(camera, &recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+       ret = recorder_get_video_resolution(recorder, &width, &height);
+       assert_eq(ret, RECORDER_ERROR_NONE);
+
+    ret = recorder_set_video_resolution(recorder, width, height);
+    recorder_destroy(recorder);
+    camera_destroy(camera);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_set_video_resolution(recorder, width, height);
+       assert_eq(ret,RECORDER_ERROR_INVALID_PARAMETER);
+
+    }
+    return 0;
+}
+
+int utc_media_recorder_set_video_resolution_n(void)
+{
+
+    int ret;
+
+    ret = recorder_set_video_resolution(recorder, 0, 0);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+
+}
+
+int utc_media_recorder_get_filename_p(void)
+{
+       int ret;
+       char* f_name;
+       
+        ret = recorder_set_filename(recorder, "/mnt/nfs/test.test");
+
+        if(!cam_supported && !mic_supported){
+            assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, RECORDER_ERROR_NONE);
+        }       
+
+       ret = recorder_get_filename(recorder,&f_name);
+
+       if (f_name) {
+               free(f_name);
+               f_name = NULL;
+       }
+
+        if(!cam_supported && !mic_supported){
+            assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, RECORDER_ERROR_NONE);
+        }
+
+       return 0;
+}
+
+int utc_media_recorder_get_filename_n(void)
+{
+       int ret;
+
+       ret = recorder_get_filename(recorder,NULL);
+        if(!mic_supported && !cam_supported){
+            assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+        }
+        else{
+            assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
+        }
+
+       return 0;
+}
diff --git a/src/utc/recorder/utc_media_recorder_callback.c b/src/utc/recorder/utc_media_recorder_callback.c
new file mode 100755 (executable)
index 0000000..eefb127
--- /dev/null
@@ -0,0 +1,556 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media/recorder.h>
+#include <system_info.h>
+
+//& set: RecoderCallback
+static recorder_h recorder = NULL;
+static bool cam_supported=false;
+static bool mic_supported=false;
+
+void utc_media_recorder_callback_startup(void)
+{
+    /* start of TC */
+    recorder_create_audiorecorder(&recorder);
+
+    system_info_get_platform_bool("http://tizen.org/feature/microphone",&mic_supported);
+    system_info_get_platform_bool("http://tizen.org/feature/camera",&cam_supported);
+
+}
+
+void utc_media_recorder_callback_cleanup(void)
+{
+    /* end of TC */
+    recorder_destroy(recorder);
+    recorder = NULL;
+}
+
+static bool _audio_encoder_cb(recorder_audio_codec_e codec , void *user_data){
+    return false;
+}
+
+static bool _file_format_cb(recorder_file_format_e format , void *user_data){
+    return false;
+}
+
+static bool _video_encoder_cb(recorder_video_codec_e codec ,  void *user_data){
+    return false;
+}
+
+static bool _video_resolution_cb(int width, int height, void *user_data){
+    return false;
+}
+
+static void _limit_reached_cb(recorder_recording_limit_type_e type,  void *user_data){
+}
+
+static void _recording_statis_cb(unsigned long long elapsed_time, unsigned long long file_size,  void *user_data){
+}
+
+static void _state_changed_cb(recorder_state_e previous , recorder_state_e current , bool by_asm,  void *user_data){
+}
+
+static void _interrupted_cb(recorder_policy_e policy, recorder_state_e previous, recorder_state_e current, void *user_data){
+}
+
+static void _audio_stream_cb(void* stream, int size, audio_sample_type_e format, int channel, unsigned int timestamp, void *user_data){
+}
+
+static void _error_cb(recorder_error_e error, recorder_state_e current_state, void *user_data){
+}
+
+
+int utc_media_recorder_foreach_supported_audio_encoder_p(void)
+{
+
+    int ret;
+
+    ret = recorder_foreach_supported_audio_encoder(recorder, _audio_encoder_cb, NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_foreach_supported_audio_encoder_n(void)
+{
+
+    int ret;
+    ret = recorder_foreach_supported_audio_encoder(recorder, NULL, NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_foreach_supported_file_format_p(void)
+{
+
+    int ret;
+    ret = recorder_foreach_supported_file_format(recorder, _file_format_cb, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_foreach_supported_file_format_n(void)
+{
+
+    int ret;
+    ret = recorder_foreach_supported_file_format(recorder, NULL, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_foreach_supported_video_encoder_p(void)
+{
+
+    int ret;
+    ret = recorder_foreach_supported_video_encoder(recorder, _video_encoder_cb, NULL);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_foreach_supported_video_encoder_n(void)
+{
+
+    int ret;
+    ret = recorder_foreach_supported_video_encoder(recorder, NULL, NULL);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+    return 0;
+}
+
+int utc_media_recorder_foreach_supported_video_resolution_p(void)
+{
+
+    int ret;
+    ret = recorder_foreach_supported_video_resolution(recorder, _video_resolution_cb, NULL);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_foreach_supported_video_resolution_n(void)
+{
+
+    int ret;
+    ret = recorder_foreach_supported_video_resolution(recorder, NULL, NULL);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_recording_limit_reached_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_set_recording_limit_reached_cb(recorder, _limit_reached_cb, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_recording_limit_reached_cb_n(void)
+{
+
+    int ret;
+    ret = recorder_set_recording_limit_reached_cb(recorder, NULL, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+
+}
+
+int utc_media_recorder_set_recording_status_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_set_recording_status_cb(recorder, _recording_statis_cb, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_recording_status_cb_n(void)
+{
+
+    int ret;
+    ret = recorder_set_recording_status_cb(recorder, NULL, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_state_changed_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_set_state_changed_cb(recorder, _state_changed_cb, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_state_changed_cb_n(void)
+{
+
+    int ret;
+    ret = recorder_set_state_changed_cb(recorder, NULL, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_interrupted_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_set_interrupted_cb(recorder, _interrupted_cb, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_interrupted_cb_n(void)
+{
+
+    int ret;
+    ret = recorder_set_interrupted_cb(recorder, NULL, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_audio_stream_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_set_audio_stream_cb(recorder, _audio_stream_cb, NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_audio_stream_cb_n(void)
+{
+
+    int ret;
+    ret = recorder_set_audio_stream_cb(recorder, NULL, NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+
+int utc_media_recorder_set_error_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_set_error_cb(recorder, _error_cb, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_set_error_cb_n(void)
+{
+
+    int ret;
+    ret = recorder_set_error_cb(recorder, NULL, NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unset_recording_limit_reached_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_unset_recording_limit_reached_cb(recorder);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unset_recording_limit_reached_cb_n(void)
+{
+    int ret;
+    ret = recorder_unset_recording_limit_reached_cb(NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }    
+
+    return 0;
+}
+
+int utc_media_recorder_unset_recording_status_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_unset_recording_status_cb(recorder);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unset_recording_status_cb_n(void)
+{
+
+    int ret;
+    ret = recorder_unset_recording_status_cb(NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unset_state_changed_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_unset_state_changed_cb(recorder);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unset_state_changed_cb_n(void)
+{
+
+    int ret;
+    ret = recorder_unset_state_changed_cb(NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unset_interrupted_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_unset_interrupted_cb(recorder);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unset_interrupted_cb_n(void)
+{
+
+    int ret;
+    ret = recorder_unset_interrupted_cb(NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unset_audio_stream_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_unset_audio_stream_cb(recorder);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unset_audio_stream_cb_n(void)
+{
+
+    int ret;
+    ret = recorder_unset_audio_stream_cb(NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unset_error_cb_p(void)
+{
+
+    int ret;
+    ret = recorder_unset_error_cb(recorder);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unset_error_cb_n(void)
+{
+
+    int ret;
+    ret = recorder_unset_error_cb(NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
diff --git a/src/utc/recorder/utc_media_recorder_lifecycle.c b/src/utc/recorder/utc_media_recorder_lifecycle.c
new file mode 100755 (executable)
index 0000000..04c522d
--- /dev/null
@@ -0,0 +1,505 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <unistd.h>
+#include <media/recorder.h>
+#include <storage.h>
+#include <system_info.h>
+
+//& set: RecoderLifecycle
+static char* media=".test_record.amr";
+static char* media_path=NULL;
+static bool cam_supported=false;
+static bool mic_supported=false;
+
+static bool storage_device_cb(int storage_id, storage_type_e type, storage_state_e state, const char* path, void* user_data) {
+
+    int size_of_path;
+
+    if(type==STORAGE_TYPE_INTERNAL) {
+        size_of_path = strlen(path)+strlen(media)+6;
+        media_path=(char*)malloc(size_of_path);
+        if(media_path != NULL) {
+            snprintf(media_path, size_of_path, "%s/res/%s",path,media);
+        }
+
+        return false;
+    }
+    return true;
+}
+
+void utc_media_recorder_lifecycle_startup(void)
+{
+       
+    storage_foreach_device_supported(storage_device_cb,NULL);
+    system_info_get_platform_bool("http://tizen.org/feature/microphone",&mic_supported);
+    system_info_get_platform_bool("http://tizen.org/feature/camera",&cam_supported);
+}
+
+/**
+ * @brief Negative test case of recorder_create_audiorecorder()
+ */
+
+int utc_media_recorder_create_audiorecorder_n(void)
+{
+    int ret;
+    ret = recorder_create_audiorecorder(NULL);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_create_audiorecorder_p(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+
+    ret = recorder_create_audiorecorder(&recorder);
+    if(!mic_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       recorder_destroy(recorder);
+       assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_cancel_p(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+    if(mic_supported || cam_supported){
+    ret = recorder_create_audiorecorder(&recorder);
+    ret |= recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_AMR);
+    ret |= recorder_set_file_format(recorder, RECORDER_FILE_FORMAT_AMR);
+    ret |= recorder_set_filename(recorder, media_path);
+    ret |= recorder_prepare(recorder);
+    ret |= recorder_start(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    sleep(2);
+
+    ret = recorder_cancel(recorder);
+    recorder_unprepare(recorder);
+    recorder_destroy(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+       
+       ret = recorder_cancel(recorder);
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_cancel_n(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+    if(mic_supported || cam_supported){
+    ret = recorder_create_audiorecorder(&recorder);
+    ret |= recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_AMR);
+    ret |= recorder_set_file_format(recorder, RECORDER_FILE_FORMAT_AMR);
+    ret |= recorder_prepare(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    ret = recorder_cancel(recorder);
+
+    recorder_unprepare(recorder);
+    recorder_destroy(recorder);
+    assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_cancel(recorder);
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    
+    return 0;
+}
+
+int utc_media_recorder_commit_p(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+    if(cam_supported || mic_supported){
+    ret = recorder_create_audiorecorder(&recorder);
+    ret |= recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_AMR);
+    ret |= recorder_set_file_format(recorder, RECORDER_FILE_FORMAT_AMR);
+    ret |= recorder_set_filename(recorder, media_path);
+    ret |= recorder_prepare(recorder);
+    ret |= recorder_start(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    sleep(2);
+
+    ret = recorder_commit(recorder);
+    recorder_unprepare(recorder);
+    recorder_destroy(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_commit(recorder);
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+
+    }
+    return 0;
+}
+
+int utc_media_recorder_commit_n(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+    if(cam_supported || mic_supported){
+    ret =recorder_create_audiorecorder(&recorder);
+    ret |= recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_AMR);
+    ret |= recorder_set_file_format(recorder, RECORDER_FILE_FORMAT_AMR);
+    ret |= recorder_prepare(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+    ret = recorder_commit(recorder);
+    recorder_unprepare(recorder);
+    recorder_destroy(recorder);
+    assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_commit(recorder);
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+
+    }
+    return 0;
+}
+
+int utc_media_recorder_create_videorecorder_p(void)
+{
+    recorder_h recorder = NULL;
+    camera_h camera = NULL;
+    int ret;
+
+    ret = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+
+    ret = recorder_create_videorecorder(camera, &recorder);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
+    }
+    else{
+        camera_destroy(camera);
+        recorder_destroy(recorder);
+        assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+    
+    return 0;
+}
+
+int utc_media_recorder_create_videorecorder_n(void)
+{
+    recorder_h recorder = NULL;
+    int ret;
+
+    ret = recorder_create_videorecorder(NULL, &recorder);
+    if(!cam_supported){
+        assert_eq(ret, RECORDER_ERROR_INVALID_PARAMETER);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }   
+
+    return 0;
+}
+
+int utc_media_recorder_destroy_p(void)
+{
+    recorder_h recorder = NULL;
+    int ret;
+    if(mic_supported || cam_supported){
+    ret = recorder_create_audiorecorder(&recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+    ret = recorder_destroy(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_destroy(recorder);
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+
+    }
+    return 0;
+}
+
+int utc_media_recorder_destroy_n(void)
+{
+    int ret;
+
+    ret = recorder_destroy(NULL);
+    if(!mic_supported && !cam_supported){
+        assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+
+    return 0;
+}
+int utc_media_recorder_pause_p(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+    if(cam_supported || mic_supported){
+    ret = recorder_create_audiorecorder(&recorder);
+    ret |= recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_AMR);
+    ret |= recorder_set_file_format(recorder, RECORDER_FILE_FORMAT_AMR);
+    ret |= recorder_set_filename(recorder, media_path);
+    ret |= recorder_prepare(recorder);
+    ret |= recorder_start(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    sleep(2);
+
+    ret = recorder_pause(recorder);
+    recorder_cancel(recorder);
+    recorder_unprepare(recorder);
+    recorder_destroy(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_pause(recorder);
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+
+    }
+    return 0;
+}
+
+int utc_media_recorder_pause_n(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+    
+    if(cam_supported || mic_supported){
+    ret = recorder_create_audiorecorder(&recorder);
+    ret |= recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_AMR);
+    ret |= recorder_set_file_format(recorder, RECORDER_FILE_FORMAT_AMR);
+    ret |= recorder_prepare(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+    ret = recorder_pause(recorder);
+    recorder_unprepare(recorder);
+    recorder_destroy(recorder);
+    assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_pause(recorder);
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+    }
+    return 0;
+}
+
+int utc_media_recorder_prepare_p(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+    if(cam_supported || mic_supported){
+    ret = recorder_create_audiorecorder(&recorder);
+    ret |= recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_AMR);
+    ret |= recorder_set_file_format(recorder,RECORDER_FILE_FORMAT_AMR);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    ret = recorder_prepare(recorder);
+    recorder_unprepare(recorder);
+    recorder_destroy(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_prepare(recorder);
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+
+    }
+    return 0;
+}
+
+int utc_media_recorder_prepare_n(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+
+    if(cam_supported || mic_supported){
+
+    ret = recorder_create_audiorecorder(&recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+    ret = recorder_prepare(recorder);
+    recorder_destroy(recorder);
+    assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_prepare(recorder);
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+
+    }
+    return 0;
+}
+int utc_media_recorder_start_p(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+
+    if(cam_supported || mic_supported){
+    ret = recorder_create_audiorecorder(&recorder);
+    ret |= recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_AMR);
+    ret |= recorder_set_file_format(recorder,RECORDER_FILE_FORMAT_AMR);
+    ret |= recorder_set_filename(recorder, media_path);
+    ret |= recorder_prepare(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+    ret = recorder_start(recorder);
+    recorder_cancel(recorder);
+    recorder_unprepare(recorder);
+    recorder_destroy(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    } 
+    else{
+
+       ret = recorder_start(recorder);
+       assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+
+    }
+    return 0;
+}
+
+int utc_media_recorder_start_n(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+
+    if(cam_supported || mic_supported){
+    ret = recorder_create_audiorecorder(&recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+    ret = recorder_start(recorder);
+    recorder_destroy(recorder);
+    assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_start(recorder);
+       assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+
+    }
+    return 0;
+}
+
+int utc_media_recorder_unprepare_p(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+    if(cam_supported || mic_supported){
+    ret = recorder_create_audiorecorder(&recorder);
+    ret |= recorder_set_audio_encoder(recorder, RECORDER_AUDIO_CODEC_AMR);
+    ret |= recorder_set_file_format(recorder,RECORDER_FILE_FORMAT_AMR);
+    ret |= recorder_prepare(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+    ret = recorder_unprepare(recorder);
+    recorder_destroy(recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_unprepare(recorder);
+       assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+
+    }
+
+    return 0;
+}
+
+int utc_media_recorder_unprepare_n(void)
+{
+    int ret;
+    recorder_h recorder = NULL;
+
+    if(cam_supported || mic_supported){
+    ret = recorder_create_audiorecorder(&recorder);
+    assert_eq(ret, RECORDER_ERROR_NONE);
+
+    ret = recorder_unprepare(recorder);
+    recorder_destroy(recorder);
+    assert_neq(ret, RECORDER_ERROR_NONE);
+    }
+    else{
+
+       ret = recorder_unprepare(recorder);
+       assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+
+    }
+    return 0;
+}
+
+int utc_media_recorder_get_state_p(void)
+{
+       int ret;
+        recorder_h recorder = NULL;
+       recorder_state_e state = RECORDER_STATE_NONE;
+       
+       if(cam_supported || mic_supported){
+           ret = recorder_create_audiorecorder(&recorder);
+           assert_eq(ret, RECORDER_ERROR_NONE);
+
+           ret = recorder_get_state(recorder, &state);
+           assert_eq(ret, RECORDER_ERROR_NONE);
+           recorder_destroy(recorder);
+       }
+       else{
+
+                   ret = recorder_get_state(recorder, &state);
+           assert_eq(ret,RECORDER_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
+
+int utc_media_recorder_get_state_n(void)
+{
+       int ret;
+        recorder_h recorder = NULL;
+       recorder_state_e state = RECORDER_STATE_NONE;
+       
+       if(cam_supported || mic_supported){
+               ret = recorder_get_state(recorder, &state);
+               assert_neq(ret, RECORDER_ERROR_NONE);
+       }
+       else{
+               ret = recorder_get_state(recorder, &state);
+               assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
+       }
+       return 0;
+}
diff --git a/src/utc/runtime-info/CMakeLists.txt b/src/utc/runtime-info/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..f32c7c7
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "runtime-info")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-system-runtime-info")
+SET(TC_SOURCES
+       utc-runtime-info.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/runtime-info/public.list b/src/utc/runtime-info/public.list
new file mode 100755 (executable)
index 0000000..f301942
--- /dev/null
@@ -0,0 +1,7 @@
+runtime_info_get_value_bool
+runtime_info_get_value_double
+runtime_info_get_value_int
+runtime_info_get_value_string
+runtime_info_set_changed_cb
+runtime_info_unset_changed_cb
+
diff --git a/src/utc/runtime-info/tct-runtime-info-core.c b/src/utc/runtime-info/tct-runtime-info-core.c
new file mode 100755 (executable)
index 0000000..dbb2cb8
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-runtime-info-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/runtime-info/tct-runtime-info-core.h b/src/utc/runtime-info/tct-runtime-info-core.h
new file mode 100755 (executable)
index 0000000..6f1a924
--- /dev/null
@@ -0,0 +1,255 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_RUNTIME_INFO_CORE_H__
+#define __TCT_RUNTIME_INFO_CORE_H__
+
+#include "testcase.h"
+
+
+extern int utc_runtime_info_get_value_double_n(void);
+extern int utc_runtime_info_get_value_double_p(void);
+extern int utc_runtime_info_get_value_string_p(void);
+extern int utc_runtime_info_get_value_bool_p(void);
+extern int utc_runtime_info_get_value_bool_n(void);
+extern int utc_runtime_info_AUDIO_JACK_CONNECTED_n1(void);
+extern int utc_runtime_info_AUDIO_JACK_CONNECTED_n2(void);
+extern int utc_runtime_info_AUDIO_JACK_CONNECTED_n3(void);
+extern int utc_runtime_info_AUDIO_JACK_CONNECTED_p1(void);
+extern int utc_runtime_info_AUDIO_JACK_CONNECTED_p2(void);
+extern int utc_runtime_info_AUDIO_JACK_CONNECTED_p3(void);
+extern int utc_runtime_info_BATTERY_IS_CHARGING_n1(void);
+extern int utc_runtime_info_BATTERY_IS_CHARGING_n2(void);
+extern int utc_runtime_info_BATTERY_IS_CHARGING_n3(void);
+extern int utc_runtime_info_BATTERY_IS_CHARGING_p1(void);
+extern int utc_runtime_info_BATTERY_IS_CHARGING_p2(void);
+extern int utc_runtime_info_BATTERY_IS_CHARGING_p3(void);
+extern int utc_runtime_info_BLUETOOTH_ENABLED_n1(void);
+extern int utc_runtime_info_BLUETOOTH_ENABLED_n2(void);
+extern int utc_runtime_info_BLUETOOTH_ENABLED_n3(void);
+extern int utc_runtime_info_BLUETOOTH_ENABLED_p1(void);
+extern int utc_runtime_info_BLUETOOTH_ENABLED_p2(void);
+extern int utc_runtime_info_BLUETOOTH_ENABLED_p3(void);
+extern int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n1(void);
+extern int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n2(void);
+extern int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n3(void);
+extern int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p1(void);
+extern int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p2(void);
+extern int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p3(void);
+extern int utc_runtime_info_DATA_ROAMING_ENABLED_n1(void);
+extern int utc_runtime_info_DATA_ROAMING_ENABLED_n2(void);
+extern int utc_runtime_info_DATA_ROAMING_ENABLED_n3(void);
+extern int utc_runtime_info_DATA_ROAMING_ENABLED_p1(void);
+extern int utc_runtime_info_DATA_ROAMING_ENABLED_p2(void);
+extern int utc_runtime_info_DATA_ROAMING_ENABLED_p3(void);
+extern int utc_runtime_info_GPS_STATUS_n1(void);
+extern int utc_runtime_info_GPS_STATUS_n2(void);
+extern int utc_runtime_info_GPS_STATUS_n3(void);
+extern int utc_runtime_info_GPS_STATUS_p1(void);
+extern int utc_runtime_info_GPS_STATUS_p2(void);
+extern int utc_runtime_info_GPS_STATUS_p3(void);
+extern int utc_runtime_info_get_value_string_n(void);
+extern int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n1(void);
+extern int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n2(void);
+extern int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n3(void);
+extern int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p1(void);
+extern int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p2(void);
+extern int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p3(void);
+extern int utc_runtime_info_LOCATION_SERVICE_ENABLED_n1(void);
+extern int utc_runtime_info_LOCATION_SERVICE_ENABLED_n2(void);
+extern int utc_runtime_info_LOCATION_SERVICE_ENABLED_n3(void);
+extern int utc_runtime_info_LOCATION_SERVICE_ENABLED_p1(void);
+extern int utc_runtime_info_LOCATION_SERVICE_ENABLED_p2(void);
+extern int utc_runtime_info_LOCATION_SERVICE_ENABLED_p3(void);
+extern int utc_runtime_info_PACKET_DATA_ENABLED_n1(void);
+extern int utc_runtime_info_PACKET_DATA_ENABLED_n2(void);
+extern int utc_runtime_info_PACKET_DATA_ENABLED_n3(void);
+extern int utc_runtime_info_PACKET_DATA_ENABLED_p1(void);
+extern int utc_runtime_info_PACKET_DATA_ENABLED_p2(void);
+extern int utc_runtime_info_PACKET_DATA_ENABLED_p3(void);
+extern int utc_runtime_info_AUTO_ROTATION_ENABLED_n1(void);
+extern int utc_runtime_info_AUTO_ROTATION_ENABLED_n2(void);
+extern int utc_runtime_info_AUTO_ROTATION_ENABLED_n3(void);
+extern int utc_runtime_info_AUTO_ROTATION_ENABLED_p1(void);
+extern int utc_runtime_info_AUTO_ROTATION_ENABLED_p2(void);
+extern int utc_runtime_info_AUTO_ROTATION_ENABLED_p3(void);
+extern int utc_runtime_info_USB_TETHERING_ENABLED_n1(void);
+extern int utc_runtime_info_USB_TETHERING_ENABLED_n2(void);
+extern int utc_runtime_info_USB_TETHERING_ENABLED_n3(void);
+extern int utc_runtime_info_USB_TETHERING_ENABLED_p1(void);
+extern int utc_runtime_info_USB_TETHERING_ENABLED_p2(void);
+extern int utc_runtime_info_USB_TETHERING_ENABLED_p3(void);
+extern int utc_runtime_info_VIBRATION_ENABLED_n1(void);
+extern int utc_runtime_info_VIBRATION_ENABLED_n2(void);
+extern int utc_runtime_info_VIBRATION_ENABLED_n3(void);
+extern int utc_runtime_info_VIBRATION_ENABLED_p1(void);
+extern int utc_runtime_info_VIBRATION_ENABLED_p2(void);
+extern int utc_runtime_info_VIBRATION_ENABLED_p3(void);
+extern int utc_runtime_info_WIFI_HOTSPOT_ENABLED_n1(void);
+extern int utc_runtime_info_WIFI_HOTSPOT_ENABLED_n2(void);
+extern int utc_runtime_info_WIFI_HOTSPOT_ENABLED_n3(void);
+extern int utc_runtime_info_WIFI_HOTSPOT_ENABLED_p1(void);
+extern int utc_runtime_info_WIFI_HOTSPOT_ENABLED_p2(void);
+extern int utc_runtime_info_WIFI_HOTSPOT_ENABLED_p3(void);
+extern int utc_runtime_info_TV_OUT_CONNECTED_n1(void);
+extern int utc_runtime_info_TV_OUT_CONNECTED_n2(void);
+extern int utc_runtime_info_TV_OUT_CONNECTED_n3(void);
+extern int utc_runtime_info_TV_OUT_CONNECTED_p1(void);
+extern int utc_runtime_info_TV_OUT_CONNECTED_p2(void);
+extern int utc_runtime_info_TV_OUT_CONNECTED_p3(void);
+extern int utc_runtime_info_AUDIO_JACK_STATUS_n1(void);
+extern int utc_runtime_info_AUDIO_JACK_STATUS_n2(void);
+extern int utc_runtime_info_AUDIO_JACK_STATUS_n3(void);
+extern int utc_runtime_info_AUDIO_JACK_STATUS_p1(void);
+extern int utc_runtime_info_AUDIO_JACK_STATUS_p2(void);
+extern int utc_runtime_info_AUDIO_JACK_STATUS_p3(void);
+extern int utc_runtime_info_USB_CONNECTED_n1(void);
+extern int utc_runtime_info_USB_CONNECTED_n2(void);
+extern int utc_runtime_info_USB_CONNECTED_n3(void);
+extern int utc_runtime_info_USB_CONNECTED_p1(void);
+extern int utc_runtime_info_USB_CONNECTED_p2(void);
+extern int utc_runtime_info_USB_CONNECTED_p3(void);
+extern int utc_runtime_info_CHARGER_CONNECTED_n1(void);
+extern int utc_runtime_info_CHARGER_CONNECTED_n2(void);
+extern int utc_runtime_info_CHARGER_CONNECTED_n3(void);
+extern int utc_runtime_info_CHARGER_CONNECTED_p1(void);
+extern int utc_runtime_info_CHARGER_CONNECTED_p2(void);
+extern int utc_runtime_info_CHARGER_CONNECTED_p3(void);
+extern int utc_runtime_info_get_value_int_p(void);
+extern int utc_runtime_info_set_changed_cb_p(void);
+extern int utc_runtime_info_unset_changed_cb_p(void);
+extern int utc_runtime_info_get_value_int_n(void);
+extern int utc_runtime_info_set_changed_cb_n(void);
+extern int utc_runtime_info_unset_changed_cb_n(void);
+
+testcase tc_array[] = {
+    {"utc_runtime_info_get_value_double_n", utc_runtime_info_get_value_double_n, NULL, NULL},
+    {"utc_runtime_info_get_value_double_p", utc_runtime_info_get_value_double_p, NULL, NULL},
+    {"utc_runtime_info_get_value_string_p", utc_runtime_info_get_value_string_p, NULL, NULL},
+    {"utc_runtime_info_get_value_bool_p", utc_runtime_info_get_value_bool_p, NULL, NULL},
+    {"utc_runtime_info_get_value_bool_n", utc_runtime_info_get_value_bool_n, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_CONNECTED_n1", utc_runtime_info_AUDIO_JACK_CONNECTED_n1, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_CONNECTED_n2", utc_runtime_info_AUDIO_JACK_CONNECTED_n2, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_CONNECTED_n3", utc_runtime_info_AUDIO_JACK_CONNECTED_n3, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_CONNECTED_p1", utc_runtime_info_AUDIO_JACK_CONNECTED_p1, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_CONNECTED_p2", utc_runtime_info_AUDIO_JACK_CONNECTED_p2, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_CONNECTED_p3", utc_runtime_info_AUDIO_JACK_CONNECTED_p3, NULL, NULL},
+    {"utc_runtime_info_BATTERY_IS_CHARGING_n1", utc_runtime_info_BATTERY_IS_CHARGING_n1, NULL, NULL},
+    {"utc_runtime_info_BATTERY_IS_CHARGING_n2", utc_runtime_info_BATTERY_IS_CHARGING_n2, NULL, NULL},
+    {"utc_runtime_info_BATTERY_IS_CHARGING_n3", utc_runtime_info_BATTERY_IS_CHARGING_n3, NULL, NULL},
+    {"utc_runtime_info_BATTERY_IS_CHARGING_p1", utc_runtime_info_BATTERY_IS_CHARGING_p1, NULL, NULL},
+    {"utc_runtime_info_BATTERY_IS_CHARGING_p2", utc_runtime_info_BATTERY_IS_CHARGING_p2, NULL, NULL},
+    {"utc_runtime_info_BATTERY_IS_CHARGING_p3", utc_runtime_info_BATTERY_IS_CHARGING_p3, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_ENABLED_n1", utc_runtime_info_BLUETOOTH_ENABLED_n1, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_ENABLED_n2", utc_runtime_info_BLUETOOTH_ENABLED_n2, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_ENABLED_n3", utc_runtime_info_BLUETOOTH_ENABLED_n3, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_ENABLED_p1", utc_runtime_info_BLUETOOTH_ENABLED_p1, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_ENABLED_p2", utc_runtime_info_BLUETOOTH_ENABLED_p2, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_ENABLED_p3", utc_runtime_info_BLUETOOTH_ENABLED_p3, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n1", utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n1, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n2", utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n2, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n3", utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n3, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p1", utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p1, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p2", utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p2, NULL, NULL},
+    {"utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p3", utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p3, NULL, NULL},
+    {"utc_runtime_info_DATA_ROAMING_ENABLED_n1", utc_runtime_info_DATA_ROAMING_ENABLED_n1, NULL, NULL},
+    {"utc_runtime_info_DATA_ROAMING_ENABLED_n2", utc_runtime_info_DATA_ROAMING_ENABLED_n2, NULL, NULL},
+    {"utc_runtime_info_DATA_ROAMING_ENABLED_n3", utc_runtime_info_DATA_ROAMING_ENABLED_n3, NULL, NULL},
+    {"utc_runtime_info_DATA_ROAMING_ENABLED_p1", utc_runtime_info_DATA_ROAMING_ENABLED_p1, NULL, NULL},
+    {"utc_runtime_info_DATA_ROAMING_ENABLED_p2", utc_runtime_info_DATA_ROAMING_ENABLED_p2, NULL, NULL},
+    {"utc_runtime_info_DATA_ROAMING_ENABLED_p3", utc_runtime_info_DATA_ROAMING_ENABLED_p3, NULL, NULL},
+    {"utc_runtime_info_GPS_STATUS_n1", utc_runtime_info_GPS_STATUS_n1, NULL, NULL},
+    {"utc_runtime_info_GPS_STATUS_n2", utc_runtime_info_GPS_STATUS_n2, NULL, NULL},
+    {"utc_runtime_info_GPS_STATUS_n3", utc_runtime_info_GPS_STATUS_n3, NULL, NULL},
+    {"utc_runtime_info_GPS_STATUS_p1", utc_runtime_info_GPS_STATUS_p1, NULL, NULL},
+    {"utc_runtime_info_GPS_STATUS_p2", utc_runtime_info_GPS_STATUS_p2, NULL, NULL},
+    {"utc_runtime_info_GPS_STATUS_p3", utc_runtime_info_GPS_STATUS_p3, NULL, NULL},
+    {"utc_runtime_info_get_value_string_n", utc_runtime_info_get_value_string_n, NULL, NULL},
+    {"utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n1", utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n1, NULL, NULL},
+    {"utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n2", utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n2, NULL, NULL},
+    {"utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n3", utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n3, NULL, NULL},
+    {"utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p1", utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p1, NULL, NULL},
+    {"utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p2", utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p2, NULL, NULL},
+    {"utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p3", utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p3, NULL, NULL},
+    {"utc_runtime_info_LOCATION_SERVICE_ENABLED_n1", utc_runtime_info_LOCATION_SERVICE_ENABLED_n1, NULL, NULL},
+    {"utc_runtime_info_LOCATION_SERVICE_ENABLED_n2", utc_runtime_info_LOCATION_SERVICE_ENABLED_n2, NULL, NULL},
+    {"utc_runtime_info_LOCATION_SERVICE_ENABLED_n3", utc_runtime_info_LOCATION_SERVICE_ENABLED_n3, NULL, NULL},
+    {"utc_runtime_info_LOCATION_SERVICE_ENABLED_p1", utc_runtime_info_LOCATION_SERVICE_ENABLED_p1, NULL, NULL},
+    {"utc_runtime_info_LOCATION_SERVICE_ENABLED_p2", utc_runtime_info_LOCATION_SERVICE_ENABLED_p2, NULL, NULL},
+    {"utc_runtime_info_LOCATION_SERVICE_ENABLED_p3", utc_runtime_info_LOCATION_SERVICE_ENABLED_p3, NULL, NULL},
+    {"utc_runtime_info_PACKET_DATA_ENABLED_n1", utc_runtime_info_PACKET_DATA_ENABLED_n1, NULL, NULL},
+    {"utc_runtime_info_PACKET_DATA_ENABLED_n2", utc_runtime_info_PACKET_DATA_ENABLED_n2, NULL, NULL},
+    {"utc_runtime_info_PACKET_DATA_ENABLED_n3", utc_runtime_info_PACKET_DATA_ENABLED_n3, NULL, NULL},
+    {"utc_runtime_info_PACKET_DATA_ENABLED_p1", utc_runtime_info_PACKET_DATA_ENABLED_p1, NULL, NULL},
+    {"utc_runtime_info_PACKET_DATA_ENABLED_p2", utc_runtime_info_PACKET_DATA_ENABLED_p2, NULL, NULL},
+    {"utc_runtime_info_PACKET_DATA_ENABLED_p3", utc_runtime_info_PACKET_DATA_ENABLED_p3, NULL, NULL},
+    {"utc_runtime_info_AUTO_ROTATION_ENABLED_n1", utc_runtime_info_AUTO_ROTATION_ENABLED_n1, NULL, NULL},
+    {"utc_runtime_info_AUTO_ROTATION_ENABLED_n2", utc_runtime_info_AUTO_ROTATION_ENABLED_n2, NULL, NULL},
+    {"utc_runtime_info_AUTO_ROTATION_ENABLED_n3", utc_runtime_info_AUTO_ROTATION_ENABLED_n3, NULL, NULL},
+    {"utc_runtime_info_AUTO_ROTATION_ENABLED_p1", utc_runtime_info_AUTO_ROTATION_ENABLED_p1, NULL, NULL},
+    {"utc_runtime_info_AUTO_ROTATION_ENABLED_p2", utc_runtime_info_AUTO_ROTATION_ENABLED_p2, NULL, NULL},
+    {"utc_runtime_info_AUTO_ROTATION_ENABLED_p3", utc_runtime_info_AUTO_ROTATION_ENABLED_p3, NULL, NULL},
+    {"utc_runtime_info_USB_TETHERING_ENABLED_n1", utc_runtime_info_USB_TETHERING_ENABLED_n1, NULL, NULL},
+    {"utc_runtime_info_USB_TETHERING_ENABLED_n2", utc_runtime_info_USB_TETHERING_ENABLED_n2, NULL, NULL},
+    {"utc_runtime_info_USB_TETHERING_ENABLED_n3", utc_runtime_info_USB_TETHERING_ENABLED_n3, NULL, NULL},
+    {"utc_runtime_info_USB_TETHERING_ENABLED_p1", utc_runtime_info_USB_TETHERING_ENABLED_p1, NULL, NULL},
+    {"utc_runtime_info_USB_TETHERING_ENABLED_p2", utc_runtime_info_USB_TETHERING_ENABLED_p2, NULL, NULL},
+    {"utc_runtime_info_USB_TETHERING_ENABLED_p3", utc_runtime_info_USB_TETHERING_ENABLED_p3, NULL, NULL},
+    {"utc_runtime_info_VIBRATION_ENABLED_n1", utc_runtime_info_VIBRATION_ENABLED_n1, NULL, NULL},
+    {"utc_runtime_info_VIBRATION_ENABLED_n2", utc_runtime_info_VIBRATION_ENABLED_n2, NULL, NULL},
+    {"utc_runtime_info_VIBRATION_ENABLED_n3", utc_runtime_info_VIBRATION_ENABLED_n3, NULL, NULL},
+    {"utc_runtime_info_VIBRATION_ENABLED_p1", utc_runtime_info_VIBRATION_ENABLED_p1, NULL, NULL},
+    {"utc_runtime_info_VIBRATION_ENABLED_p2", utc_runtime_info_VIBRATION_ENABLED_p2, NULL, NULL},
+    {"utc_runtime_info_VIBRATION_ENABLED_p3", utc_runtime_info_VIBRATION_ENABLED_p3, NULL, NULL},
+    {"utc_runtime_info_WIFI_HOTSPOT_ENABLED_n1", utc_runtime_info_WIFI_HOTSPOT_ENABLED_n1, NULL, NULL},
+    {"utc_runtime_info_WIFI_HOTSPOT_ENABLED_n2", utc_runtime_info_WIFI_HOTSPOT_ENABLED_n2, NULL, NULL},
+    {"utc_runtime_info_WIFI_HOTSPOT_ENABLED_n3", utc_runtime_info_WIFI_HOTSPOT_ENABLED_n3, NULL, NULL},
+    {"utc_runtime_info_WIFI_HOTSPOT_ENABLED_p1", utc_runtime_info_WIFI_HOTSPOT_ENABLED_p1, NULL, NULL},
+    {"utc_runtime_info_WIFI_HOTSPOT_ENABLED_p2", utc_runtime_info_WIFI_HOTSPOT_ENABLED_p2, NULL, NULL},
+    {"utc_runtime_info_WIFI_HOTSPOT_ENABLED_p3", utc_runtime_info_WIFI_HOTSPOT_ENABLED_p3, NULL, NULL},
+    {"utc_runtime_info_TV_OUT_CONNECTED_n1", utc_runtime_info_TV_OUT_CONNECTED_n1, NULL, NULL},
+    {"utc_runtime_info_TV_OUT_CONNECTED_n2", utc_runtime_info_TV_OUT_CONNECTED_n2, NULL, NULL},
+    {"utc_runtime_info_TV_OUT_CONNECTED_n3", utc_runtime_info_TV_OUT_CONNECTED_n3, NULL, NULL},
+    {"utc_runtime_info_TV_OUT_CONNECTED_p1", utc_runtime_info_TV_OUT_CONNECTED_p1, NULL, NULL},
+    {"utc_runtime_info_TV_OUT_CONNECTED_p2", utc_runtime_info_TV_OUT_CONNECTED_p2, NULL, NULL},
+    {"utc_runtime_info_TV_OUT_CONNECTED_p3", utc_runtime_info_TV_OUT_CONNECTED_p3, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_STATUS_n1", utc_runtime_info_AUDIO_JACK_STATUS_n1, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_STATUS_n2", utc_runtime_info_AUDIO_JACK_STATUS_n2, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_STATUS_n3", utc_runtime_info_AUDIO_JACK_STATUS_n3, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_STATUS_p1", utc_runtime_info_AUDIO_JACK_STATUS_p1, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_STATUS_p2", utc_runtime_info_AUDIO_JACK_STATUS_p2, NULL, NULL},
+    {"utc_runtime_info_AUDIO_JACK_STATUS_p3", utc_runtime_info_AUDIO_JACK_STATUS_p3, NULL, NULL},
+    {"utc_runtime_info_USB_CONNECTED_n1", utc_runtime_info_USB_CONNECTED_n1, NULL, NULL},
+    {"utc_runtime_info_USB_CONNECTED_n2", utc_runtime_info_USB_CONNECTED_n2, NULL, NULL},
+    {"utc_runtime_info_USB_CONNECTED_n3", utc_runtime_info_USB_CONNECTED_n3, NULL, NULL},
+    {"utc_runtime_info_USB_CONNECTED_p1", utc_runtime_info_USB_CONNECTED_p1, NULL, NULL},
+    {"utc_runtime_info_USB_CONNECTED_p2", utc_runtime_info_USB_CONNECTED_p2, NULL, NULL},
+    {"utc_runtime_info_USB_CONNECTED_p3", utc_runtime_info_USB_CONNECTED_p3, NULL, NULL},
+    {"utc_runtime_info_CHARGER_CONNECTED_n1", utc_runtime_info_CHARGER_CONNECTED_n1, NULL, NULL},
+    {"utc_runtime_info_CHARGER_CONNECTED_n2", utc_runtime_info_CHARGER_CONNECTED_n2, NULL, NULL},
+    {"utc_runtime_info_CHARGER_CONNECTED_n3", utc_runtime_info_CHARGER_CONNECTED_n3, NULL, NULL},
+    {"utc_runtime_info_CHARGER_CONNECTED_p1", utc_runtime_info_CHARGER_CONNECTED_p1, NULL, NULL},
+    {"utc_runtime_info_CHARGER_CONNECTED_p2", utc_runtime_info_CHARGER_CONNECTED_p2, NULL, NULL},
+    {"utc_runtime_info_CHARGER_CONNECTED_p3", utc_runtime_info_CHARGER_CONNECTED_p3, NULL, NULL},
+    {"utc_runtime_info_get_value_int_p", utc_runtime_info_get_value_int_p, NULL, NULL},
+    {"utc_runtime_info_set_changed_cb_p", utc_runtime_info_set_changed_cb_p, NULL, NULL},
+    {"utc_runtime_info_unset_changed_cb_p", utc_runtime_info_unset_changed_cb_p, NULL, NULL},
+    {"utc_runtime_info_get_value_int_n", utc_runtime_info_get_value_int_n, NULL, NULL},
+    {"utc_runtime_info_set_changed_cb_n", utc_runtime_info_set_changed_cb_n, NULL, NULL},
+    {"utc_runtime_info_unset_changed_cb_n", utc_runtime_info_unset_changed_cb_n, NULL, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_RUNTIME_INFO_CORE_H__
diff --git a/src/utc/runtime-info/utc-runtime-info.c b/src/utc/runtime-info/utc-runtime-info.c
new file mode 100755 (executable)
index 0000000..2b44430
--- /dev/null
@@ -0,0 +1,1559 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <stdlib.h>
+#include "assert.h"
+#include "runtime_info.h"
+
+
+//& set: RuntimeInfo
+
+#define RUNTIME_ASSERT(exp, ref) \
+       do { \
+               if (exp == RUNTIME_INFO_ERROR_NOT_SUPPORTED) \
+                       exp = RUNTIME_INFO_ERROR_NONE; \
+               assert_eq(exp, ref); \
+       } while (0);
+
+static void runtime_info_changed(runtime_info_key_e key, void *user_data)
+{
+}
+
+
+
+
+int utc_runtime_info_get_value_double_n(void)
+{
+    double value;
+    int retcode;
+
+    retcode = runtime_info_get_value_double((runtime_info_key_e)NULL, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_runtime_info_get_value_double_p(void)
+{
+//TODO: current runtime_info does not have double type value.
+    return 0;
+}
+
+int utc_runtime_info_get_value_string_p(void)
+{
+//TODO: current runtime_info does not have string type value.
+    return 0;
+}
+
+int utc_runtime_info_get_value_bool_p(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_24HOUR_CLOCK_FORMAT_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+int utc_runtime_info_get_value_bool_n(void)
+{
+    int retcode;
+
+    retcode = runtime_info_get_value_bool((runtime_info_key_e)NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+
+
+int utc_runtime_info_AUDIO_JACK_CONNECTED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_AUDIO_JACK_CONNECTED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_AUDIO_JACK_CONNECTED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_AUDIO_JACK_CONNECTED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_AUDIO_JACK_CONNECTED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_AUDIO_JACK_CONNECTED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_BATTERY_IS_CHARGING_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BATTERY_IS_CHARGING;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_BATTERY_IS_CHARGING_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BATTERY_IS_CHARGING;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_BATTERY_IS_CHARGING_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BATTERY_IS_CHARGING;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_BATTERY_IS_CHARGING_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BATTERY_IS_CHARGING;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_BATTERY_IS_CHARGING_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BATTERY_IS_CHARGING;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_BATTERY_IS_CHARGING_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BATTERY_IS_CHARGING;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_ENABLED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_ENABLED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_ENABLED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_ENABLED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_ENABLED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_ENABLED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_ENABLED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_ENABLED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_BLUETOOTH_TETHERING_ENABLED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_DATA_ROAMING_ENABLED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_DATA_ROAMING_ENABLED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_DATA_ROAMING_ENABLED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_DATA_ROAMING_ENABLED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_DATA_ROAMING_ENABLED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_DATA_ROAMING_ENABLED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_GPS_STATUS_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_GPS_STATUS;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_GPS_STATUS_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_GPS_STATUS;
+
+    retcode = runtime_info_get_value_int(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_GPS_STATUS_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_GPS_STATUS;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_GPS_STATUS_p1(void)
+{
+    int value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_GPS_STATUS;
+
+    retcode = runtime_info_get_value_int(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_GPS_STATUS_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_GPS_STATUS;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_GPS_STATUS_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_GPS_STATUS;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_get_value_string_n(void)
+{
+    char *value = NULL;
+    int retcode;
+
+    retcode = runtime_info_get_value_string((runtime_info_key_e)NULL, &value);
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+
+
+int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_LOCATION_NETWORK_POSITION_ENABLED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_LOCATION_SERVICE_ENABLED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_LOCATION_SERVICE_ENABLED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_LOCATION_SERVICE_ENABLED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_LOCATION_SERVICE_ENABLED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_LOCATION_SERVICE_ENABLED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_LOCATION_SERVICE_ENABLED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_PACKET_DATA_ENABLED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_PACKET_DATA_ENABLED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_PACKET_DATA_ENABLED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_PACKET_DATA_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_PACKET_DATA_ENABLED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_PACKET_DATA_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_PACKET_DATA_ENABLED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_PACKET_DATA_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_PACKET_DATA_ENABLED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_PACKET_DATA_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_PACKET_DATA_ENABLED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_PACKET_DATA_ENABLED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+
+
+int utc_runtime_info_AUTO_ROTATION_ENABLED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_AUTO_ROTATION_ENABLED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_AUTO_ROTATION_ENABLED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_AUTO_ROTATION_ENABLED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_AUTO_ROTATION_ENABLED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_AUTO_ROTATION_ENABLED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+
+
+int utc_runtime_info_USB_TETHERING_ENABLED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_TETHERING_ENABLED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_USB_TETHERING_ENABLED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_TETHERING_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_USB_TETHERING_ENABLED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_TETHERING_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_USB_TETHERING_ENABLED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_TETHERING_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_USB_TETHERING_ENABLED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_TETHERING_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_USB_TETHERING_ENABLED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_TETHERING_ENABLED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_VIBRATION_ENABLED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_VIBRATION_ENABLED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_VIBRATION_ENABLED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_VIBRATION_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_VIBRATION_ENABLED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_VIBRATION_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_VIBRATION_ENABLED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_VIBRATION_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_VIBRATION_ENABLED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_VIBRATION_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_VIBRATION_ENABLED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_VIBRATION_ENABLED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_WIFI_HOTSPOT_ENABLED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_WIFI_HOTSPOT_ENABLED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_WIFI_HOTSPOT_ENABLED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_WIFI_HOTSPOT_ENABLED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_WIFI_HOTSPOT_ENABLED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_WIFI_HOTSPOT_ENABLED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+
+
+int utc_runtime_info_TV_OUT_CONNECTED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_TV_OUT_CONNECTED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_TV_OUT_CONNECTED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_TV_OUT_CONNECTED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_TV_OUT_CONNECTED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_TV_OUT_CONNECTED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_TV_OUT_CONNECTED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_TV_OUT_CONNECTED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_TV_OUT_CONNECTED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_TV_OUT_CONNECTED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_TV_OUT_CONNECTED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_TV_OUT_CONNECTED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_AUDIO_JACK_STATUS_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_STATUS;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_AUDIO_JACK_STATUS_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_STATUS;
+
+    retcode = runtime_info_get_value_int(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_AUDIO_JACK_STATUS_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_STATUS;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_AUDIO_JACK_STATUS_p1(void)
+{
+    int value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_STATUS;
+
+
+    retcode = runtime_info_get_value_int(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_AUDIO_JACK_STATUS_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_STATUS;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_AUDIO_JACK_STATUS_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_AUDIO_JACK_STATUS;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+
+
+int utc_runtime_info_USB_CONNECTED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_CONNECTED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_USB_CONNECTED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_CONNECTED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_USB_CONNECTED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_CONNECTED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_USB_CONNECTED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_CONNECTED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_USB_CONNECTED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_CONNECTED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_USB_CONNECTED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_USB_CONNECTED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_CHARGER_CONNECTED_n1(void)
+{
+    char *value = NULL;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_CHARGER_CONNECTED;
+
+    retcode = runtime_info_get_value_string(key, &value);
+    if (value)
+        free(value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_CHARGER_CONNECTED_n2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_CHARGER_CONNECTED;
+
+    retcode = runtime_info_get_value_bool(key, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_CHARGER_CONNECTED_n3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_CHARGER_CONNECTED;
+
+    retcode = runtime_info_set_changed_cb(key, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+int utc_runtime_info_CHARGER_CONNECTED_p1(void)
+{
+    bool value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_CHARGER_CONNECTED;
+
+    retcode = runtime_info_get_value_bool(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_CHARGER_CONNECTED_p2(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_CHARGER_CONNECTED;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_CHARGER_CONNECTED_p3(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_CHARGER_CONNECTED;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+int utc_runtime_info_get_value_int_p(void)
+{
+    int value;
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_GPS_STATUS;
+
+    retcode = runtime_info_get_value_int(key, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_runtime_info_set_changed_cb_p(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_GPS_STATUS;
+
+    retcode = runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+
+    runtime_info_unset_changed_cb(key);
+
+    return 0;
+}
+
+
+int utc_runtime_info_unset_changed_cb_p(void)
+{
+    int retcode;
+    runtime_info_key_e key = RUNTIME_INFO_KEY_GPS_STATUS;
+
+    runtime_info_set_changed_cb(key, runtime_info_changed, NULL);
+
+    retcode = runtime_info_unset_changed_cb(key);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_NONE);
+    return 0;
+}
+
+
+
+
+int utc_runtime_info_get_value_int_n(void)
+{
+    int value;
+    int retcode;
+
+    retcode = runtime_info_get_value_int((runtime_info_key_e)NULL, &value);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+int utc_runtime_info_set_changed_cb_n(void)
+{
+    int retcode;
+
+    retcode = runtime_info_set_changed_cb((runtime_info_key_e)NULL, NULL, NULL);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+
+
+int utc_runtime_info_unset_changed_cb_n(void)
+{
+    int retcode;
+
+    retcode = runtime_info_unset_changed_cb(-1);
+
+    RUNTIME_ASSERT(retcode, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
diff --git a/src/utc/sensor/CMakeLists.txt b/src/utc/sensor/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..d7c98a5
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "sensor")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-system-sensor")
+SET(TC_SOURCES
+       utc-system-sensor-basic.c
+       utc-system-sensor-utils.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       capi-system-info
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/sensor/platform.list b/src/utc/sensor/platform.list
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/src/utc/sensor/product.list b/src/utc/sensor/product.list
new file mode 100755 (executable)
index 0000000..a86685a
--- /dev/null
@@ -0,0 +1,84 @@
+sensor_awake_is_enabled
+sensor_awake_is_supported
+sensor_awake_set_cb
+sensor_awake_unset_cb
+sensor_bio_hrm_read_data
+sensor_bio_hrm_set_cb
+sensor_bio_hrm_unset_cb
+sensor_bio_read_data
+sensor_bio_set_cb
+sensor_bio_set_interval
+sensor_bio_unset_cb
+sensor_device_orientation_read_data
+sensor_device_orientation_set_cb
+sensor_device_orientation_unset_cb
+sensor_get_delay_boundary
+sensor_gravity_read_data
+sensor_gravity_set_cb
+sensor_gravity_set_interval
+sensor_gravity_unset_cb
+sensor_gyroscope_read_data
+sensor_gyroscope_set_cb
+sensor_gyroscope_set_interval
+sensor_gyroscope_unset_cb
+sensor_light_read_data
+sensor_light_set_cb
+sensor_light_set_interval
+sensor_light_unset_cb
+sensor_linear_acceleration_read_data
+sensor_linear_acceleration_set_cb
+sensor_linear_acceleration_set_interval
+sensor_linear_acceleration_unset_cb
+sensor_magnetic_read_data
+sensor_magnetic_set_calibration_cb
+sensor_magnetic_set_cb
+sensor_magnetic_set_interval
+sensor_magnetic_unset_calibration_cb
+sensor_magnetic_unset_cb
+sensor_motion_directcall_set_cb
+sensor_motion_directcall_unset_cb
+sensor_motion_doubletap_set_cb
+sensor_motion_doubletap_unset_cb
+sensor_motion_facedown_set_cb
+sensor_motion_facedown_unset_cb
+sensor_motion_no_move_set_cb
+sensor_motion_no_move_unset_cb
+sensor_motion_panning_browse_set_cb
+sensor_motion_panning_browse_unset_cb
+sensor_motion_panning_set_cb
+sensor_motion_panning_unset_cb
+sensor_motion_shake_always_on_set_cb
+sensor_motion_shake_always_on_unset_cb
+sensor_motion_shake_set_cb
+sensor_motion_shake_unset_cb
+sensor_motion_smart_alert_set_cb
+sensor_motion_smart_alert_unset_cb
+sensor_motion_snap_set_cb
+sensor_motion_snap_unset_cb
+sensor_motion_tilt_set_cb
+sensor_motion_tilt_unset_cb
+sensor_orientation_read_data
+sensor_orientation_set_calibration_cb
+sensor_orientation_set_cb
+sensor_orientation_set_interval
+sensor_orientation_unset_calibration_cb
+sensor_orientation_unset_cb
+sensor_pedometer_step_read_data
+sensor_pedometer_step_set_cb
+sensor_pedometer_step_unset_cb
+sensor_pressure_read_data
+sensor_pressure_set_cb
+sensor_pressure_set_interval
+sensor_pressure_unset_cb
+sensor_proximity_read_data
+sensor_proximity_set_cb
+sensor_proximity_set_interval
+sensor_proximity_unset_cb
+sensor_rotation_read_data
+sensor_rotation_set_cb
+sensor_rotation_unset_cb
+sensor_rotation_vector_read_data
+sensor_rotation_vector_set_cb
+sensor_rotation_vector_set_interval
+sensor_rotation_vector_unset_cb
+sensor_util_is_near
diff --git a/src/utc/sensor/public.list b/src/utc/sensor/public.list
new file mode 100755 (executable)
index 0000000..368888d
--- /dev/null
@@ -0,0 +1,32 @@
+sensor_create_listener
+sensor_destroy_listener
+sensor_get_default_sensor
+sensor_get_fifo_count
+sensor_get_max_batch_count
+sensor_get_max_range
+sensor_get_min_interval
+sensor_get_min_range
+sensor_get_name
+sensor_get_resolution
+sensor_get_sensor_list
+sensor_get_type
+sensor_get_vendor
+sensor_is_supported
+sensor_listener_read_data
+sensor_listener_set_accuracy_cb
+sensor_listener_set_event_cb
+sensor_listener_set_interval
+sensor_listener_set_max_batch_latency
+sensor_listener_set_option
+sensor_listener_start
+sensor_listener_stop
+sensor_listener_unset_accuracy_cb
+sensor_listener_unset_event_cb
+sensor_util_get_angle_change
+sensor_util_get_declination
+sensor_util_get_inclination
+sensor_util_get_orientation
+sensor_util_get_rotation_matrix
+sensor_util_get_rotation_matrix_from_vector
+sensor_util_remap_coordinate_system
+
diff --git a/src/utc/sensor/tct-sensor-core.c b/src/utc/sensor/tct-sensor-core.c
new file mode 100755 (executable)
index 0000000..7f8b292
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-sensor-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/sensor/tct-sensor-core.h b/src/utc/sensor/tct-sensor-core.h
new file mode 100755 (executable)
index 0000000..5dc141a
--- /dev/null
@@ -0,0 +1,154 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SENSOR_CORE_H__
+#define __TCT_SENSOR_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_system_sensor_basic_startup(void);
+extern void utc_system_sensor_basic_cleanup(void);
+extern void utc_system_sensor_util_startup(void);
+
+extern int utc_system_sensor_get_default_sensor_p(void);
+extern int utc_system_sensor_get_default_sensor_n(void);
+extern int utc_system_sensor_get_sensor_list_p(void);
+extern int utc_system_sensor_get_sensor_list_n(void);
+extern int utc_system_sensor_create_listener_p(void);
+extern int utc_system_sensor_create_listener_n(void);
+extern int utc_system_sensor_destroy_listener_p(void);
+extern int utc_system_sensor_destroy_listener_n(void);
+extern int utc_system_sensor_listener_start_p(void);
+extern int utc_system_sensor_listener_start_n(void);
+extern int utc_system_sensor_listener_stop_p(void);
+extern int utc_system_sensor_listener_stop_n(void);
+extern int utc_system_sensor_listener_set_event_cb_p(void);
+extern int utc_system_sensor_listener_set_event_cb_n(void);
+extern int utc_system_sensor_listener_unset_event_cb_p(void);
+extern int utc_system_sensor_listener_unset_event_cb_n(void);
+extern int utc_system_sensor_listener_set_accuracy_cb_p(void);
+extern int utc_system_sensor_listener_set_accuracy_cb_n(void);
+extern int utc_system_sensor_listener_unset_accuracy_cb_p(void);
+extern int utc_system_sensor_listener_unset_accuracy_cb_n(void);
+extern int utc_system_sensor_listener_read_data_p(void);
+extern int utc_system_sensor_listener_read_data_n(void);
+extern int utc_system_sensor_listener_set_interval_p(void);
+extern int utc_system_sensor_listener_set_interval_n(void);
+extern int utc_system_sensor_listener_set_max_batch_latency_p(void);
+extern int utc_system_sensor_listener_set_max_batch_latency_n(void);
+extern int utc_system_sensor_get_name_p(void);
+extern int utc_system_sensor_get_name_n(void);
+extern int utc_system_sensor_get_vendor_p(void);
+extern int utc_system_sensor_get_vendor_n(void);
+extern int utc_system_sensor_get_type_p(void);
+extern int utc_system_sensor_get_type_n(void);
+extern int utc_system_sensor_get_min_range_p(void);
+extern int utc_system_sensor_get_min_range_n(void);
+extern int utc_system_sensor_get_max_range_p(void);
+extern int utc_system_sensor_get_max_range_n(void);
+extern int utc_system_sensor_get_resolution_p(void);
+extern int utc_system_sensor_get_resolution_n(void);
+extern int utc_system_sensor_get_min_interval_p(void);
+extern int utc_system_sensor_get_min_interval_n(void);
+extern int utc_system_sensor_get_fifo_count_p(void);
+extern int utc_system_sensor_get_fifo_count_n(void);
+extern int utc_system_sensor_get_max_batch_count_p(void);
+extern int utc_system_sensor_get_max_batch_count_n(void);
+extern int utc_system_sensor_listener_set_option_p(void);
+extern int utc_system_sensor_listener_set_option_n(void);
+extern int utc_system_sensor_is_supported_p(void);
+extern int utc_system_sensor_is_supported_n(void);
+extern int utc_system_sensor_util_get_angle_change_p(void);
+extern int utc_system_sensor_util_get_angle_change_n(void);
+extern int utc_system_sensor_util_get_declination_p(void);
+extern int utc_system_sensor_util_get_declination_n(void);
+extern int utc_system_sensor_util_get_inclination_p(void);
+extern int utc_system_sensor_util_get_inclination_n(void);
+extern int utc_system_sensor_util_get_orientation_p(void);
+extern int utc_system_sensor_util_get_orientation_n(void);
+extern int utc_system_sensor_util_get_rotation_matrix_p(void);
+extern int utc_system_sensor_util_get_rotation_matrix_n(void);
+extern int utc_system_sensor_util_get_rotation_matrix_from_vector_p(void);
+extern int utc_system_sensor_util_get_rotation_matrix_from_vector_n(void);
+extern int utc_system_sensor_util_remap_coordinate_system_p(void);
+extern int utc_system_sensor_util_remap_coordinate_system_n(void);
+
+testcase tc_array[] = {
+    {"utc_system_sensor_get_default_sensor_p", utc_system_sensor_get_default_sensor_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_default_sensor_n", utc_system_sensor_get_default_sensor_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_sensor_list_p", utc_system_sensor_get_sensor_list_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_sensor_list_n", utc_system_sensor_get_sensor_list_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_create_listener_p", utc_system_sensor_create_listener_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_create_listener_n", utc_system_sensor_create_listener_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_destroy_listener_p", utc_system_sensor_destroy_listener_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_destroy_listener_n", utc_system_sensor_destroy_listener_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_start_p", utc_system_sensor_listener_start_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_start_n", utc_system_sensor_listener_start_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_stop_p", utc_system_sensor_listener_stop_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_stop_n", utc_system_sensor_listener_stop_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_set_event_cb_p", utc_system_sensor_listener_set_event_cb_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_set_event_cb_n", utc_system_sensor_listener_set_event_cb_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_unset_event_cb_p", utc_system_sensor_listener_unset_event_cb_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_unset_event_cb_n", utc_system_sensor_listener_unset_event_cb_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_set_accuracy_cb_p", utc_system_sensor_listener_set_accuracy_cb_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_set_accuracy_cb_n", utc_system_sensor_listener_set_accuracy_cb_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_unset_accuracy_cb_p", utc_system_sensor_listener_unset_accuracy_cb_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_unset_accuracy_cb_n", utc_system_sensor_listener_unset_accuracy_cb_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_read_data_p", utc_system_sensor_listener_read_data_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_read_data_n", utc_system_sensor_listener_read_data_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_set_interval_p", utc_system_sensor_listener_set_interval_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_set_interval_n", utc_system_sensor_listener_set_interval_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_set_max_batch_latency_p", utc_system_sensor_listener_set_max_batch_latency_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_set_max_batch_latency_n", utc_system_sensor_listener_set_max_batch_latency_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_name_p", utc_system_sensor_get_name_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_name_n", utc_system_sensor_get_name_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_vendor_p", utc_system_sensor_get_vendor_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_vendor_n", utc_system_sensor_get_vendor_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_type_p", utc_system_sensor_get_type_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_type_n", utc_system_sensor_get_type_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_min_range_p", utc_system_sensor_get_min_range_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_min_range_n", utc_system_sensor_get_min_range_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_max_range_p", utc_system_sensor_get_max_range_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_max_range_n", utc_system_sensor_get_max_range_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_resolution_p", utc_system_sensor_get_resolution_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_resolution_n", utc_system_sensor_get_resolution_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_min_interval_p", utc_system_sensor_get_min_interval_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_min_interval_n", utc_system_sensor_get_min_interval_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_fifo_count_p", utc_system_sensor_get_fifo_count_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_fifo_count_n", utc_system_sensor_get_fifo_count_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_max_batch_count_p", utc_system_sensor_get_max_batch_count_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_get_max_batch_count_n", utc_system_sensor_get_max_batch_count_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_set_option_p", utc_system_sensor_listener_set_option_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_listener_set_option_n", utc_system_sensor_listener_set_option_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_is_supported_p", utc_system_sensor_is_supported_p, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_is_supported_n", utc_system_sensor_is_supported_n, utc_system_sensor_basic_startup, utc_system_sensor_basic_cleanup},
+    {"utc_system_sensor_util_get_angle_change_p", utc_system_sensor_util_get_angle_change_p, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_get_angle_change_n", utc_system_sensor_util_get_angle_change_n, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_get_declination_p", utc_system_sensor_util_get_declination_p, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_get_declination_n", utc_system_sensor_util_get_declination_n, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_get_inclination_p", utc_system_sensor_util_get_inclination_p, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_get_inclination_n", utc_system_sensor_util_get_inclination_n, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_get_orientation_p", utc_system_sensor_util_get_orientation_p, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_get_orientation_n", utc_system_sensor_util_get_orientation_n, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_get_rotation_matrix_p", utc_system_sensor_util_get_rotation_matrix_p, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_get_rotation_matrix_n", utc_system_sensor_util_get_rotation_matrix_n, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_get_rotation_matrix_from_vector_p", utc_system_sensor_util_get_rotation_matrix_from_vector_p, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_get_rotation_matrix_from_vector_n", utc_system_sensor_util_get_rotation_matrix_from_vector_n, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_remap_coordinate_system_p", utc_system_sensor_util_remap_coordinate_system_p, utc_system_sensor_util_startup, NULL},
+    {"utc_system_sensor_util_remap_coordinate_system_n", utc_system_sensor_util_remap_coordinate_system_n, utc_system_sensor_util_startup, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SENSOR_CORE_H__
diff --git a/src/utc/sensor/utc-system-sensor-basic.c b/src/utc/sensor/utc-system-sensor-basic.c
new file mode 100755 (executable)
index 0000000..9f82a00
--- /dev/null
@@ -0,0 +1,1260 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <sensor.h>
+#include <glib.h>
+#include <string.h>
+#include <system_info.h>
+
+//& set: SensorBasic
+
+#define TEST_STRING "TEST_TEST_TEST"
+#define INTERVAL 20
+#define CB_TIMEOUT 2000
+
+static GMainLoop* g_mainloop = NULL;
+static bool g_called = false;
+
+sensor_type_e types[] = {
+       SENSOR_ACCELEROMETER,                    /**< Accelerometer */
+       SENSOR_GRAVITY,                          /**< Gravity sensor */
+       SENSOR_LINEAR_ACCELERATION,              /**< Linear acceleration sensor */
+       SENSOR_MAGNETIC,                         /**< Magnetic sensor */
+       SENSOR_ROTATION_VECTOR,                  /**< Rotation Vector sensor */
+       SENSOR_ORIENTATION,                      /**< Orientation sensor */
+       SENSOR_GYROSCOPE,                        /**< Gyroscope sensor */
+       SENSOR_LIGHT,                            /**< Light sensor */
+       SENSOR_PROXIMITY,                        /**< Proximity sensor */
+       SENSOR_PRESSURE,                         /**< Pressure sensor */
+       SENSOR_ULTRAVIOLET,                      /**< Ultraviolet sensor */
+       SENSOR_TEMPERATURE,                      /**< Temperature sensor */
+       SENSOR_HUMIDITY,                         /**< Humidity sensor */
+       SENSOR_HRM,                              /**< Heart Rate Monitor sensor */
+       SENSOR_HRM_LED_GREEN,                    /**< HRM (LED Green) sensor */
+       SENSOR_HRM_LED_IR,                       /**< HRM (LED IR) sensor */
+       SENSOR_HRM_LED_RED,                      /**< HRM (LED RED) sensor */
+};
+
+static char* sensor_features[17] = {
+       "http://tizen.org/feature/sensor.accelerometer",
+       "http://tizen.org/feature/sensor.gravity",
+       "http://tizen.org/feature/sensor.linear_acceleration",
+       "http://tizen.org/feature/sensor.magnetometer",
+       "http://tizen.org/feature/sensor.rotation_vector",
+       "http://tizen.org/feature/sensor.tiltmeter",
+       "http://tizen.org/feature/sensor.gyroscope",
+       "http://tizen.org/feature/sensor.photometer",
+       "http://tizen.org/feature/sensor.proximity",
+       "http://tizen.org/feature/sensor.barometer",
+       "http://tizen.org/feature/sensor.ultraviolet",
+       "http://tizen.org/feature/sensor.temperature",
+       "http://tizen.org/feature/sensor.humidity",
+       "http://tizen.org/feature/sensor.heart_rate_monitor",
+       "http://tizen.org/feature/sensor.heart_rate_monitor.led_green",
+       "http://tizen.org/feature/sensor.heart_rate_monitor.led_ir",
+       "http://tizen.org/feature/sensor.heart_rate_monitor.led_red"
+};
+
+static bool sensor_supported[17];
+static bool supported=false;
+
+static gboolean timeout_func(gpointer data)
+{
+       if (g_main_loop_is_running(g_mainloop))
+               g_main_loop_quit(g_mainloop);
+
+       return FALSE;
+}
+
+static void wait_callback(sensor_type_e type)
+{
+       if (type == SENSOR_PROXIMITY) {
+               g_called = true;
+               return;
+       }
+
+       int nSensorTimeoutId = g_timeout_add(CB_TIMEOUT, timeout_func, g_mainloop);
+       g_main_loop_run(g_mainloop);
+       g_source_remove(nSensorTimeoutId);
+}
+
+static void test_accuracy_changed(sensor_h sensor, unsigned long long timestamp, sensor_data_accuracy_e accuracy, void* user_data)
+{
+       fprintf(stderr, "test_accuracy_cb was called.\n");
+
+       char* ud = (char*) user_data;
+       if(strcmp(ud, TEST_STRING) == 0) {
+               g_called = true;
+       }
+
+       if (g_main_loop_is_running(g_mainloop))
+               g_main_loop_quit(g_mainloop);
+}
+
+static void test_callback(sensor_h sensor, sensor_event_s *event, void* user_data)
+{
+       fprintf(stderr, "test_callback was called\n");
+
+       char* ud = (char*) user_data;
+       if(strcmp(ud, TEST_STRING) == 0) {
+               g_called = true;
+       }
+
+       if (g_main_loop_is_running(g_mainloop))
+               g_main_loop_quit(g_mainloop);
+}
+
+void utc_system_sensor_basic_startup(void)
+{
+       g_mainloop = g_main_loop_new(NULL, FALSE);
+
+       int sensor_cnt = sizeof(types)/sizeof(sensor_type_e);
+       int i;
+
+       for( i=0;i<sensor_cnt;i++){
+               system_info_get_platform_bool(sensor_features[i], &sensor_supported[i]);
+               if(sensor_supported[i]) supported=true;
+       }
+}
+
+void utc_system_sensor_basic_cleanup(void)
+{
+       g_main_loop_unref(g_mainloop);
+}
+
+int utc_system_sensor_get_default_sensor_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+       return 0;
+}
+
+int utc_system_sensor_get_default_sensor_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_get_default_sensor(-1, NULL);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_sensor_list_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       sensor_h *list;
+       int count;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               error = sensor_get_sensor_list(types[i], &list, &count);
+
+               if(!sensor_supported[i]){
+                       assert_eq(error, SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+
+               fprintf(stderr, "sensor[%d] passed", i);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_sensor_list_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_get_sensor_list(-1, NULL, NULL);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_create_listener_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       sensor_listener_h listener;
+       sensor_h sensor;
+       int type_count;
+       int i;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_create_listener(sensor, &listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_destroy_listener(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+               }
+
+               fprintf(stderr, "sensor[%d] passed", i);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_create_listener_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       sensor_h sensor;
+
+       sensor_get_default_sensor(SENSOR_ACCELEROMETER, &sensor);
+
+       if(supported){
+               error = sensor_create_listener(sensor, NULL);
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               error = sensor_create_listener(sensor, NULL);
+
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_destroy_listener_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       sensor_listener_h listener;
+       sensor_h sensor;
+       int type_count;
+       int i;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       assert_eq(error,SENSOR_ERROR_NONE);
+
+                       error = sensor_create_listener(sensor, &listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_destroy_listener(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_destroy_listener_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_destroy_listener(NULL);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_start_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_listener_h listener;
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+
+                       error = sensor_create_listener(sensor, &listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_start(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_stop(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_start_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_listener_start(NULL);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_stop_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_listener_h listener;
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+
+                       sensor_create_listener(sensor, &listener);
+
+                       error = sensor_listener_start(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_stop(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_stop_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_listener_stop(NULL);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_set_event_cb_p(void)
+{
+       int i = 0;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+       for (i = 0; i < type_count; i++) {
+               int error = SENSOR_ERROR_NONE;
+               sensor_listener_h listener;
+               sensor_h sensor;
+               g_called = false;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       error = sensor_create_listener(sensor, &listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_set_event_cb(listener, INTERVAL, test_callback, TEST_STRING);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_start(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       sensor_listener_set_option(listener, 1);
+
+                       wait_callback(types[i]);
+
+                       error = sensor_listener_stop(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_unset_event_cb(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       assert(g_called);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_set_event_cb_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_listener_set_event_cb(NULL, INTERVAL, test_callback, TEST_STRING);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_unset_event_cb_p(void)
+{
+       int i = 0;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               int error = SENSOR_ERROR_NONE;
+               sensor_listener_h listener;
+               sensor_h sensor;
+               g_called = false;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       error = sensor_create_listener(sensor, &listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_set_event_cb(listener, INTERVAL, test_callback, TEST_STRING);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_unset_event_cb(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_unset_event_cb_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_listener_unset_event_cb(NULL);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_set_accuracy_cb_p(void)
+{
+       int i = 0;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               int error = SENSOR_ERROR_NONE;
+               sensor_listener_h listener;
+               sensor_h sensor;
+               g_called = false;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+
+                       error = sensor_create_listener(sensor, &listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_set_event_cb(listener, INTERVAL, test_callback, TEST_STRING);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_set_accuracy_cb(listener, test_accuracy_changed, TEST_STRING);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_unset_accuracy_cb(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_set_accuracy_cb_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_listener_set_accuracy_cb(NULL, test_accuracy_changed, TEST_STRING);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_unset_accuracy_cb_p(void)
+{
+       int i = 0;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               int error = SENSOR_ERROR_NONE;
+               sensor_listener_h listener;
+               sensor_h sensor;
+               g_called = false;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       error = sensor_create_listener(sensor, &listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_set_event_cb(listener, INTERVAL, test_callback, TEST_STRING);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_set_accuracy_cb(listener, test_accuracy_changed, TEST_STRING);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_unset_accuracy_cb(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_unset_accuracy_cb_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_listener_unset_accuracy_cb(NULL);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+int utc_system_sensor_listener_read_data_p(void)
+{
+       int i = 0;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               int error = SENSOR_ERROR_NONE;
+               sensor_listener_h listener;
+               sensor_h sensor;
+               sensor_event_s event;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+
+                       error = sensor_create_listener(sensor, &listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_set_event_cb(listener, INTERVAL, test_callback, TEST_STRING);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       sensor_listener_set_option(listener, 1);
+
+                       error = sensor_listener_start(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       wait_callback(types[i]);
+
+                       error = sensor_listener_read_data(listener, &event);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_stop(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_unset_event_cb(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_read_data_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       sensor_event_s event;
+
+       error = sensor_listener_read_data(NULL, &event);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_set_interval_p(void) {
+       int i = 0;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               int error = SENSOR_ERROR_NONE;
+               sensor_listener_h listener;
+               sensor_h sensor;
+               g_called = false;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       sensor_create_listener(sensor, &listener);
+
+                       error = sensor_listener_set_event_cb(listener, INTERVAL, test_callback, TEST_STRING);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_start(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_set_interval(listener, INTERVAL*2);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_stop(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_unset_event_cb(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_set_interval_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_listener_set_interval(NULL, INTERVAL*2);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_set_max_batch_latency_p(void) {
+       int i = 0;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               int error = SENSOR_ERROR_NONE;
+               sensor_listener_h listener;
+               sensor_h sensor;
+               g_called = false;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       sensor_create_listener(sensor, &listener);
+
+                       error = sensor_listener_set_event_cb(listener, INTERVAL, test_callback, TEST_STRING);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_start(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_set_max_batch_latency(listener, INTERVAL*20);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_stop(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_unset_event_cb(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_set_max_batch_latency_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_listener_set_max_batch_latency(NULL, INTERVAL*20);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_name_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       char *name;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       error = sensor_get_name(sensor, &name);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       assert(name);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_name_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       char *name;
+
+       error = sensor_get_name(NULL, &name);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_vendor_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       char *vendor;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+
+                       error = sensor_get_vendor(sensor, &vendor);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       assert(vendor);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_vendor_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       char *vendor;
+
+       error = sensor_get_vendor(NULL, &vendor);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_type_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       int type;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       error = sensor_get_type(sensor, &type);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_type_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int type;
+
+       error = sensor_get_type(NULL, &type);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_min_range_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       float min_range;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       error = sensor_get_min_range(sensor, &min_range);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_min_range_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       float min_range;
+
+       error = sensor_get_min_range(NULL, &min_range);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_max_range_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       float max_range;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       error = sensor_get_max_range(sensor, &max_range);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_max_range_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       float max_range;
+
+       error = sensor_get_max_range(NULL, &max_range);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_resolution_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       float resolution;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       error = sensor_get_resolution(sensor, &resolution);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_resolution_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       float resolution;
+
+       error = sensor_get_resolution(NULL, &resolution);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_min_interval_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       int min_interval;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       error = sensor_get_min_interval(sensor, &min_interval);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_min_interval_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int min_interval;
+
+       error = sensor_get_min_interval(NULL, &min_interval);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_fifo_count_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       int fifo_count;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       error = sensor_get_fifo_count(sensor, &fifo_count);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_fifo_count_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int fifo_count;
+
+       error = sensor_get_fifo_count(NULL, &fifo_count);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_max_batch_count_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       int max_batch_count;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       error = sensor_get_max_batch_count(sensor, &max_batch_count);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_get_max_batch_count_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int max_batch_count;
+
+       error = sensor_get_max_batch_count(NULL, &max_batch_count);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_set_option_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               sensor_listener_h listener;
+               sensor_h sensor;
+
+               error = sensor_get_default_sensor(types[i], &sensor);
+               if(!sensor_supported[i]){
+                       assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+               }
+               else{
+                       sensor_create_listener(sensor, &listener);
+
+                       error = sensor_listener_start(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_set_option(listener, SENSOR_OPTION_ALWAYS_ON);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+
+                       error = sensor_listener_stop(listener);
+                       assert_eq(error, SENSOR_ERROR_NONE);
+               }
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_listener_set_option_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_listener_set_option(NULL, SENSOR_OPTION_ALWAYS_ON);
+       if(supported){
+
+               assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+       }
+       else{
+               assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_is_supported_p(void)
+{
+       int error = SENSOR_ERROR_NONE;
+       int i = 0;
+       bool support = false;
+       int type_count;
+
+       type_count = sizeof(types) / sizeof(sensor_type_e);
+
+       for (i = 0; i < type_count; i++) {
+               error = sensor_is_supported(types[i], &support);
+               assert_eq(error, SENSOR_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_system_sensor_is_supported_n(void)
+{
+       int error = SENSOR_ERROR_NONE;
+
+       error = sensor_is_supported(-1, NULL);
+
+       assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
diff --git a/src/utc/sensor/utc-system-sensor-utils.c b/src/utc/sensor/utc-system-sensor-utils.c
new file mode 100755 (executable)
index 0000000..a6e9897
--- /dev/null
@@ -0,0 +1,305 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <sensor.h>
+#include <system_info.h>
+
+//& set: SensorUtil
+
+#define TEST_STRING "TEST_TEST_TEST"
+static bool supported=false;
+#define DEFAULT_VALUE 1
+#define SENSOR_CNT 13
+static char* sensor_features[13] = {
+"http://tizen.org/feature/sensor.accelerometer",
+"http://tizen.org/feature/sensor.gravitiy",
+"http://tizen.org/feature/sensor.linear_acceleation",
+"http://tizen.org/feature/sensor.magnetometer",
+"http://tizen.org/feature/sensor.rotation_vector",
+"http://tizen.org/feature/sensor.tiltmeter",
+"http://tizen.org/feature/sensor.gyroscope",
+"http://tizen.org/feature/sensor.photometer",
+"http://tizen.org/feature/sensor.proximity",
+"http://tizen.org/feature/sensor.barometer",
+"http://tizen.org/feature/sensor.ultraviolet",
+"http://tizen.org/feature/sensor.temperature",
+"http://tizen.org/feature/sensor.humidity"
+};
+
+
+void utc_system_sensor_util_startup(void)
+{
+    int i;
+
+    for(i=0;i<SENSOR_CNT;i++){
+
+        system_info_get_platform_bool(sensor_features[i], &supported);
+        if(supported) break;
+    }
+
+}
+
+int utc_system_sensor_util_get_angle_change_p(void)
+{
+    int error = SENSOR_ERROR_NONE;
+    float R[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 };
+    float prevR[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 };
+    float angle[3];
+
+    error = sensor_util_get_angle_change(R, prevR, angle);
+    if(!supported){
+        assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+        assert_eq(error, SENSOR_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_get_angle_change_n(void)
+{
+    int error = SENSOR_ERROR_NONE;
+
+    error = sensor_util_get_angle_change(NULL, NULL, NULL);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_get_declination_p(void)
+{
+    int error = SENSOR_ERROR_NONE;
+    float latitude = DEFAULT_VALUE;
+    float longitude = DEFAULT_VALUE;
+    float altitude = DEFAULT_VALUE;
+    float declination;
+
+    error = sensor_util_get_declination(latitude, longitude, altitude, &declination);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_get_declination_n(void)
+{
+    int error = SENSOR_ERROR_NONE;
+    float latitude = DEFAULT_VALUE;
+    float longitude = DEFAULT_VALUE;
+    float altitude = DEFAULT_VALUE;
+
+    error = sensor_util_get_declination(latitude, longitude, altitude, NULL);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_get_inclination_p(void)
+{
+    int error = SENSOR_ERROR_NONE;
+    float I[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 };
+    float inclination;
+
+    error = sensor_util_get_inclination(I, &inclination);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_get_inclination_n(void)
+{
+    int error = SENSOR_ERROR_NONE;
+
+    error = sensor_util_get_inclination(NULL, NULL);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_get_orientation_p(void)
+{
+    int error = SENSOR_ERROR_NONE;
+    float R[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 };
+    float values[3];
+
+    error = sensor_util_get_orientation(R, values);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_get_orientation_n(void)
+{
+    int error = SENSOR_ERROR_NONE;
+
+    error = sensor_util_get_orientation(NULL, NULL);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_get_rotation_matrix_p(void)
+{
+    int error = SENSOR_ERROR_NONE;
+    float Gx = DEFAULT_VALUE;
+    float Gy = 0;
+    float Gz = 0;
+    float Mx = 0;
+    float My = 0;
+    float Mz = DEFAULT_VALUE;
+    float R[9];
+    float I[9];
+
+    error = sensor_util_get_rotation_matrix(Gx, Gy, Gz, Mx, My, Mz, R, I);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_get_rotation_matrix_n(void)
+{
+    int error = SENSOR_ERROR_NONE;
+    float Gx = DEFAULT_VALUE;
+    float Gy = DEFAULT_VALUE;
+    float Gz = DEFAULT_VALUE;
+    float Mx = DEFAULT_VALUE;
+    float My = DEFAULT_VALUE;
+    float Mz = DEFAULT_VALUE;
+
+    error = sensor_util_get_rotation_matrix(Gx, Gy, Gz, Mx, My, Mz, NULL, NULL);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_get_rotation_matrix_from_vector_p(void)
+{
+    int error = SENSOR_ERROR_NONE;
+    float Vx = DEFAULT_VALUE;
+    float Vy = DEFAULT_VALUE;
+    float Vz = DEFAULT_VALUE;
+    float R[9];
+
+    error = sensor_util_get_rotation_matrix_from_vector(Vx, Vy, Vz, R);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_get_rotation_matrix_from_vector_n(void)
+{
+    int error = SENSOR_ERROR_NONE;
+    float Vx = DEFAULT_VALUE;
+    float Vy = DEFAULT_VALUE;
+    float Vz = DEFAULT_VALUE;
+
+    error = sensor_util_get_rotation_matrix_from_vector(Vx, Vy, Vz, NULL);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_remap_coordinate_system_p(void)
+{
+    int error = SENSOR_ERROR_NONE;
+    float inR[9] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 };
+    float outR[9];
+    sensor_util_axis_e x = sensor_util_axis_x;
+    sensor_util_axis_e y = sensor_util_axis_minus_y;
+
+    error = sensor_util_remap_coordinate_system(inR, x, y, outR);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_system_sensor_util_remap_coordinate_system_n(void)
+{
+    int error = SENSOR_ERROR_NONE;
+    sensor_util_axis_e x = sensor_util_axis_x;
+    sensor_util_axis_e y = sensor_util_axis_y;
+
+    error = sensor_util_remap_coordinate_system(NULL, x, y, NULL);
+    if(!supported){
+         assert_eq(error,SENSOR_ERROR_NOT_SUPPORTED);
+    }
+    else{
+         assert_eq(error, SENSOR_ERROR_INVALID_PARAMETER);
+    }
+
+    return 0;
+}
+
diff --git a/src/utc/smartcard/CMakeLists.txt b/src/utc/smartcard/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..cc80f50
--- /dev/null
@@ -0,0 +1,40 @@
+SET(PKG_NAME "smartcard")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-network-smartcard")
+SET(TC_SOURCES
+       utc-smartcard-service.c
+       utc-smartcard-reader.c
+       utc-smartcard-session.c
+       utc-smartcard-channel.c
+       utc-smartcard.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       bundle
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+       system-info
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/smartcard/public.list b/src/utc/smartcard/public.list
new file mode 100755 (executable)
index 0000000..dfc673a
--- /dev/null
@@ -0,0 +1,22 @@
+smartcard_initialize
+smartcard_deinitialize
+smartcard_get_readers
+smartcard_reader_get_name
+smartcard_reader_is_secure_element_present
+smartcard_reader_open_session
+smartcard_reader_close_sessions
+smartcard_session_get_reader
+smartcard_session_get_atr
+smartcard_session_close
+smartcard_session_is_closed
+smartcard_session_close_channels
+smartcard_session_open_basic_channel
+smartcard_session_open_logical_channel
+smartcard_channel_close
+smartcard_channel_is_basic_channel
+smartcard_channel_is_closed
+smartcard_channel_get_select_response
+smartcard_channel_get_session
+smartcard_channel_transmit
+smartcard_channel_transmit_retrieve_response
+smartcard_channel_select_next
diff --git a/src/utc/smartcard/tct-smartcard-core.c b/src/utc/smartcard/tct-smartcard-core.c
new file mode 100755 (executable)
index 0000000..80ab9f3
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-smartcard-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/smartcard/tct-smartcard-core.h b/src/utc/smartcard/tct-smartcard-core.h
new file mode 100755 (executable)
index 0000000..3f20399
--- /dev/null
@@ -0,0 +1,101 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SMARTCARD_CORE_H__
+#define __TCT_SMARTCARD_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_smartcard_service_startup(void);
+extern void utc_smartcard_service_cleanup(void);
+extern void utc_smartcard_reader_startup(void);
+extern void utc_smartcard_reader_cleanup(void);
+extern void utc_smartcard_session_startup(void);
+extern void utc_smartcard_session_cleanup(void);
+extern void utc_smartcard_channel_startup(void);
+extern void utc_smartcard_channel_cleanup(void);
+
+extern int utc_smartcard_smartcard_initialize_p(void);
+extern int utc_smartcard_smartcard_deinitialize_p(void);
+extern int utc_smartcard_smartcard_deinitialize_n(void);
+extern int utc_smartcard_smartcard_get_readers_p(void);
+extern int utc_smartcard_smartcard_get_readers_n(void);
+extern int utc_smartcard_smartcard_reader_get_name_p(void);
+extern int utc_smartcard_smartcard_reader_get_name_n(void);
+extern int utc_smartcard_smartcard_reader_is_secure_element_present_p(void);
+extern int utc_smartcard_smartcard_reader_is_secure_element_present_n(void);
+extern int utc_smartcard_smartcard_reader_open_session_p(void);
+extern int utc_smartcard_smartcard_reader_open_session_n(void);
+extern int utc_smartcard_smartcard_reader_close_sessions_p(void);
+extern int utc_smartcard_smartcard_reader_close_sessions_n(void);
+extern int utc_smartcard_smartcard_session_get_reader_p(void);
+extern int utc_smartcard_smartcard_session_get_reader_n(void);
+extern int utc_smartcard_smartcard_session_get_atr_p(void);
+extern int utc_smartcard_smartcard_session_get_atr_n(void);
+extern int utc_smartcard_smartcard_session_close_p(void);
+extern int utc_smartcard_smartcard_session_close_n(void);
+extern int utc_smartcard_smartcard_session_is_closed_p(void);
+extern int utc_smartcard_smartcard_session_is_closed_n(void);
+extern int utc_smartcard_smartcard_session_close_channels_p(void);
+extern int utc_smartcard_smartcard_session_close_channels_n(void);
+extern int utc_smartcard_smartcard_session_open_basic_channel_n(void);
+extern int utc_smartcard_smartcard_session_open_logical_channel_n(void);
+extern int utc_smartcard_smartcard_channel_close_n(void);
+extern int utc_smartcard_smartcard_channel_is_basic_channel_n(void);
+extern int utc_smartcard_smartcard_channel_is_closed_n(void);
+extern int utc_smartcard_smartcard_channel_get_select_response_n(void);
+extern int utc_smartcard_smartcard_channel_get_session_n(void);
+extern int utc_smartcard_smartcard_channel_transmit_n(void);
+extern int utc_smartcard_smartcard_channel_transmit_retrieve_response_n(void);
+extern int utc_smartcard_smartcard_channel_select_next_n(void);
+
+testcase tc_array[] = {
+    {"utc_smartcard_smartcard_initialize_p", utc_smartcard_smartcard_initialize_p, utc_smartcard_service_startup, utc_smartcard_service_cleanup},
+    {"utc_smartcard_smartcard_deinitialize_p", utc_smartcard_smartcard_deinitialize_p, utc_smartcard_service_startup, utc_smartcard_service_cleanup},
+    {"utc_smartcard_smartcard_deinitialize_n", utc_smartcard_smartcard_deinitialize_n, utc_smartcard_service_startup, utc_smartcard_service_cleanup},
+    {"utc_smartcard_smartcard_get_readers_p", utc_smartcard_smartcard_get_readers_p, utc_smartcard_service_startup, utc_smartcard_service_cleanup},
+    {"utc_smartcard_smartcard_get_readers_n", utc_smartcard_smartcard_get_readers_n, utc_smartcard_service_startup, utc_smartcard_service_cleanup},
+    {"utc_smartcard_smartcard_reader_get_name_p", utc_smartcard_smartcard_reader_get_name_p, utc_smartcard_reader_startup, utc_smartcard_reader_cleanup},
+    {"utc_smartcard_smartcard_reader_get_name_n", utc_smartcard_smartcard_reader_get_name_n, utc_smartcard_reader_startup, utc_smartcard_reader_cleanup},
+    {"utc_smartcard_smartcard_reader_is_secure_element_present_p", utc_smartcard_smartcard_reader_is_secure_element_present_p, utc_smartcard_reader_startup, utc_smartcard_reader_cleanup},
+    {"utc_smartcard_smartcard_reader_is_secure_element_present_n", utc_smartcard_smartcard_reader_is_secure_element_present_n, utc_smartcard_reader_startup, utc_smartcard_reader_cleanup},
+    {"utc_smartcard_smartcard_reader_open_session_p", utc_smartcard_smartcard_reader_open_session_p, utc_smartcard_reader_startup, utc_smartcard_reader_cleanup},
+    {"utc_smartcard_smartcard_reader_open_session_n", utc_smartcard_smartcard_reader_open_session_n, utc_smartcard_reader_startup, utc_smartcard_reader_cleanup},
+    {"utc_smartcard_smartcard_reader_close_sessions_p", utc_smartcard_smartcard_reader_close_sessions_p, utc_smartcard_reader_startup, utc_smartcard_reader_cleanup},
+    {"utc_smartcard_smartcard_reader_close_sessions_n", utc_smartcard_smartcard_reader_close_sessions_n, utc_smartcard_reader_startup, utc_smartcard_reader_cleanup},
+    {"utc_smartcard_smartcard_session_get_reader_p", utc_smartcard_smartcard_session_get_reader_p, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_session_get_reader_n", utc_smartcard_smartcard_session_get_reader_n, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_session_get_atr_p", utc_smartcard_smartcard_session_get_atr_p, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_session_get_atr_n", utc_smartcard_smartcard_session_get_atr_n, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_session_close_p", utc_smartcard_smartcard_session_close_p, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_session_close_n", utc_smartcard_smartcard_session_close_n, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_session_is_closed_p", utc_smartcard_smartcard_session_is_closed_p, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_session_is_closed_n", utc_smartcard_smartcard_session_is_closed_n, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_session_close_channels_p", utc_smartcard_smartcard_session_close_channels_p, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_session_close_channels_n", utc_smartcard_smartcard_session_close_channels_n, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_session_open_basic_channel_n", utc_smartcard_smartcard_session_open_basic_channel_n, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_session_open_logical_channel_n", utc_smartcard_smartcard_session_open_logical_channel_n, utc_smartcard_session_startup, utc_smartcard_session_cleanup},
+    {"utc_smartcard_smartcard_channel_close_n", utc_smartcard_smartcard_channel_close_n, utc_smartcard_channel_startup, utc_smartcard_channel_cleanup},
+    {"utc_smartcard_smartcard_channel_is_basic_channel_n", utc_smartcard_smartcard_channel_is_basic_channel_n, utc_smartcard_channel_startup, utc_smartcard_channel_cleanup},
+    {"utc_smartcard_smartcard_channel_is_closed_n", utc_smartcard_smartcard_channel_is_closed_n, utc_smartcard_channel_startup, utc_smartcard_channel_cleanup},
+    {"utc_smartcard_smartcard_channel_get_select_response_n", utc_smartcard_smartcard_channel_get_select_response_n, utc_smartcard_channel_startup, utc_smartcard_channel_cleanup},
+    {"utc_smartcard_smartcard_channel_get_session_n", utc_smartcard_smartcard_channel_get_session_n, utc_smartcard_channel_startup, utc_smartcard_channel_cleanup},
+    {"utc_smartcard_smartcard_channel_transmit_n", utc_smartcard_smartcard_channel_transmit_n, utc_smartcard_channel_startup, utc_smartcard_channel_cleanup},
+    {"utc_smartcard_smartcard_channel_transmit_retrieve_response_n", utc_smartcard_smartcard_channel_transmit_retrieve_response_n, utc_smartcard_channel_startup, utc_smartcard_channel_cleanup},
+    {"utc_smartcard_smartcard_channel_select_next_n", utc_smartcard_smartcard_channel_select_next_n, utc_smartcard_channel_startup, utc_smartcard_channel_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SMARTCARD_CORE_H__
diff --git a/src/utc/smartcard/utc-smartcard-channel.c b/src/utc/smartcard/utc-smartcard-channel.c
new file mode 100755 (executable)
index 0000000..d35cc60
--- /dev/null
@@ -0,0 +1,141 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "utc-smartcard.h"
+
+static int channel;
+static int _init_state = SMARTCARD_ERROR_NONE;
+
+void utc_smartcard_channel_startup(void)
+{
+       _init_state = smartcard_initialize();
+}
+
+void utc_smartcard_channel_cleanup(void)
+{
+       smartcard_deinitialize();
+}
+
+int utc_smartcard_smartcard_channel_close_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_channel_close(0);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_smartcard_smartcard_channel_is_basic_channel_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_channel_is_basic_channel(0, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+
+}
+
+int utc_smartcard_smartcard_channel_is_closed_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_channel_is_closed(0, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+
+}
+
+int utc_smartcard_smartcard_channel_get_select_response_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_channel_get_select_response(0, NULL, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+
+}
+
+int utc_smartcard_smartcard_channel_get_session_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_channel_get_session(0, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+
+}
+
+int utc_smartcard_smartcard_channel_transmit_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_channel_transmit(0, NULL, 0, NULL, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+
+}
+
+int utc_smartcard_smartcard_channel_transmit_retrieve_response_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_channel_transmit_retrieve_response(0, NULL, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+
+}
+
+int utc_smartcard_smartcard_channel_select_next_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_channel_select_next(0, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+
+}
diff --git a/src/utc/smartcard/utc-smartcard-reader.c b/src/utc/smartcard/utc-smartcard-reader.c
new file mode 100755 (executable)
index 0000000..feff074
--- /dev/null
@@ -0,0 +1,152 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "utc-smartcard.h"
+
+static int reader;
+static int _init_state = SMARTCARD_ERROR_NONE;
+
+void utc_smartcard_reader_startup(void)
+{
+       int length;
+       int* readers;
+
+       _init_state = smartcard_initialize();
+       if(SMARTCARD_ERROR_NONE == _init_state)
+       {
+               _init_state = smartcard_get_readers(&readers, &length);
+               if(SMARTCARD_ERROR_NONE == _init_state && length > 0)
+                       reader = readers[0];
+               else
+                       _init_state = SMARTCARD_ERROR_GENERAL;
+       }
+}
+
+void utc_smartcard_reader_cleanup(void)
+{
+       smartcard_deinitialize();
+}
+
+int utc_smartcard_smartcard_reader_get_name_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       char *reader_name;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_reader_get_name(reader, &reader_name);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+}
+
+int utc_smartcard_smartcard_reader_get_name_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_reader_get_name(reader, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_smartcard_smartcard_reader_is_secure_element_present_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       bool is_present = false;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_reader_is_secure_element_present(reader, &is_present);
+       // process end
+
+       //if ispresent is true
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+}
+
+int utc_smartcard_smartcard_reader_is_secure_element_present_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_reader_is_secure_element_present(reader, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_smartcard_smartcard_reader_open_session_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       int session;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_reader_open_session(reader, &session);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+
+}
+
+int utc_smartcard_smartcard_reader_open_session_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_reader_open_session(reader, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+
+}
+
+int utc_smartcard_smartcard_reader_close_sessions_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_reader_close_sessions(reader);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+
+}
+
+int utc_smartcard_smartcard_reader_close_sessions_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_reader_close_sessions(0);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
diff --git a/src/utc/smartcard/utc-smartcard-service.c b/src/utc/smartcard/utc-smartcard-service.c
new file mode 100755 (executable)
index 0000000..2854499
--- /dev/null
@@ -0,0 +1,98 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "utc-smartcard.h"
+
+static int _init_state = SMARTCARD_ERROR_NONE;
+
+void utc_smartcard_service_startup(void)
+{
+       _init_state = smartcard_initialize();
+}
+
+void utc_smartcard_service_cleanup(void)
+{
+       smartcard_deinitialize();
+}
+
+int utc_smartcard_smartcard_initialize_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_initialize();
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+}
+
+int utc_smartcard_smartcard_deinitialize_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_deinitialize();
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+}
+
+int utc_smartcard_smartcard_deinitialize_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       smartcard_deinitialize();
+       ret = smartcard_deinitialize();
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NOT_INITIALIZED);
+       return 0;
+}
+
+int utc_smartcard_smartcard_get_readers_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       int length;
+       int* readers;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_get_readers(&readers, &length);
+       // process end
+
+       // if length is 0, assert
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+}
+
+int utc_smartcard_smartcard_get_readers_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_get_readers(NULL, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
diff --git a/src/utc/smartcard/utc-smartcard-session.c b/src/utc/smartcard/utc-smartcard-session.c
new file mode 100755 (executable)
index 0000000..86206ef
--- /dev/null
@@ -0,0 +1,208 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "utc-smartcard.h"
+
+static int session;
+static int _init_state = SMARTCARD_ERROR_NONE;
+
+void utc_smartcard_session_startup(void)
+{
+       int length;
+       int* readers;
+
+       _init_state = smartcard_initialize();
+       if(SMARTCARD_ERROR_NONE == _init_state)
+       {
+               _init_state = smartcard_get_readers(&readers, &length);
+               if(SMARTCARD_ERROR_NONE == _init_state && length > 0)
+               {
+                       _init_state = smartcard_reader_open_session(readers[0], &session);
+                       if(_init_state != SMARTCARD_ERROR_NONE || session == 0)
+                               _init_state = SMARTCARD_ERROR_GENERAL;
+               }
+               else
+               {
+                       _init_state = SMARTCARD_ERROR_GENERAL;
+               }
+       }
+}
+
+void utc_smartcard_session_cleanup(void)
+{
+       smartcard_deinitialize();
+}
+
+int utc_smartcard_smartcard_session_get_reader_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       int reader;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_get_reader(session, &reader);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+}
+
+int utc_smartcard_smartcard_session_get_reader_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_get_reader(0, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_smartcard_smartcard_session_get_atr_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       int length;
+       unsigned char* atr = NULL;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_get_atr(session, &atr, &length);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+}
+
+int utc_smartcard_smartcard_session_get_atr_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_get_atr(0, NULL, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_smartcard_smartcard_session_close_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       bool is_closed;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_close(session);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+}
+
+int utc_smartcard_smartcard_session_close_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_close(0);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_smartcard_smartcard_session_is_closed_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       bool is_closed;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_is_closed(session, &is_closed);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+}
+
+int utc_smartcard_smartcard_session_is_closed_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_is_closed(0, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_smartcard_smartcard_session_close_channels_p(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_close_channels(session);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_NONE);
+       return 0;
+}
+
+int utc_smartcard_smartcard_session_close_channels_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_close_channels(0);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_smartcard_smartcard_session_open_basic_channel_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_open_basic_channel(0, NULL, 0, NULL, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_smartcard_smartcard_session_open_logical_channel_n(void)
+{
+       int ret = SMARTCARD_ERROR_NONE;
+       SMARTCARD_ASSERT(_init_state, SMARTCARD_ERROR_NONE);
+
+       // process start
+       ret = smartcard_session_open_logical_channel(0, NULL, 0, NULL, NULL);
+       // process end
+
+       SMARTCARD_ASSERT(ret, SMARTCARD_ERROR_INVALID_PARAMETER);
+       return 0;
+}
diff --git a/src/utc/smartcard/utc-smartcard.c b/src/utc/smartcard/utc-smartcard.c
new file mode 100755 (executable)
index 0000000..c145bef
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "utc-smartcard.h"
+#include <system_info.h>
+
+#define  SE_FEATURE "http://tizen.org/feature/network.secure_element"
+#define  SE_UICC_FEATURE "http://tizen.org/feature/network.secure_element.uicc"
+#define  SE_ESE_FEATURE "http://tizen.org/feature/network.secure_element.ese"
+
+bool _is_support_smartcard()
+{
+       bool ret = false;
+       bool is_supported_se = false;
+       bool is_supported_se_uicc = false;
+       bool is_supported_se_ese = false;
+
+       system_info_get_platform_bool(SE_FEATURE, &is_supported_se);
+       system_info_get_platform_bool(SE_UICC_FEATURE, &is_supported_se_uicc);
+       system_info_get_platform_bool(SE_ESE_FEATURE, &is_supported_se_ese);
+
+       if(is_supported_se && (is_supported_se_uicc || is_supported_se_ese))
+               ret = true;
+
+       return ret;
+}
diff --git a/src/utc/smartcard/utc-smartcard.h b/src/utc/smartcard/utc-smartcard.h
new file mode 100755 (executable)
index 0000000..0690637
--- /dev/null
@@ -0,0 +1,40 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef __UTC_SMARTCARD_H__
+#define __UTC_SMARTCARD_H__
+
+#include "assert.h"
+#include <smartcard.h>
+
+//& set: Smartcard
+bool _is_support_smartcard();
+
+#define SMARTCARD_ASSERT(ret, errno) \
+do{\
+    { \
+        if(_is_support_smartcard() == false) \
+        { \
+            assert_eq(ret, SMARTCARD_ERROR_NOT_SUPPORTED); \
+        } \
+        else \
+        { \
+                          assert_eq(ret, errno); \
+        } \
+    } \
+}while(0);
+
+#endif
diff --git a/src/utc/sound-manager/CMakeLists.txt b/src/utc/sound-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..5db5bfe
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "sound-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-media-sound-manager")
+SET(TC_SOURCES
+       utc-media-sound-manager.c
+       utc-media-sound-manager-callback.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/sound-manager/prod_platform.list b/src/utc/sound-manager/prod_platform.list
new file mode 100755 (executable)
index 0000000..e329640
--- /dev/null
@@ -0,0 +1,37 @@
+sound_manager_call_set_eq
+sound_manager_get_balance
+sound_manager_get_call_mute
+sound_manager_get_muteall
+sound_manager_multi_session_create
+sound_manager_multi_session_destroy
+sound_manager_multi_session_get_mode
+sound_manager_multi_session_get_option
+sound_manager_multi_session_mode_is_available
+sound_manager_multi_session_set_mode
+sound_manager_multi_session_set_mode_svr
+sound_manager_multi_session_set_option
+sound_manager_set_balance
+sound_manager_set_call_mute
+sound_manager_set_muteall
+sound_manager_set_muteall_changed_cb
+sound_manager_set_safety_volume
+sound_manager_set_volume_with_safety
+sound_manager_set_session_watch_cb
+sound_manager_unset_muteall_changed_cb
+sound_manager_unset_safety_volume
+sound_manager_unset_session_watch_cb
+sound_manager_call_session_create
+sound_manager_call_session_destroy
+sound_manager_call_session_get_mode
+sound_manager_call_session_set_mode
+sound_manager_foreach_available_route
+sound_manager_get_a2dp_status
+sound_manager_is_route_available
+sound_manager_set_active_route
+sound_manager_set_active_route_auto
+sound_manager_set_active_device_changed_cb
+sound_manager_set_available_route_changed_cb
+sound_manager_get_active_route
+sound_manager_unset_active_device_changed_cb
+sound_manager_unset_available_route_changed_cb
+
diff --git a/src/utc/sound-manager/public.list b/src/utc/sound-manager/public.list
new file mode 100755 (executable)
index 0000000..316aed2
--- /dev/null
@@ -0,0 +1,31 @@
+sound_manager_get_current_sound_type
+sound_manager_get_max_volume
+sound_manager_get_media_session_option
+sound_manager_get_media_session_resumption_option
+sound_manager_get_session_type
+sound_manager_get_volume
+sound_manager_set_current_sound_type
+sound_manager_set_media_session_option
+sound_manager_set_media_session_resumption_option
+sound_manager_set_session_interrupted_cb
+sound_manager_set_session_type
+sound_manager_set_volume
+sound_manager_set_volume_changed_cb
+sound_manager_unset_current_sound_type
+sound_manager_unset_session_interrupted_cb
+sound_manager_unset_volume_changed_cb
+sound_manager_get_current_device_list
+sound_manager_get_next_device
+sound_manager_get_prev_device
+sound_manager_get_device_type
+sound_manager_get_device_io_direction
+sound_manager_get_device_id
+sound_manager_get_device_name
+sound_manager_get_device_state
+sound_manager_set_device_connected_cb
+sound_manager_unset_device_connected_cb
+sound_manager_set_device_information_changed_cb
+sound_manager_unset_device_information_changed_cb
+sound_manager_get_voip_session_mode
+sound_manager_set_voip_session_mode
+
diff --git a/src/utc/sound-manager/tct-sound-manager-core.c b/src/utc/sound-manager/tct-sound-manager-core.c
new file mode 100755 (executable)
index 0000000..ec69699
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-sound-manager-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/sound-manager/tct-sound-manager-core.h b/src/utc/sound-manager/tct-sound-manager-core.h
new file mode 100755 (executable)
index 0000000..5dbcd04
--- /dev/null
@@ -0,0 +1,155 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SOUND_MANAGER_CORE_H__
+#define __TCT_SOUND_MANAGER_CORE_H__
+
+#include "testcase.h"
+
+
+extern int utc_media_sound_manager_get_max_volume_p(void);
+extern int utc_media_sound_manager_get_max_volume_n(void);
+extern int utc_media_sound_manager_set_volume_p(void);
+extern int utc_media_sound_manager_set_volume_n(void);
+extern int utc_media_sound_manager_get_volume_p(void);
+extern int utc_media_sound_manager_get_volume_n1(void);
+extern int utc_media_sound_manager_get_volume_n2(void);
+extern int utc_media_sound_manager_set_current_sound_type_p(void);
+extern int utc_media_sound_manager_set_current_sound_type_n(void);
+extern int utc_media_sound_manager_get_current_sound_type_p(void);
+extern int utc_media_sound_manager_get_current_sound_type_n(void);
+extern int utc_media_sound_manager_unset_current_sound_type_p(void);
+extern int utc_media_sound_manager_unset_current_sound_type_n(void);
+extern int utc_media_sound_manager_set_session_type_p(void);
+extern int utc_media_sound_manager_set_session_type_n(void);
+extern int utc_media_sound_manager_get_session_type_p(void);
+extern int utc_media_sound_manager_get_session_type_n(void);
+extern int utc_media_sound_manager_set_media_session_option_p(void);
+extern int utc_media_sound_manager_set_media_session_option_n1(void);
+extern int utc_media_sound_manager_set_media_session_option_n2(void);
+extern int utc_media_sound_manager_get_media_session_option_p(void);
+extern int utc_media_sound_manager_get_media_session_option_n(void);
+extern int utc_media_sound_manager_set_media_session_resumption_option_p(void);
+extern int utc_media_sound_manager_set_media_session_resumption_option_n1(void);
+extern int utc_media_sound_manager_set_media_session_resumption_option_n2(void);
+extern int utc_media_sound_manager_get_media_session_resumption_option_p(void);
+extern int utc_media_sound_manager_get_media_session_resumption_option_n(void);
+extern int utc_media_sound_manager_set_voip_session_mode_p(void);
+extern int utc_media_sound_manager_set_voip_session_mode_n1(void);
+extern int utc_media_sound_manager_set_voip_session_mode_n2(void);
+extern int utc_media_sound_manager_get_voip_session_mode_p(void);
+extern int utc_media_sound_manager_get_voip_session_mode_n(void);
+extern int utc_sound_manager_get_current_device_list_p(void);
+extern int utc_sound_manager_get_current_device_list_n(void);
+extern int utc_sound_manager_get_next_device_p(void);
+extern int utc_sound_manager_get_next_device_n(void);
+extern int utc_sound_manager_get_prev_device_p(void);
+extern int utc_sound_manager_get_prev_device_n(void);
+extern int utc_sound_manager_get_device_type_p(void);
+extern int utc_sound_manager_get_device_type_n(void);
+extern int utc_sound_manager_get_device_io_direction_p(void);
+extern int utc_sound_manager_get_device_io_direction_n(void);
+extern int utc_sound_manager_get_device_id_p(void);
+extern int utc_sound_manager_get_device_id_n(void);
+extern int utc_sound_manager_get_device_name_p(void);
+extern int utc_sound_manager_get_device_name_n(void);
+extern int utc_sound_manager_get_device_state_p(void);
+extern int utc_sound_manager_get_device_state_n(void);
+extern int utc_media_sound_manager_set_volume_changed_cb_p(void);
+extern int utc_media_sound_manager_set_volume_changed_cb_n(void);
+extern int utc_media_sound_manager_unset_volume_changed_cb_p(void);
+extern int utc_media_sound_manager_unset_volume_changed_cb_n(void);
+extern int utc_media_sound_manager_set_session_interrupted_cb_p(void);
+extern int utc_media_sound_manager_set_session_interrupted_cb_n(void);
+extern int utc_media_sound_manager_unset_session_interrupted_cb_p(void);
+extern int utc_media_sound_manager_unset_session_interrupted_cb_n(void);
+extern int utc_media_sound_manager_set_device_connected_cb_p(void);
+extern int utc_media_sound_manager_set_device_connected_cb_n(void);
+extern int utc_media_sound_manager_unset_device_connected_cb_p(void);
+extern int utc_media_sound_manager_unset_device_connected_cb_n(void);
+extern int utc_media_sound_manager_set_device_information_changed_cb_p(void);
+extern int utc_media_sound_manager_set_device_information_changed_cb_n(void);
+extern int utc_media_sound_manager_unset_device_information_changed_cb_p(void);
+extern int utc_media_sound_manager_unset_device_information_changed_cb_n(void);
+
+testcase tc_array[] = {
+    {"utc_media_sound_manager_get_max_volume_p", utc_media_sound_manager_get_max_volume_p, NULL, NULL},
+    {"utc_media_sound_manager_get_max_volume_n", utc_media_sound_manager_get_max_volume_n, NULL, NULL},
+    {"utc_media_sound_manager_set_volume_p", utc_media_sound_manager_set_volume_p, NULL, NULL},
+    {"utc_media_sound_manager_set_volume_n", utc_media_sound_manager_set_volume_n, NULL, NULL},
+    {"utc_media_sound_manager_get_volume_p", utc_media_sound_manager_get_volume_p, NULL, NULL},
+    {"utc_media_sound_manager_get_volume_n1", utc_media_sound_manager_get_volume_n1, NULL, NULL},
+    {"utc_media_sound_manager_get_volume_n2", utc_media_sound_manager_get_volume_n2, NULL, NULL},
+    {"utc_media_sound_manager_set_current_sound_type_p", utc_media_sound_manager_set_current_sound_type_p, NULL, NULL},
+    {"utc_media_sound_manager_set_current_sound_type_n", utc_media_sound_manager_set_current_sound_type_n, NULL, NULL},
+    {"utc_media_sound_manager_get_current_sound_type_p", utc_media_sound_manager_get_current_sound_type_p, NULL, NULL},
+    {"utc_media_sound_manager_get_current_sound_type_n", utc_media_sound_manager_get_current_sound_type_n, NULL, NULL},
+    {"utc_media_sound_manager_unset_current_sound_type_p", utc_media_sound_manager_unset_current_sound_type_p, NULL, NULL},
+    {"utc_media_sound_manager_unset_current_sound_type_n", utc_media_sound_manager_unset_current_sound_type_n, NULL, NULL},
+    {"utc_media_sound_manager_set_session_type_p", utc_media_sound_manager_set_session_type_p, NULL, NULL},
+    {"utc_media_sound_manager_set_session_type_n", utc_media_sound_manager_set_session_type_n, NULL, NULL},
+    {"utc_media_sound_manager_get_session_type_p", utc_media_sound_manager_get_session_type_p, NULL, NULL},
+    {"utc_media_sound_manager_get_session_type_n", utc_media_sound_manager_get_session_type_n, NULL, NULL},
+    {"utc_media_sound_manager_set_media_session_option_p", utc_media_sound_manager_set_media_session_option_p, NULL, NULL},
+    {"utc_media_sound_manager_set_media_session_option_n1", utc_media_sound_manager_set_media_session_option_n1, NULL, NULL},
+    {"utc_media_sound_manager_set_media_session_option_n2", utc_media_sound_manager_set_media_session_option_n2, NULL, NULL},
+    {"utc_media_sound_manager_get_media_session_option_p", utc_media_sound_manager_get_media_session_option_p, NULL, NULL},
+    {"utc_media_sound_manager_get_media_session_option_n", utc_media_sound_manager_get_media_session_option_n, NULL, NULL},
+    {"utc_media_sound_manager_set_media_session_resumption_option_p", utc_media_sound_manager_set_media_session_resumption_option_p, NULL, NULL},
+    {"utc_media_sound_manager_set_media_session_resumption_option_n1", utc_media_sound_manager_set_media_session_resumption_option_n1, NULL, NULL},
+    {"utc_media_sound_manager_set_media_session_resumption_option_n2", utc_media_sound_manager_set_media_session_resumption_option_n2, NULL, NULL},
+    {"utc_media_sound_manager_get_media_session_resumption_option_p", utc_media_sound_manager_get_media_session_resumption_option_p, NULL, NULL},
+    {"utc_media_sound_manager_get_media_session_resumption_option_n", utc_media_sound_manager_get_media_session_resumption_option_n, NULL, NULL},
+    {"utc_media_sound_manager_set_voip_session_mode_p", utc_media_sound_manager_set_voip_session_mode_p, NULL, NULL},
+    {"utc_media_sound_manager_set_voip_session_mode_n1", utc_media_sound_manager_set_voip_session_mode_n1, NULL, NULL},
+    {"utc_media_sound_manager_set_voip_session_mode_n2", utc_media_sound_manager_set_voip_session_mode_n2, NULL, NULL},
+    {"utc_media_sound_manager_get_voip_session_mode_p", utc_media_sound_manager_get_voip_session_mode_p, NULL, NULL},
+    {"utc_media_sound_manager_get_voip_session_mode_n", utc_media_sound_manager_get_voip_session_mode_n, NULL, NULL},
+    {"utc_sound_manager_get_current_device_list_p", utc_sound_manager_get_current_device_list_p, NULL, NULL},
+    {"utc_sound_manager_get_current_device_list_n", utc_sound_manager_get_current_device_list_n, NULL, NULL},
+    {"utc_sound_manager_get_next_device_p", utc_sound_manager_get_next_device_p, NULL, NULL},
+    {"utc_sound_manager_get_next_device_n", utc_sound_manager_get_next_device_n, NULL, NULL},
+    {"utc_sound_manager_get_prev_device_p", utc_sound_manager_get_prev_device_p, NULL, NULL},
+    {"utc_sound_manager_get_prev_device_n", utc_sound_manager_get_prev_device_n, NULL, NULL},
+    {"utc_sound_manager_get_device_type_p", utc_sound_manager_get_device_type_p, NULL, NULL},
+    {"utc_sound_manager_get_device_type_n", utc_sound_manager_get_device_type_n, NULL, NULL},
+    {"utc_sound_manager_get_device_io_direction_p", utc_sound_manager_get_device_io_direction_p, NULL, NULL},
+    {"utc_sound_manager_get_device_io_direction_n", utc_sound_manager_get_device_io_direction_n, NULL, NULL},
+    {"utc_sound_manager_get_device_id_p", utc_sound_manager_get_device_id_p, NULL, NULL},
+    {"utc_sound_manager_get_device_id_n", utc_sound_manager_get_device_id_n, NULL, NULL},
+    {"utc_sound_manager_get_device_name_p", utc_sound_manager_get_device_name_p, NULL, NULL},
+    {"utc_sound_manager_get_device_name_n", utc_sound_manager_get_device_name_n, NULL, NULL},
+    {"utc_sound_manager_get_device_state_p", utc_sound_manager_get_device_state_p, NULL, NULL},
+    {"utc_sound_manager_get_device_state_n", utc_sound_manager_get_device_state_n, NULL, NULL},
+    {"utc_media_sound_manager_set_volume_changed_cb_p", utc_media_sound_manager_set_volume_changed_cb_p, NULL, NULL},
+    {"utc_media_sound_manager_set_volume_changed_cb_n", utc_media_sound_manager_set_volume_changed_cb_n, NULL, NULL},
+    {"utc_media_sound_manager_unset_volume_changed_cb_p", utc_media_sound_manager_unset_volume_changed_cb_p, NULL, NULL},
+    {"utc_media_sound_manager_unset_volume_changed_cb_n", utc_media_sound_manager_unset_volume_changed_cb_n, NULL, NULL},
+    {"utc_media_sound_manager_set_session_interrupted_cb_p", utc_media_sound_manager_set_session_interrupted_cb_p, NULL, NULL},
+    {"utc_media_sound_manager_set_session_interrupted_cb_n", utc_media_sound_manager_set_session_interrupted_cb_n, NULL, NULL},
+    {"utc_media_sound_manager_unset_session_interrupted_cb_p", utc_media_sound_manager_unset_session_interrupted_cb_p, NULL, NULL},
+    {"utc_media_sound_manager_unset_session_interrupted_cb_n", utc_media_sound_manager_unset_session_interrupted_cb_n, NULL, NULL},
+    {"utc_media_sound_manager_set_device_connected_cb_p", utc_media_sound_manager_set_device_connected_cb_p, NULL, NULL},
+    {"utc_media_sound_manager_set_device_connected_cb_n", utc_media_sound_manager_set_device_connected_cb_n, NULL, NULL},
+    {"utc_media_sound_manager_unset_device_connected_cb_p", utc_media_sound_manager_unset_device_connected_cb_p, NULL, NULL},
+    {"utc_media_sound_manager_unset_device_connected_cb_n", utc_media_sound_manager_unset_device_connected_cb_n, NULL, NULL},
+    {"utc_media_sound_manager_set_device_information_changed_cb_p", utc_media_sound_manager_set_device_information_changed_cb_p, NULL, NULL},
+    {"utc_media_sound_manager_set_device_information_changed_cb_n", utc_media_sound_manager_set_device_information_changed_cb_n, NULL, NULL},
+    {"utc_media_sound_manager_unset_device_information_changed_cb_p", utc_media_sound_manager_unset_device_information_changed_cb_p, NULL, NULL},
+    {"utc_media_sound_manager_unset_device_information_changed_cb_n", utc_media_sound_manager_unset_device_information_changed_cb_n, NULL, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SOUND_MANAGER_CORE_H__
diff --git a/src/utc/sound-manager/utc-media-sound-manager-callback.c b/src/utc/sound-manager/utc-media-sound-manager-callback.c
new file mode 100755 (executable)
index 0000000..176fbff
--- /dev/null
@@ -0,0 +1,186 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media/sound_manager.h>
+
+//& set: Soundmanager-Callback
+
+static void _sound_volume_changed_cb(sound_type_e type, unsigned int volume, void *user_data)
+{
+}
+
+static void _sound_interrupted_cb (sound_session_interrupted_code_e code , void *user_data)
+{
+}
+
+static void _sound_manager_volume_changed_cb(sound_type_e type, unsigned int volume, void *user_data)
+{
+}
+
+static void _sound_device_connected_cb(sound_device_h device, bool is_connected, void *user_data)
+{
+}
+
+static void _sound_device_information_changed_cb(sound_device_h device, sound_device_changed_info_e changed_info, void *user_data)
+{
+}
+
+int utc_media_sound_manager_set_volume_changed_cb_p(void)
+{
+    int ret;
+    ret = sound_manager_set_volume_changed_cb(_sound_volume_changed_cb, NULL);
+    assert_eq (ret, SOUND_MANAGER_ERROR_NONE);
+
+    sound_manager_unset_volume_changed_cb();
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_volume_changed_cb_n(void)
+{
+    int ret;
+    ret = sound_manager_set_volume_changed_cb(NULL, NULL);
+    assert_eq (ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_unset_volume_changed_cb_p(void)
+{
+    int ret = sound_manager_set_volume_changed_cb(_sound_volume_changed_cb, NULL);
+    assert_eq (ret, SOUND_MANAGER_ERROR_NONE);
+
+       ret = sound_manager_unset_volume_changed_cb ();
+    assert_eq (ret, SOUND_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_sound_manager_unset_volume_changed_cb_n(void)
+{
+    int ret = sound_manager_unset_volume_changed_cb ();
+    assert_eq (ret, SOUND_MANAGER_ERROR_INTERNAL);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_session_interrupted_cb_p(void)
+{
+    int ret = sound_manager_set_session_interrupted_cb(_sound_interrupted_cb, NULL);
+    assert_eq (ret, SOUND_MANAGER_ERROR_NONE);
+    sound_manager_unset_session_interrupted_cb ();
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_session_interrupted_cb_n(void)
+{
+    int ret = sound_manager_set_session_interrupted_cb(NULL, NULL);
+    if(ret == SOUND_MANAGER_ERROR_NONE)
+        sound_manager_unset_session_interrupted_cb();
+
+    assert_eq (ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_unset_session_interrupted_cb_p(void)
+{
+    int ret = sound_manager_set_session_interrupted_cb(_sound_interrupted_cb, NULL);
+    ret = sound_manager_unset_session_interrupted_cb ();
+    assert_eq (ret, SOUND_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_sound_manager_unset_session_interrupted_cb_n(void)
+{
+    int ret = sound_manager_unset_session_interrupted_cb ();
+    assert_eq (ret, SOUND_MANAGER_ERROR_INTERNAL);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_device_connected_cb_p(void)
+{
+       int ret = sound_manager_set_device_connected_cb(SOUND_DEVICE_ALL_MASK, _sound_device_connected_cb, NULL);
+       assert_eq (ret, SOUND_MANAGER_ERROR_NONE);
+       sound_manager_unset_device_connected_cb();
+
+       return 0;
+}
+
+int utc_media_sound_manager_set_device_connected_cb_n(void)
+{
+       int ret = sound_manager_set_device_connected_cb(0, NULL, NULL);
+       assert_eq (ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_media_sound_manager_unset_device_connected_cb_p(void)
+{
+       int ret = sound_manager_set_device_connected_cb(SOUND_DEVICE_ALL_MASK, _sound_device_connected_cb, NULL);
+       assert_eq (ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_unset_device_connected_cb();
+       assert_eq (ret, SOUND_MANAGER_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_media_sound_manager_unset_device_connected_cb_n(void)
+{
+       int ret = sound_manager_unset_device_connected_cb();
+       assert_eq (ret, SOUND_MANAGER_ERROR_INTERNAL);
+
+       return 0;
+}
+
+int utc_media_sound_manager_set_device_information_changed_cb_p(void)
+{
+       int ret = sound_manager_set_device_information_changed_cb(SOUND_DEVICE_ALL_MASK, _sound_device_information_changed_cb, NULL);
+       assert_eq (ret, SOUND_MANAGER_ERROR_NONE);
+       sound_manager_unset_device_information_changed_cb();
+
+       return 0;
+}
+
+int utc_media_sound_manager_set_device_information_changed_cb_n(void)
+{
+       int ret = sound_manager_set_device_information_changed_cb(0, NULL, NULL);
+       assert_eq (ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_media_sound_manager_unset_device_information_changed_cb_p(void)
+{
+       int ret = sound_manager_set_device_information_changed_cb(SOUND_DEVICE_ALL_MASK, _sound_device_information_changed_cb, NULL);
+       assert_eq (ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_unset_device_information_changed_cb();
+       assert_eq (ret, SOUND_MANAGER_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_media_sound_manager_unset_device_information_changed_cb_n(void)
+{
+       int ret = sound_manager_unset_device_information_changed_cb();
+       assert_eq (ret, SOUND_MANAGER_ERROR_INTERNAL);
+
+       return 0;
+}
+
diff --git a/src/utc/sound-manager/utc-media-sound-manager.c b/src/utc/sound-manager/utc-media-sound-manager.c
new file mode 100755 (executable)
index 0000000..894c822
--- /dev/null
@@ -0,0 +1,685 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <media/sound_manager.h>
+#include <math.h>
+#include <system_info.h>
+
+//& set: Soundmanager
+
+int utc_media_sound_manager_get_max_volume_p(void)
+{
+    int ret, max;
+    sound_type_e type = SOUND_TYPE_SYSTEM;
+
+    ret = sound_manager_get_max_volume(type, &max);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_max_volume_n(void)
+{
+    int ret, max;
+       
+    ret = sound_manager_get_max_volume(SOUND_TYPE_SYSTEM-1, &max);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_volume_p(void)
+{
+    int ret, max;
+
+    ret = sound_manager_get_max_volume(SOUND_TYPE_SYSTEM, &max);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_set_volume(SOUND_TYPE_NOTIFICATION, max/2);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_volume_n(void)
+{
+    int ret;
+       
+    ret = sound_manager_set_volume(SOUND_TYPE_SYSTEM-1, 10);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_volume_p(void)
+{
+    int ret, vol;
+
+    ret = sound_manager_set_volume(SOUND_TYPE_ALARM, 10);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_get_volume(SOUND_TYPE_ALARM, &vol);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    assert_eq(10, vol);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_volume_n1(void)
+{
+    int ret;
+
+    ret = sound_manager_get_volume(SOUND_TYPE_ALARM, NULL);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_volume_n2(void)
+{
+    int ret, vol;
+       
+    ret = sound_manager_get_volume(SOUND_TYPE_SYSTEM-1, &vol);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_current_sound_type_p(void)
+{
+    sound_type_e type = SOUND_TYPE_MEDIA;
+    int ret;
+
+    ret = sound_manager_set_current_sound_type(type);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_current_sound_type_n(void)
+{
+    int ret;
+
+    ret = sound_manager_set_current_sound_type(SOUND_TYPE_SYSTEM-1);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_current_sound_type_p(void)
+{
+    sound_type_e type;
+    int ret;
+
+    ret = sound_manager_set_current_sound_type(SOUND_TYPE_MEDIA);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_get_current_sound_type(&type);
+    assert (ret == SOUND_MANAGER_ERROR_NONE || ret == SOUND_MANAGER_ERROR_NO_PLAYING_SOUND);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_current_sound_type_n(void)
+{
+    int ret;
+
+    ret = sound_manager_get_current_sound_type(NULL);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_unset_current_sound_type_p(void)
+{
+    int ret;
+
+    ret = sound_manager_set_current_sound_type(SOUND_TYPE_MEDIA);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_unset_current_sound_type();
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_sound_manager_unset_current_sound_type_n(void)
+{
+    int ret;
+
+    ret = sound_manager_unset_current_sound_type();
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_media_sound_manager_set_session_type_p(void)
+{
+    int ret;
+    bool mic_supported;
+
+    system_info_get_platform_bool("http://tizen.org/feature/microphone",&mic_supported);
+
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+
+    if(!mic_supported){
+       assert_eq(ret, SOUND_MANAGER_ERROR_NOT_SUPPORTED);
+    }
+    else{
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    }
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_session_type_n(void)
+{
+    int ret;
+
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA-1);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_session_type_p(void)
+{
+    int ret;
+    sound_session_type_e type;
+
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_get_session_type(&type);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    assert_eq(type, SOUND_SESSION_TYPE_MEDIA);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_session_type_n(void)
+{
+    int ret;
+
+    ret = sound_manager_get_session_type(NULL);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_media_session_option_p(void)
+{
+    int ret;
+
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_set_media_session_option(SOUND_SESSION_OPTION_MIX_WITH_OTHERS_WHEN_START, SOUND_SESSION_OPTION_INTERRUPTIBLE_DURING_PLAY);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_media_session_option_n1(void)
+{
+    int ret;
+    int ret_s;
+
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_ALARM);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_set_media_session_option(SOUND_SESSION_OPTION_MIX_WITH_OTHERS_WHEN_START, SOUND_SESSION_OPTION_INTERRUPTIBLE_DURING_PLAY);
+    if (ret) {
+       ret_s = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+       assert_eq(ret_s, SOUND_MANAGER_ERROR_NONE);
+    }
+    assert_eq(ret, SOUND_MANAGER_ERROR_POLICY);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_media_session_option_n2(void)
+{
+    int ret;
+
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_set_media_session_option(SOUND_SESSION_OPTION_MIX_WITH_OTHERS_WHEN_START-1, SOUND_SESSION_OPTION_INTERRUPTIBLE_DURING_PLAY);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_media_session_option_p(void)
+{
+    int ret;
+
+    sound_session_option_for_starting_e s_option;
+    sound_session_option_for_starting_e d_option;
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_set_media_session_option(SOUND_SESSION_OPTION_MIX_WITH_OTHERS_WHEN_START, SOUND_SESSION_OPTION_INTERRUPTIBLE_DURING_PLAY);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_get_media_session_option(&s_option, &d_option);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    assert_eq(s_option, SOUND_SESSION_OPTION_MIX_WITH_OTHERS_WHEN_START);
+    assert_eq(d_option, SOUND_SESSION_OPTION_INTERRUPTIBLE_DURING_PLAY);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_media_session_option_n(void)
+{
+    int ret;
+
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_set_media_session_option(SOUND_SESSION_OPTION_MIX_WITH_OTHERS_WHEN_START, SOUND_SESSION_OPTION_INTERRUPTIBLE_DURING_PLAY);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_get_media_session_option(NULL, NULL);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_media_session_resumption_option_p(void)
+{
+    int ret;
+
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_set_media_session_resumption_option(SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM_OR_MEDIA_PAUSED);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_media_session_resumption_option_n1(void)
+{
+    int ret;
+    int ret_s;
+
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_ALARM);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_set_media_session_resumption_option(SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM_OR_MEDIA_PAUSED);
+    if (ret) {
+       ret_s = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+       assert_eq(ret_s, SOUND_MANAGER_ERROR_NONE);
+    }
+    assert_eq(ret, SOUND_MANAGER_ERROR_POLICY);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_media_session_resumption_option_n2(void)
+{
+    int ret;
+
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_set_media_session_resumption_option(SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM-1);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_media_session_resumption_option_p(void)
+{
+    int ret;
+
+    sound_session_option_for_resumption_e option;
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_set_media_session_resumption_option(SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM_OR_MEDIA_PAUSED);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_get_media_session_resumption_option(&option);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    assert_eq(option, SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM_OR_MEDIA_PAUSED);
+
+    return 0;
+}
+
+int utc_media_sound_manager_get_media_session_resumption_option_n(void)
+{
+    int ret;
+
+    ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_MEDIA);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_set_media_session_resumption_option(SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM_OR_MEDIA_PAUSED);
+    assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+    ret = sound_manager_get_media_session_resumption_option(NULL);
+    assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_media_sound_manager_set_voip_session_mode_p(void)
+{
+       int ret;
+
+       ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_VOIP);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_set_voip_session_mode(SOUND_SESSION_VOIP_MODE_RINGTONE);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_media_sound_manager_set_voip_session_mode_n1(void)
+{
+       int ret;
+
+       ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_ALARM);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_set_voip_session_mode(SOUND_SESSION_VOIP_MODE_RINGTONE);
+       assert_eq(ret, SOUND_MANAGER_ERROR_POLICY);
+
+
+       return 0;
+}
+
+int utc_media_sound_manager_set_voip_session_mode_n2(void)
+{
+       int ret;
+
+       ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_VOIP);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_set_voip_session_mode(SOUND_SESSION_VOIP_MODE_RINGTONE-1);
+       assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+
+       return 0;
+}
+
+int utc_media_sound_manager_get_voip_session_mode_p(void)
+{
+       int ret;
+       sound_session_voip_mode_e mode;
+
+       ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_VOIP);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_set_voip_session_mode(SOUND_SESSION_VOIP_MODE_RINGTONE);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_voip_session_mode(&mode);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       assert_eq(mode, SOUND_SESSION_VOIP_MODE_RINGTONE);
+
+
+       return 0;
+}
+
+int utc_media_sound_manager_get_voip_session_mode_n(void)
+{
+       int ret;
+
+       ret = sound_manager_set_session_type(SOUND_SESSION_TYPE_VOIP);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_set_voip_session_mode(SOUND_SESSION_VOIP_MODE_RINGTONE);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_voip_session_mode(NULL);
+       assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_sound_manager_get_current_device_list_p(void)
+{
+       int ret;
+       sound_device_list_h list;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_sound_manager_get_current_device_list_n(void)
+{
+       int ret;
+       sound_device_list_h list;
+
+       ret = sound_manager_get_current_device_list(0, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_sound_manager_get_next_device_p(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_sound_manager_get_next_device_n(void)
+{
+       int ret;
+       sound_device_list_h list;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, NULL);
+       assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_sound_manager_get_prev_device_p(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device_fst;
+       sound_device_h device_sec;
+       sound_device_h device;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device_fst);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device_sec);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_prev_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       assert_eq(device, device_fst);
+
+       return 0;
+}
+
+int utc_sound_manager_get_prev_device_n(void)
+{
+       int ret;
+       sound_device_list_h list;
+
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_prev_device(list, NULL);
+       assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_sound_manager_get_device_type_p(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device;
+       sound_device_type_e type;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_device_type(device, &type);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_sound_manager_get_device_type_n(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device;
+       sound_device_type_e type;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_device_type(NULL, &type);
+       assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_sound_manager_get_device_io_direction_p(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device;
+       sound_device_io_direction_e direction;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_device_io_direction(device, &direction);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_sound_manager_get_device_io_direction_n(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device;
+       sound_device_io_direction_e direction;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_device_io_direction(NULL, &direction);
+       assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_sound_manager_get_device_id_p(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device;
+       int id;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_device_id(device, &id);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_sound_manager_get_device_id_n(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device;
+       int id;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_device_id(NULL, &id);
+       assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_sound_manager_get_device_name_p(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device;
+       char *name;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_device_name(device, &name);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_sound_manager_get_device_name_n(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device;
+       char *name;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_device_name(NULL, &name);
+       assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_sound_manager_get_device_state_p(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device;
+       sound_device_state_e state;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_device_state(device, &state);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_sound_manager_get_device_state_n(void)
+{
+       int ret;
+       sound_device_list_h list;
+       sound_device_h device;
+       sound_device_state_e state;
+
+       ret = sound_manager_get_current_device_list(SOUND_DEVICE_ALL_MASK, &list);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_next_device(list, &device);
+       assert_eq(ret, SOUND_MANAGER_ERROR_NONE);
+       ret = sound_manager_get_device_state(NULL, &state);
+       assert_eq(ret, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
diff --git a/src/utc/stt/CMakeLists.txt b/src/utc/stt/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..bf8abcf
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "stt")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "stt")
+SET(TC_SOURCES
+       utc-stt.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-system-info
+       elementary
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/stt/public.list b/src/utc/stt/public.list
new file mode 100755 (executable)
index 0000000..a7c4d4d
--- /dev/null
@@ -0,0 +1,30 @@
+stt_create
+stt_destroy
+stt_foreach_supported_engines
+stt_get_engine
+stt_set_engine
+stt_prepare
+stt_unprepare
+stt_foreach_supported_languages
+stt_get_default_language
+stt_get_state
+stt_is_recognition_type_supported
+stt_set_silence_detection
+stt_set_start_sound
+stt_unset_start_sound
+stt_set_stop_sound
+stt_unset_stop_sound
+stt_start
+stt_stop
+stt_cancel
+stt_get_recording_volume
+stt_foreach_detailed_result
+stt_set_recognition_result_cb
+stt_unset_recognition_result_cb
+stt_set_state_changed_cb
+stt_unset_state_changed_cb
+stt_set_error_cb
+stt_unset_error_cb
+stt_set_default_language_changed_cb
+stt_unset_default_language_changed_cb
+
diff --git a/src/utc/stt/res/ringtone.wav b/src/utc/stt/res/ringtone.wav
new file mode 100755 (executable)
index 0000000..6487389
Binary files /dev/null and b/src/utc/stt/res/ringtone.wav differ
diff --git a/src/utc/stt/tct-stt-core.c b/src/utc/stt/tct-stt-core.c
new file mode 100755 (executable)
index 0000000..90f5977
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-stt-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/stt/tct-stt-core.h b/src/utc/stt/tct-stt-core.h
new file mode 100755 (executable)
index 0000000..e2880c1
--- /dev/null
@@ -0,0 +1,145 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_STT_CORE_H__
+#define __TCT_STT_CORE_H__
+
+#include "testcase.h"
+
+extern void startup(void);
+extern void cleanup(void);
+
+extern int utc_stt_create_p(void);
+extern int utc_stt_create_n(void);
+extern int utc_stt_destroy_p(void);
+extern int utc_stt_destroy_n(void);
+extern int utc_stt_prepare_p(void);
+extern int utc_stt_prepare_n(void);
+extern int utc_stt_unprepare_p(void);
+extern int utc_stt_unprepare_n(void);
+extern int utc_stt_foreach_supported_engines_p(void);
+extern int utc_stt_foreach_supported_engines_n(void);
+extern int utc_stt_get_engine_p(void);
+extern int utc_stt_get_engine_n(void);
+extern int utc_stt_set_engine_p(void);
+extern int utc_stt_set_engine_n(void);
+extern int utc_stt_foreach_supported_languages_p(void);
+extern int utc_stt_foreach_supported_languages_n(void);
+extern int utc_stt_get_default_language_p(void);
+extern int utc_stt_get_default_language_n(void);
+extern int utc_stt_get_state_p(void);
+extern int utc_stt_get_state_n(void);
+extern int utc_stt_is_recognition_type_supported_p(void);
+extern int utc_stt_is_recognition_type_supported_n(void);
+extern int utc_stt_set_silence_detection_p(void);
+extern int utc_stt_set_silence_detection_n(void);
+extern int utc_stt_start_p(void);
+extern int utc_stt_start_n(void);
+extern int utc_stt_stop_p(void);
+extern int utc_stt_stop_n(void);
+extern int utc_stt_cancel_p(void);
+extern int utc_stt_cancel_n(void);
+extern int utc_stt_get_recording_volume_p(void);
+extern int utc_stt_get_recording_volume_n(void);
+extern int utc_stt_set_recognition_result_cb_p(void);
+extern int utc_stt_set_recognition_result_cb_n(void);
+extern int utc_stt_unset_recognition_result_cb_p(void);
+extern int utc_stt_unset_recognition_result_cb_n(void);
+extern int utc_stt_set_state_changed_cb_p(void);
+extern int utc_stt_set_state_changed_cb_n(void);
+extern int utc_stt_unset_state_changed_cb_p(void);
+extern int utc_stt_unset_state_changed_cb_n(void);
+extern int utc_stt_set_error_cb_p(void);
+extern int utc_stt_set_error_cb_n(void);
+extern int utc_stt_unset_error_cb_p(void);
+extern int utc_stt_unset_error_cb_n(void);
+extern int utc_stt_set_default_language_changed_cb_p(void);
+extern int utc_stt_set_default_language_changed_cb_n(void);
+extern int utc_stt_unset_default_language_changed_cb_p(void);
+extern int utc_stt_unset_default_language_changed_cb_n(void);
+extern int utc_stt_set_start_sound_p(void);
+extern int utc_stt_set_start_sound_n(void);
+extern int utc_stt_unset_start_sound_p(void);
+extern int utc_stt_unset_start_sound_n(void);
+extern int utc_stt_set_stop_sound_p(void);
+extern int utc_stt_set_stop_sound_n(void);
+extern int utc_stt_unset_stop_sound_p(void);
+extern int utc_stt_unset_stop_sound_n(void);
+extern int utc_stt_foreach_detailed_result_p(void);
+extern int utc_stt_foreach_detailed_result_n(void);
+
+testcase tc_array[] = {
+    {"utc_stt_create_p", utc_stt_create_p, startup, cleanup},
+    {"utc_stt_create_n", utc_stt_create_n, startup, cleanup},
+    {"utc_stt_destroy_p", utc_stt_destroy_p, startup, cleanup},
+    {"utc_stt_destroy_n", utc_stt_destroy_n, startup, cleanup},
+    {"utc_stt_prepare_p", utc_stt_prepare_p, startup, cleanup},
+    {"utc_stt_prepare_n", utc_stt_prepare_n, startup, cleanup},
+    {"utc_stt_unprepare_p", utc_stt_unprepare_p, startup, cleanup},
+    {"utc_stt_unprepare_n", utc_stt_unprepare_n, startup, cleanup},
+    {"utc_stt_foreach_supported_engines_p", utc_stt_foreach_supported_engines_p, startup, cleanup},
+    {"utc_stt_foreach_supported_engines_n", utc_stt_foreach_supported_engines_n, startup, cleanup},
+    {"utc_stt_get_engine_p", utc_stt_get_engine_p, startup, cleanup},
+    {"utc_stt_get_engine_n", utc_stt_get_engine_n, startup, cleanup},
+    {"utc_stt_set_engine_p", utc_stt_set_engine_p, startup, cleanup},
+    {"utc_stt_set_engine_n", utc_stt_set_engine_n, startup, cleanup},
+    {"utc_stt_foreach_supported_languages_p", utc_stt_foreach_supported_languages_p, startup, cleanup},
+    {"utc_stt_foreach_supported_languages_n", utc_stt_foreach_supported_languages_n, startup, cleanup},
+    {"utc_stt_get_default_language_p", utc_stt_get_default_language_p, startup, cleanup},
+    {"utc_stt_get_default_language_n", utc_stt_get_default_language_n, startup, cleanup},
+    {"utc_stt_get_state_p", utc_stt_get_state_p, startup, cleanup},
+    {"utc_stt_get_state_n", utc_stt_get_state_n, startup, cleanup},
+    {"utc_stt_is_recognition_type_supported_p", utc_stt_is_recognition_type_supported_p, startup, cleanup},
+    {"utc_stt_is_recognition_type_supported_n", utc_stt_is_recognition_type_supported_n, startup, cleanup},
+    {"utc_stt_set_silence_detection_p", utc_stt_set_silence_detection_p, startup, cleanup},
+    {"utc_stt_set_silence_detection_n", utc_stt_set_silence_detection_n, startup, cleanup},
+    {"utc_stt_start_p", utc_stt_start_p, startup, cleanup},
+    {"utc_stt_start_n", utc_stt_start_n, startup, cleanup},
+    {"utc_stt_stop_p", utc_stt_stop_p, startup, cleanup},
+    {"utc_stt_stop_n", utc_stt_stop_n, startup, cleanup},
+    {"utc_stt_cancel_p", utc_stt_cancel_p, startup, cleanup},
+    {"utc_stt_cancel_n", utc_stt_cancel_n, startup, cleanup},
+    {"utc_stt_get_recording_volume_p", utc_stt_get_recording_volume_p, startup, cleanup},
+    {"utc_stt_get_recording_volume_n", utc_stt_get_recording_volume_n, startup, cleanup},
+    {"utc_stt_set_recognition_result_cb_p", utc_stt_set_recognition_result_cb_p, startup, cleanup},
+    {"utc_stt_set_recognition_result_cb_n", utc_stt_set_recognition_result_cb_n, startup, cleanup},
+    {"utc_stt_unset_recognition_result_cb_p", utc_stt_unset_recognition_result_cb_p, startup, cleanup},
+    {"utc_stt_unset_recognition_result_cb_n", utc_stt_unset_recognition_result_cb_n, startup, cleanup},
+    {"utc_stt_set_state_changed_cb_p", utc_stt_set_state_changed_cb_p, startup, cleanup},
+    {"utc_stt_set_state_changed_cb_n", utc_stt_set_state_changed_cb_n, startup, cleanup},
+    {"utc_stt_unset_state_changed_cb_p", utc_stt_unset_state_changed_cb_p, startup, cleanup},
+    {"utc_stt_unset_state_changed_cb_n", utc_stt_unset_state_changed_cb_n, startup, cleanup},
+    {"utc_stt_set_error_cb_p", utc_stt_set_error_cb_p, startup, cleanup},
+    {"utc_stt_set_error_cb_n", utc_stt_set_error_cb_n, startup, cleanup},
+    {"utc_stt_unset_error_cb_p", utc_stt_unset_error_cb_p, startup, cleanup},
+    {"utc_stt_unset_error_cb_n", utc_stt_unset_error_cb_n, startup, cleanup},
+    {"utc_stt_set_default_language_changed_cb_p", utc_stt_set_default_language_changed_cb_p, startup, cleanup},
+    {"utc_stt_set_default_language_changed_cb_n", utc_stt_set_default_language_changed_cb_n, startup, cleanup},
+    {"utc_stt_unset_default_language_changed_cb_p", utc_stt_unset_default_language_changed_cb_p, startup, cleanup},
+    {"utc_stt_unset_default_language_changed_cb_n", utc_stt_unset_default_language_changed_cb_n, startup, cleanup},
+    {"utc_stt_set_start_sound_p", utc_stt_set_start_sound_p, startup, cleanup},
+    {"utc_stt_set_start_sound_n", utc_stt_set_start_sound_n, startup, cleanup},
+    {"utc_stt_unset_start_sound_p", utc_stt_unset_start_sound_p, startup, cleanup},
+    {"utc_stt_unset_start_sound_n", utc_stt_unset_start_sound_n, startup, cleanup},
+    {"utc_stt_set_stop_sound_p", utc_stt_set_stop_sound_p, startup, cleanup},
+    {"utc_stt_set_stop_sound_n", utc_stt_set_stop_sound_n, startup, cleanup},
+    {"utc_stt_unset_stop_sound_p", utc_stt_unset_stop_sound_p, startup, cleanup},
+    {"utc_stt_unset_stop_sound_n", utc_stt_unset_stop_sound_n, startup, cleanup},
+    {"utc_stt_foreach_detailed_result_p", utc_stt_foreach_detailed_result_p, startup, cleanup},
+    {"utc_stt_foreach_detailed_result_n", utc_stt_foreach_detailed_result_n, startup, cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_STT_CORE_H__
diff --git a/src/utc/stt/utc-stt.c b/src/utc/stt/utc-stt.c
new file mode 100755 (executable)
index 0000000..dc52400
--- /dev/null
@@ -0,0 +1,1186 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stt.h>
+#include <stdlib.h>
+#include <system_info.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "assert.h"
+
+//& set: Stt
+
+stt_h g_stt = NULL;
+static char *g_engine_id = NULL;
+static char *g_language = NULL;
+static stt_state_e g_current_state;
+static void __stt_state_changed_cb(stt_h stt, stt_state_e previous, stt_state_e current, void* user_data);
+static bool g_stt_supported = false;
+static stt_state_e g_current_state;
+
+void startup(void)
+{
+       /* start of TC */
+       g_stt_supported = false;
+       system_info_get_platform_bool("http://tizen.org/feature/speech.recognition", &g_stt_supported);
+       elm_init(0,NULL);
+       if ( g_stt_supported) {
+               g_stt = NULL;
+               stt_create(&g_stt);
+               stt_set_state_changed_cb(g_stt, __stt_state_changed_cb, NULL);
+       }
+}
+
+void cleanup(void)
+{
+       /* end of TC */
+       elm_shutdown();
+       if (true == g_stt_supported) {
+               stt_unset_state_changed_cb(g_stt);
+               stt_destroy(g_stt);
+       }
+       g_stt = NULL;
+}
+
+static bool __stt_supported_engine_cb(stt_h stt, const char* engine_id, const char* engine_name, void* user_data)
+{
+       return true;
+}
+
+static bool __stt_supported_language_cb(stt_h stt, const char* lang, void* user_data)
+{
+       return true;
+}
+
+static void __stt_state_changed_cb(stt_h stt, stt_state_e previous, stt_state_e current, void* user_data)
+{
+       g_current_state = current;
+}
+
+static void __stt_error_cb(stt_h stt, stt_error_e reason, void *user_data)
+{
+}
+
+static void __stt_recognition_result_cb(stt_h stt, stt_result_event_e event, const char** data, int data_count, const char* msg, void *user_data)
+{
+}
+
+static bool __stt_result_time_cb(stt_h stt, int index, stt_result_time_event_e event, const char* text, long start_time, long end_time, void *user_data)
+{
+       return true;
+}
+
+static void __stt_default_language_changed_cb(stt_h stt, const char* previous, const char* current, void *user_data)
+{
+}
+
+int utc_stt_create_p(void)
+{
+       if (false == g_stt_supported) {
+               assert_eq(g_stt, NULL);
+       } else {
+               assert_neq(g_stt, NULL);
+       }
+
+       return 0;
+}
+
+int utc_stt_create_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_create(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else { 
+               ret = stt_create(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_destroy_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_destroy(g_stt);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_destroy(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_destroy_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_destroy(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_destroy(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_prepare_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+               
+               while(STT_STATE_READY!=g_current_state){
+                       ecore_main_loop_iterate();
+               }
+               stt_unprepare(g_stt);
+       }
+
+       return 0;
+}
+
+int utc_stt_prepare_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_prepare(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_prepare(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_unprepare_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unprepare(g_stt);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+
+               ret = stt_unprepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_unprepare_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unprepare(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_unprepare(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_foreach_supported_engines_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_foreach_supported_engines(g_stt, __stt_supported_engine_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_foreach_supported_engines(g_stt, __stt_supported_engine_cb, NULL);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_foreach_supported_engines_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_foreach_supported_engines(NULL, NULL, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_foreach_supported_engines(NULL, NULL, NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_get_engine_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_get_engine(g_stt, &g_engine_id);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_get_engine(g_stt, &g_engine_id);
+               free (g_engine_id);
+               g_engine_id = NULL;
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_get_engine_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_get_engine(NULL, &g_engine_id);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_get_engine(NULL, &g_engine_id);
+               free (g_engine_id);
+               g_engine_id = NULL;
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_engine_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_engine(g_stt, g_engine_id);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_get_engine(g_stt, &g_engine_id);
+               assert_eq(ret, STT_ERROR_NONE);
+
+               ret = stt_set_engine(g_stt, g_engine_id);
+               free (g_engine_id);
+               g_engine_id = NULL;
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_engine_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_engine(NULL, g_engine_id);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_set_engine(NULL, g_engine_id);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_foreach_supported_languages_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_foreach_supported_languages(g_stt, __stt_supported_language_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_foreach_supported_languages(g_stt, __stt_supported_language_cb, NULL);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_foreach_supported_languages_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_foreach_supported_languages(NULL, NULL, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_foreach_supported_languages(NULL, NULL, NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_get_default_language_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_get_default_language(g_stt, &g_language);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_get_default_language(g_stt, &g_language);
+               free (g_language);
+               g_language = NULL;
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_get_default_language_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_get_default_language(NULL, &g_language);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_get_default_language(NULL, &g_language);
+               free (g_language);
+               g_language = NULL;
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_get_state_p(void)
+{
+       stt_state_e state;
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_get_state(g_stt, &state);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_get_state(g_stt, &state);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_get_state_n(void)
+{
+       stt_state_e state;
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_get_state(NULL, &state);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_get_state(NULL, &state);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_is_recognition_type_supported_p(void)
+{
+       bool support;
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_is_recognition_type_supported(g_stt, STT_RECOGNITION_TYPE_FREE, &support);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+               while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               ret = stt_is_recognition_type_supported(g_stt, STT_RECOGNITION_TYPE_FREE, &support);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_is_recognition_type_supported_n(void)
+{
+       bool support;
+       int ret = STT_ERROR_NONE;
+       const char* type = "STT_RECOGNITION_TYPE_NOT_SUPPORTED";
+
+       if (false == g_stt_supported) {
+               ret = stt_is_recognition_type_supported(g_stt, type, &support);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               ret = stt_is_recognition_type_supported(g_stt, type, &support);
+               stt_unprepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_silence_detection_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_silence_detection(g_stt, STT_OPTION_SILENCE_DETECTION_AUTO);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               ret = stt_set_silence_detection(g_stt, STT_OPTION_SILENCE_DETECTION_AUTO);
+               assert(STT_ERROR_NONE == ret || STT_ERROR_NOT_SUPPORTED_FEATURE == ret);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_silence_detection_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_silence_detection(NULL, STT_OPTION_SILENCE_DETECTION_AUTO);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_set_silence_detection(NULL, STT_OPTION_SILENCE_DETECTION_AUTO);
+               assert(STT_ERROR_NONE != ret && STT_ERROR_NOT_SUPPORTED_FEATURE != ret);
+       }
+
+       return 0;
+}
+
+int utc_stt_start_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_start(g_stt, g_language, STT_RECOGNITION_TYPE_FREE);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+                
+               while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+
+               ret = stt_get_default_language(g_stt, &g_language);
+               assert_eq(ret, STT_ERROR_NONE);
+               ret = stt_start(g_stt, g_language, STT_RECOGNITION_TYPE_FREE);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_RECORDING!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               free (g_language);
+               g_language = NULL;
+               stt_cancel(g_stt);
+               stt_unprepare(g_stt);
+       }
+
+       return 0;
+}
+
+int utc_stt_start_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_start(NULL, g_language, STT_RECOGNITION_TYPE_FREE);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_start(NULL, g_language, STT_RECOGNITION_TYPE_FREE);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_stop_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_stop(g_stt);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               ret = stt_get_default_language(g_stt, &g_language);
+               assert_eq(ret, STT_ERROR_NONE);
+               ret = stt_start(g_stt, g_language, STT_RECOGNITION_TYPE_FREE);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_RECORDING!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               ret = stt_stop(g_stt);
+               free (g_language);
+               g_language = NULL;
+               stt_cancel(g_stt);
+               stt_unprepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_stop_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_stop(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_stop(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_cancel_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_cancel(g_stt);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+
+               while (STT_STATE_READY != g_current_state){
+                       ecore_main_loop_iterate();
+               }
+
+               ret = stt_start(g_stt, NULL, STT_RECOGNITION_TYPE_FREE);
+               assert_eq(ret, STT_ERROR_NONE);
+
+               while (STT_STATE_RECORDING != g_current_state){
+                       ecore_main_loop_iterate();
+               }
+
+               int i = 0;
+               for (i = 0; i < 10; i++) {
+                       ecore_main_loop_iterate();
+               }
+
+               if (STT_STATE_RECORDING == g_current_state || STT_STATE_PROCESSING == g_current_state) {
+                       ret = stt_cancel(g_stt);
+                       assert_eq(ret, STT_ERROR_NONE);
+
+                       while (STT_STATE_READY != g_current_state){
+                               ecore_main_loop_iterate();
+                       }
+               }
+
+               ret = stt_unprepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_cancel_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_cancel(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_cancel(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_get_recording_volume_p(void)
+{
+       float vol;
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_get_recording_volume(g_stt, &vol);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               ret = stt_start(g_stt, g_language, STT_RECOGNITION_TYPE_FREE);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_RECORDING!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               ret = stt_get_recording_volume(g_stt, &vol);
+               assert_eq(ret, STT_ERROR_NONE);
+
+               stt_cancel(g_stt);
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               stt_unprepare(g_stt);
+       }
+
+       return 0;
+}
+
+int utc_stt_get_recording_volume_n(void)
+{
+       float vol;
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_get_recording_volume(NULL, &vol);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_get_recording_volume(NULL, &vol);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_recognition_result_cb_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_recognition_result_cb(g_stt, __stt_recognition_result_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_set_recognition_result_cb(g_stt, __stt_recognition_result_cb, NULL);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_recognition_result_cb_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_recognition_result_cb(NULL, __stt_recognition_result_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_set_recognition_result_cb(NULL, __stt_recognition_result_cb, NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_recognition_result_cb_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_recognition_result_cb(g_stt);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_set_recognition_result_cb(g_stt, __stt_recognition_result_cb, NULL);
+               assert_eq(ret, STT_ERROR_NONE);
+               ret = stt_unset_recognition_result_cb(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_recognition_result_cb_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_recognition_result_cb(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_unset_recognition_result_cb(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_state_changed_cb_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret  = stt_set_state_changed_cb(g_stt, __stt_state_changed_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret  = stt_set_state_changed_cb(g_stt, __stt_state_changed_cb, NULL);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_state_changed_cb_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_state_changed_cb(NULL, __stt_state_changed_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_set_state_changed_cb(NULL, __stt_state_changed_cb, NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_state_changed_cb_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_state_changed_cb(g_stt);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_unset_state_changed_cb(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_state_changed_cb_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_state_changed_cb(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_unset_state_changed_cb(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_error_cb_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_error_cb(g_stt, __stt_error_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_set_error_cb(g_stt, __stt_error_cb, NULL);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_error_cb_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_error_cb(NULL, __stt_error_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_set_error_cb(NULL, __stt_error_cb, NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_error_cb_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_error_cb(g_stt);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_set_error_cb(g_stt, __stt_error_cb, NULL);
+               assert_eq(ret, STT_ERROR_NONE);
+               ret = stt_unset_error_cb(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_error_cb_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_error_cb(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_unset_error_cb(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_default_language_changed_cb_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_default_language_changed_cb(g_stt, __stt_default_language_changed_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_set_default_language_changed_cb(g_stt, __stt_default_language_changed_cb, NULL);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_default_language_changed_cb_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_default_language_changed_cb(NULL, __stt_default_language_changed_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_set_default_language_changed_cb(NULL, __stt_default_language_changed_cb, NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_default_language_changed_cb_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_default_language_changed_cb(g_stt);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_set_default_language_changed_cb(g_stt, __stt_default_language_changed_cb, NULL);
+               assert_eq(ret, STT_ERROR_NONE);
+               ret = stt_unset_default_language_changed_cb(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_default_language_changed_cb_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_default_language_changed_cb(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_unset_default_language_changed_cb(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_start_sound_p(void)
+{
+       int ret = STT_ERROR_NONE;
+       int access_ret = 0;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_start_sound(g_stt, "/opt/usr/apps/core-stt-tests/data/ringtone.wav");
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               access_ret = access("/opt/usr/apps/core-stt-tests/data/ringtone.wav", F_OK);
+               assert_eq(access_ret, 0);
+
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+
+               ret = stt_set_start_sound(g_stt, "/opt/usr/apps/core-stt-tests/data/ringtone.wav");
+               assert_eq(ret, STT_ERROR_NONE);
+
+               stt_unprepare(g_stt);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_start_sound_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_start_sound(g_stt, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               ret = stt_set_start_sound(g_stt, NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+
+               stt_unprepare(g_stt);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_start_sound_p(void)
+{
+       int ret = STT_ERROR_NONE;
+       int access_ret = 0;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_start_sound(g_stt);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               access_ret = access("/opt/usr/apps/core-stt-tests/data/ringtone.wav", F_OK);
+               assert_eq(access_ret, 0);
+
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               ret = stt_set_start_sound(g_stt, "/opt/usr/apps/core-stt-tests/data/ringtone.wav");
+               assert_eq(ret, STT_ERROR_NONE);
+               ret = stt_unset_start_sound(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+
+               stt_unprepare(g_stt);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_start_sound_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_start_sound(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               assert_neq(STT_STATE_READY, g_current_state);
+
+               ret = stt_unset_start_sound(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_stop_sound_p(void)
+{
+       int ret = STT_ERROR_NONE;
+       int access_ret = 0;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_stop_sound(g_stt, "/opt/usr/apps/core-stt-tests/data/ringtone.wav");
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               access_ret = access("/opt/usr/apps/core-stt-tests/data/ringtone.wav", F_OK);
+               assert_eq(access_ret, 0);
+
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+
+               ret = stt_set_stop_sound(g_stt, "/opt/usr/apps/core-stt-tests/data/ringtone.wav");
+               assert_eq(ret, STT_ERROR_NONE);
+
+               stt_unprepare(g_stt);
+       }
+
+       return 0;
+}
+
+int utc_stt_set_stop_sound_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_set_stop_sound(g_stt, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               ret = stt_set_stop_sound(g_stt, NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+
+               stt_unprepare(g_stt);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_stop_sound_p(void)
+{
+       int ret = STT_ERROR_NONE;
+       int access_ret = 0;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_stop_sound(g_stt);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               access_ret = access("/opt/usr/apps/core-stt-tests/data/ringtone.wav", F_OK);
+               assert_eq(access_ret, 0);
+
+               assert_neq(g_stt, NULL);
+               ret = stt_prepare(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+                while(STT_STATE_READY!=g_current_state){
+                        ecore_main_loop_iterate();
+                }
+               ret = stt_set_stop_sound(g_stt, "/opt/usr/apps/core-stt-tests/data/ringtone.wav");
+               assert_eq(ret, STT_ERROR_NONE);
+               ret = stt_unset_stop_sound(g_stt);
+               assert_eq(ret, STT_ERROR_NONE);
+
+               stt_unprepare(g_stt);
+       }
+
+       return 0;
+}
+
+int utc_stt_unset_stop_sound_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_unset_stop_sound(NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               assert_neq(STT_STATE_READY, g_current_state);
+
+               ret = stt_unset_stop_sound(NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_stt_foreach_detailed_result_p(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_foreach_detailed_result(g_stt, __stt_result_time_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_neq(g_stt, NULL);
+               ret = stt_foreach_detailed_result(g_stt, __stt_result_time_cb, NULL);
+               assert_eq(ret, STT_ERROR_OPERATION_FAILED);
+       }
+
+       return 0;
+}
+
+int utc_stt_foreach_detailed_result_n(void)
+{
+       int ret = STT_ERROR_NONE;
+
+       if (false == g_stt_supported) {
+               ret = stt_foreach_detailed_result(NULL, __stt_result_time_cb, NULL);
+               assert_eq(ret, STT_ERROR_NOT_SUPPORTED);
+       } else {
+               ret = stt_foreach_detailed_result(NULL, __stt_result_time_cb, NULL);
+               assert_eq(ret, STT_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
diff --git a/src/utc/system-info/CMakeLists.txt b/src/utc/system-info/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..9ed647f
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "system-info")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-system-info")
+SET(TC_SOURCES
+       utc-system-info.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/system-info/public.list b/src/utc/system-info/public.list
new file mode 100755 (executable)
index 0000000..37b0b30
--- /dev/null
@@ -0,0 +1,9 @@
+system_info_get_custom_bool
+system_info_get_custom_double
+system_info_get_custom_int
+system_info_get_custom_string
+system_info_get_platform_bool
+system_info_get_platform_double
+system_info_get_platform_int
+system_info_get_platform_string
+
diff --git a/src/utc/system-info/tct-system-info-core.c b/src/utc/system-info/tct-system-info-core.c
new file mode 100755 (executable)
index 0000000..a0ef887
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-system-info-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/system-info/tct-system-info-core.h b/src/utc/system-info/tct-system-info-core.h
new file mode 100755 (executable)
index 0000000..cf03d85
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SYSTEM_INFO_CORE_H__
+#define __TCT_SYSTEM_INFO_CORE_H__
+
+#include "testcase.h"
+
+
+extern int utc_system_info_get_platform_bool_p(void);
+extern int utc_system_info_get_platform_bool_n(void);
+extern int utc_system_info_get_platform_int_p(void);
+extern int utc_system_info_get_platform_int_n(void);
+extern int utc_system_info_get_platform_double_p(void);
+extern int utc_system_info_get_platform_double_n(void);
+extern int utc_system_info_get_platform_string_p(void);
+extern int utc_system_info_get_platform_string_n(void);
+extern int utc_system_info_get_custom_bool_n(void);
+extern int utc_system_info_get_custom_int_n(void);
+extern int utc_system_info_get_custom_double_n(void);
+extern int utc_system_info_get_custom_string_n(void);
+
+testcase tc_array[] = {
+    {"utc_system_info_get_platform_bool_p", utc_system_info_get_platform_bool_p, NULL, NULL},
+    {"utc_system_info_get_platform_bool_n", utc_system_info_get_platform_bool_n, NULL, NULL},
+    {"utc_system_info_get_platform_int_p", utc_system_info_get_platform_int_p, NULL, NULL},
+    {"utc_system_info_get_platform_int_n", utc_system_info_get_platform_int_n, NULL, NULL},
+    {"utc_system_info_get_platform_double_p", utc_system_info_get_platform_double_p, NULL, NULL},
+    {"utc_system_info_get_platform_double_n", utc_system_info_get_platform_double_n, NULL, NULL},
+    {"utc_system_info_get_platform_string_p", utc_system_info_get_platform_string_p, NULL, NULL},
+    {"utc_system_info_get_platform_string_n", utc_system_info_get_platform_string_n, NULL, NULL},
+    {"utc_system_info_get_custom_bool_n", utc_system_info_get_custom_bool_n, NULL, NULL},
+    {"utc_system_info_get_custom_int_n", utc_system_info_get_custom_int_n, NULL, NULL},
+    {"utc_system_info_get_custom_double_n", utc_system_info_get_custom_double_n, NULL, NULL},
+    {"utc_system_info_get_custom_string_n", utc_system_info_get_custom_string_n, NULL, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SYSTEM_INFO_CORE_H__
diff --git a/src/utc/system-info/utc-system-info.c b/src/utc/system-info/utc-system-info.c
new file mode 100755 (executable)
index 0000000..d6f9172
--- /dev/null
@@ -0,0 +1,162 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <string.h>
+#include <assert.h>
+#include "system_info.h"
+
+/* this is the sting with 2^15 elements, really huge */
+#define HUGE_STRING_LEN 65536
+
+
+//& set: SystemInfo
+
+
+int utc_system_info_get_platform_bool_p(void)
+{
+    bool supported;
+    int retcode = -1;
+
+    retcode = system_info_get_platform_bool("http://tizen.org/feature/fmradio", &supported);
+    assert_eq(retcode, SYSTEM_INFO_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_system_info_get_platform_bool_n(void)
+{
+    bool supported;
+    int retcode = -1;
+
+    retcode = system_info_get_platform_bool("http://tizen.org/feature/invalid_key", &supported);
+    assert_eq(retcode, SYSTEM_INFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_system_info_get_platform_int_p(void)
+{
+    int value = -1;
+    int result = 0;
+
+    int ret = system_info_get_platform_int("http://tizen.org/feature/screen.bpp", &value);
+    assert_eq(ret, SYSTEM_INFO_ERROR_NONE);
+
+    result = (value > 0)  &&  (value < 10000);
+    assert_eq(result, 1);
+
+    return 0;
+}
+
+int utc_system_info_get_platform_int_n(void)
+{
+    int value = -1;
+
+    int ret = system_info_get_platform_int("http://tizen.org/feature/invalid_key", &value);
+    assert_eq(ret, SYSTEM_INFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+//& purpose: there is no test case for double feature type
+int utc_system_info_get_platform_double_p(void)
+{
+    return 0;
+}
+
+int utc_system_info_get_platform_double_n(void)
+{
+    double value;
+    int retcode = -1;
+
+    retcode = system_info_get_platform_double("http://tizen.org/feature/invalid_key", &value);
+    assert_eq(retcode, SYSTEM_INFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_system_info_get_platform_string_p(void)
+{
+    char *value = NULL;
+    int string_len = 0;
+    int result = 0;
+
+    int ret = system_info_get_platform_string("http://tizen.org/system/platform.name", &value);
+    assert_eq(ret, SYSTEM_INFO_ERROR_NONE);
+    assert(value);
+
+    string_len = strlen(value);
+    free(value);
+    value = NULL;
+
+    result = (string_len < HUGE_STRING_LEN)  &&  (string_len > 0);
+    assert_eq(result, 1);
+
+    return 0;
+}
+
+int utc_system_info_get_platform_string_n(void)
+{
+    char *value = NULL;
+
+    int ret = system_info_get_platform_string("http://tizen.org/system/invalid.key", &value);
+    assert_eq(ret, SYSTEM_INFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_system_info_get_custom_bool_n(void)
+{
+    int retcode = -1;
+
+    retcode = system_info_get_custom_bool("custom/feature/invalid_key", NULL);
+    assert_eq(retcode, SYSTEM_INFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_system_info_get_custom_int_n(void)
+{
+    int retcode = -1;
+
+    retcode = system_info_get_custom_int("custom/feature/invalid_key", NULL);
+    assert_eq(retcode, SYSTEM_INFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_system_info_get_custom_double_n(void)
+{
+    int retcode = -1;
+
+    retcode = system_info_get_custom_double("custom/feature/invalid_key", NULL);
+    assert_eq(retcode, SYSTEM_INFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_system_info_get_custom_string_n(void)
+{
+    char *value = NULL;
+    int retcode = -1;
+
+    retcode = system_info_get_custom_string("custom/feature/invalid_key", &value);
+    if (value)
+        free(value);
+    assert_eq(retcode, SYSTEM_INFO_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
diff --git a/src/utc/system-settings/CMakeLists.txt b/src/utc/system-settings/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..7219c9b
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "system-settings")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-system-system-settings")
+SET(TC_SOURCES
+    utc-system-settings.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+    ${CAPI_LIB}
+    glib-2.0
+    storage
+    capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+    DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/system-settings/public.list b/src/utc/system-settings/public.list
new file mode 100755 (executable)
index 0000000..7d25d67
--- /dev/null
@@ -0,0 +1,6 @@
+system_settings_get_value_bool
+system_settings_get_value_int
+system_settings_get_value_string
+system_settings_set_changed_cb
+system_settings_unset_changed_cb
+
diff --git a/src/utc/system-settings/res/tct-content-tizen-tests_audio_default.mp3 b/src/utc/system-settings/res/tct-content-tizen-tests_audio_default.mp3
new file mode 100755 (executable)
index 0000000..c41d536
Binary files /dev/null and b/src/utc/system-settings/res/tct-content-tizen-tests_audio_default.mp3 differ
diff --git a/src/utc/system-settings/tct-system-settings-core.c b/src/utc/system-settings/tct-system-settings-core.c
new file mode 100755 (executable)
index 0000000..b6a04ec
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-system-settings-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/system-settings/tct-system-settings-core.h b/src/utc/system-settings/tct-system-settings-core.h
new file mode 100755 (executable)
index 0000000..d97ec1e
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_SYSTEM_SETTINGS_CORE_H__
+#define __TCT_SYSTEM_SETTINGS_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_system_settings_startup(void);
+extern void utc_system_settings_cleanup(void);
+
+extern int utc_system_settings_get_value_string_p(void);
+extern int utc_system_settings_get_value_string_n(void);
+extern int utc_system_settings_get_value_bool_p(void);
+extern int utc_system_settings_get_value_bool_n(void);
+extern int utc_system_settings_get_value_int_p1(void);
+extern int utc_system_settings_get_value_int_n(void);
+extern int utc_system_settings_set_changed_cb_p(void);
+extern int utc_system_settings_set_changed_cb_n(void);
+extern int utc_system_settings_unset_changed_cb_p(void);
+extern int utc_system_settings_unset_changed_cb_n(void);
+extern int utc_system_settings_get_value_int_p2(void);
+
+testcase tc_array[] = {
+    {"utc_system_settings_get_value_string_p", utc_system_settings_get_value_string_p, utc_system_settings_startup, utc_system_settings_cleanup},
+    {"utc_system_settings_get_value_string_n", utc_system_settings_get_value_string_n, utc_system_settings_startup, utc_system_settings_cleanup},
+    {"utc_system_settings_get_value_bool_p", utc_system_settings_get_value_bool_p, utc_system_settings_startup, utc_system_settings_cleanup},
+    {"utc_system_settings_get_value_bool_n", utc_system_settings_get_value_bool_n, utc_system_settings_startup, utc_system_settings_cleanup},
+    {"utc_system_settings_get_value_int_p1", utc_system_settings_get_value_int_p1, utc_system_settings_startup, utc_system_settings_cleanup},
+    {"utc_system_settings_get_value_int_n", utc_system_settings_get_value_int_n, utc_system_settings_startup, utc_system_settings_cleanup},
+    {"utc_system_settings_set_changed_cb_p", utc_system_settings_set_changed_cb_p, utc_system_settings_startup, utc_system_settings_cleanup},
+    {"utc_system_settings_set_changed_cb_n", utc_system_settings_set_changed_cb_n, utc_system_settings_startup, utc_system_settings_cleanup},
+    {"utc_system_settings_unset_changed_cb_p", utc_system_settings_unset_changed_cb_p, utc_system_settings_startup, utc_system_settings_cleanup},
+    {"utc_system_settings_unset_changed_cb_n", utc_system_settings_unset_changed_cb_n, utc_system_settings_startup, utc_system_settings_cleanup},
+    {"utc_system_settings_get_value_int_p2", utc_system_settings_get_value_int_p2, utc_system_settings_startup, utc_system_settings_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_SYSTEM_SETTINGS_CORE_H__
diff --git a/src/utc/system-settings/utc-system-settings.c b/src/utc/system-settings/utc-system-settings.c
new file mode 100755 (executable)
index 0000000..65fe078
--- /dev/null
@@ -0,0 +1,211 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "system_settings.h"
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <glib.h>
+#include <storage.h>
+#include <dlog.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
+#define LOG_TAG "UTC-SYSTEM-SETTINGS"
+
+#define UTC_SYSTEM_SETTINGS_ENABLE_TRACE
+
+#ifdef UTC_SYSTEM_SETTINGS_ENABLE_TRACE
+
+
+#define SETTING_TRACE_DEBUG(fmt, arg...) \
+       do {\
+               SECURE_LOGD("\033[0;32mDEBUG: " fmt "\033[0m\n", ##arg);\
+       }while(0);
+
+#define SETTING_TRACE(fmt, arg...) \
+       do {\
+               LOGE("\033[0;36m" fmt "\033[0m\n", ##arg);\
+       }while(0);
+
+#define SETTING_TRACE_BEGIN do {\
+               LOGE("\033[0;35mENTER FUNCTION: %s. \033[0m\n", __FUNCTION__);\
+       }while(0);
+
+#define SETTING_TRACE_END  do {\
+               LOGE("\033[0;35mEXIT FUNCTION: %s. \033[0m\n", __FUNCTION__);\
+       }while(0);
+#else
+#define SETTING_TRACE_DEBUG(fmt, arg...)
+#define SETTING_TRACE(fmt, arg...)
+#define SETTING_TRACE_BEGIN
+#define SETTING_TRACE_END
+#endif
+
+static void my_assert_ret(int retcode)
+{
+       if (retcode == SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) {
+               assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED);
+       } else {
+               assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
+       }
+}
+
+
+
+//& set: SystemSettings
+//ringtone_sdk.mp3
+
+static GMainLoop* main_loop = NULL;
+static bool _callback_called = false;
+
+void utc_system_settings_startup(void)
+{
+}
+
+void utc_system_settings_cleanup(void)
+{
+}
+
+static gboolean timeout_callback(gpointer data)
+{
+    _callback_called = false;
+    g_main_loop_quit(main_loop);
+    return FALSE;
+}
+
+
+static void utc_system_settings_changed_motion_activation(system_settings_key_e key, void *user_data)
+{
+    _callback_called = true;
+    g_main_loop_quit(main_loop);
+}
+
+int utc_system_settings_get_value_string_p(void)
+{
+    char *value = NULL;
+
+    int retcode = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, &value);
+       SETTING_TRACE("SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE -------------> retcode : %d", retcode);
+    //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
+       my_assert_ret(retcode);
+    free(value);
+    return 0;
+}
+
+int utc_system_settings_get_value_string_n(void)
+{
+    int retcode = system_settings_get_value_string(-1, NULL);
+    assert_neq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
+    return 0;
+}
+
+int utc_system_settings_get_value_bool_p(void)
+{
+    bool value = false;
+
+    int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, &value);
+    //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED);
+       my_assert_ret(retcode);
+   // assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_system_settings_get_value_bool_n(void)
+{
+    int retcode = system_settings_get_value_bool(-1, NULL);
+    assert_neq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
+    return 0;
+}
+
+int utc_system_settings_get_value_int_p1(void)
+{
+    int font_size = 0;
+
+    int retcode = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, &font_size);
+       SETTING_TRACE("SYSTEM_SETTINGS_KEY_FONT_SIZE -------------> retcode : %d", retcode);
+    //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
+       my_assert_ret(retcode);
+
+    return 0;
+}
+
+int utc_system_settings_get_value_int_n(void)
+{
+    int retcode = system_settings_get_value_int(-1, NULL);
+    assert_neq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
+    return 0;
+}
+
+int utc_system_settings_set_changed_cb_p(void)
+{
+    int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION,
+            utc_system_settings_changed_motion_activation, NULL);
+       SETTING_TRACE("SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION -------------> retcode : %d", retcode);
+    //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED);
+       my_assert_ret(retcode);
+    //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_system_settings_set_changed_cb_n(void)
+{
+    int retcode = system_settings_set_changed_cb(-1, NULL, NULL);
+    assert_neq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
+    return 0;
+}
+
+
+int utc_system_settings_unset_changed_cb_p(void)
+{
+    int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION,
+            utc_system_settings_changed_motion_activation, NULL);
+
+    retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION);
+    //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED || SYSTEM_SETTINGS_ERROR_NONE);
+    //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED);
+       my_assert_ret(retcode);
+
+    return 0;
+}
+
+//SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED
+int utc_system_settings_unset_changed_cb_n(void)
+{
+    int retcode = system_settings_unset_changed_cb(-1);
+    assert_neq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
+    return 0;
+}
+
+
+// SYSTEM_SETTINGS_KEY_LOCK_STATE
+int utc_system_settings_get_value_int_p2(void)
+{
+       SETTING_TRACE_BEGIN;
+    int state = 0;
+
+    int retcode = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_LOCK_STATE, &state);
+       SETTING_TRACE("-------------> retcode : %d", retcode);
+    //assert_eq(retcode, SYSTEM_SETTINGS_ERROR_NONE);
+       my_assert_ret(retcode);
+
+    return 0;
+}
+
diff --git a/src/utc/tbm/CMakeLists.txt b/src/utc/tbm/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..44fe64b
--- /dev/null
@@ -0,0 +1,34 @@
+SET(PKG_NAME "tbm")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "libtbm")
+SET(TC_SOURCES
+       utc-tbm-surface-create.c
+       utc-tbm-surface-info.c
+       utc-tbm-surface-map.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/tbm/platform.list b/src/utc/tbm/platform.list
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/src/utc/tbm/public.list b/src/utc/tbm/public.list
new file mode 100755 (executable)
index 0000000..d83fd25
--- /dev/null
@@ -0,0 +1,9 @@
+tbm_surface_create
+tbm_surface_destroy 
+tbm_surface_get_format 
+tbm_surface_get_height
+tbm_surface_get_info
+tbm_surface_get_width 
+tbm_surface_map 
+tbm_surface_query_formats
+tbm_surface_unmap
diff --git a/src/utc/tbm/tct-tbm-core.c b/src/utc/tbm/tct-tbm-core.c
new file mode 100755 (executable)
index 0000000..ccce504
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-tbm-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/tbm/tct-tbm-core.h b/src/utc/tbm/tct-tbm-core.h
new file mode 100755 (executable)
index 0000000..3eb2147
--- /dev/null
@@ -0,0 +1,67 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_TBM_CORE_H__
+#define __TCT_TBM_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_tbm_surface_create_startup(void);
+extern void utc_tbm_surface_create_cleanup(void);
+extern void utc_tbm_surface_info_startup(void);
+extern void utc_tbm_surface_info_cleanup(void);
+extern void utc_tbm_surface_map_startup(void);
+extern void utc_tbm_surface_map_cleanup(void);
+
+extern int utc_tbm_surface_create_p(void);
+extern int utc_tbm_surface_create_n(void);
+extern int utc_tbm_surface_destroy_p(void);
+extern int utc_tbm_surface_destroy_n(void);
+extern int utc_tbm_surface_get_info_p(void);
+extern int utc_tbm_surface_get_info_n(void);
+extern int utc_tbm_surface_get_width_p(void);
+extern int utc_tbm_surface_get_width_n(void);
+extern int utc_tbm_surface_get_height_p(void);
+extern int utc_tbm_surface_get_height_n(void);
+extern int utc_tbm_surface_get_format_p(void);
+extern int utc_tbm_surface_get_format_n(void);
+extern int utc_tbm_surface_query_formats_p(void);
+extern int utc_tbm_surface_map_p(void);
+extern int utc_tbm_surface_map_n(void);
+extern int utc_tbm_surface_unmap_p(void);
+extern int utc_tbm_surface_unmap_n(void);
+
+testcase tc_array[] = {
+    {"utc_tbm_surface_create_p", utc_tbm_surface_create_p, utc_tbm_surface_create_startup, utc_tbm_surface_create_cleanup},
+    {"utc_tbm_surface_create_n", utc_tbm_surface_create_n, utc_tbm_surface_create_startup, utc_tbm_surface_create_cleanup},
+    {"utc_tbm_surface_destroy_p", utc_tbm_surface_destroy_p, utc_tbm_surface_create_startup, utc_tbm_surface_create_cleanup},
+    {"utc_tbm_surface_destroy_n", utc_tbm_surface_destroy_n, utc_tbm_surface_create_startup, utc_tbm_surface_create_cleanup},
+    {"utc_tbm_surface_get_info_p", utc_tbm_surface_get_info_p, utc_tbm_surface_info_startup, utc_tbm_surface_info_cleanup},
+    {"utc_tbm_surface_get_info_n", utc_tbm_surface_get_info_n, utc_tbm_surface_info_startup, utc_tbm_surface_info_cleanup},
+    {"utc_tbm_surface_get_width_p", utc_tbm_surface_get_width_p, utc_tbm_surface_info_startup, utc_tbm_surface_info_cleanup},
+    {"utc_tbm_surface_get_width_n", utc_tbm_surface_get_width_n, utc_tbm_surface_info_startup, utc_tbm_surface_info_cleanup},
+    {"utc_tbm_surface_get_height_p", utc_tbm_surface_get_height_p, utc_tbm_surface_info_startup, utc_tbm_surface_info_cleanup},
+    {"utc_tbm_surface_get_height_n", utc_tbm_surface_get_height_n, utc_tbm_surface_info_startup, utc_tbm_surface_info_cleanup},
+    {"utc_tbm_surface_get_format_p", utc_tbm_surface_get_format_p, utc_tbm_surface_info_startup, utc_tbm_surface_info_cleanup},
+    {"utc_tbm_surface_get_format_n", utc_tbm_surface_get_format_n, utc_tbm_surface_info_startup, utc_tbm_surface_info_cleanup},
+    {"utc_tbm_surface_query_formats_p", utc_tbm_surface_query_formats_p, utc_tbm_surface_info_startup, utc_tbm_surface_info_cleanup},
+    {"utc_tbm_surface_map_p", utc_tbm_surface_map_p, utc_tbm_surface_map_startup, utc_tbm_surface_map_cleanup},
+    {"utc_tbm_surface_map_n", utc_tbm_surface_map_n, utc_tbm_surface_map_startup, utc_tbm_surface_map_cleanup},
+    {"utc_tbm_surface_unmap_p", utc_tbm_surface_unmap_p, utc_tbm_surface_map_startup, utc_tbm_surface_map_cleanup},
+    {"utc_tbm_surface_unmap_n", utc_tbm_surface_unmap_n, utc_tbm_surface_map_startup, utc_tbm_surface_map_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_TBM_CORE_H__
diff --git a/src/utc/tbm/utc-tbm-surface-create.c b/src/utc/tbm/utc-tbm-surface-create.c
new file mode 100755 (executable)
index 0000000..a8384ba
--- /dev/null
@@ -0,0 +1,105 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <tbm_surface.h>
+#include <stdlib.h>
+#include "assert.h"
+
+//& set: TbmSurfaceCreate
+
+void utc_tbm_surface_create_startup(void)
+{
+}
+
+
+void utc_tbm_surface_create_cleanup(void)
+{
+}
+
+int utc_tbm_surface_create_p(void)
+{
+    tbm_surface_h surface = NULL;
+    tbm_format *formats = NULL;
+    uint32_t format_num = 0;
+    int ret = 0;
+    int i = 0;
+
+    ret = tbm_surface_query_formats (&formats, &format_num);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    for ( i = 0 ; i < format_num ; i++)
+    {
+        surface = tbm_surface_create (128, 128, formats[i]);
+        assert (surface);
+
+        tbm_surface_destroy (surface);
+    }
+
+    free (formats);
+
+    return 0;
+}
+
+int utc_tbm_surface_create_n(void)
+{
+    tbm_surface_h surface = NULL;
+    tbm_format *formats = NULL;
+    uint32_t format_num = 0;
+    int ret = 0;
+
+    ret = tbm_surface_query_formats (&formats, &format_num);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    surface = tbm_surface_create (-1, 128, formats[0]);
+    assert (!surface);
+
+    tbm_surface_destroy (surface);
+
+    return 0;
+}
+
+int utc_tbm_surface_destroy_p(void)
+{
+    tbm_surface_h surface = NULL;
+    tbm_format *formats = NULL;
+    uint32_t format_num = 0;
+    int ret = 0;
+
+    ret = tbm_surface_query_formats (&formats, &format_num);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    surface = tbm_surface_create (128, 128, formats[0]);
+    assert (surface);
+
+    ret = tbm_surface_destroy (surface);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    free (formats);
+
+    return 0;
+}
+
+int utc_tbm_surface_destroy_n(void)
+{
+    tbm_surface_h surface = NULL;
+    int ret = 0;
+
+    ret = tbm_surface_destroy (surface);
+
+    assert_eq (ret, TBM_SURFACE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
diff --git a/src/utc/tbm/utc-tbm-surface-info.c b/src/utc/tbm/utc-tbm-surface-info.c
new file mode 100755 (executable)
index 0000000..32589f6
--- /dev/null
@@ -0,0 +1,180 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <tbm_surface.h>
+#include <stdlib.h>
+#include "assert.h"
+
+//& set: TbmSurfaceInfo
+
+void utc_tbm_surface_info_startup(void)
+{
+}
+
+
+void utc_tbm_surface_info_cleanup(void)
+{
+}
+
+int utc_tbm_surface_get_info_p(void)
+{
+    tbm_surface_h surface = NULL;
+    tbm_surface_info_s surface_info;
+    tbm_format *formats = NULL;
+    uint32_t format_num = 0;
+    int ret = 0;
+
+    ret = tbm_surface_query_formats (&formats, &format_num);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    surface = tbm_surface_create (128, 256, formats[0]);
+    assert (surface);
+
+    ret = tbm_surface_get_info (surface, &surface_info);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    tbm_surface_destroy (surface);
+    free (formats);
+
+    return 0;
+}
+
+int utc_tbm_surface_get_info_n(void)
+{
+    tbm_surface_h surface = NULL;
+    tbm_surface_info_s surface_info;
+    int ret = 0;
+
+    ret = tbm_surface_get_info (surface, &surface_info);
+    assert_eq (ret, TBM_SURFACE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_tbm_surface_get_width_p(void)
+{
+    tbm_surface_h surface = NULL;
+    tbm_format *formats = NULL;
+    uint32_t format_num = 0;
+    int ret = 0;
+
+    ret = tbm_surface_query_formats (&formats, &format_num);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    surface = tbm_surface_create (128, 256, formats[0]);
+    assert (surface);
+
+    ret = tbm_surface_get_width (surface);
+    assert_eq (ret, 128);
+
+    tbm_surface_destroy (surface);
+    free (formats);
+
+    return 0;
+}
+
+int utc_tbm_surface_get_width_n(void)
+{
+    tbm_surface_h surface = NULL;
+    int ret = 0;
+
+    ret = tbm_surface_get_width (surface);
+    assert_eq (ret, TBM_SURFACE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_tbm_surface_get_height_p(void)
+{
+    tbm_surface_h surface = NULL;
+    tbm_format *formats = NULL;
+    uint32_t format_num = 0;
+    int ret = 0;
+
+    ret = tbm_surface_query_formats (&formats, &format_num);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    surface = tbm_surface_create (128, 256, formats[0]);
+    assert (surface);
+
+    ret = tbm_surface_get_height (surface);
+    assert_eq (ret, 256);
+
+    tbm_surface_destroy (surface);
+    free (formats);
+
+    return 0;
+}
+
+int utc_tbm_surface_get_height_n(void)
+{
+    tbm_surface_h surface = NULL;
+    int ret = 0;
+
+    ret = tbm_surface_get_height (surface);
+    assert_eq (ret, TBM_SURFACE_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_tbm_surface_get_format_p(void)
+{
+    tbm_surface_h surface = NULL;
+    tbm_format *formats = NULL;
+    uint32_t format_num = 0;
+    int ret = 0;
+
+    ret = tbm_surface_query_formats (&formats, &format_num);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    surface = tbm_surface_create (128, 128, formats[0]);
+    assert (surface);
+
+    ret = tbm_surface_get_format (surface);
+    assert_eq (ret, formats[0]);
+
+    tbm_surface_destroy (surface);
+    free (formats);
+
+    return 0;
+}
+
+int utc_tbm_surface_get_format_n(void)
+{
+    tbm_surface_h surface = NULL;
+    int ret = 0;
+
+    ret = tbm_surface_get_format (surface);
+    assert (!ret);
+
+    return 0;
+}
+
+int utc_tbm_surface_query_formats_p(void)
+{
+    tbm_format *formats = NULL;
+    uint32_t format_num = 0;
+    int ret = 0;
+
+    ret = tbm_surface_query_formats (&formats, &format_num);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+    assert (formats);
+    assert_gt (format_num, 0);
+
+    free (formats);
+
+    return 0;
+}
+
diff --git a/src/utc/tbm/utc-tbm-surface-map.c b/src/utc/tbm/utc-tbm-surface-map.c
new file mode 100755 (executable)
index 0000000..50a6017
--- /dev/null
@@ -0,0 +1,117 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <tbm_surface.h>
+#include <stdlib.h>
+#include "assert.h"
+
+//& set: TbmSurfaceMap
+
+
+void utc_tbm_surface_map_startup(void)
+{
+}
+
+void utc_tbm_surface_map_cleanup(void)
+{
+}
+
+int utc_tbm_surface_map_p(void)
+{
+    tbm_surface_h surface = NULL;
+    tbm_surface_info_s surface_info;
+    int access[3] = {
+        TBM_SURF_OPTION_READ,
+        TBM_SURF_OPTION_READ,
+        TBM_SURF_OPTION_READ|TBM_SURF_OPTION_READ,
+    };
+    tbm_format *formats = NULL;
+    uint32_t format_num = 0;
+    int i = 0;
+    int ret = 0;
+
+    ret = tbm_surface_query_formats (&formats, &format_num);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    for (i=0; i<3; i++) {
+        surface = tbm_surface_create (128, 128, formats[0]);
+        assert (surface);
+        ret = tbm_surface_map (surface, access[i], &surface_info);
+        assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+        tbm_surface_unmap (surface);
+
+        tbm_surface_destroy (surface);
+    }
+
+    free (formats);
+
+    return 0;
+}
+
+int utc_tbm_surface_map_n(void)
+{
+    tbm_surface_h surface = NULL;
+    tbm_surface_info_s surface_info;
+    int ret = 0;
+
+    ret = tbm_surface_map (surface, TBM_SURF_OPTION_READ|TBM_SURF_OPTION_READ, &surface_info);
+    assert_eq (ret, TBM_SURFACE_ERROR_INVALID_PARAMETER);
+
+    tbm_surface_destroy (surface);
+
+    return 0;
+}
+
+int utc_tbm_surface_unmap_p(void)
+{
+    tbm_surface_h surface = NULL;
+    tbm_surface_info_s surface_info;
+    tbm_format *formats = NULL;
+    uint32_t format_num = 0;
+    int ret = 0;
+
+    ret = tbm_surface_query_formats (&formats, &format_num);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    surface = tbm_surface_create (128, 128, formats[0]);
+    assert (surface);
+
+    ret = tbm_surface_map (surface, TBM_SURF_OPTION_READ|TBM_SURF_OPTION_READ, &surface_info);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    ret = tbm_surface_unmap (surface);
+    assert_eq (ret, TBM_SURFACE_ERROR_NONE);
+
+    tbm_surface_destroy (surface);
+    free (formats);
+
+    return 0;
+}
+
+int utc_tbm_surface_unmap_n(void)
+{
+    tbm_surface_h surface = NULL;
+    int ret = 0;
+
+    ret = tbm_surface_unmap (surface);
+
+    assert_eq (ret, TBM_SURFACE_ERROR_INVALID_PARAMETER);
+
+    tbm_surface_destroy (surface);
+
+    return 0;
+}
+
diff --git a/src/utc/telephony/CMakeLists.txt b/src/utc/telephony/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..67ad0d1
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "telephony")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-telephony")
+SET(TC_SOURCES
+       utc-common.c
+       utc-call.c
+       utc-network.c
+       utc-sim.c
+       utc-modem.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/telephony/public.list b/src/utc/telephony/public.list
new file mode 100755 (executable)
index 0000000..4cf2247
--- /dev/null
@@ -0,0 +1,24 @@
+telephony_call_get_video_call_state
+telephony_call_get_voice_call_state
+telephony_deinit
+telephony_init
+telephony_modem_get_imei
+telephony_network_get_cell_id
+telephony_network_get_lac
+telephony_network_get_mcc
+telephony_network_get_mnc
+telephony_network_get_network_name
+telephony_network_get_roaming_status
+telephony_network_get_rssi
+telephony_network_get_service_state
+telephony_network_get_type
+telephony_set_noti_cb
+telephony_sim_get_icc_id
+telephony_sim_get_msin
+telephony_sim_get_operator
+telephony_sim_get_spn
+telephony_sim_get_state
+telephony_sim_get_subscriber_number
+telephony_sim_is_changed
+telephony_unset_noti_cb
+
diff --git a/src/utc/telephony/tct-telephony-core.c b/src/utc/telephony/tct-telephony-core.c
new file mode 100755 (executable)
index 0000000..acad54d
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-telephony-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/telephony/tct-telephony-core.h b/src/utc/telephony/tct-telephony-core.h
new file mode 100755 (executable)
index 0000000..9f2ca64
--- /dev/null
@@ -0,0 +1,171 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_TELEPHONY_CORE_H__
+#define __TCT_TELEPHONY_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_telephony_common_startup(void);
+extern void utc_telephony_common_cleanup(void);
+extern void utc_telephony_call_startup(void);
+extern void utc_telephony_call_cleanup(void);
+extern void utc_telephony_network_startup(void);
+extern void utc_telephony_network_cleanup(void);
+extern void utc_telephony_sim_startup(void);
+extern void utc_telephony_sim_cleanup(void);
+extern void utc_telephony_modem_startup(void);
+extern void utc_telephony_modem_cleanup(void);
+
+extern int utc_telephony_telephony_init_p(void);
+extern int utc_telephony_telephony_init_n(void);
+extern int utc_telephony_telephony_deinit_p(void);
+extern int utc_telephony_telephony_deinit_n(void);
+extern int utc_telephony_telephony_set_noti_cb_p(void);
+extern int utc_telephony_telephony_set_noti_cb_n1(void);
+extern int utc_telephony_telephony_set_noti_cb_n2(void);
+extern int utc_telephony_telephony_unset_noti_cb_p(void);
+extern int utc_telephony_telephony_unset_noti_cb_n1(void);
+extern int utc_telephony_telephony_unset_noti_cb_n2(void);
+extern int utc_telephony_telephony_call_get_voice_call_state_p(void);
+extern int utc_telephony_telephony_call_get_voice_call_state_n1(void);
+extern int utc_telephony_telephony_call_get_voice_call_state_n2(void);
+extern int utc_telephony_telephony_call_get_video_call_state_p(void);
+extern int utc_telephony_telephony_call_get_video_call_state_n1(void);
+extern int utc_telephony_telephony_call_get_video_call_state_n2(void);
+extern int utc_telephony_telephony_network_get_lac_p(void);
+extern int utc_telephony_telephony_network_get_lac_n1(void);
+extern int utc_telephony_telephony_network_get_lac_n2(void);
+extern int utc_telephony_telephony_network_get_cell_id_p(void);
+extern int utc_telephony_telephony_network_get_cell_id_n1(void);
+extern int utc_telephony_telephony_network_get_cell_id_n2(void);
+extern int utc_telephony_telephony_network_get_rssi_p(void);
+extern int utc_telephony_telephony_network_get_rssi_n1(void);
+extern int utc_telephony_telephony_network_get_rssi_n2(void);
+extern int utc_telephony_telephony_network_get_roaming_status_p(void);
+extern int utc_telephony_telephony_network_get_roaming_status_n1(void);
+extern int utc_telephony_telephony_network_get_roaming_status_n2(void);
+extern int utc_telephony_telephony_network_get_mcc_p(void);
+extern int utc_telephony_telephony_network_get_mcc_n1(void);
+extern int utc_telephony_telephony_network_get_mcc_n2(void);
+extern int utc_telephony_telephony_network_get_mnc_p(void);
+extern int utc_telephony_telephony_network_get_mnc_n1(void);
+extern int utc_telephony_telephony_network_get_mnc_n2(void);
+extern int utc_telephony_telephony_network_get_network_name_p(void);
+extern int utc_telephony_telephony_network_get_network_name_n1(void);
+extern int utc_telephony_telephony_network_get_network_name_n2(void);
+extern int utc_telephony_telephony_network_get_type_p(void);
+extern int utc_telephony_telephony_network_get_type_n1(void);
+extern int utc_telephony_telephony_network_get_type_n2(void);
+extern int utc_telephony_telephony_network_get_service_state_p(void);
+extern int utc_telephony_telephony_network_get_service_state_n1(void);
+extern int utc_telephony_telephony_network_get_service_state_n2(void);
+extern int utc_telephony_telephony_sim_get_icc_id_p(void);
+extern int utc_telephony_telephony_sim_get_icc_id_n1(void);
+extern int utc_telephony_telephony_sim_get_icc_id_n2(void);
+extern int utc_telephony_telephony_sim_get_operator_p(void);
+extern int utc_telephony_telephony_sim_get_operator_n1(void);
+extern int utc_telephony_telephony_sim_get_operator_n2(void);
+extern int utc_telephony_telephony_sim_get_msin_p(void);
+extern int utc_telephony_telephony_sim_get_msin_n1(void);
+extern int utc_telephony_telephony_sim_get_msin_n2(void);
+extern int utc_telephony_telephony_sim_get_spn_p(void);
+extern int utc_telephony_telephony_sim_get_spn_n1(void);
+extern int utc_telephony_telephony_sim_get_spn_n2(void);
+extern int utc_telephony_telephony_sim_is_changed_p(void);
+extern int utc_telephony_telephony_sim_is_changed_n1(void);
+extern int utc_telephony_telephony_sim_is_changed_n2(void);
+extern int utc_telephony_telephony_sim_get_state_p(void);
+extern int utc_telephony_telephony_sim_get_state_n1(void);
+extern int utc_telephony_telephony_sim_get_state_n2(void);
+extern int utc_telephony_telephony_sim_get_subscriber_number_p(void);
+extern int utc_telephony_telephony_sim_get_subscriber_number_n1(void);
+extern int utc_telephony_telephony_sim_get_subscriber_number_n2(void);
+extern int utc_telephony_telephony_modem_get_imei_p(void);
+extern int utc_telephony_telephony_modem_get_imei_n1(void);
+extern int utc_telephony_telephony_modem_get_imei_n2(void);
+
+testcase tc_array[] = {
+    {"utc_telephony_telephony_init_p", utc_telephony_telephony_init_p, utc_telephony_common_startup, utc_telephony_common_cleanup},
+    {"utc_telephony_telephony_init_n", utc_telephony_telephony_init_n, utc_telephony_common_startup, utc_telephony_common_cleanup},
+    {"utc_telephony_telephony_deinit_p", utc_telephony_telephony_deinit_p, utc_telephony_common_startup, utc_telephony_common_cleanup},
+    {"utc_telephony_telephony_deinit_n", utc_telephony_telephony_deinit_n, utc_telephony_common_startup, utc_telephony_common_cleanup},
+    {"utc_telephony_telephony_set_noti_cb_p", utc_telephony_telephony_set_noti_cb_p, utc_telephony_common_startup, utc_telephony_common_cleanup},
+    {"utc_telephony_telephony_set_noti_cb_n1", utc_telephony_telephony_set_noti_cb_n1, utc_telephony_common_startup, utc_telephony_common_cleanup},
+    {"utc_telephony_telephony_set_noti_cb_n2", utc_telephony_telephony_set_noti_cb_n2, utc_telephony_common_startup, utc_telephony_common_cleanup},
+    {"utc_telephony_telephony_unset_noti_cb_p", utc_telephony_telephony_unset_noti_cb_p, utc_telephony_common_startup, utc_telephony_common_cleanup},
+    {"utc_telephony_telephony_unset_noti_cb_n1", utc_telephony_telephony_unset_noti_cb_n1, utc_telephony_common_startup, utc_telephony_common_cleanup},
+    {"utc_telephony_telephony_unset_noti_cb_n2", utc_telephony_telephony_unset_noti_cb_n2, utc_telephony_common_startup, utc_telephony_common_cleanup},
+    {"utc_telephony_telephony_call_get_voice_call_state_p", utc_telephony_telephony_call_get_voice_call_state_p, utc_telephony_call_startup, utc_telephony_call_cleanup},
+    {"utc_telephony_telephony_call_get_voice_call_state_n1", utc_telephony_telephony_call_get_voice_call_state_n1, utc_telephony_call_startup, utc_telephony_call_cleanup},
+    {"utc_telephony_telephony_call_get_voice_call_state_n2", utc_telephony_telephony_call_get_voice_call_state_n2, utc_telephony_call_startup, utc_telephony_call_cleanup},
+    {"utc_telephony_telephony_call_get_video_call_state_p", utc_telephony_telephony_call_get_video_call_state_p, utc_telephony_call_startup, utc_telephony_call_cleanup},
+    {"utc_telephony_telephony_call_get_video_call_state_n1", utc_telephony_telephony_call_get_video_call_state_n1, utc_telephony_call_startup, utc_telephony_call_cleanup},
+    {"utc_telephony_telephony_call_get_video_call_state_n2", utc_telephony_telephony_call_get_video_call_state_n2, utc_telephony_call_startup, utc_telephony_call_cleanup},
+    {"utc_telephony_telephony_network_get_lac_p", utc_telephony_telephony_network_get_lac_p, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_lac_n1", utc_telephony_telephony_network_get_lac_n1, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_lac_n2", utc_telephony_telephony_network_get_lac_n2, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_cell_id_p", utc_telephony_telephony_network_get_cell_id_p, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_cell_id_n1", utc_telephony_telephony_network_get_cell_id_n1, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_cell_id_n2", utc_telephony_telephony_network_get_cell_id_n2, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_rssi_p", utc_telephony_telephony_network_get_rssi_p, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_rssi_n1", utc_telephony_telephony_network_get_rssi_n1, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_rssi_n2", utc_telephony_telephony_network_get_rssi_n2, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_roaming_status_p", utc_telephony_telephony_network_get_roaming_status_p, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_roaming_status_n1", utc_telephony_telephony_network_get_roaming_status_n1, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_roaming_status_n2", utc_telephony_telephony_network_get_roaming_status_n2, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_mcc_p", utc_telephony_telephony_network_get_mcc_p, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_mcc_n1", utc_telephony_telephony_network_get_mcc_n1, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_mcc_n2", utc_telephony_telephony_network_get_mcc_n2, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_mnc_p", utc_telephony_telephony_network_get_mnc_p, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_mnc_n1", utc_telephony_telephony_network_get_mnc_n1, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_mnc_n2", utc_telephony_telephony_network_get_mnc_n2, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_network_name_p", utc_telephony_telephony_network_get_network_name_p, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_network_name_n1", utc_telephony_telephony_network_get_network_name_n1, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_network_name_n2", utc_telephony_telephony_network_get_network_name_n2, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_type_p", utc_telephony_telephony_network_get_type_p, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_type_n1", utc_telephony_telephony_network_get_type_n1, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_type_n2", utc_telephony_telephony_network_get_type_n2, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_service_state_p", utc_telephony_telephony_network_get_service_state_p, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_service_state_n1", utc_telephony_telephony_network_get_service_state_n1, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_network_get_service_state_n2", utc_telephony_telephony_network_get_service_state_n2, utc_telephony_network_startup, utc_telephony_network_cleanup},
+    {"utc_telephony_telephony_sim_get_icc_id_p", utc_telephony_telephony_sim_get_icc_id_p, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_icc_id_n1", utc_telephony_telephony_sim_get_icc_id_n1, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_icc_id_n2", utc_telephony_telephony_sim_get_icc_id_n2, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_operator_p", utc_telephony_telephony_sim_get_operator_p, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_operator_n1", utc_telephony_telephony_sim_get_operator_n1, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_operator_n2", utc_telephony_telephony_sim_get_operator_n2, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_msin_p", utc_telephony_telephony_sim_get_msin_p, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_msin_n1", utc_telephony_telephony_sim_get_msin_n1, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_msin_n2", utc_telephony_telephony_sim_get_msin_n2, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_spn_p", utc_telephony_telephony_sim_get_spn_p, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_spn_n1", utc_telephony_telephony_sim_get_spn_n1, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_spn_n2", utc_telephony_telephony_sim_get_spn_n2, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_is_changed_p", utc_telephony_telephony_sim_is_changed_p, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_is_changed_n1", utc_telephony_telephony_sim_is_changed_n1, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_is_changed_n2", utc_telephony_telephony_sim_is_changed_n2, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_state_p", utc_telephony_telephony_sim_get_state_p, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_state_n1", utc_telephony_telephony_sim_get_state_n1, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_state_n2", utc_telephony_telephony_sim_get_state_n2, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_subscriber_number_p", utc_telephony_telephony_sim_get_subscriber_number_p, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_subscriber_number_n1", utc_telephony_telephony_sim_get_subscriber_number_n1, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_sim_get_subscriber_number_n2", utc_telephony_telephony_sim_get_subscriber_number_n2, utc_telephony_sim_startup, utc_telephony_sim_cleanup},
+    {"utc_telephony_telephony_modem_get_imei_p", utc_telephony_telephony_modem_get_imei_p, utc_telephony_modem_startup, utc_telephony_modem_cleanup},
+    {"utc_telephony_telephony_modem_get_imei_n1", utc_telephony_telephony_modem_get_imei_n1, utc_telephony_modem_startup, utc_telephony_modem_cleanup},
+    {"utc_telephony_telephony_modem_get_imei_n2", utc_telephony_telephony_modem_get_imei_n2, utc_telephony_modem_startup, utc_telephony_modem_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_TELEPHONY_CORE_H__
diff --git a/src/utc/telephony/utc-call.c b/src/utc/telephony/utc-call.c
new file mode 100755 (executable)
index 0000000..3f57265
--- /dev/null
@@ -0,0 +1,132 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <telephony.h>
+#include <system_info.h>
+
+//& set: Telephony
+
+static bool g_telephony_call_supported = true;
+static telephony_handle_list_s handle_list;
+static telephony_h telephony_handle = NULL;
+
+
+void utc_telephony_call_startup(void)
+{
+    system_info_get_platform_bool("tizen.org/feature/network.telephony", &g_telephony_call_supported);
+    if(g_telephony_call_supported){
+        if(telephony_init(&handle_list) == TELEPHONY_ERROR_NONE && handle_list.count > 0)
+            telephony_handle = handle_list.handle[0];
+    }
+}
+
+void utc_telephony_call_cleanup(void)
+{
+    if(g_telephony_call_supported) {
+        telephony_deinit(&handle_list);
+        telephony_handle = NULL;
+    }
+}
+
+int utc_telephony_telephony_call_get_voice_call_state_p(void)
+{
+       telephony_call_state_e call_state;
+       int ret;
+    if(g_telephony_call_supported == false) {
+       ret = telephony_call_get_voice_call_state(telephony_handle, &call_state);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_call_get_voice_call_state(telephony_handle, &call_state);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_call_get_voice_call_state_n1(void)
+{
+       telephony_call_state_e call_state;
+       int ret;
+    if(g_telephony_call_supported == false) {
+       ret = telephony_call_get_voice_call_state(NULL, &call_state);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_call_get_voice_call_state(NULL, &call_state);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_call_get_voice_call_state_n2(void)
+{
+       int ret;
+    if(g_telephony_call_supported == false) {
+       ret = telephony_call_get_voice_call_state(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_call_get_voice_call_state(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_call_get_video_call_state_p(void)
+{
+       telephony_call_state_e call_state;
+       int ret;
+    if(g_telephony_call_supported == false) {
+       ret = telephony_call_get_video_call_state(telephony_handle, &call_state);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_call_get_video_call_state(telephony_handle, &call_state);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_call_get_video_call_state_n1(void)
+{
+       telephony_call_state_e call_state;
+       int ret;
+    if(g_telephony_call_supported == false) {
+       ret = telephony_call_get_video_call_state(NULL, &call_state);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_call_get_video_call_state(NULL, &call_state);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_call_get_video_call_state_n2(void)
+{
+       int ret;
+    if(g_telephony_call_supported == false) {
+       ret = telephony_call_get_video_call_state(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_call_get_video_call_state(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
diff --git a/src/utc/telephony/utc-common.c b/src/utc/telephony/utc-common.c
new file mode 100755 (executable)
index 0000000..ffb19c6
--- /dev/null
@@ -0,0 +1,197 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <telephony.h>
+#include <system_info.h>
+
+static bool g_telephony_common_supported = true;
+static telephony_handle_list_s handle_list;
+static telephony_h telephony_handle = NULL;
+
+
+static void _noti_cb(telephony_h handle, telephony_noti_e noti_id, void *data, void *user_data)
+{
+}
+
+void utc_telephony_common_startup(void)
+{
+    system_info_get_platform_bool("tizen.org/feature/network.telephony", &g_telephony_common_supported);
+    if(g_telephony_common_supported){
+        if(telephony_init(&handle_list) == TELEPHONY_ERROR_NONE && handle_list.count > 0)
+            telephony_handle = handle_list.handle[0];
+    }
+}
+
+void utc_telephony_common_cleanup(void)
+{
+    if(g_telephony_common_supported) {
+        telephony_deinit(&handle_list);
+        telephony_handle = NULL;
+    }
+}
+
+int utc_telephony_telephony_init_p(void)
+{
+       int ret;
+       telephony_handle_list_s handle_list2;
+    if(g_telephony_common_supported == false) {
+       ret = telephony_init(&handle_list2);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_init(&handle_list2);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+
+       ret = telephony_deinit(&handle_list2);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_init_n(void)
+{
+       int ret;
+    if(g_telephony_common_supported == false) {
+       ret = telephony_init(NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_init(NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_deinit_p(void)
+{
+       int ret;
+       telephony_handle_list_s handle_list2;
+    if(g_telephony_common_supported == false) {
+       ret = telephony_deinit(NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_init(&handle_list2);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+
+       ret = telephony_deinit(&handle_list2);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_deinit_n(void)
+{
+       int ret;
+    if(g_telephony_common_supported == false) {
+       ret = telephony_deinit(NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_deinit(NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_set_noti_cb_p(void)
+{
+       int ret;
+    if(g_telephony_common_supported == false) {
+       ret = telephony_set_noti_cb(telephony_handle, TELEPHONY_NOTI_SIM_STATUS, _noti_cb, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_set_noti_cb(telephony_handle, TELEPHONY_NOTI_SIM_STATUS, _noti_cb, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_set_noti_cb_n1(void)
+{
+       int ret;
+    if(g_telephony_common_supported == false) {
+       ret = telephony_set_noti_cb(NULL, TELEPHONY_NOTI_SIM_STATUS, _noti_cb, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_set_noti_cb(NULL, TELEPHONY_NOTI_SIM_STATUS, _noti_cb, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_set_noti_cb_n2(void)
+{
+       int ret;
+    if(g_telephony_common_supported == false) {
+       ret = telephony_set_noti_cb(NULL, -1, _noti_cb, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_set_noti_cb(NULL, -1, _noti_cb, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_unset_noti_cb_p(void)
+{
+       int ret;
+    if(g_telephony_common_supported == false) {
+       ret = telephony_unset_noti_cb(telephony_handle, TELEPHONY_NOTI_SIM_STATUS);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_set_noti_cb(telephony_handle, TELEPHONY_NOTI_SIM_STATUS, _noti_cb, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+
+       ret = telephony_unset_noti_cb(telephony_handle, TELEPHONY_NOTI_SIM_STATUS);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_unset_noti_cb_n1(void)
+{
+       int ret;
+    if(g_telephony_common_supported == false) {
+       ret = telephony_unset_noti_cb(NULL, TELEPHONY_NOTI_SIM_STATUS);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_unset_noti_cb(NULL, TELEPHONY_NOTI_SIM_STATUS);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_unset_noti_cb_n2(void)
+{
+    int ret;
+    if(g_telephony_common_supported == false) {
+       ret = telephony_unset_noti_cb(telephony_handle, -1);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+       ret = telephony_unset_noti_cb(telephony_handle, -1);
+
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
diff --git a/src/utc/telephony/utc-modem.c b/src/utc/telephony/utc-modem.c
new file mode 100755 (executable)
index 0000000..a7f83e3
--- /dev/null
@@ -0,0 +1,88 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <telephony.h>
+#include <system_info.h>
+
+//& set: Telephony
+
+static bool g_telephony_modem_supported = true;
+static telephony_handle_list_s handle_list;
+static telephony_h telephony_handle = NULL;
+
+void utc_telephony_modem_startup(void)
+{
+    system_info_get_platform_bool("tizen.org/feature/network.telephony", &g_telephony_modem_supported);
+    if(g_telephony_modem_supported){
+        if(telephony_init(&handle_list) == TELEPHONY_ERROR_NONE && handle_list.count > 0)
+            telephony_handle = handle_list.handle[0];
+    }
+}
+
+void utc_telephony_modem_cleanup(void)
+{
+    if(g_telephony_modem_supported) {
+        telephony_deinit(&handle_list);
+        telephony_handle = NULL;
+    }
+
+}
+
+int utc_telephony_telephony_modem_get_imei_p(void)
+{
+       char *imei = NULL;
+       int ret;
+    if(g_telephony_modem_supported == false) {
+       ret = telephony_modem_get_imei(telephony_handle, &imei);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_modem_get_imei(telephony_handle, &imei);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       free(imei);
+       return 0;
+}
+
+int utc_telephony_telephony_modem_get_imei_n1(void)
+{
+       char *imei = NULL;
+       int ret;
+    if(g_telephony_modem_supported == false) {
+       ret = telephony_modem_get_imei(NULL, &imei);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_modem_get_imei(NULL, &imei);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_modem_get_imei_n2(void)
+{
+       int ret;
+    if(g_telephony_modem_supported == false) {
+       ret = telephony_modem_get_imei(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_modem_get_imei(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
diff --git a/src/utc/telephony/utc-network.c b/src/utc/telephony/utc-network.c
new file mode 100755 (executable)
index 0000000..9a78ffb
--- /dev/null
@@ -0,0 +1,445 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <telephony.h>
+#include <system_info.h>
+
+//& set: Telephony
+
+static bool g_telephony_network_supported = true;
+static telephony_handle_list_s handle_list;
+static telephony_h telephony_handle = NULL;
+
+void utc_telephony_network_startup(void)
+{
+    system_info_get_platform_bool("tizen.org/feature/network.telephony", &g_telephony_network_supported);
+    if(g_telephony_network_supported){
+        if(telephony_init(&handle_list) == TELEPHONY_ERROR_NONE && handle_list.count > 0)
+            telephony_handle = handle_list.handle[0];
+    }
+}
+
+void utc_telephony_network_cleanup(void)
+{
+    if(g_telephony_network_supported) {
+        telephony_deinit(&handle_list);
+        telephony_handle = NULL;
+    }
+}
+
+int utc_telephony_telephony_network_get_lac_p(void)
+{
+       int lac, ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_lac(telephony_handle, &lac);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_network_get_lac(telephony_handle, &lac);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_lac_n1(void)
+{
+       int lac, ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_lac(NULL, &lac);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_lac(NULL, &lac);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_lac_n2(void)
+{
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_lac(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_lac(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_cell_id_p(void)
+{
+       int cell_id, ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_cell_id(telephony_handle, &cell_id);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_network_get_cell_id(telephony_handle, &cell_id);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_cell_id_n1(void)
+{
+       int cell_id, ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_cell_id(NULL, &cell_id);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_cell_id(NULL, &cell_id);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_cell_id_n2(void)
+{
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_cell_id(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_cell_id(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_rssi_p(void)
+{
+       telephony_network_rssi_e rssi;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_rssi(telephony_handle, &rssi);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_network_get_rssi(telephony_handle, &rssi);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_rssi_n1(void)
+{
+       telephony_network_rssi_e rssi;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_rssi(NULL, &rssi);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_rssi(NULL, &rssi);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_rssi_n2(void)
+{
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_rssi(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_rssi(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_roaming_status_p(void)
+{
+       bool roaming_status;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_roaming_status(telephony_handle, &roaming_status);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_network_get_roaming_status(telephony_handle, &roaming_status);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_roaming_status_n1(void)
+{
+       bool roaming_status;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_roaming_status(NULL, &roaming_status);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_roaming_status(NULL, &roaming_status);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_roaming_status_n2(void)
+{
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_roaming_status(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_roaming_status(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_mcc_p(void)
+{
+       char *mcc = NULL;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_mcc(telephony_handle, &mcc);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_network_get_mcc(telephony_handle, &mcc);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       free(mcc);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_mcc_n1(void)
+{
+       char *mcc = NULL;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_mcc(NULL, &mcc);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_mcc(NULL, &mcc);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_mcc_n2(void)
+{
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_mcc(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_mcc(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_mnc_p(void)
+{
+       char *mnc = NULL;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_mnc(telephony_handle, &mnc);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_network_get_mnc(telephony_handle, &mnc);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       free(mnc);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_mnc_n1(void)
+{
+       char *mnc = NULL;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_mnc(NULL, &mnc);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_mnc(NULL, &mnc);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_mnc_n2(void)
+{
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_mnc(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_mnc(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_network_name_p(void)
+{
+       char *network_name = NULL;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_network_name(telephony_handle, &network_name);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_network_get_network_name(telephony_handle, &network_name);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       free(network_name);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_network_name_n1(void)
+{
+       char *network_name = NULL;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_network_name(NULL, &network_name);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_network_name(NULL, &network_name);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_network_name_n2(void)
+{
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_network_name(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_network_name(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_type_p(void)
+{
+       telephony_network_type_e network_type;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_type(telephony_handle, &network_type);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_network_get_type(telephony_handle, &network_type);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_type_n1(void)
+{
+       telephony_network_type_e network_type;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_type(NULL, &network_type);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_type(NULL, &network_type);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_type_n2(void)
+{
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_type(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_type(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_service_state_p(void)
+{
+       telephony_network_service_state_e service_state;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_service_state(telephony_handle, &service_state);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_network_get_service_state(telephony_handle, &service_state);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_service_state_n1(void)
+{
+       telephony_network_service_state_e service_state;
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_service_state(NULL, &service_state);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_service_state(NULL, &service_state);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_network_get_service_state_n2(void)
+{
+       int ret;
+    if(g_telephony_network_supported == false) {
+       ret = telephony_network_get_service_state(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_network_get_service_state(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
diff --git a/src/utc/telephony/utc-sim.c b/src/utc/telephony/utc-sim.c
new file mode 100755 (executable)
index 0000000..a152c03
--- /dev/null
@@ -0,0 +1,392 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <telephony.h>
+#include <system_info.h>
+
+//& set: Telephony
+
+static bool g_telephony_sim_supported = true;
+static telephony_handle_list_s handle_list;
+static telephony_h telephony_handle = NULL;
+
+void utc_telephony_sim_startup(void)
+{
+    system_info_get_platform_bool("tizen.org/feature/network.telephony", &g_telephony_sim_supported);
+    if(g_telephony_sim_supported){
+        if(telephony_init(&handle_list) == TELEPHONY_ERROR_NONE && handle_list.count > 0)
+            telephony_handle = handle_list.handle[0];
+    }
+}
+
+void utc_telephony_sim_cleanup(void)
+{
+    if(g_telephony_sim_supported) {
+        telephony_deinit(&handle_list);
+        telephony_handle = NULL;
+    }
+}
+
+int utc_telephony_telephony_sim_get_icc_id_p(void)
+{
+       char *icc_id = NULL;
+       int ret;
+       telephony_sim_state_e sim_state;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_icc_id(telephony_handle, &icc_id);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_sim_get_state(telephony_handle, &sim_state);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       assert_eq(sim_state, TELEPHONY_SIM_STATE_AVAILABLE);
+
+       ret = telephony_sim_get_icc_id(telephony_handle, &icc_id);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       free(icc_id);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_icc_id_n1(void)
+{
+       char *icc_id = NULL;
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_icc_id(NULL, &icc_id);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_icc_id(NULL, &icc_id);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_icc_id_n2(void)
+{
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_icc_id(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_icc_id(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_operator_p(void)
+{
+       char *operator_name = NULL;
+       int ret;
+       telephony_sim_state_e sim_state;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_operator(telephony_handle, &operator_name);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_sim_get_state(telephony_handle, &sim_state);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       assert_eq(sim_state, TELEPHONY_SIM_STATE_AVAILABLE);
+
+       ret = telephony_sim_get_operator(telephony_handle, &operator_name);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       free(operator_name);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_operator_n1(void)
+{
+       char *operator_name = NULL;
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_operator(NULL, &operator_name);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_operator(NULL, &operator_name);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_operator_n2(void)
+{
+       int ret;
+
+    if(g_telephony_sim_supported == false) {
+        ret = telephony_sim_get_operator(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_operator(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_msin_p(void)
+{
+       char *msin = NULL;
+       int ret;
+       telephony_sim_state_e sim_state;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_msin(telephony_handle, &msin);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_sim_get_state(telephony_handle, &sim_state);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       assert_eq(sim_state, TELEPHONY_SIM_STATE_AVAILABLE);
+
+       ret = telephony_sim_get_msin(telephony_handle, &msin);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       free(msin);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_msin_n1(void)
+{
+       char *msin = NULL;
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_msin(NULL, &msin);
+       assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_msin(NULL, &msin);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_msin_n2(void)
+{
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_msin(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_msin(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_spn_p(void)
+{
+       char *spn = NULL;
+       int ret;
+       telephony_sim_state_e sim_state;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_spn(telephony_handle, &spn);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_sim_get_state(telephony_handle, &sim_state);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       assert_eq(sim_state, TELEPHONY_SIM_STATE_AVAILABLE);
+
+       ret = telephony_sim_get_spn(telephony_handle, &spn);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       free(spn);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_spn_n1(void)
+{
+       char *spn = NULL;
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_spn(NULL, &spn);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_spn(NULL, &spn);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_spn_n2(void)
+{
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_spn(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_spn(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_is_changed_p(void)
+{
+       bool changed;
+       int ret;
+       telephony_sim_state_e sim_state;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_is_changed(telephony_handle, &changed);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_sim_get_state(telephony_handle, &sim_state);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       assert_eq(sim_state, TELEPHONY_SIM_STATE_AVAILABLE);
+
+       ret = telephony_sim_is_changed(telephony_handle, &changed);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_is_changed_n1(void)
+{
+       bool changed;
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_is_changed(NULL, &changed);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_is_changed(NULL, &changed);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_is_changed_n2(void)
+{
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_is_changed(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_is_changed(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_state_p(void)
+{
+       telephony_sim_state_e sim_state;
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_state(telephony_handle, &sim_state);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_sim_get_state(telephony_handle, &sim_state);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_state_n1(void)
+{
+       telephony_sim_state_e sim_state;
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_state(NULL, &sim_state);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_state(NULL, &sim_state);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_state_n2(void)
+{
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_state(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_state(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_subscriber_number_p(void)
+{
+       char *subscriber_name = NULL;
+       int ret;
+       telephony_sim_state_e sim_state;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_subscriber_number(telephony_handle, &subscriber_name);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert(telephony_handle);
+       ret = telephony_sim_get_state(telephony_handle, &sim_state);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       assert_eq(sim_state, TELEPHONY_SIM_STATE_AVAILABLE);
+
+       ret = telephony_sim_get_subscriber_number(telephony_handle, &subscriber_name);
+       assert_eq(ret, TELEPHONY_ERROR_NONE);
+       free(subscriber_name);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_subscriber_number_n1(void)
+{
+       char *subscriber_name = NULL;
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_subscriber_number(NULL, &subscriber_name);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_subscriber_number(NULL, &subscriber_name);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
+
+int utc_telephony_telephony_sim_get_subscriber_number_n2(void)
+{
+       int ret;
+    if(g_telephony_sim_supported == false) {
+       ret = telephony_sim_get_subscriber_number(telephony_handle, NULL);
+        assert_eq(ret, TELEPHONY_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = telephony_sim_get_subscriber_number(telephony_handle, NULL);
+       assert_eq(ret, TELEPHONY_ERROR_INVALID_PARAMETER);
+       return 0;
+}
diff --git a/src/utc/tone-player/CMakeLists.txt b/src/utc/tone-player/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..79c186f
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "tone-player")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-media-tone-player")
+SET(TC_SOURCES
+       utc-tone-player.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/tone-player/public.list b/src/utc/tone-player/public.list
new file mode 100755 (executable)
index 0000000..734d6f3
--- /dev/null
@@ -0,0 +1,2 @@
+tone_player_start
+tone_player_stop
\ No newline at end of file
diff --git a/src/utc/tone-player/tct-tone-player-core.c b/src/utc/tone-player/tct-tone-player-core.c
new file mode 100755 (executable)
index 0000000..5e6dd28
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-tone-player-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/tone-player/tct-tone-player-core.h b/src/utc/tone-player/tct-tone-player-core.h
new file mode 100755 (executable)
index 0000000..a698b66
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_TONE_PLAYER_CORE_H__
+#define __TCT_TONE_PLAYER_CORE_H__
+
+#include "testcase.h"
+
+
+extern int utc_tone_player_start_p(void);
+extern int utc_tone_player_start_n(void);
+extern int utc_tone_player_stop_p(void);
+extern int utc_tone_player_stop_n(void);
+
+testcase tc_array[] = {
+    {"utc_tone_player_start_p", utc_tone_player_start_p, NULL, NULL},
+    {"utc_tone_player_start_n", utc_tone_player_start_n, NULL, NULL},
+    {"utc_tone_player_stop_p", utc_tone_player_stop_p, NULL, NULL},
+    {"utc_tone_player_stop_n", utc_tone_player_stop_n, NULL, NULL},
+    {NULL, NULL}
+};
+
+#endif // __TCT_TONE_PLAYER_CORE_H__
diff --git a/src/utc/tone-player/utc-tone-player.c b/src/utc/tone-player/utc-tone-player.c
new file mode 100755 (executable)
index 0000000..ee5cd5c
--- /dev/null
@@ -0,0 +1,57 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <tone_player.h>
+
+#include "assert.h"
+
+//& set: Tone-player
+#define DURATION 1000
+
+int utc_tone_player_start_p(void)
+{
+    int ret = TONE_PLAYER_ERROR_INVALID_PARAMETER;
+    ret = tone_player_start(TONE_TYPE_DEFAULT, SOUND_TYPE_MEDIA, DURATION, NULL);
+    assert_eq(ret, TONE_PLAYER_ERROR_NONE);
+    return 0;
+}
+
+int utc_tone_player_start_n(void)
+{
+    int ret = TONE_PLAYER_ERROR_NONE;
+    ret = tone_player_start(-1, SOUND_TYPE_MEDIA , DURATION, NULL);
+    assert_eq(ret, TONE_PLAYER_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
+int utc_tone_player_stop_p(void)
+{
+    int ret = TONE_PLAYER_ERROR_INVALID_PARAMETER;
+    int id;
+    tone_player_start(TONE_TYPE_DEFAULT, SOUND_TYPE_MEDIA, DURATION, &id);
+    ret = tone_player_stop(id);
+    assert_eq(ret, TONE_PLAYER_ERROR_NONE);
+    return 0;
+}
+
+int utc_tone_player_stop_n(void)
+{
+    int ret = TONE_PLAYER_ERROR_NONE;
+    int id = -1;
+    ret = tone_player_stop(id);
+    assert_eq(ret, TONE_PLAYER_ERROR_INVALID_PARAMETER);
+    return 0;
+}
+
diff --git a/src/utc/tts/CMakeLists.txt b/src/utc/tts/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..07da0f9
--- /dev/null
@@ -0,0 +1,35 @@
+SET(PKG_NAME "tts")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "tts")
+SET(TC_SOURCES
+       utc-tts.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       ecore
+       elementary
+       capi-system-info
+       glib-2.0
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/src/utc/tts/public.list b/src/utc/tts/public.list
new file mode 100755 (executable)
index 0000000..9281c05
--- /dev/null
@@ -0,0 +1,26 @@
+tts_create
+tts_destroy
+tts_set_mode
+tts_get_mode
+tts_prepare
+tts_unprepare
+tts_foreach_supported_voices
+tts_get_default_voice
+tts_get_max_text_size
+tts_get_state
+tts_get_speed_range
+tts_add_text
+tts_play
+tts_stop
+tts_pause
+tts_set_state_changed_cb
+tts_unset_state_changed_cb
+tts_set_utterance_started_cb
+tts_unset_utterance_started_cb
+tts_set_utterance_completed_cb
+tts_unset_utterance_completed_cb
+tts_set_error_cb
+tts_unset_error_cb
+tts_set_default_voice_changed_cb
+tts_unset_default_voice_changed_cb
+
diff --git a/src/utc/tts/tct-tts-core.c b/src/utc/tts/tct-tts-core.c
new file mode 100755 (executable)
index 0000000..28df587
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-tts-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/tts/tct-tts-core.h b/src/utc/tts/tct-tts-core.h
new file mode 100755 (executable)
index 0000000..f1f6e5e
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_TTS_CORE_H__
+#define __TCT_TTS_CORE_H__
+
+#include "testcase.h"
+
+extern void startup(void);
+extern void cleanup(void);
+
+extern int utc_tts_create_p(void);
+extern int utc_tts_create_n(void);
+extern int utc_tts_destroy_p(void);
+extern int utc_tts_destroy_n(void);
+extern int utc_tts_set_mode_p(void);
+extern int utc_tts_set_mode_n(void);
+extern int utc_tts_get_mode_p(void);
+extern int utc_tts_get_mode_n(void);
+extern int utc_tts_get_speed_range_p(void);
+extern int utc_tts_get_speed_range_n(void);
+extern int utc_tts_prepare_p(void);
+extern int utc_tts_prepare_n(void);
+extern int utc_tts_foreach_supported_voices_p(void);
+extern int utc_tts_foreach_supported_voices_n(void);
+extern int utc_tts_get_default_voice_p(void);
+extern int utc_tts_get_default_voice_n(void);
+extern int utc_tts_get_max_text_size_p(void);
+extern int utc_tts_get_max_text_size_n(void);
+extern int utc_tts_get_state_p(void);
+extern int utc_tts_get_state_n(void);
+extern int utc_tts_add_text_p(void);
+extern int utc_tts_add_text_n(void);
+extern int utc_tts_play_p(void);
+extern int utc_tts_play_n(void);
+extern int utc_tts_pause_p(void);
+extern int utc_tts_pause_n(void);
+extern int utc_tts_stop_p(void);
+extern int utc_tts_stop_n(void);
+extern int utc_tts_unprepare_p(void);
+extern int utc_tts_unprepare_n(void);
+extern int utc_tts_set_state_changed_cb_p(void);
+extern int utc_tts_set_state_changed_cb_n(void);
+extern int utc_tts_unset_state_changed_cb_p(void);
+extern int utc_tts_unset_state_changed_cb_n(void);
+extern int utc_tts_set_utterance_started_cb_p(void);
+extern int utc_tts_set_utterance_started_cb_n(void);
+extern int utc_tts_unset_utterance_started_cb_p(void);
+extern int utc_tts_unset_utterance_started_cb_n(void);
+extern int utc_tts_set_utterance_completed_cb_p(void);
+extern int utc_tts_set_utterance_completed_cb_n(void);
+extern int utc_tts_unset_utterance_completed_cb_p(void);
+extern int utc_tts_unset_utterance_completed_cb_n(void);
+extern int utc_tts_set_error_cb_p(void);
+extern int utc_tts_set_error_cb_n(void);
+extern int utc_tts_unset_error_cb_p(void);
+extern int utc_tts_unset_error_cb_n(void);
+extern int utc_tts_set_default_voice_changed_cb_p(void);
+extern int utc_tts_set_default_voice_changed_cb_n(void);
+extern int utc_tts_unset_default_voice_changed_cb_p(void);
+extern int utc_tts_unset_default_voice_changed_cb_n(void);
+
+testcase tc_array[] = {
+    {"utc_tts_create_p", utc_tts_create_p, startup, cleanup},
+    {"utc_tts_create_n", utc_tts_create_n, startup, cleanup},
+    {"utc_tts_destroy_p", utc_tts_destroy_p, startup, cleanup},
+    {"utc_tts_destroy_n", utc_tts_destroy_n, startup, cleanup},
+    {"utc_tts_set_mode_p", utc_tts_set_mode_p, startup, cleanup},
+    {"utc_tts_set_mode_n", utc_tts_set_mode_n, startup, cleanup},
+    {"utc_tts_get_mode_p", utc_tts_get_mode_p, startup, cleanup},
+    {"utc_tts_get_mode_n", utc_tts_get_mode_n, startup, cleanup},
+    {"utc_tts_get_speed_range_p", utc_tts_get_speed_range_p, startup, cleanup},
+    {"utc_tts_get_speed_range_n", utc_tts_get_speed_range_n, startup, cleanup},
+    {"utc_tts_prepare_p", utc_tts_prepare_p, startup, cleanup},
+    {"utc_tts_prepare_n", utc_tts_prepare_n, startup, cleanup},
+    {"utc_tts_foreach_supported_voices_p", utc_tts_foreach_supported_voices_p, startup, cleanup},
+    {"utc_tts_foreach_supported_voices_n", utc_tts_foreach_supported_voices_n, startup, cleanup},
+    {"utc_tts_get_default_voice_p", utc_tts_get_default_voice_p, startup, cleanup},
+    {"utc_tts_get_default_voice_n", utc_tts_get_default_voice_n, startup, cleanup},
+    {"utc_tts_get_max_text_size_p", utc_tts_get_max_text_size_p, startup, cleanup},
+    {"utc_tts_get_max_text_size_n", utc_tts_get_max_text_size_n, startup, cleanup},
+    {"utc_tts_get_state_p", utc_tts_get_state_p, startup, cleanup},
+    {"utc_tts_get_state_n", utc_tts_get_state_n, startup, cleanup},
+    {"utc_tts_add_text_p", utc_tts_add_text_p, startup, cleanup},
+    {"utc_tts_add_text_n", utc_tts_add_text_n, startup, cleanup},
+    {"utc_tts_play_p", utc_tts_play_p, startup, cleanup},
+    {"utc_tts_play_n", utc_tts_play_n, startup, cleanup},
+    {"utc_tts_pause_p", utc_tts_pause_p, startup, cleanup},
+    {"utc_tts_pause_n", utc_tts_pause_n, startup, cleanup},
+    {"utc_tts_stop_p", utc_tts_stop_p, startup, cleanup},
+    {"utc_tts_stop_n", utc_tts_stop_n, startup, cleanup},
+    {"utc_tts_unprepare_p", utc_tts_unprepare_p, startup, cleanup},
+    {"utc_tts_unprepare_n", utc_tts_unprepare_n, startup, cleanup},
+    {"utc_tts_set_state_changed_cb_p", utc_tts_set_state_changed_cb_p, startup, cleanup},
+    {"utc_tts_set_state_changed_cb_n", utc_tts_set_state_changed_cb_n, startup, cleanup},
+    {"utc_tts_unset_state_changed_cb_p", utc_tts_unset_state_changed_cb_p, startup, cleanup},
+    {"utc_tts_unset_state_changed_cb_n", utc_tts_unset_state_changed_cb_n, startup, cleanup},
+    {"utc_tts_set_utterance_started_cb_p", utc_tts_set_utterance_started_cb_p, startup, cleanup},
+    {"utc_tts_set_utterance_started_cb_n", utc_tts_set_utterance_started_cb_n, startup, cleanup},
+    {"utc_tts_unset_utterance_started_cb_p", utc_tts_unset_utterance_started_cb_p, startup, cleanup},
+    {"utc_tts_unset_utterance_started_cb_n", utc_tts_unset_utterance_started_cb_n, startup, cleanup},
+    {"utc_tts_set_utterance_completed_cb_p", utc_tts_set_utterance_completed_cb_p, startup, cleanup},
+    {"utc_tts_set_utterance_completed_cb_n", utc_tts_set_utterance_completed_cb_n, startup, cleanup},
+    {"utc_tts_unset_utterance_completed_cb_p", utc_tts_unset_utterance_completed_cb_p, startup, cleanup},
+    {"utc_tts_unset_utterance_completed_cb_n", utc_tts_unset_utterance_completed_cb_n, startup, cleanup},
+    {"utc_tts_set_error_cb_p", utc_tts_set_error_cb_p, startup, cleanup},
+    {"utc_tts_set_error_cb_n", utc_tts_set_error_cb_n, startup, cleanup},
+    {"utc_tts_unset_error_cb_p", utc_tts_unset_error_cb_p, startup, cleanup},
+    {"utc_tts_unset_error_cb_n", utc_tts_unset_error_cb_n, startup, cleanup},
+    {"utc_tts_set_default_voice_changed_cb_p", utc_tts_set_default_voice_changed_cb_p, startup, cleanup},
+    {"utc_tts_set_default_voice_changed_cb_n", utc_tts_set_default_voice_changed_cb_n, startup, cleanup},
+    {"utc_tts_unset_default_voice_changed_cb_p", utc_tts_unset_default_voice_changed_cb_p, startup, cleanup},
+    {"utc_tts_unset_default_voice_changed_cb_n", utc_tts_unset_default_voice_changed_cb_n, startup, cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_TTS_CORE_H__
diff --git a/src/utc/tts/utc-tts.c b/src/utc/tts/utc-tts.c
new file mode 100755 (executable)
index 0000000..4fd6bca
--- /dev/null
@@ -0,0 +1,973 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <tts.h>
+#include <stdlib.h>
+#include <Ecore.h>
+
+//& set: TTS
+
+tts_h g_tts = NULL;
+static char *g_language = NULL;
+static int g_voice_type;
+static tts_state_e g_current_state;
+static int is_created_hndl = -1;
+static void __tts_state_changed_cb(tts_h tts, tts_state_e previous, tts_state_e current, void* user_data);
+bool g_supported = false;
+static tts_state_e g_current_state;
+
+void startup(void)
+{
+    system_info_get_platform_bool("http://tizen.org/feature/speech.synthesis",&g_supported);
+    elm_init(0,NULL);
+    /* start of TC */
+    int ret = tts_create(&g_tts);
+    is_created_hndl = ret;
+
+    if(g_supported == false){
+         g_tts = NULL;
+         return;
+    }
+
+    tts_set_state_changed_cb(g_tts, __tts_state_changed_cb, NULL);
+    tts_get_default_voice(g_tts, &g_language, &g_voice_type);
+}
+
+void cleanup(void)
+{
+    /* end of TC */
+    elm_shutdown();
+    free (g_language);
+    g_language = NULL;
+
+    tts_destroy(g_tts);
+    g_tts = NULL;
+    is_created_hndl = -1;
+}
+
+static bool __tts_supported_voice_cb(tts_h tts, const char* language, int voice_type, void* user_data)
+{
+    return true;
+}
+static void __tts_state_changed_cb(tts_h tts, tts_state_e previous, tts_state_e current, void* user_data)
+{
+    g_current_state = current;
+}
+static void __tts_utterance_started_cb(tts_h tts, int utt_id, void* user_data)
+{
+}
+static void __tts_utterance_completed_cb(tts_h tts, int utt_id, void *user_data)
+{
+}
+
+static void __tts_error_cb(tts_h tts, int utt_id, tts_error_e reason, void* user_data)
+{
+}
+
+static void __tts_default_voice_changed_cb(tts_h tts, const char* previous_language, int previous_voice_type, const char* current_language, int current_voice_type, void* user_data)
+{
+}
+
+int utc_tts_create_p(void)
+{
+    if(g_supported == false){
+        assert_eq(is_created_hndl, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_create_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_create(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_create(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+
+}
+
+int utc_tts_destroy_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_destroy(g_tts);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_destroy(g_tts);
+    g_tts = NULL;
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_destroy_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_destroy(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_destroy(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+
+}
+
+int utc_tts_set_mode_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_mode(g_tts, TTS_MODE_DEFAULT);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_set_mode(g_tts, TTS_MODE_DEFAULT);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_set_mode_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_mode(NULL, TTS_MODE_DEFAULT);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_set_mode(NULL, TTS_MODE_DEFAULT);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_get_mode_p(void)
+{
+    tts_mode_e mode;
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_get_mode(g_tts, &mode);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_get_mode(g_tts, &mode);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_get_mode_n(void)
+{
+    tts_mode_e mode;
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_get_mode(NULL, &mode);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_get_mode(NULL, &mode);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_get_speed_range_p(void)
+{
+       int min;
+       int normal;
+       int max;
+       int ret = TTS_ERROR_NONE;
+
+    if(g_supported == false){
+       ret = tts_get_speed_range(g_tts, &min, &normal, &max);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       assert_eq(is_created_hndl, TTS_ERROR_NONE);
+       ret = tts_get_speed_range(g_tts, &min, &normal, &max);
+       assert_eq(ret, TTS_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_tts_get_speed_range_n(void)
+{
+       int min;
+       int normal;
+       int max;
+       int ret = TTS_ERROR_NONE;
+
+    if(g_supported == false){
+       ret = tts_get_speed_range(NULL, &min, &normal, &max);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = tts_get_speed_range(NULL, &min, &normal, &max);
+       assert_neq(ret, TTS_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_tts_prepare_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_prepare(g_tts);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_prepare(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    while(TTS_STATE_READY!=g_current_state){
+       ecore_main_loop_iterate();
+    }
+
+    tts_unprepare(g_tts);
+
+    return 0;
+}
+
+int utc_tts_prepare_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_prepare(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_prepare(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_tts_foreach_supported_voices_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_foreach_supported_voices(g_tts, __tts_supported_voice_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_foreach_supported_voices(g_tts, __tts_supported_voice_cb, NULL);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_foreach_supported_voices_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_foreach_supported_voices(NULL, __tts_supported_voice_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_foreach_supported_voices(NULL, __tts_supported_voice_cb, NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_get_default_voice_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_get_default_voice(g_tts, &g_language, &g_voice_type);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    free (g_language);
+    g_language = NULL;
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_get_default_voice(g_tts, &g_language, &g_voice_type);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_get_default_voice_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_get_default_voice(NULL, &g_language, &g_voice_type);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    free (g_language);
+    g_language = NULL;
+    ret = tts_get_default_voice(NULL, &g_language, &g_voice_type);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_get_max_text_size_p(void)
+{
+    unsigned int size;
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_get_max_text_size(g_tts, &size);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_prepare(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    while(TTS_STATE_READY!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    ret = tts_get_max_text_size(g_tts, &size);
+    tts_unprepare(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_get_max_text_size_n(void)
+{
+    unsigned int size;
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_get_max_text_size(NULL, &size);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_get_max_text_size(NULL, &size);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_get_state_p(void)
+{
+    tts_state_e state;
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_get_state(g_tts, &state);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_get_state(g_tts, &state);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_get_state_n(void)
+{
+    tts_state_e state;
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_get_state(NULL, &state);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_get_state(NULL, &state);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_add_text_p(void)
+{
+    int utt_id;
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_add_text(g_tts, "1 2 3", g_language, g_voice_type, TTS_SPEED_AUTO, &utt_id);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    tts_prepare(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    while(TTS_STATE_READY!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    ret = tts_add_text(g_tts, "1 2 3", g_language, g_voice_type, TTS_SPEED_AUTO, &utt_id);
+    tts_unprepare(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_add_text_n(void)
+{
+    int utt_id;
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_add_text(NULL, "1 2 3", g_language, g_voice_type, TTS_SPEED_AUTO, &utt_id);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_add_text(NULL, "1 2 3", g_language, g_voice_type, TTS_SPEED_AUTO, &utt_id);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_play_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_play(g_tts);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    tts_prepare(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    while(TTS_STATE_READY!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    ret = tts_play(g_tts);
+
+    while(TTS_STATE_PLAYING!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    tts_stop(g_tts);
+
+    while(TTS_STATE_READY!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    tts_unprepare(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_play_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_play(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_play(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+
+int utc_tts_pause_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_pause(g_tts);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    tts_prepare(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    while(TTS_STATE_READY!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    ret = tts_play(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    while(TTS_STATE_PLAYING!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    ret = tts_pause(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    while(TTS_STATE_PAUSED!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    tts_stop(g_tts);
+
+    while(TTS_STATE_READY!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    tts_unprepare(g_tts);
+
+    return 0;
+}
+
+int utc_tts_pause_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_pause(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_pause(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_stop_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_stop(g_tts);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    tts_prepare(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    while(TTS_STATE_READY!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    ret = tts_play(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    while(TTS_STATE_PLAYING!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    ret = tts_stop(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    while(TTS_STATE_READY!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    tts_unprepare(g_tts);
+
+    return 0;
+}
+
+int utc_tts_stop_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_stop(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_stop(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unprepare_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unprepare(g_tts);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    tts_prepare(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    while(TTS_STATE_READY!=g_current_state){
+        ecore_main_loop_iterate();
+    }
+
+    ret = tts_unprepare(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unprepare_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unprepare(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_unprepare(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_set_state_changed_cb_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_state_changed_cb(g_tts, __tts_state_changed_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_set_state_changed_cb(g_tts, __tts_state_changed_cb, NULL);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_set_state_changed_cb_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_state_changed_cb(NULL, __tts_state_changed_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_set_state_changed_cb(NULL, __tts_state_changed_cb, NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unset_state_changed_cb_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unset_state_changed_cb(g_tts);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_unset_state_changed_cb(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unset_state_changed_cb_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unset_state_changed_cb(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_unset_state_changed_cb(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_set_utterance_started_cb_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_utterance_started_cb(g_tts, __tts_utterance_started_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_set_utterance_started_cb(g_tts, __tts_utterance_started_cb, NULL);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_set_utterance_started_cb_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_utterance_started_cb(NULL, __tts_utterance_started_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_set_utterance_started_cb(NULL, __tts_utterance_started_cb, NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unset_utterance_started_cb_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unset_utterance_started_cb(g_tts);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_unset_utterance_started_cb(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unset_utterance_started_cb_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unset_utterance_started_cb(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_unset_utterance_started_cb(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_set_utterance_completed_cb_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_utterance_completed_cb(g_tts, __tts_utterance_completed_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_set_utterance_completed_cb(g_tts, __tts_utterance_completed_cb, NULL);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_set_utterance_completed_cb_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_utterance_completed_cb(NULL, __tts_utterance_completed_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_set_utterance_completed_cb(NULL, __tts_utterance_completed_cb, NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unset_utterance_completed_cb_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unset_utterance_completed_cb(g_tts);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_unset_utterance_completed_cb(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unset_utterance_completed_cb_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unset_utterance_completed_cb(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_unset_utterance_completed_cb(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_set_error_cb_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_error_cb(g_tts, __tts_error_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_set_error_cb(g_tts, __tts_error_cb, NULL);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_set_error_cb_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_error_cb(NULL, __tts_error_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_set_error_cb(NULL, __tts_error_cb, NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unset_error_cb_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unset_error_cb(g_tts);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_unset_error_cb(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unset_error_cb_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unset_error_cb(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_unset_error_cb(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_set_default_voice_changed_cb_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_default_voice_changed_cb(g_tts, __tts_default_voice_changed_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_set_default_voice_changed_cb(g_tts, __tts_default_voice_changed_cb, NULL);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_set_default_voice_changed_cb_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_set_default_voice_changed_cb(NULL, __tts_default_voice_changed_cb, NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_set_default_voice_changed_cb(NULL, __tts_default_voice_changed_cb, NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unset_default_voice_changed_cb_p(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unset_default_voice_changed_cb(g_tts);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(is_created_hndl, TTS_ERROR_NONE);
+    ret = tts_unset_default_voice_changed_cb(g_tts);
+    assert_eq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_tts_unset_default_voice_changed_cb_n(void)
+{
+    int ret = TTS_ERROR_NONE;
+    if(g_supported == false){
+        ret = tts_unset_default_voice_changed_cb(NULL);
+        assert_eq(ret, TTS_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = tts_unset_default_voice_changed_cb(NULL);
+    assert_neq(ret, TTS_ERROR_NONE);
+
+    return 0;
+}
+
diff --git a/src/utc/wav-player/CMakeLists.txt b/src/utc/wav-player/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..32c259a
--- /dev/null
@@ -0,0 +1,36 @@
+SET(PKG_NAME "wav-player")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-media-wav-player")
+SET(TC_SOURCES
+       utc-wav-player.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       storage
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       glib-2.0
+       storage
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/wav-player/public.list b/src/utc/wav-player/public.list
new file mode 100755 (executable)
index 0000000..b630fb2
--- /dev/null
@@ -0,0 +1,2 @@
+wav_player_start
+wav_player_stop
\ No newline at end of file
diff --git a/src/utc/wav-player/res/sound_5.wav b/src/utc/wav-player/res/sound_5.wav
new file mode 100755 (executable)
index 0000000..fc87fb0
Binary files /dev/null and b/src/utc/wav-player/res/sound_5.wav differ
diff --git a/src/utc/wav-player/tct-wav-player-core.c b/src/utc/wav-player/tct-wav-player-core.c
new file mode 100755 (executable)
index 0000000..4b444b0
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-wav-player-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/wav-player/tct-wav-player-core.h b/src/utc/wav-player/tct-wav-player-core.h
new file mode 100755 (executable)
index 0000000..79c4804
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_WAV_PLAYER_CORE_H__
+#define __TCT_WAV_PLAYER_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_wav_player_startup(void);
+extern void utc_wav_player_cleanup(void);
+
+extern int utc_wav_player_start_p(void);
+extern int utc_wav_player_start_n(void);
+extern int utc_wav_player_stop_p(void);
+extern int utc_wav_player_stop_n(void);
+extern int utc_wav_player_wrong_param_n1(void);
+extern int utc_wav_player_wrong_param_n2(void);
+extern int utc_wav_player_wrong_param_n3(void);
+extern int utc_wav_player_callback_p1(void);
+extern int utc_wav_player_callback_p2(void);
+
+testcase tc_array[] = {
+    {"utc_wav_player_start_p", utc_wav_player_start_p, utc_wav_player_startup, utc_wav_player_cleanup},
+    {"utc_wav_player_start_n", utc_wav_player_start_n, utc_wav_player_startup, utc_wav_player_cleanup},
+    {"utc_wav_player_stop_p", utc_wav_player_stop_p, utc_wav_player_startup, utc_wav_player_cleanup},
+    {"utc_wav_player_stop_n", utc_wav_player_stop_n, utc_wav_player_startup, utc_wav_player_cleanup},
+    {"utc_wav_player_wrong_param_n1", utc_wav_player_wrong_param_n1, utc_wav_player_startup, utc_wav_player_cleanup},
+    {"utc_wav_player_wrong_param_n2", utc_wav_player_wrong_param_n2, utc_wav_player_startup, utc_wav_player_cleanup},
+    {"utc_wav_player_wrong_param_n3", utc_wav_player_wrong_param_n3, utc_wav_player_startup, utc_wav_player_cleanup},
+    {"utc_wav_player_callback_p1", utc_wav_player_callback_p1, utc_wav_player_startup, utc_wav_player_cleanup},
+    {"utc_wav_player_callback_p2", utc_wav_player_callback_p2, utc_wav_player_startup, utc_wav_player_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_WAV_PLAYER_CORE_H__
diff --git a/src/utc/wav-player/utc-wav-player.c b/src/utc/wav-player/utc-wav-player.c
new file mode 100755 (executable)
index 0000000..1cee3bd
--- /dev/null
@@ -0,0 +1,197 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <wav_player.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <storage.h>
+
+static const char* TESTFILE = NULL;
+static const char* TESTFILENAME = "sound_5.wav";
+
+//& set: WavPlayer
+
+static bool wav_player_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) {
+        TESTFILE = (char*)malloc(strlen(path) + strlen(TESTFILENAME) + 6);
+        snprintf(TESTFILE, strlen(path) + strlen(TESTFILENAME) + 6, "%s/res/%s", path, TESTFILENAME);
+        
+        return false;
+    }
+
+    return true;
+}
+
+void utc_wav_player_startup(void)
+{
+    if(storage_foreach_device_supported(wav_player_storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE) {        
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+    }
+    if(TESTFILE == NULL) {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+    }
+}
+
+void utc_wav_player_cleanup(void)
+{
+    if(TESTFILE != NULL) {
+        free(TESTFILE);
+    }
+}
+
+int utc_wav_player_start_p(void)
+{
+    int ret = WAV_PLAYER_ERROR_INVALID_PARAMETER;
+    ret = wav_player_start(TESTFILE, SOUND_TYPE_MEDIA, NULL, NULL, NULL);
+    assert_eq(WAV_PLAYER_ERROR_NONE, ret);
+    return 0;
+}
+
+int utc_wav_player_start_n(void)
+{
+    int ret = WAV_PLAYER_ERROR_NONE;
+    ret = wav_player_start(NULL, SOUND_TYPE_MEDIA, NULL, NULL, NULL);
+    assert_eq(WAV_PLAYER_ERROR_INVALID_PARAMETER, ret);
+    return 0;
+}
+
+int utc_wav_player_stop_p(void)
+{
+    int ret = WAV_PLAYER_ERROR_INVALID_PARAMETER, id = 0;
+    ret = wav_player_start(TESTFILE, SOUND_TYPE_MEDIA, NULL, NULL, &id);
+    ret = wav_player_stop(id);
+    assert_eq(WAV_PLAYER_ERROR_NONE, ret);
+    return 0;
+}
+
+int utc_wav_player_stop_n(void)
+{
+    int ret = WAV_PLAYER_ERROR_NONE;
+    ret = wav_player_stop(-1);
+    assert_eq(WAV_PLAYER_ERROR_INVALID_PARAMETER, ret);
+    return 0;
+}
+
+int utc_wav_player_wrong_param_n1(void)
+{
+    int ret = WAV_PLAYER_ERROR_NONE;
+    char file_name[100] = { '\0' };
+    snprintf( file_name, 100 ,  "%s", "something" );
+
+    ret = wav_player_start( file_name, SOUND_TYPE_MEDIA, NULL, NULL, NULL );
+    assert_eq(WAV_PLAYER_ERROR_INVALID_OPERATION, ret);
+    return 0;
+}
+
+int utc_wav_player_wrong_param_n2(void)
+{
+    int ret = WAV_PLAYER_ERROR_NONE;
+
+    ret = wav_player_start( TESTFILE, SOUND_TYPE_VOICE + 1, NULL, NULL, NULL );
+    assert_eq(WAV_PLAYER_ERROR_INVALID_PARAMETER, ret);
+    return 0;
+}
+
+int utc_wav_player_wrong_param_n3(void)
+{
+    int ret = WAV_PLAYER_ERROR_NONE;
+
+    ret = wav_player_start( TESTFILE, -1, NULL, NULL, NULL );
+    assert_eq(WAV_PLAYER_ERROR_INVALID_PARAMETER, ret);
+    return 0;
+}
+
+typedef struct _thread_data_s
+{
+    pthread_mutex_t* mutex;
+    pthread_cond_t*  cond;
+    int              result;
+}   thread_data_s;
+
+
+static void _playback_completed_cb(int id, void *user_data){
+    thread_data_s* td = (thread_data_s*)user_data;
+    pthread_mutex_lock(td->mutex);
+    td->result = 1;
+    pthread_cond_signal(td->cond);
+    pthread_mutex_unlock(td->mutex);
+}
+
+int utc_wav_player_callback_p1(void)
+{
+    int ret;
+    pthread_cond_t  cond  = PTHREAD_COND_INITIALIZER;
+    pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+    pthread_mutex_init(&mutex, NULL);
+    pthread_cond_init(&cond, NULL);
+
+    thread_data_s td;
+    td.mutex        = &mutex;
+    td.cond         = &cond;
+    td.result = -1;
+
+    ret = wav_player_start( TESTFILE, SOUND_TYPE_MEDIA, _playback_completed_cb, &td, NULL);
+    
+    pthread_mutex_lock(&mutex);
+    pthread_cond_wait(&cond, &mutex);
+    pthread_mutex_unlock(&mutex);
+    pthread_mutex_destroy(&mutex);
+    pthread_cond_destroy(&cond);
+
+    assert_eq(WAV_PLAYER_ERROR_NONE, ret);
+    assert_eq(1, td.result);
+    return 0;
+}
+
+static void _playback_completed_cb2(int id, void *user_data){
+    thread_data_s *td = (thread_data_s*)user_data;
+    pthread_mutex_lock(td->mutex);
+    td->result = id;
+    pthread_cond_signal(td->cond);
+    pthread_mutex_unlock(td->mutex);
+}
+
+int utc_wav_player_callback_p2(void)
+{
+    int ret ;
+    int id;
+
+    pthread_cond_t  cond  = PTHREAD_COND_INITIALIZER;
+    pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+    pthread_mutex_init(&mutex, NULL);
+    pthread_cond_init(&cond, NULL);
+
+    thread_data_s td;
+    td.mutex        = &mutex;
+    td.cond         = &cond;
+    td.result = -1;
+
+    ret = wav_player_start( TESTFILE, SOUND_TYPE_MEDIA, _playback_completed_cb2, &td, &id );
+
+    pthread_mutex_lock(&mutex);
+    pthread_cond_wait(&cond, &mutex);
+    pthread_mutex_unlock(&mutex);
+    pthread_mutex_destroy(&mutex);
+    pthread_cond_destroy(&cond);
+
+    assert_eq(WAV_PLAYER_ERROR_NONE, ret);
+    assert_eq(id, td.result);
+    return 0;
+}
+
diff --git a/src/utc/webkit2/CMakeLists.txt b/src/utc/webkit2/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..9008af4
--- /dev/null
@@ -0,0 +1,115 @@
+SET(PKG_NAME "webkit2")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "ewebkit2")
+SET(TC_SOURCES
+       utc_webkit2_ewk_back_forward_list_count_func.c
+       utc_webkit2_ewk_back_forward_list_current_item_get_func.c
+       utc_webkit2_ewk_back_forward_list_item_at_index_get_func.c
+       utc_webkit2_ewk_back_forward_list_item_original_url_get_func.c
+       utc_webkit2_ewk_back_forward_list_item_ref_func.c
+       utc_webkit2_ewk_back_forward_list_item_title_get_func.c
+       utc_webkit2_ewk_back_forward_list_item_unref_func.c
+       utc_webkit2_ewk_back_forward_list_item_url_get_func.c
+       utc_webkit2_ewk_back_forward_list_n_back_items_copy_func.c
+       utc_webkit2_ewk_back_forward_list_next_item_get_func.c
+       utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func.c
+       utc_webkit2_ewk_back_forward_list_previous_item_get_func.c
+       utc_webkit2_ewk_context_cache_model_get_func.c
+       utc_webkit2_ewk_context_cache_model_set_func.c
+       utc_webkit2_ewk_context_cookie_manager_get_func.c
+       utc_webkit2_ewk_context_resource_cache_clear_func.c
+       utc_webkit2_ewk_cookie_manager_accept_policy_async_get_func.c
+       utc_webkit2_ewk_cookie_manager_accept_policy_set_func.c
+       utc_webkit2_ewk_cookie_manager_cookies_clear_func.c
+       utc_webkit2_ewk_init_func.c
+       utc_webkit2_ewk_policy_decision_cookie_get_func.c
+       utc_webkit2_ewk_policy_decision_host_get_func.c
+       utc_webkit2_ewk_policy_decision_http_method_get_func.c
+       utc_webkit2_ewk_policy_decision_ignore_func.c
+       utc_webkit2_ewk_policy_decision_navigation_type_get_func.c
+       utc_webkit2_ewk_policy_decision_response_headers_get_func.c
+       utc_webkit2_ewk_policy_decision_response_mime_get_func.c
+       utc_webkit2_ewk_policy_decision_response_status_code_get_func.c
+       utc_webkit2_ewk_policy_decision_scheme_get_func.c
+       utc_webkit2_ewk_policy_decision_type_get_func.c
+       utc_webkit2_ewk_policy_decision_url_get_func.c
+       utc_webkit2_ewk_policy_decision_use_func.c
+       utc_webkit2_ewk_settings_default_font_size_get_func.c
+       utc_webkit2_ewk_settings_default_font_size_set_func.c
+       utc_webkit2_ewk_settings_default_text_encoding_name_get_func.c
+       utc_webkit2_ewk_settings_default_text_encoding_name_set_func.c
+       utc_webkit2_ewk_settings_javascript_enabled_get_func.c
+       utc_webkit2_ewk_settings_javascript_enabled_set_func.c
+       utc_webkit2_ewk_settings_loads_images_automatically_get_func.c
+       utc_webkit2_ewk_settings_loads_images_automatically_set_func.c
+       utc_webkit2_ewk_settings_scripts_can_open_windows_get_func.c
+       utc_webkit2_ewk_settings_scripts_can_open_windows_set_func.c
+       utc_webkit2_ewk_shutdown_func.c
+       utc_webkit2_ewk_view_add_func.c
+       utc_webkit2_ewk_view_back_forward_list_clear_func.c
+       utc_webkit2_ewk_view_back_forward_list_get_func.c
+       utc_webkit2_ewk_view_back_func.c
+       utc_webkit2_ewk_view_back_possible_func.c
+       utc_webkit2_ewk_view_contents_size_get_func.c
+       utc_webkit2_ewk_view_context_get_func.c
+       utc_webkit2_ewk_view_forward_func.c
+       utc_webkit2_ewk_view_forward_possible_func.c
+       utc_webkit2_ewk_view_fullscreen_exit_func.c
+       utc_webkit2_ewk_view_html_string_load_func.c
+       utc_webkit2_ewk_view_load_progress_get_func.c
+       utc_webkit2_ewk_view_reload_func.c
+       utc_webkit2_ewk_view_resume_func.c
+       utc_webkit2_ewk_view_scale_get_func.c
+       utc_webkit2_ewk_view_scale_set_func.c
+       utc_webkit2_ewk_view_script_execute_func.c
+       utc_webkit2_ewk_view_scroll_by_func.c
+       utc_webkit2_ewk_view_scroll_pos_get_func.c
+       utc_webkit2_ewk_view_scroll_set_func.c
+       utc_webkit2_ewk_view_settings_get_func.c
+       utc_webkit2_ewk_view_stop_func.c
+       utc_webkit2_ewk_view_suspend_func.c
+       utc_webkit2_ewk_view_text_find_func.c
+       utc_webkit2_ewk_view_title_get_func.c
+       utc_webkit2_ewk_view_url_get_func.c
+       utc_webkit2_ewk_view_url_request_set_func.c
+       utc_webkit2_ewk_view_url_set_func.c
+       utc_webkit2_ewk_view_user_agent_get_func.c
+       utc_webkit2_ewk_view_user_agent_set_func.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       evas
+       ecore-evas
+       ecore
+       edje
+       eina
+       ewebkit2
+       elementary
+       glib-2.0
+       gobject-2.0
+       x11
+       storage
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/webkit2/public.list b/src/utc/webkit2/public.list
new file mode 100755 (executable)
index 0000000..2f385bf
--- /dev/null
@@ -0,0 +1,74 @@
+ewk_back_forward_list_count
+ewk_back_forward_list_current_item_get
+ewk_back_forward_list_item_at_index_get
+ewk_back_forward_list_item_original_url_get
+ewk_back_forward_list_item_ref
+ewk_back_forward_list_item_title_get
+ewk_back_forward_list_item_unref
+ewk_back_forward_list_item_url_get
+ewk_back_forward_list_n_back_items_copy
+ewk_back_forward_list_n_forward_items_copy
+ewk_back_forward_list_next_item_get
+ewk_back_forward_list_previous_item_get
+ewk_context_cache_model_get
+ewk_context_cache_model_set
+ewk_context_cookie_manager_get
+ewk_context_resource_cache_clear
+ewk_cookie_manager_accept_policy_async_get
+ewk_cookie_manager_accept_policy_set
+ewk_cookie_manager_cookies_clear
+ewk_init
+ewk_policy_decision_cookie_get
+ewk_policy_decision_host_get
+ewk_policy_decision_http_method_get
+ewk_policy_decision_ignore
+ewk_policy_decision_navigation_type_get
+ewk_policy_decision_response_headers_get
+ewk_policy_decision_response_mime_get
+ewk_policy_decision_response_status_code_get
+ewk_policy_decision_scheme_get
+ewk_policy_decision_type_get
+ewk_policy_decision_url_get
+ewk_policy_decision_use
+ewk_settings_default_font_size_get
+ewk_settings_default_font_size_set
+ewk_settings_default_text_encoding_name_get
+ewk_settings_default_text_encoding_name_set
+ewk_settings_javascript_enabled_get
+ewk_settings_javascript_enabled_set
+ewk_settings_loads_images_automatically_get
+ewk_settings_loads_images_automatically_set
+ewk_settings_scripts_can_open_windows_get
+ewk_settings_scripts_can_open_windows_set
+ewk_shutdown
+ewk_view_add
+ewk_view_back
+ewk_view_back_forward_list_clear
+ewk_view_back_forward_list_get
+ewk_view_back_possible
+ewk_view_contents_size_get
+ewk_view_context_get
+ewk_view_forward
+ewk_view_forward_possible
+ewk_view_fullscreen_exit
+ewk_view_load_progress_get
+ewk_view_reload
+ewk_view_resume
+ewk_view_scale_get
+ewk_view_scale_set
+ewk_view_script_execute
+ewk_view_scroll_by
+ewk_view_scroll_pos_get
+ewk_view_scroll_set
+ewk_view_settings_get
+ewk_view_stop
+ewk_view_suspend
+ewk_view_text_find
+ewk_view_title_get
+ewk_view_url_get
+ewk_view_url_request_set
+ewk_view_url_set
+ewk_view_user_agent_get
+ewk_view_user_agent_set
+
+
diff --git a/src/utc/webkit2/res/common/sample.html b/src/utc/webkit2/res/common/sample.html
new file mode 100755 (executable)
index 0000000..c0d2184
--- /dev/null
@@ -0,0 +1,13 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Testing Sample Page</title>
+</head>
+<body>
+    <h1>Sample HTML</h1>
+    <p>This is sample html page to be used in test suite when loading of a page is required.</p>
+    <p id="getParaContent">test content</p>
+</body>
+</html>
diff --git a/src/utc/webkit2/res/common/sample_1.html b/src/utc/webkit2/res/common/sample_1.html
new file mode 100755 (executable)
index 0000000..3060915
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Testing Sample Page 1</title>
+</head>
+<body>
+    <h1>Sample1 HTML 1</h1>
+</body>
+</html>
diff --git a/src/utc/webkit2/res/common/sample_2.html b/src/utc/webkit2/res/common/sample_2.html
new file mode 100755 (executable)
index 0000000..79ca46e
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Testing Sample Page 2</title>
+</head>
+<body>
+    <h1>Sample1 HTML 2</h1>
+</body>
+</html>
diff --git a/src/utc/webkit2/res/ewk_context_menu/image.png b/src/utc/webkit2/res/ewk_context_menu/image.png
new file mode 100755 (executable)
index 0000000..1788789
Binary files /dev/null and b/src/utc/webkit2/res/ewk_context_menu/image.png differ
diff --git a/src/utc/webkit2/res/ewk_context_menu/index.html b/src/utc/webkit2/res/ewk_context_menu/index.html
new file mode 100755 (executable)
index 0000000..147c5d8
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Context Menu Page</title>
+<body>
+  <a href="http://www.tizen.org" id="foo" >
+    <img src="image.png" width="200" height="200" alt="Context Menu Image Link Item"/>
+  </a>
+</body>
+</html>
diff --git a/src/utc/webkit2/res/ewk_view/back_forward.html b/src/utc/webkit2/res/ewk_view/back_forward.html
new file mode 100755 (executable)
index 0000000..b0aff34
--- /dev/null
@@ -0,0 +1,6 @@
+<html>
+<head>
+<title>BackForward</title>
+</head>
+<body>BackForward</body>
+</html>
diff --git a/src/utc/webkit2/res/ewk_view/index_big_red_square.html b/src/utc/webkit2/res/ewk_view/index_big_red_square.html
new file mode 100755 (executable)
index 0000000..0c73d6d
--- /dev/null
@@ -0,0 +1,203 @@
+<table bgcolor=red>
+<tr><td width=9999>
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+<br>a
+</td></tr></table>
diff --git a/src/utc/webkit2/res/ewk_view/sample.html b/src/utc/webkit2/res/ewk_view/sample.html
new file mode 100755 (executable)
index 0000000..3d24585
--- /dev/null
@@ -0,0 +1,61 @@
+<html>
+<body>
+<div>
+Recent political upheavals and extremist-backed violence in the West Asian region, particularly in Syria and Iraq in the aftermath of the Arab Spring, have further complicated and aggravated the situation for the already dwindling Arab Christian community
+<p>
+The problems of the Christian community in West Asia are very complex. The recent political upheavals in the region, particularly in Syria and Iraq in the aftermath of the Arab Spring, have further complicated and aggravated the situation for the already dwindling community. Iraq is home to the world\92s ancient Arab Christian communities and had a sizeable Christian population of nearly 1.2 million prior to the American invasion in 2003. Ironically, after the occupation of Iraq by American-led allied forces, the rise in attacks on churches and Christian institutions by extremist groups has become unprecedented. The American invasion has aggravated the perception of Christians being the agents of the United States. According to church sources, the Christian community in Iraq has now been reduced to a population of 4,50,000. This is largely due to the absence of a democratic and secular political system.
+</p>
+ISIS threat
+<br>
+<p>
+Presently, the strengthening of Islamic militant groups, particularly the ascendancy of the al-Qaeda-inspired Islamic State of Iraq and the Levant (ISIS) has led to the mass exodus of the Christian community from Iraq. Ever since the establishment of the Islamic State, ISIS has stepped up its attacks against the Shiite, Christian and Yazidi communities. Mosul, which is the stronghold of ISIS, is one of the ancient Christian cities in the region and is believed to be the birthplace of the Biblical prophet Jonah. Ironically, since the beginning of June, ISIS militants have torched hundreds of Shia tombs and churches including the tomb of Jonah. Hundreds of Christians and Shiites have been killed and women raped by extremist forces; nuns have been kidnapped from monasteries. Last month, ISIS issued an ultimatum to the Christian community \97 either convert to Islam, pay a religious tax or \93jizya,\94 or die.
+</p>
+<p>
+The ISIS declaration states that \93we offered them three choices: Islam, the dhimma contract \97 involving the payment of jizya: if they refuse they have nothing but the sword.\94 Moreover, Christian houses, buildings and shops have been marked with the Arabic letter \93N\94 as it stands for \93Nazarene,\94 the Koranic word for Christians. At the same time, Shiite homes have been marked with the letter \93R\94 which means \93rwadish\94 (rejecters). This ultimatum has led to the mass exodus of the Christian population to the Kurdish cities of Dohuk and Irbil, which has invariably ended the centuries-old peaceful coexistence among communities and the fraying of the secular fabric of Iraqi society. Incongruously, ISIS has reiterated that there is no space for Christians in the Islamic State. Mosul, which had a sizeable Christian population of 60,000, has now been reduced to a few families. Iraq was one of the peaceful havens of Christian communities and has sent numerous bishops and patriarchs to various orthodox sects.
+</p>
+During my field research in West Asia, the common response of Iraqi nuns and priests of Bethlehem was: \93We were very safe in Iraq under Saddam Hussein but the American occupation has made our position very horrible.\94
+<div>
+In his recent appeal to the Iraqi community, the Chaldean Patriarch of Baghdad pointed out that \93Christian and Muslim blood has been mixed as it was shed in the defence of their rights and lands. Together they built a civilization, cities and a heritage.\94
+</div>
+The situation is not as different in Syria, as ISIS first experimented with its fatwa to \93convert, pay tax or die\94 in the Syrian city of Raqqa. Like Iraq, Syria is another West Asian country where Christians have lived peacefully for centuries. The al-Qaeda-oriented anti-regime rebels have attacked the Christian community mercilessly in many parts of Syria; hundreds of Christian properties and churches have been razed to the ground. In Syria, Christians have been accused of being the supporters of Syrian President Bashar al-Assad by extremists who have kidnapped two bishops belonging to the Syrian Orthodox Church and the Greek Orthodox Church. Their whereabouts are still unknown. Furthermore, most Christian cities like Aleppo, Homs and Ma\92loula have fallen into rebel hands which has further intensified the persecution of the community.
+
+Deep roots, ancient denominations
+
+West Asia is the birthplace of Christianity and home to some of the world\92s most ancient Christian denominations \97 the Maronite Church, Greek Orthodox, Chaldean, Nestorian, Syrian Orthodox, Coptic, Assyrian Orthodox, Syrian Catholic and so on. The Arab Christians are one of the main victims of the volatile and unstable political situation in West Asia. The colonial \93God trick\94 of nation-state creation and the carving out of modern Arab states have made Arab Christians victims of a potent combination of colonial and ethno-religious geopolitics. Arabic-speaking Christians have been marginalised in the region due to various socio-political and historical developments like Islamisation, extremism, massive migration, poverty and terrorism.
+
+The Arab Christian community has always boasted of a deep literary, cultural, spiritual and historical heritage and tradition. Today, it faces the threat of oblivion, with its rights getting trampled. The Christians were never lonely travellers in the Arab street. They have traditionally been connected with major socio-political movements like Pan Arabism, Ba'athism, Communism and the various West Asian liberation movements, including the Palestine Movement. The Christian community is an educated group with most of its members engaged in business and professional jobs, mainly because of its proximity to Christian missionaries, largely from Europe.
+
+At present, the community is trying hard to prove its nationalism and allegiance to the West Asian movements as it is very difficult to identify itself with Islamic groups. A recent study shows that a majority of people in the community are planning to migrate to western nations out of a sense of fear and a lack of \93belonging.\94 The conflict over reclaiming space and the Arab Christian identity in the region, especially in Syria, Palestine, Egypt and Iraq is therefore an issue of contemporary relevance in West Asian geopolitics and deserves a detailed examination for policy implications and peace negotiations here.
+
+The Christians of Palestine/Israel were in the forefront of the Palestine movement and many paid for it with life and limb in the struggle. The Arab Christians are also victims of five decades of Israeli occupation, with the boundary wall between Israel and Palestine greatly affecting the Christian community living on both sides of the divide. Spitting at clergies by orthodox Jews, especially Yeshiva students, is a recurrent phenomenon in Israel. Many a Jerusalem clergy has been subjected to abuse of this kind.
+
+Policies of the West
+
+The ever-increasing clout of Evangelical Christians of the West and their unqualified support for Israel has in recent years drowned out the voices of Arab Christians in West Asia, who are now subject to suppression by multiple forces. While Arab Christians are fighting Israel\92s repressive measures, paradoxically, the white American churches in the U.S. are propagating the idea of a \93Biblical Israel\94 and directly supporting the Israeli occupation of Palestine. The notion of a Biblical Israel was coined by the American Episcopal Church in the 1970s and it also had the indirect support of the U.S. administration to justify enormous financial support to Israel. The conservative Christians in the U.S., particularly the Republican supporters, believe that the unequivocal support for Israel fulfils a Biblical injunction to protect the Jewish State. It is an insular and strategic philosophy to justify the occupation of Israel through the lens of the Bible, and American tele-evangelists often lay stress on this aspect. Hence, the parochial approach of western Christian groups further aggravates the volatile atmosphere for the Christian community back in West Asia.
+
+The wayward interference of the West and the Israeli occupation of Palestine are the most important reasons for the terminal decline of Christian life and livelihood in the region. The West, with its short-term military gestures and quest for immediate pay-offs, has deepened the divide between the two communities which once lived peacefully in the region.
+
+The unprecedented attacks on Arab Christians have resulted in the mass exodus of the community with thousands now having taken refuge in the Scandinavian, Latin American and European countries. The narrow policies of the West with hidden political interests have damaged the progressive and secular fabric of West Asian society to a great extent. The ancient Christian community is fast becoming extinct. If this trend continues, Christians will haveRecent political upheavals and extremist-backed violence in the West Asian region, particularly in Syria and Iraq in the aftermath of the Arab Spring, have further complicated and aggravated the situation for the already dwindling Arab Christian community
+
+The problems of the Christian community in West Asia are very complex. The recent political upheavals in the region, particularly in Syria and Iraq in the aftermath of the Arab Spring, have further complicated and aggravated the situation for the already dwindling community. Iraq is home to the world\92s ancient Arab Christian communities and had a sizeable Christian population of nearly 1.2 million prior to the American invasion in 2003. Ironically, after the occupation of Iraq by American-led allied forces, the rise in attacks on churches and Christian institutions by extremist groups has become unprecedented. The American invasion has aggravated the perception of Christians being the agents of the United States. According to church sources, the Christian community in Iraq has now been reduced to a population of 4,50,000. This is largely due to the absence of a democratic and secular political system.
+
+ISIS threat
+
+Presently, the strengthening of Islamic militant groups, particularly the ascendancy of the al-Qaeda-inspired Islamic State of Iraq and the Levant (ISIS) has led to the mass exodus of the Christian community from Iraq. Ever since the establishment of the Islamic State, ISIS has stepped up its attacks against the Shiite, Christian and Yazidi communities. Mosul, which is the stronghold of ISIS, is one of the ancient Christian cities in the region and is believed to be the birthplace of the Biblical prophet Jonah. Ironically, since the beginning of June, ISIS militants have torched hundreds of Shia tombs and churches including the tomb of Jonah. Hundreds of Christians and Shiites have been killed and women raped by extremist forces; nuns have been kidnapped from monasteries. Last month, ISIS issued an ultimatum to the Christian community \97 either convert to Islam, pay a religious tax or \93jizya,\94 or die.
+
+The ISIS declaration states that \93we offered them three choices: Islam, the dhimma contract \97 involving the payment of jizya: if they refuse they have nothing but the sword.\94 Moreover, Christian houses, buildings and shops have been marked with the Arabic letter \93N\94 as it stands for \93Nazarene,\94 the Koranic word for Christians. At the same time, Shiite homes have been marked with the letter \93R\94 which means \93rwadish\94 (rejecters). This ultimatum has led to the mass exodus of the Christian population to the Kurdish cities of Dohuk and Irbil, which has invariably ended the centuries-old peaceful coexistence among communities and the fraying of the secular fabric of Iraqi society. Incongruously, ISIS has reiterated that there is no space for Christians in the Islamic State. Mosul, which had a sizeable Christian population of 60,000, has now been reduced to a few families. Iraq was one of the peaceful havens of Christian communities and has sent numerous bishops and patriarchs to various orthodox sects.
+
+During my field research in West Asia, the common response of Iraqi nuns and priests of Bethlehem was: \93We were very safe in Iraq under Saddam Hussein but the American occupation has made our position very horrible.\94
+
+In his recent appeal to the Iraqi community, the Chaldean Patriarch of Baghdad pointed out that \93Christian and Muslim blood has been mixed as it was shed in the defence of their rights and lands. Together they built a civilization, cities and a heritage.\94
+
+The situation is not as different in Syria, as ISIS first experimented with its fatwa to \93convert, pay tax or die\94 in the Syrian city of Raqqa. Like Iraq, Syria is another West Asian country where Christians have lived peacefully for centuries. The al-Qaeda-oriented anti-regime rebels have attacked the Christian community mercilessly in many parts of Syria; hundreds of Christian properties and churches have been razed to the ground. In Syria, Christians have been accused of being the supporters of Syrian President Bashar al-Assad by extremists who have kidnapped two bishops belonging to the Syrian Orthodox Church and the Greek Orthodox Church. Their whereabouts are still unknown. Furthermore, most Christian cities like Aleppo, Homs and Ma\92loula have fallen into rebel hands which has further intensified the persecution of the community.
+
+Deep roots, ancient denominations
+
+West Asia is the birthplace of Christianity and home to some of the world\92s most ancient Christian denominations \97 the Maronite Church, Greek Orthodox, Chaldean, Nestorian, Syrian Orthodox, Coptic, Assyrian Orthodox, Syrian Catholic and so on. The Arab Christians are one of the main victims of the volatile and unstable political situation in West Asia. The colonial \93God trick\94 of nation-state creation and the carving out of modern Arab states have made Arab Christians victims of a potent combination of colonial and ethno-religious geopolitics. Arabic-speaking Christians have been marginalised in the region due to various socio-political and historical developments like Islamisation, extremism, massive migration, poverty and terrorism.
+
+The Arab Christian community has always boasted of a deep literary, cultural, spiritual and historical heritage and tradition. Today, it faces the threat of oblivion, with its rights getting trampled. The Christians were never lonely travellers in the Arab street. They have traditionally been connected with major socio-political movements like Pan Arabism, Ba'athism, Communism and the various West Asian liberation movements, including the Palestine Movement. The Christian community is an educated group with most of its members engaged in business and professional jobs, mainly because of its proximity to Christian missionaries, largely from Europe.
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/src/utc/webkit2/res/ewk_view/sample_1.html b/src/utc/webkit2/res/ewk_view/sample_1.html
new file mode 100755 (executable)
index 0000000..65c17e9
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+<!--
+This test file is common file and can be used by EWK APIs to load web pages.
+-->
+<head>
+    <title>Test file</title>
+</head>
+<body>
+    <h1>Sample1 HTML 1</h1>
+</body>
+</html>
diff --git a/src/utc/webkit2/res/ewk_view/text_find.html b/src/utc/webkit2/res/ewk_view/text_find.html
new file mode 100755 (executable)
index 0000000..1a0965c
--- /dev/null
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<body>
+apple apple apple banana banana coconut
+</body>
diff --git a/src/utc/webkit2/tct-webkit2-core.c b/src/utc/webkit2/tct-webkit2-core.c
new file mode 100755 (executable)
index 0000000..e4a7e70
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-webkit2-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/webkit2/tct-webkit2-core.h b/src/utc/webkit2/tct-webkit2-core.h
new file mode 100755 (executable)
index 0000000..c466903
--- /dev/null
@@ -0,0 +1,523 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_WEBKIT2_CORE_H__
+#define __TCT_WEBKIT2_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_webkit2_ewk_back_forward_list_count_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_count_func_cleanup(void);
+extern void utc_webkit2_ewk_back_forward_list_current_item_get_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_current_item_get_func_cleanup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_at_index_get_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_at_index_get_func_cleanup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_original_url_get_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_original_url_get_func_cleanup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_ref_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_ref_func_cleanup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_title_get_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_title_get_func_cleanup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_unref_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_unref_func_cleanup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_url_get_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_item_url_get_func_cleanup(void);
+extern void utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_cleanup(void);
+extern void utc_webkit2_ewk_back_forward_list_next_item_get_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_next_item_get_func_cleanup(void);
+extern void utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_cleanup(void);
+extern void utc_webkit2_ewk_back_forward_list_previous_item_get_func_startup(void);
+extern void utc_webkit2_ewk_back_forward_list_previous_item_get_func_cleanup(void);
+extern void utc_webkit2_ewk_context_cache_model_get_func_startup(void);
+extern void utc_webkit2_ewk_context_cache_model_get_func_cleanup(void);
+extern void utc_webkit2_ewk_context_cache_model_set_func_startup(void);
+extern void utc_webkit2_ewk_context_cache_model_set_func_cleanup(void);
+extern void utc_webkit2_ewk_context_cookie_manager_get_func_startup(void);
+extern void utc_webkit2_ewk_context_cookie_manager_get_func_cleanup(void);
+extern void utc_webkit2_ewk_context_resource_cache_clear_func_startup(void);
+extern void utc_webkit2_ewk_context_resource_cache_clear_func_cleanup(void);
+extern void utc_ewk_cookie_manager_accept_policy_async_get_startup(void);
+extern void utc_ewk_cookie_manager_accept_policy_async_get_cleanup(void);
+extern void utc_ewk_cookie_manager_accept_policy_set_startup(void);
+extern void utc_ewk_cookie_manager_accept_policy_set_cleanup(void);
+extern void utc_webkit2_ewk_cookie_manager_cookies_clear_func_startup(void);
+extern void utc_webkit2_ewk_cookie_manager_cookies_clear_func_cleanup(void);
+extern void utc_webkit2_ewk_init_func_startup(void);
+extern void utc_webkit2_ewk_init_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_cookie_get_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_cookie_get_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_host_get_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_host_get_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_http_method_get_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_http_method_get_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_ignore_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_ignore_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_navigation_type_get_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_navigation_type_get_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_response_headers_get_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_response_headers_get_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_response_mime_get_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_response_mime_get_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_response_status_code_get_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_response_status_code_get_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_scheme_get_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_scheme_get_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_type_get_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_type_get_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_url_get_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_url_get_func_cleanup(void);
+extern void utc_webkit2_ewk_policy_decision_use_func_startup(void);
+extern void utc_webkit2_ewk_policy_decision_use_func_cleanup(void);
+extern void utc_webkit2_ewk_settings_default_font_size_get_func_startup(void);
+extern void utc_webkit2_ewk_settings_default_font_size_get_func_cleanup(void);
+extern void utc_webkit2_ewk_settings_default_font_size_set_func_startup(void);
+extern void utc_webkit2_ewk_settings_default_font_size_set_func_cleanup(void);
+extern void utc_webkit2_ewk_settings_default_text_encoding_name_get_func_startup(void);
+extern void utc_webkit2_ewk_settings_default_text_encoding_name_get_func_cleanup(void);
+extern void utc_webkit2_ewk_settings_default_text_encoding_name_set_func_startup(void);
+extern void utc_webkit2_ewk_settings_default_text_encoding_name_set_func_cleanup(void);
+extern void utc_webkit2_ewk_settings_javascript_enabled_get_func_startup(void);
+extern void utc_webkit2_ewk_settings_javascript_enabled_get_func_cleanup(void);
+extern void utc_webkit2_ewk_settings_javascript_enabled_set_func_startup(void);
+extern void utc_webkit2_ewk_settings_javascript_enabled_set_func_cleanup(void);
+extern void utc_webkit2_ewk_settings_loads_images_automatically_get_func_startup(void);
+extern void utc_webkit2_ewk_settings_loads_images_automatically_get_func_cleanup(void);
+extern void utc_webkit2_ewk_settings_loads_images_automatically_set_func_startup(void);
+extern void utc_webkit2_ewk_settings_loads_images_automatically_set_func_cleanup(void);
+extern void utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_startup(void);
+extern void utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_cleanup(void);
+extern void utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_startup(void);
+extern void utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_cleanup(void);
+extern void utc_webkit2_ewk_shutdown_func_startup(void);
+extern void utc_webkit2_ewk_shutdown_func_cleanup(void);
+extern void utc_webkit2_ewk_view_add_startup(void);
+extern void utc_webkit2_ewk_view_add_cleanup(void);
+extern void utc_webkit2_ewk_view_back_forward_list_clear_func_startup(void);
+extern void utc_webkit2_ewk_view_back_forward_list_clear_func_cleanup(void);
+extern void utc_webkit2_ewk_view_back_forward_list_get_func_startup(void);
+extern void utc_webkit2_ewk_view_back_forward_list_get_func_cleanup(void);
+extern void utc_ewk_view_back_startup(void);
+extern void utc_ewk_view_back_cleanup(void);
+extern void utc_ewk_view_back_possible_startup(void);
+extern void utc_ewk_view_back_possible_cleanup(void);
+extern void utc_ewk_view_contents_size_get_startup(void);
+extern void utc_ewk_view_contents_size_get_cleanup(void);
+extern void utc_ewk_view_context_get_func_startup(void);
+extern void utc_ewk_view_context_get_func_cleanup(void);
+extern void utc_ewk_view_forward_startup(void);
+extern void utc_ewk_view_forward_cleanup(void);
+extern void utc_ewk_view_forward_possible_startup(void);
+extern void utc_ewk_view_forward_possible_cleanup(void);
+extern void utc_webkit2_ewk_view_fullscreen_exit_func_startup(void);
+extern void utc_webkit2_ewk_view_fullscreen_exit_func_cleanup(void);
+extern void utc_webkit2_ewk_view_html_string_load_func_startup(void);
+extern void utc_webkit2_ewk_view_html_string_load_func_cleanup(void);
+extern void utc_webkit2_ewk_view_load_progress_get_func_startup(void);
+extern void utc_webkit2_ewk_view_load_progress_get_func_cleanup(void);
+extern void utc_webkit2_ewk_view_reload_startup(void);
+extern void utc_webkit2_ewk_view_reload_cleanup(void);
+extern void utc_webkit2_ewk_view_resume_startup(void);
+extern void utc_webkit2_ewk_view_resume_cleanup(void);
+extern void utc_webkit2_ewk_view_scale_get_startup(void);
+extern void utc_webkit2_ewk_view_scale_get_cleanup(void);
+extern void utc_webkit2_ewk_view_scale_set_startup(void);
+extern void utc_webkit2_ewk_view_scale_set_cleanup(void);
+extern void utc_webkit2_ewk_view_script_execute_startup(void);
+extern void utc_webkit2_ewk_view_script_execute_cleanup(void);
+extern void utc_ewk_view_scroll_by_startup(void);
+extern void utc_ewk_view_scroll_by_cleanup(void);
+extern void utc_ewk_view_scroll_pos_get_startup(void);
+extern void utc_ewk_view_scroll_pos_get_cleanup(void);
+extern void utc_webkit2_ewk_view_scroll_set_startup(void);
+extern void utc_webkit2_ewk_view_scroll_set_cleanup(void);
+extern void utc_webkit2_ewk_view_settings_get_func_startup(void);
+extern void utc_webkit2_ewk_view_settings_get_func_cleanup(void);
+extern void utc_webkit2_ewk_view_stop_startup(void);
+extern void utc_webkit2_ewk_view_stop_cleanup(void);
+extern void utc_webkit2_ewk_view_suspend_startup(void);
+extern void utc_webkit2_ewk_view_suspend_cleanup(void);
+extern void utc_webkit2_ewk_view_text_find_func_startup(void);
+extern void utc_webkit2_ewk_view_text_find_func_cleanup(void);
+extern void utc_webkit2_ewk_view_title_get_startup(void);
+extern void utc_webkit2_ewk_view_title_get_cleanup(void);
+extern void utc_webkit2_ewk_view_url_get_startup(void);
+extern void utc_webkit2_ewk_view_url_get_cleanup(void);
+extern void utc_webkit2_ewk_view_url_request_set_startup(void);
+extern void utc_webkit2_ewk_view_url_request_set_cleanup(void);
+extern void utc_webkit2_ewk_view_url_set_startup(void);
+extern void utc_webkit2_ewk_view_url_set_cleanup(void);
+extern void utc_ewk_view_user_agent_get_startup(void);
+extern void utc_ewk_view_user_agent_get_cleanup(void);
+extern void utc_ewk_view_user_agent_set_startup(void);
+extern void utc_ewk_view_user_agent_set_cleanup(void);
+
+extern int utc_webkit2_ewk_back_forward_list_count_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_count_func_n(void);
+extern int utc_webkit2_ewk_back_forward_list_current_item_get_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_current_item_get_func_n(void);
+extern int utc_webkit2_ewk_back_forward_list_item_at_index_get_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_item_at_index_get_func_n(void);
+extern int utc_webkit2_ewk_back_forward_list_item_original_url_get_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_item_original_url_get_func_n(void);
+extern int utc_webkit2_ewk_back_forward_list_item_ref_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_item_ref_func_n(void);
+extern int utc_webkit2_ewk_back_forward_list_item_title_get_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_item_title_get_func_n(void);
+extern int utc_webkit2_ewk_back_forward_list_item_unref_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_item_unref_func_n(void);
+extern int utc_webkit2_ewk_back_forward_list_item_url_get_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_item_url_get_func_n(void);
+extern int utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_n(void);
+extern int utc_webkit2_ewk_back_forward_list_next_item_get_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_next_item_get_func_n(void);
+extern int utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_n(void);
+extern int utc_webkit2_ewk_back_forward_list_previous_item_get_func_p(void);
+extern int utc_webkit2_ewk_back_forward_list_previous_item_get_func_n(void);
+extern int utc_webkit2_ewk_context_cache_model_get_func_p_1(void);
+extern int utc_webkit2_ewk_context_cache_model_get_func_p_2(void);
+extern int utc_webkit2_ewk_context_cache_model_get_func_p_3(void);
+extern int utc_webkit2_ewk_context_cache_model_get_func_n_1(void);
+extern int utc_webkit2_ewk_context_cache_model_get_func_n_2(void);
+extern int utc_webkit2_ewk_context_cache_model_get_func_n_3(void);
+extern int utc_webkit2_ewk_context_cache_model_set_func_p_1(void);
+extern int utc_webkit2_ewk_context_cache_model_set_func_p_2(void);
+extern int utc_webkit2_ewk_context_cache_model_set_func_p_3(void);
+extern int utc_webkit2_ewk_context_cache_model_set_func_n_1(void);
+extern int utc_webkit2_ewk_context_cache_model_set_func_n_2(void);
+extern int utc_webkit2_ewk_context_cache_model_set_func_n_3(void);
+extern int utc_webkit2_ewk_context_cookie_manager_get_func_p(void);
+extern int utc_webkit2_ewk_context_cookie_manager_get_func_n(void);
+extern int utc_webkit2_ewk_context_resource_cache_clear_func_p(void);
+extern int utc_webkit2_ewk_context_resource_cache_clear_func_n(void);
+extern int utc_ewk_cookie_manager_accept_policy_async_get_p(void);
+extern int utc_ewk_cookie_manager_accept_policy_async_get_n(void);
+extern int utc_ewk_cookie_manager_accept_policy_set_p(void);
+extern int utc_ewk_cookie_manager_accept_policy_set_n(void);
+extern int utc_webkit2_ewk_cookie_manager_cookies_clear_func_p(void);
+extern int utc_webkit2_ewk_cookie_manager_cookies_clear_func_n(void);
+extern int utc_webkit2_ewk_init_func_p(void);
+extern int utc_webkit2_ewk_init_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_cookie_get_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_cookie_get_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_host_get_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_host_get_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_http_method_get_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_http_method_get_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_ignore_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_ignore_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_navigation_type_get_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_navigation_type_get_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_response_headers_get_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_response_headers_get_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_response_mime_get_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_response_mime_get_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_response_status_code_get_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_response_status_code_get_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_scheme_get_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_scheme_get_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_type_get_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_type_get_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_url_get_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_url_get_func_n(void);
+extern int utc_webkit2_ewk_policy_decision_use_func_p(void);
+extern int utc_webkit2_ewk_policy_decision_use_func_n(void);
+extern int utc_webkit2_ewk_settings_default_font_size_get_func_p_1(void);
+extern int utc_webkit2_ewk_settings_default_font_size_get_func_p_2(void);
+extern int utc_webkit2_ewk_settings_default_font_size_get_func_n(void);
+extern int utc_webkit2_ewk_settings_default_font_size_set_func_p(void);
+extern int utc_webkit2_ewk_settings_default_font_size_set_func_n(void);
+extern int utc_webkit2_ewk_settings_default_text_encoding_name_get_func_p_1(void);
+extern int utc_webkit2_ewk_settings_default_text_encoding_name_get_func_p_2(void);
+extern int utc_webkit2_ewk_settings_default_text_encoding_name_get_func_n(void);
+extern int utc_webkit2_ewk_settings_default_text_encoding_name_set_func_p(void);
+extern int utc_webkit2_ewk_settings_default_text_encoding_name_set_func_n(void);
+extern int utc_webkit2_ewk_settings_javascript_enabled_get_func_p_1(void);
+extern int utc_webkit2_ewk_settings_javascript_enabled_get_func_p_2(void);
+extern int utc_webkit2_ewk_settings_javascript_enabled_get_func_n(void);
+extern int utc_webkit2_ewk_settings_javascript_enabled_set_func_p_1(void);
+extern int utc_webkit2_ewk_settings_javascript_enabled_set_func_p_2(void);
+extern int utc_webkit2_ewk_settings_javascript_enabled_set_func_n(void);
+extern int utc_webkit2_ewk_settings_loads_images_automatically_get_func_p_1(void);
+extern int utc_webkit2_ewk_settings_loads_images_automatically_get_func_p_2(void);
+extern int utc_webkit2_ewk_settings_loads_images_automatically_get_func_n(void);
+extern int utc_webkit2_ewk_settings_loads_images_automatically_set_func_p_1(void);
+extern int utc_webkit2_ewk_settings_loads_images_automatically_set_func_p_2(void);
+extern int utc_webkit2_ewk_settings_loads_images_automatically_set_func_n(void);
+extern int utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_p_1(void);
+extern int utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_p_2(void);
+extern int utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_n(void);
+extern int utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_p_1(void);
+extern int utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_p_2(void);
+extern int utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_n(void);
+extern int utc_webkit2_ewk_shutdown_func_p(void);
+extern int utc_webkit2_ewk_shutdown_func_n(void);
+extern int utc_webkit2_ewk_view_add_p(void);
+extern int utc_webkit2_ewk_view_add_n(void);
+extern int utc_webkit2_ewk_view_back_forward_list_clear_func_p(void);
+extern int utc_webkit2_ewk_view_back_forward_list_clear_func_n(void);
+extern int utc_webkit2_ewk_view_back_forward_list_get_func_p(void);
+extern int utc_webkit2_ewk_view_back_forward_list_get_func_n(void);
+extern int utc_ewk_view_back_p(void);
+extern int utc_ewk_view_back_n(void);
+extern int utc_ewk_view_back_possible_p1(void);
+extern int utc_ewk_view_back_possible_p2(void);
+extern int utc_ewk_view_back_possible_p3(void);
+extern int utc_ewk_view_back_possible_n(void);
+extern int utc_ewk_view_contents_size_get_p(void);
+extern int utc_ewk_view_contents_size_get_n(void);
+extern int utc_ewk_view_context_get_func_p(void);
+extern int utc_ewk_view_context_get_func_n(void);
+extern int utc_ewk_view_forward_p(void);
+extern int utc_ewk_view_forward_n(void);
+extern int utc_ewk_view_forward_possible_p_1(void);
+extern int utc_ewk_view_forward_possible_p_2(void);
+extern int utc_ewk_view_forward_possible_p_3(void);
+extern int utc_ewk_view_forward_possible_n(void);
+extern int utc_webkit2_ewk_view_fullscreen_exit_func_p(void);
+extern int utc_webkit2_ewk_view_fullscreen_exit_func_n(void);
+extern int utc_webkit2_ewk_view_html_string_load_func_p(void);
+extern int utc_webkit2_ewk_view_html_string_load_func_n(void);
+extern int utc_webkit2_ewk_view_load_progress_get_func_p_1(void);
+extern int utc_webkit2_ewk_view_load_progress_get_func_p_2(void);
+extern int utc_webkit2_ewk_view_load_progress_get_func_n(void);
+extern int utc_webkit2_ewk_view_reload_p(void);
+extern int utc_webkit2_ewk_view_reload_n(void);
+extern int utc_webkit2_ewk_view_resume_p(void);
+extern int utc_webkit2_ewk_view_resume_n(void);
+extern int utc_webkit2_ewk_view_scale_get_p(void);
+extern int utc_webkit2_ewk_view_scale_get_n(void);
+extern int utc_webkit2_ewk_view_scale_set_p(void);
+extern int utc_webkit2_ewk_view_scale_set_n(void);
+extern int utc_webkit2_ewk_view_script_execute_p(void);
+extern int utc_webkit2_ewk_view_script_execute_n_1(void);
+extern int utc_webkit2_ewk_view_script_execute_n_2(void);
+extern int utc_ewk_view_scroll_by_p_1(void);
+extern int utc_ewk_view_scroll_by_p_2(void);
+extern int utc_ewk_view_scroll_by_p_3(void);
+extern int utc_ewk_view_scroll_by_n(void);
+extern int utc_ewk_view_scroll_pos_get_p_1(void);
+extern int utc_ewk_view_scroll_pos_get_p_2(void);
+extern int utc_ewk_view_scroll_pos_get_n(void);
+extern int utc_webkit2_ewk_view_scroll_set_p_1(void);
+extern int utc_webkit2_ewk_view_scroll_set_p_2(void);
+extern int utc_webkit2_ewk_view_scroll_set_p_3(void);
+extern int utc_webkit2_ewk_view_scroll_set_n(void);
+extern int utc_webkit2_ewk_view_settings_get_func_p(void);
+extern int utc_webkit2_ewk_view_settings_get_func_n(void);
+extern int utc_webkit2_ewk_view_stop_p(void);
+extern int utc_webkit2_ewk_view_stop_n(void);
+extern int utc_webkit2_ewk_view_suspend_p(void);
+extern int utc_webkit2_ewk_view_suspend_n(void);
+extern int utc_webkit2_ewk_view_text_find_func_p(void);
+extern int utc_webkit2_ewk_view_text_find_func_n(void);
+extern int utc_webkit2_ewk_view_title_get_p(void);
+extern int utc_webkit2_ewk_view_title_get_n(void);
+extern int utc_webkit2_ewk_view_url_get_p(void);
+extern int utc_webkit2_ewk_view_url_get_n(void);
+extern int utc_webkit2_ewk_view_url_request_set_p(void);
+extern int utc_webkit2_ewk_view_url_request_set_n_1(void);
+extern int utc_webkit2_ewk_view_url_request_set_n_2(void);
+extern int utc_webkit2_ewk_view_url_request_set_n_3(void);
+extern int utc_webkit2_ewk_view_url_set_p(void);
+extern int utc_webkit2_ewk_view_url_set_n(void);
+extern int utc_ewk_view_user_agent_get_p(void);
+extern int utc_ewk_view_user_agent_get_n_1(void);
+extern int utc_ewk_view_user_agent_set_p(void);
+extern int utc_ewk_view_user_agent_set_n(void);
+
+testcase tc_array[] = {
+    {"utc_webkit2_ewk_back_forward_list_count_func_p", utc_webkit2_ewk_back_forward_list_count_func_p, utc_webkit2_ewk_back_forward_list_count_func_startup, utc_webkit2_ewk_back_forward_list_count_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_count_func_n", utc_webkit2_ewk_back_forward_list_count_func_n, utc_webkit2_ewk_back_forward_list_count_func_startup, utc_webkit2_ewk_back_forward_list_count_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_current_item_get_func_p", utc_webkit2_ewk_back_forward_list_current_item_get_func_p, utc_webkit2_ewk_back_forward_list_current_item_get_func_startup, utc_webkit2_ewk_back_forward_list_current_item_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_current_item_get_func_n", utc_webkit2_ewk_back_forward_list_current_item_get_func_n, utc_webkit2_ewk_back_forward_list_current_item_get_func_startup, utc_webkit2_ewk_back_forward_list_current_item_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_at_index_get_func_p", utc_webkit2_ewk_back_forward_list_item_at_index_get_func_p, utc_webkit2_ewk_back_forward_list_item_at_index_get_func_startup, utc_webkit2_ewk_back_forward_list_item_at_index_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_at_index_get_func_n", utc_webkit2_ewk_back_forward_list_item_at_index_get_func_n, utc_webkit2_ewk_back_forward_list_item_at_index_get_func_startup, utc_webkit2_ewk_back_forward_list_item_at_index_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_original_url_get_func_p", utc_webkit2_ewk_back_forward_list_item_original_url_get_func_p, utc_webkit2_ewk_back_forward_list_item_original_url_get_func_startup, utc_webkit2_ewk_back_forward_list_item_original_url_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_original_url_get_func_n", utc_webkit2_ewk_back_forward_list_item_original_url_get_func_n, utc_webkit2_ewk_back_forward_list_item_original_url_get_func_startup, utc_webkit2_ewk_back_forward_list_item_original_url_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_ref_func_p", utc_webkit2_ewk_back_forward_list_item_ref_func_p, utc_webkit2_ewk_back_forward_list_item_ref_func_startup, utc_webkit2_ewk_back_forward_list_item_ref_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_ref_func_n", utc_webkit2_ewk_back_forward_list_item_ref_func_n, utc_webkit2_ewk_back_forward_list_item_ref_func_startup, utc_webkit2_ewk_back_forward_list_item_ref_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_title_get_func_p", utc_webkit2_ewk_back_forward_list_item_title_get_func_p, utc_webkit2_ewk_back_forward_list_item_title_get_func_startup, utc_webkit2_ewk_back_forward_list_item_title_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_title_get_func_n", utc_webkit2_ewk_back_forward_list_item_title_get_func_n, utc_webkit2_ewk_back_forward_list_item_title_get_func_startup, utc_webkit2_ewk_back_forward_list_item_title_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_unref_func_p", utc_webkit2_ewk_back_forward_list_item_unref_func_p, utc_webkit2_ewk_back_forward_list_item_unref_func_startup, utc_webkit2_ewk_back_forward_list_item_unref_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_unref_func_n", utc_webkit2_ewk_back_forward_list_item_unref_func_n, utc_webkit2_ewk_back_forward_list_item_unref_func_startup, utc_webkit2_ewk_back_forward_list_item_unref_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_url_get_func_p", utc_webkit2_ewk_back_forward_list_item_url_get_func_p, utc_webkit2_ewk_back_forward_list_item_url_get_func_startup, utc_webkit2_ewk_back_forward_list_item_url_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_item_url_get_func_n", utc_webkit2_ewk_back_forward_list_item_url_get_func_n, utc_webkit2_ewk_back_forward_list_item_url_get_func_startup, utc_webkit2_ewk_back_forward_list_item_url_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_p", utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_p, utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_startup, utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_n", utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_n, utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_startup, utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_next_item_get_func_p", utc_webkit2_ewk_back_forward_list_next_item_get_func_p, utc_webkit2_ewk_back_forward_list_next_item_get_func_startup, utc_webkit2_ewk_back_forward_list_next_item_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_next_item_get_func_n", utc_webkit2_ewk_back_forward_list_next_item_get_func_n, utc_webkit2_ewk_back_forward_list_next_item_get_func_startup, utc_webkit2_ewk_back_forward_list_next_item_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_p", utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_p, utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_startup, utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_n", utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_n, utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_startup, utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_previous_item_get_func_p", utc_webkit2_ewk_back_forward_list_previous_item_get_func_p, utc_webkit2_ewk_back_forward_list_previous_item_get_func_startup, utc_webkit2_ewk_back_forward_list_previous_item_get_func_cleanup},
+    {"utc_webkit2_ewk_back_forward_list_previous_item_get_func_n", utc_webkit2_ewk_back_forward_list_previous_item_get_func_n, utc_webkit2_ewk_back_forward_list_previous_item_get_func_startup, utc_webkit2_ewk_back_forward_list_previous_item_get_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_get_func_p_1", utc_webkit2_ewk_context_cache_model_get_func_p_1, utc_webkit2_ewk_context_cache_model_get_func_startup, utc_webkit2_ewk_context_cache_model_get_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_get_func_p_2", utc_webkit2_ewk_context_cache_model_get_func_p_2, utc_webkit2_ewk_context_cache_model_get_func_startup, utc_webkit2_ewk_context_cache_model_get_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_get_func_p_3", utc_webkit2_ewk_context_cache_model_get_func_p_3, utc_webkit2_ewk_context_cache_model_get_func_startup, utc_webkit2_ewk_context_cache_model_get_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_get_func_n_1", utc_webkit2_ewk_context_cache_model_get_func_n_1, utc_webkit2_ewk_context_cache_model_get_func_startup, utc_webkit2_ewk_context_cache_model_get_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_get_func_n_2", utc_webkit2_ewk_context_cache_model_get_func_n_2, utc_webkit2_ewk_context_cache_model_get_func_startup, utc_webkit2_ewk_context_cache_model_get_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_get_func_n_3", utc_webkit2_ewk_context_cache_model_get_func_n_3, utc_webkit2_ewk_context_cache_model_get_func_startup, utc_webkit2_ewk_context_cache_model_get_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_set_func_p_1", utc_webkit2_ewk_context_cache_model_set_func_p_1, utc_webkit2_ewk_context_cache_model_set_func_startup, utc_webkit2_ewk_context_cache_model_set_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_set_func_p_2", utc_webkit2_ewk_context_cache_model_set_func_p_2, utc_webkit2_ewk_context_cache_model_set_func_startup, utc_webkit2_ewk_context_cache_model_set_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_set_func_p_3", utc_webkit2_ewk_context_cache_model_set_func_p_3, utc_webkit2_ewk_context_cache_model_set_func_startup, utc_webkit2_ewk_context_cache_model_set_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_set_func_n_1", utc_webkit2_ewk_context_cache_model_set_func_n_1, utc_webkit2_ewk_context_cache_model_set_func_startup, utc_webkit2_ewk_context_cache_model_set_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_set_func_n_2", utc_webkit2_ewk_context_cache_model_set_func_n_2, utc_webkit2_ewk_context_cache_model_set_func_startup, utc_webkit2_ewk_context_cache_model_set_func_cleanup},
+    {"utc_webkit2_ewk_context_cache_model_set_func_n_3", utc_webkit2_ewk_context_cache_model_set_func_n_3, utc_webkit2_ewk_context_cache_model_set_func_startup, utc_webkit2_ewk_context_cache_model_set_func_cleanup},
+    {"utc_webkit2_ewk_context_cookie_manager_get_func_p", utc_webkit2_ewk_context_cookie_manager_get_func_p, utc_webkit2_ewk_context_cookie_manager_get_func_startup, utc_webkit2_ewk_context_cookie_manager_get_func_cleanup},
+    {"utc_webkit2_ewk_context_cookie_manager_get_func_n", utc_webkit2_ewk_context_cookie_manager_get_func_n, utc_webkit2_ewk_context_cookie_manager_get_func_startup, utc_webkit2_ewk_context_cookie_manager_get_func_cleanup},
+    {"utc_webkit2_ewk_context_resource_cache_clear_func_p", utc_webkit2_ewk_context_resource_cache_clear_func_p, utc_webkit2_ewk_context_resource_cache_clear_func_startup, utc_webkit2_ewk_context_resource_cache_clear_func_cleanup},
+    {"utc_webkit2_ewk_context_resource_cache_clear_func_n", utc_webkit2_ewk_context_resource_cache_clear_func_n, utc_webkit2_ewk_context_resource_cache_clear_func_startup, utc_webkit2_ewk_context_resource_cache_clear_func_cleanup},
+    {"utc_ewk_cookie_manager_accept_policy_async_get_p", utc_ewk_cookie_manager_accept_policy_async_get_p, utc_ewk_cookie_manager_accept_policy_async_get_startup, utc_ewk_cookie_manager_accept_policy_async_get_cleanup},
+    {"utc_ewk_cookie_manager_accept_policy_async_get_n", utc_ewk_cookie_manager_accept_policy_async_get_n, utc_ewk_cookie_manager_accept_policy_async_get_startup, utc_ewk_cookie_manager_accept_policy_async_get_cleanup},
+    {"utc_ewk_cookie_manager_accept_policy_set_p", utc_ewk_cookie_manager_accept_policy_set_p, utc_ewk_cookie_manager_accept_policy_set_startup, utc_ewk_cookie_manager_accept_policy_set_cleanup},
+    {"utc_ewk_cookie_manager_accept_policy_set_n", utc_ewk_cookie_manager_accept_policy_set_n, utc_ewk_cookie_manager_accept_policy_set_startup, utc_ewk_cookie_manager_accept_policy_set_cleanup},
+    {"utc_webkit2_ewk_cookie_manager_cookies_clear_func_p", utc_webkit2_ewk_cookie_manager_cookies_clear_func_p, utc_webkit2_ewk_cookie_manager_cookies_clear_func_startup, utc_webkit2_ewk_cookie_manager_cookies_clear_func_cleanup},
+    {"utc_webkit2_ewk_cookie_manager_cookies_clear_func_n", utc_webkit2_ewk_cookie_manager_cookies_clear_func_n, utc_webkit2_ewk_cookie_manager_cookies_clear_func_startup, utc_webkit2_ewk_cookie_manager_cookies_clear_func_cleanup},
+    {"utc_webkit2_ewk_init_func_p", utc_webkit2_ewk_init_func_p, utc_webkit2_ewk_init_func_startup, utc_webkit2_ewk_init_func_cleanup},
+    {"utc_webkit2_ewk_init_func_n", utc_webkit2_ewk_init_func_n, utc_webkit2_ewk_init_func_startup, utc_webkit2_ewk_init_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_cookie_get_func_p", utc_webkit2_ewk_policy_decision_cookie_get_func_p, utc_webkit2_ewk_policy_decision_cookie_get_func_startup, utc_webkit2_ewk_policy_decision_cookie_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_cookie_get_func_n", utc_webkit2_ewk_policy_decision_cookie_get_func_n, utc_webkit2_ewk_policy_decision_cookie_get_func_startup, utc_webkit2_ewk_policy_decision_cookie_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_host_get_func_p", utc_webkit2_ewk_policy_decision_host_get_func_p, utc_webkit2_ewk_policy_decision_host_get_func_startup, utc_webkit2_ewk_policy_decision_host_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_host_get_func_n", utc_webkit2_ewk_policy_decision_host_get_func_n, utc_webkit2_ewk_policy_decision_host_get_func_startup, utc_webkit2_ewk_policy_decision_host_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_http_method_get_func_p", utc_webkit2_ewk_policy_decision_http_method_get_func_p, utc_webkit2_ewk_policy_decision_http_method_get_func_startup, utc_webkit2_ewk_policy_decision_http_method_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_http_method_get_func_n", utc_webkit2_ewk_policy_decision_http_method_get_func_n, utc_webkit2_ewk_policy_decision_http_method_get_func_startup, utc_webkit2_ewk_policy_decision_http_method_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_ignore_func_p", utc_webkit2_ewk_policy_decision_ignore_func_p, utc_webkit2_ewk_policy_decision_ignore_func_startup, utc_webkit2_ewk_policy_decision_ignore_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_ignore_func_n", utc_webkit2_ewk_policy_decision_ignore_func_n, utc_webkit2_ewk_policy_decision_ignore_func_startup, utc_webkit2_ewk_policy_decision_ignore_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_navigation_type_get_func_p", utc_webkit2_ewk_policy_decision_navigation_type_get_func_p, utc_webkit2_ewk_policy_decision_navigation_type_get_func_startup, utc_webkit2_ewk_policy_decision_navigation_type_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_navigation_type_get_func_n", utc_webkit2_ewk_policy_decision_navigation_type_get_func_n, utc_webkit2_ewk_policy_decision_navigation_type_get_func_startup, utc_webkit2_ewk_policy_decision_navigation_type_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_response_headers_get_func_p", utc_webkit2_ewk_policy_decision_response_headers_get_func_p, utc_webkit2_ewk_policy_decision_response_headers_get_func_startup, utc_webkit2_ewk_policy_decision_response_headers_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_response_headers_get_func_n", utc_webkit2_ewk_policy_decision_response_headers_get_func_n, utc_webkit2_ewk_policy_decision_response_headers_get_func_startup, utc_webkit2_ewk_policy_decision_response_headers_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_response_mime_get_func_p", utc_webkit2_ewk_policy_decision_response_mime_get_func_p, utc_webkit2_ewk_policy_decision_response_mime_get_func_startup, utc_webkit2_ewk_policy_decision_response_mime_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_response_mime_get_func_n", utc_webkit2_ewk_policy_decision_response_mime_get_func_n, utc_webkit2_ewk_policy_decision_response_mime_get_func_startup, utc_webkit2_ewk_policy_decision_response_mime_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_response_status_code_get_func_p", utc_webkit2_ewk_policy_decision_response_status_code_get_func_p, utc_webkit2_ewk_policy_decision_response_status_code_get_func_startup, utc_webkit2_ewk_policy_decision_response_status_code_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_response_status_code_get_func_n", utc_webkit2_ewk_policy_decision_response_status_code_get_func_n, utc_webkit2_ewk_policy_decision_response_status_code_get_func_startup, utc_webkit2_ewk_policy_decision_response_status_code_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_scheme_get_func_p", utc_webkit2_ewk_policy_decision_scheme_get_func_p, utc_webkit2_ewk_policy_decision_scheme_get_func_startup, utc_webkit2_ewk_policy_decision_scheme_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_scheme_get_func_n", utc_webkit2_ewk_policy_decision_scheme_get_func_n, utc_webkit2_ewk_policy_decision_scheme_get_func_startup, utc_webkit2_ewk_policy_decision_scheme_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_type_get_func_p", utc_webkit2_ewk_policy_decision_type_get_func_p, utc_webkit2_ewk_policy_decision_type_get_func_startup, utc_webkit2_ewk_policy_decision_type_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_type_get_func_n", utc_webkit2_ewk_policy_decision_type_get_func_n, utc_webkit2_ewk_policy_decision_type_get_func_startup, utc_webkit2_ewk_policy_decision_type_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_url_get_func_p", utc_webkit2_ewk_policy_decision_url_get_func_p, utc_webkit2_ewk_policy_decision_url_get_func_startup, utc_webkit2_ewk_policy_decision_url_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_url_get_func_n", utc_webkit2_ewk_policy_decision_url_get_func_n, utc_webkit2_ewk_policy_decision_url_get_func_startup, utc_webkit2_ewk_policy_decision_url_get_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_use_func_p", utc_webkit2_ewk_policy_decision_use_func_p, utc_webkit2_ewk_policy_decision_use_func_startup, utc_webkit2_ewk_policy_decision_use_func_cleanup},
+    {"utc_webkit2_ewk_policy_decision_use_func_n", utc_webkit2_ewk_policy_decision_use_func_n, utc_webkit2_ewk_policy_decision_use_func_startup, utc_webkit2_ewk_policy_decision_use_func_cleanup},
+    {"utc_webkit2_ewk_settings_default_font_size_get_func_p_1", utc_webkit2_ewk_settings_default_font_size_get_func_p_1, utc_webkit2_ewk_settings_default_font_size_get_func_startup, utc_webkit2_ewk_settings_default_font_size_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_default_font_size_get_func_p_2", utc_webkit2_ewk_settings_default_font_size_get_func_p_2, utc_webkit2_ewk_settings_default_font_size_get_func_startup, utc_webkit2_ewk_settings_default_font_size_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_default_font_size_get_func_n", utc_webkit2_ewk_settings_default_font_size_get_func_n, utc_webkit2_ewk_settings_default_font_size_get_func_startup, utc_webkit2_ewk_settings_default_font_size_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_default_font_size_set_func_p", utc_webkit2_ewk_settings_default_font_size_set_func_p, utc_webkit2_ewk_settings_default_font_size_set_func_startup, utc_webkit2_ewk_settings_default_font_size_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_default_font_size_set_func_n", utc_webkit2_ewk_settings_default_font_size_set_func_n, utc_webkit2_ewk_settings_default_font_size_set_func_startup, utc_webkit2_ewk_settings_default_font_size_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_default_text_encoding_name_get_func_p_1", utc_webkit2_ewk_settings_default_text_encoding_name_get_func_p_1, utc_webkit2_ewk_settings_default_text_encoding_name_get_func_startup, utc_webkit2_ewk_settings_default_text_encoding_name_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_default_text_encoding_name_get_func_p_2", utc_webkit2_ewk_settings_default_text_encoding_name_get_func_p_2, utc_webkit2_ewk_settings_default_text_encoding_name_get_func_startup, utc_webkit2_ewk_settings_default_text_encoding_name_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_default_text_encoding_name_get_func_n", utc_webkit2_ewk_settings_default_text_encoding_name_get_func_n, utc_webkit2_ewk_settings_default_text_encoding_name_get_func_startup, utc_webkit2_ewk_settings_default_text_encoding_name_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_default_text_encoding_name_set_func_p", utc_webkit2_ewk_settings_default_text_encoding_name_set_func_p, utc_webkit2_ewk_settings_default_text_encoding_name_set_func_startup, utc_webkit2_ewk_settings_default_text_encoding_name_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_default_text_encoding_name_set_func_n", utc_webkit2_ewk_settings_default_text_encoding_name_set_func_n, utc_webkit2_ewk_settings_default_text_encoding_name_set_func_startup, utc_webkit2_ewk_settings_default_text_encoding_name_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_javascript_enabled_get_func_p_1", utc_webkit2_ewk_settings_javascript_enabled_get_func_p_1, utc_webkit2_ewk_settings_javascript_enabled_get_func_startup, utc_webkit2_ewk_settings_javascript_enabled_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_javascript_enabled_get_func_p_2", utc_webkit2_ewk_settings_javascript_enabled_get_func_p_2, utc_webkit2_ewk_settings_javascript_enabled_get_func_startup, utc_webkit2_ewk_settings_javascript_enabled_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_javascript_enabled_get_func_n", utc_webkit2_ewk_settings_javascript_enabled_get_func_n, utc_webkit2_ewk_settings_javascript_enabled_get_func_startup, utc_webkit2_ewk_settings_javascript_enabled_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_javascript_enabled_set_func_p_1", utc_webkit2_ewk_settings_javascript_enabled_set_func_p_1, utc_webkit2_ewk_settings_javascript_enabled_set_func_startup, utc_webkit2_ewk_settings_javascript_enabled_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_javascript_enabled_set_func_p_2", utc_webkit2_ewk_settings_javascript_enabled_set_func_p_2, utc_webkit2_ewk_settings_javascript_enabled_set_func_startup, utc_webkit2_ewk_settings_javascript_enabled_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_javascript_enabled_set_func_n", utc_webkit2_ewk_settings_javascript_enabled_set_func_n, utc_webkit2_ewk_settings_javascript_enabled_set_func_startup, utc_webkit2_ewk_settings_javascript_enabled_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_loads_images_automatically_get_func_p_1", utc_webkit2_ewk_settings_loads_images_automatically_get_func_p_1, utc_webkit2_ewk_settings_loads_images_automatically_get_func_startup, utc_webkit2_ewk_settings_loads_images_automatically_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_loads_images_automatically_get_func_p_2", utc_webkit2_ewk_settings_loads_images_automatically_get_func_p_2, utc_webkit2_ewk_settings_loads_images_automatically_get_func_startup, utc_webkit2_ewk_settings_loads_images_automatically_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_loads_images_automatically_get_func_n", utc_webkit2_ewk_settings_loads_images_automatically_get_func_n, utc_webkit2_ewk_settings_loads_images_automatically_get_func_startup, utc_webkit2_ewk_settings_loads_images_automatically_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_loads_images_automatically_set_func_p_1", utc_webkit2_ewk_settings_loads_images_automatically_set_func_p_1, utc_webkit2_ewk_settings_loads_images_automatically_set_func_startup, utc_webkit2_ewk_settings_loads_images_automatically_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_loads_images_automatically_set_func_p_2", utc_webkit2_ewk_settings_loads_images_automatically_set_func_p_2, utc_webkit2_ewk_settings_loads_images_automatically_set_func_startup, utc_webkit2_ewk_settings_loads_images_automatically_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_loads_images_automatically_set_func_n", utc_webkit2_ewk_settings_loads_images_automatically_set_func_n, utc_webkit2_ewk_settings_loads_images_automatically_set_func_startup, utc_webkit2_ewk_settings_loads_images_automatically_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_p_1", utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_p_1, utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_startup, utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_p_2", utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_p_2, utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_startup, utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_n", utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_n, utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_startup, utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_cleanup},
+    {"utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_p_1", utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_p_1, utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_startup, utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_p_2", utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_p_2, utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_startup, utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_cleanup},
+    {"utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_n", utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_n, utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_startup, utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_cleanup},
+    {"utc_webkit2_ewk_shutdown_func_p", utc_webkit2_ewk_shutdown_func_p, utc_webkit2_ewk_shutdown_func_startup, utc_webkit2_ewk_shutdown_func_cleanup},
+    {"utc_webkit2_ewk_shutdown_func_n", utc_webkit2_ewk_shutdown_func_n, utc_webkit2_ewk_shutdown_func_startup, utc_webkit2_ewk_shutdown_func_cleanup},
+    {"utc_webkit2_ewk_view_add_p", utc_webkit2_ewk_view_add_p, utc_webkit2_ewk_view_add_startup, utc_webkit2_ewk_view_add_cleanup},
+    {"utc_webkit2_ewk_view_add_n", utc_webkit2_ewk_view_add_n, utc_webkit2_ewk_view_add_startup, utc_webkit2_ewk_view_add_cleanup},
+    {"utc_webkit2_ewk_view_back_forward_list_clear_func_p", utc_webkit2_ewk_view_back_forward_list_clear_func_p, utc_webkit2_ewk_view_back_forward_list_clear_func_startup, utc_webkit2_ewk_view_back_forward_list_clear_func_cleanup},
+    {"utc_webkit2_ewk_view_back_forward_list_clear_func_n", utc_webkit2_ewk_view_back_forward_list_clear_func_n, utc_webkit2_ewk_view_back_forward_list_clear_func_startup, utc_webkit2_ewk_view_back_forward_list_clear_func_cleanup},
+    {"utc_webkit2_ewk_view_back_forward_list_get_func_p", utc_webkit2_ewk_view_back_forward_list_get_func_p, utc_webkit2_ewk_view_back_forward_list_get_func_startup, utc_webkit2_ewk_view_back_forward_list_get_func_cleanup},
+    {"utc_webkit2_ewk_view_back_forward_list_get_func_n", utc_webkit2_ewk_view_back_forward_list_get_func_n, utc_webkit2_ewk_view_back_forward_list_get_func_startup, utc_webkit2_ewk_view_back_forward_list_get_func_cleanup},
+    {"utc_ewk_view_back_p", utc_ewk_view_back_p, utc_ewk_view_back_startup, utc_ewk_view_back_cleanup},
+    {"utc_ewk_view_back_n", utc_ewk_view_back_n, utc_ewk_view_back_startup, utc_ewk_view_back_cleanup},
+    {"utc_ewk_view_back_possible_p1", utc_ewk_view_back_possible_p1, utc_ewk_view_back_possible_startup, utc_ewk_view_back_possible_cleanup},
+    {"utc_ewk_view_back_possible_p2", utc_ewk_view_back_possible_p2, utc_ewk_view_back_possible_startup, utc_ewk_view_back_possible_cleanup},
+    {"utc_ewk_view_back_possible_p3", utc_ewk_view_back_possible_p3, utc_ewk_view_back_possible_startup, utc_ewk_view_back_possible_cleanup},
+    {"utc_ewk_view_back_possible_n", utc_ewk_view_back_possible_n, utc_ewk_view_back_possible_startup, utc_ewk_view_back_possible_cleanup},
+    {"utc_ewk_view_contents_size_get_p", utc_ewk_view_contents_size_get_p, utc_ewk_view_contents_size_get_startup, utc_ewk_view_contents_size_get_cleanup},
+    {"utc_ewk_view_contents_size_get_n", utc_ewk_view_contents_size_get_n, utc_ewk_view_contents_size_get_startup, utc_ewk_view_contents_size_get_cleanup},
+    {"utc_ewk_view_context_get_func_p", utc_ewk_view_context_get_func_p, utc_ewk_view_context_get_func_startup, utc_ewk_view_context_get_func_cleanup},
+    {"utc_ewk_view_context_get_func_n", utc_ewk_view_context_get_func_n, utc_ewk_view_context_get_func_startup, utc_ewk_view_context_get_func_cleanup},
+    {"utc_ewk_view_forward_p", utc_ewk_view_forward_p, utc_ewk_view_forward_startup, utc_ewk_view_forward_cleanup},
+    {"utc_ewk_view_forward_n", utc_ewk_view_forward_n, utc_ewk_view_forward_startup, utc_ewk_view_forward_cleanup},
+    {"utc_ewk_view_forward_possible_p_1", utc_ewk_view_forward_possible_p_1, utc_ewk_view_forward_possible_startup, utc_ewk_view_forward_possible_cleanup},
+    {"utc_ewk_view_forward_possible_p_2", utc_ewk_view_forward_possible_p_2, utc_ewk_view_forward_possible_startup, utc_ewk_view_forward_possible_cleanup},
+    {"utc_ewk_view_forward_possible_p_3", utc_ewk_view_forward_possible_p_3, utc_ewk_view_forward_possible_startup, utc_ewk_view_forward_possible_cleanup},
+    {"utc_ewk_view_forward_possible_n", utc_ewk_view_forward_possible_n, utc_ewk_view_forward_possible_startup, utc_ewk_view_forward_possible_cleanup},
+    {"utc_webkit2_ewk_view_fullscreen_exit_func_p", utc_webkit2_ewk_view_fullscreen_exit_func_p, utc_webkit2_ewk_view_fullscreen_exit_func_startup, utc_webkit2_ewk_view_fullscreen_exit_func_cleanup},
+    {"utc_webkit2_ewk_view_fullscreen_exit_func_n", utc_webkit2_ewk_view_fullscreen_exit_func_n, utc_webkit2_ewk_view_fullscreen_exit_func_startup, utc_webkit2_ewk_view_fullscreen_exit_func_cleanup},
+    {"utc_webkit2_ewk_view_html_string_load_func_p", utc_webkit2_ewk_view_html_string_load_func_p, utc_webkit2_ewk_view_html_string_load_func_startup, utc_webkit2_ewk_view_html_string_load_func_cleanup},
+    {"utc_webkit2_ewk_view_html_string_load_func_n", utc_webkit2_ewk_view_html_string_load_func_n, utc_webkit2_ewk_view_html_string_load_func_startup, utc_webkit2_ewk_view_html_string_load_func_cleanup},
+    {"utc_webkit2_ewk_view_load_progress_get_func_p_1", utc_webkit2_ewk_view_load_progress_get_func_p_1, utc_webkit2_ewk_view_load_progress_get_func_startup, utc_webkit2_ewk_view_load_progress_get_func_cleanup},
+    {"utc_webkit2_ewk_view_load_progress_get_func_p_2", utc_webkit2_ewk_view_load_progress_get_func_p_2, utc_webkit2_ewk_view_load_progress_get_func_startup, utc_webkit2_ewk_view_load_progress_get_func_cleanup},
+    {"utc_webkit2_ewk_view_load_progress_get_func_n", utc_webkit2_ewk_view_load_progress_get_func_n, utc_webkit2_ewk_view_load_progress_get_func_startup, utc_webkit2_ewk_view_load_progress_get_func_cleanup},
+    {"utc_webkit2_ewk_view_reload_p", utc_webkit2_ewk_view_reload_p, utc_webkit2_ewk_view_reload_startup, utc_webkit2_ewk_view_reload_cleanup},
+    {"utc_webkit2_ewk_view_reload_n", utc_webkit2_ewk_view_reload_n, utc_webkit2_ewk_view_reload_startup, utc_webkit2_ewk_view_reload_cleanup},
+    {"utc_webkit2_ewk_view_resume_p", utc_webkit2_ewk_view_resume_p, utc_webkit2_ewk_view_resume_startup, utc_webkit2_ewk_view_resume_cleanup},
+    {"utc_webkit2_ewk_view_resume_n", utc_webkit2_ewk_view_resume_n, utc_webkit2_ewk_view_resume_startup, utc_webkit2_ewk_view_resume_cleanup},
+    {"utc_webkit2_ewk_view_scale_get_p", utc_webkit2_ewk_view_scale_get_p, utc_webkit2_ewk_view_scale_get_startup, utc_webkit2_ewk_view_scale_get_cleanup},
+    {"utc_webkit2_ewk_view_scale_get_n", utc_webkit2_ewk_view_scale_get_n, utc_webkit2_ewk_view_scale_get_startup, utc_webkit2_ewk_view_scale_get_cleanup},
+    {"utc_webkit2_ewk_view_scale_set_p", utc_webkit2_ewk_view_scale_set_p, utc_webkit2_ewk_view_scale_set_startup, utc_webkit2_ewk_view_scale_set_cleanup},
+    {"utc_webkit2_ewk_view_scale_set_n", utc_webkit2_ewk_view_scale_set_n, utc_webkit2_ewk_view_scale_set_startup, utc_webkit2_ewk_view_scale_set_cleanup},
+    {"utc_webkit2_ewk_view_script_execute_p", utc_webkit2_ewk_view_script_execute_p, utc_webkit2_ewk_view_script_execute_startup, utc_webkit2_ewk_view_script_execute_cleanup},
+    {"utc_webkit2_ewk_view_script_execute_n_1", utc_webkit2_ewk_view_script_execute_n_1, utc_webkit2_ewk_view_script_execute_startup, utc_webkit2_ewk_view_script_execute_cleanup},
+    {"utc_webkit2_ewk_view_script_execute_n_2", utc_webkit2_ewk_view_script_execute_n_2, utc_webkit2_ewk_view_script_execute_startup, utc_webkit2_ewk_view_script_execute_cleanup},
+    {"utc_ewk_view_scroll_by_p_1", utc_ewk_view_scroll_by_p_1, utc_ewk_view_scroll_by_startup, utc_ewk_view_scroll_by_cleanup},
+    {"utc_ewk_view_scroll_by_p_2", utc_ewk_view_scroll_by_p_2, utc_ewk_view_scroll_by_startup, utc_ewk_view_scroll_by_cleanup},
+    {"utc_ewk_view_scroll_by_p_3", utc_ewk_view_scroll_by_p_3, utc_ewk_view_scroll_by_startup, utc_ewk_view_scroll_by_cleanup},
+    {"utc_ewk_view_scroll_by_n", utc_ewk_view_scroll_by_n, utc_ewk_view_scroll_by_startup, utc_ewk_view_scroll_by_cleanup},
+    {"utc_ewk_view_scroll_pos_get_p_1", utc_ewk_view_scroll_pos_get_p_1, utc_ewk_view_scroll_pos_get_startup, utc_ewk_view_scroll_pos_get_cleanup},
+    {"utc_ewk_view_scroll_pos_get_p_2", utc_ewk_view_scroll_pos_get_p_2, utc_ewk_view_scroll_pos_get_startup, utc_ewk_view_scroll_pos_get_cleanup},
+    {"utc_ewk_view_scroll_pos_get_n", utc_ewk_view_scroll_pos_get_n, utc_ewk_view_scroll_pos_get_startup, utc_ewk_view_scroll_pos_get_cleanup},
+    {"utc_webkit2_ewk_view_scroll_set_p_1", utc_webkit2_ewk_view_scroll_set_p_1, utc_webkit2_ewk_view_scroll_set_startup, utc_webkit2_ewk_view_scroll_set_cleanup},
+    {"utc_webkit2_ewk_view_scroll_set_p_2", utc_webkit2_ewk_view_scroll_set_p_2, utc_webkit2_ewk_view_scroll_set_startup, utc_webkit2_ewk_view_scroll_set_cleanup},
+    {"utc_webkit2_ewk_view_scroll_set_p_3", utc_webkit2_ewk_view_scroll_set_p_3, utc_webkit2_ewk_view_scroll_set_startup, utc_webkit2_ewk_view_scroll_set_cleanup},
+    {"utc_webkit2_ewk_view_scroll_set_n", utc_webkit2_ewk_view_scroll_set_n, utc_webkit2_ewk_view_scroll_set_startup, utc_webkit2_ewk_view_scroll_set_cleanup},
+    {"utc_webkit2_ewk_view_settings_get_func_p", utc_webkit2_ewk_view_settings_get_func_p, utc_webkit2_ewk_view_settings_get_func_startup, utc_webkit2_ewk_view_settings_get_func_cleanup},
+    {"utc_webkit2_ewk_view_settings_get_func_n", utc_webkit2_ewk_view_settings_get_func_n, utc_webkit2_ewk_view_settings_get_func_startup, utc_webkit2_ewk_view_settings_get_func_cleanup},
+    {"utc_webkit2_ewk_view_stop_p", utc_webkit2_ewk_view_stop_p, utc_webkit2_ewk_view_stop_startup, utc_webkit2_ewk_view_stop_cleanup},
+    {"utc_webkit2_ewk_view_stop_n", utc_webkit2_ewk_view_stop_n, utc_webkit2_ewk_view_stop_startup, utc_webkit2_ewk_view_stop_cleanup},
+    {"utc_webkit2_ewk_view_suspend_p", utc_webkit2_ewk_view_suspend_p, utc_webkit2_ewk_view_suspend_startup, utc_webkit2_ewk_view_suspend_cleanup},
+    {"utc_webkit2_ewk_view_suspend_n", utc_webkit2_ewk_view_suspend_n, utc_webkit2_ewk_view_suspend_startup, utc_webkit2_ewk_view_suspend_cleanup},
+    {"utc_webkit2_ewk_view_text_find_func_p", utc_webkit2_ewk_view_text_find_func_p, utc_webkit2_ewk_view_text_find_func_startup, utc_webkit2_ewk_view_text_find_func_cleanup},
+    {"utc_webkit2_ewk_view_text_find_func_n", utc_webkit2_ewk_view_text_find_func_n, utc_webkit2_ewk_view_text_find_func_startup, utc_webkit2_ewk_view_text_find_func_cleanup},
+    {"utc_webkit2_ewk_view_title_get_p", utc_webkit2_ewk_view_title_get_p, utc_webkit2_ewk_view_title_get_startup, utc_webkit2_ewk_view_title_get_cleanup},
+    {"utc_webkit2_ewk_view_title_get_n", utc_webkit2_ewk_view_title_get_n, utc_webkit2_ewk_view_title_get_startup, utc_webkit2_ewk_view_title_get_cleanup},
+    {"utc_webkit2_ewk_view_url_get_p", utc_webkit2_ewk_view_url_get_p, utc_webkit2_ewk_view_url_get_startup, utc_webkit2_ewk_view_url_get_cleanup},
+    {"utc_webkit2_ewk_view_url_get_n", utc_webkit2_ewk_view_url_get_n, utc_webkit2_ewk_view_url_get_startup, utc_webkit2_ewk_view_url_get_cleanup},
+    {"utc_webkit2_ewk_view_url_request_set_p", utc_webkit2_ewk_view_url_request_set_p, utc_webkit2_ewk_view_url_request_set_startup, utc_webkit2_ewk_view_url_request_set_cleanup},
+    {"utc_webkit2_ewk_view_url_request_set_n_1", utc_webkit2_ewk_view_url_request_set_n_1, utc_webkit2_ewk_view_url_request_set_startup, utc_webkit2_ewk_view_url_request_set_cleanup},
+    {"utc_webkit2_ewk_view_url_request_set_n_2", utc_webkit2_ewk_view_url_request_set_n_2, utc_webkit2_ewk_view_url_request_set_startup, utc_webkit2_ewk_view_url_request_set_cleanup},
+    {"utc_webkit2_ewk_view_url_request_set_n_3", utc_webkit2_ewk_view_url_request_set_n_3, utc_webkit2_ewk_view_url_request_set_startup, utc_webkit2_ewk_view_url_request_set_cleanup},
+    {"utc_webkit2_ewk_view_url_set_p", utc_webkit2_ewk_view_url_set_p, utc_webkit2_ewk_view_url_set_startup, utc_webkit2_ewk_view_url_set_cleanup},
+    {"utc_webkit2_ewk_view_url_set_n", utc_webkit2_ewk_view_url_set_n, utc_webkit2_ewk_view_url_set_startup, utc_webkit2_ewk_view_url_set_cleanup},
+    {"utc_ewk_view_user_agent_get_p", utc_ewk_view_user_agent_get_p, utc_ewk_view_user_agent_get_startup, utc_ewk_view_user_agent_get_cleanup},
+    {"utc_ewk_view_user_agent_get_n_1", utc_ewk_view_user_agent_get_n_1, utc_ewk_view_user_agent_get_startup, utc_ewk_view_user_agent_get_cleanup},
+    {"utc_ewk_view_user_agent_set_p", utc_ewk_view_user_agent_set_p, utc_ewk_view_user_agent_set_startup, utc_ewk_view_user_agent_set_cleanup},
+    {"utc_ewk_view_user_agent_set_n", utc_ewk_view_user_agent_set_n, utc_ewk_view_user_agent_set_startup, utc_ewk_view_user_agent_set_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_WEBKIT2_CORE_H__
diff --git a/src/utc/webkit2/utc_webkit2_ewk.h b/src/utc/webkit2/utc_webkit2_ewk.h
new file mode 100755 (executable)
index 0000000..c03f965
--- /dev/null
@@ -0,0 +1,208 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef UTC_WEBKIT2_EWK_H
+#define UTC_WEBKIT2_EWK_H
+
+/* Common headers */
+#include <Ecore_Evas.h>
+#include <Ecore.h>
+#include <Edje.h>
+#include <Eina.h>
+#include <Elementary.h>
+#include <EWebKit.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <storage.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Definitions and macros */
+#define DEFAULT_WIDTH_OF_WINDOW 480
+#define DEFAULT_HEIGHT_OF_WINDOW 800
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+/* A short 'smart data' getter */
+#define EWK_VIEW_SD_GET(o, ptr) \
+    Ewk_View_Smart_Data *ptr = (Ewk_View_Smart_Data *)evas_object_smart_data_get(o)
+
+/* A structure that collects shared object variables */
+struct Ewk_Test_View {
+    Evas_Object* window;
+    Evas* evas;
+    Evas_Object* background;
+    Evas_Object* webview;
+    Evas_Smart*  evas_smart_class;
+};
+
+#ifndef NOT_USE_INIT_END
+
+/* A shared object (of type of the above structure). The object is initialized by startup()
+   and used in testing functions */
+static struct Ewk_Test_View test_view;
+
+#define FILE_PREFIX "file://"
+static const char* COMMON_SAMPLE_HTML_FILE = NULL;
+static const char* COMMON_SAMPLE_HTML_FILENAME = "common/sample.html";
+static const char* COMMON_SAMPLE1_HTML_FILE = NULL;
+static const char* COMMON_SAMPLE1_HTML_FILENAME = "common/sample_1.html";
+static const char* COMMON_SAMPLE2_HTML_FILE = NULL;
+static const char* COMMON_SAMPLE2_HTML_FILENAME = "common/sample_2.html";
+static const char* EWK_VIEW_BACK_FORWARD_HTML_FILE = NULL;
+static const char* EWK_VIEW_BACK_FORWARD_HTML_FILENAME = "ewk_view/back_forward.html";
+static const char* EWK_VIEW_SAMPLE_HTML_FILE = NULL;
+static const char* EWK_VIEW_SAMPLE_HTML_FILENAME = "ewk_view/sample.html";
+static const char* EWK_VIEW_TEXT_FIND_HTML_FILE = NULL;
+static const char* EWK_VIEW_TEXT_FIND_HTML_FILENAME = "ewk_view/text_find.html";
+
+static bool ewk_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) {
+        COMMON_SAMPLE_HTML_FILE = (char*)malloc(strlen(path) + strlen(COMMON_SAMPLE_HTML_FILENAME) + strlen(FILE_PREFIX) + 6);
+        sprintf(COMMON_SAMPLE_HTML_FILE, "%s%s/res/%s", FILE_PREFIX, path, COMMON_SAMPLE_HTML_FILENAME);
+
+        COMMON_SAMPLE1_HTML_FILE = (char*)malloc(strlen(path) + strlen(COMMON_SAMPLE1_HTML_FILENAME) + strlen(FILE_PREFIX) + 6);
+        sprintf(COMMON_SAMPLE1_HTML_FILE, "%s%s/res/%s", FILE_PREFIX, path, COMMON_SAMPLE1_HTML_FILENAME);
+
+        COMMON_SAMPLE2_HTML_FILE = (char*)malloc(strlen(path) + strlen(COMMON_SAMPLE2_HTML_FILENAME) + strlen(FILE_PREFIX) + 6);
+        sprintf(COMMON_SAMPLE2_HTML_FILE, "%s%s/res/%s", FILE_PREFIX, path, COMMON_SAMPLE2_HTML_FILENAME);
+
+        EWK_VIEW_BACK_FORWARD_HTML_FILE = (char*)malloc(strlen(path) + strlen(EWK_VIEW_BACK_FORWARD_HTML_FILENAME) + strlen(FILE_PREFIX) + 6);
+        sprintf(EWK_VIEW_BACK_FORWARD_HTML_FILE, "%s%s/res/%s", FILE_PREFIX, path, EWK_VIEW_BACK_FORWARD_HTML_FILENAME);
+
+        EWK_VIEW_SAMPLE_HTML_FILE = (char*)malloc(strlen(path) + strlen(EWK_VIEW_SAMPLE_HTML_FILENAME) + strlen(FILE_PREFIX) + 6);
+        sprintf(EWK_VIEW_SAMPLE_HTML_FILE, "%s%s/res/%s", FILE_PREFIX, path, EWK_VIEW_SAMPLE_HTML_FILENAME);
+
+        EWK_VIEW_TEXT_FIND_HTML_FILE = (char*)malloc(strlen(path) + strlen(EWK_VIEW_TEXT_FIND_HTML_FILENAME) + strlen(FILE_PREFIX) + 6);
+        sprintf(EWK_VIEW_TEXT_FIND_HTML_FILE, "%s%s/res/%s", FILE_PREFIX, path, EWK_VIEW_TEXT_FIND_HTML_FILENAME);
+        return false;
+    }
+
+    return true;
+}
+
+static void utc_webkit2_ewk_test_res_init()
+{
+    if(storage_foreach_device_supported(ewk_storage_device_supported_cb, NULL) != STORAGE_ERROR_NONE) {        
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+    }
+    if(COMMON_SAMPLE_HTML_FILE == NULL || COMMON_SAMPLE1_HTML_FILE == NULL || 
+       COMMON_SAMPLE2_HTML_FILE == NULL  || EWK_VIEW_BACK_FORWARD_HTML_FILE == NULL || 
+       EWK_VIEW_SAMPLE_HTML_FILE == NULL || EWK_VIEW_TEXT_FIND_HTML_FILE == NULL) {
+        fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
+    }
+}
+
+/**
+ * Initiates objects used in the test.
+ *
+ * This function should be _always_ called before the actual test starts.
+ * @see utc_webkit2_ewk_test_end()
+ */
+static void utc_webkit2_ewk_test_init()
+{
+    g_type_init();
+    elm_init(0, NULL);
+
+    elm_config_preferred_engine_set("opengl_x11");
+
+    test_view.window = elm_win_add(NULL, "TC Launcher", ELM_WIN_BASIC);
+    elm_win_title_set(test_view.window, "TC Launcher");
+    test_view.evas = evas_object_evas_get(test_view.window);
+
+    test_view.background = evas_object_rectangle_add(test_view.evas);
+    evas_object_name_set(test_view.background, "view");
+    evas_object_color_set(test_view.background, 255, 0, 255, 255);
+    evas_object_move(test_view.background, 0, 0);
+    evas_object_resize(test_view.background, DEFAULT_WIDTH_OF_WINDOW, DEFAULT_HEIGHT_OF_WINDOW);
+    evas_object_layer_set(test_view.background, EVAS_LAYER_MIN);
+    //evas_object_show(test_view.background);
+
+    /* 3. Initialization of webview */
+    test_view.webview = ewk_view_add(test_view.evas);
+    evas_object_move(test_view.webview, 10, 10);
+    evas_object_resize(test_view.webview, DEFAULT_WIDTH_OF_WINDOW-20, DEFAULT_HEIGHT_OF_WINDOW-20);
+
+    //evas_object_show(test_view.webview);
+    //evas_object_show(test_view.window);
+    utc_webkit2_ewk_test_res_init();
+}
+
+static void utc_webkit2_ewk_test_res_end(void)
+{
+    if(COMMON_SAMPLE_HTML_FILE != NULL) {
+        free(COMMON_SAMPLE_HTML_FILE);
+    }
+    if(COMMON_SAMPLE1_HTML_FILE != NULL) {
+        free(COMMON_SAMPLE1_HTML_FILE);
+    }
+    if(COMMON_SAMPLE2_HTML_FILE != NULL) {
+        free(COMMON_SAMPLE2_HTML_FILE);
+    }
+    if(EWK_VIEW_BACK_FORWARD_HTML_FILE != NULL) {
+        free(EWK_VIEW_BACK_FORWARD_HTML_FILE);
+    }
+    if(EWK_VIEW_SAMPLE_HTML_FILE != NULL) {
+        free(EWK_VIEW_SAMPLE_HTML_FILE);
+    }
+    if(EWK_VIEW_TEXT_FIND_HTML_FILE != NULL) {
+        free(EWK_VIEW_TEXT_FIND_HTML_FILE);
+    }
+}
+
+/**
+ * Frees resources used during the test.
+ * This function should be _always_ called after the test is completed.
+ * @see utc_webkit2_ewk_test_init()
+ */
+static void utc_webkit2_ewk_test_end(void)
+{
+    /* 1. Freeing resources */
+    if (test_view.webview)
+        evas_object_del(test_view.webview);
+
+    if (test_view.window)
+        evas_object_del(test_view.window);
+
+    /* 2. Closing whole EWK */
+    ewk_shutdown();
+    elm_shutdown();
+    utc_webkit2_ewk_test_res_end();
+}
+
+#endif
+
+/**
+ * Begins main application loop.
+ */
+
+#define utc_webkit2_main_loop_begin ecore_main_loop_begin
+
+/**
+ * Ends main application loop.
+ */
+
+#define utc_webkit2_main_loop_quit ecore_main_loop_quit
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_count_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_count_func.c
new file mode 100755 (executable)
index 0000000..aa68e0e
--- /dev/null
@@ -0,0 +1,71 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "utc_webkit2_ewk.h"
+#include "assert.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_count_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_back_forward_list_count_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_count_func_p(void)
+{
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    unsigned count = ewk_back_forward_list_count(list);
+    assert_eq(count, 1);
+    return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_count_func_n(void)
+{
+    unsigned count = ewk_back_forward_list_count(NULL);
+    assert_eq(count, 0);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_current_item_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_current_item_get_func.c
new file mode 100755 (executable)
index 0000000..5af474d
--- /dev/null
@@ -0,0 +1,79 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "utc_webkit2_ewk.h"
+#include "assert.h"
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_current_item_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_back_forward_list_current_item_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_current_item_get_func_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    Ewk_Back_Forward_List_Item *item = ewk_back_forward_list_current_item_get(list);
+    assert_neq(item, 0);
+    if (strcmp(ewk_back_forward_list_item_url_get(item), COMMON_SAMPLE_HTML_FILE))
+        result = EINA_TRUE;
+    if (strcmp(ewk_back_forward_list_item_title_get(item), "Testing Sample Page"))
+        result = EINA_TRUE;
+    if (strcmp(ewk_back_forward_list_item_original_url_get(item), COMMON_SAMPLE_HTML_FILE))
+        result = EINA_TRUE;
+    assert_neq(result , EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_current_item_get_func_n(void)
+{
+    Ewk_Back_Forward_List_Item *item = ewk_back_forward_list_current_item_get(NULL);
+    assert_eq(item,0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_at_index_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_at_index_get_func.c
new file mode 100755 (executable)
index 0000000..26684e7
--- /dev/null
@@ -0,0 +1,90 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_item_at_index_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_back_forward_list_item_at_index_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_item_at_index_get_func_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    loadURL(COMMON_SAMPLE1_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    Ewk_Back_Forward_List_Item * getPrevItem = ewk_back_forward_list_item_at_index_get(list, -1);
+    assert_neq(getPrevItem, 0);
+       if (strcmp(ewk_back_forward_list_item_url_get(getPrevItem), COMMON_SAMPLE_HTML_FILE))
+        result = EINA_TRUE;
+
+    if (strcmp(ewk_back_forward_list_item_title_get(getPrevItem), "Testing Sample Page"))
+        result = EINA_TRUE;
+
+    if (strcmp(ewk_back_forward_list_item_original_url_get(getPrevItem), COMMON_SAMPLE_HTML_FILE))
+        result = EINA_TRUE;
+
+    assert_neq(result , EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_item_at_index_get_func_n(void)
+{
+    Ewk_Back_Forward_List_Item * getPrevItem = ewk_back_forward_list_item_at_index_get(NULL, 0);
+    assert_eq(getPrevItem, 0);
+
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    getPrevItem = ewk_back_forward_list_item_at_index_get(list, 2);
+    assert_eq(getPrevItem, 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_original_url_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_original_url_get_func.c
new file mode 100755 (executable)
index 0000000..98bd504
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "utc_webkit2_ewk.h"
+#include "assert.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_item_original_url_get_func_startup(void)
+{
+   utc_webkit2_ewk_test_init();
+   evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+   evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_back_forward_list_item_original_url_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_item_original_url_get_func_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    Ewk_Back_Forward_List_Item *item = ewk_back_forward_list_current_item_get(list);
+    assert_neq(item, 0);
+    const char *origUrl = ewk_back_forward_list_item_original_url_get(item);
+    if (strcmp(origUrl,COMMON_SAMPLE_HTML_FILE))
+        result = EINA_TRUE;
+    assert_neq(result , EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_item_original_url_get_func_n(void)
+{
+    const char *origUrl = ewk_back_forward_list_item_original_url_get(NULL);
+    assert_eq(origUrl, 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_ref_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_ref_func.c
new file mode 100755 (executable)
index 0000000..d5b04b4
--- /dev/null
@@ -0,0 +1,70 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_item_ref_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_back_forward_list_item_ref_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_item_ref_func_p(void)
+{
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    Ewk_Back_Forward_List_Item *item = ewk_back_forward_list_item_ref(ewk_back_forward_list_current_item_get(list));
+    assert_neq(item, 0);
+    return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_item_ref_func_n(void)
+{
+    Ewk_Back_Forward_List_Item *item = ewk_back_forward_list_item_ref(NULL);
+    assert_eq(item,0);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_title_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_title_get_func.c
new file mode 100755 (executable)
index 0000000..06f13f3
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "utc_webkit2_ewk.h"
+#include "assert.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_item_title_get_func_startup(void)
+{
+   utc_webkit2_ewk_test_init();
+   evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+   evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_back_forward_list_item_title_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_item_title_get_func_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    Ewk_Back_Forward_List_Item *item = ewk_back_forward_list_current_item_get(list);
+    const char *title = ewk_back_forward_list_item_title_get(item);
+    if (strcmp(title,"Testing Sample Page"))
+        result = EINA_TRUE;
+    assert_neq(result , EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_item_title_get_func_n(void)
+{
+    const char *title = ewk_back_forward_list_item_title_get(NULL);
+    assert_eq(title, 0);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_unref_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_unref_func.c
new file mode 100755 (executable)
index 0000000..744bf2e
--- /dev/null
@@ -0,0 +1,73 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_item_unref_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+
+}
+
+void utc_webkit2_ewk_back_forward_list_item_unref_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_item_unref_func_p(void)
+{
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    Ewk_Back_Forward_List_Item *item = ewk_back_forward_list_item_ref(ewk_back_forward_list_current_item_get(list));
+    ewk_back_forward_list_item_unref(ewk_back_forward_list_current_item_get(list));
+    item = ewk_back_forward_list_current_item_get(list);
+    assert_neq(item, 0);
+   return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_item_unref_func_n(void)
+{
+    ewk_back_forward_list_item_unref(NULL);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_url_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_item_url_get_func.c
new file mode 100755 (executable)
index 0000000..21d27a0
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "utc_webkit2_ewk.h"
+#include "assert.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_item_url_get_func_startup(void)
+{
+   utc_webkit2_ewk_test_init();
+   evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+   evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_back_forward_list_item_url_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_item_url_get_func_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    Ewk_Back_Forward_List_Item *item = ewk_back_forward_list_current_item_get(list);
+    const char *url = ewk_back_forward_list_item_url_get(item);
+    if (strcmp(url,COMMON_SAMPLE_HTML_FILE))
+       result = EINA_TRUE;
+
+    assert_neq(result , EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_item_url_get_func_n(void)
+{
+    const char *url = ewk_back_forward_list_item_url_get(NULL);
+    assert_eq(url, 0);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_n_back_items_copy_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_n_back_items_copy_func.c
new file mode 100755 (executable)
index 0000000..88da214
--- /dev/null
@@ -0,0 +1,103 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "utc_webkit2_ewk.h"
+#include "assert.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_startup(void)
+{
+   utc_webkit2_ewk_test_init();
+   evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+   evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    loadURL(COMMON_SAMPLE1_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    loadURL(COMMON_SAMPLE2_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    unsigned count = ewk_back_forward_list_count(list);
+    Eina_List * copyBackList = ewk_back_forward_list_n_back_items_copy(list, count - 1);
+
+    assert_neq(copyBackList, 0);
+    assert_eq(eina_list_count(copyBackList), 2);
+
+    Ewk_Back_Forward_List_Item* item = eina_list_nth(copyBackList, 0);
+    assert_neq(item, 0);
+    if (strcmp(ewk_back_forward_list_item_url_get(item), COMMON_SAMPLE_HTML_FILE))
+        result = EINA_TRUE;
+    if (strcmp(ewk_back_forward_list_item_title_get(item), "Testing Sample Page"))
+        result = EINA_TRUE;
+    if (strcmp(ewk_back_forward_list_item_original_url_get(item), COMMON_SAMPLE_HTML_FILE))
+        result = EINA_TRUE;
+    assert_neq(result , EINA_TRUE);
+
+    item = eina_list_nth(copyBackList, 1);
+    assert_neq(item, 0);
+    if (strcmp(ewk_back_forward_list_item_url_get(item), COMMON_SAMPLE1_HTML_FILE))
+        result = EINA_TRUE;
+    if (strcmp(ewk_back_forward_list_item_title_get(item), "Testing Sample Page 1"))
+        result = EINA_TRUE;
+    if (strcmp(ewk_back_forward_list_item_original_url_get(item), COMMON_SAMPLE1_HTML_FILE))
+        result = EINA_TRUE;
+    assert_neq(result , EINA_TRUE);
+
+    return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_n_back_items_copy_func_n(void)
+{
+    Eina_List * copyBackList = ewk_back_forward_list_n_back_items_copy(NULL, 0);
+    assert_eq(copyBackList, 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func.c
new file mode 100755 (executable)
index 0000000..0f70ea0
--- /dev/null
@@ -0,0 +1,98 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "utc_webkit2_ewk.h"
+#include "assert.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_startup(void)
+{
+   utc_webkit2_ewk_test_init();
+   evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+   evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    loadURL(COMMON_SAMPLE1_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    loadURL(COMMON_SAMPLE2_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    ewk_view_back(test_view.webview);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    ewk_view_back(test_view.webview);
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    Eina_List * copyForwardList = ewk_back_forward_list_n_forward_items_copy(list,1);
+
+    assert_neq(copyForwardList, 0);
+    assert_eq(eina_list_count(copyForwardList), 1);
+
+    Ewk_Back_Forward_List_Item* item = eina_list_nth(copyForwardList, 0);
+    assert_neq(item, 0);
+    if (strcmp(ewk_back_forward_list_item_url_get(item), COMMON_SAMPLE2_HTML_FILE))
+        result = EINA_TRUE;
+    if (strcmp(ewk_back_forward_list_item_title_get(item), "Testing Sample Page 2"))
+        result = EINA_TRUE;
+    if (strcmp(ewk_back_forward_list_item_original_url_get(item), COMMON_SAMPLE2_HTML_FILE))
+        result = EINA_TRUE;
+    assert_neq(result , EINA_TRUE);
+
+    return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_n_forward_items_copy_func_n(void)
+{
+    Eina_List * copyForwardList = ewk_back_forward_list_n_forward_items_copy(NULL, 0);
+    assert_eq(copyForwardList, 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_next_item_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_next_item_get_func.c
new file mode 100755 (executable)
index 0000000..e229700
--- /dev/null
@@ -0,0 +1,87 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "utc_webkit2_ewk.h"
+#include "assert.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_next_item_get_func_startup(void)
+{
+   utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+   evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_back_forward_list_next_item_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_next_item_get_func_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    loadURL(COMMON_SAMPLE1_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    ewk_view_back(test_view.webview);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    Ewk_Back_Forward_List_Item * getNextItem = ewk_back_forward_list_next_item_get(list);
+    assert_neq(getNextItem, 0);
+    if (strcmp(ewk_back_forward_list_item_url_get(getNextItem), COMMON_SAMPLE1_HTML_FILE))
+        result = EINA_TRUE;
+    if (strcmp(ewk_back_forward_list_item_title_get(getNextItem), "Testing Sample Page 1"))
+        result = EINA_TRUE;
+    if (strcmp(ewk_back_forward_list_item_original_url_get(getNextItem), COMMON_SAMPLE1_HTML_FILE))
+        result = EINA_TRUE;
+    assert_neq(result , EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_next_item_get_func_n(void)
+{
+    Ewk_Back_Forward_List_Item * getNextItem = ewk_back_forward_list_next_item_get(NULL);
+    assert_eq(getNextItem, 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_previous_item_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_back_forward_list_previous_item_get_func.c
new file mode 100755 (executable)
index 0000000..9b4a4bb
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "utc_webkit2_ewk.h"
+#include "assert.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_back_forward_list_previous_item_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_back_forward_list_previous_item_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_back_forward_list_previous_item_get_func_p(void)
+{
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    if (isFailed == EINA_FALSE)
+        utc_webkit2_main_loop_begin();
+    else
+        assert_neq(isFailed,TRUE);
+
+    loadURL(COMMON_SAMPLE1_HTML_FILE);
+    if (isFailed == EINA_FALSE)
+        utc_webkit2_main_loop_begin();
+    else
+        assert_neq(isFailed, TRUE);
+
+    Ewk_Back_Forward_List *list = ewk_view_back_forward_list_get(test_view.webview);
+    Ewk_Back_Forward_List_Item * getPreviousItem = ewk_back_forward_list_previous_item_get(list);
+    assert_neq(getPreviousItem, 0);
+    if (!(strcmp(ewk_back_forward_list_item_url_get(getPreviousItem), COMMON_SAMPLE_HTML_FILE)))
+               isFailed = EINA_TRUE;
+       assert_neq(isFailed, EINA_FALSE);
+
+    return 0;
+}
+
+int utc_webkit2_ewk_back_forward_list_previous_item_get_func_n(void)
+{
+    Ewk_Back_Forward_List_Item * getPreviousItem = ewk_back_forward_list_previous_item_get(NULL);
+    assert_eq(getPreviousItem, 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_context_cache_model_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_context_cache_model_get_func.c
new file mode 100755 (executable)
index 0000000..68ee3b4
--- /dev/null
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_context_cache_model_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_context_cache_model_get_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Checking whether cache model is returned to EWK_CACHE_MODEL_DOCUMENT_VIEWER.
+ */
+int utc_webkit2_ewk_context_cache_model_get_func_p_1(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(ewk_view_context_get(test_view.webview), EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+    assert_neq(result, 0);
+    assert_eq(ewk_context_cache_model_get(ewk_view_context_get(test_view.webview)), EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+    return 0;
+}
+
+/**
+ * @brief Checking whether cache model is returned to EWK_CACHE_MODEL_DOCUMENT_BROWSER.
+ */
+int utc_webkit2_ewk_context_cache_model_get_func_p_2(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(ewk_view_context_get(test_view.webview), EWK_CACHE_MODEL_DOCUMENT_BROWSER);
+    assert_neq(result, 0);
+    assert_eq(ewk_context_cache_model_get(ewk_view_context_get(test_view.webview)), EWK_CACHE_MODEL_DOCUMENT_BROWSER);
+    return 0;
+}
+
+/**
+ * @brief Checking whether cache model is returned to EWK_CACHE_MODEL_PRIMARY_WEBBROWSER.
+ */
+int utc_webkit2_ewk_context_cache_model_get_func_p_3(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(ewk_view_context_get(test_view.webview), EWK_CACHE_MODEL_PRIMARY_WEBBROWSER);
+    assert_neq(result, 0);
+    assert_eq(ewk_context_cache_model_get(ewk_view_context_get(test_view.webview)), EWK_CACHE_MODEL_PRIMARY_WEBBROWSER);
+    return 0;
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+int utc_webkit2_ewk_context_cache_model_get_func_n_1(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(NULL, EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+    assert_eq(result, 0);
+    assert_eq(ewk_context_cache_model_get(NULL), EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+    return 0;
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+int utc_webkit2_ewk_context_cache_model_get_func_n_2(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(NULL, EWK_CACHE_MODEL_DOCUMENT_BROWSER);
+    assert_eq(result, 0);
+    assert_eq(ewk_context_cache_model_get(NULL), EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+    return 0;
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+int utc_webkit2_ewk_context_cache_model_get_func_n_3(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(NULL, EWK_CACHE_MODEL_PRIMARY_WEBBROWSER);
+    assert_eq(result, 0);
+    assert_eq(ewk_context_cache_model_get(NULL), EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_context_cache_model_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_context_cache_model_set_func.c
new file mode 100755 (executable)
index 0000000..7ed20e7
--- /dev/null
@@ -0,0 +1,89 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_context_cache_model_set_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_context_cache_model_set_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Checking whether cache model is set to EWK_CACHE_MODEL_DOCUMENT_VIEWER.
+ */
+int utc_webkit2_ewk_context_cache_model_set_func_p_1(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(ewk_view_context_get(test_view.webview), EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+    assert_neq(result, EINA_FALSE);
+    return 0;
+}
+
+/**
+ * @brief Checking whether cache model is set to EWK_CACHE_MODEL_DOCUMENT_BROWSER.
+ */
+int utc_webkit2_ewk_context_cache_model_set_func_p_2(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(ewk_view_context_get(test_view.webview), EWK_CACHE_MODEL_DOCUMENT_BROWSER);
+    assert_neq(result, EINA_FALSE);
+    return 0;
+}
+
+/**
+ * @brief Checking whether cache model is set to EWK_CACHE_MODEL_PRIMARY_WEBBROWSER.
+ */
+int utc_webkit2_ewk_context_cache_model_set_func_p_3(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(ewk_view_context_get(test_view.webview), EWK_CACHE_MODEL_PRIMARY_WEBBROWSER);
+    assert_neq(result, EINA_FALSE);
+    return 0;
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+int utc_webkit2_ewk_context_cache_model_set_func_n_1(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(NULL, EWK_CACHE_MODEL_DOCUMENT_VIEWER);
+    assert_neq(result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+int utc_webkit2_ewk_context_cache_model_set_func_n_2(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(NULL, EWK_CACHE_MODEL_DOCUMENT_BROWSER);
+    assert_neq(result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+int utc_webkit2_ewk_context_cache_model_set_func_n_3(void)
+{
+    Eina_Bool result = ewk_context_cache_model_set(NULL, EWK_CACHE_MODEL_PRIMARY_WEBBROWSER);
+    assert_neq(result, EINA_TRUE);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_context_cookie_manager_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_context_cookie_manager_get_func.c
new file mode 100755 (executable)
index 0000000..b66cf1c
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+
+void utc_webkit2_ewk_context_cookie_manager_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_context_cookie_manager_get_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case of ewk_context_cookie_manager_get()
+ */
+int utc_webkit2_ewk_context_cookie_manager_get_func_p(void)
+{
+    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+    if (cookieManager) {
+        assert(1);
+    }
+    return 0;
+}
+
+/**
+ * @brief  checking whether ewk_context_cookie_manager_get return NULL when passing NULL value.
+ */
+int utc_webkit2_ewk_context_cookie_manager_get_func_n(void)
+{
+    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(NULL);
+    assert_eq(cookieManager, 0);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_context_resource_cache_clear_func.c b/src/utc/webkit2/utc_webkit2_ewk_context_resource_cache_clear_func.c
new file mode 100755 (executable)
index 0000000..5f7216a
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_context_resource_cache_clear_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_context_resource_cache_clear_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Checking whether cache is cleared.
+ */
+int utc_webkit2_ewk_context_resource_cache_clear_func_p(void)
+{
+    ewk_context_resource_cache_clear(ewk_view_context_get(test_view.webview));
+
+    return 0;
+}
+
+/**
+ * @brief Checking whether function works properly in case of NULL of a context.
+ */
+int utc_webkit2_ewk_context_resource_cache_clear_func_n(void)
+{
+    ewk_context_resource_cache_clear(NULL);
+
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_cookie_manager_accept_policy_async_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_cookie_manager_accept_policy_async_get_func.c
new file mode 100755 (executable)
index 0000000..204db8c
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static void getAcceptPolicyCallback(Ewk_Cookie_Accept_Policy policy, void* event_info)
+{
+    Ewk_Cookie_Accept_Policy* ret = (Ewk_Cookie_Accept_Policy*)event_info;
+    *ret = policy;
+    utc_webkit2_main_loop_quit();
+}
+
+static Ewk_Cookie_Accept_Policy getAcceptPolicy(Ewk_Cookie_Manager* manager)
+{
+    Ewk_Cookie_Accept_Policy policy = EWK_COOKIE_ACCEPT_POLICY_ALWAYS;
+    ewk_cookie_manager_accept_policy_async_get(manager, getAcceptPolicyCallback, &policy);
+    utc_webkit2_main_loop_begin();
+    return policy;
+}
+void utc_ewk_cookie_manager_accept_policy_async_get_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_ewk_cookie_manager_accept_policy_async_get_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case of ewk_cookie_manager_accept_policy_async_get()
+ */
+int utc_ewk_cookie_manager_accept_policy_async_get_p(void)
+{
+    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+    ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY);
+    assert_eq(getAcceptPolicy(cookieManager), EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY);
+    return 0;
+}
+
+/**
+ * @brief Negative test case of ewk_cookie_manager_accept_policy_async_get()
+ */
+int utc_ewk_cookie_manager_accept_policy_async_get_n(void)
+{
+    ewk_cookie_manager_accept_policy_async_get(NULL, NULL, NULL);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_cookie_manager_accept_policy_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_cookie_manager_accept_policy_set_func.c
new file mode 100755 (executable)
index 0000000..c95ecc9
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static void getAcceptPolicyCallback(Ewk_Cookie_Accept_Policy policy, void* event_info)
+{
+    Ewk_Cookie_Accept_Policy* ret = (Ewk_Cookie_Accept_Policy*)event_info;
+    *ret = policy;
+    utc_webkit2_main_loop_quit();
+}
+
+static Ewk_Cookie_Accept_Policy getAcceptPolicy(Ewk_Cookie_Manager* manager)
+{
+    Ewk_Cookie_Accept_Policy policy = EWK_COOKIE_ACCEPT_POLICY_ALWAYS;
+    ewk_cookie_manager_accept_policy_async_get(manager, getAcceptPolicyCallback, &policy);
+    utc_webkit2_main_loop_begin();
+    return policy;
+}
+void utc_ewk_cookie_manager_accept_policy_set_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_ewk_cookie_manager_accept_policy_set_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case of ewk_cookie_manager_accept_policy_set()
+ */
+int utc_ewk_cookie_manager_accept_policy_set_p(void)
+{
+    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+    ewk_cookie_manager_accept_policy_set(cookieManager, EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
+    assert_eq(getAcceptPolicy(cookieManager), EWK_COOKIE_ACCEPT_POLICY_ALWAYS);
+    return 0;
+}
+
+/**
+ * @brief Negative test case of ewk_cookie_manager_accept_policy_set()
+ */
+int utc_ewk_cookie_manager_accept_policy_set_n(void)
+{
+    ewk_cookie_manager_accept_policy_async_get(NULL, NULL, NULL);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_cookie_manager_cookies_clear_func.c b/src/utc/webkit2/utc_webkit2_ewk_cookie_manager_cookies_clear_func.c
new file mode 100755 (executable)
index 0000000..0f7aba2
--- /dev/null
@@ -0,0 +1,79 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+/* Callback for load finished */
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+
+    isLoadSucceed = EINA_FALSE;
+}
+
+void utc_webkit2_ewk_cookie_manager_cookies_clear_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_cookie_manager_cookies_clear_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case of ewk_cookie_manager_cookies_clear()
+ */
+int utc_webkit2_ewk_cookie_manager_cookies_clear_func_p(void)
+{
+    Ewk_Cookie_Manager* cookieManager = ewk_context_cookie_manager_get(ewk_view_context_get(test_view.webview));
+
+    // Fixme: We should use COMMON_SAMPLE_HTML_FILE instead of http://tizen.org
+    // becuase 2.3.1 wearable target doesn't support wifi.
+    // ewk_view_url_set(test_view.webview, "http://tizen.org");
+    ewk_view_url_set(test_view.webview, "COMMON_SAMPLE_HTML_FILE");
+
+    // Wait until load finished.
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    // Clear all cookies
+    ewk_cookie_manager_cookies_clear(cookieManager);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of ewk_cookie_manager_cookies_clear()
+ */
+int utc_webkit2_ewk_cookie_manager_cookies_clear_func_n(void)
+{
+    ewk_cookie_manager_cookies_clear(NULL);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_init_func.c b/src/utc/webkit2/utc_webkit2_ewk_init_func.c
new file mode 100755 (executable)
index 0000000..11cd28d
--- /dev/null
@@ -0,0 +1,43 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+void utc_webkit2_ewk_init_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_init_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+
+int utc_webkit2_ewk_init_func_p(void)
+{
+    assert_neq(ewk_init(), 0);
+    return 0;
+}
+
+
+int utc_webkit2_ewk_init_func_n(void)
+{
+    ewk_shutdown();
+    assert_eq(ewk_init(), 0);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_cookie_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_cookie_get_func.c
new file mode 100755 (executable)
index 0000000..ddaa0a5
--- /dev/null
@@ -0,0 +1,78 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool gResult = EINA_FALSE;
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void get_policy_decision_cb(void* data, Evas_Object* webview, void* event_info)
+{
+    Ewk_Policy_Decision* policy = (Ewk_Policy_Decision*)event_info;
+    if (ewk_policy_decision_cookie_get(policy))
+        gResult = EINA_TRUE;
+}
+
+/* Callback for load finished */
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_cookie_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+    evas_object_smart_callback_add(test_view.webview,"policy,navigation,decide", get_policy_decision_cb, NULL);
+
+}
+
+void utc_webkit2_ewk_policy_decision_cookie_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    evas_object_smart_callback_del(test_view.webview, "policy,navigation,decide", NULL);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_policy_decision_cookie_get_func_p(void)
+{
+    isFailed = EINA_FALSE;
+
+    if (!ewk_view_url_set(test_view.webview, "http://www.tizen.org"))
+        isFailed = EINA_TRUE;
+    if (isFailed == EINA_FALSE)
+        utc_webkit2_main_loop_begin();
+
+    assert_eq(gResult,EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_policy_decision_cookie_get_func_n(void)
+{
+    assert_eq(ewk_policy_decision_cookie_get(NULL), 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_host_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_host_get_func.c
new file mode 100755 (executable)
index 0000000..bff1c2d
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool g_result = EINA_FALSE;
+
+static void load_finished(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+static void load_error(void* data, Evas_Object* webview, void* event_info)
+{
+    g_result = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+{
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (ewk_policy_decision_host_get(policy_decision))
+        g_result = EINA_TRUE;
+    else
+        g_result = EINA_FALSE;
+
+    utc_webkit2_main_loop_quit();
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_host_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+    evas_object_smart_callback_add(test_view.webview, "policy,navigation,decide", policy_navigation_decide, NULL);
+}
+
+void utc_webkit2_ewk_policy_decision_host_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+    evas_object_smart_callback_del(test_view.webview, "policy,navigation,decide", policy_navigation_decide);
+
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Tests if the host for policy decision is returned properly.
+ */
+int utc_webkit2_ewk_policy_decision_host_get_func_p(void)
+{
+    assert_neq(ewk_view_url_set(test_view.webview, "http://www.tizen.org"), 0);
+    utc_webkit2_main_loop_begin();
+
+    assert_eq(g_result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+int utc_webkit2_ewk_policy_decision_host_get_func_n(void)
+{
+    assert_eq(ewk_policy_decision_host_get(0), 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_http_method_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_http_method_get_func.c
new file mode 100755 (executable)
index 0000000..b80e5e9
--- /dev/null
@@ -0,0 +1,94 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool g_result = EINA_FALSE;
+#define SAMPLE_HTML_FILE "http://www.tizen.org"
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+     Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+        if (!result)
+        isFailed = EINA_TRUE;
+}
+static void load_finished(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void load_error(void* data, Evas_Object* webview, void* event_info)
+{
+    g_result = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+{
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (ewk_policy_decision_http_method_get(policy_decision))
+        g_result = EINA_TRUE;
+    else
+        g_result = EINA_FALSE;
+
+    utc_webkit2_main_loop_quit();
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_http_method_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+    evas_object_smart_callback_add(test_view.webview, "policy,navigation,decide", policy_navigation_decide, NULL);
+}
+
+void utc_webkit2_ewk_policy_decision_http_method_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+    evas_object_smart_callback_del(test_view.webview, "policy,navigation,decide", policy_navigation_decide);
+
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Tests if the url for policy decision is returned properly.
+ */
+int utc_webkit2_ewk_policy_decision_http_method_get_func_p(void)
+{
+    loadURL(SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    assert_eq(g_result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+int utc_webkit2_ewk_policy_decision_http_method_get_func_n(void)
+{
+    assert_eq(ewk_policy_decision_http_method_get(0), 0);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_ignore_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_ignore_func.c
new file mode 100755 (executable)
index 0000000..888e31b
--- /dev/null
@@ -0,0 +1,94 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool g_result = EINA_FALSE;
+#define SAMPLE_HTML_FILE "http://www.tizen.org"
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void load_finished(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void load_error(void* data, Evas_Object* webview, void* event_info)
+{
+    g_result = EINA_FALSE;
+    isFailed = EINA_TRUE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+{
+
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (ewk_policy_decision_ignore(policy_decision))
+        g_result = EINA_TRUE;
+    else
+        g_result = EINA_FALSE;
+
+    utc_webkit2_main_loop_quit();
+}
+static void loadURL(const char* url)
+{
+     Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+        if (!result)
+        isFailed = EINA_TRUE;
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_ignore_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+    evas_object_smart_callback_add(test_view.webview, "policy,navigation,decide", policy_navigation_decide, NULL);
+}
+
+void utc_webkit2_ewk_policy_decision_ignore_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+    evas_object_smart_callback_del(test_view.webview, "policy,navigation,decide", policy_navigation_decide);
+
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Tests if ignore operation for policy decision is set properly
+ */
+int utc_webkit2_ewk_policy_decision_ignore_func_p(void)
+{
+    loadURL(SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+    assert_eq(g_result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+int utc_webkit2_ewk_policy_decision_ignore_func_n(void)
+{
+    assert_neq(ewk_policy_decision_ignore(0), EINA_TRUE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_navigation_type_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_navigation_type_get_func.c
new file mode 100755 (executable)
index 0000000..70fcb07
--- /dev/null
@@ -0,0 +1,97 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+#define SAMPLE_HTML_FILE "http://www.tizen.org"
+static Eina_Bool isFailed = EINA_FALSE;
+static Eina_Bool gResult = EINA_FALSE;
+
+static void get_policy_decision_cb(void* data, Evas_Object* webview, void* event_info)
+{
+    Ewk_Policy_Decision* policy = (Ewk_Policy_Decision*)event_info;
+    if (ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_LINK_CLICKED ||
+        ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_FORM_SUBMITTED ||
+        ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_BACK_FORWARD  ||
+        ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_RELOAD  ||
+        ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_FORM_RESUBMITTED ||
+        ewk_policy_decision_navigation_type_get(policy) == EWK_POLICY_NAVIGATION_TYPE_OTHER )
+        gResult = EINA_TRUE;
+}
+
+static void loadURL(const char* url)
+{
+     Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+        if (!result)
+        isFailed = EINA_TRUE;
+}
+
+/* Callback for load finished */
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    gResult = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_navigation_type_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+    evas_object_smart_callback_add(test_view.webview,"policy,navigation,decide", get_policy_decision_cb, NULL);
+
+}
+
+void utc_webkit2_ewk_policy_decision_navigation_type_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    evas_object_smart_callback_del(test_view.webview, "policy,navigation,decide", NULL);
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Tests if ewk_policy_decision_navigation_type_get returns the correct navigation type
+ */
+int utc_webkit2_ewk_policy_decision_navigation_type_get_func_p(void)
+{
+    // Fixme: We should use COMMON_SAMPLE_HTML_FILE instead of SAMPLE_HTML_FILE 
+    // becuase 2.3.1 wearable target doesn't support wifi.
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+    assert_eq(gResult, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if ewk_policy_decision_navigation_type_get return EWK_POLICY_NAVIGATION_TYPE_OTHER incase policy decision is NULL
+ */
+int utc_webkit2_ewk_policy_decision_navigation_type_get_func_n(void)
+{
+    assert_eq(ewk_policy_decision_navigation_type_get(NULL), EWK_POLICY_NAVIGATION_TYPE_OTHER);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_response_headers_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_response_headers_get_func.c
new file mode 100755 (executable)
index 0000000..95b8d18
--- /dev/null
@@ -0,0 +1,98 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool g_result = EINA_FALSE;
+#define SAMPLE_HTML_FILE "http://www.tizen.org"
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+     Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+        if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void load_finished(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void load_error(void* data, Evas_Object* webview, void* event_info)
+{
+    g_result = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+   isFailed = EINA_TRUE;
+}
+
+static void policy_response_decide(void* data, Evas_Object* webview, void* event_info)
+{
+
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (ewk_policy_decision_response_headers_get(policy_decision))
+        g_result = EINA_TRUE;
+    else
+        g_result = EINA_FALSE;
+
+    utc_webkit2_main_loop_quit();
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_response_headers_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+    evas_object_smart_callback_add(test_view.webview, "policy,response,decide", policy_response_decide, NULL);
+}
+
+void utc_webkit2_ewk_policy_decision_response_headers_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+    evas_object_smart_callback_del(test_view.webview, "policy,response,decide", policy_response_decide);
+
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Tests if the http headers for policy decision is returned properly.
+ */
+int utc_webkit2_ewk_policy_decision_response_headers_get_func_p(void)
+{
+    // Fixme: We should use COMMON_SAMPLE_HTML_FILE instead of SAMPLE_HTML_FILE 
+    // becuase 2.3.1 wearable target doesn't support wifi.
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    assert_eq(g_result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+int utc_webkit2_ewk_policy_decision_response_headers_get_func_n(void)
+{
+    assert_eq(ewk_policy_decision_response_headers_get(0), 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_response_mime_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_response_mime_get_func.c
new file mode 100755 (executable)
index 0000000..4f0e81c
--- /dev/null
@@ -0,0 +1,98 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+
+#define SAMPLE_HTML_FILE "http://www.tizen.org"
+static Eina_Bool isFailed = EINA_FALSE;
+static Eina_Bool g_result = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+     Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+    if (!result)
+    isFailed = EINA_TRUE;
+}
+
+static void load_finished(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void load_error(void* data, Evas_Object* webview, void* event_info)
+{
+    g_result = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_FALSE;
+}
+
+static void policy_response_decide(void* data, Evas_Object* webview, void* event_info)
+{
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (ewk_policy_decision_response_mime_get(policy_decision))
+        g_result = EINA_TRUE;
+    else
+        g_result = EINA_FALSE;
+
+    utc_webkit2_main_loop_quit();
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_response_mime_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+    evas_object_smart_callback_add(test_view.webview, "policy,response,decide", policy_response_decide, NULL);
+}
+
+void utc_webkit2_ewk_policy_decision_response_mime_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+    evas_object_smart_callback_del(test_view.webview, "policy,response,decide", policy_response_decide);
+
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Tests if the mimetype for policy decision is returned properly.
+ */
+int utc_webkit2_ewk_policy_decision_response_mime_get_func_p(void)
+{
+    // Fixme: We should use COMMON_SAMPLE_HTML_FILE instead of SAMPLE_HTML_FILE 
+    // becuase 2.3.1 wearable target doesn't support wifi.
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    assert_eq(g_result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+int utc_webkit2_ewk_policy_decision_response_mime_get_func_n(void)
+{
+    assert_eq(ewk_policy_decision_response_mime_get(0), 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_response_status_code_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_response_status_code_get_func.c
new file mode 100755 (executable)
index 0000000..26d5d08
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+static Eina_Bool gResult = EINA_FALSE;
+#define SAMPLE_HTML_FILE "http://www.tizen.org"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void get_policy_decision_cb(void* data, Evas_Object* webview, void* event_info)
+{
+    Ewk_Policy_Decision* policy = (Ewk_Policy_Decision*)event_info;
+    if (ewk_policy_decision_response_status_code_get(policy) == 200)
+        gResult = EINA_TRUE;
+}
+
+static void loadURL(const char* url)
+{
+     Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+    if (!result)
+    isFailed = EINA_TRUE;
+}
+
+/* Callback for load finished */
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    gResult = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_response_status_code_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+    evas_object_smart_callback_add(test_view.webview,"policy,response,decide", get_policy_decision_cb, NULL);
+
+}
+
+void utc_webkit2_ewk_policy_decision_response_status_code_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    evas_object_smart_callback_del(test_view.webview, "policy,response,decide", NULL);
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Tests if ewk_policy_decision_response_status_code_get returns the correct status code
+ */
+int utc_webkit2_ewk_policy_decision_response_status_code_get_func_p(void)
+{
+    // Fixme: We should use COMMON_SAMPLE_HTML_FILE instead of SAMPLE_HTML_FILE 
+    // becuase 2.3.1 wearable target doesn't support wifi.
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+    // assert_eq(gResult,EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if ewk_policy_decision_response_status_code_get return 0 incase policy decision is NULL
+ */
+int utc_webkit2_ewk_policy_decision_response_status_code_get_func_n(void)
+{
+    assert_eq(ewk_policy_decision_response_status_code_get(NULL), 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_scheme_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_scheme_get_func.c
new file mode 100755 (executable)
index 0000000..059a4fb
--- /dev/null
@@ -0,0 +1,94 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool g_result = EINA_FALSE;
+#define SAMPLE_HTML_FILE "http://www.tizen.org"
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+     Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+     if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void load_finished(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void load_error(void* data, Evas_Object* webview, void* event_info)
+{
+    g_result = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_FALSE;
+}
+
+static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+{
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (ewk_policy_decision_scheme_get(policy_decision))
+        g_result = EINA_TRUE;
+    else
+        g_result = EINA_FALSE;
+
+    utc_webkit2_main_loop_quit();
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_scheme_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+    evas_object_smart_callback_add(test_view.webview, "policy,navigation,decide", policy_navigation_decide, NULL);
+}
+
+void utc_webkit2_ewk_policy_decision_scheme_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+    evas_object_smart_callback_del(test_view.webview, "policy,navigation,decide", policy_navigation_decide);
+
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Tests if the scheme for policy decision is returned properly.
+ */
+int utc_webkit2_ewk_policy_decision_scheme_get_func_p(void)
+{
+    loadURL(SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+    assert_eq(g_result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+int utc_webkit2_ewk_policy_decision_scheme_get_func_n(void)
+{
+    assert_eq(ewk_policy_decision_scheme_get(0), 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_type_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_type_get_func.c
new file mode 100755 (executable)
index 0000000..07304a3
--- /dev/null
@@ -0,0 +1,96 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool g_result = EINA_FALSE;
+#define SAMPLE_HTML_FILE "http://www.tizen.org"
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+static void load_finished(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void load_error(void* data, Evas_Object* webview, void* event_info)
+{
+    g_result = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+     isFailed = EINA_TRUE;
+}
+
+static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+{
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (ewk_policy_decision_type_get(policy_decision) == EWK_POLICY_DECISION_USE
+        ||ewk_policy_decision_type_get(policy_decision) == EWK_POLICY_DECISION_DOWNLOAD
+        || ewk_policy_decision_type_get(policy_decision) == EWK_POLICY_DECISION_IGNORE)
+        g_result = EINA_TRUE;
+    else
+        g_result = EINA_FALSE;
+
+    utc_webkit2_main_loop_quit();
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_type_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+    evas_object_smart_callback_add(test_view.webview, "policy,navigation,decide", policy_navigation_decide, NULL);
+}
+
+void utc_webkit2_ewk_policy_decision_type_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+    evas_object_smart_callback_del(test_view.webview, "policy,navigation,decide", policy_navigation_decide);
+
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Tests if the host for policy decision is returned properly.
+ */
+int utc_webkit2_ewk_policy_decision_type_get_func_p(void)
+{
+    loadURL(SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    assert_eq(g_result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+int utc_webkit2_ewk_policy_decision_type_get_func_n(void)
+{
+    assert_eq(ewk_policy_decision_type_get(0), EWK_POLICY_DECISION_USE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_url_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_url_get_func.c
new file mode 100755 (executable)
index 0000000..4b87215
--- /dev/null
@@ -0,0 +1,94 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool g_result = EINA_FALSE;
+#define SAMPLE_HTML_FILE "http://www.tizen.org"
+static Eina_Bool isFailed = EINA_FALSE;
+static void loadURL(const char* url)
+{
+    Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+    if (!result)
+    isFailed = EINA_TRUE;
+}
+
+static void load_finished(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void load_error(void* data, Evas_Object* webview, void* event_info)
+{
+    g_result = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+   isFailed = EINA_TRUE;
+}
+
+static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+{
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (ewk_policy_decision_url_get(policy_decision))
+        g_result = EINA_TRUE;
+    else
+        g_result = EINA_FALSE;
+
+    utc_webkit2_main_loop_quit();
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_url_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+    evas_object_smart_callback_add(test_view.webview, "policy,navigation,decide", policy_navigation_decide, NULL);
+}
+
+void utc_webkit2_ewk_policy_decision_url_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+    evas_object_smart_callback_del(test_view.webview, "policy,navigation,decide", policy_navigation_decide);
+
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Tests if the url for policy decision is returned properly.
+ */
+int utc_webkit2_ewk_policy_decision_url_get_func_p(void)
+{
+    loadURL(SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    assert_eq(g_result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+int utc_webkit2_ewk_policy_decision_url_get_func_n(void)
+{
+    assert_eq(ewk_policy_decision_url_get(0), 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_policy_decision_use_func.c b/src/utc/webkit2/utc_webkit2_ewk_policy_decision_use_func.c
new file mode 100755 (executable)
index 0000000..555579c
--- /dev/null
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool g_result = EINA_FALSE;
+#define SAMPLE_HTML_FILE "http://www.tizen.org"
+static Eina_Bool isFailed = EINA_FALSE;
+static void loadURL(const char* url)
+{
+    Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void load_finished(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_FALSE;
+    g_result = EINA_TRUE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void load_error(void* data, Evas_Object* webview, void* event_info)
+{
+    g_result = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+   isFailed = EINA_TRUE;
+}
+
+static void policy_navigation_decide(void* data, Evas_Object* webview, void* event_info)
+{
+    Ewk_Policy_Decision* policy_decision = (Ewk_Policy_Decision*)event_info;
+
+    if (!ewk_policy_decision_use(policy_decision)) {
+        g_result = EINA_FALSE;
+        utc_webkit2_main_loop_quit();
+    }
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_policy_decision_use_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+    evas_object_smart_callback_add(test_view.webview, "policy,navigation,decide", policy_navigation_decide, NULL);
+}
+
+void utc_webkit2_ewk_policy_decision_use_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+    evas_object_smart_callback_del(test_view.webview, "policy,navigation,decide", policy_navigation_decide);
+
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Tests if use operation for policy decision is set properly
+ */
+int utc_webkit2_ewk_policy_decision_use_func_p(void)
+{
+    // Fixme: We should use COMMON_SAMPLE_HTML_FILE instead of SAMPLE_HTML_FILE 
+    // becuase 2.3.1 wearable target doesn't support wifi.
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    assert_eq(g_result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if function works properly in case of NULL of a webview
+ */
+int utc_webkit2_ewk_policy_decision_use_func_n(void)
+{
+    assert_neq(ewk_policy_decision_use(0), EINA_TRUE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_settings_default_font_size_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_settings_default_font_size_get_func.c
new file mode 100755 (executable)
index 0000000..c3ad58c
--- /dev/null
@@ -0,0 +1,66 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+#define SET_DEFAULT_SIZE 10
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_settings_default_font_size_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_settings_default_font_size_get_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case for ewk_settings_default_font_size_get(). Get the default encoding.
+ */
+int utc_webkit2_ewk_settings_default_font_size_get_func_p_1(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    int defaultSize= ewk_settings_default_font_size_get(settings);
+    assert_neq(defaultSize, 0);
+    return 0;
+}
+
+/**
+ * @brief Positive test case for ewk_settings_default_font_size_get(). Set the default encoding, get the value and then compare.
+ */
+int utc_webkit2_ewk_settings_default_font_size_get_func_p_2(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    Eina_Bool result = ewk_settings_default_font_size_set(settings, SET_DEFAULT_SIZE);
+    assert_eq(result,EINA_TRUE);
+
+    int defaultSize = ewk_settings_default_font_size_get(settings);
+    assert_eq(defaultSize, SET_DEFAULT_SIZE);
+    return 0;
+}
+
+/**
+ * @brief Negative test case for ewk_settings_default_font_size_get(). Check if it works fine with NULL as settings.
+ */
+int utc_webkit2_ewk_settings_default_font_size_get_func_n(void)
+{
+    int defaultSize = ewk_settings_default_font_size_get(NULL);
+    assert_eq(defaultSize, 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_settings_default_font_size_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_settings_default_font_size_set_func.c
new file mode 100755 (executable)
index 0000000..76fb324
--- /dev/null
@@ -0,0 +1,55 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+#define SET_DEFAULT_SIZE 10
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_settings_default_font_size_set_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_settings_default_font_size_set_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case for ewk_settings_default_font_size_set(). Set the encoding, get the value and then compare.
+ */
+int utc_webkit2_ewk_settings_default_font_size_set_func_p(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    Eina_Bool result = ewk_settings_default_font_size_set(settings, SET_DEFAULT_SIZE);
+    assert_eq(result,EINA_TRUE);
+
+    int defaultSize = ewk_settings_default_font_size_get(settings);
+    assert_eq(defaultSize, SET_DEFAULT_SIZE);
+    return 0;
+}
+
+/**
+ * @brief Negative test case for ewk_settings_default_font_size_set(). Check if it works fine with NULL as settings.
+ */
+int utc_webkit2_ewk_settings_default_font_size_set_func_n(void)
+{
+    Eina_Bool result = ewk_settings_default_font_size_set(NULL, SET_DEFAULT_SIZE);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_settings_default_text_encoding_name_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_settings_default_text_encoding_name_get_func.c
new file mode 100755 (executable)
index 0000000..7023721
--- /dev/null
@@ -0,0 +1,73 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+#define SET_DEFAULT_ENCODING       "utf-8"
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_settings_default_text_encoding_name_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_settings_default_text_encoding_name_get_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case for ewk_settings_default_text_encoding_name_get(). Get the default encoding.
+ */
+int utc_webkit2_ewk_settings_default_text_encoding_name_get_func_p_1(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    const char* defaultEncoding = NULL;
+    defaultEncoding = ewk_settings_default_text_encoding_name_get(settings);
+    assert_neq(defaultEncoding, NULL);
+    return 0;
+}
+
+/**
+ * @brief Positive test case for ewk_settings_default_text_encoding_name_get(). Set the default encoding, get the value and then compare.
+ */
+int utc_webkit2_ewk_settings_default_text_encoding_name_get_func_p_2(void)
+{
+    Eina_Bool bResult = EINA_FALSE;
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    Eina_Bool result = ewk_settings_default_text_encoding_name_set(settings, SET_DEFAULT_ENCODING);
+    assert_eq(result,EINA_TRUE);
+
+    const char* defaultEncoding = ewk_settings_default_text_encoding_name_get(settings);
+    assert_neq(defaultEncoding, 0);
+    if (strcmp(defaultEncoding, SET_DEFAULT_ENCODING))
+       bResult = EINA_TRUE;
+    assert_neq(bResult , EINA_TRUE);
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case for ewk_settings_default_text_encoding_name_get(). Check if it works fine with NULL as settings.
+ */
+int utc_webkit2_ewk_settings_default_text_encoding_name_get_func_n(void)
+{
+    const char* defaultEncoding = NULL;
+    defaultEncoding = ewk_settings_default_text_encoding_name_get(NULL);
+    assert_eq(defaultEncoding, NULL);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_settings_default_text_encoding_name_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_settings_default_text_encoding_name_set_func.c
new file mode 100755 (executable)
index 0000000..997af99
--- /dev/null
@@ -0,0 +1,60 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+#include "ewk_settings.h"
+
+#define SET_DEFAULT_ENCODING       "utf-8"
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_settings_default_text_encoding_name_set_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_settings_default_text_encoding_name_set_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case for ewk_settings_default_text_encoding_name_set(). Set the encoding, get the value and then compare.
+ */
+int utc_webkit2_ewk_settings_default_text_encoding_name_set_func_p(void)
+{
+    Eina_Bool bResult = EINA_FALSE;
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    Eina_Bool result = ewk_settings_default_text_encoding_name_set(settings, SET_DEFAULT_ENCODING);
+    assert_eq(result,EINA_TRUE);
+
+    const char* defaultEncoding = NULL;
+    defaultEncoding = ewk_settings_default_text_encoding_name_get(settings);
+    if (strcmp(defaultEncoding, SET_DEFAULT_ENCODING))
+       bResult = EINA_TRUE;
+    assert_neq(bResult , EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Negative test case for ewk_settings_default_text_encoding_name_set(). Check if it works fine with NULL as settings.
+ */
+int utc_webkit2_ewk_settings_default_text_encoding_name_set_func_n(void)
+{
+    Eina_Bool result = ewk_settings_default_text_encoding_name_set(NULL, SET_DEFAULT_ENCODING);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_settings_javascript_enabled_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_settings_javascript_enabled_get_func.c
new file mode 100755 (executable)
index 0000000..cd5ad32
--- /dev/null
@@ -0,0 +1,61 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+void utc_webkit2_ewk_settings_javascript_enabled_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_settings_javascript_enabled_get_func_cleanup(void)
+{
+     utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case of ewk_settings_javascript_enabled_get()
+ */
+int utc_webkit2_ewk_settings_javascript_enabled_get_func_p_1(void)
+{
+     Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+     ewk_settings_javascript_enabled_set(settings, EINA_TRUE);
+     assert_eq(ewk_settings_javascript_enabled_get(settings), EINA_TRUE);
+     return 0;
+}
+
+/**
+ * @brief Positive test case of ewk_settings_javascript_enabled_get()
+ */
+int utc_webkit2_ewk_settings_javascript_enabled_get_func_p_2(void)
+{
+      Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+      ewk_settings_javascript_enabled_set(settings, EINA_FALSE);
+      assert_eq(ewk_settings_javascript_enabled_get(settings), EINA_FALSE);
+      return 0;
+}
+
+
+/**
+ * @brief Negative test case of ewk_settings_javascript_enabled_get()
+ */
+int utc_webkit2_ewk_settings_javascript_enabled_get_func_n(void)
+{
+     assert_eq(ewk_settings_javascript_enabled_get(NULL), EINA_FALSE);
+     return 0;
+}
+
diff --git a/src/utc/webkit2/utc_webkit2_ewk_settings_javascript_enabled_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_settings_javascript_enabled_set_func.c
new file mode 100755 (executable)
index 0000000..5ee631c
--- /dev/null
@@ -0,0 +1,63 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+void utc_webkit2_ewk_settings_javascript_enabled_set_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_settings_javascript_enabled_set_func_cleanup(void)
+{
+     utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case of ewk_settings_javascript_enabled_set()
+ */
+int utc_webkit2_ewk_settings_javascript_enabled_set_func_p_1(void)
+{
+       Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+       assert_neq(settings, NULL);
+    Eina_Bool result = ewk_settings_javascript_enabled_set(settings, EINA_TRUE);
+       assert_neq(result, EINA_FALSE);
+    return 0;
+}
+
+/**
+ * @brief Positive test case of ewk_settings_javascript_enabled_set()
+ */
+int utc_webkit2_ewk_settings_javascript_enabled_set_func_p_2(void)
+{
+       Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+       assert_neq(settings, NULL);
+       Eina_Bool result = ewk_settings_javascript_enabled_set(settings, EINA_FALSE);
+       assert_neq(result, EINA_FALSE);
+    return 0;
+}
+
+/**
+ * @brief Negative test case of ewk_settings_javascript_enabled_set()
+ */
+int utc_webkit2_ewk_settings_javascript_enabled_set_func_n(void)
+{
+    assert_eq(ewk_settings_javascript_enabled_set(NULL, EINA_FALSE), EINA_FALSE);
+    return 0;
+}
+
+
diff --git a/src/utc/webkit2/utc_webkit2_ewk_settings_loads_images_automatically_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_settings_loads_images_automatically_get_func.c
new file mode 100755 (executable)
index 0000000..74f3d3d
--- /dev/null
@@ -0,0 +1,65 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+void utc_webkit2_ewk_settings_loads_images_automatically_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_settings_loads_images_automatically_get_func_cleanup(void)
+{
+     utc_webkit2_ewk_test_end();
+}
+
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and set to TRUE.
+ */
+int utc_webkit2_ewk_settings_loads_images_automatically_get_func_p_1(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    Eina_Bool result = ewk_settings_loads_images_automatically_set(settings, EINA_TRUE);
+    assert_neq (result, 0);
+    result = ewk_settings_loads_images_automatically_get(settings);
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with a correct webview and set to FALSE.
+ */
+int utc_webkit2_ewk_settings_loads_images_automatically_get_func_p_2(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    Eina_Bool result = ewk_settings_loads_images_automatically_set(settings, EINA_FALSE);
+    assert_neq (result, 0);
+    result = ewk_settings_loads_images_automatically_get(settings);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+int utc_webkit2_ewk_settings_loads_images_automatically_get_func_n(void)
+{
+    Eina_Bool result = ewk_settings_loads_images_automatically_get(NULL);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_settings_loads_images_automatically_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_settings_loads_images_automatically_set_func.c
new file mode 100755 (executable)
index 0000000..6dc606c
--- /dev/null
@@ -0,0 +1,65 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+void utc_webkit2_ewk_settings_loads_images_automatically_set_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_settings_loads_images_automatically_set_func_cleanup(void)
+{
+     utc_webkit2_ewk_test_end();
+}
+
+
+/**
+ * @brief Tests if returns TRUE when initiated with a correct webview and set to TRUE.
+ */
+int utc_webkit2_ewk_settings_loads_images_automatically_set_func_p_1(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    Eina_Bool result = ewk_settings_loads_images_automatically_set(settings, EINA_TRUE);
+    assert_neq (result, 0);
+    result = ewk_settings_loads_images_automatically_get(settings);
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with a correct webview and set to FALSE.
+ */
+int utc_webkit2_ewk_settings_loads_images_automatically_set_func_p_2(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    Eina_Bool result = ewk_settings_loads_images_automatically_set(settings, EINA_FALSE);
+    assert_neq (result, 0);
+    result = ewk_settings_loads_images_automatically_get(settings);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
+
+/**
+ * @brief Tests if returns FALSE when initiated with NULL webview.
+ */
+int utc_webkit2_ewk_settings_loads_images_automatically_set_func_n(void)
+{
+    Eina_Bool result = ewk_settings_loads_images_automatically_set(NULL, EINA_TRUE);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_settings_scripts_can_open_windows_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_settings_scripts_can_open_windows_get_func.c
new file mode 100755 (executable)
index 0000000..0726a17
--- /dev/null
@@ -0,0 +1,60 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+#include "ewk_settings.h"
+
+void utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case of ewk_settings_scripts_can_open_windows_get()
+ */
+int utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_p_1(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    ewk_settings_scripts_can_open_windows_set(settings, EINA_TRUE);
+    assert_eq(ewk_settings_scripts_can_open_windows_get(settings), EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Positive test case of ewk_settings_scripts_can_open_windows_get()
+ */
+int utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_p_2(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    ewk_settings_scripts_can_open_windows_set(settings, EINA_FALSE);
+    assert_eq(ewk_settings_scripts_can_open_windows_get(settings), EINA_FALSE);
+    return 0;
+}
+
+/**
+ * @brief Negative test case of ewk_settings_scripts_can_open_windows_get()
+ */
+int utc_webkit2_ewk_settings_scripts_can_open_windows_get_func_n(void)
+{
+    assert_eq(ewk_settings_scripts_can_open_windows_get(NULL), EINA_FALSE);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_settings_scripts_can_open_windows_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_settings_scripts_can_open_windows_set_func.c
new file mode 100755 (executable)
index 0000000..bb17157
--- /dev/null
@@ -0,0 +1,68 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+#include "ewk_settings.h"
+
+void utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive test case of ewk_settings_scripts_can_open_windows_set()
+ */
+int utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_p_1(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    Eina_Bool result = EINA_FALSE;
+    result = ewk_settings_scripts_can_open_windows_set(settings, EINA_TRUE);
+
+    if (result == EINA_TRUE)
+        result = ewk_settings_scripts_can_open_windows_get(settings);
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+/**
+ * @brief Positive test case of ewk_settings_scripts_can_open_windows_set()
+ */
+int utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_p_2(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    Eina_Bool result = EINA_FALSE;
+    result = ewk_settings_scripts_can_open_windows_set(settings, EINA_FALSE);
+    assert_neq (result, EINA_FALSE);
+    result = ewk_settings_scripts_can_open_windows_get(settings);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
+
+/**
+ * @brief Negative test case of ewk_settings_scripts_can_open_windows_set()
+ */
+int utc_webkit2_ewk_settings_scripts_can_open_windows_set_func_n(void)
+{
+    assert_eq(ewk_settings_scripts_can_open_windows_set(NULL, EINA_TRUE), EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_shutdown_func.c b/src/utc/webkit2/utc_webkit2_ewk_shutdown_func.c
new file mode 100755 (executable)
index 0000000..113c635
--- /dev/null
@@ -0,0 +1,43 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+void utc_webkit2_ewk_shutdown_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_shutdown_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+
+int utc_webkit2_ewk_shutdown_func_p(void)
+{
+    ewk_init();
+    assert_eq(ewk_shutdown(), 0);
+    return 0;
+}
+
+
+int utc_webkit2_ewk_shutdown_func_n(void)
+{
+    assert_eq(ewk_shutdown(), -1);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_add_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_add_func.c
new file mode 100755 (executable)
index 0000000..80330ef
--- /dev/null
@@ -0,0 +1,58 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#define NOT_USE_INIT_END
+#include "utc_webkit2_ewk.h"
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_view_add_startup(void)
+{
+    g_type_init();
+    elm_init(0, NULL);
+}
+
+void utc_webkit2_ewk_view_add_cleanup(void)
+{
+    /* Closing whole EWK */
+    ewk_shutdown();
+    elm_shutdown();
+}
+
+int utc_webkit2_ewk_view_add_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    Evas_Object* window = elm_win_add(NULL, "TC Launcher", ELM_WIN_BASIC);
+    elm_win_title_set(window, "TC Launcher");
+    Evas* evas = evas_object_evas_get(window);
+
+    /* Initialization of webview */
+    Evas_Object* webview = ewk_view_add(evas);
+
+    if (webview)
+        result = EINA_TRUE;
+
+    evas_object_del(webview);
+    evas_object_del(window);
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_add_n(void)
+{
+    Evas_Object* webview = ewk_view_add(NULL);
+    assert_eq(webview, NULL);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_back_forward_list_clear_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_back_forward_list_clear_func.c
new file mode 100755 (executable)
index 0000000..eaf5a20
--- /dev/null
@@ -0,0 +1,70 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+/*Load Specified URL*/
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+{
+     utc_webkit2_main_loop_quit();
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+
+void utc_webkit2_ewk_view_back_forward_list_clear_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+void utc_webkit2_ewk_view_back_forward_list_clear_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_back_forward_list_clear_func_p(void)
+{
+    assert(loadURL(EWK_VIEW_BACK_FORWARD_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+    ewk_view_back_forward_list_clear(test_view.webview);
+    Ewk_Back_Forward_List* backForwardList = ewk_view_back_forward_list_get(test_view.webview);
+    assert_eq(ewk_back_forward_list_previous_item_get(backForwardList),0);
+    assert_eq(ewk_back_forward_list_next_item_get(backForwardList),0);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_back_forward_list_clear_func_n(void)
+{
+    ewk_view_back_forward_list_clear(NULL);
+    assert_eq(ewk_view_back_forward_list_get(NULL),0);
+
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_back_forward_list_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_back_forward_list_get_func.c
new file mode 100755 (executable)
index 0000000..ebf85f8
--- /dev/null
@@ -0,0 +1,71 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+/*Load Specified URL*/
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+{
+     utc_webkit2_main_loop_quit();
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+     isLoadSucceed = EINA_FALSE;
+}
+
+
+void utc_webkit2_ewk_view_back_forward_list_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_view_back_forward_list_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_back_forward_list_get_func_p(void)
+{
+    assert(loadURL(EWK_VIEW_BACK_FORWARD_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    Ewk_Back_Forward_List* backForwardList = ewk_view_back_forward_list_get(test_view.webview);
+    assert(backForwardList);
+
+    return 0;
+}
+
+int utc_webkit2_ewk_view_back_forward_list_get_func_n(void)
+{
+    assert_eq(ewk_view_back_forward_list_get(NULL),EINA_FALSE);
+
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_back_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_back_func.c
new file mode 100755 (executable)
index 0000000..7b94aa4
--- /dev/null
@@ -0,0 +1,79 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+/* Load specified url */
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+/* Callback for load finished */
+static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+
+/* Startup function */
+void utc_ewk_view_back_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+/* Cleanup function */
+void utc_ewk_view_back_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_ewk_view_back_p(void)
+{
+    assert(loadURL(COMMON_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    assert(loadURL(COMMON_SAMPLE1_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    Eina_Bool result = ewk_view_back(test_view.webview);
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_back_n(void)
+{
+    Eina_Bool result = ewk_view_back(NULL);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_back_possible_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_back_possible_func.c
new file mode 100755 (executable)
index 0000000..f5d1024
--- /dev/null
@@ -0,0 +1,97 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+/* Load specified url */
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+/* Callback for load finished */
+static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+
+/* Startup function */
+void utc_ewk_view_back_possible_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+/* Cleanup function */
+void utc_ewk_view_back_possible_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_ewk_view_back_possible_p1(void)
+{
+    Eina_Bool result = ewk_view_back_possible(test_view.webview);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
+
+int utc_ewk_view_back_possible_p2(void)
+{
+    assert(loadURL(COMMON_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+
+    assert(isLoadSucceed);
+
+    Eina_Bool result = ewk_view_back_possible(test_view.webview);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
+
+int utc_ewk_view_back_possible_p3(void)
+{
+    assert(loadURL(COMMON_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+
+    assert(isLoadSucceed);
+
+    assert(loadURL(COMMON_SAMPLE1_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+
+    assert(isLoadSucceed);
+
+    Eina_Bool result = ewk_view_back_possible(test_view.webview);
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_back_possible_n(void)
+{
+    Eina_Bool result = ewk_view_back_possible(NULL);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_contents_size_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_contents_size_get_func.c
new file mode 100755 (executable)
index 0000000..0b8aa0b
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+/* Load specified url */
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+/* Callback for load finished */
+static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+
+
+/* Startup function */
+void utc_ewk_view_contents_size_get_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+/* Cleanup function */
+void utc_ewk_view_contents_size_get_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_ewk_view_contents_size_get_p(void)
+{
+    assert(loadURL(COMMON_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    Evas_Coord width = 0;
+    Evas_Coord height = 0;
+
+    Eina_Bool result = ewk_view_contents_size_get(test_view.webview, &width, &height);
+
+    if (width == 0 || height == 0)
+        result = EINA_FALSE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_contents_size_get_n(void)
+{
+    Evas_Coord width = 0;
+    Evas_Coord height = 0;
+
+    Eina_Bool result = ewk_view_contents_size_get(NULL, &width, &height);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_context_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_context_get_func.c
new file mode 100755 (executable)
index 0000000..2a203e1
--- /dev/null
@@ -0,0 +1,42 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+/* Startup and cleanup functions */
+void utc_ewk_view_context_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_ewk_view_context_get_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_ewk_view_context_get_func_p(void)
+{
+    Ewk_Context* context = ewk_view_context_get(test_view.webview);
+    assert_neq(context, NULL);
+    return 0;
+}
+
+int utc_ewk_view_context_get_func_n(void)
+{
+    Ewk_Context* context = ewk_view_context_get(NULL);
+    assert_eq(context, NULL);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_forward_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_forward_func.c
new file mode 100755 (executable)
index 0000000..6fbdbae
--- /dev/null
@@ -0,0 +1,84 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+/* Load specified url */
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+/* Callback for load finished */
+static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+
+/* Startup function */
+void utc_ewk_view_forward_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+/* Cleanup function */
+void utc_ewk_view_forward_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_ewk_view_forward_p(void)
+{
+    assert(loadURL(COMMON_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    assert(loadURL(COMMON_SAMPLE1_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    Eina_Bool backResult = ewk_view_back(test_view.webview);
+    if (backResult == EINA_TRUE)
+        utc_webkit2_main_loop_begin();
+
+    Eina_Bool forwardResult = ewk_view_forward(test_view.webview);
+    if (forwardResult == EINA_TRUE)
+        utc_webkit2_main_loop_begin();
+
+    assert_eq(forwardResult, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_forward_n(void)
+{
+    Eina_Bool result = ewk_view_forward(NULL);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_forward_possible_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_forward_possible_func.c
new file mode 100755 (executable)
index 0000000..10724dd
--- /dev/null
@@ -0,0 +1,99 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+/* Load specified url */
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+/* Callback for load finished */
+static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+
+/* Startup function */
+void utc_ewk_view_forward_possible_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+/* Cleanup function */
+void utc_ewk_view_forward_possible_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_ewk_view_forward_possible_p_1(void)
+{
+    Eina_Bool result = ewk_view_forward_possible(test_view.webview);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
+
+int utc_ewk_view_forward_possible_p_2(void)
+{
+    assert(loadURL(COMMON_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    Eina_Bool result = ewk_view_forward_possible(test_view.webview);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
+
+int utc_ewk_view_forward_possible_p_3(void)
+{
+    assert(loadURL(COMMON_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    assert(loadURL(COMMON_SAMPLE1_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    Eina_Bool resultViewBack = ewk_view_back(test_view.webview);
+    if (resultViewBack == EINA_TRUE)
+        utc_webkit2_main_loop_begin();
+
+    Eina_Bool result = ewk_view_forward_possible(test_view.webview);
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_forward_possible_n(void)
+{
+    Eina_Bool result = ewk_view_back_possible(NULL);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_fullscreen_exit_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_fullscreen_exit_func.c
new file mode 100755 (executable)
index 0000000..c0993de
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_view_fullscreen_exit_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_view_fullscreen_exit_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+/**
+ * @brief Positive Test checks whether function exits from full screen
+ */
+int utc_webkit2_ewk_view_fullscreen_exit_func_p(void)
+{
+    ewk_view_fullscreen_exit(test_view.webview);
+
+    assert(1);
+    return 0;
+}
+
+/**
+ * @brief Negative Test checks whether function works properly when web view is NULL
+ */
+int utc_webkit2_ewk_view_fullscreen_exit_func_n(void)
+{
+    ewk_view_fullscreen_exit(NULL);
+
+    assert(1);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_html_string_load_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_html_string_load_func.c
new file mode 100755 (executable)
index 0000000..1aa5ca2
--- /dev/null
@@ -0,0 +1,97 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "utc_webkit2_ewk.h"
+#include "assert.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+#define SAMPLE_HTML_FILE "http://www.samsung.com/pl/home/"
+#define TITLE_HTML "ewk_view_html_string_load"
+#define TITLE_URI "http://www.samsung.com/pl/home/"
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+void utc_webkit2_ewk_view_html_string_load_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_view_html_string_load_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_html_string_load_func_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL("<html><head><title>ewk_view_html_string_load</title></head></html>");
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    result = ewk_view_html_string_load(test_view.webview, "<html><head><title>ewk_view_html_string_load</title></head></html>", NULL, NULL);
+    assert_eq(result, EINA_TRUE);
+    if(!strcmp(ewk_view_title_get(test_view.webview), TITLE_HTML))
+        result = EINA_FALSE;
+    assert_eq(result, EINA_TRUE);
+
+    result = ewk_view_html_string_load(test_view.webview, "<html><body onload='document.title=document.URL'></body></html>", SAMPLE_HTML_FILE, NULL);
+    assert_eq(result, EINA_TRUE);
+    if(!strcmp(ewk_view_title_get(test_view.webview), TITLE_URI))
+        result = EINA_FALSE;
+    assert_eq(result, EINA_TRUE);
+
+    result = ewk_view_html_string_load(test_view.webview, "<html><body></body></html>", NULL, SAMPLE_HTML_FILE);
+    assert_eq(result, EINA_TRUE);
+    if(!strcmp(ewk_view_title_get(test_view.webview), TITLE_URI))
+        result = EINA_FALSE;
+    assert_eq(result, EINA_TRUE);
+
+    return 0;
+}
+
+int utc_webkit2_ewk_view_html_string_load_func_n(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    result = ewk_view_html_string_load(NULL, "<html></html>", NULL, NULL);
+    assert_eq(result, EINA_FALSE);
+
+    result = ewk_view_html_string_load(test_view.webview, NULL, NULL, NULL);
+    assert_eq(result, EINA_FALSE);
+
+    return 0;
+}
+
+
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_load_progress_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_load_progress_get_func.c
new file mode 100755 (executable)
index 0000000..1b97ef9
--- /dev/null
@@ -0,0 +1,89 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static const double cProgressComplete = 1.0;
+static const double cInvlaidLoad = -1.0;
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+static void loadProgress(void *data, Evas_Object *webview, void *arg)
+{
+   ecore_main_loop_quit();
+}
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+    ecore_main_loop_quit();
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_view_load_progress_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,progress", loadProgress, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_view_load_progress_get_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_load_progress_get_func_p_1(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    double value = ewk_view_load_progress_get(test_view.webview);
+     if (value == 0)
+        result = EINA_TRUE;
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_load_progress_get_func_p_2(void)
+{
+    double value = 1.0;
+    Eina_Bool result = EINA_FALSE;
+    char *full_path = COMMON_SAMPLE_HTML_FILE;
+    ewk_view_url_set(test_view.webview, full_path);
+
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+    value = ewk_view_load_progress_get(test_view.webview);
+    if (value <= cProgressComplete)
+        result = EINA_TRUE;
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_load_progress_get_func_n(void)
+{
+    double value = -1.0;
+    Eina_Bool result = EINA_FALSE;
+    value = ewk_view_load_progress_get(NULL);
+    if (value == cInvlaidLoad)
+        result = EINA_TRUE;
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_reload_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_reload_func.c
new file mode 100755 (executable)
index 0000000..68f4081
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+    isFailed = EINA_FALSE;
+    ecore_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+void utc_webkit2_ewk_view_reload_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_view_reload_cleanup(void)
+{
+      evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+      evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+      utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_reload_p(void)
+{
+
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+    assert_eq(ewk_view_reload(test_view.webview), EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_reload_n(void)
+{
+    assert_neq( ewk_view_reload(NULL), EINA_TRUE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_resume_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_resume_func.c
new file mode 100755 (executable)
index 0000000..ee7bfa8
--- /dev/null
@@ -0,0 +1,74 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+/*Load specified URL */
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+/* Callback for quitting main loop */
+static void quitMainLoop(void *data, Evas_Object *webview, void *arg)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_view_resume_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", quitMainLoop, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,started", quitMainLoop, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_view_resume_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,started", quitMainLoop);
+    evas_object_smart_callback_del(test_view.webview, "load,finished", quitMainLoop);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_resume_p(void)
+{
+    assert(loadURL(COMMON_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    ewk_view_suspend(test_view.webview);
+    ewk_view_resume(test_view.webview);
+    utc_webkit2_main_loop_begin();
+
+    return 0;
+}
+
+int utc_webkit2_ewk_view_resume_n(void)
+{
+    ewk_view_resume(NULL);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_scale_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_scale_get_func.c
new file mode 100755 (executable)
index 0000000..b8dc762
--- /dev/null
@@ -0,0 +1,93 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+/* Load specified url */
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+/* Callback for load finished */
+static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+/* Function called when timer expires */
+static Eina_Bool mainLoopQuit(void* data)
+{
+    utc_webkit2_main_loop_quit();
+    return EINA_FALSE;
+}
+
+/* Startup function */
+void utc_webkit2_ewk_view_scale_get_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+/* Cleanup function */
+void utc_webkit2_ewk_view_scale_get_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_scale_get_p(void)
+{
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    double scaleFactor = 3.0;
+    Evas_Coord centerX = 5;
+    Evas_Coord centerY = 5;
+    ecore_timer_add(2.0f, mainLoopQuit, 0);
+    utc_webkit2_main_loop_begin();
+    Eina_Bool result = ewk_view_scale_set(test_view.webview, scaleFactor, centerX, centerY);
+    double getScaleFactor = ewk_view_scale_get(test_view.webview);
+
+    if (scaleFactor != getScaleFactor)
+        result = EINA_FALSE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_scale_get_n(void)
+{
+    double getScaleFactor = ewk_view_scale_get(NULL);
+    assert_eq(getScaleFactor, -1);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_scale_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_scale_set_func.c
new file mode 100755 (executable)
index 0000000..d659ce0
--- /dev/null
@@ -0,0 +1,93 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+/* Load specified url */
+static void loadURL(const char* url)
+{
+    Eina_Bool result = ewk_view_url_set(test_view.webview, url);
+
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+/* Callback for load finished */
+static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+   utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+/* Function called when timer expires */
+static Eina_Bool mainLoopQuit(void* data)
+{
+    utc_webkit2_main_loop_quit();
+    return EINA_FALSE;
+}
+
+/* Startup function */
+void utc_webkit2_ewk_view_scale_set_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+/* Cleanup function */
+void utc_webkit2_ewk_view_scale_set_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_scale_set_p(void)
+{
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    double scaleFactor = 2.0;
+    Evas_Coord centerX = 5;
+    Evas_Coord centerY = 5;
+    ecore_timer_add(2.0f, mainLoopQuit, 0);
+    utc_webkit2_main_loop_begin();
+    Eina_Bool result = ewk_view_scale_set(test_view.webview, scaleFactor, centerX, centerY);
+    double getScaleFactor = ewk_view_scale_get(test_view.webview);
+
+    if (scaleFactor != getScaleFactor)
+        result = EINA_FALSE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_scale_set_n(void)
+{
+    Eina_Bool result = ewk_view_scale_set(NULL, 1, 0, 0);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_script_execute_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_script_execute_func.c
new file mode 100755 (executable)
index 0000000..2ebc204
--- /dev/null
@@ -0,0 +1,93 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+#define TEST_JS_SCRIPT                  ("document.getElementById('getParaContent').innerHTML")
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+static Eina_Bool isScriptExcutionFinished = EINA_TRUE;
+
+/* Load specified url */
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+/* Callback for load finished */
+static void loadFinished(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+
+/* Callback for script execution */
+static void scriptExecutionFinished(Evas_Object* webview, const char* result_value, void* data)
+{
+    utc_webkit2_main_loop_quit();
+
+    if(strcmp(result_value, "test content"))
+        isScriptExcutionFinished = EINA_FALSE;
+}
+
+/* Startup function */
+void utc_webkit2_ewk_view_script_execute_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+/* Cleanup function */
+void utc_webkit2_ewk_view_script_execute_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_script_execute_p(void)
+{
+    assert(loadURL(COMMON_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    Eina_Bool result = ewk_view_script_execute(test_view.webview, TEST_JS_SCRIPT, scriptExecutionFinished, NULL);
+    utc_webkit2_main_loop_begin();
+    assert(isScriptExcutionFinished);
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_script_execute_n_1(void)
+{
+    Eina_Bool result = ewk_view_script_execute(NULL, TEST_JS_SCRIPT, scriptExecutionFinished, NULL);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_script_execute_n_2(void)
+{
+    Eina_Bool result = ewk_view_script_execute(test_view.webview, NULL, scriptExecutionFinished , NULL);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_scroll_by_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_scroll_by_func.c
new file mode 100755 (executable)
index 0000000..300923d
--- /dev/null
@@ -0,0 +1,135 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static const int cScrollBy_1 = 2;
+static const int cScrollBy_2 = 7;
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+     isLoadSucceed = EINA_FALSE;
+}
+
+void utc_ewk_view_scroll_by_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_ewk_view_scroll_by_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+static Eina_Bool mainLoopQuit(void* data)
+{
+    utc_webkit2_main_loop_quit();
+    return ECORE_CALLBACK_CANCEL;
+}
+
+int utc_ewk_view_scroll_by_p_1(void)
+{
+    assert(loadURL(EWK_VIEW_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+    ecore_timer_add(2.0f, mainLoopQuit, 0);
+    utc_webkit2_main_loop_begin();
+    int x = 0, y = 0;
+    ewk_view_scale_set(test_view.webview, 2.0, 0, 0);
+    ewk_view_scroll_set(test_view.webview, 0, 0); /* Scroll position: (0, 0) */
+    ewk_view_scroll_by(test_view.webview, cScrollBy_1, cScrollBy_1);
+    ewk_view_scroll_pos_get(test_view.webview, &x, &y);
+
+    Eina_Bool result = EINA_FALSE;
+    if (x == cScrollBy_1 && y == cScrollBy_1)
+        result = EINA_TRUE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_scroll_by_p_2(void)
+{
+    assert(loadURL(EWK_VIEW_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+    ecore_timer_add(2.0f, mainLoopQuit, 0);
+    utc_webkit2_main_loop_begin();
+    ewk_view_scale_set(test_view.webview, 2.0, 0, 0);
+    int x = 0, y = 0;
+    ewk_view_scroll_set(test_view.webview, 0, 0); /* Scroll position: (0, 0) */
+    ewk_view_scroll_by(test_view.webview, cScrollBy_1, cScrollBy_1);
+    ewk_view_scroll_by(test_view.webview, cScrollBy_2, cScrollBy_2);
+    ewk_view_scroll_pos_get(test_view.webview, &x, &y);
+
+    const int finalScrollPos = cScrollBy_1 + cScrollBy_2;
+    Eina_Bool result = EINA_FALSE;
+
+    if (x == finalScrollPos && y == finalScrollPos)
+        result = EINA_TRUE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_scroll_by_p_3(void)
+{
+    int x = 0, y = 0;
+    const int negativeScroll = -1 * (cScrollBy_1 + cScrollBy_2 + 3);
+    ewk_view_scale_set(test_view.webview, 2.0, 0, 0);
+    ewk_view_scroll_by(test_view.webview, negativeScroll, negativeScroll);
+    ewk_view_scroll_pos_get(test_view.webview, &x, &y);
+
+    Eina_Bool result = EINA_FALSE;
+    if (x == 0 && y == 0)
+        result = EINA_TRUE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_scroll_by_n(void)
+{
+    int x = 0, y = 0;
+
+    ewk_view_scroll_set(test_view.webview, 0, 0);
+    ewk_view_scroll_by(NULL, cScrollBy_1, cScrollBy_1);
+    ewk_view_scroll_pos_get(test_view.webview, &x, &y);
+
+    Eina_Bool result = EINA_FALSE;
+    if (x == 0 && y == 0)
+        result = EINA_TRUE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_scroll_pos_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_scroll_pos_get_func.c
new file mode 100755 (executable)
index 0000000..d967897
--- /dev/null
@@ -0,0 +1,100 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+     utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+
+void utc_ewk_view_scroll_pos_get_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_ewk_view_scroll_pos_get_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+static Eina_Bool mainLoopQuit(void* data)
+{
+    utc_webkit2_main_loop_quit();
+    return ECORE_CALLBACK_CANCEL;
+}
+
+int utc_ewk_view_scroll_pos_get_p_1(void)
+{
+    assert(loadURL(EWK_VIEW_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+    int x = 0, y = 0;
+    int valScrollSet = 20;
+    ecore_timer_add(2.0f, mainLoopQuit, 0);
+    utc_webkit2_main_loop_begin();
+    ewk_view_scale_set(test_view.webview, 2.0, 0, 0);
+    ewk_view_scroll_set(test_view.webview, valScrollSet, valScrollSet);
+    ewk_view_scroll_pos_get(test_view.webview, &x, &y);
+    Eina_Bool result = EINA_FALSE;
+    if (x == valScrollSet && y == valScrollSet)
+        result = EINA_TRUE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_scroll_pos_get_p_2(void)
+{
+    int x = 0, y = 0;
+    int valScrollSet = -12 ;
+
+    ewk_view_scale_set(test_view.webview, 2.0, 0, 0);
+    ewk_view_scroll_set(test_view.webview, valScrollSet, valScrollSet);
+    ewk_view_scroll_pos_get(test_view.webview, &x, &y);
+    Eina_Bool result = EINA_FALSE;
+    if (x == 0 && y == 0)
+        result = EINA_TRUE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_scroll_pos_get_n(void)
+{
+    int x,y;
+    Eina_Bool result = ewk_view_scroll_pos_get(NULL, &x, &y);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_scroll_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_scroll_set_func.c
new file mode 100755 (executable)
index 0000000..1d39579
--- /dev/null
@@ -0,0 +1,131 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+static void loadFinished(void* data, Evas_Object* eObject, void* dataFinished)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+     isLoadSucceed = EINA_FALSE;
+}
+
+void utc_webkit2_ewk_view_scroll_set_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_view_scroll_set_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+static Eina_Bool mainLoopQuit(void* data)
+{
+    utc_webkit2_main_loop_quit();
+    return ECORE_CALLBACK_CANCEL;
+}
+
+int utc_webkit2_ewk_view_scroll_set_p_1(void)
+{
+    assert(loadURL(EWK_VIEW_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    ecore_timer_add(2.0f, mainLoopQuit, 0);
+    utc_webkit2_main_loop_begin();
+    int valScrollSet = 2;
+    Eina_Bool result = EINA_FALSE;
+    result = ewk_view_scroll_set(test_view.webview, valScrollSet, valScrollSet);
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_scroll_set_p_2(void)
+{
+    int valScrollSet = 20;
+    int x = 0, y = 0;
+    Eina_Bool result = EINA_FALSE;
+    Eina_Bool getCheck = EINA_FALSE;
+    Eina_Bool finalCheck = EINA_FALSE;
+
+    assert(loadURL(EWK_VIEW_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    ecore_timer_add(2.0f, mainLoopQuit, 0);
+    utc_webkit2_main_loop_begin();
+    result = ewk_view_scroll_set(test_view.webview, valScrollSet, valScrollSet);
+    if (result == EINA_TRUE) {
+        getCheck = ewk_view_scroll_pos_get(test_view.webview, &x, &y);
+        if (getCheck == EINA_TRUE) {
+            if (x == valScrollSet && y == valScrollSet) {
+                finalCheck = EINA_TRUE;
+            }
+        }
+        assert_eq(finalCheck, EINA_TRUE);
+    }
+    else
+      assert_eq(result, EINA_TRUE);
+     return 0;
+}
+
+int utc_webkit2_ewk_view_scroll_set_p_3(void)
+{
+    int x = 0, y = 0;
+    int valScrollSet = -12;
+    Eina_Bool result = EINA_FALSE;
+    Eina_Bool getCheck = EINA_FALSE;
+    Eina_Bool finalCheck = EINA_FALSE;
+
+    result = ewk_view_scroll_set(test_view.webview, valScrollSet, valScrollSet);
+    if(result == EINA_TRUE) {
+        getCheck = ewk_view_scroll_pos_get(test_view.webview, &x, &y);
+        if (getCheck == EINA_TRUE) {
+            if (x == 0 && y == 0) {
+                finalCheck = EINA_TRUE;
+            }
+        }
+        assert_eq(finalCheck, EINA_TRUE);
+
+    }
+    else
+      assert_eq(result, EINA_TRUE);
+
+    return 0;
+}
+
+int utc_webkit2_ewk_view_scroll_set_n(void)
+{
+       assert_eq(ewk_view_scroll_set(NULL, 1916, 1993), EINA_FALSE);
+       return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_settings_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_settings_get_func.c
new file mode 100755 (executable)
index 0000000..4b88409
--- /dev/null
@@ -0,0 +1,41 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+
+void utc_webkit2_ewk_view_settings_get_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_webkit2_ewk_view_settings_get_func_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_settings_get_func_p(void)
+{
+    Ewk_Settings* settings = ewk_view_settings_get(test_view.webview);
+    assert_neq(settings, 0);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_settings_get_func_n(void)
+{
+    assert_eq(ewk_view_settings_get(NULL), 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_stop_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_stop_func.c
new file mode 100755 (executable)
index 0000000..9935f3e
--- /dev/null
@@ -0,0 +1,68 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+static void loadFinished(void* data, Evas_Object* evas_object, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+}
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+
+void utc_webkit2_ewk_view_stop_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_view_stop_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_stop_p(void)
+{
+    assert(loadURL(COMMON_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+
+    Eina_Bool result = ewk_view_stop(test_view.webview);
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_stop_n(void)
+{
+    Eina_Bool result = ewk_view_stop(NULL);
+    assert_eq(result, EINA_FALSE);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_suspend_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_suspend_func.c
new file mode 100755 (executable)
index 0000000..d8b4efc
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isLoadSucceed = EINA_TRUE;
+
+/* Load specified url */
+static Eina_Bool loadURL(const char* url)
+{
+    return ewk_view_url_set(test_view.webview, url);
+}
+
+/* Callback for load progress */
+static void loadProgress(void *data, Evas_Object *webview, void *arg)
+{
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isLoadSucceed = EINA_FALSE;
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_view_suspend_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,progress", loadProgress, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_view_suspend_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,progress", loadProgress);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_suspend_p(void)
+{
+    assert(loadURL(COMMON_SAMPLE_HTML_FILE));
+    utc_webkit2_main_loop_begin();
+    assert(isLoadSucceed);
+    ewk_view_suspend(test_view.webview);
+
+    return 0;
+}
+
+int utc_webkit2_ewk_view_suspend_n(void)
+{
+    ewk_view_suspend(NULL);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_text_find_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_text_find_func.c
new file mode 100755 (executable)
index 0000000..9ee7829
--- /dev/null
@@ -0,0 +1,95 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+#define TEXT1 "apple"
+#define TEXT2 "mango"
+
+static Eina_Bool loadFailed = EINA_FALSE;
+static int matchCount;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+    if (!result)
+        loadFailed = EINA_TRUE;
+}
+
+/* Callback for load finished */
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+    loadFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    loadFailed = EINA_TRUE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void onTextFound(void* userData, Evas_Object* webview, void* eventInfo)
+{
+    int* result = (int*)userData;
+    int* matchCount = (int*)eventInfo;
+    *result = *matchCount;
+}
+
+/* Startup function */
+void utc_webkit2_ewk_view_text_find_func_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+    evas_object_smart_callback_add(test_view.webview, "text,found", onTextFound, &matchCount);
+}
+
+/* Cleanup function */
+void utc_webkit2_ewk_view_text_find_func_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    evas_object_smart_callback_del(test_view.webview, "text,found", onTextFound);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_text_find_func_p(void)
+{
+    matchCount = -1;
+    loadURL(EWK_VIEW_TEXT_FIND_HTML_FILE);
+    utc_webkit2_main_loop_begin();
+       assert_eq(loadFailed, EINA_FALSE);
+    ewk_view_text_find(test_view.webview, TEXT1, EWK_FIND_OPTIONS_SHOW_OVERLAY, 100);
+    while (matchCount < 0)
+        ecore_main_loop_iterate();
+    assert_eq(matchCount, 3);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_text_find_func_n(void)
+{  
+    matchCount = -1;
+    loadURL(EWK_VIEW_TEXT_FIND_HTML_FILE);
+    utc_webkit2_main_loop_begin();
+    assert_eq(loadFailed, EINA_FALSE);
+    ewk_view_text_find(test_view.webview, TEXT2, EWK_FIND_OPTIONS_SHOW_OVERLAY, 100);
+    while (matchCount < 0)
+        ecore_main_loop_iterate();
+    assert_eq(matchCount, 0);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_title_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_title_get_func.c
new file mode 100755 (executable)
index 0000000..edbefae
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+#define TITLE0 "Testing Sample Page"
+
+static Eina_Bool isFailed = EINA_FALSE;
+static void loadURL(const char* url)
+{
+    Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+/*Callback for load finished */
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+/* Callback for load error */
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_view_title_get_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_view_title_get_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_title_get_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+    if (strcmp(ewk_view_title_get(test_view.webview), TITLE0))
+        result = EINA_TRUE;
+    assert_neq(result , EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_title_get_n(void)
+{
+    const char* title = ewk_view_title_get(NULL);
+    assert_eq(title, NULL);
+    return 0;
+}
+
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_url_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_url_get_func.c
new file mode 100755 (executable)
index 0000000..3e88029
--- /dev/null
@@ -0,0 +1,75 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+    Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void loadFinished(void *data, Evas_Object *webview, void *arg)
+{
+    isFailed = EINA_FALSE;
+    ecore_main_loop_quit();
+}
+
+static void loadError(void* data, Evas_Object* webview, void* event_info)
+{
+    utc_webkit2_main_loop_quit();
+    isFailed = EINA_TRUE;
+}
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_view_url_get_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", loadFinished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", loadError, NULL);
+}
+
+void utc_webkit2_ewk_view_url_get_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", loadFinished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", loadError);
+
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_url_get_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+
+    const char* currentUrl = ewk_view_url_get(test_view.webview);
+    if (strcmp(currentUrl, COMMON_SAMPLE_HTML_FILE))
+       result = EINA_TRUE;
+    assert_neq(result , EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_url_get_n(void)
+{
+    const char* currentUrl = ewk_view_url_get(NULL);
+    assert_eq(currentUrl ? EINA_TRUE : EINA_FALSE, EINA_FALSE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_url_request_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_url_request_set_func.c
new file mode 100755 (executable)
index 0000000..49ef5c5
--- /dev/null
@@ -0,0 +1,83 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool is_failed = EINA_FALSE;
+
+static void load_finished(void* data, Evas_Object* webview, void* event_info)
+{
+    is_failed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void load_error(void* data, Evas_Object* webview, void* event_info)
+{
+    is_failed = EINA_TRUE;
+    utc_webkit2_main_loop_quit();
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_view_url_request_set_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+}
+
+void utc_webkit2_ewk_view_url_request_set_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_url_request_set_p(void)
+{
+    is_failed = EINA_FALSE;
+    Eina_Bool result = ewk_view_url_request_set(test_view.webview, COMMON_SAMPLE_HTML_FILE, EWK_HTTP_METHOD_GET, NULL, NULL);
+    assert_neq(result, EINA_FALSE);
+    utc_webkit2_main_loop_begin();
+    assert_eq(is_failed, EINA_FALSE);
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_url_request_set_n_1(void)
+{
+    Eina_Bool result = ewk_view_url_request_set(NULL, COMMON_SAMPLE_HTML_FILE, EWK_HTTP_METHOD_GET, NULL, NULL);
+    assert_eq(result, EINA_FALSE);
+    assert_neq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_url_request_set_n_2(void)
+{
+    Eina_Bool result = ewk_view_url_request_set(test_view.webview, NULL, EWK_HTTP_METHOD_GET, NULL, NULL);
+    assert_eq(result, EINA_FALSE);
+    assert_neq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_url_request_set_n_3(void)
+{
+    Eina_Bool result = ewk_view_url_request_set(NULL, COMMON_SAMPLE_HTML_FILE, 100, NULL, NULL);
+    assert_eq(result, EINA_FALSE);
+    assert_neq(result, EINA_TRUE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_url_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_url_set_func.c
new file mode 100755 (executable)
index 0000000..ea2a160
--- /dev/null
@@ -0,0 +1,74 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+static Eina_Bool isFailed = EINA_FALSE;
+
+static void loadURL(const char* url)
+{
+     Eina_Bool result =  ewk_view_url_set(test_view.webview, url);
+    if (!result)
+        isFailed = EINA_TRUE;
+}
+
+static void load_finished(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_FALSE;
+    utc_webkit2_main_loop_quit();
+}
+
+static void load_error(void* data, Evas_Object* webview, void* event_info)
+{
+    isFailed = EINA_TRUE;
+    utc_webkit2_main_loop_quit();
+}
+
+/* Startup and cleanup functions */
+void utc_webkit2_ewk_view_url_set_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+
+    evas_object_smart_callback_add(test_view.webview, "load,finished", load_finished, NULL);
+    evas_object_smart_callback_add(test_view.webview, "load,error", load_error, NULL);
+}
+
+void utc_webkit2_ewk_view_url_set_cleanup(void)
+{
+    evas_object_smart_callback_del(test_view.webview, "load,finished", load_finished);
+    evas_object_smart_callback_del(test_view.webview, "load,error", load_error);
+
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_webkit2_ewk_view_url_set_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    loadURL(COMMON_SAMPLE_HTML_FILE);
+    assert_neq(isFailed, EINA_TRUE);
+    utc_webkit2_main_loop_begin();
+    if (strcmp(ewk_view_url_get(test_view.webview), COMMON_SAMPLE_HTML_FILE))
+       result = EINA_TRUE;
+    assert_neq(result , EINA_TRUE);
+    return 0;
+}
+
+int utc_webkit2_ewk_view_url_set_n(void)
+{
+    Eina_Bool result = ewk_view_url_set(NULL, COMMON_SAMPLE_HTML_FILE);
+    assert_neq(result, EINA_TRUE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_user_agent_get_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_user_agent_get_func.c
new file mode 100755 (executable)
index 0000000..57ae6b1
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+void utc_ewk_view_user_agent_get_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_ewk_view_user_agent_get_cleanup(void)
+{
+     utc_webkit2_ewk_test_end();
+}
+
+int utc_ewk_view_user_agent_get_p(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    const char* userAgent = ewk_view_user_agent_get(test_view.webview);
+    if (strstr(userAgent, "Mozilla") != NULL)
+        result = EINA_TRUE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_user_agent_get_n_1(void)
+{
+    Eina_Bool result = EINA_FALSE;
+    const char* userAgentTest =  ewk_view_user_agent_get(NULL);
+    if (!userAgentTest)
+       result = EINA_TRUE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
diff --git a/src/utc/webkit2/utc_webkit2_ewk_view_user_agent_set_func.c b/src/utc/webkit2/utc_webkit2_ewk_view_user_agent_set_func.c
new file mode 100755 (executable)
index 0000000..160856a
--- /dev/null
@@ -0,0 +1,64 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include "utc_webkit2_ewk.h"
+
+#ifndef NULL
+#define NULL    0x0
+#endif
+
+#define USER_AGENT_STRING           ("Mozilla/5.0 (Unknown; Linux armv7l **TEST*TEST**) AppleWebKit/534.16+ (KHTML, like Gecko) Version/5.0 Safari/534.16+")
+#define TEST_STRING                 ("**TEST*TEST**")
+#define TEST_NULL_WEBVIEW           ("Test NULL WebView")
+
+void utc_ewk_view_user_agent_set_startup(void)
+{
+    utc_webkit2_ewk_test_init();
+}
+
+void utc_ewk_view_user_agent_set_cleanup(void)
+{
+    utc_webkit2_ewk_test_end();
+}
+
+int utc_ewk_view_user_agent_set_p(void)
+{
+    Eina_Bool result = EINA_TRUE;
+
+    ewk_view_user_agent_set(test_view.webview, USER_AGENT_STRING);
+    const char* userAgent = ewk_view_user_agent_get(test_view.webview);
+    char* strString = strstr(userAgent, TEST_STRING);
+    if (!strString)
+        return 1;
+
+    if (strncmp(strString, TEST_STRING, strlen(TEST_STRING)))
+        result = EINA_FALSE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
+
+int utc_ewk_view_user_agent_set_n(void)
+{
+    Eina_Bool result = EINA_TRUE;
+    ewk_view_user_agent_set(test_view.webview, "");
+    const char* userAgent = ewk_view_user_agent_get(test_view.webview);
+    if (!userAgent)
+        result = EINA_FALSE;
+
+    assert_eq(result, EINA_TRUE);
+    return 0;
+}
\ No newline at end of file
diff --git a/src/utc/widget_service/CMakeLists.txt b/src/utc/widget_service/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..f4153e5
--- /dev/null
@@ -0,0 +1,39 @@
+SET(PKG_NAME "widget_service")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "widget_service")
+SET(TC_SOURCES
+    utc-widget_service.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+    ${CAPI_LIB}
+    glib-2.0
+    capi-appfw-application
+       capi-system-info
+       elementary
+       widget_viewer_evas
+)
+
+INCLUDE_DIRECTORIES(
+    ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+    ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+    DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/org.tizen.sample-1.0.0-arm.tpk DESTINATION /opt/usr/media)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/org.tizen.sample-1.0.0-i386.tpk DESTINATION /opt/usr/media)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/org.tizen.sample.crash-1.0.0-arm.tpk DESTINATION /opt/usr/media)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/org.tizen.sample.crash-1.0.0-i386.tpk DESTINATION /opt/usr/media)
diff --git a/src/utc/widget_service/platform.list b/src/utc/widget_service/platform.list
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/src/utc/widget_service/public.list b/src/utc/widget_service/public.list
new file mode 100755 (executable)
index 0000000..d4b3042
--- /dev/null
@@ -0,0 +1,23 @@
+widget_service_get_size
+widget_service_get_size_type
+widget_service_get_need_of_mouse_event
+widget_service_get_need_of_touch_effect
+widget_service_get_need_of_frame
+widget_service_trigger_update
+widget_service_change_period
+widget_service_get_widget_list
+widget_service_get_main_app_id
+widget_service_get_widget_list_by_pkgid
+widget_service_get_widget_id
+widget_service_get_app_id_of_setup_app
+widget_service_get_package_id
+widget_service_get_name
+widget_service_get_preview_image_path
+widget_service_get_icon
+widget_service_get_nodisplay
+widget_service_get_supported_sizes
+widget_service_get_widget_instance_list
+widget_service_set_lifecycle_event_cb
+widget_service_unset_lifecycle_event_cb
+widget_service_get_content_of_widget_instance
+widget_service_get_supported_size_types
diff --git a/src/utc/widget_service/res/org.tizen.sample-1.0.0-arm.tpk b/src/utc/widget_service/res/org.tizen.sample-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..9799de1
Binary files /dev/null and b/src/utc/widget_service/res/org.tizen.sample-1.0.0-arm.tpk differ
diff --git a/src/utc/widget_service/res/org.tizen.sample-1.0.0-i386.tpk b/src/utc/widget_service/res/org.tizen.sample-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..e318245
Binary files /dev/null and b/src/utc/widget_service/res/org.tizen.sample-1.0.0-i386.tpk differ
diff --git a/src/utc/widget_service/res/org.tizen.sample.crash-1.0.0-arm.tpk b/src/utc/widget_service/res/org.tizen.sample.crash-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..0fd307e
Binary files /dev/null and b/src/utc/widget_service/res/org.tizen.sample.crash-1.0.0-arm.tpk differ
diff --git a/src/utc/widget_service/res/org.tizen.sample.crash-1.0.0-i386.tpk b/src/utc/widget_service/res/org.tizen.sample.crash-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..b57aa7d
Binary files /dev/null and b/src/utc/widget_service/res/org.tizen.sample.crash-1.0.0-i386.tpk differ
diff --git a/src/utc/widget_service/tct-widget_service-core.c b/src/utc/widget_service/tct-widget_service-core.c
new file mode 100755 (executable)
index 0000000..1a581ef
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-widget_service-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/widget_service/tct-widget_service-core.h b/src/utc/widget_service/tct-widget_service-core.h
new file mode 100755 (executable)
index 0000000..62e18ad
--- /dev/null
@@ -0,0 +1,121 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_WIDGET_SERVICE_CORE_H__
+#define __TCT_WIDGET_SERVICE_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_widget_service_startup(void);
+extern void utc_widget_service_cleanup(void);
+
+extern int utc_widget_service_get_size_n(void);
+extern int utc_widget_service_get_size_type_n(void);
+extern int utc_widget_service_get_need_of_mouse_event_n(void);
+extern int utc_widget_service_get_need_of_touch_effect_n(void);
+extern int utc_widget_service_get_need_of_frame_n(void);
+extern int utc_widget_service_trigger_update_n(void);
+extern int utc_widget_service_change_period_n(void);
+extern int utc_widget_service_get_widget_list_n(void);
+extern int utc_widget_service_get_main_app_id_n(void);
+extern int utc_widget_service_get_widget_list_by_pkgid_n(void);
+extern int utc_widget_service_get_widget_id_n(void);
+extern int utc_widget_service_get_app_id_of_setup_app_n(void);
+extern int utc_widget_service_get_package_id_n(void);
+extern int utc_widget_service_get_name_n(void);
+extern int utc_widget_service_get_preview_image_path_n(void);
+extern int utc_widget_service_get_icon_n(void);
+extern int utc_widget_service_get_nodisplay_n(void);
+extern int utc_widget_service_get_supported_sizes_n(void);
+extern int utc_widget_service_get_supported_size_types_n(void);
+extern int utc_widget_service_get_widget_instance_list_n(void);
+extern int utc_widget_service_set_lifecycle_event_cb_n(void);
+extern int utc_widget_service_unset_lifecycle_event_cb_n(void);
+extern int utc_widget_service_get_content_of_widget_instance_n(void);
+extern int utc_widget_service_get_size_p(void);
+extern int utc_widget_service_get_size_type_p(void);
+extern int utc_widget_service_get_need_of_mouse_event_p(void);
+extern int utc_widget_service_get_need_of_touch_effect_p(void);
+extern int utc_widget_service_get_need_of_frame_p(void);
+extern int utc_widget_service_trigger_update_p(void);
+extern int utc_widget_service_change_period_p(void);
+extern int utc_widget_service_get_widget_list_p(void);
+extern int utc_widget_service_get_main_app_id_p(void);
+extern int utc_widget_service_get_widget_list_by_pkgid_p(void);
+extern int utc_widget_service_get_widget_id_p(void);
+extern int utc_widget_service_get_app_id_of_setup_app_p(void);
+extern int utc_widget_service_get_package_id_p(void);
+extern int utc_widget_service_get_name_p(void);
+extern int utc_widget_service_get_preview_image_path_p(void);
+extern int utc_widget_service_get_icon_p(void);
+extern int utc_widget_service_get_nodisplay_p(void);
+extern int utc_widget_service_get_supported_sizes_p(void);
+extern int utc_widget_service_get_supported_size_types_p(void);
+extern int utc_widget_service_get_widget_instance_list_p(void);
+extern int utc_widget_service_set_lifecycle_event_cb_p(void);
+extern int utc_widget_service_unset_lifecycle_event_cb_p(void);
+extern int utc_widget_service_get_content_of_widget_instance_p(void);
+
+testcase tc_array[] = {
+    {"utc_widget_service_get_size_n", utc_widget_service_get_size_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_size_type_n", utc_widget_service_get_size_type_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_need_of_mouse_event_n", utc_widget_service_get_need_of_mouse_event_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_need_of_touch_effect_n", utc_widget_service_get_need_of_touch_effect_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_need_of_frame_n", utc_widget_service_get_need_of_frame_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_trigger_update_n", utc_widget_service_trigger_update_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_change_period_n", utc_widget_service_change_period_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_widget_list_n", utc_widget_service_get_widget_list_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_main_app_id_n", utc_widget_service_get_main_app_id_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_widget_list_by_pkgid_n", utc_widget_service_get_widget_list_by_pkgid_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_widget_id_n", utc_widget_service_get_widget_id_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_app_id_of_setup_app_n", utc_widget_service_get_app_id_of_setup_app_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_package_id_n", utc_widget_service_get_package_id_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_name_n", utc_widget_service_get_name_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_preview_image_path_n", utc_widget_service_get_preview_image_path_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_icon_n", utc_widget_service_get_icon_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_nodisplay_n", utc_widget_service_get_nodisplay_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_supported_sizes_n", utc_widget_service_get_supported_sizes_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_supported_size_types_n", utc_widget_service_get_supported_size_types_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_widget_instance_list_n", utc_widget_service_get_widget_instance_list_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_set_lifecycle_event_cb_n", utc_widget_service_set_lifecycle_event_cb_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_unset_lifecycle_event_cb_n", utc_widget_service_unset_lifecycle_event_cb_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_content_of_widget_instance_n", utc_widget_service_get_content_of_widget_instance_n, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_size_p", utc_widget_service_get_size_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_size_type_p", utc_widget_service_get_size_type_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_need_of_mouse_event_p", utc_widget_service_get_need_of_mouse_event_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_need_of_touch_effect_p", utc_widget_service_get_need_of_touch_effect_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_need_of_frame_p", utc_widget_service_get_need_of_frame_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_trigger_update_p", utc_widget_service_trigger_update_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_change_period_p", utc_widget_service_change_period_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_widget_list_p", utc_widget_service_get_widget_list_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_main_app_id_p", utc_widget_service_get_main_app_id_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_widget_list_by_pkgid_p", utc_widget_service_get_widget_list_by_pkgid_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_widget_id_p", utc_widget_service_get_widget_id_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_app_id_of_setup_app_p", utc_widget_service_get_app_id_of_setup_app_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_package_id_p", utc_widget_service_get_package_id_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_name_p", utc_widget_service_get_name_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_preview_image_path_p", utc_widget_service_get_preview_image_path_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_icon_p", utc_widget_service_get_icon_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_nodisplay_p", utc_widget_service_get_nodisplay_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_supported_sizes_p", utc_widget_service_get_supported_sizes_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_supported_size_types_p", utc_widget_service_get_supported_size_types_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_widget_instance_list_p", utc_widget_service_get_widget_instance_list_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_set_lifecycle_event_cb_p", utc_widget_service_set_lifecycle_event_cb_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_unset_lifecycle_event_cb_p", utc_widget_service_unset_lifecycle_event_cb_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {"utc_widget_service_get_content_of_widget_instance_p", utc_widget_service_get_content_of_widget_instance_p, utc_widget_service_startup, utc_widget_service_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_WIDGET_SERVICE_CORE_H__
diff --git a/src/utc/widget_service/utc-widget_service.c b/src/utc/widget_service/utc-widget_service.c
new file mode 100755 (executable)
index 0000000..371f1d1
--- /dev/null
@@ -0,0 +1,1166 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <libintl.h>
+
+#include <Evas.h>
+#include <Elementary.h>
+#include <glib.h>
+
+#include <system_info.h>
+
+#include <widget_errno.h>
+#include <widget_service.h>
+#include <widget_viewer_evas.h>
+#include <widget_viewer_evas_internal.h>
+
+#include "assert.h"
+
+#define SAMPLE_NAME            "sample"
+#define SAMPLE_PKGNAME         "org.tizen.sample"
+#define SAMPLE_PREVIEW         "/opt/apps/"SAMPLE_PKGNAME"/shared/preview.png"
+#define SAMPLE_WIDGET          SAMPLE_PKGNAME // mouse_event = true, touch_effect = false, need_frame = false, nodisplay = false, 2x2
+#define NEGATIVE_SAMPLE_WIDGET SAMPLE_PKGNAME"n"
+
+static struct info {
+       int is_asserted;
+       bool appwidget_supported;
+} s_info = {
+               .is_asserted = 0,
+               .appwidget_supported = 0
+};
+
+
+/**
+ * Setup the TC environment
+ */
+void utc_widget_service_startup(void)
+{
+       /**
+        * @note
+        * Install sample widget package
+        */
+       s_info.is_asserted = 0;
+
+       system_info_get_platform_bool("http://tizen.org/feature/shell.appwidget", &(s_info.appwidget_supported));
+}
+
+void utc_widget_service_cleanup(void)
+{
+       /**
+        * @note
+        * Uninstall sample widget package
+        */
+       s_info.is_asserted = 0;
+}
+
+/**
+ * Negative TC started
+ */
+int utc_widget_service_get_size_n(void)
+{
+       int w;
+       int h;
+       int ret;
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_UNKNOWN, &w, &h);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED); 
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_size_type_n(void)
+{
+       widget_size_type_e type;
+       int ret;
+
+       /* Out-param is NULL */
+       ret = widget_service_get_size_type(1, 1, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+       /* Invalid width & height */
+       ret = widget_service_get_size_type(1, 1, &type);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_need_of_mouse_event_n(void)
+{
+       int ret;
+       bool mouse_event;
+
+       /* Package name is not valid */
+       ret = widget_service_get_need_of_mouse_event(NULL, WIDGET_SIZE_TYPE_2x2, &mouse_event);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_need_of_touch_effect_n(void)
+{
+       int ret;
+       bool touch_effect;
+
+       ret = widget_service_get_need_of_touch_effect(NULL, WIDGET_SIZE_TYPE_2x2, &touch_effect);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_need_of_frame_n(void)
+{
+       int ret;
+       bool frame;
+
+       ret = widget_service_get_need_of_frame(NULL, WIDGET_SIZE_TYPE_2x2, &frame);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_trigger_update_n(void)
+{
+       int ret;
+
+       ret = widget_service_trigger_update(NULL, NULL, NULL, 0);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       /**
+        * @TODO:
+        *  This case, return value should be WIDGET_ERROR_NOT_EXIST
+        *  If it is okay for security view.
+        */
+
+       return 0;
+}
+
+int utc_widget_service_change_period_n(void)
+{
+       int ret;
+
+       ret = widget_service_change_period(NULL, NULL, -0.1f);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_widget_list_n(void)
+{
+       int ret;
+
+       ret = widget_service_get_widget_list(NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_main_app_id_n(void)
+{
+       char *ret;
+
+       ret = widget_service_get_main_app_id(NEGATIVE_SAMPLE_WIDGET);
+       assert_eq(ret, NULL);
+
+       ret = widget_service_get_main_app_id(NULL);
+       assert_eq(ret, NULL);
+
+       return 0;
+}
+
+int utc_widget_service_get_widget_list_by_pkgid_n(void)
+{
+       int ret;
+
+       ret = widget_service_get_widget_list_by_pkgid(NULL, NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_widget_id_n(void)
+{
+       char *ret;
+
+       ret = widget_service_get_widget_id(NULL);
+       assert_eq(ret, NULL);
+
+       ret = widget_service_get_widget_id(NEGATIVE_SAMPLE_WIDGET);
+       assert_eq(ret, NULL);
+
+       return 0;
+}
+
+int utc_widget_service_get_app_id_of_setup_app_n(void)
+{
+       char *ret;
+
+       ret = widget_service_get_app_id_of_setup_app(NULL);
+       assert_eq(ret, NULL);
+
+       ret = widget_service_get_app_id_of_setup_app(NEGATIVE_SAMPLE_WIDGET);
+       assert_eq(ret, NULL);
+
+       return 0;
+}
+
+int utc_widget_service_get_package_id_n(void)
+{
+       char *ret;
+
+       ret = widget_service_get_package_id(NULL);
+       assert_eq(ret, NULL);
+
+       ret = widget_service_get_package_id(NEGATIVE_SAMPLE_WIDGET);
+       assert_eq(ret, NULL);
+
+       return 0;
+}
+
+int utc_widget_service_get_name_n(void)
+{
+       char *ret;
+
+       ret = widget_service_get_name(NULL, NULL);
+       assert_eq(ret, NULL);
+
+       ret = widget_service_get_name(NEGATIVE_SAMPLE_WIDGET, NULL);
+       assert_eq(ret, NULL);
+
+       return 0;
+}
+
+int utc_widget_service_get_preview_image_path_n(void)
+{
+       char *ret;
+
+       ret = widget_service_get_preview_image_path(NULL, WIDGET_SIZE_TYPE_UNKNOWN);
+       assert_eq(ret, NULL);
+
+       ret = widget_service_get_preview_image_path(NEGATIVE_SAMPLE_WIDGET, WIDGET_SIZE_TYPE_UNKNOWN);
+       assert_eq(ret, NULL);
+
+       ret = widget_service_get_preview_image_path(SAMPLE_WIDGET, WIDGET_SIZE_TYPE_1x1);
+       assert_eq(ret, NULL);
+
+       return 0;
+}
+
+int utc_widget_service_get_icon_n(void)
+{
+       char *ret;
+
+       ret = widget_service_get_icon(NULL, NULL);
+       assert_eq(ret, NULL);
+
+       ret = widget_service_get_icon(NEGATIVE_SAMPLE_WIDGET, NULL);
+       assert_eq(ret, NULL);
+
+       return 0;
+}
+
+int utc_widget_service_get_nodisplay_n(void)
+{
+       int ret;
+
+       ret = widget_service_get_nodisplay(NULL);
+       if (ret == 0)
+               ret = get_last_result();
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_supported_sizes_n(void)
+{
+       int ret;
+       int cnt = 20;
+       int *w = NULL;
+       int *h = NULL;
+
+       ret = widget_service_get_supported_sizes(NULL, NULL, NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_supported_sizes(SAMPLE_WIDGET, NULL, NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_supported_sizes(SAMPLE_WIDGET, &cnt, NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_supported_sizes(SAMPLE_WIDGET, &cnt, (int **)&w, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_supported_sizes(NEGATIVE_SAMPLE_WIDGET, &cnt, (int **)&w, (int **)&h);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NOT_EXIST);
+       }
+
+
+       return 0;
+}
+
+int utc_widget_service_get_supported_size_types_n(void)
+{
+       int ret;
+       int cnt = 20;
+       int *size_types = NULL;
+
+       ret = widget_service_get_supported_size_types(NULL, NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_supported_size_types(SAMPLE_WIDGET, NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_supported_size_types(NULL, &cnt, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_supported_size_types(NULL, NULL, &size_types);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_supported_size_types(SAMPLE_WIDGET, &cnt, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_supported_size_types(NULL, &cnt, &size_types);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_supported_size_types(SAMPLE_WIDGET, NULL, &size_types);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_supported_size_types(NEGATIVE_SAMPLE_WIDGET, &cnt, &size_types);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq(cnt, 0);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_widget_instance_list_n(void)
+{
+       int ret;
+
+       ret = widget_service_get_widget_instance_list(NULL, NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_set_lifecycle_event_cb_n(void)
+{
+       int ret;
+
+       ret = widget_service_set_lifecycle_event_cb(NULL, NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_unset_lifecycle_event_cb_n(void)
+{
+       int ret;
+       ret = widget_service_unset_lifecycle_event_cb(SAMPLE_WIDGET, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NOT_EXIST);
+       }
+       return 0;
+}
+
+int utc_widget_service_get_content_of_widget_instance_n(void)
+{
+       int ret;
+       bundle *b;
+
+
+       ret = widget_service_get_content_of_widget_instance(NULL, NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_content_of_widget_instance(SAMPLE_WIDGET, NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_content_of_widget_instance(SAMPLE_WIDGET, "error", NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       ret = widget_service_get_content_of_widget_instance(SAMPLE_WIDGET, "error", NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+/**
+ * Positive TC started
+ */
+int utc_widget_service_get_size_p(void)
+{
+       int w;
+       int h;
+       int ret;
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_size_type_p(void)
+{
+       widget_size_type_e type;
+       int ret;
+       int w;
+       int h;
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       ret = widget_service_get_size_type(w, h, &type);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq(type, WIDGET_SIZE_TYPE_2x2);
+       }
+
+
+       return 0;
+}
+
+int utc_widget_service_get_need_of_mouse_event_p(void)
+{
+       int ret;
+       bool mouse_event;
+
+       /* Package name is not valid */
+       ret = widget_service_get_need_of_mouse_event(SAMPLE_WIDGET, WIDGET_SIZE_TYPE_2x2, &mouse_event);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_need_of_touch_effect_p(void)
+{
+       int ret;
+       bool touch_effect;
+
+       ret = widget_service_get_need_of_touch_effect(SAMPLE_WIDGET, WIDGET_SIZE_TYPE_2x2, &touch_effect);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq(touch_effect, false);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_need_of_frame_p(void)
+{
+       int ret;
+       bool frame;
+
+       ret = widget_service_get_need_of_frame(SAMPLE_WIDGET, WIDGET_SIZE_TYPE_2x2, &frame);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_trigger_update_p(void)
+{
+       int ret;
+
+       /**
+        * @note
+        * TC could not trigger the update, because the TC is not packaged in with Sample Widget
+        */
+       ret = widget_service_trigger_update(SAMPLE_WIDGET, NULL, NULL, 1);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_PERMISSION_DENIED);
+       }
+
+       return 0;
+}
+
+
+/* Common routines for creating a widget instance - BEGIN */
+static GMainLoop *g_mainloop = NULL;
+static guint g_timeout_id = 0;
+
+typedef int (*test_case_cb)(Evas_Object *widget);
+
+static gboolean timeout_function(gpointer data)
+{
+       g_source_remove(g_timeout_id);
+       g_timeout_id = 0;
+       g_main_loop_quit(g_mainloop);
+       return FALSE;
+}
+
+static inline void wait_for_async(void)
+{
+       if (g_mainloop) {
+               if (g_timeout_id) {
+                       g_source_remove(g_timeout_id);
+                       g_timeout_id = 0;
+               }
+               g_main_loop_quit(g_mainloop);
+               g_mainloop = NULL;
+       }
+
+       g_mainloop = g_main_loop_new(NULL, FALSE);
+
+       g_timeout_id = g_timeout_add(2000, timeout_function, NULL);
+       g_main_loop_run(g_mainloop);
+
+       if (g_timeout_id > 0) {
+               g_source_remove(g_timeout_id);
+               g_timeout_id = 0;
+       }
+       g_mainloop = NULL;
+}
+
+
+static int tct_async_ret_callback(test_case_cb cb, struct widget_evas_event_info *info)
+{
+       assert_neq(info, NULL);
+       assert_eq(info->error, WIDGET_ERROR_NONE);
+       assert_neq(info->widget_app_id, NULL);
+       assert_eq(strcmp(info->widget_app_id, SAMPLE_WIDGET), 0);
+       assert_eq(info->event, WIDGET_EVENT_CREATED);
+
+       return 0;
+}
+
+static void _widget_create_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       struct widget_evas_event_info *info = event_info;
+       test_case_cb cb = data;
+       int ret;
+
+       ret = tct_async_ret_callback(cb, info);
+       s_info.is_asserted = ret;
+       if (!ret && cb) {
+               cb(obj);
+       }
+
+       /**
+        * @TODO
+        * Quit from the main loop
+        */
+       g_main_loop_quit(g_mainloop);
+}
+
+int add_a_sample_widget(test_case_cb cb)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(widget, NULL);
+       }
+       else {
+               assert_neq(widget, NULL);
+       }
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, cb);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       ret = widget_viewer_evas_fini();
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       evas_object_del(win);
+
+       return s_info.is_asserted;
+}
+/* Common routines for creating a widget instance - END*/
+
+int tc_change_period_p_callback(Evas_Object *widget)
+{
+       int ret = WIDGET_ERROR_NONE;
+       char *instance_id = NULL;
+
+       ret = widget_viewer_evas_get_instance_id(widget, &instance_id);
+       ret = widget_service_change_period(SAMPLE_WIDGET, instance_id, 1.0f);
+
+       s_info.is_asserted = (ret == WIDGET_ERROR_NONE) ? 0 : 1;
+
+       return s_info.is_asserted;
+}
+
+int utc_widget_service_change_period_p(void)
+{
+       int ret;
+
+       ret = add_a_sample_widget(tc_change_period_p_callback);
+
+       if (s_info.appwidget_supported == false) {
+               assert_neq(ret, WIDGET_ERROR_NONE);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+static int widget_list_cb_p(const char *pkgid, const char *widget_id, int is_prime, void *data)
+{
+       return 0;
+}
+
+int utc_widget_service_get_widget_list_p(void)
+{
+       int ret;
+       /**
+        * @note
+        * There is only one package SAMPLE_WIDGET
+        */
+       ret = widget_service_get_widget_list(widget_list_cb_p, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_neq(ret, WIDGET_ERROR_NOT_EXIST);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_main_app_id_p(void)
+{
+       char *ret;
+       int result;
+
+       ret = widget_service_get_main_app_id(SAMPLE_WIDGET);
+
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, NULL);
+       }
+       else {
+               assert_neq(ret, NULL);
+               result = strcmp(ret, SAMPLE_WIDGET);
+               free(ret);
+               assert_eq(result, 0);
+       }
+
+       return 0;
+}
+
+static int utc_widget_service_get_widget_list_by_pkgid_p_cb(const char *widget_id, int is_primary, void *data)
+{
+       return 0;
+}
+
+int utc_widget_service_get_widget_list_by_pkgid_p(void)
+{
+       int ret;
+       ret = widget_service_get_widget_list_by_pkgid(SAMPLE_WIDGET, utc_widget_service_get_widget_list_by_pkgid_p_cb, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, 1);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_widget_id_p(void)
+{
+       char *ret;
+       int result;
+
+       ret = widget_service_get_widget_id(SAMPLE_WIDGET);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, NULL);
+       }
+       else {
+               assert_neq(ret, NULL);
+
+               result = strcmp(ret, SAMPLE_WIDGET);
+               free(ret);
+
+               assert_eq(result, 0);
+       }
+
+
+       return 0;
+}
+
+int utc_widget_service_get_app_id_of_setup_app_p(void)
+{
+       char *ret;
+
+       ret = widget_service_get_app_id_of_setup_app(SAMPLE_WIDGET);
+       assert_eq(ret, NULL);
+
+       return 0;
+}
+
+int utc_widget_service_get_package_id_p(void)
+{
+       char *ret;
+       int result;
+
+       ret = widget_service_get_package_id(SAMPLE_WIDGET);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, NULL);
+       }
+       else {
+               assert_neq(ret, NULL);
+
+               result = strcmp(ret, SAMPLE_PKGNAME);
+               free(ret);
+
+               assert_eq(result, 0);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_name_p(void)
+{
+       char *ret;
+
+       ret = widget_service_get_name(SAMPLE_WIDGET, NULL);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, NULL);
+       }
+       else {
+               assert_neq(ret, NULL);
+               free(ret);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_preview_image_path_p(void)
+{
+       char *ret;
+       int result;
+
+       ret = widget_service_get_preview_image_path(SAMPLE_WIDGET, WIDGET_SIZE_TYPE_2x2);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, NULL);
+       }
+       else {
+               assert_neq(ret, NULL);
+               result = strcmp(ret, SAMPLE_PREVIEW);
+               free(ret);
+               assert_neq(result, 0);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_icon_p(void)
+{
+       char *ret;
+       int result;
+
+       ret = widget_service_get_icon(SAMPLE_WIDGET, NULL);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, NULL);
+       }
+       else {
+               assert_neq(ret, NULL);
+               result = strcmp(ret, "/opt/apps/"SAMPLE_PKGNAME"/shared/icon/"SAMPLE_WIDGET".png");
+               free(ret);
+               assert_neq(result, 0);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_nodisplay_p(void)
+{
+       int ret;
+
+       if (s_info.appwidget_supported == true) {
+               ret = widget_service_get_nodisplay(SAMPLE_WIDGET);
+               assert_eq(ret, 0);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_supported_sizes_p(void)
+{
+       int ret;
+       int cnt = 20;
+       int *w;
+       int *h;
+       int sw;
+       int sh;
+
+       ret = widget_service_get_supported_sizes(SAMPLE_WIDGET, &cnt, &w, &h);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+
+               assert_eq(cnt, 1);
+
+               ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &sw, &sh);
+               assert_eq(ret, WIDGET_ERROR_NONE);
+
+               assert_eq(w[0], sw);
+               assert_eq(h[0], sh);
+
+               free(w);
+               free(h);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_supported_size_types_p(void)
+{
+       int ret;
+       int cnt = 20;
+       int *size_types = NULL;
+
+       ret = widget_service_get_supported_size_types(SAMPLE_WIDGET, &cnt, &size_types);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+               assert_eq(cnt, 1);
+               assert_eq(size_types[0], WIDGET_SIZE_TYPE_2x2);
+
+               free(size_types);
+       }
+
+
+
+       return 0;
+}
+
+static int utc_widget_instance_list_cb_p(const char *widget_id, const char *instance_id, void *data)
+{
+       return 0;
+}
+
+int tc_get_widget_instance_list_p_callback(Evas_Object *widget)
+{
+       int ret = WIDGET_ERROR_NONE;
+       char *instance_id = NULL;
+
+       ret = widget_service_get_widget_instance_list(SAMPLE_WIDGET, utc_widget_instance_list_cb_p, NULL);
+
+       return ret;
+}
+
+int utc_widget_service_get_widget_instance_list_p(void)
+{
+       int ret;
+
+       ret = add_a_sample_widget(tc_get_widget_instance_list_p_callback);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+static int widget_lifecycle_event_cb_p(const char *widget_id, widget_lifecycle_event_e lifecycle_event, const char *widget_instance_id, void *data)
+{
+       return 0;
+}
+
+int utc_widget_service_set_lifecycle_event_cb_p(void)
+{
+       int ret;
+
+       ret = widget_service_set_lifecycle_event_cb(NULL, widget_lifecycle_event_cb_p, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_unset_lifecycle_event_cb_p(void)
+{
+       int ret;
+
+       ret = widget_service_set_lifecycle_event_cb(NULL, widget_lifecycle_event_cb_p, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       ret = widget_service_unset_lifecycle_event_cb(NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       return 0;
+}
+
+int utc_widget_service_get_content_of_widget_instance_p(void)
+{
+       int ret;
+
+       /**
+        * @note
+        * There is no instances are initiated, so this API cannot be tested.
+        */
+       ret = widget_service_get_content_of_widget_instance(SAMPLE_WIDGET, NULL, NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+/* End of a file */
diff --git a/src/utc/widget_viewer_evas/CMakeLists.txt b/src/utc/widget_viewer_evas/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..348a36b
--- /dev/null
@@ -0,0 +1,38 @@
+SET(PKG_NAME "widget_viewer_evas")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "widget_viewer_evas")
+SET(TC_SOURCES
+    utc-widget_viewer_evas.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+    ${CAPI_LIB}
+    glib-2.0
+       elementary
+       capi-system-info
+       capi-appfw-application
+)
+
+INCLUDE_DIRECTORIES(
+    ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+    ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+    DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/org.tizen.sample-1.0.0-arm.tpk DESTINATION /opt/usr/media)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/org.tizen.sample-1.0.0-i386.tpk DESTINATION /opt/usr/media)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/org.tizen.sample.crash-1.0.0-arm.tpk DESTINATION /opt/usr/media)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/org.tizen.sample.crash-1.0.0-i386.tpk DESTINATION /opt/usr/media)
diff --git a/src/utc/widget_viewer_evas/platform.list b/src/utc/widget_viewer_evas/platform.list
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/src/utc/widget_viewer_evas/public.list b/src/utc/widget_viewer_evas/public.list
new file mode 100755 (executable)
index 0000000..dba6950
--- /dev/null
@@ -0,0 +1,25 @@
+widget_viewer_evas_init
+widget_viewer_evas_fini
+widget_viewer_evas_add_widget
+widget_viewer_evas_notify_resumed_status_of_viewer
+widget_viewer_evas_notify_paused_status_of_viewer
+widget_viewer_evas_notify_orientation_of_viewer
+widget_viewer_evas_pause_widget
+widget_viewer_evas_resume_widget
+widget_viewer_evas_set_option
+widget_viewer_evas_get_content_info
+widget_viewer_evas_get_title_string
+widget_viewer_evas_get_widget_id
+widget_viewer_evas_get_period
+widget_viewer_evas_cancel_click_event
+widget_viewer_evas_disable_preview
+widget_viewer_evas_disable_overlay_text
+widget_viewer_evas_disable_loading
+widget_viewer_evas_feed_mouse_up_event
+widget_viewer_evas_activate_faulted_widget
+widget_viewer_evas_is_faulted
+widget_viewer_evas_freeze_visibility
+widget_viewer_evas_thaw_visibility
+widget_viewer_evas_is_visibility_frozen
+widget_viewer_evas_is_widget
+widget_viewer_evas_set_permanent_delete
diff --git a/src/utc/widget_viewer_evas/res/org.tizen.sample-1.0.0-arm.tpk b/src/utc/widget_viewer_evas/res/org.tizen.sample-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..809d3fc
Binary files /dev/null and b/src/utc/widget_viewer_evas/res/org.tizen.sample-1.0.0-arm.tpk differ
diff --git a/src/utc/widget_viewer_evas/res/org.tizen.sample-1.0.0-i386.tpk b/src/utc/widget_viewer_evas/res/org.tizen.sample-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..903ce42
Binary files /dev/null and b/src/utc/widget_viewer_evas/res/org.tizen.sample-1.0.0-i386.tpk differ
diff --git a/src/utc/widget_viewer_evas/res/org.tizen.sample.crash-1.0.0-arm.tpk b/src/utc/widget_viewer_evas/res/org.tizen.sample.crash-1.0.0-arm.tpk
new file mode 100755 (executable)
index 0000000..0fd307e
Binary files /dev/null and b/src/utc/widget_viewer_evas/res/org.tizen.sample.crash-1.0.0-arm.tpk differ
diff --git a/src/utc/widget_viewer_evas/res/org.tizen.sample.crash-1.0.0-i386.tpk b/src/utc/widget_viewer_evas/res/org.tizen.sample.crash-1.0.0-i386.tpk
new file mode 100755 (executable)
index 0000000..b57aa7d
Binary files /dev/null and b/src/utc/widget_viewer_evas/res/org.tizen.sample.crash-1.0.0-i386.tpk differ
diff --git a/src/utc/widget_viewer_evas/tct-widget_viewer_evas-core.c b/src/utc/widget_viewer_evas/tct-widget_viewer_evas-core.c
new file mode 100755 (executable)
index 0000000..4c2361d
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-widget_viewer_evas-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/widget_viewer_evas/tct-widget_viewer_evas-core.h b/src/utc/widget_viewer_evas/tct-widget_viewer_evas-core.h
new file mode 100755 (executable)
index 0000000..8687a57
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_WIDGET_VIEWER_EVAS_CORE_H__
+#define __TCT_WIDGET_VIEWER_EVAS_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_widget_viewer_evas_startup(void);
+extern void utc_widget_viewer_evas_cleanup(void);
+
+extern int utc_widget_viewer_evas_init_n(void);
+extern int utc_widget_viewer_evas_fini_n(void);
+extern int utc_widget_viewer_evas_add_widget_n(void);
+extern int utc_widget_viewer_evas_notify_resumed_status_of_viewer_n(void);
+extern int utc_widget_viewer_evas_notify_paused_status_of_viewer_n(void);
+extern int utc_widget_viewer_evas_notify_orientation_of_viewer_n(void);
+extern int utc_widget_viewer_evas_pause_widget_n(void);
+extern int utc_widget_viewer_evas_resume_widget_n(void);
+extern int utc_widget_viewer_evas_set_option_n(void);
+extern int utc_widget_viewer_evas_get_content_info_n(void);
+extern int utc_widget_viewer_evas_get_title_string_n(void);
+extern int utc_widget_viewer_evas_get_widget_id_n(void);
+extern int utc_widget_viewer_evas_get_period_n(void);
+extern int utc_widget_viewer_evas_cancel_click_event_n(void);
+extern int utc_widget_viewer_evas_disable_preview_n(void);
+extern int utc_widget_viewer_evas_disable_overlay_text_n(void);
+extern int utc_widget_viewer_evas_disable_loading_n(void);
+extern int utc_widget_viewer_evas_feed_mouse_up_event_n(void);
+extern int utc_widget_viewer_evas_activate_faulted_widget_n(void);
+extern int utc_widget_viewer_evas_is_faulted_n(void);
+extern int utc_widget_viewer_evas_freeze_visibility_n(void);
+extern int utc_widget_viewer_evas_thaw_visibility_n(void);
+extern int utc_widget_viewer_evas_is_visibility_frozen_n(void);
+extern int utc_widget_viewer_evas_is_widget_n(void);
+extern int utc_widget_viewer_evas_set_permanent_delete_n(void);
+extern int utc_widget_viewer_evas_init_p(void);
+extern int utc_widget_viewer_evas_fini_p(void);
+extern int utc_widget_viewer_evas_add_widget_p(void);
+extern int utc_widget_viewer_evas_notify_resumed_status_of_viewer_p(void);
+extern int utc_widget_viewer_evas_notify_paused_status_of_viewer_p(void);
+extern int utc_widget_viewer_evas_notify_orientation_of_viewer_p(void);
+extern int utc_widget_viewer_evas_pause_widget_p(void);
+extern int utc_widget_viewer_evas_resume_widget_p(void);
+extern int utc_widget_viewer_evas_set_option_p(void);
+extern int utc_widget_viewer_evas_get_content_info_p(void);
+extern int utc_widget_viewer_evas_get_title_string_p(void);
+extern int utc_widget_viewer_evas_get_widget_id_p(void);
+extern int utc_widget_viewer_evas_get_period_p(void);
+extern int utc_widget_viewer_evas_cancel_click_event_p(void);
+extern int utc_widget_viewer_evas_disable_preview_p(void);
+extern int utc_widget_viewer_evas_disable_overlay_text_p(void);
+extern int utc_widget_viewer_evas_disable_loading_p(void);
+extern int utc_widget_viewer_evas_feed_mouse_up_event_p(void);
+extern int utc_widget_viewer_evas_activate_faulted_widget_p(void);
+extern int utc_widget_viewer_evas_is_faulted_p(void);
+extern int utc_widget_viewer_evas_freeze_visibility_p(void);
+extern int utc_widget_viewer_evas_thaw_visibility_p(void);
+extern int utc_widget_viewer_evas_is_visibility_frozen_p(void);
+extern int utc_widget_viewer_evas_is_widget_p(void);
+extern int utc_widget_viewer_evas_set_permanent_delete_p(void);
+
+testcase tc_array[] = {
+    {"utc_widget_viewer_evas_init_n", utc_widget_viewer_evas_init_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_fini_n", utc_widget_viewer_evas_fini_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_add_widget_n", utc_widget_viewer_evas_add_widget_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_notify_resumed_status_of_viewer_n", utc_widget_viewer_evas_notify_resumed_status_of_viewer_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_notify_paused_status_of_viewer_n", utc_widget_viewer_evas_notify_paused_status_of_viewer_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_notify_orientation_of_viewer_n", utc_widget_viewer_evas_notify_orientation_of_viewer_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_pause_widget_n", utc_widget_viewer_evas_pause_widget_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_resume_widget_n", utc_widget_viewer_evas_resume_widget_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_set_option_n", utc_widget_viewer_evas_set_option_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_get_content_info_n", utc_widget_viewer_evas_get_content_info_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_get_title_string_n", utc_widget_viewer_evas_get_title_string_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_get_widget_id_n", utc_widget_viewer_evas_get_widget_id_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_get_period_n", utc_widget_viewer_evas_get_period_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_cancel_click_event_n", utc_widget_viewer_evas_cancel_click_event_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_disable_preview_n", utc_widget_viewer_evas_disable_preview_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_disable_overlay_text_n", utc_widget_viewer_evas_disable_overlay_text_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_disable_loading_n", utc_widget_viewer_evas_disable_loading_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_feed_mouse_up_event_n", utc_widget_viewer_evas_feed_mouse_up_event_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_activate_faulted_widget_n", utc_widget_viewer_evas_activate_faulted_widget_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_is_faulted_n", utc_widget_viewer_evas_is_faulted_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_freeze_visibility_n", utc_widget_viewer_evas_freeze_visibility_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_thaw_visibility_n", utc_widget_viewer_evas_thaw_visibility_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_is_visibility_frozen_n", utc_widget_viewer_evas_is_visibility_frozen_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_is_widget_n", utc_widget_viewer_evas_is_widget_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_set_permanent_delete_n", utc_widget_viewer_evas_set_permanent_delete_n, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_init_p", utc_widget_viewer_evas_init_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_fini_p", utc_widget_viewer_evas_fini_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_add_widget_p", utc_widget_viewer_evas_add_widget_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_notify_resumed_status_of_viewer_p", utc_widget_viewer_evas_notify_resumed_status_of_viewer_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_notify_paused_status_of_viewer_p", utc_widget_viewer_evas_notify_paused_status_of_viewer_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_notify_orientation_of_viewer_p", utc_widget_viewer_evas_notify_orientation_of_viewer_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_pause_widget_p", utc_widget_viewer_evas_pause_widget_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_resume_widget_p", utc_widget_viewer_evas_resume_widget_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_set_option_p", utc_widget_viewer_evas_set_option_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_get_content_info_p", utc_widget_viewer_evas_get_content_info_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_get_title_string_p", utc_widget_viewer_evas_get_title_string_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_get_widget_id_p", utc_widget_viewer_evas_get_widget_id_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_get_period_p", utc_widget_viewer_evas_get_period_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_cancel_click_event_p", utc_widget_viewer_evas_cancel_click_event_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_disable_preview_p", utc_widget_viewer_evas_disable_preview_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_disable_overlay_text_p", utc_widget_viewer_evas_disable_overlay_text_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_disable_loading_p", utc_widget_viewer_evas_disable_loading_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_feed_mouse_up_event_p", utc_widget_viewer_evas_feed_mouse_up_event_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_activate_faulted_widget_p", utc_widget_viewer_evas_activate_faulted_widget_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_is_faulted_p", utc_widget_viewer_evas_is_faulted_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_freeze_visibility_p", utc_widget_viewer_evas_freeze_visibility_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_thaw_visibility_p", utc_widget_viewer_evas_thaw_visibility_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_is_visibility_frozen_p", utc_widget_viewer_evas_is_visibility_frozen_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_is_widget_p", utc_widget_viewer_evas_is_widget_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {"utc_widget_viewer_evas_set_permanent_delete_p", utc_widget_viewer_evas_set_permanent_delete_p, utc_widget_viewer_evas_startup, utc_widget_viewer_evas_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_WIDGET_VIEWER_EVAS_CORE_H__
diff --git a/src/utc/widget_viewer_evas/utc-widget_viewer_evas.c b/src/utc/widget_viewer_evas/utc-widget_viewer_evas.c
new file mode 100755 (executable)
index 0000000..123f726
--- /dev/null
@@ -0,0 +1,2046 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <libintl.h>
+#include <Evas.h>
+#include <Elementary.h>
+#include <glib.h>
+
+#include <system_info.h>
+
+#include <widget_errno.h>
+#include <widget_service.h>
+#include <widget_viewer_evas.h>
+
+#include "assert.h"
+
+//& set: utc-widget_viewer_evas
+
+#include "assert.h"
+#define SAMPLE_NAME            "sample"
+#define SAMPLE_PKGNAME         "org.tizen.sample"
+#define SAMPLE_PREVIEW         "/opt/apps/"SAMPLE_PKGNAME"/shared/preview.png"
+#define SAMPLE_WIDGET          SAMPLE_PKGNAME                          // mouse_event = true, touch_effect = false, need_frame = false, nodisplay = false, 2x2
+#define NEGATIVE_SAMPLE_WIDGET SAMPLE_PKGNAME".widgetn"
+#define DEFAULT_PERIOD         0.0f
+
+static struct info {
+       int is_asserted;
+       bool appwidget_supported;
+} s_info = {
+               .is_asserted = 0,
+               .appwidget_supported = 0
+};
+
+typedef int (*test_case_cb)(Evas_Object *widget);
+
+static int assert_eq_for_callback(int var, int value)
+{
+       assert_eq(var, value);
+       return 0;
+}
+
+static int assert_neq_for_callback(int var, int value)
+{
+       assert_neq(var, value);
+       return 0;
+}
+
+/**
+ * Setup the TC environment
+ */
+void utc_widget_viewer_evas_startup(void)
+{
+       /**
+        * @note
+        * Install sample widget package
+        */
+       s_info.is_asserted = 0;
+
+       system_info_get_platform_bool("http://tizen.org/feature/shell.appwidget", &(s_info.appwidget_supported));
+}
+
+void utc_widget_viewer_evas_cleanup(void)
+{
+       /**
+        * @note
+        * Uninstall sample widget package
+        */
+       s_info.is_asserted = 0;
+}
+
+int utc_widget_viewer_evas_init_n(void)
+{
+       int ret;
+
+       ret = widget_viewer_evas_init(NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+       }
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_fini_n(void)
+{
+       int ret;
+       /**
+        * Not initialized
+        */
+       ret = widget_viewer_evas_fini();
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_FAULT);
+       }
+
+       return 0;
+}
+
+static GMainLoop *g_mainloop = NULL;
+static guint g_timeout_id = 0;
+
+static gboolean timeout_function(gpointer data)
+{
+       g_main_loop_quit(g_mainloop);
+       g_timeout_id = 0;
+       return FALSE;
+}
+
+static inline void wait_for_async(void)
+{
+       if (g_mainloop) {
+               if (g_timeout_id) {
+                       g_source_remove(g_timeout_id);
+                       g_timeout_id = 0;
+               }
+               g_main_loop_quit(g_mainloop);
+               g_mainloop = NULL;
+       }
+
+       g_mainloop = g_main_loop_new(NULL, FALSE);
+
+       g_timeout_id = g_timeout_add(4000, timeout_function, NULL);
+
+       g_main_loop_run(g_mainloop);
+
+       if (g_timeout_id > 0) {
+               g_source_remove(g_timeout_id);
+               g_timeout_id = 0;
+       }
+       g_mainloop = NULL;
+}
+
+int utc_widget_viewer_evas_add_widget_n(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               widget = widget_viewer_evas_add_widget(NULL, NULL, NULL, 0.0f);
+               assert_eq(widget, NULL);
+               return 0;
+       }
+
+       /**
+        * @NOTE
+        * Not initialized
+        */
+       widget = widget_viewer_evas_add_widget(NULL, NULL, NULL, 0.0f);
+       assert_eq(widget, NULL);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       /**
+        * @NOTE
+        * Initialized but parent object(window) is invalid
+        */
+       widget = widget_viewer_evas_add_widget(NULL, NULL, NULL, 0.0f);
+       assert_eq(widget, NULL);
+
+       /**
+        * @NOTE
+        * Initialized but widget package id is invalid
+        */
+       widget = widget_viewer_evas_add_widget(win, NULL, NULL, 0.0f);
+       assert_eq(widget, NULL);
+
+       /**
+        * @NOTE
+        * Initialized but widget package id is invalid.
+        * Widget object will be created but it will be destroyed soon.
+        * This is an asynchronous API.
+        */
+       widget = widget_viewer_evas_add_widget(win, NEGATIVE_SAMPLE_WIDGET, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(widget);
+       evas_object_del(win);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_notify_resumed_status_of_viewer_n(void)
+{
+       int ret;
+
+       /**
+        * Not initialized
+        */
+       ret = widget_viewer_evas_notify_resumed_status_of_viewer();
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_FAULT);
+       }
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_notify_paused_status_of_viewer_n(void)
+{
+       int ret;
+
+       /**
+        * Not initialized
+        */
+       ret = widget_viewer_evas_notify_paused_status_of_viewer();
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_FAULT);
+       }
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_notify_orientation_of_viewer_n(void)
+{
+       int ret;
+       Evas_Object *win;
+
+       /**
+        * Not initialized
+        */
+       ret = widget_viewer_evas_notify_orientation_of_viewer(90);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(ret, WIDGET_ERROR_FAULT);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       /**
+        * Invalid parameter
+        */
+       ret = widget_viewer_evas_notify_orientation_of_viewer(-30);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       /**
+        * Invalid parameter
+        */
+       ret = widget_viewer_evas_notify_orientation_of_viewer(390);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_pause_widget_n(void)
+{
+       int ret;
+       Evas_Object *win;
+
+       ret = widget_viewer_evas_pause_widget(NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(ret, WIDGET_ERROR_FAULT);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_pause_widget(NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_resume_widget_n(void)
+{
+       int ret;
+       Evas_Object *win;
+
+       ret = widget_viewer_evas_resume_widget(NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(ret, WIDGET_ERROR_FAULT);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_resume_widget(NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_set_option_n(void)
+{
+       int ret;
+
+       ret = widget_viewer_evas_set_option((widget_evas_conf_e)-1, 0);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_get_content_info_n(void)
+{
+       const char *str;
+       Evas_Object *win;
+       int ret;
+
+       str = widget_viewer_evas_get_content_info(NULL);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(str, NULL);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       str = widget_viewer_evas_get_content_info(NULL);
+       assert_eq(str, NULL);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_get_title_string_n(void)
+{
+       const char *str;
+       Evas_Object *win;
+       int ret;
+
+       str = widget_viewer_evas_get_title_string(NULL);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(str, NULL);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       str = widget_viewer_evas_get_title_string(NULL);
+       assert_eq(str, NULL);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_get_widget_id_n(void)
+{
+       const char *str;
+       Evas_Object *win;
+       int ret;
+
+       str = widget_viewer_evas_get_widget_id(NULL);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(str, NULL);
+               return 0;
+       }
+
+       assert_eq(str, NULL);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       str = widget_viewer_evas_get_widget_id(NULL);
+       assert_eq(str, NULL);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_get_period_n(void)
+{
+       double period;
+       int ret;
+       Evas_Object *win;
+
+       period = widget_viewer_evas_get_period(NULL);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(period, 0.0f);
+               return 0;
+       }
+
+       assert_eq(period, 0.0f);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       period = widget_viewer_evas_get_period(NULL);
+       assert_eq(period, 0.0f);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_cancel_click_event_n(void)
+{
+       int ret;
+       Evas_Object *win;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       widget_viewer_evas_cancel_click_event(NULL);
+       /** There is no returns */
+       /** void widget_viewer_evas_cancel_click_event(Evas_Object *widget); */
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget_viewer_evas_cancel_click_event(NULL);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_disable_preview_n(void)
+{
+       Evas_Object *win;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       widget_viewer_evas_disable_preview(NULL);
+       /** There is no returns */
+       /** void widget_viewer_evas_disable_preview(Evas_Object *widget); */
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget_viewer_evas_disable_preview(NULL);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_disable_overlay_text_n(void)
+{
+       Evas_Object *win;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       widget_viewer_evas_disable_overlay_text(NULL);
+       /** There is no returns */
+       /** void widget_viewer_evas_disable_overlay_text(Evas_Object *widget); */
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget_viewer_evas_disable_overlay_text(NULL);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_disable_loading_n(void)
+{
+       Evas_Object *win;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       widget_viewer_evas_disable_loading(NULL);
+       /** There is no returns */
+       /** void widget_viewer_evas_disable_loading(Evas_Object *widget); */
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget_viewer_evas_disable_loading(NULL);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_feed_mouse_up_event_n(void)
+{
+       int ret;
+       Evas_Object *win;
+
+       ret = widget_viewer_evas_feed_mouse_up_event(NULL);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(ret, WIDGET_ERROR_FAULT);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_feed_mouse_up_event(NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_activate_faulted_widget_n(void)
+{
+       int ret;
+       Evas_Object *win;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       widget_viewer_evas_activate_faulted_widget(NULL);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget_viewer_evas_activate_faulted_widget(NULL);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_is_faulted_n(void)
+{
+       int ret;
+       Evas_Object *win;
+
+       /* Not initialized */
+       ret = widget_viewer_evas_is_faulted(NULL);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, 0);
+               return 0;
+       }
+
+       assert_eq(ret, 0);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_is_faulted(NULL);
+       assert_eq(ret, 0);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_freeze_visibility_n(void)
+{
+       int ret;
+       Evas_Object *win;
+
+       /* Not initialized */
+       ret = widget_viewer_evas_freeze_visibility(NULL, WIDGET_VISIBILITY_STATUS_SHOW_FIXED);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(ret, WIDGET_ERROR_FAULT);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_freeze_visibility(NULL, WIDGET_VISIBILITY_STATUS_SHOW_FIXED);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_thaw_visibility_n(void)
+{
+       int ret;
+       Evas_Object *win;
+
+       ret = widget_viewer_evas_thaw_visibility(NULL);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(ret, WIDGET_ERROR_FAULT);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_thaw_visibility(NULL);
+       assert_eq(ret, WIDGET_ERROR_INVALID_PARAMETER);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_is_visibility_frozen_n(void)
+{
+       bool ret;
+       Evas_Object *win;
+
+       ret = widget_viewer_evas_is_visibility_frozen(NULL);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(ret, false);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_is_visibility_frozen(NULL);
+       assert_eq(ret, false);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_is_widget_n(void)
+{
+       int ret;
+       bool tmp;
+       Evas_Object *win;
+
+       tmp = widget_viewer_evas_is_widget(NULL);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(tmp, false);
+               return 0;
+       }
+
+       assert_eq(tmp, false);
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       tmp = widget_viewer_evas_is_widget(NULL);
+       assert_eq(tmp, false);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_set_permanent_delete_n(void)
+{
+       int ret;
+       Evas_Object *win;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       widget_viewer_evas_set_permanent_delete(NULL, 0);
+       /** No returns */
+       /** void widget_viewer_evas_set_permanent_delete(Evas_Object *widget, int flag); */
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       /**
+        * For the line coverage
+        */
+       widget_viewer_evas_set_permanent_delete(NULL, 0);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return 0;
+}
+
+
+int utc_widget_viewer_evas_init_p(void)
+{
+       Evas_Object *win;
+       int ret;
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+       evas_object_del(win);
+       return 0;
+}
+
+int utc_widget_viewer_evas_fini_p(void)
+{
+       Evas_Object *win;
+       int ret;
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+       }
+       else {
+               assert_eq(ret, WIDGET_ERROR_NONE);
+       }
+
+       ret = widget_viewer_evas_fini();
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(ret, WIDGET_ERROR_NONE);
+       evas_object_del(win);
+       return 0;
+}
+
+static int tct_async_ret_callback(test_case_cb cb, struct widget_evas_event_info *info)
+{
+       assert_neq(info, NULL);
+       assert_eq(info->error, WIDGET_ERROR_NONE);
+       assert_neq(info->widget_app_id, NULL);
+       assert_eq(strcmp(info->widget_app_id, SAMPLE_WIDGET), 0);
+       assert_eq(info->event, WIDGET_EVENT_CREATED);
+
+       return 0;
+}
+
+static gboolean waiting_timer_cb(gpointer data)
+{
+       g_main_loop_quit(g_mainloop);
+       return FALSE;
+}
+
+static void _widget_create_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       struct widget_evas_event_info *info = event_info;
+       test_case_cb cb = data;
+       int ret;
+
+       ret = tct_async_ret_callback(cb, info);
+       s_info.is_asserted = ret;
+       if (!ret && cb) {
+               int w;
+               int h;
+               cb(obj);
+
+               ret = widget_service_get_size(WIDGET_SIZE_TYPE_4x4, &w, &h);
+               if (ret == WIDGET_ERROR_NONE) {
+                       evas_object_resize(obj, w, h);
+                       evas_object_color_set(obj, 255, 255, 255, 255); /* Just for the line-coverage */
+                       evas_object_hide(obj);
+                       evas_object_show(obj);
+               }
+       }
+
+       guint id;
+       id = g_timeout_add(1000, waiting_timer_cb, NULL);
+       if (id == 0u) {
+               /**
+                * @TODO
+                * Quit from the main loop
+                */
+               g_main_loop_quit(g_mainloop);
+       }
+}
+
+int utc_widget_viewer_evas_add_widget_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               widget = widget_viewer_evas_add_widget(NULL, SAMPLE_PKGNAME, NULL, 0.0f);
+               assert_eq(widget, NULL);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, NULL);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_color_set(widget, 255, 255, 255, 255); /* Just for the line-coverage */
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return s_info.is_asserted;
+}
+
+int utc_widget_viewer_evas_notify_resumed_status_of_viewer_p(void)
+{
+       Evas_Object *win;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               ret = widget_viewer_evas_notify_resumed_status_of_viewer();
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_notify_resumed_status_of_viewer();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_notify_paused_status_of_viewer_p(void)
+{
+       Evas_Object *win;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               ret = widget_viewer_evas_notify_paused_status_of_viewer();
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_notify_paused_status_of_viewer();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_notify_orientation_of_viewer_p(void)
+{
+       Evas_Object *win;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               ret = widget_viewer_evas_notify_orientation_of_viewer(90);
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_notify_orientation_of_viewer(90);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return 0;
+}
+
+static int tc_pause(Evas_Object *widget)
+{
+       int ret;
+
+       ret = widget_viewer_evas_pause_widget(widget);
+       s_info.is_asserted = assert_eq_for_callback(ret, WIDGET_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_pause_widget_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               ret = widget_viewer_evas_pause_widget(NULL);
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_pause);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+static int tc_resume(Evas_Object *widget)
+{
+       int ret;
+
+       ret = widget_viewer_evas_resume_widget(widget);
+       if (ret != WIDGET_ERROR_ALREADY_EXIST)
+               s_info.is_asserted = assert_eq_for_callback(ret, WIDGET_ERROR_NONE);
+       else
+               s_info.is_asserted = 0;
+
+       return s_info.is_asserted;
+}
+
+int utc_widget_viewer_evas_resume_widget_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               ret = widget_viewer_evas_resume_widget(NULL);
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_resume);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+int utc_widget_viewer_evas_set_option_p(void)
+{
+       int ret;
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_EVENT_AUTO_FEED, 0);
+
+       if (s_info.appwidget_supported == false) {
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_SENSITIVE_MOVE, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_EVENT_AUTO_FEED, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_EASY_MODE, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_USE_FIXED_SIZE, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_MANUAL_PAUSE_RESUME, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_SCROLL_X, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_SCROLL_Y, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_DELAYED_RESUME, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_AUTO_RENDER_SELECTION, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_DIRECT_UPDATE, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_USE_RENDER_ANIMATOR, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       ret = widget_viewer_evas_set_option(WIDGET_VIEWER_EVAS_SKIP_ACQUIRE, 0);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       return 0;
+}
+
+static int tc_get_content(Evas_Object *widget)
+{
+       const char *str;
+
+       /**
+        * There is no contents available
+        */
+       str = widget_viewer_evas_get_content_info(widget);
+       s_info.is_asserted = assert_neq_for_callback((int)str, 0);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_get_content_info_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+       const char *str = NULL;
+
+       if (s_info.appwidget_supported == false) {
+               str = widget_viewer_evas_get_content_info(NULL);
+               assert_eq(str, NULL);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_get_content);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+static int tc_get_title_string(Evas_Object *widget)
+{
+       const char *str;
+       str = widget_viewer_evas_get_title_string(widget);
+       s_info.is_asserted = assert_neq_for_callback((int)str, 0);
+       return 0;
+}
+
+int utc_widget_viewer_evas_get_title_string_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+       const char *str = NULL;
+
+       if (s_info.appwidget_supported == false) {
+               str = widget_viewer_evas_get_title_string(NULL);
+               assert_eq(str, NULL);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_get_title_string);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+static int tc_get_widget_id(Evas_Object *widget)
+{
+       const char *str;
+
+       str = widget_viewer_evas_get_widget_id(widget);
+       s_info.is_asserted = assert_neq_for_callback((int)str, 0);
+       s_info.is_asserted = s_info.is_asserted || assert_eq_for_callback(strcmp(str, SAMPLE_PKGNAME), 0);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_get_widget_id_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+       const char *str = NULL;
+
+       if (s_info.appwidget_supported == false) {
+               str = widget_viewer_evas_get_widget_id(NULL);
+               assert_eq(str, NULL);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_get_widget_id);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+static int tc_get_period(Evas_Object *widget)
+{
+       double period;
+
+       period = widget_viewer_evas_get_period(widget);
+       s_info.is_asserted = assert_eq_for_callback((int)period, 0);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_get_period_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+       double period;
+
+       if (s_info.appwidget_supported == false) {
+               period = widget_viewer_evas_get_period(NULL);
+               assert_eq((int)period, 0);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_get_period);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+static int tc_cancel_click(Evas_Object *widget)
+{
+       widget_viewer_evas_cancel_click_event(widget);
+       /** No returns */
+       return 0;
+}
+
+int utc_widget_viewer_evas_cancel_click_event_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_cancel_click);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+static int tc_disable_preview_p(Evas_Object *widget)
+{
+       widget_viewer_evas_disable_preview(widget);
+       return 0;
+}
+
+int utc_widget_viewer_evas_disable_preview_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int ret;
+       int w;
+       int h;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_disable_preview_p);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, 480, 800);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return ret;
+}
+
+int utc_widget_viewer_evas_disable_overlay_text_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       /* No created callback required */
+       widget_viewer_evas_disable_overlay_text(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+int utc_widget_viewer_evas_disable_loading_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       /* No created callback required */
+       widget_viewer_evas_disable_loading(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+static int tc_feed_mouse_up_event_p(Evas_Object *widget)
+{
+       int ret;
+
+       Evas *e;
+
+       e = evas_object_evas_get(widget);
+       evas_event_feed_mouse_down(e, 1, EVAS_BUTTON_NONE, 0, NULL);
+
+       ret = widget_viewer_evas_feed_mouse_up_event(widget);
+
+       s_info.is_asserted = (ret == WIDGET_ERROR_NONE) ? 0 : 1;
+
+       return s_info.is_asserted;
+}
+
+int utc_widget_viewer_evas_feed_mouse_up_event_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               ret = widget_viewer_evas_feed_mouse_up_event(NULL);
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       s_info.is_asserted = 0;
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_feed_mouse_up_event_p);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+
+       return s_info.is_asserted;
+}
+
+static int tc_activate(Evas_Object *widget)
+{
+       widget_viewer_evas_activate_faulted_widget(widget);
+       /* No returns */
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_activate_faulted_widget_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_WIDGET, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_activate);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+static int tc_faulted(Evas_Object *widget)
+{
+       int ret;
+
+       ret = widget_viewer_evas_is_faulted(widget);
+       s_info.is_asserted = assert_neq_for_callback(ret, 1);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_is_faulted_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               ret = widget_viewer_evas_is_faulted(NULL);
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_WIDGET, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_faulted);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return 0;
+}
+
+static int tc_freeze(Evas_Object *widget)
+{
+       int ret;
+
+       ret = widget_viewer_evas_freeze_visibility(widget, WIDGET_VISIBILITY_STATUS_SHOW_FIXED);
+       s_info.is_asserted = assert_eq_for_callback(ret, WIDGET_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_freeze_visibility_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               ret = widget_viewer_evas_freeze_visibility(NULL, WIDGET_VISIBILITY_STATUS_SHOW_FIXED);
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_freeze);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+static int tc_thaw(Evas_Object *widget)
+{
+       int ret;
+
+       ret = widget_viewer_evas_thaw_visibility(widget);
+       s_info.is_asserted = assert_eq_for_callback(ret, WIDGET_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_thaw_visibility_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               ret = widget_viewer_evas_thaw_visibility(NULL);
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_thaw);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+static int tc_get_visiblity_cb(Evas_Object *widget)
+{
+       bool ret;
+
+       ret = widget_viewer_evas_is_visibility_frozen(widget);
+       s_info.is_asserted = assert_eq_for_callback(ret, false);
+
+       return 0;
+}
+
+int utc_widget_viewer_evas_is_visibility_frozen_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               ret = widget_viewer_evas_is_visibility_frozen(NULL);
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       evas_object_smart_callback_add(widget, WIDGET_SMART_SIGNAL_WIDGET_CREATED, _widget_create_cb, tc_get_visiblity_cb);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       wait_for_async();
+
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+int utc_widget_viewer_evas_is_widget_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               ret = widget_viewer_evas_is_widget(NULL);
+               assert_eq(ret, WIDGET_ERROR_NOT_SUPPORTED);
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       ret = widget_viewer_evas_is_widget(widget);
+       assert_eq(ret, 1);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+int utc_widget_viewer_evas_set_permanent_delete_p(void)
+{
+       Evas_Object *win;
+       Evas_Object *widget;
+       int w, h;
+       int ret;
+
+       if (s_info.appwidget_supported == false) {
+               /* Can not be tested */
+               return 0;
+       }
+
+       win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+       assert_neq(win, NULL);
+       evas_object_resize(win, 480, 800);
+       evas_object_show(win);
+
+       ret = widget_viewer_evas_init(win);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       widget = widget_viewer_evas_add_widget(win, SAMPLE_PKGNAME, NULL, 0.0f);
+       assert_neq(widget, NULL);
+
+       ret = widget_service_get_size(WIDGET_SIZE_TYPE_2x2, &w, &h);
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_resize(widget, w, h);
+       evas_object_show(widget);
+
+       /* No returns */
+       widget_viewer_evas_set_permanent_delete(widget, 1);
+       evas_object_del(widget);
+
+       ret = widget_viewer_evas_fini();
+       assert_eq(ret, WIDGET_ERROR_NONE);
+
+       evas_object_del(win);
+       return s_info.is_asserted;
+}
+
+/* End of a file */
diff --git a/src/utc/wifi/CMakeLists.txt b/src/utc/wifi/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..b55ab3c
--- /dev/null
@@ -0,0 +1,37 @@
+SET(PKG_NAME "wifi")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+SET(CONFIGFILEPATH "\"/tmp/TC_Config.txt\"")
+
+SET(CAPI_LIB "capi-network-wifi")
+SET(TC_SOURCES
+       utc-network-wifi-ap.c
+       utc-network-wifi.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       glib-2.0
+       capi-system-info
+       capi-appfw-application
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+add_definitions(-DCONFIGFILE_PATH=${CONFIGFILEPATH})
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+
diff --git a/src/utc/wifi/public.list b/src/utc/wifi/public.list
new file mode 100755 (executable)
index 0000000..5e904d1
--- /dev/null
@@ -0,0 +1,72 @@
+wifi_activate
+wifi_activate_with_wifi_picker_tested
+wifi_ap_clone
+wifi_ap_create
+wifi_ap_destroy
+wifi_ap_get_bssid
+wifi_ap_get_connection_state
+wifi_ap_get_dns_address
+wifi_ap_get_eap_auth_type
+wifi_ap_get_eap_ca_cert_file
+wifi_ap_get_eap_client_cert_file
+wifi_ap_get_eap_passphrase
+wifi_ap_get_eap_private_key_file
+wifi_ap_get_eap_type
+wifi_ap_get_encryption_type
+wifi_ap_get_essid
+wifi_ap_get_frequency
+wifi_ap_get_gateway_address
+wifi_ap_get_ip_address
+wifi_ap_get_ip_config_type
+wifi_ap_get_max_speed
+wifi_ap_get_proxy_address
+wifi_ap_get_proxy_type
+wifi_ap_get_rssi
+wifi_ap_get_security_type
+wifi_ap_get_subnet_mask
+wifi_ap_hidden_create
+wifi_ap_is_favorite
+wifi_ap_is_passphrase_required
+wifi_ap_is_passpoint
+wifi_ap_is_wps_supported
+wifi_ap_refresh
+wifi_ap_set_dns_address
+wifi_ap_set_eap_auth_type
+wifi_ap_set_eap_ca_cert_file
+wifi_ap_set_eap_client_cert_file
+wifi_ap_set_eap_passphrase
+wifi_ap_set_eap_private_key_info
+wifi_ap_set_eap_type
+wifi_ap_set_encryption_type
+wifi_ap_set_gateway_address
+wifi_ap_set_ip_address
+wifi_ap_set_ip_config_type
+wifi_ap_set_passphrase
+wifi_ap_set_proxy_address
+wifi_ap_set_proxy_type
+wifi_ap_set_security_type
+wifi_ap_set_subnet_mask
+wifi_connect
+wifi_connect_by_wps_pbc
+wifi_connect_by_wps_pin
+wifi_deactivate
+wifi_deinitialize
+wifi_disconnect
+wifi_foreach_found_aps
+wifi_forget_ap
+wifi_get_connected_ap
+wifi_get_connection_state
+wifi_get_mac_address
+wifi_get_network_interface_name
+wifi_initialize
+wifi_is_activated
+wifi_scan
+wifi_set_background_scan_cb
+wifi_set_connection_state_changed_cb
+wifi_set_device_state_changed_cb
+wifi_set_rssi_level_changed_cb
+wifi_unset_background_scan_cb
+wifi_unset_connection_state_changed_cb
+wifi_unset_device_state_changed_cb
+wifi_unset_rssi_level_changed_cb
+
diff --git a/src/utc/wifi/tct-wifi-core.c b/src/utc/wifi/tct-wifi-core.c
new file mode 100755 (executable)
index 0000000..e31261d
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-wifi-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);   
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);  
+                       result = tc_array[i].function();
+    
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/src/utc/wifi/tct-wifi-core.h b/src/utc/wifi/tct-wifi-core.h
new file mode 100755 (executable)
index 0000000..08fd158
--- /dev/null
@@ -0,0 +1,331 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef __TCT_WIFI_CORE_H__
+#define __TCT_WIFI_CORE_H__
+
+#include "testcase.h"
+
+extern void utc_wifi_ap_startup(void);
+extern void utc_wifi_ap_cleanup(void);
+extern void utc_wifi_startup(void);
+extern void utc_wifi_cleanup(void);
+
+extern int utc_wifi_ap_create_p(void);
+extern int utc_wifi_ap_create_n_1(void);
+extern int utc_wifi_ap_hidden_create_p(void);
+extern int utc_wifi_ap_hidden_create_n(void);
+extern int utc_wifi_ap_clone_p(void);
+extern int utc_wifi_ap_clone_n(void);
+extern int utc_wifi_ap_get_essid_p(void);
+extern int utc_wifi_ap_get_essid_n(void);
+extern int utc_wifi_ap_get_bssid_p(void);
+extern int utc_wifi_ap_get_bssid_n(void);
+extern int utc_wifi_ap_get_rssi_p(void);
+extern int utc_wifi_ap_get_rssi_n(void);
+extern int utc_wifi_ap_get_frequency_p(void);
+extern int utc_wifi_ap_get_frequency_n(void);
+extern int utc_wifi_ap_get_max_speed_p(void);
+extern int utc_wifi_ap_get_max_speed_n(void);
+extern int utc_wifi_ap_is_favorite_p(void);
+extern int utc_wifi_ap_is_favorite_n(void);
+extern int utc_wifi_ap_is_passpoint_p(void);
+extern int utc_wifi_ap_is_passpoint_n(void);
+extern int utc_wifi_ap_get_connection_state_p(void);
+extern int utc_wifi_ap_get_connection_state_n(void);
+extern int utc_wifi_ap_get_ip_config_type_p(void);
+extern int utc_wifi_ap_get_ip_config_type_n(void);
+extern int utc_wifi_ap_set_ip_config_type_p(void);
+extern int utc_wifi_ap_set_ip_config_type_n(void);
+extern int utc_wifi_ap_get_ip_address_p(void);
+extern int utc_wifi_ap_get_ip_address_n(void);
+extern int utc_wifi_ap_set_ip_address_p(void);
+extern int utc_wifi_ap_set_ip_address_n(void);
+extern int utc_wifi_ap_get_subnet_mask_p(void);
+extern int utc_wifi_ap_get_subnet_mask_n(void);
+extern int utc_wifi_ap_set_subnet_mask_p(void);
+extern int utc_wifi_ap_set_subnet_mask_n(void);
+extern int utc_wifi_ap_get_gateway_address_p(void);
+extern int utc_wifi_ap_get_gateway_address_n(void);
+extern int utc_wifi_ap_set_gateway_address_p(void);
+extern int utc_wifi_ap_set_gateway_address_n(void);
+extern int utc_wifi_ap_get_proxy_address_p(void);
+extern int utc_wifi_ap_get_proxy_address_n(void);
+extern int utc_wifi_ap_set_proxy_address_p(void);
+extern int utc_wifi_ap_set_proxy_address_n(void);
+extern int utc_wifi_ap_get_proxy_type_p(void);
+extern int utc_wifi_ap_get_proxy_type_n(void);
+extern int utc_wifi_ap_set_proxy_type_p(void);
+extern int utc_wifi_ap_set_proxy_type_n(void);
+extern int utc_wifi_ap_get_dns_address_p(void);
+extern int utc_wifi_ap_get_dns_address_n(void);
+extern int utc_wifi_ap_set_dns_address_p(void);
+extern int utc_wifi_ap_set_dns_address_n(void);
+extern int utc_wifi_ap_get_security_type_p(void);
+extern int utc_wifi_ap_get_security_type_n(void);
+extern int utc_wifi_ap_set_security_type_p(void);
+extern int utc_wifi_ap_set_security_type_n(void);
+extern int utc_wifi_ap_get_encryption_type_p(void);
+extern int utc_wifi_ap_get_encryption_type_n(void);
+extern int utc_wifi_ap_set_encryption_type_p(void);
+extern int utc_wifi_ap_set_encryption_type_n(void);
+extern int utc_wifi_ap_is_passphrase_required_p(void);
+extern int utc_wifi_ap_is_passphrase_required_n(void);
+extern int utc_wifi_ap_set_passphrase_p(void);
+extern int utc_wifi_ap_set_passphrase_n(void);
+extern int utc_wifi_ap_is_wps_supported_p(void);
+extern int utc_wifi_ap_is_wps_supported_n(void);
+extern int utc_wifi_ap_set_eap_passphrase_p(void);
+extern int utc_wifi_ap_set_eap_passphrase_n(void);
+extern int utc_wifi_ap_get_eap_passphrase_p(void);
+extern int utc_wifi_ap_get_eap_passphrase_n(void);
+extern int utc_wifi_ap_get_eap_ca_cert_file_p(void);
+extern int utc_wifi_ap_get_eap_ca_cert_file_n(void);
+extern int utc_wifi_ap_set_eap_ca_cert_file_p(void);
+extern int utc_wifi_ap_set_eap_ca_cert_file_n(void);
+extern int utc_wifi_ap_get_eap_client_cert_file_p(void);
+extern int utc_wifi_ap_get_eap_client_cert_file_n(void);
+extern int utc_wifi_ap_set_eap_client_cert_file_p(void);
+extern int utc_wifi_ap_set_eap_client_cert_file_n(void);
+extern int utc_wifi_ap_get_eap_private_key_file_p(void);
+extern int utc_wifi_ap_get_eap_private_key_file_n(void);
+extern int utc_wifi_ap_set_eap_private_key_info_p(void);
+extern int utc_wifi_ap_set_eap_private_key_info_n(void);
+extern int utc_wifi_ap_get_eap_type_p(void);
+extern int utc_wifi_ap_get_eap_type_n(void);
+extern int utc_wifi_ap_set_eap_type_p(void);
+extern int utc_wifi_ap_set_eap_type_n(void);
+extern int utc_wifi_ap_get_eap_auth_type_p(void);
+extern int utc_wifi_ap_get_eap_auth_type_n(void);
+extern int utc_wifi_ap_set_eap_auth_type_p(void);
+extern int utc_wifi_ap_set_eap_auth_type_n(void);
+extern int utc_wifi_ap_refresh_p(void);
+extern int utc_wifi_ap_refresh_n(void);
+extern int utc_wifi_ap_destroy_p(void);
+extern int utc_wifi_ap_destroy_n(void);
+extern int utc_wifi_initialize_p(void);
+extern int utc_wifi_initialize_n(void);
+extern int utc_wifi_activate_n(void);
+extern int utc_wifi_activate_p(void);
+extern int utc_wifi_activate_with_wifi_picker_tested_n(void);
+extern int utc_wifi_activate_with_wifi_picker_tested_p(void);
+extern int utc_wifi_is_activated_p(void);
+extern int utc_wifi_is_activated_n(void);
+extern int utc_wifi_get_connection_state_p(void);
+extern int utc_wifi_get_connection_state_n(void);
+extern int utc_wifi_get_mac_address_p(void);
+extern int utc_wifi_get_mac_address_n(void);
+extern int utc_wifi_foreach_found_aps_p(void);
+extern int utc_wifi_foreach_found_aps_n(void);
+extern int utc_wifi_set_device_state_changed_cb_p(void);
+extern int utc_wifi_set_device_state_changed_cb_n_1(void);
+extern int utc_wifi_set_device_state_changed_cb_n_2(void);
+extern int utc_wifi_unset_device_state_changed_cb_p(void);
+extern int utc_wifi_unset_device_state_changed_cb_n(void);
+extern int utc_wifi_set_background_scan_cb_p(void);
+extern int utc_wifi_set_background_scan_cb_n_1(void);
+extern int utc_wifi_set_background_scan_cb_n_2(void);
+extern int utc_wifi_unset_background_scan_cb_p(void);
+extern int utc_wifi_unset_background_scan_cb_n(void);
+extern int utc_wifi_set_connection_state_changed_cb_p(void);
+extern int utc_wifi_set_connection_state_changed_cb_n_1(void);
+extern int utc_wifi_set_connection_state_changed_cb_n_2(void);
+extern int utc_wifi_unset_connection_state_changed_cb_p(void);
+extern int utc_wifi_unset_connection_state_changed_cb_n(void);
+extern int utc_wifi_set_rssi_level_changed_cb_p(void);
+extern int utc_wifi_set_rssi_level_changed_cb_n_1(void);
+extern int utc_wifi_unset_rssi_level_changed_cb_p(void);
+extern int utc_wifi_unset_rssi_level_changed_cb_n(void);
+extern int utc_wifi_deinitialize_p(void);
+extern int utc_wifi_deinitialize_n(void);
+extern int utc_wifi_get_network_interface_name_p(void);
+extern int utc_wifi_get_network_interface_name_n(void);
+extern int utc_wifi_scan_p(void);
+extern int utc_wifi_scan_n(void);
+extern int utc_wifi_get_connected_ap_p(void);
+extern int utc_wifi_get_connected_ap_n_1(void);
+extern int utc_wifi_get_connected_ap_n_2(void);
+extern int utc_wifi_deactivate_n(void);
+extern int utc_wifi_deactivate_p(void);
+extern int utc_wifi_connect_n_1(void);
+extern int utc_wifi_connect_n_2(void);
+extern int utc_wifi_connect_p(void);
+extern int utc_wifi_disconnect_n_1(void);
+extern int utc_wifi_disconnect_n_2(void);
+extern int utc_wifi_disconnect_p(void);
+extern int utc_wifi_connect_by_wps_pin_n_1(void);
+extern int utc_wifi_connect_by_wps_pin_n_2(void);
+extern int utc_wifi_connect_by_wps_pin_p(void);
+extern int utc_wifi_connect_by_wps_pbc_n_1(void);
+extern int utc_wifi_connect_by_wps_pbc_n_2(void);
+extern int utc_wifi_connect_by_wps_pbc_p(void);
+extern int utc_wifi_forget_ap_n(void);
+extern int utc_wifi_forget_ap_p(void);
+
+testcase tc_array[] = {
+    {"utc_wifi_ap_create_p", utc_wifi_ap_create_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_create_n_1", utc_wifi_ap_create_n_1, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_hidden_create_p", utc_wifi_ap_hidden_create_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_hidden_create_n", utc_wifi_ap_hidden_create_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_clone_p", utc_wifi_ap_clone_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_clone_n", utc_wifi_ap_clone_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_essid_p", utc_wifi_ap_get_essid_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_essid_n", utc_wifi_ap_get_essid_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_bssid_p", utc_wifi_ap_get_bssid_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_bssid_n", utc_wifi_ap_get_bssid_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_rssi_p", utc_wifi_ap_get_rssi_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_rssi_n", utc_wifi_ap_get_rssi_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_frequency_p", utc_wifi_ap_get_frequency_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_frequency_n", utc_wifi_ap_get_frequency_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_max_speed_p", utc_wifi_ap_get_max_speed_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_max_speed_n", utc_wifi_ap_get_max_speed_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_is_favorite_p", utc_wifi_ap_is_favorite_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_is_favorite_n", utc_wifi_ap_is_favorite_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_is_passpoint_p", utc_wifi_ap_is_passpoint_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_is_passpoint_n", utc_wifi_ap_is_passpoint_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_connection_state_p", utc_wifi_ap_get_connection_state_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_connection_state_n", utc_wifi_ap_get_connection_state_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_ip_config_type_p", utc_wifi_ap_get_ip_config_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_ip_config_type_n", utc_wifi_ap_get_ip_config_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_ip_config_type_p", utc_wifi_ap_set_ip_config_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_ip_config_type_n", utc_wifi_ap_set_ip_config_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_ip_address_p", utc_wifi_ap_get_ip_address_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_ip_address_n", utc_wifi_ap_get_ip_address_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_ip_address_p", utc_wifi_ap_set_ip_address_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_ip_address_n", utc_wifi_ap_set_ip_address_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_subnet_mask_p", utc_wifi_ap_get_subnet_mask_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_subnet_mask_n", utc_wifi_ap_get_subnet_mask_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_subnet_mask_p", utc_wifi_ap_set_subnet_mask_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_subnet_mask_n", utc_wifi_ap_set_subnet_mask_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_gateway_address_p", utc_wifi_ap_get_gateway_address_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_gateway_address_n", utc_wifi_ap_get_gateway_address_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_gateway_address_p", utc_wifi_ap_set_gateway_address_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_gateway_address_n", utc_wifi_ap_set_gateway_address_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_proxy_address_p", utc_wifi_ap_get_proxy_address_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_proxy_address_n", utc_wifi_ap_get_proxy_address_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_proxy_address_p", utc_wifi_ap_set_proxy_address_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_proxy_address_n", utc_wifi_ap_set_proxy_address_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_proxy_type_p", utc_wifi_ap_get_proxy_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_proxy_type_n", utc_wifi_ap_get_proxy_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_proxy_type_p", utc_wifi_ap_set_proxy_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_proxy_type_n", utc_wifi_ap_set_proxy_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_dns_address_p", utc_wifi_ap_get_dns_address_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_dns_address_n", utc_wifi_ap_get_dns_address_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_dns_address_p", utc_wifi_ap_set_dns_address_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_dns_address_n", utc_wifi_ap_set_dns_address_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_security_type_p", utc_wifi_ap_get_security_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_security_type_n", utc_wifi_ap_get_security_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_security_type_p", utc_wifi_ap_set_security_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_security_type_n", utc_wifi_ap_set_security_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_encryption_type_p", utc_wifi_ap_get_encryption_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_encryption_type_n", utc_wifi_ap_get_encryption_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_encryption_type_p", utc_wifi_ap_set_encryption_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_encryption_type_n", utc_wifi_ap_set_encryption_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_is_passphrase_required_p", utc_wifi_ap_is_passphrase_required_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_is_passphrase_required_n", utc_wifi_ap_is_passphrase_required_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_passphrase_p", utc_wifi_ap_set_passphrase_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_passphrase_n", utc_wifi_ap_set_passphrase_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_is_wps_supported_p", utc_wifi_ap_is_wps_supported_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_is_wps_supported_n", utc_wifi_ap_is_wps_supported_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_passphrase_p", utc_wifi_ap_set_eap_passphrase_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_passphrase_n", utc_wifi_ap_set_eap_passphrase_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_passphrase_p", utc_wifi_ap_get_eap_passphrase_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_passphrase_n", utc_wifi_ap_get_eap_passphrase_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_ca_cert_file_p", utc_wifi_ap_get_eap_ca_cert_file_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_ca_cert_file_n", utc_wifi_ap_get_eap_ca_cert_file_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_ca_cert_file_p", utc_wifi_ap_set_eap_ca_cert_file_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_ca_cert_file_n", utc_wifi_ap_set_eap_ca_cert_file_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_client_cert_file_p", utc_wifi_ap_get_eap_client_cert_file_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_client_cert_file_n", utc_wifi_ap_get_eap_client_cert_file_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_client_cert_file_p", utc_wifi_ap_set_eap_client_cert_file_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_client_cert_file_n", utc_wifi_ap_set_eap_client_cert_file_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_private_key_file_p", utc_wifi_ap_get_eap_private_key_file_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_private_key_file_n", utc_wifi_ap_get_eap_private_key_file_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_private_key_info_p", utc_wifi_ap_set_eap_private_key_info_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_private_key_info_n", utc_wifi_ap_set_eap_private_key_info_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_type_p", utc_wifi_ap_get_eap_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_type_n", utc_wifi_ap_get_eap_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_type_p", utc_wifi_ap_set_eap_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_type_n", utc_wifi_ap_set_eap_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_auth_type_p", utc_wifi_ap_get_eap_auth_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_get_eap_auth_type_n", utc_wifi_ap_get_eap_auth_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_auth_type_p", utc_wifi_ap_set_eap_auth_type_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_set_eap_auth_type_n", utc_wifi_ap_set_eap_auth_type_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_refresh_p", utc_wifi_ap_refresh_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_refresh_n", utc_wifi_ap_refresh_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_destroy_p", utc_wifi_ap_destroy_p, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_ap_destroy_n", utc_wifi_ap_destroy_n, utc_wifi_ap_startup, utc_wifi_ap_cleanup},
+    {"utc_wifi_initialize_p", utc_wifi_initialize_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_initialize_n", utc_wifi_initialize_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_activate_n", utc_wifi_activate_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_activate_p", utc_wifi_activate_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_activate_with_wifi_picker_tested_n", utc_wifi_activate_with_wifi_picker_tested_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_activate_with_wifi_picker_tested_p", utc_wifi_activate_with_wifi_picker_tested_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_is_activated_p", utc_wifi_is_activated_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_is_activated_n", utc_wifi_is_activated_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_get_connection_state_p", utc_wifi_get_connection_state_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_get_connection_state_n", utc_wifi_get_connection_state_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_get_mac_address_p", utc_wifi_get_mac_address_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_get_mac_address_n", utc_wifi_get_mac_address_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_foreach_found_aps_p", utc_wifi_foreach_found_aps_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_foreach_found_aps_n", utc_wifi_foreach_found_aps_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_set_device_state_changed_cb_p", utc_wifi_set_device_state_changed_cb_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_set_device_state_changed_cb_n_1", utc_wifi_set_device_state_changed_cb_n_1, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_set_device_state_changed_cb_n_2", utc_wifi_set_device_state_changed_cb_n_2, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_unset_device_state_changed_cb_p", utc_wifi_unset_device_state_changed_cb_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_unset_device_state_changed_cb_n", utc_wifi_unset_device_state_changed_cb_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_set_background_scan_cb_p", utc_wifi_set_background_scan_cb_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_set_background_scan_cb_n_1", utc_wifi_set_background_scan_cb_n_1, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_set_background_scan_cb_n_2", utc_wifi_set_background_scan_cb_n_2, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_unset_background_scan_cb_p", utc_wifi_unset_background_scan_cb_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_unset_background_scan_cb_n", utc_wifi_unset_background_scan_cb_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_set_connection_state_changed_cb_p", utc_wifi_set_connection_state_changed_cb_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_set_connection_state_changed_cb_n_1", utc_wifi_set_connection_state_changed_cb_n_1, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_set_connection_state_changed_cb_n_2", utc_wifi_set_connection_state_changed_cb_n_2, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_unset_connection_state_changed_cb_p", utc_wifi_unset_connection_state_changed_cb_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_unset_connection_state_changed_cb_n", utc_wifi_unset_connection_state_changed_cb_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_set_rssi_level_changed_cb_p", utc_wifi_set_rssi_level_changed_cb_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_set_rssi_level_changed_cb_n_1", utc_wifi_set_rssi_level_changed_cb_n_1, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_unset_rssi_level_changed_cb_p", utc_wifi_unset_rssi_level_changed_cb_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_unset_rssi_level_changed_cb_n", utc_wifi_unset_rssi_level_changed_cb_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_deinitialize_p", utc_wifi_deinitialize_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_deinitialize_n", utc_wifi_deinitialize_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_get_network_interface_name_p", utc_wifi_get_network_interface_name_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_get_network_interface_name_n", utc_wifi_get_network_interface_name_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_scan_p", utc_wifi_scan_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_scan_n", utc_wifi_scan_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_get_connected_ap_p", utc_wifi_get_connected_ap_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_get_connected_ap_n_1", utc_wifi_get_connected_ap_n_1, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_get_connected_ap_n_2", utc_wifi_get_connected_ap_n_2, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_deactivate_n", utc_wifi_deactivate_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_deactivate_p", utc_wifi_deactivate_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_connect_n_1", utc_wifi_connect_n_1, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_connect_n_2", utc_wifi_connect_n_2, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_connect_p", utc_wifi_connect_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_disconnect_n_1", utc_wifi_disconnect_n_1, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_disconnect_n_2", utc_wifi_disconnect_n_2, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_disconnect_p", utc_wifi_disconnect_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_connect_by_wps_pin_n_1", utc_wifi_connect_by_wps_pin_n_1, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_connect_by_wps_pin_n_2", utc_wifi_connect_by_wps_pin_n_2, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_connect_by_wps_pin_p", utc_wifi_connect_by_wps_pin_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_connect_by_wps_pbc_n_1", utc_wifi_connect_by_wps_pbc_n_1, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_connect_by_wps_pbc_n_2", utc_wifi_connect_by_wps_pbc_n_2, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_connect_by_wps_pbc_p", utc_wifi_connect_by_wps_pbc_p, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_forget_ap_n", utc_wifi_forget_ap_n, utc_wifi_startup, utc_wifi_cleanup},
+    {"utc_wifi_forget_ap_p", utc_wifi_forget_ap_p, utc_wifi_startup, utc_wifi_cleanup},
+    {NULL, NULL}
+};
+
+#endif // __TCT_WIFI_CORE_H__
diff --git a/src/utc/wifi/utc-network-wifi-ap.c b/src/utc/wifi/utc-network-wifi-ap.c
new file mode 100755 (executable)
index 0000000..c3f6e75
--- /dev/null
@@ -0,0 +1,2079 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+
+#include <wifi.h>
+#include <system_info.h>
+
+#include "assert.h"
+
+//& set: wifiAp
+
+static wifi_ap_h ap = NULL;
+static bool g_wifi_ap_supported = true; 
+
+static bool __wifi_foreach_found_aps_callback(wifi_ap_h ap, void *user_data)
+{
+       int ret = WIFI_ERROR_NONE;
+
+       wifi_ap_h cloned_ap;
+    wifi_ap_clone(&cloned_ap, ap);
+
+       wifi_initialize();
+
+    ret = wifi_ap_refresh(cloned_ap);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       wifi_deinitialize();
+
+    return true;
+}
+
+static void __wifi_scan_callback(wifi_error_e error_code, void* user_data)
+{
+       wifi_foreach_found_aps(__wifi_foreach_found_aps_callback, NULL);
+}
+
+void utc_wifi_ap_startup(void)
+{
+    system_info_get_platform_bool("http://tizen.org/feature/network.wifi", &g_wifi_ap_supported);
+    wifi_ap_create("dongtan", &ap);
+}
+
+void utc_wifi_ap_cleanup(void)
+{
+    wifi_ap_destroy(ap);
+}
+
+int utc_wifi_ap_create_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    wifi_ap_h ap_t;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_create("dongtan", &ap_t);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_create("dongtan", &ap_t);
+    wifi_ap_destroy(ap_t);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_create_n_1(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_create(NULL, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_create(NULL, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_create(NULL, &ap);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_create("dongtan", NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_hidden_create_p(void)
+{
+       int ret = WIFI_ERROR_NONE;
+       wifi_ap_h ap_t;
+    if(g_wifi_ap_supported == false) {
+       ret = wifi_ap_hidden_create("dongtan", &ap_t);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = wifi_ap_hidden_create("dongtan", &ap_t);
+       wifi_ap_destroy(ap_t);
+       assert_eq(ret, WIFI_ERROR_NONE);
+
+       return 0;
+}
+
+int utc_wifi_ap_hidden_create_n(void)
+{
+       int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+       ret = wifi_ap_hidden_create(NULL, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = wifi_ap_hidden_create(NULL, NULL);
+       assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+       ret = wifi_ap_hidden_create(NULL, &ap);
+       assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+       ret = wifi_ap_hidden_create("dongtan", NULL);
+       assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+int utc_wifi_ap_clone_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h cloned_ap;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_clone(&cloned_ap, ap);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_clone(&cloned_ap, ap);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_destroy(cloned_ap);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_clone_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h cloned_ap;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_clone(NULL, ap_inval);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_clone(NULL, ap_inval);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_clone(NULL, ap);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_clone(&cloned_ap, ap_inval);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_essid_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *essid = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_essid(ap, &essid);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_essid(ap, &essid);
+
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(essid)
+               free(essid);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_essid_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *essid = NULL;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_essid(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_essid(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_essid(ap_inval, &essid);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_essid(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_bssid_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *bssid = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_bssid(ap, &bssid);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_bssid(ap, &bssid);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(bssid)
+               free(bssid);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_bssid_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *bssid = NULL;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_bssid(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_bssid(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_bssid(ap_inval, &bssid);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_bssid(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_rssi_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    int rssi = 0;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_rssi(ap, &rssi);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_rssi(ap, &rssi);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_rssi_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    int rssi = 0;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_rssi(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_rssi(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_rssi(ap_inval, &rssi);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_rssi(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_frequency_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    int frequency = 0;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_frequency(ap, &frequency);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_frequency(ap, &frequency);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_frequency_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    int frequency = 0;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_frequency(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_frequency(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_frequency(ap_inval, &frequency);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_frequency(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_max_speed_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    int speed = 0;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_max_speed(ap, &speed);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_max_speed(ap, &speed);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_max_speed_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    int speed = 0;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_max_speed(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_max_speed(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_max_speed(ap_inval, &speed);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_max_speed(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_is_favorite_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    bool favorite = false;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_is_favorite(ap, &favorite);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_is_favorite(ap, &favorite);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_is_favorite_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    bool favorite = false;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_is_favorite(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_is_favorite(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_is_favorite(ap_inval, &favorite);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_is_favorite(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_is_passpoint_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    bool passpoint = false;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_is_passpoint(ap, &passpoint);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_is_passpoint(ap, &passpoint);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_is_passpoint_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    bool passpoint = false;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_is_passpoint(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_is_passpoint(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_is_passpoint(ap_inval, &passpoint);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_is_passpoint(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_connection_state_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_connection_state_e state;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_connection_state(ap, &state);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_connection_state(ap, &state);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_connection_state_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_connection_state_e state;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_connection_state(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_connection_state(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_connection_state(ap_inval, &state);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_connection_state(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_ip_config_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ip_config_type_e type;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_ip_config_type(ap, WIFI_ADDRESS_FAMILY_IPV4, &type);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_ip_config_type(ap, WIFI_ADDRESS_FAMILY_IPV4, &type);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_ip_config_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ip_config_type_e type;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_ip_config_type(ap_inval, -1, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_ip_config_type(ap_inval, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_ip_config_type(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, &type);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_ip_config_type(ap, -1, &type);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_ip_config_type(ap, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_ip_config_type(ap_inval, -1, &type);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_ip_config_type(ap, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_ip_config_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_ip_config_type(ap, WIFI_ADDRESS_FAMILY_IPV4, WIFI_IP_CONFIG_TYPE_STATIC);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_ip_config_type(ap, WIFI_ADDRESS_FAMILY_IPV4, WIFI_IP_CONFIG_TYPE_STATIC);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_ip_config_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_ip_config_type(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, -1);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_ip_config_type(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_ip_config_type(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, WIFI_IP_CONFIG_TYPE_STATIC);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_ip_config_type(ap, WIFI_ADDRESS_FAMILY_IPV4, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_ip_address_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *ip_addr = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_ip_address(ap, WIFI_ADDRESS_FAMILY_IPV4, &ip_addr);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_ip_address(ap, WIFI_ADDRESS_FAMILY_IPV4, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(ip_addr)
+               free(ip_addr);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_ip_address_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *ip_addr = NULL;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_ip_address(ap_inval, -1, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_ip_address(ap_inval, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_ip_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_ip_address(ap, -1, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_ip_address(ap, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_ip_address(ap_inval, -1, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_ip_address(ap, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_ip_address_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_ip_address(ap, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_ip_address(ap, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_ip_address_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_ip_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_ip_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_ip_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_subnet_mask_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *ip_addr = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_subnet_mask(ap, WIFI_ADDRESS_FAMILY_IPV4, &ip_addr);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_subnet_mask(ap, WIFI_ADDRESS_FAMILY_IPV4, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(ip_addr)
+               free(ip_addr);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_subnet_mask_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *ip_addr = NULL;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_subnet_mask(ap_inval, -1, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_subnet_mask(ap_inval, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_subnet_mask(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_subnet_mask(ap, -1, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_subnet_mask(ap, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_subnet_mask(ap_inval, -1, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_subnet_mask(ap, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_subnet_mask_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_subnet_mask(ap, WIFI_ADDRESS_FAMILY_IPV4, "255.255.255.0");
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_subnet_mask(ap, WIFI_ADDRESS_FAMILY_IPV4, "255.255.255.0");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_subnet_mask_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_subnet_mask(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_subnet_mask(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_subnet_mask(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, "255.255.255.0");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_gateway_address_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *ip_addr = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_gateway_address(ap, WIFI_ADDRESS_FAMILY_IPV4, &ip_addr);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_gateway_address(ap, WIFI_ADDRESS_FAMILY_IPV4, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(ip_addr)
+               free(ip_addr);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_gateway_address_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *ip_addr = NULL;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_gateway_address(ap_inval, -1, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_gateway_address(ap_inval, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_gateway_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_gateway_address(ap, -1, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_gateway_address(ap, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_gateway_address(ap_inval, -1, &ip_addr);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_gateway_address(ap, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_gateway_address_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_gateway_address(ap, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_gateway_address(ap, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_gateway_address_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_gateway_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_gateway_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_gateway_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_proxy_address_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *proxy = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_proxy_address(ap, WIFI_ADDRESS_FAMILY_IPV4, &proxy);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_proxy_address(ap, WIFI_ADDRESS_FAMILY_IPV4, &proxy);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(proxy)
+               free(proxy);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_proxy_address_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *proxy = NULL;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_proxy_address(ap_inval, -1, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_proxy_address(ap_inval, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_proxy_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, &proxy);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_proxy_address(ap, -1, &proxy);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_proxy_address(ap, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_proxy_address(ap_inval, -1, &proxy);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_proxy_address(ap, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_proxy_address_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_proxy_address(ap, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1:8080");
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_proxy_address(ap, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1:8080");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_proxy_address_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_proxy_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_proxy_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_proxy_address(ap_inval, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1:8080");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_proxy_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_proxy_type_e type;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_proxy_type(ap, &type);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_proxy_type(ap, &type);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_proxy_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_proxy_type_e type;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_proxy_type(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_proxy_type(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_proxy_type(ap_inval, &type);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_proxy_type(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_proxy_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_proxy_type(ap, WIFI_PROXY_TYPE_MANUAL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_proxy_type(ap, WIFI_PROXY_TYPE_MANUAL);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_proxy_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_proxy_type(ap_inval, -1);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_proxy_type(ap_inval, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_proxy_type(ap_inval, WIFI_PROXY_TYPE_MANUAL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_proxy_type(ap, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_dns_address_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *dns1 = NULL;
+    char *dns2 = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_dns_address(ap, 1, WIFI_ADDRESS_FAMILY_IPV4, &dns1);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_dns_address(ap, 1, WIFI_ADDRESS_FAMILY_IPV4, &dns1);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_get_dns_address(ap, 2, WIFI_ADDRESS_FAMILY_IPV4, &dns2);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(dns1)
+               free(dns1);
+       if(dns2)
+               free(dns2);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_dns_address_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *dns = NULL;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_dns_address(ap_inval, 1, -1, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_dns_address(ap_inval, 1, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_dns_address(ap_inval, 1, WIFI_ADDRESS_FAMILY_IPV4, &dns);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_dns_address(ap, 1, -1, &dns);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_dns_address(ap, 1, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_dns_address(ap_inval, 1, -1, &dns);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_dns_address(ap, 1, -1, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_dns_address(ap, 99, WIFI_ADDRESS_FAMILY_IPV4, &dns);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_dns_address_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_dns_address(ap, 1, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_dns_address(ap, 1, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_set_dns_address(ap, 2, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.2");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_set_dns_address(ap, 1, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_set_dns_address(ap, 2, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_dns_address_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_dns_address(ap_inval, 1, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_dns_address(ap_inval, 1, WIFI_ADDRESS_FAMILY_IPV4, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_dns_address(ap_inval, 1, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_dns_address(ap, 99, WIFI_ADDRESS_FAMILY_IPV4, "192.168.11.1");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/* Security operations. */
+
+int utc_wifi_ap_get_security_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_security_type_e type;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_security_type(ap, &type);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_security_type(ap, &type);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_security_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_security_type_e type;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_security_type(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_security_type(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_security_type(ap_inval, &type);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_security_type(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_security_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_WPA2_PSK);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_WPA2_PSK);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_security_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_security_type(ap_inval, -1);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_security_type(ap_inval, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_security_type(ap_inval, WIFI_SECURITY_TYPE_EAP);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_security_type(ap, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_encryption_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_encryption_type_e type;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_encryption_type(ap, &type);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_encryption_type(ap, &type);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_encryption_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_encryption_type_e type;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_encryption_type(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_get_encryption_type(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_encryption_type(ap_inval, &type);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_encryption_type(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_encryption_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_encryption_type(ap, WIFI_ENCRYPTION_TYPE_AES);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_encryption_type(ap, WIFI_ENCRYPTION_TYPE_AES);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_encryption_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_encryption_type(ap_inval, -1);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_encryption_type(ap_inval, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_encryption_type(ap_inval, WIFI_ENCRYPTION_TYPE_AES);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_encryption_type(ap, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_is_passphrase_required_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    bool required;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_is_passphrase_required(ap, &required);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_is_passphrase_required(ap, &required);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_is_passphrase_required_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    bool required;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_is_passphrase_required(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_is_passphrase_required(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_is_passphrase_required(ap_inval, &required);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_is_passphrase_required(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_passphrase_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_passphrase(ap, "pass_string");
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_WPA2_PSK);
+
+    ret = wifi_ap_set_passphrase(ap, "pass_string");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_passphrase_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_passphrase(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_set_passphrase(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_passphrase(ap_inval, "pass_string");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_passphrase(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_is_wps_supported_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    bool supported;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_is_wps_supported(ap, &supported);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_is_wps_supported(ap, &supported);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_is_wps_supported_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    bool supported;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_is_wps_supported(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_is_wps_supported(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_is_wps_supported(ap_inval, &supported);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_is_wps_supported(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+/* EAP operations. */
+
+int utc_wifi_ap_set_eap_passphrase_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_passphrase(ap, "eap_user","pass_string");
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_set_eap_passphrase(ap, "eap_user","pass_string");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_set_eap_passphrase(ap, NULL, "pass_string");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_set_eap_passphrase(ap, "eap_user", NULL);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_eap_passphrase_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_passphrase(ap_inval, NULL, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_set_eap_passphrase(ap_inval, NULL, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_passphrase(ap_inval, "eap_user", "pass_string");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_passphrase(ap_inval, NULL, "pass_string");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_passphrase(ap_inval, "eap_user", NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_passphrase(ap, NULL, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_passphrase_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *inputed_name = NULL;
+    bool is_pass_set;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_get_eap_passphrase(ap, &inputed_name, &is_pass_set);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(inputed_name)
+               free(inputed_name);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_passphrase_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    char *inputed_name = NULL;
+    bool is_pass_set;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_eap_passphrase(ap_inval, NULL, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_get_eap_passphrase(ap_inval, NULL, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_passphrase(ap_inval, &inputed_name, &is_pass_set);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_passphrase(ap_inval, NULL, &is_pass_set);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_passphrase(ap_inval, &inputed_name, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_passphrase(ap, NULL, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+       if(inputed_name)
+               free(inputed_name);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_ca_cert_file_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *cert_file = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_eap_ca_cert_file(ap, &cert_file);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    wifi_ap_set_eap_ca_cert_file(ap, "tmp1");
+    ret = wifi_ap_get_eap_ca_cert_file(ap, &cert_file);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(cert_file)
+               free(cert_file);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_ca_cert_file_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *cert_file = NULL;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_eap_ca_cert_file(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_get_eap_ca_cert_file(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_ca_cert_file(ap_inval, &cert_file);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_ca_cert_file(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_eap_ca_cert_file_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_ca_cert_file(ap, "tmp1");
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+    wifi_ap_set_eap_type(ap, WIFI_EAP_TYPE_TLS);
+
+    ret = wifi_ap_set_eap_ca_cert_file(ap, "tmp1");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_eap_ca_cert_file_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_ca_cert_file(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+    wifi_ap_set_eap_type(ap, WIFI_EAP_TYPE_TLS);
+
+    ret = wifi_ap_set_eap_ca_cert_file(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_ca_cert_file(ap_inval, "tmp1");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_ca_cert_file(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_client_cert_file_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *cert_file = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_eap_client_cert_file(ap, &cert_file);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_get_eap_client_cert_file(ap, &cert_file);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(cert_file)
+               free(cert_file);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_client_cert_file_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *cert_file = NULL;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_eap_client_cert_file(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_get_eap_client_cert_file(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_client_cert_file(ap_inval, &cert_file);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_client_cert_file(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_eap_client_cert_file_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_client_cert_file(ap, "tmp2");
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_set_eap_client_cert_file(ap, "tmp2");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_eap_client_cert_file_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_client_cert_file(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_set_eap_client_cert_file(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_client_cert_file(ap_inval, "tmp2");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_client_cert_file(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_private_key_file_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *key_file = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_eap_private_key_file(ap, &key_file);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_get_eap_private_key_file(ap, &key_file);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(key_file)
+               free(key_file);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_private_key_file_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    char *key_file = NULL;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_eap_private_key_file(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_get_eap_private_key_file(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_private_key_file(ap_inval, &key_file);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_private_key_file(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+       if(key_file)
+               free(key_file);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_eap_private_key_info_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_private_key_info(ap, "tmp3", "pass_string");
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_set_eap_private_key_info(ap, "tmp3", "pass_string");
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_eap_private_key_info_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_private_key_info(ap_inval, NULL, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_set_eap_private_key_info(ap_inval, NULL, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_private_key_info(ap_inval, "tmp3", "pass_string");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_private_key_info(ap, NULL, "pass_string");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_private_key_info(ap_inval, NULL, "pass_string");
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_private_key_info(ap, NULL, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_eap_type_e type;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_eap_type(ap, &type);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+    wifi_ap_set_eap_type(ap, WIFI_EAP_TYPE_PEAP);
+
+    ret = wifi_ap_get_eap_type(ap, &type);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_eap_type_e type;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_eap_type(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_get_eap_type(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_type(ap_inval, &type);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_type(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_eap_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_type(ap, WIFI_EAP_TYPE_PEAP);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_set_eap_type(ap, WIFI_EAP_TYPE_PEAP);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_eap_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_type(ap_inval, -1);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_set_eap_type(ap_inval, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_type(ap_inval, WIFI_EAP_TYPE_PEAP);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_type(ap, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_auth_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_eap_auth_type_e type;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_type(ap, WIFI_EAP_TYPE_PEAP);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+    wifi_ap_set_eap_auth_type(ap, WIFI_EAP_AUTH_TYPE_MD5);
+
+    ret = wifi_ap_set_eap_type(ap, WIFI_EAP_TYPE_PEAP);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_get_eap_auth_type(ap, &type);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_get_eap_auth_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_eap_auth_type_e type;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_get_eap_auth_type(ap_inval, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_get_eap_auth_type(ap_inval, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_auth_type(ap_inval, &type);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_get_eap_auth_type(ap, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_eap_auth_type_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_type(ap, WIFI_EAP_TYPE_PEAP);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+    ret = wifi_ap_set_eap_type(ap, WIFI_EAP_TYPE_PEAP);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_set_eap_auth_type(ap, WIFI_EAP_AUTH_TYPE_MD5);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_set_eap_auth_type_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_set_eap_auth_type(ap_inval, -1);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_ap_set_security_type(ap, WIFI_SECURITY_TYPE_EAP);
+
+    ret = wifi_ap_set_eap_auth_type(ap_inval, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_auth_type(ap_inval, WIFI_EAP_AUTH_TYPE_PAP);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    ret = wifi_ap_set_eap_auth_type(ap, -1);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_ap_refresh_p(void)
+{
+    if(g_wifi_ap_supported == false) {
+        int ret = WIFI_ERROR_NONE;
+        ret = wifi_scan(__wifi_scan_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_scan(__wifi_scan_callback, NULL);
+
+    return 0;
+}
+
+int utc_wifi_ap_refresh_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    wifi_ap_h ap_inval = NULL;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_refresh(ap_inval);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_initialize();
+
+    ret = wifi_ap_refresh(ap_inval);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    wifi_deinitialize();
+
+    return 0;
+}
+
+int utc_wifi_ap_destroy_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+
+    wifi_ap_h ap_t;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_create("dongtan", &ap_t);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    ret = wifi_ap_create("dongtan", &ap_t);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_ap_destroy(ap_t);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_ap_destroy_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_ap_supported == false) {
+        ret = wifi_ap_destroy(NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_destroy(NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
diff --git a/src/utc/wifi/utc-network-wifi.c b/src/utc/wifi/utc-network-wifi.c
new file mode 100755 (executable)
index 0000000..544d215
--- /dev/null
@@ -0,0 +1,1349 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+
+#include <wifi.h>
+#include <system_info.h>
+
+#include "assert.h"
+
+//& set: wifi
+
+#define CONFIG_LINE_LEN_MAX            2048
+#define CONFIG_VALUE_LEN_MAX   1024
+#define GMAINTIMEOUT                   10000
+
+static wifi_ap_h g_hAp = NULL;
+static GMainLoop *g_pMainLoop;
+static guint g_nTimeoutId;
+char g_passPhrase[CONFIG_VALUE_LEN_MAX] = {0,};
+static int g_CallbackRet = WIFI_ERROR_NONE;
+static bool g_wifi_supported = true;
+
+#define RUN_GMAIN_LOOP {\
+       g_pMainLoop = g_main_loop_new(NULL, false);\
+       g_nTimeoutId = g_timeout_add(GMAINTIMEOUT, _wifi_callback_timeout, g_pMainLoop);\
+       g_main_loop_run(g_pMainLoop);\
+       g_source_remove(g_nTimeoutId);\
+       g_pMainLoop = NULL;\
+}
+
+#define QUIT_GMAIN_LOOP {\
+       if (g_pMainLoop) {\
+               g_main_loop_quit(g_pMainLoop);\
+               g_main_loop_unref(g_pMainLoop);\
+               g_pMainLoop = NULL;\
+       }\
+}
+
+void utc_wifi_startup(void)
+{
+    system_info_get_platform_bool("http://tizen.org/feature/network.wifi", &g_wifi_supported);
+    wifi_initialize();
+}
+
+void utc_wifi_cleanup(void)
+{
+    wifi_deinitialize();
+}
+
+gboolean _wifi_callback_timeout(gpointer data)
+{
+       GMainLoop* pMainLoop = (GMainLoop *)data;
+       g_CallbackRet = WIFI_ERROR_INVALID_KEY;
+       if( pMainLoop != NULL )
+       {
+               g_main_loop_quit(pMainLoop);
+               g_main_loop_unref(pMainLoop);
+               pMainLoop = NULL;
+       }
+       return false;
+}
+
+static bool _get_value_from_configfile(char* key1, char* value1, char* key2, char* value2)
+{
+       FILE* pfilePtr = fopen(CONFIGFILE_PATH, "r");
+       if (NULL == pfilePtr)
+               return false;
+
+       char* pszKey = NULL;
+       char* pszValue = NULL;
+       char* pszDelim = "=\n";
+       char* temp = NULL;
+       char szConfigLine[CONFIG_LINE_LEN_MAX] = {0,};
+       bool bvalue1 = false, bvalue2 = false;
+
+       while (!feof(pfilePtr)) {
+               if (fgets(szConfigLine, CONFIG_LINE_LEN_MAX, pfilePtr) != NULL) {
+                       pszKey = strtok_r(szConfigLine, pszDelim, &temp);
+                       pszValue = strtok_r(NULL, pszDelim, &temp);
+                       if(pszKey != NULL) {
+                               if (strstr(pszKey, key1) != NULL) {
+                                       memset(value1, 0, CONFIG_VALUE_LEN_MAX);
+                                       strncpy(value1, pszValue, CONFIG_VALUE_LEN_MAX);
+                                       bvalue1 = true;
+                               }
+                               if (strstr(pszKey, key2) != NULL) {
+                                       memset(value2, 0, CONFIG_VALUE_LEN_MAX);
+                                       strncpy(value2, pszValue, CONFIG_VALUE_LEN_MAX);
+                                       bvalue2 = true;
+                               }
+                               if(bvalue1 && bvalue2)
+                                       break;
+
+                               pszKey = NULL;
+                               pszValue = NULL;
+                       }
+               }
+       }
+
+       fclose(pfilePtr);
+       if (NULL == pszValue)
+               return false;
+
+       if (strlen(pszValue) >= CONFIG_VALUE_LEN_MAX)
+               return false;
+
+       return true;
+}
+
+static bool __found_ap_callback(wifi_ap_h ap, void *user_data)
+{
+    return true;
+}
+
+static void __device_state_callback(wifi_device_state_e state, void* user_data)
+{
+
+}
+
+static void __bg_scan_completed_callback(wifi_error_e error_code, void* user_data)
+{
+
+}
+
+static void __connection_state_callback(wifi_connection_state_e state, wifi_ap_h ap, void* user_data)
+{
+
+}
+
+static void __rssi_level_callback(wifi_rssi_level_e rssi_level, void* user_data)
+{
+
+}
+
+static void __test_scan_request_callback(wifi_error_e result, void* user_data)
+{
+       g_CallbackRet = result;
+       if (g_pMainLoop)
+               g_main_loop_quit(g_pMainLoop);
+}
+
+static void __test_activated_callback(wifi_error_e result, void* user_data)
+{
+
+}
+
+static void __test_deactivated_callback(wifi_error_e result, void* user_data)
+{
+
+}
+
+static void __utc_wifi_scan_p_callback(wifi_error_e result, void* user_data)
+{
+       wifi_scan(__test_scan_request_callback, NULL);
+}
+
+static void __utc_wifi_get_network_interface_name_p_callback(wifi_error_e result, void* user_data)
+{
+    char* if_name = NULL;
+
+    g_CallbackRet = wifi_get_network_interface_name(&if_name);
+
+       if(if_name)
+               free(if_name);
+
+       if (g_pMainLoop)
+               g_main_loop_quit(g_pMainLoop);
+}
+
+static void __utc_wifi_get_connected_ap_p1_callback(wifi_error_e result, void* user_data)
+{
+       g_CallbackRet = result;
+    QUIT_GMAIN_LOOP;
+}
+
+static bool __utc_wifi_get_connected_ap_p2_callback(wifi_ap_h ap, void *user_data)
+{
+       int ret = 0;
+       char *ap_name = NULL;
+       char *ap_name_part = (char*)user_data;
+
+       if (wifi_ap_get_essid(ap, &ap_name) != WIFI_ERROR_NONE)
+               return false;
+
+       if (strstr(ap_name, ap_name_part) != NULL) {
+               bool required = false;
+               if (wifi_ap_is_passphrase_required(ap, &required) == WIFI_ERROR_NONE) {
+                       if (required) {
+                               if (wifi_ap_set_passphrase(ap, g_passPhrase) != WIFI_ERROR_NONE) {
+                                       g_free(ap_name);
+                                       return false;
+                               }
+                       }
+               }
+
+               wifi_connect(ap, __utc_wifi_get_connected_ap_p1_callback, NULL);
+               g_free(ap_name);
+               return false;
+       }
+
+       g_free(ap_name);
+       return true;
+}
+
+static void __utc_wifi_activate_p2_callback(wifi_error_e result, void* user_data)
+{
+       g_CallbackRet = result;
+       if (g_pMainLoop)
+               g_main_loop_quit(g_pMainLoop);
+}
+
+static void __utc_wifi_activate_p1_callback(wifi_error_e result, void* user_data)
+{
+       wifi_deinitialize();
+       wifi_initialize();
+       wifi_activate(__utc_wifi_activate_p2_callback, NULL);
+}
+
+static void __utc_wifi_deactivate_p2_callback(wifi_error_e result, void* user_data)
+{
+       g_CallbackRet = result;
+       if (g_pMainLoop)
+               g_main_loop_quit(g_pMainLoop);
+}
+
+static void __utc_wifi_deactivate_p1_callback(wifi_error_e result, void* user_data)
+{
+    wifi_deactivate(__utc_wifi_deactivate_p2_callback, NULL);
+}
+
+static void __utc_wifi_connect_by_wps_pbc_p_callback(wifi_error_e result, void* user_data)
+{
+       int ret = WIFI_ERROR_NONE;
+       ret = wifi_connect_by_wps_pbc(g_hAp, __test_activated_callback, NULL);
+    assert_eq(ret, WIFI_ERROR_NONE);
+}
+
+static void __utc_wifi_connect_by_wps_pin_p_callback(wifi_error_e result, void* user_data)
+{
+       int ret = WIFI_ERROR_NONE;
+       char* pin = "1234567";
+       ret = wifi_connect_by_wps_pin(g_hAp, pin, __test_activated_callback, NULL);
+    assert_eq(ret, WIFI_ERROR_NONE);
+}
+
+static void __utc_wifi_connect_p_callback(wifi_error_e result, void* user_data)
+{
+       int ret = WIFI_ERROR_NONE;
+    ret = wifi_connect(g_hAp, __test_activated_callback, NULL);
+    assert_eq(ret, WIFI_ERROR_NONE);
+}
+
+static void __utc_wifi_forget_ap_p_callback(wifi_error_e result, void* user_data)
+{
+       int ret = WIFI_ERROR_NONE;
+    ret = wifi_forget_ap(g_hAp);
+    assert_eq(ret, WIFI_ERROR_NONE);
+}
+
+static void __utc_wifi_disconnect_p2_callback(wifi_error_e result, void* user_data)
+{
+       int ret = WIFI_ERROR_NONE;
+       ret = wifi_disconnect(g_hAp, __test_deactivated_callback, NULL);
+       assert_eq(ret, WIFI_ERROR_NONE);
+}
+
+static void __utc_wifi_disconnect_p1_callback(wifi_error_e result, void* user_data)
+{
+       wifi_connect(g_hAp, __utc_wifi_disconnect_p2_callback, NULL);
+}
+
+static void __utc_wifi_activate_with_wifi_picker_tested_p_callback(wifi_error_e result, void* user_data)
+{
+       int ret = WIFI_ERROR_NONE;
+       ret = wifi_activate_with_wifi_picker_tested(__test_activated_callback, NULL);
+       assert_eq(ret, WIFI_ERROR_NONE);
+}
+
+int utc_wifi_initialize_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_initialize();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_deinitialize();
+
+    ret = wifi_initialize();
+
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_initialize_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_initialize();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_initialize();
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_activate_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_activate(__test_activated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_deinitialize();
+
+    ret = wifi_activate(__test_activated_callback, NULL);
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    wifi_initialize();
+
+    return 0;
+}
+
+
+int utc_wifi_activate_p(void)
+{
+       bool activated;
+    if(g_wifi_supported == false) {
+        int ret = WIFI_ERROR_NONE;
+               ret = wifi_activate(__utc_wifi_activate_p2_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       wifi_is_activated(&activated);
+
+       g_pMainLoop = g_main_loop_new(NULL, false);
+       if(activated)
+               wifi_deactivate(__utc_wifi_activate_p1_callback, NULL);
+       else
+               wifi_activate(__utc_wifi_activate_p2_callback, NULL);
+       g_main_loop_run(g_pMainLoop);
+
+       assert_eq(g_CallbackRet, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_activate_with_wifi_picker_tested_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_activate_with_wifi_picker_tested(__test_activated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_deinitialize();
+
+    ret = wifi_activate_with_wifi_picker_tested(__test_activated_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_activate_with_wifi_picker_tested_p(void)
+{
+    if(g_wifi_supported == false) {
+        int ret = WIFI_ERROR_NONE;
+        ret = wifi_disconnect(NULL, __utc_wifi_activate_with_wifi_picker_tested_p_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    wifi_disconnect(NULL, __utc_wifi_activate_with_wifi_picker_tested_p_callback, NULL);
+
+    return 0;
+}
+
+int utc_wifi_is_activated_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    bool activated;
+    if(g_wifi_supported == false) {
+        ret = wifi_is_activated(&activated);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_is_activated(&activated);
+
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_is_activated_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_is_activated(NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_is_activated(NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_get_connection_state_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    wifi_connection_state_e conn_state;
+    if(g_wifi_supported == false) {
+        ret = wifi_get_connection_state(&conn_state);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_get_connection_state(&conn_state);
+
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_get_connection_state_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_get_connection_state(NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_get_connection_state(NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_get_mac_address_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    char *mac_address = NULL;
+    if(g_wifi_supported == false) {
+        ret = wifi_get_mac_address(&mac_address);
+        assert_eq(ret,TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_get_mac_address(&mac_address);
+
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+       if(mac_address)
+               free(mac_address);
+
+    return 0;
+}
+
+int utc_wifi_get_mac_address_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_get_mac_address(NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_get_mac_address(NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_foreach_found_aps_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_foreach_found_aps(__found_ap_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_foreach_found_aps(__found_ap_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_foreach_found_aps_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_foreach_found_aps(NULL, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_foreach_found_aps(NULL, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_set_device_state_changed_cb_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_set_device_state_changed_cb(__device_state_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_device_state_changed_cb(__device_state_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_set_device_state_changed_cb_n_1(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_set_device_state_changed_cb(NULL, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_device_state_changed_cb(NULL, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_set_device_state_changed_cb_n_2(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_set_device_state_changed_cb(__device_state_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_deinitialize();
+
+    ret = wifi_set_device_state_changed_cb(__device_state_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_unset_device_state_changed_cb_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_unset_device_state_changed_cb();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_device_state_changed_cb(__device_state_callback, NULL);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_unset_device_state_changed_cb();
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_unset_device_state_changed_cb_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_unset_device_state_changed_cb();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_unset_device_state_changed_cb();
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_set_background_scan_cb_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_set_background_scan_cb(__bg_scan_completed_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_background_scan_cb(__bg_scan_completed_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_set_background_scan_cb_n_1(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_set_background_scan_cb(NULL, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_background_scan_cb(NULL, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_set_background_scan_cb_n_2(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_set_background_scan_cb(__bg_scan_completed_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_deinitialize();
+
+    ret = wifi_set_background_scan_cb(__bg_scan_completed_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_unset_background_scan_cb_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_unset_background_scan_cb();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_background_scan_cb(__bg_scan_completed_callback, NULL);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_unset_background_scan_cb();
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_unset_background_scan_cb_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_unset_background_scan_cb();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_unset_background_scan_cb();
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_set_connection_state_changed_cb_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_set_connection_state_changed_cb(__connection_state_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_connection_state_changed_cb(__connection_state_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_set_connection_state_changed_cb_n_1(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_set_connection_state_changed_cb(NULL, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_connection_state_changed_cb(NULL, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_set_connection_state_changed_cb_n_2(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_set_connection_state_changed_cb(__connection_state_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_deinitialize();
+
+    ret = wifi_set_connection_state_changed_cb(__connection_state_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_unset_connection_state_changed_cb_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_unset_connection_state_changed_cb();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_connection_state_changed_cb(__connection_state_callback, NULL);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_unset_connection_state_changed_cb();
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_unset_connection_state_changed_cb_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_unset_connection_state_changed_cb();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_unset_connection_state_changed_cb();
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_set_rssi_level_changed_cb_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_set_rssi_level_changed_cb(__rssi_level_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_rssi_level_changed_cb(__rssi_level_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_set_rssi_level_changed_cb_n_1(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_set_rssi_level_changed_cb(NULL, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_rssi_level_changed_cb(NULL, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_unset_rssi_level_changed_cb_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_unset_rssi_level_changed_cb();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_set_rssi_level_changed_cb(__rssi_level_callback, NULL);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    ret = wifi_unset_rssi_level_changed_cb();
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_unset_rssi_level_changed_cb_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_unset_rssi_level_changed_cb();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_unset_rssi_level_changed_cb();
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_deinitialize_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_deinitialize();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_deinitialize();
+
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_deinitialize_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_deinitialize();
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_deinitialize();
+
+    ret = wifi_deinitialize();
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_get_network_interface_name_p(void)
+{
+       bool activated;
+    if(g_wifi_supported == false) {
+        int ret = WIFI_ERROR_NONE;
+        char* temp_name = NULL;
+           ret = wifi_get_network_interface_name(&temp_name);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       wifi_is_activated(&activated);
+
+       if(activated)
+       {
+               char* if_name = NULL;
+           g_CallbackRet = wifi_get_network_interface_name(&if_name);
+
+               if(if_name)
+                       free(if_name);
+       }
+       else
+       {
+               g_pMainLoop = g_main_loop_new(NULL, false);
+               wifi_activate(__utc_wifi_get_network_interface_name_p_callback, NULL);
+               g_main_loop_run(g_pMainLoop);
+       }
+
+       assert_eq(g_CallbackRet, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_get_network_interface_name_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_get_network_interface_name(NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_get_network_interface_name(NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_scan_p(void)
+{
+       bool activated;
+    if(g_wifi_supported == false) {
+        int ret = WIFI_ERROR_NONE;
+       ret = wifi_scan(__test_scan_request_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       wifi_is_activated(&activated);
+
+       g_pMainLoop = g_main_loop_new(NULL, false);
+       if(activated)
+               wifi_scan(__test_scan_request_callback, NULL);
+       else
+               wifi_activate(__utc_wifi_scan_p_callback, NULL);
+       g_main_loop_run(g_pMainLoop);
+
+       assert_eq(g_CallbackRet, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_scan_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_scan(NULL, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_scan(NULL, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_get_connected_ap_p(void)
+{
+       int ret = 0;
+       bool activated;
+       wifi_ap_h ap_h;
+       wifi_connection_state_e connection_state;
+       char configValue[CONFIG_VALUE_LEN_MAX] = {0,};
+
+    if(g_wifi_supported == false) {
+        ret = WIFI_ERROR_NONE;
+               ret = wifi_get_connected_ap(&ap_h);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       ret = wifi_is_activated(&activated);
+       assert_eq(ret, WIFI_ERROR_NONE);
+       if(activated == false) {
+               wifi_activate(__utc_wifi_get_connected_ap_p1_callback, NULL);
+               RUN_GMAIN_LOOP;
+               assert_eq(g_CallbackRet, WIFI_ERROR_NONE);
+       }
+
+       ret = wifi_get_connection_state(&connection_state);
+       assert_eq(ret, WIFI_ERROR_NONE);
+       if(connection_state == WIFI_CONNECTION_STATE_CONNECTED) {
+               ret = wifi_get_connected_ap(&ap_h);
+               assert_eq(ret, WIFI_ERROR_NONE);
+               return 0;
+       }
+
+       wifi_scan(__utc_wifi_get_connected_ap_p1_callback, NULL);
+       RUN_GMAIN_LOOP;
+       assert_eq(g_CallbackRet, WIFI_ERROR_NONE);
+
+       if(_get_value_from_configfile("WIFI_WPSACCESSPOINTNAME", configValue, "WIFI_ACCESSPOINTPIN", g_passPhrase) == false)
+               return -1;
+
+       wifi_foreach_found_aps(__utc_wifi_get_connected_ap_p2_callback, configValue);
+       RUN_GMAIN_LOOP;
+       assert_eq(g_CallbackRet, WIFI_ERROR_NONE);
+
+       ret = wifi_get_connected_ap(&ap_h);
+       assert_eq(ret, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_get_connected_ap_n_1(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_get_connected_ap(NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_get_connected_ap(NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_get_connected_ap_n_2(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    wifi_ap_h ap_h = NULL;
+    if(g_wifi_supported == false) {
+        ret = wifi_get_connected_ap(ap_h);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_get_connected_ap(ap_h);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_deactivate_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_deactivate(__test_deactivated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_deinitialize();
+
+    ret = wifi_deactivate(__test_deactivated_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_deactivate_p(void)
+{
+       bool activated;
+    if(g_wifi_supported == false) {
+        int ret = WIFI_ERROR_NONE;
+               ret = wifi_deactivate(__utc_wifi_deactivate_p2_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+       wifi_is_activated(&activated);
+
+       g_pMainLoop = g_main_loop_new(NULL, false);
+       if(activated)
+               wifi_deactivate(__utc_wifi_deactivate_p2_callback, NULL);
+       else
+               wifi_activate(__utc_wifi_deactivate_p1_callback, NULL);
+       g_main_loop_run(g_pMainLoop);
+
+       assert_eq(g_CallbackRet, WIFI_ERROR_NONE);
+
+    return 0;
+}
+
+int utc_wifi_connect_n_1(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_connect(g_hAp, __test_activated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_deinitialize();
+
+    ret = wifi_connect(g_hAp, __test_activated_callback, NULL);
+    wifi_initialize();
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_connect_n_2(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_connect(NULL, __test_activated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_connect(NULL, __test_activated_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_connect_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_connect(g_hAp, __test_activated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_create("tizen", &g_hAp);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    wifi_activate(__utc_wifi_connect_p_callback, NULL);
+
+    return 0;
+}
+
+int utc_wifi_disconnect_n_1(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_disconnect(g_hAp, __test_deactivated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    wifi_deinitialize();
+
+    ret = wifi_disconnect(g_hAp, __test_deactivated_callback, NULL);
+        wifi_initialize();
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_disconnect_n_2(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_disconnect(NULL, __test_deactivated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_disconnect(NULL, __test_deactivated_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_disconnect_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+               ret = wifi_disconnect(g_hAp, __test_deactivated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_create("tizen", &g_hAp);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    wifi_activate(__utc_wifi_disconnect_p1_callback, NULL);
+
+    return 0;
+}
+
+int utc_wifi_connect_by_wps_pin_n_1(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_connect_by_wps_pin(g_hAp, NULL, __test_activated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_create("tizen", &g_hAp);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    wifi_deinitialize();
+
+    ret = wifi_connect_by_wps_pin(g_hAp, NULL, __test_activated_callback, NULL);
+    wifi_ap_destroy(g_hAp);
+    wifi_initialize();
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_connect_by_wps_pin_n_2(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    char* pin = "1234567";
+    if(g_wifi_supported == false) {
+        ret = wifi_connect_by_wps_pin(NULL, pin, __test_activated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_connect_by_wps_pin(NULL, pin, __test_activated_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_connect_by_wps_pin_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+       char* pin = "1234567";
+           ret = wifi_connect_by_wps_pin(g_hAp, pin, __test_activated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_create("tizen", &g_hAp);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    wifi_activate(__utc_wifi_connect_by_wps_pin_p_callback, NULL);
+
+    return 0;
+}
+
+int utc_wifi_connect_by_wps_pbc_n_1(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_connect_by_wps_pbc(g_hAp, __test_activated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_create("tizen", &g_hAp);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    wifi_deinitialize();
+
+    ret = wifi_connect_by_wps_pbc(g_hAp, __test_activated_callback, NULL);
+    wifi_ap_destroy(g_hAp);
+    wifi_initialize();
+
+    assert_eq(ret, WIFI_ERROR_INVALID_OPERATION);
+
+    return 0;
+}
+
+int utc_wifi_connect_by_wps_pbc_n_2(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_connect_by_wps_pbc(NULL, __test_activated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_connect_by_wps_pbc(NULL, __test_activated_callback, NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+int utc_wifi_connect_by_wps_pbc_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+               ret = wifi_connect_by_wps_pbc(g_hAp, __test_activated_callback, NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_create("tizen", &g_hAp);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    wifi_activate(__utc_wifi_connect_by_wps_pbc_p_callback, NULL);
+
+    return 0;
+}
+
+int utc_wifi_forget_ap_n(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_forget_ap(NULL);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_forget_ap(NULL);
+
+    assert_eq(ret, WIFI_ERROR_INVALID_PARAMETER);
+
+    return 0;
+}
+
+int utc_wifi_forget_ap_p(void)
+{
+    int ret = WIFI_ERROR_NONE;
+    if(g_wifi_supported == false) {
+        ret = wifi_forget_ap(g_hAp);
+        assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    ret = wifi_ap_create("tizen", &g_hAp);
+    assert_eq(ret, WIFI_ERROR_NONE);
+
+    wifi_activate(__utc_wifi_forget_ap_p_callback, NULL);
+
+    return 0;
+}
diff --git a/tct.conf b/tct.conf
new file mode 100755 (executable)
index 0000000..4a98003
--- /dev/null
+++ b/tct.conf
@@ -0,0 +1,34 @@
+[general]
+buildroot= ~/GBS-ROOT-TCT-WEARABLE/
+
+[profile.device] # Profile for Device
+obs=obs.device
+repos = repo.device
+
+[profile.sdk]   # Profile for SDK
+obs=obs.sdk
+repos=repo.sdk
+
+[obs.device]   # obs for SDK.Ref_Target
+#OBS API URL pointing to a remote OBS.
+url = {Proper repository}
+
+[obs.sdk]              # obs for SDK.Emulator
+#OBS API URL pointing to a remote OBS.
+url = {Proper repository}
+       
+#device
+[repo.device] # Repository for Tizen 2.3 SDK Target snapshot 
+#Mobile
+#url = {Proper repository}
+#Wearable
+url = {Proper repository}
+
+#SDK
+[repo.sdk] # Repository for Tizen 2.3 SDK Emulator snapshot
+#Mobile
+#url = {Proper repository}
+#Wearable
+url = {Proper repository}
+
+
diff --git a/templates/external_wrapper.sh b/templates/external_wrapper.sh
new file mode 100755 (executable)
index 0000000..4a111b0
--- /dev/null
@@ -0,0 +1,146 @@
+
+
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+TIMEOUT_VALUE=90 #default timeout value
+FILE="/tmp/TC_Timeout.txt"
+
+if [[ "$1" == "" || "$2" == "" || "$3" == "" ]];
+then
+    echo "module name, TC name and build type type needed"
+    exit 1
+fi
+
+#Read timeout value from /tmp/TCT_Timeout.txt file
+
+if [ -f $FILE ];
+then
+       for next in `cat $FILE`
+       do
+           TIMEOUT_VALUE=$next
+       done
+fi
+
+function KillPackage {
+       if [ $2 == "native" ] ; 
+       then
+               alive=`pkgcmd -C -n native-$1-$3 | grep "is Running"`
+               if [ "$alive" != "" ]; then
+                       pkgcmd --kill -n native-$1-$3
+               fi
+       else
+               alive=`pkgcmd -C -n core-$1-tests | grep "is Running"`
+               if [ "$alive" != "" ]; then
+                       pkgcmd --kill -n core-$1-tests
+               fi
+       fi
+}
+
+function Execute {
+       RESULT_PATH=/tmp/tcresult
+       ERRLOG_PATH=/tmp/tclog
+       rm -f $RESULT_PATH
+       rm -f $ERRLOG_PATH
+       sleep 1
+       RET=`launch_app native.$1-$3 smacktestkey $2`
+       if [[ $RET == *"successfully launched"* ]];then
+               echo "Successfully Launched"
+       else
+               echo "Launch Failed"
+               KillPackage $1 native $3
+               exit 1
+       fi
+
+       COUNTER=0
+       while [ ! -e $RESULT_PATH ];
+       do
+               if [ $COUNTER -eq $TIMEOUT_VALUE ];
+               then
+                       # Kill launched application
+                       KillPackage $1 native $3
+                       echo "Timeout! [ Execution exceeded $TIMEOUT_VALUE seconds ]"
+                       if [ -e $ERRLOG_PATH ];
+                       then
+                               echo `cat $ERRLOG_PATH`
+                               rm $ERRLOG_PATH
+                       fi
+                       exit 1
+               fi
+               sleep 1
+               COUNTER=$((COUNTER + 1))
+       done
+
+       if [ -e $ERRLOG_PATH ];
+       then
+               echo `cat $ERRLOG_PATH`
+               rm $ERRLOG_PATH
+       fi
+       
+       KillPackage $1 native $3
+       
+       exit `cat $RESULT_PATH`
+}
+
+function ExecuteUTC {
+       RESULT_PATH=/tmp/utcresult
+       ERRLOG_PATH=/tmp/utclog
+       rm -f $RESULT_PATH
+       rm -f $ERRLOG_PATH
+       RET=`launch_app core.$1-tests smacktestkey $2`
+       if [[ $RET == *"successfully launched"* ]];then
+               echo "Successfully Launched"
+       else
+               echo "Launch Failed"
+               KillPackage $1 core
+               exit 1
+       fi
+       COUNTER=0
+       while [ ! -e $RESULT_PATH ];
+       do
+               if [ $COUNTER -eq $TIMEOUT_VALUE ];
+               then
+                       # Kill launched application
+                       KillPackage $1 core
+                       echo "Timeout! [ Execution exceeded $TIMEOUT_VALUE seconds ]"
+                       exit 1
+               fi
+               sleep 1
+               COUNTER=$((COUNTER + 1))
+       done
+       if [ -e $ERRLOG_PATH ];
+       then
+               echo `cat $ERRLOG_PATH`
+               rm $ERRLOG_PATH
+       fi
+       
+       KillPackage $1 core
+       
+       exit `cat $RESULT_PATH`
+}
+
+if [[ $3 == "itc" ]] || [[ $3 == "ctc" ]] ;then
+       Execute $1 $2 $3
+else
+       ExecuteUTC $1 $2
+fi
+
+
+
+
+
+
diff --git a/templates/src-directory/ctc/CMakeLists.txt b/templates/src-directory/ctc/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..ae4b2fa
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "%{MODULE_NAME}")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-ctc")
+
+SET(CAPI_LIB "%{MODULE_LIBNAME}")
+SET(TC_SOURCES
+       %{MODULE_NAME}-common.c
+       %{MODULE_NAME}.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/templates/src-directory/ctc/[module_name]-common.c b/templates/src-directory/ctc/[module_name]-common.c
new file mode 100755 (executable)
index 0000000..62fd935
--- /dev/null
@@ -0,0 +1,18 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "%{MODULE_NAME}-common.h"
+
+//Add helper function definitions here
diff --git a/templates/src-directory/ctc/[module_name]-common.h b/templates/src-directory/ctc/[module_name]-common.h
new file mode 100755 (executable)
index 0000000..a3d03b4
--- /dev/null
@@ -0,0 +1,28 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _%{HEADER_TOP}_COMMON_H_
+#define _%{HEADER_TOP}_COMMON_H_
+
+#include "assert.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+
+
+#endif  //_%{HEADER_TOP}_COMMON_H_
diff --git a/templates/src-directory/ctc/[module_name].c b/templates/src-directory/ctc/[module_name].c
new file mode 100755 (executable)
index 0000000..264fadb
--- /dev/null
@@ -0,0 +1,65 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "%{MODULE_NAME}-common.h"
+
+//& set: %{MODULE_NAME_C}
+
+
+/**
+ * @function           CTs_%{MODULE_NAME_U}_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void CTs_%{MODULE_NAME_U}_startup(void)
+{
+       fpLog = fopen(ERR_LOG,"w");
+       return;
+}
+
+
+/**
+ * @function           CTs_%{MODULE_NAME_U}_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void CTs_%{MODULE_NAME_U}_cleanup(void)
+{
+       fclose(fpLog);
+       return;
+}
+
+
+//& type: auto
+//& purpose: 
+/**
+* @testcase    CTc_First_p
+* @type     auto
+* @since_tizen    2.3
+* @description   
+* @scenario    
+* @apicovered   
+* @passcase    
+* @failcase    
+* @precondition   
+* @postcondition  
+*/ 
+int CTc_First_p(void)
+{
+    return 0;
+}
+
diff --git a/templates/src-directory/ctc/native-[module_name]-ctc.spec b/templates/src-directory/ctc/native-[module_name]-ctc.spec
new file mode 100755 (executable)
index 0000000..9b850b5
--- /dev/null
@@ -0,0 +1,50 @@
+%define MODULE_NAME [MODULE_NAME]
+%define MODULE_LIBNAME [MODULE_LIBNAME]
+Name:       native-%{MODULE_NAME}-ctc
+Summary:    Native API Compatability TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  dlog
+
+%description
+Native API Compatability TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/ctc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/templates/src-directory/ctc/native-[module_name]-ctc.xml b/templates/src-directory/ctc/native-[module_name]-ctc.xml
new file mode 100755 (executable)
index 0000000..b58c54e
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-MODULE-ctc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreLABELTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native-MODULE-ctc" exec="/opt/usr/apps/native-MODULE-ctc/bin/tct-MODULE-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/templates/src-directory/ctc/tct-[module_name]-native.c b/templates/src-directory/ctc/tct-[module_name]-native.c
new file mode 100755 (executable)
index 0000000..655684f
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-%{MODULE_NAME}-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/templates/src-directory/itc/CMakeLists.txt b/templates/src-directory/itc/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..61edec4
--- /dev/null
@@ -0,0 +1,33 @@
+SET(PKG_NAME "%{MODULE_NAME}")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "%{MODULE_LIBNAME}")
+SET(TC_SOURCES
+       ITs-%{MODULE_NAME}-common.c
+       ITs-%{MODULE_NAME}.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/templates/src-directory/itc/ITs-[module_name]-common.c b/templates/src-directory/itc/ITs-[module_name]-common.c
new file mode 100755 (executable)
index 0000000..d7243a8
--- /dev/null
@@ -0,0 +1,18 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-%{MODULE_NAME}-common.h"
+
+//Add helper function definitions here
\ No newline at end of file
diff --git a/templates/src-directory/itc/ITs-[module_name]-common.h b/templates/src-directory/itc/ITs-[module_name]-common.h
new file mode 100755 (executable)
index 0000000..425c87d
--- /dev/null
@@ -0,0 +1,39 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _ITS_%{HEADER_TOP}_COMMON_H_
+#define _ITS_%{HEADER_TOP}_COMMON_H_
+
+#include "assert.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+//Add test package related includes here
+
+FILE *g_fpLog;
+
+//Add helper function declarations here
+
+#define FPRINTF(...) {\
+       g_fpLog = fopen(ERR_LOG,"a");\
+       fprintf(g_fpLog, __VA_ARGS__);\
+       fclose(g_fpLog);\
+}
+
+//Add helper function declarations here
+
+#endif  //_ITS_%{HEADER_TOP}_COMMON_H_
diff --git a/templates/src-directory/itc/ITs-[module_name].c b/templates/src-directory/itc/ITs-[module_name].c
new file mode 100755 (executable)
index 0000000..b88276e
--- /dev/null
@@ -0,0 +1,86 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-%{MODULE_NAME}-common.h"
+
+//& set: %{MODULE_NAME_C}
+
+
+/**
+ * @function           ITs_%{MODULE_NAME_U}_startup
+ * @description                Called before each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_%{MODULE_NAME_U}_startup(void)
+{
+       struct stat stBuff;   
+       if ( stat(ERR_LOG, &stBuff) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+
+       return;
+}
+
+
+/**
+ * @function           ITs_%{MODULE_NAME_U}_cleanup
+ * @description                Called after each test
+ * @parameter          NA
+ * @return                     NA
+ */ 
+void ITs_%{MODULE_NAME_U}_cleanup(void)
+{
+       return;
+}
+
+//& type: auto
+//& purpose: 
+/**
+* @testcase    ITc_First_p
+* @type     auto
+* @since_tizen    2.3
+* @description   
+* @scenario    
+* @apicovered   
+* @passcase    
+* @failcase    
+* @precondition   
+* @postcondition  
+*/ 
+int ITc_First_p(void)
+{
+    return 0;
+}
+
+//& type: auto
+//& purpose: 
+/**
+* @testcase    ITc_First_n
+* @type     auto
+* @since_tizen    2.3
+* @description   
+* @scenario    
+* @apicovered   
+* @passcase    
+* @failcase    
+* @precondition   
+* @postcondition  
+*/ 
+int ITc_First_n(void)
+{
+    return 0;
+}
diff --git a/templates/src-directory/itc/native-[module_name]-itc.spec b/templates/src-directory/itc/native-[module_name]-itc.spec
new file mode 100755 (executable)
index 0000000..b3168f1
--- /dev/null
@@ -0,0 +1,50 @@
+%define MODULE_NAME [MODULE_NAME]
+%define MODULE_LIBNAME [MODULE_LIBNAME]
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  dlog
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/itc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/templates/src-directory/itc/native-[module_name]-itc.xml b/templates/src-directory/itc/native-[module_name]-itc.xml
new file mode 100755 (executable)
index 0000000..4ad7d4f
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-MODULE-itc" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreLABELTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native-MODULE-itc" exec="/opt/usr/apps/native-MODULE-itc/bin/tct-MODULE-native" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/templates/src-directory/itc/tct-[module_name]-native.c b/templates/src-directory/itc/tct-[module_name]-native.c
new file mode 100755 (executable)
index 0000000..655684f
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <stdio.h>
+#include <string.h>
+#include "tct-%{MODULE_NAME}-native.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/tcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               FILE *fres = fopen(ERR_LOG,"a");
+               if ( fres == NULL )
+               {
+                       return 1;
+               }
+               fprintf(fres, "Unable to execute test cases: ui_app_main API call gets failed\\n");
+               fclose(fres);
+       }
+       return nRet;
+}
diff --git a/templates/src-directory/utc/CMakeLists.txt b/templates/src-directory/utc/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..d1e0e26
--- /dev/null
@@ -0,0 +1,32 @@
+SET(PKG_NAME "%{MODULE_NAME}")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "%{MODULE_LIBNAME}")
+SET(TC_SOURCES
+       utc-%{MODULE_NAME}.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+       ${CAPI_LIB}
+       bundle
+       dlog
+)
+
+INCLUDE_DIRECTORIES(
+       ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+       ${${CAPI_LIB}_LIBRARIES}
+       bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+       DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+SET(CMAKE_C_FLAGS " -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
diff --git a/templates/src-directory/utc/core-[module_name]-tests.spec b/templates/src-directory/utc/core-[module_name]-tests.spec
new file mode 100755 (executable)
index 0000000..b600215
--- /dev/null
@@ -0,0 +1,49 @@
+%define MODULE_NAME [MODULE_NAME]
+%define MODULE_LIBNAME [MODULE_LIBNAME]
+Name:       core-%{MODULE_NAME}-tests
+Summary:    Core API unit TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache License, Version 2.0, Samsung Properietary
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(%{MODULE_LIBNAME})
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  cmake
+BuildRequires:  dlog
+
+%description
+Core API unit TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/opt/usr/share/license
+cp LICENSE %{buildroot}/opt/usr/share/license/%{name}
+mkdir -p %{buildroot}/tmp/
+mkdir -p %{buildroot}/opt/share/packages/
+cp packaging/utc/%{name}.xml %{buildroot}/opt/share/packages/
+mkdir -p %{buildroot}/opt/usr/apps/%{name}/bin
+cp templates/external_wrapper.sh %{buildroot}/opt/usr/apps/%{name}/bin
+%post
+
+%postun
+
+
+%files
+/opt/usr/apps/%{name}/*
+/opt/share/packages/%{name}.xml
+/opt/usr/share/license/%{name}
diff --git a/templates/src-directory/utc/core-[module_name]-tests.xml b/templates/src-directory/utc/core-[module_name]-tests.xml
new file mode 100755 (executable)
index 0000000..e9d535b
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-MODULE-tests" version="0.1.0" api-version="2.3.1" install-location="internal-only">
+    <label>CoreLABELTest</label>
+    <author email="test@samsung.com" href="www.samsung.com">test</author>
+    <description>Core API test Application</description>
+    <ui-application appid="core-MODULE-tests" exec="/opt/usr/apps/core-MODULE-tests/bin/tct-MODULE-core" nodisplay="false" multiple="false" type="capp" taskmanage="true" process-pool="true">
+    </ui-application>
+</manifest>
diff --git a/templates/src-directory/utc/tct-[module_name]-core.c b/templates/src-directory/utc/tct-[module_name]-core.c
new file mode 100755 (executable)
index 0000000..812db13
--- /dev/null
@@ -0,0 +1,130 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include <bundle.h>
+#include <stdio.h>
+#include <string.h>
+#include "tct-%{MODULE_NAME}-core.h"
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+static char* key;
+static char* fname;
+static int nNum;
+
+int run_testcases()
+{
+       int result = -1;
+       int i;
+       gsize byte_size;
+       const gchar* encoded_byte;
+       guchar* byte = NULL;
+
+       static const size_t sz_byte_len = sizeof(size_t);
+       static const size_t sz_type = sizeof(int);
+       static const size_t sz_keysize = sizeof(size_t);
+       static const size_t sz_size = sizeof(size_t);
+
+       char* func_name = fname;//argv[1];
+       if ( nNum > 2 )
+       {
+               encoded_byte = key;//argv[3];
+               byte = g_base64_decode(encoded_byte,&byte_size);
+               byte += sz_byte_len;
+               byte += sz_type;
+               size_t keysize = *((size_t *)byte); byte += sz_keysize;
+               byte += keysize;
+               size_t size = *((size_t *)byte); byte += sz_size;
+               void *val = (void *)byte; byte += size;
+               func_name = strdup((char *)val);
+               if ( NULL == func_name )
+               {
+                       return result;
+               }
+       }
+
+       for ( i = 0; tc_array[i].name; i++ )
+       {
+               if ( !strncmp(func_name, tc_array[i].name, strlen(func_name)) )
+               {
+                       if ( tc_array[i].startup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", func_name);
+                               tc_array[i].startup();
+                       }
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", func_name);
+                       result = tc_array[i].function();
+
+                       if ( tc_array[i].cleanup )
+                       {
+                               dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", func_name);
+                               tc_array[i].cleanup();
+                       }
+
+                       FILE *fres = fopen("/tmp/utcresult", "w");
+                       if ( NULL == fres )
+                       {
+                               if ( nNum > 2 )
+                               {
+                                       free(func_name);
+                               }
+                               return result;
+                       }
+                       if ( nNum > 2 )
+                       {
+                               free(func_name);
+                       }
+
+                       fprintf(fres, "%d", result); 
+                       fclose(fres); 
+                       return result;
+               }
+       }
+       if ( nNum > 2 )
+       {
+               free(func_name);
+       }
+
+       return 2;
+}
+
+static bool app_create(void *data)
+{
+       run_testcases();
+       return false; // quit app
+}
+
+int main(int argc, char *argv[])
+{
+       fname = argv[1];
+       key = argv[3];
+       nNum = argc;
+       ui_app_lifecycle_callback_s event_callback = {0,};
+       event_callback.create = app_create;
+       int nRet = ui_app_main(argc, argv, &event_callback, NULL);
+       if ( nRet != APP_ERROR_NONE )
+       {
+               printf("Unable to execute test cases: ui_app_main API call gets failed\\n");
+       }
+       return nRet;
+}
diff --git a/templates/src-directory/utc/utc-[module_name].c b/templates/src-directory/utc/utc-[module_name].c
new file mode 100755 (executable)
index 0000000..a89c604
--- /dev/null
@@ -0,0 +1,62 @@
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "assert.h"
+#include <%{MODULE_NAME_U}.h>
+
+//& set: %{MODULE_NAME_C}
+
+/**
+ * @function       utc_<module_name>_startup
+ * @description   Called before each test …
+ * @parameter    NA
+ * @return         NA 
+ */
+void utc_%{MODULE_NAME_U}_startup(void)
+{
+}
+
+/**
+ * @function       utc_<module_name>_cleanup
+ * @description   Called after each test …
+ * @parameter    NA
+ * @return         NA 
+ */
+void utc_%{MODULE_NAME_U}_cleanup(void)
+{
+}
+
+
+//& purpose: A purpose of a first positive TC.
+/**
+ * @testcase       utc_<module_name>_<API_name>_p
+ * @description   positive test case for API …
+ * @since_tizen 2.3 
+ */
+int first_tc_p(void)
+{
+    return 0;
+}
+
+//& purpose: A purpose of a first negative TC.
+/**
+ * @testcase       utc_<module_name>_<API_name>_n
+ * @description   Negative test case for API …
+ * @since_tizen 2.3 
+ */
+int first_tc_n(void)
+{
+    return 0;
+}
diff --git a/templates/tct-package/inst.sh b/templates/tct-package/inst.sh
new file mode 100755 (executable)
index 0000000..5423c3a
--- /dev/null
@@ -0,0 +1,106 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the License);
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http:#www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+NAME=$(basename $(cd $(dirname $0);pwd))
+MOD_NAME=%{MOD_NAME}
+PKG_DIR=%{PKG_DIR} # directory supplied by external script
+PKG_NAME=%{PKG_NAME} # name supplied by external script
+PKG_FULLNAME=%{PKG_FULLNAME} # name supplied by external script
+
+#parse params
+USAGE="Usage: ./inst.sh [-i] [-u]
+  -i install wgt and config environment
+  -u uninstall wgt and remove source file
+[-i] option was set as default."
+
+if [[ $PKG_NAME == *"-itc" ]] ;then
+       SUITENAME=$MOD_NAME-native
+elif [[ $PKG_NAME == *"-ctc" ]]; then
+       SUITENAME=$MOD_NAME-native
+else
+       SUITENAME=$MOD_NAME-core
+fi
+function installpkg(){
+   if [ ! -d /opt/usr/media/res/ ]; then
+        mkdir /opt/usr/media/res
+    fi
+    cp -rf $PKG_DIR/res /opt/usr/media/
+    rpm -e `rpm -qa | grep $PKG_NAME`
+    pkgcmd -i -t rpm -p $PKG_DIR/$PKG_FULLNAME
+    sync       
+    echo /opt/usr/share/packages/$PKG_NAME.xml
+    if [ -e /opt/usr/share/packages/$PKG_NAME.xml ];then
+       pkginfo --imd /opt/usr/share/packages/$PKG_NAME.xml
+    fi
+
+    cp $PKG_DIR/external_wrapper.sh /opt/usr/media/
+    chsmack -a "_" "/opt/usr/apps/$PKG_NAME/bin"
+    chsmack -a "_" "/opt/usr/apps/$PKG_NAME/bin/tct-$SUITENAME"
+    chsmack -e $PKG_NAME "/opt/usr/apps/$PKG_NAME/bin/tct-$SUITENAME"
+
+    if [ "$(uname -m)" == "armv7l" ]; then
+    applist=`ls /opt/usr/media/res | grep tpk | grep arm`
+    else
+        applist=`ls /opt/usr/media/res | grep tpk | grep i386`
+    fi
+
+    for app in $applist
+    do
+        pkgcmd -it tpk -p /opt/usr/media/res/$app
+       sync
+    done
+       
+       if [ -d /opt/usr/apps/org.tizen.messageportapp ]; then
+       ( echo 3 ; sleep 1 ; echo cert ; sleep 1 ; echo 0 ) | pkginfo --setcert org.tizen.messageportapp
+       fi
+       
+    if [ -f /opt/usr/apps/native-app-manager-itc/data/appmanagerinstall.sh ]
+    then
+       source /opt/usr/apps/native-app-manager-itc/data/appmanagerinstall.sh
+    fi
+}
+
+function uninstallpkg(){
+### remove source file ###
+if [ -d /opt/usr/media/tct/opt/$NAME ];then
+    rm -rf /opt/usr/media/tct/opt/$NAME
+    pkgcmd -u -n $PKG_NAME
+    sync       
+       if [ -d /opt/usr/media/Images/test ];then
+               rm -rf /opt/usr/media/Images/test*
+       fi
+else
+    echo "Remove source file fail, please check if the source file exist: /opt/usr/media/tct/opt/$NAME ..."
+fi
+    applist=`ls /opt/usr/media/res | grep tpk | awk -F'-' '{print $1}'`
+    for app in $applist
+    do
+       pkgcmd -u -n $app
+       sync
+    done
+    rm -rf /opt/usr/media/res
+}
+
+case "$1" in
+    -h|--help) echo "$USAGE"
+               exit ;;
+    ""|-i) installpkg $2;;
+    -u) uninstallpkg;;
+    *) echo "Unknown option: $1"
+       echo "$USAGE"
+       exit ;;
+esac